diff --git a/develop/assets/index-62b0eddf.css b/develop/assets/index-14f07603.css similarity index 94% rename from develop/assets/index-62b0eddf.css rename to develop/assets/index-14f07603.css index dbdbd298..317b3bea 100644 --- a/develop/assets/index-62b0eddf.css +++ b/develop/assets/index-14f07603.css @@ -1,4 +1,4 @@ -@charset "UTF-8";.app-update-banner.app-update-banner{position:absolute;left:50%;transform:translate(-50%);position:fixed;top:31px;padding:0 4rem 0 0;z-index:1040;margin:0;color:var(--text-color);text-align:center;width:700px;max-width:calc(100% - 30px);box-shadow:0 0 1rem var(--brand-color)}.app-container{height:100%}.app{padding-top:56px;height:100%}.shlink-wrapper{min-height:100%;padding-bottom:3.1rem;margin-bottom:-3.1rem}.shlink-footer{height:2.3rem;margin-top:.8rem;padding:0}@media (min-width: 768px){.shlink-footer{padding:0 15px}}.aside-menu{width:260px;background-color:var(--primary-color);box-shadow:#0000000d 0 8px 15px;position:fixed!important;padding-top:13px;padding-bottom:10px;top:56px;bottom:0;left:0;display:block;z-index:1010;overflow-x:hidden;overflow-y:auto}@media (min-width: 768px){.aside-menu{padding:30px 15px 15px}}@media (max-width: 767px){.aside-menu{transition:left .3s;top:53px;box-shadow:-10px 0 50px 11px #0000008c}}@media (max-width: 767px){.aside-menu--hidden{left:-295px}}.aside-menu__nav{height:100%}.aside-menu__item{padding:10px 20px;margin:0 -15px;text-decoration:none!important;cursor:pointer}@media (max-width: 767px){.aside-menu__item{margin:0}}.aside-menu__item:hover{background-color:var(--secondary-color)}.aside-menu__item--selected,.aside-menu__item--selected:hover{color:#fff;background-color:var(--brand-color)}.aside-menu__item--divider{border-bottom:1px solid #eeeeee;margin:20px 0}.aside-menu__item--danger{color:#dc3545}.aside-menu__item--push{margin-top:auto}.aside-menu__item--danger:hover{color:#fff;background-color:#dc3545}.aside-menu__item-text{margin-left:8px}.servers-list__list-group.servers-list__list-group{width:100%}.servers-list__list-group:not(.servers-list__list-group--embedded){max-width:400px;box-shadow:0 .125rem .25rem #00000013}.servers-list__server-item.servers-list__server-item{text-align:left;position:relative;padding:.75rem 2.5rem .75rem 1rem}.servers-list__server-item:not(:hover){color:#4696e5}.servers-list__server-item:hover{background-color:var(--secondary-color)}.servers-list__server-item-icon{position:absolute;top:50%;transform:translateY(-50%);right:1rem}.servers-list__list-group--embedded.servers-list__list-group--embedded{border-radius:0;border-top:1px solid var(--border-color)}@media (min-width: 768px){.servers-list__list-group--embedded.servers-list__list-group--embedded{max-height:220px;overflow-x:auto;scrollbar-color:rgba(0,0,0,.2) #f5f5f5;scrollbar-width:thin}.servers-list__list-group--embedded.servers-list__list-group--embedded::-webkit-scrollbar{width:6px;background-color:#f5f5f5}.servers-list__list-group--embedded.servers-list__list-group--embedded::-webkit-scrollbar-thumb{background-color:#0003;border-radius:.5rem}}.servers-list__list-group--embedded.servers-list__list-group--embedded .servers-list__server-item{border:none;border-bottom:1px solid var(--border-color)}.home{position:relative;padding-top:15px;width:100%}@media (min-width: 768px){.home{padding-top:0;height:calc(100vh - 56px - 3.1rem)}}.home__logo-wrapper{padding:1.5rem!important;height:100%!important;min-height:300px}.home__logo{position:absolute;top:50%;transform:translateY(-50%);width:calc(300.024px - 3rem)}.home__main-card{margin:0 auto;max-width:720px}@media (min-width: 768px){.home__main-card{position:absolute;top:50%;transform:translateY(-50%)}}.home__title-wrapper{padding:1.5rem!important;border-bottom:1px solid var(--border-color)}.home__title{text-align:center;font-size:1.75rem;margin:0}@media (min-width: 768px){.home__title{font-size:2.2rem}}@media (min-width: 768px){.home__servers-container{border-left:1px solid var(--border-color)}}.main-header.main-header{color:#fff;background-color:var(--brand-color)!important}.main-header.main-header .navbar-brand{color:inherit!important}.main-header__brand-logo{width:26px;margin-right:5px}.main-header__toggle-icon{width:20px;transition:transform .3s}.main-header__toggle-icon--opened{transform:rotate(180deg)}.no-menu-wrapper{padding:15px 0 0}@media (min-width: 768px){.no-menu-wrapper{padding:30px 20px 20px}}.menu-layout__swipeable,.menu-layout__swipeable-inner{height:100%}.menu-layout__burger-icon{display:none;transition:color .3s;position:fixed;top:18px;z-index:1035;font-size:1.5rem;cursor:pointer;color:#ffffff80}@media (max-width: 767px){.menu-layout__burger-icon{display:inline-block}}.menu-layout__burger-icon--active{color:#fff}.menu-layout__container.menu-layout__container{padding:20px 0 0;min-height:100%}@media (min-width: 768px){.menu-layout__container.menu-layout__container{padding:30px 0 0 260px}}.shlink-versions-container--with-sidebar{margin-left:0}@media (min-width: 768px){.shlink-versions-container--with-sidebar{margin-left:260px}}.dropdown-btn__toggle.dropdown-btn__toggle,.dropdown-btn__toggle.dropdown-btn__toggle:not(:disabled):not(.disabled).active,.dropdown-btn__toggle.dropdown-btn__toggle:not(:disabled):not(.disabled):active,.dropdown-btn__toggle.dropdown-btn__toggle:not(:disabled):not(.disabled):focus,.dropdown-btn__toggle.dropdown-btn__toggle:not(:disabled):not(.disabled):hover,.show>.dropdown-btn__toggle.dropdown-btn__toggle.dropdown-toggle{text-align:left;color:var(--input-text-color);background-color:var(--primary-color);border-color:var(--input-border-color)}.card .dropdown-btn__toggle.dropdown-btn__toggle,.card .dropdown-btn__toggle.dropdown-btn__toggle:not(:disabled):not(.disabled).active,.card .dropdown-btn__toggle.dropdown-btn__toggle:not(:disabled):not(.disabled):active,.card .dropdown-btn__toggle.dropdown-btn__toggle:not(:disabled):not(.disabled):focus,.card .dropdown-btn__toggle.dropdown-btn__toggle:not(:disabled):not(.disabled):hover,.show>.card .dropdown-btn__toggle.dropdown-btn__toggle.dropdown-toggle{background-color:var(--input-color)}.dropdown-btn__toggle.dropdown-btn__toggle.disabled,.dropdown-btn__toggle.dropdown-btn__toggle:disabled{background-color:var(--input-disabled-color)}.dropdown-btn__toggle.dropdown-btn__toggle:after{position:absolute;top:50%;transform:translateY(-50%);right:.75rem}.domains-dropdown__toggle-btn.domains-dropdown__toggle-btn,.domains-dropdown__toggle-btn.domains-dropdown__toggle-btn:hover,.domains-dropdown__toggle-btn.domains-dropdown__toggle-btn:active{color:#6c757d!important}.domains-dropdown__toggle-btn--active.domains-dropdown__toggle-btn--active,.domains-dropdown__toggle-btn--active.domains-dropdown__toggle-btn--active:hover,.domains-dropdown__toggle-btn--active.domains-dropdown__toggle-btn--active:active{color:var(--input-text-color)!important}.domains-dropdown__back-btn.domains-dropdown__back-btn,.domains-dropdown__back-btn.domains-dropdown__back-btn:hover{border-color:var(--border-color)}.search-field{position:relative}.search-field:focus-within{z-index:1}.search-field__input.search-field__input{padding-left:40px;padding-right:40px}.search-field__input--no-border.search-field__input--no-border{border:none;border-radius:0}.search-field__icon{position:absolute;top:50%;transform:translateY(-50%);left:15px;color:#6c757d}.search-field__close{position:absolute;top:50%;transform:translateY(-50%);right:10px;cursor:pointer}.dropdown-btn-menu__dropdown-toggle:after{display:none!important}.import-servers-btn__csv-select{position:absolute;left:-9999px;top:-9999px}.server-error__container{text-align:center;display:flex;align-items:center;justify-content:center}.server-error__delete-btn{color:#dc3545;cursor:pointer}.server-error__delete-btn:hover{text-decoration:underline}.highlight-card.highlight-card{text-align:center;border-top:3px solid var(--brand-color);color:inherit;text-decoration:none}.highlight-card__link-icon{position:absolute;right:5px;bottom:5px;opacity:.1;transform:rotate(-45deg)}.highlight-card__title{text-transform:uppercase;color:#6c757d}.nav-pills__nav{position:sticky!important;top:55px;z-index:2}.nav-pills__nav-link.nav-pills__nav-link{border-radius:0!important;padding-bottom:calc(.5rem - 3px)!important;border-bottom:3px solid transparent!important;color:#5d6778;font-weight:700;cursor:pointer;text-decoration:none}@media (min-width: 576px) and (max-width: 991px){.nav-pills__nav-link.nav-pills__nav-link{font-size:89%}}.nav-pills__nav-link:hover{color:#4696e5!important}.nav-pills__nav-link.active{border-color:#4696e5!important;background-color:var(--primary-color)!important;color:#4696e5!important}.ordering-dropdown__menu--link.ordering-dropdown__menu--link{min-width:11rem}.ordering-dropdown__sort-icon{margin:3.5px 0 0;float:right}.user-interface__theme-icon{float:right;margin-top:.25rem}.create-short-url-result__copy-btn{margin-left:10px;vertical-align:inherit}.copy-to-clipboard-icon{cursor:pointer;font-size:1.2rem}.qr-code-modal__img{max-width:100%;box-shadow:0 0 .25rem #0003}.short-urls-visits-count__max-visits-control{cursor:help}.short-url-visits-count__amount{transition:transform .3s ease;display:inline-block}.short-url-visits-count__amount--big{transform:scale(1.5)}.short-url-visits-count__tooltip-list-item:not(:last-child){margin-bottom:.5rem}.tag{color:#fff}.tag--light-bg{color:#222!important}.tag:not(:last-child){margin-right:3px}.tag__close-selected-tag.tag__close-selected-tag{font-size:inherit;color:inherit;opacity:1;cursor:pointer;margin-left:5px}.tag__close-selected-tag.tag__close-selected-tag:hover{color:inherit!important;opacity:1!important}.short-urls-row__cell.short-urls-row__cell{vertical-align:middle!important}.short-urls-row__cell--break{word-break:break-all}@media (min-width: 992px){.short-urls-row__cell--indivisible{white-space:nowrap}}@media (max-width: 991px){.short-urls-row__short-url-wrapper{word-break:break-all}}@media (min-width: 992px){.short-urls-row__short-url-wrapper{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;vertical-align:bottom;display:inline-block;max-width:18rem}}.short-urls-row__copy-hint{position:absolute;top:50%;transform:translateY(-50%) translate(10px);box-shadow:0 3px 15px #00000040}@media (max-width: 991px){.short-urls-row__copy-hint{position:absolute;top:50%;transform:translateY(-50%) translate(calc(-100% - 20px))}}.react-datepicker__close-icon.react-datepicker__close-icon{position:absolute;top:50%;transform:translateY(-50%);right:0}.react-datepicker__close-icon.react-datepicker__close-icon:after{right:.75rem;line-height:11px;background-color:#333;font-size:14px}.react-datepicker__input-container,.react-datepicker-wrapper{display:block!important}.react-datepicker__day--keyboard-selected{background-color:#4696e5}.react-datepicker__day--keyboard-selected:hover{background-color:#1d77d0}.react-datepicker__time.react-datepicker__time,.react-datepicker.react-datepicker{background-color:var(--primary-color)!important;color:var(--text-color);border-color:var(--border-color)}.react-datepicker__header.react-datepicker__header{background-color:var(--secondary-color);border-color:var(--border-color)}.react-datepicker__current-month.react-datepicker__current-month,.react-datepicker-time__header.react-datepicker-time__header,.react-datepicker-year-header.react-datepicker-year-header,.react-datepicker__day-name.react-datepicker__day-name,.react-datepicker__day.react-datepicker__day:not(:hover):not(.react-datepicker__day--selected),.react-datepicker__time-name.react-datepicker__time-name{color:inherit}.react-datepicker__day--disabled.react-datepicker__day--disabled{cursor:default;color:var(--border-color)!important}.react-datepicker__day--keyboard-selected.react-datepicker__day--keyboard-selected,.react-datepicker__month-text--keyboard-selected.react-datepicker__month-text--keyboard-selected,.react-datepicker__quarter-text--keyboard-selected.react-datepicker__quarter-text--keyboard-selected,.react-datepicker__year-text--keyboard-selected.react-datepicker__year-text--keyboard-selected{background-color:var(--brand-color)!important;color:#fff!important}.react-datepicker__time-list-item.react-datepicker__time-list-item:hover{color:#232323}.react-datepicker__time-container.react-datepicker__time-container{border-color:var(--border-color)}.react-datepicker__time-list.react-datepicker__time-list{scrollbar-color:rgba(0,0,0,.5) var(--secondary-color);scrollbar-width:thin}.react-datepicker__time-list.react-datepicker__time-list::-webkit-scrollbar{width:10px;background-color:var(--secondary-color)}.react-datepicker__time-list.react-datepicker__time-list::-webkit-scrollbar-thumb{background-color:#00000080;border-radius:.5rem}.react-datepicker-popper.react-datepicker-popper{z-index:2}.react-datepicker-popper.react-datepicker-popper[data-placement^=top] .react-datepicker__triangle.react-datepicker__triangle:after{border-top-color:var(--primary-color)}.react-datepicker-popper.react-datepicker-popper[data-placement^=top] .react-datepicker__triangle.react-datepicker__triangle:before{border-top-color:var(--border-color)}.react-datepicker-popper.react-datepicker-popper[data-placement^=bottom] .react-datepicker__triangle.react-datepicker__triangle:after{border-bottom-color:var(--secondary-color)}.react-datepicker-popper.react-datepicker-popper[data-placement^=bottom] .react-datepicker__triangle.react-datepicker__triangle:before{border-bottom-color:var(--border-color)}.icon-input-container{position:relative}.icon-input-container__input{padding-right:35px!important}.icon-input-container__input:not(:disabled){background-color:var(--primary-color)!important}.card .icon-input-container__input:not(:disabled),.dropdown .icon-input-container__input:not(:disabled){background-color:var(--input-color)!important}.icon-input-container__icon{position:absolute;top:50%;transform:translateY(-50%);right:.75rem;cursor:pointer}.use-existing-if-found-info-icon__modal-quote{margin-bottom:0;padding:10px 15px;font-size:17.5px;border-left:5px solid #eeeeee;background-color:#f9f9f9}.short-url-form p:last-child{margin-bottom:0}.short-url-form .card{height:100%}.short-urls-filtering-bar__tags-icon{vertical-align:bottom;font-size:1.6rem}.short-urls-table.short-urls-table{margin-bottom:-1px}.short-urls-table__header-cell--with-action,.edit-tag-modal__color-picker-toggle{cursor:pointer}.edit-tag-modal__color-icon{color:#fff}.edit-tag-modal__popover.edit-tag-modal__popover{border-radius:.6rem}.tag-bullet{border-radius:50%;width:20px;height:20px;display:inline-block;vertical-align:-4px;margin-right:7px}.simple-paginator{user-select:none}.tags-table__header-cell.tags-table__header-cell{z-index:1;position:relative;top:56px;position:sticky;cursor:pointer}.tags-table__header-cell.tags-table__header-cell:before{content:"";position:absolute;top:-1px;left:0;bottom:-1px;right:0;background:var(--table-border-color);z-index:-2}.tags-table__header-cell.tags-table__header-cell:first-child:before{left:0}.tags-table__header-cell.tags-table__header-cell:after{content:"";position:absolute;top:0;left:0;bottom:0;right:0;background:var(--primary-color);z-index:-1}.tags-table__header-cell.tags-table__header-cell:first-child:after{left:0}.chart-card__footer--sticky{position:sticky;bottom:0}.doughnut-chart-legend{list-style-type:none;padding:0;margin:0}@media (max-width: 767px){.doughnut-chart-legend{margin-top:1rem}}.doughnut-chart-legend__item:not(:first-child){margin-top:.3rem}.doughnut-chart-legend__item-color{width:20px;min-width:20px;height:20px;margin-right:5px;border-radius:10px}.doughnut-chart-legend__item-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.line-chart-card__body canvas{height:300px!important}@media (min-width: 768px){.line-chart-card__body canvas{height:400px!important}}@media (min-width: 768px){.map-modal__modal.map-modal__modal{width:calc(100% - 40px);max-width:calc(100% - 40px);height:calc(100% - 40px);margin:20px}}@media (max-width: 767px){.map-modal__modal.map-modal__modal{width:calc(100% - 20px);max-width:calc(100% - 20px);height:calc(100% - 20px);margin:10px}}.map-modal__modal-content.map-modal__modal-content{height:100%}.map-modal__modal-title.map-modal__modal-title{position:absolute;width:100%;z-index:1001;padding:.5rem 1rem 1rem;margin:0;color:#fff;background:linear-gradient(rgba(0,0,0,.5),rgba(0,0,0,0))}.map-modal__modal-body.map-modal__modal-body{padding:0;display:flex;overflow:hidden}.map-modal__modal.map-modal__modal .leaflet-container.leaflet-container{flex:1 1 auto;border-radius:.3rem}.map-modal__modal.map-modal__modal .leaflet-top.leaflet-top .leaflet-control.leaflet-control{margin-top:60px}.open-map-modal-btn__btn.open-map-modal-btn__btn{padding:0;margin-right:1rem}.visits-table{margin:1.5rem 0 0;position:relative;background-color:var(--primary-color);overflow-y:hidden}.visits-table__header-cell{cursor:pointer;margin-bottom:55px;z-index:1;position:relative}.visits-table__header-cell:before{content:"";position:absolute;top:-1px;left:0;bottom:-1px;right:-1px;background:var(--table-border-color);z-index:-2}.visits-table__header-cell:first-child:before{left:-1px}.visits-table__header-cell:after{content:"";position:absolute;top:0;left:1px;bottom:0;right:0;background:var(--primary-color);z-index:-1}.visits-table__header-cell:first-child:after{left:0}@media (min-width: 768px){.visits-table__header-cell.visits-table__sticky{top:96px}}.visits-table__header-icon{float:right;margin-top:3px}.visits-table__footer-cell.visits-table__footer-cell{bottom:0;margin-top:34px;padding:.5rem;z-index:1;position:relative}.visits-table__footer-cell.visits-table__footer-cell:before{content:"";position:absolute;top:-1px;left:0;bottom:-1px;right:-1px;background:var(--table-border-color);z-index:-2}.visits-table__footer-cell.visits-table__footer-cell:first-child:before{left:-1px}.visits-table__footer-cell.visits-table__footer-cell:after{content:"";position:absolute;top:0;left:1px;bottom:0;right:0;background:var(--primary-color);z-index:-1}.visits-table__footer-cell.visits-table__footer-cell:first-child:after{left:0}.visits-table__sticky.visits-table__sticky{position:sticky}.short-url-visits-header__created-at{cursor:default}/*! +@charset "UTF-8";.app-update-banner.app-update-banner{position:absolute;left:50%;transform:translate(-50%);position:fixed;top:31px;padding:0 4rem 0 0;z-index:1040;margin:0;color:var(--text-color);text-align:center;width:700px;max-width:calc(100% - 30px);box-shadow:0 0 1rem var(--brand-color)}.app-container{height:100%}.app{padding-top:56px;height:100%}.shlink-wrapper{min-height:100%;padding-bottom:3.1rem;margin-bottom:-3.1rem}.shlink-footer{height:2.3rem;margin-top:.8rem;padding:0}@media (min-width: 768px){.shlink-footer{padding:0 15px}}.aside-menu{width:260px;background-color:var(--primary-color);box-shadow:#0000000d 0 8px 15px;position:fixed!important;padding-top:13px;padding-bottom:10px;top:56px;bottom:0;left:0;display:block;z-index:1010;overflow-x:hidden;overflow-y:auto}@media (min-width: 768px){.aside-menu{padding:30px 15px 15px}}@media (max-width: 767px){.aside-menu{transition:left .3s;top:53px;box-shadow:-10px 0 50px 11px #0000008c}}@media (max-width: 767px){.aside-menu--hidden{left:-295px}}.aside-menu__nav{height:100%}.aside-menu__item{padding:10px 20px;margin:0 -15px;text-decoration:none!important;cursor:pointer}@media (max-width: 767px){.aside-menu__item{margin:0}}.aside-menu__item:hover{background-color:var(--secondary-color)}.aside-menu__item--selected,.aside-menu__item--selected:hover{color:#fff;background-color:var(--brand-color)}.aside-menu__item--divider{border-bottom:1px solid #eeeeee;margin:20px 0}.aside-menu__item--danger{color:#dc3545}.aside-menu__item--push{margin-top:auto}.aside-menu__item--danger:hover{color:#fff;background-color:#dc3545}.aside-menu__item-text{margin-left:8px}.servers-list__list-group.servers-list__list-group{width:100%}.servers-list__list-group:not(.servers-list__list-group--embedded){max-width:400px;box-shadow:0 .125rem .25rem #00000013}.servers-list__server-item.servers-list__server-item{text-align:left;position:relative;padding:.75rem 2.5rem .75rem 1rem}.servers-list__server-item:not(:hover){color:#4696e5}.servers-list__server-item:hover{background-color:var(--secondary-color)}.servers-list__server-item-icon{position:absolute;top:50%;transform:translateY(-50%);right:1rem}.servers-list__list-group--embedded.servers-list__list-group--embedded{border-radius:0;border-top:1px solid var(--border-color)}@media (min-width: 768px){.servers-list__list-group--embedded.servers-list__list-group--embedded{max-height:220px;overflow-x:auto;scrollbar-color:rgba(0,0,0,.2) #f5f5f5;scrollbar-width:thin}.servers-list__list-group--embedded.servers-list__list-group--embedded::-webkit-scrollbar{width:6px;background-color:#f5f5f5}.servers-list__list-group--embedded.servers-list__list-group--embedded::-webkit-scrollbar-thumb{background-color:#0003;border-radius:.5rem}}.servers-list__list-group--embedded.servers-list__list-group--embedded .servers-list__server-item{border:none;border-bottom:1px solid var(--border-color)}.home{position:relative;padding-top:15px;width:100%}@media (min-width: 768px){.home{padding-top:0;height:calc(100vh - 56px - 3.1rem)}}.home__logo-wrapper{padding:1.5rem!important;height:100%!important;min-height:300px}.home__logo{position:absolute;top:50%;transform:translateY(-50%);width:calc(300.024px - 3rem)}.home__main-card{margin:0 auto;max-width:720px}@media (min-width: 768px){.home__main-card{position:absolute;top:50%;transform:translateY(-50%)}}.home__title-wrapper{padding:1.5rem!important;border-bottom:1px solid var(--border-color)}.home__title{text-align:center;font-size:1.75rem;margin:0}@media (min-width: 768px){.home__title{font-size:2.2rem}}@media (min-width: 768px){.home__servers-container{border-left:1px solid var(--border-color)}}.main-header.main-header{color:#fff;background-color:var(--brand-color)!important}.main-header.main-header .navbar-brand{color:inherit!important}.main-header__brand-logo{width:26px;margin-right:5px}.main-header__toggle-icon{width:20px;transition:transform .3s}.main-header__toggle-icon--opened{transform:rotate(180deg)}.no-menu-wrapper{padding:15px 0 0}@media (min-width: 768px){.no-menu-wrapper{padding:30px 20px 20px}}.menu-layout__swipeable,.menu-layout__swipeable-inner{height:100%}.menu-layout__burger-icon{display:none;transition:color .3s;position:fixed;top:18px;z-index:1035;font-size:1.5rem;cursor:pointer;color:#ffffff80}@media (max-width: 767px){.menu-layout__burger-icon{display:inline-block}}.menu-layout__burger-icon--active{color:#fff}.menu-layout__container.menu-layout__container{padding:20px 0 0;min-height:100%}@media (min-width: 768px){.menu-layout__container.menu-layout__container{padding:30px 0 0 260px}}.shlink-versions-container--with-sidebar{margin-left:0}@media (min-width: 768px){.shlink-versions-container--with-sidebar{margin-left:260px}}.dropdown-btn__toggle.dropdown-btn__toggle{text-align:left}.dropdown-btn__toggle.dropdown-btn__toggle--with-caret{padding-right:1.75rem}.dropdown-btn__toggle.dropdown-btn__toggle,.dropdown-btn__toggle.dropdown-btn__toggle:not(:disabled):not(.disabled).active,.dropdown-btn__toggle.dropdown-btn__toggle:not(:disabled):not(.disabled):active,.dropdown-btn__toggle.dropdown-btn__toggle:not(:disabled):not(.disabled):focus,.dropdown-btn__toggle.dropdown-btn__toggle:not(:disabled):not(.disabled):hover,.show>.dropdown-btn__toggle.dropdown-btn__toggle.dropdown-toggle{color:var(--input-text-color);background-color:var(--primary-color);border-color:var(--input-border-color)}.card .dropdown-btn__toggle.dropdown-btn__toggle,.card .dropdown-btn__toggle.dropdown-btn__toggle:not(:disabled):not(.disabled).active,.card .dropdown-btn__toggle.dropdown-btn__toggle:not(:disabled):not(.disabled):active,.card .dropdown-btn__toggle.dropdown-btn__toggle:not(:disabled):not(.disabled):focus,.card .dropdown-btn__toggle.dropdown-btn__toggle:not(:disabled):not(.disabled):hover,.show>.card .dropdown-btn__toggle.dropdown-btn__toggle.dropdown-toggle{background-color:var(--input-color)}.dropdown-btn__toggle.dropdown-btn__toggle.disabled,.dropdown-btn__toggle.dropdown-btn__toggle:disabled{background-color:var(--input-disabled-color)}.dropdown-btn__toggle.dropdown-btn__toggle:after{position:absolute;top:50%;transform:translateY(-50%);right:.75rem}.domains-dropdown__toggle-btn.domains-dropdown__toggle-btn,.domains-dropdown__toggle-btn.domains-dropdown__toggle-btn:hover,.domains-dropdown__toggle-btn.domains-dropdown__toggle-btn:active{color:#6c757d!important}.domains-dropdown__toggle-btn--active.domains-dropdown__toggle-btn--active,.domains-dropdown__toggle-btn--active.domains-dropdown__toggle-btn--active:hover,.domains-dropdown__toggle-btn--active.domains-dropdown__toggle-btn--active:active{color:var(--input-text-color)!important}.domains-dropdown__back-btn.domains-dropdown__back-btn,.domains-dropdown__back-btn.domains-dropdown__back-btn:hover{border-color:var(--border-color)}.search-field{position:relative}.search-field:focus-within{z-index:1}.search-field__input.search-field__input{padding-left:40px;padding-right:40px}.search-field__input--no-border.search-field__input--no-border{border:none;border-radius:0}.search-field__icon{position:absolute;top:50%;transform:translateY(-50%);left:15px;color:#6c757d}.search-field__close{position:absolute;top:50%;transform:translateY(-50%);right:10px;cursor:pointer}.import-servers-btn__csv-select{position:absolute;left:-9999px;top:-9999px}.server-error__container{text-align:center;display:flex;align-items:center;justify-content:center}.server-error__delete-btn{color:#dc3545;cursor:pointer}.server-error__delete-btn:hover{text-decoration:underline}.highlight-card.highlight-card{text-align:center;border-top:3px solid var(--brand-color);color:inherit;text-decoration:none}.highlight-card__link-icon{position:absolute;right:5px;bottom:5px;opacity:.1;transform:rotate(-45deg)}.highlight-card__title{text-transform:uppercase;color:#6c757d}.nav-pills__nav{position:sticky!important;top:55px;z-index:2}.nav-pills__nav-link.nav-pills__nav-link{border-radius:0!important;padding-bottom:calc(.5rem - 3px)!important;border-bottom:3px solid transparent!important;color:#5d6778;font-weight:700;cursor:pointer;text-decoration:none}@media (min-width: 576px) and (max-width: 991px){.nav-pills__nav-link.nav-pills__nav-link{font-size:89%}}.nav-pills__nav-link:hover{color:#4696e5!important}.nav-pills__nav-link.active{border-color:#4696e5!important;background-color:var(--primary-color)!important;color:#4696e5!important}.ordering-dropdown__menu--link.ordering-dropdown__menu--link{min-width:11rem}.ordering-dropdown__sort-icon{margin:3.5px 0 0;float:right}.user-interface__theme-icon{float:right;margin-top:.25rem}.create-short-url-result__copy-btn{margin-left:10px;vertical-align:inherit}.copy-to-clipboard-icon{cursor:pointer;font-size:1.2rem}.qr-code-modal__img{max-width:100%;box-shadow:0 0 .25rem #0003}.short-urls-visits-count__max-visits-control{cursor:help}.short-url-visits-count__amount{transition:transform .3s ease;display:inline-block}.short-url-visits-count__amount--big{transform:scale(1.5)}.short-url-visits-count__tooltip-list-item:not(:last-child){margin-bottom:.5rem}.tag{color:#fff}.tag--light-bg{color:#222!important}.tag:not(:last-child){margin-right:3px}.tag__close-selected-tag.tag__close-selected-tag{font-size:inherit;color:inherit;opacity:1;cursor:pointer;margin-left:5px}.tag__close-selected-tag.tag__close-selected-tag:hover{color:inherit!important;opacity:1!important}.short-urls-row__cell.short-urls-row__cell{vertical-align:middle!important}.short-urls-row__cell--break{word-break:break-all}@media (min-width: 992px){.short-urls-row__cell--indivisible{white-space:nowrap}}@media (max-width: 991px){.short-urls-row__short-url-wrapper{word-break:break-all}}@media (min-width: 992px){.short-urls-row__short-url-wrapper{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;vertical-align:bottom;display:inline-block;max-width:18rem}}.short-urls-row__copy-hint{position:absolute;top:50%;transform:translateY(-50%) translate(10px);box-shadow:0 3px 15px #00000040}@media (max-width: 991px){.short-urls-row__copy-hint{position:absolute;top:50%;transform:translateY(-50%) translate(calc(-100% - 20px))}}.react-datepicker__close-icon.react-datepicker__close-icon{position:absolute;top:50%;transform:translateY(-50%);right:0}.react-datepicker__close-icon.react-datepicker__close-icon:after{right:.75rem;line-height:11px;background-color:#333;font-size:14px}.react-datepicker__input-container,.react-datepicker-wrapper{display:block!important}.react-datepicker__day--keyboard-selected{background-color:#4696e5}.react-datepicker__day--keyboard-selected:hover{background-color:#1d77d0}.react-datepicker__time.react-datepicker__time,.react-datepicker.react-datepicker{background-color:var(--primary-color)!important;color:var(--text-color);border-color:var(--border-color)}.react-datepicker__header.react-datepicker__header{background-color:var(--secondary-color);border-color:var(--border-color)}.react-datepicker__current-month.react-datepicker__current-month,.react-datepicker-time__header.react-datepicker-time__header,.react-datepicker-year-header.react-datepicker-year-header,.react-datepicker__day-name.react-datepicker__day-name,.react-datepicker__day.react-datepicker__day:not(:hover):not(.react-datepicker__day--selected),.react-datepicker__time-name.react-datepicker__time-name{color:inherit}.react-datepicker__day--disabled.react-datepicker__day--disabled{cursor:default;color:var(--border-color)!important}.react-datepicker__day--keyboard-selected.react-datepicker__day--keyboard-selected,.react-datepicker__month-text--keyboard-selected.react-datepicker__month-text--keyboard-selected,.react-datepicker__quarter-text--keyboard-selected.react-datepicker__quarter-text--keyboard-selected,.react-datepicker__year-text--keyboard-selected.react-datepicker__year-text--keyboard-selected{background-color:var(--brand-color)!important;color:#fff!important}.react-datepicker__time-list-item.react-datepicker__time-list-item:hover{color:#232323}.react-datepicker__time-container.react-datepicker__time-container{border-color:var(--border-color)}.react-datepicker__time-list.react-datepicker__time-list{scrollbar-color:rgba(0,0,0,.5) var(--secondary-color);scrollbar-width:thin}.react-datepicker__time-list.react-datepicker__time-list::-webkit-scrollbar{width:10px;background-color:var(--secondary-color)}.react-datepicker__time-list.react-datepicker__time-list::-webkit-scrollbar-thumb{background-color:#00000080;border-radius:.5rem}.react-datepicker-popper.react-datepicker-popper{z-index:2}.react-datepicker-popper.react-datepicker-popper[data-placement^=top] .react-datepicker__triangle.react-datepicker__triangle:after{border-top-color:var(--primary-color)}.react-datepicker-popper.react-datepicker-popper[data-placement^=top] .react-datepicker__triangle.react-datepicker__triangle:before{border-top-color:var(--border-color)}.react-datepicker-popper.react-datepicker-popper[data-placement^=bottom] .react-datepicker__triangle.react-datepicker__triangle:after{border-bottom-color:var(--secondary-color)}.react-datepicker-popper.react-datepicker-popper[data-placement^=bottom] .react-datepicker__triangle.react-datepicker__triangle:before{border-bottom-color:var(--border-color)}.icon-input-container{position:relative}.icon-input-container__input{padding-right:35px!important}.icon-input-container__input:not(:disabled){background-color:var(--primary-color)!important}.card .icon-input-container__input:not(:disabled),.dropdown .icon-input-container__input:not(:disabled){background-color:var(--input-color)!important}.icon-input-container__icon{position:absolute;top:50%;transform:translateY(-50%);right:.75rem;cursor:pointer}.use-existing-if-found-info-icon__modal-quote{margin-bottom:0;padding:10px 15px;font-size:17.5px;border-left:5px solid #eeeeee;background-color:#f9f9f9}.short-url-form p:last-child{margin-bottom:0}.short-url-form .card{height:100%}.short-urls-filtering-bar__tags-icon{vertical-align:bottom;font-size:1.6rem}.short-urls-table.short-urls-table{margin-bottom:-1px}.short-urls-table__header-cell--with-action,.edit-tag-modal__color-picker-toggle{cursor:pointer}.edit-tag-modal__color-icon{color:#fff}.edit-tag-modal__popover.edit-tag-modal__popover{border-radius:.6rem}.tag-bullet{border-radius:50%;width:20px;height:20px;display:inline-block;vertical-align:-4px;margin-right:7px}.simple-paginator{user-select:none}.tags-table__header-cell.tags-table__header-cell{z-index:1;position:relative;top:56px;position:sticky;cursor:pointer}.tags-table__header-cell.tags-table__header-cell:before{content:"";position:absolute;top:-1px;left:0;bottom:-1px;right:0;background:var(--table-border-color);z-index:-2}.tags-table__header-cell.tags-table__header-cell:first-child:before{left:0}.tags-table__header-cell.tags-table__header-cell:after{content:"";position:absolute;top:0;left:0;bottom:0;right:0;background:var(--primary-color);z-index:-1}.tags-table__header-cell.tags-table__header-cell:first-child:after{left:0}.chart-card__footer--sticky{position:sticky;bottom:0}.doughnut-chart-legend{list-style-type:none;padding:0;margin:0}@media (max-width: 767px){.doughnut-chart-legend{margin-top:1rem}}.doughnut-chart-legend__item:not(:first-child){margin-top:.3rem}.doughnut-chart-legend__item-color{width:20px;min-width:20px;height:20px;margin-right:5px;border-radius:10px}.doughnut-chart-legend__item-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.line-chart-card__body canvas{height:300px!important}@media (min-width: 768px){.line-chart-card__body canvas{height:400px!important}}@media (min-width: 768px){.map-modal__modal.map-modal__modal{width:calc(100% - 40px);max-width:calc(100% - 40px);height:calc(100% - 40px);margin:20px}}@media (max-width: 767px){.map-modal__modal.map-modal__modal{width:calc(100% - 20px);max-width:calc(100% - 20px);height:calc(100% - 20px);margin:10px}}.map-modal__modal-content.map-modal__modal-content{height:100%}.map-modal__modal-title.map-modal__modal-title{position:absolute;width:100%;z-index:1001;padding:.5rem 1rem 1rem;margin:0;color:#fff;background:linear-gradient(rgba(0,0,0,.5),rgba(0,0,0,0))}.map-modal__modal-body.map-modal__modal-body{padding:0;display:flex;overflow:hidden}.map-modal__modal.map-modal__modal .leaflet-container.leaflet-container{flex:1 1 auto;border-radius:.3rem}.map-modal__modal.map-modal__modal .leaflet-top.leaflet-top .leaflet-control.leaflet-control{margin-top:60px}.open-map-modal-btn__btn.open-map-modal-btn__btn{padding:0;margin-right:1rem}.visits-table{margin:1.5rem 0 0;position:relative;background-color:var(--primary-color);overflow-y:hidden}.visits-table__header-cell{cursor:pointer;margin-bottom:55px;z-index:1;position:relative}.visits-table__header-cell:before{content:"";position:absolute;top:-1px;left:0;bottom:-1px;right:-1px;background:var(--table-border-color);z-index:-2}.visits-table__header-cell:first-child:before{left:-1px}.visits-table__header-cell:after{content:"";position:absolute;top:0;left:1px;bottom:0;right:0;background:var(--primary-color);z-index:-1}.visits-table__header-cell:first-child:after{left:0}@media (min-width: 768px){.visits-table__header-cell.visits-table__sticky{top:96px}}.visits-table__header-icon{float:right;margin-top:3px}.visits-table__footer-cell.visits-table__footer-cell{bottom:0;margin-top:34px;padding:.5rem;z-index:1;position:relative}.visits-table__footer-cell.visits-table__footer-cell:before{content:"";position:absolute;top:-1px;left:0;bottom:-1px;right:-1px;background:var(--table-border-color);z-index:-2}.visits-table__footer-cell.visits-table__footer-cell:first-child:before{left:-1px}.visits-table__footer-cell.visits-table__footer-cell:after{content:"";position:absolute;top:0;left:1px;bottom:0;right:0;background:var(--primary-color);z-index:-1}.visits-table__footer-cell.visits-table__footer-cell:first-child:after{left:0}.visits-table__sticky.visits-table__sticky{position:sticky}.short-url-visits-header__created-at{cursor:default}/*! * Bootstrap v5.2.3 (https://getbootstrap.com/) * Copyright 2011-2022 The Bootstrap Authors * Copyright 2011-2022 Twitter, Inc. diff --git a/develop/assets/index-61b8acea.js b/develop/assets/index-cd38f146.js similarity index 55% rename from develop/assets/index-61b8acea.js rename to develop/assets/index-cd38f146.js index 6c131308..eaa942f5 100644 --- a/develop/assets/index-61b8acea.js +++ b/develop/assets/index-cd38f146.js @@ -1,4 +1,4 @@ -var c$=Object.defineProperty;var u$=(e,t,n)=>t in e?c$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var xe=(e,t,n)=>(u$(e,typeof t!="symbol"?t+"":t,n),n);function f$(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var zl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function RL(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function d$(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){if(this instanceof r){var i=[null];i.push.apply(i,arguments);var o=Function.bind.apply(t,i);return new o}return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var g={},h$={get exports(){return g},set exports(e){g=e}},sy={},V={},p$={get exports(){return V},set exports(e){V=e}},it={};/** +var g$=Object.defineProperty;var v$=(e,t,n)=>t in e?g$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var xe=(e,t,n)=>(v$(e,typeof t!="symbol"?t+"":t,n),n);function y$(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var $l=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ri(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function _$(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){if(this instanceof r){var i=[null];i.push.apply(i,arguments);var o=Function.bind.apply(t,i);return new o}return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var TL={exports:{}},iy={},OL={exports:{}},it={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ var c$=Object.defineProperty;var u$=(e,t,n)=>t in e?c$(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Rd=Symbol.for("react.element"),m$=Symbol.for("react.portal"),g$=Symbol.for("react.fragment"),v$=Symbol.for("react.strict_mode"),y$=Symbol.for("react.profiler"),_$=Symbol.for("react.provider"),b$=Symbol.for("react.context"),w$=Symbol.for("react.forward_ref"),x$=Symbol.for("react.suspense"),S$=Symbol.for("react.memo"),C$=Symbol.for("react.lazy"),aO=Symbol.iterator;function E$(e){return e===null||typeof e!="object"?null:(e=aO&&e[aO]||e["@@iterator"],typeof e=="function"?e:null)}var NL={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},LL=Object.assign,DL={};function Wc(e,t,n){this.props=e,this.context=t,this.refs=DL,this.updater=n||NL}Wc.prototype.isReactComponent={};Wc.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Wc.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function AL(){}AL.prototype=Wc.prototype;function E2(e,t,n){this.props=e,this.context=t,this.refs=DL,this.updater=n||NL}var T2=E2.prototype=new AL;T2.constructor=E2;LL(T2,Wc.prototype);T2.isPureReactComponent=!0;var lO=Array.isArray,jL=Object.prototype.hasOwnProperty,O2={current:null},IL={key:!0,ref:!0,__self:!0,__source:!0};function FL(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)jL.call(t,r)&&!IL.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1t in e?c$(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var M$=V,R$=Symbol.for("react.element"),N$=Symbol.for("react.fragment"),L$=Object.prototype.hasOwnProperty,D$=M$.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,A$={key:!0,ref:!0,__self:!0,__source:!0};function $L(e,t,n){var r,i={},o=null,s=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)L$.call(t,r)&&!A$.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:R$,type:e,key:o,ref:s,props:i,_owner:D$.current}}sy.Fragment=N$;sy.jsx=$L;sy.jsxs=$L;(function(e){e.exports=sy})(h$);/*! + */var A$=V,j$=Symbol.for("react.element"),I$=Symbol.for("react.fragment"),F$=Object.prototype.hasOwnProperty,$$=A$.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,B$={key:!0,ref:!0,__self:!0,__source:!0};function AL(e,t,n){var r,i={},o=null,s=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)F$.call(t,r)&&!B$.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:j$,type:e,key:o,ref:s,props:i,_owner:$$.current}}iy.Fragment=I$;iy.jsx=AL;iy.jsxs=AL;TL.exports=iy;var g=TL.exports;/*! * @kurkle/color v0.3.1 * https://github.com/kurkle/color#readme * (c) 2022 Jukka Kurkela * Released under the MIT License - */function Nd(e){return e+.5|0}const ss=(e,t,n)=>Math.max(Math.min(e,n),t);function zu(e){return ss(Nd(e*2.55),0,255)}function ys(e){return ss(Nd(e*255),0,255)}function ho(e){return ss(Nd(e/2.55)/100,0,1)}function uO(e){return ss(Nd(e*100),0,100)}const Vr={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Z1=[..."0123456789ABCDEF"],j$=e=>Z1[e&15],I$=e=>Z1[(e&240)>>4]+Z1[e&15],Fh=e=>(e&240)>>4===(e&15),F$=e=>Fh(e.r)&&Fh(e.g)&&Fh(e.b)&&Fh(e.a);function $$(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&Vr[e[1]]*17,g:255&Vr[e[2]]*17,b:255&Vr[e[3]]*17,a:t===5?Vr[e[4]]*17:255}:(t===7||t===9)&&(n={r:Vr[e[1]]<<4|Vr[e[2]],g:Vr[e[3]]<<4|Vr[e[4]],b:Vr[e[5]]<<4|Vr[e[6]],a:t===9?Vr[e[7]]<<4|Vr[e[8]]:255})),n}const B$=(e,t)=>e<255?t(e):"";function z$(e){var t=F$(e)?j$:I$;return e?"#"+t(e.r)+t(e.g)+t(e.b)+B$(e.a,t):void 0}const U$=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function BL(e,t,n){const r=t*Math.min(n,1-n),i=(o,s=(o+e/30)%12)=>n-r*Math.max(Math.min(s-3,9-s,1),-1);return[i(0),i(8),i(4)]}function V$(e,t,n){const r=(i,o=(i+e/60)%6)=>n-n*t*Math.max(Math.min(o,4-o,1),0);return[r(5),r(3),r(1)]}function H$(e,t,n){const r=BL(e,1,.5);let i;for(t+n>1&&(i=1/(t+n),t*=i,n*=i),i=0;i<3;i++)r[i]*=1-t-n,r[i]+=t;return r}function W$(e,t,n,r,i){return e===i?(t-n)/r+(t.5?f/(2-o-s):f/(o+s),l=W$(n,r,i,f,o),l=l*60+.5),[l|0,c||0,a]}function M2(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(ys)}function R2(e,t,n){return M2(BL,e,t,n)}function Y$(e,t,n){return M2(H$,e,t,n)}function q$(e,t,n){return M2(V$,e,t,n)}function zL(e){return(e%360+360)%360}function G$(e){const t=U$.exec(e);let n=255,r;if(!t)return;t[5]!==r&&(n=t[6]?zu(+t[5]):ys(+t[5]));const i=zL(+t[2]),o=+t[3]/100,s=+t[4]/100;return t[1]==="hwb"?r=Y$(i,o,s):t[1]==="hsv"?r=q$(i,o,s):r=R2(i,o,s),{r:r[0],g:r[1],b:r[2],a:n}}function Z$(e,t){var n=k2(e);n[0]=zL(n[0]+t),n=R2(n),e.r=n[0],e.g=n[1],e.b=n[2]}function K$(e){if(!e)return;const t=k2(e),n=t[0],r=uO(t[1]),i=uO(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${i}%, ${ho(e.a)})`:`hsl(${n}, ${r}%, ${i}%)`}const fO={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},dO={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function X$(){const e={},t=Object.keys(dO),n=Object.keys(fO);let r,i,o,s,a;for(r=0;r>16&255,o>>8&255,o&255]}return e}let $h;function Q$(e){$h||($h=X$(),$h.transparent=[0,0,0,0]);const t=$h[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const J$=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function e7(e){const t=J$.exec(e);let n=255,r,i,o;if(t){if(t[7]!==r){const s=+t[7];n=t[8]?zu(s):ss(s*255,0,255)}return r=+t[1],i=+t[3],o=+t[5],r=255&(t[2]?zu(r):ss(r,0,255)),i=255&(t[4]?zu(i):ss(i,0,255)),o=255&(t[6]?zu(o):ss(o,0,255)),{r,g:i,b:o,a:n}}}function t7(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${ho(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const s0=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,El=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function n7(e,t,n){const r=El(ho(e.r)),i=El(ho(e.g)),o=El(ho(e.b));return{r:ys(s0(r+n*(El(ho(t.r))-r))),g:ys(s0(i+n*(El(ho(t.g))-i))),b:ys(s0(o+n*(El(ho(t.b))-o))),a:e.a+n*(t.a-e.a)}}function Bh(e,t,n){if(e){let r=k2(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,t===0?360:1)),r=R2(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function UL(e,t){return e&&Object.assign(t||{},e)}function hO(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=ys(e[3]))):(t=UL(e,{r:0,g:0,b:0,a:1}),t.a=ys(t.a)),t}function r7(e){return e.charAt(0)==="r"?e7(e):G$(e)}class Af{constructor(t){if(t instanceof Af)return t;const n=typeof t;let r;n==="object"?r=hO(t):n==="string"&&(r=$$(t)||Q$(t)||r7(t)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var t=UL(this._rgb);return t&&(t.a=ho(t.a)),t}set rgb(t){this._rgb=hO(t)}rgbString(){return this._valid?t7(this._rgb):void 0}hexString(){return this._valid?z$(this._rgb):void 0}hslString(){return this._valid?K$(this._rgb):void 0}mix(t,n){if(t){const r=this.rgb,i=t.rgb;let o;const s=n===o?.5:n,a=2*s-1,l=r.a-i.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;o=1-c,r.r=255&c*r.r+o*i.r+.5,r.g=255&c*r.g+o*i.g+.5,r.b=255&c*r.b+o*i.b+.5,r.a=s*r.a+(1-s)*i.a,this.rgb=r}return this}interpolate(t,n){return t&&(this._rgb=n7(this._rgb,t._rgb,n)),this}clone(){return new Af(this.rgb)}alpha(t){return this._rgb.a=ys(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=Nd(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){const n=this._rgb;return n.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Bh(this._rgb,2,t),this}darken(t){return Bh(this._rgb,2,-t),this}saturate(t){return Bh(this._rgb,1,t),this}desaturate(t){return Bh(this._rgb,1,-t),this}rotate(t){return Z$(this._rgb,t),this}}/*! + */function Md(e){return e+.5|0}const ls=(e,t,n)=>Math.max(Math.min(e,n),t);function $u(e){return ls(Md(e*2.55),0,255)}function bs(e){return ls(Md(e*255),0,255)}function po(e){return ls(Md(e/2.55)/100,0,1)}function sO(e){return ls(Md(e*100),0,100)}const Vr={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Y1=[..."0123456789ABCDEF"],z$=e=>Y1[e&15],U$=e=>Y1[(e&240)>>4]+Y1[e&15],$h=e=>(e&240)>>4===(e&15),V$=e=>$h(e.r)&&$h(e.g)&&$h(e.b)&&$h(e.a);function H$(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&Vr[e[1]]*17,g:255&Vr[e[2]]*17,b:255&Vr[e[3]]*17,a:t===5?Vr[e[4]]*17:255}:(t===7||t===9)&&(n={r:Vr[e[1]]<<4|Vr[e[2]],g:Vr[e[3]]<<4|Vr[e[4]],b:Vr[e[5]]<<4|Vr[e[6]],a:t===9?Vr[e[7]]<<4|Vr[e[8]]:255})),n}const W$=(e,t)=>e<255?t(e):"";function Y$(e){var t=V$(e)?z$:U$;return e?"#"+t(e.r)+t(e.g)+t(e.b)+W$(e.a,t):void 0}const q$=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function jL(e,t,n){const r=t*Math.min(n,1-n),i=(o,s=(o+e/30)%12)=>n-r*Math.max(Math.min(s-3,9-s,1),-1);return[i(0),i(8),i(4)]}function G$(e,t,n){const r=(i,o=(i+e/60)%6)=>n-n*t*Math.max(Math.min(o,4-o,1),0);return[r(5),r(3),r(1)]}function Z$(e,t,n){const r=jL(e,1,.5);let i;for(t+n>1&&(i=1/(t+n),t*=i,n*=i),i=0;i<3;i++)r[i]*=1-t-n,r[i]+=t;return r}function K$(e,t,n,r,i){return e===i?(t-n)/r+(t.5?f/(2-o-s):f/(o+s),l=K$(n,r,i,f,o),l=l*60+.5),[l|0,c||0,a]}function E2(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(bs)}function T2(e,t,n){return E2(jL,e,t,n)}function X$(e,t,n){return E2(Z$,e,t,n)}function Q$(e,t,n){return E2(G$,e,t,n)}function IL(e){return(e%360+360)%360}function J$(e){const t=q$.exec(e);let n=255,r;if(!t)return;t[5]!==r&&(n=t[6]?$u(+t[5]):bs(+t[5]));const i=IL(+t[2]),o=+t[3]/100,s=+t[4]/100;return t[1]==="hwb"?r=X$(i,o,s):t[1]==="hsv"?r=Q$(i,o,s):r=T2(i,o,s),{r:r[0],g:r[1],b:r[2],a:n}}function e7(e,t){var n=C2(e);n[0]=IL(n[0]+t),n=T2(n),e.r=n[0],e.g=n[1],e.b=n[2]}function t7(e){if(!e)return;const t=C2(e),n=t[0],r=sO(t[1]),i=sO(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${i}%, ${po(e.a)})`:`hsl(${n}, ${r}%, ${i}%)`}const aO={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},lO={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function n7(){const e={},t=Object.keys(lO),n=Object.keys(aO);let r,i,o,s,a;for(r=0;r>16&255,o>>8&255,o&255]}return e}let Bh;function r7(e){Bh||(Bh=n7(),Bh.transparent=[0,0,0,0]);const t=Bh[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const i7=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function o7(e){const t=i7.exec(e);let n=255,r,i,o;if(t){if(t[7]!==r){const s=+t[7];n=t[8]?$u(s):ls(s*255,0,255)}return r=+t[1],i=+t[3],o=+t[5],r=255&(t[2]?$u(r):ls(r,0,255)),i=255&(t[4]?$u(i):ls(i,0,255)),o=255&(t[6]?$u(o):ls(o,0,255)),{r,g:i,b:o,a:n}}}function s7(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${po(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const r0=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,Sl=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function a7(e,t,n){const r=Sl(po(e.r)),i=Sl(po(e.g)),o=Sl(po(e.b));return{r:bs(r0(r+n*(Sl(po(t.r))-r))),g:bs(r0(i+n*(Sl(po(t.g))-i))),b:bs(r0(o+n*(Sl(po(t.b))-o))),a:e.a+n*(t.a-e.a)}}function zh(e,t,n){if(e){let r=C2(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,t===0?360:1)),r=T2(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function FL(e,t){return e&&Object.assign(t||{},e)}function cO(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=bs(e[3]))):(t=FL(e,{r:0,g:0,b:0,a:1}),t.a=bs(t.a)),t}function l7(e){return e.charAt(0)==="r"?o7(e):J$(e)}class Lf{constructor(t){if(t instanceof Lf)return t;const n=typeof t;let r;n==="object"?r=cO(t):n==="string"&&(r=H$(t)||r7(t)||l7(t)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var t=FL(this._rgb);return t&&(t.a=po(t.a)),t}set rgb(t){this._rgb=cO(t)}rgbString(){return this._valid?s7(this._rgb):void 0}hexString(){return this._valid?Y$(this._rgb):void 0}hslString(){return this._valid?t7(this._rgb):void 0}mix(t,n){if(t){const r=this.rgb,i=t.rgb;let o;const s=n===o?.5:n,a=2*s-1,l=r.a-i.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;o=1-c,r.r=255&c*r.r+o*i.r+.5,r.g=255&c*r.g+o*i.g+.5,r.b=255&c*r.b+o*i.b+.5,r.a=s*r.a+(1-s)*i.a,this.rgb=r}return this}interpolate(t,n){return t&&(this._rgb=a7(this._rgb,t._rgb,n)),this}clone(){return new Lf(this.rgb)}alpha(t){return this._rgb.a=bs(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=Md(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){const n=this._rgb;return n.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return zh(this._rgb,2,t),this}darken(t){return zh(this._rgb,2,-t),this}saturate(t){return zh(this._rgb,1,t),this}desaturate(t){return zh(this._rgb,1,-t),this}rotate(t){return e7(this._rgb,t),this}}/*! * Chart.js v4.1.1 * https://www.chartjs.org * (c) 2022 Chart.js Contributors * Released under the MIT License - */function lo(){}const i7=(()=>{let e=0;return()=>e++})();function ct(e){return e===null||typeof e>"u"}function kt(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function rt(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function Gt(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Tr(e,t){return Gt(e)?e:t}function Ke(e,t){return typeof e>"u"?t:e}const o7=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,VL=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function Ct(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function vt(e,t,n,r){let i,o,s;if(kt(e))if(o=e.length,r)for(i=o-1;i>=0;i--)t.call(n,e[i],i);else for(i=0;ie,x:e=>e.x,y:e=>e.y};function l7(e){const t=e.split("."),n=[];let r="";for(const i of t)r+=i,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function c7(e){const t=l7(e);return n=>{for(const r of t){if(r==="")break;n=n&&n[r]}return n}}function Ls(e,t){return(pO[t]||(pO[t]=c7(t)))(e)}function N2(e){return e.charAt(0).toUpperCase()+e.slice(1)}const Qr=e=>typeof e<"u",Ds=e=>typeof e=="function",mO=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function u7(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const Ft=Math.PI,Mt=2*Ft,f7=Mt+Ft,sg=Number.POSITIVE_INFINITY,d7=Ft/180,Zt=Ft/2,da=Ft/4,gO=Ft*2/3,as=Math.log10,qi=Math.sign;function of(e,t,n){return Math.abs(e-t)i-o).pop(),t}function bc(e){return!isNaN(parseFloat(e))&&isFinite(e)}function p7(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function WL(e,t,n){let r,i,o;for(r=0,i=e.length;rl&&c=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function D2(e,t,n){n=n||(s=>e[s]1;)o=i+r>>1,n(o)?i=o:r=o;return{lo:i,hi:r}}const _o=(e,t,n,r)=>D2(e,n,r?i=>{const o=e[i][t];return oe[i][t]D2(e,n,r=>e[r][t]>=n);function y7(e,t,n){let r=0,i=e.length;for(;rr&&e[i-1]>n;)i--;return r>0||i{const r="_onData"+N2(n),i=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...o){const s=i.apply(this,o);return e._chartjs.listeners.forEach(a=>{typeof a[r]=="function"&&a[r](...o)}),s}})})}function _O(e,t){const n=e._chartjs;if(!n)return;const r=n.listeners,i=r.indexOf(t);i!==-1&&r.splice(i,1),!(r.length>0)&&(qL.forEach(o=>{delete e[o]}),delete e._chartjs)}function GL(e){const t=new Set;let n,r;for(n=0,r=e.length;n"u"?function(e){return e()}:window.requestAnimationFrame}();function KL(e,t){let n=[],r=!1;return function(...i){n=i,r||(r=!0,ZL.call(window,()=>{r=!1,e.apply(t,n)}))}}function b7(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}const A2=e=>e==="start"?"left":e==="end"?"right":"center",Kn=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,w7=(e,t,n,r)=>e===(r?"left":"right")?n:e==="center"?(t+n)/2:t;function XL(e,t,n){const r=t.length;let i=0,o=r;if(e._sorted){const{iScale:s,_parsed:a}=e,l=s.axis,{min:c,max:f,minDefined:h,maxDefined:p}=s.getUserBounds();h&&(i=En(Math.min(_o(a,s.axis,c).lo,n?r:_o(t,l,s.getPixelForValue(c)).lo),0,r-1)),p?o=En(Math.max(_o(a,s.axis,f,!0).hi+1,n?0:_o(t,l,s.getPixelForValue(f),!0).hi+1),i,r)-i:o=r-i}return{start:i,count:o}}function QL(e){const{xScale:t,yScale:n,_scaleRanges:r}=e,i={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!r)return e._scaleRanges=i,!0;const o=r.xmin!==t.min||r.xmax!==t.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),o}const zh=e=>e===0||e===1,bO=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*Mt/n)),wO=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*Mt/n)+1,sf={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*Zt)+1,easeOutSine:e=>Math.sin(e*Zt),easeInOutSine:e=>-.5*(Math.cos(Ft*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>zh(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>zh(e)?e:bO(e,.075,.3),easeOutElastic:e=>zh(e)?e:wO(e,.075,.3),easeInOutElastic(e){return zh(e)?e:e<.5?.5*bO(e*2,.1125,.45):.5+.5*wO(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-sf.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?sf.easeInBounce(e*2)*.5:sf.easeOutBounce(e*2-1)*.5+.5};function JL(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function xO(e){return JL(e)?e:new Af(e)}function a0(e){return JL(e)?e:new Af(e).saturate(.5).darken(.1).hexString()}const x7=["x","y","borderWidth","radius","tension"],S7=["color","borderColor","backgroundColor"];function C7(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:S7},numbers:{type:"number",properties:x7}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function E7(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const SO=new Map;function T7(e,t){t=t||{};const n=e+JSON.stringify(t);let r=SO.get(n);return r||(r=new Intl.NumberFormat(e,t),SO.set(n,r)),r}function Ld(e,t,n){return T7(t,n).format(e)}const eD={values(e){return kt(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const r=this.chart.options.locale;let i,o=e;if(n.length>1){const c=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(c<1e-4||c>1e15)&&(i="scientific"),o=O7(e,n)}const s=as(Math.abs(o)),a=Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:i,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),Ld(e,r,l)},logarithmic(e,t,n){if(e===0)return"0";const r=n[t].significand||e/Math.pow(10,Math.floor(as(e)));return[1,2,3,5,10,15].includes(r)||t>.8*n.length?eD.numeric.call(this,e,t,n):""}};function O7(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var ay={formatters:eD};function P7(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,n)=>n.lineWidth,tickColor:(t,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:ay.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Ha=Object.create(null),X1=Object.create(null);function af(e,t){if(!t)return e;const n=t.split(".");for(let r=0,i=n.length;rr.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(r,i)=>a0(i.backgroundColor),this.hoverBorderColor=(r,i)=>a0(i.borderColor),this.hoverColor=(r,i)=>a0(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(n)}set(t,n){return l0(this,t,n)}get(t){return af(this,t)}describe(t,n){return l0(X1,t,n)}override(t,n){return l0(Ha,t,n)}route(t,n,r,i){const o=af(this,t),s=af(this,r),a="_"+n;Object.defineProperties(o,{[a]:{value:o[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[a],c=s[i];return rt(l)?Object.assign({},c,l):Ke(l,c)},set(l){this[a]=l}}})}apply(t){t.forEach(n=>n(this))}}var nn=new k7({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[C7,E7,P7]);function M7(e){return!e||ct(e.size)||ct(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function ag(e,t,n,r,i){let o=t[i];return o||(o=t[i]=e.measureText(i).width,n.push(i)),o>r&&(r=o),r}function R7(e,t,n,r){r=r||{};let i=r.data=r.data||{},o=r.garbageCollect=r.garbageCollect||[];r.font!==t&&(i=r.data={},o=r.garbageCollect=[],r.font=t),e.save(),e.font=t;let s=0;const a=n.length;let l,c,f,h,p;for(l=0;ln.length){for(l=0;l0&&e.stroke()}}function Ff(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.xt.top-n&&e.y0&&o.strokeColor!=="";let l,c;for(e.save(),e.font=i.string,D7(e,o),l=0;l+e||0;function j2(e,t){const n={},r=rt(t),i=r?Object.keys(t):t,o=rt(e)?r?s=>Ke(e[s],e[t[s]]):s=>e[s]:()=>e;for(const s of i)n[s]=B7(o(s));return n}function nD(e){return j2(e,{top:"y",right:"x",bottom:"y",left:"x"})}function Aa(e){return j2(e,["topLeft","topRight","bottomLeft","bottomRight"])}function er(e){const t=nD(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function gn(e,t){e=e||{},t=t||nn.font;let n=Ke(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let r=Ke(e.style,t.style);r&&!(""+r).match(F7)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:Ke(e.family,t.family),lineHeight:$7(Ke(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:Ke(e.weight,t.weight),string:""};return i.string=M7(i),i}function Uu(e,t,n,r){let i=!0,o,s,a;for(o=0,s=e.length;on&&a===0?0:a+l;return{min:s(r,-Math.abs(o)),max:s(i,o)}}function Ys(e,t){return Object.assign(Object.create(e),t)}function I2(e,t=[""],n=e,r,i=()=>e[0]){Qr(r)||(r=sD("_fallback",e));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:n,_fallback:r,_getTarget:i,override:s=>I2([s,...e],t,n,r)};return new Proxy(o,{deleteProperty(s,a){return delete s[a],delete s._keys,delete e[0][a],!0},get(s,a){return iD(s,a,()=>Z7(a,t,e,s))},getOwnPropertyDescriptor(s,a){return Reflect.getOwnPropertyDescriptor(s._scopes[0],a)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(s,a){return TO(s).includes(a)},ownKeys(s){return TO(s)},set(s,a,l){const c=s._storage||(s._storage=i());return s[a]=c[a]=l,delete s._keys,!0}})}function wc(e,t,n,r){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:rD(e,r),setContext:o=>wc(e,o,n,r),override:o=>wc(e.override(o),t,n,r)};return new Proxy(i,{deleteProperty(o,s){return delete o[s],delete e[s],!0},get(o,s,a){return iD(o,s,()=>V7(o,s,a))},getOwnPropertyDescriptor(o,s){return o._descriptors.allKeys?Reflect.has(e,s)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,s)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(o,s){return Reflect.has(e,s)},ownKeys(){return Reflect.ownKeys(e)},set(o,s,a){return e[s]=a,delete o[s],!0}})}function rD(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:r=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:n,indexable:r,isScriptable:Ds(n)?n:()=>n,isIndexable:Ds(r)?r:()=>r}}const U7=(e,t)=>e?e+N2(t):t,F2=(e,t)=>rt(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function iD(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t))return e[t];const r=n();return e[t]=r,r}function V7(e,t,n){const{_proxy:r,_context:i,_subProxy:o,_descriptors:s}=e;let a=r[t];return Ds(a)&&s.isScriptable(t)&&(a=H7(t,a,e,n)),kt(a)&&a.length&&(a=W7(t,a,e,s.isIndexable)),F2(t,a)&&(a=wc(a,i,o&&o[t],s)),a}function H7(e,t,n,r){const{_proxy:i,_context:o,_subProxy:s,_stack:a}=n;if(a.has(e))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+e);return a.add(e),t=t(o,s||r),a.delete(e),F2(e,t)&&(t=$2(i._scopes,i,e,t)),t}function W7(e,t,n,r){const{_proxy:i,_context:o,_subProxy:s,_descriptors:a}=n;if(Qr(o.index)&&r(e))t=t[o.index%t.length];else if(rt(t[0])){const l=t,c=i._scopes.filter(f=>f!==l);t=[];for(const f of l){const h=$2(c,i,e,f);t.push(wc(h,o,s&&s[e],a))}}return t}function oD(e,t,n){return Ds(e)?e(t,n):e}const Y7=(e,t)=>e===!0?t:typeof e=="string"?Ls(t,e):void 0;function q7(e,t,n,r,i){for(const o of t){const s=Y7(n,o);if(s){e.add(s);const a=oD(s._fallback,n,i);if(Qr(a)&&a!==n&&a!==r)return a}else if(s===!1&&Qr(r)&&n!==r)return null}return!1}function $2(e,t,n,r){const i=t._rootScopes,o=oD(t._fallback,n,r),s=[...e,...i],a=new Set;a.add(r);let l=EO(a,s,n,o||n,r);return l===null||Qr(o)&&o!==n&&(l=EO(a,s,o,l,r),l===null)?!1:I2(Array.from(a),[""],i,o,()=>G7(t,n,r))}function EO(e,t,n,r,i){for(;n;)n=q7(e,t,n,r,i);return n}function G7(e,t,n){const r=e._getTarget();t in r||(r[t]={});const i=r[t];return kt(i)&&rt(n)?n:i||{}}function Z7(e,t,n,r){let i;for(const o of t)if(i=sD(U7(o,e),n),Qr(i))return F2(e,i)?$2(n,r,e,i):i}function sD(e,t){for(const n of t){if(!n)continue;const r=n[e];if(Qr(r))return r}}function TO(e){let t=e._keys;return t||(t=e._keys=K7(e._scopes)),t}function K7(e){const t=new Set;for(const n of e)for(const r of Object.keys(n).filter(i=>!i.startsWith("_")))t.add(r);return Array.from(t)}function aD(e,t,n,r){const{iScale:i}=e,{key:o="r"}=this._parsing,s=new Array(r);let a,l,c,f;for(a=0,l=r;ate==="x"?"y":"x";function Q7(e,t,n,r){const i=e.skip?t:e,o=t,s=n.skip?t:n,a=K1(o,i),l=K1(s,o);let c=a/(a+l),f=l/(a+l);c=isNaN(c)?0:c,f=isNaN(f)?0:f;const h=r*c,p=r*f;return{previous:{x:o.x-h*(s.x-i.x),y:o.y-h*(s.y-i.y)},next:{x:o.x+p*(s.x-i.x),y:o.y+p*(s.y-i.y)}}}function J7(e,t,n){const r=e.length;let i,o,s,a,l,c=xc(e,0);for(let f=0;f!c.skip)),t.cubicInterpolationMode==="monotone")tB(e,i);else{let c=r?e[e.length-1]:e[0];for(o=0,s=e.length;oe.ownerDocument.defaultView.getComputedStyle(e,null);function iB(e,t){return uy(e).getPropertyValue(t)}const oB=["top","right","bottom","left"];function ja(e,t,n){const r={};n=n?"-"+n:"";for(let i=0;i<4;i++){const o=oB[i];r[o]=parseFloat(e[t+"-"+o+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const sB=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function aB(e,t){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:i,offsetY:o}=r;let s=!1,a,l;if(sB(i,o,e.target))a=i,l=o;else{const c=t.getBoundingClientRect();a=r.clientX-c.left,l=r.clientY-c.top,s=!0}return{x:a,y:l,box:s}}function ba(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=t,i=uy(n),o=i.boxSizing==="border-box",s=ja(i,"padding"),a=ja(i,"border","width"),{x:l,y:c,box:f}=aB(e,n),h=s.left+(f&&a.left),p=s.top+(f&&a.top);let{width:m,height:v}=t;return o&&(m-=s.width+a.width,v-=s.height+a.height),{x:Math.round((l-h)/m*n.width/r),y:Math.round((c-p)/v*n.height/r)}}function lB(e,t,n){let r,i;if(t===void 0||n===void 0){const o=B2(e);if(!o)t=e.clientWidth,n=e.clientHeight;else{const s=o.getBoundingClientRect(),a=uy(o),l=ja(a,"border","width"),c=ja(a,"padding");t=s.width-c.width-l.width,n=s.height-c.height-l.height,r=lg(a.maxWidth,o,"clientWidth"),i=lg(a.maxHeight,o,"clientHeight")}}return{width:t,height:n,maxWidth:r||sg,maxHeight:i||sg}}const Vh=e=>Math.round(e*10)/10;function cB(e,t,n,r){const i=uy(e),o=ja(i,"margin"),s=lg(i.maxWidth,e,"clientWidth")||sg,a=lg(i.maxHeight,e,"clientHeight")||sg,l=lB(e,t,n);let{width:c,height:f}=l;if(i.boxSizing==="content-box"){const p=ja(i,"border","width"),m=ja(i,"padding");c-=m.width+p.width,f-=m.height+p.height}return c=Math.max(0,c-o.width),f=Math.max(0,r?c/r:f-o.height),c=Vh(Math.min(c,s,l.maxWidth)),f=Vh(Math.min(f,a,l.maxHeight)),c&&!f&&(f=Vh(c/2)),(t!==void 0||n!==void 0)&&r&&l.height&&f>l.height&&(f=l.height,c=Vh(Math.floor(f*r))),{width:c,height:f}}function OO(e,t,n){const r=t||1,i=Math.floor(e.height*r),o=Math.floor(e.width*r);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const s=e.canvas;return s.style&&(n||!s.style.height&&!s.style.width)&&(s.style.height=`${e.height}px`,s.style.width=`${e.width}px`),e.currentDevicePixelRatio!==r||s.height!==i||s.width!==o?(e.currentDevicePixelRatio=r,s.height=i,s.width=o,e.ctx.setTransform(r,0,0,r,0,0),!0):!1}const uB=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch{}return e}();function PO(e,t){const n=iB(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function wa(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function fB(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:r==="middle"?n<.5?e.y:t.y:r==="after"?n<1?e.y:t.y:n>0?t.y:e.y}}function dB(e,t,n,r){const i={x:e.cp2x,y:e.cp2y},o={x:t.cp1x,y:t.cp1y},s=wa(e,i,n),a=wa(i,o,n),l=wa(o,t,n),c=wa(s,a,n),f=wa(a,l,n);return wa(c,f,n)}const hB=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,r){return n-r},leftForLtr(n,r){return n-r}}},pB=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function ic(e,t,n){return e?hB(t,n):pB()}function uD(e,t){let n,r;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=r)}function fD(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function dD(e){return e==="angle"?{between:If,compare:m7,normalize:Pr}:{between:yo,compare:(t,n)=>t-n,normalize:t=>t}}function kO({start:e,end:t,count:n,loop:r,style:i}){return{start:e%n,end:t%n,loop:r&&(t-e+1)%n===0,style:i}}function mB(e,t,n){const{property:r,start:i,end:o}=n,{between:s,normalize:a}=dD(r),l=t.length;let{start:c,end:f,loop:h}=e,p,m;if(h){for(c+=l,f+=l,p=0,m=l;pl(i,S,_)&&a(i,S)!==0,P=()=>a(o,_)===0||l(o,S,_),k=()=>y||T(),N=()=>!y||P();for(let D=f,z=f;D<=h;++D)w=t[D%s],!w.skip&&(_=c(w[r]),_!==S&&(y=l(_,i,o),x===null&&k()&&(x=a(_,i)===0?D:z),x!==null&&N()&&(v.push(kO({start:x,end:D,loop:p,count:s,style:m})),x=null),z=D,S=_));return x!==null&&v.push(kO({start:x,end:h,loop:p,count:s,style:m})),v}function pD(e,t){const n=[],r=e.segments;for(let i=0;ii&&e[o%t].skip;)o--;return o%=t,{start:i,end:o}}function vB(e,t,n,r){const i=e.length,o=[];let s=t,a=e[t],l;for(l=t+1;l<=n;++l){const c=e[l%i];c.skip||c.stop?a.skip||(r=!1,o.push({start:t%i,end:(l-1)%i,loop:r}),t=s=c.stop?l:null):(s=l,a.skip&&(t=l)),a=c}return s!==null&&o.push({start:t%i,end:s%i,loop:r}),o}function yB(e,t){const n=e.points,r=e.options.spanGaps,i=n.length;if(!i)return[];const o=!!e._loop,{start:s,end:a}=gB(n,i,o,r);if(r===!0)return MO(e,[{start:s,end:a,loop:o}],n,t);const l=a{let e=0;return()=>e++})();function ct(e){return e===null||typeof e>"u"}function kt(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function rt(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function qt(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Tr(e,t){return qt(e)?e:t}function Ke(e,t){return typeof e>"u"?t:e}const u7=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,$L=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function Ct(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function vt(e,t,n,r){let i,o,s;if(kt(e))if(o=e.length,r)for(i=o-1;i>=0;i--)t.call(n,e[i],i);else for(i=0;ie,x:e=>e.x,y:e=>e.y};function h7(e){const t=e.split("."),n=[];let r="";for(const i of t)r+=i,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function p7(e){const t=h7(e);return n=>{for(const r of t){if(r==="")break;n=n&&n[r]}return n}}function As(e,t){return(uO[t]||(uO[t]=p7(t)))(e)}function O2(e){return e.charAt(0).toUpperCase()+e.slice(1)}const Qr=e=>typeof e<"u",js=e=>typeof e=="function",fO=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function m7(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const It=Math.PI,Mt=2*It,g7=Mt+It,ag=Number.POSITIVE_INFINITY,v7=It/180,Gt=It/2,da=It/4,dO=It*2/3,cs=Math.log10,Gi=Math.sign;function nf(e,t,n){return Math.abs(e-t)i-o).pop(),t}function yc(e){return!isNaN(parseFloat(e))&&isFinite(e)}function _7(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function zL(e,t,n){let r,i,o;for(r=0,i=e.length;rl&&c=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function k2(e,t,n){n=n||(s=>e[s]1;)o=i+r>>1,n(o)?i=o:r=o;return{lo:i,hi:r}}const bo=(e,t,n,r)=>k2(e,n,r?i=>{const o=e[i][t];return oe[i][t]k2(e,n,r=>e[r][t]>=n);function S7(e,t,n){let r=0,i=e.length;for(;rr&&e[i-1]>n;)i--;return r>0||i{const r="_onData"+O2(n),i=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...o){const s=i.apply(this,o);return e._chartjs.listeners.forEach(a=>{typeof a[r]=="function"&&a[r](...o)}),s}})})}function mO(e,t){const n=e._chartjs;if(!n)return;const r=n.listeners,i=r.indexOf(t);i!==-1&&r.splice(i,1),!(r.length>0)&&(VL.forEach(o=>{delete e[o]}),delete e._chartjs)}function HL(e){const t=new Set;let n,r;for(n=0,r=e.length;n"u"?function(e){return e()}:window.requestAnimationFrame}();function YL(e,t){let n=[],r=!1;return function(...i){n=i,r||(r=!0,WL.call(window,()=>{r=!1,e.apply(t,n)}))}}function E7(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}const M2=e=>e==="start"?"left":e==="end"?"right":"center",Kn=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,T7=(e,t,n,r)=>e===(r?"left":"right")?n:e==="center"?(t+n)/2:t;function qL(e,t,n){const r=t.length;let i=0,o=r;if(e._sorted){const{iScale:s,_parsed:a}=e,l=s.axis,{min:c,max:f,minDefined:h,maxDefined:p}=s.getUserBounds();h&&(i=En(Math.min(bo(a,s.axis,c).lo,n?r:bo(t,l,s.getPixelForValue(c)).lo),0,r-1)),p?o=En(Math.max(bo(a,s.axis,f,!0).hi+1,n?0:bo(t,l,s.getPixelForValue(f),!0).hi+1),i,r)-i:o=r-i}return{start:i,count:o}}function GL(e){const{xScale:t,yScale:n,_scaleRanges:r}=e,i={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!r)return e._scaleRanges=i,!0;const o=r.xmin!==t.min||r.xmax!==t.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),o}const Uh=e=>e===0||e===1,gO=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*Mt/n)),vO=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*Mt/n)+1,rf={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*Gt)+1,easeOutSine:e=>Math.sin(e*Gt),easeInOutSine:e=>-.5*(Math.cos(It*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>Uh(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>Uh(e)?e:gO(e,.075,.3),easeOutElastic:e=>Uh(e)?e:vO(e,.075,.3),easeInOutElastic(e){return Uh(e)?e:e<.5?.5*gO(e*2,.1125,.45):.5+.5*vO(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-rf.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?rf.easeInBounce(e*2)*.5:rf.easeOutBounce(e*2-1)*.5+.5};function ZL(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function yO(e){return ZL(e)?e:new Lf(e)}function i0(e){return ZL(e)?e:new Lf(e).saturate(.5).darken(.1).hexString()}const O7=["x","y","borderWidth","radius","tension"],P7=["color","borderColor","backgroundColor"];function k7(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:P7},numbers:{type:"number",properties:O7}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function M7(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const _O=new Map;function R7(e,t){t=t||{};const n=e+JSON.stringify(t);let r=_O.get(n);return r||(r=new Intl.NumberFormat(e,t),_O.set(n,r)),r}function Rd(e,t,n){return R7(t,n).format(e)}const KL={values(e){return kt(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const r=this.chart.options.locale;let i,o=e;if(n.length>1){const c=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(c<1e-4||c>1e15)&&(i="scientific"),o=N7(e,n)}const s=cs(Math.abs(o)),a=Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:i,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),Rd(e,r,l)},logarithmic(e,t,n){if(e===0)return"0";const r=n[t].significand||e/Math.pow(10,Math.floor(cs(e)));return[1,2,3,5,10,15].includes(r)||t>.8*n.length?KL.numeric.call(this,e,t,n):""}};function N7(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var oy={formatters:KL};function L7(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,n)=>n.lineWidth,tickColor:(t,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:oy.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Ha=Object.create(null),G1=Object.create(null);function of(e,t){if(!t)return e;const n=t.split(".");for(let r=0,i=n.length;rr.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(r,i)=>i0(i.backgroundColor),this.hoverBorderColor=(r,i)=>i0(i.borderColor),this.hoverColor=(r,i)=>i0(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(n)}set(t,n){return o0(this,t,n)}get(t){return of(this,t)}describe(t,n){return o0(G1,t,n)}override(t,n){return o0(Ha,t,n)}route(t,n,r,i){const o=of(this,t),s=of(this,r),a="_"+n;Object.defineProperties(o,{[a]:{value:o[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[a],c=s[i];return rt(l)?Object.assign({},c,l):Ke(l,c)},set(l){this[a]=l}}})}apply(t){t.forEach(n=>n(this))}}var tn=new D7({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[k7,M7,L7]);function A7(e){return!e||ct(e.size)||ct(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function lg(e,t,n,r,i){let o=t[i];return o||(o=t[i]=e.measureText(i).width,n.push(i)),o>r&&(r=o),r}function j7(e,t,n,r){r=r||{};let i=r.data=r.data||{},o=r.garbageCollect=r.garbageCollect||[];r.font!==t&&(i=r.data={},o=r.garbageCollect=[],r.font=t),e.save(),e.font=t;let s=0;const a=n.length;let l,c,f,h,p;for(l=0;ln.length){for(l=0;l0&&e.stroke()}}function jf(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.xt.top-n&&e.y0&&o.strokeColor!=="";let l,c;for(e.save(),e.font=i.string,$7(e,o),l=0;l+e||0;function R2(e,t){const n={},r=rt(t),i=r?Object.keys(t):t,o=rt(e)?r?s=>Ke(e[s],e[t[s]]):s=>e[s]:()=>e;for(const s of i)n[s]=W7(o(s));return n}function QL(e){return R2(e,{top:"y",right:"x",bottom:"y",left:"x"})}function Aa(e){return R2(e,["topLeft","topRight","bottomLeft","bottomRight"])}function er(e){const t=QL(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function gn(e,t){e=e||{},t=t||tn.font;let n=Ke(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let r=Ke(e.style,t.style);r&&!(""+r).match(V7)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:Ke(e.family,t.family),lineHeight:H7(Ke(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:Ke(e.weight,t.weight),string:""};return i.string=A7(i),i}function Bu(e,t,n,r){let i=!0,o,s,a;for(o=0,s=e.length;on&&a===0?0:a+l;return{min:s(r,-Math.abs(o)),max:s(i,o)}}function qs(e,t){return Object.assign(Object.create(e),t)}function N2(e,t=[""],n=e,r,i=()=>e[0]){Qr(r)||(r=nD("_fallback",e));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:n,_fallback:r,_getTarget:i,override:s=>N2([s,...e],t,n,r)};return new Proxy(o,{deleteProperty(s,a){return delete s[a],delete s._keys,delete e[0][a],!0},get(s,a){return eD(s,a,()=>eB(a,t,e,s))},getOwnPropertyDescriptor(s,a){return Reflect.getOwnPropertyDescriptor(s._scopes[0],a)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(s,a){return xO(s).includes(a)},ownKeys(s){return xO(s)},set(s,a,l){const c=s._storage||(s._storage=i());return s[a]=c[a]=l,delete s._keys,!0}})}function _c(e,t,n,r){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:JL(e,r),setContext:o=>_c(e,o,n,r),override:o=>_c(e.override(o),t,n,r)};return new Proxy(i,{deleteProperty(o,s){return delete o[s],delete e[s],!0},get(o,s,a){return eD(o,s,()=>G7(o,s,a))},getOwnPropertyDescriptor(o,s){return o._descriptors.allKeys?Reflect.has(e,s)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,s)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(o,s){return Reflect.has(e,s)},ownKeys(){return Reflect.ownKeys(e)},set(o,s,a){return e[s]=a,delete o[s],!0}})}function JL(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:r=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:n,indexable:r,isScriptable:js(n)?n:()=>n,isIndexable:js(r)?r:()=>r}}const q7=(e,t)=>e?e+O2(t):t,L2=(e,t)=>rt(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function eD(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t))return e[t];const r=n();return e[t]=r,r}function G7(e,t,n){const{_proxy:r,_context:i,_subProxy:o,_descriptors:s}=e;let a=r[t];return js(a)&&s.isScriptable(t)&&(a=Z7(t,a,e,n)),kt(a)&&a.length&&(a=K7(t,a,e,s.isIndexable)),L2(t,a)&&(a=_c(a,i,o&&o[t],s)),a}function Z7(e,t,n,r){const{_proxy:i,_context:o,_subProxy:s,_stack:a}=n;if(a.has(e))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+e);return a.add(e),t=t(o,s||r),a.delete(e),L2(e,t)&&(t=D2(i._scopes,i,e,t)),t}function K7(e,t,n,r){const{_proxy:i,_context:o,_subProxy:s,_descriptors:a}=n;if(Qr(o.index)&&r(e))t=t[o.index%t.length];else if(rt(t[0])){const l=t,c=i._scopes.filter(f=>f!==l);t=[];for(const f of l){const h=D2(c,i,e,f);t.push(_c(h,o,s&&s[e],a))}}return t}function tD(e,t,n){return js(e)?e(t,n):e}const X7=(e,t)=>e===!0?t:typeof e=="string"?As(t,e):void 0;function Q7(e,t,n,r,i){for(const o of t){const s=X7(n,o);if(s){e.add(s);const a=tD(s._fallback,n,i);if(Qr(a)&&a!==n&&a!==r)return a}else if(s===!1&&Qr(r)&&n!==r)return null}return!1}function D2(e,t,n,r){const i=t._rootScopes,o=tD(t._fallback,n,r),s=[...e,...i],a=new Set;a.add(r);let l=wO(a,s,n,o||n,r);return l===null||Qr(o)&&o!==n&&(l=wO(a,s,o,l,r),l===null)?!1:N2(Array.from(a),[""],i,o,()=>J7(t,n,r))}function wO(e,t,n,r,i){for(;n;)n=Q7(e,t,n,r,i);return n}function J7(e,t,n){const r=e._getTarget();t in r||(r[t]={});const i=r[t];return kt(i)&&rt(n)?n:i||{}}function eB(e,t,n,r){let i;for(const o of t)if(i=nD(q7(o,e),n),Qr(i))return L2(e,i)?D2(n,r,e,i):i}function nD(e,t){for(const n of t){if(!n)continue;const r=n[e];if(Qr(r))return r}}function xO(e){let t=e._keys;return t||(t=e._keys=tB(e._scopes)),t}function tB(e){const t=new Set;for(const n of e)for(const r of Object.keys(n).filter(i=>!i.startsWith("_")))t.add(r);return Array.from(t)}function rD(e,t,n,r){const{iScale:i}=e,{key:o="r"}=this._parsing,s=new Array(r);let a,l,c,f;for(a=0,l=r;ate==="x"?"y":"x";function rB(e,t,n,r){const i=e.skip?t:e,o=t,s=n.skip?t:n,a=q1(o,i),l=q1(s,o);let c=a/(a+l),f=l/(a+l);c=isNaN(c)?0:c,f=isNaN(f)?0:f;const h=r*c,p=r*f;return{previous:{x:o.x-h*(s.x-i.x),y:o.y-h*(s.y-i.y)},next:{x:o.x+p*(s.x-i.x),y:o.y+p*(s.y-i.y)}}}function iB(e,t,n){const r=e.length;let i,o,s,a,l,c=bc(e,0);for(let f=0;f!c.skip)),t.cubicInterpolationMode==="monotone")sB(e,i);else{let c=r?e[e.length-1]:e[0];for(o=0,s=e.length;oe.ownerDocument.defaultView.getComputedStyle(e,null);function cB(e,t){return ly(e).getPropertyValue(t)}const uB=["top","right","bottom","left"];function ja(e,t,n){const r={};n=n?"-"+n:"";for(let i=0;i<4;i++){const o=uB[i];r[o]=parseFloat(e[t+"-"+o+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const fB=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function dB(e,t){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:i,offsetY:o}=r;let s=!1,a,l;if(fB(i,o,e.target))a=i,l=o;else{const c=t.getBoundingClientRect();a=r.clientX-c.left,l=r.clientY-c.top,s=!0}return{x:a,y:l,box:s}}function ba(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=t,i=ly(n),o=i.boxSizing==="border-box",s=ja(i,"padding"),a=ja(i,"border","width"),{x:l,y:c,box:f}=dB(e,n),h=s.left+(f&&a.left),p=s.top+(f&&a.top);let{width:m,height:v}=t;return o&&(m-=s.width+a.width,v-=s.height+a.height),{x:Math.round((l-h)/m*n.width/r),y:Math.round((c-p)/v*n.height/r)}}function hB(e,t,n){let r,i;if(t===void 0||n===void 0){const o=A2(e);if(!o)t=e.clientWidth,n=e.clientHeight;else{const s=o.getBoundingClientRect(),a=ly(o),l=ja(a,"border","width"),c=ja(a,"padding");t=s.width-c.width-l.width,n=s.height-c.height-l.height,r=cg(a.maxWidth,o,"clientWidth"),i=cg(a.maxHeight,o,"clientHeight")}}return{width:t,height:n,maxWidth:r||ag,maxHeight:i||ag}}const Hh=e=>Math.round(e*10)/10;function pB(e,t,n,r){const i=ly(e),o=ja(i,"margin"),s=cg(i.maxWidth,e,"clientWidth")||ag,a=cg(i.maxHeight,e,"clientHeight")||ag,l=hB(e,t,n);let{width:c,height:f}=l;if(i.boxSizing==="content-box"){const p=ja(i,"border","width"),m=ja(i,"padding");c-=m.width+p.width,f-=m.height+p.height}return c=Math.max(0,c-o.width),f=Math.max(0,r?c/r:f-o.height),c=Hh(Math.min(c,s,l.maxWidth)),f=Hh(Math.min(f,a,l.maxHeight)),c&&!f&&(f=Hh(c/2)),(t!==void 0||n!==void 0)&&r&&l.height&&f>l.height&&(f=l.height,c=Hh(Math.floor(f*r))),{width:c,height:f}}function SO(e,t,n){const r=t||1,i=Math.floor(e.height*r),o=Math.floor(e.width*r);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const s=e.canvas;return s.style&&(n||!s.style.height&&!s.style.width)&&(s.style.height=`${e.height}px`,s.style.width=`${e.width}px`),e.currentDevicePixelRatio!==r||s.height!==i||s.width!==o?(e.currentDevicePixelRatio=r,s.height=i,s.width=o,e.ctx.setTransform(r,0,0,r,0,0),!0):!1}const mB=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch{}return e}();function CO(e,t){const n=cB(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function wa(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function gB(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:r==="middle"?n<.5?e.y:t.y:r==="after"?n<1?e.y:t.y:n>0?t.y:e.y}}function vB(e,t,n,r){const i={x:e.cp2x,y:e.cp2y},o={x:t.cp1x,y:t.cp1y},s=wa(e,i,n),a=wa(i,o,n),l=wa(o,t,n),c=wa(s,a,n),f=wa(a,l,n);return wa(c,f,n)}const yB=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,r){return n-r},leftForLtr(n,r){return n-r}}},_B=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function nc(e,t,n){return e?yB(t,n):_B()}function sD(e,t){let n,r;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=r)}function aD(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function lD(e){return e==="angle"?{between:Af,compare:b7,normalize:Pr}:{between:_o,compare:(t,n)=>t-n,normalize:t=>t}}function EO({start:e,end:t,count:n,loop:r,style:i}){return{start:e%n,end:t%n,loop:r&&(t-e+1)%n===0,style:i}}function bB(e,t,n){const{property:r,start:i,end:o}=n,{between:s,normalize:a}=lD(r),l=t.length;let{start:c,end:f,loop:h}=e,p,m;if(h){for(c+=l,f+=l,p=0,m=l;pl(i,S,_)&&a(i,S)!==0,P=()=>a(o,_)===0||l(o,S,_),k=()=>y||T(),N=()=>!y||P();for(let D=f,z=f;D<=h;++D)w=t[D%s],!w.skip&&(_=c(w[r]),_!==S&&(y=l(_,i,o),x===null&&k()&&(x=a(_,i)===0?D:z),x!==null&&N()&&(v.push(EO({start:x,end:D,loop:p,count:s,style:m})),x=null),z=D,S=_));return x!==null&&v.push(EO({start:x,end:h,loop:p,count:s,style:m})),v}function uD(e,t){const n=[],r=e.segments;for(let i=0;ii&&e[o%t].skip;)o--;return o%=t,{start:i,end:o}}function xB(e,t,n,r){const i=e.length,o=[];let s=t,a=e[t],l;for(l=t+1;l<=n;++l){const c=e[l%i];c.skip||c.stop?a.skip||(r=!1,o.push({start:t%i,end:(l-1)%i,loop:r}),t=s=c.stop?l:null):(s=l,a.skip&&(t=l)),a=c}return s!==null&&o.push({start:t%i,end:s%i,loop:r}),o}function SB(e,t){const n=e.points,r=e.options.spanGaps,i=n.length;if(!i)return[];const o=!!e._loop,{start:s,end:a}=wB(n,i,o,r);if(r===!0)return TO(e,[{start:s,end:a,loop:o}],n,t);const l=aa({chart:t,initial:n.initial,numSteps:s,currentStep:Math.min(r-n.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=ZL.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((r,i)=>{if(!r.running||!r.items.length)return;const o=r.items;let s=o.length-1,a=!1,l;for(;s>=0;--s)l=o[s],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(t),a=!0):(o[s]=o[o.length-1],o.pop());a&&(i.draw(),this._notify(i,r,t,"progress")),o.length||(r.running=!1,this._notify(i,r,t,"complete"),r.initial=!1),n+=o.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let r=n.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,r)),r}listen(t,n,r){this._getAnims(t).listeners[n].push(r)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,i)=>Math.max(r,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const r=n.items;let i=r.length-1;for(;i>=0;--i)r[i].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var co=new wB;const NO="transparent",xB={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=xO(e||NO),i=r.valid&&xO(t||NO);return i&&i.valid?i.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class SB{constructor(t,n,r,i){const o=n[r];i=Uu([t.to,i,o,t.from]);const s=Uu([t.from,o,i]);this._active=!0,this._fn=t.fn||xB[t.type||typeof s],this._easing=sf[t.easing]||sf.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=r,this._from=s,this._to=i,this._promises=void 0}active(){return this._active}update(t,n,r){if(this._active){this._notify(!1);const i=this._target[this._prop],o=r-this._start,s=this._duration-o;this._start=r,this._duration=Math.floor(Math.max(s,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=Uu([t.to,n,i,t.from]),this._from=Uu([t.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,r=this._duration,i=this._prop,o=this._from,s=this._loop,a=this._to;let l;if(this._active=o!==a&&(s||n1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(o,a,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,r)=>{t.push({res:n,rej:r})})}_notify(t){const n=t?"res":"rej",r=this._promises||[];for(let i=0;i{const o=t[i];if(!rt(o))return;const s={};for(const a of n)s[a]=o[a];(kt(o.properties)&&o.properties||[i]).forEach(a=>{(a===i||!r.has(a))&&r.set(a,s)})})}_animateOptions(t,n){const r=n.options,i=EB(t,r);if(!i)return[];const o=this._createAnimations(i,r);return r.$shared&&CB(t.options.$animations,r).then(()=>{t.options=r},()=>{}),o}_createAnimations(t,n){const r=this._properties,i=[],o=t.$animations||(t.$animations={}),s=Object.keys(n),a=Date.now();let l;for(l=s.length-1;l>=0;--l){const c=s[l];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(t,n));continue}const f=n[c];let h=o[c];const p=r.get(c);if(h)if(p&&h.active()){h.update(p,f,a);continue}else h.cancel();if(!p||!p.duration){t[c]=f;continue}o[c]=h=new SB(p,t,c,f),i.push(h)}return i}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const r=this._createAnimations(t,n);if(r.length)return co.add(this._chart,r),!0}}function CB(e,t){const n=[],r=Object.keys(t);for(let i=0;i0||!n&&o<0)return i.index}return null}function IO(e,t){const{chart:n,_cachedMeta:r}=e,i=n._stacks||(n._stacks={}),{iScale:o,vScale:s,index:a}=r,l=o.axis,c=s.axis,f=kB(o,s,r),h=t.length;let p;for(let m=0;mn[r].axis===t).shift()}function NB(e,t){return Ys(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function LB(e,t,n){return Ys(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function wu(e,t){const n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t=t||e._parsed;for(const i of t){const o=i._stacks;if(!o||o[r]===void 0||o[r][n]===void 0)return;delete o[r][n],o[r]._visualValues!==void 0&&o[r]._visualValues[n]!==void 0&&delete o[r]._visualValues[n]}}}const u0=e=>e==="reset"||e==="none",FO=(e,t)=>t?e:Object.assign({},e),DB=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:gD(n,!0),values:null};class bi{constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=AO(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&wu(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(h,p,m,v)=>h==="x"?p:h==="r"?v:m,o=n.xAxisID=Ke(r.xAxisID,c0(t,"x")),s=n.yAxisID=Ke(r.yAxisID,c0(t,"y")),a=n.rAxisID=Ke(r.rAxisID,c0(t,"r")),l=n.indexAxis,c=n.iAxisID=i(l,o,s,a),f=n.vAxisID=i(l,s,o,a);n.xScale=this.getScaleForId(o),n.yScale=this.getScaleForId(s),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(f)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&_O(this._data,this),t._stacked&&wu(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(rt(n))this._data=PB(n);else if(r!==n){if(r){_O(r,this);const i=this._cachedMeta;wu(i),i._parsed=[]}n&&Object.isExtensible(n)&&_7(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,r=this.getDataset();let i=!1;this._dataCheck();const o=n._stacked;n._stacked=AO(n.vScale,n),n.stack!==r.stack&&(i=!0,wu(n),n.stack=r.stack),this._resyncElements(t),(i||o!==n._stacked)&&IO(this,n._parsed)}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:r,_data:i}=this,{iScale:o,_stacked:s}=r,a=o.axis;let l=t===0&&n===i.length?!0:r._sorted,c=t>0&&r._parsed[t-1],f,h,p;if(this._parsing===!1)r._parsed=i,r._sorted=!0,p=i;else{kt(i[t])?p=this.parseArrayData(r,i,t,n):rt(i[t])?p=this.parseObjectData(r,i,t,n):p=this.parsePrimitiveData(r,i,t,n);const m=()=>h[a]===null||c&&h[a]y||h=0;--p)if(!v()){this.updateRangeFromParsed(c,t,m,l);break}}return c}getAllParsedValues(t){const n=this._cachedMeta._parsed,r=[];let i,o,s;for(i=0,o=n.length;i=0&&tthis.getContext(r,i,n),y=c.resolveNamedOptions(p,m,v,h);return y.$shared&&(y.$shared=l,o[s]=Object.freeze(FO(y,l))),y}_resolveAnimations(t,n,r){const i=this.chart,o=this._cachedDataOpts,s=`animation-${n}`,a=o[s];if(a)return a;let l;if(i.options.animation!==!1){const f=this.chart.config,h=f.datasetAnimationScopeKeys(this._type,n),p=f.getOptionScopes(this.getDataset(),h);l=f.createResolver(p,this.getContext(t,r,n))}const c=new mD(i,l&&l.animations);return l&&l._cacheable&&(o[s]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||u0(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const r=this.resolveDataElementOptions(t,n),i=this._sharedOptions,o=this.getSharedOptions(r),s=this.includeOptions(n,o)||o!==i;return this.updateSharedOptions(o,n,r),{sharedOptions:o,includeOptions:s}}updateElement(t,n,r,i){u0(i)?Object.assign(t,r):this._resolveAnimations(n,i).update(t,r)}updateSharedOptions(t,n,r){t&&!u0(n)&&this._resolveAnimations(void 0,n).update(t,r)}_setStyle(t,n,r,i){t.active=i;const o=this.getStyle(n,i);this._resolveAnimations(n,r,i).update(t,{options:!i&&this.getSharedOptions(o)||o})}removeHoverStyle(t,n,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,n,r){this._setStyle(t,r,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,r=this._cachedMeta.data;for(const[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];const i=r.length,o=n.length,s=Math.min(o,i);s&&this.parse(0,s),o>i?this._insertElements(i,o-i,t):o{for(c.length+=n,a=c.length-1;a>=s;a--)c[a]=c[a-n]};for(l(o),a=t;ai-o))}return e._cache.$bar}function jB(e){const t=e.iScale,n=AB(t,e.type);let r=t._length,i,o,s,a;const l=()=>{s===32767||s===-32768||(Qr(a)&&(r=Math.min(r,Math.abs(s-a)||r)),a=s)};for(i=0,o=n.length;i0?i[e-1]:null,a=eMath.abs(a)&&(l=a,c=s),t[n.axis]=c,t._custom={barStart:l,barEnd:c,start:i,end:o,min:s,max:a}}function vD(e,t,n,r){return kt(e)?$B(e,t,n,r):t[n.axis]=n.parse(e,r),t}function $O(e,t,n,r){const i=e.iScale,o=e.vScale,s=i.getLabels(),a=i===o,l=[];let c,f,h,p;for(c=n,f=n+r;c=n?1:-1)}function zB(e){let t,n,r,i,o;return e.horizontal?(t=e.base>e.x,n="left",r="right"):(t=e.basel.controller.options.grouped),o=r.options.stacked,s=[],a=l=>{const c=l.controller.getParsed(n),f=c&&c[l.vScale.axis];if(ct(f)||isNaN(f))return!0};for(const l of i)if(!(n!==void 0&&a(l))&&((o===!1||s.indexOf(l.stack)===-1||o===void 0&&l.stack===void 0)&&s.push(l.stack),l.index===t))break;return s.length||s.push(void 0),s}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,n,r){const i=this._getStacks(t,r),o=n!==void 0?i.indexOf(n):-1;return o===-1?i.length-1:o}_getRuler(){const t=this.options,n=this._cachedMeta,r=n.iScale,i=[];let o,s;for(o=0,s=n.data.length;o=0;--r)n=Math.max(n,t[r].size(this.resolveDataElementOptions(r))/2);return n>0&&n}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart.data.labels||[],{xScale:i,yScale:o}=n,s=this.getParsed(t),a=i.getLabelForValue(s.x),l=o.getLabelForValue(s.y),c=s._custom;return{label:r[t]||"",value:"("+a+", "+l+(c?", "+c:"")+")"}}update(t){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,t)}updateElements(t,n,r,i){const o=i==="reset",{iScale:s,vScale:a}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(n,i),f=s.axis,h=a.axis;for(let p=n;pIf(S,a,l,!0)?1:Math.max(T,T*n,P,P*n),v=(S,T,P)=>If(S,a,l,!0)?-1:Math.min(T,T*n,P,P*n),y=m(0,c,h),x=m(Zt,f,p),_=v(Ft,c,h),w=v(Ft+Zt,f,p);r=(y-_)/2,i=(x-w)/2,o=-(y+_)/2,s=-(x+w)/2}return{ratioX:r,ratioY:i,offsetX:o,offsetY:s}}class ls extends bi{constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){const r=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=r;else{let o=l=>+r[l];if(rt(r[t])){const{key:l="value"}=this._parsing;o=c=>+Ls(r[c],l)}let s,a;for(s=t,a=t+n;s0&&!isNaN(t)?Mt*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],o=Ld(n._parsed[t],r.options.locale);return{label:i[t]||"",value:o}}getMaxBorderWidth(t){let n=0;const r=this.chart;let i,o,s,a,l;if(!t){for(i=0,o=r.data.datasets.length;it!=="spacing",_indexable:t=>t!=="spacing"}),xe(ls,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:i}}=t.legend.options;return n.labels.map((o,s)=>{const l=t.getDatasetMeta(0).controller.getStyle(s);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}}});class cf extends bi{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:r,data:i=[],_dataset:o}=n,s=this.chart._animationsDisabled;let{start:a,count:l}=XL(n,i,s);this._drawStart=a,this._drawCount=l,QL(n)&&(a=0,l=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!o._decimated,r.points=i;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(r,void 0,{animated:!s,options:c},t),this.updateElements(i,a,l,t)}updateElements(t,n,r,i){const o=i==="reset",{iScale:s,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:f,includeOptions:h}=this._getSharedOptions(n,i),p=s.axis,m=a.axis,{spanGaps:v,segment:y}=this.options,x=bc(v)?v:Number.POSITIVE_INFINITY,_=this.chart._animationsDisabled||o||i==="none",w=n+r,S=t.length;let T=n>0&&this.getParsed(n-1);for(let P=0;P=w){N.skip=!0;continue}const D=this.getParsed(P),z=ct(D[m]),A=N[p]=s.getPixelForValue(D[p],P),W=N[m]=o||z?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,D,l):D[m],P);N.skip=isNaN(A)||isNaN(W)||z,N.stop=P>0&&Math.abs(D[p]-T[p])>x,y&&(N.parsed=D,N.raw=c.data[P]),h&&(N.options=f||this.resolveDataElementOptions(P,k.active?"active":i)),_||this.updateElement(k,P,N,i),T=D}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,r=n.options&&n.options.borderWidth||0,i=t.data||[];if(!i.length)return r;const o=i[0].size(this.resolveDataElementOptions(0)),s=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,o,s)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}xe(cf,"id","line"),xe(cf,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),xe(cf,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class uf extends bi{constructor(t,n){super(t,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],o=Ld(n._parsed[t].r,r.options.locale);return{label:i[t]||"",value:o}}parseObjectData(t,n,r,i){return aD.bind(this)(t,n,r,i)}update(t){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,t)}getMinMax(){const t=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((r,i)=>{const o=this.getParsed(i).r;!isNaN(o)&&this.chart.getDataVisibility(i)&&(on.max&&(n.max=o))}),n}_updateRadius(){const t=this.chart,n=t.chartArea,r=t.options,i=Math.min(n.right-n.left,n.bottom-n.top),o=Math.max(i/2,0),s=Math.max(r.cutoutPercentage?o/100*r.cutoutPercentage:1,0),a=(o-s)/t.getVisibleDatasetCount();this.outerRadius=o-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(t,n,r,i){const o=i==="reset",s=this.chart,l=s.options.animation,c=this._cachedMeta.rScale,f=c.xCenter,h=c.yCenter,p=c.getIndexAngle(0)-.5*Ft;let m=p,v;const y=360/this.countVisibleElements();for(v=0;v{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&n++}),n}_computeAngle(t,n,r){return this.chart.getDataVisibility(t)?vi(this.resolveDataElementOptions(t,n).angle||r):0}}xe(uf,"id","polarArea"),xe(uf,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),xe(uf,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:i}}=t.legend.options;return n.labels.map((o,s)=>{const l=t.getDatasetMeta(0).controller.getStyle(s);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class J1 extends ls{}xe(J1,"id","pie"),xe(J1,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class Hp extends bi{getLabelAndValue(t){const n=this._cachedMeta.vScale,r=this.getParsed(t);return{label:n.getLabels()[t],value:""+n.getLabelForValue(r[n.axis])}}parseObjectData(t,n,r,i){return aD.bind(this)(t,n,r,i)}update(t){const n=this._cachedMeta,r=n.dataset,i=n.data||[],o=n.iScale.getLabels();if(r.points=i,t!=="resize"){const s=this.resolveDatasetElementOptions(t);this.options.showLine||(s.borderWidth=0);const a={_loop:!0,_fullLoop:o.length===i.length,options:s};this.updateElement(r,void 0,a,t)}this.updateElements(i,0,i.length,t)}updateElements(t,n,r,i){const o=this._cachedMeta.rScale,s=i==="reset";for(let a=n;a0&&this.getParsed(n-1);for(let T=n;T0&&Math.abs(k[m]-S[m])>_,x&&(N.parsed=k,N.raw=c.data[T]),p&&(N.options=h||this.resolveDataElementOptions(T,P.active?"active":i)),w||this.updateElement(P,T,N,i),S=k}this.updateSharedOptions(h,i,f)}getMaxOverflow(){const t=this._cachedMeta,n=t.data||[];if(!this.options.showLine){let a=0;for(let l=n.length-1;l>=0;--l)a=Math.max(a,n[l].size(this.resolveDataElementOptions(l))/2);return a>0&&a}const r=t.dataset,i=r.options&&r.options.borderWidth||0;if(!n.length)return i;const o=n[0].size(this.resolveDataElementOptions(0)),s=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,o,s)/2}}xe(Wp,"id","scatter"),xe(Wp,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),xe(Wp,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var YB=Object.freeze({__proto__:null,BarController:lf,BubbleController:Vp,DoughnutController:ls,LineController:cf,PolarAreaController:uf,PieController:J1,RadarController:Hp,ScatterController:Wp});function pa(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class z2{static override(t){Object.assign(z2.prototype,t)}constructor(t){this.options=t||{}}init(){}formats(){return pa()}parse(){return pa()}format(){return pa()}add(){return pa()}diff(){return pa()}startOf(){return pa()}endOf(){return pa()}}var qB={_date:z2};function GB(e,t,n,r){const{controller:i,data:o,_sorted:s}=e,a=i._cachedMeta.iScale;if(a&&t===a.axis&&t!=="r"&&s&&o.length){const l=a._reversePixels?v7:_o;if(r){if(i._sharedOptions){const c=o[0],f=typeof c.getRange=="function"&&c.getRange(t);if(f){const h=l(o,t,n-f),p=l(o,t,n+f);return{lo:h.lo,hi:p.hi}}}}else return l(o,t,n)}return{lo:0,hi:o.length-1}}function Dd(e,t,n,r,i){const o=e.getSortedVisibleDatasetMetas(),s=n[t];for(let a=0,l=o.length;a{l[s](t[n],i)&&(o.push({element:l,datasetIndex:c,index:f}),a=a||l.inRange(t.x,t.y,i))}),r&&!a?[]:o}var QB={evaluateInteractionItems:Dd,modes:{index(e,t,n,r){const i=ba(t,e),o=n.axis||"x",s=n.includeInvisible||!1,a=n.intersect?d0(e,i,o,r,s):h0(e,i,o,!1,r,s),l=[];return a.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const f=a[0].index,h=c.data[f];h&&!h.skip&&l.push({element:h,datasetIndex:c.index,index:f})}),l):[]},dataset(e,t,n,r){const i=ba(t,e),o=n.axis||"xy",s=n.includeInvisible||!1;let a=n.intersect?d0(e,i,o,r,s):h0(e,i,o,!1,r,s);if(a.length>0){const l=a[0].datasetIndex,c=e.getDatasetMeta(l).data;a=[];for(let f=0;fn.pos===t)}function VO(e,t){return e.filter(n=>yD.indexOf(n.pos)===-1&&n.box.axis===t)}function Su(e,t){return e.sort((n,r)=>{const i=t?r:n,o=t?n:r;return i.weight===o.weight?i.index-o.index:i.weight-o.weight})}function JB(e){const t=[];let n,r,i,o,s,a;for(n=0,r=(e||[]).length;nc.box.fullSize),!0),r=Su(xu(t,"left"),!0),i=Su(xu(t,"right")),o=Su(xu(t,"top"),!0),s=Su(xu(t,"bottom")),a=VO(t,"x"),l=VO(t,"y");return{fullSize:n,leftAndTop:r.concat(o),rightAndBottom:i.concat(l).concat(s).concat(a),chartArea:xu(t,"chartArea"),vertical:r.concat(i).concat(l),horizontal:o.concat(s).concat(a)}}function HO(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function _D(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function r9(e,t,n,r){const{pos:i,box:o}=n,s=e.maxPadding;if(!rt(i)){n.size&&(e[i]-=n.size);const h=r[n.stack]||{size:0,count:1};h.size=Math.max(h.size,n.horizontal?o.height:o.width),n.size=h.size/h.count,e[i]+=n.size}o.getPadding&&_D(s,o.getPadding());const a=Math.max(0,t.outerWidth-HO(s,e,"left","right")),l=Math.max(0,t.outerHeight-HO(s,e,"top","bottom")),c=a!==e.w,f=l!==e.h;return e.w=a,e.h=l,n.horizontal?{same:c,other:f}:{same:f,other:c}}function i9(e){const t=e.maxPadding;function n(r){const i=Math.max(t[r]-e[r],0);return e[r]+=i,i}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function o9(e,t){const n=t.maxPadding;function r(i){const o={left:0,top:0,right:0,bottom:0};return i.forEach(s=>{o[s]=Math.max(t[s],n[s])}),o}return r(e?["left","right"]:["top","bottom"])}function Vu(e,t,n,r){const i=[];let o,s,a,l,c,f;for(o=0,s=e.length,c=0;o{typeof y.beforeLayout=="function"&&y.beforeLayout()});const f=l.reduce((y,x)=>x.box.options&&x.box.options.display===!1?y:y+1,0)||1,h=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:o,availableHeight:s,vBoxMaxWidth:o/2/f,hBoxMaxHeight:s/2}),p=Object.assign({},i);_D(p,er(r));const m=Object.assign({maxPadding:p,w:o,h:s,x:i.left,y:i.top},i),v=t9(l.concat(c),h);Vu(a.fullSize,m,h,v),Vu(l,m,h,v),Vu(c,m,h,v)&&Vu(l,m,h,v),i9(m),WO(a.leftAndTop,m,h,v),m.x+=m.w,m.y+=m.h,WO(a.rightAndBottom,m,h,v),e.chartArea={left:m.left,top:m.top,right:m.left+m.w,bottom:m.top+m.h,height:m.h,width:m.w},vt(a.chartArea,y=>{const x=y.box;Object.assign(x,e.chartArea),x.update(m.w,m.h,{left:0,top:0,right:0,bottom:0})})}};class bD{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,r){}removeEventListener(t,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,r,i){return n=Math.max(0,n||t.width),r=r||t.height,{width:n,height:Math.max(0,i?Math.floor(n/i):r)}}isAttached(t){return!0}updateConfig(t){}}class s9 extends bD{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Yp="$chartjs",a9={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},YO=e=>e===null||e==="";function l9(e,t){const n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e[Yp]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",YO(i)){const o=PO(e,"width");o!==void 0&&(e.width=o)}if(YO(r))if(e.style.height==="")e.height=e.width/(t||2);else{const o=PO(e,"height");o!==void 0&&(e.height=o)}return e}const wD=uB?{passive:!0}:!1;function c9(e,t,n){e.addEventListener(t,n,wD)}function u9(e,t,n){e.canvas.removeEventListener(t,n,wD)}function f9(e,t){const n=a9[e.type]||e.type,{x:r,y:i}=ba(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:i!==void 0?i:null}}function cg(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function d9(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let s=!1;for(const a of o)s=s||cg(a.addedNodes,r),s=s&&!cg(a.removedNodes,r);s&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function h9(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let s=!1;for(const a of o)s=s||cg(a.removedNodes,r),s=s&&!cg(a.addedNodes,r);s&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const Bf=new Map;let qO=0;function xD(){const e=window.devicePixelRatio;e!==qO&&(qO=e,Bf.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function p9(e,t){Bf.size||window.addEventListener("resize",xD),Bf.set(e,t)}function m9(e){Bf.delete(e),Bf.size||window.removeEventListener("resize",xD)}function g9(e,t,n){const r=e.canvas,i=r&&B2(r);if(!i)return;const o=KL((a,l)=>{const c=i.clientWidth;n(a,l),c{const l=a[0],c=l.contentRect.width,f=l.contentRect.height;c===0&&f===0||o(c,f)});return s.observe(i),p9(e,o),s}function p0(e,t,n){n&&n.disconnect(),t==="resize"&&m9(e)}function v9(e,t,n){const r=e.canvas,i=KL(o=>{e.ctx!==null&&n(f9(o,e))},e);return c9(r,t,i),i}class y9 extends bD{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(l9(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[Yp])return!1;const r=n[Yp].initial;["height","width"].forEach(o=>{const s=r[o];ct(s)?n.removeAttribute(o):n.setAttribute(o,s)});const i=r.style||{};return Object.keys(i).forEach(o=>{n.style[o]=i[o]}),n.width=n.width,delete n[Yp],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),s={attach:d9,detach:h9,resize:g9}[n]||v9;i[n]=s(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),i=r[n];if(!i)return;({attach:p0,detach:p0,resize:p0}[n]||u9)(t,n,i),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,i){return cB(t,n,r,i)}isAttached(t){const n=B2(t);return!!(n&&n.isConnected)}}function _9(e){return!cD()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?s9:y9}var Bp;let Ao=(Bp=class{constructor(){xe(this,"active",!1)}tooltipPosition(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}hasValue(){return bc(this.x)&&bc(this.y)}getProps(t,n){const r=this.$animations;if(!n||!r)return this;const i={};return t.forEach(o=>{i[o]=r[o]&&r[o].active()?r[o]._to:this[o]}),i}},xe(Bp,"defaults",{}),xe(Bp,"defaultRoutes"),Bp);function b9(e,t){const n=e.options.ticks,r=w9(e),i=Math.min(n.maxTicksLimit||r,r),o=n.major.enabled?S9(t):[],s=o.length,a=o[0],l=o[s-1],c=[];if(s>i)return C9(t,c,o,s/i),c;const f=x9(o,t,i);if(s>0){let h,p;const m=s>1?Math.round((l-a)/(s-1)):null;for(Wh(t,c,f,ct(m)?0:a-m,a),h=0,p=s-1;hi)return l}return Math.max(i,1)}function S9(e){const t=[];let n,r;for(n=0,r=e.length;ne==="left"?"right":e==="right"?"left":e,GO=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n;function ZO(e,t){const n=[],r=e.length/t,i=e.length;let o=0;for(;os+a)))return l}function P9(e,t){vt(e,n=>{const r=n.gc,i=r.length/2;let o;if(i>t){for(o=0;or?r:n,r=i&&n>r?n:r,{min:Tr(n,Tr(r,n)),max:Tr(r,Tr(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Ct(this.options.beforeUpdate,[this])}update(t,n,r){const{beginAtZero:i,grace:o,ticks:s}=this.options,a=s.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=z7(this,o,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a=o||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const f=this._getLabelSizes(),h=f.widest.width,p=f.highest.height,m=En(this.chart.width-h,0,this.maxWidth);a=t.offset?this.maxWidth/r:m/(r-1),h+6>a&&(a=m/(r-(t.offset?.5:1)),l=this.maxHeight-Cu(t.grid)-n.padding-KO(t.title,this.chart.options.font),c=Math.sqrt(h*h+p*p),s=L2(Math.min(Math.asin(En((f.highest.height+6)/a,-1,1)),Math.asin(En(l/c,-1,1))-Math.asin(En(p/c,-1,1)))),s=Math.max(i,Math.min(o,s))),this.labelRotation=s}afterCalculateLabelRotation(){Ct(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Ct(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:r,title:i,grid:o}}=this,s=this._isVisible(),a=this.isHorizontal();if(s){const l=KO(i,n.options.font);if(a?(t.width=this.maxWidth,t.height=Cu(o)+l):(t.height=this.maxHeight,t.width=Cu(o)+l),r.display&&this.ticks.length){const{first:c,last:f,widest:h,highest:p}=this._getLabelSizes(),m=r.padding*2,v=vi(this.labelRotation),y=Math.cos(v),x=Math.sin(v);if(a){const _=r.mirror?0:x*h.width+y*p.height;t.height=Math.min(this.maxHeight,t.height+_+m)}else{const _=r.mirror?0:y*h.width+x*p.height;t.width=Math.min(this.maxWidth,t.width+_+m)}this._calculatePadding(c,f,x,y)}}this._handleMargins(),a?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,r,i){const{ticks:{align:o,padding:s},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const f=this.getPixelForTick(0)-this.left,h=this.right-this.getPixelForTick(this.ticks.length-1);let p=0,m=0;l?c?(p=i*t.width,m=r*n.height):(p=r*t.height,m=i*n.width):o==="start"?m=n.width:o==="end"?p=t.width:o!=="inner"&&(p=t.width/2,m=n.width/2),this.paddingLeft=Math.max((p-f+s)*this.width/(this.width-f),0),this.paddingRight=Math.max((m-h+s)*this.width/(this.width-h),0)}else{let f=n.height/2,h=t.height/2;o==="start"?(f=0,h=t.height):o==="end"&&(f=n.height,h=0),this.paddingTop=f+s,this.paddingBottom=h+s}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Ct(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,r;for(n=0,r=t.length;n({width:o[N]||0,height:s[N]||0});return{first:k(0),last:k(n-1),widest:k(T),highest:k(P),widths:o,heights:s}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return g7(this._alignToPixels?ha(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&ta*i?a/r:l/i:l*i0}_computeGridLineItems(t){const n=this.axis,r=this.chart,i=this.options,{grid:o,position:s,border:a}=i,l=o.offset,c=this.isHorizontal(),h=this.ticks.length+(l?1:0),p=Cu(o),m=[],v=a.setContext(this.getContext()),y=v.display?v.width:0,x=y/2,_=function(ie){return ha(r,ie,y)};let w,S,T,P,k,N,D,z,A,W,Y,J;if(s==="top")w=_(this.bottom),N=this.bottom-p,z=w-x,W=_(t.top)+x,J=t.bottom;else if(s==="bottom")w=_(this.top),W=t.top,J=_(t.bottom)-x,N=w+x,z=this.top+p;else if(s==="left")w=_(this.right),k=this.right-p,D=w-x,A=_(t.left)+x,Y=t.right;else if(s==="right")w=_(this.left),A=t.left,Y=_(t.right)-x,k=w+x,D=this.left+p;else if(n==="x"){if(s==="center")w=_((t.top+t.bottom)/2+.5);else if(rt(s)){const ie=Object.keys(s)[0],oe=s[ie];w=_(this.chart.scales[ie].getPixelForValue(oe))}W=t.top,J=t.bottom,N=w+x,z=N+p}else if(n==="y"){if(s==="center")w=_((t.left+t.right)/2);else if(rt(s)){const ie=Object.keys(s)[0],oe=s[ie];w=_(this.chart.scales[ie].getPixelForValue(oe))}k=w-x,D=k-p,A=t.left,Y=t.right}const Z=Ke(i.ticks.maxTicksLimit,h),ee=Math.max(1,Math.ceil(h/Z));for(S=0;So.value===t);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const n=this.options.grid,r=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,s;const a=(l,c,f)=>{!f.width||!f.color||(r.save(),r.lineWidth=f.width,r.strokeStyle=f.color,r.setLineDash(f.borderDash||[]),r.lineDashOffset=f.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(c.x,c.y),r.stroke(),r.restore())};if(n.display)for(o=0,s=i.length;o{this.draw(o)}}]:[{z:r,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",i=[];let o,s;for(o=0,s=n.length;o{const r=n.split("."),i=r.pop(),o=[e].concat(r).join("."),s=t[n].split("."),a=s.pop(),l=s.join(".");nn.route(o,i,l,a)})}function A9(e){return"id"in e&&"defaults"in e}class j9{constructor(){this.controllers=new Yh(bi,"datasets",!0),this.elements=new Yh(Ao,"elements"),this.plugins=new Yh(Object,"plugins"),this.scales=new Yh(ll,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,n,r){[...n].forEach(i=>{const o=r||this._getRegistryForType(i);r||o.isForType(i)||o===this.plugins&&i.id?this._exec(t,o,i):vt(i,s=>{const a=r||this._getRegistryForType(s);this._exec(t,a,s)})})}_exec(t,n,r){const i=N2(t);Ct(r["before"+i],[],r),n[t](r),Ct(r["after"+i],[],r)}_getRegistryForType(t){for(let n=0;no.filter(a=>!s.some(l=>a.plugin.id===l.plugin.id));this._notify(i(n,r),t,"stop"),this._notify(i(r,n),t,"start")}}function F9(e){const t={},n=[],r=Object.keys($i.plugins.items);for(let o=0;o1&&ug(e[0].toLowerCase(),t),e))return e;throw new Error(`Cannot determine type of '${name}' axis. Please provide 'axis' or 'position' option.`)}function W9(e,t){const n=Ha[e.type]||{scales:{}},r=t.scales||{},i=eb(e.type,t),o=Object.create(null);return Object.keys(r).forEach(s=>{const a=r[s];if(!rt(a))return console.error(`Invalid scale configuration for scale: ${s}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${s}`);const l=ug(s,a),c=V9(l,i),f=n.scales||{};o[s]=rf(Object.create(null),[{axis:l},a,f[l],f[c]])}),e.data.datasets.forEach(s=>{const a=s.type||e.type,l=s.indexAxis||eb(a,t),f=(Ha[a]||{}).scales||{};Object.keys(f).forEach(h=>{const p=U9(h,l),m=s[p+"AxisID"]||p;o[m]=o[m]||Object.create(null),rf(o[m],[{axis:p},r[m],f[h]])})}),Object.keys(o).forEach(s=>{const a=o[s];rf(a,[nn.scales[a.type],nn.scale])}),o}function SD(e){const t=e.options||(e.options={});t.plugins=Ke(t.plugins,{}),t.scales=W9(e,t)}function CD(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function Y9(e){return e=e||{},e.data=CD(e.data),SD(e),e}const XO=new Map,ED=new Set;function qh(e,t){let n=XO.get(e);return n||(n=t(),XO.set(e,n),ED.add(n)),n}const Eu=(e,t,n)=>{const r=Ls(t,n);r!==void 0&&e.add(r)};class q9{constructor(t){this._config=Y9(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=CD(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),SD(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return qh(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return qh(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return qh(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return qh(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const r=this._scopeCache;let i=r.get(t);return(!i||n)&&(i=new Map,r.set(t,i)),i}getOptionScopes(t,n,r){const{options:i,type:o}=this,s=this._cachedScopes(t,r),a=s.get(n);if(a)return a;const l=new Set;n.forEach(f=>{t&&(l.add(t),f.forEach(h=>Eu(l,t,h))),f.forEach(h=>Eu(l,i,h)),f.forEach(h=>Eu(l,Ha[o]||{},h)),f.forEach(h=>Eu(l,nn,h)),f.forEach(h=>Eu(l,X1,h))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),ED.has(n)&&s.set(n,c),c}chartOptionScopes(){const{options:t,type:n}=this;return[t,Ha[n]||{},nn.datasets[n]||{},{type:n},nn,X1]}resolveNamedOptions(t,n,r,i=[""]){const o={$shared:!0},{resolver:s,subPrefixes:a}=QO(this._resolverCache,t,i);let l=s;if(Z9(s,n)){o.$shared=!1,r=Ds(r)?r():r;const c=this.createResolver(t,r,a);l=wc(s,r,c)}for(const c of n)o[c]=l[c];return o}createResolver(t,n,r=[""],i){const{resolver:o}=QO(this._resolverCache,t,r);return rt(n)?wc(o,n,void 0,i):o}}function QO(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));const i=n.join();let o=r.get(i);return o||(o={resolver:I2(t,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},r.set(i,o)),o}const G9=e=>rt(e)&&Object.getOwnPropertyNames(e).reduce((t,n)=>t||Ds(e[n]),!1);function Z9(e,t){const{isScriptable:n,isIndexable:r}=rD(e);for(const i of t){const o=n(i),s=r(i),a=(s||o)&&e[i];if(o&&(Ds(a)||G9(a))||s&&kt(a))return!0}return!1}var K9="4.1.1";const X9=["top","bottom","left","right","chartArea"];function JO(e,t){return e==="top"||e==="bottom"||X9.indexOf(e)===-1&&t==="x"}function eP(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function tP(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),Ct(n&&n.onComplete,[e],t)}function Q9(e){const t=e.chart,n=t.options.animation;Ct(n&&n.onProgress,[e],t)}function TD(e){return cD()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const qp={},nP=e=>{const t=TD(e);return Object.values(qp).filter(n=>n.canvas===t).pop()};function J9(e,t,n){const r=Object.keys(e);for(const i of r){const o=+i;if(o>=t){const s=e[i];delete e[i],(n>0||o>t)&&(e[o+n]=s)}}}function ez(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}function tz(e){const{xScale:t,yScale:n}=e;if(t&&n)return{left:t.left,right:t.right,top:n.top,bottom:n.bottom}}var Ko;let fy=(Ko=class{static register(...t){$i.add(...t),rP()}static unregister(...t){$i.remove(...t),rP()}constructor(t,n){const r=this.config=new q9(n),i=TD(t),o=nP(i);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const s=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||_9(i)),this.platform.updateConfig(r);const a=this.platform.acquireContext(i,s.aspectRatio),l=a&&a.canvas,c=l&&l.height,f=l&&l.width;if(this.id=i7(),this.ctx=a,this.canvas=l,this.width=f,this.height=c,this._options=s,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new I9,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=b7(h=>this.update(h),s.resizeDelay||0),this._dataChanges=[],qp[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}co.listen(this,"complete",tP),co.listen(this,"progress",Q9),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:i,_aspectRatio:o}=this;return ct(t)?n&&o?o:i?r/i:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return $i}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():OO(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return CO(this.canvas,this.ctx),this}stop(){return co.stop(this),this}resize(t,n){co.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const r=this.options,i=this.canvas,o=r.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(i,t,n,o),a=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,OO(this,a,!0)&&(this.notifyPlugins("resize",{size:s}),Ct(r.onResize,[this,s],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};vt(n,(r,i)=>{r.id=i})}buildOrUpdateScales(){const t=this.options,n=t.scales,r=this.scales,i=Object.keys(r).reduce((s,a)=>(s[a]=!1,s),{});let o=[];n&&(o=o.concat(Object.keys(n).map(s=>{const a=n[s],l=ug(s,a),c=l==="r",f=l==="x";return{options:a,dposition:c?"chartArea":f?"bottom":"left",dtype:c?"radialLinear":f?"category":"linear"}}))),vt(o,s=>{const a=s.options,l=a.id,c=ug(l,a),f=Ke(a.type,s.dtype);(a.position===void 0||JO(a.position,c)!==JO(s.dposition))&&(a.position=s.dposition),i[l]=!0;let h=null;if(l in r&&r[l].type===f)h=r[l];else{const p=$i.getScale(f);h=new p({id:l,type:f,ctx:this.ctx,chart:this}),r[h.id]=h}h.init(a,t)}),vt(i,(s,a)=>{s||delete r[a]}),vt(r,s=>{Jn.configure(this,s,s.options),Jn.addBox(this,s)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,r=t.length;if(t.sort((i,o)=>i.index-o.index),r>n){for(let i=n;in.length&&delete this._stacks,t.forEach((r,i)=>{n.filter(o=>o===r._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let r,i;for(this._removeUnreferencedMetasets(),r=0,i=n.length;r{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let c=0,f=this.data.datasets.length;c{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(eP("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){vt(this.scales,t=>{Jn.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!mO(n,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:i,count:o}of n){const s=r==="_removeElements"?-o:o;J9(t,i,s)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=o=>new Set(t.filter(s=>s[0]===o).map((s,a)=>a+","+s.splice(1).join(","))),i=r(0);for(let o=1;oo.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Jn.update(this,this.width,this.height,t);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],vt(this.boxes,i=>{r&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,o)=>{i._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,r=t._clip,i=!r.disabled,o=tz(t)||this.chartArea,s={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(i&&ly(n,{left:r.left===!1?0:o.left-r.left,right:r.right===!1?this.width:o.right+r.right,top:r.top===!1?0:o.top-r.top,bottom:r.bottom===!1?this.height:o.bottom+r.bottom}),t.controller.draw(),i&&cy(n),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(t){return Ff(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,i){const o=QB.modes[n];return typeof o=="function"?o(this,t,r,i):[]}getDatasetMeta(t){const n=this.data.datasets[t],r=this._metasets;let i=r.filter(o=>o&&o._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},r.push(i)),i}getContext(){return this.$context||(this.$context=Ys(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(t,n){const r=this.getDatasetMeta(t);r.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,r){const i=r?"show":"hide",o=this.getDatasetMeta(t),s=o.controller._resolveAnimations(void 0,i);Qr(n)?(o.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),s.update(o,{visible:r}),this.update(a=>a.datasetIndex===t?i:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),co.remove(this),t=0,n=this.data.datasets.length;t{n.addEventListener(this,o,s),t[o]=s},i=(o,s,a)=>{o.offsetX=s,o.offsetY=a,this._eventHandler(o)};vt(this.options.events,o=>r(o,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,r=(l,c)=>{n.addEventListener(this,l,c),t[l]=c},i=(l,c)=>{t[l]&&(n.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)};let s;const a=()=>{i("attach",a),this.attached=!0,this.resize(),r("resize",o),r("detach",s)};s=()=>{this.attached=!1,i("resize",o),this._stop(),this._resize(0,0),r("attach",a)},n.isAttached(this.canvas)?a():s()}unbindEvents(){vt(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},vt(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,r){const i=r?"set":"remove";let o,s,a,l;for(n==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+i+"DatasetHoverStyle"]()),a=0,l=t.length;a{const a=this.getDatasetMeta(o);if(!a)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:a.data[s],index:s}});!ig(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(t,n,r){return this._plugins.notify(this,t,n,r)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,r){const i=this.options.hover,o=(l,c)=>l.filter(f=>!c.some(h=>f.datasetIndex===h.datasetIndex&&f.index===h.index)),s=o(n,t),a=r?t:o(t,n);s.length&&this.updateHoverStyle(s,i.mode,!1),a.length&&i.mode&&this.updateHoverStyle(a,i.mode,!0)}_eventHandler(t,n){const r={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},i=s=>(s.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,i)===!1)return;const o=this._handleEvent(t,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,i),(o||r.changed)&&this.render(),this}_handleEvent(t,n,r){const{_active:i=[],options:o}=this,s=n,a=this._getActiveElements(t,i,r,s),l=u7(t),c=ez(t,this._lastEvent,r,l);r&&(this._lastEvent=null,Ct(o.onHover,[t,a,this],this),l&&Ct(o.onClick,[t,a,this],this));const f=!ig(a,i);return(f||n)&&(this._active=a,this._updateHoverStyles(a,i,n)),this._lastEvent=c,f}_getActiveElements(t,n,r,i){if(t.type==="mouseout")return[];if(!r)return n;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,i)}},xe(Ko,"defaults",nn),xe(Ko,"instances",qp),xe(Ko,"overrides",Ha),xe(Ko,"registry",$i),xe(Ko,"version",K9),xe(Ko,"getChart",nP),Ko);function rP(){return vt(fy.instances,e=>e._plugins.invalidate())}function nz(e,t,n){const{startAngle:r,pixelMargin:i,x:o,y:s,outerRadius:a,innerRadius:l}=t;let c=i/a;e.beginPath(),e.arc(o,s,a,r-c,n+c),l>i?(c=i/l,e.arc(o,s,l,n+c,r-c,!0)):e.arc(o,s,i,n+Zt,r-Zt),e.closePath(),e.clip()}function rz(e){return j2(e,["outerStart","outerEnd","innerStart","innerEnd"])}function iz(e,t,n,r){const i=rz(e.options.borderRadius),o=(n-t)/2,s=Math.min(o,r*t/2),a=l=>{const c=(n-Math.min(o,l))*r/2;return En(l,0,Math.min(o,c))};return{outerStart:a(i.outerStart),outerEnd:a(i.outerEnd),innerStart:En(i.innerStart,0,s),innerEnd:En(i.innerEnd,0,s)}}function Tl(e,t,n,r){return{x:n+e*Math.cos(t),y:r+e*Math.sin(t)}}function fg(e,t,n,r,i,o){const{x:s,y:a,startAngle:l,pixelMargin:c,innerRadius:f}=t,h=Math.max(t.outerRadius+r+n-c,0),p=f>0?f+r+n+c:0;let m=0;const v=i-l;if(r){const ee=f>0?f-r:0,ie=h>0?h-r:0,oe=(ee+ie)/2,G=oe!==0?v*oe/(oe+r):v;m=(v-G)/2}const y=Math.max(.001,v*h-n/Ft)/h,x=(v-y)/2,_=l+x+m,w=i-x-m,{outerStart:S,outerEnd:T,innerStart:P,innerEnd:k}=iz(t,p,h,w-_),N=h-S,D=h-T,z=_+S/N,A=w-T/D,W=p+P,Y=p+k,J=_+P/W,Z=w-k/Y;if(e.beginPath(),o){const ee=(z+A)/2;if(e.arc(s,a,h,z,ee),e.arc(s,a,h,ee,A),T>0){const F=Tl(D,A,s,a);e.arc(F.x,F.y,T,A,w+Zt)}const ie=Tl(Y,w,s,a);if(e.lineTo(ie.x,ie.y),k>0){const F=Tl(Y,Z,s,a);e.arc(F.x,F.y,k,w+Zt,Z+Math.PI)}const oe=(w-k/p+(_+P/p))/2;if(e.arc(s,a,p,w-k/p,oe,!0),e.arc(s,a,p,oe,_+P/p,!0),P>0){const F=Tl(W,J,s,a);e.arc(F.x,F.y,P,J+Math.PI,_-Zt)}const G=Tl(N,_,s,a);if(e.lineTo(G.x,G.y),S>0){const F=Tl(N,z,s,a);e.arc(F.x,F.y,S,_-Zt,z)}}else{e.moveTo(s,a);const ee=Math.cos(z)*h+s,ie=Math.sin(z)*h+a;e.lineTo(ee,ie);const oe=Math.cos(A)*h+s,G=Math.sin(A)*h+a;e.lineTo(oe,G)}e.closePath()}function oz(e,t,n,r,i){const{fullCircles:o,startAngle:s,circumference:a}=t;let l=t.endAngle;if(o){fg(e,t,n,r,l,i);for(let c=0;c=Mt||If(o,a,l),y=yo(s,c+p,f+p);return v&&y}getCenterPoint(t){const{x:n,y:r,startAngle:i,endAngle:o,innerRadius:s,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:l,spacing:c}=this.options,f=(i+o)/2,h=(s+a+c+l)/2;return{x:n+Math.cos(f)*h,y:r+Math.sin(f)*h}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:n,circumference:r}=this,i=(n.offset||0)/4,o=(n.spacing||0)/2,s=n.circular;if(this.pixelMargin=n.borderAlign==="inner"?.33:0,this.fullCircles=r>Mt?Math.floor(r/Mt):0,r===0||this.innerRadius<0||this.outerRadius<0)return;t.save();const a=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(a)*i,Math.sin(a)*i);const l=1-Math.sin(Math.min(Ft,r||0)),c=i*l;t.fillStyle=n.backgroundColor,t.strokeStyle=n.borderColor,oz(t,this,c,o,s),sz(t,this,c,o,s),t.restore()}}xe(Gp,"id","arc"),xe(Gp,"defaults",{borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),xe(Gp,"defaultRoutes",{backgroundColor:"backgroundColor"});function OD(e,t,n=t){e.lineCap=Ke(n.borderCapStyle,t.borderCapStyle),e.setLineDash(Ke(n.borderDash,t.borderDash)),e.lineDashOffset=Ke(n.borderDashOffset,t.borderDashOffset),e.lineJoin=Ke(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=Ke(n.borderWidth,t.borderWidth),e.strokeStyle=Ke(n.borderColor,t.borderColor)}function az(e,t,n){e.lineTo(n.x,n.y)}function lz(e){return e.stepped?N7:e.tension||e.cubicInterpolationMode==="monotone"?L7:az}function PD(e,t,n={}){const r=e.length,{start:i=0,end:o=r-1}=n,{start:s,end:a}=t,l=Math.max(i,s),c=Math.min(o,a),f=ia&&o>a;return{count:r,start:l,loop:t.loop,ilen:c(s+(c?a-T:T))%o,S=()=>{y!==x&&(e.lineTo(f,x),e.lineTo(f,y),e.lineTo(f,_))};for(l&&(m=i[w(0)],e.moveTo(m.x,m.y)),p=0;p<=a;++p){if(m=i[w(p)],m.skip)continue;const T=m.x,P=m.y,k=T|0;k===v?(Px&&(x=P),f=(h*f+T)/++h):(S(),e.lineTo(T,P),v=k,h=0,y=x=P),_=P}S()}function tb(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?uz:cz}function fz(e){return e.stepped?fB:e.tension||e.cubicInterpolationMode==="monotone"?dB:wa}function dz(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),OD(e,t.options),e.stroke(i)}function hz(e,t,n,r){const{segments:i,options:o}=t,s=tb(t);for(const a of i)OD(e,o,a.style),e.beginPath(),s(e,t,a,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}const pz=typeof Path2D=="function";function mz(e,t,n,r){pz&&!t.options.segment?dz(e,t,n,r):hz(e,t,n,r)}class cs extends Ao{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,n){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const i=r.spanGaps?this._loop:this._fullLoop;rB(this._points,r,t,i,n),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=yB(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,r=t.length;return r&&n[t[r-1].end]}interpolate(t,n){const r=this.options,i=t[n],o=this.points,s=pD(this,{property:n,start:i,end:i});if(!s.length)return;const a=[],l=fz(r);let c,f;for(c=0,f=s.length;ct!=="borderDash"&&t!=="fill"});function iP(e,t,n,r){const i=e.options,{[n]:o}=e.getProps([n],r);return Math.abs(t-o)e.replace("rgb(","rgba(").replace(")",", 0.5)"));function MD(e){return nb[e%nb.length]}function RD(e){return oP[e%oP.length]}function xz(e,t){return e.borderColor=MD(t),e.backgroundColor=RD(t),++t}function Sz(e,t){return e.backgroundColor=e.data.map(()=>MD(t++)),t}function Cz(e,t){return e.backgroundColor=e.data.map(()=>RD(t++)),t}function Ez(e){let t=0;return(n,r)=>{const i=e.getDatasetMeta(r).controller;i instanceof ls?t=Sz(n,t):i instanceof uf?t=Cz(n,t):i&&(t=xz(n,t))}}function sP(e){let t;for(t in e)if(e[t].borderColor||e[t].backgroundColor)return!0;return!1}var Tz={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,t,n){if(!n.enabled)return;const{options:{elements:r},data:{datasets:i}}=e.config;if(!n.forceOverride&&(sP(i)||r&&sP(r)))return;const o=Ez(e);i.forEach(o)}};function Oz(e,t,n,r,i){const o=i.samples||r;if(o>=n)return e.slice(t,t+n);const s=[],a=(n-2)/(o-2);let l=0;const c=t+n-1;let f=t,h,p,m,v,y;for(s[l++]=e[f],h=0;hm&&(m=v,p=e[w],y=w);s[l++]=p,f=y}return s[l++]=e[c],s}function Pz(e,t,n,r){let i=0,o=0,s,a,l,c,f,h,p,m,v,y;const x=[],_=t+n-1,w=e[t].x,T=e[_].x-w;for(s=t;sy&&(y=c,p=s),i=(o*i+a.x)/++o;else{const k=s-1;if(!ct(h)&&!ct(p)){const N=Math.min(h,p),D=Math.max(h,p);N!==m&&N!==k&&x.push({...e[N],x:i}),D!==m&&D!==k&&x.push({...e[D],x:i})}s>0&&k!==m&&x.push(e[k]),x.push(a),f=P,o=0,v=y=c,h=p=m=s}}return x}function ND(e){if(e._decimated){const t=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{value:t})}}function aP(e){e.data.datasets.forEach(t=>{ND(t)})}function kz(e,t){const n=t.length;let r=0,i;const{iScale:o}=e,{min:s,max:a,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(r=En(_o(t,o.axis,s).lo,0,n-1)),c?i=En(_o(t,o.axis,a).hi+1,r,n)-r:i=n-r,{start:r,count:i}}var Mz={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,t,n)=>{if(!n.enabled){aP(e);return}const r=e.width;e.data.datasets.forEach((i,o)=>{const{_data:s,indexAxis:a}=i,l=e.getDatasetMeta(o),c=s||i.data;if(Uu([a,e.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const f=e.scales[l.xAxisID];if(f.type!=="linear"&&f.type!=="time"||e.options.parsing)return;let{start:h,count:p}=kz(l,c);const m=n.threshold||4*r;if(p<=m){ND(i);return}ct(s)&&(i._data=c,delete i.data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(y){this._data=y}}));let v;switch(n.algorithm){case"lttb":v=Oz(c,h,p,r,n);break;case"min-max":v=Pz(c,h,p,r);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}i._decimated=v})},destroy(e){aP(e)}};function Rz(e,t,n){const r=e.segments,i=e.points,o=t.points,s=[];for(const a of r){let{start:l,end:c}=a;c=U2(l,c,i);const f=rb(n,i[l],i[c],a.loop);if(!t.segments){s.push({source:a,target:f,start:i[l],end:i[c]});continue}const h=pD(t,f);for(const p of h){const m=rb(n,o[p.start],o[p.end],p.loop),v=hD(a,i,m);for(const y of v)s.push({source:y,target:p,start:{[n]:lP(f,m,"start",Math.max)},end:{[n]:lP(f,m,"end",Math.min)}})}}return s}function rb(e,t,n,r){if(r)return;let i=t[e],o=n[e];return e==="angle"&&(i=Pr(i),o=Pr(o)),{property:e,start:i,end:o}}function Nz(e,t){const{x:n=null,y:r=null}=e||{},i=t.points,o=[];return t.segments.forEach(({start:s,end:a})=>{a=U2(s,a,i);const l=i[s],c=i[a];r!==null?(o.push({x:l.x,y:r}),o.push({x:c.x,y:r})):n!==null&&(o.push({x:n,y:l.y}),o.push({x:n,y:c.y}))}),o}function U2(e,t,n){for(;t>e;t--){const r=n[t];if(!isNaN(r.x)&&!isNaN(r.y))break}return t}function lP(e,t,n,r){return e&&t?r(e[n],t[n]):e?e[n]:t?t[n]:0}function LD(e,t){let n=[],r=!1;return kt(e)?(r=!0,n=e):n=Nz(e,t),n.length?new cs({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function cP(e){return e&&e.fill!==!1}function Lz(e,t,n){let i=e[t].fill;const o=[t];let s;if(!n)return i;for(;i!==!1&&o.indexOf(i)===-1;){if(!Gt(i))return i;if(s=e[i],!s)return!1;if(s.visible)return i;o.push(i),i=s.fill}return!1}function Dz(e,t,n){const r=Fz(e);if(rt(r))return isNaN(r.value)?!1:r;let i=parseFloat(r);return Gt(i)&&Math.floor(i)===i?Az(r[0],t,i,n):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function Az(e,t,n,r){return(e==="-"||e==="+")&&(n=t+n),n===t||n<0||n>=r?!1:n}function jz(e,t){let n=null;return e==="start"?n=t.bottom:e==="end"?n=t.top:rt(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}function Iz(e,t,n){let r;return e==="start"?r=n:e==="end"?r=t.options.reverse?t.min:t.max:rt(e)?r=e.value:r=t.getBaseValue(),r}function Fz(e){const t=e.options,n=t.fill;let r=Ke(n&&n.target,n);return r===void 0&&(r=!!t.backgroundColor),r===!1||r===null?!1:r===!0?"origin":r}function $z(e){const{scale:t,index:n,line:r}=e,i=[],o=r.segments,s=r.points,a=Bz(t,n);a.push(LD({x:null,y:t.bottom},r));for(let l=0;l=0;--s){const a=i[s].$filler;a&&(a.line.updateControlPoints(o,a.axis),r&&a.fill&&v0(e.ctx,a,o))}},beforeDatasetsDraw(e,t,n){if(n.drawTime!=="beforeDatasetsDraw")return;const r=e.getSortedVisibleDatasetMetas();for(let i=r.length-1;i>=0;--i){const o=r[i].$filler;cP(o)&&v0(e.ctx,o,e.chartArea)}},beforeDatasetDraw(e,t,n){const r=t.meta.$filler;!cP(r)||n.drawTime!=="beforeDatasetDraw"||v0(e.ctx,r,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const hP=(e,t)=>{let{boxHeight:n=t,boxWidth:r=t}=e;return e.usePointStyle&&(n=Math.min(n,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(t,n)}},Xz=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class pP extends Ao{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n,r){this.maxWidth=t,this.maxHeight=n,this._margins=r,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let n=Ct(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(r=>t.filter(r,this.chart.data))),t.sort&&(n=n.sort((r,i)=>t.sort(r,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const r=t.labels,i=gn(r.font),o=i.size,s=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=hP(r,o);let c,f;n.font=i.string,this.isHorizontal()?(c=this.maxWidth,f=this._fitRows(s,o,a,l)+10):(f=this.maxHeight,c=this._fitCols(s,i,a,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(f,t.maxHeight||this.maxHeight)}_fitRows(t,n,r,i){const{ctx:o,maxWidth:s,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],f=i+a;let h=t;o.textAlign="left",o.textBaseline="middle";let p=-1,m=-f;return this.legendItems.forEach((v,y)=>{const x=r+n/2+o.measureText(v.text).width;(y===0||c[c.length-1]+x+2*a>s)&&(h+=f,c[c.length-(y>0?0:1)]=0,m+=f,p++),l[y]={left:0,top:m,row:p,width:x,height:i},c[c.length-1]+=x+a}),h}_fitCols(t,n,r,i){const{ctx:o,maxHeight:s,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],f=s-t;let h=a,p=0,m=0,v=0,y=0;return this.legendItems.forEach((x,_)=>{const{itemWidth:w,itemHeight:S}=Qz(r,n,o,x,i);_>0&&m+S+2*a>f&&(h+=p+a,c.push({width:p,height:m}),v+=p+a,y++,p=m=0),l[_]={left:v,top:m,col:y,width:w,height:S},p=Math.max(p,w),m+=S+a}),h+=p,c.push({width:p,height:m}),h}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:i},rtl:o}}=this,s=ic(o,this.left,this.width);if(this.isHorizontal()){let a=0,l=Kn(r,this.left+i,this.right-this.lineWidths[a]);for(const c of n)a!==c.row&&(a=c.row,l=Kn(r,this.left+i,this.right-this.lineWidths[a])),c.top+=this.top+t+i,c.left=s.leftForLtr(s.x(l),c.width),l+=c.width+i}else{let a=0,l=Kn(r,this.top+t+i,this.bottom-this.columnSizes[a].height);for(const c of n)c.col!==a&&(a=c.col,l=Kn(r,this.top+t+i,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+i,c.left=s.leftForLtr(s.x(c.left),c.width),l+=c.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;ly(t,this),this._draw(),cy(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:r,ctx:i}=this,{align:o,labels:s}=t,a=nn.color,l=ic(t.rtl,this.left,this.width),c=gn(s.font),{padding:f}=s,h=c.size,p=h/2;let m;this.drawTitle(),i.textAlign=l.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=c.string;const{boxWidth:v,boxHeight:y,itemHeight:x}=hP(s,h),_=function(k,N,D){if(isNaN(v)||v<=0||isNaN(y)||y<0)return;i.save();const z=Ke(D.lineWidth,1);if(i.fillStyle=Ke(D.fillStyle,a),i.lineCap=Ke(D.lineCap,"butt"),i.lineDashOffset=Ke(D.lineDashOffset,0),i.lineJoin=Ke(D.lineJoin,"miter"),i.lineWidth=z,i.strokeStyle=Ke(D.strokeStyle,a),i.setLineDash(Ke(D.lineDash,[])),s.usePointStyle){const A={radius:y*Math.SQRT2/2,pointStyle:D.pointStyle,rotation:D.rotation,borderWidth:z},W=l.xPlus(k,v/2),Y=N+p;tD(i,A,W,Y,s.pointStyleWidth&&v)}else{const A=N+Math.max((h-y)/2,0),W=l.leftForLtr(k,v),Y=Aa(D.borderRadius);i.beginPath(),Object.values(Y).some(J=>J!==0)?$f(i,{x:W,y:A,w:v,h:y,radius:Y}):i.rect(W,A,v,y),i.fill(),z!==0&&i.stroke()}i.restore()},w=function(k,N,D){Wa(i,D.text,k,N+x/2,c,{strikethrough:D.hidden,textAlign:l.textAlign(D.textAlign)})},S=this.isHorizontal(),T=this._computeTitleHeight();S?m={x:Kn(o,this.left+f,this.right-r[0]),y:this.top+f+T,line:0}:m={x:this.left+f,y:Kn(o,this.top+T+f,this.bottom-n[0].height),line:0},uD(this.ctx,t.textDirection);const P=x+f;this.legendItems.forEach((k,N)=>{i.strokeStyle=k.fontColor,i.fillStyle=k.fontColor;const D=i.measureText(k.text).width,z=l.textAlign(k.textAlign||(k.textAlign=s.textAlign)),A=v+p+D;let W=m.x,Y=m.y;l.setWidth(this.width),S?N>0&&W+A+f>this.right&&(Y=m.y+=P,m.line++,W=m.x=Kn(o,this.left+f,this.right-r[m.line])):N>0&&Y+P>this.bottom&&(W=m.x=W+n[m.line].width+f,m.line++,Y=m.y=Kn(o,this.top+T+f,this.bottom-n[m.line].height));const J=l.x(W);if(_(J,Y,k),W=w7(z,W+v+p,S?W+A:this.right,t.rtl),w(l.x(W),Y,k),S)m.x+=A+f;else if(typeof k.text!="string"){const Z=c.lineHeight;m.y+=AD(k,Z)}else m.y+=P}),fD(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,r=gn(n.font),i=er(n.padding);if(!n.display)return;const o=ic(t.rtl,this.left,this.width),s=this.ctx,a=n.position,l=r.size/2,c=i.top+l;let f,h=this.left,p=this.width;if(this.isHorizontal())p=Math.max(...this.lineWidths),f=this.top+c,h=Kn(t.align,h,this.right-p);else{const v=this.columnSizes.reduce((y,x)=>Math.max(y,x.height),0);f=c+Kn(t.align,this.top,this.bottom-v-t.labels.padding-this._computeTitleHeight())}const m=Kn(a,h,h+p);s.textAlign=o.textAlign(A2(a)),s.textBaseline="middle",s.strokeStyle=n.color,s.fillStyle=n.color,s.font=r.string,Wa(s,n.text,m,f,r)}_computeTitleHeight(){const t=this.options.title,n=gn(t.font),r=er(t.padding);return t.display?n.lineHeight+r.height:0}_getLegendItemAt(t,n){let r,i,o;if(yo(t,this.left,this.right)&&yo(n,this.top,this.bottom)){for(o=this.legendHitBoxes,r=0;ro.length>s.length?o:s)),t+n.size/2+r.measureText(i).width}function eU(e,t,n){let r=e;return typeof t.text!="string"&&(r=AD(t,n)),r}function AD(e,t){const n=e.text?e.text.length+.5:0;return t*n}function tU(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var nU={id:"legend",_element:pP,start(e,t,n){const r=e.legend=new pP({ctx:e.ctx,options:n,chart:e});Jn.configure(e,r,n),Jn.addBox(e,r)},stop(e){Jn.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;Jn.configure(e,r,n),r.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const r=t.datasetIndex,i=n.chart;i.isDatasetVisible(r)?(i.hide(r),t.hidden=!0):(i.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:i,color:o,useBorderRadius:s,borderRadius:a}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(n?0:void 0),f=er(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(f.width+f.height)/4,strokeStyle:c.borderColor,pointStyle:r||c.pointStyle,rotation:c.rotation,textAlign:i||c.textAlign,borderRadius:s&&(a||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class V2 extends Ao{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n){const r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=n;const i=kt(r.text)?r.text.length:1;this._padding=er(r.padding);const o=i*gn(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:n,left:r,bottom:i,right:o,options:s}=this,a=s.align;let l=0,c,f,h;return this.isHorizontal()?(f=Kn(a,r,o),h=n+t,c=o-r):(s.position==="left"?(f=r+t,h=Kn(a,i,n),l=Ft*-.5):(f=o-t,h=Kn(a,n,i),l=Ft*.5),c=i-n),{titleX:f,titleY:h,maxWidth:c,rotation:l}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const r=gn(n.font),o=r.lineHeight/2+this._padding.top,{titleX:s,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(o);Wa(t,n.text,0,0,r,{color:n.color,maxWidth:l,rotation:c,textAlign:A2(n.align),textBaseline:"middle",translation:[s,a]})}}function rU(e,t){const n=new V2({ctx:e.ctx,options:t,chart:e});Jn.configure(e,n,t),Jn.addBox(e,n),e.titleBlock=n}var iU={id:"title",_element:V2,start(e,t,n){rU(e,n)},stop(e){const t=e.titleBlock;Jn.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const r=e.titleBlock;Jn.configure(e,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Gh=new WeakMap;var oU={id:"subtitle",start(e,t,n){const r=new V2({ctx:e.ctx,options:n,chart:e});Jn.configure(e,r,n),Jn.addBox(e,r),Gh.set(e,r)},stop(e){Jn.removeBox(e,Gh.get(e)),Gh.delete(e)},beforeUpdate(e,t,n){const r=Gh.get(e);Jn.configure(e,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Hu={average(e){if(!e.length)return!1;let t,n,r=0,i=0,o=0;for(t=0,n=e.length;ta({chart:t,initial:n.initial,numSteps:s,currentStep:Math.min(r-n.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=WL.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((r,i)=>{if(!r.running||!r.items.length)return;const o=r.items;let s=o.length-1,a=!1,l;for(;s>=0;--s)l=o[s],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(t),a=!0):(o[s]=o[o.length-1],o.pop());a&&(i.draw(),this._notify(i,r,t,"progress")),o.length||(r.running=!1,this._notify(i,r,t,"complete"),r.initial=!1),n+=o.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let r=n.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,r)),r}listen(t,n,r){this._getAnims(t).listeners[n].push(r)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,i)=>Math.max(r,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const r=n.items;let i=r.length-1;for(;i>=0;--i)r[i].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var uo=new TB;const PO="transparent",OB={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=yO(e||PO),i=r.valid&&yO(t||PO);return i&&i.valid?i.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class PB{constructor(t,n,r,i){const o=n[r];i=Bu([t.to,i,o,t.from]);const s=Bu([t.from,o,i]);this._active=!0,this._fn=t.fn||OB[t.type||typeof s],this._easing=rf[t.easing]||rf.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=r,this._from=s,this._to=i,this._promises=void 0}active(){return this._active}update(t,n,r){if(this._active){this._notify(!1);const i=this._target[this._prop],o=r-this._start,s=this._duration-o;this._start=r,this._duration=Math.floor(Math.max(s,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=Bu([t.to,n,i,t.from]),this._from=Bu([t.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,r=this._duration,i=this._prop,o=this._from,s=this._loop,a=this._to;let l;if(this._active=o!==a&&(s||n1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(o,a,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,r)=>{t.push({res:n,rej:r})})}_notify(t){const n=t?"res":"rej",r=this._promises||[];for(let i=0;i{const o=t[i];if(!rt(o))return;const s={};for(const a of n)s[a]=o[a];(kt(o.properties)&&o.properties||[i]).forEach(a=>{(a===i||!r.has(a))&&r.set(a,s)})})}_animateOptions(t,n){const r=n.options,i=MB(t,r);if(!i)return[];const o=this._createAnimations(i,r);return r.$shared&&kB(t.options.$animations,r).then(()=>{t.options=r},()=>{}),o}_createAnimations(t,n){const r=this._properties,i=[],o=t.$animations||(t.$animations={}),s=Object.keys(n),a=Date.now();let l;for(l=s.length-1;l>=0;--l){const c=s[l];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(t,n));continue}const f=n[c];let h=o[c];const p=r.get(c);if(h)if(p&&h.active()){h.update(p,f,a);continue}else h.cancel();if(!p||!p.duration){t[c]=f;continue}o[c]=h=new PB(p,t,c,f),i.push(h)}return i}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const r=this._createAnimations(t,n);if(r.length)return uo.add(this._chart,r),!0}}function kB(e,t){const n=[],r=Object.keys(t);for(let i=0;i0||!n&&o<0)return i.index}return null}function LO(e,t){const{chart:n,_cachedMeta:r}=e,i=n._stacks||(n._stacks={}),{iScale:o,vScale:s,index:a}=r,l=o.axis,c=s.axis,f=DB(o,s,r),h=t.length;let p;for(let m=0;mn[r].axis===t).shift()}function IB(e,t){return qs(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function FB(e,t,n){return qs(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function _u(e,t){const n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t=t||e._parsed;for(const i of t){const o=i._stacks;if(!o||o[r]===void 0||o[r][n]===void 0)return;delete o[r][n],o[r]._visualValues!==void 0&&o[r]._visualValues[n]!==void 0&&delete o[r]._visualValues[n]}}}const a0=e=>e==="reset"||e==="none",DO=(e,t)=>t?e:Object.assign({},e),$B=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:dD(n,!0),values:null};class wi{constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=RO(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&_u(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(h,p,m,v)=>h==="x"?p:h==="r"?v:m,o=n.xAxisID=Ke(r.xAxisID,s0(t,"x")),s=n.yAxisID=Ke(r.yAxisID,s0(t,"y")),a=n.rAxisID=Ke(r.rAxisID,s0(t,"r")),l=n.indexAxis,c=n.iAxisID=i(l,o,s,a),f=n.vAxisID=i(l,s,o,a);n.xScale=this.getScaleForId(o),n.yScale=this.getScaleForId(s),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(f)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&mO(this._data,this),t._stacked&&_u(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(rt(n))this._data=LB(n);else if(r!==n){if(r){mO(r,this);const i=this._cachedMeta;_u(i),i._parsed=[]}n&&Object.isExtensible(n)&&C7(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,r=this.getDataset();let i=!1;this._dataCheck();const o=n._stacked;n._stacked=RO(n.vScale,n),n.stack!==r.stack&&(i=!0,_u(n),n.stack=r.stack),this._resyncElements(t),(i||o!==n._stacked)&&LO(this,n._parsed)}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:r,_data:i}=this,{iScale:o,_stacked:s}=r,a=o.axis;let l=t===0&&n===i.length?!0:r._sorted,c=t>0&&r._parsed[t-1],f,h,p;if(this._parsing===!1)r._parsed=i,r._sorted=!0,p=i;else{kt(i[t])?p=this.parseArrayData(r,i,t,n):rt(i[t])?p=this.parseObjectData(r,i,t,n):p=this.parsePrimitiveData(r,i,t,n);const m=()=>h[a]===null||c&&h[a]y||h=0;--p)if(!v()){this.updateRangeFromParsed(c,t,m,l);break}}return c}getAllParsedValues(t){const n=this._cachedMeta._parsed,r=[];let i,o,s;for(i=0,o=n.length;i=0&&tthis.getContext(r,i,n),y=c.resolveNamedOptions(p,m,v,h);return y.$shared&&(y.$shared=l,o[s]=Object.freeze(DO(y,l))),y}_resolveAnimations(t,n,r){const i=this.chart,o=this._cachedDataOpts,s=`animation-${n}`,a=o[s];if(a)return a;let l;if(i.options.animation!==!1){const f=this.chart.config,h=f.datasetAnimationScopeKeys(this._type,n),p=f.getOptionScopes(this.getDataset(),h);l=f.createResolver(p,this.getContext(t,r,n))}const c=new fD(i,l&&l.animations);return l&&l._cacheable&&(o[s]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||a0(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const r=this.resolveDataElementOptions(t,n),i=this._sharedOptions,o=this.getSharedOptions(r),s=this.includeOptions(n,o)||o!==i;return this.updateSharedOptions(o,n,r),{sharedOptions:o,includeOptions:s}}updateElement(t,n,r,i){a0(i)?Object.assign(t,r):this._resolveAnimations(n,i).update(t,r)}updateSharedOptions(t,n,r){t&&!a0(n)&&this._resolveAnimations(void 0,n).update(t,r)}_setStyle(t,n,r,i){t.active=i;const o=this.getStyle(n,i);this._resolveAnimations(n,r,i).update(t,{options:!i&&this.getSharedOptions(o)||o})}removeHoverStyle(t,n,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,n,r){this._setStyle(t,r,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,r=this._cachedMeta.data;for(const[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];const i=r.length,o=n.length,s=Math.min(o,i);s&&this.parse(0,s),o>i?this._insertElements(i,o-i,t):o{for(c.length+=n,a=c.length-1;a>=s;a--)c[a]=c[a-n]};for(l(o),a=t;ai-o))}return e._cache.$bar}function zB(e){const t=e.iScale,n=BB(t,e.type);let r=t._length,i,o,s,a;const l=()=>{s===32767||s===-32768||(Qr(a)&&(r=Math.min(r,Math.abs(s-a)||r)),a=s)};for(i=0,o=n.length;i0?i[e-1]:null,a=eMath.abs(a)&&(l=a,c=s),t[n.axis]=c,t._custom={barStart:l,barEnd:c,start:i,end:o,min:s,max:a}}function hD(e,t,n,r){return kt(e)?HB(e,t,n,r):t[n.axis]=n.parse(e,r),t}function AO(e,t,n,r){const i=e.iScale,o=e.vScale,s=i.getLabels(),a=i===o,l=[];let c,f,h,p;for(c=n,f=n+r;c=n?1:-1)}function YB(e){let t,n,r,i,o;return e.horizontal?(t=e.base>e.x,n="left",r="right"):(t=e.basel.controller.options.grouped),o=r.options.stacked,s=[],a=l=>{const c=l.controller.getParsed(n),f=c&&c[l.vScale.axis];if(ct(f)||isNaN(f))return!0};for(const l of i)if(!(n!==void 0&&a(l))&&((o===!1||s.indexOf(l.stack)===-1||o===void 0&&l.stack===void 0)&&s.push(l.stack),l.index===t))break;return s.length||s.push(void 0),s}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,n,r){const i=this._getStacks(t,r),o=n!==void 0?i.indexOf(n):-1;return o===-1?i.length-1:o}_getRuler(){const t=this.options,n=this._cachedMeta,r=n.iScale,i=[];let o,s;for(o=0,s=n.data.length;o=0;--r)n=Math.max(n,t[r].size(this.resolveDataElementOptions(r))/2);return n>0&&n}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart.data.labels||[],{xScale:i,yScale:o}=n,s=this.getParsed(t),a=i.getLabelForValue(s.x),l=o.getLabelForValue(s.y),c=s._custom;return{label:r[t]||"",value:"("+a+", "+l+(c?", "+c:"")+")"}}update(t){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,t)}updateElements(t,n,r,i){const o=i==="reset",{iScale:s,vScale:a}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(n,i),f=s.axis,h=a.axis;for(let p=n;pAf(S,a,l,!0)?1:Math.max(T,T*n,P,P*n),v=(S,T,P)=>Af(S,a,l,!0)?-1:Math.min(T,T*n,P,P*n),y=m(0,c,h),x=m(Gt,f,p),_=v(It,c,h),w=v(It+Gt,f,p);r=(y-_)/2,i=(x-w)/2,o=-(y+_)/2,s=-(x+w)/2}return{ratioX:r,ratioY:i,offsetX:o,offsetY:s}}class us extends wi{constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){const r=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=r;else{let o=l=>+r[l];if(rt(r[t])){const{key:l="value"}=this._parsing;o=c=>+As(r[c],l)}let s,a;for(s=t,a=t+n;s0&&!isNaN(t)?Mt*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],o=Rd(n._parsed[t],r.options.locale);return{label:i[t]||"",value:o}}getMaxBorderWidth(t){let n=0;const r=this.chart;let i,o,s,a,l;if(!t){for(i=0,o=r.data.datasets.length;it!=="spacing",_indexable:t=>t!=="spacing"}),xe(us,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:i}}=t.legend.options;return n.labels.map((o,s)=>{const l=t.getDatasetMeta(0).controller.getStyle(s);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}}});class af extends wi{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:r,data:i=[],_dataset:o}=n,s=this.chart._animationsDisabled;let{start:a,count:l}=qL(n,i,s);this._drawStart=a,this._drawCount=l,GL(n)&&(a=0,l=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!o._decimated,r.points=i;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(r,void 0,{animated:!s,options:c},t),this.updateElements(i,a,l,t)}updateElements(t,n,r,i){const o=i==="reset",{iScale:s,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:f,includeOptions:h}=this._getSharedOptions(n,i),p=s.axis,m=a.axis,{spanGaps:v,segment:y}=this.options,x=yc(v)?v:Number.POSITIVE_INFINITY,_=this.chart._animationsDisabled||o||i==="none",w=n+r,S=t.length;let T=n>0&&this.getParsed(n-1);for(let P=0;P=w){N.skip=!0;continue}const D=this.getParsed(P),z=ct(D[m]),A=N[p]=s.getPixelForValue(D[p],P),W=N[m]=o||z?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,D,l):D[m],P);N.skip=isNaN(A)||isNaN(W)||z,N.stop=P>0&&Math.abs(D[p]-T[p])>x,y&&(N.parsed=D,N.raw=c.data[P]),h&&(N.options=f||this.resolveDataElementOptions(P,k.active?"active":i)),_||this.updateElement(k,P,N,i),T=D}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,r=n.options&&n.options.borderWidth||0,i=t.data||[];if(!i.length)return r;const o=i[0].size(this.resolveDataElementOptions(0)),s=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,o,s)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}xe(af,"id","line"),xe(af,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),xe(af,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class lf extends wi{constructor(t,n){super(t,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],o=Rd(n._parsed[t].r,r.options.locale);return{label:i[t]||"",value:o}}parseObjectData(t,n,r,i){return rD.bind(this)(t,n,r,i)}update(t){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,t)}getMinMax(){const t=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((r,i)=>{const o=this.getParsed(i).r;!isNaN(o)&&this.chart.getDataVisibility(i)&&(on.max&&(n.max=o))}),n}_updateRadius(){const t=this.chart,n=t.chartArea,r=t.options,i=Math.min(n.right-n.left,n.bottom-n.top),o=Math.max(i/2,0),s=Math.max(r.cutoutPercentage?o/100*r.cutoutPercentage:1,0),a=(o-s)/t.getVisibleDatasetCount();this.outerRadius=o-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(t,n,r,i){const o=i==="reset",s=this.chart,l=s.options.animation,c=this._cachedMeta.rScale,f=c.xCenter,h=c.yCenter,p=c.getIndexAngle(0)-.5*It;let m=p,v;const y=360/this.countVisibleElements();for(v=0;v{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&n++}),n}_computeAngle(t,n,r){return this.chart.getDataVisibility(t)?yi(this.resolveDataElementOptions(t,n).angle||r):0}}xe(lf,"id","polarArea"),xe(lf,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),xe(lf,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:i}}=t.legend.options;return n.labels.map((o,s)=>{const l=t.getDatasetMeta(0).controller.getStyle(s);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class K1 extends us{}xe(K1,"id","pie"),xe(K1,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class Wp extends wi{getLabelAndValue(t){const n=this._cachedMeta.vScale,r=this.getParsed(t);return{label:n.getLabels()[t],value:""+n.getLabelForValue(r[n.axis])}}parseObjectData(t,n,r,i){return rD.bind(this)(t,n,r,i)}update(t){const n=this._cachedMeta,r=n.dataset,i=n.data||[],o=n.iScale.getLabels();if(r.points=i,t!=="resize"){const s=this.resolveDatasetElementOptions(t);this.options.showLine||(s.borderWidth=0);const a={_loop:!0,_fullLoop:o.length===i.length,options:s};this.updateElement(r,void 0,a,t)}this.updateElements(i,0,i.length,t)}updateElements(t,n,r,i){const o=this._cachedMeta.rScale,s=i==="reset";for(let a=n;a0&&this.getParsed(n-1);for(let T=n;T0&&Math.abs(k[m]-S[m])>_,x&&(N.parsed=k,N.raw=c.data[T]),p&&(N.options=h||this.resolveDataElementOptions(T,P.active?"active":i)),w||this.updateElement(P,T,N,i),S=k}this.updateSharedOptions(h,i,f)}getMaxOverflow(){const t=this._cachedMeta,n=t.data||[];if(!this.options.showLine){let a=0;for(let l=n.length-1;l>=0;--l)a=Math.max(a,n[l].size(this.resolveDataElementOptions(l))/2);return a>0&&a}const r=t.dataset,i=r.options&&r.options.borderWidth||0;if(!n.length)return i;const o=n[0].size(this.resolveDataElementOptions(0)),s=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,o,s)/2}}xe(Yp,"id","scatter"),xe(Yp,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),xe(Yp,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var XB=Object.freeze({__proto__:null,BarController:sf,BubbleController:Hp,DoughnutController:us,LineController:af,PolarAreaController:lf,PieController:K1,RadarController:Wp,ScatterController:Yp});function pa(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class j2{static override(t){Object.assign(j2.prototype,t)}constructor(t){this.options=t||{}}init(){}formats(){return pa()}parse(){return pa()}format(){return pa()}add(){return pa()}diff(){return pa()}startOf(){return pa()}endOf(){return pa()}}var QB={_date:j2};function JB(e,t,n,r){const{controller:i,data:o,_sorted:s}=e,a=i._cachedMeta.iScale;if(a&&t===a.axis&&t!=="r"&&s&&o.length){const l=a._reversePixels?x7:bo;if(r){if(i._sharedOptions){const c=o[0],f=typeof c.getRange=="function"&&c.getRange(t);if(f){const h=l(o,t,n-f),p=l(o,t,n+f);return{lo:h.lo,hi:p.hi}}}}else return l(o,t,n)}return{lo:0,hi:o.length-1}}function Nd(e,t,n,r,i){const o=e.getSortedVisibleDatasetMetas(),s=n[t];for(let a=0,l=o.length;a{l[s](t[n],i)&&(o.push({element:l,datasetIndex:c,index:f}),a=a||l.inRange(t.x,t.y,i))}),r&&!a?[]:o}var r9={evaluateInteractionItems:Nd,modes:{index(e,t,n,r){const i=ba(t,e),o=n.axis||"x",s=n.includeInvisible||!1,a=n.intersect?c0(e,i,o,r,s):u0(e,i,o,!1,r,s),l=[];return a.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const f=a[0].index,h=c.data[f];h&&!h.skip&&l.push({element:h,datasetIndex:c.index,index:f})}),l):[]},dataset(e,t,n,r){const i=ba(t,e),o=n.axis||"xy",s=n.includeInvisible||!1;let a=n.intersect?c0(e,i,o,r,s):u0(e,i,o,!1,r,s);if(a.length>0){const l=a[0].datasetIndex,c=e.getDatasetMeta(l).data;a=[];for(let f=0;fn.pos===t)}function $O(e,t){return e.filter(n=>pD.indexOf(n.pos)===-1&&n.box.axis===t)}function wu(e,t){return e.sort((n,r)=>{const i=t?r:n,o=t?n:r;return i.weight===o.weight?i.index-o.index:i.weight-o.weight})}function i9(e){const t=[];let n,r,i,o,s,a;for(n=0,r=(e||[]).length;nc.box.fullSize),!0),r=wu(bu(t,"left"),!0),i=wu(bu(t,"right")),o=wu(bu(t,"top"),!0),s=wu(bu(t,"bottom")),a=$O(t,"x"),l=$O(t,"y");return{fullSize:n,leftAndTop:r.concat(o),rightAndBottom:i.concat(l).concat(s).concat(a),chartArea:bu(t,"chartArea"),vertical:r.concat(i).concat(l),horizontal:o.concat(s).concat(a)}}function BO(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function mD(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function l9(e,t,n,r){const{pos:i,box:o}=n,s=e.maxPadding;if(!rt(i)){n.size&&(e[i]-=n.size);const h=r[n.stack]||{size:0,count:1};h.size=Math.max(h.size,n.horizontal?o.height:o.width),n.size=h.size/h.count,e[i]+=n.size}o.getPadding&&mD(s,o.getPadding());const a=Math.max(0,t.outerWidth-BO(s,e,"left","right")),l=Math.max(0,t.outerHeight-BO(s,e,"top","bottom")),c=a!==e.w,f=l!==e.h;return e.w=a,e.h=l,n.horizontal?{same:c,other:f}:{same:f,other:c}}function c9(e){const t=e.maxPadding;function n(r){const i=Math.max(t[r]-e[r],0);return e[r]+=i,i}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function u9(e,t){const n=t.maxPadding;function r(i){const o={left:0,top:0,right:0,bottom:0};return i.forEach(s=>{o[s]=Math.max(t[s],n[s])}),o}return r(e?["left","right"]:["top","bottom"])}function zu(e,t,n,r){const i=[];let o,s,a,l,c,f;for(o=0,s=e.length,c=0;o{typeof y.beforeLayout=="function"&&y.beforeLayout()});const f=l.reduce((y,x)=>x.box.options&&x.box.options.display===!1?y:y+1,0)||1,h=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:o,availableHeight:s,vBoxMaxWidth:o/2/f,hBoxMaxHeight:s/2}),p=Object.assign({},i);mD(p,er(r));const m=Object.assign({maxPadding:p,w:o,h:s,x:i.left,y:i.top},i),v=s9(l.concat(c),h);zu(a.fullSize,m,h,v),zu(l,m,h,v),zu(c,m,h,v)&&zu(l,m,h,v),c9(m),zO(a.leftAndTop,m,h,v),m.x+=m.w,m.y+=m.h,zO(a.rightAndBottom,m,h,v),e.chartArea={left:m.left,top:m.top,right:m.left+m.w,bottom:m.top+m.h,height:m.h,width:m.w},vt(a.chartArea,y=>{const x=y.box;Object.assign(x,e.chartArea),x.update(m.w,m.h,{left:0,top:0,right:0,bottom:0})})}};class gD{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,r){}removeEventListener(t,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,r,i){return n=Math.max(0,n||t.width),r=r||t.height,{width:n,height:Math.max(0,i?Math.floor(n/i):r)}}isAttached(t){return!0}updateConfig(t){}}class f9 extends gD{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const qp="$chartjs",d9={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},UO=e=>e===null||e==="";function h9(e,t){const n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e[qp]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",UO(i)){const o=CO(e,"width");o!==void 0&&(e.width=o)}if(UO(r))if(e.style.height==="")e.height=e.width/(t||2);else{const o=CO(e,"height");o!==void 0&&(e.height=o)}return e}const vD=mB?{passive:!0}:!1;function p9(e,t,n){e.addEventListener(t,n,vD)}function m9(e,t,n){e.canvas.removeEventListener(t,n,vD)}function g9(e,t){const n=d9[e.type]||e.type,{x:r,y:i}=ba(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:i!==void 0?i:null}}function ug(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function v9(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let s=!1;for(const a of o)s=s||ug(a.addedNodes,r),s=s&&!ug(a.removedNodes,r);s&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function y9(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let s=!1;for(const a of o)s=s||ug(a.removedNodes,r),s=s&&!ug(a.addedNodes,r);s&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const Ff=new Map;let VO=0;function yD(){const e=window.devicePixelRatio;e!==VO&&(VO=e,Ff.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function _9(e,t){Ff.size||window.addEventListener("resize",yD),Ff.set(e,t)}function b9(e){Ff.delete(e),Ff.size||window.removeEventListener("resize",yD)}function w9(e,t,n){const r=e.canvas,i=r&&A2(r);if(!i)return;const o=YL((a,l)=>{const c=i.clientWidth;n(a,l),c{const l=a[0],c=l.contentRect.width,f=l.contentRect.height;c===0&&f===0||o(c,f)});return s.observe(i),_9(e,o),s}function f0(e,t,n){n&&n.disconnect(),t==="resize"&&b9(e)}function x9(e,t,n){const r=e.canvas,i=YL(o=>{e.ctx!==null&&n(g9(o,e))},e);return p9(r,t,i),i}class S9 extends gD{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(h9(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[qp])return!1;const r=n[qp].initial;["height","width"].forEach(o=>{const s=r[o];ct(s)?n.removeAttribute(o):n.setAttribute(o,s)});const i=r.style||{};return Object.keys(i).forEach(o=>{n.style[o]=i[o]}),n.width=n.width,delete n[qp],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),s={attach:v9,detach:y9,resize:w9}[n]||x9;i[n]=s(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),i=r[n];if(!i)return;({attach:f0,detach:f0,resize:f0}[n]||m9)(t,n,i),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,i){return pB(t,n,r,i)}isAttached(t){const n=A2(t);return!!(n&&n.isConnected)}}function C9(e){return!oD()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?f9:S9}var zp;let jo=(zp=class{constructor(){xe(this,"active",!1)}tooltipPosition(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}hasValue(){return yc(this.x)&&yc(this.y)}getProps(t,n){const r=this.$animations;if(!n||!r)return this;const i={};return t.forEach(o=>{i[o]=r[o]&&r[o].active()?r[o]._to:this[o]}),i}},xe(zp,"defaults",{}),xe(zp,"defaultRoutes"),zp);function E9(e,t){const n=e.options.ticks,r=T9(e),i=Math.min(n.maxTicksLimit||r,r),o=n.major.enabled?P9(t):[],s=o.length,a=o[0],l=o[s-1],c=[];if(s>i)return k9(t,c,o,s/i),c;const f=O9(o,t,i);if(s>0){let h,p;const m=s>1?Math.round((l-a)/(s-1)):null;for(Yh(t,c,f,ct(m)?0:a-m,a),h=0,p=s-1;hi)return l}return Math.max(i,1)}function P9(e){const t=[];let n,r;for(n=0,r=e.length;ne==="left"?"right":e==="right"?"left":e,HO=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n;function WO(e,t){const n=[],r=e.length/t,i=e.length;let o=0;for(;os+a)))return l}function L9(e,t){vt(e,n=>{const r=n.gc,i=r.length/2;let o;if(i>t){for(o=0;or?r:n,r=i&&n>r?n:r,{min:Tr(n,Tr(r,n)),max:Tr(r,Tr(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Ct(this.options.beforeUpdate,[this])}update(t,n,r){const{beginAtZero:i,grace:o,ticks:s}=this.options,a=s.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Y7(this,o,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a=o||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const f=this._getLabelSizes(),h=f.widest.width,p=f.highest.height,m=En(this.chart.width-h,0,this.maxWidth);a=t.offset?this.maxWidth/r:m/(r-1),h+6>a&&(a=m/(r-(t.offset?.5:1)),l=this.maxHeight-xu(t.grid)-n.padding-YO(t.title,this.chart.options.font),c=Math.sqrt(h*h+p*p),s=P2(Math.min(Math.asin(En((f.highest.height+6)/a,-1,1)),Math.asin(En(l/c,-1,1))-Math.asin(En(p/c,-1,1)))),s=Math.max(i,Math.min(o,s))),this.labelRotation=s}afterCalculateLabelRotation(){Ct(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Ct(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:r,title:i,grid:o}}=this,s=this._isVisible(),a=this.isHorizontal();if(s){const l=YO(i,n.options.font);if(a?(t.width=this.maxWidth,t.height=xu(o)+l):(t.height=this.maxHeight,t.width=xu(o)+l),r.display&&this.ticks.length){const{first:c,last:f,widest:h,highest:p}=this._getLabelSizes(),m=r.padding*2,v=yi(this.labelRotation),y=Math.cos(v),x=Math.sin(v);if(a){const _=r.mirror?0:x*h.width+y*p.height;t.height=Math.min(this.maxHeight,t.height+_+m)}else{const _=r.mirror?0:y*h.width+x*p.height;t.width=Math.min(this.maxWidth,t.width+_+m)}this._calculatePadding(c,f,x,y)}}this._handleMargins(),a?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,r,i){const{ticks:{align:o,padding:s},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const f=this.getPixelForTick(0)-this.left,h=this.right-this.getPixelForTick(this.ticks.length-1);let p=0,m=0;l?c?(p=i*t.width,m=r*n.height):(p=r*t.height,m=i*n.width):o==="start"?m=n.width:o==="end"?p=t.width:o!=="inner"&&(p=t.width/2,m=n.width/2),this.paddingLeft=Math.max((p-f+s)*this.width/(this.width-f),0),this.paddingRight=Math.max((m-h+s)*this.width/(this.width-h),0)}else{let f=n.height/2,h=t.height/2;o==="start"?(f=0,h=t.height):o==="end"&&(f=n.height,h=0),this.paddingTop=f+s,this.paddingBottom=h+s}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Ct(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,r;for(n=0,r=t.length;n({width:o[N]||0,height:s[N]||0});return{first:k(0),last:k(n-1),widest:k(T),highest:k(P),widths:o,heights:s}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return w7(this._alignToPixels?ha(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&ta*i?a/r:l/i:l*i0}_computeGridLineItems(t){const n=this.axis,r=this.chart,i=this.options,{grid:o,position:s,border:a}=i,l=o.offset,c=this.isHorizontal(),h=this.ticks.length+(l?1:0),p=xu(o),m=[],v=a.setContext(this.getContext()),y=v.display?v.width:0,x=y/2,_=function(ie){return ha(r,ie,y)};let w,S,T,P,k,N,D,z,A,W,Y,J;if(s==="top")w=_(this.bottom),N=this.bottom-p,z=w-x,W=_(t.top)+x,J=t.bottom;else if(s==="bottom")w=_(this.top),W=t.top,J=_(t.bottom)-x,N=w+x,z=this.top+p;else if(s==="left")w=_(this.right),k=this.right-p,D=w-x,A=_(t.left)+x,Y=t.right;else if(s==="right")w=_(this.left),A=t.left,Y=_(t.right)-x,k=w+x,D=this.left+p;else if(n==="x"){if(s==="center")w=_((t.top+t.bottom)/2+.5);else if(rt(s)){const ie=Object.keys(s)[0],oe=s[ie];w=_(this.chart.scales[ie].getPixelForValue(oe))}W=t.top,J=t.bottom,N=w+x,z=N+p}else if(n==="y"){if(s==="center")w=_((t.left+t.right)/2);else if(rt(s)){const ie=Object.keys(s)[0],oe=s[ie];w=_(this.chart.scales[ie].getPixelForValue(oe))}k=w-x,D=k-p,A=t.left,Y=t.right}const Z=Ke(i.ticks.maxTicksLimit,h),ee=Math.max(1,Math.ceil(h/Z));for(S=0;So.value===t);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const n=this.options.grid,r=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,s;const a=(l,c,f)=>{!f.width||!f.color||(r.save(),r.lineWidth=f.width,r.strokeStyle=f.color,r.setLineDash(f.borderDash||[]),r.lineDashOffset=f.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(c.x,c.y),r.stroke(),r.restore())};if(n.display)for(o=0,s=i.length;o{this.draw(o)}}]:[{z:r,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",i=[];let o,s;for(o=0,s=n.length;o{const r=n.split("."),i=r.pop(),o=[e].concat(r).join("."),s=t[n].split("."),a=s.pop(),l=s.join(".");tn.route(o,i,l,a)})}function B9(e){return"id"in e&&"defaults"in e}class z9{constructor(){this.controllers=new qh(wi,"datasets",!0),this.elements=new qh(jo,"elements"),this.plugins=new qh(Object,"plugins"),this.scales=new qh(al,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,n,r){[...n].forEach(i=>{const o=r||this._getRegistryForType(i);r||o.isForType(i)||o===this.plugins&&i.id?this._exec(t,o,i):vt(i,s=>{const a=r||this._getRegistryForType(s);this._exec(t,a,s)})})}_exec(t,n,r){const i=O2(t);Ct(r["before"+i],[],r),n[t](r),Ct(r["after"+i],[],r)}_getRegistryForType(t){for(let n=0;no.filter(a=>!s.some(l=>a.plugin.id===l.plugin.id));this._notify(i(n,r),t,"stop"),this._notify(i(r,n),t,"start")}}function V9(e){const t={},n=[],r=Object.keys(Bi.plugins.items);for(let o=0;o1&&fg(e[0].toLowerCase(),t),e))return e;throw new Error(`Cannot determine type of '${name}' axis. Please provide 'axis' or 'position' option.`)}function K9(e,t){const n=Ha[e.type]||{scales:{}},r=t.scales||{},i=X1(e.type,t),o=Object.create(null);return Object.keys(r).forEach(s=>{const a=r[s];if(!rt(a))return console.error(`Invalid scale configuration for scale: ${s}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${s}`);const l=fg(s,a),c=G9(l,i),f=n.scales||{};o[s]=tf(Object.create(null),[{axis:l},a,f[l],f[c]])}),e.data.datasets.forEach(s=>{const a=s.type||e.type,l=s.indexAxis||X1(a,t),f=(Ha[a]||{}).scales||{};Object.keys(f).forEach(h=>{const p=q9(h,l),m=s[p+"AxisID"]||p;o[m]=o[m]||Object.create(null),tf(o[m],[{axis:p},r[m],f[h]])})}),Object.keys(o).forEach(s=>{const a=o[s];tf(a,[tn.scales[a.type],tn.scale])}),o}function _D(e){const t=e.options||(e.options={});t.plugins=Ke(t.plugins,{}),t.scales=K9(e,t)}function bD(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function X9(e){return e=e||{},e.data=bD(e.data),_D(e),e}const qO=new Map,wD=new Set;function Gh(e,t){let n=qO.get(e);return n||(n=t(),qO.set(e,n),wD.add(n)),n}const Su=(e,t,n)=>{const r=As(t,n);r!==void 0&&e.add(r)};class Q9{constructor(t){this._config=X9(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=bD(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),_D(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Gh(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return Gh(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return Gh(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return Gh(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const r=this._scopeCache;let i=r.get(t);return(!i||n)&&(i=new Map,r.set(t,i)),i}getOptionScopes(t,n,r){const{options:i,type:o}=this,s=this._cachedScopes(t,r),a=s.get(n);if(a)return a;const l=new Set;n.forEach(f=>{t&&(l.add(t),f.forEach(h=>Su(l,t,h))),f.forEach(h=>Su(l,i,h)),f.forEach(h=>Su(l,Ha[o]||{},h)),f.forEach(h=>Su(l,tn,h)),f.forEach(h=>Su(l,G1,h))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),wD.has(n)&&s.set(n,c),c}chartOptionScopes(){const{options:t,type:n}=this;return[t,Ha[n]||{},tn.datasets[n]||{},{type:n},tn,G1]}resolveNamedOptions(t,n,r,i=[""]){const o={$shared:!0},{resolver:s,subPrefixes:a}=GO(this._resolverCache,t,i);let l=s;if(ez(s,n)){o.$shared=!1,r=js(r)?r():r;const c=this.createResolver(t,r,a);l=_c(s,r,c)}for(const c of n)o[c]=l[c];return o}createResolver(t,n,r=[""],i){const{resolver:o}=GO(this._resolverCache,t,r);return rt(n)?_c(o,n,void 0,i):o}}function GO(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));const i=n.join();let o=r.get(i);return o||(o={resolver:N2(t,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},r.set(i,o)),o}const J9=e=>rt(e)&&Object.getOwnPropertyNames(e).reduce((t,n)=>t||js(e[n]),!1);function ez(e,t){const{isScriptable:n,isIndexable:r}=JL(e);for(const i of t){const o=n(i),s=r(i),a=(s||o)&&e[i];if(o&&(js(a)||J9(a))||s&&kt(a))return!0}return!1}var tz="4.1.1";const nz=["top","bottom","left","right","chartArea"];function ZO(e,t){return e==="top"||e==="bottom"||nz.indexOf(e)===-1&&t==="x"}function KO(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function XO(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),Ct(n&&n.onComplete,[e],t)}function rz(e){const t=e.chart,n=t.options.animation;Ct(n&&n.onProgress,[e],t)}function xD(e){return oD()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const Gp={},QO=e=>{const t=xD(e);return Object.values(Gp).filter(n=>n.canvas===t).pop()};function iz(e,t,n){const r=Object.keys(e);for(const i of r){const o=+i;if(o>=t){const s=e[i];delete e[i],(n>0||o>t)&&(e[o+n]=s)}}}function oz(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}function sz(e){const{xScale:t,yScale:n}=e;if(t&&n)return{left:t.left,right:t.right,top:n.top,bottom:n.bottom}}var Qo;let cy=(Qo=class{static register(...t){Bi.add(...t),JO()}static unregister(...t){Bi.remove(...t),JO()}constructor(t,n){const r=this.config=new Q9(n),i=xD(t),o=QO(i);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const s=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||C9(i)),this.platform.updateConfig(r);const a=this.platform.acquireContext(i,s.aspectRatio),l=a&&a.canvas,c=l&&l.height,f=l&&l.width;if(this.id=c7(),this.ctx=a,this.canvas=l,this.width=f,this.height=c,this._options=s,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new U9,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=E7(h=>this.update(h),s.resizeDelay||0),this._dataChanges=[],Gp[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}uo.listen(this,"complete",XO),uo.listen(this,"progress",rz),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:i,_aspectRatio:o}=this;return ct(t)?n&&o?o:i?r/i:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return Bi}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():SO(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return bO(this.canvas,this.ctx),this}stop(){return uo.stop(this),this}resize(t,n){uo.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const r=this.options,i=this.canvas,o=r.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(i,t,n,o),a=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,SO(this,a,!0)&&(this.notifyPlugins("resize",{size:s}),Ct(r.onResize,[this,s],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};vt(n,(r,i)=>{r.id=i})}buildOrUpdateScales(){const t=this.options,n=t.scales,r=this.scales,i=Object.keys(r).reduce((s,a)=>(s[a]=!1,s),{});let o=[];n&&(o=o.concat(Object.keys(n).map(s=>{const a=n[s],l=fg(s,a),c=l==="r",f=l==="x";return{options:a,dposition:c?"chartArea":f?"bottom":"left",dtype:c?"radialLinear":f?"category":"linear"}}))),vt(o,s=>{const a=s.options,l=a.id,c=fg(l,a),f=Ke(a.type,s.dtype);(a.position===void 0||ZO(a.position,c)!==ZO(s.dposition))&&(a.position=s.dposition),i[l]=!0;let h=null;if(l in r&&r[l].type===f)h=r[l];else{const p=Bi.getScale(f);h=new p({id:l,type:f,ctx:this.ctx,chart:this}),r[h.id]=h}h.init(a,t)}),vt(i,(s,a)=>{s||delete r[a]}),vt(r,s=>{Jn.configure(this,s,s.options),Jn.addBox(this,s)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,r=t.length;if(t.sort((i,o)=>i.index-o.index),r>n){for(let i=n;in.length&&delete this._stacks,t.forEach((r,i)=>{n.filter(o=>o===r._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let r,i;for(this._removeUnreferencedMetasets(),r=0,i=n.length;r{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let c=0,f=this.data.datasets.length;c{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(KO("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){vt(this.scales,t=>{Jn.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!fO(n,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:i,count:o}of n){const s=r==="_removeElements"?-o:o;iz(t,i,s)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=o=>new Set(t.filter(s=>s[0]===o).map((s,a)=>a+","+s.splice(1).join(","))),i=r(0);for(let o=1;oo.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Jn.update(this,this.width,this.height,t);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],vt(this.boxes,i=>{r&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,o)=>{i._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,r=t._clip,i=!r.disabled,o=sz(t)||this.chartArea,s={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(i&&sy(n,{left:r.left===!1?0:o.left-r.left,right:r.right===!1?this.width:o.right+r.right,top:r.top===!1?0:o.top-r.top,bottom:r.bottom===!1?this.height:o.bottom+r.bottom}),t.controller.draw(),i&&ay(n),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(t){return jf(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,i){const o=r9.modes[n];return typeof o=="function"?o(this,t,r,i):[]}getDatasetMeta(t){const n=this.data.datasets[t],r=this._metasets;let i=r.filter(o=>o&&o._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},r.push(i)),i}getContext(){return this.$context||(this.$context=qs(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(t,n){const r=this.getDatasetMeta(t);r.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,r){const i=r?"show":"hide",o=this.getDatasetMeta(t),s=o.controller._resolveAnimations(void 0,i);Qr(n)?(o.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),s.update(o,{visible:r}),this.update(a=>a.datasetIndex===t?i:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),uo.remove(this),t=0,n=this.data.datasets.length;t{n.addEventListener(this,o,s),t[o]=s},i=(o,s,a)=>{o.offsetX=s,o.offsetY=a,this._eventHandler(o)};vt(this.options.events,o=>r(o,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,r=(l,c)=>{n.addEventListener(this,l,c),t[l]=c},i=(l,c)=>{t[l]&&(n.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)};let s;const a=()=>{i("attach",a),this.attached=!0,this.resize(),r("resize",o),r("detach",s)};s=()=>{this.attached=!1,i("resize",o),this._stop(),this._resize(0,0),r("attach",a)},n.isAttached(this.canvas)?a():s()}unbindEvents(){vt(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},vt(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,r){const i=r?"set":"remove";let o,s,a,l;for(n==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+i+"DatasetHoverStyle"]()),a=0,l=t.length;a{const a=this.getDatasetMeta(o);if(!a)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:a.data[s],index:s}});!og(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(t,n,r){return this._plugins.notify(this,t,n,r)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,r){const i=this.options.hover,o=(l,c)=>l.filter(f=>!c.some(h=>f.datasetIndex===h.datasetIndex&&f.index===h.index)),s=o(n,t),a=r?t:o(t,n);s.length&&this.updateHoverStyle(s,i.mode,!1),a.length&&i.mode&&this.updateHoverStyle(a,i.mode,!0)}_eventHandler(t,n){const r={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},i=s=>(s.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,i)===!1)return;const o=this._handleEvent(t,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,i),(o||r.changed)&&this.render(),this}_handleEvent(t,n,r){const{_active:i=[],options:o}=this,s=n,a=this._getActiveElements(t,i,r,s),l=m7(t),c=oz(t,this._lastEvent,r,l);r&&(this._lastEvent=null,Ct(o.onHover,[t,a,this],this),l&&Ct(o.onClick,[t,a,this],this));const f=!og(a,i);return(f||n)&&(this._active=a,this._updateHoverStyles(a,i,n)),this._lastEvent=c,f}_getActiveElements(t,n,r,i){if(t.type==="mouseout")return[];if(!r)return n;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,i)}},xe(Qo,"defaults",tn),xe(Qo,"instances",Gp),xe(Qo,"overrides",Ha),xe(Qo,"registry",Bi),xe(Qo,"version",tz),xe(Qo,"getChart",QO),Qo);function JO(){return vt(cy.instances,e=>e._plugins.invalidate())}function az(e,t,n){const{startAngle:r,pixelMargin:i,x:o,y:s,outerRadius:a,innerRadius:l}=t;let c=i/a;e.beginPath(),e.arc(o,s,a,r-c,n+c),l>i?(c=i/l,e.arc(o,s,l,n+c,r-c,!0)):e.arc(o,s,i,n+Gt,r-Gt),e.closePath(),e.clip()}function lz(e){return R2(e,["outerStart","outerEnd","innerStart","innerEnd"])}function cz(e,t,n,r){const i=lz(e.options.borderRadius),o=(n-t)/2,s=Math.min(o,r*t/2),a=l=>{const c=(n-Math.min(o,l))*r/2;return En(l,0,Math.min(o,c))};return{outerStart:a(i.outerStart),outerEnd:a(i.outerEnd),innerStart:En(i.innerStart,0,s),innerEnd:En(i.innerEnd,0,s)}}function Cl(e,t,n,r){return{x:n+e*Math.cos(t),y:r+e*Math.sin(t)}}function dg(e,t,n,r,i,o){const{x:s,y:a,startAngle:l,pixelMargin:c,innerRadius:f}=t,h=Math.max(t.outerRadius+r+n-c,0),p=f>0?f+r+n+c:0;let m=0;const v=i-l;if(r){const ee=f>0?f-r:0,ie=h>0?h-r:0,oe=(ee+ie)/2,G=oe!==0?v*oe/(oe+r):v;m=(v-G)/2}const y=Math.max(.001,v*h-n/It)/h,x=(v-y)/2,_=l+x+m,w=i-x-m,{outerStart:S,outerEnd:T,innerStart:P,innerEnd:k}=cz(t,p,h,w-_),N=h-S,D=h-T,z=_+S/N,A=w-T/D,W=p+P,Y=p+k,J=_+P/W,Z=w-k/Y;if(e.beginPath(),o){const ee=(z+A)/2;if(e.arc(s,a,h,z,ee),e.arc(s,a,h,ee,A),T>0){const F=Cl(D,A,s,a);e.arc(F.x,F.y,T,A,w+Gt)}const ie=Cl(Y,w,s,a);if(e.lineTo(ie.x,ie.y),k>0){const F=Cl(Y,Z,s,a);e.arc(F.x,F.y,k,w+Gt,Z+Math.PI)}const oe=(w-k/p+(_+P/p))/2;if(e.arc(s,a,p,w-k/p,oe,!0),e.arc(s,a,p,oe,_+P/p,!0),P>0){const F=Cl(W,J,s,a);e.arc(F.x,F.y,P,J+Math.PI,_-Gt)}const G=Cl(N,_,s,a);if(e.lineTo(G.x,G.y),S>0){const F=Cl(N,z,s,a);e.arc(F.x,F.y,S,_-Gt,z)}}else{e.moveTo(s,a);const ee=Math.cos(z)*h+s,ie=Math.sin(z)*h+a;e.lineTo(ee,ie);const oe=Math.cos(A)*h+s,G=Math.sin(A)*h+a;e.lineTo(oe,G)}e.closePath()}function uz(e,t,n,r,i){const{fullCircles:o,startAngle:s,circumference:a}=t;let l=t.endAngle;if(o){dg(e,t,n,r,l,i);for(let c=0;c=Mt||Af(o,a,l),y=_o(s,c+p,f+p);return v&&y}getCenterPoint(t){const{x:n,y:r,startAngle:i,endAngle:o,innerRadius:s,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:l,spacing:c}=this.options,f=(i+o)/2,h=(s+a+c+l)/2;return{x:n+Math.cos(f)*h,y:r+Math.sin(f)*h}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:n,circumference:r}=this,i=(n.offset||0)/4,o=(n.spacing||0)/2,s=n.circular;if(this.pixelMargin=n.borderAlign==="inner"?.33:0,this.fullCircles=r>Mt?Math.floor(r/Mt):0,r===0||this.innerRadius<0||this.outerRadius<0)return;t.save();const a=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(a)*i,Math.sin(a)*i);const l=1-Math.sin(Math.min(It,r||0)),c=i*l;t.fillStyle=n.backgroundColor,t.strokeStyle=n.borderColor,uz(t,this,c,o,s),fz(t,this,c,o,s),t.restore()}}xe(Zp,"id","arc"),xe(Zp,"defaults",{borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),xe(Zp,"defaultRoutes",{backgroundColor:"backgroundColor"});function SD(e,t,n=t){e.lineCap=Ke(n.borderCapStyle,t.borderCapStyle),e.setLineDash(Ke(n.borderDash,t.borderDash)),e.lineDashOffset=Ke(n.borderDashOffset,t.borderDashOffset),e.lineJoin=Ke(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=Ke(n.borderWidth,t.borderWidth),e.strokeStyle=Ke(n.borderColor,t.borderColor)}function dz(e,t,n){e.lineTo(n.x,n.y)}function hz(e){return e.stepped?I7:e.tension||e.cubicInterpolationMode==="monotone"?F7:dz}function CD(e,t,n={}){const r=e.length,{start:i=0,end:o=r-1}=n,{start:s,end:a}=t,l=Math.max(i,s),c=Math.min(o,a),f=ia&&o>a;return{count:r,start:l,loop:t.loop,ilen:c(s+(c?a-T:T))%o,S=()=>{y!==x&&(e.lineTo(f,x),e.lineTo(f,y),e.lineTo(f,_))};for(l&&(m=i[w(0)],e.moveTo(m.x,m.y)),p=0;p<=a;++p){if(m=i[w(p)],m.skip)continue;const T=m.x,P=m.y,k=T|0;k===v?(Px&&(x=P),f=(h*f+T)/++h):(S(),e.lineTo(T,P),v=k,h=0,y=x=P),_=P}S()}function Q1(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?mz:pz}function gz(e){return e.stepped?gB:e.tension||e.cubicInterpolationMode==="monotone"?vB:wa}function vz(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),SD(e,t.options),e.stroke(i)}function yz(e,t,n,r){const{segments:i,options:o}=t,s=Q1(t);for(const a of i)SD(e,o,a.style),e.beginPath(),s(e,t,a,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}const _z=typeof Path2D=="function";function bz(e,t,n,r){_z&&!t.options.segment?vz(e,t,n,r):yz(e,t,n,r)}class fs extends jo{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,n){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const i=r.spanGaps?this._loop:this._fullLoop;lB(this._points,r,t,i,n),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=SB(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,r=t.length;return r&&n[t[r-1].end]}interpolate(t,n){const r=this.options,i=t[n],o=this.points,s=uD(this,{property:n,start:i,end:i});if(!s.length)return;const a=[],l=gz(r);let c,f;for(c=0,f=s.length;ct!=="borderDash"&&t!=="fill"});function eP(e,t,n,r){const i=e.options,{[n]:o}=e.getProps([n],r);return Math.abs(t-o)e.replace("rgb(","rgba(").replace(")",", 0.5)"));function TD(e){return J1[e%J1.length]}function OD(e){return tP[e%tP.length]}function Oz(e,t){return e.borderColor=TD(t),e.backgroundColor=OD(t),++t}function Pz(e,t){return e.backgroundColor=e.data.map(()=>TD(t++)),t}function kz(e,t){return e.backgroundColor=e.data.map(()=>OD(t++)),t}function Mz(e){let t=0;return(n,r)=>{const i=e.getDatasetMeta(r).controller;i instanceof us?t=Pz(n,t):i instanceof lf?t=kz(n,t):i&&(t=Oz(n,t))}}function nP(e){let t;for(t in e)if(e[t].borderColor||e[t].backgroundColor)return!0;return!1}var Rz={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,t,n){if(!n.enabled)return;const{options:{elements:r},data:{datasets:i}}=e.config;if(!n.forceOverride&&(nP(i)||r&&nP(r)))return;const o=Mz(e);i.forEach(o)}};function Nz(e,t,n,r,i){const o=i.samples||r;if(o>=n)return e.slice(t,t+n);const s=[],a=(n-2)/(o-2);let l=0;const c=t+n-1;let f=t,h,p,m,v,y;for(s[l++]=e[f],h=0;hm&&(m=v,p=e[w],y=w);s[l++]=p,f=y}return s[l++]=e[c],s}function Lz(e,t,n,r){let i=0,o=0,s,a,l,c,f,h,p,m,v,y;const x=[],_=t+n-1,w=e[t].x,T=e[_].x-w;for(s=t;sy&&(y=c,p=s),i=(o*i+a.x)/++o;else{const k=s-1;if(!ct(h)&&!ct(p)){const N=Math.min(h,p),D=Math.max(h,p);N!==m&&N!==k&&x.push({...e[N],x:i}),D!==m&&D!==k&&x.push({...e[D],x:i})}s>0&&k!==m&&x.push(e[k]),x.push(a),f=P,o=0,v=y=c,h=p=m=s}}return x}function PD(e){if(e._decimated){const t=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{value:t})}}function rP(e){e.data.datasets.forEach(t=>{PD(t)})}function Dz(e,t){const n=t.length;let r=0,i;const{iScale:o}=e,{min:s,max:a,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(r=En(bo(t,o.axis,s).lo,0,n-1)),c?i=En(bo(t,o.axis,a).hi+1,r,n)-r:i=n-r,{start:r,count:i}}var Az={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,t,n)=>{if(!n.enabled){rP(e);return}const r=e.width;e.data.datasets.forEach((i,o)=>{const{_data:s,indexAxis:a}=i,l=e.getDatasetMeta(o),c=s||i.data;if(Bu([a,e.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const f=e.scales[l.xAxisID];if(f.type!=="linear"&&f.type!=="time"||e.options.parsing)return;let{start:h,count:p}=Dz(l,c);const m=n.threshold||4*r;if(p<=m){PD(i);return}ct(s)&&(i._data=c,delete i.data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(y){this._data=y}}));let v;switch(n.algorithm){case"lttb":v=Nz(c,h,p,r,n);break;case"min-max":v=Lz(c,h,p,r);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}i._decimated=v})},destroy(e){rP(e)}};function jz(e,t,n){const r=e.segments,i=e.points,o=t.points,s=[];for(const a of r){let{start:l,end:c}=a;c=I2(l,c,i);const f=eb(n,i[l],i[c],a.loop);if(!t.segments){s.push({source:a,target:f,start:i[l],end:i[c]});continue}const h=uD(t,f);for(const p of h){const m=eb(n,o[p.start],o[p.end],p.loop),v=cD(a,i,m);for(const y of v)s.push({source:y,target:p,start:{[n]:iP(f,m,"start",Math.max)},end:{[n]:iP(f,m,"end",Math.min)}})}}return s}function eb(e,t,n,r){if(r)return;let i=t[e],o=n[e];return e==="angle"&&(i=Pr(i),o=Pr(o)),{property:e,start:i,end:o}}function Iz(e,t){const{x:n=null,y:r=null}=e||{},i=t.points,o=[];return t.segments.forEach(({start:s,end:a})=>{a=I2(s,a,i);const l=i[s],c=i[a];r!==null?(o.push({x:l.x,y:r}),o.push({x:c.x,y:r})):n!==null&&(o.push({x:n,y:l.y}),o.push({x:n,y:c.y}))}),o}function I2(e,t,n){for(;t>e;t--){const r=n[t];if(!isNaN(r.x)&&!isNaN(r.y))break}return t}function iP(e,t,n,r){return e&&t?r(e[n],t[n]):e?e[n]:t?t[n]:0}function kD(e,t){let n=[],r=!1;return kt(e)?(r=!0,n=e):n=Iz(e,t),n.length?new fs({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function oP(e){return e&&e.fill!==!1}function Fz(e,t,n){let i=e[t].fill;const o=[t];let s;if(!n)return i;for(;i!==!1&&o.indexOf(i)===-1;){if(!qt(i))return i;if(s=e[i],!s)return!1;if(s.visible)return i;o.push(i),i=s.fill}return!1}function $z(e,t,n){const r=Vz(e);if(rt(r))return isNaN(r.value)?!1:r;let i=parseFloat(r);return qt(i)&&Math.floor(i)===i?Bz(r[0],t,i,n):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function Bz(e,t,n,r){return(e==="-"||e==="+")&&(n=t+n),n===t||n<0||n>=r?!1:n}function zz(e,t){let n=null;return e==="start"?n=t.bottom:e==="end"?n=t.top:rt(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}function Uz(e,t,n){let r;return e==="start"?r=n:e==="end"?r=t.options.reverse?t.min:t.max:rt(e)?r=e.value:r=t.getBaseValue(),r}function Vz(e){const t=e.options,n=t.fill;let r=Ke(n&&n.target,n);return r===void 0&&(r=!!t.backgroundColor),r===!1||r===null?!1:r===!0?"origin":r}function Hz(e){const{scale:t,index:n,line:r}=e,i=[],o=r.segments,s=r.points,a=Wz(t,n);a.push(kD({x:null,y:t.bottom},r));for(let l=0;l=0;--s){const a=i[s].$filler;a&&(a.line.updateControlPoints(o,a.axis),r&&a.fill&&p0(e.ctx,a,o))}},beforeDatasetsDraw(e,t,n){if(n.drawTime!=="beforeDatasetsDraw")return;const r=e.getSortedVisibleDatasetMetas();for(let i=r.length-1;i>=0;--i){const o=r[i].$filler;oP(o)&&p0(e.ctx,o,e.chartArea)}},beforeDatasetDraw(e,t,n){const r=t.meta.$filler;!oP(r)||n.drawTime!=="beforeDatasetDraw"||p0(e.ctx,r,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const cP=(e,t)=>{let{boxHeight:n=t,boxWidth:r=t}=e;return e.usePointStyle&&(n=Math.min(n,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(t,n)}},nU=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class uP extends jo{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n,r){this.maxWidth=t,this.maxHeight=n,this._margins=r,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let n=Ct(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(r=>t.filter(r,this.chart.data))),t.sort&&(n=n.sort((r,i)=>t.sort(r,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const r=t.labels,i=gn(r.font),o=i.size,s=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=cP(r,o);let c,f;n.font=i.string,this.isHorizontal()?(c=this.maxWidth,f=this._fitRows(s,o,a,l)+10):(f=this.maxHeight,c=this._fitCols(s,i,a,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(f,t.maxHeight||this.maxHeight)}_fitRows(t,n,r,i){const{ctx:o,maxWidth:s,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],f=i+a;let h=t;o.textAlign="left",o.textBaseline="middle";let p=-1,m=-f;return this.legendItems.forEach((v,y)=>{const x=r+n/2+o.measureText(v.text).width;(y===0||c[c.length-1]+x+2*a>s)&&(h+=f,c[c.length-(y>0?0:1)]=0,m+=f,p++),l[y]={left:0,top:m,row:p,width:x,height:i},c[c.length-1]+=x+a}),h}_fitCols(t,n,r,i){const{ctx:o,maxHeight:s,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],f=s-t;let h=a,p=0,m=0,v=0,y=0;return this.legendItems.forEach((x,_)=>{const{itemWidth:w,itemHeight:S}=rU(r,n,o,x,i);_>0&&m+S+2*a>f&&(h+=p+a,c.push({width:p,height:m}),v+=p+a,y++,p=m=0),l[_]={left:v,top:m,col:y,width:w,height:S},p=Math.max(p,w),m+=S+a}),h+=p,c.push({width:p,height:m}),h}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:i},rtl:o}}=this,s=nc(o,this.left,this.width);if(this.isHorizontal()){let a=0,l=Kn(r,this.left+i,this.right-this.lineWidths[a]);for(const c of n)a!==c.row&&(a=c.row,l=Kn(r,this.left+i,this.right-this.lineWidths[a])),c.top+=this.top+t+i,c.left=s.leftForLtr(s.x(l),c.width),l+=c.width+i}else{let a=0,l=Kn(r,this.top+t+i,this.bottom-this.columnSizes[a].height);for(const c of n)c.col!==a&&(a=c.col,l=Kn(r,this.top+t+i,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+i,c.left=s.leftForLtr(s.x(c.left),c.width),l+=c.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;sy(t,this),this._draw(),ay(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:r,ctx:i}=this,{align:o,labels:s}=t,a=tn.color,l=nc(t.rtl,this.left,this.width),c=gn(s.font),{padding:f}=s,h=c.size,p=h/2;let m;this.drawTitle(),i.textAlign=l.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=c.string;const{boxWidth:v,boxHeight:y,itemHeight:x}=cP(s,h),_=function(k,N,D){if(isNaN(v)||v<=0||isNaN(y)||y<0)return;i.save();const z=Ke(D.lineWidth,1);if(i.fillStyle=Ke(D.fillStyle,a),i.lineCap=Ke(D.lineCap,"butt"),i.lineDashOffset=Ke(D.lineDashOffset,0),i.lineJoin=Ke(D.lineJoin,"miter"),i.lineWidth=z,i.strokeStyle=Ke(D.strokeStyle,a),i.setLineDash(Ke(D.lineDash,[])),s.usePointStyle){const A={radius:y*Math.SQRT2/2,pointStyle:D.pointStyle,rotation:D.rotation,borderWidth:z},W=l.xPlus(k,v/2),Y=N+p;XL(i,A,W,Y,s.pointStyleWidth&&v)}else{const A=N+Math.max((h-y)/2,0),W=l.leftForLtr(k,v),Y=Aa(D.borderRadius);i.beginPath(),Object.values(Y).some(J=>J!==0)?If(i,{x:W,y:A,w:v,h:y,radius:Y}):i.rect(W,A,v,y),i.fill(),z!==0&&i.stroke()}i.restore()},w=function(k,N,D){Wa(i,D.text,k,N+x/2,c,{strikethrough:D.hidden,textAlign:l.textAlign(D.textAlign)})},S=this.isHorizontal(),T=this._computeTitleHeight();S?m={x:Kn(o,this.left+f,this.right-r[0]),y:this.top+f+T,line:0}:m={x:this.left+f,y:Kn(o,this.top+T+f,this.bottom-n[0].height),line:0},sD(this.ctx,t.textDirection);const P=x+f;this.legendItems.forEach((k,N)=>{i.strokeStyle=k.fontColor,i.fillStyle=k.fontColor;const D=i.measureText(k.text).width,z=l.textAlign(k.textAlign||(k.textAlign=s.textAlign)),A=v+p+D;let W=m.x,Y=m.y;l.setWidth(this.width),S?N>0&&W+A+f>this.right&&(Y=m.y+=P,m.line++,W=m.x=Kn(o,this.left+f,this.right-r[m.line])):N>0&&Y+P>this.bottom&&(W=m.x=W+n[m.line].width+f,m.line++,Y=m.y=Kn(o,this.top+T+f,this.bottom-n[m.line].height));const J=l.x(W);if(_(J,Y,k),W=T7(z,W+v+p,S?W+A:this.right,t.rtl),w(l.x(W),Y,k),S)m.x+=A+f;else if(typeof k.text!="string"){const Z=c.lineHeight;m.y+=RD(k,Z)}else m.y+=P}),aD(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,r=gn(n.font),i=er(n.padding);if(!n.display)return;const o=nc(t.rtl,this.left,this.width),s=this.ctx,a=n.position,l=r.size/2,c=i.top+l;let f,h=this.left,p=this.width;if(this.isHorizontal())p=Math.max(...this.lineWidths),f=this.top+c,h=Kn(t.align,h,this.right-p);else{const v=this.columnSizes.reduce((y,x)=>Math.max(y,x.height),0);f=c+Kn(t.align,this.top,this.bottom-v-t.labels.padding-this._computeTitleHeight())}const m=Kn(a,h,h+p);s.textAlign=o.textAlign(M2(a)),s.textBaseline="middle",s.strokeStyle=n.color,s.fillStyle=n.color,s.font=r.string,Wa(s,n.text,m,f,r)}_computeTitleHeight(){const t=this.options.title,n=gn(t.font),r=er(t.padding);return t.display?n.lineHeight+r.height:0}_getLegendItemAt(t,n){let r,i,o;if(_o(t,this.left,this.right)&&_o(n,this.top,this.bottom)){for(o=this.legendHitBoxes,r=0;ro.length>s.length?o:s)),t+n.size/2+r.measureText(i).width}function oU(e,t,n){let r=e;return typeof t.text!="string"&&(r=RD(t,n)),r}function RD(e,t){const n=e.text?e.text.length+.5:0;return t*n}function sU(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var aU={id:"legend",_element:uP,start(e,t,n){const r=e.legend=new uP({ctx:e.ctx,options:n,chart:e});Jn.configure(e,r,n),Jn.addBox(e,r)},stop(e){Jn.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;Jn.configure(e,r,n),r.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const r=t.datasetIndex,i=n.chart;i.isDatasetVisible(r)?(i.hide(r),t.hidden=!0):(i.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:i,color:o,useBorderRadius:s,borderRadius:a}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(n?0:void 0),f=er(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(f.width+f.height)/4,strokeStyle:c.borderColor,pointStyle:r||c.pointStyle,rotation:c.rotation,textAlign:i||c.textAlign,borderRadius:s&&(a||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class F2 extends jo{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n){const r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=n;const i=kt(r.text)?r.text.length:1;this._padding=er(r.padding);const o=i*gn(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:n,left:r,bottom:i,right:o,options:s}=this,a=s.align;let l=0,c,f,h;return this.isHorizontal()?(f=Kn(a,r,o),h=n+t,c=o-r):(s.position==="left"?(f=r+t,h=Kn(a,i,n),l=It*-.5):(f=o-t,h=Kn(a,n,i),l=It*.5),c=i-n),{titleX:f,titleY:h,maxWidth:c,rotation:l}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const r=gn(n.font),o=r.lineHeight/2+this._padding.top,{titleX:s,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(o);Wa(t,n.text,0,0,r,{color:n.color,maxWidth:l,rotation:c,textAlign:M2(n.align),textBaseline:"middle",translation:[s,a]})}}function lU(e,t){const n=new F2({ctx:e.ctx,options:t,chart:e});Jn.configure(e,n,t),Jn.addBox(e,n),e.titleBlock=n}var cU={id:"title",_element:F2,start(e,t,n){lU(e,n)},stop(e){const t=e.titleBlock;Jn.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const r=e.titleBlock;Jn.configure(e,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Zh=new WeakMap;var uU={id:"subtitle",start(e,t,n){const r=new F2({ctx:e.ctx,options:n,chart:e});Jn.configure(e,r,n),Jn.addBox(e,r),Zh.set(e,r)},stop(e){Jn.removeBox(e,Zh.get(e)),Zh.delete(e)},beforeUpdate(e,t,n){const r=Zh.get(e);Jn.configure(e,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Uu={average(e){if(!e.length)return!1;let t,n,r=0,i=0,o=0;for(t=0,n=e.length;t-1?e.split(` -`):e}function sU(e,t){const{element:n,datasetIndex:r,index:i}=t,o=e.getDatasetMeta(r).controller,{label:s,value:a}=o.getLabelAndValue(i);return{chart:e,label:s,parsed:o.getParsed(i),raw:e.data.datasets[r].data[i],formattedValue:a,dataset:o.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function mP(e,t){const n=e.chart.ctx,{body:r,footer:i,title:o}=e,{boxWidth:s,boxHeight:a}=t,l=gn(t.bodyFont),c=gn(t.titleFont),f=gn(t.footerFont),h=o.length,p=i.length,m=r.length,v=er(t.padding);let y=v.height,x=0,_=r.reduce((T,P)=>T+P.before.length+P.lines.length+P.after.length,0);if(_+=e.beforeBody.length+e.afterBody.length,h&&(y+=h*c.lineHeight+(h-1)*t.titleSpacing+t.titleMarginBottom),_){const T=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;y+=m*T+(_-m)*l.lineHeight+(_-1)*t.bodySpacing}p&&(y+=t.footerMarginTop+p*f.lineHeight+(p-1)*t.footerSpacing);let w=0;const S=function(T){x=Math.max(x,n.measureText(T).width+w)};return n.save(),n.font=c.string,vt(e.title,S),n.font=l.string,vt(e.beforeBody.concat(e.afterBody),S),w=t.displayColors?s+2+t.boxPadding:0,vt(r,T=>{vt(T.before,S),vt(T.lines,S),vt(T.after,S)}),w=0,n.font=f.string,vt(e.footer,S),n.restore(),x+=v.width,{width:x,height:y}}function aU(e,t){const{y:n,height:r}=t;return ne.height-r/2?"bottom":"center"}function lU(e,t,n,r){const{x:i,width:o}=r,s=n.caretSize+n.caretPadding;if(e==="left"&&i+o+s>t.width||e==="right"&&i-o-s<0)return!0}function cU(e,t,n,r){const{x:i,width:o}=n,{width:s,chartArea:{left:a,right:l}}=e;let c="center";return r==="center"?c=i<=(a+l)/2?"left":"right":i<=o/2?c="left":i>=s-o/2&&(c="right"),lU(c,e,t,n)&&(c="center"),c}function gP(e,t,n){const r=n.yAlign||t.yAlign||aU(e,n);return{xAlign:n.xAlign||t.xAlign||cU(e,t,n,r),yAlign:r}}function uU(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function fU(e,t,n){let{y:r,height:i}=e;return t==="top"?r+=n:t==="bottom"?r-=i+n:r-=i/2,r}function vP(e,t,n,r){const{caretSize:i,caretPadding:o,cornerRadius:s}=e,{xAlign:a,yAlign:l}=n,c=i+o,{topLeft:f,topRight:h,bottomLeft:p,bottomRight:m}=Aa(s);let v=uU(t,a);const y=fU(t,l,c);return l==="center"?a==="left"?v+=c:a==="right"&&(v-=c):a==="left"?v-=Math.max(f,p)+i:a==="right"&&(v+=Math.max(h,m)+i),{x:En(v,0,r.width-t.width),y:En(y,0,r.height-t.height)}}function Zh(e,t,n){const r=er(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function yP(e){return Fi([],uo(e))}function dU(e,t,n){return Ys(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function _P(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const jD={beforeTitle:lo,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex"u"?jD[t].call(n,r):i}var q1;let bP=(q1=class extends Ao{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,r=this.options.setContext(this.getContext()),i=r.enabled&&n.options.animation&&r.animations,o=new mD(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=dU(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,i=dr(r,"beforeTitle",this,t),o=dr(r,"title",this,t),s=dr(r,"afterTitle",this,t);let a=[];return a=Fi(a,uo(i)),a=Fi(a,uo(o)),a=Fi(a,uo(s)),a}getBeforeBody(t,n){return yP(dr(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,i=[];return vt(t,o=>{const s={before:[],lines:[],after:[]},a=_P(r,o);Fi(s.before,uo(dr(a,"beforeLabel",this,o))),Fi(s.lines,dr(a,"label",this,o)),Fi(s.after,uo(dr(a,"afterLabel",this,o))),i.push(s)}),i}getAfterBody(t,n){return yP(dr(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,i=dr(r,"beforeFooter",this,t),o=dr(r,"footer",this,t),s=dr(r,"afterFooter",this,t);let a=[];return a=Fi(a,uo(i)),a=Fi(a,uo(o)),a=Fi(a,uo(s)),a}_createItems(t){const n=this._active,r=this.chart.data,i=[],o=[],s=[];let a=[],l,c;for(l=0,c=n.length;lt.filter(f,h,p,r))),t.itemSort&&(a=a.sort((f,h)=>t.itemSort(f,h,r))),vt(a,f=>{const h=_P(t.callbacks,f);i.push(dr(h,"labelColor",this,f)),o.push(dr(h,"labelPointStyle",this,f)),s.push(dr(h,"labelTextColor",this,f))}),this.labelColors=i,this.labelPointStyles=o,this.labelTextColors=s,this.dataPoints=a,a}update(t,n){const r=this.options.setContext(this.getContext()),i=this._active;let o,s=[];if(!i.length)this.opacity!==0&&(o={opacity:0});else{const a=Hu[r.position].call(this,i,this._eventPosition);s=this._createItems(r),this.title=this.getTitle(s,r),this.beforeBody=this.getBeforeBody(s,r),this.body=this.getBody(s,r),this.afterBody=this.getAfterBody(s,r),this.footer=this.getFooter(s,r);const l=this._size=mP(this,r),c=Object.assign({},a,l),f=gP(this.chart,r,c),h=vP(r,c,f,this.chart);this.xAlign=f.xAlign,this.yAlign=f.yAlign,o={opacity:1,x:h.x,y:h.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=s,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,r,i){const o=this.getCaretPosition(t,r,i);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)}getCaretPosition(t,n,r){const{xAlign:i,yAlign:o}=this,{caretSize:s,cornerRadius:a}=r,{topLeft:l,topRight:c,bottomLeft:f,bottomRight:h}=Aa(a),{x:p,y:m}=t,{width:v,height:y}=n;let x,_,w,S,T,P;return o==="center"?(T=m+y/2,i==="left"?(x=p,_=x-s,S=T+s,P=T-s):(x=p+v,_=x+s,S=T-s,P=T+s),w=x):(i==="left"?_=p+Math.max(l,f)+s:i==="right"?_=p+v-Math.max(c,h)-s:_=this.caretX,o==="top"?(S=m,T=S-s,x=_-s,w=_+s):(S=m+y,T=S+s,x=_+s,w=_-s),P=S),{x1:x,x2:_,x3:w,y1:S,y2:T,y3:P}}drawTitle(t,n,r){const i=this.title,o=i.length;let s,a,l;if(o){const c=ic(r.rtl,this.x,this.width);for(t.x=Zh(this,r.titleAlign,r),n.textAlign=c.textAlign(r.titleAlign),n.textBaseline="middle",s=gn(r.titleFont),a=r.titleSpacing,n.fillStyle=r.titleColor,n.font=s.string,l=0;lS!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,$f(t,{x,y,w:c,h:l,radius:w}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),$f(t,{x:_,y:y+1,w:c-2,h:l-2,radius:w}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(x,y,c,l),t.strokeRect(x,y,c,l),t.fillStyle=s.backgroundColor,t.fillRect(_,y+1,c-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){const{body:i}=this,{bodySpacing:o,bodyAlign:s,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:f}=r,h=gn(r.bodyFont);let p=h.lineHeight,m=0;const v=ic(r.rtl,this.x,this.width),y=function(D){n.fillText(D,v.x(t.x+m),t.y+p/2),t.y+=p+o},x=v.textAlign(s);let _,w,S,T,P,k,N;for(n.textAlign=s,n.textBaseline="middle",n.font=h.string,t.x=Zh(this,x,r),n.fillStyle=r.bodyColor,vt(this.beforeBody,y),m=a&&x!=="right"?s==="center"?c/2+f:c+2+f:0,T=0,k=i.length;T0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,r=this.$animations,i=r&&r.x,o=r&&r.y;if(i||o){const s=Hu[t.position].call(this,this._active,this._eventPosition);if(!s)return;const a=this._size=mP(this,t),l=Object.assign({},s,this._size),c=gP(n,t,l),f=vP(t,l,c,n);(i._to!==f.x||o._to!==f.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=s.x,this.caretY=s.y,this._resolveAnimations().update(this,f))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},o={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const s=er(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(t.save(),t.globalAlpha=r,this.drawBackground(o,t,i,n),uD(t,n.textDirection),o.y+=s.top,this.drawTitle(o,t,n),this.drawBody(o,t,n),this.drawFooter(o,t,n),fD(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const r=this._active,i=t.map(({datasetIndex:a,index:l})=>{const c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[l],index:l}}),o=!ig(r,i),s=this._positionChanged(i,n);(o||s)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,o=this._active||[],s=this._getActiveElements(t,o,n,r),a=this._positionChanged(s,t),l=n||!ig(s,o)||a;return l&&(this._active=s,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,r,i){const o=this.options;if(t.type==="mouseout")return[];if(!i)return n;const s=this.chart.getElementsAtEventForMode(t,o.mode,o,r);return o.reverse&&s.reverse(),s}_positionChanged(t,n){const{caretX:r,caretY:i,options:o}=this,s=Hu[o.position].call(this,t,n);return s!==!1&&(r!==s.x||i!==s.y)}},xe(q1,"positioners",Hu),q1);var hU={id:"tooltip",_element:bP,positioners:Hu,afterInit(e,t,n){n&&(e.tooltip=new bP({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:jD},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},pU=Object.freeze({__proto__:null,Colors:Tz,Decimation:Mz,Filler:Kz,Legend:nU,SubTitle:oU,Title:iU,Tooltip:hU});const mU=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function gU(e,t,n,r){const i=e.indexOf(t);if(i===-1)return mU(e,t,n,r);const o=e.lastIndexOf(t);return i!==o?n:i}const vU=(e,t)=>e===null?null:En(Math.round(e),0,t);function wP(e){const t=this.getLabels();return e>=0&&en.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}xe(ib,"id","category"),xe(ib,"defaults",{ticks:{callback:wP}});function yU(e,t){const n=[],{bounds:i,step:o,min:s,max:a,precision:l,count:c,maxTicks:f,maxDigits:h,includeBounds:p}=e,m=o||1,v=f-1,{min:y,max:x}=t,_=!ct(s),w=!ct(a),S=!ct(c),T=(x-y)/(h+1);let P=vO((x-y)/v/m)*m,k,N,D,z;if(P<1e-14&&!_&&!w)return[{value:y},{value:x}];z=Math.ceil(x/P)-Math.floor(y/P),z>v&&(P=vO(z*P/v/m)*m),ct(l)||(k=Math.pow(10,l),P=Math.ceil(P*k)/k),i==="ticks"?(N=Math.floor(y/P)*P,D=Math.ceil(x/P)*P):(N=y,D=x),_&&w&&o&&p7((a-s)/o,P/1e3)?(z=Math.round(Math.min((a-s)/P,f)),P=(a-s)/z,N=s,D=a):S?(N=_?s:N,D=w?a:D,z=c-1,P=(D-N)/z):(z=(D-N)/P,of(z,Math.round(z),P/1e3)?z=Math.round(z):z=Math.ceil(z));const A=Math.max(yO(P),yO(N));k=Math.pow(10,ct(l)?A:l),N=Math.round(N*k)/k,D=Math.round(D*k)/k;let W=0;for(_&&(p&&N!==s?(n.push({value:s}),Ni=n?i:l,a=l=>o=r?o:l;if(t){const l=qi(i),c=qi(o);l<0&&c<0?a(0):l>0&&c>0&&s(0)}if(i===o){let l=o===0?1:Math.abs(o*.05);a(o+l),t||s(i-l)}this.min=i,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=t,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},o=this._range||this,s=yU(i,o);return t.bounds==="ticks"&&WL(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const t=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const i=(r-n)/Math.max(t.length-1,1)/2;n-=i,r+=i}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(t){return Ld(t,this.chart.options.locale,this.options.ticks.format)}}class ob extends dg{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=Gt(t)?t:0,this.max=Gt(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=vi(this.options.ticks.minRotation),i=(t?Math.sin(r):Math.cos(r))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,o.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}xe(ob,"id","linear"),xe(ob,"defaults",{ticks:{callback:ay.formatters.numeric}});const zf=e=>Math.floor(as(e)),ma=(e,t)=>Math.pow(10,zf(e)+t);function SP(e){return e/Math.pow(10,zf(e))===1}function CP(e,t,n){const r=Math.pow(10,n),i=Math.floor(e/r);return Math.ceil(t/r)-i}function _U(e,t){const n=t-e;let r=zf(n);for(;CP(e,t,r)>10;)r++;for(;CP(e,t,r)<10;)r--;return Math.min(r,zf(e))}function bU(e,{min:t,max:n}){t=Tr(e.min,t);const r=[],i=zf(t);let o=_U(t,n),s=o<0?Math.pow(10,Math.abs(o)):1;const a=Math.pow(10,o),l=i>o?Math.pow(10,i):0,c=Math.round((t-l)*s)/s,f=Math.floor((t-l)/a/10)*a*10;let h=Math.floor((c-f)/Math.pow(10,o)),p=Tr(e.min,Math.round((l+f+h*Math.pow(10,o))*s)/s);for(;p=10?h=h<15?15:20:h++,h>=20&&(o++,h=2,s=o>=0?1:s),p=Math.round((l+f+h*Math.pow(10,o))*s)/s;const m=Tr(e.max,p);return r.push({value:m,major:SP(m),significand:h}),r}class sb extends ll{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,n){const r=dg.prototype.parse.apply(this,[t,n]);if(r===0){this._zero=!0;return}return Gt(r)&&r>0?r:null}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=Gt(t)?Math.max(0,t):null,this.max=Gt(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!Gt(this._userMin)&&(this.min=t===ma(this.min,0)?ma(this.min,-1):ma(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let r=this.min,i=this.max;const o=a=>r=t?r:a,s=a=>i=n?i:a;r===i&&(r<=0?(o(1),s(10)):(o(ma(r,-1)),s(ma(i,1)))),r<=0&&o(ma(i,-1)),i<=0&&s(ma(r,1)),this.min=r,this.max=i}buildTicks(){const t=this.options,n={min:this._userMin,max:this._userMax},r=bU(n,this);return t.bounds==="ticks"&&WL(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}getLabelForValue(t){return t===void 0?"0":Ld(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=as(t),this._valueRange=as(this.max)-as(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(as(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}}xe(sb,"id","logarithmic"),xe(sb,"defaults",{ticks:{callback:ay.formatters.logarithmic,major:{enabled:!0}}});function ab(e){const t=e.ticks;if(t.display&&e.display){const n=er(t.backdropPadding);return Ke(t.font&&t.font.size,nn.font.size)+n.height}return 0}function wU(e,t,n){return n=kt(n)?n:[n],{w:R7(e,t.string,n),h:n.length*t.lineHeight}}function EP(e,t,n,r,i){return e===r||e===i?{start:t-n/2,end:t+n/2}:ei?{start:t-n,end:t}:{start:t,end:t+n}}function xU(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},n=Object.assign({},t),r=[],i=[],o=e._pointLabels.length,s=e.options.pointLabels,a=s.centerPointLabels?Ft/o:0;for(let l=0;lt.r&&(a=(r.end-t.r)/o,e.r=Math.max(e.r,t.r+a)),i.startt.b&&(l=(i.end-t.b)/s,e.b=Math.max(e.b,t.b+l))}function CU(e,t,n){const r=[],i=e._pointLabels.length,o=e.options,s=ab(o)/2,a=e.drawingArea,l=o.pointLabels.centerPointLabels?Ft/i:0;for(let c=0;c270||n<90)&&(e-=t),e}function PU(e,t){const{ctx:n,options:{pointLabels:r}}=e;for(let i=t-1;i>=0;i--){const o=r.setContext(e.getPointLabelContext(i)),s=gn(o.font),{x:a,y:l,textAlign:c,left:f,top:h,right:p,bottom:m}=e._pointLabelItems[i],{backdropColor:v}=o;if(!ct(v)){const y=Aa(o.borderRadius),x=er(o.backdropPadding);n.fillStyle=v;const _=f-x.left,w=h-x.top,S=p-f+x.width,T=m-h+x.height;Object.values(y).some(P=>P!==0)?(n.beginPath(),$f(n,{x:_,y:w,w:S,h:T,radius:y}),n.fill()):n.fillRect(_,w,S,T)}Wa(n,e._pointLabels[i],a,l+s.lineHeight/2,s,{color:o.color,textAlign:c,textBaseline:"middle"})}}function ID(e,t,n,r){const{ctx:i}=e;if(n)i.arc(e.xCenter,e.yCenter,t,0,Mt);else{let o=e.getPointPosition(0,t);i.moveTo(o.x,o.y);for(let s=1;s{const i=Ct(this.options.pointLabels.callback,[n,r],this);return i||i===0?i:""}).filter((n,r)=>this.chart.getDataVisibility(r))}fit(){const t=this.options;t.display&&t.pointLabels.display?xU(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,n,r,i){this.xCenter+=Math.floor((t-n)/2),this.yCenter+=Math.floor((r-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,n,r,i))}getIndexAngle(t){const n=Mt/(this._pointLabels.length||1),r=this.options.startAngle||0;return Pr(t*n+vi(r))}getDistanceFromCenterForValue(t){if(ct(t))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*n:(t-this.min)*n}getValueForDistanceFromCenter(t){if(ct(t))return NaN;const n=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(t){const n=this._pointLabels||[];if(t>=0&&t{if(h!==0){l=this.getDistanceFromCenterForValue(f.value);const p=this.getContext(h),m=i.setContext(p),v=o.setContext(p);kU(this,m,l,s,v)}}),r.display){for(t.save(),a=s-1;a>=0;a--){const f=r.setContext(this.getPointLabelContext(a)),{color:h,lineWidth:p}=f;!p||!h||(t.lineWidth=p,t.strokeStyle=h,t.setLineDash(f.borderDash),t.lineDashOffset=f.borderDashOffset,l=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),c=this.getPointPosition(a,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(c.x,c.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,n=this.options,r=n.ticks;if(!r.display)return;const i=this.getIndexAngle(0);let o,s;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(i),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((a,l)=>{if(l===0&&!n.reverse)return;const c=r.setContext(this.getContext(l)),f=gn(c.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=f.string,s=t.measureText(a.label).width,t.fillStyle=c.backdropColor;const h=er(c.backdropPadding);t.fillRect(-s/2-h.left,-o-f.size/2-h.top,s+h.width,f.size+h.height)}Wa(t,a.label,0,-o,f,{color:c.color})}),t.restore()}drawTitle(){}}xe(Wu,"id","radialLinear"),xe(Wu,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:ay.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),xe(Wu,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),xe(Wu,"descriptors",{angleLines:{_fallback:"grid"}});const dy={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},mr=Object.keys(dy);function RU(e,t){return e-t}function TP(e,t){if(ct(t))return null;const n=e._adapter,{parser:r,round:i,isoWeekday:o}=e._parseOpts;let s=t;return typeof r=="function"&&(s=r(s)),Gt(s)||(s=typeof r=="string"?n.parse(s,r):n.parse(s)),s===null?null:(i&&(s=i==="week"&&(bc(o)||o===!0)?n.startOf(s,"isoWeek",o):n.startOf(s,i)),+s)}function OP(e,t,n,r){const i=mr.length;for(let o=mr.indexOf(e);o=mr.indexOf(n);o--){const s=mr[o];if(dy[s].common&&e._adapter.diff(i,r,s)>=t-1)return s}return mr[n?mr.indexOf(n):0]}function LU(e){for(let t=mr.indexOf(e)+1,n=mr.length;t=t?n[r]:n[i];e[o]=!0}}function DU(e,t,n,r){const i=e._adapter,o=+i.startOf(t[0].value,r),s=t[t.length-1].value;let a,l;for(a=o;a<=s;a=+i.add(a,1,r))l=n[a],l>=0&&(t[l].major=!0);return t}function kP(e,t,n){const r=[],i={},o=t.length;let s,a;for(s=0;s+t.value))}initOffsets(t=[]){let n=0,r=0,i,o;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?n=1-i:n=(this.getDecimalForValue(t[1])-i)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?r=o:r=(o-this.getDecimalForValue(t[t.length-2]))/2);const s=t.length<3?.5:.25;n=En(n,0,s),r=En(r,0,s),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const t=this._adapter,n=this.min,r=this.max,i=this.options,o=i.time,s=o.unit||OP(o.minUnit,n,r,this._getLabelCapacity(n)),a=Ke(i.ticks.stepSize,1),l=s==="week"?o.isoWeekday:!1,c=bc(l)||l===!0,f={};let h=n,p,m;if(c&&(h=+t.startOf(h,"isoWeek",l)),h=+t.startOf(h,c?"day":s),t.diff(r,n,s)>1e5*a)throw new Error(n+" and "+r+" are too far apart with stepSize of "+a+" "+s);const v=i.ticks.source==="data"&&this.getDataTimestamps();for(p=h,m=0;py-x).map(y=>+y)}getLabelForValue(t){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(t,r.tooltipFormat):n.format(t,r.displayFormats.datetime)}_tickFormatFunction(t,n,r,i){const o=this.options,s=o.ticks.callback;if(s)return Ct(s,[t,n,r],this);const a=o.time.displayFormats,l=this._unit,c=this._majorUnit,f=l&&a[l],h=c&&a[c],p=r[n],m=c&&h&&p&&p.major;return this._adapter.format(t,i||(m?h:f))}generateTickLabels(t){let n,r,i;for(n=0,r=t.length;n0?a:1}getDataTimestamps(){let t=this._cache.data||[],n,r;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,r=i.length;n=e[r].pos&&t<=e[i].pos&&({lo:r,hi:i}=_o(e,"pos",t)),{pos:o,time:a}=e[r],{pos:s,time:l}=e[i]):(t>=e[r].time&&t<=e[i].time&&({lo:r,hi:i}=_o(e,"time",t)),{time:o,pos:a}=e[r],{time:s,pos:l}=e[i]);const c=s-o;return c?a+(l-a)*(t-o)/c:a}class lb extends Uf{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=Kh(n,this.min),this._tableRange=Kh(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:r}=this,i=[],o=[];let s,a,l,c,f;for(s=0,a=t.length;s=n&&c<=r&&i.push(c);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(s=0,a=i.length;sT+P.before.length+P.lines.length+P.after.length,0);if(_+=e.beforeBody.length+e.afterBody.length,h&&(y+=h*c.lineHeight+(h-1)*t.titleSpacing+t.titleMarginBottom),_){const T=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;y+=m*T+(_-m)*l.lineHeight+(_-1)*t.bodySpacing}p&&(y+=t.footerMarginTop+p*f.lineHeight+(p-1)*t.footerSpacing);let w=0;const S=function(T){x=Math.max(x,n.measureText(T).width+w)};return n.save(),n.font=c.string,vt(e.title,S),n.font=l.string,vt(e.beforeBody.concat(e.afterBody),S),w=t.displayColors?s+2+t.boxPadding:0,vt(r,T=>{vt(T.before,S),vt(T.lines,S),vt(T.after,S)}),w=0,n.font=f.string,vt(e.footer,S),n.restore(),x+=v.width,{width:x,height:y}}function dU(e,t){const{y:n,height:r}=t;return ne.height-r/2?"bottom":"center"}function hU(e,t,n,r){const{x:i,width:o}=r,s=n.caretSize+n.caretPadding;if(e==="left"&&i+o+s>t.width||e==="right"&&i-o-s<0)return!0}function pU(e,t,n,r){const{x:i,width:o}=n,{width:s,chartArea:{left:a,right:l}}=e;let c="center";return r==="center"?c=i<=(a+l)/2?"left":"right":i<=o/2?c="left":i>=s-o/2&&(c="right"),hU(c,e,t,n)&&(c="center"),c}function dP(e,t,n){const r=n.yAlign||t.yAlign||dU(e,n);return{xAlign:n.xAlign||t.xAlign||pU(e,t,n,r),yAlign:r}}function mU(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function gU(e,t,n){let{y:r,height:i}=e;return t==="top"?r+=n:t==="bottom"?r-=i+n:r-=i/2,r}function hP(e,t,n,r){const{caretSize:i,caretPadding:o,cornerRadius:s}=e,{xAlign:a,yAlign:l}=n,c=i+o,{topLeft:f,topRight:h,bottomLeft:p,bottomRight:m}=Aa(s);let v=mU(t,a);const y=gU(t,l,c);return l==="center"?a==="left"?v+=c:a==="right"&&(v-=c):a==="left"?v-=Math.max(f,p)+i:a==="right"&&(v+=Math.max(h,m)+i),{x:En(v,0,r.width-t.width),y:En(y,0,r.height-t.height)}}function Kh(e,t,n){const r=er(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function pP(e){return $i([],fo(e))}function vU(e,t,n){return qs(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function mP(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const ND={beforeTitle:co,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex"u"?ND[t].call(n,r):i}var H1;let gP=(H1=class extends jo{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,r=this.options.setContext(this.getContext()),i=r.enabled&&n.options.animation&&r.animations,o=new fD(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=vU(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,i=dr(r,"beforeTitle",this,t),o=dr(r,"title",this,t),s=dr(r,"afterTitle",this,t);let a=[];return a=$i(a,fo(i)),a=$i(a,fo(o)),a=$i(a,fo(s)),a}getBeforeBody(t,n){return pP(dr(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,i=[];return vt(t,o=>{const s={before:[],lines:[],after:[]},a=mP(r,o);$i(s.before,fo(dr(a,"beforeLabel",this,o))),$i(s.lines,dr(a,"label",this,o)),$i(s.after,fo(dr(a,"afterLabel",this,o))),i.push(s)}),i}getAfterBody(t,n){return pP(dr(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,i=dr(r,"beforeFooter",this,t),o=dr(r,"footer",this,t),s=dr(r,"afterFooter",this,t);let a=[];return a=$i(a,fo(i)),a=$i(a,fo(o)),a=$i(a,fo(s)),a}_createItems(t){const n=this._active,r=this.chart.data,i=[],o=[],s=[];let a=[],l,c;for(l=0,c=n.length;lt.filter(f,h,p,r))),t.itemSort&&(a=a.sort((f,h)=>t.itemSort(f,h,r))),vt(a,f=>{const h=mP(t.callbacks,f);i.push(dr(h,"labelColor",this,f)),o.push(dr(h,"labelPointStyle",this,f)),s.push(dr(h,"labelTextColor",this,f))}),this.labelColors=i,this.labelPointStyles=o,this.labelTextColors=s,this.dataPoints=a,a}update(t,n){const r=this.options.setContext(this.getContext()),i=this._active;let o,s=[];if(!i.length)this.opacity!==0&&(o={opacity:0});else{const a=Uu[r.position].call(this,i,this._eventPosition);s=this._createItems(r),this.title=this.getTitle(s,r),this.beforeBody=this.getBeforeBody(s,r),this.body=this.getBody(s,r),this.afterBody=this.getAfterBody(s,r),this.footer=this.getFooter(s,r);const l=this._size=fP(this,r),c=Object.assign({},a,l),f=dP(this.chart,r,c),h=hP(r,c,f,this.chart);this.xAlign=f.xAlign,this.yAlign=f.yAlign,o={opacity:1,x:h.x,y:h.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=s,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,r,i){const o=this.getCaretPosition(t,r,i);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)}getCaretPosition(t,n,r){const{xAlign:i,yAlign:o}=this,{caretSize:s,cornerRadius:a}=r,{topLeft:l,topRight:c,bottomLeft:f,bottomRight:h}=Aa(a),{x:p,y:m}=t,{width:v,height:y}=n;let x,_,w,S,T,P;return o==="center"?(T=m+y/2,i==="left"?(x=p,_=x-s,S=T+s,P=T-s):(x=p+v,_=x+s,S=T-s,P=T+s),w=x):(i==="left"?_=p+Math.max(l,f)+s:i==="right"?_=p+v-Math.max(c,h)-s:_=this.caretX,o==="top"?(S=m,T=S-s,x=_-s,w=_+s):(S=m+y,T=S+s,x=_+s,w=_-s),P=S),{x1:x,x2:_,x3:w,y1:S,y2:T,y3:P}}drawTitle(t,n,r){const i=this.title,o=i.length;let s,a,l;if(o){const c=nc(r.rtl,this.x,this.width);for(t.x=Kh(this,r.titleAlign,r),n.textAlign=c.textAlign(r.titleAlign),n.textBaseline="middle",s=gn(r.titleFont),a=r.titleSpacing,n.fillStyle=r.titleColor,n.font=s.string,l=0;lS!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,If(t,{x,y,w:c,h:l,radius:w}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),If(t,{x:_,y:y+1,w:c-2,h:l-2,radius:w}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(x,y,c,l),t.strokeRect(x,y,c,l),t.fillStyle=s.backgroundColor,t.fillRect(_,y+1,c-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){const{body:i}=this,{bodySpacing:o,bodyAlign:s,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:f}=r,h=gn(r.bodyFont);let p=h.lineHeight,m=0;const v=nc(r.rtl,this.x,this.width),y=function(D){n.fillText(D,v.x(t.x+m),t.y+p/2),t.y+=p+o},x=v.textAlign(s);let _,w,S,T,P,k,N;for(n.textAlign=s,n.textBaseline="middle",n.font=h.string,t.x=Kh(this,x,r),n.fillStyle=r.bodyColor,vt(this.beforeBody,y),m=a&&x!=="right"?s==="center"?c/2+f:c+2+f:0,T=0,k=i.length;T0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,r=this.$animations,i=r&&r.x,o=r&&r.y;if(i||o){const s=Uu[t.position].call(this,this._active,this._eventPosition);if(!s)return;const a=this._size=fP(this,t),l=Object.assign({},s,this._size),c=dP(n,t,l),f=hP(t,l,c,n);(i._to!==f.x||o._to!==f.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=s.x,this.caretY=s.y,this._resolveAnimations().update(this,f))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},o={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const s=er(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(t.save(),t.globalAlpha=r,this.drawBackground(o,t,i,n),sD(t,n.textDirection),o.y+=s.top,this.drawTitle(o,t,n),this.drawBody(o,t,n),this.drawFooter(o,t,n),aD(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const r=this._active,i=t.map(({datasetIndex:a,index:l})=>{const c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[l],index:l}}),o=!og(r,i),s=this._positionChanged(i,n);(o||s)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,o=this._active||[],s=this._getActiveElements(t,o,n,r),a=this._positionChanged(s,t),l=n||!og(s,o)||a;return l&&(this._active=s,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,r,i){const o=this.options;if(t.type==="mouseout")return[];if(!i)return n;const s=this.chart.getElementsAtEventForMode(t,o.mode,o,r);return o.reverse&&s.reverse(),s}_positionChanged(t,n){const{caretX:r,caretY:i,options:o}=this,s=Uu[o.position].call(this,t,n);return s!==!1&&(r!==s.x||i!==s.y)}},xe(H1,"positioners",Uu),H1);var yU={id:"tooltip",_element:gP,positioners:Uu,afterInit(e,t,n){n&&(e.tooltip=new gP({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:ND},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},_U=Object.freeze({__proto__:null,Colors:Rz,Decimation:Az,Filler:tU,Legend:aU,SubTitle:uU,Title:cU,Tooltip:yU});const bU=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function wU(e,t,n,r){const i=e.indexOf(t);if(i===-1)return bU(e,t,n,r);const o=e.lastIndexOf(t);return i!==o?n:i}const xU=(e,t)=>e===null?null:En(Math.round(e),0,t);function vP(e){const t=this.getLabels();return e>=0&&en.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}xe(tb,"id","category"),xe(tb,"defaults",{ticks:{callback:vP}});function SU(e,t){const n=[],{bounds:i,step:o,min:s,max:a,precision:l,count:c,maxTicks:f,maxDigits:h,includeBounds:p}=e,m=o||1,v=f-1,{min:y,max:x}=t,_=!ct(s),w=!ct(a),S=!ct(c),T=(x-y)/(h+1);let P=hO((x-y)/v/m)*m,k,N,D,z;if(P<1e-14&&!_&&!w)return[{value:y},{value:x}];z=Math.ceil(x/P)-Math.floor(y/P),z>v&&(P=hO(z*P/v/m)*m),ct(l)||(k=Math.pow(10,l),P=Math.ceil(P*k)/k),i==="ticks"?(N=Math.floor(y/P)*P,D=Math.ceil(x/P)*P):(N=y,D=x),_&&w&&o&&_7((a-s)/o,P/1e3)?(z=Math.round(Math.min((a-s)/P,f)),P=(a-s)/z,N=s,D=a):S?(N=_?s:N,D=w?a:D,z=c-1,P=(D-N)/z):(z=(D-N)/P,nf(z,Math.round(z),P/1e3)?z=Math.round(z):z=Math.ceil(z));const A=Math.max(pO(P),pO(N));k=Math.pow(10,ct(l)?A:l),N=Math.round(N*k)/k,D=Math.round(D*k)/k;let W=0;for(_&&(p&&N!==s?(n.push({value:s}),Ni=n?i:l,a=l=>o=r?o:l;if(t){const l=Gi(i),c=Gi(o);l<0&&c<0?a(0):l>0&&c>0&&s(0)}if(i===o){let l=o===0?1:Math.abs(o*.05);a(o+l),t||s(i-l)}this.min=i,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=t,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},o=this._range||this,s=SU(i,o);return t.bounds==="ticks"&&zL(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const t=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const i=(r-n)/Math.max(t.length-1,1)/2;n-=i,r+=i}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(t){return Rd(t,this.chart.options.locale,this.options.ticks.format)}}class nb extends hg{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=qt(t)?t:0,this.max=qt(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=yi(this.options.ticks.minRotation),i=(t?Math.sin(r):Math.cos(r))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,o.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}xe(nb,"id","linear"),xe(nb,"defaults",{ticks:{callback:oy.formatters.numeric}});const $f=e=>Math.floor(cs(e)),ma=(e,t)=>Math.pow(10,$f(e)+t);function _P(e){return e/Math.pow(10,$f(e))===1}function bP(e,t,n){const r=Math.pow(10,n),i=Math.floor(e/r);return Math.ceil(t/r)-i}function CU(e,t){const n=t-e;let r=$f(n);for(;bP(e,t,r)>10;)r++;for(;bP(e,t,r)<10;)r--;return Math.min(r,$f(e))}function EU(e,{min:t,max:n}){t=Tr(e.min,t);const r=[],i=$f(t);let o=CU(t,n),s=o<0?Math.pow(10,Math.abs(o)):1;const a=Math.pow(10,o),l=i>o?Math.pow(10,i):0,c=Math.round((t-l)*s)/s,f=Math.floor((t-l)/a/10)*a*10;let h=Math.floor((c-f)/Math.pow(10,o)),p=Tr(e.min,Math.round((l+f+h*Math.pow(10,o))*s)/s);for(;p=10?h=h<15?15:20:h++,h>=20&&(o++,h=2,s=o>=0?1:s),p=Math.round((l+f+h*Math.pow(10,o))*s)/s;const m=Tr(e.max,p);return r.push({value:m,major:_P(m),significand:h}),r}class rb extends al{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,n){const r=hg.prototype.parse.apply(this,[t,n]);if(r===0){this._zero=!0;return}return qt(r)&&r>0?r:null}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=qt(t)?Math.max(0,t):null,this.max=qt(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!qt(this._userMin)&&(this.min=t===ma(this.min,0)?ma(this.min,-1):ma(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let r=this.min,i=this.max;const o=a=>r=t?r:a,s=a=>i=n?i:a;r===i&&(r<=0?(o(1),s(10)):(o(ma(r,-1)),s(ma(i,1)))),r<=0&&o(ma(i,-1)),i<=0&&s(ma(r,1)),this.min=r,this.max=i}buildTicks(){const t=this.options,n={min:this._userMin,max:this._userMax},r=EU(n,this);return t.bounds==="ticks"&&zL(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}getLabelForValue(t){return t===void 0?"0":Rd(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=cs(t),this._valueRange=cs(this.max)-cs(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(cs(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}}xe(rb,"id","logarithmic"),xe(rb,"defaults",{ticks:{callback:oy.formatters.logarithmic,major:{enabled:!0}}});function ib(e){const t=e.ticks;if(t.display&&e.display){const n=er(t.backdropPadding);return Ke(t.font&&t.font.size,tn.font.size)+n.height}return 0}function TU(e,t,n){return n=kt(n)?n:[n],{w:j7(e,t.string,n),h:n.length*t.lineHeight}}function wP(e,t,n,r,i){return e===r||e===i?{start:t-n/2,end:t+n/2}:ei?{start:t-n,end:t}:{start:t,end:t+n}}function OU(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},n=Object.assign({},t),r=[],i=[],o=e._pointLabels.length,s=e.options.pointLabels,a=s.centerPointLabels?It/o:0;for(let l=0;lt.r&&(a=(r.end-t.r)/o,e.r=Math.max(e.r,t.r+a)),i.startt.b&&(l=(i.end-t.b)/s,e.b=Math.max(e.b,t.b+l))}function kU(e,t,n){const r=[],i=e._pointLabels.length,o=e.options,s=ib(o)/2,a=e.drawingArea,l=o.pointLabels.centerPointLabels?It/i:0;for(let c=0;c270||n<90)&&(e-=t),e}function LU(e,t){const{ctx:n,options:{pointLabels:r}}=e;for(let i=t-1;i>=0;i--){const o=r.setContext(e.getPointLabelContext(i)),s=gn(o.font),{x:a,y:l,textAlign:c,left:f,top:h,right:p,bottom:m}=e._pointLabelItems[i],{backdropColor:v}=o;if(!ct(v)){const y=Aa(o.borderRadius),x=er(o.backdropPadding);n.fillStyle=v;const _=f-x.left,w=h-x.top,S=p-f+x.width,T=m-h+x.height;Object.values(y).some(P=>P!==0)?(n.beginPath(),If(n,{x:_,y:w,w:S,h:T,radius:y}),n.fill()):n.fillRect(_,w,S,T)}Wa(n,e._pointLabels[i],a,l+s.lineHeight/2,s,{color:o.color,textAlign:c,textBaseline:"middle"})}}function LD(e,t,n,r){const{ctx:i}=e;if(n)i.arc(e.xCenter,e.yCenter,t,0,Mt);else{let o=e.getPointPosition(0,t);i.moveTo(o.x,o.y);for(let s=1;s{const i=Ct(this.options.pointLabels.callback,[n,r],this);return i||i===0?i:""}).filter((n,r)=>this.chart.getDataVisibility(r))}fit(){const t=this.options;t.display&&t.pointLabels.display?OU(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,n,r,i){this.xCenter+=Math.floor((t-n)/2),this.yCenter+=Math.floor((r-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,n,r,i))}getIndexAngle(t){const n=Mt/(this._pointLabels.length||1),r=this.options.startAngle||0;return Pr(t*n+yi(r))}getDistanceFromCenterForValue(t){if(ct(t))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*n:(t-this.min)*n}getValueForDistanceFromCenter(t){if(ct(t))return NaN;const n=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(t){const n=this._pointLabels||[];if(t>=0&&t{if(h!==0){l=this.getDistanceFromCenterForValue(f.value);const p=this.getContext(h),m=i.setContext(p),v=o.setContext(p);DU(this,m,l,s,v)}}),r.display){for(t.save(),a=s-1;a>=0;a--){const f=r.setContext(this.getPointLabelContext(a)),{color:h,lineWidth:p}=f;!p||!h||(t.lineWidth=p,t.strokeStyle=h,t.setLineDash(f.borderDash),t.lineDashOffset=f.borderDashOffset,l=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),c=this.getPointPosition(a,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(c.x,c.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,n=this.options,r=n.ticks;if(!r.display)return;const i=this.getIndexAngle(0);let o,s;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(i),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((a,l)=>{if(l===0&&!n.reverse)return;const c=r.setContext(this.getContext(l)),f=gn(c.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=f.string,s=t.measureText(a.label).width,t.fillStyle=c.backdropColor;const h=er(c.backdropPadding);t.fillRect(-s/2-h.left,-o-f.size/2-h.top,s+h.width,f.size+h.height)}Wa(t,a.label,0,-o,f,{color:c.color})}),t.restore()}drawTitle(){}}xe(Vu,"id","radialLinear"),xe(Vu,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:oy.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),xe(Vu,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),xe(Vu,"descriptors",{angleLines:{_fallback:"grid"}});const uy={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},mr=Object.keys(uy);function jU(e,t){return e-t}function xP(e,t){if(ct(t))return null;const n=e._adapter,{parser:r,round:i,isoWeekday:o}=e._parseOpts;let s=t;return typeof r=="function"&&(s=r(s)),qt(s)||(s=typeof r=="string"?n.parse(s,r):n.parse(s)),s===null?null:(i&&(s=i==="week"&&(yc(o)||o===!0)?n.startOf(s,"isoWeek",o):n.startOf(s,i)),+s)}function SP(e,t,n,r){const i=mr.length;for(let o=mr.indexOf(e);o=mr.indexOf(n);o--){const s=mr[o];if(uy[s].common&&e._adapter.diff(i,r,s)>=t-1)return s}return mr[n?mr.indexOf(n):0]}function FU(e){for(let t=mr.indexOf(e)+1,n=mr.length;t=t?n[r]:n[i];e[o]=!0}}function $U(e,t,n,r){const i=e._adapter,o=+i.startOf(t[0].value,r),s=t[t.length-1].value;let a,l;for(a=o;a<=s;a=+i.add(a,1,r))l=n[a],l>=0&&(t[l].major=!0);return t}function EP(e,t,n){const r=[],i={},o=t.length;let s,a;for(s=0;s+t.value))}initOffsets(t=[]){let n=0,r=0,i,o;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?n=1-i:n=(this.getDecimalForValue(t[1])-i)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?r=o:r=(o-this.getDecimalForValue(t[t.length-2]))/2);const s=t.length<3?.5:.25;n=En(n,0,s),r=En(r,0,s),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const t=this._adapter,n=this.min,r=this.max,i=this.options,o=i.time,s=o.unit||SP(o.minUnit,n,r,this._getLabelCapacity(n)),a=Ke(i.ticks.stepSize,1),l=s==="week"?o.isoWeekday:!1,c=yc(l)||l===!0,f={};let h=n,p,m;if(c&&(h=+t.startOf(h,"isoWeek",l)),h=+t.startOf(h,c?"day":s),t.diff(r,n,s)>1e5*a)throw new Error(n+" and "+r+" are too far apart with stepSize of "+a+" "+s);const v=i.ticks.source==="data"&&this.getDataTimestamps();for(p=h,m=0;py-x).map(y=>+y)}getLabelForValue(t){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(t,r.tooltipFormat):n.format(t,r.displayFormats.datetime)}_tickFormatFunction(t,n,r,i){const o=this.options,s=o.ticks.callback;if(s)return Ct(s,[t,n,r],this);const a=o.time.displayFormats,l=this._unit,c=this._majorUnit,f=l&&a[l],h=c&&a[c],p=r[n],m=c&&h&&p&&p.major;return this._adapter.format(t,i||(m?h:f))}generateTickLabels(t){let n,r,i;for(n=0,r=t.length;n0?a:1}getDataTimestamps(){let t=this._cache.data||[],n,r;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,r=i.length;n=e[r].pos&&t<=e[i].pos&&({lo:r,hi:i}=bo(e,"pos",t)),{pos:o,time:a}=e[r],{pos:s,time:l}=e[i]):(t>=e[r].time&&t<=e[i].time&&({lo:r,hi:i}=bo(e,"time",t)),{time:o,pos:a}=e[r],{time:s,pos:l}=e[i]);const c=s-o;return c?a+(l-a)*(t-o)/c:a}class ob extends Bf{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=Xh(n,this.min),this._tableRange=Xh(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:r}=this,i=[],o=[];let s,a,l,c,f;for(s=0,a=t.length;s=n&&c<=r&&i.push(c);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(s=0,a=i.length;st in e?c$(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */(function(e){function t(G,F){var j=G.length;G.push(F);e:for(;0>>1,ne=G[B];if(0>>1;Bi(te,j))sei(pe,te)?(G[B]=pe,G[se]=j,B=se):(G[B]=te,G[q]=j,B=q);else if(sei(pe,j))G[B]=pe,G[se]=j,B=se;else break e}}return F}function i(G,F){var j=G.sortIndex-F.sortIndex;return j!==0?j:G.id-F.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],c=[],f=1,h=null,p=3,m=!1,v=!1,y=!1,x=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(G){for(var F=n(c);F!==null;){if(F.callback===null)r(c);else if(F.startTime<=G)r(c),F.sortIndex=F.expirationTime,t(l,F);else break;F=n(c)}}function T(G){if(y=!1,S(G),!v)if(n(l)!==null)v=!0,ie(P);else{var F=n(c);F!==null&&oe(T,F.startTime-G)}}function P(G,F){v=!1,y&&(y=!1,_(D),D=-1),m=!0;var j=p;try{for(S(F),h=n(l);h!==null&&(!(h.expirationTime>F)||G&&!W());){var B=h.callback;if(typeof B=="function"){h.callback=null,p=h.priorityLevel;var ne=B(h.expirationTime<=F);F=e.unstable_now(),typeof ne=="function"?h.callback=ne:h===n(l)&&r(l),S(F)}else r(l);h=n(l)}if(h!==null)var H=!0;else{var q=n(c);q!==null&&oe(T,q.startTime-F),H=!1}return H}finally{h=null,p=j,m=!1}}var k=!1,N=null,D=-1,z=5,A=-1;function W(){return!(e.unstable_now()-AG||125B?(G.sortIndex=j,t(c,G),n(l)===null&&G===n(c)&&(y?(_(D),D=-1):y=!0,oe(T,j-B))):(G.sortIndex=ne,t(l,G),v||m||(v=!0,ie(P))),G},e.unstable_shouldYield=W,e.unstable_wrapCallback=function(G){var F=p;return function(){var j=p;p=F;try{return G.apply(this,arguments)}finally{p=j}}}})(FD);(function(e){e.exports=FD})(FU);/** + */(function(e){function t(G,F){var j=G.length;G.push(F);e:for(;0>>1,ne=G[B];if(0>>1;Bi(te,j))sei(pe,te)?(G[B]=pe,G[se]=j,B=se):(G[B]=te,G[q]=j,B=q);else if(sei(pe,j))G[B]=pe,G[se]=j,B=se;else break e}}return F}function i(G,F){var j=G.sortIndex-F.sortIndex;return j!==0?j:G.id-F.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],c=[],f=1,h=null,p=3,m=!1,v=!1,y=!1,x=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(G){for(var F=n(c);F!==null;){if(F.callback===null)r(c);else if(F.startTime<=G)r(c),F.sortIndex=F.expirationTime,t(l,F);else break;F=n(c)}}function T(G){if(y=!1,S(G),!v)if(n(l)!==null)v=!0,ie(P);else{var F=n(c);F!==null&&oe(T,F.startTime-G)}}function P(G,F){v=!1,y&&(y=!1,_(D),D=-1),m=!0;var j=p;try{for(S(F),h=n(l);h!==null&&(!(h.expirationTime>F)||G&&!W());){var B=h.callback;if(typeof B=="function"){h.callback=null,p=h.priorityLevel;var ne=B(h.expirationTime<=F);F=e.unstable_now(),typeof ne=="function"?h.callback=ne:h===n(l)&&r(l),S(F)}else r(l);h=n(l)}if(h!==null)var H=!0;else{var q=n(c);q!==null&&oe(T,q.startTime-F),H=!1}return H}finally{h=null,p=j,m=!1}}var k=!1,N=null,D=-1,z=5,A=-1;function W(){return!(e.unstable_now()-AG||125B?(G.sortIndex=j,t(c,G),n(l)===null&&G===n(c)&&(y?(_(D),D=-1):y=!0,oe(T,j-B))):(G.sortIndex=ne,t(l,G),v||m||(v=!0,ie(P))),G},e.unstable_shouldYield=W,e.unstable_wrapCallback=function(G){var F=p;return function(){var j=p;p=F;try{return G.apply(this,arguments)}finally{p=j}}}})(jD);AD.exports=jD;var UU=AD.exports;/** * @license React * react-dom.production.min.js * @@ -47,14 +47,14 @@ var c$=Object.defineProperty;var u$=(e,t,n)=>t in e?c$(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var $D=V,Dr=cb;function Ee(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ub=Object.prototype.hasOwnProperty,$U=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,MP={},RP={};function BU(e){return ub.call(RP,e)?!0:ub.call(MP,e)?!1:$U.test(e)?RP[e]=!0:(MP[e]=!0,!1)}function zU(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function UU(e,t,n,r){if(t===null||typeof t>"u"||zU(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function fr(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var Hn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Hn[e]=new fr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Hn[t]=new fr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Hn[e]=new fr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Hn[e]=new fr(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Hn[e]=new fr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Hn[e]=new fr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Hn[e]=new fr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Hn[e]=new fr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Hn[e]=new fr(e,5,!1,e.toLowerCase(),null,!1,!1)});var H2=/[\-:]([a-z])/g;function W2(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(H2,W2);Hn[t]=new fr(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(H2,W2);Hn[t]=new fr(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(H2,W2);Hn[t]=new fr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Hn[e]=new fr(e,1,!1,e.toLowerCase(),null,!1,!1)});Hn.xlinkHref=new fr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Hn[e]=new fr(e,1,!1,e.toLowerCase(),null,!0,!0)});function Y2(e,t,n,r){var i=Hn.hasOwnProperty(t)?Hn[t]:null;(i!==null?i.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),sb=Object.prototype.hasOwnProperty,VU=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,TP={},OP={};function HU(e){return sb.call(OP,e)?!0:sb.call(TP,e)?!1:VU.test(e)?OP[e]=!0:(TP[e]=!0,!1)}function WU(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function YU(e,t,n,r){if(t===null||typeof t>"u"||WU(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function fr(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var Hn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Hn[e]=new fr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Hn[t]=new fr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Hn[e]=new fr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Hn[e]=new fr(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Hn[e]=new fr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Hn[e]=new fr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Hn[e]=new fr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Hn[e]=new fr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Hn[e]=new fr(e,5,!1,e.toLowerCase(),null,!1,!1)});var $2=/[\-:]([a-z])/g;function B2(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace($2,B2);Hn[t]=new fr(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace($2,B2);Hn[t]=new fr(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace($2,B2);Hn[t]=new fr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Hn[e]=new fr(e,1,!1,e.toLowerCase(),null,!1,!1)});Hn.xlinkHref=new fr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Hn[e]=new fr(e,1,!1,e.toLowerCase(),null,!0,!0)});function z2(e,t,n,r){var i=Hn.hasOwnProperty(t)?Hn[t]:null;(i!==null?i.type!==0:r||!(2a||i[s]!==o[a]){var l=` -`+i[s].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{_0=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Yu(e):""}function VU(e){switch(e.tag){case 5:return Yu(e.type);case 16:return Yu("Lazy");case 13:return Yu("Suspense");case 19:return Yu("SuspenseList");case 0:case 2:case 15:return e=b0(e.type,!1),e;case 11:return e=b0(e.type.render,!1),e;case 1:return e=b0(e.type,!0),e;default:return""}}function pb(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Vl:return"Fragment";case Ul:return"Portal";case fb:return"Profiler";case q2:return"StrictMode";case db:return"Suspense";case hb:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case UD:return(e.displayName||"Context")+".Consumer";case zD:return(e._context.displayName||"Context")+".Provider";case G2:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Z2:return t=e.displayName||null,t!==null?t:pb(e.type)||"Memo";case Qo:t=e._payload,e=e._init;try{return pb(e(t))}catch{}}return null}function HU(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return pb(t);case 8:return t===q2?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function As(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function HD(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function WU(e){var t=HD(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Qh(e){e._valueTracker||(e._valueTracker=WU(e))}function WD(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=HD(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function hg(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function mb(e,t){var n=t.checked;return Ht({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function LP(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=As(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function YD(e,t){t=t.checked,t!=null&&Y2(e,"checked",t,!1)}function gb(e,t){YD(e,t);var n=As(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?vb(e,t.type,n):t.hasOwnProperty("defaultValue")&&vb(e,t.type,As(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function DP(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function vb(e,t,n){(t!=="number"||hg(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var qu=Array.isArray;function oc(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Jh.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Hf(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ff={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},YU=["Webkit","ms","Moz","O"];Object.keys(ff).forEach(function(e){YU.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ff[t]=ff[e]})});function KD(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ff.hasOwnProperty(e)&&ff[e]?(""+t).trim():t+"px"}function XD(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=KD(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var qU=Ht({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function bb(e,t){if(t){if(qU[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Ee(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Ee(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Ee(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Ee(62))}}function wb(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var xb=null;function K2(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Sb=null,sc=null,ac=null;function IP(e){if(e=Id(e)){if(typeof Sb!="function")throw Error(Ee(280));var t=e.stateNode;t&&(t=vy(t),Sb(e.stateNode,e.type,t))}}function QD(e){sc?ac?ac.push(e):ac=[e]:sc=e}function JD(){if(sc){var e=sc,t=ac;if(ac=sc=null,IP(e),t)for(e=0;e>>=0,e===0?32:31-(iV(e)/oV|0)|0}var ep=64,tp=4194304;function Gu(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function vg(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~i;a!==0?r=Gu(a):(o&=s,o!==0&&(r=Gu(o)))}else s=n&~i,s!==0?r=Gu(s):o!==0&&(r=Gu(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Ad(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-wi(t),e[t]=n}function cV(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=hf),YP=String.fromCharCode(32),qP=!1;function _A(e,t){switch(e){case"keyup":return IV.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function bA(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Hl=!1;function $V(e,t){switch(e){case"compositionend":return bA(t);case"keypress":return t.which!==32?null:(qP=!0,YP);case"textInput":return e=t.data,e===YP&&qP?null:e;default:return null}}function BV(e,t){if(Hl)return e==="compositionend"||!iS&&_A(e,t)?(e=vA(),Qp=tS=fs=null,Hl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=XP(n)}}function CA(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?CA(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function EA(){for(var e=window,t=hg();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=hg(e.document)}return t}function oS(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function ZV(e){var t=EA(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&CA(n.ownerDocument.documentElement,n)){if(r!==null&&oS(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=QP(n,o);var s=QP(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Wl=null,kb=null,mf=null,Mb=!1;function JP(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Mb||Wl==null||Wl!==hg(r)||(r=Wl,"selectionStart"in r&&oS(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),mf&&Kf(mf,r)||(mf=r,r=bg(kb,"onSelect"),0Gl||(e.current=jb[Gl],jb[Gl]=null,Gl--)}function Et(e,t){Gl++,jb[Gl]=e.current,e.current=t}var js={},tr=Gs(js),yr=Gs(!1),qa=js;function Cc(e,t){var n=e.type.contextTypes;if(!n)return js;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function _r(e){return e=e.childContextTypes,e!=null}function xg(){Rt(yr),Rt(tr)}function sk(e,t,n){if(tr.current!==js)throw Error(Ee(168));Et(tr,t),Et(yr,n)}function DA(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Ee(108,HU(e)||"Unknown",i));return Ht({},n,r)}function Sg(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||js,qa=tr.current,Et(tr,e),Et(yr,yr.current),!0}function ak(e,t,n){var r=e.stateNode;if(!r)throw Error(Ee(169));n?(e=DA(e,t,qa),r.__reactInternalMemoizedMergedChildContext=e,Rt(yr),Rt(tr),Et(tr,e)):Rt(yr),Et(yr,n)}var po=null,yy=!1,D0=!1;function AA(e){po===null?po=[e]:po.push(e)}function aH(e){yy=!0,AA(e)}function Zs(){if(!D0&&po!==null){D0=!0;var e=0,t=_t;try{var n=po;for(_t=1;e>=s,i-=s,bo=1<<32-wi(t)+i|n<D?(z=N,N=null):z=N.sibling;var A=p(_,N,S[D],T);if(A===null){N===null&&(N=z);break}e&&N&&A.alternate===null&&t(_,N),w=o(A,w,D),k===null?P=A:k.sibling=A,k=A,N=z}if(D===S.length)return n(_,N),jt&&xa(_,D),P;if(N===null){for(;DD?(z=N,N=null):z=N.sibling;var W=p(_,N,A.value,T);if(W===null){N===null&&(N=z);break}e&&N&&W.alternate===null&&t(_,N),w=o(W,w,D),k===null?P=W:k.sibling=W,k=W,N=z}if(A.done)return n(_,N),jt&&xa(_,D),P;if(N===null){for(;!A.done;D++,A=S.next())A=h(_,A.value,T),A!==null&&(w=o(A,w,D),k===null?P=A:k.sibling=A,k=A);return jt&&xa(_,D),P}for(N=r(_,N);!A.done;D++,A=S.next())A=m(N,_,D,A.value,T),A!==null&&(e&&A.alternate!==null&&N.delete(A.key===null?D:A.key),w=o(A,w,D),k===null?P=A:k.sibling=A,k=A);return e&&N.forEach(function(Y){return t(_,Y)}),jt&&xa(_,D),P}function x(_,w,S,T){if(typeof S=="object"&&S!==null&&S.type===Vl&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case Xh:e:{for(var P=S.key,k=w;k!==null;){if(k.key===P){if(P=S.type,P===Vl){if(k.tag===7){n(_,k.sibling),w=i(k,S.props.children),w.return=_,_=w;break e}}else if(k.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===Qo&&pk(P)===k.type){n(_,k.sibling),w=i(k,S.props),w.ref=Ru(_,k,S),w.return=_,_=w;break e}n(_,k);break}else t(_,k);k=k.sibling}S.type===Vl?(w=Fa(S.props.children,_.mode,T,S.key),w.return=_,_=w):(T=sm(S.type,S.key,S.props,null,_.mode,T),T.ref=Ru(_,w,S),T.return=_,_=T)}return s(_);case Ul:e:{for(k=S.key;w!==null;){if(w.key===k)if(w.tag===4&&w.stateNode.containerInfo===S.containerInfo&&w.stateNode.implementation===S.implementation){n(_,w.sibling),w=i(w,S.children||[]),w.return=_,_=w;break e}else{n(_,w);break}else t(_,w);w=w.sibling}w=U0(S,_.mode,T),w.return=_,_=w}return s(_);case Qo:return k=S._init,x(_,w,k(S._payload),T)}if(qu(S))return v(_,w,S,T);if(Tu(S))return y(_,w,S,T);lp(_,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,w!==null&&w.tag===6?(n(_,w.sibling),w=i(w,S),w.return=_,_=w):(n(_,w),w=z0(S,_.mode,T),w.return=_,_=w),s(_)):n(_,w)}return x}var Tc=VA(!0),HA=VA(!1),Fd={},Zi=Gs(Fd),ed=Gs(Fd),td=Gs(Fd);function Na(e){if(e===Fd)throw Error(Ee(174));return e}function pS(e,t){switch(Et(td,t),Et(ed,e),Et(Zi,Fd),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:_b(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=_b(t,e)}Rt(Zi),Et(Zi,t)}function Oc(){Rt(Zi),Rt(ed),Rt(td)}function WA(e){Na(td.current);var t=Na(Zi.current),n=_b(t,e.type);t!==n&&(Et(ed,e),Et(Zi,n))}function mS(e){ed.current===e&&(Rt(Zi),Rt(ed))}var zt=Gs(0);function kg(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var A0=[];function gS(){for(var e=0;en?n:4,e(!0);var r=j0.transition;j0.transition={};try{e(!1),t()}finally{_t=n,j0.transition=r}}function a4(){return ei().memoizedState}function fH(e,t,n){var r=Es(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},l4(e))c4(t,n);else if(n=$A(e,t,n,r),n!==null){var i=cr();xi(n,e,r,i),u4(n,t,r)}}function dH(e,t,n){var r=Es(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(l4(e))c4(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,Ti(a,s)){var l=t.interleaved;l===null?(i.next=i,dS(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=$A(e,t,i,r),n!==null&&(i=cr(),xi(n,e,r,i),u4(n,t,r))}}function l4(e){var t=e.alternate;return e===Vt||t!==null&&t===Vt}function c4(e,t){gf=Mg=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function u4(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Q2(e,n)}}var Rg={readContext:Jr,useCallback:qn,useContext:qn,useEffect:qn,useImperativeHandle:qn,useInsertionEffect:qn,useLayoutEffect:qn,useMemo:qn,useReducer:qn,useRef:qn,useState:qn,useDebugValue:qn,useDeferredValue:qn,useTransition:qn,useMutableSource:qn,useSyncExternalStore:qn,useId:qn,unstable_isNewReconciler:!1},hH={readContext:Jr,useCallback:function(e,t){return Bi().memoizedState=[e,t===void 0?null:t],e},useContext:Jr,useEffect:gk,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,nm(4194308,4,n4.bind(null,t,e),n)},useLayoutEffect:function(e,t){return nm(4194308,4,e,t)},useInsertionEffect:function(e,t){return nm(4,2,e,t)},useMemo:function(e,t){var n=Bi();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Bi();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=fH.bind(null,Vt,e),[r.memoizedState,e]},useRef:function(e){var t=Bi();return e={current:e},t.memoizedState=e},useState:mk,useDebugValue:wS,useDeferredValue:function(e){return Bi().memoizedState=e},useTransition:function(){var e=mk(!1),t=e[0];return e=uH.bind(null,e[1]),Bi().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Vt,i=Bi();if(jt){if(n===void 0)throw Error(Ee(407));n=n()}else{if(n=t(),Tn===null)throw Error(Ee(349));Za&30||GA(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,gk(KA.bind(null,r,o,e),[e]),r.flags|=2048,id(9,ZA.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Bi(),t=Tn.identifierPrefix;if(jt){var n=wo,r=bo;n=(r&~(1<<32-wi(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=nd++,0")&&(l=l.replace("",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{g0=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Hu(e):""}function qU(e){switch(e.tag){case 5:return Hu(e.type);case 16:return Hu("Lazy");case 13:return Hu("Suspense");case 19:return Hu("SuspenseList");case 0:case 2:case 15:return e=v0(e.type,!1),e;case 11:return e=v0(e.type.render,!1),e;case 1:return e=v0(e.type,!0),e;default:return""}}function ub(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case zl:return"Fragment";case Bl:return"Portal";case ab:return"Profiler";case U2:return"StrictMode";case lb:return"Suspense";case cb:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case BD:return(e.displayName||"Context")+".Consumer";case $D:return(e._context.displayName||"Context")+".Provider";case V2:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case H2:return t=e.displayName||null,t!==null?t:ub(e.type)||"Memo";case es:t=e._payload,e=e._init;try{return ub(e(t))}catch{}}return null}function GU(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ub(t);case 8:return t===U2?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Is(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function UD(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ZU(e){var t=UD(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Jh(e){e._valueTracker||(e._valueTracker=ZU(e))}function VD(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=UD(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function pg(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function fb(e,t){var n=t.checked;return Vt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function kP(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Is(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function HD(e,t){t=t.checked,t!=null&&z2(e,"checked",t,!1)}function db(e,t){HD(e,t);var n=Is(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?hb(e,t.type,n):t.hasOwnProperty("defaultValue")&&hb(e,t.type,Is(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function MP(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function hb(e,t,n){(t!=="number"||pg(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Wu=Array.isArray;function rc(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=ep.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Uf(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var cf={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},KU=["Webkit","ms","Moz","O"];Object.keys(cf).forEach(function(e){KU.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),cf[t]=cf[e]})});function GD(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||cf.hasOwnProperty(e)&&cf[e]?(""+t).trim():t+"px"}function ZD(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=GD(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var XU=Vt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function gb(e,t){if(t){if(XU[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Ee(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Ee(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Ee(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Ee(62))}}function vb(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var yb=null;function W2(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var _b=null,ic=null,oc=null;function LP(e){if(e=Ad(e)){if(typeof _b!="function")throw Error(Ee(280));var t=e.stateNode;t&&(t=my(t),_b(e.stateNode,e.type,t))}}function KD(e){ic?oc?oc.push(e):oc=[e]:ic=e}function XD(){if(ic){var e=ic,t=oc;if(oc=ic=null,LP(e),t)for(e=0;e>>=0,e===0?32:31-(lV(e)/cV|0)|0}var tp=64,np=4194304;function Yu(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function yg(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~i;a!==0?r=Yu(a):(o&=s,o!==0&&(r=Yu(o)))}else s=n&~i,s!==0?r=Yu(s):o!==0&&(r=Yu(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Ld(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-xi(t),e[t]=n}function hV(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=ff),UP=String.fromCharCode(32),VP=!1;function vA(e,t){switch(e){case"keyup":return zV.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function yA(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ul=!1;function VV(e,t){switch(e){case"compositionend":return yA(t);case"keypress":return t.which!==32?null:(VP=!0,UP);case"textInput":return e=t.data,e===UP&&VP?null:e;default:return null}}function HV(e,t){if(Ul)return e==="compositionend"||!J2&&vA(e,t)?(e=mA(),Jp=K2=hs=null,Ul=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=qP(n)}}function xA(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?xA(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function SA(){for(var e=window,t=pg();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=pg(e.document)}return t}function eS(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function JV(e){var t=SA(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&xA(n.ownerDocument.documentElement,n)){if(r!==null&&eS(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=GP(n,o);var s=GP(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Vl=null,Eb=null,hf=null,Tb=!1;function ZP(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Tb||Vl==null||Vl!==pg(r)||(r=Vl,"selectionStart"in r&&eS(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),hf&&Gf(hf,r)||(hf=r,r=wg(Eb,"onSelect"),0Yl||(e.current=Nb[Yl],Nb[Yl]=null,Yl--)}function Et(e,t){Yl++,Nb[Yl]=e.current,e.current=t}var Fs={},tr=Zs(Fs),yr=Zs(!1),Ya=Fs;function xc(e,t){var n=e.type.contextTypes;if(!n)return Fs;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function _r(e){return e=e.childContextTypes,e!=null}function Sg(){Rt(yr),Rt(tr)}function nk(e,t,n){if(tr.current!==Fs)throw Error(Ee(168));Et(tr,t),Et(yr,n)}function NA(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Ee(108,GU(e)||"Unknown",i));return Vt({},n,r)}function Cg(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Fs,Ya=tr.current,Et(tr,e),Et(yr,yr.current),!0}function rk(e,t,n){var r=e.stateNode;if(!r)throw Error(Ee(169));n?(e=NA(e,t,Ya),r.__reactInternalMemoizedMergedChildContext=e,Rt(yr),Rt(tr),Et(tr,e)):Rt(yr),Et(yr,n)}var mo=null,gy=!1,R0=!1;function LA(e){mo===null?mo=[e]:mo.push(e)}function fH(e){gy=!0,LA(e)}function Ks(){if(!R0&&mo!==null){R0=!0;var e=0,t=_t;try{var n=mo;for(_t=1;e>=s,i-=s,wo=1<<32-xi(t)+i|n<D?(z=N,N=null):z=N.sibling;var A=p(_,N,S[D],T);if(A===null){N===null&&(N=z);break}e&&N&&A.alternate===null&&t(_,N),w=o(A,w,D),k===null?P=A:k.sibling=A,k=A,N=z}if(D===S.length)return n(_,N),jt&&xa(_,D),P;if(N===null){for(;DD?(z=N,N=null):z=N.sibling;var W=p(_,N,A.value,T);if(W===null){N===null&&(N=z);break}e&&N&&W.alternate===null&&t(_,N),w=o(W,w,D),k===null?P=W:k.sibling=W,k=W,N=z}if(A.done)return n(_,N),jt&&xa(_,D),P;if(N===null){for(;!A.done;D++,A=S.next())A=h(_,A.value,T),A!==null&&(w=o(A,w,D),k===null?P=A:k.sibling=A,k=A);return jt&&xa(_,D),P}for(N=r(_,N);!A.done;D++,A=S.next())A=m(N,_,D,A.value,T),A!==null&&(e&&A.alternate!==null&&N.delete(A.key===null?D:A.key),w=o(A,w,D),k===null?P=A:k.sibling=A,k=A);return e&&N.forEach(function(Y){return t(_,Y)}),jt&&xa(_,D),P}function x(_,w,S,T){if(typeof S=="object"&&S!==null&&S.type===zl&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case Qh:e:{for(var P=S.key,k=w;k!==null;){if(k.key===P){if(P=S.type,P===zl){if(k.tag===7){n(_,k.sibling),w=i(k,S.props.children),w.return=_,_=w;break e}}else if(k.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===es&&uk(P)===k.type){n(_,k.sibling),w=i(k,S.props),w.ref=ku(_,k,S),w.return=_,_=w;break e}n(_,k);break}else t(_,k);k=k.sibling}S.type===zl?(w=Fa(S.props.children,_.mode,T,S.key),w.return=_,_=w):(T=am(S.type,S.key,S.props,null,_.mode,T),T.ref=ku(_,w,S),T.return=_,_=T)}return s(_);case Bl:e:{for(k=S.key;w!==null;){if(w.key===k)if(w.tag===4&&w.stateNode.containerInfo===S.containerInfo&&w.stateNode.implementation===S.implementation){n(_,w.sibling),w=i(w,S.children||[]),w.return=_,_=w;break e}else{n(_,w);break}else t(_,w);w=w.sibling}w=$0(S,_.mode,T),w.return=_,_=w}return s(_);case es:return k=S._init,x(_,w,k(S._payload),T)}if(Wu(S))return v(_,w,S,T);if(Cu(S))return y(_,w,S,T);cp(_,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,w!==null&&w.tag===6?(n(_,w.sibling),w=i(w,S),w.return=_,_=w):(n(_,w),w=F0(S,_.mode,T),w.return=_,_=w),s(_)):n(_,w)}return x}var Cc=zA(!0),UA=zA(!1),jd={},Ki=Zs(jd),Qf=Zs(jd),Jf=Zs(jd);function Na(e){if(e===jd)throw Error(Ee(174));return e}function cS(e,t){switch(Et(Jf,t),Et(Qf,e),Et(Ki,jd),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:mb(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=mb(t,e)}Rt(Ki),Et(Ki,t)}function Ec(){Rt(Ki),Rt(Qf),Rt(Jf)}function VA(e){Na(Jf.current);var t=Na(Ki.current),n=mb(t,e.type);t!==n&&(Et(Qf,e),Et(Ki,n))}function uS(e){Qf.current===e&&(Rt(Ki),Rt(Qf))}var Bt=Zs(0);function Mg(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var N0=[];function fS(){for(var e=0;en?n:4,e(!0);var r=L0.transition;L0.transition={};try{e(!1),t()}finally{_t=n,L0.transition=r}}function o4(){return ei().memoizedState}function mH(e,t,n){var r=Os(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},s4(e))a4(t,n);else if(n=IA(e,t,n,r),n!==null){var i=cr();Si(n,e,r,i),l4(n,t,r)}}function gH(e,t,n){var r=Os(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(s4(e))a4(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,Oi(a,s)){var l=t.interleaved;l===null?(i.next=i,aS(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=IA(e,t,i,r),n!==null&&(i=cr(),Si(n,e,r,i),l4(n,t,r))}}function s4(e){var t=e.alternate;return e===Ut||t!==null&&t===Ut}function a4(e,t){pf=Rg=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function l4(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,q2(e,n)}}var Ng={readContext:Jr,useCallback:qn,useContext:qn,useEffect:qn,useImperativeHandle:qn,useInsertionEffect:qn,useLayoutEffect:qn,useMemo:qn,useReducer:qn,useRef:qn,useState:qn,useDebugValue:qn,useDeferredValue:qn,useTransition:qn,useMutableSource:qn,useSyncExternalStore:qn,useId:qn,unstable_isNewReconciler:!1},vH={readContext:Jr,useCallback:function(e,t){return zi().memoizedState=[e,t===void 0?null:t],e},useContext:Jr,useEffect:dk,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,rm(4194308,4,e4.bind(null,t,e),n)},useLayoutEffect:function(e,t){return rm(4194308,4,e,t)},useInsertionEffect:function(e,t){return rm(4,2,e,t)},useMemo:function(e,t){var n=zi();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=zi();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=mH.bind(null,Ut,e),[r.memoizedState,e]},useRef:function(e){var t=zi();return e={current:e},t.memoizedState=e},useState:fk,useDebugValue:gS,useDeferredValue:function(e){return zi().memoizedState=e},useTransition:function(){var e=fk(!1),t=e[0];return e=pH.bind(null,e[1]),zi().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ut,i=zi();if(jt){if(n===void 0)throw Error(Ee(407));n=n()}else{if(n=t(),Tn===null)throw Error(Ee(349));Ga&30||YA(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,dk(GA.bind(null,r,o,e),[e]),r.flags|=2048,nd(9,qA.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=zi(),t=Tn.identifierPrefix;if(jt){var n=xo,r=wo;n=(r&~(1<<32-xi(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ed++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Ui]=t,e[Jf]=r,_4(e,t,!1,!1),t.stateNode=e;e:{switch(s=wb(n,r),n){case"dialog":Tt("cancel",e),Tt("close",e),i=r;break;case"iframe":case"object":case"embed":Tt("load",e),i=r;break;case"video":case"audio":for(i=0;ikc&&(t.flags|=128,r=!0,Nu(o,!1),t.lanes=4194304)}else{if(!r)if(e=kg(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Nu(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!jt)return Gn(t),null}else 2*tn()-o.renderingStartTime>kc&&n!==1073741824&&(t.flags|=128,r=!0,Nu(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=tn(),t.sibling=null,n=zt.current,Et(zt,r?n&1|2:n&1),t):(Gn(t),null);case 22:case 23:return OS(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Or&1073741824&&(Gn(t),t.subtreeFlags&6&&(t.flags|=8192)):Gn(t),null;case 24:return null;case 25:return null}throw Error(Ee(156,t.tag))}function wH(e,t){switch(aS(t),t.tag){case 1:return _r(t.type)&&xg(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Oc(),Rt(yr),Rt(tr),gS(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return mS(t),null;case 13:if(Rt(zt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Ee(340));Ec()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Rt(zt),null;case 4:return Oc(),null;case 10:return fS(t.type._context),null;case 22:case 23:return OS(),null;case 24:return null;default:return null}}var up=!1,Xn=!1,xH=typeof WeakSet=="function"?WeakSet:Set,ze=null;function Ql(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Yt(e,t,r)}else n.current=null}function Gb(e,t,n){try{n()}catch(r){Yt(e,t,r)}}var Ek=!1;function SH(e,t){if(Rb=yg,e=EA(),oS(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,c=0,f=0,h=e,p=null;t:for(;;){for(var m;h!==n||i!==0&&h.nodeType!==3||(a=s+i),h!==o||r!==0&&h.nodeType!==3||(l=s+r),h.nodeType===3&&(s+=h.nodeValue.length),(m=h.firstChild)!==null;)p=h,h=m;for(;;){if(h===e)break t;if(p===n&&++c===i&&(a=s),p===o&&++f===r&&(l=s),(m=h.nextSibling)!==null)break;h=p,p=h.parentNode}h=m}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Nb={focusedElem:e,selectionRange:n},yg=!1,ze=t;ze!==null;)if(t=ze,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ze=e;else for(;ze!==null;){t=ze;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var y=v.memoizedProps,x=v.memoizedState,_=t.stateNode,w=_.getSnapshotBeforeUpdate(t.elementType===t.type?y:fi(t.type,y),x);_.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var S=t.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ee(163))}}catch(T){Yt(t,t.return,T)}if(e=t.sibling,e!==null){e.return=t.return,ze=e;break}ze=t.return}return v=Ek,Ek=!1,v}function vf(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&Gb(t,n,o)}i=i.next}while(i!==r)}}function wy(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Zb(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function x4(e){var t=e.alternate;t!==null&&(e.alternate=null,x4(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ui],delete t[Jf],delete t[Ab],delete t[oH],delete t[sH])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function S4(e){return e.tag===5||e.tag===3||e.tag===4}function Tk(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||S4(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Kb(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=wg));else if(r!==4&&(e=e.child,e!==null))for(Kb(e,t,n),e=e.sibling;e!==null;)Kb(e,t,n),e=e.sibling}function Xb(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Xb(e,t,n),e=e.sibling;e!==null;)Xb(e,t,n),e=e.sibling}var Bn=null,di=!1;function qo(e,t,n){for(n=n.child;n!==null;)C4(e,t,n),n=n.sibling}function C4(e,t,n){if(Gi&&typeof Gi.onCommitFiberUnmount=="function")try{Gi.onCommitFiberUnmount(hy,n)}catch{}switch(n.tag){case 5:Xn||Ql(n,t);case 6:var r=Bn,i=di;Bn=null,qo(e,t,n),Bn=r,di=i,Bn!==null&&(di?(e=Bn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Bn.removeChild(n.stateNode));break;case 18:Bn!==null&&(di?(e=Bn,n=n.stateNode,e.nodeType===8?L0(e.parentNode,n):e.nodeType===1&&L0(e,n),Gf(e)):L0(Bn,n.stateNode));break;case 4:r=Bn,i=di,Bn=n.stateNode.containerInfo,di=!0,qo(e,t,n),Bn=r,di=i;break;case 0:case 11:case 14:case 15:if(!Xn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&Gb(n,t,s),i=i.next}while(i!==r)}qo(e,t,n);break;case 1:if(!Xn&&(Ql(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Yt(n,t,a)}qo(e,t,n);break;case 21:qo(e,t,n);break;case 22:n.mode&1?(Xn=(r=Xn)||n.memoizedState!==null,qo(e,t,n),Xn=r):qo(e,t,n);break;default:qo(e,t,n)}}function Ok(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new xH),t.forEach(function(r){var i=NH.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function ui(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=tn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*EH(r/1960))-r,10e?16:e,ds===null)var r=!1;else{if(e=ds,ds=null,Dg=0,ut&6)throw Error(Ee(331));var i=ut;for(ut|=4,ze=e.current;ze!==null;){var o=ze,s=o.child;if(ze.flags&16){var a=o.deletions;if(a!==null){for(var l=0;ltn()-ES?Ia(e,0):CS|=n),br(e,t)}function N4(e,t){t===0&&(e.mode&1?(t=tp,tp<<=1,!(tp&130023424)&&(tp=4194304)):t=1);var n=cr();e=To(e,t),e!==null&&(Ad(e,t,n),br(e,n))}function RH(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),N4(e,n)}function NH(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Ee(314))}r!==null&&r.delete(t),N4(e,n)}var L4;L4=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||yr.current)gr=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return gr=!1,_H(e,t,n);gr=!!(e.flags&131072)}else gr=!1,jt&&t.flags&1048576&&jA(t,Eg,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;rm(e,t),e=t.pendingProps;var i=Cc(t,tr.current);cc(t,n),i=yS(null,t,r,e,i,n);var o=_S();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,_r(r)?(o=!0,Sg(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,hS(t),i.updater=_y,t.stateNode=i,i._reactInternals=t,zb(t,r,e,n),t=Hb(null,t,r,!0,o,n)):(t.tag=0,jt&&o&&sS(t),ar(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(rm(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=DH(r),e=fi(r,e),i){case 0:t=Vb(null,t,r,e,n);break e;case 1:t=xk(null,t,r,e,n);break e;case 11:t=bk(null,t,r,e,n);break e;case 14:t=wk(null,t,r,fi(r.type,e),n);break e}throw Error(Ee(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:fi(r,i),Vb(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:fi(r,i),xk(e,t,r,i,n);case 3:e:{if(g4(t),e===null)throw Error(Ee(387));r=t.pendingProps,o=t.memoizedState,i=o.element,BA(e,t),Pg(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Pc(Error(Ee(423)),t),t=Sk(e,t,r,n,i);break e}else if(r!==i){i=Pc(Error(Ee(424)),t),t=Sk(e,t,r,n,i);break e}else for(kr=xs(t.stateNode.containerInfo.firstChild),Rr=t,jt=!0,pi=null,n=HA(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ec(),r===i){t=Oo(e,t,n);break e}ar(e,t,r,n)}t=t.child}return t;case 5:return WA(t),e===null&&Fb(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,Lb(r,i)?s=null:o!==null&&Lb(r,o)&&(t.flags|=32),m4(e,t),ar(e,t,s,n),t.child;case 6:return e===null&&Fb(t),null;case 13:return v4(e,t,n);case 4:return pS(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Tc(t,null,r,n):ar(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:fi(r,i),bk(e,t,r,i,n);case 7:return ar(e,t,t.pendingProps,n),t.child;case 8:return ar(e,t,t.pendingProps.children,n),t.child;case 12:return ar(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,Et(Tg,r._currentValue),r._currentValue=s,o!==null)if(Ti(o.value,s)){if(o.children===i.children&&!yr.current){t=Oo(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=xo(-1,n&-n),l.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var f=c.pending;f===null?l.next=l:(l.next=f.next,f.next=l),c.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),$b(o.return,n,t),a.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(Ee(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),$b(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}ar(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,cc(t,n),i=Jr(i),r=r(i),t.flags|=1,ar(e,t,r,n),t.child;case 14:return r=t.type,i=fi(r,t.pendingProps),i=fi(r.type,i),wk(e,t,r,i,n);case 15:return h4(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:fi(r,i),rm(e,t),t.tag=1,_r(r)?(e=!0,Sg(t)):e=!1,cc(t,n),UA(t,r,i),zb(t,r,i,n),Hb(null,t,r,!0,e,n);case 19:return y4(e,t,n);case 22:return p4(e,t,n)}throw Error(Ee(156,t.tag))};function D4(e,t){return sA(e,t)}function LH(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function qr(e,t,n,r){return new LH(e,t,n,r)}function kS(e){return e=e.prototype,!(!e||!e.isReactComponent)}function DH(e){if(typeof e=="function")return kS(e)?1:0;if(e!=null){if(e=e.$$typeof,e===G2)return 11;if(e===Z2)return 14}return 2}function Ts(e,t){var n=e.alternate;return n===null?(n=qr(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function sm(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")kS(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Vl:return Fa(n.children,i,o,t);case q2:s=8,i|=8;break;case fb:return e=qr(12,n,t,i|2),e.elementType=fb,e.lanes=o,e;case db:return e=qr(13,n,t,i),e.elementType=db,e.lanes=o,e;case hb:return e=qr(19,n,t,i),e.elementType=hb,e.lanes=o,e;case VD:return Sy(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case zD:s=10;break e;case UD:s=9;break e;case G2:s=11;break e;case Z2:s=14;break e;case Qo:s=16,r=null;break e}throw Error(Ee(130,e==null?e:typeof e,""))}return t=qr(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Fa(e,t,n,r){return e=qr(7,e,r,t),e.lanes=n,e}function Sy(e,t,n,r){return e=qr(22,e,r,t),e.elementType=VD,e.lanes=n,e.stateNode={isHidden:!1},e}function z0(e,t,n){return e=qr(6,e,null,t),e.lanes=n,e}function U0(e,t,n){return t=qr(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function AH(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=x0(0),this.expirationTimes=x0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=x0(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function MS(e,t,n,r,i,o,s,a,l){return e=new AH(e,t,n,a,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=qr(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},hS(o),e}function jH(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=jr})(IU);const $a=RL(Ya);var F4,Ak=Ya;F4=Ak.createRoot,Ak.hydrateRoot;var Ig={},zH={get exports(){return Ig},set exports(e){Ig=e}},$4={};/** +`+o.stack}return{value:e,source:t,stack:i,digest:null}}function j0(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Fb(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var bH=typeof WeakMap=="function"?WeakMap:Map;function c4(e,t,n){n=So(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Dg||(Dg=!0,Gb=r),Fb(e,t)},n}function u4(e,t,n){n=So(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Fb(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Fb(e,t),typeof r!="function"&&(Ts===null?Ts=new Set([this]):Ts.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function hk(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new bH;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=DH.bind(null,e,t,n),t.then(e,e))}function pk(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function mk(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=So(-1,1),t.tag=2,Es(n,t,1))),n.lanes|=1),e)}var wH=Io.ReactCurrentOwner,gr=!1;function ar(e,t,n,r){t.child=e===null?UA(t,null,n,r):Cc(t,e.child,n,r)}function gk(e,t,n,r,i){n=n.render;var o=t.ref;return ac(t,i),r=hS(e,t,n,r,o,i),n=pS(),e!==null&&!gr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Po(e,t,i)):(jt&&n&&tS(t),t.flags|=1,ar(e,t,r,i),t.child)}function vk(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!CS(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,f4(e,t,o,r,i)):(e=am(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var s=o.memoizedProps;if(n=n.compare,n=n!==null?n:Gf,n(s,r)&&e.ref===t.ref)return Po(e,t,i)}return t.flags|=1,e=Ps(o,r),e.ref=t.ref,e.return=t,t.child=e}function f4(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(Gf(o,r)&&e.ref===t.ref)if(gr=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(gr=!0);else return t.lanes=e.lanes,Po(e,t,i)}return $b(e,t,n,r,i)}function d4(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Et(Xl,Or),Or|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Et(Xl,Or),Or|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,Et(Xl,Or),Or|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,Et(Xl,Or),Or|=r;return ar(e,t,i,n),t.child}function h4(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function $b(e,t,n,r,i){var o=_r(n)?Ya:tr.current;return o=xc(t,o),ac(t,i),n=hS(e,t,n,r,o,i),r=pS(),e!==null&&!gr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Po(e,t,i)):(jt&&r&&tS(t),t.flags|=1,ar(e,t,n,i),t.child)}function yk(e,t,n,r,i){if(_r(n)){var o=!0;Cg(t)}else o=!1;if(ac(t,i),t.stateNode===null)im(e,t),BA(t,n,r),Ib(t,n,r,i),r=!0;else if(e===null){var s=t.stateNode,a=t.memoizedProps;s.props=a;var l=s.context,c=n.contextType;typeof c=="object"&&c!==null?c=Jr(c):(c=_r(n)?Ya:tr.current,c=xc(t,c));var f=n.getDerivedStateFromProps,h=typeof f=="function"||typeof s.getSnapshotBeforeUpdate=="function";h||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||l!==c)&&ck(t,s,r,c),ts=!1;var p=t.memoizedState;s.state=p,kg(t,r,s,i),l=t.memoizedState,a!==r||p!==l||yr.current||ts?(typeof f=="function"&&(jb(t,n,f,r),l=t.memoizedState),(a=ts||lk(t,n,a,r,p,l,c))?(h||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),s.props=r,s.state=l,s.context=c,r=a):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,FA(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:di(t.type,a),s.props=c,h=t.pendingProps,p=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=Jr(l):(l=_r(n)?Ya:tr.current,l=xc(t,l));var m=n.getDerivedStateFromProps;(f=typeof m=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==h||p!==l)&&ck(t,s,r,l),ts=!1,p=t.memoizedState,s.state=p,kg(t,r,s,i);var v=t.memoizedState;a!==h||p!==v||yr.current||ts?(typeof m=="function"&&(jb(t,n,m,r),v=t.memoizedState),(c=ts||lk(t,n,c,r,p,v,l)||!1)?(f||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,v,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,v,l)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=v),s.props=r,s.state=v,s.context=l,r=c):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return Bb(e,t,n,r,o,i)}function Bb(e,t,n,r,i,o){h4(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return i&&rk(t,n,!1),Po(e,t,o);r=t.stateNode,wH.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Cc(t,e.child,null,o),t.child=Cc(t,null,a,o)):ar(e,t,a,o),t.memoizedState=r.state,i&&rk(t,n,!0),t.child}function p4(e){var t=e.stateNode;t.pendingContext?nk(e,t.pendingContext,t.pendingContext!==t.context):t.context&&nk(e,t.context,!1),cS(e,t.containerInfo)}function _k(e,t,n,r,i){return Sc(),rS(i),t.flags|=256,ar(e,t,n,r),t.child}var zb={dehydrated:null,treeContext:null,retryLane:0};function Ub(e){return{baseLanes:e,cachePool:null,transitions:null}}function m4(e,t,n){var r=t.pendingProps,i=Bt.current,o=!1,s=(t.flags&128)!==0,a;if((a=s)||(a=e!==null&&e.memoizedState===null?!1:(i&2)!==0),a?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Et(Bt,i&1),e===null)return Db(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,o?(r=t.mode,o=t.child,s={mode:"hidden",children:s},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=s):o=wy(s,r,0,null),e=Fa(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Ub(n),t.memoizedState=zb,e):vS(t,s));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return xH(e,t,s,r,a,i,n);if(o){o=r.fallback,s=t.mode,i=e.child,a=i.sibling;var l={mode:"hidden",children:r.children};return!(s&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Ps(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?o=Ps(a,o):(o=Fa(o,s,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,s=e.child.memoizedState,s=s===null?Ub(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=e.childLanes&~n,t.memoizedState=zb,r}return o=e.child,e=o.sibling,r=Ps(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function vS(e,t){return t=wy({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function up(e,t,n,r){return r!==null&&rS(r),Cc(t,e.child,null,n),e=vS(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function xH(e,t,n,r,i,o,s){if(n)return t.flags&256?(t.flags&=-257,r=j0(Error(Ee(422))),up(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=wy({mode:"visible",children:r.children},i,0,null),o=Fa(o,i,s,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&Cc(t,e.child,null,s),t.child.memoizedState=Ub(s),t.memoizedState=zb,o);if(!(t.mode&1))return up(e,t,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,o=Error(Ee(419)),r=j0(o,r,void 0),up(e,t,s,r)}if(a=(s&e.childLanes)!==0,gr||a){if(r=Tn,r!==null){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|s)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,Oo(e,i),Si(r,e,i,-1))}return SS(),r=j0(Error(Ee(421))),up(e,t,s,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=AH.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,kr=Cs(i.nextSibling),Rr=t,jt=!0,mi=null,e!==null&&(Hr[Wr++]=wo,Hr[Wr++]=xo,Hr[Wr++]=qa,wo=e.id,xo=e.overflow,qa=t),t=vS(t,r.children),t.flags|=4096,t)}function bk(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ab(e.return,t,n)}function I0(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function g4(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(ar(e,t,r.children,n),r=Bt.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&bk(e,n,t);else if(e.tag===19)bk(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Et(Bt,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Mg(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),I0(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Mg(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}I0(t,!0,n,null,o);break;case"together":I0(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function im(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Po(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Za|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Ee(153));if(t.child!==null){for(e=t.child,n=Ps(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ps(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function SH(e,t,n){switch(t.tag){case 3:p4(t),Sc();break;case 5:VA(t);break;case 1:_r(t.type)&&Cg(t);break;case 4:cS(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Et(Og,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Et(Bt,Bt.current&1),t.flags|=128,null):n&t.child.childLanes?m4(e,t,n):(Et(Bt,Bt.current&1),e=Po(e,t,n),e!==null?e.sibling:null);Et(Bt,Bt.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return g4(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Et(Bt,Bt.current),r)break;return null;case 22:case 23:return t.lanes=0,d4(e,t,n)}return Po(e,t,n)}var v4,Vb,y4,_4;v4=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Vb=function(){};y4=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Na(Ki.current);var o=null;switch(n){case"input":i=fb(e,i),r=fb(e,r),o=[];break;case"select":i=Vt({},i,{value:void 0}),r=Vt({},r,{value:void 0}),o=[];break;case"textarea":i=pb(e,i),r=pb(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=xg)}gb(n,r);var s;n=null;for(c in i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var a=i[c];for(s in a)a.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(zf.hasOwnProperty(c)?o||(o=[]):(o=o||[]).push(c,null));for(c in r){var l=r[c];if(a=i!=null?i[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(s in a)!a.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in l)l.hasOwnProperty(s)&&a[s]!==l[s]&&(n||(n={}),n[s]=l[s])}else n||(o||(o=[]),o.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(o=o||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(o=o||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(zf.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&Tt("scroll",e),o||a===l||(o=[])):(o=o||[]).push(c,l))}n&&(o=o||[]).push("style",n);var c=o;(t.updateQueue=c)&&(t.flags|=4)}};_4=function(e,t,n,r){n!==r&&(t.flags|=4)};function Mu(e,t){if(!jt)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Gn(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function CH(e,t,n){var r=t.pendingProps;switch(nS(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Gn(t),null;case 1:return _r(t.type)&&Sg(),Gn(t),null;case 3:return r=t.stateNode,Ec(),Rt(yr),Rt(tr),fS(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(lp(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,mi!==null&&(Xb(mi),mi=null))),Vb(e,t),Gn(t),null;case 5:uS(t);var i=Na(Jf.current);if(n=t.type,e!==null&&t.stateNode!=null)y4(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Ee(166));return Gn(t),null}if(e=Na(Ki.current),lp(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Vi]=t,r[Xf]=o,e=(t.mode&1)!==0,n){case"dialog":Tt("cancel",r),Tt("close",r);break;case"iframe":case"object":case"embed":Tt("load",r);break;case"video":case"audio":for(i=0;i<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Vi]=t,e[Xf]=r,v4(e,t,!1,!1),t.stateNode=e;e:{switch(s=vb(n,r),n){case"dialog":Tt("cancel",e),Tt("close",e),i=r;break;case"iframe":case"object":case"embed":Tt("load",e),i=r;break;case"video":case"audio":for(i=0;iOc&&(t.flags|=128,r=!0,Mu(o,!1),t.lanes=4194304)}else{if(!r)if(e=Mg(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Mu(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!jt)return Gn(t),null}else 2*en()-o.renderingStartTime>Oc&&n!==1073741824&&(t.flags|=128,r=!0,Mu(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=en(),t.sibling=null,n=Bt.current,Et(Bt,r?n&1|2:n&1),t):(Gn(t),null);case 22:case 23:return xS(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Or&1073741824&&(Gn(t),t.subtreeFlags&6&&(t.flags|=8192)):Gn(t),null;case 24:return null;case 25:return null}throw Error(Ee(156,t.tag))}function EH(e,t){switch(nS(t),t.tag){case 1:return _r(t.type)&&Sg(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ec(),Rt(yr),Rt(tr),fS(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return uS(t),null;case 13:if(Rt(Bt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Ee(340));Sc()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Rt(Bt),null;case 4:return Ec(),null;case 10:return sS(t.type._context),null;case 22:case 23:return xS(),null;case 24:return null;default:return null}}var fp=!1,Xn=!1,TH=typeof WeakSet=="function"?WeakSet:Set,ze=null;function Kl(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Wt(e,t,r)}else n.current=null}function Hb(e,t,n){try{n()}catch(r){Wt(e,t,r)}}var wk=!1;function OH(e,t){if(Ob=_g,e=SA(),eS(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,c=0,f=0,h=e,p=null;t:for(;;){for(var m;h!==n||i!==0&&h.nodeType!==3||(a=s+i),h!==o||r!==0&&h.nodeType!==3||(l=s+r),h.nodeType===3&&(s+=h.nodeValue.length),(m=h.firstChild)!==null;)p=h,h=m;for(;;){if(h===e)break t;if(p===n&&++c===i&&(a=s),p===o&&++f===r&&(l=s),(m=h.nextSibling)!==null)break;h=p,p=h.parentNode}h=m}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Pb={focusedElem:e,selectionRange:n},_g=!1,ze=t;ze!==null;)if(t=ze,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ze=e;else for(;ze!==null;){t=ze;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var y=v.memoizedProps,x=v.memoizedState,_=t.stateNode,w=_.getSnapshotBeforeUpdate(t.elementType===t.type?y:di(t.type,y),x);_.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var S=t.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ee(163))}}catch(T){Wt(t,t.return,T)}if(e=t.sibling,e!==null){e.return=t.return,ze=e;break}ze=t.return}return v=wk,wk=!1,v}function mf(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&Hb(t,n,o)}i=i.next}while(i!==r)}}function _y(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Wb(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function b4(e){var t=e.alternate;t!==null&&(e.alternate=null,b4(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Vi],delete t[Xf],delete t[Rb],delete t[cH],delete t[uH])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function w4(e){return e.tag===5||e.tag===3||e.tag===4}function xk(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||w4(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Yb(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=xg));else if(r!==4&&(e=e.child,e!==null))for(Yb(e,t,n),e=e.sibling;e!==null;)Yb(e,t,n),e=e.sibling}function qb(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(qb(e,t,n),e=e.sibling;e!==null;)qb(e,t,n),e=e.sibling}var Bn=null,hi=!1;function Zo(e,t,n){for(n=n.child;n!==null;)x4(e,t,n),n=n.sibling}function x4(e,t,n){if(Zi&&typeof Zi.onCommitFiberUnmount=="function")try{Zi.onCommitFiberUnmount(fy,n)}catch{}switch(n.tag){case 5:Xn||Kl(n,t);case 6:var r=Bn,i=hi;Bn=null,Zo(e,t,n),Bn=r,hi=i,Bn!==null&&(hi?(e=Bn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Bn.removeChild(n.stateNode));break;case 18:Bn!==null&&(hi?(e=Bn,n=n.stateNode,e.nodeType===8?M0(e.parentNode,n):e.nodeType===1&&M0(e,n),Yf(e)):M0(Bn,n.stateNode));break;case 4:r=Bn,i=hi,Bn=n.stateNode.containerInfo,hi=!0,Zo(e,t,n),Bn=r,hi=i;break;case 0:case 11:case 14:case 15:if(!Xn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&Hb(n,t,s),i=i.next}while(i!==r)}Zo(e,t,n);break;case 1:if(!Xn&&(Kl(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Wt(n,t,a)}Zo(e,t,n);break;case 21:Zo(e,t,n);break;case 22:n.mode&1?(Xn=(r=Xn)||n.memoizedState!==null,Zo(e,t,n),Xn=r):Zo(e,t,n);break;default:Zo(e,t,n)}}function Sk(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new TH),t.forEach(function(r){var i=jH.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function fi(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=en()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*kH(r/1960))-r,10e?16:e,ps===null)var r=!1;else{if(e=ps,ps=null,Ag=0,ut&6)throw Error(Ee(331));var i=ut;for(ut|=4,ze=e.current;ze!==null;){var o=ze,s=o.child;if(ze.flags&16){var a=o.deletions;if(a!==null){for(var l=0;len()-bS?Ia(e,0):_S|=n),br(e,t)}function M4(e,t){t===0&&(e.mode&1?(t=np,np<<=1,!(np&130023424)&&(np=4194304)):t=1);var n=cr();e=Oo(e,t),e!==null&&(Ld(e,t,n),br(e,n))}function AH(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),M4(e,n)}function jH(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Ee(314))}r!==null&&r.delete(t),M4(e,n)}var R4;R4=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||yr.current)gr=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return gr=!1,SH(e,t,n);gr=!!(e.flags&131072)}else gr=!1,jt&&t.flags&1048576&&DA(t,Tg,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;im(e,t),e=t.pendingProps;var i=xc(t,tr.current);ac(t,n),i=hS(null,t,r,e,i,n);var o=pS();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,_r(r)?(o=!0,Cg(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,lS(t),i.updater=vy,t.stateNode=i,i._reactInternals=t,Ib(t,r,e,n),t=Bb(null,t,r,!0,o,n)):(t.tag=0,jt&&o&&tS(t),ar(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(im(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=FH(r),e=di(r,e),i){case 0:t=$b(null,t,r,e,n);break e;case 1:t=yk(null,t,r,e,n);break e;case 11:t=gk(null,t,r,e,n);break e;case 14:t=vk(null,t,r,di(r.type,e),n);break e}throw Error(Ee(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:di(r,i),$b(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:di(r,i),yk(e,t,r,i,n);case 3:e:{if(p4(t),e===null)throw Error(Ee(387));r=t.pendingProps,o=t.memoizedState,i=o.element,FA(e,t),kg(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Tc(Error(Ee(423)),t),t=_k(e,t,r,n,i);break e}else if(r!==i){i=Tc(Error(Ee(424)),t),t=_k(e,t,r,n,i);break e}else for(kr=Cs(t.stateNode.containerInfo.firstChild),Rr=t,jt=!0,mi=null,n=UA(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Sc(),r===i){t=Po(e,t,n);break e}ar(e,t,r,n)}t=t.child}return t;case 5:return VA(t),e===null&&Db(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,kb(r,i)?s=null:o!==null&&kb(r,o)&&(t.flags|=32),h4(e,t),ar(e,t,s,n),t.child;case 6:return e===null&&Db(t),null;case 13:return m4(e,t,n);case 4:return cS(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Cc(t,null,r,n):ar(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:di(r,i),gk(e,t,r,i,n);case 7:return ar(e,t,t.pendingProps,n),t.child;case 8:return ar(e,t,t.pendingProps.children,n),t.child;case 12:return ar(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,Et(Og,r._currentValue),r._currentValue=s,o!==null)if(Oi(o.value,s)){if(o.children===i.children&&!yr.current){t=Po(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=So(-1,n&-n),l.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var f=c.pending;f===null?l.next=l:(l.next=f.next,f.next=l),c.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),Ab(o.return,n,t),a.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(Ee(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),Ab(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}ar(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,ac(t,n),i=Jr(i),r=r(i),t.flags|=1,ar(e,t,r,n),t.child;case 14:return r=t.type,i=di(r,t.pendingProps),i=di(r.type,i),vk(e,t,r,i,n);case 15:return f4(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:di(r,i),im(e,t),t.tag=1,_r(r)?(e=!0,Cg(t)):e=!1,ac(t,n),BA(t,r,i),Ib(t,r,i,n),Bb(null,t,r,!0,e,n);case 19:return g4(e,t,n);case 22:return d4(e,t,n)}throw Error(Ee(156,t.tag))};function N4(e,t){return iA(e,t)}function IH(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function qr(e,t,n,r){return new IH(e,t,n,r)}function CS(e){return e=e.prototype,!(!e||!e.isReactComponent)}function FH(e){if(typeof e=="function")return CS(e)?1:0;if(e!=null){if(e=e.$$typeof,e===V2)return 11;if(e===H2)return 14}return 2}function Ps(e,t){var n=e.alternate;return n===null?(n=qr(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function am(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")CS(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case zl:return Fa(n.children,i,o,t);case U2:s=8,i|=8;break;case ab:return e=qr(12,n,t,i|2),e.elementType=ab,e.lanes=o,e;case lb:return e=qr(13,n,t,i),e.elementType=lb,e.lanes=o,e;case cb:return e=qr(19,n,t,i),e.elementType=cb,e.lanes=o,e;case zD:return wy(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case $D:s=10;break e;case BD:s=9;break e;case V2:s=11;break e;case H2:s=14;break e;case es:s=16,r=null;break e}throw Error(Ee(130,e==null?e:typeof e,""))}return t=qr(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Fa(e,t,n,r){return e=qr(7,e,r,t),e.lanes=n,e}function wy(e,t,n,r){return e=qr(22,e,r,t),e.elementType=zD,e.lanes=n,e.stateNode={isHidden:!1},e}function F0(e,t,n){return e=qr(6,e,null,t),e.lanes=n,e}function $0(e,t,n){return t=qr(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function $H(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=_0(0),this.expirationTimes=_0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_0(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function ES(e,t,n,r,i,o,s,a,l){return e=new $H(e,t,n,a,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=qr(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},lS(o),e}function BH(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(j4)}catch(e){console.error(e)}}j4(),DD.exports=jr;var Id=DD.exports;const $a=ri(Id);var I4,Rk=Id;I4=Rk.createRoot,Rk.hydrateRoot;var F4={exports:{}},$4={};/** * @license React * use-sync-external-store-shim.production.min.js * @@ -62,7 +62,7 @@ Error generating stack: `+o.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Mc=V;function UH(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var VH=typeof Object.is=="function"?Object.is:UH,HH=Mc.useState,WH=Mc.useEffect,YH=Mc.useLayoutEffect,qH=Mc.useDebugValue;function GH(e,t){var n=t(),r=HH({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return YH(function(){i.value=n,i.getSnapshot=t,V0(i)&&o({inst:i})},[e,n,t]),WH(function(){return V0(i)&&o({inst:i}),e(function(){V0(i)&&o({inst:i})})},[e]),qH(n),n}function V0(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!VH(e,n)}catch{return!0}}function ZH(e,t){return t()}var KH=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?ZH:GH;$4.useSyncExternalStore=Mc.useSyncExternalStore!==void 0?Mc.useSyncExternalStore:KH;(function(e){e.exports=$4})(zH);var jk={},XH={get exports(){return jk},set exports(e){jk=e}},B4={};/** + */var Pc=V;function WH(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var YH=typeof Object.is=="function"?Object.is:WH,qH=Pc.useState,GH=Pc.useEffect,ZH=Pc.useLayoutEffect,KH=Pc.useDebugValue;function XH(e,t){var n=t(),r=qH({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return ZH(function(){i.value=n,i.getSnapshot=t,B0(i)&&o({inst:i})},[e,n,t]),GH(function(){return B0(i)&&o({inst:i}),e(function(){B0(i)&&o({inst:i})})},[e]),KH(n),n}function B0(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!YH(e,n)}catch{return!0}}function QH(e,t){return t()}var JH=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?QH:XH;$4.useSyncExternalStore=Pc.useSyncExternalStore!==void 0?Pc.useSyncExternalStore:JH;F4.exports=$4;var B4=F4.exports,eW={};/** * @license React * use-sync-external-store-shim/with-selector.production.min.js * @@ -70,14 +70,14 @@ Error generating stack: `+o.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Py=V,QH=Ig;function JH(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var eW=typeof Object.is=="function"?Object.is:JH,tW=QH.useSyncExternalStore,nW=Py.useRef,rW=Py.useEffect,iW=Py.useMemo,oW=Py.useDebugValue;B4.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=nW(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=iW(function(){function l(m){if(!c){if(c=!0,f=m,m=r(m),i!==void 0&&s.hasValue){var v=s.value;if(i(v,m))return h=v}return h=m}if(v=h,eW(f,m))return v;var y=r(m);return i!==void 0&&i(v,y)?v:(f=m,h=y)}var c=!1,f,h,p=n===void 0?null:n;return[function(){return l(t())},p===null?void 0:function(){return l(p())}]},[t,n,r,i]);var a=tW(e,o[0],o[1]);return rW(function(){s.hasValue=!0,s.value=a},[a]),oW(a),a};(function(e){e.exports=B4})(XH);function sW(e){e()}let z4=sW;const aW=e=>z4=e,lW=()=>z4,U4=V.createContext(null),cW=()=>{throw new Error("uSES not initialized!")};function fc(){return fc=Object.assign||function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}var nw={},uW={get exports(){return nw},set exports(e){nw=e}},bt={};/** @license React v16.13.1 + */var Ty=V,tW=B4;function nW(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var rW=typeof Object.is=="function"?Object.is:nW,iW=tW.useSyncExternalStore,oW=Ty.useRef,sW=Ty.useEffect,aW=Ty.useMemo,lW=Ty.useDebugValue;eW.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=oW(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=aW(function(){function l(m){if(!c){if(c=!0,f=m,m=r(m),i!==void 0&&s.hasValue){var v=s.value;if(i(v,m))return h=v}return h=m}if(v=h,rW(f,m))return v;var y=r(m);return i!==void 0&&i(v,y)?v:(f=m,h=y)}var c=!1,f,h,p=n===void 0?null:n;return[function(){return l(t())},p===null?void 0:function(){return l(p())}]},[t,n,r,i]);var a=iW(e,o[0],o[1]);return sW(function(){s.hasValue=!0,s.value=a},[a]),lW(a),a};function cW(e){e()}let z4=cW;const uW=e=>z4=e,fW=()=>z4,U4=V.createContext(null),dW=()=>{throw new Error("uSES not initialized!")};function cc(){return cc=Object.assign||function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}var V4={exports:{}},bt={};/** @license React v16.13.1 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var On=typeof Symbol=="function"&&Symbol.for,AS=On?Symbol.for("react.element"):60103,jS=On?Symbol.for("react.portal"):60106,ky=On?Symbol.for("react.fragment"):60107,My=On?Symbol.for("react.strict_mode"):60108,Ry=On?Symbol.for("react.profiler"):60114,Ny=On?Symbol.for("react.provider"):60109,Ly=On?Symbol.for("react.context"):60110,IS=On?Symbol.for("react.async_mode"):60111,Dy=On?Symbol.for("react.concurrent_mode"):60111,Ay=On?Symbol.for("react.forward_ref"):60112,jy=On?Symbol.for("react.suspense"):60113,fW=On?Symbol.for("react.suspense_list"):60120,Iy=On?Symbol.for("react.memo"):60115,Fy=On?Symbol.for("react.lazy"):60116,dW=On?Symbol.for("react.block"):60121,hW=On?Symbol.for("react.fundamental"):60117,pW=On?Symbol.for("react.responder"):60118,mW=On?Symbol.for("react.scope"):60119;function Fr(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case AS:switch(e=e.type,e){case IS:case Dy:case ky:case Ry:case My:case jy:return e;default:switch(e=e&&e.$$typeof,e){case Ly:case Ay:case Fy:case Iy:case Ny:return e;default:return t}}case jS:return t}}}function V4(e){return Fr(e)===Dy}bt.AsyncMode=IS;bt.ConcurrentMode=Dy;bt.ContextConsumer=Ly;bt.ContextProvider=Ny;bt.Element=AS;bt.ForwardRef=Ay;bt.Fragment=ky;bt.Lazy=Fy;bt.Memo=Iy;bt.Portal=jS;bt.Profiler=Ry;bt.StrictMode=My;bt.Suspense=jy;bt.isAsyncMode=function(e){return V4(e)||Fr(e)===IS};bt.isConcurrentMode=V4;bt.isContextConsumer=function(e){return Fr(e)===Ly};bt.isContextProvider=function(e){return Fr(e)===Ny};bt.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===AS};bt.isForwardRef=function(e){return Fr(e)===Ay};bt.isFragment=function(e){return Fr(e)===ky};bt.isLazy=function(e){return Fr(e)===Fy};bt.isMemo=function(e){return Fr(e)===Iy};bt.isPortal=function(e){return Fr(e)===jS};bt.isProfiler=function(e){return Fr(e)===Ry};bt.isStrictMode=function(e){return Fr(e)===My};bt.isSuspense=function(e){return Fr(e)===jy};bt.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===ky||e===Dy||e===Ry||e===My||e===jy||e===fW||typeof e=="object"&&e!==null&&(e.$$typeof===Fy||e.$$typeof===Iy||e.$$typeof===Ny||e.$$typeof===Ly||e.$$typeof===Ay||e.$$typeof===hW||e.$$typeof===pW||e.$$typeof===mW||e.$$typeof===dW)};bt.typeOf=Fr;(function(e){e.exports=bt})(uW);var FS=nw,gW={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},vW={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},yW={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},H4={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},$S={};$S[FS.ForwardRef]=yW;$S[FS.Memo]=H4;function Ik(e){return FS.isMemo(e)?H4:$S[e.$$typeof]||gW}var _W=Object.defineProperty,bW=Object.getOwnPropertyNames,Fk=Object.getOwnPropertySymbols,wW=Object.getOwnPropertyDescriptor,xW=Object.getPrototypeOf,$k=Object.prototype;function W4(e,t,n){if(typeof t!="string"){if($k){var r=xW(t);r&&r!==$k&&W4(e,r,n)}var i=bW(t);Fk&&(i=i.concat(Fk(t)));for(var o=Ik(e),s=Ik(t),a=0;at(i(...o)))}return n}function iw(e){return function(n){const r=e(n);function i(){return r}return i.dependsOnOwnProps=!1,i}}function zk(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function Y4(e,t){return function(r,{displayName:i}){const o=function(a,l){return o.dependsOnOwnProps?o.mapToProps(a,l):o.mapToProps(a,void 0)};return o.dependsOnOwnProps=!0,o.mapToProps=function(a,l){o.mapToProps=e,o.dependsOnOwnProps=zk(e);let c=o(a,l);return typeof c=="function"&&(o.mapToProps=c,o.dependsOnOwnProps=zk(c),c=o(a,l)),c},o}}function US(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function RW(e){return e&&typeof e=="object"?iw(t=>MW(e,t)):e?typeof e=="function"?Y4(e):US(e,"mapDispatchToProps"):iw(t=>({dispatch:t}))}function NW(e){return e?typeof e=="function"?Y4(e):US(e,"mapStateToProps"):iw(()=>({}))}function LW(e,t,n){return fc({},n,e,t)}function DW(e){return function(n,{displayName:r,areMergedPropsEqual:i}){let o=!1,s;return function(l,c,f){const h=e(l,c,f);return o?i(h,s)||(s=h):(o=!0,s=h),s}}}function AW(e){return e?typeof e=="function"?DW(e):US(e,"mergeProps"):()=>LW}function jW(){const e=lW();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const Uk={notify(){},get:()=>[]};function q4(e,t){let n,r=Uk;function i(h){return l(),r.subscribe(h)}function o(){r.notify()}function s(){f.onStateChange&&f.onStateChange()}function a(){return!!n}function l(){n||(n=t?t.addNestedSub(s):e.subscribe(s),r=jW())}function c(){n&&(n(),n=void 0,r.clear(),r=Uk)}const f={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:s,isSubscribed:a,trySubscribe:l,tryUnsubscribe:c,getListeners:()=>r};return f}const IW=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Fg=IW?V.useLayoutEffect:V.useEffect;function Vk(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function H0(e,t){if(Vk(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i=0;i{G4=e},BW=[null,null];function zW(e,t,n){Fg(()=>e(...t),n)}function UW(e,t,n,r,i,o){e.current=r,n.current=!1,i.current&&(i.current=null,o())}function VW(e,t,n,r,i,o,s,a,l,c,f){if(!e)return()=>{};let h=!1,p=null;const m=()=>{if(h||!a.current)return;const y=t.getState();let x,_;try{x=r(y,i.current)}catch(w){_=w,p=w}_||(p=null),x===o.current?s.current||c():(o.current=x,l.current=x,s.current=!0,f())};return n.onStateChange=m,n.trySubscribe(),m(),()=>{if(h=!0,n.tryUnsubscribe(),n.onStateChange=null,p)throw p}}function HW(e,t){return e===t}function WW(e,t,n,{pure:r,areStatesEqual:i=HW,areOwnPropsEqual:o=H0,areStatePropsEqual:s=H0,areMergedPropsEqual:a=H0,forwardRef:l=!1,context:c=U4}={}){const f=c,h=NW(e),p=RW(t),m=AW(n),v=!!e;return x=>{const _=x.displayName||x.name||"Component",w=`Connect(${_})`,S={shouldHandleStateChanges:v,displayName:w,wrappedComponentName:_,WrappedComponent:x,initMapStateToProps:h,initMapDispatchToProps:p,initMergeProps:m,areStatesEqual:i,areStatePropsEqual:s,areOwnPropsEqual:o,areMergedPropsEqual:a};function T(N){const[D,z,A]=V.useMemo(()=>{const{reactReduxForwardedRef:K}=N,ae=DS(N,FW);return[N.context,K,ae]},[N]),W=V.useMemo(()=>D&&D.Consumer&&rw.isContextConsumer(U.createElement(D.Consumer,null))?D:f,[D,f]),Y=V.useContext(W),J=!!N.store&&!!N.store.getState&&!!N.store.dispatch,Z=!!Y&&!!Y.store,ee=J?N.store:Y.store,ie=Z?Y.getServerState:ee.getState,oe=V.useMemo(()=>kW(ee.dispatch,S),[ee]),[G,F]=V.useMemo(()=>{if(!v)return BW;const K=q4(ee,J?void 0:Y.subscription),ae=K.notifyNestedSubs.bind(K);return[K,ae]},[ee,J,Y]),j=V.useMemo(()=>J?Y:fc({},Y,{subscription:G}),[J,Y,G]),B=V.useRef(),ne=V.useRef(A),H=V.useRef(),q=V.useRef(!1);V.useRef(!1);const te=V.useRef(!1),se=V.useRef();Fg(()=>(te.current=!0,()=>{te.current=!1}),[]);const pe=V.useMemo(()=>()=>H.current&&A===ne.current?H.current:oe(ee.getState(),A),[ee,A]),O=V.useMemo(()=>ae=>G?VW(v,ee,G,oe,ne,B,q,te,H,F,ae):()=>{},[G]);zW(UW,[ne,B,q,A,H,F]);let R;try{R=G4(O,pe,ie?()=>oe(ie(),A):pe)}catch(K){throw se.current&&(K.message+=` + */var AS=Symbol.for("react.element"),jS=Symbol.for("react.portal"),Iy=Symbol.for("react.fragment"),Fy=Symbol.for("react.strict_mode"),$y=Symbol.for("react.profiler"),By=Symbol.for("react.provider"),zy=Symbol.for("react.context"),OW=Symbol.for("react.server_context"),Uy=Symbol.for("react.forward_ref"),Vy=Symbol.for("react.suspense"),Hy=Symbol.for("react.suspense_list"),Wy=Symbol.for("react.memo"),Yy=Symbol.for("react.lazy"),PW=Symbol.for("react.offscreen"),kW=Symbol.for("react.module.reference");function ii(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case AS:switch(e=e.type,e){case Iy:case $y:case Fy:case Vy:case Hy:return e;default:switch(e=e&&e.$$typeof,e){case OW:case zy:case Uy:case Yy:case Wy:case By:return e;default:return t}}case jS:return t}}}wt.ContextConsumer=zy;wt.ContextProvider=By;wt.Element=AS;wt.ForwardRef=Uy;wt.Fragment=Iy;wt.Lazy=Yy;wt.Memo=Wy;wt.Portal=jS;wt.Profiler=$y;wt.StrictMode=Fy;wt.Suspense=Vy;wt.SuspenseList=Hy;wt.isAsyncMode=function(){return!1};wt.isConcurrentMode=function(){return!1};wt.isContextConsumer=function(e){return ii(e)===zy};wt.isContextProvider=function(e){return ii(e)===By};wt.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===AS};wt.isForwardRef=function(e){return ii(e)===Uy};wt.isFragment=function(e){return ii(e)===Iy};wt.isLazy=function(e){return ii(e)===Yy};wt.isMemo=function(e){return ii(e)===Wy};wt.isPortal=function(e){return ii(e)===jS};wt.isProfiler=function(e){return ii(e)===$y};wt.isStrictMode=function(e){return ii(e)===Fy};wt.isSuspense=function(e){return ii(e)===Vy};wt.isSuspenseList=function(e){return ii(e)===Hy};wt.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Iy||e===$y||e===Fy||e===Vy||e===Hy||e===PW||typeof e=="object"&&e!==null&&(e.$$typeof===Yy||e.$$typeof===Wy||e.$$typeof===By||e.$$typeof===zy||e.$$typeof===Uy||e.$$typeof===kW||e.getModuleId!==void 0)};wt.typeOf=ii;q4.exports=wt;var MW=q4.exports;const RW=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function NW(e,t,n,r,{areStatesEqual:i,areOwnPropsEqual:o,areStatePropsEqual:s}){let a=!1,l,c,f,h,p;function m(w,S){return l=w,c=S,f=e(l,c),h=t(r,c),p=n(f,h,c),a=!0,p}function v(){return f=e(l,c),t.dependsOnOwnProps&&(h=t(r,c)),p=n(f,h,c),p}function y(){return e.dependsOnOwnProps&&(f=e(l,c)),t.dependsOnOwnProps&&(h=t(r,c)),p=n(f,h,c),p}function x(){const w=e(l,c),S=!s(w,f);return f=w,S&&(p=n(f,h,c)),p}function _(w,S){const T=!o(S,c),P=!i(w,l,S,c);return l=w,c=S,T&&P?v():T?y():P?x():p}return function(S,T){return a?_(S,T):m(S,T)}}function LW(e,t){let{initMapStateToProps:n,initMapDispatchToProps:r,initMergeProps:i}=t,o=kS(t,RW);const s=n(e,o),a=r(e,o),l=i(e,o);return NW(s,a,l,e,o)}function DW(e,t){const n={};for(const r in e){const i=e[r];typeof i=="function"&&(n[r]=(...o)=>t(i(...o)))}return n}function Qb(e){return function(n){const r=e(n);function i(){return r}return i.dependsOnOwnProps=!1,i}}function jk(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function G4(e,t){return function(r,{displayName:i}){const o=function(a,l){return o.dependsOnOwnProps?o.mapToProps(a,l):o.mapToProps(a,void 0)};return o.dependsOnOwnProps=!0,o.mapToProps=function(a,l){o.mapToProps=e,o.dependsOnOwnProps=jk(e);let c=o(a,l);return typeof c=="function"&&(o.mapToProps=c,o.dependsOnOwnProps=jk(c),c=o(a,l)),c},o}}function IS(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function AW(e){return e&&typeof e=="object"?Qb(t=>DW(e,t)):e?typeof e=="function"?G4(e):IS(e,"mapDispatchToProps"):Qb(t=>({dispatch:t}))}function jW(e){return e?typeof e=="function"?G4(e):IS(e,"mapStateToProps"):Qb(()=>({}))}function IW(e,t,n){return cc({},n,e,t)}function FW(e){return function(n,{displayName:r,areMergedPropsEqual:i}){let o=!1,s;return function(l,c,f){const h=e(l,c,f);return o?i(h,s)||(s=h):(o=!0,s=h),s}}}function $W(e){return e?typeof e=="function"?FW(e):IS(e,"mergeProps"):()=>IW}function BW(){const e=fW();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const Ik={notify(){},get:()=>[]};function Z4(e,t){let n,r=Ik;function i(h){return l(),r.subscribe(h)}function o(){r.notify()}function s(){f.onStateChange&&f.onStateChange()}function a(){return!!n}function l(){n||(n=t?t.addNestedSub(s):e.subscribe(s),r=BW())}function c(){n&&(n(),n=void 0,r.clear(),r=Ik)}const f={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:s,isSubscribed:a,trySubscribe:l,tryUnsubscribe:c,getListeners:()=>r};return f}const zW=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Fg=zW?V.useLayoutEffect:V.useEffect;function Fk(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function z0(e,t){if(Fk(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i=0;i{K4=e},HW=[null,null];function WW(e,t,n){Fg(()=>e(...t),n)}function YW(e,t,n,r,i,o){e.current=r,n.current=!1,i.current&&(i.current=null,o())}function qW(e,t,n,r,i,o,s,a,l,c,f){if(!e)return()=>{};let h=!1,p=null;const m=()=>{if(h||!a.current)return;const y=t.getState();let x,_;try{x=r(y,i.current)}catch(w){_=w,p=w}_||(p=null),x===o.current?s.current||c():(o.current=x,l.current=x,s.current=!0,f())};return n.onStateChange=m,n.trySubscribe(),m(),()=>{if(h=!0,n.tryUnsubscribe(),n.onStateChange=null,p)throw p}}function GW(e,t){return e===t}function ZW(e,t,n,{pure:r,areStatesEqual:i=GW,areOwnPropsEqual:o=z0,areStatePropsEqual:s=z0,areMergedPropsEqual:a=z0,forwardRef:l=!1,context:c=U4}={}){const f=c,h=jW(e),p=AW(t),m=$W(n),v=!!e;return x=>{const _=x.displayName||x.name||"Component",w=`Connect(${_})`,S={shouldHandleStateChanges:v,displayName:w,wrappedComponentName:_,WrappedComponent:x,initMapStateToProps:h,initMapDispatchToProps:p,initMergeProps:m,areStatesEqual:i,areStatePropsEqual:s,areOwnPropsEqual:o,areMergedPropsEqual:a};function T(N){const[D,z,A]=V.useMemo(()=>{const{reactReduxForwardedRef:K}=N,ae=kS(N,UW);return[N.context,K,ae]},[N]),W=V.useMemo(()=>D&&D.Consumer&&MW.isContextConsumer(U.createElement(D.Consumer,null))?D:f,[D,f]),Y=V.useContext(W),J=!!N.store&&!!N.store.getState&&!!N.store.dispatch,Z=!!Y&&!!Y.store,ee=J?N.store:Y.store,ie=Z?Y.getServerState:ee.getState,oe=V.useMemo(()=>LW(ee.dispatch,S),[ee]),[G,F]=V.useMemo(()=>{if(!v)return HW;const K=Z4(ee,J?void 0:Y.subscription),ae=K.notifyNestedSubs.bind(K);return[K,ae]},[ee,J,Y]),j=V.useMemo(()=>J?Y:cc({},Y,{subscription:G}),[J,Y,G]),B=V.useRef(),ne=V.useRef(A),H=V.useRef(),q=V.useRef(!1);V.useRef(!1);const te=V.useRef(!1),se=V.useRef();Fg(()=>(te.current=!0,()=>{te.current=!1}),[]);const pe=V.useMemo(()=>()=>H.current&&A===ne.current?H.current:oe(ee.getState(),A),[ee,A]),O=V.useMemo(()=>ae=>G?qW(v,ee,G,oe,ne,B,q,te,H,F,ae):()=>{},[G]);WW(YW,[ne,B,q,A,H,F]);let R;try{R=K4(O,pe,ie?()=>oe(ie(),A):pe)}catch(K){throw se.current&&(K.message+=` The error may be correlated with this previous error: ${se.current.stack} -`),K}Fg(()=>{se.current=void 0,H.current=void 0,B.current=R});const I=V.useMemo(()=>U.createElement(x,fc({},R,{ref:z})),[z,x,R]);return V.useMemo(()=>v?U.createElement(W.Provider,{value:j},I):I,[W,I,j])}const k=U.memo(T);if(k.WrappedComponent=x,k.displayName=T.displayName=w,l){const D=U.forwardRef(function(A,W){return U.createElement(k,fc({},A,{reactReduxForwardedRef:W}))});return D.displayName=w,D.WrappedComponent=x,Bk(D,x)}return Bk(k,x)}}function YW({store:e,context:t,children:n,serverState:r}){const i=V.useMemo(()=>{const a=q4(e);return{store:e,subscription:a,getServerState:r?()=>r:void 0}},[e,r]),o=V.useMemo(()=>e.getState(),[e]);Fg(()=>{const{subscription:a}=i;return a.onStateChange=a.notifyNestedSubs,a.trySubscribe(),o!==e.getState()&&a.notifyNestedSubs(),()=>{a.tryUnsubscribe(),a.onStateChange=void 0}},[i,o]);const s=t||U4;return U.createElement(s.Provider,{value:i},n)}$W(Ig.useSyncExternalStore);aW(Ya.unstable_batchedUpdates);/** +`),K}Fg(()=>{se.current=void 0,H.current=void 0,B.current=R});const I=V.useMemo(()=>U.createElement(x,cc({},R,{ref:z})),[z,x,R]);return V.useMemo(()=>v?U.createElement(W.Provider,{value:j},I):I,[W,I,j])}const k=U.memo(T);if(k.WrappedComponent=x,k.displayName=T.displayName=w,l){const D=U.forwardRef(function(A,W){return U.createElement(k,cc({},A,{reactReduxForwardedRef:W}))});return D.displayName=w,D.WrappedComponent=x,Ak(D,x)}return Ak(k,x)}}function KW({store:e,context:t,children:n,serverState:r}){const i=V.useMemo(()=>{const a=Z4(e);return{store:e,subscription:a,getServerState:r?()=>r:void 0}},[e,r]),o=V.useMemo(()=>e.getState(),[e]);Fg(()=>{const{subscription:a}=i;return a.onStateChange=a.notifyNestedSubs,a.trySubscribe(),o!==e.getState()&&a.notifyNestedSubs(),()=>{a.tryUnsubscribe(),a.onStateChange=void 0}},[i,o]);const s=t||U4;return U.createElement(s.Provider,{value:i},n)}VW(B4.useSyncExternalStore);uW(Id.unstable_batchedUpdates);/** * @remix-run/router v1.2.1 * * Copyright (c) Remix Software Inc. @@ -98,7 +98,7 @@ ${se.current.stack} * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function $g(){return $g=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function GW(){return Math.random().toString(36).substr(2,8)}function Wk(e){return{usr:e.state,key:e.key}}function ow(e,t,n,r){return n===void 0&&(n=null),$g({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Gc(t):t,{state:n,key:t&&t.key||r||GW()})}function sd(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Gc(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function ZW(e){let t=typeof window<"u"&&typeof window.location<"u"&&window.location.origin!=="null"?window.location.origin:window.location.href,n=typeof e=="string"?e:sd(e);return dn(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}function KW(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,a=hs.Pop,l=null;function c(){a=hs.Pop,l&&l({action:a,location:p.location})}function f(m,v){a=hs.Push;let y=ow(p.location,m,v);n&&n(y,m);let x=Wk(y),_=p.createHref(y);try{s.pushState(x,"",_)}catch{i.location.assign(_)}o&&l&&l({action:a,location:p.location})}function h(m,v){a=hs.Replace;let y=ow(p.location,m,v);n&&n(y,m);let x=Wk(y),_=p.createHref(y);s.replaceState(x,"",_),o&&l&&l({action:a,location:p.location})}let p={get action(){return a},get location(){return e(i,s)},listen(m){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(Hk,c),l=m,()=>{i.removeEventListener(Hk,c),l=null}},createHref(m){return t(i,m)},encodeLocation(m){let v=ZW(typeof m=="string"?m:sd(m));return{pathname:v.pathname,search:v.search,hash:v.hash}},push:f,replace:h,go(m){return s.go(m)}};return p}var Yk;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Yk||(Yk={}));function XW(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?Gc(t):t,i=X4(r.pathname||"/",n);if(i==null)return null;let o=Z4(e);QW(o);let s=null;for(let a=0;s==null&&a{let l={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};l.relativePath.startsWith("/")&&(dn(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=Os([r,l.relativePath]),f=n.concat(l);o.children&&o.children.length>0&&(dn(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),Z4(o.children,t,f,c)),!(o.path==null&&!o.index)&&t.push({path:c,score:oY(c,o.index),routesMeta:f})};return e.forEach((o,s)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))i(o,s);else for(let l of K4(o.path))i(o,s,l)}),t}function K4(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let s=K4(r.join("/")),a=[];return a.push(...s.map(l=>l===""?o:[o,l].join("/"))),i&&a.push(...s),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function QW(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:sY(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const JW=/^:\w+$/,eY=3,tY=2,nY=1,rY=10,iY=-2,qk=e=>e==="*";function oY(e,t){let n=e.split("/"),r=n.length;return n.some(qk)&&(r+=iY),t&&(r+=tY),n.filter(i=>!qk(i)).reduce((i,o)=>i+(JW.test(o)?eY:o===""?nY:rY),r)}function sY(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function aY(e,t){let{routesMeta:n}=e,r={},i="/",o=[];for(let s=0;s{if(f==="*"){let p=a[h]||"";s=o.slice(0,o.length-p.length).replace(/(.)\/+$/,"$1")}return c[f]=fY(a[h]||"",f),c},{}),pathname:o,pathnameBase:s,pattern:e}}function cY(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),VS(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(s,a)=>(r.push(a),"/([^\\/]+)"));return e.endsWith("*")?(r.push("*"),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function uY(e){try{return decodeURI(e)}catch(t){return VS(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function fY(e,t){try{return decodeURIComponent(e)}catch(n){return VS(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function X4(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function VS(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function dY(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Gc(e):e;return{pathname:n?n.startsWith("/")?n:hY(n,t):t,search:mY(r),hash:gY(i)}}function hY(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function W0(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function Q4(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function J4(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Gc(e):(i=$g({},e),dn(!i.pathname||!i.pathname.includes("?"),W0("?","pathname","search",i)),dn(!i.pathname||!i.pathname.includes("#"),W0("#","pathname","hash",i)),dn(!i.search||!i.search.includes("#"),W0("#","search","hash",i)));let o=e===""||i.pathname==="",s=o?"/":i.pathname,a;if(r||s==null)a=n;else{let h=t.length-1;if(s.startsWith("..")){let p=s.split("/");for(;p[0]==="..";)p.shift(),h-=1;i.pathname=p.join("/")}a=h>=0?t[h]:"/"}let l=dY(i,a),c=s&&s!=="/"&&s.endsWith("/"),f=(o||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||f)&&(l.pathname+="/"),l}const Os=e=>e.join("/").replace(/\/\/+/g,"/"),pY=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),mY=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,gY=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class vY{constructor(t,n,r,i){i===void 0&&(i=!1),this.status=t,this.statusText=n||"",this.internal=i,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function yY(e){return e instanceof vY}/** + */function $g(){return $g=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function QW(){return Math.random().toString(36).substr(2,8)}function Bk(e){return{usr:e.state,key:e.key}}function Jb(e,t,n,r){return n===void 0&&(n=null),$g({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Yc(t):t,{state:n,key:t&&t.key||r||QW()})}function id(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Yc(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function JW(e){let t=typeof window<"u"&&typeof window.location<"u"&&window.location.origin!=="null"?window.location.origin:window.location.href,n=typeof e=="string"?e:id(e);return fn(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}function eY(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,a=ms.Pop,l=null;function c(){a=ms.Pop,l&&l({action:a,location:p.location})}function f(m,v){a=ms.Push;let y=Jb(p.location,m,v);n&&n(y,m);let x=Bk(y),_=p.createHref(y);try{s.pushState(x,"",_)}catch{i.location.assign(_)}o&&l&&l({action:a,location:p.location})}function h(m,v){a=ms.Replace;let y=Jb(p.location,m,v);n&&n(y,m);let x=Bk(y),_=p.createHref(y);s.replaceState(x,"",_),o&&l&&l({action:a,location:p.location})}let p={get action(){return a},get location(){return e(i,s)},listen(m){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener($k,c),l=m,()=>{i.removeEventListener($k,c),l=null}},createHref(m){return t(i,m)},encodeLocation(m){let v=JW(typeof m=="string"?m:id(m));return{pathname:v.pathname,search:v.search,hash:v.hash}},push:f,replace:h,go(m){return s.go(m)}};return p}var zk;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(zk||(zk={}));function tY(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?Yc(t):t,i=J4(r.pathname||"/",n);if(i==null)return null;let o=X4(e);nY(o);let s=null;for(let a=0;s==null&&a{let l={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};l.relativePath.startsWith("/")&&(fn(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=ks([r,l.relativePath]),f=n.concat(l);o.children&&o.children.length>0&&(fn(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),X4(o.children,t,f,c)),!(o.path==null&&!o.index)&&t.push({path:c,score:cY(c,o.index),routesMeta:f})};return e.forEach((o,s)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))i(o,s);else for(let l of Q4(o.path))i(o,s,l)}),t}function Q4(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let s=Q4(r.join("/")),a=[];return a.push(...s.map(l=>l===""?o:[o,l].join("/"))),i&&a.push(...s),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function nY(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:uY(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const rY=/^:\w+$/,iY=3,oY=2,sY=1,aY=10,lY=-2,Uk=e=>e==="*";function cY(e,t){let n=e.split("/"),r=n.length;return n.some(Uk)&&(r+=lY),t&&(r+=oY),n.filter(i=>!Uk(i)).reduce((i,o)=>i+(rY.test(o)?iY:o===""?sY:aY),r)}function uY(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function fY(e,t){let{routesMeta:n}=e,r={},i="/",o=[];for(let s=0;s{if(f==="*"){let p=a[h]||"";s=o.slice(0,o.length-p.length).replace(/(.)\/+$/,"$1")}return c[f]=mY(a[h]||"",f),c},{}),pathname:o,pathnameBase:s,pattern:e}}function hY(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),FS(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(s,a)=>(r.push(a),"/([^\\/]+)"));return e.endsWith("*")?(r.push("*"),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function pY(e){try{return decodeURI(e)}catch(t){return FS(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function mY(e,t){try{return decodeURIComponent(e)}catch(n){return FS(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function J4(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function FS(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function gY(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Yc(e):e;return{pathname:n?n.startsWith("/")?n:vY(n,t):t,search:_Y(r),hash:bY(i)}}function vY(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function U0(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function ej(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function tj(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Yc(e):(i=$g({},e),fn(!i.pathname||!i.pathname.includes("?"),U0("?","pathname","search",i)),fn(!i.pathname||!i.pathname.includes("#"),U0("#","pathname","hash",i)),fn(!i.search||!i.search.includes("#"),U0("#","search","hash",i)));let o=e===""||i.pathname==="",s=o?"/":i.pathname,a;if(r||s==null)a=n;else{let h=t.length-1;if(s.startsWith("..")){let p=s.split("/");for(;p[0]==="..";)p.shift(),h-=1;i.pathname=p.join("/")}a=h>=0?t[h]:"/"}let l=gY(i,a),c=s&&s!=="/"&&s.endsWith("/"),f=(o||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||f)&&(l.pathname+="/"),l}const ks=e=>e.join("/").replace(/\/\/+/g,"/"),yY=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),_Y=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,bY=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class wY{constructor(t,n,r,i){i===void 0&&(i=!1),this.status=t,this.statusText=n||"",this.internal=i,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function xY(e){return e instanceof wY}const nj=["post","put","patch","delete"];new Set(nj);const SY=["get",...nj];new Set(SY);/** * React Router v6.6.1 * * Copyright (c) Remix Software Inc. @@ -107,7 +107,7 @@ ${se.current.stack} * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function sw(){return sw=Object.assign?Object.assign.bind():function(e){for(var t=1;t{i.value=r,i.getSnapshot=t,Y0(i)&&o({inst:i})},[e,r,t]),xY(()=>(Y0(i)&&o({inst:i}),e(()=>{Y0(i)&&o({inst:i})})),[e]),CY(r),r}function Y0(e){const t=e.getSnapshot,n=e.value;try{const r=t();return!bY(n,r)}catch{return!0}}function TY(e,t,n){return t()}const OY=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",PY=!OY,kY=PY?TY:EY;"useSyncExternalStore"in G1&&(e=>e.useSyncExternalStore)(G1);const MY=V.createContext(null),RY=V.createContext(null),Zy=V.createContext(null),$d=V.createContext(null),Ky=V.createContext(null),fl=V.createContext({outlet:null,matches:[]}),ej=V.createContext(null);function NY(e,t){let{relative:n}=t===void 0?{}:t;Zc()||dn(!1);let{basename:r,navigator:i}=V.useContext($d),{hash:o,pathname:s,search:a}=HS(e,{relative:n}),l=s;return r!=="/"&&(l=s==="/"?r:Os([r,s])),i.createHref({pathname:l,search:a,hash:o})}function Zc(){return V.useContext(Ky)!=null}function Pn(){return Zc()||dn(!1),V.useContext(Ky).location}function Io(){Zc()||dn(!1);let{basename:e,navigator:t}=V.useContext($d),{matches:n}=V.useContext(fl),{pathname:r}=Pn(),i=JSON.stringify(Q4(n).map(a=>a.pathnameBase)),o=V.useRef(!1);return V.useEffect(()=>{o.current=!0}),V.useCallback(function(a,l){if(l===void 0&&(l={}),!o.current)return;if(typeof a=="number"){t.go(a);return}let c=J4(a,JSON.parse(i),r,l.relative==="path");e!=="/"&&(c.pathname=c.pathname==="/"?e:Os([e,c.pathname])),(l.replace?t.replace:t.push)(c,l.state,l)},[e,t,i,r])}function Ks(){let{matches:e}=V.useContext(fl),t=e[e.length-1];return t?t.params:{}}function HS(e,t){let{relative:n}=t===void 0?{}:t,{matches:r}=V.useContext(fl),{pathname:i}=Pn(),o=JSON.stringify(Q4(r).map(s=>s.pathnameBase));return V.useMemo(()=>J4(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function LY(e,t){Zc()||dn(!1);let{navigator:n}=V.useContext($d),r=V.useContext(Zy),{matches:i}=V.useContext(fl),o=i[i.length-1],s=o?o.params:{};o&&o.pathname;let a=o?o.pathnameBase:"/";o&&o.route;let l=Pn(),c;if(t){var f;let y=typeof t=="string"?Gc(t):t;a==="/"||(f=y.pathname)!=null&&f.startsWith(a)||dn(!1),c=y}else c=l;let h=c.pathname||"/",p=a==="/"?h:h.slice(a.length)||"/",m=XW(e,{pathname:p}),v=IY(m&&m.map(y=>Object.assign({},y,{params:Object.assign({},s,y.params),pathname:Os([a,n.encodeLocation?n.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?a:Os([a,n.encodeLocation?n.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),i,r||void 0);return t&&v?V.createElement(Ky.Provider,{value:{location:sw({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:hs.Pop}},v):v}function DY(){let e=zY(),t=yY(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},o={padding:"2px 4px",backgroundColor:r};return V.createElement(V.Fragment,null,V.createElement("h2",null,"Unhandled Thrown Error!"),V.createElement("h3",{style:{fontStyle:"italic"}},t),n?V.createElement("pre",{style:i},n):null,V.createElement("p",null,"💿 Hey developer 👋"),V.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",V.createElement("code",{style:o},"errorElement")," props on ",V.createElement("code",{style:o},"")))}class AY extends V.Component{constructor(t){super(t),this.state={location:t.location,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location?{error:t.error,location:t.location}:{error:t.error||n.error,location:n.location}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error?V.createElement(fl.Provider,{value:this.props.routeContext},V.createElement(ej.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function jY(e){let{routeContext:t,match:n,children:r}=e,i=V.useContext(MY);return i&&n.route.errorElement&&(i._deepestRenderedBoundaryId=n.route.id),V.createElement(fl.Provider,{value:t},r)}function IY(e,t,n){if(t===void 0&&(t=[]),e==null)if(n!=null&&n.errors)e=n.matches;else return null;let r=e,i=n==null?void 0:n.errors;if(i!=null){let o=r.findIndex(s=>s.route.id&&(i==null?void 0:i[s.route.id]));o>=0||dn(!1),r=r.slice(0,Math.min(r.length,o+1))}return r.reduceRight((o,s,a)=>{let l=s.route.id?i==null?void 0:i[s.route.id]:null,c=n?s.route.errorElement||V.createElement(DY,null):null,f=t.concat(r.slice(0,a+1)),h=()=>V.createElement(jY,{match:s,routeContext:{outlet:o,matches:f}},l?c:s.route.element!==void 0?s.route.element:o);return n&&(s.route.errorElement||a===0)?V.createElement(AY,{location:n.location,component:c,error:l,children:h(),routeContext:{outlet:null,matches:f}}):h()},null)}var Gk;(function(e){e.UseRevalidator="useRevalidator"})(Gk||(Gk={}));var Bg;(function(e){e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator"})(Bg||(Bg={}));function FY(e){let t=V.useContext(Zy);return t||dn(!1),t}function $Y(e){let t=V.useContext(fl);return t||dn(!1),t}function BY(e){let t=$Y(),n=t.matches[t.matches.length-1];return n.route.id||dn(!1),n.route.id}function zY(){var e;let t=V.useContext(ej),n=FY(Bg.UseRouteError),r=BY(Bg.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function WS(e){let{to:t,replace:n,state:r,relative:i}=e;Zc()||dn(!1);let o=V.useContext(Zy),s=Io();return V.useEffect(()=>{o&&o.navigation.state!=="idle"||s(t,{replace:n,state:r,relative:i})}),null}function gt(e){dn(!1)}function UY(e){let{basename:t="/",children:n=null,location:r,navigationType:i=hs.Pop,navigator:o,static:s=!1}=e;Zc()&&dn(!1);let a=t.replace(/^\/*/,"/"),l=V.useMemo(()=>({basename:a,navigator:o,static:s}),[a,o,s]);typeof r=="string"&&(r=Gc(r));let{pathname:c="/",search:f="",hash:h="",state:p=null,key:m="default"}=r,v=V.useMemo(()=>{let y=X4(c,a);return y==null?null:{pathname:y,search:f,hash:h,state:p,key:m}},[a,c,f,h,p,m]);return v==null?null:V.createElement($d.Provider,{value:l},V.createElement(Ky.Provider,{children:n,value:{location:v,navigationType:i}}))}function Xy(e){let{children:t,location:n}=e,r=V.useContext(RY),i=r&&!t?r.router.routes:aw(t);return LY(i,n)}var Zk;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(Zk||(Zk={}));new Promise(()=>{});function aw(e,t){t===void 0&&(t=[]);let n=[];return V.Children.forEach(e,(r,i)=>{if(!V.isValidElement(r))return;if(r.type===V.Fragment){n.push.apply(n,aw(r.props.children,t));return}r.type!==gt&&dn(!1),!r.props.index||!r.props.children||dn(!1);let o=[...t,i],s={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,hasErrorBoundary:r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle};r.props.children&&(s.children=aw(r.props.children,o)),n.push(s)}),n}/** + */function ew(){return ew=Object.assign?Object.assign.bind():function(e){for(var t=1;t{i.value=r,i.getSnapshot=t,V0(i)&&o({inst:i})},[e,r,t]),OY(()=>(V0(i)&&o({inst:i}),e(()=>{V0(i)&&o({inst:i})})),[e]),kY(r),r}function V0(e){const t=e.getSnapshot,n=e.value;try{const r=t();return!EY(n,r)}catch{return!0}}function RY(e,t,n){return t()}const NY=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",LY=!NY,DY=LY?RY:MY;"useSyncExternalStore"in W1&&(e=>e.useSyncExternalStore)(W1);const AY=V.createContext(null),jY=V.createContext(null),qy=V.createContext(null),Fd=V.createContext(null),Gy=V.createContext(null),ul=V.createContext({outlet:null,matches:[]}),rj=V.createContext(null);function IY(e,t){let{relative:n}=t===void 0?{}:t;qc()||fn(!1);let{basename:r,navigator:i}=V.useContext(Fd),{hash:o,pathname:s,search:a}=$S(e,{relative:n}),l=s;return r!=="/"&&(l=s==="/"?r:ks([r,s])),i.createHref({pathname:l,search:a,hash:o})}function qc(){return V.useContext(Gy)!=null}function Pn(){return qc()||fn(!1),V.useContext(Gy).location}function Fo(){qc()||fn(!1);let{basename:e,navigator:t}=V.useContext(Fd),{matches:n}=V.useContext(ul),{pathname:r}=Pn(),i=JSON.stringify(ej(n).map(a=>a.pathnameBase)),o=V.useRef(!1);return V.useEffect(()=>{o.current=!0}),V.useCallback(function(a,l){if(l===void 0&&(l={}),!o.current)return;if(typeof a=="number"){t.go(a);return}let c=tj(a,JSON.parse(i),r,l.relative==="path");e!=="/"&&(c.pathname=c.pathname==="/"?e:ks([e,c.pathname])),(l.replace?t.replace:t.push)(c,l.state,l)},[e,t,i,r])}function Xs(){let{matches:e}=V.useContext(ul),t=e[e.length-1];return t?t.params:{}}function $S(e,t){let{relative:n}=t===void 0?{}:t,{matches:r}=V.useContext(ul),{pathname:i}=Pn(),o=JSON.stringify(ej(r).map(s=>s.pathnameBase));return V.useMemo(()=>tj(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function FY(e,t){qc()||fn(!1);let{navigator:n}=V.useContext(Fd),r=V.useContext(qy),{matches:i}=V.useContext(ul),o=i[i.length-1],s=o?o.params:{};o&&o.pathname;let a=o?o.pathnameBase:"/";o&&o.route;let l=Pn(),c;if(t){var f;let y=typeof t=="string"?Yc(t):t;a==="/"||(f=y.pathname)!=null&&f.startsWith(a)||fn(!1),c=y}else c=l;let h=c.pathname||"/",p=a==="/"?h:h.slice(a.length)||"/",m=tY(e,{pathname:p}),v=UY(m&&m.map(y=>Object.assign({},y,{params:Object.assign({},s,y.params),pathname:ks([a,n.encodeLocation?n.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?a:ks([a,n.encodeLocation?n.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),i,r||void 0);return t&&v?V.createElement(Gy.Provider,{value:{location:ew({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:ms.Pop}},v):v}function $Y(){let e=YY(),t=xY(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},o={padding:"2px 4px",backgroundColor:r};return V.createElement(V.Fragment,null,V.createElement("h2",null,"Unhandled Thrown Error!"),V.createElement("h3",{style:{fontStyle:"italic"}},t),n?V.createElement("pre",{style:i},n):null,V.createElement("p",null,"💿 Hey developer 👋"),V.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",V.createElement("code",{style:o},"errorElement")," props on ",V.createElement("code",{style:o},"")))}class BY extends V.Component{constructor(t){super(t),this.state={location:t.location,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location?{error:t.error,location:t.location}:{error:t.error||n.error,location:n.location}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error?V.createElement(ul.Provider,{value:this.props.routeContext},V.createElement(rj.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function zY(e){let{routeContext:t,match:n,children:r}=e,i=V.useContext(AY);return i&&n.route.errorElement&&(i._deepestRenderedBoundaryId=n.route.id),V.createElement(ul.Provider,{value:t},r)}function UY(e,t,n){if(t===void 0&&(t=[]),e==null)if(n!=null&&n.errors)e=n.matches;else return null;let r=e,i=n==null?void 0:n.errors;if(i!=null){let o=r.findIndex(s=>s.route.id&&(i==null?void 0:i[s.route.id]));o>=0||fn(!1),r=r.slice(0,Math.min(r.length,o+1))}return r.reduceRight((o,s,a)=>{let l=s.route.id?i==null?void 0:i[s.route.id]:null,c=n?s.route.errorElement||V.createElement($Y,null):null,f=t.concat(r.slice(0,a+1)),h=()=>V.createElement(zY,{match:s,routeContext:{outlet:o,matches:f}},l?c:s.route.element!==void 0?s.route.element:o);return n&&(s.route.errorElement||a===0)?V.createElement(BY,{location:n.location,component:c,error:l,children:h(),routeContext:{outlet:null,matches:f}}):h()},null)}var Vk;(function(e){e.UseRevalidator="useRevalidator"})(Vk||(Vk={}));var Bg;(function(e){e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator"})(Bg||(Bg={}));function VY(e){let t=V.useContext(qy);return t||fn(!1),t}function HY(e){let t=V.useContext(ul);return t||fn(!1),t}function WY(e){let t=HY(),n=t.matches[t.matches.length-1];return n.route.id||fn(!1),n.route.id}function YY(){var e;let t=V.useContext(rj),n=VY(Bg.UseRouteError),r=WY(Bg.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function BS(e){let{to:t,replace:n,state:r,relative:i}=e;qc()||fn(!1);let o=V.useContext(qy),s=Fo();return V.useEffect(()=>{o&&o.navigation.state!=="idle"||s(t,{replace:n,state:r,relative:i})}),null}function gt(e){fn(!1)}function qY(e){let{basename:t="/",children:n=null,location:r,navigationType:i=ms.Pop,navigator:o,static:s=!1}=e;qc()&&fn(!1);let a=t.replace(/^\/*/,"/"),l=V.useMemo(()=>({basename:a,navigator:o,static:s}),[a,o,s]);typeof r=="string"&&(r=Yc(r));let{pathname:c="/",search:f="",hash:h="",state:p=null,key:m="default"}=r,v=V.useMemo(()=>{let y=J4(c,a);return y==null?null:{pathname:y,search:f,hash:h,state:p,key:m}},[a,c,f,h,p,m]);return v==null?null:V.createElement(Fd.Provider,{value:l},V.createElement(Gy.Provider,{children:n,value:{location:v,navigationType:i}}))}function Zy(e){let{children:t,location:n}=e,r=V.useContext(jY),i=r&&!t?r.router.routes:tw(t);return FY(i,n)}var Hk;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(Hk||(Hk={}));new Promise(()=>{});function tw(e,t){t===void 0&&(t=[]);let n=[];return V.Children.forEach(e,(r,i)=>{if(!V.isValidElement(r))return;if(r.type===V.Fragment){n.push.apply(n,tw(r.props.children,t));return}r.type!==gt&&fn(!1),!r.props.index||!r.props.children||fn(!1);let o=[...t,i],s={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,hasErrorBoundary:r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle};r.props.children&&(s.children=tw(r.props.children,o)),n.push(s)}),n}/** * React Router DOM v6.6.1 * * Copyright (c) Remix Software Inc. @@ -116,17 +116,17 @@ ${se.current.stack} * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function zg(){return zg=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function VY(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function HY(e,t){return e.button===0&&(!t||t==="_self")&&!VY(e)}const WY=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],YY=["aria-current","caseSensitive","className","end","style","to","children"];function qY(e){let{basename:t,children:n,window:r}=e,i=V.useRef();i.current==null&&(i.current=qW({window:r,v5Compat:!0}));let o=i.current,[s,a]=V.useState({action:o.action,location:o.location});return V.useLayoutEffect(()=>o.listen(a),[o]),V.createElement(UY,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:o})}const Lt=V.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:o,replace:s,state:a,target:l,to:c,preventScrollReset:f}=t,h=tj(t,WY),p=NY(c,{relative:i}),m=GY(c,{replace:s,state:a,target:l,preventScrollReset:f,relative:i});function v(y){r&&r(y),y.defaultPrevented||m(y)}return V.createElement("a",zg({},h,{href:p,onClick:o?r:v,ref:n,target:l}))}),nj=V.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:i=!1,className:o="",end:s=!1,style:a,to:l,children:c}=t,f=tj(t,YY),h=HS(l,{relative:f.relative}),p=Pn(),m=V.useContext(Zy),{navigator:v}=V.useContext($d),y=v.encodeLocation?v.encodeLocation(h).pathname:h.pathname,x=p.pathname,_=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;i||(x=x.toLowerCase(),_=_?_.toLowerCase():null,y=y.toLowerCase());let w=x===y||!s&&x.startsWith(y)&&x.charAt(y.length)==="/",S=_!=null&&(_===y||!s&&_.startsWith(y)&&_.charAt(y.length)==="/"),T=w?r:void 0,P;typeof o=="function"?P=o({isActive:w,isPending:S}):P=[o,w?"active":null,S?"pending":null].filter(Boolean).join(" ");let k=typeof a=="function"?a({isActive:w,isPending:S}):a;return V.createElement(Lt,zg({},f,{"aria-current":T,className:P,ref:n,style:k,to:l}),typeof c=="function"?c({isActive:w,isPending:S}):c)});var Kk;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(Kk||(Kk={}));var Xk;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Xk||(Xk={}));function GY(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:s}=t===void 0?{}:t,a=Io(),l=Pn(),c=HS(e,{relative:s});return V.useCallback(f=>{if(HY(f,n)){f.preventDefault();let h=r!==void 0?r:sd(l)===sd(c);a(e,{replace:h,state:i,preventScrollReset:o,relative:s})}},[l,a,c,r,i,n,e,o,s])}const ZY="shlink-web-client",KY="A React-based progressive web application for shlink",XY="/shlink-web-client/develop",QY="https://github.com/shlinkio/shlink-web-client",JY="MIT",eq={lint:"npm run lint:css && npm run lint:js","lint:css":"stylelint src/*.scss src/**/*.scss","lint:js":"eslint --ext .js,.ts,.tsx src test","lint:fix":"npm run lint:css:fix && npm run lint:js:fix","lint:css:fix":"npm run lint:css -- --fix","lint:js:fix":"npm run lint:js -- --fix",types:"tsc",start:"vite serve --host=0.0.0.0",preview:"vite preview --host=0.0.0.0",build:"npm run types && vite build && node scripts/replace-version.mjs","build:dist":"npm run build && node scripts/create-dist-file.mjs",test:"jest --env=jsdom --colors","test:coverage":"npm run test -- --coverage --coverageReporters=text --coverageReporters=text-summary","test:ci":"npm run test:coverage -- --coverageReporters=clover --ci","test:pretty":"npm run test:coverage -- --coverageReporters=html","test:verbose":"npm run test -- --verbose"},tq={"@babel/preset-env":"^7.20.2","@babel/preset-react":"^7.18.6","@babel/preset-typescript":"^7.21.0","@fortawesome/fontawesome-free":"^6.3.0","@fortawesome/fontawesome-svg-core":"^6.3.0","@fortawesome/free-brands-svg-icons":"^6.3.0","@fortawesome/free-regular-svg-icons":"^6.3.0","@fortawesome/free-solid-svg-icons":"^6.3.0","@fortawesome/react-fontawesome":"^0.2.0","@json2csv/plainjs":"^6.1.2","@reduxjs/toolkit":"^1.9.1",bootstrap:"^5.2.3",bottlejs:"^2.0.1",bowser:"^2.11.0","chart.js":"^4.1.1",classnames:"^2.3.2","compare-versions":"^5.0.3",csvtojson:"^2.0.10","date-fns":"^2.29.3","event-source-polyfill":"^1.0.31",history:"^5.3.0",leaflet:"^1.9.3",qs:"^6.11.0",ramda:"^0.27.2",react:"^18.2.0","react-chartjs-2":"^5.1.0","react-colorful":"^5.6.1","react-copy-to-clipboard":"^5.1.0","react-datepicker":"^4.8.0","react-dom":"^18.2.0","react-external-link":"^2.2.0","react-leaflet":"^4.2.0","react-redux":"^8.0.5","react-router-dom":"^6.6.1","react-swipeable":"^7.0.0","react-tag-autocomplete":"^6.3.0",reactstrap:"^9.1.5",redux:"^4.2.0","redux-localstorage-simple":"^2.5.1","redux-thunk":"^2.4.2",uuid:"^8.3.2","workbox-core":"^6.5.4","workbox-expiration":"^6.5.4","workbox-precaching":"^6.5.4","workbox-routing":"^6.5.4","workbox-strategies":"^6.5.4"},nq={"@shlinkio/eslint-config-js-coding-standard":"~2.1.0","@shlinkio/stylelint-config-css-coding-standard":"~1.0.1","@testing-library/jest-dom":"^5.16.5","@testing-library/react":"^13.4.0","@testing-library/user-event":"^14.4.3","@total-typescript/shoehorn":"^0.1.0","@types/jest":"^29.2.4","@types/json2csv":"^5.0.3","@types/leaflet":"^1.9.0","@types/qs":"^6.9.7","@types/ramda":"^0.28.15","@types/react":"^18.0.26","@types/react-color":"^3.0.6","@types/react-copy-to-clipboard":"^5.0.4","@types/react-datepicker":"^4.8.0","@types/react-dom":"^18.0.10","@types/react-tag-autocomplete":"^6.3.0","@types/uuid":"^8.3.4","@vitejs/plugin-react":"^4.0.0","adm-zip":"^0.5.10","babel-jest":"^29.5.0",chalk:"^5.2.0",eslint:"^8.30.0","identity-obj-proxy":"^3.0.0",jest:"^29.3.1","jest-canvas-mock":"^2.4.0","jest-environment-jsdom":"^29.3.1","resize-observer-polyfill":"^1.5.1",sass:"^1.57.1",stylelint:"^14.16.0",typescript:"^5.0.2",vite:"^4.3.1","vite-plugin-pwa":"^0.14.4"},rq=[">0.2%","not dead","not ie <= 11","not op_mini all"],Ug={name:ZY,description:KY,private:!1,homepage:XY,repository:QY,license:JY,scripts:eq,dependencies:tq,devDependencies:nq,browserslist:rq};var Oi,Qi=".",rj="function",ij="string",oj="__global__",YS="Provider",iq=0,qS=Array.prototype.slice,oq=function(t,n){var r=t[n];if(r===void 0&&Oi.config.strict)throw new Error("Bottle was unable to resolve a service. `"+n+"` is undefined.");return r},Qy=function(t){var n;return this.nested[t]||(n=Oi.pop(),this.nested[t]=n,this.factory(t,function(){return n.container})),this.nested[t]},sj=function(t){return t.split(Qi).reduce(oq,this)},sq=function(t,n,r,i){var o={configurable:!0,enumerable:!0};return t.length?o.get=function(){var a=0,l=function(f){if(f)throw f;t[a]&&t[a++](r,l)};return l(),r}:(o.value=r,o.writable=!0),Object.defineProperty(i,n,o),i[n]},aq=function(t,n){var r,i;return typeof t===rj&&(n=t,t=oj),r=t.split(Qi),i=r.shift(),r.length?Qy.call(this,i).middleware(r.join(Qi),n):(this.middlewares[i]||(this.middlewares[i]=[]),this.middlewares[i].push(n)),this},lq=function(t,n){return n(t)},Qk=function(t,n){return(t[n]||[]).concat(t.__global__||[])},cq=function(t,n){var r,i,o,s,a;return this.id,o=this.container,s=this.decorators,a=this.middlewares,r=t+YS,i=Object.create(null),i[r]={configurable:!0,enumerable:!0,get:function(){var c=new n;return delete o[r],o[r]=c,c}},i[t]={configurable:!0,enumerable:!0,get:function(){var c=o[r],f;return c&&(f=Qk(s,t).reduce(lq,c.$get(o)),delete o[r],delete o[t]),f===void 0?f:sq(Qk(a,t),t,f,o)}},Object.defineProperties(o,i),this},aj=function(t,n){var r,i;return r=t.split(Qi),this.providerMap[t]&&r.length===1&&!this.container[t+YS]?console.error(t+" provider already instantiated."):(this.originalProviders[t]=n,this.providerMap[t]=!0,i=r.shift(),r.length?(Qy.call(this,i).provider(r.join(Qi),n),this):cq.call(this,i,n))},GS=function(t,n){return aj.call(this,t,function(){this.$get=n})},lj=function(t,n,r){var i=arguments.length>3?qS.call(arguments,3):[],o=this;return GS.call(this,t,function(){var a=n,l=i.map(sj,o.container);return r?new(n.bind.apply(n,[null].concat(l))):a.apply(null,l)})},uq=function(t,n){return lj.apply(this,[t,n,!0].concat(qS.call(arguments,2)))},fq=function(t,n){return lj.apply(this,[t,n,!1].concat(qS.call(arguments,2)))},cj=function(t,n){Object.defineProperty(this,t,{configurable:!0,enumerable:!0,value:n,writable:!0})},uj=function(t,n){var r=t[n];return r||(r={},cj.call(t,n,r)),r},dq=function(t,n){var r;return r=t.split(Qi),t=r.pop(),cj.call(r.reduce(uj,this.container),t,n),this},hq=function(t,n){Object.defineProperty(this,t,{configurable:!1,enumerable:!0,value:n,writable:!1})},pq=function(t,n){var r=t.split(Qi);return t=r.pop(),hq.call(r.reduce(uj,this.container),t,n),this},fj=function(t,n){var r,i;return typeof t===rj&&(n=t,t=oj),r=t.split(Qi),i=r.shift(),r.length?Qy.call(this,i).decorator(r.join(Qi),n):(this.decorators[i]||(this.decorators[i]=[]),this.decorators[i].push(n)),this},mq=function(t){return this.deferred.push(t),this},gq=function(t){return(t||[]).map(sj,this.container)},vq=function(t,n){return GS.call(this,t,function(i){return{instance:n.bind(n,i)}})},yq=function(t){return!/^\$(?:decorator|register|list)$|Provider$/.test(t)},ZS=function(t){return Object.keys(t||this.container||{}).filter(yq)},Vg={},_q=function(t){var n;return typeof t===ij?(n=Vg[t],n||(Vg[t]=n=new Oi,n.constant("BOTTLE_NAME",t)),n):new Oi},bq=function(t){typeof t===ij?delete Vg[t]:Vg={}},dj=function(t){var n=t.$value===void 0?t:t.$value;return this[t.$type||"service"].apply(this,[t.$name,n].concat(t.$inject||[]))},Jk=function(t){delete this.providerMap[t],delete this.container[t],delete this.container[t+YS]},wq=function(t){var n=this.originalProviders,r=Array.isArray(t);Object.keys(this.originalProviders).forEach(function(o){if(!(r&&t.indexOf(o)===-1)){var s=o.split(Qi);s.length>1&&s.forEach(Jk,Qy.call(this,s[0])),Jk.call(this,o),this.provider(o,n[o])}},this)},xq=function(t){return this.deferred.forEach(function(r){r(t)}),this};Oi=function e(t){if(!(this instanceof e))return e.pop(t);this.id=iq++,this.decorators={},this.middlewares={},this.nested={},this.providerMap={},this.originalProviders={},this.deferred=[],this.container={$decorator:fj.bind(this),$register:dj.bind(this),$list:ZS.bind(this)}};Oi.prototype={constant:pq,decorator:fj,defer:mq,digest:gq,factory:GS,instanceFactory:vq,list:ZS,middleware:aq,provider:aj,resetProviders:wq,register:dj,resolve:xq,service:uq,serviceFactory:fq,value:dq};Oi.pop=_q;Oi.clear=bq;Oi.list=ZS;Oi.config={strict:!1};const Sq=Oi;var Cq=function(){return!0};const hj=Cq;function Ot(e){return e!=null&&typeof e=="object"&&e["@@functional/placeholder"]===!0}function yt(e){return function t(n){return arguments.length===0||Ot(n)?t:e.apply(this,arguments)}}function lt(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return Ot(n)?t:yt(function(i){return e(n,i)});default:return Ot(n)&&Ot(r)?t:Ot(n)?yt(function(i){return e(i,r)}):Ot(r)?yt(function(i){return e(n,i)}):e(n,r)}}}function Eq(e,t){e=e||[],t=t||[];var n,r=e.length,i=t.length,o=[];for(n=0;n=arguments.length)?a=t[s]:(a=arguments[i],i+=1),r[s]=a,Ot(a)||(o-=1),s+=1}return o<=0?n.apply(this,r):Kc(o,Jy(e,r,n))}}var Tq=lt(function(t,n){return t===1?yt(n):Kc(t,Jy(t,[],n))});const Hg=Tq;function Xs(e){return function t(n,r,i){switch(arguments.length){case 0:return t;case 1:return Ot(n)?t:lt(function(o,s){return e(n,o,s)});case 2:return Ot(n)&&Ot(r)?t:Ot(n)?lt(function(o,s){return e(o,r,s)}):Ot(r)?lt(function(o,s){return e(n,o,s)}):yt(function(o){return e(n,r,o)});default:return Ot(n)&&Ot(r)&&Ot(i)?t:Ot(n)&&Ot(r)?lt(function(o,s){return e(o,s,i)}):Ot(n)&&Ot(i)?lt(function(o,s){return e(o,r,s)}):Ot(r)&&Ot(i)?lt(function(o,s){return e(n,o,s)}):Ot(n)?yt(function(o){return e(o,r,i)}):Ot(r)?yt(function(o){return e(n,o,i)}):Ot(i)?yt(function(o){return e(n,r,o)}):e(n,r,i)}}}const Bd=Array.isArray||function(t){return t!=null&&t.length>=0&&Object.prototype.toString.call(t)==="[object Array]"};function Oq(e){return e!=null&&typeof e["@@transducer/step"]=="function"}function KS(e,t,n){return function(){if(arguments.length===0)return n();var r=Array.prototype.slice.call(arguments,0),i=r.pop();if(!Bd(i)){for(var o=0;ot?n:t});const pj=Pq;function am(e,t){for(var n=0,r=t.length,i=Array(r);n0?t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1):!1});const mj=kq;var Mq=function(){function e(t){this.f=t}return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(t){return t},e.prototype["@@transducer/step"]=function(t,n){return this.f(t,n)},e}();function Rq(e){return new Mq(e)}var Nq=lt(function(t,n){return Kc(t.length,function(){return t.apply(n,arguments)})});const Lq=Nq;function Dq(e,t,n){for(var r=0,i=n.length;r=0;)n=iM[r],Mr(n,t)&&!Bq(i,n)&&(i[i.length]=n),r-=1;return i});const Ji=zq;var Uq=lt(KS(["fantasy-land/map","map"],Iq,function(t,n){switch(Object.prototype.toString.call(n)){case"[object Function]":return Hg(n.length,function(){return t.call(this,n.apply(this,arguments))});case"[object Object]":return Xc(function(r,i){return r[i]=t(n[i]),r},{},Ji(n));default:return am(t,n)}}));const zd=Uq,lw=Number.isInteger||function(t){return t<<0===t};var Vq=lt(function(t,n){var r=t<0?n.length+t:t;return e_(n)?n.charAt(r):n[r]});const vj=Vq;var Hq=lt(function(t,n){return t.map(function(r){for(var i=n,o=0,s;o1){var o=!Fo(r)&&Mr(i,r)?r[i]:lw(t[1])?[]:{};n=e(Array.prototype.slice.call(t,1),n,o)}if(lw(i)&&Bd(r)){var s=[].concat(r);return s[i]=n,s}else return ld(i,n,r)});const Pl=nG;function rG(e){var t=Object.prototype.toString.call(e);return t==="[object Function]"||t==="[object AsyncFunction]"||t==="[object GeneratorFunction]"||t==="[object AsyncGeneratorFunction]"}var iG=lt(function(t,n){var r=Hg(t,n);return Hg(t,function(){return Xc(Qq,zd(r,arguments[0]),Array.prototype.slice.call(arguments,1))})});const oG=iG;var sG=yt(function(t){return oG(t.length,t)});const aG=sG;function lG(e){return function t(n){for(var r,i,o,s=[],a=0,l=n.length;a=0;){if(n[o]===e)return r[o]===t;o-=1}switch(i){case"Map":return e.size!==t.size?!1:lM(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size!==t.size?!1:lM(e.values(),t.values(),n.concat([e]),r.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var s=Ji(e);if(s.length!==Ji(t).length)return!1;var a=n.concat([e]),l=r.concat([t]);for(o=s.length-1;o>=0;){var c=s[o];if(!(Mr(c,t)&&eC(t[c],e[c],a,l)))return!1;o-=1}return!0}var CG=lt(function(t,n){return eC(t,n,[],[])});const tC=CG;function EG(e,t,n){var r,i;if(typeof e.indexOf=="function")switch(typeof t){case"number":if(t===0){for(r=1/t;n=0}function Z0(e){var t=e.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0");return'"'+t.replace(/"/g,'\\"')+'"'}var Du=function(t){return(t<10?"0":"")+t},OG=typeof Date.prototype.toISOString=="function"?function(t){return t.toISOString()}:function(t){return t.getUTCFullYear()+"-"+Du(t.getUTCMonth()+1)+"-"+Du(t.getUTCDate())+"T"+Du(t.getUTCHours())+":"+Du(t.getUTCMinutes())+":"+Du(t.getUTCSeconds())+"."+(t.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};const PG=OG;function kG(e){return function(){return!e.apply(this,arguments)}}function MG(e,t){for(var n=0,r=t.length,i=[];n":wj(s,a)},r=function(o,s){return am(function(a){return Z0(a)+": "+n(o[a])},s.slice().sort())};switch(Object.prototype.toString.call(e)){case"[object Arguments]":return"(function() { return arguments; }("+am(n,e).join(", ")+"))";case"[object Array]":return"["+am(n,e).concat(r(e,Ud(function(o){return/^\d+$/.test(o)},Ji(e)))).join(", ")+"]";case"[object Boolean]":return typeof e=="object"?"new Boolean("+n(e.valueOf())+")":e.toString();case"[object Date]":return"new Date("+(isNaN(e.valueOf())?n(NaN):Z0(PG(e)))+")";case"[object Null]":return"null";case"[object Number]":return typeof e=="object"?"new Number("+n(e.valueOf())+")":1/e===-1/0?"-0":e.toString(10);case"[object String]":return typeof e=="object"?"new String("+n(e.valueOf())+")":Z0(e);case"[object Undefined]":return"undefined";default:if(typeof e.toString=="function"){var i=e.toString();if(i!=="[object Object]")return i}return"{"+r(e,Ji(e)).join(", ")+"}"}}var jG=yt(function(t){return wj(t,[])});const IG=jG;var FG=yt(function(t){var n=XS(pj,0,zd(function(r){return r[0].length},t));return Kc(n,function(){for(var r=0;rs?1:0})});const bZ=_Z;var wZ=lt(function(t,n){if(t<=0)throw new Error("First argument to splitEvery must be a positive integer");for(var r=[],i=0;i!!(e!=null&&e.url)&&!!(e!=null&&e.apiKey),Ps=e=>!!(e!=null&&e.id),t_=e=>!!(e!=null&&e.version),MZ=e=>!!(e!=null&&e.serverNotFound),Vd=e=>Ps(e)?e.id:"",RZ=e=>dZ(["id","autoConnect"],e),n_=(e,t,n)=>e!==t?"ASC":n?{ASC:"DESC",DESC:void 0}[n]:"ASC",kj=(e,{field:t,dir:n})=>!t||!n?e:e.sort((r,i)=>{const o=n==="ASC"?1:-1,s=n==="ASC"?-1:1;return r[t]>i[t]?o:s}),Mj=e=>e.dir?`${e.field}-${e.dir}`:void 0,NZ=e=>{const[t,n]=e.split("-");return{field:t,dir:n}};var LZ=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var i=42;t[n]=i;for(n in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,n);if(s.value!==i||s.enumerable!==!0)return!1}return!0},uM=typeof Symbol<"u"&&Symbol,DZ=LZ,AZ=function(){return typeof uM!="function"||typeof Symbol!="function"||typeof uM("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:DZ()},jZ="Function.prototype.bind called on incompatible ",K0=Array.prototype.slice,IZ=Object.prototype.toString,FZ="[object Function]",$Z=function(t){var n=this;if(typeof n!="function"||IZ.call(n)!==FZ)throw new TypeError(jZ+n);for(var r=K0.call(arguments,1),i,o=function(){if(this instanceof i){var f=n.apply(this,r.concat(K0.call(arguments)));return Object(f)===f?f:this}else return n.apply(t,r.concat(K0.call(arguments)))},s=Math.max(0,n.length-r.length),a=[],l=0;l"u"?st:es(Uint8Array),hc={"%AggregateError%":typeof AggregateError>"u"?st:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?st:ArrayBuffer,"%ArrayIteratorPrototype%":kl?es([][Symbol.iterator]()):st,"%AsyncFromSyncIteratorPrototype%":st,"%AsyncFunction%":$l,"%AsyncGenerator%":$l,"%AsyncGeneratorFunction%":$l,"%AsyncIteratorPrototype%":$l,"%Atomics%":typeof Atomics>"u"?st:Atomics,"%BigInt%":typeof BigInt>"u"?st:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?st:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?st:Float32Array,"%Float64Array%":typeof Float64Array>"u"?st:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?st:FinalizationRegistry,"%Function%":Rj,"%GeneratorFunction%":$l,"%Int8Array%":typeof Int8Array>"u"?st:Int8Array,"%Int16Array%":typeof Int16Array>"u"?st:Int16Array,"%Int32Array%":typeof Int32Array>"u"?st:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":kl?es(es([][Symbol.iterator]())):st,"%JSON%":typeof JSON=="object"?JSON:st,"%Map%":typeof Map>"u"?st:Map,"%MapIteratorPrototype%":typeof Map>"u"||!kl?st:es(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?st:Promise,"%Proxy%":typeof Proxy>"u"?st:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?st:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?st:Set,"%SetIteratorPrototype%":typeof Set>"u"||!kl?st:es(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?st:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":kl?es(""[Symbol.iterator]()):st,"%Symbol%":kl?Symbol:st,"%SyntaxError%":ud,"%ThrowTypeError%":VZ,"%TypedArray%":HZ,"%TypeError%":dc,"%Uint8Array%":typeof Uint8Array>"u"?st:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?st:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?st:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?st:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?st:WeakMap,"%WeakRef%":typeof WeakRef>"u"?st:WeakRef,"%WeakSet%":typeof WeakSet>"u"?st:WeakSet},WZ=function e(t){var n;if(t==="%AsyncFunction%")n=X0("async function () {}");else if(t==="%GeneratorFunction%")n=X0("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=X0("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&(n=es(i.prototype))}return hc[t]=n,n},fM={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},r_=oC,Gg=UZ,YZ=r_.call(Function.call,Array.prototype.concat),qZ=r_.call(Function.apply,Array.prototype.splice),dM=r_.call(Function.call,String.prototype.replace),Zg=r_.call(Function.call,String.prototype.slice),GZ=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ZZ=/\\(\\)?/g,KZ=function(t){var n=Zg(t,0,1),r=Zg(t,-1);if(n==="%"&&r!=="%")throw new ud("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new ud("invalid intrinsic syntax, expected opening `%`");var i=[];return dM(t,GZ,function(o,s,a,l){i[i.length]=a?dM(l,ZZ,"$1"):s||o}),i},XZ=function(t,n){var r=t,i;if(Gg(fM,r)&&(i=fM[r],r="%"+i[0]+"%"),Gg(hc,r)){var o=hc[r];if(o===$l&&(o=WZ(r)),typeof o>"u"&&!n)throw new dc("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:o}}throw new ud("intrinsic "+t+" does not exist!")},sC=function(t,n){if(typeof t!="string"||t.length===0)throw new dc("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new dc('"allowMissing" argument must be a boolean');var r=KZ(t),i=r.length>0?r[0]:"",o=XZ("%"+i+"%",n),s=o.name,a=o.value,l=!1,c=o.alias;c&&(i=c[0],qZ(r,YZ([0,1],c)));for(var f=1,h=!0;f=r.length){var y=Ba(a,p);h=!!y,h&&"get"in y&&!("originalValue"in y.get)?a=y.get:a=a[p]}else h=Gg(a,p),a=a[p];h&&!l&&(hc[s]=a)}}return a},uw={},QZ={get exports(){return uw},set exports(e){uw=e}};(function(e){var t=oC,n=sC,r=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),o=n("%Reflect.apply%",!0)||t.call(i,r),s=n("%Object.getOwnPropertyDescriptor%",!0),a=n("%Object.defineProperty%",!0),l=n("%Math.max%");if(a)try{a({},"a",{value:1})}catch{a=null}e.exports=function(h){var p=o(t,i,arguments);if(s&&a){var m=s(p,"length");m.configurable&&a(p,"length",{value:1+l(0,h.length-(arguments.length-1))})}return p};var c=function(){return o(t,r,arguments)};a?a(e.exports,"apply",{value:c}):e.exports.apply=c})(QZ);var Nj=sC,Lj=uw,JZ=Lj(Nj("String.prototype.indexOf")),eK=function(t,n){var r=Nj(t,!!n);return typeof r=="function"&&JZ(t,".prototype.")>-1?Lj(r):r};const tK={},nK=Object.freeze(Object.defineProperty({__proto__:null,default:tK},Symbol.toStringTag,{value:"Module"})),rK=d$(nK);var aC=typeof Map=="function"&&Map.prototype,J0=Object.getOwnPropertyDescriptor&&aC?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Kg=aC&&J0&&typeof J0.get=="function"?J0.get:null,iK=aC&&Map.prototype.forEach,lC=typeof Set=="function"&&Set.prototype,e1=Object.getOwnPropertyDescriptor&&lC?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Xg=lC&&e1&&typeof e1.get=="function"?e1.get:null,oK=lC&&Set.prototype.forEach,sK=typeof WeakMap=="function"&&WeakMap.prototype,bf=sK?WeakMap.prototype.has:null,aK=typeof WeakSet=="function"&&WeakSet.prototype,wf=aK?WeakSet.prototype.has:null,lK=typeof WeakRef=="function"&&WeakRef.prototype,hM=lK?WeakRef.prototype.deref:null,cK=Boolean.prototype.valueOf,uK=Object.prototype.toString,fK=Function.prototype.toString,dK=String.prototype.match,cC=String.prototype.slice,ps=String.prototype.replace,hK=String.prototype.toUpperCase,pM=String.prototype.toLowerCase,Dj=RegExp.prototype.test,mM=Array.prototype.concat,zi=Array.prototype.join,pK=Array.prototype.slice,gM=Math.floor,fw=typeof BigInt=="function"?BigInt.prototype.valueOf:null,t1=Object.getOwnPropertySymbols,dw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Rc=typeof Symbol=="function"&&typeof Symbol.iterator=="object",nr=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Rc||"symbol")?Symbol.toStringTag:null,Aj=Object.prototype.propertyIsEnumerable,vM=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function yM(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||Dj.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-gM(-e):gM(e);if(r!==e){var i=String(r),o=cC.call(t,i.length+1);return ps.call(i,n,"$&_")+"."+ps.call(ps.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return ps.call(t,n,"$&_")}var n1=rK.custom,r1=n1&&Ij(n1)?n1:null,mK=function e(t,n,r,i){var o=n||{};if(ts(o,"quoteStyle")&&o.quoteStyle!=="single"&&o.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(ts(o,"maxStringLength")&&(typeof o.maxStringLength=="number"?o.maxStringLength<0&&o.maxStringLength!==1/0:o.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=ts(o,"customInspect")?o.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(ts(o,"indent")&&o.indent!==null&&o.indent!==" "&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(ts(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=o.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return $j(t,o);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?yM(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return a?yM(t,c):c}var f=typeof o.depth>"u"?5:o.depth;if(typeof r>"u"&&(r=0),r>=f&&f>0&&typeof t=="object")return hw(t)?"[Array]":"[Object]";var h=DK(o,r);if(typeof i>"u")i=[];else if(Fj(i,t)>=0)return"[Circular]";function p(J,Z,ee){if(Z&&(i=pK.call(i),i.push(Z)),ee){var ie={depth:o.depth};return ts(o,"quoteStyle")&&(ie.quoteStyle=o.quoteStyle),e(J,ie,r+1,i)}return e(J,o,r+1,i)}if(typeof t=="function"){var m=EK(t),v=hp(t,p);return"[Function"+(m?": "+m:" (anonymous)")+"]"+(v.length>0?" { "+zi.call(v,", ")+" }":"")}if(Ij(t)){var y=Rc?ps.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):dw.call(t);return typeof t=="object"&&!Rc?ju(y):y}if(RK(t)){for(var x="<"+pM.call(String(t.nodeName)),_=t.attributes||[],w=0;w<_.length;w++)x+=" "+_[w].name+"="+jj(gK(_[w].value),"double",o);return x+=">",t.childNodes&&t.childNodes.length&&(x+="..."),x+="",x}if(hw(t)){if(t.length===0)return"[]";var S=hp(t,p);return h&&!LK(S)?"["+pw(S,h)+"]":"[ "+zi.call(S,", ")+" ]"}if(_K(t)){var T=hp(t,p);return"cause"in t&&!Aj.call(t,"cause")?"{ ["+String(t)+"] "+zi.call(mM.call("[cause]: "+p(t.cause),T),", ")+" }":T.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+zi.call(T,", ")+" }"}if(typeof t=="object"&&s){if(r1&&typeof t[r1]=="function")return t[r1]();if(s!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(TK(t)){var P=[];return iK.call(t,function(J,Z){P.push(p(Z,t,!0)+" => "+p(J,t))}),_M("Map",Kg.call(t),P,h)}if(kK(t)){var k=[];return oK.call(t,function(J){k.push(p(J,t))}),_M("Set",Xg.call(t),k,h)}if(OK(t))return i1("WeakMap");if(MK(t))return i1("WeakSet");if(PK(t))return i1("WeakRef");if(wK(t))return ju(p(Number(t)));if(SK(t))return ju(p(fw.call(t)));if(xK(t))return ju(cK.call(t));if(bK(t))return ju(p(String(t)));if(!vK(t)&&!yK(t)){var N=hp(t,p),D=vM?vM(t)===Object.prototype:t instanceof Object||t.constructor===Object,z=t instanceof Object?"":"null prototype",A=!D&&nr&&Object(t)===t&&nr in t?cC.call(Qs(t),8,-1):z?"Object":"",W=D||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",Y=W+(A||z?"["+zi.call(mM.call([],A||[],z||[]),": ")+"] ":"");return N.length===0?Y+"{}":h?Y+"{"+pw(N,h)+"}":Y+"{ "+zi.call(N,", ")+" }"}return String(t)};function jj(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function gK(e){return ps.call(String(e),/"/g,""")}function hw(e){return Qs(e)==="[object Array]"&&(!nr||!(typeof e=="object"&&nr in e))}function vK(e){return Qs(e)==="[object Date]"&&(!nr||!(typeof e=="object"&&nr in e))}function yK(e){return Qs(e)==="[object RegExp]"&&(!nr||!(typeof e=="object"&&nr in e))}function _K(e){return Qs(e)==="[object Error]"&&(!nr||!(typeof e=="object"&&nr in e))}function bK(e){return Qs(e)==="[object String]"&&(!nr||!(typeof e=="object"&&nr in e))}function wK(e){return Qs(e)==="[object Number]"&&(!nr||!(typeof e=="object"&&nr in e))}function xK(e){return Qs(e)==="[object Boolean]"&&(!nr||!(typeof e=="object"&&nr in e))}function Ij(e){if(Rc)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!dw)return!1;try{return dw.call(e),!0}catch{}return!1}function SK(e){if(!e||typeof e!="object"||!fw)return!1;try{return fw.call(e),!0}catch{}return!1}var CK=Object.prototype.hasOwnProperty||function(e){return e in this};function ts(e,t){return CK.call(e,t)}function Qs(e){return uK.call(e)}function EK(e){if(e.name)return e.name;var t=dK.call(fK.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Fj(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;nt.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return $j(cC.call(e,0,t.maxStringLength),t)+r}var i=ps.call(ps.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,NK);return jj(i,"single",t)}function NK(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+hK.call(t.toString(16))}function ju(e){return"Object("+e+")"}function i1(e){return e+" { ? }"}function _M(e,t,n,r){var i=r?pw(n,r):zi.call(n,", ");return e+" ("+t+") {"+i+"}"}function LK(e){for(var t=0;t=0)return!1;return!0}function DK(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=zi.call(Array(e.indent+1)," ");else return null;return{base:n,prev:zi.call(Array(t+1),n)}}function pw(e,t){if(e.length===0)return"";var n=` -`+t.prev+t.base;return n+zi.call(e,","+n)+` -`+t.prev}function hp(e,t){var n=hw(e),r=[];if(n){r.length=e.length;for(var i=0;i1;){var n=t.pop(),r=n.obj[n.prop];if(Pa(r)){for(var i=[],o=0;o=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||o===ZK.RFC1738&&(c===40||c===41)){a+=s.charAt(l);continue}if(c<128){a=a+ji[c];continue}if(c<2048){a=a+(ji[192|c>>6]+ji[128|c&63]);continue}if(c<55296||c>=57344){a=a+(ji[224|c>>12]+ji[128|c>>6&63]+ji[128|c&63]);continue}l+=1,c=65536+((c&1023)<<10|s.charCodeAt(l)&1023),a+=ji[240|c>>18]+ji[128|c>>12&63]+ji[128|c>>6&63]+ji[128|c&63]}return a},tX=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],i=0;i"u"&&(S=0)}if(typeof l=="function"?_=l(n,_):_ instanceof Date?_=h(_):r==="comma"&&mo(_)&&(_=mw.maybeMap(_,function(F){return F instanceof Date?h(F):F})),_===null){if(o)return a&&!v?a(n,$n.encoder,y,"key",p):n;_=""}if(uX(_)||mw.isBuffer(_)){if(a){var k=v?n:a(n,$n.encoder,y,"key",p);if(r==="comma"&&v){for(var N=aX.call(String(_),","),D="",z=0;z"u")return A;var W;if(r==="comma"&&mo(_))W=[{value:_.length>0?_.join(",")||null:void 0}];else if(mo(l))W=l;else{var Y=Object.keys(_);W=c?Y.sort(c):Y}for(var J=i&&mo(_)&&_.length===1?n+"[]":n,Z=0;Z"u"?$n.allowDots:!!t.allowDots,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:$n.charsetSentinel,delimiter:typeof t.delimiter>"u"?$n.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:$n.encode,encoder:typeof t.encoder=="function"?t.encoder:$n.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:$n.encodeValuesOnly,filter:o,format:r,formatter:i,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:$n.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:$n.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:$n.strictNullHandling}},hX=function(e,t){var n=e,r=dX(t),i,o;typeof r.filter=="function"?(o=r.filter,n=o("",n)):mo(r.filter)&&(o=r.filter,i=o);var s=[];if(typeof n!="object"||n===null)return"";var a;t&&t.arrayFormat in bM?a=t.arrayFormat:t&&"indices"in t?a=t.indices?"indices":"repeat":a="indices";var l=bM[a];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var c=l==="comma"&&t&&t.commaRoundTrip;i||(i=Object.keys(n)),r.sort&&i.sort(r.sort);for(var f=Uj(),h=0;h0?v+m:""},Nc=zj,gw=Object.prototype.hasOwnProperty,pX=Array.isArray,Sn={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:Nc.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},mX=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},Hj=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},gX="utf8=%26%2310003%3B",vX="utf8=%E2%9C%93",yX=function(t,n){var r={},i=n.ignoreQueryPrefix?t.replace(/^\?/,""):t,o=n.parameterLimit===1/0?void 0:n.parameterLimit,s=i.split(n.delimiter,o),a=-1,l,c=n.charset;if(n.charsetSentinel)for(l=0;l-1&&(v=pX(v)?[v]:v),gw.call(r,m)?r[m]=Nc.combine(r[m],v):r[m]=v}return r},_X=function(e,t,n,r){for(var i=r?t:Hj(t,n),o=e.length-1;o>=0;--o){var s,a=e[o];if(a==="[]"&&n.parseArrays)s=[].concat(i);else{s=n.plainObjects?Object.create(null):{};var l=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,c=parseInt(l,10);!n.parseArrays&&l===""?s={0:i}:!isNaN(c)&&a!==l&&String(c)===l&&c>=0&&n.parseArrays&&c<=n.arrayLimit?(s=[],s[c]=i):l!=="__proto__"&&(s[l]=i)}i=s}return i},bX=function(t,n,r,i){if(t){var o=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,s=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,l=r.depth>0&&s.exec(o),c=l?o.slice(0,l.index):o,f=[];if(c){if(!r.plainObjects&&gw.call(Object.prototype,c)&&!r.allowPrototypes)return;f.push(c)}for(var h=0;r.depth>0&&(l=a.exec(o))!==null&&h"u"?Sn.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?Sn.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:Sn.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:Sn.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:Sn.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Sn.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:Sn.comma,decoder:typeof t.decoder=="function"?t.decoder:Sn.decoder,delimiter:typeof t.delimiter=="string"||Nc.isRegExp(t.delimiter)?t.delimiter:Sn.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:Sn.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:Sn.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:Sn.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:Sn.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Sn.strictNullHandling}},xX=function(e,t){var n=wX(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?yX(e,n):e,i=n.plainObjects?Object.create(null):{},o=Object.keys(r),s=0;sWj.parse(e,{ignoreQueryPrefix:!0}),Hd=e=>Wj.stringify(e,{arrayFormat:"brackets"});var i_=(e=>(e.INVALID_ARGUMENT="INVALID_ARGUMENT",e.INVALID_SHORT_URL_DELETION="INVALID_SHORT_URL_DELETION",e.DOMAIN_NOT_FOUND="DOMAIN_NOT_FOUND",e.FORBIDDEN_OPERATION="FORBIDDEN_OPERATION",e.INVALID_URL="INVALID_URL",e.INVALID_SLUG="INVALID_SLUG",e.INVALID_SHORTCODE="INVALID_SHORTCODE",e.TAG_CONFLICT="TAG_CONFLICT",e.TAG_NOT_FOUND="TAG_NOT_FOUND",e.MERCURE_NOT_CONFIGURED="MERCURE_NOT_CONFIGURED",e.INVALID_AUTHORIZATION="INVALID_AUTHORIZATION",e.INVALID_API_KEY="INVALID_API_KEY",e.NOT_FOUND="NOT_FOUND",e))(i_||{}),o_=(e=>(e.INVALID_ARGUMENT="https://shlink.io/api/error/invalid-data",e.INVALID_SHORT_URL_DELETION="https://shlink.io/api/error/invalid-short-url-deletion",e.DOMAIN_NOT_FOUND="https://shlink.io/api/error/domain-not-found",e.FORBIDDEN_OPERATION="https://shlink.io/api/error/forbidden-tag-operation",e.INVALID_URL="https://shlink.io/api/error/invalid-url",e.INVALID_SLUG="https://shlink.io/api/error/non-unique-slug",e.INVALID_SHORTCODE="https://shlink.io/api/error/short-url-not-found",e.TAG_CONFLICT="https://shlink.io/api/error/tag-conflict",e.TAG_NOT_FOUND="https://shlink.io/api/error/tag-not-found",e.MERCURE_NOT_CONFIGURED="https://shlink.io/api/error/mercure-not-configured",e.INVALID_AUTHORIZATION="https://shlink.io/api/error/missing-authentication",e.INVALID_API_KEY="https://shlink.io/api/error/invalid-api-key",e.NOT_FOUND="https://shlink.io/api/error/not-found",e))(o_||{});const TX=e=>!!e&&typeof e=="object"&&["type","detail","title","status"].every(t=>t in e),no=e=>TX(e)?e:void 0,OX=e=>(e==null?void 0:e.type)===i_.INVALID_ARGUMENT||(e==null?void 0:e.type)===o_.INVALID_ARGUMENT,PX=e=>(e==null?void 0:e.type)==="INVALID_SHORTCODE_DELETION"||(e==null?void 0:e.type)===i_.INVALID_SHORT_URL_DELETION||(e==null?void 0:e.type)===o_.INVALID_SHORT_URL_DELETION,kX=e=>((e==null?void 0:e.type)===i_.NOT_FOUND||(e==null?void 0:e.type)===o_.NOT_FOUND)&&(e==null?void 0:e.status)===404,MX=(e,t)=>`${e}/rest/v${t}`,RX=Ud(Fo),NX=({orderBy:e={},excludeMaxVisitsReached:t,excludePastValidUntil:n,...r})=>({...r,excludeMaxVisitsReached:t===!0?"true":void 0,excludePastValidUntil:n===!0?"true":void 0,orderBy:Mj(e)});class LX{constructor(t,n,r){xe(this,"apiVersion");xe(this,"listShortUrls",async(t={})=>this.performRequest("/short-urls","GET",NX(t)).then(({shortUrls:n})=>n));xe(this,"createShortUrl",async t=>{const n=Ud(r=>Wn(r)||Fo(r),t);return this.performRequest("/short-urls","POST",{},n)});xe(this,"getShortUrlVisits",async(t,n)=>this.performRequest(`/short-urls/${t}/visits`,"GET",n).then(({visits:r})=>r));xe(this,"getTagVisits",async(t,n)=>this.performRequest(`/tags/${t}/visits`,"GET",n).then(({visits:r})=>r));xe(this,"getDomainVisits",async(t,n)=>this.performRequest(`/domains/${t}/visits`,"GET",n).then(({visits:r})=>r));xe(this,"getOrphanVisits",async t=>this.performRequest("/visits/orphan","GET",t).then(({visits:n})=>n));xe(this,"getNonOrphanVisits",async t=>this.performRequest("/visits/non-orphan","GET",t).then(({visits:n})=>n));xe(this,"getVisitsOverview",async()=>this.performRequest("/visits").then(({visits:t})=>t));xe(this,"getShortUrl",async(t,n)=>this.performRequest(`/short-urls/${t}`,"GET",{domain:n}));xe(this,"deleteShortUrl",async(t,n)=>this.performEmptyRequest(`/short-urls/${t}`,"DELETE",{domain:n}));xe(this,"updateShortUrl",async(t,n,r)=>this.performRequest(`/short-urls/${t}`,"PATCH",{domain:n},r));xe(this,"listTags",async()=>this.performRequest("/tags","GET",{withStats:"true"}).then(({tags:t})=>t).then(({data:t,stats:n})=>({tags:t,stats:n})));xe(this,"tagsStats",async()=>this.performRequest("/tags/stats","GET").then(({tags:t})=>t).then(({data:t})=>({tags:t.map(({tag:n})=>n),stats:t})));xe(this,"deleteTags",async t=>this.performEmptyRequest("/tags","DELETE",{tags:t}).then(()=>({tags:t})));xe(this,"editTag",async(t,n)=>this.performEmptyRequest("/tags","PUT",{},{oldName:t,newName:n}).then(()=>({oldName:t,newName:n})));xe(this,"health",async()=>this.performRequest("/health","GET"));xe(this,"mercureInfo",async()=>this.performRequest("/mercure-info","GET"));xe(this,"listDomains",async()=>this.performRequest("/domains").then(({domains:t})=>t));xe(this,"editDomainRedirects",async t=>this.performRequest("/domains/redirects","PATCH",{},t));xe(this,"performRequest",async(t,n="GET",r={},i)=>this.httpClient.fetchJson(...this.toFetchParams(t,n,r,i)).catch(this.handleFetchError(()=>this.httpClient.fetchJson(...this.toFetchParams(t,n,r,i)))));xe(this,"performEmptyRequest",async(t,n="GET",r={},i)=>this.httpClient.fetchEmpty(...this.toFetchParams(t,n,r,i)).catch(this.handleFetchError(()=>this.httpClient.fetchEmpty(...this.toFetchParams(t,n,r,i)))));xe(this,"toFetchParams",(t,n,r={},i)=>{const o=Hd(RX(r)),s=Wn(o)?"":`?${o}`;return[`${MX(this.baseUrl,this.apiVersion)}${t}${s}`,{method:n,body:i&&JSON.stringify(i),headers:{"X-Api-Key":this.apiKey}}]});xe(this,"handleFetchError",t=>n=>{if(!kX(no(n)))throw n;return this.apiVersion=2,t()});this.httpClient=t,this.baseUrl=n,this.apiKey=r,this.apiVersion=3}}const l1={},DX=e=>typeof e=="function",AX=e=>{const{selectedServer:t}=e();if(!iC(t))throw new Error("There's no selected server or it is not found");return t},jX=e=>t=>{const{url:n,apiKey:r}=DX(t)?AX(t):t,i=`${n}_${r}`;return l1[i]||(l1[i]=new LX(e,n,r)),l1[i]},IX=e=>{e.serviceFactory("buildShlinkApiClient",jX,"HttpClient")};var vw={},FX={get exports(){return vw},set exports(e){vw=e}};/*! + */function zg(){return zg=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function GY(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ZY(e,t){return e.button===0&&(!t||t==="_self")&&!GY(e)}const KY=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],XY=["aria-current","caseSensitive","className","end","style","to","children"];function QY(e){let{basename:t,children:n,window:r}=e,i=V.useRef();i.current==null&&(i.current=XW({window:r,v5Compat:!0}));let o=i.current,[s,a]=V.useState({action:o.action,location:o.location});return V.useLayoutEffect(()=>o.listen(a),[o]),V.createElement(qY,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:o})}const Lt=V.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:o,replace:s,state:a,target:l,to:c,preventScrollReset:f}=t,h=ij(t,KY),p=IY(c,{relative:i}),m=JY(c,{replace:s,state:a,target:l,preventScrollReset:f,relative:i});function v(y){r&&r(y),y.defaultPrevented||m(y)}return V.createElement("a",zg({},h,{href:p,onClick:o?r:v,ref:n,target:l}))}),oj=V.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:i=!1,className:o="",end:s=!1,style:a,to:l,children:c}=t,f=ij(t,XY),h=$S(l,{relative:f.relative}),p=Pn(),m=V.useContext(qy),{navigator:v}=V.useContext(Fd),y=v.encodeLocation?v.encodeLocation(h).pathname:h.pathname,x=p.pathname,_=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;i||(x=x.toLowerCase(),_=_?_.toLowerCase():null,y=y.toLowerCase());let w=x===y||!s&&x.startsWith(y)&&x.charAt(y.length)==="/",S=_!=null&&(_===y||!s&&_.startsWith(y)&&_.charAt(y.length)==="/"),T=w?r:void 0,P;typeof o=="function"?P=o({isActive:w,isPending:S}):P=[o,w?"active":null,S?"pending":null].filter(Boolean).join(" ");let k=typeof a=="function"?a({isActive:w,isPending:S}):a;return V.createElement(Lt,zg({},f,{"aria-current":T,className:P,ref:n,style:k,to:l}),typeof c=="function"?c({isActive:w,isPending:S}):c)});var Wk;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(Wk||(Wk={}));var Yk;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Yk||(Yk={}));function JY(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:s}=t===void 0?{}:t,a=Fo(),l=Pn(),c=$S(e,{relative:s});return V.useCallback(f=>{if(ZY(f,n)){f.preventDefault();let h=r!==void 0?r:id(l)===id(c);a(e,{replace:h,state:i,preventScrollReset:o,relative:s})}},[l,a,c,r,i,n,e,o,s])}const eq="shlink-web-client",tq="A React-based progressive web application for shlink",nq="/shlink-web-client/develop",rq="https://github.com/shlinkio/shlink-web-client",iq="MIT",oq={lint:"npm run lint:css && npm run lint:js","lint:css":"stylelint src/*.scss src/**/*.scss","lint:js":"eslint --ext .js,.ts,.tsx src test","lint:fix":"npm run lint:css:fix && npm run lint:js:fix","lint:css:fix":"npm run lint:css -- --fix","lint:js:fix":"npm run lint:js -- --fix",types:"tsc",start:"vite serve --host=0.0.0.0",preview:"vite preview --host=0.0.0.0",build:"npm run types && vite build && node scripts/replace-version.mjs","build:dist":"npm run build && node scripts/create-dist-file.mjs",test:"vitest run --run","test:watch":"vitest --watch","test:ci":"npm run test -- --coverage","test:verbose":"npm run test -- --verbose"},sq={"@fortawesome/fontawesome-free":"^6.3.0","@fortawesome/fontawesome-svg-core":"^6.3.0","@fortawesome/free-brands-svg-icons":"^6.3.0","@fortawesome/free-regular-svg-icons":"^6.3.0","@fortawesome/free-solid-svg-icons":"^6.3.0","@fortawesome/react-fontawesome":"^0.2.0","@json2csv/plainjs":"^6.1.2","@reduxjs/toolkit":"^1.9.1",bootstrap:"^5.2.3",bottlejs:"^2.0.1",bowser:"^2.11.0","chart.js":"^4.1.1",classnames:"^2.3.2","compare-versions":"^5.0.3",csvtojson:"^2.0.10","date-fns":"^2.29.3","event-source-polyfill":"^1.0.31",history:"^5.3.0",leaflet:"^1.9.3",qs:"^6.11.0",ramda:"^0.27.2",react:"^18.2.0","react-chartjs-2":"^5.1.0","react-colorful":"^5.6.1","react-copy-to-clipboard":"^5.1.0","react-datepicker":"^4.8.0","react-dom":"^18.2.0","react-external-link":"^2.2.0","react-leaflet":"^4.2.0","react-redux":"^8.0.5","react-router-dom":"^6.6.1","react-swipeable":"^7.0.0","react-tag-autocomplete":"^6.3.0",reactstrap:"^9.1.5","redux-localstorage-simple":"^2.5.1",uuid:"^8.3.2","workbox-core":"^6.5.4","workbox-expiration":"^6.5.4","workbox-precaching":"^6.5.4","workbox-routing":"^6.5.4","workbox-strategies":"^6.5.4"},aq={"@shlinkio/eslint-config-js-coding-standard":"~2.1.0","@shlinkio/stylelint-config-css-coding-standard":"~1.0.1","@testing-library/jest-dom":"^5.16.5","@testing-library/react":"^14.0.0","@testing-library/user-event":"^14.4.3","@total-typescript/shoehorn":"^0.1.0","@types/json2csv":"^5.0.3","@types/leaflet":"^1.9.0","@types/qs":"^6.9.7","@types/ramda":"^0.28.15","@types/react":"^18.0.26","@types/react-color":"^3.0.6","@types/react-copy-to-clipboard":"^5.0.4","@types/react-datepicker":"^4.8.0","@types/react-dom":"^18.0.10","@types/react-tag-autocomplete":"^6.3.0","@types/uuid":"^8.3.4","@vitejs/plugin-react":"^4.0.0","@vitest/coverage-v8":"^0.32.0","adm-zip":"^0.5.10",chalk:"^5.2.0",eslint:"^8.30.0",jsdom:"^22.0.0","resize-observer-polyfill":"^1.5.1",sass:"^1.57.1",stylelint:"^15.10.1",typescript:"^5.0.2",vite:"^4.3.9","vite-plugin-pwa":"^0.14.4",vitest:"^0.32.0","vitest-canvas-mock":"^0.2.2"},lq=[">0.2%","not dead","not ie <= 11","not op_mini all"],Ug={name:eq,description:tq,private:!1,homepage:nq,repository:rq,license:iq,scripts:oq,dependencies:sq,devDependencies:aq,browserslist:lq};var Pi,Ji=".",sj="function",aj="string",lj="__global__",zS="Provider",cq=0,US=Array.prototype.slice,uq=function(t,n){var r=t[n];if(r===void 0&&Pi.config.strict)throw new Error("Bottle was unable to resolve a service. `"+n+"` is undefined.");return r},Ky=function(t){var n;return this.nested[t]||(n=Pi.pop(),this.nested[t]=n,this.factory(t,function(){return n.container})),this.nested[t]},cj=function(t){return t.split(Ji).reduce(uq,this)},fq=function(t,n,r,i){var o={configurable:!0,enumerable:!0};return t.length?o.get=function(){var a=0,l=function(f){if(f)throw f;t[a]&&t[a++](r,l)};return l(),r}:(o.value=r,o.writable=!0),Object.defineProperty(i,n,o),i[n]},dq=function(t,n){var r,i;return typeof t===sj&&(n=t,t=lj),r=t.split(Ji),i=r.shift(),r.length?Ky.call(this,i).middleware(r.join(Ji),n):(this.middlewares[i]||(this.middlewares[i]=[]),this.middlewares[i].push(n)),this},hq=function(t,n){return n(t)},qk=function(t,n){return(t[n]||[]).concat(t.__global__||[])},pq=function(t,n){var r,i,o,s,a;return this.id,o=this.container,s=this.decorators,a=this.middlewares,r=t+zS,i=Object.create(null),i[r]={configurable:!0,enumerable:!0,get:function(){var c=new n;return delete o[r],o[r]=c,c}},i[t]={configurable:!0,enumerable:!0,get:function(){var c=o[r],f;return c&&(f=qk(s,t).reduce(hq,c.$get(o)),delete o[r],delete o[t]),f===void 0?f:fq(qk(a,t),t,f,o)}},Object.defineProperties(o,i),this},uj=function(t,n){var r,i;return r=t.split(Ji),this.providerMap[t]&&r.length===1&&!this.container[t+zS]?console.error(t+" provider already instantiated."):(this.originalProviders[t]=n,this.providerMap[t]=!0,i=r.shift(),r.length?(Ky.call(this,i).provider(r.join(Ji),n),this):pq.call(this,i,n))},VS=function(t,n){return uj.call(this,t,function(){this.$get=n})},fj=function(t,n,r){var i=arguments.length>3?US.call(arguments,3):[],o=this;return VS.call(this,t,function(){var a=n,l=i.map(cj,o.container);return r?new(n.bind.apply(n,[null].concat(l))):a.apply(null,l)})},mq=function(t,n){return fj.apply(this,[t,n,!0].concat(US.call(arguments,2)))},gq=function(t,n){return fj.apply(this,[t,n,!1].concat(US.call(arguments,2)))},dj=function(t,n){Object.defineProperty(this,t,{configurable:!0,enumerable:!0,value:n,writable:!0})},hj=function(t,n){var r=t[n];return r||(r={},dj.call(t,n,r)),r},vq=function(t,n){var r;return r=t.split(Ji),t=r.pop(),dj.call(r.reduce(hj,this.container),t,n),this},yq=function(t,n){Object.defineProperty(this,t,{configurable:!1,enumerable:!0,value:n,writable:!1})},_q=function(t,n){var r=t.split(Ji);return t=r.pop(),yq.call(r.reduce(hj,this.container),t,n),this},pj=function(t,n){var r,i;return typeof t===sj&&(n=t,t=lj),r=t.split(Ji),i=r.shift(),r.length?Ky.call(this,i).decorator(r.join(Ji),n):(this.decorators[i]||(this.decorators[i]=[]),this.decorators[i].push(n)),this},bq=function(t){return this.deferred.push(t),this},wq=function(t){return(t||[]).map(cj,this.container)},xq=function(t,n){return VS.call(this,t,function(i){return{instance:n.bind(n,i)}})},Sq=function(t){return!/^\$(?:decorator|register|list)$|Provider$/.test(t)},HS=function(t){return Object.keys(t||this.container||{}).filter(Sq)},Vg={},Cq=function(t){var n;return typeof t===aj?(n=Vg[t],n||(Vg[t]=n=new Pi,n.constant("BOTTLE_NAME",t)),n):new Pi},Eq=function(t){typeof t===aj?delete Vg[t]:Vg={}},mj=function(t){var n=t.$value===void 0?t:t.$value;return this[t.$type||"service"].apply(this,[t.$name,n].concat(t.$inject||[]))},Gk=function(t){delete this.providerMap[t],delete this.container[t],delete this.container[t+zS]},Tq=function(t){var n=this.originalProviders,r=Array.isArray(t);Object.keys(this.originalProviders).forEach(function(o){if(!(r&&t.indexOf(o)===-1)){var s=o.split(Ji);s.length>1&&s.forEach(Gk,Ky.call(this,s[0])),Gk.call(this,o),this.provider(o,n[o])}},this)},Oq=function(t){return this.deferred.forEach(function(r){r(t)}),this};Pi=function e(t){if(!(this instanceof e))return e.pop(t);this.id=cq++,this.decorators={},this.middlewares={},this.nested={},this.providerMap={},this.originalProviders={},this.deferred=[],this.container={$decorator:pj.bind(this),$register:mj.bind(this),$list:HS.bind(this)}};Pi.prototype={constant:_q,decorator:pj,defer:bq,digest:wq,factory:VS,instanceFactory:xq,list:HS,middleware:dq,provider:uj,resetProviders:Tq,register:mj,resolve:Oq,service:mq,serviceFactory:gq,value:vq};Pi.pop=Cq;Pi.clear=Eq;Pi.list=HS;Pi.config={strict:!1};const Pq=Pi;var kq=function(){return!0};const gj=kq;function Ot(e){return e!=null&&typeof e=="object"&&e["@@functional/placeholder"]===!0}function yt(e){return function t(n){return arguments.length===0||Ot(n)?t:e.apply(this,arguments)}}function lt(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return Ot(n)?t:yt(function(i){return e(n,i)});default:return Ot(n)&&Ot(r)?t:Ot(n)?yt(function(i){return e(i,r)}):Ot(r)?yt(function(i){return e(n,i)}):e(n,r)}}}function Mq(e,t){e=e||[],t=t||[];var n,r=e.length,i=t.length,o=[];for(n=0;n=arguments.length)?a=t[s]:(a=arguments[i],i+=1),r[s]=a,Ot(a)||(o-=1),s+=1}return o<=0?n.apply(this,r):Gc(o,Xy(e,r,n))}}var Rq=lt(function(t,n){return t===1?yt(n):Gc(t,Xy(t,[],n))});const Hg=Rq;function Qs(e){return function t(n,r,i){switch(arguments.length){case 0:return t;case 1:return Ot(n)?t:lt(function(o,s){return e(n,o,s)});case 2:return Ot(n)&&Ot(r)?t:Ot(n)?lt(function(o,s){return e(o,r,s)}):Ot(r)?lt(function(o,s){return e(n,o,s)}):yt(function(o){return e(n,r,o)});default:return Ot(n)&&Ot(r)&&Ot(i)?t:Ot(n)&&Ot(r)?lt(function(o,s){return e(o,s,i)}):Ot(n)&&Ot(i)?lt(function(o,s){return e(o,r,s)}):Ot(r)&&Ot(i)?lt(function(o,s){return e(n,o,s)}):Ot(n)?yt(function(o){return e(o,r,i)}):Ot(r)?yt(function(o){return e(n,o,i)}):Ot(i)?yt(function(o){return e(n,r,o)}):e(n,r,i)}}}const $d=Array.isArray||function(t){return t!=null&&t.length>=0&&Object.prototype.toString.call(t)==="[object Array]"};function Nq(e){return e!=null&&typeof e["@@transducer/step"]=="function"}function WS(e,t,n){return function(){if(arguments.length===0)return n();var r=Array.prototype.slice.call(arguments,0),i=r.pop();if(!$d(i)){for(var o=0;ot?n:t});const vj=Lq;function lm(e,t){for(var n=0,r=t.length,i=Array(r);n0?t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1):!1});const yj=Dq;var Aq=function(){function e(t){this.f=t}return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(t){return t},e.prototype["@@transducer/step"]=function(t,n){return this.f(t,n)},e}();function jq(e){return new Aq(e)}var Iq=lt(function(t,n){return Gc(t.length,function(){return t.apply(n,arguments)})});const Fq=Iq;function $q(e,t,n){for(var r=0,i=n.length;r=0;)n=Jk[r],Mr(n,t)&&!Wq(i,n)&&(i[i.length]=n),r-=1;return i});const eo=Yq;var qq=lt(WS(["fantasy-land/map","map"],Uq,function(t,n){switch(Object.prototype.toString.call(n)){case"[object Function]":return Hg(n.length,function(){return t.call(this,n.apply(this,arguments))});case"[object Object]":return Zc(function(r,i){return r[i]=t(n[i]),r},{},eo(n));default:return lm(t,n)}}));const Bd=qq,nw=Number.isInteger||function(t){return t<<0===t};var Gq=lt(function(t,n){var r=t<0?n.length+t:t;return Qy(n)?n.charAt(r):n[r]});const bj=Gq;var Zq=lt(function(t,n){return t.map(function(r){for(var i=n,o=0,s;o1){var o=!$o(r)&&Mr(i,r)?r[i]:nw(t[1])?[]:{};n=e(Array.prototype.slice.call(t,1),n,o)}if(nw(i)&&$d(r)){var s=[].concat(r);return s[i]=n,s}else return sd(i,n,r)});const Tl=aG;function lG(e){var t=Object.prototype.toString.call(e);return t==="[object Function]"||t==="[object AsyncFunction]"||t==="[object GeneratorFunction]"||t==="[object AsyncGeneratorFunction]"}var cG=lt(function(t,n){var r=Hg(t,n);return Hg(t,function(){return Zc(rG,Bd(r,arguments[0]),Array.prototype.slice.call(arguments,1))})});const uG=cG;var fG=yt(function(t){return uG(t.length,t)});const dG=fG;function hG(e){return function t(n){for(var r,i,o,s=[],a=0,l=n.length;a=0;){if(n[o]===e)return r[o]===t;o-=1}switch(i){case"Map":return e.size!==t.size?!1:rM(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size!==t.size?!1:rM(e.values(),t.values(),n.concat([e]),r.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var s=eo(e);if(s.length!==eo(t).length)return!1;var a=n.concat([e]),l=r.concat([t]);for(o=s.length-1;o>=0;){var c=s[o];if(!(Mr(c,t)&&ZS(t[c],e[c],a,l)))return!1;o-=1}return!0}var kG=lt(function(t,n){return ZS(t,n,[],[])});const KS=kG;function MG(e,t,n){var r,i;if(typeof e.indexOf=="function")switch(typeof t){case"number":if(t===0){for(r=1/t;n=0}function Y0(e){var t=e.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0");return'"'+t.replace(/"/g,'\\"')+'"'}var Nu=function(t){return(t<10?"0":"")+t},NG=typeof Date.prototype.toISOString=="function"?function(t){return t.toISOString()}:function(t){return t.getUTCFullYear()+"-"+Nu(t.getUTCMonth()+1)+"-"+Nu(t.getUTCDate())+"T"+Nu(t.getUTCHours())+":"+Nu(t.getUTCMinutes())+":"+Nu(t.getUTCSeconds())+"."+(t.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};const LG=NG;function DG(e){return function(){return!e.apply(this,arguments)}}function AG(e,t){for(var n=0,r=t.length,i=[];n":Cj(s,a)},r=function(o,s){return lm(function(a){return Y0(a)+": "+n(o[a])},s.slice().sort())};switch(Object.prototype.toString.call(e)){case"[object Arguments]":return"(function() { return arguments; }("+lm(n,e).join(", ")+"))";case"[object Array]":return"["+lm(n,e).concat(r(e,zd(function(o){return/^\d+$/.test(o)},eo(e)))).join(", ")+"]";case"[object Boolean]":return typeof e=="object"?"new Boolean("+n(e.valueOf())+")":e.toString();case"[object Date]":return"new Date("+(isNaN(e.valueOf())?n(NaN):Y0(LG(e)))+")";case"[object Null]":return"null";case"[object Number]":return typeof e=="object"?"new Number("+n(e.valueOf())+")":1/e===-1/0?"-0":e.toString(10);case"[object String]":return typeof e=="object"?"new String("+n(e.valueOf())+")":Y0(e);case"[object Undefined]":return"undefined";default:if(typeof e.toString=="function"){var i=e.toString();if(i!=="[object Object]")return i}return"{"+r(e,eo(e)).join(", ")+"}"}}var zG=yt(function(t){return Cj(t,[])});const UG=zG;var VG=yt(function(t){var n=YS(vj,0,Bd(function(r){return r[0].length},t));return Gc(n,function(){for(var r=0;rs?1:0})});const EZ=CZ;var TZ=lt(function(t,n){if(t<=0)throw new Error("First argument to splitEvery must be a positive integer");for(var r=[],i=0;i!!(e!=null&&e.url)&&!!(e!=null&&e.apiKey),Ms=e=>!!(e!=null&&e.id),Jy=e=>!!(e!=null&&e.version),AZ=e=>!!(e!=null&&e.serverNotFound),Ud=e=>Ms(e)?e.id:"",jZ=e=>vZ(["id","autoConnect"],e),e_=(e,t,n)=>e!==t?"ASC":n?{ASC:"DESC",DESC:void 0}[n]:"ASC",Nj=(e,{field:t,dir:n})=>!t||!n?e:e.sort((r,i)=>{const o=n==="ASC"?1:-1,s=n==="ASC"?-1:1;return r[t]>i[t]?o:s}),Lj=e=>e.dir?`${e.field}-${e.dir}`:void 0,IZ=e=>{const[t,n]=e.split("-");return{field:t,dir:n}};var FZ=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var i=42;t[n]=i;for(n in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,n);if(s.value!==i||s.enumerable!==!0)return!1}return!0},oM=typeof Symbol<"u"&&Symbol,$Z=FZ,BZ=function(){return typeof oM!="function"||typeof Symbol!="function"||typeof oM("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:$Z()},zZ="Function.prototype.bind called on incompatible ",q0=Array.prototype.slice,UZ=Object.prototype.toString,VZ="[object Function]",HZ=function(t){var n=this;if(typeof n!="function"||UZ.call(n)!==VZ)throw new TypeError(zZ+n);for(var r=q0.call(arguments,1),i,o=function(){if(this instanceof i){var f=n.apply(this,r.concat(q0.call(arguments)));return Object(f)===f?f:this}else return n.apply(t,r.concat(q0.call(arguments)))},s=Math.max(0,n.length-r.length),a=[],l=0;l"u"?st:ns(Uint8Array),fc={"%AggregateError%":typeof AggregateError>"u"?st:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?st:ArrayBuffer,"%ArrayIteratorPrototype%":Ol?ns([][Symbol.iterator]()):st,"%AsyncFromSyncIteratorPrototype%":st,"%AsyncFunction%":Il,"%AsyncGenerator%":Il,"%AsyncGeneratorFunction%":Il,"%AsyncIteratorPrototype%":Il,"%Atomics%":typeof Atomics>"u"?st:Atomics,"%BigInt%":typeof BigInt>"u"?st:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?st:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?st:Float32Array,"%Float64Array%":typeof Float64Array>"u"?st:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?st:FinalizationRegistry,"%Function%":Dj,"%GeneratorFunction%":Il,"%Int8Array%":typeof Int8Array>"u"?st:Int8Array,"%Int16Array%":typeof Int16Array>"u"?st:Int16Array,"%Int32Array%":typeof Int32Array>"u"?st:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ol?ns(ns([][Symbol.iterator]())):st,"%JSON%":typeof JSON=="object"?JSON:st,"%Map%":typeof Map>"u"?st:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ol?st:ns(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?st:Promise,"%Proxy%":typeof Proxy>"u"?st:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?st:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?st:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ol?st:ns(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?st:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ol?ns(""[Symbol.iterator]()):st,"%Symbol%":Ol?Symbol:st,"%SyntaxError%":ld,"%ThrowTypeError%":GZ,"%TypedArray%":ZZ,"%TypeError%":uc,"%Uint8Array%":typeof Uint8Array>"u"?st:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?st:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?st:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?st:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?st:WeakMap,"%WeakRef%":typeof WeakRef>"u"?st:WeakRef,"%WeakSet%":typeof WeakSet>"u"?st:WeakSet},KZ=function e(t){var n;if(t==="%AsyncFunction%")n=G0("async function () {}");else if(t==="%GeneratorFunction%")n=G0("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=G0("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&(n=ns(i.prototype))}return fc[t]=n,n},sM={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},t_=eC,Gg=qZ,XZ=t_.call(Function.call,Array.prototype.concat),QZ=t_.call(Function.apply,Array.prototype.splice),aM=t_.call(Function.call,String.prototype.replace),Zg=t_.call(Function.call,String.prototype.slice),JZ=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,eK=/\\(\\)?/g,tK=function(t){var n=Zg(t,0,1),r=Zg(t,-1);if(n==="%"&&r!=="%")throw new ld("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new ld("invalid intrinsic syntax, expected opening `%`");var i=[];return aM(t,JZ,function(o,s,a,l){i[i.length]=a?aM(l,eK,"$1"):s||o}),i},nK=function(t,n){var r=t,i;if(Gg(sM,r)&&(i=sM[r],r="%"+i[0]+"%"),Gg(fc,r)){var o=fc[r];if(o===Il&&(o=KZ(r)),typeof o>"u"&&!n)throw new uc("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:o}}throw new ld("intrinsic "+t+" does not exist!")},tC=function(t,n){if(typeof t!="string"||t.length===0)throw new uc("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new uc('"allowMissing" argument must be a boolean');var r=tK(t),i=r.length>0?r[0]:"",o=nK("%"+i+"%",n),s=o.name,a=o.value,l=!1,c=o.alias;c&&(i=c[0],QZ(r,XZ([0,1],c)));for(var f=1,h=!0;f=r.length){var y=Ba(a,p);h=!!y,h&&"get"in y&&!("originalValue"in y.get)?a=y.get:a=a[p]}else h=Gg(a,p),a=a[p];h&&!l&&(fc[s]=a)}}return a},Aj={exports:{}};(function(e){var t=eC,n=tC,r=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),o=n("%Reflect.apply%",!0)||t.call(i,r),s=n("%Object.getOwnPropertyDescriptor%",!0),a=n("%Object.defineProperty%",!0),l=n("%Math.max%");if(a)try{a({},"a",{value:1})}catch{a=null}e.exports=function(h){var p=o(t,i,arguments);if(s&&a){var m=s(p,"length");m.configurable&&a(p,"length",{value:1+l(0,h.length-(arguments.length-1))})}return p};var c=function(){return o(t,r,arguments)};a?a(e.exports,"apply",{value:c}):e.exports.apply=c})(Aj);var rK=Aj.exports,jj=tC,Ij=rK,iK=Ij(jj("String.prototype.indexOf")),oK=function(t,n){var r=jj(t,!!n);return typeof r=="function"&&iK(t,".prototype.")>-1?Ij(r):r};const sK={},aK=Object.freeze(Object.defineProperty({__proto__:null,default:sK},Symbol.toStringTag,{value:"Module"})),lK=_$(aK);var nC=typeof Map=="function"&&Map.prototype,K0=Object.getOwnPropertyDescriptor&&nC?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Kg=nC&&K0&&typeof K0.get=="function"?K0.get:null,cK=nC&&Map.prototype.forEach,rC=typeof Set=="function"&&Set.prototype,X0=Object.getOwnPropertyDescriptor&&rC?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Xg=rC&&X0&&typeof X0.get=="function"?X0.get:null,uK=rC&&Set.prototype.forEach,fK=typeof WeakMap=="function"&&WeakMap.prototype,yf=fK?WeakMap.prototype.has:null,dK=typeof WeakSet=="function"&&WeakSet.prototype,_f=dK?WeakSet.prototype.has:null,hK=typeof WeakRef=="function"&&WeakRef.prototype,lM=hK?WeakRef.prototype.deref:null,pK=Boolean.prototype.valueOf,mK=Object.prototype.toString,gK=Function.prototype.toString,vK=String.prototype.match,iC=String.prototype.slice,gs=String.prototype.replace,yK=String.prototype.toUpperCase,cM=String.prototype.toLowerCase,Fj=RegExp.prototype.test,uM=Array.prototype.concat,Ui=Array.prototype.join,_K=Array.prototype.slice,fM=Math.floor,iw=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Q0=Object.getOwnPropertySymbols,ow=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,kc=typeof Symbol=="function"&&typeof Symbol.iterator=="object",nr=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===kc||"symbol")?Symbol.toStringTag:null,$j=Object.prototype.propertyIsEnumerable,dM=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function hM(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||Fj.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-fM(-e):fM(e);if(r!==e){var i=String(r),o=iC.call(t,i.length+1);return gs.call(i,n,"$&_")+"."+gs.call(gs.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return gs.call(t,n,"$&_")}var J0=lK.custom,e1=J0&&zj(J0)?J0:null,bK=function e(t,n,r,i){var o=n||{};if(rs(o,"quoteStyle")&&o.quoteStyle!=="single"&&o.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(rs(o,"maxStringLength")&&(typeof o.maxStringLength=="number"?o.maxStringLength<0&&o.maxStringLength!==1/0:o.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=rs(o,"customInspect")?o.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(rs(o,"indent")&&o.indent!==null&&o.indent!==" "&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(rs(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=o.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return Vj(t,o);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?hM(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return a?hM(t,c):c}var f=typeof o.depth>"u"?5:o.depth;if(typeof r>"u"&&(r=0),r>=f&&f>0&&typeof t=="object")return sw(t)?"[Array]":"[Object]";var h=$K(o,r);if(typeof i>"u")i=[];else if(Uj(i,t)>=0)return"[Circular]";function p(J,Z,ee){if(Z&&(i=_K.call(i),i.push(Z)),ee){var ie={depth:o.depth};return rs(o,"quoteStyle")&&(ie.quoteStyle=o.quoteStyle),e(J,ie,r+1,i)}return e(J,o,r+1,i)}if(typeof t=="function"){var m=MK(t),v=pp(t,p);return"[Function"+(m?": "+m:" (anonymous)")+"]"+(v.length>0?" { "+Ui.call(v,", ")+" }":"")}if(zj(t)){var y=kc?gs.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):ow.call(t);return typeof t=="object"&&!kc?Du(y):y}if(jK(t)){for(var x="<"+cM.call(String(t.nodeName)),_=t.attributes||[],w=0;w<_.length;w++)x+=" "+_[w].name+"="+Bj(wK(_[w].value),"double",o);return x+=">",t.childNodes&&t.childNodes.length&&(x+="..."),x+="",x}if(sw(t)){if(t.length===0)return"[]";var S=pp(t,p);return h&&!FK(S)?"["+aw(S,h)+"]":"[ "+Ui.call(S,", ")+" ]"}if(CK(t)){var T=pp(t,p);return"cause"in t&&!$j.call(t,"cause")?"{ ["+String(t)+"] "+Ui.call(uM.call("[cause]: "+p(t.cause),T),", ")+" }":T.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Ui.call(T,", ")+" }"}if(typeof t=="object"&&s){if(e1&&typeof t[e1]=="function")return t[e1]();if(s!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(RK(t)){var P=[];return cK.call(t,function(J,Z){P.push(p(Z,t,!0)+" => "+p(J,t))}),pM("Map",Kg.call(t),P,h)}if(DK(t)){var k=[];return uK.call(t,function(J){k.push(p(J,t))}),pM("Set",Xg.call(t),k,h)}if(NK(t))return t1("WeakMap");if(AK(t))return t1("WeakSet");if(LK(t))return t1("WeakRef");if(TK(t))return Du(p(Number(t)));if(PK(t))return Du(p(iw.call(t)));if(OK(t))return Du(pK.call(t));if(EK(t))return Du(p(String(t)));if(!xK(t)&&!SK(t)){var N=pp(t,p),D=dM?dM(t)===Object.prototype:t instanceof Object||t.constructor===Object,z=t instanceof Object?"":"null prototype",A=!D&&nr&&Object(t)===t&&nr in t?iC.call(Js(t),8,-1):z?"Object":"",W=D||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",Y=W+(A||z?"["+Ui.call(uM.call([],A||[],z||[]),": ")+"] ":"");return N.length===0?Y+"{}":h?Y+"{"+aw(N,h)+"}":Y+"{ "+Ui.call(N,", ")+" }"}return String(t)};function Bj(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function wK(e){return gs.call(String(e),/"/g,""")}function sw(e){return Js(e)==="[object Array]"&&(!nr||!(typeof e=="object"&&nr in e))}function xK(e){return Js(e)==="[object Date]"&&(!nr||!(typeof e=="object"&&nr in e))}function SK(e){return Js(e)==="[object RegExp]"&&(!nr||!(typeof e=="object"&&nr in e))}function CK(e){return Js(e)==="[object Error]"&&(!nr||!(typeof e=="object"&&nr in e))}function EK(e){return Js(e)==="[object String]"&&(!nr||!(typeof e=="object"&&nr in e))}function TK(e){return Js(e)==="[object Number]"&&(!nr||!(typeof e=="object"&&nr in e))}function OK(e){return Js(e)==="[object Boolean]"&&(!nr||!(typeof e=="object"&&nr in e))}function zj(e){if(kc)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!ow)return!1;try{return ow.call(e),!0}catch{}return!1}function PK(e){if(!e||typeof e!="object"||!iw)return!1;try{return iw.call(e),!0}catch{}return!1}var kK=Object.prototype.hasOwnProperty||function(e){return e in this};function rs(e,t){return kK.call(e,t)}function Js(e){return mK.call(e)}function MK(e){if(e.name)return e.name;var t=vK.call(gK.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Uj(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;nt.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return Vj(iC.call(e,0,t.maxStringLength),t)+r}var i=gs.call(gs.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,IK);return Bj(i,"single",t)}function IK(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+yK.call(t.toString(16))}function Du(e){return"Object("+e+")"}function t1(e){return e+" { ? }"}function pM(e,t,n,r){var i=r?aw(n,r):Ui.call(n,", ");return e+" ("+t+") {"+i+"}"}function FK(e){for(var t=0;t=0)return!1;return!0}function $K(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=Ui.call(Array(e.indent+1)," ");else return null;return{base:n,prev:Ui.call(Array(t+1),n)}}function aw(e,t){if(e.length===0)return"";var n=` +`+t.prev+t.base;return n+Ui.call(e,","+n)+` +`+t.prev}function pp(e,t){var n=sw(e),r=[];if(n){r.length=e.length;for(var i=0;i1;){var n=t.pop(),r=n.obj[n.prop];if(Pa(r)){for(var i=[],o=0;o=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||o===eX.RFC1738&&(c===40||c===41)){a+=s.charAt(l);continue}if(c<128){a=a+Ii[c];continue}if(c<2048){a=a+(Ii[192|c>>6]+Ii[128|c&63]);continue}if(c<55296||c>=57344){a=a+(Ii[224|c>>12]+Ii[128|c>>6&63]+Ii[128|c&63]);continue}l+=1,c=65536+((c&1023)<<10|s.charCodeAt(l)&1023),a+=Ii[240|c>>18]+Ii[128|c>>12&63]+Ii[128|c>>6&63]+Ii[128|c&63]}return a},sX=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],i=0;i"u"&&(S=0)}if(typeof l=="function"?_=l(n,_):_ instanceof Date?_=h(_):r==="comma"&&go(_)&&(_=lw.maybeMap(_,function(F){return F instanceof Date?h(F):F})),_===null){if(o)return a&&!v?a(n,$n.encoder,y,"key",p):n;_=""}if(mX(_)||lw.isBuffer(_)){if(a){var k=v?n:a(n,$n.encoder,y,"key",p);if(r==="comma"&&v){for(var N=dX.call(String(_),","),D="",z=0;z"u")return A;var W;if(r==="comma"&&go(_))W=[{value:_.length>0?_.join(",")||null:void 0}];else if(go(l))W=l;else{var Y=Object.keys(_);W=c?Y.sort(c):Y}for(var J=i&&go(_)&&_.length===1?n+"[]":n,Z=0;Z"u"?$n.allowDots:!!t.allowDots,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:$n.charsetSentinel,delimiter:typeof t.delimiter>"u"?$n.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:$n.encode,encoder:typeof t.encoder=="function"?t.encoder:$n.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:$n.encodeValuesOnly,filter:o,format:r,formatter:i,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:$n.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:$n.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:$n.strictNullHandling}},yX=function(e,t){var n=e,r=vX(t),i,o;typeof r.filter=="function"?(o=r.filter,n=o("",n)):go(r.filter)&&(o=r.filter,i=o);var s=[];if(typeof n!="object"||n===null)return"";var a;t&&t.arrayFormat in mM?a=t.arrayFormat:t&&"indices"in t?a=t.indices?"indices":"repeat":a="indices";var l=mM[a];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var c=l==="comma"&&t&&t.commaRoundTrip;i||(i=Object.keys(n)),r.sort&&i.sort(r.sort);for(var f=Yj(),h=0;h0?v+m:""},Mc=Wj,cw=Object.prototype.hasOwnProperty,_X=Array.isArray,Sn={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:Mc.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},bX=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},Gj=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},wX="utf8=%26%2310003%3B",xX="utf8=%E2%9C%93",SX=function(t,n){var r={},i=n.ignoreQueryPrefix?t.replace(/^\?/,""):t,o=n.parameterLimit===1/0?void 0:n.parameterLimit,s=i.split(n.delimiter,o),a=-1,l,c=n.charset;if(n.charsetSentinel)for(l=0;l-1&&(v=_X(v)?[v]:v),cw.call(r,m)?r[m]=Mc.combine(r[m],v):r[m]=v}return r},CX=function(e,t,n,r){for(var i=r?t:Gj(t,n),o=e.length-1;o>=0;--o){var s,a=e[o];if(a==="[]"&&n.parseArrays)s=[].concat(i);else{s=n.plainObjects?Object.create(null):{};var l=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,c=parseInt(l,10);!n.parseArrays&&l===""?s={0:i}:!isNaN(c)&&a!==l&&String(c)===l&&c>=0&&n.parseArrays&&c<=n.arrayLimit?(s=[],s[c]=i):l!=="__proto__"&&(s[l]=i)}i=s}return i},EX=function(t,n,r,i){if(t){var o=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,s=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,l=r.depth>0&&s.exec(o),c=l?o.slice(0,l.index):o,f=[];if(c){if(!r.plainObjects&&cw.call(Object.prototype,c)&&!r.allowPrototypes)return;f.push(c)}for(var h=0;r.depth>0&&(l=a.exec(o))!==null&&h"u"?Sn.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?Sn.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:Sn.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:Sn.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:Sn.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Sn.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:Sn.comma,decoder:typeof t.decoder=="function"?t.decoder:Sn.decoder,delimiter:typeof t.delimiter=="string"||Mc.isRegExp(t.delimiter)?t.delimiter:Sn.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:Sn.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:Sn.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:Sn.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:Sn.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Sn.strictNullHandling}},OX=function(e,t){var n=TX(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?SX(e,n):e,i=n.plainObjects?Object.create(null):{},o=Object.keys(r),s=0;sZj.parse(e,{ignoreQueryPrefix:!0}),Vd=e=>Zj.stringify(e,{arrayFormat:"brackets"});var n_=(e=>(e.INVALID_ARGUMENT="INVALID_ARGUMENT",e.INVALID_SHORT_URL_DELETION="INVALID_SHORT_URL_DELETION",e.DOMAIN_NOT_FOUND="DOMAIN_NOT_FOUND",e.FORBIDDEN_OPERATION="FORBIDDEN_OPERATION",e.INVALID_URL="INVALID_URL",e.INVALID_SLUG="INVALID_SLUG",e.INVALID_SHORTCODE="INVALID_SHORTCODE",e.TAG_CONFLICT="TAG_CONFLICT",e.TAG_NOT_FOUND="TAG_NOT_FOUND",e.MERCURE_NOT_CONFIGURED="MERCURE_NOT_CONFIGURED",e.INVALID_AUTHORIZATION="INVALID_AUTHORIZATION",e.INVALID_API_KEY="INVALID_API_KEY",e.NOT_FOUND="NOT_FOUND",e))(n_||{}),r_=(e=>(e.INVALID_ARGUMENT="https://shlink.io/api/error/invalid-data",e.INVALID_SHORT_URL_DELETION="https://shlink.io/api/error/invalid-short-url-deletion",e.DOMAIN_NOT_FOUND="https://shlink.io/api/error/domain-not-found",e.FORBIDDEN_OPERATION="https://shlink.io/api/error/forbidden-tag-operation",e.INVALID_URL="https://shlink.io/api/error/invalid-url",e.INVALID_SLUG="https://shlink.io/api/error/non-unique-slug",e.INVALID_SHORTCODE="https://shlink.io/api/error/short-url-not-found",e.TAG_CONFLICT="https://shlink.io/api/error/tag-conflict",e.TAG_NOT_FOUND="https://shlink.io/api/error/tag-not-found",e.MERCURE_NOT_CONFIGURED="https://shlink.io/api/error/mercure-not-configured",e.INVALID_AUTHORIZATION="https://shlink.io/api/error/missing-authentication",e.INVALID_API_KEY="https://shlink.io/api/error/invalid-api-key",e.NOT_FOUND="https://shlink.io/api/error/not-found",e))(r_||{});const NX=e=>!!e&&typeof e=="object"&&["type","detail","title","status"].every(t=>t in e),ro=e=>NX(e)?e:void 0,LX=e=>(e==null?void 0:e.type)===n_.INVALID_ARGUMENT||(e==null?void 0:e.type)===r_.INVALID_ARGUMENT,DX=e=>(e==null?void 0:e.type)==="INVALID_SHORTCODE_DELETION"||(e==null?void 0:e.type)===n_.INVALID_SHORT_URL_DELETION||(e==null?void 0:e.type)===r_.INVALID_SHORT_URL_DELETION,AX=e=>((e==null?void 0:e.type)===n_.NOT_FOUND||(e==null?void 0:e.type)===r_.NOT_FOUND)&&(e==null?void 0:e.status)===404,jX=(e,t)=>`${e}/rest/v${t}`,IX=zd($o),FX=({orderBy:e={},excludeMaxVisitsReached:t,excludePastValidUntil:n,...r})=>({...r,excludeMaxVisitsReached:t===!0?"true":void 0,excludePastValidUntil:n===!0?"true":void 0,orderBy:Lj(e)});class $X{constructor(t,n,r){xe(this,"apiVersion");xe(this,"listShortUrls",async(t={})=>this.performRequest("/short-urls","GET",FX(t)).then(({shortUrls:n})=>n));xe(this,"createShortUrl",async t=>{const n=zd(r=>Wn(r)||$o(r),t);return this.performRequest("/short-urls","POST",{},n)});xe(this,"getShortUrlVisits",async(t,n)=>this.performRequest(`/short-urls/${t}/visits`,"GET",n).then(({visits:r})=>r));xe(this,"getTagVisits",async(t,n)=>this.performRequest(`/tags/${t}/visits`,"GET",n).then(({visits:r})=>r));xe(this,"getDomainVisits",async(t,n)=>this.performRequest(`/domains/${t}/visits`,"GET",n).then(({visits:r})=>r));xe(this,"getOrphanVisits",async t=>this.performRequest("/visits/orphan","GET",t).then(({visits:n})=>n));xe(this,"getNonOrphanVisits",async t=>this.performRequest("/visits/non-orphan","GET",t).then(({visits:n})=>n));xe(this,"getVisitsOverview",async()=>this.performRequest("/visits").then(({visits:t})=>t));xe(this,"getShortUrl",async(t,n)=>this.performRequest(`/short-urls/${t}`,"GET",{domain:n}));xe(this,"deleteShortUrl",async(t,n)=>this.performEmptyRequest(`/short-urls/${t}`,"DELETE",{domain:n}));xe(this,"updateShortUrl",async(t,n,r)=>this.performRequest(`/short-urls/${t}`,"PATCH",{domain:n},r));xe(this,"listTags",async()=>this.performRequest("/tags","GET",{withStats:"true"}).then(({tags:t})=>t).then(({data:t,stats:n})=>({tags:t,stats:n})));xe(this,"tagsStats",async()=>this.performRequest("/tags/stats","GET").then(({tags:t})=>t).then(({data:t})=>({tags:t.map(({tag:n})=>n),stats:t})));xe(this,"deleteTags",async t=>this.performEmptyRequest("/tags","DELETE",{tags:t}).then(()=>({tags:t})));xe(this,"editTag",async(t,n)=>this.performEmptyRequest("/tags","PUT",{},{oldName:t,newName:n}).then(()=>({oldName:t,newName:n})));xe(this,"health",async()=>this.performRequest("/health","GET"));xe(this,"mercureInfo",async()=>this.performRequest("/mercure-info","GET"));xe(this,"listDomains",async()=>this.performRequest("/domains").then(({domains:t})=>t));xe(this,"editDomainRedirects",async t=>this.performRequest("/domains/redirects","PATCH",{},t));xe(this,"performRequest",async(t,n="GET",r={},i)=>this.httpClient.fetchJson(...this.toFetchParams(t,n,r,i)).catch(this.handleFetchError(()=>this.httpClient.fetchJson(...this.toFetchParams(t,n,r,i)))));xe(this,"performEmptyRequest",async(t,n="GET",r={},i)=>this.httpClient.fetchEmpty(...this.toFetchParams(t,n,r,i)).catch(this.handleFetchError(()=>this.httpClient.fetchEmpty(...this.toFetchParams(t,n,r,i)))));xe(this,"toFetchParams",(t,n,r={},i)=>{const o=Vd(IX(r)),s=Wn(o)?"":`?${o}`;return[`${jX(this.baseUrl,this.apiVersion)}${t}${s}`,{method:n,body:i&&JSON.stringify(i),headers:{"X-Api-Key":this.apiKey}}]});xe(this,"handleFetchError",t=>n=>{if(!AX(ro(n)))throw n;return this.apiVersion=2,t()});this.httpClient=t,this.baseUrl=n,this.apiKey=r,this.apiVersion=3}}const o1={},BX=e=>typeof e=="function",zX=e=>{const{selectedServer:t}=e();if(!JS(t))throw new Error("There's no selected server or it is not found");return t},UX=e=>t=>{const{url:n,apiKey:r}=BX(t)?zX(t):t,i=`${n}_${r}`;return o1[i]||(o1[i]=new $X(e,n,r)),o1[i]},VX=e=>{e.serviceFactory("buildShlinkApiClient",UX,"HttpClient")};var Kj={exports:{}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames -*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;ie.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1;i--){var o=n[i],s=(o.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(s)>-1&&(r=o)}return Nt.head.insertBefore(t,r),e}}var sJ="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function gd(){for(var e=12,t="";e-- >0;)t+=sJ[Math.random()*62|0];return t}function eu(e){for(var t=[],n=(e||[]).length>>>0;n--;)t[n]=e[n];return t}function SC(e){return e.classList?eu(e.classList):(e.getAttribute("class")||"").split(" ").filter(function(t){return t})}function cI(e){return"".concat(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function aJ(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,'="').concat(cI(e[n]),'" ')},"").trim()}function s_(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,": ").concat(e[n].trim(),";")},"")}function CC(e){return e.size!==Yi.size||e.x!==Yi.x||e.y!==Yi.y||e.rotate!==Yi.rotate||e.flipX||e.flipY}function lJ(e){var t=e.transform,n=e.containerWidth,r=e.iconWidth,i={transform:"translate(".concat(n/2," 256)")},o="translate(".concat(t.x*32,", ").concat(t.y*32,") "),s="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),a="rotate(".concat(t.rotate," 0 0)"),l={transform:"".concat(o," ").concat(s," ").concat(a)},c={transform:"translate(".concat(r/2*-1," -256)")};return{outer:i,inner:l,path:c}}function cJ(e){var t=e.transform,n=e.width,r=n===void 0?bw:n,i=e.height,o=i===void 0?bw:i,s=e.startCentered,a=s===void 0?!1:s,l="";return a&&nI?l+="translate(".concat(t.x/Go-r/2,"em, ").concat(t.y/Go-o/2,"em) "):a?l+="translate(calc(-50% + ".concat(t.x/Go,"em), calc(-50% + ").concat(t.y/Go,"em)) "):l+="translate(".concat(t.x/Go,"em, ").concat(t.y/Go,"em) "),l+="scale(".concat(t.size/Go*(t.flipX?-1:1),", ").concat(t.size/Go*(t.flipY?-1:1),") "),l+="rotate(".concat(t.rotate,"deg) "),l}var uJ=`:root, :host { +*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;ie.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1;i--){var o=n[i],s=(o.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(s)>-1&&(r=o)}return Nt.head.insertBefore(t,r),e}}var dJ="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function pd(){for(var e=12,t="";e-- >0;)t+=dJ[Math.random()*62|0];return t}function Qc(e){for(var t=[],n=(e||[]).length>>>0;n--;)t[n]=e[n];return t}function yC(e){return e.classList?Qc(e.classList):(e.getAttribute("class")||"").split(" ").filter(function(t){return t})}function pI(e){return"".concat(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function hJ(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,'="').concat(pI(e[n]),'" ')},"").trim()}function i_(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,": ").concat(e[n].trim(),";")},"")}function _C(e){return e.size!==qi.size||e.x!==qi.x||e.y!==qi.y||e.rotate!==qi.rotate||e.flipX||e.flipY}function pJ(e){var t=e.transform,n=e.containerWidth,r=e.iconWidth,i={transform:"translate(".concat(n/2," 256)")},o="translate(".concat(t.x*32,", ").concat(t.y*32,") "),s="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),a="rotate(".concat(t.rotate," 0 0)"),l={transform:"".concat(o," ").concat(s," ").concat(a)},c={transform:"translate(".concat(r/2*-1," -256)")};return{outer:i,inner:l,path:c}}function mJ(e){var t=e.transform,n=e.width,r=n===void 0?dw:n,i=e.height,o=i===void 0?dw:i,s=e.startCentered,a=s===void 0?!1:s,l="";return a&&aI?l+="translate(".concat(t.x/Ko-r/2,"em, ").concat(t.y/Ko-o/2,"em) "):a?l+="translate(calc(-50% + ".concat(t.x/Ko,"em), calc(-50% + ").concat(t.y/Ko,"em)) "):l+="translate(".concat(t.x/Ko,"em, ").concat(t.y/Ko,"em) "),l+="scale(".concat(t.size/Ko*(t.flipX?-1:1),", ").concat(t.size/Ko*(t.flipY?-1:1),") "),l+="rotate(".concat(t.rotate,"deg) "),l}var gJ=`:root, :host { --fa-font-solid: normal 900 1em/1 "Font Awesome 6 Solid"; --fa-font-regular: normal 400 1em/1 "Font Awesome 6 Regular"; --fa-font-light: normal 300 1em/1 "Font Awesome 6 Light"; @@ -881,27 +881,27 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa { .fad.fa-inverse, .fa-duotone.fa-inverse { color: var(--fa-inverse, #fff); -}`;function uI(){var e=rI,t=iI,n=Ve.cssPrefix,r=Ve.replacementClass,i=uJ;if(n!==e||r!==t){var o=new RegExp("\\.".concat(e,"\\-"),"g"),s=new RegExp("\\--".concat(e,"\\-"),"g"),a=new RegExp("\\.".concat(t),"g");i=i.replace(o,".".concat(n,"-")).replace(s,"--".concat(n,"-")).replace(a,".".concat(r))}return i}var NM=!1;function c1(){Ve.autoAddCss&&!NM&&(oJ(uI()),NM=!0)}var fJ={mixout:function(){return{dom:{css:uI,insertCss:c1}}},hooks:function(){return{beforeDOMElementCreation:function(){c1()},beforeI2svg:function(){c1()}}}},ko=Is||{};ko[Po]||(ko[Po]={});ko[Po].styles||(ko[Po].styles={});ko[Po].hooks||(ko[Po].hooks={});ko[Po].shims||(ko[Po].shims=[]);var yi=ko[Po],fI=[],dJ=function e(){Nt.removeEventListener("DOMContentLoaded",e),Jg=1,fI.map(function(t){return t()})},Jg=!1;$o&&(Jg=(Nt.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(Nt.readyState),Jg||Nt.addEventListener("DOMContentLoaded",dJ));function hJ(e){$o&&(Jg?setTimeout(e,0):fI.push(e))}function qd(e){var t=e.tag,n=e.attributes,r=n===void 0?{}:n,i=e.children,o=i===void 0?[]:i;return typeof e=="string"?cI(e):"<".concat(t," ").concat(aJ(r),">").concat(o.map(qd).join(""),"")}function LM(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}var pJ=function(t,n){return function(r,i,o,s){return t.call(n,r,i,o,s)}},u1=function(t,n,r,i){var o=Object.keys(t),s=o.length,a=i!==void 0?pJ(n,i):n,l,c,f;for(r===void 0?(l=1,f=t[o[0]]):(l=0,f=r);l=55296&&i<=56319&&n=55296&&r<=56319&&n>t+1&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}function DM(e){return Object.keys(e).reduce(function(t,n){var r=e[n],i=!!r.icon;return i?t[r.iconName]=r.icon:t[n]=r,t},{})}function Sw(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.skipHooks,i=r===void 0?!1:r,o=DM(t);typeof yi.hooks.addPack=="function"&&!i?yi.hooks.addPack(e,DM(t)):yi.styles[e]=Be(Be({},yi.styles[e]||{}),o),e==="fas"&&Sw("fa",t)}var xp,Sp,Cp,ec=yi.styles,vJ=yi.shims,yJ=(xp={},bn(xp,Pt,Object.values(pd[Pt])),bn(xp,qt,Object.values(pd[qt])),xp),EC=null,dI={},hI={},pI={},mI={},gI={},_J=(Sp={},bn(Sp,Pt,Object.keys(dd[Pt])),bn(Sp,qt,Object.keys(dd[qt])),Sp);function bJ(e){return~eJ.indexOf(e)}function wJ(e,t){var n=t.split("-"),r=n[0],i=n.slice(1).join("-");return r===e&&i!==""&&!bJ(i)?i:null}var vI=function(){var t=function(o){return u1(ec,function(s,a,l){return s[l]=u1(a,o,{}),s},{})};dI=t(function(i,o,s){if(o[3]&&(i[o[3]]=s),o[2]){var a=o[2].filter(function(l){return typeof l=="number"});a.forEach(function(l){i[l.toString(16)]=s})}return i}),hI=t(function(i,o,s){if(i[s]=s,o[2]){var a=o[2].filter(function(l){return typeof l=="string"});a.forEach(function(l){i[l]=s})}return i}),gI=t(function(i,o,s){var a=o[2];return i[s]=s,a.forEach(function(l){i[l]=s}),i});var n="far"in ec||Ve.autoFetchSvg,r=u1(vJ,function(i,o){var s=o[0],a=o[1],l=o[2];return a==="far"&&!n&&(a="fas"),typeof s=="string"&&(i.names[s]={prefix:a,iconName:l}),typeof s=="number"&&(i.unicodes[s.toString(16)]={prefix:a,iconName:l}),i},{names:{},unicodes:{}});pI=r.names,mI=r.unicodes,EC=a_(Ve.styleDefault,{family:Ve.familyDefault})};iJ(function(e){EC=a_(e.styleDefault,{family:Ve.familyDefault})});vI();function TC(e,t){return(dI[e]||{})[t]}function xJ(e,t){return(hI[e]||{})[t]}function Da(e,t){return(gI[e]||{})[t]}function yI(e){return pI[e]||{prefix:null,iconName:null}}function SJ(e){var t=mI[e],n=TC("fas",e);return t||(n?{prefix:"fas",iconName:n}:null)||{prefix:null,iconName:null}}function Fs(){return EC}var OC=function(){return{prefix:null,iconName:null,rest:[]}};function a_(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.family,r=n===void 0?Pt:n,i=dd[r][e],o=hd[r][e]||hd[r][i],s=e in yi.styles?e:null;return o||s||null}var AM=(Cp={},bn(Cp,Pt,Object.keys(pd[Pt])),bn(Cp,qt,Object.keys(pd[qt])),Cp);function l_(e){var t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.skipLookups,i=r===void 0?!1:r,o=(t={},bn(t,Pt,"".concat(Ve.cssPrefix,"-").concat(Pt)),bn(t,qt,"".concat(Ve.cssPrefix,"-").concat(qt)),t),s=null,a=Pt;(e.includes(o[Pt])||e.some(function(c){return AM[Pt].includes(c)}))&&(a=Pt),(e.includes(o[qt])||e.some(function(c){return AM[qt].includes(c)}))&&(a=qt);var l=e.reduce(function(c,f){var h=wJ(Ve.cssPrefix,f);if(ec[f]?(f=yJ[a].includes(f)?GQ[a][f]:f,s=f,c.prefix=f):_J[a].indexOf(f)>-1?(s=f,c.prefix=a_(f,{family:a})):h?c.iconName=h:f!==Ve.replacementClass&&f!==o[Pt]&&f!==o[qt]&&c.rest.push(f),!i&&c.prefix&&c.iconName){var p=s==="fa"?yI(c.iconName):{},m=Da(c.prefix,c.iconName);p.prefix&&(s=null),c.iconName=p.iconName||m||c.iconName,c.prefix=p.prefix||c.prefix,c.prefix==="far"&&!ec.far&&ec.fas&&!Ve.autoFetchSvg&&(c.prefix="fas")}return c},OC());return(e.includes("fa-brands")||e.includes("fab"))&&(l.prefix="fab"),(e.includes("fa-duotone")||e.includes("fad"))&&(l.prefix="fad"),!l.prefix&&a===qt&&(ec.fass||Ve.autoFetchSvg)&&(l.prefix="fass",l.iconName=Da(l.prefix,l.iconName)||l.iconName),(l.prefix==="fa"||s==="fa")&&(l.prefix=Fs()||"fas"),l}var CJ=function(){function e(){jQ(this,e),this.definitions={}}return IQ(e,[{key:"add",value:function(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o0&&f.forEach(function(h){typeof h=="string"&&(n[a][h]=c)}),n[a][l]=c}),n}}]),e}(),jM=[],tc={},pc={},EJ=Object.keys(pc);function TJ(e,t){var n=t.mixoutsTo;return jM=e,tc={},Object.keys(pc).forEach(function(r){EJ.indexOf(r)===-1&&delete pc[r]}),jM.forEach(function(r){var i=r.mixout?r.mixout():{};if(Object.keys(i).forEach(function(s){typeof i[s]=="function"&&(n[s]=i[s]),Qg(i[s])==="object"&&Object.keys(i[s]).forEach(function(a){n[s]||(n[s]={}),n[s][a]=i[s][a]})}),r.hooks){var o=r.hooks();Object.keys(o).forEach(function(s){tc[s]||(tc[s]=[]),tc[s].push(o[s])})}r.provides&&r.provides(pc)}),n}function Cw(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i1?t-1:0),r=1;r0&&arguments[0]!==void 0?arguments[0]:{};return $o?(Ja("beforeI2svg",t),Mo("pseudoElements2svg",t),Mo("i2svg",t)):Promise.reject("Operation requires a DOM of some kind.")},watch:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.autoReplaceSvgRoot;Ve.autoReplaceSvg===!1&&(Ve.autoReplaceSvg=!0),Ve.observeMutations=!0,hJ(function(){MJ({autoReplaceSvgRoot:n}),Ja("watch",t)})}},kJ={icon:function(t){if(t===null)return null;if(Qg(t)==="object"&&t.prefix&&t.iconName)return{prefix:t.prefix,iconName:Da(t.prefix,t.iconName)||t.iconName};if(Array.isArray(t)&&t.length===2){var n=t[1].indexOf("fa-")===0?t[1].slice(3):t[1],r=a_(t[0]);return{prefix:r,iconName:Da(r,n)||n}}if(typeof t=="string"&&(t.indexOf("".concat(Ve.cssPrefix,"-"))>-1||t.match(ZQ))){var i=l_(t.split(" "),{skipLookups:!0});return{prefix:i.prefix||Fs(),iconName:Da(i.prefix,i.iconName)||i.iconName}}if(typeof t=="string"){var o=Fs();return{prefix:o,iconName:Da(o,t)||t}}}},$r={noAuto:OJ,config:Ve,dom:PJ,parse:kJ,library:_I,findIconDefinition:Ew,toHtml:qd},MJ=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.autoReplaceSvgRoot,r=n===void 0?Nt:n;(Object.keys(yi.styles).length>0||Ve.autoFetchSvg)&&$o&&Ve.autoReplaceSvg&&$r.dom.i2svg({node:r})};function c_(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(function(r){return qd(r)})}}),Object.defineProperty(e,"node",{get:function(){if($o){var r=Nt.createElement("div");return r.innerHTML=e.html,r.children}}}),e}function RJ(e){var t=e.children,n=e.main,r=e.mask,i=e.attributes,o=e.styles,s=e.transform;if(CC(s)&&n.found&&!r.found){var a=n.width,l=n.height,c={x:a/l/2,y:.5};i.style=s_(Be(Be({},o),{},{"transform-origin":"".concat(c.x+s.x/16,"em ").concat(c.y+s.y/16,"em")}))}return[{tag:"svg",attributes:i,children:t}]}function NJ(e){var t=e.prefix,n=e.iconName,r=e.children,i=e.attributes,o=e.symbol,s=o===!0?"".concat(t,"-").concat(Ve.cssPrefix,"-").concat(n):o;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:Be(Be({},i),{},{id:s}),children:r}]}]}function PC(e){var t=e.icons,n=t.main,r=t.mask,i=e.prefix,o=e.iconName,s=e.transform,a=e.symbol,l=e.title,c=e.maskId,f=e.titleId,h=e.extra,p=e.watchable,m=p===void 0?!1:p,v=r.found?r:n,y=v.width,x=v.height,_=i==="fak",w=[Ve.replacementClass,o?"".concat(Ve.cssPrefix,"-").concat(o):""].filter(function(z){return h.classes.indexOf(z)===-1}).filter(function(z){return z!==""||!!z}).concat(h.classes).join(" "),S={children:[],attributes:Be(Be({},h.attributes),{},{"data-prefix":i,"data-icon":o,class:w,role:h.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(y," ").concat(x)})},T=_&&!~h.classes.indexOf("fa-fw")?{width:"".concat(y/x*16*.0625,"em")}:{};m&&(S.attributes[Qa]=""),l&&(S.children.push({tag:"title",attributes:{id:S.attributes["aria-labelledby"]||"title-".concat(f||gd())},children:[l]}),delete S.attributes.title);var P=Be(Be({},S),{},{prefix:i,iconName:o,main:n,mask:r,maskId:c,transform:s,symbol:a,styles:Be(Be({},T),h.styles)}),k=r.found&&n.found?Mo("generateAbstractMask",P)||{children:[],attributes:{}}:Mo("generateAbstractIcon",P)||{children:[],attributes:{}},N=k.children,D=k.attributes;return P.children=N,P.attributes=D,a?NJ(P):RJ(P)}function IM(e){var t=e.content,n=e.width,r=e.height,i=e.transform,o=e.title,s=e.extra,a=e.watchable,l=a===void 0?!1:a,c=Be(Be(Be({},s.attributes),o?{title:o}:{}),{},{class:s.classes.join(" ")});l&&(c[Qa]="");var f=Be({},s.styles);CC(i)&&(f.transform=cJ({transform:i,startCentered:!0,width:n,height:r}),f["-webkit-transform"]=f.transform);var h=s_(f);h.length>0&&(c.style=h);var p=[];return p.push({tag:"span",attributes:c,children:[t]}),o&&p.push({tag:"span",attributes:{class:"sr-only"},children:[o]}),p}function LJ(e){var t=e.content,n=e.title,r=e.extra,i=Be(Be(Be({},r.attributes),n?{title:n}:{}),{},{class:r.classes.join(" ")}),o=s_(r.styles);o.length>0&&(i.style=o);var s=[];return s.push({tag:"span",attributes:i,children:[t]}),n&&s.push({tag:"span",attributes:{class:"sr-only"},children:[n]}),s}var f1=yi.styles;function Tw(e){var t=e[0],n=e[1],r=e.slice(4),i=yC(r,1),o=i[0],s=null;return Array.isArray(o)?s={tag:"g",attributes:{class:"".concat(Ve.cssPrefix,"-").concat(La.GROUP)},children:[{tag:"path",attributes:{class:"".concat(Ve.cssPrefix,"-").concat(La.SECONDARY),fill:"currentColor",d:o[0]}},{tag:"path",attributes:{class:"".concat(Ve.cssPrefix,"-").concat(La.PRIMARY),fill:"currentColor",d:o[1]}}]}:s={tag:"path",attributes:{fill:"currentColor",d:o}},{found:!0,width:t,height:n,icon:s}}var DJ={found:!1,width:512,height:512};function AJ(e,t){!oI&&!Ve.showMissingIcons&&e&&console.error('Icon with name "'.concat(e,'" and prefix "').concat(t,'" is missing.'))}function Ow(e,t){var n=t;return t==="fa"&&Ve.styleDefault!==null&&(t=Fs()),new Promise(function(r,i){if(Mo("missingIconAbstract"),n==="fa"){var o=yI(e)||{};e=o.iconName||e,t=o.prefix||t}if(e&&t&&f1[t]&&f1[t][e]){var s=f1[t][e];return r(Tw(s))}AJ(e,t),r(Be(Be({},DJ),{},{icon:Ve.showMissingIcons&&e?Mo("missingIconAbstract")||{}:{}}))})}var FM=function(){},Pw=Ve.measurePerformance&&gp&&gp.mark&&gp.measure?gp:{mark:FM,measure:FM},Xu='FA "6.3.0"',jJ=function(t){return Pw.mark("".concat(Xu," ").concat(t," begins")),function(){return bI(t)}},bI=function(t){Pw.mark("".concat(Xu," ").concat(t," ends")),Pw.measure("".concat(Xu," ").concat(t),"".concat(Xu," ").concat(t," begins"),"".concat(Xu," ").concat(t," ends"))},kC={begin:jJ,end:bI},lm=function(){};function $M(e){var t=e.getAttribute?e.getAttribute(Qa):null;return typeof t=="string"}function IJ(e){var t=e.getAttribute?e.getAttribute(bC):null,n=e.getAttribute?e.getAttribute(wC):null;return t&&n}function FJ(e){return e&&e.classList&&e.classList.contains&&e.classList.contains(Ve.replacementClass)}function $J(){if(Ve.autoReplaceSvg===!0)return cm.replace;var e=cm[Ve.autoReplaceSvg];return e||cm.replace}function BJ(e){return Nt.createElementNS("http://www.w3.org/2000/svg",e)}function zJ(e){return Nt.createElement(e)}function wI(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.ceFn,r=n===void 0?e.tag==="svg"?BJ:zJ:n;if(typeof e=="string")return Nt.createTextNode(e);var i=r(e.tag);Object.keys(e.attributes||[]).forEach(function(s){i.setAttribute(s,e.attributes[s])});var o=e.children||[];return o.forEach(function(s){i.appendChild(wI(s,{ceFn:r}))}),i}function UJ(e){var t=" ".concat(e.outerHTML," ");return t="".concat(t,"Font Awesome fontawesome.com "),t}var cm={replace:function(t){var n=t[0];if(n.parentNode)if(t[1].forEach(function(i){n.parentNode.insertBefore(wI(i),n)}),n.getAttribute(Qa)===null&&Ve.keepOriginalSource){var r=Nt.createComment(UJ(n));n.parentNode.replaceChild(r,n)}else n.remove()},nest:function(t){var n=t[0],r=t[1];if(~SC(n).indexOf(Ve.replacementClass))return cm.replace(t);var i=new RegExp("".concat(Ve.cssPrefix,"-.*"));if(delete r[0].attributes.id,r[0].attributes.class){var o=r[0].attributes.class.split(" ").reduce(function(a,l){return l===Ve.replacementClass||l.match(i)?a.toSvg.push(l):a.toNode.push(l),a},{toNode:[],toSvg:[]});r[0].attributes.class=o.toSvg.join(" "),o.toNode.length===0?n.removeAttribute("class"):n.setAttribute("class",o.toNode.join(" "))}var s=r.map(function(a){return qd(a)}).join(` -`);n.setAttribute(Qa,""),n.innerHTML=s}};function BM(e){e()}function xI(e,t){var n=typeof t=="function"?t:lm;if(e.length===0)n();else{var r=BM;Ve.mutateApproach===YQ&&(r=Is.requestAnimationFrame||BM),r(function(){var i=$J(),o=kC.begin("mutate");e.map(i),o(),n()})}}var MC=!1;function SI(){MC=!0}function kw(){MC=!1}var ev=null;function zM(e){if(MM&&Ve.observeMutations){var t=e.treeCallback,n=t===void 0?lm:t,r=e.nodeCallback,i=r===void 0?lm:r,o=e.pseudoElementsCallback,s=o===void 0?lm:o,a=e.observeMutationsRoot,l=a===void 0?Nt:a;ev=new MM(function(c){if(!MC){var f=Fs();eu(c).forEach(function(h){if(h.type==="childList"&&h.addedNodes.length>0&&!$M(h.addedNodes[0])&&(Ve.searchPseudoElements&&s(h.target),n(h.target)),h.type==="attributes"&&h.target.parentNode&&Ve.searchPseudoElements&&s(h.target.parentNode),h.type==="attributes"&&$M(h.target)&&~JQ.indexOf(h.attributeName))if(h.attributeName==="class"&&IJ(h.target)){var p=l_(SC(h.target)),m=p.prefix,v=p.iconName;h.target.setAttribute(bC,m||f),v&&h.target.setAttribute(wC,v)}else FJ(h.target)&&i(h.target)})}}),$o&&ev.observe(l,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function VJ(){ev&&ev.disconnect()}function HJ(e){var t=e.getAttribute("style"),n=[];return t&&(n=t.split(";").reduce(function(r,i){var o=i.split(":"),s=o[0],a=o.slice(1);return s&&a.length>0&&(r[s]=a.join(":").trim()),r},{})),n}function WJ(e){var t=e.getAttribute("data-prefix"),n=e.getAttribute("data-icon"),r=e.innerText!==void 0?e.innerText.trim():"",i=l_(SC(e));return i.prefix||(i.prefix=Fs()),t&&n&&(i.prefix=t,i.iconName=n),i.iconName&&i.prefix||(i.prefix&&r.length>0&&(i.iconName=xJ(i.prefix,e.innerText)||TC(i.prefix,xw(e.innerText))),!i.iconName&&Ve.autoFetchSvg&&e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(i.iconName=e.firstChild.data)),i}function YJ(e){var t=eu(e.attributes).reduce(function(i,o){return i.name!=="class"&&i.name!=="style"&&(i[o.name]=o.value),i},{}),n=e.getAttribute("title"),r=e.getAttribute("data-fa-title-id");return Ve.autoA11y&&(n?t["aria-labelledby"]="".concat(Ve.replacementClass,"-title-").concat(r||gd()):(t["aria-hidden"]="true",t.focusable="false")),t}function qJ(){return{iconName:null,title:null,titleId:null,prefix:null,transform:Yi,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function UM(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0},n=WJ(e),r=n.iconName,i=n.prefix,o=n.rest,s=YJ(e),a=Cw("parseNodeAttributes",{},e),l=t.styleParser?HJ(e):[];return Be({iconName:r,title:e.getAttribute("title"),titleId:e.getAttribute("data-fa-title-id"),prefix:i,transform:Yi,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:o,styles:l,attributes:s}},a)}var GJ=yi.styles;function CI(e){var t=Ve.autoReplaceSvg==="nest"?UM(e,{styleParser:!1}):UM(e);return~t.extra.classes.indexOf(sI)?Mo("generateLayersText",e,t):Mo("generateSvgReplacementMutation",e,t)}var $s=new Set;xC.map(function(e){$s.add("fa-".concat(e))});Object.keys(dd[Pt]).map($s.add.bind($s));Object.keys(dd[qt]).map($s.add.bind($s));$s=Wd($s);function VM(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!$o)return Promise.resolve();var n=Nt.documentElement.classList,r=function(h){return n.add("".concat(RM,"-").concat(h))},i=function(h){return n.remove("".concat(RM,"-").concat(h))},o=Ve.autoFetchSvg?$s:xC.map(function(f){return"fa-".concat(f)}).concat(Object.keys(GJ));o.includes("fa")||o.push("fa");var s=[".".concat(sI,":not([").concat(Qa,"])")].concat(o.map(function(f){return".".concat(f,":not([").concat(Qa,"])")})).join(", ");if(s.length===0)return Promise.resolve();var a=[];try{a=eu(e.querySelectorAll(s))}catch{}if(a.length>0)r("pending"),i("complete");else return Promise.resolve();var l=kC.begin("onTree"),c=a.reduce(function(f,h){try{var p=CI(h);p&&f.push(p)}catch(m){oI||m.name==="MissingIcon"&&console.error(m)}return f},[]);return new Promise(function(f,h){Promise.all(c).then(function(p){xI(p,function(){r("active"),r("complete"),i("pending"),typeof t=="function"&&t(),l(),f()})}).catch(function(p){l(),h(p)})})}function ZJ(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;CI(e).then(function(n){n&&xI([n],t)})}function KJ(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=(t||{}).icon?t:Ew(t||{}),i=n.mask;return i&&(i=(i||{}).icon?i:Ew(i||{})),e(r,Be(Be({},n),{},{mask:i}))}}var XJ=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.transform,i=r===void 0?Yi:r,o=n.symbol,s=o===void 0?!1:o,a=n.mask,l=a===void 0?null:a,c=n.maskId,f=c===void 0?null:c,h=n.title,p=h===void 0?null:h,m=n.titleId,v=m===void 0?null:m,y=n.classes,x=y===void 0?[]:y,_=n.attributes,w=_===void 0?{}:_,S=n.styles,T=S===void 0?{}:S;if(t){var P=t.prefix,k=t.iconName,N=t.icon;return c_(Be({type:"icon"},t),function(){return Ja("beforeDOMElementCreation",{iconDefinition:t,params:n}),Ve.autoA11y&&(p?w["aria-labelledby"]="".concat(Ve.replacementClass,"-title-").concat(v||gd()):(w["aria-hidden"]="true",w.focusable="false")),PC({icons:{main:Tw(N),mask:l?Tw(l.icon):{found:!1,width:null,height:null,icon:{}}},prefix:P,iconName:k,transform:Be(Be({},Yi),i),symbol:s,title:p,maskId:f,titleId:v,extra:{attributes:w,styles:T,classes:x}})})}},QJ={mixout:function(){return{icon:KJ(XJ)}},hooks:function(){return{mutationObserverCallbacks:function(n){return n.treeCallback=VM,n.nodeCallback=ZJ,n}}},provides:function(t){t.i2svg=function(n){var r=n.node,i=r===void 0?Nt:r,o=n.callback,s=o===void 0?function(){}:o;return VM(i,s)},t.generateSvgReplacementMutation=function(n,r){var i=r.iconName,o=r.title,s=r.titleId,a=r.prefix,l=r.transform,c=r.symbol,f=r.mask,h=r.maskId,p=r.extra;return new Promise(function(m,v){Promise.all([Ow(i,a),f.iconName?Ow(f.iconName,f.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(y){var x=yC(y,2),_=x[0],w=x[1];m([n,PC({icons:{main:_,mask:w},prefix:a,iconName:i,transform:l,symbol:c,maskId:h,title:o,titleId:s,extra:p,watchable:!0})])}).catch(v)})},t.generateAbstractIcon=function(n){var r=n.children,i=n.attributes,o=n.main,s=n.transform,a=n.styles,l=s_(a);l.length>0&&(i.style=l);var c;return CC(s)&&(c=Mo("generateAbstractTransformGrouping",{main:o,transform:s,containerWidth:o.width,iconWidth:o.width})),r.push(c||o.icon),{children:r,attributes:i}}}},JJ={mixout:function(){return{layer:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.classes,o=i===void 0?[]:i;return c_({type:"layer"},function(){Ja("beforeDOMElementCreation",{assembler:n,params:r});var s=[];return n(function(a){Array.isArray(a)?a.map(function(l){s=s.concat(l.abstract)}):s=s.concat(a.abstract)}),[{tag:"span",attributes:{class:["".concat(Ve.cssPrefix,"-layers")].concat(Wd(o)).join(" ")},children:s}]})}}}},eee={mixout:function(){return{counter:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.title,o=i===void 0?null:i,s=r.classes,a=s===void 0?[]:s,l=r.attributes,c=l===void 0?{}:l,f=r.styles,h=f===void 0?{}:f;return c_({type:"counter",content:n},function(){return Ja("beforeDOMElementCreation",{content:n,params:r}),LJ({content:n.toString(),title:o,extra:{attributes:c,styles:h,classes:["".concat(Ve.cssPrefix,"-layers-counter")].concat(Wd(a))}})})}}}},tee={mixout:function(){return{text:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.transform,o=i===void 0?Yi:i,s=r.title,a=s===void 0?null:s,l=r.classes,c=l===void 0?[]:l,f=r.attributes,h=f===void 0?{}:f,p=r.styles,m=p===void 0?{}:p;return c_({type:"text",content:n},function(){return Ja("beforeDOMElementCreation",{content:n,params:r}),IM({content:n,transform:Be(Be({},Yi),o),title:a,extra:{attributes:h,styles:m,classes:["".concat(Ve.cssPrefix,"-layers-text")].concat(Wd(c))}})})}}},provides:function(t){t.generateLayersText=function(n,r){var i=r.title,o=r.transform,s=r.extra,a=null,l=null;if(nI){var c=parseInt(getComputedStyle(n).fontSize,10),f=n.getBoundingClientRect();a=f.width/c,l=f.height/c}return Ve.autoA11y&&!i&&(s.attributes["aria-hidden"]="true"),Promise.resolve([n,IM({content:n.innerHTML,width:a,height:l,transform:o,title:i,extra:s,watchable:!0})])}}},nee=new RegExp('"',"ug"),HM=[1105920,1112319];function ree(e){var t=e.replace(nee,""),n=gJ(t,0),r=n>=HM[0]&&n<=HM[1],i=t.length===2?t[0]===t[1]:!1;return{value:xw(i?t[0]:t),isSecondary:r||i}}function WM(e,t){var n="".concat(WQ).concat(t.replace(":","-"));return new Promise(function(r,i){if(e.getAttribute(n)!==null)return r();var o=eu(e.children),s=o.filter(function(N){return N.getAttribute(ww)===t})[0],a=Is.getComputedStyle(e,t),l=a.getPropertyValue("font-family").match(KQ),c=a.getPropertyValue("font-weight"),f=a.getPropertyValue("content");if(s&&!l)return e.removeChild(s),r();if(l&&f!=="none"&&f!==""){var h=a.getPropertyValue("content"),p=~["Sharp"].indexOf(l[2])?qt:Pt,m=~["Solid","Regular","Light","Thin","Duotone","Brands","Kit"].indexOf(l[2])?hd[p][l[2].toLowerCase()]:XQ[p][c],v=ree(h),y=v.value,x=v.isSecondary,_=l[0].startsWith("FontAwesome"),w=TC(m,y),S=w;if(_){var T=SJ(y);T.iconName&&T.prefix&&(w=T.iconName,m=T.prefix)}if(w&&!x&&(!s||s.getAttribute(bC)!==m||s.getAttribute(wC)!==S)){e.setAttribute(n,S),s&&e.removeChild(s);var P=qJ(),k=P.extra;k.attributes[ww]=t,Ow(w,m).then(function(N){var D=PC(Be(Be({},P),{},{icons:{main:N,mask:OC()},prefix:m,iconName:S,extra:k,watchable:!0})),z=Nt.createElement("svg");t==="::before"?e.insertBefore(z,e.firstChild):e.appendChild(z),z.outerHTML=D.map(function(A){return qd(A)}).join(` -`),e.removeAttribute(n),r()}).catch(i)}else r()}else r()})}function iee(e){return Promise.all([WM(e,"::before"),WM(e,"::after")])}function oee(e){return e.parentNode!==document.head&&!~qQ.indexOf(e.tagName.toUpperCase())&&!e.getAttribute(ww)&&(!e.parentNode||e.parentNode.tagName!=="svg")}function YM(e){if($o)return new Promise(function(t,n){var r=eu(e.querySelectorAll("*")).filter(oee).map(iee),i=kC.begin("searchPseudoElements");SI(),Promise.all(r).then(function(){i(),kw(),t()}).catch(function(){i(),kw(),n()})})}var see={hooks:function(){return{mutationObserverCallbacks:function(n){return n.pseudoElementsCallback=YM,n}}},provides:function(t){t.pseudoElements2svg=function(n){var r=n.node,i=r===void 0?Nt:r;Ve.searchPseudoElements&&YM(i)}}},qM=!1,aee={mixout:function(){return{dom:{unwatch:function(){SI(),qM=!0}}}},hooks:function(){return{bootstrap:function(){zM(Cw("mutationObserverCallbacks",{}))},noAuto:function(){VJ()},watch:function(n){var r=n.observeMutationsRoot;qM?kw():zM(Cw("mutationObserverCallbacks",{observeMutationsRoot:r}))}}}},GM=function(t){var n={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return t.toLowerCase().split(" ").reduce(function(r,i){var o=i.toLowerCase().split("-"),s=o[0],a=o.slice(1).join("-");if(s&&a==="h")return r.flipX=!0,r;if(s&&a==="v")return r.flipY=!0,r;if(a=parseFloat(a),isNaN(a))return r;switch(s){case"grow":r.size=r.size+a;break;case"shrink":r.size=r.size-a;break;case"left":r.x=r.x-a;break;case"right":r.x=r.x+a;break;case"up":r.y=r.y-a;break;case"down":r.y=r.y+a;break;case"rotate":r.rotate=r.rotate+a;break}return r},n)},lee={mixout:function(){return{parse:{transform:function(n){return GM(n)}}}},hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-transform");return i&&(n.transform=GM(i)),n}}},provides:function(t){t.generateAbstractTransformGrouping=function(n){var r=n.main,i=n.transform,o=n.containerWidth,s=n.iconWidth,a={transform:"translate(".concat(o/2," 256)")},l="translate(".concat(i.x*32,", ").concat(i.y*32,") "),c="scale(".concat(i.size/16*(i.flipX?-1:1),", ").concat(i.size/16*(i.flipY?-1:1),") "),f="rotate(".concat(i.rotate," 0 0)"),h={transform:"".concat(l," ").concat(c," ").concat(f)},p={transform:"translate(".concat(s/2*-1," -256)")},m={outer:a,inner:h,path:p};return{tag:"g",attributes:Be({},m.outer),children:[{tag:"g",attributes:Be({},m.inner),children:[{tag:r.icon.tag,children:r.icon.children,attributes:Be(Be({},r.icon.attributes),m.path)}]}]}}}},d1={x:0,y:0,width:"100%",height:"100%"};function ZM(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return e.attributes&&(e.attributes.fill||t)&&(e.attributes.fill="black"),e}function cee(e){return e.tag==="g"?e.children:[e]}var uee={hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-mask"),o=i?l_(i.split(" ").map(function(s){return s.trim()})):OC();return o.prefix||(o.prefix=Fs()),n.mask=o,n.maskId=r.getAttribute("data-fa-mask-id"),n}}},provides:function(t){t.generateAbstractMask=function(n){var r=n.children,i=n.attributes,o=n.main,s=n.mask,a=n.maskId,l=n.transform,c=o.width,f=o.icon,h=s.width,p=s.icon,m=lJ({transform:l,containerWidth:h,iconWidth:c}),v={tag:"rect",attributes:Be(Be({},d1),{},{fill:"white"})},y=f.children?{children:f.children.map(ZM)}:{},x={tag:"g",attributes:Be({},m.inner),children:[ZM(Be({tag:f.tag,attributes:Be(Be({},f.attributes),m.path)},y))]},_={tag:"g",attributes:Be({},m.outer),children:[x]},w="mask-".concat(a||gd()),S="clip-".concat(a||gd()),T={tag:"mask",attributes:Be(Be({},d1),{},{id:w,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[v,_]},P={tag:"defs",children:[{tag:"clipPath",attributes:{id:S},children:cee(p)},T]};return r.push(P,{tag:"rect",attributes:Be({fill:"currentColor","clip-path":"url(#".concat(S,")"),mask:"url(#".concat(w,")")},d1)}),{children:r,attributes:i}}}},fee={provides:function(t){var n=!1;Is.matchMedia&&(n=Is.matchMedia("(prefers-reduced-motion: reduce)").matches),t.missingIconAbstract=function(){var r=[],i={fill:"currentColor"},o={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};r.push({tag:"path",attributes:Be(Be({},i),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});var s=Be(Be({},o),{},{attributeName:"opacity"}),a={tag:"circle",attributes:Be(Be({},i),{},{cx:"256",cy:"364",r:"28"}),children:[]};return n||a.children.push({tag:"animate",attributes:Be(Be({},o),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:Be(Be({},s),{},{values:"1;0;1;1;0;1;"})}),r.push(a),r.push({tag:"path",attributes:Be(Be({},i),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:n?[]:[{tag:"animate",attributes:Be(Be({},s),{},{values:"1;0;0;0;0;1;"})}]}),n||r.push({tag:"path",attributes:Be(Be({},i),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:Be(Be({},s),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:r}}}},dee={hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-symbol"),o=i===null?!1:i===""?!0:i;return n.symbol=o,n}}}},hee=[fJ,QJ,JJ,eee,tee,see,aee,lee,uee,fee,dee];TJ(hee,{mixoutsTo:$r});$r.noAuto;$r.config;$r.library;$r.dom;var Mw=$r.parse;$r.findIconDefinition;$r.toHtml;var pee=$r.icon;$r.layer;$r.text;$r.counter;var C={},mee={get exports(){return C},set exports(e){C=e}},gee="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",vee=gee,yee=vee;function EI(){}function TI(){}TI.resetWarningCache=EI;var _ee=function(){function e(r,i,o,s,a,l){if(l!==yee){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:TI,resetWarningCache:EI};return n.PropTypes=n,n};mee.exports=_ee();function KM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ms(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function wee(e,t){if(e==null)return{};var n=bee(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Rw(e){return xee(e)||See(e)||Cee(e)||Eee()}function xee(e){if(Array.isArray(e))return Nw(e)}function See(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Cee(e,t){if(e){if(typeof e=="string")return Nw(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Nw(e,t)}}function Nw(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&arguments[2]!==void 0?arguments[2]:{};if(typeof t=="string")return t;var r=(t.children||[]).map(function(l){return PI(e,l)}),i=Object.keys(t.attributes||{}).reduce(function(l,c){var f=t.attributes[c];switch(c){case"class":l.attrs.className=f,delete t.attributes.class;break;case"style":l.attrs.style=Mee(f);break;default:c.indexOf("aria-")===0||c.indexOf("data-")===0?l.attrs[c.toLowerCase()]=f:l.attrs[OI(c)]=f}return l},{attrs:{}}),o=n.style,s=o===void 0?{}:o,a=wee(n,Pee);return i.attrs.style=ms(ms({},i.attrs.style),s),e.apply(void 0,[t.tag,ms(ms({},i.attrs),a)].concat(Rw(r)))}var kI=!1;try{kI=!0}catch{}function Ree(){if(!kI&&console&&typeof console.error=="function"){var e;(e=console).error.apply(e,arguments)}}function XM(e){if(e&&tv(e)==="object"&&e.prefix&&e.iconName&&e.icon)return e;if(Mw.icon)return Mw.icon(e);if(e===null)return null;if(e&&tv(e)==="object"&&e.prefix&&e.iconName)return e;if(Array.isArray(e)&&e.length===2)return{prefix:e[0],iconName:e[1]};if(typeof e=="string")return{prefix:"fas",iconName:e}}function h1(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?nc({},e,t):{}}var je=U.forwardRef(function(e,t){var n=e.icon,r=e.mask,i=e.symbol,o=e.className,s=e.title,a=e.titleId,l=e.maskId,c=XM(n),f=h1("classes",[].concat(Rw(Tee(e)),Rw(o.split(" ")))),h=h1("transform",typeof e.transform=="string"?Mw.transform(e.transform):e.transform),p=h1("mask",XM(r)),m=pee(c,ms(ms(ms(ms({},f),h),p),{},{symbol:i,title:s,titleId:a,maskId:l}));if(!m)return Ree("Could not find icon",c),null;var v=m.abstract,y={ref:t};return Object.keys(e).forEach(function(x){je.defaultProps.hasOwnProperty(x)||(y[x]=e[x])}),Nee(v[0],y)});je.displayName="FontAwesomeIcon";je.propTypes={beat:C.bool,border:C.bool,beatFade:C.bool,bounce:C.bool,className:C.string,fade:C.bool,flash:C.bool,mask:C.oneOfType([C.object,C.array,C.string]),maskId:C.string,fixedWidth:C.bool,inverse:C.bool,flip:C.oneOf([!0,!1,"horizontal","vertical","both"]),icon:C.oneOfType([C.object,C.array,C.string]),listItem:C.bool,pull:C.oneOf(["right","left"]),pulse:C.bool,rotation:C.oneOf([0,90,180,270]),shake:C.bool,size:C.oneOf(["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:C.bool,spinPulse:C.bool,spinReverse:C.bool,symbol:C.oneOfType([C.bool,C.string]),title:C.string,titleId:C.string,transform:C.oneOfType([C.string,C.object]),swapOpacity:C.bool};je.defaultProps={border:!1,className:"",mask:null,maskId:null,fixedWidth:!1,inverse:!1,flip:!1,icon:null,listItem:!1,pull:null,pulse:!1,rotation:null,size:null,spin:!1,spinPulse:!1,spinReverse:!1,beat:!1,fade:!1,beatFade:!1,bounce:!1,shake:!1,symbol:!1,title:"",titleId:null,transform:null,swapOpacity:!1};var Nee=PI.bind(null,U.createElement),MI=V.createContext(),RI=V.createContext();function QM(e){var t=e.children,n=V.useState(null),r=n[0],i=n[1],o=V.useRef(!1);V.useEffect(function(){return function(){o.current=!0}},[]);var s=V.useCallback(function(a){o.current||i(a)},[]);return V.createElement(MI.Provider,{value:r},V.createElement(RI.Provider,{value:s},t))}var NI=function(t){return Array.isArray(t)?t[0]:t},LI=function(t){if(typeof t=="function"){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i"u")return!1;var t=ii(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Wee(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!Kr(o)||!eo(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(s){var a=i[s];a===!1?o.removeAttribute(s):o.setAttribute(s,a===!0?"":a)}))})}function Yee(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},s=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),a=s.reduce(function(l,c){return l[c]="",l},{});!Kr(i)||!eo(i)||(Object.assign(i.style,a),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const qee={name:"applyStyles",enabled:!0,phase:"write",fn:Wee,effect:Yee,requires:["computeStyles"]};function Ki(e){return e.split("-")[0]}var za=Math.max,nv=Math.min,Ac=Math.round;function Dw(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function jI(){return!/^((?!chrome|android).)*safari/i.test(Dw())}function jc(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Kr(e)&&(i=e.offsetWidth>0&&Ac(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Ac(r.height)/e.offsetHeight||1);var s=el(e)?ii(e):window,a=s.visualViewport,l=!jI()&&n,c=(r.left+(l&&a?a.offsetLeft:0))/i,f=(r.top+(l&&a?a.offsetTop:0))/o,h=r.width/i,p=r.height/o;return{width:h,height:p,top:f,right:c+h,bottom:f+p,left:c,x:c,y:f}}function LC(e){var t=jc(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function II(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&NC(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Ro(e){return ii(e).getComputedStyle(e)}function Gee(e){return["table","td","th"].indexOf(eo(e))>=0}function Js(e){return((el(e)?e.ownerDocument:e.document)||window.document).documentElement}function u_(e){return eo(e)==="html"?e:e.assignedSlot||e.parentNode||(NC(e)?e.host:null)||Js(e)}function n3(e){return!Kr(e)||Ro(e).position==="fixed"?null:e.offsetParent}function Zee(e){var t=/firefox/i.test(Dw()),n=/Trident/i.test(Dw());if(n&&Kr(e)){var r=Ro(e);if(r.position==="fixed")return null}var i=u_(e);for(NC(i)&&(i=i.host);Kr(i)&&["html","body"].indexOf(eo(i))<0;){var o=Ro(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function Zd(e){for(var t=ii(e),n=n3(e);n&&Gee(n)&&Ro(n).position==="static";)n=n3(n);return n&&(eo(n)==="html"||eo(n)==="body"&&Ro(n).position==="static")?t:n||Zee(e)||t}function DC(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Ef(e,t,n){return za(e,nv(t,n))}function Kee(e,t,n){var r=Ef(e,t,n);return r>n?n:r}function FI(){return{top:0,right:0,bottom:0,left:0}}function $I(e){return Object.assign({},FI(),e)}function BI(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Xee=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,$I(typeof t!="number"?t:BI(t,Gd))};function Qee(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,a=Ki(n.placement),l=DC(a),c=[xr,ni].indexOf(a)>=0,f=c?"height":"width";if(!(!o||!s)){var h=Xee(i.padding,n),p=LC(o),m=l==="y"?wr:xr,v=l==="y"?ti:ni,y=n.rects.reference[f]+n.rects.reference[l]-s[l]-n.rects.popper[f],x=s[l]-n.rects.reference[l],_=Zd(o),w=_?l==="y"?_.clientHeight||0:_.clientWidth||0:0,S=y/2-x/2,T=h[m],P=w-p[f]-h[v],k=w/2-p[f]/2+S,N=Ef(T,k,P),D=l;n.modifiersData[r]=(t={},t[D]=N,t.centerOffset=N-k,t)}}function Jee(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||II(t.elements.popper,i)&&(t.elements.arrow=i))}const ete={name:"arrow",enabled:!0,phase:"main",fn:Qee,effect:Jee,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ic(e){return e.split("-")[1]}var tte={top:"auto",right:"auto",bottom:"auto",left:"auto"};function nte(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:Ac(t*i)/i||0,y:Ac(n*i)/i||0}}function r3(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,s=e.offsets,a=e.position,l=e.gpuAcceleration,c=e.adaptive,f=e.roundOffsets,h=e.isFixed,p=s.x,m=p===void 0?0:p,v=s.y,y=v===void 0?0:v,x=typeof f=="function"?f({x:m,y}):{x:m,y};m=x.x,y=x.y;var _=s.hasOwnProperty("x"),w=s.hasOwnProperty("y"),S=xr,T=wr,P=window;if(c){var k=Zd(n),N="clientHeight",D="clientWidth";if(k===ii(n)&&(k=Js(n),Ro(k).position!=="static"&&a==="absolute"&&(N="scrollHeight",D="scrollWidth")),k=k,i===wr||(i===xr||i===ni)&&o===vd){T=ti;var z=h&&k===P&&P.visualViewport?P.visualViewport.height:k[N];y-=z-r.height,y*=l?1:-1}if(i===xr||(i===wr||i===ti)&&o===vd){S=ni;var A=h&&k===P&&P.visualViewport?P.visualViewport.width:k[D];m-=A-r.width,m*=l?1:-1}}var W=Object.assign({position:a},c&&tte),Y=f===!0?nte({x:m,y}):{x:m,y};if(m=Y.x,y=Y.y,l){var J;return Object.assign({},W,(J={},J[T]=w?"0":"",J[S]=_?"0":"",J.transform=(P.devicePixelRatio||1)<=1?"translate("+m+"px, "+y+"px)":"translate3d("+m+"px, "+y+"px, 0)",J))}return Object.assign({},W,(t={},t[T]=w?y+"px":"",t[S]=_?m+"px":"",t.transform="",t))}function rte(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,s=o===void 0?!0:o,a=n.roundOffsets,l=a===void 0?!0:a,c={placement:Ki(t.placement),variation:Ic(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,r3(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,r3(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const ite={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:rte,data:{}};var Ep={passive:!0};function ote(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,s=r.resize,a=s===void 0?!0:s,l=ii(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(f){f.addEventListener("scroll",n.update,Ep)}),a&&l.addEventListener("resize",n.update,Ep),function(){o&&c.forEach(function(f){f.removeEventListener("scroll",n.update,Ep)}),a&&l.removeEventListener("resize",n.update,Ep)}}const ste={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:ote,data:{}};var ate={left:"right",right:"left",bottom:"top",top:"bottom"};function um(e){return e.replace(/left|right|bottom|top/g,function(t){return ate[t]})}var lte={start:"end",end:"start"};function i3(e){return e.replace(/start|end/g,function(t){return lte[t]})}function AC(e){var t=ii(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function jC(e){return jc(Js(e)).left+AC(e).scrollLeft}function cte(e,t){var n=ii(e),r=Js(e),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;var c=jI();(c||!c&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a+jC(e),y:l}}function ute(e){var t,n=Js(e),r=AC(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=za(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=za(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+jC(e),l=-r.scrollTop;return Ro(i||n).direction==="rtl"&&(a+=za(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}function IC(e){var t=Ro(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function zI(e){return["html","body","#document"].indexOf(eo(e))>=0?e.ownerDocument.body:Kr(e)&&IC(e)?e:zI(u_(e))}function Tf(e,t){var n;t===void 0&&(t=[]);var r=zI(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=ii(r),s=i?[o].concat(o.visualViewport||[],IC(r)?r:[]):r,a=t.concat(s);return i?a:a.concat(Tf(u_(s)))}function Aw(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function fte(e,t){var n=jc(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function o3(e,t,n){return t===DI?Aw(cte(e,n)):el(t)?fte(t,n):Aw(ute(Js(e)))}function dte(e){var t=Tf(u_(e)),n=["absolute","fixed"].indexOf(Ro(e).position)>=0,r=n&&Kr(e)?Zd(e):e;return el(r)?t.filter(function(i){return el(i)&&II(i,r)&&eo(i)!=="body"}):[]}function hte(e,t,n,r){var i=t==="clippingParents"?dte(e):[].concat(t),o=[].concat(i,[n]),s=o[0],a=o.reduce(function(l,c){var f=o3(e,c,r);return l.top=za(f.top,l.top),l.right=nv(f.right,l.right),l.bottom=nv(f.bottom,l.bottom),l.left=za(f.left,l.left),l},o3(e,s,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function UI(e){var t=e.reference,n=e.element,r=e.placement,i=r?Ki(r):null,o=r?Ic(r):null,s=t.x+t.width/2-n.width/2,a=t.y+t.height/2-n.height/2,l;switch(i){case wr:l={x:s,y:t.y-n.height};break;case ti:l={x:s,y:t.y+t.height};break;case ni:l={x:t.x+t.width,y:a};break;case xr:l={x:t.x-n.width,y:a};break;default:l={x:t.x,y:t.y}}var c=i?DC(i):null;if(c!=null){var f=c==="y"?"height":"width";switch(o){case Dc:l[c]=l[c]-(t[f]/2-n[f]/2);break;case vd:l[c]=l[c]+(t[f]/2-n[f]/2);break}}return l}function yd(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,s=o===void 0?e.strategy:o,a=n.boundary,l=a===void 0?Lee:a,c=n.rootBoundary,f=c===void 0?DI:c,h=n.elementContext,p=h===void 0?Iu:h,m=n.altBoundary,v=m===void 0?!1:m,y=n.padding,x=y===void 0?0:y,_=$I(typeof x!="number"?x:BI(x,Gd)),w=p===Iu?Dee:Iu,S=e.rects.popper,T=e.elements[v?w:p],P=hte(el(T)?T:T.contextElement||Js(e.elements.popper),l,f,s),k=jc(e.elements.reference),N=UI({reference:k,element:S,strategy:"absolute",placement:i}),D=Aw(Object.assign({},S,N)),z=p===Iu?D:k,A={top:P.top-z.top+_.top,bottom:z.bottom-P.bottom+_.bottom,left:P.left-z.left+_.left,right:z.right-P.right+_.right},W=e.modifiersData.offset;if(p===Iu&&W){var Y=W[i];Object.keys(A).forEach(function(J){var Z=[ni,ti].indexOf(J)>=0?1:-1,ee=[wr,ti].indexOf(J)>=0?"y":"x";A[J]+=Y[ee]*Z})}return A}function pte(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?AI:l,f=Ic(r),h=f?a?t3:t3.filter(function(v){return Ic(v)===f}):Gd,p=h.filter(function(v){return c.indexOf(v)>=0});p.length===0&&(p=h);var m=p.reduce(function(v,y){return v[y]=yd(e,{placement:y,boundary:i,rootBoundary:o,padding:s})[Ki(y)],v},{});return Object.keys(m).sort(function(v,y){return m[v]-m[y]})}function mte(e){if(Ki(e)===RC)return[];var t=um(e);return[i3(e),t,i3(t)]}function gte(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!0:s,l=n.fallbackPlacements,c=n.padding,f=n.boundary,h=n.rootBoundary,p=n.altBoundary,m=n.flipVariations,v=m===void 0?!0:m,y=n.allowedAutoPlacements,x=t.options.placement,_=Ki(x),w=_===x,S=l||(w||!v?[um(x)]:mte(x)),T=[x].concat(S).reduce(function(q,te){return q.concat(Ki(te)===RC?pte(t,{placement:te,boundary:f,rootBoundary:h,padding:c,flipVariations:v,allowedAutoPlacements:y}):te)},[]),P=t.rects.reference,k=t.rects.popper,N=new Map,D=!0,z=T[0],A=0;A=0,ee=Z?"width":"height",ie=yd(t,{placement:W,boundary:f,rootBoundary:h,altBoundary:p,padding:c}),oe=Z?J?ni:xr:J?ti:wr;P[ee]>k[ee]&&(oe=um(oe));var G=um(oe),F=[];if(o&&F.push(ie[Y]<=0),a&&F.push(ie[oe]<=0,ie[G]<=0),F.every(function(q){return q})){z=W,D=!1;break}N.set(W,F)}if(D)for(var j=v?3:1,B=function(te){var se=T.find(function(pe){var O=N.get(pe);if(O)return O.slice(0,te).every(function(R){return R})});if(se)return z=se,"break"},ne=j;ne>0;ne--){var H=B(ne);if(H==="break")break}t.placement!==z&&(t.modifiersData[r]._skip=!0,t.placement=z,t.reset=!0)}}const vte={name:"flip",enabled:!0,phase:"main",fn:gte,requiresIfExists:["offset"],data:{_skip:!1}};function s3(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function a3(e){return[wr,ni,ti,xr].some(function(t){return e[t]>=0})}function yte(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=yd(t,{elementContext:"reference"}),a=yd(t,{altBoundary:!0}),l=s3(s,r),c=s3(a,i,o),f=a3(l),h=a3(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:f,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":h})}const _te={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:yte};function bte(e,t,n){var r=Ki(e),i=[xr,wr].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,s=o[0],a=o[1];return s=s||0,a=(a||0)*i,[xr,ni].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}function wte(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,s=AI.reduce(function(f,h){return f[h]=bte(h,t.rects,o),f},{}),a=s[t.placement],l=a.x,c=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=s}const xte={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:wte};function Ste(e){var t=e.state,n=e.name;t.modifiersData[n]=UI({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Cte={name:"popperOffsets",enabled:!0,phase:"read",fn:Ste,data:{}};function Ete(e){return e==="x"?"y":"x"}function Tte(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!1:s,l=n.boundary,c=n.rootBoundary,f=n.altBoundary,h=n.padding,p=n.tether,m=p===void 0?!0:p,v=n.tetherOffset,y=v===void 0?0:v,x=yd(t,{boundary:l,rootBoundary:c,padding:h,altBoundary:f}),_=Ki(t.placement),w=Ic(t.placement),S=!w,T=DC(_),P=Ete(T),k=t.modifiersData.popperOffsets,N=t.rects.reference,D=t.rects.popper,z=typeof y=="function"?y(Object.assign({},t.rects,{placement:t.placement})):y,A=typeof z=="number"?{mainAxis:z,altAxis:z}:Object.assign({mainAxis:0,altAxis:0},z),W=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,Y={x:0,y:0};if(k){if(o){var J,Z=T==="y"?wr:xr,ee=T==="y"?ti:ni,ie=T==="y"?"height":"width",oe=k[T],G=oe+x[Z],F=oe-x[ee],j=m?-D[ie]/2:0,B=w===Dc?N[ie]:D[ie],ne=w===Dc?-D[ie]:-N[ie],H=t.elements.arrow,q=m&&H?LC(H):{width:0,height:0},te=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:FI(),se=te[Z],pe=te[ee],O=Ef(0,N[ie],q[ie]),R=S?N[ie]/2-j-O-se-A.mainAxis:B-O-se-A.mainAxis,I=S?-N[ie]/2+j+O+pe+A.mainAxis:ne+O+pe+A.mainAxis,X=t.elements.arrow&&Zd(t.elements.arrow),K=X?T==="y"?X.clientTop||0:X.clientLeft||0:0,ae=(J=W==null?void 0:W[T])!=null?J:0,ge=oe+R-ae-K,Le=oe+I-ae,ue=Ef(m?nv(G,ge):G,oe,m?za(F,Le):F);k[T]=ue,Y[T]=ue-oe}if(a){var ve,_e=T==="x"?wr:xr,Te=T==="x"?ti:ni,De=k[P],Re=P==="y"?"height":"width",Ne=De+x[_e],ce=De-x[Te],de=[wr,xr].indexOf(_)!==-1,be=(ve=W==null?void 0:W[P])!=null?ve:0,ye=de?Ne:De-N[Re]-D[Re]-be+A.altAxis,Ce=de?De+N[Re]+D[Re]-be-A.altAxis:ce,ke=m&&de?Kee(ye,De,Ce):Ef(m?ye:Ne,De,m?Ce:ce);k[P]=ke,Y[P]=ke-De}t.modifiersData[r]=Y}}const Ote={name:"preventOverflow",enabled:!0,phase:"main",fn:Tte,requiresIfExists:["offset"]};function Pte(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function kte(e){return e===ii(e)||!Kr(e)?AC(e):Pte(e)}function Mte(e){var t=e.getBoundingClientRect(),n=Ac(t.width)/e.offsetWidth||1,r=Ac(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Rte(e,t,n){n===void 0&&(n=!1);var r=Kr(t),i=Kr(t)&&Mte(t),o=Js(t),s=jc(e,i,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((eo(t)!=="body"||IC(o))&&(a=kte(t)),Kr(t)?(l=jc(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=jC(o))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function Nte(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(a){if(!n.has(a)){var l=t.get(a);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function Lte(e){var t=Nte(e);return Hee.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function Dte(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Ate(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var l3={placement:"bottom",modifiers:[],strategy:"absolute"};function c3(){for(var e=arguments.length,t=new Array(e),n=0;n=0)&&(n[i]=e[i]);return n}function qe(e,t){if(e==null)return{};var n=Kte(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Xte(){let e=document.createElement("div");e.style.position="absolute",e.style.top="-9999px",e.style.width="50px",e.style.height="50px",e.style.overflow="scroll",document.body.appendChild(e);const t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}function FC(e){document.body.style.paddingRight=e>0?`${e}px`:null}function Qte(){return document.body.clientWidtht[n]||n).join(" "):e}function Cr(e,t){const n={};return Object.keys(e).forEach(r=>{t.indexOf(r)===-1&&(n[r]=e[r])}),n}function ZI(e,t){const n=Array.isArray(t)?t:[t];let{length:r}=n,i;const o={};for(;r>0;)r-=1,i=n[r],o[i]=e[i];return o}let d3={};function Fw(e){d3[e]||(typeof console<"u"&&console.error(e),d3[e]=!0)}function KI(e,t){return function(r,i,o,...s){return r[i]!==null&&typeof r[i]<"u"&&Fw(`"${i}" property of "${o}" has been deprecated. -${t}`),e(r,i,o,...s)}}const ene=typeof window=="object"&&window.Element||function(){};function $C(e,t,n){if(!(e[t]instanceof ene))return new Error("Invalid prop `"+t+"` supplied to `"+n+"`. Expected prop to be an instance of Element. Validation failed.")}const Bs=C.oneOfType([C.string,C.func,$C,C.shape({current:C.any})]),Pe=C.oneOfType([C.func,C.string,C.shape({$$typeof:C.symbol,render:C.func}),C.arrayOf(C.oneOfType([C.func,C.string,C.shape({$$typeof:C.symbol,render:C.func})]))]),tl={Fade:150,Collapse:350,Modal:300,Carousel:600,Offcanvas:300},rv=["in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","onEnter","onEntering","onEntered","onExit","onExiting","onExited"],go={ENTERING:"entering",ENTERED:"entered",EXITING:"exiting",EXITED:"exited"},mt={esc:27,space:32,enter:13,tab:9,up:38,down:40,home:36,end:35,n:78,p:80},tne=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],BC=!!(typeof window<"u"&&window.document&&window.document.createElement);function nne(e){return e&&typeof e=="object"?"current"in e:!1}function XI(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}function iv(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")}function h3(e){const t=typeof e,n=0/0;if(t==="number")return e;if(t==="symbol"||t==="object"&&XI(e)==="[object Symbol]")return n;if(iv(e)){const i=typeof e.valueOf=="function"?e.valueOf():e;e=iv(i)?`${i}`:i}if(t!=="string")return e===0?e:+e;e=e.replace(/^\s+|\s+$/g,"");const r=/^0b[01]+$/i.test(e);return r||/^0o[0-7]+$/i.test(e)?parseInt(e.slice(2),r?2:8):/^[-+]0x[0-9a-f]+$/i.test(e)?n:+e}function rne(e){if(!iv(e))return!1;const t=XI(e);return t==="[object Function]"||t==="[object AsyncFunction]"||t==="[object GeneratorFunction]"||t==="[object Proxy]"}function QI(e){if(nne(e))return e.current;if(rne(e))return e();if(typeof e=="string"&&BC){let t=document.querySelectorAll(e);if(t.length||(t=document.querySelectorAll(`#${e}`)),!t.length)throw new Error(`The target '${e}' could not be identified in the dom, tip: check spelling`);return t}return e}function ov(e){return e===null?!1:Array.isArray(e)||BC&&typeof e.length=="number"}function Fc(e,t){const n=QI(e);return t?ov(n)?n:n===null?[]:[n]:ov(n)?n[0]:n}const ine=["touchstart","click"];function one(e,t,n,r){let i=e;ov(i)||(i=[i]);let o=n;if(typeof o=="string"&&(o=o.split(/\s+/)),!ov(i)||typeof t!="function"||!Array.isArray(o))throw new Error(` +}`;function mI(){var e=lI,t=cI,n=Ve.cssPrefix,r=Ve.replacementClass,i=gJ;if(n!==e||r!==t){var o=new RegExp("\\.".concat(e,"\\-"),"g"),s=new RegExp("\\--".concat(e,"\\-"),"g"),a=new RegExp("\\.".concat(t),"g");i=i.replace(o,".".concat(n,"-")).replace(s,"--".concat(n,"-")).replace(a,".".concat(r))}return i}var OM=!1;function s1(){Ve.autoAddCss&&!OM&&(fJ(mI()),OM=!0)}var vJ={mixout:function(){return{dom:{css:mI,insertCss:s1}}},hooks:function(){return{beforeDOMElementCreation:function(){s1()},beforeI2svg:function(){s1()}}}},Mo=$s||{};Mo[ko]||(Mo[ko]={});Mo[ko].styles||(Mo[ko].styles={});Mo[ko].hooks||(Mo[ko].hooks={});Mo[ko].shims||(Mo[ko].shims=[]);var _i=Mo[ko],gI=[],yJ=function e(){Nt.removeEventListener("DOMContentLoaded",e),Jg=1,gI.map(function(t){return t()})},Jg=!1;Bo&&(Jg=(Nt.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(Nt.readyState),Jg||Nt.addEventListener("DOMContentLoaded",yJ));function _J(e){Bo&&(Jg?setTimeout(e,0):gI.push(e))}function Yd(e){var t=e.tag,n=e.attributes,r=n===void 0?{}:n,i=e.children,o=i===void 0?[]:i;return typeof e=="string"?pI(e):"<".concat(t," ").concat(hJ(r),">").concat(o.map(Yd).join(""),"")}function PM(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}var bJ=function(t,n){return function(r,i,o,s){return t.call(n,r,i,o,s)}},a1=function(t,n,r,i){var o=Object.keys(t),s=o.length,a=i!==void 0?bJ(n,i):n,l,c,f;for(r===void 0?(l=1,f=t[o[0]]):(l=0,f=r);l=55296&&i<=56319&&n=55296&&r<=56319&&n>t+1&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}function kM(e){return Object.keys(e).reduce(function(t,n){var r=e[n],i=!!r.icon;return i?t[r.iconName]=r.icon:t[n]=r,t},{})}function mw(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.skipHooks,i=r===void 0?!1:r,o=kM(t);typeof _i.hooks.addPack=="function"&&!i?_i.hooks.addPack(e,kM(t)):_i.styles[e]=Be(Be({},_i.styles[e]||{}),o),e==="fas"&&mw("fa",t)}var Sp,Cp,Ep,Ql=_i.styles,SJ=_i.shims,CJ=(Sp={},bn(Sp,Pt,Object.values(dd[Pt])),bn(Sp,Yt,Object.values(dd[Yt])),Sp),bC=null,vI={},yI={},_I={},bI={},wI={},EJ=(Cp={},bn(Cp,Pt,Object.keys(ud[Pt])),bn(Cp,Yt,Object.keys(ud[Yt])),Cp);function TJ(e){return~sJ.indexOf(e)}function OJ(e,t){var n=t.split("-"),r=n[0],i=n.slice(1).join("-");return r===e&&i!==""&&!TJ(i)?i:null}var xI=function(){var t=function(o){return a1(Ql,function(s,a,l){return s[l]=a1(a,o,{}),s},{})};vI=t(function(i,o,s){if(o[3]&&(i[o[3]]=s),o[2]){var a=o[2].filter(function(l){return typeof l=="number"});a.forEach(function(l){i[l.toString(16)]=s})}return i}),yI=t(function(i,o,s){if(i[s]=s,o[2]){var a=o[2].filter(function(l){return typeof l=="string"});a.forEach(function(l){i[l]=s})}return i}),wI=t(function(i,o,s){var a=o[2];return i[s]=s,a.forEach(function(l){i[l]=s}),i});var n="far"in Ql||Ve.autoFetchSvg,r=a1(SJ,function(i,o){var s=o[0],a=o[1],l=o[2];return a==="far"&&!n&&(a="fas"),typeof s=="string"&&(i.names[s]={prefix:a,iconName:l}),typeof s=="number"&&(i.unicodes[s.toString(16)]={prefix:a,iconName:l}),i},{names:{},unicodes:{}});_I=r.names,bI=r.unicodes,bC=o_(Ve.styleDefault,{family:Ve.familyDefault})};uJ(function(e){bC=o_(e.styleDefault,{family:Ve.familyDefault})});xI();function wC(e,t){return(vI[e]||{})[t]}function PJ(e,t){return(yI[e]||{})[t]}function Da(e,t){return(wI[e]||{})[t]}function SI(e){return _I[e]||{prefix:null,iconName:null}}function kJ(e){var t=bI[e],n=wC("fas",e);return t||(n?{prefix:"fas",iconName:n}:null)||{prefix:null,iconName:null}}function Bs(){return bC}var xC=function(){return{prefix:null,iconName:null,rest:[]}};function o_(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.family,r=n===void 0?Pt:n,i=ud[r][e],o=fd[r][e]||fd[r][i],s=e in _i.styles?e:null;return o||s||null}var MM=(Ep={},bn(Ep,Pt,Object.keys(dd[Pt])),bn(Ep,Yt,Object.keys(dd[Yt])),Ep);function s_(e){var t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.skipLookups,i=r===void 0?!1:r,o=(t={},bn(t,Pt,"".concat(Ve.cssPrefix,"-").concat(Pt)),bn(t,Yt,"".concat(Ve.cssPrefix,"-").concat(Yt)),t),s=null,a=Pt;(e.includes(o[Pt])||e.some(function(c){return MM[Pt].includes(c)}))&&(a=Pt),(e.includes(o[Yt])||e.some(function(c){return MM[Yt].includes(c)}))&&(a=Yt);var l=e.reduce(function(c,f){var h=OJ(Ve.cssPrefix,f);if(Ql[f]?(f=CJ[a].includes(f)?eJ[a][f]:f,s=f,c.prefix=f):EJ[a].indexOf(f)>-1?(s=f,c.prefix=o_(f,{family:a})):h?c.iconName=h:f!==Ve.replacementClass&&f!==o[Pt]&&f!==o[Yt]&&c.rest.push(f),!i&&c.prefix&&c.iconName){var p=s==="fa"?SI(c.iconName):{},m=Da(c.prefix,c.iconName);p.prefix&&(s=null),c.iconName=p.iconName||m||c.iconName,c.prefix=p.prefix||c.prefix,c.prefix==="far"&&!Ql.far&&Ql.fas&&!Ve.autoFetchSvg&&(c.prefix="fas")}return c},xC());return(e.includes("fa-brands")||e.includes("fab"))&&(l.prefix="fab"),(e.includes("fa-duotone")||e.includes("fad"))&&(l.prefix="fad"),!l.prefix&&a===Yt&&(Ql.fass||Ve.autoFetchSvg)&&(l.prefix="fass",l.iconName=Da(l.prefix,l.iconName)||l.iconName),(l.prefix==="fa"||s==="fa")&&(l.prefix=Bs()||"fas"),l}var MJ=function(){function e(){UQ(this,e),this.definitions={}}return VQ(e,[{key:"add",value:function(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o0&&f.forEach(function(h){typeof h=="string"&&(n[a][h]=c)}),n[a][l]=c}),n}}]),e}(),RM=[],Jl={},dc={},RJ=Object.keys(dc);function NJ(e,t){var n=t.mixoutsTo;return RM=e,Jl={},Object.keys(dc).forEach(function(r){RJ.indexOf(r)===-1&&delete dc[r]}),RM.forEach(function(r){var i=r.mixout?r.mixout():{};if(Object.keys(i).forEach(function(s){typeof i[s]=="function"&&(n[s]=i[s]),Qg(i[s])==="object"&&Object.keys(i[s]).forEach(function(a){n[s]||(n[s]={}),n[s][a]=i[s][a]})}),r.hooks){var o=r.hooks();Object.keys(o).forEach(function(s){Jl[s]||(Jl[s]=[]),Jl[s].push(o[s])})}r.provides&&r.provides(dc)}),n}function gw(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i1?t-1:0),r=1;r0&&arguments[0]!==void 0?arguments[0]:{};return Bo?(Qa("beforeI2svg",t),Ro("pseudoElements2svg",t),Ro("i2svg",t)):Promise.reject("Operation requires a DOM of some kind.")},watch:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.autoReplaceSvgRoot;Ve.autoReplaceSvg===!1&&(Ve.autoReplaceSvg=!0),Ve.observeMutations=!0,_J(function(){jJ({autoReplaceSvgRoot:n}),Qa("watch",t)})}},AJ={icon:function(t){if(t===null)return null;if(Qg(t)==="object"&&t.prefix&&t.iconName)return{prefix:t.prefix,iconName:Da(t.prefix,t.iconName)||t.iconName};if(Array.isArray(t)&&t.length===2){var n=t[1].indexOf("fa-")===0?t[1].slice(3):t[1],r=o_(t[0]);return{prefix:r,iconName:Da(r,n)||n}}if(typeof t=="string"&&(t.indexOf("".concat(Ve.cssPrefix,"-"))>-1||t.match(tJ))){var i=s_(t.split(" "),{skipLookups:!0});return{prefix:i.prefix||Bs(),iconName:Da(i.prefix,i.iconName)||i.iconName}}if(typeof t=="string"){var o=Bs();return{prefix:o,iconName:Da(o,t)||t}}}},$r={noAuto:LJ,config:Ve,dom:DJ,parse:AJ,library:CI,findIconDefinition:vw,toHtml:Yd},jJ=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.autoReplaceSvgRoot,r=n===void 0?Nt:n;(Object.keys(_i.styles).length>0||Ve.autoFetchSvg)&&Bo&&Ve.autoReplaceSvg&&$r.dom.i2svg({node:r})};function a_(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(function(r){return Yd(r)})}}),Object.defineProperty(e,"node",{get:function(){if(Bo){var r=Nt.createElement("div");return r.innerHTML=e.html,r.children}}}),e}function IJ(e){var t=e.children,n=e.main,r=e.mask,i=e.attributes,o=e.styles,s=e.transform;if(_C(s)&&n.found&&!r.found){var a=n.width,l=n.height,c={x:a/l/2,y:.5};i.style=i_(Be(Be({},o),{},{"transform-origin":"".concat(c.x+s.x/16,"em ").concat(c.y+s.y/16,"em")}))}return[{tag:"svg",attributes:i,children:t}]}function FJ(e){var t=e.prefix,n=e.iconName,r=e.children,i=e.attributes,o=e.symbol,s=o===!0?"".concat(t,"-").concat(Ve.cssPrefix,"-").concat(n):o;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:Be(Be({},i),{},{id:s}),children:r}]}]}function SC(e){var t=e.icons,n=t.main,r=t.mask,i=e.prefix,o=e.iconName,s=e.transform,a=e.symbol,l=e.title,c=e.maskId,f=e.titleId,h=e.extra,p=e.watchable,m=p===void 0?!1:p,v=r.found?r:n,y=v.width,x=v.height,_=i==="fak",w=[Ve.replacementClass,o?"".concat(Ve.cssPrefix,"-").concat(o):""].filter(function(z){return h.classes.indexOf(z)===-1}).filter(function(z){return z!==""||!!z}).concat(h.classes).join(" "),S={children:[],attributes:Be(Be({},h.attributes),{},{"data-prefix":i,"data-icon":o,class:w,role:h.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(y," ").concat(x)})},T=_&&!~h.classes.indexOf("fa-fw")?{width:"".concat(y/x*16*.0625,"em")}:{};m&&(S.attributes[Xa]=""),l&&(S.children.push({tag:"title",attributes:{id:S.attributes["aria-labelledby"]||"title-".concat(f||pd())},children:[l]}),delete S.attributes.title);var P=Be(Be({},S),{},{prefix:i,iconName:o,main:n,mask:r,maskId:c,transform:s,symbol:a,styles:Be(Be({},T),h.styles)}),k=r.found&&n.found?Ro("generateAbstractMask",P)||{children:[],attributes:{}}:Ro("generateAbstractIcon",P)||{children:[],attributes:{}},N=k.children,D=k.attributes;return P.children=N,P.attributes=D,a?FJ(P):IJ(P)}function NM(e){var t=e.content,n=e.width,r=e.height,i=e.transform,o=e.title,s=e.extra,a=e.watchable,l=a===void 0?!1:a,c=Be(Be(Be({},s.attributes),o?{title:o}:{}),{},{class:s.classes.join(" ")});l&&(c[Xa]="");var f=Be({},s.styles);_C(i)&&(f.transform=mJ({transform:i,startCentered:!0,width:n,height:r}),f["-webkit-transform"]=f.transform);var h=i_(f);h.length>0&&(c.style=h);var p=[];return p.push({tag:"span",attributes:c,children:[t]}),o&&p.push({tag:"span",attributes:{class:"sr-only"},children:[o]}),p}function $J(e){var t=e.content,n=e.title,r=e.extra,i=Be(Be(Be({},r.attributes),n?{title:n}:{}),{},{class:r.classes.join(" ")}),o=i_(r.styles);o.length>0&&(i.style=o);var s=[];return s.push({tag:"span",attributes:i,children:[t]}),n&&s.push({tag:"span",attributes:{class:"sr-only"},children:[n]}),s}var l1=_i.styles;function yw(e){var t=e[0],n=e[1],r=e.slice(4),i=hC(r,1),o=i[0],s=null;return Array.isArray(o)?s={tag:"g",attributes:{class:"".concat(Ve.cssPrefix,"-").concat(La.GROUP)},children:[{tag:"path",attributes:{class:"".concat(Ve.cssPrefix,"-").concat(La.SECONDARY),fill:"currentColor",d:o[0]}},{tag:"path",attributes:{class:"".concat(Ve.cssPrefix,"-").concat(La.PRIMARY),fill:"currentColor",d:o[1]}}]}:s={tag:"path",attributes:{fill:"currentColor",d:o}},{found:!0,width:t,height:n,icon:s}}var BJ={found:!1,width:512,height:512};function zJ(e,t){!uI&&!Ve.showMissingIcons&&e&&console.error('Icon with name "'.concat(e,'" and prefix "').concat(t,'" is missing.'))}function _w(e,t){var n=t;return t==="fa"&&Ve.styleDefault!==null&&(t=Bs()),new Promise(function(r,i){if(Ro("missingIconAbstract"),n==="fa"){var o=SI(e)||{};e=o.iconName||e,t=o.prefix||t}if(e&&t&&l1[t]&&l1[t][e]){var s=l1[t][e];return r(yw(s))}zJ(e,t),r(Be(Be({},BJ),{},{icon:Ve.showMissingIcons&&e?Ro("missingIconAbstract")||{}:{}}))})}var LM=function(){},bw=Ve.measurePerformance&&vp&&vp.mark&&vp.measure?vp:{mark:LM,measure:LM},Zu='FA "6.3.0"',UJ=function(t){return bw.mark("".concat(Zu," ").concat(t," begins")),function(){return EI(t)}},EI=function(t){bw.mark("".concat(Zu," ").concat(t," ends")),bw.measure("".concat(Zu," ").concat(t),"".concat(Zu," ").concat(t," begins"),"".concat(Zu," ").concat(t," ends"))},CC={begin:UJ,end:EI},cm=function(){};function DM(e){var t=e.getAttribute?e.getAttribute(Xa):null;return typeof t=="string"}function VJ(e){var t=e.getAttribute?e.getAttribute(mC):null,n=e.getAttribute?e.getAttribute(gC):null;return t&&n}function HJ(e){return e&&e.classList&&e.classList.contains&&e.classList.contains(Ve.replacementClass)}function WJ(){if(Ve.autoReplaceSvg===!0)return um.replace;var e=um[Ve.autoReplaceSvg];return e||um.replace}function YJ(e){return Nt.createElementNS("http://www.w3.org/2000/svg",e)}function qJ(e){return Nt.createElement(e)}function TI(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.ceFn,r=n===void 0?e.tag==="svg"?YJ:qJ:n;if(typeof e=="string")return Nt.createTextNode(e);var i=r(e.tag);Object.keys(e.attributes||[]).forEach(function(s){i.setAttribute(s,e.attributes[s])});var o=e.children||[];return o.forEach(function(s){i.appendChild(TI(s,{ceFn:r}))}),i}function GJ(e){var t=" ".concat(e.outerHTML," ");return t="".concat(t,"Font Awesome fontawesome.com "),t}var um={replace:function(t){var n=t[0];if(n.parentNode)if(t[1].forEach(function(i){n.parentNode.insertBefore(TI(i),n)}),n.getAttribute(Xa)===null&&Ve.keepOriginalSource){var r=Nt.createComment(GJ(n));n.parentNode.replaceChild(r,n)}else n.remove()},nest:function(t){var n=t[0],r=t[1];if(~yC(n).indexOf(Ve.replacementClass))return um.replace(t);var i=new RegExp("".concat(Ve.cssPrefix,"-.*"));if(delete r[0].attributes.id,r[0].attributes.class){var o=r[0].attributes.class.split(" ").reduce(function(a,l){return l===Ve.replacementClass||l.match(i)?a.toSvg.push(l):a.toNode.push(l),a},{toNode:[],toSvg:[]});r[0].attributes.class=o.toSvg.join(" "),o.toNode.length===0?n.removeAttribute("class"):n.setAttribute("class",o.toNode.join(" "))}var s=r.map(function(a){return Yd(a)}).join(` +`);n.setAttribute(Xa,""),n.innerHTML=s}};function AM(e){e()}function OI(e,t){var n=typeof t=="function"?t:cm;if(e.length===0)n();else{var r=AM;Ve.mutateApproach===QQ&&(r=$s.requestAnimationFrame||AM),r(function(){var i=WJ(),o=CC.begin("mutate");e.map(i),o(),n()})}}var EC=!1;function PI(){EC=!0}function ww(){EC=!1}var ev=null;function jM(e){if(EM&&Ve.observeMutations){var t=e.treeCallback,n=t===void 0?cm:t,r=e.nodeCallback,i=r===void 0?cm:r,o=e.pseudoElementsCallback,s=o===void 0?cm:o,a=e.observeMutationsRoot,l=a===void 0?Nt:a;ev=new EM(function(c){if(!EC){var f=Bs();Qc(c).forEach(function(h){if(h.type==="childList"&&h.addedNodes.length>0&&!DM(h.addedNodes[0])&&(Ve.searchPseudoElements&&s(h.target),n(h.target)),h.type==="attributes"&&h.target.parentNode&&Ve.searchPseudoElements&&s(h.target.parentNode),h.type==="attributes"&&DM(h.target)&&~oJ.indexOf(h.attributeName))if(h.attributeName==="class"&&VJ(h.target)){var p=s_(yC(h.target)),m=p.prefix,v=p.iconName;h.target.setAttribute(mC,m||f),v&&h.target.setAttribute(gC,v)}else HJ(h.target)&&i(h.target)})}}),Bo&&ev.observe(l,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function ZJ(){ev&&ev.disconnect()}function KJ(e){var t=e.getAttribute("style"),n=[];return t&&(n=t.split(";").reduce(function(r,i){var o=i.split(":"),s=o[0],a=o.slice(1);return s&&a.length>0&&(r[s]=a.join(":").trim()),r},{})),n}function XJ(e){var t=e.getAttribute("data-prefix"),n=e.getAttribute("data-icon"),r=e.innerText!==void 0?e.innerText.trim():"",i=s_(yC(e));return i.prefix||(i.prefix=Bs()),t&&n&&(i.prefix=t,i.iconName=n),i.iconName&&i.prefix||(i.prefix&&r.length>0&&(i.iconName=PJ(i.prefix,e.innerText)||wC(i.prefix,pw(e.innerText))),!i.iconName&&Ve.autoFetchSvg&&e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(i.iconName=e.firstChild.data)),i}function QJ(e){var t=Qc(e.attributes).reduce(function(i,o){return i.name!=="class"&&i.name!=="style"&&(i[o.name]=o.value),i},{}),n=e.getAttribute("title"),r=e.getAttribute("data-fa-title-id");return Ve.autoA11y&&(n?t["aria-labelledby"]="".concat(Ve.replacementClass,"-title-").concat(r||pd()):(t["aria-hidden"]="true",t.focusable="false")),t}function JJ(){return{iconName:null,title:null,titleId:null,prefix:null,transform:qi,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function IM(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0},n=XJ(e),r=n.iconName,i=n.prefix,o=n.rest,s=QJ(e),a=gw("parseNodeAttributes",{},e),l=t.styleParser?KJ(e):[];return Be({iconName:r,title:e.getAttribute("title"),titleId:e.getAttribute("data-fa-title-id"),prefix:i,transform:qi,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:o,styles:l,attributes:s}},a)}var eee=_i.styles;function kI(e){var t=Ve.autoReplaceSvg==="nest"?IM(e,{styleParser:!1}):IM(e);return~t.extra.classes.indexOf(fI)?Ro("generateLayersText",e,t):Ro("generateSvgReplacementMutation",e,t)}var zs=new Set;vC.map(function(e){zs.add("fa-".concat(e))});Object.keys(ud[Pt]).map(zs.add.bind(zs));Object.keys(ud[Yt]).map(zs.add.bind(zs));zs=Hd(zs);function FM(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!Bo)return Promise.resolve();var n=Nt.documentElement.classList,r=function(h){return n.add("".concat(TM,"-").concat(h))},i=function(h){return n.remove("".concat(TM,"-").concat(h))},o=Ve.autoFetchSvg?zs:vC.map(function(f){return"fa-".concat(f)}).concat(Object.keys(eee));o.includes("fa")||o.push("fa");var s=[".".concat(fI,":not([").concat(Xa,"])")].concat(o.map(function(f){return".".concat(f,":not([").concat(Xa,"])")})).join(", ");if(s.length===0)return Promise.resolve();var a=[];try{a=Qc(e.querySelectorAll(s))}catch{}if(a.length>0)r("pending"),i("complete");else return Promise.resolve();var l=CC.begin("onTree"),c=a.reduce(function(f,h){try{var p=kI(h);p&&f.push(p)}catch(m){uI||m.name==="MissingIcon"&&console.error(m)}return f},[]);return new Promise(function(f,h){Promise.all(c).then(function(p){OI(p,function(){r("active"),r("complete"),i("pending"),typeof t=="function"&&t(),l(),f()})}).catch(function(p){l(),h(p)})})}function tee(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;kI(e).then(function(n){n&&OI([n],t)})}function nee(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=(t||{}).icon?t:vw(t||{}),i=n.mask;return i&&(i=(i||{}).icon?i:vw(i||{})),e(r,Be(Be({},n),{},{mask:i}))}}var ree=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.transform,i=r===void 0?qi:r,o=n.symbol,s=o===void 0?!1:o,a=n.mask,l=a===void 0?null:a,c=n.maskId,f=c===void 0?null:c,h=n.title,p=h===void 0?null:h,m=n.titleId,v=m===void 0?null:m,y=n.classes,x=y===void 0?[]:y,_=n.attributes,w=_===void 0?{}:_,S=n.styles,T=S===void 0?{}:S;if(t){var P=t.prefix,k=t.iconName,N=t.icon;return a_(Be({type:"icon"},t),function(){return Qa("beforeDOMElementCreation",{iconDefinition:t,params:n}),Ve.autoA11y&&(p?w["aria-labelledby"]="".concat(Ve.replacementClass,"-title-").concat(v||pd()):(w["aria-hidden"]="true",w.focusable="false")),SC({icons:{main:yw(N),mask:l?yw(l.icon):{found:!1,width:null,height:null,icon:{}}},prefix:P,iconName:k,transform:Be(Be({},qi),i),symbol:s,title:p,maskId:f,titleId:v,extra:{attributes:w,styles:T,classes:x}})})}},iee={mixout:function(){return{icon:nee(ree)}},hooks:function(){return{mutationObserverCallbacks:function(n){return n.treeCallback=FM,n.nodeCallback=tee,n}}},provides:function(t){t.i2svg=function(n){var r=n.node,i=r===void 0?Nt:r,o=n.callback,s=o===void 0?function(){}:o;return FM(i,s)},t.generateSvgReplacementMutation=function(n,r){var i=r.iconName,o=r.title,s=r.titleId,a=r.prefix,l=r.transform,c=r.symbol,f=r.mask,h=r.maskId,p=r.extra;return new Promise(function(m,v){Promise.all([_w(i,a),f.iconName?_w(f.iconName,f.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(y){var x=hC(y,2),_=x[0],w=x[1];m([n,SC({icons:{main:_,mask:w},prefix:a,iconName:i,transform:l,symbol:c,maskId:h,title:o,titleId:s,extra:p,watchable:!0})])}).catch(v)})},t.generateAbstractIcon=function(n){var r=n.children,i=n.attributes,o=n.main,s=n.transform,a=n.styles,l=i_(a);l.length>0&&(i.style=l);var c;return _C(s)&&(c=Ro("generateAbstractTransformGrouping",{main:o,transform:s,containerWidth:o.width,iconWidth:o.width})),r.push(c||o.icon),{children:r,attributes:i}}}},oee={mixout:function(){return{layer:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.classes,o=i===void 0?[]:i;return a_({type:"layer"},function(){Qa("beforeDOMElementCreation",{assembler:n,params:r});var s=[];return n(function(a){Array.isArray(a)?a.map(function(l){s=s.concat(l.abstract)}):s=s.concat(a.abstract)}),[{tag:"span",attributes:{class:["".concat(Ve.cssPrefix,"-layers")].concat(Hd(o)).join(" ")},children:s}]})}}}},see={mixout:function(){return{counter:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.title,o=i===void 0?null:i,s=r.classes,a=s===void 0?[]:s,l=r.attributes,c=l===void 0?{}:l,f=r.styles,h=f===void 0?{}:f;return a_({type:"counter",content:n},function(){return Qa("beforeDOMElementCreation",{content:n,params:r}),$J({content:n.toString(),title:o,extra:{attributes:c,styles:h,classes:["".concat(Ve.cssPrefix,"-layers-counter")].concat(Hd(a))}})})}}}},aee={mixout:function(){return{text:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.transform,o=i===void 0?qi:i,s=r.title,a=s===void 0?null:s,l=r.classes,c=l===void 0?[]:l,f=r.attributes,h=f===void 0?{}:f,p=r.styles,m=p===void 0?{}:p;return a_({type:"text",content:n},function(){return Qa("beforeDOMElementCreation",{content:n,params:r}),NM({content:n,transform:Be(Be({},qi),o),title:a,extra:{attributes:h,styles:m,classes:["".concat(Ve.cssPrefix,"-layers-text")].concat(Hd(c))}})})}}},provides:function(t){t.generateLayersText=function(n,r){var i=r.title,o=r.transform,s=r.extra,a=null,l=null;if(aI){var c=parseInt(getComputedStyle(n).fontSize,10),f=n.getBoundingClientRect();a=f.width/c,l=f.height/c}return Ve.autoA11y&&!i&&(s.attributes["aria-hidden"]="true"),Promise.resolve([n,NM({content:n.innerHTML,width:a,height:l,transform:o,title:i,extra:s,watchable:!0})])}}},lee=new RegExp('"',"ug"),$M=[1105920,1112319];function cee(e){var t=e.replace(lee,""),n=xJ(t,0),r=n>=$M[0]&&n<=$M[1],i=t.length===2?t[0]===t[1]:!1;return{value:pw(i?t[0]:t),isSecondary:r||i}}function BM(e,t){var n="".concat(XQ).concat(t.replace(":","-"));return new Promise(function(r,i){if(e.getAttribute(n)!==null)return r();var o=Qc(e.children),s=o.filter(function(N){return N.getAttribute(hw)===t})[0],a=$s.getComputedStyle(e,t),l=a.getPropertyValue("font-family").match(nJ),c=a.getPropertyValue("font-weight"),f=a.getPropertyValue("content");if(s&&!l)return e.removeChild(s),r();if(l&&f!=="none"&&f!==""){var h=a.getPropertyValue("content"),p=~["Sharp"].indexOf(l[2])?Yt:Pt,m=~["Solid","Regular","Light","Thin","Duotone","Brands","Kit"].indexOf(l[2])?fd[p][l[2].toLowerCase()]:rJ[p][c],v=cee(h),y=v.value,x=v.isSecondary,_=l[0].startsWith("FontAwesome"),w=wC(m,y),S=w;if(_){var T=kJ(y);T.iconName&&T.prefix&&(w=T.iconName,m=T.prefix)}if(w&&!x&&(!s||s.getAttribute(mC)!==m||s.getAttribute(gC)!==S)){e.setAttribute(n,S),s&&e.removeChild(s);var P=JJ(),k=P.extra;k.attributes[hw]=t,_w(w,m).then(function(N){var D=SC(Be(Be({},P),{},{icons:{main:N,mask:xC()},prefix:m,iconName:S,extra:k,watchable:!0})),z=Nt.createElement("svg");t==="::before"?e.insertBefore(z,e.firstChild):e.appendChild(z),z.outerHTML=D.map(function(A){return Yd(A)}).join(` +`),e.removeAttribute(n),r()}).catch(i)}else r()}else r()})}function uee(e){return Promise.all([BM(e,"::before"),BM(e,"::after")])}function fee(e){return e.parentNode!==document.head&&!~JQ.indexOf(e.tagName.toUpperCase())&&!e.getAttribute(hw)&&(!e.parentNode||e.parentNode.tagName!=="svg")}function zM(e){if(Bo)return new Promise(function(t,n){var r=Qc(e.querySelectorAll("*")).filter(fee).map(uee),i=CC.begin("searchPseudoElements");PI(),Promise.all(r).then(function(){i(),ww(),t()}).catch(function(){i(),ww(),n()})})}var dee={hooks:function(){return{mutationObserverCallbacks:function(n){return n.pseudoElementsCallback=zM,n}}},provides:function(t){t.pseudoElements2svg=function(n){var r=n.node,i=r===void 0?Nt:r;Ve.searchPseudoElements&&zM(i)}}},UM=!1,hee={mixout:function(){return{dom:{unwatch:function(){PI(),UM=!0}}}},hooks:function(){return{bootstrap:function(){jM(gw("mutationObserverCallbacks",{}))},noAuto:function(){ZJ()},watch:function(n){var r=n.observeMutationsRoot;UM?ww():jM(gw("mutationObserverCallbacks",{observeMutationsRoot:r}))}}}},VM=function(t){var n={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return t.toLowerCase().split(" ").reduce(function(r,i){var o=i.toLowerCase().split("-"),s=o[0],a=o.slice(1).join("-");if(s&&a==="h")return r.flipX=!0,r;if(s&&a==="v")return r.flipY=!0,r;if(a=parseFloat(a),isNaN(a))return r;switch(s){case"grow":r.size=r.size+a;break;case"shrink":r.size=r.size-a;break;case"left":r.x=r.x-a;break;case"right":r.x=r.x+a;break;case"up":r.y=r.y-a;break;case"down":r.y=r.y+a;break;case"rotate":r.rotate=r.rotate+a;break}return r},n)},pee={mixout:function(){return{parse:{transform:function(n){return VM(n)}}}},hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-transform");return i&&(n.transform=VM(i)),n}}},provides:function(t){t.generateAbstractTransformGrouping=function(n){var r=n.main,i=n.transform,o=n.containerWidth,s=n.iconWidth,a={transform:"translate(".concat(o/2," 256)")},l="translate(".concat(i.x*32,", ").concat(i.y*32,") "),c="scale(".concat(i.size/16*(i.flipX?-1:1),", ").concat(i.size/16*(i.flipY?-1:1),") "),f="rotate(".concat(i.rotate," 0 0)"),h={transform:"".concat(l," ").concat(c," ").concat(f)},p={transform:"translate(".concat(s/2*-1," -256)")},m={outer:a,inner:h,path:p};return{tag:"g",attributes:Be({},m.outer),children:[{tag:"g",attributes:Be({},m.inner),children:[{tag:r.icon.tag,children:r.icon.children,attributes:Be(Be({},r.icon.attributes),m.path)}]}]}}}},c1={x:0,y:0,width:"100%",height:"100%"};function HM(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return e.attributes&&(e.attributes.fill||t)&&(e.attributes.fill="black"),e}function mee(e){return e.tag==="g"?e.children:[e]}var gee={hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-mask"),o=i?s_(i.split(" ").map(function(s){return s.trim()})):xC();return o.prefix||(o.prefix=Bs()),n.mask=o,n.maskId=r.getAttribute("data-fa-mask-id"),n}}},provides:function(t){t.generateAbstractMask=function(n){var r=n.children,i=n.attributes,o=n.main,s=n.mask,a=n.maskId,l=n.transform,c=o.width,f=o.icon,h=s.width,p=s.icon,m=pJ({transform:l,containerWidth:h,iconWidth:c}),v={tag:"rect",attributes:Be(Be({},c1),{},{fill:"white"})},y=f.children?{children:f.children.map(HM)}:{},x={tag:"g",attributes:Be({},m.inner),children:[HM(Be({tag:f.tag,attributes:Be(Be({},f.attributes),m.path)},y))]},_={tag:"g",attributes:Be({},m.outer),children:[x]},w="mask-".concat(a||pd()),S="clip-".concat(a||pd()),T={tag:"mask",attributes:Be(Be({},c1),{},{id:w,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[v,_]},P={tag:"defs",children:[{tag:"clipPath",attributes:{id:S},children:mee(p)},T]};return r.push(P,{tag:"rect",attributes:Be({fill:"currentColor","clip-path":"url(#".concat(S,")"),mask:"url(#".concat(w,")")},c1)}),{children:r,attributes:i}}}},vee={provides:function(t){var n=!1;$s.matchMedia&&(n=$s.matchMedia("(prefers-reduced-motion: reduce)").matches),t.missingIconAbstract=function(){var r=[],i={fill:"currentColor"},o={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};r.push({tag:"path",attributes:Be(Be({},i),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});var s=Be(Be({},o),{},{attributeName:"opacity"}),a={tag:"circle",attributes:Be(Be({},i),{},{cx:"256",cy:"364",r:"28"}),children:[]};return n||a.children.push({tag:"animate",attributes:Be(Be({},o),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:Be(Be({},s),{},{values:"1;0;1;1;0;1;"})}),r.push(a),r.push({tag:"path",attributes:Be(Be({},i),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:n?[]:[{tag:"animate",attributes:Be(Be({},s),{},{values:"1;0;0;0;0;1;"})}]}),n||r.push({tag:"path",attributes:Be(Be({},i),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:Be(Be({},s),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:r}}}},yee={hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-symbol"),o=i===null?!1:i===""?!0:i;return n.symbol=o,n}}}},_ee=[vJ,iee,oee,see,aee,dee,hee,pee,gee,vee,yee];NJ(_ee,{mixoutsTo:$r});$r.noAuto;$r.config;$r.library;$r.dom;var xw=$r.parse;$r.findIconDefinition;$r.toHtml;var bee=$r.icon;$r.layer;$r.text;$r.counter;var MI={exports:{}},wee="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",xee=wee,See=xee;function RI(){}function NI(){}NI.resetWarningCache=RI;var Cee=function(){function e(r,i,o,s,a,l){if(l!==See){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:NI,resetWarningCache:RI};return n.PropTypes=n,n};MI.exports=Cee();var Eee=MI.exports;const C=ri(Eee);function WM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function vs(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function Oee(e,t){if(e==null)return{};var n=Tee(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Sw(e){return Pee(e)||kee(e)||Mee(e)||Ree()}function Pee(e){if(Array.isArray(e))return Cw(e)}function kee(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Mee(e,t){if(e){if(typeof e=="string")return Cw(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Cw(e,t)}}function Cw(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&arguments[2]!==void 0?arguments[2]:{};if(typeof t=="string")return t;var r=(t.children||[]).map(function(l){return DI(e,l)}),i=Object.keys(t.attributes||{}).reduce(function(l,c){var f=t.attributes[c];switch(c){case"class":l.attrs.className=f,delete t.attributes.class;break;case"style":l.attrs.style=jee(f);break;default:c.indexOf("aria-")===0||c.indexOf("data-")===0?l.attrs[c.toLowerCase()]=f:l.attrs[LI(c)]=f}return l},{attrs:{}}),o=n.style,s=o===void 0?{}:o,a=Oee(n,Dee);return i.attrs.style=vs(vs({},i.attrs.style),s),e.apply(void 0,[t.tag,vs(vs({},i.attrs),a)].concat(Sw(r)))}var AI=!1;try{AI=!0}catch{}function Iee(){if(!AI&&console&&typeof console.error=="function"){var e;(e=console).error.apply(e,arguments)}}function YM(e){if(e&&tv(e)==="object"&&e.prefix&&e.iconName&&e.icon)return e;if(xw.icon)return xw.icon(e);if(e===null)return null;if(e&&tv(e)==="object"&&e.prefix&&e.iconName)return e;if(Array.isArray(e)&&e.length===2)return{prefix:e[0],iconName:e[1]};if(typeof e=="string")return{prefix:"fas",iconName:e}}function u1(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?ec({},e,t):{}}var je=U.forwardRef(function(e,t){var n=e.icon,r=e.mask,i=e.symbol,o=e.className,s=e.title,a=e.titleId,l=e.maskId,c=YM(n),f=u1("classes",[].concat(Sw(Nee(e)),Sw(o.split(" ")))),h=u1("transform",typeof e.transform=="string"?xw.transform(e.transform):e.transform),p=u1("mask",YM(r)),m=bee(c,vs(vs(vs(vs({},f),h),p),{},{symbol:i,title:s,titleId:a,maskId:l}));if(!m)return Iee("Could not find icon",c),null;var v=m.abstract,y={ref:t};return Object.keys(e).forEach(function(x){je.defaultProps.hasOwnProperty(x)||(y[x]=e[x])}),Fee(v[0],y)});je.displayName="FontAwesomeIcon";je.propTypes={beat:C.bool,border:C.bool,beatFade:C.bool,bounce:C.bool,className:C.string,fade:C.bool,flash:C.bool,mask:C.oneOfType([C.object,C.array,C.string]),maskId:C.string,fixedWidth:C.bool,inverse:C.bool,flip:C.oneOf([!0,!1,"horizontal","vertical","both"]),icon:C.oneOfType([C.object,C.array,C.string]),listItem:C.bool,pull:C.oneOf(["right","left"]),pulse:C.bool,rotation:C.oneOf([0,90,180,270]),shake:C.bool,size:C.oneOf(["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:C.bool,spinPulse:C.bool,spinReverse:C.bool,symbol:C.oneOfType([C.bool,C.string]),title:C.string,titleId:C.string,transform:C.oneOfType([C.string,C.object]),swapOpacity:C.bool};je.defaultProps={border:!1,className:"",mask:null,maskId:null,fixedWidth:!1,inverse:!1,flip:!1,icon:null,listItem:!1,pull:null,pulse:!1,rotation:null,size:null,spin:!1,spinPulse:!1,spinReverse:!1,beat:!1,fade:!1,beatFade:!1,bounce:!1,shake:!1,symbol:!1,title:"",titleId:null,transform:null,swapOpacity:!1};var Fee=DI.bind(null,U.createElement),jI=V.createContext(),II=V.createContext();function qM(e){var t=e.children,n=V.useState(null),r=n[0],i=n[1],o=V.useRef(!1);V.useEffect(function(){return function(){o.current=!0}},[]);var s=V.useCallback(function(a){o.current||i(a)},[]);return V.createElement(jI.Provider,{value:r},V.createElement(II.Provider,{value:s},t))}var FI=function(t){return Array.isArray(t)?t[0]:t},$I=function(t){if(typeof t=="function"){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i"u")return!1;var t=oi(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Xee(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!Kr(o)||!to(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(s){var a=i[s];a===!1?o.removeAttribute(s):o.setAttribute(s,a===!0?"":a)}))})}function Qee(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},s=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),a=s.reduce(function(l,c){return l[c]="",l},{});!Kr(i)||!to(i)||(Object.assign(i.style,a),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const Jee={name:"applyStyles",enabled:!0,phase:"write",fn:Xee,effect:Qee,requires:["computeStyles"]};function Xi(e){return e.split("-")[0]}var za=Math.max,nv=Math.min,Lc=Math.round;function Tw(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function UI(){return!/^((?!chrome|android).)*safari/i.test(Tw())}function Dc(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Kr(e)&&(i=e.offsetWidth>0&&Lc(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Lc(r.height)/e.offsetHeight||1);var s=Ja(e)?oi(e):window,a=s.visualViewport,l=!UI()&&n,c=(r.left+(l&&a?a.offsetLeft:0))/i,f=(r.top+(l&&a?a.offsetTop:0))/o,h=r.width/i,p=r.height/o;return{width:h,height:p,top:f,right:c+h,bottom:f+p,left:c,x:c,y:f}}function PC(e){var t=Dc(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function VI(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&OC(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function No(e){return oi(e).getComputedStyle(e)}function ete(e){return["table","td","th"].indexOf(to(e))>=0}function ea(e){return((Ja(e)?e.ownerDocument:e.document)||window.document).documentElement}function l_(e){return to(e)==="html"?e:e.assignedSlot||e.parentNode||(OC(e)?e.host:null)||ea(e)}function XM(e){return!Kr(e)||No(e).position==="fixed"?null:e.offsetParent}function tte(e){var t=/firefox/i.test(Tw()),n=/Trident/i.test(Tw());if(n&&Kr(e)){var r=No(e);if(r.position==="fixed")return null}var i=l_(e);for(OC(i)&&(i=i.host);Kr(i)&&["html","body"].indexOf(to(i))<0;){var o=No(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function Gd(e){for(var t=oi(e),n=XM(e);n&&ete(n)&&No(n).position==="static";)n=XM(n);return n&&(to(n)==="html"||to(n)==="body"&&No(n).position==="static")?t:n||tte(e)||t}function kC(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Sf(e,t,n){return za(e,nv(t,n))}function nte(e,t,n){var r=Sf(e,t,n);return r>n?n:r}function HI(){return{top:0,right:0,bottom:0,left:0}}function WI(e){return Object.assign({},HI(),e)}function YI(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var rte=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,WI(typeof t!="number"?t:YI(t,qd))};function ite(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,a=Xi(n.placement),l=kC(a),c=[xr,ni].indexOf(a)>=0,f=c?"height":"width";if(!(!o||!s)){var h=rte(i.padding,n),p=PC(o),m=l==="y"?wr:xr,v=l==="y"?ti:ni,y=n.rects.reference[f]+n.rects.reference[l]-s[l]-n.rects.popper[f],x=s[l]-n.rects.reference[l],_=Gd(o),w=_?l==="y"?_.clientHeight||0:_.clientWidth||0:0,S=y/2-x/2,T=h[m],P=w-p[f]-h[v],k=w/2-p[f]/2+S,N=Sf(T,k,P),D=l;n.modifiersData[r]=(t={},t[D]=N,t.centerOffset=N-k,t)}}function ote(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||VI(t.elements.popper,i)&&(t.elements.arrow=i))}const ste={name:"arrow",enabled:!0,phase:"main",fn:ite,effect:ote,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ac(e){return e.split("-")[1]}var ate={top:"auto",right:"auto",bottom:"auto",left:"auto"};function lte(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:Lc(t*i)/i||0,y:Lc(n*i)/i||0}}function QM(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,s=e.offsets,a=e.position,l=e.gpuAcceleration,c=e.adaptive,f=e.roundOffsets,h=e.isFixed,p=s.x,m=p===void 0?0:p,v=s.y,y=v===void 0?0:v,x=typeof f=="function"?f({x:m,y}):{x:m,y};m=x.x,y=x.y;var _=s.hasOwnProperty("x"),w=s.hasOwnProperty("y"),S=xr,T=wr,P=window;if(c){var k=Gd(n),N="clientHeight",D="clientWidth";if(k===oi(n)&&(k=ea(n),No(k).position!=="static"&&a==="absolute"&&(N="scrollHeight",D="scrollWidth")),k=k,i===wr||(i===xr||i===ni)&&o===md){T=ti;var z=h&&k===P&&P.visualViewport?P.visualViewport.height:k[N];y-=z-r.height,y*=l?1:-1}if(i===xr||(i===wr||i===ti)&&o===md){S=ni;var A=h&&k===P&&P.visualViewport?P.visualViewport.width:k[D];m-=A-r.width,m*=l?1:-1}}var W=Object.assign({position:a},c&&ate),Y=f===!0?lte({x:m,y}):{x:m,y};if(m=Y.x,y=Y.y,l){var J;return Object.assign({},W,(J={},J[T]=w?"0":"",J[S]=_?"0":"",J.transform=(P.devicePixelRatio||1)<=1?"translate("+m+"px, "+y+"px)":"translate3d("+m+"px, "+y+"px, 0)",J))}return Object.assign({},W,(t={},t[T]=w?y+"px":"",t[S]=_?m+"px":"",t.transform="",t))}function cte(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,s=o===void 0?!0:o,a=n.roundOffsets,l=a===void 0?!0:a,c={placement:Xi(t.placement),variation:Ac(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,QM(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,QM(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const ute={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:cte,data:{}};var Tp={passive:!0};function fte(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,s=r.resize,a=s===void 0?!0:s,l=oi(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(f){f.addEventListener("scroll",n.update,Tp)}),a&&l.addEventListener("resize",n.update,Tp),function(){o&&c.forEach(function(f){f.removeEventListener("scroll",n.update,Tp)}),a&&l.removeEventListener("resize",n.update,Tp)}}const dte={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:fte,data:{}};var hte={left:"right",right:"left",bottom:"top",top:"bottom"};function fm(e){return e.replace(/left|right|bottom|top/g,function(t){return hte[t]})}var pte={start:"end",end:"start"};function JM(e){return e.replace(/start|end/g,function(t){return pte[t]})}function MC(e){var t=oi(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function RC(e){return Dc(ea(e)).left+MC(e).scrollLeft}function mte(e,t){var n=oi(e),r=ea(e),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;var c=UI();(c||!c&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a+RC(e),y:l}}function gte(e){var t,n=ea(e),r=MC(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=za(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=za(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+RC(e),l=-r.scrollTop;return No(i||n).direction==="rtl"&&(a+=za(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}function NC(e){var t=No(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function qI(e){return["html","body","#document"].indexOf(to(e))>=0?e.ownerDocument.body:Kr(e)&&NC(e)?e:qI(l_(e))}function Cf(e,t){var n;t===void 0&&(t=[]);var r=qI(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=oi(r),s=i?[o].concat(o.visualViewport||[],NC(r)?r:[]):r,a=t.concat(s);return i?a:a.concat(Cf(l_(s)))}function Ow(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function vte(e,t){var n=Dc(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function e3(e,t,n){return t===BI?Ow(mte(e,n)):Ja(t)?vte(t,n):Ow(gte(ea(e)))}function yte(e){var t=Cf(l_(e)),n=["absolute","fixed"].indexOf(No(e).position)>=0,r=n&&Kr(e)?Gd(e):e;return Ja(r)?t.filter(function(i){return Ja(i)&&VI(i,r)&&to(i)!=="body"}):[]}function _te(e,t,n,r){var i=t==="clippingParents"?yte(e):[].concat(t),o=[].concat(i,[n]),s=o[0],a=o.reduce(function(l,c){var f=e3(e,c,r);return l.top=za(f.top,l.top),l.right=nv(f.right,l.right),l.bottom=nv(f.bottom,l.bottom),l.left=za(f.left,l.left),l},e3(e,s,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function GI(e){var t=e.reference,n=e.element,r=e.placement,i=r?Xi(r):null,o=r?Ac(r):null,s=t.x+t.width/2-n.width/2,a=t.y+t.height/2-n.height/2,l;switch(i){case wr:l={x:s,y:t.y-n.height};break;case ti:l={x:s,y:t.y+t.height};break;case ni:l={x:t.x+t.width,y:a};break;case xr:l={x:t.x-n.width,y:a};break;default:l={x:t.x,y:t.y}}var c=i?kC(i):null;if(c!=null){var f=c==="y"?"height":"width";switch(o){case Nc:l[c]=l[c]-(t[f]/2-n[f]/2);break;case md:l[c]=l[c]+(t[f]/2-n[f]/2);break}}return l}function gd(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,s=o===void 0?e.strategy:o,a=n.boundary,l=a===void 0?$ee:a,c=n.rootBoundary,f=c===void 0?BI:c,h=n.elementContext,p=h===void 0?Au:h,m=n.altBoundary,v=m===void 0?!1:m,y=n.padding,x=y===void 0?0:y,_=WI(typeof x!="number"?x:YI(x,qd)),w=p===Au?Bee:Au,S=e.rects.popper,T=e.elements[v?w:p],P=_te(Ja(T)?T:T.contextElement||ea(e.elements.popper),l,f,s),k=Dc(e.elements.reference),N=GI({reference:k,element:S,strategy:"absolute",placement:i}),D=Ow(Object.assign({},S,N)),z=p===Au?D:k,A={top:P.top-z.top+_.top,bottom:z.bottom-P.bottom+_.bottom,left:P.left-z.left+_.left,right:z.right-P.right+_.right},W=e.modifiersData.offset;if(p===Au&&W){var Y=W[i];Object.keys(A).forEach(function(J){var Z=[ni,ti].indexOf(J)>=0?1:-1,ee=[wr,ti].indexOf(J)>=0?"y":"x";A[J]+=Y[ee]*Z})}return A}function bte(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?zI:l,f=Ac(r),h=f?a?KM:KM.filter(function(v){return Ac(v)===f}):qd,p=h.filter(function(v){return c.indexOf(v)>=0});p.length===0&&(p=h);var m=p.reduce(function(v,y){return v[y]=gd(e,{placement:y,boundary:i,rootBoundary:o,padding:s})[Xi(y)],v},{});return Object.keys(m).sort(function(v,y){return m[v]-m[y]})}function wte(e){if(Xi(e)===TC)return[];var t=fm(e);return[JM(e),t,JM(t)]}function xte(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!0:s,l=n.fallbackPlacements,c=n.padding,f=n.boundary,h=n.rootBoundary,p=n.altBoundary,m=n.flipVariations,v=m===void 0?!0:m,y=n.allowedAutoPlacements,x=t.options.placement,_=Xi(x),w=_===x,S=l||(w||!v?[fm(x)]:wte(x)),T=[x].concat(S).reduce(function(q,te){return q.concat(Xi(te)===TC?bte(t,{placement:te,boundary:f,rootBoundary:h,padding:c,flipVariations:v,allowedAutoPlacements:y}):te)},[]),P=t.rects.reference,k=t.rects.popper,N=new Map,D=!0,z=T[0],A=0;A=0,ee=Z?"width":"height",ie=gd(t,{placement:W,boundary:f,rootBoundary:h,altBoundary:p,padding:c}),oe=Z?J?ni:xr:J?ti:wr;P[ee]>k[ee]&&(oe=fm(oe));var G=fm(oe),F=[];if(o&&F.push(ie[Y]<=0),a&&F.push(ie[oe]<=0,ie[G]<=0),F.every(function(q){return q})){z=W,D=!1;break}N.set(W,F)}if(D)for(var j=v?3:1,B=function(te){var se=T.find(function(pe){var O=N.get(pe);if(O)return O.slice(0,te).every(function(R){return R})});if(se)return z=se,"break"},ne=j;ne>0;ne--){var H=B(ne);if(H==="break")break}t.placement!==z&&(t.modifiersData[r]._skip=!0,t.placement=z,t.reset=!0)}}const Ste={name:"flip",enabled:!0,phase:"main",fn:xte,requiresIfExists:["offset"],data:{_skip:!1}};function t3(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function n3(e){return[wr,ni,ti,xr].some(function(t){return e[t]>=0})}function Cte(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=gd(t,{elementContext:"reference"}),a=gd(t,{altBoundary:!0}),l=t3(s,r),c=t3(a,i,o),f=n3(l),h=n3(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:f,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":h})}const Ete={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Cte};function Tte(e,t,n){var r=Xi(e),i=[xr,wr].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,s=o[0],a=o[1];return s=s||0,a=(a||0)*i,[xr,ni].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}function Ote(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,s=zI.reduce(function(f,h){return f[h]=Tte(h,t.rects,o),f},{}),a=s[t.placement],l=a.x,c=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=s}const Pte={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Ote};function kte(e){var t=e.state,n=e.name;t.modifiersData[n]=GI({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Mte={name:"popperOffsets",enabled:!0,phase:"read",fn:kte,data:{}};function Rte(e){return e==="x"?"y":"x"}function Nte(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,a=s===void 0?!1:s,l=n.boundary,c=n.rootBoundary,f=n.altBoundary,h=n.padding,p=n.tether,m=p===void 0?!0:p,v=n.tetherOffset,y=v===void 0?0:v,x=gd(t,{boundary:l,rootBoundary:c,padding:h,altBoundary:f}),_=Xi(t.placement),w=Ac(t.placement),S=!w,T=kC(_),P=Rte(T),k=t.modifiersData.popperOffsets,N=t.rects.reference,D=t.rects.popper,z=typeof y=="function"?y(Object.assign({},t.rects,{placement:t.placement})):y,A=typeof z=="number"?{mainAxis:z,altAxis:z}:Object.assign({mainAxis:0,altAxis:0},z),W=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,Y={x:0,y:0};if(k){if(o){var J,Z=T==="y"?wr:xr,ee=T==="y"?ti:ni,ie=T==="y"?"height":"width",oe=k[T],G=oe+x[Z],F=oe-x[ee],j=m?-D[ie]/2:0,B=w===Nc?N[ie]:D[ie],ne=w===Nc?-D[ie]:-N[ie],H=t.elements.arrow,q=m&&H?PC(H):{width:0,height:0},te=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:HI(),se=te[Z],pe=te[ee],O=Sf(0,N[ie],q[ie]),R=S?N[ie]/2-j-O-se-A.mainAxis:B-O-se-A.mainAxis,I=S?-N[ie]/2+j+O+pe+A.mainAxis:ne+O+pe+A.mainAxis,X=t.elements.arrow&&Gd(t.elements.arrow),K=X?T==="y"?X.clientTop||0:X.clientLeft||0:0,ae=(J=W==null?void 0:W[T])!=null?J:0,ge=oe+R-ae-K,Le=oe+I-ae,ue=Sf(m?nv(G,ge):G,oe,m?za(F,Le):F);k[T]=ue,Y[T]=ue-oe}if(a){var ve,_e=T==="x"?wr:xr,Te=T==="x"?ti:ni,De=k[P],Re=P==="y"?"height":"width",Ne=De+x[_e],ce=De-x[Te],de=[wr,xr].indexOf(_)!==-1,be=(ve=W==null?void 0:W[P])!=null?ve:0,ye=de?Ne:De-N[Re]-D[Re]-be+A.altAxis,Ce=de?De+N[Re]+D[Re]-be-A.altAxis:ce,ke=m&&de?nte(ye,De,Ce):Sf(m?ye:Ne,De,m?Ce:ce);k[P]=ke,Y[P]=ke-De}t.modifiersData[r]=Y}}const Lte={name:"preventOverflow",enabled:!0,phase:"main",fn:Nte,requiresIfExists:["offset"]};function Dte(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Ate(e){return e===oi(e)||!Kr(e)?MC(e):Dte(e)}function jte(e){var t=e.getBoundingClientRect(),n=Lc(t.width)/e.offsetWidth||1,r=Lc(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Ite(e,t,n){n===void 0&&(n=!1);var r=Kr(t),i=Kr(t)&&jte(t),o=ea(t),s=Dc(e,i,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((to(t)!=="body"||NC(o))&&(a=Ate(t)),Kr(t)?(l=Dc(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=RC(o))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function Fte(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(a){if(!n.has(a)){var l=t.get(a);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function $te(e){var t=Fte(e);return Kee.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function Bte(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function zte(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var r3={placement:"bottom",modifiers:[],strategy:"absolute"};function i3(){for(var e=arguments.length,t=new Array(e),n=0;n=0)&&(n[i]=e[i]);return n}function qe(e,t){if(e==null)return{};var n=one(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function sne(){let e=document.createElement("div");e.style.position="absolute",e.style.top="-9999px",e.style.width="50px",e.style.height="50px",e.style.overflow="scroll",document.body.appendChild(e);const t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}function LC(e){document.body.style.paddingRight=e>0?`${e}px`:null}function ane(){return document.body.clientWidtht[n]||n).join(" "):e}function Cr(e,t){const n={};return Object.keys(e).forEach(r=>{t.indexOf(r)===-1&&(n[r]=e[r])}),n}function n6(e,t){const n=Array.isArray(t)?t:[t];let{length:r}=n,i;const o={};for(;r>0;)r-=1,i=n[r],o[i]=e[i];return o}let a3={};function Mw(e){a3[e]||(typeof console<"u"&&console.error(e),a3[e]=!0)}function r6(e,t){return function(r,i,o,...s){return r[i]!==null&&typeof r[i]<"u"&&Mw(`"${i}" property of "${o}" has been deprecated. +${t}`),e(r,i,o,...s)}}const cne=typeof window=="object"&&window.Element||function(){};function DC(e,t,n){if(!(e[t]instanceof cne))return new Error("Invalid prop `"+t+"` supplied to `"+n+"`. Expected prop to be an instance of Element. Validation failed.")}const Us=C.oneOfType([C.string,C.func,DC,C.shape({current:C.any})]),Pe=C.oneOfType([C.func,C.string,C.shape({$$typeof:C.symbol,render:C.func}),C.arrayOf(C.oneOfType([C.func,C.string,C.shape({$$typeof:C.symbol,render:C.func})]))]),el={Fade:150,Collapse:350,Modal:300,Carousel:600,Offcanvas:300},rv=["in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","onEnter","onEntering","onEntered","onExit","onExiting","onExited"],vo={ENTERING:"entering",ENTERED:"entered",EXITING:"exiting",EXITED:"exited"},mt={esc:27,space:32,enter:13,tab:9,up:38,down:40,home:36,end:35,n:78,p:80},une=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],AC=!!(typeof window<"u"&&window.document&&window.document.createElement);function fne(e){return e&&typeof e=="object"?"current"in e:!1}function i6(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}function iv(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")}function l3(e){const t=typeof e,n=0/0;if(t==="number")return e;if(t==="symbol"||t==="object"&&i6(e)==="[object Symbol]")return n;if(iv(e)){const i=typeof e.valueOf=="function"?e.valueOf():e;e=iv(i)?`${i}`:i}if(t!=="string")return e===0?e:+e;e=e.replace(/^\s+|\s+$/g,"");const r=/^0b[01]+$/i.test(e);return r||/^0o[0-7]+$/i.test(e)?parseInt(e.slice(2),r?2:8):/^[-+]0x[0-9a-f]+$/i.test(e)?n:+e}function dne(e){if(!iv(e))return!1;const t=i6(e);return t==="[object Function]"||t==="[object AsyncFunction]"||t==="[object GeneratorFunction]"||t==="[object Proxy]"}function o6(e){if(fne(e))return e.current;if(dne(e))return e();if(typeof e=="string"&&AC){let t=document.querySelectorAll(e);if(t.length||(t=document.querySelectorAll(`#${e}`)),!t.length)throw new Error(`The target '${e}' could not be identified in the dom, tip: check spelling`);return t}return e}function ov(e){return e===null?!1:Array.isArray(e)||AC&&typeof e.length=="number"}function jc(e,t){const n=o6(e);return t?ov(n)?n:n===null?[]:[n]:ov(n)?n[0]:n}const hne=["touchstart","click"];function pne(e,t,n,r){let i=e;ov(i)||(i=[i]);let o=n;if(typeof o=="string"&&(o=o.split(/\s+/)),!ov(i)||typeof t!="function"||!Array.isArray(o))throw new Error(` The first argument of this function must be DOM node or an array on DOM nodes or NodeList. The second must be a function. The third is a string or an array of strings that represents DOM events - `);return Array.prototype.forEach.call(o,s=>{Array.prototype.forEach.call(i,a=>{a.addEventListener(s,t,r)})}),function(){Array.prototype.forEach.call(o,a=>{Array.prototype.forEach.call(i,l=>{l.removeEventListener(a,t,r)})})}}const JI=["a[href]","area[href]","input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","object","embed","[tabindex]:not(.modal):not(.offcanvas)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'];C.oneOfType([C.bool,C.string]),C.string,C.object;const sne=["className","cssModule","noGutters","tag","widths"],ane=["xs","sm","md","lg","xl","xxl"],Rl=C.oneOfType([C.number,C.string]),lne={tag:Pe,noGutters:KI(C.bool,"Please use Bootstrap 5 gutter utility classes. https://getbootstrap.com/docs/5.0/layout/gutters/"),className:C.string,cssModule:C.object,xs:Rl,sm:Rl,md:Rl,lg:Rl,xl:Rl,xxl:Rl,widths:C.array},cne={tag:"div",widths:ane};function Qn(e){const{className:t,cssModule:n,noGutters:r,tag:i,widths:o}=e,s=qe(e,sne),a=[];o.forEach((c,f)=>{let h=e[c];if(delete s[c],!h)return;const p=!f;a.push(p?`row-cols-${h}`:`row-cols-${c}-${h}`)});const l=Fe(me(t,r?"gx-0":null,"row",a),n);return U.createElement(i,$e({},s,{className:l}))}Qn.propTypes=lne;Qn.defaultProps=cne;const une=["className","cssModule","widths","tag"],e6=["xs","sm","md","lg","xl","xxl"],p3=C.oneOfType([C.number,C.string]),Nl=C.oneOfType([C.bool,C.number,C.string,C.shape({size:C.oneOfType([C.bool,C.number,C.string]),order:p3,offset:p3})]),fne={tag:Pe,xs:Nl,sm:Nl,md:Nl,lg:Nl,xl:Nl,xxl:Nl,className:C.string,cssModule:C.object,widths:C.array},dne={tag:"div",widths:e6},m3=(e,t,n)=>n===!0||n===""?e?"col":`col-${t}`:n==="auto"?e?"col-auto":`col-${t}-auto`:e?`col-${n}`:`col-${t}-${n}`,hne=(e,t,n=e6)=>{const r=e,i=[];return n.forEach((o,s)=>{let a=r[o];if(delete r[o],!a&&a!=="")return;const l=!s;if(iv(a)){const c=l?"-":`-${o}-`,f=m3(l,o,a.size);i.push(Fe(me({[f]:a.size||a.size==="",[`order${c}${a.order}`]:a.order||a.order===0,[`offset${c}${a.offset}`]:a.offset||a.offset===0}),t))}else{const c=m3(l,o,a);i.push(c)}}),{colClasses:i,modifiedAttributes:r}};function zC(e){const{className:t,cssModule:n,widths:r,tag:i}=e,o=qe(e,une);let{modifiedAttributes:s,colClasses:a}=hne(o,n,r);a.length||a.push("col");const l=Fe(me(t,a),n);return U.createElement(i,$e({},s,{className:l}))}zC.propTypes=fne;zC.defaultProps=dne;const pne=["expand","className","cssModule","light","dark","fixed","sticky","color","container","tag","children"],mne={children:C.node,className:C.string,color:C.string,container:C.oneOfType([C.bool,C.string]),cssModule:C.object,dark:C.bool,expand:C.oneOfType([C.bool,C.string]),fixed:C.string,full:C.bool,light:C.bool,role:C.string,sticky:C.string,tag:Pe},gne={tag:"nav",expand:!1,container:"fluid"},vne=e=>e===!1?!1:e===!0||e==="xs"?"navbar-expand":`navbar-expand-${e}`;function UC(e){const{expand:t,className:n,cssModule:r,light:i,dark:o,fixed:s,sticky:a,color:l,container:c,tag:f,children:h}=e,p=qe(e,pne),m=Fe(me(n,"navbar",vne(t),{"navbar-light":i,"navbar-dark":o,[`bg-${l}`]:l,[`fixed-${s}`]:s,[`sticky-${a}`]:a}),r),v=c&&c===!0?"container":`container-${c}`;return U.createElement(f,$e({},p,{className:m}),c?U.createElement("div",{className:v},h):h)}UC.propTypes=mne;UC.defaultProps=gne;const yne=["className","cssModule","tag"],_ne={className:C.string,cssModule:C.object,tag:Pe},bne={tag:"a"};function VC(e){const{className:t,cssModule:n,tag:r}=e,i=qe(e,yne),o=Fe(me(t,"navbar-brand"),n);return U.createElement(r,$e({},i,{className:o}))}VC.propTypes=_ne;VC.defaultProps=bne;C.string,C.object,C.bool;const wne=["className","cssModule","children","tag"],xne={className:C.string,cssModule:C.object,tag:Pe,type:C.string,children:C.node},Sne={tag:"button",type:"button"};function HC(e){const{className:t,cssModule:n,children:r,tag:i}=e,o=qe(e,wne),s=Fe(me(t,"navbar-toggler"),n);return U.createElement(i,$e({"aria-label":"Toggle navigation"},o,{className:s}),r||U.createElement("span",{className:Fe("navbar-toggler-icon",n)}))}HC.propTypes=xne;HC.defaultProps=Sne;const Cne=["className","cssModule","tabs","pills","vertical","horizontal","justified","fill","navbar","card","tag"],Ene={card:C.bool,className:C.string,cssModule:C.object,fill:C.bool,horizontal:C.oneOf(["center","end"]),justified:C.bool,navbar:C.bool,pills:C.bool,tabs:C.bool,tag:Pe,vertical:C.oneOfType([C.bool,C.string])},Tne={tag:"ul",vertical:!1},One=e=>e===!1?!1:e===!0||e==="xs"?"flex-column":`flex-${e}-column`;function f_(e){const{className:t,cssModule:n,tabs:r,pills:i,vertical:o,horizontal:s,justified:a,fill:l,navbar:c,card:f,tag:h}=e,p=qe(e,Cne),m=Fe(me(t,c?"navbar-nav":"nav",s?`justify-content-${s}`:!1,One(o),{"nav-tabs":r,"card-header-tabs":f&&r,"nav-pills":i,"card-header-pills":f&&i,"nav-justified":a,"nav-fill":l}),n);return U.createElement(h,$e({},p,{className:m}))}f_.propTypes=Ene;f_.defaultProps=Tne;const Pne=["className","cssModule","active","tag"],kne={active:C.bool,className:C.string,cssModule:C.object,tag:Pe},Mne={tag:"li"};function WC(e){const{className:t,cssModule:n,active:r,tag:i}=e,o=qe(e,Pne),s=Fe(me(t,"nav-item",r?"active":!1),n);return U.createElement(i,$e({},o,{className:s}))}WC.propTypes=kne;WC.defaultProps=Mne;const Rne=["className","cssModule","active","tag","innerRef"],Nne={active:C.bool,className:C.string,cssModule:C.object,disabled:C.bool,href:C.any,innerRef:C.oneOfType([C.object,C.func,C.string]),onClick:C.func,tag:Pe},Lne={tag:"a"};class YC extends U.Component{constructor(t){super(t),this.onClick=this.onClick.bind(this)}onClick(t){if(this.props.disabled){t.preventDefault();return}this.props.href==="#"&&t.preventDefault(),this.props.onClick&&this.props.onClick(t)}render(){let t=this.props,{className:n,cssModule:r,active:i,tag:o,innerRef:s}=t,a=qe(t,Rne);const l=Fe(me(n,"nav-link",{disabled:a.disabled,active:i}),r);return U.createElement(o,$e({},a,{ref:s,onClick:this.onClick,className:l}))}}YC.propTypes=Nne;YC.defaultProps=Lne;var t6=YC;C.string,C.node,C.string,C.object,C.string;C.bool,C.string,C.object;const Dne=["className","cssModule","variant","innerRef"],Ane={active:C.bool,"aria-label":C.string,onClick:C.func,variant:C.oneOf(["white"]),className:C.string,cssModule:C.object,innerRef:C.oneOfType([C.object,C.string,C.func])},jne={"aria-label":"close"};function qC(e){const{className:t,cssModule:n,variant:r,innerRef:i}=e,o=qe(e,Dne),s=Fe(me(t,"btn-close",r&&`btn-close-${r}`));return U.createElement("button",$e({ref:i,type:"button",className:s},o))}qC.propTypes=Ane;qC.defaultProps=jne;const Ine=["active","aria-label","block","className","close","cssModule","color","outline","size","tag","innerRef"],Fne={active:C.bool,"aria-label":C.string,block:C.bool,children:C.node,className:C.string,cssModule:C.object,close:C.bool,color:C.string,disabled:C.bool,innerRef:C.oneOfType([C.object,C.func,C.string]),onClick:C.func,outline:C.bool,size:C.string,tag:Pe},$ne={color:"secondary",tag:"button"};function ht(e){const t=V.useCallback(x=>{if(e.disabled){x.preventDefault();return}if(e.onClick)return e.onClick(x)},[e.onClick,e.disabled]);let{active:n,"aria-label":r,block:i,className:o,close:s,cssModule:a,color:l,outline:c,size:f,tag:h,innerRef:p}=e,m=qe(e,Ine);if(s)return U.createElement(qC,m);const v=`btn${c?"-outline":""}-${l}`,y=Fe(me(o,"btn",v,f?`btn-${f}`:!1,i?"d-block w-100":!1,{active:n,disabled:e.disabled}),a);return m.href&&h==="button"&&(h="a"),U.createElement(h,$e({type:h==="button"&&m.onClick?"button":void 0},m,{className:y,ref:p,onClick:t,"aria-label":r}))}ht.propTypes=Fne;ht.defaultProps=$ne;C.func,C.func,C.func,C.bool,C.string,C.object;const _d=U.createContext({}),n6=U.createContext({}),Bne=["className","cssModule","direction","isOpen","group","size","nav","setActiveFromChild","active","tag","menuRole"],zne={a11y:C.bool,disabled:C.bool,direction:C.oneOf(["up","down","start","end","left","right"]),group:C.bool,isOpen:C.bool,nav:C.bool,active:C.bool,size:C.string,tag:Pe,toggle:C.func,children:C.node,className:C.string,cssModule:C.object,dropup:C.bool,inNavbar:C.bool,setActiveFromChild:C.bool,menuRole:C.oneOf(["listbox","menu"])},Une={a11y:!0,isOpen:!1,direction:"down",nav:!1,active:!1,inNavbar:!1,setActiveFromChild:!1},Vne=[mt.space,mt.enter,mt.up,mt.down,mt.end,mt.home];class d_ extends U.Component{constructor(t){super(t),this.addEvents=this.addEvents.bind(this),this.handleDocumentClick=this.handleDocumentClick.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.removeEvents=this.removeEvents.bind(this),this.toggle=this.toggle.bind(this),this.handleMenuRef=this.handleMenuRef.bind(this),this.handleToggleRef=this.handleToggleRef.bind(this),this.containerRef=U.createRef(),this.menuRef=U.createRef(),this.toggleRef=U.createRef()}componentDidMount(){this.handleProps()}componentDidUpdate(t){this.props.isOpen!==t.isOpen&&this.handleProps()}componentWillUnmount(){this.removeEvents()}handleMenuRef(t){this.menuRef.current=t}handleToggleRef(t){this.toggleRef.current=t}handleDocumentClick(t){if(t&&(t.which===3||t.type==="keyup"&&t.which!==mt.tab))return;const n=this.getContainer(),r=this.getMenu(),i=this.getToggle(),o=t.target===i,s=r&&r.contains(t.target)&&r!==t.target;let a=!1;n&&(a=n.classList.contains("input-group")&&n.classList.contains("dropdown")&&t.target.tagName==="INPUT"),!((o&&!a||s)&&(t.type!=="keyup"||t.which===mt.tab))&&this.toggle(t)}handleKeyDown(t){const n=t.target.getAttribute("role")==="menuitem"||t.target.getAttribute("role")==="option",r=this.getMenuCtrl()===t.target,i=mt.tab===t.which;if(!(/input|textarea/i.test(t.target.tagName)||i&&!this.props.a11y||i&&!(n||r))&&((Vne.indexOf(t.which)!==-1||t.which>=48&&t.which<=90)&&t.preventDefault(),!this.props.disabled&&(r&&([mt.space,mt.enter,mt.up,mt.down].indexOf(t.which)>-1?(this.props.isOpen||this.toggle(t),setTimeout(()=>this.getMenuItems()[0].focus())):this.props.isOpen&&i?(t.preventDefault(),this.getMenuItems()[0].focus()):this.props.isOpen&&t.which===mt.esc&&this.toggle(t)),this.props.isOpen&&n))){if([mt.tab,mt.esc].indexOf(t.which)>-1)this.toggle(t),this.getMenuCtrl().focus();else if([mt.space,mt.enter].indexOf(t.which)>-1)t.target.click(),this.getMenuCtrl().focus();else if([mt.down,mt.up].indexOf(t.which)>-1||[mt.n,mt.p].indexOf(t.which)>-1&&t.ctrlKey){const o=this.getMenuItems();let s=o.indexOf(t.target);mt.up===t.which||mt.p===t.which&&t.ctrlKey?s=s!==0?s-1:o.length-1:(mt.down===t.which||mt.n===t.which&&t.ctrlKey)&&(s=s===o.length-1?0:s+1),o[s].focus()}else if(mt.end===t.which){const o=this.getMenuItems();o[o.length-1].focus()}else if(mt.home===t.which)this.getMenuItems()[0].focus();else if(t.which>=48&&t.which<=90){const o=this.getMenuItems(),s=String.fromCharCode(t.which).toLowerCase();for(let a=0;adocument.addEventListener(t,this.handleDocumentClick,!0))}removeEvents(){["click","touchstart","keyup"].forEach(t=>document.removeEventListener(t,this.handleDocumentClick,!0))}toggle(t){return this.props.disabled?t&&t.preventDefault():this.props.toggle(t)}render(){const t=Cr(this.props,["toggle","disabled","inNavbar","a11y"]),{className:n,cssModule:r,direction:i,isOpen:o,group:s,size:a,nav:l,setActiveFromChild:c,active:f,tag:h,menuRole:p}=t,m=qe(t,Bne),v=h||(l?"li":"div");let y=!1;c&&U.Children.map(this.props.children[1].props.children,_=>{_&&_.props.active&&(y=!0)});const x=Fe(me(n,l&&f?"active":!1,c&&y?"active":!1,{"btn-group":s,[`btn-group-${a}`]:!!a,dropdown:!s,dropup:i==="up",dropstart:i==="start"||i==="left",dropend:i==="end"||i==="right",show:o,"nav-item":l}),r);return this.context.insideInputGroup?U.createElement(_d.Provider,{value:this.getContextValue()},U.createElement(QM,null,U.Children.map(this.props.children,_=>U.cloneElement(_,{onKeyDown:this.handleKeyDown})))):U.createElement(_d.Provider,{value:this.getContextValue()},U.createElement(QM,null,U.createElement(v,$e({},m,{[typeof v=="string"?"ref":"innerRef"]:this.containerRef,onKeyDown:this.handleKeyDown,className:x}))))}}d_.propTypes=zne;d_.defaultProps=Une;d_.contextType=n6;var tu=d_;const Hne={children:C.node};function h_(e){return U.createElement(tu,$e({group:!0},e))}h_.propTypes=Hne;C.string,C.string,C.object,C.string,C.string,C.bool;C.string,C.string,C.object,C.string;const Wne=["className","cssModule","divider","tag","header","active","text"],Yne={children:C.node,active:C.bool,disabled:C.bool,divider:C.bool,tag:Pe,header:C.bool,onClick:C.func,className:C.string,cssModule:C.object,toggle:C.bool,text:C.bool},qne={tag:"button",toggle:!0};class p_ extends U.Component{constructor(t){super(t),this.onClick=this.onClick.bind(this),this.getTabIndex=this.getTabIndex.bind(this)}onClick(t){const{disabled:n,header:r,divider:i,text:o}=this.props;if(n||r||i||o){t.preventDefault();return}this.props.onClick&&this.props.onClick(t),this.props.toggle&&this.context.toggle(t)}getRole(){return this.context.menuRole==="listbox"?"option":"menuitem"}getTabIndex(){const{disabled:t,header:n,divider:r,text:i}=this.props;return t||n||r||i?"-1":"0"}render(){const t=this.getTabIndex(),n=t>-1?this.getRole():void 0;let r=Cr(this.props,["toggle"]),{className:i,cssModule:o,divider:s,tag:a,header:l,active:c,text:f}=r,h=qe(r,Wne);const p=Fe(me(i,{disabled:h.disabled,"dropdown-item":!s&&!l&&!f,active:c,"dropdown-header":l,"dropdown-divider":s,"dropdown-item-text":f}),o);return a==="button"&&(l?a="h6":s?a="div":h.href?a="a":f&&(a="span")),U.createElement(a,$e({type:a==="button"&&(h.onClick||this.props.toggle)?"button":void 0},h,{tabIndex:t,role:n,className:p,onClick:this.onClick}))}}p_.propTypes=Yne;p_.defaultProps=qne;p_.contextType=_d;var Ue=p_;const Gne=["className","cssModule","dark","end","right","tag","flip","modifiers","persist","strategy","container","updateOnSelect"],Zne={tag:Pe,children:C.node.isRequired,dark:C.bool,end:C.bool,flip:C.bool,modifiers:C.array,className:C.string,cssModule:C.object,style:C.object,persist:C.bool,strategy:C.string,container:Bs,updateOnSelect:C.bool,right:KI(C.bool,'Please use "end" instead.')},Kne={tag:"div",flip:!0,modifiers:[]},Xne={up:"top",left:"left",right:"right",start:"left",end:"right",down:"bottom"};class m_ extends U.Component{getRole(){return this.context.menuRole==="listbox"?"listbox":"menu"}render(){const t=this.props,{className:n,cssModule:r,dark:i,end:o,right:s,tag:a,flip:l,modifiers:c,persist:f,strategy:h,container:p,updateOnSelect:m}=t,v=qe(t,Gne),y=Fe(me(n,"dropdown-menu",{"dropdown-menu-dark":i,"dropdown-menu-end":o||s,show:this.context.isOpen}),r),x=a;if(f||this.context.isOpen&&!this.context.inNavbar){const T=`${Xne[this.context.direction]||"bottom"}-${o||s?"end":"start"}`,P=[...c,{name:"flip",enabled:!!l}],k=U.createElement(WI,{placement:T,modifiers:P,strategy:h},({ref:N,style:D,placement:z,update:A})=>{let W=We(We({},this.props.style),D);const Y=J=>{N(J);const{onMenuRef:Z}=this.context;Z&&Z(J)};return U.createElement(x,$e({tabIndex:"-1",role:this.getRole(),ref:Y},v,{style:W,"aria-hidden":!this.context.isOpen,className:y,"data-popper-placement":z,onClick:()=>m&&A()}))});return p?$a.createPortal(k,Fc(p)):k}const{onMenuRef:_}=this.context;return U.createElement(x,$e({tabIndex:"-1",role:this.getRole()},v,{ref:_,"aria-hidden":!this.context.isOpen,className:y,"data-popper-placement":v.placement}))}}m_.propTypes=Zne;m_.defaultProps=Kne;m_.contextType=_d;var hl=m_;const Qne=["className","color","cssModule","caret","split","nav","tag","innerRef"],Jne={caret:C.bool,color:C.string,children:C.node,className:C.string,cssModule:C.object,disabled:C.bool,onClick:C.func,"aria-haspopup":C.bool,split:C.bool,tag:Pe,nav:C.bool,innerRef:C.oneOfType([C.object,C.string,C.func])},ere={color:"secondary","aria-haspopup":!0};class g_ extends U.Component{constructor(t){super(t),this.onClick=this.onClick.bind(this)}onClick(t){if(this.props.disabled||this.context.disabled){t.preventDefault();return}this.props.nav&&!this.props.tag&&t.preventDefault(),this.props.onClick&&this.props.onClick(t),this.context.toggle(t)}getRole(){return this.context.menuRole||this.props["aria-haspopup"]}render(){const t=this.props,{className:n,color:r,cssModule:i,caret:o,split:s,nav:a,tag:l,innerRef:c}=t,f=qe(t,Qne),h=f["aria-label"]||"Toggle Dropdown",p=Fe(me(n,{"dropdown-toggle":o||s,"dropdown-toggle-split":s,"nav-link":a}),i),m=typeof f.children<"u"?f.children:U.createElement("span",{className:"visually-hidden"},h);let v;return a&&!l?(v="a",f.href="#"):l?v=l:(v=ht,f.color=r,f.cssModule=i),this.context.inNavbar?U.createElement(v,$e({},f,{className:p,onClick:this.onClick,ref:this.context.onToggleRef,"aria-expanded":this.context.isOpen,"aria-haspopup":this.getRole(),children:m})):U.createElement(qte,{innerRef:c},({ref:y})=>{const x=_=>{y(_);const{onToggleRef:w}=this.context;w&&w(_)};return U.createElement(v,$e({},f,{[typeof v=="string"?"ref":"innerRef"]:x,className:p,onClick:this.onClick,"aria-expanded":this.context.isOpen,"aria-haspopup":this.getRole(),children:m}))})}}g_.propTypes=Jne;g_.defaultProps=ere;g_.contextType=_d;var nu=g_;const tre=["tag","baseClass","baseClassActive","className","cssModule","children","innerRef"],nre=We(We({},zo.propTypes),{},{children:C.oneOfType([C.arrayOf(C.node),C.node]),tag:Pe,baseClass:C.string,baseClassActive:C.string,className:C.string,cssModule:C.object,innerRef:C.oneOfType([C.object,C.string,C.func])}),rre=We(We({},zo.defaultProps),{},{tag:"div",baseClass:"fade",baseClassActive:"show",timeout:tl.Fade,appear:!0,enter:!0,exit:!0,in:!0});function Kt(e){const{tag:t,baseClass:n,baseClassActive:r,className:i,cssModule:o,children:s,innerRef:a}=e,l=qe(e,tre),c=ZI(l,rv),f=Cr(l,rv);return U.createElement(zo,c,h=>{const m=Fe(me(i,n,h==="entered"&&r),o);return U.createElement(t,$e({className:m},f,{ref:a}),s)})}Kt.propTypes=nre;Kt.defaultProps=rre;U.createContext({});C.node,C.string,C.object,C.bool,C.oneOfType([C.object,C.string,C.func]),C.oneOfType([C.array,C.string]).isRequired,C.func.isRequired;C.string,C.object,C.oneOfType([C.object,C.string,C.func]),C.node,C.oneOfType([C.array,C.string]),C.bool;C.node,C.string,C.object,C.oneOfType([C.object,C.string,C.func]),C.string.isRequired;C.node,C.string,C.object,C.oneOfType([C.object,C.string,C.func]);const ire=["tag","horizontal","isOpen","className","navbar","cssModule","children","innerRef"],ore=We(We({},zo.propTypes),{},{horizontal:C.bool,isOpen:C.bool,children:C.oneOfType([C.arrayOf(C.node),C.node]),tag:Pe,className:C.node,navbar:C.bool,cssModule:C.object,innerRef:C.shape({current:C.object})}),sre=We(We({},zo.defaultProps),{},{horizontal:!1,isOpen:!1,appear:!1,enter:!0,exit:!0,tag:"div",timeout:tl.Collapse}),are={[go.ENTERING]:"collapsing",[go.ENTERED]:"collapse show",[go.EXITING]:"collapsing",[go.EXITED]:"collapse"};function lre(e){return are[e]||"collapse"}class GC extends V.Component{constructor(t){super(t),this.state={dimension:null},this.nodeRef=t.innerRef||U.createRef(),["onEntering","onEntered","onExit","onExiting","onExited"].forEach(n=>{this[n]=this[n].bind(this)})}onEntering(t,n){const r=this.getNode();this.setState({dimension:this.getDimension(r)}),this.props.onEntering(r,n)}onEntered(t,n){const r=this.getNode();this.setState({dimension:null}),this.props.onEntered(r,n)}onExit(){const t=this.getNode();this.setState({dimension:this.getDimension(t)}),this.props.onExit(t)}onExiting(){const t=this.getNode();this.getDimension(t),this.setState({dimension:0}),this.props.onExiting(t)}onExited(){const t=this.getNode();this.setState({dimension:null}),this.props.onExited(t)}getNode(){return this.nodeRef.current}getDimension(t){return this.props.horizontal?t.scrollWidth:t.scrollHeight}render(){const t=this.props,{tag:n,horizontal:r,isOpen:i,className:o,navbar:s,cssModule:a,children:l,innerRef:c}=t,f=qe(t,ire),{dimension:h}=this.state,p=ZI(f,rv),m=Cr(f,rv);return U.createElement(zo,$e({},p,{in:i,nodeRef:this.nodeRef,onEntering:this.onEntering,onEntered:this.onEntered,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}),v=>{let y=lre(v);const x=Fe(me(o,r&&"collapse-horizontal",y,s&&"navbar-collapse"),a),_=h===null?null:{[r?"width":"height"]:h};return U.createElement(n,$e({},m,{style:We(We({},m.style),_),className:x,ref:this.nodeRef}),l)})}}GC.propTypes=ore;GC.defaultProps=sre;var r6=GC;C.string.isRequired,C.string,C.node,C.object,C.oneOfType([C.object,C.string,C.func]);C.node,C.string,C.string,C.object,C.oneOfType([C.object,C.func,C.string]),C.bool;const cre=["className","cssModule","color","body","inverse","outline","tag","innerRef"],ure={body:C.bool,className:C.string,color:C.string,cssModule:C.object,innerRef:C.oneOfType([C.object,C.string,C.func]),inverse:C.bool,outline:C.bool,tag:Pe},fre={tag:"div"};function Sr(e){const{className:t,cssModule:n,color:r,body:i,inverse:o,outline:s,tag:a,innerRef:l}=e,c=qe(e,cre),f=Fe(me(t,"card",o?"text-white":!1,i?"card-body":!1,r?`${s?"border":"bg"}-${r}`:!1),n);return U.createElement(a,$e({},c,{className:f,ref:l}))}Sr.propTypes=ure;Sr.defaultProps=fre;C.string,C.object;C.string,C.object;C.string,C.object;const dre=["className","cssModule","innerRef","tag"],hre={className:C.string,cssModule:C.object,innerRef:C.oneOfType([C.object,C.string,C.func]),tag:Pe},pre={tag:"div"};function nl(e){const{className:t,cssModule:n,innerRef:r,tag:i}=e,o=qe(e,dre),s=Fe(me(t,"card-body"),n);return U.createElement(i,$e({},o,{className:s,ref:r}))}nl.propTypes=hre;nl.defaultProps=pre;C.oneOfType([C.object,C.func,C.string]),C.string,C.object;const mre=["className","cssModule","tag"],gre={className:C.string,cssModule:C.object,tag:Pe},vre={tag:"div"};function ZC(e){const{className:t,cssModule:n,tag:r}=e,i=qe(e,mre),o=Fe(me(t,"card-footer"),n);return U.createElement(r,$e({},i,{className:o}))}ZC.propTypes=gre;ZC.defaultProps=vre;const yre=["className","cssModule","tag"],_re={className:C.string,cssModule:C.object,tag:Pe},bre={tag:"div"};function rl(e){const{className:t,cssModule:n,tag:r}=e,i=qe(e,yre),o=Fe(me(t,"card-header"),n);return U.createElement(r,$e({},i,{className:o}))}rl.propTypes=_re;rl.defaultProps=bre;C.bool,C.string,C.object,C.bool;C.string,C.object;const dm=U.createContext({}),wre=["in","children","cssModule","slide","tag","className"];class v_ extends U.Component{constructor(t){super(t),this.state={startAnimation:!1},this.onEnter=this.onEnter.bind(this),this.onEntering=this.onEntering.bind(this),this.onExit=this.onExit.bind(this),this.onExiting=this.onExiting.bind(this),this.onExited=this.onExited.bind(this)}onEnter(t,n){this.setState({startAnimation:!1}),this.props.onEnter(t,n)}onEntering(t,n){const{offsetHeight:r}=t;return this.setState({startAnimation:!0}),this.props.onEntering(t,n),r}onExit(t){this.setState({startAnimation:!1}),this.props.onExit(t)}onExiting(t){this.setState({startAnimation:!0}),t.dispatchEvent(new CustomEvent("slide.bs.carousel")),this.props.onExiting(t)}onExited(t){t.dispatchEvent(new CustomEvent("slid.bs.carousel")),this.props.onExited(t)}render(){const t=this.props,{in:n,children:r,cssModule:i,slide:o,tag:s,className:a}=t,l=qe(t,wre);return U.createElement(zo,$e({},l,{enter:o,exit:o,in:n,onEnter:this.onEnter,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}),c=>{const{direction:f}=this.context,h=c===go.ENTERED||c===go.EXITING,p=(c===go.ENTERING||c===go.EXITING)&&this.state.startAnimation&&(f==="end"?"carousel-item-start":"carousel-item-end"),m=c===go.ENTERING&&(f==="end"?"carousel-item-next":"carousel-item-prev"),v=Fe(me(a,"carousel-item",h&&"active",p,m),i);return U.createElement(s,{className:v},r)})}}v_.propTypes=We(We({},zo.propTypes),{},{tag:Pe,in:C.bool,cssModule:C.object,children:C.node,slide:C.bool,className:C.string});v_.defaultProps=We(We({},zo.defaultProps),{},{tag:"div",timeout:tl.Carousel,slide:!0});v_.contextType=dm;var i6=v_;const xre=40,o6={activeIndex:C.number,next:C.func.isRequired,previous:C.func.isRequired,keyboard:C.bool,pause:C.oneOf(["hover",!1]),ride:C.oneOf(["carousel"]),interval:C.oneOfType([C.number,C.string,C.bool]),children:C.array,mouseEnter:C.func,mouseLeave:C.func,slide:C.bool,dark:C.bool,fade:C.bool,cssModule:C.object,className:C.string,enableTouch:C.bool},Sre=Object.keys(o6),Cre={interval:5e3,pause:"hover",keyboard:!0,slide:!0,enableTouch:!0,fade:!1};class KC extends U.Component{constructor(t){super(t),this.handleKeyPress=this.handleKeyPress.bind(this),this.renderItems=this.renderItems.bind(this),this.hoverStart=this.hoverStart.bind(this),this.hoverEnd=this.hoverEnd.bind(this),this.handleTouchStart=this.handleTouchStart.bind(this),this.handleTouchEnd=this.handleTouchEnd.bind(this),this.touchStartX=0,this.touchStartY=0,this.state={activeIndex:this.props.activeIndex,direction:"end",indicatorClicked:!1}}componentDidMount(){this.props.ride==="carousel"&&this.setInterval(),document.addEventListener("keyup",this.handleKeyPress)}static getDerivedStateFromProps(t,n){let r=null,{activeIndex:i,direction:o,indicatorClicked:s}=n;return t.activeIndex!==i&&(t.activeIndex===i+1?o="end":t.activeIndex===i-1?o="start":t.activeIndex{this.props.next()},parseInt(this.props.interval,10)))}clearInterval(){clearInterval(this.cycleInterval)}hoverStart(...t){this.props.pause==="hover"&&this.clearInterval(),this.props.mouseEnter&&this.props.mouseEnter(...t)}hoverEnd(...t){this.props.pause==="hover"&&this.setInterval(),this.props.mouseLeave&&this.props.mouseLeave(...t)}renderItems(t,n){const{slide:r}=this.props;return U.createElement("div",{className:n},t.map((i,o)=>{const s=o===this.state.activeIndex;return U.cloneElement(i,{in:s,slide:r})}))}render(){const{cssModule:t,slide:n,className:r,dark:i,fade:o}=this.props,s=Cr(this.props,Sre),a=Fe(me(r,"carousel",o&&"carousel-fade",n&&"slide",i&&"carousel-dark"),t),l=Fe(me("carousel-inner"),t),c=this.props.children.filter(_=>_!=null&&typeof _!="boolean");if(c.every(_=>_.type===i6))return U.createElement("div",$e({},s,{className:a,onMouseEnter:this.hoverStart,onMouseLeave:this.hoverEnd}),U.createElement(dm.Provider,{value:this.getContextValue()},this.renderItems(c,l)));if(c[0]instanceof Array){const _=c[0],w=c[1],S=c[2];return U.createElement("div",$e({},s,{className:a,onMouseEnter:this.hoverStart,onMouseLeave:this.hoverEnd}),U.createElement(dm.Provider,{value:this.getContextValue()},this.renderItems(_,l),w,S))}const h=c[0],p=_=>{typeof h.props.onClickHandler=="function"&&this.setState({indicatorClicked:!0},()=>h.props.onClickHandler(_))},m=U.cloneElement(h,{onClickHandler:p}),v=c[1],y=c[2],x=c[3];return U.createElement("div",$e({},s,{className:a,onMouseEnter:this.hoverStart,onMouseLeave:this.hoverEnd,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd}),U.createElement(dm.Provider,{value:this.getContextValue()},m,this.renderItems(v,l),y,x))}}KC.propTypes=o6;KC.defaultProps=Cre;var Ere=KC;const Tre=["direction","onClickHandler","cssModule","directionText","className"];function $w(e){const{direction:t,onClickHandler:n,cssModule:r,directionText:i,className:o}=e,s=qe(e,Tre),a=Fe(me(o,`carousel-control-${t}`),r),l=Fe(me(`carousel-control-${t}-icon`),r),c=Fe(me("visually-hidden"),r);return U.createElement("a",$e({},s,{className:a,style:{cursor:"pointer"},role:"button",tabIndex:"0",onClick:f=>{f.preventDefault(),n()}}),U.createElement("span",{className:l,"aria-hidden":"true"}),U.createElement("span",{className:c},i||t))}$w.propTypes={direction:C.oneOf(["prev","next"]).isRequired,onClickHandler:C.func.isRequired,cssModule:C.object,directionText:C.string,className:C.string};const Ore=["items","activeIndex","cssModule","onClickHandler","className"];function s6(e){const{items:t,activeIndex:n,cssModule:r,onClickHandler:i,className:o}=e,s=qe(e,Ore),a=Fe(me(o,"carousel-indicators"),r),l=t.map((c,f)=>{const h=Fe(me({active:n===f}),r);return U.createElement("button",{"aria-label":c.caption,"data-bs-target":!0,type:"button",key:`${c.key||Object.values(c).join("")}`,onClick:p=>{p.preventDefault(),i(f)},className:h})});return U.createElement("div",$e({className:a},s),l)}s6.propTypes={activeIndex:C.number.isRequired,className:C.string,cssModule:C.object,items:C.array.isRequired,onClickHandler:C.func.isRequired};function a6(e){const{captionHeader:t,captionText:n,cssModule:r,className:i}=e,o=Fe(me(i,"carousel-caption","d-none","d-md-block"),r);return U.createElement("div",{className:o},U.createElement("h3",null,t),U.createElement("p",null,n))}a6.propTypes={captionHeader:C.node,captionText:C.node.isRequired,className:C.string,cssModule:C.object};const Pre=["defaultActiveIndex","autoPlay","indicators","controls","items","goToIndex"],kre={items:C.array.isRequired,indicators:C.bool,controls:C.bool,autoPlay:C.bool,defaultActiveIndex:C.number,activeIndex:C.number,next:C.func,previous:C.func,goToIndex:C.func};class l6 extends V.Component{constructor(t){super(t),this.animating=!1,this.state={activeIndex:t.defaultActiveIndex||0},this.next=this.next.bind(this),this.previous=this.previous.bind(this),this.goToIndex=this.goToIndex.bind(this),this.onExiting=this.onExiting.bind(this),this.onExited=this.onExited.bind(this)}onExiting(){this.animating=!0}onExited(){this.animating=!1}next(){this.animating||this.setState(t=>({activeIndex:t.activeIndex===this.props.items.length-1?0:t.activeIndex+1}))}previous(){this.animating||this.setState(t=>({activeIndex:t.activeIndex===0?this.props.items.length-1:t.activeIndex-1}))}goToIndex(t){this.animating||this.setState({activeIndex:t})}render(){const t=this.props,{defaultActiveIndex:n,autoPlay:r,indicators:i,controls:o,items:s,goToIndex:a}=t,l=qe(t,Pre),{activeIndex:c}=this.state,f=s.map(h=>{const p=h.key||h.src;return U.createElement(i6,{onExiting:this.onExiting,onExited:this.onExited,key:p},U.createElement("img",{className:"d-block w-100",src:h.src,alt:h.altText}),U.createElement(a6,{captionText:h.caption,captionHeader:h.header||h.caption}))});return U.createElement(Ere,$e({activeIndex:c,next:this.next,previous:this.previous,ride:r?"carousel":void 0},l),i&&U.createElement(s6,{items:s,activeIndex:l.activeIndex||c,onClickHandler:a||this.goToIndex}),f,o&&U.createElement($w,{direction:"prev",directionText:"Previous",onClickHandler:l.previous||this.previous}),o&&U.createElement($w,{direction:"next",directionText:"Next",onClickHandler:l.next||this.next}))}}l6.propTypes=kre;l6.defaultProps={controls:!0,indicators:!0,autoPlay:!0};C.string,C.object;const Mre=["className","cssModule","tag"],Rre={className:C.string,cssModule:C.object,tag:Pe},Nre={tag:"p"};function XC(e){const{className:t,cssModule:n,tag:r}=e,i=qe(e,Mre),o=Fe(me(t,"card-text"),n);return U.createElement(r,$e({},i,{className:o}))}XC.propTypes=Rre;XC.defaultProps=Nre;const Lre=["className","cssModule","tag"],Dre={className:C.string,cssModule:C.object,tag:Pe},Are={tag:"div"};function QC(e){const{className:t,cssModule:n,tag:r}=e,i=qe(e,Lre),o=Fe(me(t,"card-title"),n);return U.createElement(r,$e({},i,{className:o}))}QC.propTypes=Dre;QC.defaultProps=Are;const jre=["cssModule","children","isOpen","flip","target","offset","fallbackPlacements","placementPrefix","arrowClassName","hideArrow","popperClassName","tag","container","modifiers","strategy","boundariesElement","onClosed","fade","transition","placement"];function Ire(){}const Fre={children:C.oneOfType([C.node,C.func]).isRequired,popperClassName:C.string,placement:C.string,placementPrefix:C.string,arrowClassName:C.string,hideArrow:C.bool,tag:Pe,isOpen:C.bool,cssModule:C.object,offset:C.arrayOf(C.number),fallbackPlacements:C.array,flip:C.bool,container:Bs,target:Bs.isRequired,modifiers:C.array,strategy:C.string,boundariesElement:C.oneOfType([C.string,$C]),onClosed:C.func,fade:C.bool,transition:C.shape(Kt.propTypes)},$re={boundariesElement:"scrollParent",placement:"auto",hideArrow:!1,isOpen:!1,offset:[0,0],flip:!0,container:"body",modifiers:[],onClosed:Ire,fade:!0,transition:We({},Kt.defaultProps)};class JC extends U.Component{constructor(t){super(t),this.setTargetNode=this.setTargetNode.bind(this),this.getTargetNode=this.getTargetNode.bind(this),this.getRef=this.getRef.bind(this),this.onClosed=this.onClosed.bind(this),this.state={isOpen:t.isOpen}}static getDerivedStateFromProps(t,n){return t.isOpen&&!n.isOpen?{isOpen:t.isOpen}:null}componentDidUpdate(){this._element&&this._element.childNodes&&this._element.childNodes[0]&&this._element.childNodes[0].focus&&this._element.childNodes[0].focus()}onClosed(){this.props.onClosed(),this.setState({isOpen:!1})}getTargetNode(){return this.targetNode}getContainerNode(){return Fc(this.props.container)}getRef(t){this._element=t}setTargetNode(t){this.targetNode=typeof t=="string"?Fc(t):t}renderChildren(){const t=this.props,{cssModule:n,children:r,isOpen:i,flip:o,target:s,offset:a,fallbackPlacements:l,placementPrefix:c,arrowClassName:f,hideArrow:h,popperClassName:p,tag:m,container:v,modifiers:y,strategy:x,boundariesElement:_,onClosed:w,fade:S,transition:T,placement:P}=t,k=qe(t,jre),N=Fe(me("arrow",f),n),D=Fe(me(p,c?`${c}-auto`:""),this.props.cssModule),z=y.map(J=>J.name),W=[...[{name:"offset",options:{offset:a}},{name:"flip",enabled:o,options:{fallbackPlacements:l}},{name:"preventOverflow",options:{boundary:_}}].filter(J=>!z.includes(J.name)),...y],Y=We(We(We({},Kt.defaultProps),T),{},{baseClass:S?T.baseClass:"",timeout:S?T.timeout:0});return U.createElement(Kt,$e({},Y,k,{in:i,onExited:this.onClosed,tag:m}),U.createElement(WI,{referenceElement:this.targetNode,modifiers:W,placement:P,strategy:x},({ref:J,style:Z,placement:ee,isReferenceHidden:ie,arrowProps:oe,update:G})=>U.createElement("div",{ref:J,style:Z,className:D,"data-popper-placement":ee,"data-popper-reference-hidden":ie?"true":void 0},typeof r=="function"?r({update:G}):r,!h&&U.createElement("span",{ref:oe.ref,className:N,style:oe.style}))))}render(){return this.setTargetNode(this.props.target),this.state.isOpen?this.props.container==="inline"?this.renderChildren():$a.createPortal(U.createElement("div",{ref:this.getRef},this.renderChildren()),this.getContainerNode()):null}}JC.propTypes=Fre;JC.defaultProps=$re;var Bre=JC;C.object.isRequired;Bs.isRequired;const y_={children:C.oneOfType([C.node,C.func]),placement:C.oneOf(tne),target:Bs.isRequired,container:Bs,isOpen:C.bool,disabled:C.bool,hideArrow:C.bool,boundariesElement:C.oneOfType([C.string,$C]),className:C.string,innerClassName:C.string,arrowClassName:C.string,popperClassName:C.string,cssModule:C.object,toggle:C.func,autohide:C.bool,placementPrefix:C.string,delay:C.oneOfType([C.shape({show:C.number,hide:C.number}),C.number]),modifiers:C.array,strategy:C.string,offset:C.arrayOf(C.number),innerRef:C.oneOfType([C.func,C.string,C.object]),trigger:C.string,fade:C.bool,flip:C.bool},c6={show:0,hide:50},zre={isOpen:!1,hideArrow:!1,autohide:!1,delay:c6,toggle:function(){},trigger:"click",fade:!0};function u6(e,t){return t&&(e===t||t.contains(e))}function g3(e,t=[]){return t&&t.length&&t.filter(n=>u6(e,n))[0]}class eE extends U.Component{constructor(t){super(t),this._targets=[],this.currentTargetElement=null,this.addTargetEvents=this.addTargetEvents.bind(this),this.handleDocumentClick=this.handleDocumentClick.bind(this),this.removeTargetEvents=this.removeTargetEvents.bind(this),this.toggle=this.toggle.bind(this),this.showWithDelay=this.showWithDelay.bind(this),this.hideWithDelay=this.hideWithDelay.bind(this),this.onMouseOverTooltipContent=this.onMouseOverTooltipContent.bind(this),this.onMouseLeaveTooltipContent=this.onMouseLeaveTooltipContent.bind(this),this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.onEscKeyDown=this.onEscKeyDown.bind(this),this.getRef=this.getRef.bind(this),this.state={isOpen:t.isOpen},this._isMounted=!1}componentDidMount(){this._isMounted=!0,this.updateTarget()}componentWillUnmount(){this._isMounted=!1,this.removeTargetEvents(),this._targets=null,this.clearShowTimeout(),this.clearHideTimeout()}static getDerivedStateFromProps(t,n){return t.isOpen&&!n.isOpen?{isOpen:t.isOpen}:null}handleDocumentClick(t){const n=this.props.trigger.split(" ");n.indexOf("legacy")>-1&&(this.props.isOpen||g3(t.target,this._targets))?(this._hideTimeout&&this.clearHideTimeout(),this.props.isOpen&&!u6(t.target,this._popover)?this.hideWithDelay(t):this.props.isOpen||this.showWithDelay(t)):n.indexOf("click")>-1&&g3(t.target,this._targets)&&(this._hideTimeout&&this.clearHideTimeout(),this.props.isOpen?this.hideWithDelay(t):this.showWithDelay(t))}onMouseOverTooltipContent(){this.props.trigger.indexOf("hover")>-1&&!this.props.autohide&&(this._hideTimeout&&this.clearHideTimeout(),this.state.isOpen&&!this.props.isOpen&&this.toggle())}onMouseLeaveTooltipContent(t){this.props.trigger.indexOf("hover")>-1&&!this.props.autohide&&(this._showTimeout&&this.clearShowTimeout(),t.persist(),this._hideTimeout=setTimeout(this.hide.bind(this,t),this.getDelay("hide")))}onEscKeyDown(t){t.key==="Escape"&&this.hide(t)}getRef(t){const{innerRef:n}=this.props;n&&(typeof n=="function"?n(t):typeof n=="object"&&(n.current=t)),this._popover=t}getDelay(t){const{delay:n}=this.props;return typeof n=="object"?isNaN(n[t])?c6[t]:n[t]:n}getCurrentTarget(t){if(!t)return null;const n=this._targets.indexOf(t);return n>=0?this._targets[n]:this.getCurrentTarget(t.parentElement)}show(t){if(!this.props.isOpen){if(this.clearShowTimeout(),this.currentTargetElement=t?t.currentTarget||this.getCurrentTarget(t.target):null,t&&t.composedPath&&typeof t.composedPath=="function"){const n=t.composedPath();this.currentTargetElement=n&&n[0]||this.currentTargetElement}this.toggle(t)}}showWithDelay(t){this._hideTimeout&&this.clearHideTimeout(),this._showTimeout=setTimeout(this.show.bind(this,t),this.getDelay("show"))}hide(t){this.props.isOpen&&(this.clearHideTimeout(),this.currentTargetElement=null,this.toggle(t))}hideWithDelay(t){this._showTimeout&&this.clearShowTimeout(),this._hideTimeout=setTimeout(this.hide.bind(this,t),this.getDelay("hide"))}clearShowTimeout(){clearTimeout(this._showTimeout),this._showTimeout=void 0}clearHideTimeout(){clearTimeout(this._hideTimeout),this._hideTimeout=void 0}addEventOnTargets(t,n,r){this._targets.forEach(i=>{i.addEventListener(t,n,r)})}removeEventOnTargets(t,n,r){this._targets.forEach(i=>{i.removeEventListener(t,n,r)})}addTargetEvents(){if(this.props.trigger){let t=this.props.trigger.split(" ");t.indexOf("manual")===-1&&((t.indexOf("click")>-1||t.indexOf("legacy")>-1)&&document.addEventListener("click",this.handleDocumentClick,!0),this._targets&&this._targets.length&&(t.indexOf("hover")>-1&&(this.addEventOnTargets("mouseover",this.showWithDelay,!0),this.addEventOnTargets("mouseout",this.hideWithDelay,!0)),t.indexOf("focus")>-1&&(this.addEventOnTargets("focusin",this.show,!0),this.addEventOnTargets("focusout",this.hide,!0)),this.addEventOnTargets("keydown",this.onEscKeyDown,!0)))}}removeTargetEvents(){this._targets&&(this.removeEventOnTargets("mouseover",this.showWithDelay,!0),this.removeEventOnTargets("mouseout",this.hideWithDelay,!0),this.removeEventOnTargets("keydown",this.onEscKeyDown,!0),this.removeEventOnTargets("focusin",this.show,!0),this.removeEventOnTargets("focusout",this.hide,!0)),document.removeEventListener("click",this.handleDocumentClick,!0)}updateTarget(){const t=Fc(this.props.target,!0);t!==this._targets&&(this.removeTargetEvents(),this._targets=t?Array.from(t):[],this.currentTargetElement=this.currentTargetElement||this._targets[0],this.addTargetEvents())}toggle(t){return this.props.disabled||!this._isMounted?t&&t.preventDefault():this.props.toggle(t)}render(){this.props.isOpen&&this.updateTarget();const t=this.currentTargetElement||this._targets[0];if(!t)return null;const{className:n,cssModule:r,innerClassName:i,isOpen:o,hideArrow:s,boundariesElement:a,placement:l,placementPrefix:c,arrowClassName:f,popperClassName:h,container:p,modifiers:m,strategy:v,offset:y,fade:x,flip:_,children:w}=this.props,S=Cr(this.props,Object.keys(y_)),T=Fe(h,r),P=Fe(i,r);return U.createElement(Bre,{className:n,target:t,isOpen:o,hideArrow:s,boundariesElement:a,placement:l,placementPrefix:c,arrowClassName:f,popperClassName:T,container:p,modifiers:m,strategy:v,offset:y,cssModule:r,fade:x,flip:_},({update:k})=>U.createElement("div",$e({},S,{ref:this.getRef,className:P,role:"tooltip",onMouseOver:this.onMouseOverTooltipContent,onMouseLeave:this.onMouseLeaveTooltipContent,onKeyDown:this.onEscKeyDown}),typeof w=="function"?w({update:k}):w))}}eE.propTypes=y_;eE.defaultProps=zre;var f6=eE;const Ure={placement:"right",placementPrefix:"bs-popover",trigger:"click",offset:[0,8]};function Kd(e){const t=me("popover","show",e.popperClassName),n=me("popover-inner",e.innerClassName);return U.createElement(f6,$e({},e,{arrowClassName:"popover-arrow",popperClassName:t,innerClassName:n}))}Kd.propTypes=y_;Kd.defaultProps=Ure;const Vre=["defaultOpen"];class Hre extends V.Component{constructor(t){super(t),this.state={isOpen:t.defaultOpen||!1},this.toggle=this.toggle.bind(this)}toggle(){this.setState(t=>({isOpen:!t.isOpen}))}render(){return U.createElement(Kd,$e({isOpen:this.state.isOpen,toggle:this.toggle},Cr(this.props,Vre)))}}Hre.propTypes=We({defaultOpen:C.bool},Kd.propTypes);C.string,C.object;C.string,C.object;const Wre=["children","className","barClassName","cssModule","value","min","max","animated","striped","color","bar","multi","tag","style","barStyle","barAriaValueText","barAriaLabelledBy"],Yre={animated:C.bool,bar:C.bool,barAriaLabelledBy:C.string,barAriaValueText:C.string,barClassName:C.string,barStyle:C.object,children:C.node,className:C.string,cssModule:C.object,color:C.string,max:C.oneOfType([C.string,C.number]),min:C.oneOfType([C.string,C.number]),multi:C.bool,striped:C.bool,style:C.object,tag:Pe,value:C.oneOfType([C.string,C.number])},qre={tag:"div",value:0,min:0,max:100,style:{},barStyle:{}};function tE(e){const{children:t,className:n,barClassName:r,cssModule:i,value:o,min:s,max:a,animated:l,striped:c,color:f,bar:h,multi:p,tag:m,style:v,barStyle:y,barAriaValueText:x,barAriaLabelledBy:_}=e,w=qe(e,Wre),S=h3(o)/h3(a)*100,T=Fe(me(n,"progress"),i),k={className:Fe(me("progress-bar",h&&n||r,l?"progress-bar-animated":null,f?`bg-${f}`:null,c||l?"progress-bar-striped":null),i),style:We(We(We({},h?v:{}),y),{},{width:`${S}%`}),role:"progressbar","aria-valuenow":o,"aria-valuemin":s,"aria-valuemax":a,"aria-valuetext":x,"aria-labelledby":_,children:t};return h?U.createElement(m,$e({},w,k)):U.createElement(m,$e({},w,{style:v,className:T}),p?t:U.createElement("div",k))}tE.propTypes=Yre;tE.defaultProps=qre;const Gre={children:C.node.isRequired,node:C.any};class d6 extends U.Component{componentWillUnmount(){this.defaultNode&&document.body.removeChild(this.defaultNode),this.defaultNode=null}render(){return BC?(!this.props.node&&!this.defaultNode&&(this.defaultNode=document.createElement("div"),document.body.appendChild(this.defaultNode)),$a.createPortal(this.props.children,this.props.node||this.defaultNode)):null}}d6.propTypes=Gre;var h6=d6;function sv(){}const v3=C.shape(Kt.propTypes),p6={autoFocus:C.bool,backdrop:C.oneOfType([C.bool,C.oneOf(["static"])]),backdropClassName:C.string,backdropTransition:v3,centered:C.bool,children:C.node,contentClassName:C.string,className:C.string,container:Bs,cssModule:C.object,external:C.node,fade:C.bool,fullscreen:C.oneOfType([C.bool,C.oneOf(["sm","md","lg","xl"])]),innerRef:C.oneOfType([C.object,C.string,C.func]),isOpen:C.bool,keyboard:C.bool,labelledBy:C.string,modalClassName:C.string,modalTransition:v3,onClosed:C.func,onEnter:C.func,onExit:C.func,onOpened:C.func,returnFocusAfterClose:C.bool,role:C.string,scrollable:C.bool,size:C.string,toggle:C.func,trapFocus:C.bool,unmountOnClose:C.bool,wrapClassName:C.string,zIndex:C.oneOfType([C.number,C.string])},Zre=Object.keys(p6),Kre={isOpen:!1,autoFocus:!0,centered:!1,scrollable:!1,role:"dialog",backdrop:!0,keyboard:!0,zIndex:1050,fade:!0,onOpened:sv,onClosed:sv,modalTransition:{timeout:tl.Modal},backdropTransition:{mountOnEnter:!0,timeout:tl.Fade},unmountOnClose:!0,returnFocusAfterClose:!0,container:"body",trapFocus:!1};class zn extends U.Component{constructor(t){super(t),this._element=null,this._originalBodyPadding=null,this.getFocusableChildren=this.getFocusableChildren.bind(this),this.handleBackdropClick=this.handleBackdropClick.bind(this),this.handleBackdropMouseDown=this.handleBackdropMouseDown.bind(this),this.handleEscape=this.handleEscape.bind(this),this.handleStaticBackdropAnimation=this.handleStaticBackdropAnimation.bind(this),this.handleTab=this.handleTab.bind(this),this.onOpened=this.onOpened.bind(this),this.onClosed=this.onClosed.bind(this),this.manageFocusAfterClose=this.manageFocusAfterClose.bind(this),this.clearBackdropAnimationTimeout=this.clearBackdropAnimationTimeout.bind(this),this.trapFocus=this.trapFocus.bind(this),this.state={isOpen:!1,showStaticBackdropAnimation:!1}}componentDidMount(){const{isOpen:t,autoFocus:n,onEnter:r}=this.props;t&&(this.init(),this.setState({isOpen:!0}),n&&this.setFocus()),r&&r(),document.addEventListener("focus",this.trapFocus,!0),this._isMounted=!0}componentDidUpdate(t,n){if(this.props.isOpen&&!t.isOpen){this.init(),this.setState({isOpen:!0});return}this.props.autoFocus&&this.state.isOpen&&!n.isOpen&&this.setFocus(),this._element&&t.zIndex!==this.props.zIndex&&(this._element.style.zIndex=this.props.zIndex)}componentWillUnmount(){this.clearBackdropAnimationTimeout(),this.props.onExit&&this.props.onExit(),this._element&&(this.destroy(),(this.props.isOpen||this.state.isOpen)&&this.close()),document.removeEventListener("focus",this.trapFocus,!0),this._isMounted=!1}handleBackdropClick(t){if(t.target===this._mouseDownElement){t.stopPropagation();const n=this._dialog?this._dialog.parentNode:null;if(n&&t.target===n&&this.props.backdrop==="static"&&this.handleStaticBackdropAnimation(),!this.props.isOpen||this.props.backdrop!==!0)return;n&&t.target===n&&this.props.toggle&&this.props.toggle(t)}}handleTab(t){if(t.which!==9||this.modalIndex{this.setState({showStaticBackdropAnimation:!1})},100)}onOpened(t,n){this.props.onOpened(),(this.props.modalTransition.onEntered||sv)(t,n)}onClosed(t){const{unmountOnClose:n}=this.props;this.props.onClosed(),(this.props.modalTransition.onExited||sv)(t),n&&this.destroy(),this.close(),this._isMounted&&this.setState({isOpen:!1})}setFocus(){this._dialog&&this._dialog.parentNode&&typeof this._dialog.parentNode.focus=="function"&&this._dialog.parentNode.focus()}getFocusableChildren(){return this._element.querySelectorAll(JI.join(", "))}getFocusedChild(){let t;const n=this.getFocusableChildren();try{t=document.activeElement}catch{t=n[0]}return t}trapFocus(t){if(!this.props.trapFocus||!this._element||this._dialog&&this._dialog.parentNode===t.target||this.modalIndex0&&(t.preventDefault(),t.stopPropagation(),n[0].focus())}init(){try{this._triggeringElement=document.activeElement}catch{this._triggeringElement=null}this._element||(this._element=document.createElement("div"),this._element.setAttribute("tabindex","-1"),this._element.style.position="relative",this._element.style.zIndex=this.props.zIndex,this._mountContainer=Fc(this.props.container),this._mountContainer.appendChild(this._element)),this._originalBodyPadding=qI(),zn.openCount<1&&(zn.originalBodyOverflow=window.getComputedStyle(document.body).overflow),GI(),zn.openCount===0&&(document.body.className=me(document.body.className,Fe("modal-open",this.props.cssModule)),document.body.style.overflow="hidden"),this.modalIndex=zn.openCount,zn.openCount+=1}destroy(){this._element&&(this._mountContainer.removeChild(this._element),this._element=null),this.manageFocusAfterClose()}manageFocusAfterClose(){if(this._triggeringElement){const{returnFocusAfterClose:t}=this.props;this._triggeringElement.focus&&t&&this._triggeringElement.focus(),this._triggeringElement=null}}close(){if(zn.openCount<=1){const t=Fe("modal-open",this.props.cssModule),n=new RegExp(`(^| )${t}( |$)`);document.body.className=document.body.className.replace(n," ").trim(),document.body.style.overflow=zn.originalBodyOverflow}this.manageFocusAfterClose(),zn.openCount=Math.max(0,zn.openCount-1),FC(this._originalBodyPadding)}clearBackdropAnimationTimeout(){this._backdropAnimationTimeout&&(clearTimeout(this._backdropAnimationTimeout),this._backdropAnimationTimeout=void 0)}renderModalDialog(){const t=Cr(this.props,Zre),n="modal-dialog";return U.createElement("div",$e({},t,{className:Fe(me(n,this.props.className,{[`modal-${this.props.size}`]:this.props.size,[`${n}-centered`]:this.props.centered,[`${n}-scrollable`]:this.props.scrollable,"modal-fullscreen":this.props.fullscreen===!0,[`modal-fullscreen-${this.props.fullscreen}-down`]:typeof this.props.fullscreen=="string"}),this.props.cssModule),role:"document",ref:r=>{this._dialog=r}}),U.createElement("div",{className:Fe(me("modal-content",this.props.contentClassName),this.props.cssModule)},this.props.children))}render(){const{unmountOnClose:t}=this.props;if(this._element&&(this.state.isOpen||!t)){const n=!!this._element&&!this.state.isOpen&&!t;this._element.style.display=n?"none":"block";const{wrapClassName:r,modalClassName:i,backdropClassName:o,cssModule:s,isOpen:a,backdrop:l,role:c,labelledBy:f,external:h,innerRef:p}=this.props,m={onClick:this.handleBackdropClick,onMouseDown:this.handleBackdropMouseDown,onKeyUp:this.handleEscape,onKeyDown:this.handleTab,style:{display:"block"},"aria-labelledby":f,role:c,tabIndex:"-1"},v=this.props.fade,y=We(We(We({},Kt.defaultProps),this.props.modalTransition),{},{baseClass:v?this.props.modalTransition.baseClass:"",timeout:v?this.props.modalTransition.timeout:0}),x=We(We(We({},Kt.defaultProps),this.props.backdropTransition),{},{baseClass:v?this.props.backdropTransition.baseClass:"",timeout:v?this.props.backdropTransition.timeout:0}),_=l&&(v?U.createElement(Kt,$e({},x,{in:a&&!!l,cssModule:s,className:Fe(me("modal-backdrop",o),s)})):U.createElement("div",{className:Fe(me("modal-backdrop","show",o),s)}));return U.createElement(h6,{node:this._element},U.createElement("div",{className:Fe(r)},U.createElement(Kt,$e({},m,y,{in:a,onEntered:this.onOpened,onExited:this.onClosed,cssModule:s,className:Fe(me("modal",i,this.state.showStaticBackdropAnimation&&"modal-static"),s),innerRef:p}),h,this.renderModalDialog()),_))}return null}}zn.propTypes=p6;zn.defaultProps=Kre;zn.openCount=0;zn.originalBodyOverflow=null;var Uo=zn;const Xre=["className","cssModule","children","toggle","tag","wrapTag","closeAriaLabel","close"],Qre={children:C.node,className:C.string,close:C.object,closeAriaLabel:C.string,cssModule:C.object,tag:Pe,toggle:C.func,wrapTag:Pe},Jre={tag:"h5",wrapTag:"div",closeAriaLabel:"Close"};function ro(e){let t;const{className:n,cssModule:r,children:i,toggle:o,tag:s,wrapTag:a,closeAriaLabel:l,close:c}=e,f=qe(e,Xre),h=Fe(me(n,"modal-header"),r);return!c&&o&&(t=U.createElement("button",{type:"button",onClick:o,className:Fe("btn-close",r),"aria-label":l})),U.createElement(a,$e({},f,{className:h}),U.createElement(s,{className:Fe("modal-title",r)},i),c||t)}ro.propTypes=Qre;ro.defaultProps=Jre;const eie=["className","cssModule","tag"],tie={className:C.string,cssModule:C.object,tag:Pe},nie={tag:"div"};function ki(e){const{className:t,cssModule:n,tag:r}=e,i=qe(e,eie),o=Fe(me(t,"modal-body"),n);return U.createElement(r,$e({},i,{className:o}))}ki.propTypes=tie;ki.defaultProps=nie;const rie=["className","cssModule","tag"],iie={className:C.string,cssModule:C.object,tag:Pe},oie={tag:"div"};function ea(e){const{className:t,cssModule:n,tag:r}=e,i=qe(e,rie),o=Fe(me(t,"modal-footer"),n);return U.createElement(r,$e({},i,{className:o}))}ea.propTypes=iie;ea.defaultProps=oie;const sie={placement:"top",autohide:!0,placementPrefix:"bs-tooltip",trigger:"hover focus"};function Xd(e){const t=me("tooltip","show",e.popperClassName),n=me("tooltip-inner",e.innerClassName);return U.createElement(f6,$e({},e,{arrowClassName:"tooltip-arrow",popperClassName:t,innerClassName:n}))}Xd.propTypes=y_;Xd.defaultProps=sie;C.bool,C.bool,C.string,C.object,C.bool,C.bool,C.oneOfType([C.func,C.string,C.object]),C.oneOfType([C.bool,C.string]),C.string,C.bool;const aie=["className","cssModule","tag","flush","horizontal","numbered"],lie={className:C.string,cssModule:C.object,flush:C.bool,horizontal:C.oneOfType([C.bool,C.string]),numbered:C.bool,tag:Pe},cie={tag:"ul",horizontal:!1,numbered:!1},uie=e=>e===!1?!1:e===!0||e==="xs"?"list-group-horizontal":`list-group-horizontal-${e}`;function nE(e){const{className:t,cssModule:n,tag:r,flush:i,horizontal:o,numbered:s}=e,a=qe(e,aie),l=Fe(me(t,"list-group",i?"list-group-flush":uie(o),{"list-group-numbered":s}),n);return U.createElement(r,$e({},a,{className:l}))}nE.propTypes=lie;nE.defaultProps=cie;const fie=["className","cssModule","tag","innerRef"],die={children:C.node,tag:Pe,innerRef:C.oneOfType([C.object,C.func,C.string]),className:C.string,cssModule:C.object},hie={tag:"form"};class m6 extends V.Component{constructor(t){super(t),this.getRef=this.getRef.bind(this),this.submit=this.submit.bind(this)}getRef(t){this.props.innerRef&&this.props.innerRef(t),this.ref=t}submit(){this.ref&&this.ref.submit()}render(){const t=this.props,{className:n,cssModule:r,tag:i,innerRef:o}=t,s=qe(t,fie),a=Fe(n,r);return U.createElement(i,$e({},s,{ref:o,className:a}))}}m6.propTypes=die;m6.defaultProps=hie;C.node,C.string,C.object,C.bool,C.bool;const pie=["className","cssModule","row","disabled","check","inline","floating","tag","switch"],mie={children:C.node,row:C.bool,check:C.bool,switch:C.bool,inline:C.bool,floating:C.bool,disabled:C.bool,tag:Pe,className:C.string,cssModule:C.object},gie={tag:"div"};function vr(e){const{className:t,cssModule:n,row:r,disabled:i,check:o,inline:s,floating:a,tag:l,switch:c}=e,f=qe(e,pie),h=o||c,p=Fe(me(t,r?"row":!1,h?"form-check":"mb-3",c?"form-switch":!1,h&&s?"form-check-inline":!1,h&&i?"disabled":!1,a&&"form-floating"),n);return l==="fieldset"&&(f.disabled=i),U.createElement(l,$e({},f,{className:p}))}vr.propTypes=mie;vr.defaultProps=gie;C.node,C.bool,C.string,C.string,C.object;const vie=["className","cssModule","type","bsSize","valid","invalid","tag","addon","plaintext","innerRef"],yie={children:C.node,type:C.string,size:C.oneOfType([C.number,C.string]),bsSize:C.string,valid:C.bool,invalid:C.bool,tag:Pe,innerRef:C.oneOfType([C.object,C.func,C.string]),plaintext:C.bool,addon:C.bool,className:C.string,cssModule:C.object},_ie={type:"text"};let rE=class extends U.Component{constructor(t){super(t),this.getRef=this.getRef.bind(this),this.focus=this.focus.bind(this)}getRef(t){this.props.innerRef&&this.props.innerRef(t),this.ref=t}focus(){this.ref&&this.ref.focus()}render(){let t=this.props,{className:n,cssModule:r,type:i,bsSize:o,valid:s,invalid:a,tag:l,addon:c,plaintext:f,innerRef:h}=t,p=qe(t,vie);const m=["switch","radio","checkbox"].indexOf(i)>-1,v=/\D/g,y=i==="textarea",x=i==="select",_=i==="range";let w=l||(x||y?i:"input"),S="form-control";f?(S=`${S}-plaintext`,w=l||"input"):_?S="form-range":x?S="form-select":m&&(c?S=null:S="form-check-input"),p.size&&v.test(p.size)&&(Fw(`Please use the prop "bsSize" instead of the "size" to bootstrap's input sizing.`),o=p.size,delete p.size);const T=Fe(me(n,a&&"is-invalid",s&&"is-valid",o?x?`form-select-${o}`:`form-control-${o}`:!1,S),r);return(w==="input"||l&&typeof l=="function")&&(p.type=i==="switch"?"checkbox":i),p.children&&!(f||i==="select"||typeof w!="string"||w==="select")&&(Fw(`Input with a type of "${i}" cannot have children. Please use "value"/"defaultValue" instead.`),delete p.children),U.createElement(w,$e({},p,{ref:h,className:T,"aria-invalid":a}))}};rE.propTypes=yie;rE.defaultProps=_ie;var $c=rE;const bie=["className","cssModule","tag","type","size"],wie={className:C.string,cssModule:C.object,size:C.string,tag:Pe,type:C.string},xie={tag:"div"};function Qd(e){const{className:t,cssModule:n,tag:r,type:i,size:o}=e,s=qe(e,bie),a=Fe(me(t,"input-group",o?`input-group-${o}`:null),n);return e.type==="dropdown"?U.createElement(tu,$e({},s,{className:a})):U.createElement(n6.Provider,{value:{insideInputGroup:!0}},U.createElement(r,$e({},s,{className:a})))}Qd.propTypes=wie;Qd.defaultProps=xie;C.string,C.object;const p1=C.oneOfType([C.number,C.string]),Ll=C.oneOfType([C.bool,C.string,C.number,C.shape({size:p1,order:p1,offset:p1})]);C.node,C.bool,C.bool,C.string,C.string,C.string,C.object,C.array;C.bool,C.bool,C.node,C.string,C.object,C.bool,C.bool,C.bool,C.bool,C.bool,C.bool,C.bool;function av(){}const y3=C.shape(Kt.propTypes),g6={autoFocus:C.bool,backdrop:C.bool,backdropClassName:C.string,backdropTransition:y3,children:C.node,className:C.string,container:Bs,cssModule:C.object,direction:C.oneOf(["start","end","bottom","top"]),fade:C.bool,innerRef:C.oneOfType([C.object,C.string,C.func]),isOpen:C.bool,keyboard:C.bool,labelledBy:C.string,offcanvasTransition:y3,onClosed:C.func,onEnter:C.func,onExit:C.func,style:C.object,onOpened:C.func,returnFocusAfterClose:C.bool,role:C.string,scrollable:C.bool,toggle:C.func,trapFocus:C.bool,unmountOnClose:C.bool,zIndex:C.oneOfType([C.number,C.string])},Sie=Object.keys(g6),Cie={isOpen:!1,autoFocus:!0,direction:"start",scrollable:!1,role:"dialog",backdrop:!0,keyboard:!0,zIndex:1050,fade:!0,onOpened:av,onClosed:av,offcanvasTransition:{timeout:tl.Offcanvas},backdropTransition:{mountOnEnter:!0,timeout:tl.Fade},unmountOnClose:!0,returnFocusAfterClose:!0,container:"body",trapFocus:!1};class hi extends U.Component{constructor(t){super(t),this._element=null,this._originalBodyPadding=null,this.getFocusableChildren=this.getFocusableChildren.bind(this),this.handleBackdropClick=this.handleBackdropClick.bind(this),this.handleBackdropMouseDown=this.handleBackdropMouseDown.bind(this),this.handleEscape=this.handleEscape.bind(this),this.handleTab=this.handleTab.bind(this),this.onOpened=this.onOpened.bind(this),this.onClosed=this.onClosed.bind(this),this.manageFocusAfterClose=this.manageFocusAfterClose.bind(this),this.clearBackdropAnimationTimeout=this.clearBackdropAnimationTimeout.bind(this),this.trapFocus=this.trapFocus.bind(this),this.state={isOpen:!1}}componentDidMount(){const{isOpen:t,autoFocus:n,onEnter:r}=this.props;t&&(this.init(),this.setState({isOpen:!0}),n&&this.setFocus()),r&&r(),document.addEventListener("focus",this.trapFocus,!0),this._isMounted=!0}componentDidUpdate(t,n){if(this.props.isOpen&&!t.isOpen){this.init(),this.setState({isOpen:!0});return}this.props.autoFocus&&this.state.isOpen&&!n.isOpen&&this.setFocus(),this._element&&t.zIndex!==this.props.zIndex&&(this._element.style.zIndex=this.props.zIndex)}componentWillUnmount(){this.clearBackdropAnimationTimeout(),this.props.onExit&&this.props.onExit(),this._element&&(this.destroy(),(this.props.isOpen||this.state.isOpen)&&this.close()),document.removeEventListener("focus",this.trapFocus,!0),this._isMounted=!1}handleBackdropClick(t){if(t.target===this._mouseDownElement){t.stopPropagation();const n=this._backdrop;if(!this.props.isOpen||this.props.backdrop!==!0)return;n&&t.target===n&&this.props.toggle&&this.props.toggle(t)}}handleTab(t){if(t.which!==9||this.offcanvasIndex0&&(t.preventDefault(),t.stopPropagation(),n[0].focus())}init(){try{this._triggeringElement=document.activeElement}catch{this._triggeringElement=null}this._element||(this._element=document.createElement("div"),this._element.setAttribute("tabindex","-1"),this._element.style.position="relative",this._element.style.zIndex=this.props.zIndex,this._mountContainer=Fc(this.props.container),this._mountContainer.appendChild(this._element)),this._originalBodyPadding=qI(),GI(),hi.openCount===0&&this.props.backdrop&&!this.props.scrollable&&(document.body.style.overflow="hidden"),this.offcanvasIndex=hi.openCount,hi.openCount+=1}destroy(){this._element&&(this._mountContainer.removeChild(this._element),this._element=null),this.manageFocusAfterClose()}manageFocusAfterClose(){if(this._triggeringElement){const{returnFocusAfterClose:t}=this.props;this._triggeringElement.focus&&t&&this._triggeringElement.focus(),this._triggeringElement=null}}close(){this.manageFocusAfterClose(),hi.openCount=Math.max(0,hi.openCount-1),document.body.style.overflow=null,FC(this._originalBodyPadding)}clearBackdropAnimationTimeout(){this._backdropAnimationTimeout&&(clearTimeout(this._backdropAnimationTimeout),this._backdropAnimationTimeout=void 0)}render(){const{direction:t,unmountOnClose:n}=this.props;if(this._element&&(this.state.isOpen||!n)){const r=!!this._element&&!this.state.isOpen&&!n;this._element.style.display=r?"none":"block";const{className:i,backdropClassName:o,cssModule:s,isOpen:a,backdrop:l,role:c,labelledBy:f,style:h}=this.props,p={onKeyUp:this.handleEscape,onKeyDown:this.handleTab,"aria-labelledby":f,role:c,tabIndex:"-1"},m=this.props.fade,v=We(We(We({},Kt.defaultProps),this.props.offcanvasTransition),{},{baseClass:m?this.props.offcanvasTransition.baseClass:"",timeout:m?this.props.offcanvasTransition.timeout:0}),y=We(We(We({},Kt.defaultProps),this.props.backdropTransition),{},{baseClass:m?this.props.backdropTransition.baseClass:"",timeout:m?this.props.backdropTransition.timeout:0}),x=l&&(m?U.createElement(Kt,$e({},y,{in:a&&!!l,innerRef:w=>{this._backdrop=w},cssModule:s,className:Fe(me("offcanvas-backdrop",o),s),onClick:this.handleBackdropClick,onMouseDown:this.handleBackdropMouseDown})):U.createElement("div",{className:Fe(me("offcanvas-backdrop","show",o),s),onClick:this.handleBackdropClick,onMouseDown:this.handleBackdropMouseDown})),_=Cr(this.props,Sie);return U.createElement(h6,{node:this._element},U.createElement(Kt,$e({},_,p,v,{in:a,onEntered:this.onOpened,onExited:this.onClosed,cssModule:s,className:Fe(me("offcanvas",i,`offcanvas-${t}`),s),innerRef:w=>{this._dialog=w},style:We(We({},h),{},{visibility:a?"visible":"hidden"})}),this.props.children),x)}return null}}hi.propTypes=g6;hi.defaultProps=Cie;hi.openCount=0;C.string,C.object;C.node,C.string,C.object,C.string,C.object,C.func;const Eie=["className","listClassName","cssModule","size","tag","listTag","aria-label"],Tie={children:C.node,className:C.string,listClassName:C.string,cssModule:C.object,size:C.string,tag:Pe,listTag:Pe,"aria-label":C.string},Oie={tag:"nav",listTag:"ul","aria-label":"pagination"};function __(e){const{className:t,listClassName:n,cssModule:r,size:i,tag:o,listTag:s,"aria-label":a}=e,l=qe(e,Eie),c=Fe(me(t),r),f=Fe(me(n,"pagination",{[`pagination-${i}`]:!!i}),r);return U.createElement(o,{className:c,"aria-label":a},U.createElement(s,$e({},l,{className:f})))}__.propTypes=Tie;__.defaultProps=Oie;const Pie=["active","className","cssModule","disabled","tag"],kie={active:C.bool,children:C.node,className:C.string,cssModule:C.object,disabled:C.bool,tag:Pe},Mie={tag:"li"};function ks(e){const{active:t,className:n,cssModule:r,disabled:i,tag:o}=e,s=qe(e,Pie),a=Fe(me(n,"page-item",{active:t,disabled:i}),r);return U.createElement(o,$e({},s,{className:a}))}ks.propTypes=kie;ks.defaultProps=Mie;const Rie=["className","cssModule","next","previous","first","last","tag"],Nie={"aria-label":C.string,children:C.node,className:C.string,cssModule:C.object,next:C.bool,previous:C.bool,first:C.bool,last:C.bool,tag:Pe},Lie={tag:"a"};function Ms(e){let{className:t,cssModule:n,next:r,previous:i,first:o,last:s,tag:a}=e,l=qe(e,Rie);const c=Fe(me(t,"page-link"),n);let f;i?f="Previous":r?f="Next":o?f="First":s&&(f="Last");const h=e["aria-label"]||f;let p;i?p="‹":r?p="›":o?p="«":s&&(p="»");let{children:m}=e;return m&&Array.isArray(m)&&m.length===0&&(m=null),!l.href&&a==="a"&&(a="button"),(i||r||o||s)&&(m=[U.createElement("span",{"aria-hidden":"true",key:"caret"},m||p),U.createElement("span",{className:"visually-hidden",key:"ariaLabel"},h)]),U.createElement(a,$e({},l,{className:c,"aria-label":h}),m)}Ms.propTypes=Nie;Ms.defaultProps=Lie;const Die=U.createContext({}),v6={tag:Pe,activeTab:C.any,className:C.string,cssModule:C.object},Aie={tag:"div"};class y6 extends V.Component{static getDerivedStateFromProps(t,n){return n.activeTab!==t.activeTab?{activeTab:t.activeTab}:null}constructor(t){super(t),this.state={activeTab:this.props.activeTab}}render(){const{className:t,cssModule:n,tag:r}=this.props,i=Cr(this.props,Object.keys(v6)),o=Fe(me("tab-content",t),n);return U.createElement(Die.Provider,{value:{activeTabId:this.state.activeTab}},U.createElement(r,$e({},i,{className:o})))}}y6.propTypes=v6;y6.defaultProps=Aie;C.string,C.object,C.any;const jie=["className","closeClassName","closeAriaLabel","cssModule","tag","color","isOpen","toggle","children","transition","fade","innerRef"],Iie={children:C.node,className:C.string,closeClassName:C.string,closeAriaLabel:C.string,color:C.string,cssModule:C.object,fade:C.bool,innerRef:C.oneOfType([C.object,C.string,C.func]),isOpen:C.bool,tag:Pe,toggle:C.func,transition:C.shape(Kt.propTypes)},Fie={color:"success",isOpen:!0,tag:"div",closeAriaLabel:"Close",fade:!0,transition:We(We({},Kt.defaultProps),{},{unmountOnExit:!0})};function iE(e){const{className:t,closeClassName:n,closeAriaLabel:r,cssModule:i,tag:o,color:s,isOpen:a,toggle:l,children:c,transition:f,fade:h,innerRef:p}=e,m=qe(e,jie),v=Fe(me(t,"alert",`alert-${s}`,{"alert-dismissible":l}),i),y=Fe(me("btn-close",n),i),x=We(We(We({},Kt.defaultProps),f),{},{baseClass:h?f.baseClass:"",timeout:h?f.timeout:0});return U.createElement(Kt,$e({},m,x,{tag:o,className:v,in:a,role:"alert",innerRef:p}),l?U.createElement("button",{type:"button",className:y,"aria-label":r,onClick:l}):null,c)}iE.propTypes=Iie;iE.defaultProps=Fie;C.node,C.string,C.object,C.bool,C.bool,C.shape(Kt.propTypes),C.oneOfType([C.object,C.string,C.func]);We(We({},Kt.defaultProps),{},{unmountOnExit:!0});C.string,C.object,C.oneOfType([C.object,C.string,C.func]);C.oneOfType([C.string,C.node]),C.func,C.string,C.object,C.node,C.string,C.oneOfType([C.string,C.number]),C.object,C.string;const $ie=["className","cssModule","tag","active","disabled","action","color"],Bie={action:C.bool,active:C.bool,className:C.string,cssModule:C.object,color:C.string,disabled:C.bool,tag:Pe},zie={tag:"li"},Uie=e=>{e.preventDefault()};function oE(e){const{className:t,cssModule:n,tag:r,active:i,disabled:o,action:s,color:a}=e,l=qe(e,$ie),c=Fe(me(t,i?"active":!1,o?"disabled":!1,s?"list-group-item-action":!1,a?`list-group-item-${a}`:!1,"list-group-item"),n);return o&&(l.onClick=Uie),U.createElement(r,$e({},l,{className:c}))}oE.propTypes=Bie;oE.defaultProps=zie;C.string,C.object;C.string,C.object;const Vie=["className","cssModule","tag","type"],Hie={className:C.string,cssModule:C.object,tag:Pe,type:C.string},Wie={tag:"ul"},sE=V.forwardRef((e,t)=>{const{className:n,cssModule:r,tag:i,type:o}=e,s=qe(e,Vie),a=Fe(me(n,o?`list-${o}`:!1),r);return U.createElement(i,$e({},s,{className:a,ref:t}))});sE.name="List";sE.propTypes=Hie;sE.defaultProps=Wie;const Yie=["className","cssModule","tag"],qie={className:C.string,cssModule:C.object,tag:Pe},Gie={tag:"li"},aE=V.forwardRef((e,t)=>{const{className:n,cssModule:r,tag:i}=e,o=qe(e,Yie),s=Fe(me(n,"list-inline-item"),r);return U.createElement(i,$e({},o,{className:s,ref:t}))});aE.name="ListInlineItem";aE.propTypes=qie;aE.defaultProps=Gie;const Zie=["defaultOpen"];class Kie extends V.Component{constructor(t){super(t),this.state={isOpen:t.defaultOpen||!1},this.toggle=this.toggle.bind(this)}toggle(){this.setState(t=>({isOpen:!t.isOpen}))}render(){return U.createElement(h_,$e({isOpen:this.state.isOpen,toggle:this.toggle},Cr(this.props,Zie)))}}Kie.propTypes=We({defaultOpen:C.bool},h_.propTypes);const Xie=["toggleEvents","defaultOpen"],Qie={defaultOpen:C.bool,toggler:C.string.isRequired,toggleEvents:C.arrayOf(C.string)},Jie={toggleEvents:ine};class _6 extends V.Component{constructor(t){super(t),this.togglers=null,this.removeEventListeners=null,this.toggle=this.toggle.bind(this),this.state={isOpen:t.defaultOpen||!1}}componentDidMount(){this.togglers=QI(this.props.toggler),this.togglers.length&&(this.removeEventListeners=one(this.togglers,this.toggle,this.props.toggleEvents))}componentWillUnmount(){this.togglers.length&&this.removeEventListeners&&this.removeEventListeners()}toggle(t){this.setState(({isOpen:n})=>({isOpen:!n})),t.preventDefault()}render(){return U.createElement(r6,$e({isOpen:this.state.isOpen},Cr(this.props,Xie)))}}_6.propTypes=Qie;_6.defaultProps=Jie;const eoe=["defaultOpen"];class Jd extends V.Component{constructor(t){super(t),this.state={isOpen:t.defaultOpen||!1},this.toggle=this.toggle.bind(this)}toggle(t){this.setState(n=>({isOpen:!n.isOpen}),()=>{this.props.onToggle&&this.props.onToggle(t,this.state.isOpen)})}render(){return U.createElement(tu,$e({isOpen:this.state.isOpen,toggle:this.toggle},Cr(this.props,eoe)))}}Jd.propTypes=We({defaultOpen:C.bool,onToggle:C.func},tu.propTypes);const toe=["defaultOpen"];class Er extends V.Component{constructor(t){super(t),this.state={isOpen:t.defaultOpen||!1},this.toggle=this.toggle.bind(this)}toggle(){this.setState(t=>({isOpen:!t.isOpen}))}render(){return U.createElement(Xd,$e({isOpen:this.state.isOpen,toggle:this.toggle},Cr(this.props,toe)))}}Er.propTypes=We({defaultOpen:C.bool},Xd.propTypes);C.oneOf(["border","grow"]),C.oneOf(["sm"]),C.oneOf(["primary","secondary","success","danger","warning","info","light","dark"]),C.string,C.object,C.string;We(We({},zC.propTypes),{},{color:C.string,tag:Pe,animation:C.oneOf(["glow","wave"]),innerRef:C.oneOfType([C.object,C.func,C.string]),size:C.oneOf(["lg","sm","xs"])});C.string,C.string,C.bool,C.string,C.object;(()=>{if(typeof window!="object"||typeof window.CustomEvent=="function")return;const e=(t,n)=>{n=n||{bubbles:!1,cancelable:!1,detail:null};let r=document.createEvent("CustomEvent");return r.initCustomEvent(t,n.bubbles,n.cancelable,n.detail),r};window.CustomEvent=e})();(()=>{if(typeof Object.values=="function")return;Object.values=t=>Object.keys(t).map(n=>t[n])})();const noe="Left",roe="Right",ioe="Up",ooe="Down",rc={delta:10,preventScrollOnSwipe:!1,rotationAngle:0,trackMouse:!1,trackTouch:!0,swipeDuration:1/0,touchEventOptions:{passive:!0}},Bw={first:!0,initial:[0,0],start:0,swiping:!1,xy:[0,0]},_3="mousemove",b3="mouseup",soe="touchend",aoe="touchmove",loe="touchstart";function coe(e,t,n,r){return e>t?n>0?roe:noe:r>0?ooe:ioe}function w3(e,t){if(t===0)return e;const n=Math.PI/180*t,r=e[0]*Math.cos(n)+e[1]*Math.sin(n),i=e[1]*Math.cos(n)-e[0]*Math.sin(n);return[r,i]}function uoe(e,t){const n=f=>{const h="touches"in f;h&&f.touches.length>1||e((p,m)=>{m.trackMouse&&!h&&(document.addEventListener(_3,r),document.addEventListener(b3,s));const{clientX:v,clientY:y}=h?f.touches[0]:f,x=w3([v,y],m.rotationAngle);return m.onTouchStartOrOnMouseDown&&m.onTouchStartOrOnMouseDown({event:f}),Object.assign(Object.assign(Object.assign({},p),Bw),{initial:x.slice(),xy:x,start:f.timeStamp||0})})},r=f=>{e((h,p)=>{const m="touches"in f;if(m&&f.touches.length>1)return h;if(f.timeStamp-h.start>p.swipeDuration)return h.swiping?Object.assign(Object.assign({},h),{swiping:!1}):h;const{clientX:v,clientY:y}=m?f.touches[0]:f,[x,_]=w3([v,y],p.rotationAngle),w=x-h.xy[0],S=_-h.xy[1],T=Math.abs(w),P=Math.abs(S),k=(f.timeStamp||0)-h.start,N=Math.sqrt(T*T+P*P)/(k||1),D=[w/(k||1),S/(k||1)],z=coe(T,P,w,S),A=typeof p.delta=="number"?p.delta:p.delta[z.toLowerCase()]||rc.delta;if(T{e((h,p)=>{let m;if(h.swiping&&h.eventData){if(f.timeStamp-h.start{document.removeEventListener(_3,r),document.removeEventListener(b3,s)},s=f=>{o(),i(f)},a=(f,h)=>{let p=()=>{};if(f&&f.addEventListener){const m=Object.assign(Object.assign({},rc.touchEventOptions),h.touchEventOptions),v=[[loe,n,m],[aoe,r,Object.assign(Object.assign({},m),h.preventScrollOnSwipe?{passive:!1}:{})],[soe,i,m]];v.forEach(([y,x,_])=>f.addEventListener(y,x,_)),p=()=>v.forEach(([y,x])=>f.removeEventListener(y,x))}return p},c={ref:f=>{f!==null&&e((h,p)=>{if(h.el===f)return h;const m={};return h.el&&h.el!==f&&h.cleanUpTouch&&(h.cleanUpTouch(),m.cleanUpTouch=void 0),p.trackTouch&&f&&(m.cleanUpTouch=a(f,p)),Object.assign(Object.assign(Object.assign({},h),{el:f}),m)})}};return t.trackMouse&&(c.onMouseDown=n),[c,a]}function foe(e,t,n,r){return!t.trackTouch||!e.el?(e.cleanUpTouch&&e.cleanUpTouch(),Object.assign(Object.assign({},e),{cleanUpTouch:void 0})):e.cleanUpTouch?t.preventScrollOnSwipe!==n.preventScrollOnSwipe||t.touchEventOptions.passive!==n.touchEventOptions.passive?(e.cleanUpTouch(),Object.assign(Object.assign({},e),{cleanUpTouch:r(e.el,t)})):e:Object.assign(Object.assign({},e),{cleanUpTouch:r(e.el,t)})}function doe(e){const{trackMouse:t}=e,n=V.useRef(Object.assign({},Bw)),r=V.useRef(Object.assign({},rc)),i=V.useRef(Object.assign({},r.current));i.current=Object.assign({},r.current),r.current=Object.assign(Object.assign({},rc),e);let o;for(o in rc)r.current[o]===void 0&&(r.current[o]=rc[o]);const[s,a]=V.useMemo(()=>uoe(l=>n.current=l(n.current,r.current),{trackMouse:t}),[t]);return n.current=foe(n.current,r.current,i.current,a),s}var Tp,hoe=new Uint8Array(16);function poe(){if(!Tp&&(Tp=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!Tp))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Tp(hoe)}const moe=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function goe(e){return typeof e=="string"&&moe.test(e)}var Fn=[];for(var m1=0;m1<256;++m1)Fn.push((m1+256).toString(16).substr(1));function voe(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(Fn[e[t+0]]+Fn[e[t+1]]+Fn[e[t+2]]+Fn[e[t+3]]+"-"+Fn[e[t+4]]+Fn[e[t+5]]+"-"+Fn[e[t+6]]+Fn[e[t+7]]+"-"+Fn[e[t+8]]+Fn[e[t+9]]+"-"+Fn[e[t+10]]+Fn[e[t+11]]+Fn[e[t+12]]+Fn[e[t+13]]+Fn[e[t+14]]+Fn[e[t+15]]).toLowerCase();if(!goe(n))throw TypeError("Stringified UUID is invalid");return n}function lE(e,t,n){e=e||{};var r=e.random||(e.rng||poe)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return voe(r)}const yoe=2e3,_oe=(e,t)=>(n=!1,r=yoe)=>{const[i,o]=V.useState(n),s=V.useRef(void 0);return[i,()=>{o(!n),s.current&&t(s.current),s.current=e(()=>o(n),r)}]},It=(e=!1)=>{const[t,n]=V.useState(e);return[t,()=>n(!t),()=>n(!0),()=>n(!1)]},boe=(e,t)=>{const n=r=>i=>{i.event.composedPath().some(({classList:s})=>s==null?void 0:s.contains("visits-table"))||document.querySelector(".modal")||r()};return doe({delta:40,onSwipedLeft:n(t),onSwipedRight:n(e)})},woe=(e,t)=>{const[n,r]=V.useState(t);return[n,o=>{const{location:s,history:a}=window,l=dl(s.search);l[e]=o,a.pushState(null,"",`${s.pathname}?${Hd(l)}`),r(o)}]},xoe=(e,t)=>{const n=V.useRef(!0);V.useEffect(()=>{!n.current&&e(),n.current=!1},t)},ta=()=>{const e=Io();return()=>e(-1)},Soe=()=>{const{search:e}=Pn();return dl(e)},b_=()=>{const{current:e}=V.useRef(`dom-${lE()}`);return e},pl=()=>V.useRef(null),un=({title:e,children:t,bodyClassName:n,...r})=>g.jsxs(Sr,{...r,children:[e&&g.jsx(rl,{role:"heading",children:e}),g.jsx(nl,{className:n,children:t})]});const Coe=({isOpen:e,toggle:t,forceUpdate:n})=>{const[r,,i]=It(),o=()=>{i(),n()};return g.jsxs(iE,{className:"app-update-banner",isOpen:e,toggle:t,tag:un,color:"secondary",children:[g.jsx("h4",{className:"mb-4",children:"This app has just been updated!"}),g.jsxs("p",{className:"mb-0",children:["Restart it to enjoy the new features.",g.jsxs(ht,{role:"button",disabled:r,className:"ms-2",color:"secondary",size:"sm",onClick:o,children:[!r&&g.jsxs(g.Fragment,{children:["Restart now ",g.jsx(je,{icon:kQ,className:"ms-1"})]}),r&&g.jsx(g.Fragment,{children:"Restarting..."})]})]})]})},b6=({to:e="/",children:t="Home"})=>g.jsx("div",{className:"home",children:g.jsxs(un,{className:"p-4",children:[g.jsx("h2",{children:"Oops! We could not find requested route."}),g.jsx("p",{children:"Use your browser's back button to navigate to the page you have previously come from, or just press this button."}),g.jsx("br",{}),g.jsx(Lt,{to:e,className:"btn btn-outline-primary btn-lg",children:t})]})}),Eoe=async()=>{var t;(await((t=navigator.serviceWorker)==null?void 0:t.getRegistrations())??[]).forEach(({waiting:n})=>{n==null||n.addEventListener("statechange",r=>{var i;((i=r.target)==null?void 0:i.state)==="activated"&&window.location.reload()}),n==null||n.postMessage({type:"SKIP_WAITING"})})},cE="#4696e5",Toe="rgba(70, 150, 229, 0.4)",w6="#f77f28",Ooe="rgba(247, 127, 40, 0.4)",Poe="white",koe="#161b22",x6=e=>{var t,n;return(n=(t=document.getElementsByTagName("html"))==null?void 0:t[0])==null?void 0:n.setAttribute("data-theme",e)},Moe=()=>{var e,t;return((t=(e=document.getElementsByTagName("html"))==null?void 0:e[0])==null?void 0:t.getAttribute("data-theme"))==="dark"};const Roe=(e,t,n,r,i,o,s,a)=>({fetchServers:l,servers:c,settings:f,appUpdated:h,resetAppUpdate:p})=>{const v=Pn().pathname==="/";return V.useEffect(()=>{var y;Object.keys(c).length===0&&l(),x6(((y=f.ui)==null?void 0:y.theme)??"light")},[]),g.jsxs("div",{className:"container-fluid app-container",children:[g.jsx(e,{}),g.jsxs("div",{className:"app",children:[g.jsx("div",{className:me("shlink-wrapper",{"d-flex d-md-block align-items-center":v}),children:g.jsxs(Xy,{children:[g.jsx(gt,{index:!0,element:g.jsx(t,{})}),g.jsx(gt,{path:"/settings/*",element:g.jsx(o,{})}),g.jsx(gt,{path:"/manage-servers",element:g.jsx(s,{})}),g.jsx(gt,{path:"/server/create",element:g.jsx(r,{})}),g.jsx(gt,{path:"/server/:serverId/edit",element:g.jsx(i,{})}),g.jsx(gt,{path:"/server/:serverId/*",element:g.jsx(n,{})}),g.jsx(gt,{path:"*",element:g.jsx(b6,{})})]})}),g.jsx("div",{className:"shlink-footer",children:g.jsx(a,{})})]}),g.jsx(Coe,{isOpen:h,toggle:p,forceUpdate:Eoe})]})};function mi(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:uE(e)?2:fE(e)?3:0}function mc(e,t){return ru(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Noe(e,t){return ru(e)===2?e.get(t):e[t]}function S6(e,t,n){var r=ru(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function C6(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function uE(e){return Foe&&e instanceof Map}function fE(e){return $oe&&e instanceof Set}function Ta(e){return e.o||e.t}function dE(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=T6(e);delete t[At];for(var n=gc(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=Loe),Object.freeze(e),t&&il(e,function(n,r){return hE(r,!0)},!0)),e}function Loe(){mi(2)}function pE(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Xi(e){var t=Hw[e];return t||mi(18,e),t}function Doe(e,t){Hw[e]||(Hw[e]=t)}function zw(){return bd}function g1(e,t){t&&(Xi("Patches"),e.u=[],e.s=[],e.v=t)}function lv(e){Uw(e),e.p.forEach(Aoe),e.p=null}function Uw(e){e===bd&&(bd=e.l)}function x3(e){return bd={p:[],l:bd,h:e,m:!0,_:0}}function Aoe(e){var t=e[At];t.i===0||t.i===1?t.j():t.O=!0}function v1(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||Xi("ES5").S(t,e,r),r?(n[At].P&&(lv(t),mi(4)),No(e)&&(e=cv(t,e),t.l||uv(t,e)),t.u&&Xi("Patches").M(n[At].t,e,t.u,t.s)):e=cv(t,n,[]),lv(t),t.u&&t.v(t.u,t.s),e!==E6?e:void 0}function cv(e,t,n){if(pE(t))return t;var r=t[At];if(!r)return il(t,function(o,s){return S3(e,r,t,o,s,n)},!0),t;if(r.A!==e)return t;if(!r.P)return uv(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=dE(r.k):r.o;il(r.i===3?new Set(i):i,function(o,s){return S3(e,r,i,o,s,n)}),uv(e,i,!1),n&&e.u&&Xi("Patches").R(r,n,e.u,e.s)}return r.o}function S3(e,t,n,r,i,o){if(zs(i)){var s=cv(e,i,o&&t&&t.i!==3&&!mc(t.D,r)?o.concat(r):void 0);if(S6(n,r,s),!zs(s))return;e.m=!1}if(No(i)&&!pE(i)){if(!e.h.F&&e._<1)return;cv(e,i),t&&t.A.l||uv(e,i)}}function uv(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&hE(t,n)}function y1(e,t){var n=e[At];return(n?Ta(n):e)[t]}function C3(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function os(e){e.P||(e.P=!0,e.l&&os(e.l))}function _1(e){e.o||(e.o=dE(e.t))}function Vw(e,t,n){var r=uE(t)?Xi("MapSet").N(t,n):fE(t)?Xi("MapSet").T(t,n):e.g?function(i,o){var s=Array.isArray(i),a={i:s?1:0,A:o?o.A:zw(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=a,c=wd;s&&(l=[a],c=Ju);var f=Proxy.revocable(l,c),h=f.revoke,p=f.proxy;return a.k=p,a.j=h,p}(t,n):Xi("ES5").J(t,n);return(n?n.A:zw()).p.push(r),r}function joe(e){return zs(e)||mi(22,e),function t(n){if(!No(n))return n;var r,i=n[At],o=ru(n);if(i){if(!i.P&&(i.i<4||!Xi("ES5").K(i)))return i.t;i.I=!0,r=E3(n,o),i.I=!1}else r=E3(n,o);return il(r,function(s,a){i&&Noe(i.t,s)===a||S6(r,s,t(a))}),o===3?new Set(r):r}(e)}function E3(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return dE(e)}function Ioe(){function e(o,s){var a=i[o];return a?a.enumerable=s:i[o]=a={configurable:!0,enumerable:s,get:function(){var l=this[At];return wd.get(l,o)},set:function(l){var c=this[At];wd.set(c,o,l)}},a}function t(o){for(var s=o.length-1;s>=0;s--){var a=o[s][At];if(!a.P)switch(a.i){case 5:r(a)&&os(a);break;case 4:n(a)&&os(a)}}}function n(o){for(var s=o.t,a=o.k,l=gc(a),c=l.length-1;c>=0;c--){var f=l[c];if(f!==At){var h=s[f];if(h===void 0&&!mc(s,f))return!0;var p=a[f],m=p&&p[At];if(m?m.t!==h:!C6(p,h))return!0}}var v=!!s[At];return l.length!==gc(s).length+(v?0:1)}function r(o){var s=o.k;if(s.length!==o.t.length)return!0;var a=Object.getOwnPropertyDescriptor(s,s.length-1);if(a&&!a.get)return!0;for(var l=0;l1?_-1:0),S=1;S<_;S++)w[S-1]=arguments[S];return l.produce(y,function(T){var P;return(P=o).call.apply(P,[x,T].concat(w))})}}var c;if(typeof o!="function"&&mi(6),s!==void 0&&typeof s!="function"&&mi(7),No(i)){var f=x3(r),h=Vw(r,i,void 0),p=!0;try{c=o(h),p=!1}finally{p?lv(f):Uw(f)}return typeof Promise<"u"&&c instanceof Promise?c.then(function(y){return g1(f,s),v1(y,f)},function(y){throw lv(f),y}):(g1(f,s),v1(c,f))}if(!i||typeof i!="object"){if((c=o(i))===void 0&&(c=i),c===E6&&(c=void 0),r.F&&hE(c,!0),s){var m=[],v=[];Xi("Patches").M(i,c,m,v),s(m,v)}return c}mi(21,i)},this.produceWithPatches=function(i,o){if(typeof i=="function")return function(c){for(var f=arguments.length,h=Array(f>1?f-1:0),p=1;p=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var s=Xi("Patches").$;return zs(n)?s(n,r):this.produce(n,function(a){return s(a,r)})},e}(),Ar=new zoe,O6=Ar.produce;Ar.produceWithPatches.bind(Ar);Ar.setAutoFreeze.bind(Ar);Ar.setUseProxies.bind(Ar);Ar.applyPatches.bind(Ar);Ar.createDraft.bind(Ar);Ar.finishDraft.bind(Ar);function Uoe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function M3(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Zn(1));return n(P6)(e,t)}if(typeof e!="function")throw new Error(Zn(2));var i=e,o=t,s=[],a=s,l=!1;function c(){a===s&&(a=s.slice())}function f(){if(l)throw new Error(Zn(3));return o}function h(y){if(typeof y!="function")throw new Error(Zn(4));if(l)throw new Error(Zn(5));var x=!0;return c(),a.push(y),function(){if(x){if(l)throw new Error(Zn(6));x=!1,c();var w=a.indexOf(y);a.splice(w,1),s=null}}}function p(y){if(!Voe(y))throw new Error(Zn(7));if(typeof y.type>"u")throw new Error(Zn(8));if(l)throw new Error(Zn(9));try{l=!0,o=i(o,y)}finally{l=!1}for(var x=s=a,_=0;_"u")throw new Error(Zn(12));if(typeof n(void 0,{type:fv.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Zn(13))})}function k6(e){for(var t=Object.keys(e),n={},r=0;r"u")throw c&&c.type,new Error(Zn(14));h[m]=x,f=f||x!==y}return f=f||o.length!==Object.keys(l).length,f?h:l}}function dv(){for(var e=arguments.length,t=new Array(e),n=0;n0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]0)for(var S=m.getState(),T=Array.from(n.values()),P=0,k=T;P!0,resetAppUpdate:()=>!1}}),{appUpdateAvailable:Lse,resetAppUpdate:Dse}=Rse,Ase=Nse,jse=(e,t)=>{e.serviceFactory("App",Roe,"MainHeader","Home","MenuLayout","CreateServer","EditServer","Settings","ManageServers","ShlinkVersionsContainer"),e.decorator("App",t(["servers","settings","appUpdated"],["fetchServers","resetAppUpdate"])),e.serviceFactory("appUpdateAvailable",()=>Lse),e.serviceFactory("resetAppUpdate",()=>Dse)};function pv(e){return t=>{const{resetSelectedServer:n}=t;return V.useEffect(()=>{n()},[]),g.jsx(e,{...t})}}const Dl=({children:e,to:t,className:n,...r})=>g.jsx(nj,{className:({isActive:i})=>me("aside-menu__item",n,{"aside-menu__item--selected":i}),to:t,...r,children:e}),Ise=e=>({selectedServer:t,showOnMobile:n=!1})=>{const r=Ps(t),i=r?t.id:"",{pathname:o}=Pn(),s=me("aside-menu",{"aside-menu--hidden":!n}),a=l=>`/server/${i}${l}`;return g.jsx("aside",{className:s,children:g.jsxs("nav",{className:"nav flex-column aside-menu__nav",children:[g.jsxs(Dl,{to:a("/overview"),children:[g.jsx(je,{fixedWidth:!0,icon:vQ}),g.jsx("span",{className:"aside-menu__item-text",children:"Overview"})]}),g.jsxs(Dl,{to:a("/list-short-urls/1"),className:me({"aside-menu__item--selected":o.match("/list-short-urls")!==null}),children:[g.jsx(je,{fixedWidth:!0,icon:qj}),g.jsx("span",{className:"aside-menu__item-text",children:"List short URLs"})]}),g.jsxs(Dl,{to:a("/create-short-url"),children:[g.jsx(je,{fixedWidth:!0,icon:xQ,flip:"horizontal"}),g.jsx("span",{className:"aside-menu__item-text",children:"Create short URL"})]}),g.jsxs(Dl,{to:a("/manage-tags"),children:[g.jsx(je,{fixedWidth:!0,icon:Zj}),g.jsx("span",{className:"aside-menu__item-text",children:"Manage tags"})]}),g.jsxs(Dl,{to:a("/manage-domains"),children:[g.jsx(je,{fixedWidth:!0,icon:KX}),g.jsx("span",{className:"aside-menu__item-text",children:"Manage domains"})]}),g.jsxs(Dl,{to:a("/edit"),className:"aside-menu__item--push",children:[g.jsx(je,{fixedWidth:!0,icon:oQ}),g.jsx("span",{className:"aside-menu__item-text",children:"Edit this server"})]}),r&&g.jsx(e,{className:"aside-menu__item aside-menu__item--danger",textClassName:"aside-menu__item-text",server:t})]})})},Fse=({location:e},{error:t})=>class extends V.Component{constructor(n){super(n),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(n){t(n)}render(){const{hasError:n}=this.state;if(n)return g.jsx("div",{className:"home",children:g.jsxs(un,{className:"p-4",children:[g.jsx("h1",{children:"Oops! This is awkward :S"}),g.jsx("p",{children:"It seems that something went wrong. Try refreshing the page or just click this button."}),g.jsx("br",{}),g.jsx(ht,{outline:!0,color:"primary",onClick:()=>e.reload(),children:"Take me back"})]})});const{children:r}=this.props;return r}},Si=({href:e,children:t,rel:n,...r})=>g.jsx("a",{target:"_blank",rel:`noopener noreferrer${n?` ${n}`:""}`,href:e,...r,children:t??e});const $se=({id:e,name:t})=>g.jsxs(oE,{tag:Lt,to:`/server/${e}`,className:"servers-list__server-item",children:[t,g.jsx(je,{icon:OQ,className:"servers-list__server-item-icon"})]}),z6=({servers:e,children:t,embedded:n=!1})=>g.jsxs(g.Fragment,{children:[t&&g.jsx("h5",{className:"mb-md-3",children:t}),e.length>0&&g.jsx(nE,{className:me("servers-list__list-group",{"servers-list__list-group--embedded":n}),children:e.map(({id:r,name:i})=>g.jsx($se,{id:r,name:i},r))})]}),U6=({color:e=cE,className:t})=>g.jsx("svg",{className:t,viewBox:"0 0 512 512",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:g.jsxs("g",{fill:e,children:[g.jsx("path",{d:" M 23.71 85.08 C 17.22 49.81 49.44 14.86 85.08 18.12 C 118.83 19.21 145.72 53.33 139.45 86.37 C 155.64 102.30 171.32 118.83 187.87 134.36 C 198.32 111.73 208.84 89.12 219.57 66.62 C 226.05 53.84 243.47 48.74 255.73 56.27 C 263.76 62.10 270.34 69.69 277.25 76.75 C 286.28 86.61 285.72 102.89 276.31 112.31 C 223.38 165.37 170.38 218.37 117.35 271.34 C 107.72 280.99 91.01 281.25 81.11 271.86 C 74.39 264.94 66.82 258.69 61.24 250.77 C 53.72 238.52 58.85 221.07 71.64 214.62 C 94.11 203.87 116.72 193.38 139.33 182.91 C 123.81 166.36 107.30 150.68 91.37 134.49 C 60.20 140.28 27.37 116.78 23.71 85.08 Z"}),g.jsx("path",{d:" M 205.21 201.23 C 225.32 181.36 260.88 181.11 281.14 200.86 C 299.25 218.75 317.37 236.65 335.10 254.93 C 356.73 278.01 352.01 318.70 326.03 336.56 C 320.07 330.47 313.73 324.65 308.12 318.28 C 323.86 309.39 328.76 286.18 316.63 272.39 C 301.73 256.95 286.30 242.03 271.24 226.75 C 264.49 219.65 256.80 212.00 246.37 211.52 C 224.65 208.64 205.52 233.36 214.49 253.58 C 221.09 266.81 234.22 275.12 243.62 286.24 C 240.43 295.96 238.09 306.13 238.29 316.46 C 225.55 304.29 213.16 291.73 200.89 279.09 C 180.97 257.57 183.10 220.45 205.21 201.23 Z"}),g.jsx("path",{d:" M 273.90 352.07 C 252.28 328.99 256.98 288.31 282.96 270.46 C 288.93 276.54 295.26 282.36 300.88 288.72 C 285.14 297.62 280.23 320.82 292.38 334.61 C 307.27 350.05 322.70 364.96 337.75 380.25 C 344.51 387.35 352.20 395.00 362.64 395.48 C 384.35 398.37 403.49 373.64 394.51 353.42 C 387.92 340.18 374.78 331.88 365.38 320.76 C 368.56 311.04 370.91 300.86 370.71 290.54 C 383.45 302.70 395.84 315.27 408.11 327.91 C 428.03 349.43 425.90 386.55 403.78 405.77 C 383.68 425.64 348.13 425.89 327.86 406.14 C 309.75 388.25 291.60 370.37 273.90 352.07 Z"}),g.jsx("path",{d:" M 422.11 403.83 C 431.96 394.07 441.60 384.06 451.66 374.51 C 460.90 383.74 471.89 392.70 474.89 406.11 C 480.16 429.97 484.08 454.13 488.76 478.12 C 490.00 483.41 484.47 488.29 479.35 486.63 C 454.66 481.52 429.55 478.12 405.14 471.84 C 393.17 467.97 385.20 457.75 376.55 449.27 C 386.39 439.49 396.13 429.60 406.06 419.91 C 416.37 433.45 435.74 414.00 422.11 403.83 Z"})]})});const Bse=({servers:e})=>{const t=Io(),n=Qc(e),r=!Wn(n);return V.useEffect(()=>{const i=n.find(({autoConnect:o})=>o);i&&t(`/server/${i.id}`)},[]),g.jsx("div",{className:"home",children:g.jsx(Sr,{className:"home__main-card",children:g.jsxs(Qn,{className:"g-0",children:[g.jsx("div",{className:"col-md-5 d-none d-md-block",children:g.jsx("div",{className:"home__logo-wrapper",children:g.jsx("div",{className:"home__logo",children:g.jsx(U6,{})})})}),g.jsxs("div",{className:"col-md-7 home__servers-container",children:[g.jsx("div",{className:"home__title-wrapper",children:g.jsx("h1",{className:"home__title",children:"Welcome!"})}),g.jsx(z6,{embedded:!0,servers:n,children:!r&&g.jsxs("div",{className:"p-4 text-center",children:[g.jsx("p",{className:"mb-5",children:"This application will help you manage your Shlink servers."}),g.jsx("p",{children:g.jsxs(Lt,{to:"/server/create",className:"btn btn-outline-primary btn-lg me-2",children:[g.jsx(je,{icon:vC})," ",g.jsx("span",{className:"ms-1",children:"Add a server"})]})}),g.jsx("p",{className:"mb-0 mt-5",children:g.jsx(Si,{href:"https://shlink.io/documentation",children:g.jsxs("small",{children:[g.jsx("span",{className:"me-1",children:"Learn more about Shlink"})," ",g.jsx(je,{icon:lQ})]})})})]})})]})]})})})};const zse=e=>()=>{const[t,n,,r]=It(),i=Pn(),{pathname:o}=i;V.useEffect(r,[i]);const s="/settings",a=me("main-header__toggle-icon",{"main-header__toggle-icon--opened":t});return g.jsxs(UC,{color:"primary",dark:!0,fixed:"top",className:"main-header",expand:"md",children:[g.jsxs(VC,{tag:Lt,to:"/",children:[g.jsx(U6,{className:"main-header__brand-logo",color:"white"})," Shlink"]}),g.jsx(HC,{onClick:n,children:g.jsx(je,{icon:EQ,className:a})}),g.jsx(r6,{navbar:!0,isOpen:t,children:g.jsxs(f_,{navbar:!0,className:"ms-auto",children:[g.jsx(WC,{children:g.jsxs(t6,{tag:Lt,to:s,active:o.startsWith(s),children:[g.jsx(je,{icon:RQ}),"  Settings"]})}),g.jsx(e,{})]})})]})};const iu=({children:e})=>g.jsx("div",{className:"no-menu-wrapper container-xl",children:e}),Use=e=>({error:"border-danger",default:""})[e],Vse=e=>({error:"text-danger",default:"text-muted"})[e],So=({className:e,children:t,loading:n=!1,type:r="default",fullWidth:i=!1})=>{const o=me({"col-md-12":i,"col-md-10 offset-md-1":!i});return g.jsx(Qn,{className:me("g-0",e),children:g.jsx("div",{className:o,children:g.jsx(Sr,{className:Use(r),body:!0,children:g.jsxs("h3",{className:me("text-center mb-0",Vse(r)),children:[n&&g.jsx(je,{icon:Yj,spin:!0}),n&&g.jsx("span",{className:"ms-2",children:t??"Loading..."}),!n&&t]})})})})};function V6(e,t){return n=>{const r=Ks(),{selectServer:i,selectedServer:o}=n;return V.useEffect(()=>{r.serverId&&i(r.serverId)},[r.serverId]),o?MZ(o)?g.jsx(t,{}):g.jsx(e,{...n}):g.jsx(iu,{children:g.jsx(So,{loading:!0})})}}const rr=(e,t)=>dse(e,t,{serializeError:JS}),Hse=(e,t)=>{const n=$3(e),r=$3(t),i=n.pop(),o=r.pop(),s=U3(n,r);return s!==0?s:i&&o?U3(i.split("."),o.split(".")):i||o?i?-1:1:0},qw=(e,t,n)=>{Gse(n);const r=Hse(e,t);return H6[n].includes(r)},Wse=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,$3=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const t=e.match(Wse);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},B3=e=>e==="*"||e==="x"||e==="X",z3=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},Yse=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],qse=(e,t)=>{if(B3(e)||B3(t))return 0;const[n,r]=Yse(z3(e),z3(t));return n>r?1:n{for(let n=0;n":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1]},V3=Object.keys(H6),Gse=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(V3.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${V3.join("|")}`)},_E=(e,t,n=1)=>rC(n,e+1).map(t),gi=e=>!Fo(e)&&!Wn(e),rh=e=>Dt(t=>t.preventDefault(),e),S1=e=>Wn(e)?null:e,ga=e=>t=>e===t,W6=e=>e?"true":"false",C1=e=>e===void 0?void 0:W6(e),Zse=(e,{maxVersion:t,minVersion:n})=>{if(!gi(e))return!1;const r=!n||qw(e,n,">=");return(!t||qw(e,t,"<="))&&r},Y6=Cj(JS,e=>{try{return qw(e,e,"=")}catch{return!1}}),q6=e=>Y6(e)?`v${e}`:e,G6=(e="latest")=>t=>Y6(t)?t:e,bE="shlink/selectedServer",Kse="1.0.0",Xse="999.999.999",Qse="latest",Jse=Dt(e=>e===Qse?Xse:e,G6(Kse)),eae=Cj(e=>`${e.id}_${e.url}_${e.apiKey}`,async(e,t)=>t().then(({version:n})=>({version:Jse(n),printableVersion:q6(n)}))),H3=null,wE=yn(`${bE}/resetSelectedServer`),Z6=e=>rr(`${bE}/selectServer`,async(t,{dispatch:n,getState:r})=>{n(wE());const{servers:i}=r(),o=i[t];if(!o)return{serverNotFound:!0};try{const{health:s}=e(o),{version:a,printableVersion:l}=await eae(o,s);return{...o,version:a,printableVersion:l}}catch{return{...o,serverNotReachable:!0}}}),tae=(e,t)=>{const n=Mse();return n.startListening({actionCreator:e.fulfilled,effect:({payload:r},{dispatch:i})=>{t_(r)&&i(t())}}),n},nae=e=>Yn({name:bE,initialState:H3,reducers:{},extraReducers:t=>{t.addCase(wE,()=>H3),t.addCase(e.fulfilled,(n,{payload:r})=>r)}}),Ii=e=>t=>t_(t)&&Zse(t.version,{minVersion:e}),xE={forwardQuery:Ii("2.9.0"),nonRestCors:Ii("2.9.0"),defaultDomainRedirectsEdition:Ii("2.10.0"),nonOrphanVisits:Ii("3.0.0"),allTagsFiltering:Ii("3.0.0"),tagsStats:Ii("3.0.0"),domainVisits:Ii("3.1.0"),excludeBotsOnShortUrls:Ii("3.4.0"),filterDisabledUrls:Ii("3.4.0"),deviceLongUrls:Ii("3.5.0")};Object.freeze(xE);const Pi=(e,t)=>V.useMemo(()=>xE[e](t),[e,Z6]);const rae=(e,t,n,r,i,o,s,a,l,c,f,h,p)=>V6(({selectedServer:m,sidebarNotPresent:v,sidebarPresent:y})=>{const x=Pn(),[_,w,S,T]=It(),P=t_(m);if(V.useEffect(()=>T(),[x]),V.useEffect(()=>(P&&y(),()=>v()),[]),!P)return g.jsx(c,{});const k=Pi("nonOrphanVisits",m),N=Pi("domainVisits",m),D=me("menu-layout__burger-icon",{"menu-layout__burger-icon--active":_}),z=boe(S,T);return g.jsxs(g.Fragment,{children:[g.jsx(je,{icon:WX,className:D,onClick:w}),g.jsx("div",{...z,className:"menu-layout__swipeable",children:g.jsxs("div",{className:"menu-layout__swipeable-inner",children:[g.jsx(n,{selectedServer:m,showOnMobile:_}),g.jsx("div",{className:"menu-layout__container",onClick:()=>T(),children:g.jsx("div",{className:"container-xl",children:g.jsxs(Xy,{children:[g.jsx(gt,{index:!0,element:g.jsx(WS,{replace:!0,to:"overview"})}),g.jsx(gt,{path:"/overview",element:g.jsx(f,{})}),g.jsx(gt,{path:"/list-short-urls/:page",element:g.jsx(t,{})}),g.jsx(gt,{path:"/create-short-url",element:g.jsx(r,{})}),g.jsx(gt,{path:"/short-code/:shortCode/visits/*",element:g.jsx(i,{})}),g.jsx(gt,{path:"/short-code/:shortCode/edit",element:g.jsx(h,{})}),g.jsx(gt,{path:"/tag/:tag/visits/*",element:g.jsx(o,{})}),N&&g.jsx(gt,{path:"/domain/:domain/visits/*",element:g.jsx(s,{})}),g.jsx(gt,{path:"/orphan-visits/*",element:g.jsx(a,{})}),k&&g.jsx(gt,{path:"/non-orphan-visits/*",element:g.jsx(l,{})}),g.jsx(gt,{path:"/manage-tags",element:g.jsx(e,{})}),g.jsx(gt,{path:"/manage-domains",element:g.jsx(p,{})}),g.jsx(gt,{path:"*",element:g.jsx(b6,{to:`/server/${m.id}/list-short-urls/1`,children:"List short URLs"})})]})})})]})})]})},c),iae={sidebarPresent:!1},{actions:oae,reducer:sae}=Yn({name:"shlink/sidebar",initialState:iae,reducers:{sidebarPresent:()=>({sidebarPresent:!0}),sidebarNotPresent:()=>({sidebarPresent:!1})}}),{sidebarPresent:aae,sidebarNotPresent:lae}=oae,cae=sae,uae=({children:e})=>{const t=Pn();return V.useEffect(()=>{scrollTo(0,0)},[t]),g.jsx(g.Fragment,{children:e})},fae="%_VERSION_%",dae=Dt(G6(),q6),W3=({project:e,version:t})=>g.jsx(Si,{href:`https://github.com/shlinkio/${e}/releases/${t}`,className:"text-muted",children:g.jsx("b",{children:t})}),hae=({selectedServer:e,clientVersion:t=fae})=>{const n=dae(t);return g.jsxs("small",{className:"text-muted",children:[t_(e)&&g.jsxs(g.Fragment,{children:["Server: ",g.jsx(W3,{project:"shlink",version:e.printableVersion})," - "]}),"Client: ",g.jsx(W3,{project:"shlink-web-client",version:n})]})};const pae=({selectedServer:e,sidebar:t})=>{const n=me("text-center",{"shlink-versions-container--with-sidebar":t.sidebarPresent});return g.jsx("div",{className:n,children:g.jsx(hae,{selectedServer:e})})},Y3={"Content-Type":"application/json"},q3=e=>e!=null&&e.body?e?{...e,headers:{...e.headers??{},...Y3}}:{headers:Y3}:e;class mae{constructor(t){xe(this,"fetchJson",(t,n)=>this.fetch(t,q3(n)).then(async r=>{const i=await r.json();if(!r.ok)throw i;return i}));xe(this,"fetchEmpty",(t,n)=>this.fetch(t,q3(n)).then(async r=>{if(!r.ok)throw await r.json()}));xe(this,"fetchBlob",t=>this.fetch(t).then(n=>n.blob()));this.fetch=t}}const K6=({document:e},t,n)=>{const r=e.createElement("a");r.setAttribute("href",t),r.setAttribute("download",n),r.style.visibility="hidden",e.body.appendChild(r),r.click(),e.body.removeChild(r)},X6=(e,t,n)=>{const r=new Blob([t],{type:"text/csv;charset=utf-8;"}),i=URL.createObjectURL(r);K6(e,i,n)};class gae{constructor(t,n){this.httpClient=t,this.window=n}async saveImage(t,n){const r=await this.httpClient.fetchBlob(t),i=URL.createObjectURL(r);K6(this.window,i,n)}}class vae{constructor(t,n){xe(this,"exportVisits",(t,n)=>{n.length&&this.exportCsv(t,n)});xe(this,"exportShortUrls",t=>{t.length&&this.exportCsv("short_urls.csv",t)});xe(this,"exportCsv",(t,n)=>{const r=this.jsonToCsv(n);X6(this.window,r,t)});this.window=t,this.jsonToCsv=n}}const yae=(e,t)=>{e.constant("window",window),e.constant("console",console),e.constant("fetch",window.fetch.bind(window)),e.service("HttpClient",mae,"fetch"),e.service("ImageDownloader",gae,"HttpClient","window"),e.service("ReportExporter",vae,"window","jsonToCsv"),e.serviceFactory("ScrollToTop",()=>uae),e.serviceFactory("MainHeader",zse,"ServersDropdown"),e.serviceFactory("Home",()=>Bse),e.decorator("Home",pv),e.decorator("Home",t(["servers"],["resetSelectedServer"])),e.serviceFactory("MenuLayout",rae,"TagsList","ShortUrlsList","AsideMenu","CreateShortUrl","ShortUrlVisits","TagVisits","DomainVisits","OrphanVisits","NonOrphanVisits","ServerError","Overview","EditShortUrl","ManageDomains"),e.decorator("MenuLayout",t(["selectedServer"],["selectServer","sidebarPresent","sidebarNotPresent"])),e.serviceFactory("AsideMenu",Ise,"DeleteServerButton"),e.serviceFactory("ShlinkVersionsContainer",()=>pae),e.decorator("ShlinkVersionsContainer",t(["selectedServer","sidebar"])),e.serviceFactory("ErrorHandler",Fse,"window","console"),e.serviceFactory("sidebarPresent",()=>aae),e.serviceFactory("sidebarNotPresent",()=>lae)};const na=({text:e,disabled:t=!1,className:n="",children:r,dropdownClassName:i,right:o=!1,minWidth:s})=>{const[a,l]=It(),c=`dropdown-btn__toggle btn-block ${n}`,f={minWidth:s&&`${s}px`};return g.jsxs(tu,{isOpen:a,toggle:l,disabled:t,className:i,children:[g.jsx(nu,{caret:!0,className:c,color:"primary",children:e}),g.jsx(hl,{className:"w-100",end:o,style:f,children:r})]})};const _ae=({listDomains:e,value:t,domainsList:n,onChange:r})=>{const[i,,o,s]=It(),{domains:a}=n,l=Wn(t),c=()=>r("");return V.useEffect(()=>{e()},[]),i?g.jsxs(Qd,{children:[g.jsx($c,{value:t??"",placeholder:"Domain",onChange:f=>r(f.target.value)}),g.jsx(ht,{id:"backToDropdown",outline:!0,type:"button",className:"domains-dropdown__back-btn","aria-label":"Back to domains list",onClick:Dt(c,s),children:g.jsx(je,{icon:dQ})}),g.jsx(Er,{target:"backToDropdown",placement:"left",trigger:"hover",children:"Existing domains"})]}):g.jsxs(na,{text:l?"Domain":`Domain: ${t}`,className:l?"domains-dropdown__toggle-btn":"domains-dropdown__toggle-btn--active",children:[a.map(({domain:f,isDefault:h})=>g.jsxs(Ue,{active:(t===f||h)&&l,onClick:()=>r(f),children:[f,h&&g.jsx("span",{className:"float-end text-muted",children:"default"})]},f)),g.jsx(Ue,{divider:!0}),g.jsx(Ue,{onClick:Dt(c,o),children:g.jsx("i",{children:"New domain"})})]})},Lo=({errorData:e,fallbackMessage:t})=>g.jsxs(g.Fragment,{children:[(e==null?void 0:e.detail)??t,OX(e)&&g.jsxs("p",{className:"mb-0",children:["Invalid elements: [",e.invalidElements.join(", "),"]"]})]}),Nr=({children:e,type:t,className:n,small:r=!1})=>g.jsx(Qn,{className:n,children:g.jsx("div",{className:me({"col-md-10 offset-md-1":!r,"col-12":r}),children:g.jsx(un,{role:"document",className:me("text-center",{"bg-main":t==="success","bg-danger":t==="error","bg-warning":t==="warning","text-white":t!=="warning"}),bodyClassName:me({"p-2":r}),children:e})})});const bae=500;let Op;const ih=({onChange:e,className:t,large:n=!0,noBorder:r=!1,initialValue:i=""})=>{const[o,s]=V.useState(i),a=()=>{Op&&clearTimeout(Op),Op=null},l=(c,f=bae)=>{s(c),a(),Op=setTimeout(()=>{e(c),a()},f)};return g.jsxs("div",{className:me("search-field",t),children:[g.jsx("input",{type:"text",className:me("form-control search-field__input",{"form-control-lg":n,"search-field__input--no-border":r}),placeholder:"Search...",value:o,onChange:c=>l(c.target.value)}),g.jsx(je,{icon:CQ,className:"search-field__icon"}),g.jsx("div",{className:"close search-field__close btn-close",hidden:o==="",id:"search-field__close",onClick:()=>l("",0)})]})};const x_=({isOpen:e,toggle:t,children:n,right:r=!0})=>g.jsxs(h_,{toggle:t,isOpen:e,children:[g.jsxs(nu,{size:"sm",caret:!0,outline:!0,className:"dropdown-btn-menu__dropdown-toggle",children:[" ",g.jsx(je,{icon:mQ})," "]}),g.jsx(hl,{end:r,children:n})]}),Of=(e,t,n)=>Fo(n)?e.shortCode===t&&!e.domain:e.shortCode===t&&e.domain===n,wae=(e,t)=>!e.domain&&t===E5?!0:e.domain===t,xae=(e,t)=>{const n=(t==null?void 0:t.validateUrls)??!1;return e?{longUrl:e.longUrl,tags:e.tags,title:e.title??void 0,domain:e.domain??void 0,validSince:e.meta.validSince??void 0,validUntil:e.meta.validUntil??void 0,maxVisits:e.meta.maxVisits??void 0,crawlable:e.crawlable,forwardQuery:e.forwardQuery,deviceLongUrls:e.deviceLongUrls,validateUrl:n}:{longUrl:"",validateUrl:n}},Q6="__",Sae=e=>e.replaceAll("/",Q6),hm=e=>e.replaceAll(Q6,"/");function Qe(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function Oe(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function pm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?pm=function(n){return typeof n}:pm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},pm(e)}function Me(e){Oe(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||pm(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function ml(e,t){Oe(2,arguments);var n=Me(e),r=Qe(t);return isNaN(r)?new Date(NaN):(r&&n.setDate(n.getDate()+r),n)}function to(e,t){Oe(2,arguments);var n=Me(e),r=Qe(t);if(isNaN(r))return new Date(NaN);if(!r)return n;var i=n.getDate(),o=new Date(n.getTime());o.setMonth(n.getMonth()+r+1,0);var s=o.getDate();return i>=s?o:(n.setFullYear(o.getFullYear(),o.getMonth(),i),n)}function mm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?mm=function(n){return typeof n}:mm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},mm(e)}function Cae(e,t){if(Oe(2,arguments),!t||mm(t)!=="object")return new Date(NaN);var n=t.years?Qe(t.years):0,r=t.months?Qe(t.months):0,i=t.weeks?Qe(t.weeks):0,o=t.days?Qe(t.days):0,s=t.hours?Qe(t.hours):0,a=t.minutes?Qe(t.minutes):0,l=t.seconds?Qe(t.seconds):0,c=Me(e),f=r||n?to(c,r+n*12):c,h=o||i?ml(f,o+i*7):f,p=a+s*60,m=l+p*60,v=m*1e3,y=new Date(h.getTime()+v);return y}function SE(e,t){Oe(2,arguments);var n=Me(e).getTime(),r=Qe(t);return new Date(n+r)}var Eae=36e5;function Tae(e,t){Oe(2,arguments);var n=Qe(t);return SE(e,n*Eae)}var Oae={};function Vo(){return Oae}function J6(e,t){var n,r,i,o,s,a,l,c;Oe(1,arguments);var f=Vo(),h=Qe((n=(r=(i=(o=t==null?void 0:t.weekStartsOn)!==null&&o!==void 0?o:t==null||(s=t.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.weekStartsOn)!==null&&i!==void 0?i:f.weekStartsOn)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Me(e),m=p.getDay(),v=(m=i.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function kae(e){Oe(1,arguments);var t=Pae(e),n=new Date(0);n.setFullYear(t,0,4),n.setHours(0,0,0,0);var r=Sd(n);return r}function Bc(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function Lr(e){Oe(1,arguments);var t=Me(e);return t.setHours(0,0,0,0),t}var Mae=864e5;function Cd(e,t){Oe(2,arguments);var n=Lr(e),r=Lr(t),i=n.getTime()-Bc(n),o=r.getTime()-Bc(r);return Math.round((i-o)/Mae)}var Rae=6e4;function Gw(e,t){Oe(2,arguments);var n=Qe(t);return SE(e,n*Rae)}function CE(e,t){Oe(2,arguments);var n=Qe(t),r=n*7;return ml(e,r)}function zc(e,t){Oe(2,arguments);var n=Qe(t);return to(e,n*12)}function gm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?gm=function(n){return typeof n}:gm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},gm(e)}function G3(e){Oe(1,arguments);var t;if(e&&typeof e.forEach=="function")t=e;else if(gm(e)==="object"&&e!==null)t=Array.prototype.slice.call(e);else return new Date(NaN);var n;return t.forEach(function(r){var i=Me(r);(n===void 0||ni||isNaN(i.getDate()))&&(n=i)}),n||new Date(NaN)}function ym(e,t){Oe(2,arguments);var n=Me(e),r=Me(t),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}var EE=6e4,S_=36e5,Nae=1e3;function Lae(e,t){Oe(2,arguments);var n=Lr(e),r=Lr(t);return n.getTime()===r.getTime()}function _m(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_m=function(n){return typeof n}:_m=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},_m(e)}function TE(e){return Oe(1,arguments),e instanceof Date||_m(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function e5(e){if(Oe(1,arguments),!TE(e)&&typeof e!="number")return!1;var t=Me(e);return!isNaN(Number(t))}function Ed(e,t){Oe(2,arguments);var n=Me(e),r=Me(t),i=n.getFullYear()-r.getFullYear(),o=n.getMonth()-r.getMonth();return i*12+o}function Zw(e){Oe(1,arguments);var t=Me(e),n=Math.floor(t.getMonth()/3)+1;return n}function mv(e,t){Oe(2,arguments);var n=Me(e),r=Me(t);return n.getFullYear()-r.getFullYear()}function K3(e,t){var n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function OE(e,t){Oe(2,arguments);var n=Me(e),r=Me(t),i=K3(n,r),o=Math.abs(Cd(n,r));n.setDate(n.getDate()-i*o);var s=+(K3(n,r)===-i),a=i*(o-s);return a===0?0:a}function t5(e,t){return Oe(2,arguments),Me(e).getTime()-Me(t).getTime()}var X3={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},Dae="trunc";function PE(e){return e?X3[e]:X3[Dae]}function Aae(e,t,n){Oe(2,arguments);var r=t5(e,t)/S_;return PE(n==null?void 0:n.roundingMethod)(r)}function ol(e){Oe(1,arguments);var t=Me(e);return t.setHours(23,59,59,999),t}function jae(e){Oe(1,arguments);var t=Me(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function Iae(e){Oe(1,arguments);var t=Me(e);return ol(t).getTime()===jae(t).getTime()}function gv(e,t){Oe(2,arguments);var n=Me(e),r=Me(t),i=ym(n,r),o=Math.abs(Ed(n,r)),s;if(o<1)s=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-i*o);var a=ym(n,r)===-i;Iae(Me(e))&&o===1&&ym(e,r)===1&&(a=!1),s=i*(o-Number(a))}return s===0?0:s}function Fae(e,t,n){Oe(2,arguments);var r=t5(e,t)/1e3;return PE(n==null?void 0:n.roundingMethod)(r)}function $ae(e,t,n){Oe(2,arguments);var r=OE(e,t)/7;return PE(n==null?void 0:n.roundingMethod)(r)}function Kw(e){Oe(1,arguments);var t=Me(e),n=t.getMonth(),r=n-n%3;return t.setMonth(r,1),t.setHours(0,0,0,0),t}function Bae(e){Oe(1,arguments);var t=Me(e);return t.setDate(1),t.setHours(0,0,0,0),t}function zae(e){Oe(1,arguments);var t=Me(e),n=new Date(0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Uae(e,t){var n,r,i,o,s,a,l,c;Oe(1,arguments);var f=Vo(),h=Qe((n=(r=(i=(o=t==null?void 0:t.weekStartsOn)!==null&&o!==void 0?o:t==null||(s=t.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.weekStartsOn)!==null&&i!==void 0?i:f.weekStartsOn)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Me(e),m=p.getDay(),v=(m=i.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function Yae(e){Oe(1,arguments);var t=r5(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var r=Uc(n);return r}var qae=6048e5;function i5(e){Oe(1,arguments);var t=Me(e),n=Uc(t).getTime()-Yae(t).getTime();return Math.round(n/qae)+1}function sl(e,t){var n,r,i,o,s,a,l,c;Oe(1,arguments);var f=Vo(),h=Qe((n=(r=(i=(o=t==null?void 0:t.weekStartsOn)!==null&&o!==void 0?o:t==null||(s=t.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.weekStartsOn)!==null&&i!==void 0?i:f.weekStartsOn)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Me(e),m=p.getUTCDay(),v=(m=1&&m<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var v=new Date(0);v.setUTCFullYear(h+1,0,m),v.setUTCHours(0,0,0,0);var y=sl(v,t),x=new Date(0);x.setUTCFullYear(h,0,m),x.setUTCHours(0,0,0,0);var _=sl(x,t);return f.getTime()>=y.getTime()?h+1:f.getTime()>=_.getTime()?h:h-1}function Gae(e,t){var n,r,i,o,s,a,l,c;Oe(1,arguments);var f=Vo(),h=Qe((n=(r=(i=(o=t==null?void 0:t.firstWeekContainsDate)!==null&&o!==void 0?o:t==null||(s=t.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.firstWeekContainsDate)!==null&&i!==void 0?i:f.firstWeekContainsDate)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&n!==void 0?n:1),p=kE(e,t),m=new Date(0);m.setUTCFullYear(p,0,h),m.setUTCHours(0,0,0,0);var v=sl(m,t);return v}var Zae=6048e5;function o5(e,t){Oe(1,arguments);var n=Me(e),r=sl(n,t).getTime()-Gae(n,t).getTime();return Math.round(r/Zae)+1}function tt(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length0?r:1-r;return tt(n==="yy"?i%100:i,n.length)},M:function(t,n){var r=t.getUTCMonth();return n==="M"?String(r+1):tt(r+1,2)},d:function(t,n){return tt(t.getUTCDate(),n.length)},a:function(t,n){var r=t.getUTCHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h:function(t,n){return tt(t.getUTCHours()%12||12,n.length)},H:function(t,n){return tt(t.getUTCHours(),n.length)},m:function(t,n){return tt(t.getUTCMinutes(),n.length)},s:function(t,n){return tt(t.getUTCSeconds(),n.length)},S:function(t,n){var r=n.length,i=t.getUTCMilliseconds(),o=Math.floor(i*Math.pow(10,r-3));return tt(o,n.length)}};const Zo=Kae;var Al={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Xae={G:function(t,n,r){var i=t.getUTCFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return r.era(i,{width:"abbreviated"});case"GGGGG":return r.era(i,{width:"narrow"});case"GGGG":default:return r.era(i,{width:"wide"})}},y:function(t,n,r){if(n==="yo"){var i=t.getUTCFullYear(),o=i>0?i:1-i;return r.ordinalNumber(o,{unit:"year"})}return Zo.y(t,n)},Y:function(t,n,r,i){var o=kE(t,i),s=o>0?o:1-o;if(n==="YY"){var a=s%100;return tt(a,2)}return n==="Yo"?r.ordinalNumber(s,{unit:"year"}):tt(s,n.length)},R:function(t,n){var r=r5(t);return tt(r,n.length)},u:function(t,n){var r=t.getUTCFullYear();return tt(r,n.length)},Q:function(t,n,r){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(n){case"Q":return String(i);case"QQ":return tt(i,2);case"Qo":return r.ordinalNumber(i,{unit:"quarter"});case"QQQ":return r.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(i,{width:"wide",context:"formatting"})}},q:function(t,n,r){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(n){case"q":return String(i);case"qq":return tt(i,2);case"qo":return r.ordinalNumber(i,{unit:"quarter"});case"qqq":return r.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(i,{width:"wide",context:"standalone"})}},M:function(t,n,r){var i=t.getUTCMonth();switch(n){case"M":case"MM":return Zo.M(t,n);case"Mo":return r.ordinalNumber(i+1,{unit:"month"});case"MMM":return r.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(i,{width:"wide",context:"formatting"})}},L:function(t,n,r){var i=t.getUTCMonth();switch(n){case"L":return String(i+1);case"LL":return tt(i+1,2);case"Lo":return r.ordinalNumber(i+1,{unit:"month"});case"LLL":return r.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(i,{width:"wide",context:"standalone"})}},w:function(t,n,r,i){var o=o5(t,i);return n==="wo"?r.ordinalNumber(o,{unit:"week"}):tt(o,n.length)},I:function(t,n,r){var i=i5(t);return n==="Io"?r.ordinalNumber(i,{unit:"week"}):tt(i,n.length)},d:function(t,n,r){return n==="do"?r.ordinalNumber(t.getUTCDate(),{unit:"date"}):Zo.d(t,n)},D:function(t,n,r){var i=Wae(t);return n==="Do"?r.ordinalNumber(i,{unit:"dayOfYear"}):tt(i,n.length)},E:function(t,n,r){var i=t.getUTCDay();switch(n){case"E":case"EE":case"EEE":return r.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(i,{width:"short",context:"formatting"});case"EEEE":default:return r.day(i,{width:"wide",context:"formatting"})}},e:function(t,n,r,i){var o=t.getUTCDay(),s=(o-i.weekStartsOn+8)%7||7;switch(n){case"e":return String(s);case"ee":return tt(s,2);case"eo":return r.ordinalNumber(s,{unit:"day"});case"eee":return r.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(o,{width:"short",context:"formatting"});case"eeee":default:return r.day(o,{width:"wide",context:"formatting"})}},c:function(t,n,r,i){var o=t.getUTCDay(),s=(o-i.weekStartsOn+8)%7||7;switch(n){case"c":return String(s);case"cc":return tt(s,n.length);case"co":return r.ordinalNumber(s,{unit:"day"});case"ccc":return r.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(o,{width:"narrow",context:"standalone"});case"cccccc":return r.day(o,{width:"short",context:"standalone"});case"cccc":default:return r.day(o,{width:"wide",context:"standalone"})}},i:function(t,n,r){var i=t.getUTCDay(),o=i===0?7:i;switch(n){case"i":return String(o);case"ii":return tt(o,n.length);case"io":return r.ordinalNumber(o,{unit:"day"});case"iii":return r.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(i,{width:"short",context:"formatting"});case"iiii":default:return r.day(i,{width:"wide",context:"formatting"})}},a:function(t,n,r){var i=t.getUTCHours(),o=i/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(t,n,r){var i=t.getUTCHours(),o;switch(i===12?o=Al.noon:i===0?o=Al.midnight:o=i/12>=1?"pm":"am",n){case"b":case"bb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(t,n,r){var i=t.getUTCHours(),o;switch(i>=17?o=Al.evening:i>=12?o=Al.afternoon:i>=4?o=Al.morning:o=Al.night,n){case"B":case"BB":case"BBB":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(t,n,r){if(n==="ho"){var i=t.getUTCHours()%12;return i===0&&(i=12),r.ordinalNumber(i,{unit:"hour"})}return Zo.h(t,n)},H:function(t,n,r){return n==="Ho"?r.ordinalNumber(t.getUTCHours(),{unit:"hour"}):Zo.H(t,n)},K:function(t,n,r){var i=t.getUTCHours()%12;return n==="Ko"?r.ordinalNumber(i,{unit:"hour"}):tt(i,n.length)},k:function(t,n,r){var i=t.getUTCHours();return i===0&&(i=24),n==="ko"?r.ordinalNumber(i,{unit:"hour"}):tt(i,n.length)},m:function(t,n,r){return n==="mo"?r.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):Zo.m(t,n)},s:function(t,n,r){return n==="so"?r.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):Zo.s(t,n)},S:function(t,n){return Zo.S(t,n)},X:function(t,n,r,i){var o=i._originalDate||t,s=o.getTimezoneOffset();if(s===0)return"Z";switch(n){case"X":return J3(s);case"XXXX":case"XX":return Oa(s);case"XXXXX":case"XXX":default:return Oa(s,":")}},x:function(t,n,r,i){var o=i._originalDate||t,s=o.getTimezoneOffset();switch(n){case"x":return J3(s);case"xxxx":case"xx":return Oa(s);case"xxxxx":case"xxx":default:return Oa(s,":")}},O:function(t,n,r,i){var o=i._originalDate||t,s=o.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+Q3(s,":");case"OOOO":default:return"GMT"+Oa(s,":")}},z:function(t,n,r,i){var o=i._originalDate||t,s=o.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+Q3(s,":");case"zzzz":default:return"GMT"+Oa(s,":")}},t:function(t,n,r,i){var o=i._originalDate||t,s=Math.floor(o.getTime()/1e3);return tt(s,n.length)},T:function(t,n,r,i){var o=i._originalDate||t,s=o.getTime();return tt(s,n.length)}};function Q3(e,t){var n=e>0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),o=r%60;if(o===0)return n+String(i);var s=t||"";return n+String(i)+s+tt(o,2)}function J3(e,t){if(e%60===0){var n=e>0?"-":"+";return n+tt(Math.abs(e)/60,2)}return Oa(e,t)}function Oa(e,t){var n=t||"",r=e>0?"-":"+",i=Math.abs(e),o=tt(Math.floor(i/60),2),s=tt(i%60,2);return r+o+n+s}const Qae=Xae;var eR=function(t,n){switch(t){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},s5=function(t,n){switch(t){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},Jae=function(t,n){var r=t.match(/(P+)(p+)?/)||[],i=r[1],o=r[2];if(!o)return eR(t,n);var s;switch(i){case"P":s=n.dateTime({width:"short"});break;case"PP":s=n.dateTime({width:"medium"});break;case"PPP":s=n.dateTime({width:"long"});break;case"PPPP":default:s=n.dateTime({width:"full"});break}return s.replace("{{date}}",eR(i,n)).replace("{{time}}",s5(o,n))},ele={p:s5,P:Jae};const Xw=ele;var tle=["D","DD"],nle=["YY","YYYY"];function a5(e){return tle.indexOf(e)!==-1}function l5(e){return nle.indexOf(e)!==-1}function vv(e,t,n){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var rle={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"}},ile=function(t,n,r){var i,o=rle[t];return typeof o=="string"?i=o:n===1?i=o.one:i=o.other.replace("{{count}}",n.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+i:i+" ago":i};const ole=ile;function E1(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,r=e.formats[n]||e.formats[e.defaultWidth];return r}}var sle={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},ale={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},lle={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},cle={date:E1({formats:sle,defaultWidth:"full"}),time:E1({formats:ale,defaultWidth:"full"}),dateTime:E1({formats:lle,defaultWidth:"full"})};const ule=cle;var fle={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},dle=function(t,n,r,i){return fle[t]};const hle=dle;function Fu(e){return function(t,n){var r=n!=null&&n.context?String(n.context):"standalone",i;if(r==="formatting"&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):o;i=e.formattingValues[s]||e.formattingValues[o]}else{var a=e.defaultWidth,l=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[l]||e.values[a]}var c=e.argumentCallback?e.argumentCallback(t):t;return i[c]}}var ple={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},mle={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},gle={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"]},vle={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"]},yle={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"}},_le={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"}},ble=function(t,n){var r=Number(t),i=r%100;if(i>20||i<10)switch(i%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},wle={ordinalNumber:ble,era:Fu({values:ple,defaultWidth:"wide"}),quarter:Fu({values:mle,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:Fu({values:gle,defaultWidth:"wide"}),day:Fu({values:vle,defaultWidth:"wide"}),dayPeriod:Fu({values:yle,defaultWidth:"wide",formattingValues:_le,defaultFormattingWidth:"wide"})};const xle=wle;function $u(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;var s=o[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?Cle(a,function(h){return h.test(s)}):Sle(a,function(h){return h.test(s)}),c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;var f=t.slice(s.length);return{value:c,rest:f}}}function Sle(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function Cle(e,t){for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:{},r=t.match(e.matchPattern);if(!r)return null;var i=r[0],o=t.match(e.parsePattern);if(!o)return null;var s=e.valueCallback?e.valueCallback(o[0]):o[0];s=n.valueCallback?n.valueCallback(s):s;var a=t.slice(i.length);return{value:s,rest:a}}}var Tle=/^(\d+)(th|st|nd|rd)?/i,Ole=/\d+/i,Ple={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},kle={any:[/^b/i,/^(a|c)/i]},Mle={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Rle={any:[/1/i,/2/i,/3/i,/4/i]},Nle={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},Lle={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]},Dle={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},Ale={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]},jle={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},Ile={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}},Fle={ordinalNumber:Ele({matchPattern:Tle,parsePattern:Ole,valueCallback:function(t){return parseInt(t,10)}}),era:$u({matchPatterns:Ple,defaultMatchWidth:"wide",parsePatterns:kle,defaultParseWidth:"any"}),quarter:$u({matchPatterns:Mle,defaultMatchWidth:"wide",parsePatterns:Rle,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:$u({matchPatterns:Nle,defaultMatchWidth:"wide",parsePatterns:Lle,defaultParseWidth:"any"}),day:$u({matchPatterns:Dle,defaultMatchWidth:"wide",parsePatterns:Ale,defaultParseWidth:"any"}),dayPeriod:$u({matchPatterns:jle,defaultMatchWidth:"any",parsePatterns:Ile,defaultParseWidth:"any"})};const $le=Fle;var Ble={code:"en-US",formatDistance:ole,formatLong:ule,formatRelative:hle,localize:xle,match:$le,options:{weekStartsOn:0,firstWeekContainsDate:1}};const ME=Ble;var zle=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ule=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Vle=/^'([^]*?)'?$/,Hle=/''/g,Wle=/[a-zA-Z]/;function vo(e,t,n){var r,i,o,s,a,l,c,f,h,p,m,v,y,x,_,w,S,T;Oe(2,arguments);var P=String(t),k=Vo(),N=(r=(i=n==null?void 0:n.locale)!==null&&i!==void 0?i:k.locale)!==null&&r!==void 0?r:ME,D=Qe((o=(s=(a=(l=n==null?void 0:n.firstWeekContainsDate)!==null&&l!==void 0?l:n==null||(c=n.locale)===null||c===void 0||(f=c.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&a!==void 0?a:k.firstWeekContainsDate)!==null&&s!==void 0?s:(h=k.locale)===null||h===void 0||(p=h.options)===null||p===void 0?void 0:p.firstWeekContainsDate)!==null&&o!==void 0?o:1);if(!(D>=1&&D<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var z=Qe((m=(v=(y=(x=n==null?void 0:n.weekStartsOn)!==null&&x!==void 0?x:n==null||(_=n.locale)===null||_===void 0||(w=_.options)===null||w===void 0?void 0:w.weekStartsOn)!==null&&y!==void 0?y:k.weekStartsOn)!==null&&v!==void 0?v:(S=k.locale)===null||S===void 0||(T=S.options)===null||T===void 0?void 0:T.weekStartsOn)!==null&&m!==void 0?m:0);if(!(z>=0&&z<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!N.localize)throw new RangeError("locale must contain localize property");if(!N.formatLong)throw new RangeError("locale must contain formatLong property");var A=Me(e);if(!e5(A))throw new RangeError("Invalid time value");var W=Bc(A),Y=n5(A,W),J={firstWeekContainsDate:D,weekStartsOn:z,locale:N,_originalDate:A},Z=P.match(Ule).map(function(ee){var ie=ee[0];if(ie==="p"||ie==="P"){var oe=Xw[ie];return oe(ee,N.formatLong)}return ee}).join("").match(zle).map(function(ee){if(ee==="''")return"'";var ie=ee[0];if(ie==="'")return Yle(ee);var oe=Qae[ie];if(oe)return!(n!=null&&n.useAdditionalWeekYearTokens)&&l5(ee)&&vv(ee,t,String(e)),!(n!=null&&n.useAdditionalDayOfYearTokens)&&a5(ee)&&vv(ee,t,String(e)),oe(Y,ee,N.localize,J);if(ie.match(Wle))throw new RangeError("Format string contains an unescaped latin alphabet character `"+ie+"`");return ee}).join("");return Z}function Yle(e){var t=e.match(Vle);return t?t[1].replace(Hle,"'"):e}function RE(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function qle(e){return RE({},e)}var tR=1440,Gle=2520,T1=43200,Zle=86400;function Kle(e,t,n){var r,i;Oe(2,arguments);var o=Vo(),s=(r=(i=n==null?void 0:n.locale)!==null&&i!==void 0?i:o.locale)!==null&&r!==void 0?r:ME;if(!s.formatDistance)throw new RangeError("locale must contain formatDistance property");var a=ym(e,t);if(isNaN(a))throw new RangeError("Invalid time value");var l=RE(qle(n),{addSuffix:!!(n!=null&&n.addSuffix),comparison:a}),c,f;a>0?(c=Me(t),f=Me(e)):(c=Me(e),f=Me(t));var h=Fae(f,c),p=(Bc(f)-Bc(c))/1e3,m=Math.round((h-p)/60),v;if(m<2)return n!=null&&n.includeSeconds?h<5?s.formatDistance("lessThanXSeconds",5,l):h<10?s.formatDistance("lessThanXSeconds",10,l):h<20?s.formatDistance("lessThanXSeconds",20,l):h<40?s.formatDistance("halfAMinute",0,l):h<60?s.formatDistance("lessThanXMinutes",1,l):s.formatDistance("xMinutes",1,l):m===0?s.formatDistance("lessThanXMinutes",1,l):s.formatDistance("xMinutes",m,l);if(m<45)return s.formatDistance("xMinutes",m,l);if(m<90)return s.formatDistance("aboutXHours",1,l);if(mr.getTime()}function Gr(e,t){Oe(2,arguments);var n=Me(e),r=Me(t);return n.getTime()"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _v(e){return _v=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},_v(e)}function NE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function bv(e){return bv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},bv(e)}function sR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var vce=function(e){hce(n,e);var t=pce(n);function n(){var r;fce(this,n);for(var i=arguments.length,o=new Array(i),s=0;s0,r=n?t:1-t,i;if(r<=50)i=e||100;else{var o=r+50,s=Math.floor(o/100)*100,a=e>=o%100;i=e+s-(a?100:0)}return n?i:1-i}function m5(e){return e%400===0||e%4===0&&e%100!==0}function xm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?xm=function(n){return typeof n}:xm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},xm(e)}function yce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function aR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function xv(e){return xv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},xv(e)}function lR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Cce=function(e){bce(n,e);var t=wce(n);function n(){var r;yce(this,n);for(var i=arguments.length,o=new Array(i),s=0;s0}},{key:"set",value:function(i,o,s){var a=i.getUTCFullYear();if(s.isTwoDigitYear){var l=p5(s.year,a);return i.setUTCFullYear(l,0,1),i.setUTCHours(0,0,0,0),i}var c=!("era"in o)||o.era===1?s.year:1-s.year;return i.setUTCFullYear(c,0,1),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function Sm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Sm=function(n){return typeof n}:Sm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Sm(e)}function Ece(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Sv(e){return Sv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Sv(e)}function uR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Rce=function(e){Oce(n,e);var t=Pce(n);function n(){var r;Ece(this,n);for(var i=arguments.length,o=new Array(i),s=0;s0}},{key:"set",value:function(i,o,s,a){var l=kE(i,a);if(s.isTwoDigitYear){var c=p5(s.year,l);return i.setUTCFullYear(c,0,a.firstWeekContainsDate),i.setUTCHours(0,0,0,0),sl(i,a)}var f=!("era"in o)||o.era===1?s.year:1-s.year;return i.setUTCFullYear(f,0,a.firstWeekContainsDate),i.setUTCHours(0,0,0,0),sl(i,a)}}]),n}(pt);function Cm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Cm=function(n){return typeof n}:Cm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Cm(e)}function Nce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Cv(e){return Cv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Cv(e)}function dR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Fce=function(e){Dce(n,e);var t=Ace(n);function n(){var r;Nce(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ev(e){return Ev=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Ev(e)}function pR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Wce=function(e){zce(n,e);var t=Uce(n);function n(){var r;$ce(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Tv(e){return Tv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Tv(e)}function gR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Qce=function(e){Gce(n,e);var t=Zce(n);function n(){var r;Yce(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=4}},{key:"set",value:function(i,o,s){return i.setUTCMonth((s-1)*3,1),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function Om(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Om=function(n){return typeof n}:Om=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Om(e)}function Jce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ov(e){return Ov=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Ov(e)}function yR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var oue=function(e){tue(n,e);var t=nue(n);function n(){var r;Jce(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=4}},{key:"set",value:function(i,o,s){return i.setUTCMonth((s-1)*3,1),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function Pm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Pm=function(n){return typeof n}:Pm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Pm(e)}function sue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _R(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Pv(e){return Pv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Pv(e)}function bR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var due=function(e){lue(n,e);var t=cue(n);function n(){var r;sue(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=11}},{key:"set",value:function(i,o,s){return i.setUTCMonth(s,1),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function km(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?km=function(n){return typeof n}:km=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},km(e)}function hue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function kv(e){return kv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},kv(e)}function xR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var _ue=function(e){mue(n,e);var t=gue(n);function n(){var r;hue(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=11}},{key:"set",value:function(i,o,s){return i.setUTCMonth(s,1),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function bue(e,t,n){Oe(2,arguments);var r=Me(e),i=Qe(t),o=o5(r,n)-i;return r.setUTCDate(r.getUTCDate()-o*7),r}function Mm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Mm=function(n){return typeof n}:Mm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Mm(e)}function wue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function SR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Mv(e){return Mv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Mv(e)}function CR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Oue=function(e){Sue(n,e);var t=Cue(n);function n(){var r;wue(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=53}},{key:"set",value:function(i,o,s,a){return sl(bue(i,s,a),a)}}]),n}(pt);function Pue(e,t){Oe(2,arguments);var n=Me(e),r=Qe(t),i=i5(n)-r;return n.setUTCDate(n.getUTCDate()-i*7),n}function Rm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Rm=function(n){return typeof n}:Rm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Rm(e)}function kue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ER(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Rv(e){return Rv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Rv(e)}function TR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Aue=function(e){Rue(n,e);var t=Nue(n);function n(){var r;kue(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=53}},{key:"set",value:function(i,o,s){return Uc(Pue(i,s))}}]),n}(pt);function Nm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Nm=function(n){return typeof n}:Nm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Nm(e)}function jue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function OR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Nv(e){return Nv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Nv(e)}function O1(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Uue=[31,28,31,30,31,30,31,31,30,31,30,31],Vue=[31,29,31,30,31,30,31,31,30,31,30,31],Hue=function(e){Fue(n,e);var t=$ue(n);function n(){var r;jue(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=Vue[l]:o>=1&&o<=Uue[l]}},{key:"set",value:function(i,o,s){return i.setUTCDate(s),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function Dm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Dm=function(n){return typeof n}:Dm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Dm(e)}function Wue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Lv(e){return Lv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Lv(e)}function P1(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Xue=function(e){que(n,e);var t=Gue(n);function n(){var r;Wue(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=366:o>=1&&o<=365}},{key:"set",value:function(i,o,s){return i.setUTCMonth(0,s),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function AE(e,t,n){var r,i,o,s,a,l,c,f;Oe(2,arguments);var h=Vo(),p=Qe((r=(i=(o=(s=n==null?void 0:n.weekStartsOn)!==null&&s!==void 0?s:n==null||(a=n.locale)===null||a===void 0||(l=a.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&o!==void 0?o:h.weekStartsOn)!==null&&i!==void 0?i:(c=h.locale)===null||c===void 0||(f=c.options)===null||f===void 0?void 0:f.weekStartsOn)!==null&&r!==void 0?r:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=Me(e),v=Qe(t),y=m.getUTCDay(),x=v%7,_=(x+7)%7,w=(_"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Dv(e){return Dv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Dv(e)}function MR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ife=function(e){efe(n,e);var t=tfe(n);function n(){var r;Que(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=6}},{key:"set",value:function(i,o,s,a){return i=AE(i,s,a),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function Im(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Im=function(n){return typeof n}:Im=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Im(e)}function ofe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function RR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Av(e){return Av=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Av(e)}function NR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ffe=function(e){afe(n,e);var t=lfe(n);function n(){var r;ofe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=6}},{key:"set",value:function(i,o,s,a){return i=AE(i,s,a),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function Fm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Fm=function(n){return typeof n}:Fm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Fm(e)}function dfe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function LR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function jv(e){return jv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},jv(e)}function DR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var yfe=function(e){pfe(n,e);var t=mfe(n);function n(){var r;dfe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=6}},{key:"set",value:function(i,o,s,a){return i=AE(i,s,a),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function _fe(e,t){Oe(2,arguments);var n=Qe(t);n%7===0&&(n=n-7);var r=1,i=Me(e),o=i.getUTCDay(),s=n%7,a=(s+7)%7,l=(a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Iv(e){return Iv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Iv(e)}function jR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Tfe=function(e){xfe(n,e);var t=Sfe(n);function n(){var r;bfe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=7}},{key:"set",value:function(i,o,s){return i=_fe(i,s),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function Bm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Bm=function(n){return typeof n}:Bm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Bm(e)}function Ofe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function IR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Fv(e){return Fv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Fv(e)}function FR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Lfe=function(e){kfe(n,e);var t=Mfe(n);function n(){var r;Ofe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function $v(e){return $v=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},$v(e)}function BR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Bfe=function(e){jfe(n,e);var t=Ife(n);function n(){var r;Dfe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Bv(e){return Bv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Bv(e)}function UR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var qfe=function(e){Vfe(n,e);var t=Hfe(n);function n(){var r;zfe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function zv(e){return zv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},zv(e)}function HR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ede=function(e){Kfe(n,e);var t=Xfe(n);function n(){var r;Gfe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=12}},{key:"set",value:function(i,o,s){var a=i.getUTCHours()>=12;return a&&s<12?i.setUTCHours(s+12,0,0,0):!a&&s===12?i.setUTCHours(0,0,0,0):i.setUTCHours(s,0,0,0),i}}]),n}(pt);function Hm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Hm=function(n){return typeof n}:Hm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Hm(e)}function tde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function WR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Uv(e){return Uv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Uv(e)}function YR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ade=function(e){rde(n,e);var t=ide(n);function n(){var r;tde(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=23}},{key:"set",value:function(i,o,s){return i.setUTCHours(s,0,0,0),i}}]),n}(pt);function Wm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Wm=function(n){return typeof n}:Wm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Wm(e)}function lde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Vv(e){return Vv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Vv(e)}function GR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var pde=function(e){ude(n,e);var t=fde(n);function n(){var r;lde(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=11}},{key:"set",value:function(i,o,s){var a=i.getUTCHours()>=12;return a&&s<12?i.setUTCHours(s+12,0,0,0):i.setUTCHours(s,0,0,0),i}}]),n}(pt);function Ym(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ym=function(n){return typeof n}:Ym=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Ym(e)}function mde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ZR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Hv(e){return Hv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Hv(e)}function KR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var wde=function(e){vde(n,e);var t=yde(n);function n(){var r;mde(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=24}},{key:"set",value:function(i,o,s){var a=s<=24?s%24:s;return i.setUTCHours(a,0,0,0),i}}]),n}(pt);function qm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?qm=function(n){return typeof n}:qm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},qm(e)}function xde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function XR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Wv(e){return Wv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Wv(e)}function QR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Pde=function(e){Cde(n,e);var t=Ede(n);function n(){var r;xde(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=59}},{key:"set",value:function(i,o,s){return i.setUTCMinutes(s,0,0),i}}]),n}(pt);function Gm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Gm=function(n){return typeof n}:Gm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Gm(e)}function kde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function JR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Yv(e){return Yv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Yv(e)}function eN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ade=function(e){Rde(n,e);var t=Nde(n);function n(){var r;kde(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=59}},{key:"set",value:function(i,o,s){return i.setUTCSeconds(s,0),i}}]),n}(pt);function Zm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Zm=function(n){return typeof n}:Zm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Zm(e)}function jde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tN(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function qv(e){return qv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},qv(e)}function nN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ude=function(e){Fde(n,e);var t=$de(n);function n(){var r;jde(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Gv(e){return Gv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Gv(e)}function iN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Zde=function(e){Wde(n,e);var t=Yde(n);function n(){var r;Vde(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Zv(e){return Zv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Zv(e)}function sN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var nhe=function(e){Qde(n,e);var t=Jde(n);function n(){var r;Kde(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Kv(e){return Kv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Kv(e)}function lN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var che=function(e){ohe(n,e);var t=she(n);function n(){var r;rhe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Xv(e){return Xv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Xv(e)}function uN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ghe=function(e){dhe(n,e);var t=hhe(n);function n(){var r;uhe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||e[Symbol.iterator]==null){if(Array.isArray(e)||(n=yhe(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,a;return{s:function(){n=e[Symbol.iterator]()},n:function(){var c=n.next();return o=c.done,c},e:function(c){s=!0,a=c},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}}}function yhe(e,t){if(e){if(typeof e=="string")return dN(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return dN(e,t)}}function dN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=1&&A<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var W=Qe((v=(y=(x=(_=r==null?void 0:r.weekStartsOn)!==null&&_!==void 0?_:r==null||(w=r.locale)===null||w===void 0||(S=w.options)===null||S===void 0?void 0:S.weekStartsOn)!==null&&x!==void 0?x:D.weekStartsOn)!==null&&y!==void 0?y:(T=D.locale)===null||T===void 0||(P=T.options)===null||P===void 0?void 0:P.weekStartsOn)!==null&&v!==void 0?v:0);if(!(W>=0&&W<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(N==="")return k===""?Me(n):new Date(NaN);var Y={firstWeekContainsDate:A,weekStartsOn:W,locale:z},J=[new lce],Z=N.match(bhe).map(function(O){var R=O[0];if(R in Xw){var I=Xw[R];return I(O,z.formatLong)}return O}).join("").match(_he),ee=[],ie=fN(Z),oe;try{var G=function(){var R=oe.value;!(r!=null&&r.useAdditionalWeekYearTokens)&&l5(R)&&vv(R,N,e),!(r!=null&&r.useAdditionalDayOfYearTokens)&&a5(R)&&vv(R,N,e);var I=R[0],X=vhe[I];if(X){var K=X.incompatibleTokens;if(Array.isArray(K)){var ae=ee.find(function(Le){return K.includes(Le.token)||Le.token===I});if(ae)throw new RangeError("The format string mustn't contain `".concat(ae.fullToken,"` and `").concat(R,"` at the same time"))}else if(X.incompatibleTokens==="*"&&ee.length>0)throw new RangeError("The format string mustn't contain `".concat(R,"` and any other token at the same time"));ee.push({token:I,fullToken:R});var ge=X.run(k,R,z.match,Y);if(!ge)return{v:new Date(NaN)};J.push(ge.setter),k=ge.rest}else{if(I.match(Che))throw new RangeError("Format string contains an unescaped latin alphabet character `"+I+"`");if(R==="''"?R="'":I==="'"&&(R=Ehe(R)),k.indexOf(R)===0)k=k.slice(R.length);else return{v:new Date(NaN)}}};for(ie.s();!(oe=ie.n()).done;){var F=G();if(eg(F)==="object")return F.v}}catch(O){ie.e(O)}finally{ie.f()}if(k.length>0&&She.test(k))return new Date(NaN);var j=J.map(function(O){return O.priority}).sort(function(O,R){return R-O}).filter(function(O,R,I){return I.indexOf(O)===R}).map(function(O){return J.filter(function(R){return R.priority===O}).sort(function(R,I){return I.subPriority-R.subPriority})}).map(function(O){return O[0]}),B=Me(n);if(isNaN(B.getTime()))return new Date(NaN);var ne=n5(B,Bc(B)),H={},q=fN(j),te;try{for(q.s();!(te=q.n()).done;){var se=te.value;if(!se.validate(ne,Y))return new Date(NaN);var pe=se.set(ne,H,Y);Array.isArray(pe)?(ne=pe[0],RE(H,pe[1])):ne=pe}}catch(O){q.e(O)}finally{q.f()}return ne}function Ehe(e){return e.match(whe)[1].replace(xhe,"'")}function The(e,t){Oe(2,arguments);var n=Me(e),r=Me(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function Ohe(e,t){Oe(2,arguments);var n=Kw(e),r=Kw(t);return n.getTime()===r.getTime()}function Phe(e,t){Oe(2,arguments);var n=Me(e),r=Me(t);return n.getFullYear()===r.getFullYear()}function Vc(e,t){Oe(2,arguments);var n=Me(e).getTime(),r=Me(t.start).getTime(),i=Me(t.end).getTime();if(!(r<=i))throw new RangeError("Invalid interval");return n>=r&&n<=i}function jE(e,t){Oe(2,arguments);var n=Qe(t);return ml(e,-n)}function Do(e,t){var n;Oe(1,arguments);var r=Qe((n=t==null?void 0:t.additionalDigits)!==null&&n!==void 0?n:2);if(r!==2&&r!==1&&r!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof e=="string"||Object.prototype.toString.call(e)==="[object String]"))return new Date(NaN);var i=Nhe(e),o;if(i.date){var s=Lhe(i.date,r);o=Dhe(s.restDateString,s.year)}if(!o||isNaN(o.getTime()))return new Date(NaN);var a=o.getTime(),l=0,c;if(i.time&&(l=Ahe(i.time),isNaN(l)))return new Date(NaN);if(i.timezone){if(c=jhe(i.timezone),isNaN(c))return new Date(NaN)}else{var f=new Date(a+l),h=new Date(0);return h.setFullYear(f.getUTCFullYear(),f.getUTCMonth(),f.getUTCDate()),h.setHours(f.getUTCHours(),f.getUTCMinutes(),f.getUTCSeconds(),f.getUTCMilliseconds()),h}return new Date(a+l+c)}var Pp={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},khe=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Mhe=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Rhe=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Nhe(e){var t={},n=e.split(Pp.dateTimeDelimiter),r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],Pp.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Pp.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){var i=Pp.timezone.exec(r);i?(t.time=r.replace(i[1],""),t.timezone=i[1]):t.time=r}return t}function Lhe(e,t){var n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};var i=r[1]?parseInt(r[1]):null,o=r[2]?parseInt(r[2]):null;return{year:o===null?i:o*100,restDateString:e.slice((r[1]||r[2]).length)}}function Dhe(e,t){if(t===null)return new Date(NaN);var n=e.match(khe);if(!n)return new Date(NaN);var r=!!n[4],i=Bu(n[1]),o=Bu(n[2])-1,s=Bu(n[3]),a=Bu(n[4]),l=Bu(n[5])-1;if(r)return zhe(t,a,l)?Ihe(t,a,l):new Date(NaN);var c=new Date(0);return!$he(t,o,s)||!Bhe(t,i)?new Date(NaN):(c.setUTCFullYear(t,o,Math.max(i,s)),c)}function Bu(e){return e?parseInt(e):1}function Ahe(e){var t=e.match(Mhe);if(!t)return NaN;var n=M1(t[1]),r=M1(t[2]),i=M1(t[3]);return Uhe(n,r,i)?n*S_+r*EE+i*1e3:NaN}function M1(e){return e&&parseFloat(e.replace(",","."))||0}function jhe(e){if(e==="Z")return 0;var t=e.match(Rhe);if(!t)return 0;var n=t[1]==="+"?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return Vhe(r,i)?n*(r*S_+i*EE):NaN}function Ihe(e,t,n){var r=new Date(0);r.setUTCFullYear(e,0,4);var i=r.getUTCDay()||7,o=(t-1)*7+n+1-i;return r.setUTCDate(r.getUTCDate()+o),r}var Fhe=[31,null,31,30,31,30,31,31,30,31,30,31];function g5(e){return e%400===0||e%4===0&&e%100!==0}function $he(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(Fhe[t]||(g5(e)?29:28))}function Bhe(e,t){return t>=1&&t<=(g5(e)?366:365)}function zhe(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function Uhe(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function Vhe(e,t){return t>=0&&t<=59}function Wi(e,t){Oe(2,arguments);var n=Me(e),r=Qe(t),i=n.getFullYear(),o=n.getDate(),s=new Date(0);s.setFullYear(i,r,15),s.setHours(0,0,0,0);var a=Jle(s);return n.setMonth(r,Math.min(o,a)),n}function Pf(e,t){Oe(2,arguments);var n=Me(e),r=Qe(t);return n.setHours(r),n}function kf(e,t){Oe(2,arguments);var n=Me(e),r=Qe(t);return n.setMinutes(r),n}function ef(e,t){Oe(2,arguments);var n=Me(e),r=Qe(t),i=Math.floor(n.getMonth()/3)+1,o=r-i;return Wi(n,n.getMonth()+o*3)}function Hhe(e,t){Oe(2,arguments);var n=Me(e),r=Qe(t);return n.setSeconds(r),n}function Qv(e,t){Oe(2,arguments);var n=Me(e),r=Qe(t);return isNaN(n.getTime())?new Date(NaN):(n.setFullYear(r),n)}function Td(e,t){Oe(2,arguments);var n=Qe(t);return to(e,-n)}function Whe(e,t){Oe(2,arguments);var n=Qe(t);return CE(e,-n)}function Od(e,t){Oe(2,arguments);var n=Qe(t);return zc(e,-n)}const Mf="yyyy-MM-dd",IE="yyyy-MM-dd HH:mm",Vs=()=>new Date,FE=e=>typeof e!="string",v5=(e,t)=>!e||!FE(e)?e:t?vo(e,t):Xle(e),y5=(e=Mf)=>t=>v5(t,e),Hs=e=>v5(e,void 0),kp=y5(),Jv=y5(IE),_i=e=>FE(e)?e:Do(e),hN=e=>e?_i(e):null,oh=(e,t,n)=>{try{return Vc(_i(e),{start:_i(t??e),end:_i(n??e)})}catch{return!1}},va=(e,t)=>c5(e,t)||Gr(e,t),sh="all",_5={today:"Today",yesterday:"Yesterday",last7Days:"Last 7 days",last30Days:"Last 30 days",last90Days:"Last 90 days",last180Days:"Last 180 days",last365Days:"Last 365 days",[sh]:void 0},b5=Object.keys(_5),w5=e=>e===void 0||Wn(bj(Boolean,e)),ey=e=>typeof e=="string"&&b5.includes(e),Yhe=b5.filter(e=>e!==sh),x5=(e,t)=>({startDate:hN(e),endDate:hN(t)}),qhe=e=>{if(!(!e||w5(e)))return e.startDate&&!e.endDate?`Since ${kp(e.startDate)}`:!e.startDate&&e.endDate?`Until ${kp(e.endDate)}`:`${kp(e.startDate)} - ${kp(e.endDate)}`},$E=e=>{if(!(!e||e===sh))return ey(e)?_5[e]:qhe(e)},Yr=e=>Lr(jE(Vs(),e)),jl=e=>({startDate:e,endDate:ol(Vs())}),S5=nC([[ga("today"),()=>jl(Lr(Vs()))],[ga("yesterday"),()=>({startDate:Yr(1),endDate:ol(jE(Vs(),1))})],[ga("last7Days"),()=>jl(Yr(7))],[ga("last30Days"),()=>jl(Yr(30))],[ga("last90Days"),()=>jl(Yr(90))],[ga("last180Days"),()=>jl(Yr(180))],[ga("last365Days"),()=>jl(Yr(365))],[hj,()=>({})]]),Ghe=e=>{const t=_i(e);return nC([[()=>va(Lr(Vs()),t),()=>"today"],[()=>va(Yr(1),t),()=>"yesterday"],[()=>va(Yr(7),t),()=>"last7Days"],[()=>va(Yr(30),t),()=>"last30Days"],[()=>va(Yr(90),t),()=>"last90Days"],[()=>va(Yr(180),t),()=>"last180Days"],[()=>va(Yr(365),t),()=>"last365Days"],[hj,()=>sh]])()},Zhe=e=>ey(e)?S5(e):e,ah=yn("shlink/visitCreation/createNewVisits",e=>({payload:{createdVisits:e}})),pN=5e3,mN=4,gN=2,Khe=({currentPage:e,pagesCount:t})=>e>=t,Xhe=(e,t)=>t*100/e,lh=({typePrefix:e,createLoaders:t,getExtraFulfilledPayload:n,shouldCancel:r})=>{const i=yn(`${e}/progressChanged`),o=yn(`${e}/large`),s=yn(`${e}/fallbackToInterval`),a=rr(e,async(l,{getState:c,dispatch:f})=>{var w;const[h,p]=t(l,c),m=async S=>Promise.all(S.map(async T=>h(T,pN).then(at("data")))).then(XG),v=async(S,T=0)=>{if(r(c))return[];const P=await m(S[T]);return f(i(Xhe(S.length,T+gN))),T{const{pagination:T,data:P}=await h(S,pN);if(!T||Khe(T))return P;const k=rC(gN,T.pagesCount+1),N=cd(mN,k);return T.pagesCount-1>mN&&f(o()),P.concat(await v(N))},[x,_]=await Promise.all([y(),p((w=l.query)==null?void 0:w.excludeBots)]);return!x.length&&_&&f(s(Ghe(_.date))),{...n(l),visits:x}});return Object.assign(a,{progressChanged:i,large:o,fallbackToInterval:s})},ch=(e,t)=>async n=>e?t({page:1,itemsPerPage:1,excludeBots:n}).then(({data:r})=>r[0]):Promise.resolve(void 0),uh=({name:e,asyncThunkCreator:t,initialState:n,filterCreatedVisits:r})=>{const{pending:i,rejected:o,fulfilled:s,large:a,progressChanged:l,fallbackToInterval:c}=t,{reducer:f,actions:h}=Yn({name:e,initialState:n,reducers:{cancelGetVisits:m=>({...m,cancelLoad:!0})},extraReducers:m=>{m.addCase(i,()=>({...n,loading:!0})),m.addCase(o,(v,{error:y})=>({...n,error:!0,errorData:no(y)})),m.addCase(s,(v,{payload:y})=>({...v,...y,loading:!1,loadingLarge:!1,error:!1})),m.addCase(a,v=>({...v,loadingLarge:!0})),m.addCase(l,(v,{payload:y})=>({...v,progress:y})),m.addCase(c,(v,{payload:y})=>({...v,fallbackInterval:y})),m.addCase(ah,(v,{payload:y})=>{const{visits:x}=v,_=r(v,y.createdVisits).map(({visit:w})=>w);return _.length?{...v,visits:[..._,...x]}:v})}}),{cancelGetVisits:p}=h;return{reducer:f,cancelGetVisits:p}},C5="shlink/domainVisits",E5="DEFAULT",Qhe={visits:[],domain:"",loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},Jhe=e=>lh({typePrefix:`${C5}/getDomainVisits`,createLoaders:({domain:t,query:n={},doIntervalFallback:r=!1},i)=>{const{getDomainVisits:o}=e(i),s=async(l,c)=>o(t,{...n,page:l,itemsPerPage:c}),a=ch(r,async l=>o(t,l));return[s,a]},getExtraFulfilledPayload:({domain:t,query:n={}})=>({domain:t,query:n}),shouldCancel:t=>t().domainVisits.cancelLoad}),epe=e=>uh({name:C5,initialState:Qhe,asyncThunkCreator:e,filterCreatedVisits:({domain:t,query:n={}},r)=>{const{startDate:i,endDate:o}=n;return r.filter(({shortUrl:s,visit:a})=>s&&wae(s,t)&&oh(a.date,i,o))}}),ou=({children:e,label:t,className:n="",labelClassName:r="",noMargin:i=!1,id:o})=>g.jsxs("div",{className:`${n} ${i?"":"mb-3"}`,children:[g.jsx("label",{className:`form-label ${r}`,htmlFor:o,children:t}),e]}),tg=({children:e,value:t,onChange:n,type:r,required:i,placeholder:o,className:s,labelClassName:a})=>{const l=b_();return g.jsx(ou,{label:g.jsxs(g.Fragment,{children:[e,":"]}),className:s??"",labelClassName:a,id:l,children:g.jsx("input",{id:l,className:"form-control",type:r??"text",value:t,required:i??!0,placeholder:o,onChange:c=>n(c.target.value)})})},ng=({className:e="",placement:t,children:n})=>{const r=pl();return g.jsxs(g.Fragment,{children:[g.jsx("span",{className:e,ref:r,children:g.jsx(je,{icon:gC})}),g.jsx(Er,{target:r,placement:t,children:n})]})},R1=({isLast:e,...t})=>g.jsx(tg,{...t,required:!1,type:"url",placeholder:"No redirect",className:e?"mb-0":""}),tpe=({isOpen:e,toggle:t,domain:n,editDomainRedirects:r})=>{var h,p,m;const[i,o]=V.useState(((h=n.redirects)==null?void 0:h.baseUrlRedirect)??""),[s,a]=V.useState(((p=n.redirects)==null?void 0:p.regular404Redirect)??""),[l,c]=V.useState(((m=n.redirects)==null?void 0:m.invalidShortUrlRedirect)??""),f=rh(async()=>r({domain:n.domain,redirects:{baseUrlRedirect:S1(i),regular404Redirect:S1(s),invalidShortUrlRedirect:S1(l)}}).then(t));return g.jsx(Uo,{isOpen:e,toggle:t,centered:!0,children:g.jsxs("form",{name:"domainRedirectsModal",onSubmit:f,children:[g.jsxs(ro,{toggle:t,children:["Edit redirects for ",g.jsx("b",{children:n.domain})]}),g.jsxs(ki,{children:[g.jsxs(R1,{value:i,onChange:o,children:[g.jsxs(ng,{className:"me-2",placement:"bottom",children:["Visitors accessing the base url, as in ",g.jsxs("b",{children:["https://",n.domain,"/"]}),", will be redirected to this URL."]}),"Base URL"]}),g.jsxs(R1,{value:s,onChange:a,children:[g.jsxs(ng,{className:"me-2",placement:"bottom",children:["Visitors accessing a url not matching a short URL pattern, as in ",g.jsxs("b",{children:["https://",n.domain,"/???/[...]"]}),", will be redirected to this URL."]}),"Regular 404"]}),g.jsxs(R1,{value:l,isLast:!0,onChange:c,children:[g.jsx(ng,{className:"me-2",placement:"bottom",children:"Visitors accessing a url matching a short URL pattern, but not matching an existing short code, will be redirected to this URL."}),"Invalid short URL"]})]}),g.jsxs(ea,{children:[g.jsx(ht,{color:"link",type:"button",onClick:t,children:"Cancel"}),g.jsx(ht,{color:"primary",children:"Save"})]})]})})},npe=({domain:e,editDomainRedirects:t,selectedServer:n})=>{const[r,i]=It(),[o,s]=It(),{isDefault:a}=e,l=!a||Pi("defaultDomainRedirectsEdition",n),c=Pi("domainVisits",n),f=Vd(n);return g.jsxs(x_,{isOpen:r,toggle:i,children:[c&&g.jsxs(Ue,{tag:Lt,to:`/server/${f}/domain/${e.domain}${e.isDefault?`_${E5}`:""}/visits`,children:[g.jsx(je,{icon:mC,fixedWidth:!0})," Visit stats"]}),g.jsxs(Ue,{disabled:!l,onClick:l?s:void 0,children:[g.jsx(je,{fixedWidth:!0,icon:pC})," Edit redirects"]}),g.jsx(tpe,{domain:e,isOpen:o,toggle:s,editDomainRedirects:t})]})},rpe=({status:e,matchMedia:t=window.matchMedia})=>{const n=pl(),r=()=>t("(max-width: 991px)").matches,[i,o]=V.useState(r());return V.useEffect(()=>{const s=()=>o(r());return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[]),e==="validating"?g.jsx(je,{fixedWidth:!0,icon:Yj,spin:!0}):g.jsxs(g.Fragment,{children:[g.jsx("span",{ref:n,children:e==="valid"?g.jsx(je,{fixedWidth:!0,icon:fd,className:"text-muted"}):g.jsx(je,{fixedWidth:!0,icon:yw,className:"text-danger"})}),g.jsx(Er,{target:n,placement:i?"top-start":"left",autohide:e==="valid",children:e==="valid"?"Congratulations! This domain is properly configured.":g.jsxs("span",{children:["Oops! There is some missing configuration, and short URLs shared with this domain will not work.",g.jsx("br",{}),"Check the ",g.jsx(Si,{href:"https://slnk.to/multi-domain-docs",children:"documentation"})," in order to find out what is missing."]})})]})},N1=({fallback:e})=>g.jsxs("span",{className:"text-muted",children:[!e&&g.jsx("small",{children:"No redirect"}),e&&g.jsxs(g.Fragment,{children:[e," ",g.jsx("small",{children:"(as fallback)"})]})]}),ipe=()=>g.jsxs(g.Fragment,{children:[g.jsx(je,{fixedWidth:!0,icon:qX,className:"text-primary",id:"defaultDomainIcon"}),g.jsx(Er,{target:"defaultDomainIcon",placement:"right",children:"Default domain"})]}),ope=({domain:e,editDomainRedirects:t,checkDomainHealth:n,defaultRedirects:r,selectedServer:i})=>{const{domain:o,isDefault:s,redirects:a,status:l}=e;return V.useEffect(()=>{n(e.domain)},[]),g.jsxs("tr",{className:"responsive-table__row",children:[g.jsx("td",{className:"responsive-table__cell","data-th":"Is default domain",children:s&&g.jsx(ipe,{})}),g.jsx("th",{className:"responsive-table__cell","data-th":"Domain",children:o}),g.jsx("td",{className:"responsive-table__cell","data-th":"Base path redirect",children:(a==null?void 0:a.baseUrlRedirect)??g.jsx(N1,{fallback:r==null?void 0:r.baseUrlRedirect})}),g.jsx("td",{className:"responsive-table__cell","data-th":"Regular 404 redirect",children:(a==null?void 0:a.regular404Redirect)??g.jsx(N1,{fallback:r==null?void 0:r.regular404Redirect})}),g.jsx("td",{className:"responsive-table__cell","data-th":"Invalid short URL redirect",children:(a==null?void 0:a.invalidShortUrlRedirect)??g.jsx(N1,{fallback:r==null?void 0:r.invalidShortUrlRedirect})}),g.jsx("td",{className:"responsive-table__cell text-lg-center","data-th":"Status",children:g.jsx(rpe,{status:l})}),g.jsx("td",{className:"responsive-table__cell text-end",children:g.jsx(npe,{domain:e,editDomainRedirects:t,selectedServer:i})})]})},vN=["","Domain","Base path redirect","Regular 404 redirect","Invalid short URL redirect","",""],spe=({listDomains:e,domainsList:t,filterDomains:n,editDomainRedirects:r,checkDomainHealth:i,selectedServer:o})=>{var m;const{filteredDomains:s,defaultRedirects:a,loading:l,error:c,errorData:f}=t,h=a??((m=s.find(({isDefault:v})=>v))==null?void 0:m.redirects);if(V.useEffect(()=>{e()},[]),l)return g.jsx(So,{loading:!0});const p=()=>c?g.jsx(Nr,{type:"error",children:g.jsx(Lo,{errorData:f,fallbackMessage:"Error loading domains :("})}):g.jsx(un,{children:g.jsxs("table",{className:"table table-hover responsive-table mb-0",children:[g.jsx("thead",{className:"responsive-table__header",children:g.jsx("tr",{children:vN.map((v,y)=>g.jsx("th",{children:v},y))})}),g.jsxs("tbody",{children:[s.length<1&&g.jsx("tr",{children:g.jsx("td",{colSpan:vN.length,className:"text-center",children:"No results found"})}),s.map(v=>g.jsx(ope,{domain:v,editDomainRedirects:r,checkDomainHealth:i,defaultRedirects:h,selectedServer:o},v.domain))]})]})});return g.jsxs(g.Fragment,{children:[g.jsx(ih,{className:"mb-3",onChange:n}),p()]})},ape="shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS",lpe=e=>rr(ape,async({domain:t,redirects:n},{getState:r})=>{const{editDomainRedirects:i}=e(r),o=await i({domain:t,...n});return{domain:t,redirects:o}}),cpe=(e,t)=>{const[n,r]=e.split("://"),[,...i]=r.split("/"),o=i.length?`/${i.join("/")}`:"";return`${n}://${t}${o}`},Mp="shlink/domainsList",Rp={domains:[],filteredDomains:[],loading:!1,error:!1},yN=({domain:e,redirects:t})=>n=>n.domain!==e?n:{...n,redirects:t},_N=(e,t)=>n=>n.domain!==e?n:{...n,status:t},upe=(e,t)=>{const n=rr(`${Mp}/listDomains`,async(s,{getState:a})=>{const{listDomains:l}=e(a),{data:c,defaultRedirects:f}=await l();return{domains:c.map(h=>({...h,status:"validating"})),defaultRedirects:f}}),r=rr(`${Mp}/checkDomainHealth`,async(s,{getState:a})=>{const{selectedServer:l}=a();if(!iC(l))return{domain:s,status:"invalid"};try{const{url:c,...f}=l,{health:h}=e({...f,url:cpe(c,s)}),{status:p}=await h();return{domain:s,status:p==="pass"?"valid":"invalid"}}catch{return{domain:s,status:"invalid"}}}),i=yn(`${Mp}/filterDomains`),{reducer:o}=Yn({name:Mp,initialState:Rp,reducers:{},extraReducers:s=>{s.addCase(n.pending,()=>({...Rp,loading:!0})),s.addCase(n.rejected,(a,{error:l})=>({...Rp,error:!0,errorData:no(l)})),s.addCase(n.fulfilled,(a,{payload:l})=>({...Rp,...l,filteredDomains:l.domains})),s.addCase(r.fulfilled,({domains:a,filteredDomains:l,...c},{payload:f})=>({...c,domains:a.map(_N(f.domain,f.status)),filteredDomains:l.map(_N(f.domain,f.status))})),s.addCase(i,(a,{payload:l})=>({...a,filteredDomains:a.domains.filter(({domain:c})=>c.toLowerCase().match(l.toLowerCase()))})),s.addCase(t.fulfilled,(a,{payload:l})=>({...a,domains:a.domains.map(yN(l)),filteredDomains:a.filteredDomains.map(yN(l))}))}});return{reducer:o,listDomains:n,checkDomainHealth:r,filterDomains:i}},fpe=(e,t)=>{e.serviceFactory("DomainSelector",()=>_ae),e.decorator("DomainSelector",t(["domainsList"],["listDomains"])),e.serviceFactory("ManageDomains",()=>spe),e.decorator("ManageDomains",t(["domainsList","selectedServer"],["listDomains","filterDomains","editDomainRedirects","checkDomainHealth"])),e.serviceFactory("domainsListReducerCreator",upe,"buildShlinkApiClient","editDomainRedirects"),e.serviceFactory("domainsListReducer",at("reducer"),"domainsListReducerCreator"),e.serviceFactory("listDomains",at("listDomains"),"domainsListReducerCreator"),e.serviceFactory("filterDomains",at("filterDomains"),"domainsListReducerCreator"),e.serviceFactory("editDomainRedirects",lpe,"buildShlinkApiClient"),e.serviceFactory("checkDomainHealth",at("checkDomainHealth"),"domainsListReducerCreator")},bN="shlink/mercure",dpe={loading:!0,error:!1},hpe=e=>{const t=rr(`${bN}/loadMercureInfo`,(r,{getState:i})=>{const{settings:o}=i();if(!o.realTimeUpdates.enabled)throw new Error("Real time updates not enabled");return e(i).mercureInfo()}),{reducer:n}=Yn({name:bN,initialState:dpe,reducers:{},extraReducers:r=>{r.addCase(t.pending,i=>({...i,loading:!0,error:!1})),r.addCase(t.rejected,i=>({...i,loading:!1,error:!0})),r.addCase(t.fulfilled,(i,{payload:o})=>({...o,loading:!1,error:!1}))}});return{loadMercureInfo:t,reducer:n}},ppe=e=>{e.serviceFactory("mercureInfoReducerCreator",hpe,"buildShlinkApiClient"),e.serviceFactory("mercureInfoReducer",at("reducer"),"mercureInfoReducerCreator"),e.serviceFactory("loadMercureInfo",at("loadMercureInfo"),"mercureInfoReducerCreator")},T5=({isOpen:e,duplicatedServers:t,onDiscard:n,onSave:r})=>{const i=t.length>1;return g.jsxs(Uo,{centered:!0,isOpen:e,children:[g.jsxs(ro,{children:["Duplicated server",i&&"s"]}),g.jsxs(ki,{children:[g.jsx("p",{children:i?"The next servers already exist:":"There is already a server with:"}),g.jsx("ul",{children:t.map(({url:o,apiKey:s},a)=>i?g.jsxs("li",{children:[g.jsx("b",{children:o})," - ",g.jsx("b",{children:s})]},a):g.jsxs(V.Fragment,{children:[g.jsxs("li",{children:["URL: ",g.jsx("b",{children:o})]}),g.jsxs("li",{children:["API key: ",g.jsx("b",{children:s})]})]},a))}),g.jsxs("span",{children:[i?"Do you want to ignore duplicated servers":"Do you want to save this server anyway","?"]})]}),g.jsxs(ea,{children:[g.jsx(ht,{color:"link",onClick:n,children:i?"Ignore duplicated":"Discard"}),g.jsx(ht,{color:"primary",onClick:r,children:"Save anyway"})]})]})},O5=({onSubmit:e,initialValues:t,children:n,title:r})=>{const[i,o]=V.useState(""),[s,a]=V.useState(""),[l,c]=V.useState(""),f=rh(()=>e({name:i,url:s,apiKey:l}));return V.useEffect(()=>{t&&o(t.name),t&&a(t.url),t&&c(t.apiKey)},[t]),g.jsxs("form",{className:"server-form",name:"serverForm",onSubmit:f,children:[g.jsxs(un,{className:"mb-3",title:r,children:[g.jsx(tg,{value:i,onChange:o,children:"Name"}),g.jsx(tg,{type:"url",value:s,onChange:a,children:"URL"}),g.jsx(tg,{value:l,onChange:c,children:"API key"})]}),g.jsx("div",{className:"text-end",children:n})]})},wN=4e3,xN=({type:e})=>g.jsx("div",{className:"mt-3",children:g.jsxs(Nr,{type:e,children:[e==="success"&&"Servers properly imported. You can now select one from the list :)",e==="error"&&"The servers could not be imported. Make sure the format is correct."]})}),mpe=(e,t)=>({servers:n,createServers:r})=>{const i=Io(),o=ta(),s=!!Object.keys(n).length,[a,l]=t(!1,wN),[c,f]=t(!1,wN),[h,p]=It(),[m,v]=V.useState(),y=()=>{if(!m)return;const x=lE();r([{...m,id:x}]),i(`/server/${x}`)};return V.useEffect(()=>{Object.values(n).some(({url:_,apiKey:w})=>(m==null?void 0:m.url)===_&&(m==null?void 0:m.apiKey)===w)?p():y()},[m]),g.jsxs(iu,{children:[g.jsxs(O5,{title:g.jsx("h5",{className:"mb-0",children:"Add new server"}),onSubmit:v,children:[!s&&g.jsx(e,{tooltipPlacement:"top",onImport:l,onImportError:f}),s&&g.jsx(ht,{outline:!0,onClick:o,children:"Cancel"}),g.jsx(ht,{outline:!0,color:"primary",className:"ms-2",children:"Create server"})]}),a&&g.jsx(xN,{type:"success"}),c&&g.jsx(xN,{type:"error"}),g.jsx(T5,{isOpen:h,duplicatedServers:m?[m]:[],onDiscard:o,onSave:y})]})},gpe=e=>({server:t,className:n,children:r,textClassName:i})=>{const[o,,s,a]=It();return g.jsxs(g.Fragment,{children:[g.jsxs("span",{className:n,onClick:s,children:[!r&&g.jsx(je,{fixedWidth:!0,icon:hC}),g.jsx("span",{className:i,children:r??"Remove this server"})]}),g.jsx(e,{server:t,isOpen:o,toggle:a})]})},vpe=({server:e,toggle:t,isOpen:n,deleteServer:r,redirectHome:i=!0})=>{const o=Io(),s=V.useRef(!1),a=()=>{s.current=!0,t()},l=()=>{s.current&&(r(e),i&&o("/"))};return g.jsxs(Uo,{isOpen:n,toggle:t,centered:!0,onClosed:l,children:[g.jsx(ro,{toggle:t,className:"text-danger",children:"Remove server"}),g.jsxs(ki,{children:[g.jsxs("p",{children:["Are you sure you want to remove ",g.jsx("b",{children:e?e.name:""}),"?"]}),g.jsx("p",{children:g.jsx("i",{children:"No data will be deleted, only the access to this server will be removed from this device. You can create it again at any moment."})})]}),g.jsxs(ea,{children:[g.jsx(ht,{color:"link",onClick:t,children:"Cancel"}),g.jsx(ht,{color:"danger",onClick:a,children:"Delete"})]})]})},ype=e=>V6(({editServer:t,selectedServer:n,selectServer:r})=>{const i=ta(),{reconnect:o}=Soe();if(!Ps(n))return null;const s=a=>{t(n.id,a),o==="true"&&r(n.id),i()};return g.jsx(iu,{children:g.jsxs(O5,{title:g.jsxs("h5",{className:"mb-0",children:['Edit "',n.name,'"']}),initialValues:n,onSubmit:s,children:[g.jsx(ht,{outline:!0,className:"me-2",onClick:i,children:"Cancel"}),g.jsx(ht,{outline:!0,color:"primary",children:"Save"})]})})},e);const SN=e=>({url:t,apiKey:n})=>e.some(r=>r.url===t&&r.apiKey===n),_pe=({importServersFromFile:e})=>({createServers:t,servers:n,children:r,onImport:i=()=>{},onImportError:o=()=>{},tooltipPlacement:s="bottom",className:a=""})=>{const l=pl(),[c,f]=V.useState(),[h,p]=V.useState([]),[m,,v,y]=It(),x=Dt(t,i),_=Dt(()=>x(c??[]),y),w=Dt(()=>x((c??[]).filter(pG(SN(h)))),y),S=async({target:T})=>{var P;return e((P=T.files)==null?void 0:P[0]).then(f).then(()=>{T.value=null}).catch(o)};return V.useEffect(()=>{if(!c)return;const T=Object.values(n),P=c.filter(SN(T)),k=!!P.length;k?p(P):x(c),k&&v()},[c]),g.jsxs(g.Fragment,{children:[g.jsxs(ht,{outline:!0,id:"importBtn",className:a,onClick:()=>{var T;return(T=l.current)==null?void 0:T.click()},children:[g.jsx(je,{icon:JX,fixedWidth:!0})," ",r??"Import from file"]}),g.jsxs(Er,{placement:s,target:"importBtn",children:["You can create servers by importing a CSV file with columns ",g.jsx("b",{children:"name"}),", ",g.jsx("b",{children:"apiKey"})," and ",g.jsx("b",{children:"url"}),"."]}),g.jsx("input",{type:"file",accept:"text/csv",className:"import-servers-btn__csv-select",ref:l,onChange:S}),g.jsx(T5,{isOpen:m,duplicatedServers:h,onDiscard:w,onSave:_})]})};const bpe=e=>({servers:t,selectedServer:n})=>g.jsx(iu,{children:g.jsxs("div",{className:"server-error__container flex-column",children:[g.jsxs(So,{className:"w-100 mb-3 mb-md-5",type:"error",fullWidth:!0,children:[!Ps(n)&&"Could not find this Shlink server.",Ps(n)&&g.jsxs(g.Fragment,{children:[g.jsx("p",{children:"Oops! Could not connect to this Shlink server."}),"Make sure you have internet connection, and the server is properly configured and on-line."]})]}),g.jsxs(z6,{servers:Object.values(t),children:["These are the Shlink servers currently configured. Choose one of them or ",g.jsx(Lt,{to:"/server/create",children:"add a new one"}),"."]}),Ps(n)&&g.jsx("div",{className:"container mt-3 mt-md-5",children:g.jsxs("h5",{children:["Alternatively, if you think you may have miss-configured this server, you can ",g.jsx(e,{server:n,className:"server-error__delete-btn",children:"remove it"})," or ",g.jsx(Lt,{to:`/server/${n.id}/edit?reconnect=true`,children:"edit it"}),"."]})})]})}),wpe=4e3,xpe=(e,t,n,r)=>({servers:i})=>{const o=Object.values(i),[s,a]=V.useState(o),l=p=>a(o.filter(({name:m,url:v})=>`${m} ${v}`.toLowerCase().match(p.toLowerCase()))),c=s.some(({autoConnect:p})=>!!p),[f,h]=n(!1,wpe);return V.useEffect(()=>{a(Object.values(i))},[i]),g.jsxs(iu,{children:[g.jsx(ih,{className:"mb-3",onChange:l}),g.jsxs(Qn,{className:"mb-3",children:[g.jsxs("div",{className:"col-md-6 d-flex d-md-block mb-2 mb-md-0",children:[g.jsx(t,{className:"flex-fill",onImportError:h,children:"Import servers"}),o.length>0&&g.jsxs(ht,{outline:!0,className:"ms-2 flex-fill",onClick:async()=>e.exportServers(),children:[g.jsx(je,{icon:Xj,fixedWidth:!0})," Export servers"]})]}),g.jsx("div",{className:"col-md-6 text-md-end d-flex d-md-block",children:g.jsxs(ht,{outline:!0,color:"primary",className:"flex-fill",tag:Lt,to:"/server/create",children:[g.jsx(je,{icon:vC,fixedWidth:!0})," Add a server"]})})]}),g.jsx(un,{children:g.jsxs("table",{className:"table table-hover responsive-table mb-0",children:[g.jsx("thead",{className:"responsive-table__header",children:g.jsxs("tr",{children:[c&&g.jsx("th",{"aria-label":"Auto-connect",style:{width:"50px"}}),g.jsx("th",{children:"Name"}),g.jsx("th",{children:"Base URL"}),g.jsx("th",{"aria-label":"Options"})]})}),g.jsxs("tbody",{children:[!s.length&&g.jsx("tr",{className:"text-center",children:g.jsx("td",{colSpan:4,children:"No servers found."})}),s.map(p=>g.jsx(r,{server:p,hasAutoConnect:c},p.id))]})]})}),f&&g.jsx("div",{className:"mt-3",children:g.jsx(Nr,{type:"error",children:"The servers could not be imported. Make sure the format is correct."})})]})},Spe=e=>({server:t,hasAutoConnect:n})=>g.jsxs("tr",{className:"responsive-table__row",children:[n&&g.jsx("td",{className:"responsive-table__cell","data-th":"Auto-connect",children:t.autoConnect&&g.jsxs(g.Fragment,{children:[g.jsx(je,{icon:fd,className:"text-primary",id:"autoConnectIcon"}),g.jsx(Er,{target:"autoConnectIcon",placement:"right",children:"Auto-connect to this server"})]})}),g.jsx("th",{className:"responsive-table__cell","data-th":"Name",children:g.jsx(Lt,{to:`/server/${t.id}`,children:t.name})}),g.jsx("td",{className:"responsive-table__cell","data-th":"Base URL",children:t.url}),g.jsx("td",{className:"responsive-table__cell text-end",children:g.jsx(e,{server:t})})]});var Cpe={prefix:"far",iconName:"calendar-days",icon:[448,512,["calendar-alt"],"f073","M152 24c0-13.3-10.7-24-24-24s-24 10.7-24 24V64H64C28.7 64 0 92.7 0 128v16 48V448c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V192 144 128c0-35.3-28.7-64-64-64H344V24c0-13.3-10.7-24-24-24s-24 10.7-24 24V64H152V24zM48 192h80v56H48V192zm0 104h80v64H48V296zm128 0h96v64H176V296zm144 0h80v64H320V296zm80-48H320V192h80v56zm0 160v40c0 8.8-7.2 16-16 16H320V408h80zm-128 0v56H176V408h96zm-144 0v56H64c-8.8 0-16-7.2-16-16V408h80zM272 248H176V192h96v56z"]},Epe=Cpe,Tpe={prefix:"far",iconName:"circle-right",icon:[512,512,[61838,"arrow-alt-circle-right"],"f35a","M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM294.6 135.1c-4.2-4.5-10.1-7.1-16.3-7.1C266 128 256 138 256 150.3V208H160c-17.7 0-32 14.3-32 32v32c0 17.7 14.3 32 32 32h96v57.7c0 12.3 10 22.3 22.3 22.3c6.2 0 12.1-2.6 16.3-7.1l99.9-107.1c3.5-3.8 5.5-8.7 5.5-13.8s-2-10.1-5.5-13.8L294.6 135.1z"]},Ope=Tpe,Ppe={prefix:"far",iconName:"circle",icon:[512,512,[128308,128309,128992,128993,128994,128995,128996,9679,9898,9899,11044,61708,61915],"f111","M512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256zM256 48C141.1 48 48 141.1 48 256C48 370.9 141.1 464 256 464C370.9 464 464 370.9 464 256C464 141.1 370.9 48 256 48z"]},P5={prefix:"far",iconName:"clone",icon:[512,512,[],"f24d","M64 464H288c8.8 0 16-7.2 16-16V384h48v64c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V224c0-35.3 28.7-64 64-64h64v48H64c-8.8 0-16 7.2-16 16V448c0 8.8 7.2 16 16 16zM224 304H448c8.8 0 16-7.2 16-16V64c0-8.8-7.2-16-16-16H224c-8.8 0-16 7.2-16 16V288c0 8.8 7.2 16 16 16zm-64-16V64c0-35.3 28.7-64 64-64H448c35.3 0 64 28.7 64 64V288c0 35.3-28.7 64-64 64H224c-35.3 0-64-28.7-64-64z"]};const kpe=e=>({server:t,setAutoConnect:n})=>{const[r,i]=It(),[o,,s,a]=It(),l=`/server/${t.id}`,{autoConnect:c}=t,f=c?XX:Ppe;return g.jsxs(x_,{isOpen:r,toggle:i,children:[g.jsxs(Ue,{tag:Lt,to:l,children:[g.jsx(je,{icon:ZX,fixedWidth:!0})," Connect"]}),g.jsxs(Ue,{tag:Lt,to:`${l}/edit`,children:[g.jsx(je,{icon:pC,fixedWidth:!0})," Edit server"]}),g.jsxs(Ue,{onClick:()=>n(t,!c),children:[g.jsx(je,{icon:f,fixedWidth:!0})," ",c?"Do not a":"A","uto-connect"]}),g.jsx(Ue,{divider:!0}),g.jsxs(Ue,{className:"dropdown-item--danger",onClick:s,children:[g.jsx(je,{icon:hC,fixedWidth:!0})," Remove server"]}),g.jsx(e,{redirectHome:!1,server:t,isOpen:o,toggle:a})]})};var ty={},Mpe={get exports(){return ty},set exports(e){ty=e}};/** @license + `);return Array.prototype.forEach.call(o,s=>{Array.prototype.forEach.call(i,a=>{a.addEventListener(s,t,r)})}),function(){Array.prototype.forEach.call(o,a=>{Array.prototype.forEach.call(i,l=>{l.removeEventListener(a,t,r)})})}}const s6=["a[href]","area[href]","input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","object","embed","[tabindex]:not(.modal):not(.offcanvas)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'];C.oneOfType([C.bool,C.string]),C.string,C.object;const mne=["className","cssModule","noGutters","tag","widths"],gne=["xs","sm","md","lg","xl","xxl"],kl=C.oneOfType([C.number,C.string]),vne={tag:Pe,noGutters:r6(C.bool,"Please use Bootstrap 5 gutter utility classes. https://getbootstrap.com/docs/5.0/layout/gutters/"),className:C.string,cssModule:C.object,xs:kl,sm:kl,md:kl,lg:kl,xl:kl,xxl:kl,widths:C.array},yne={tag:"div",widths:gne};function Qn(e){const{className:t,cssModule:n,noGutters:r,tag:i,widths:o}=e,s=qe(e,mne),a=[];o.forEach((c,f)=>{let h=e[c];if(delete s[c],!h)return;const p=!f;a.push(p?`row-cols-${h}`:`row-cols-${c}-${h}`)});const l=Fe(me(t,r?"gx-0":null,"row",a),n);return U.createElement(i,$e({},s,{className:l}))}Qn.propTypes=vne;Qn.defaultProps=yne;const _ne=["className","cssModule","widths","tag"],a6=["xs","sm","md","lg","xl","xxl"],c3=C.oneOfType([C.number,C.string]),Ml=C.oneOfType([C.bool,C.number,C.string,C.shape({size:C.oneOfType([C.bool,C.number,C.string]),order:c3,offset:c3})]),bne={tag:Pe,xs:Ml,sm:Ml,md:Ml,lg:Ml,xl:Ml,xxl:Ml,className:C.string,cssModule:C.object,widths:C.array},wne={tag:"div",widths:a6},u3=(e,t,n)=>n===!0||n===""?e?"col":`col-${t}`:n==="auto"?e?"col-auto":`col-${t}-auto`:e?`col-${n}`:`col-${t}-${n}`,xne=(e,t,n=a6)=>{const r=e,i=[];return n.forEach((o,s)=>{let a=r[o];if(delete r[o],!a&&a!=="")return;const l=!s;if(iv(a)){const c=l?"-":`-${o}-`,f=u3(l,o,a.size);i.push(Fe(me({[f]:a.size||a.size==="",[`order${c}${a.order}`]:a.order||a.order===0,[`offset${c}${a.offset}`]:a.offset||a.offset===0}),t))}else{const c=u3(l,o,a);i.push(c)}}),{colClasses:i,modifiedAttributes:r}};function jC(e){const{className:t,cssModule:n,widths:r,tag:i}=e,o=qe(e,_ne);let{modifiedAttributes:s,colClasses:a}=xne(o,n,r);a.length||a.push("col");const l=Fe(me(t,a),n);return U.createElement(i,$e({},s,{className:l}))}jC.propTypes=bne;jC.defaultProps=wne;const Sne=["expand","className","cssModule","light","dark","fixed","sticky","color","container","tag","children"],Cne={children:C.node,className:C.string,color:C.string,container:C.oneOfType([C.bool,C.string]),cssModule:C.object,dark:C.bool,expand:C.oneOfType([C.bool,C.string]),fixed:C.string,full:C.bool,light:C.bool,role:C.string,sticky:C.string,tag:Pe},Ene={tag:"nav",expand:!1,container:"fluid"},Tne=e=>e===!1?!1:e===!0||e==="xs"?"navbar-expand":`navbar-expand-${e}`;function IC(e){const{expand:t,className:n,cssModule:r,light:i,dark:o,fixed:s,sticky:a,color:l,container:c,tag:f,children:h}=e,p=qe(e,Sne),m=Fe(me(n,"navbar",Tne(t),{"navbar-light":i,"navbar-dark":o,[`bg-${l}`]:l,[`fixed-${s}`]:s,[`sticky-${a}`]:a}),r),v=c&&c===!0?"container":`container-${c}`;return U.createElement(f,$e({},p,{className:m}),c?U.createElement("div",{className:v},h):h)}IC.propTypes=Cne;IC.defaultProps=Ene;const One=["className","cssModule","tag"],Pne={className:C.string,cssModule:C.object,tag:Pe},kne={tag:"a"};function FC(e){const{className:t,cssModule:n,tag:r}=e,i=qe(e,One),o=Fe(me(t,"navbar-brand"),n);return U.createElement(r,$e({},i,{className:o}))}FC.propTypes=Pne;FC.defaultProps=kne;C.string,C.object,C.bool;const Mne=["className","cssModule","children","tag"],Rne={className:C.string,cssModule:C.object,tag:Pe,type:C.string,children:C.node},Nne={tag:"button",type:"button"};function $C(e){const{className:t,cssModule:n,children:r,tag:i}=e,o=qe(e,Mne),s=Fe(me(t,"navbar-toggler"),n);return U.createElement(i,$e({"aria-label":"Toggle navigation"},o,{className:s}),r||U.createElement("span",{className:Fe("navbar-toggler-icon",n)}))}$C.propTypes=Rne;$C.defaultProps=Nne;const Lne=["className","cssModule","tabs","pills","vertical","horizontal","justified","fill","navbar","card","tag"],Dne={card:C.bool,className:C.string,cssModule:C.object,fill:C.bool,horizontal:C.oneOf(["center","end"]),justified:C.bool,navbar:C.bool,pills:C.bool,tabs:C.bool,tag:Pe,vertical:C.oneOfType([C.bool,C.string])},Ane={tag:"ul",vertical:!1},jne=e=>e===!1?!1:e===!0||e==="xs"?"flex-column":`flex-${e}-column`;function c_(e){const{className:t,cssModule:n,tabs:r,pills:i,vertical:o,horizontal:s,justified:a,fill:l,navbar:c,card:f,tag:h}=e,p=qe(e,Lne),m=Fe(me(t,c?"navbar-nav":"nav",s?`justify-content-${s}`:!1,jne(o),{"nav-tabs":r,"card-header-tabs":f&&r,"nav-pills":i,"card-header-pills":f&&i,"nav-justified":a,"nav-fill":l}),n);return U.createElement(h,$e({},p,{className:m}))}c_.propTypes=Dne;c_.defaultProps=Ane;const Ine=["className","cssModule","active","tag"],Fne={active:C.bool,className:C.string,cssModule:C.object,tag:Pe},$ne={tag:"li"};function BC(e){const{className:t,cssModule:n,active:r,tag:i}=e,o=qe(e,Ine),s=Fe(me(t,"nav-item",r?"active":!1),n);return U.createElement(i,$e({},o,{className:s}))}BC.propTypes=Fne;BC.defaultProps=$ne;const Bne=["className","cssModule","active","tag","innerRef"],zne={active:C.bool,className:C.string,cssModule:C.object,disabled:C.bool,href:C.any,innerRef:C.oneOfType([C.object,C.func,C.string]),onClick:C.func,tag:Pe},Une={tag:"a"};class zC extends U.Component{constructor(t){super(t),this.onClick=this.onClick.bind(this)}onClick(t){if(this.props.disabled){t.preventDefault();return}this.props.href==="#"&&t.preventDefault(),this.props.onClick&&this.props.onClick(t)}render(){let t=this.props,{className:n,cssModule:r,active:i,tag:o,innerRef:s}=t,a=qe(t,Bne);const l=Fe(me(n,"nav-link",{disabled:a.disabled,active:i}),r);return U.createElement(o,$e({},a,{ref:s,onClick:this.onClick,className:l}))}}zC.propTypes=zne;zC.defaultProps=Une;var l6=zC;C.string,C.node,C.string,C.object,C.string;C.bool,C.string,C.object;const Vne=["className","cssModule","variant","innerRef"],Hne={active:C.bool,"aria-label":C.string,onClick:C.func,variant:C.oneOf(["white"]),className:C.string,cssModule:C.object,innerRef:C.oneOfType([C.object,C.string,C.func])},Wne={"aria-label":"close"};function UC(e){const{className:t,cssModule:n,variant:r,innerRef:i}=e,o=qe(e,Vne),s=Fe(me(t,"btn-close",r&&`btn-close-${r}`));return U.createElement("button",$e({ref:i,type:"button",className:s},o))}UC.propTypes=Hne;UC.defaultProps=Wne;const Yne=["active","aria-label","block","className","close","cssModule","color","outline","size","tag","innerRef"],qne={active:C.bool,"aria-label":C.string,block:C.bool,children:C.node,className:C.string,cssModule:C.object,close:C.bool,color:C.string,disabled:C.bool,innerRef:C.oneOfType([C.object,C.func,C.string]),onClick:C.func,outline:C.bool,size:C.string,tag:Pe},Gne={color:"secondary",tag:"button"};function ht(e){const t=V.useCallback(x=>{if(e.disabled){x.preventDefault();return}if(e.onClick)return e.onClick(x)},[e.onClick,e.disabled]);let{active:n,"aria-label":r,block:i,className:o,close:s,cssModule:a,color:l,outline:c,size:f,tag:h,innerRef:p}=e,m=qe(e,Yne);if(s)return U.createElement(UC,m);const v=`btn${c?"-outline":""}-${l}`,y=Fe(me(o,"btn",v,f?`btn-${f}`:!1,i?"d-block w-100":!1,{active:n,disabled:e.disabled}),a);return m.href&&h==="button"&&(h="a"),U.createElement(h,$e({type:h==="button"&&m.onClick?"button":void 0},m,{className:y,ref:p,onClick:t,"aria-label":r}))}ht.propTypes=qne;ht.defaultProps=Gne;C.func,C.func,C.func,C.bool,C.string,C.object;const vd=U.createContext({}),c6=U.createContext({}),Zne=["className","cssModule","direction","isOpen","group","size","nav","setActiveFromChild","active","tag","menuRole"],Kne={a11y:C.bool,disabled:C.bool,direction:C.oneOf(["up","down","start","end","left","right"]),group:C.bool,isOpen:C.bool,nav:C.bool,active:C.bool,size:C.string,tag:Pe,toggle:C.func,children:C.node,className:C.string,cssModule:C.object,dropup:C.bool,inNavbar:C.bool,setActiveFromChild:C.bool,menuRole:C.oneOf(["listbox","menu"])},Xne={a11y:!0,isOpen:!1,direction:"down",nav:!1,active:!1,inNavbar:!1,setActiveFromChild:!1},Qne=[mt.space,mt.enter,mt.up,mt.down,mt.end,mt.home];class u_ extends U.Component{constructor(t){super(t),this.addEvents=this.addEvents.bind(this),this.handleDocumentClick=this.handleDocumentClick.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.removeEvents=this.removeEvents.bind(this),this.toggle=this.toggle.bind(this),this.handleMenuRef=this.handleMenuRef.bind(this),this.handleToggleRef=this.handleToggleRef.bind(this),this.containerRef=U.createRef(),this.menuRef=U.createRef(),this.toggleRef=U.createRef()}componentDidMount(){this.handleProps()}componentDidUpdate(t){this.props.isOpen!==t.isOpen&&this.handleProps()}componentWillUnmount(){this.removeEvents()}handleMenuRef(t){this.menuRef.current=t}handleToggleRef(t){this.toggleRef.current=t}handleDocumentClick(t){if(t&&(t.which===3||t.type==="keyup"&&t.which!==mt.tab))return;const n=this.getContainer(),r=this.getMenu(),i=this.getToggle(),o=t.target===i,s=r&&r.contains(t.target)&&r!==t.target;let a=!1;n&&(a=n.classList.contains("input-group")&&n.classList.contains("dropdown")&&t.target.tagName==="INPUT"),!((o&&!a||s)&&(t.type!=="keyup"||t.which===mt.tab))&&this.toggle(t)}handleKeyDown(t){const n=t.target.getAttribute("role")==="menuitem"||t.target.getAttribute("role")==="option",r=this.getMenuCtrl()===t.target,i=mt.tab===t.which;if(!(/input|textarea/i.test(t.target.tagName)||i&&!this.props.a11y||i&&!(n||r))&&((Qne.indexOf(t.which)!==-1||t.which>=48&&t.which<=90)&&t.preventDefault(),!this.props.disabled&&(r&&([mt.space,mt.enter,mt.up,mt.down].indexOf(t.which)>-1?(this.props.isOpen||this.toggle(t),setTimeout(()=>this.getMenuItems()[0].focus())):this.props.isOpen&&i?(t.preventDefault(),this.getMenuItems()[0].focus()):this.props.isOpen&&t.which===mt.esc&&this.toggle(t)),this.props.isOpen&&n))){if([mt.tab,mt.esc].indexOf(t.which)>-1)this.toggle(t),this.getMenuCtrl().focus();else if([mt.space,mt.enter].indexOf(t.which)>-1)t.target.click(),this.getMenuCtrl().focus();else if([mt.down,mt.up].indexOf(t.which)>-1||[mt.n,mt.p].indexOf(t.which)>-1&&t.ctrlKey){const o=this.getMenuItems();let s=o.indexOf(t.target);mt.up===t.which||mt.p===t.which&&t.ctrlKey?s=s!==0?s-1:o.length-1:(mt.down===t.which||mt.n===t.which&&t.ctrlKey)&&(s=s===o.length-1?0:s+1),o[s].focus()}else if(mt.end===t.which){const o=this.getMenuItems();o[o.length-1].focus()}else if(mt.home===t.which)this.getMenuItems()[0].focus();else if(t.which>=48&&t.which<=90){const o=this.getMenuItems(),s=String.fromCharCode(t.which).toLowerCase();for(let a=0;adocument.addEventListener(t,this.handleDocumentClick,!0))}removeEvents(){["click","touchstart","keyup"].forEach(t=>document.removeEventListener(t,this.handleDocumentClick,!0))}toggle(t){return this.props.disabled?t&&t.preventDefault():this.props.toggle(t)}render(){const t=Cr(this.props,["toggle","disabled","inNavbar","a11y"]),{className:n,cssModule:r,direction:i,isOpen:o,group:s,size:a,nav:l,setActiveFromChild:c,active:f,tag:h,menuRole:p}=t,m=qe(t,Zne),v=h||(l?"li":"div");let y=!1;c&&U.Children.map(this.props.children[1].props.children,_=>{_&&_.props.active&&(y=!0)});const x=Fe(me(n,l&&f?"active":!1,c&&y?"active":!1,{"btn-group":s,[`btn-group-${a}`]:!!a,dropdown:!s,dropup:i==="up",dropstart:i==="start"||i==="left",dropend:i==="end"||i==="right",show:o,"nav-item":l}),r);return this.context.insideInputGroup?U.createElement(vd.Provider,{value:this.getContextValue()},U.createElement(qM,null,U.Children.map(this.props.children,_=>U.cloneElement(_,{onKeyDown:this.handleKeyDown})))):U.createElement(vd.Provider,{value:this.getContextValue()},U.createElement(qM,null,U.createElement(v,$e({},m,{[typeof v=="string"?"ref":"innerRef"]:this.containerRef,onKeyDown:this.handleKeyDown,className:x}))))}}u_.propTypes=Kne;u_.defaultProps=Xne;u_.contextType=c6;var Jc=u_;const Jne={children:C.node};function VC(e){return U.createElement(Jc,$e({group:!0},e))}VC.propTypes=Jne;C.string,C.string,C.object,C.string,C.string,C.bool;C.string,C.string,C.object,C.string;const ere=["className","cssModule","divider","tag","header","active","text"],tre={children:C.node,active:C.bool,disabled:C.bool,divider:C.bool,tag:Pe,header:C.bool,onClick:C.func,className:C.string,cssModule:C.object,toggle:C.bool,text:C.bool},nre={tag:"button",toggle:!0};class f_ extends U.Component{constructor(t){super(t),this.onClick=this.onClick.bind(this),this.getTabIndex=this.getTabIndex.bind(this)}onClick(t){const{disabled:n,header:r,divider:i,text:o}=this.props;if(n||r||i||o){t.preventDefault();return}this.props.onClick&&this.props.onClick(t),this.props.toggle&&this.context.toggle(t)}getRole(){return this.context.menuRole==="listbox"?"option":"menuitem"}getTabIndex(){const{disabled:t,header:n,divider:r,text:i}=this.props;return t||n||r||i?"-1":"0"}render(){const t=this.getTabIndex(),n=t>-1?this.getRole():void 0;let r=Cr(this.props,["toggle"]),{className:i,cssModule:o,divider:s,tag:a,header:l,active:c,text:f}=r,h=qe(r,ere);const p=Fe(me(i,{disabled:h.disabled,"dropdown-item":!s&&!l&&!f,active:c,"dropdown-header":l,"dropdown-divider":s,"dropdown-item-text":f}),o);return a==="button"&&(l?a="h6":s?a="div":h.href?a="a":f&&(a="span")),U.createElement(a,$e({type:a==="button"&&(h.onClick||this.props.toggle)?"button":void 0},h,{tabIndex:t,role:n,className:p,onClick:this.onClick}))}}f_.propTypes=tre;f_.defaultProps=nre;f_.contextType=vd;var Ue=f_;const rre=["className","cssModule","dark","end","right","tag","flip","modifiers","persist","strategy","container","updateOnSelect"],ire={tag:Pe,children:C.node.isRequired,dark:C.bool,end:C.bool,flip:C.bool,modifiers:C.array,className:C.string,cssModule:C.object,style:C.object,persist:C.bool,strategy:C.string,container:Us,updateOnSelect:C.bool,right:r6(C.bool,'Please use "end" instead.')},ore={tag:"div",flip:!0,modifiers:[]},sre={up:"top",left:"left",right:"right",start:"left",end:"right",down:"bottom"};class d_ extends U.Component{getRole(){return this.context.menuRole==="listbox"?"listbox":"menu"}render(){const t=this.props,{className:n,cssModule:r,dark:i,end:o,right:s,tag:a,flip:l,modifiers:c,persist:f,strategy:h,container:p,updateOnSelect:m}=t,v=qe(t,rre),y=Fe(me(n,"dropdown-menu",{"dropdown-menu-dark":i,"dropdown-menu-end":o||s,show:this.context.isOpen}),r),x=a;if(f||this.context.isOpen&&!this.context.inNavbar){const T=`${sre[this.context.direction]||"bottom"}-${o||s?"end":"start"}`,P=[...c,{name:"flip",enabled:!!l}],k=U.createElement(XI,{placement:T,modifiers:P,strategy:h},({ref:N,style:D,placement:z,update:A})=>{let W=We(We({},this.props.style),D);const Y=J=>{N(J);const{onMenuRef:Z}=this.context;Z&&Z(J)};return U.createElement(x,$e({tabIndex:"-1",role:this.getRole(),ref:Y},v,{style:W,"aria-hidden":!this.context.isOpen,className:y,"data-popper-placement":z,onClick:()=>m&&A()}))});return p?$a.createPortal(k,jc(p)):k}const{onMenuRef:_}=this.context;return U.createElement(x,$e({tabIndex:"-1",role:this.getRole()},v,{ref:_,"aria-hidden":!this.context.isOpen,className:y,"data-popper-placement":v.placement}))}}d_.propTypes=ire;d_.defaultProps=ore;d_.contextType=vd;var eu=d_;const are=["className","color","cssModule","caret","split","nav","tag","innerRef"],lre={caret:C.bool,color:C.string,children:C.node,className:C.string,cssModule:C.object,disabled:C.bool,onClick:C.func,"aria-haspopup":C.bool,split:C.bool,tag:Pe,nav:C.bool,innerRef:C.oneOfType([C.object,C.string,C.func])},cre={color:"secondary","aria-haspopup":!0};class h_ extends U.Component{constructor(t){super(t),this.onClick=this.onClick.bind(this)}onClick(t){if(this.props.disabled||this.context.disabled){t.preventDefault();return}this.props.nav&&!this.props.tag&&t.preventDefault(),this.props.onClick&&this.props.onClick(t),this.context.toggle(t)}getRole(){return this.context.menuRole||this.props["aria-haspopup"]}render(){const t=this.props,{className:n,color:r,cssModule:i,caret:o,split:s,nav:a,tag:l,innerRef:c}=t,f=qe(t,are),h=f["aria-label"]||"Toggle Dropdown",p=Fe(me(n,{"dropdown-toggle":o||s,"dropdown-toggle-split":s,"nav-link":a}),i),m=typeof f.children<"u"?f.children:U.createElement("span",{className:"visually-hidden"},h);let v;return a&&!l?(v="a",f.href="#"):l?v=l:(v=ht,f.color=r,f.cssModule=i),this.context.inNavbar?U.createElement(v,$e({},f,{className:p,onClick:this.onClick,ref:this.context.onToggleRef,"aria-expanded":this.context.isOpen,"aria-haspopup":this.getRole(),children:m})):U.createElement(nne,{innerRef:c},({ref:y})=>{const x=_=>{y(_);const{onToggleRef:w}=this.context;w&&w(_)};return U.createElement(v,$e({},f,{[typeof v=="string"?"ref":"innerRef"]:x,className:p,onClick:this.onClick,"aria-expanded":this.context.isOpen,"aria-haspopup":this.getRole(),children:m}))})}}h_.propTypes=lre;h_.defaultProps=cre;h_.contextType=vd;var Zd=h_;const ure=["tag","baseClass","baseClassActive","className","cssModule","children","innerRef"],fre=We(We({},Uo.propTypes),{},{children:C.oneOfType([C.arrayOf(C.node),C.node]),tag:Pe,baseClass:C.string,baseClassActive:C.string,className:C.string,cssModule:C.object,innerRef:C.oneOfType([C.object,C.string,C.func])}),dre=We(We({},Uo.defaultProps),{},{tag:"div",baseClass:"fade",baseClassActive:"show",timeout:el.Fade,appear:!0,enter:!0,exit:!0,in:!0});function Zt(e){const{tag:t,baseClass:n,baseClassActive:r,className:i,cssModule:o,children:s,innerRef:a}=e,l=qe(e,ure),c=n6(l,rv),f=Cr(l,rv);return U.createElement(Uo,c,h=>{const m=Fe(me(i,n,h==="entered"&&r),o);return U.createElement(t,$e({className:m},f,{ref:a}),s)})}Zt.propTypes=fre;Zt.defaultProps=dre;U.createContext({});C.node,C.string,C.object,C.bool,C.oneOfType([C.object,C.string,C.func]),C.oneOfType([C.array,C.string]).isRequired,C.func.isRequired;C.string,C.object,C.oneOfType([C.object,C.string,C.func]),C.node,C.oneOfType([C.array,C.string]),C.bool;C.node,C.string,C.object,C.oneOfType([C.object,C.string,C.func]),C.string.isRequired;C.node,C.string,C.object,C.oneOfType([C.object,C.string,C.func]);const hre=["tag","horizontal","isOpen","className","navbar","cssModule","children","innerRef"],pre=We(We({},Uo.propTypes),{},{horizontal:C.bool,isOpen:C.bool,children:C.oneOfType([C.arrayOf(C.node),C.node]),tag:Pe,className:C.node,navbar:C.bool,cssModule:C.object,innerRef:C.shape({current:C.object})}),mre=We(We({},Uo.defaultProps),{},{horizontal:!1,isOpen:!1,appear:!1,enter:!0,exit:!0,tag:"div",timeout:el.Collapse}),gre={[vo.ENTERING]:"collapsing",[vo.ENTERED]:"collapse show",[vo.EXITING]:"collapsing",[vo.EXITED]:"collapse"};function vre(e){return gre[e]||"collapse"}class HC extends V.Component{constructor(t){super(t),this.state={dimension:null},this.nodeRef=t.innerRef||U.createRef(),["onEntering","onEntered","onExit","onExiting","onExited"].forEach(n=>{this[n]=this[n].bind(this)})}onEntering(t,n){const r=this.getNode();this.setState({dimension:this.getDimension(r)}),this.props.onEntering(r,n)}onEntered(t,n){const r=this.getNode();this.setState({dimension:null}),this.props.onEntered(r,n)}onExit(){const t=this.getNode();this.setState({dimension:this.getDimension(t)}),this.props.onExit(t)}onExiting(){const t=this.getNode();this.getDimension(t),this.setState({dimension:0}),this.props.onExiting(t)}onExited(){const t=this.getNode();this.setState({dimension:null}),this.props.onExited(t)}getNode(){return this.nodeRef.current}getDimension(t){return this.props.horizontal?t.scrollWidth:t.scrollHeight}render(){const t=this.props,{tag:n,horizontal:r,isOpen:i,className:o,navbar:s,cssModule:a,children:l,innerRef:c}=t,f=qe(t,hre),{dimension:h}=this.state,p=n6(f,rv),m=Cr(f,rv);return U.createElement(Uo,$e({},p,{in:i,nodeRef:this.nodeRef,onEntering:this.onEntering,onEntered:this.onEntered,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}),v=>{let y=vre(v);const x=Fe(me(o,r&&"collapse-horizontal",y,s&&"navbar-collapse"),a),_=h===null?null:{[r?"width":"height"]:h};return U.createElement(n,$e({},m,{style:We(We({},m.style),_),className:x,ref:this.nodeRef}),l)})}}HC.propTypes=pre;HC.defaultProps=mre;var u6=HC;C.string.isRequired,C.string,C.node,C.object,C.oneOfType([C.object,C.string,C.func]);C.node,C.string,C.string,C.object,C.oneOfType([C.object,C.func,C.string]),C.bool;const yre=["className","cssModule","color","body","inverse","outline","tag","innerRef"],_re={body:C.bool,className:C.string,color:C.string,cssModule:C.object,innerRef:C.oneOfType([C.object,C.string,C.func]),inverse:C.bool,outline:C.bool,tag:Pe},bre={tag:"div"};function Sr(e){const{className:t,cssModule:n,color:r,body:i,inverse:o,outline:s,tag:a,innerRef:l}=e,c=qe(e,yre),f=Fe(me(t,"card",o?"text-white":!1,i?"card-body":!1,r?`${s?"border":"bg"}-${r}`:!1),n);return U.createElement(a,$e({},c,{className:f,ref:l}))}Sr.propTypes=_re;Sr.defaultProps=bre;C.string,C.object;C.string,C.object;C.string,C.object;const wre=["className","cssModule","innerRef","tag"],xre={className:C.string,cssModule:C.object,innerRef:C.oneOfType([C.object,C.string,C.func]),tag:Pe},Sre={tag:"div"};function tl(e){const{className:t,cssModule:n,innerRef:r,tag:i}=e,o=qe(e,wre),s=Fe(me(t,"card-body"),n);return U.createElement(i,$e({},o,{className:s,ref:r}))}tl.propTypes=xre;tl.defaultProps=Sre;C.oneOfType([C.object,C.func,C.string]),C.string,C.object;const Cre=["className","cssModule","tag"],Ere={className:C.string,cssModule:C.object,tag:Pe},Tre={tag:"div"};function WC(e){const{className:t,cssModule:n,tag:r}=e,i=qe(e,Cre),o=Fe(me(t,"card-footer"),n);return U.createElement(r,$e({},i,{className:o}))}WC.propTypes=Ere;WC.defaultProps=Tre;const Ore=["className","cssModule","tag"],Pre={className:C.string,cssModule:C.object,tag:Pe},kre={tag:"div"};function nl(e){const{className:t,cssModule:n,tag:r}=e,i=qe(e,Ore),o=Fe(me(t,"card-header"),n);return U.createElement(r,$e({},i,{className:o}))}nl.propTypes=Pre;nl.defaultProps=kre;C.bool,C.string,C.object,C.bool;C.string,C.object;const hm=U.createContext({}),Mre=["in","children","cssModule","slide","tag","className"];class p_ extends U.Component{constructor(t){super(t),this.state={startAnimation:!1},this.onEnter=this.onEnter.bind(this),this.onEntering=this.onEntering.bind(this),this.onExit=this.onExit.bind(this),this.onExiting=this.onExiting.bind(this),this.onExited=this.onExited.bind(this)}onEnter(t,n){this.setState({startAnimation:!1}),this.props.onEnter(t,n)}onEntering(t,n){const{offsetHeight:r}=t;return this.setState({startAnimation:!0}),this.props.onEntering(t,n),r}onExit(t){this.setState({startAnimation:!1}),this.props.onExit(t)}onExiting(t){this.setState({startAnimation:!0}),t.dispatchEvent(new CustomEvent("slide.bs.carousel")),this.props.onExiting(t)}onExited(t){t.dispatchEvent(new CustomEvent("slid.bs.carousel")),this.props.onExited(t)}render(){const t=this.props,{in:n,children:r,cssModule:i,slide:o,tag:s,className:a}=t,l=qe(t,Mre);return U.createElement(Uo,$e({},l,{enter:o,exit:o,in:n,onEnter:this.onEnter,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}),c=>{const{direction:f}=this.context,h=c===vo.ENTERED||c===vo.EXITING,p=(c===vo.ENTERING||c===vo.EXITING)&&this.state.startAnimation&&(f==="end"?"carousel-item-start":"carousel-item-end"),m=c===vo.ENTERING&&(f==="end"?"carousel-item-next":"carousel-item-prev"),v=Fe(me(a,"carousel-item",h&&"active",p,m),i);return U.createElement(s,{className:v},r)})}}p_.propTypes=We(We({},Uo.propTypes),{},{tag:Pe,in:C.bool,cssModule:C.object,children:C.node,slide:C.bool,className:C.string});p_.defaultProps=We(We({},Uo.defaultProps),{},{tag:"div",timeout:el.Carousel,slide:!0});p_.contextType=hm;var f6=p_;const Rre=40,d6={activeIndex:C.number,next:C.func.isRequired,previous:C.func.isRequired,keyboard:C.bool,pause:C.oneOf(["hover",!1]),ride:C.oneOf(["carousel"]),interval:C.oneOfType([C.number,C.string,C.bool]),children:C.array,mouseEnter:C.func,mouseLeave:C.func,slide:C.bool,dark:C.bool,fade:C.bool,cssModule:C.object,className:C.string,enableTouch:C.bool},Nre=Object.keys(d6),Lre={interval:5e3,pause:"hover",keyboard:!0,slide:!0,enableTouch:!0,fade:!1};class YC extends U.Component{constructor(t){super(t),this.handleKeyPress=this.handleKeyPress.bind(this),this.renderItems=this.renderItems.bind(this),this.hoverStart=this.hoverStart.bind(this),this.hoverEnd=this.hoverEnd.bind(this),this.handleTouchStart=this.handleTouchStart.bind(this),this.handleTouchEnd=this.handleTouchEnd.bind(this),this.touchStartX=0,this.touchStartY=0,this.state={activeIndex:this.props.activeIndex,direction:"end",indicatorClicked:!1}}componentDidMount(){this.props.ride==="carousel"&&this.setInterval(),document.addEventListener("keyup",this.handleKeyPress)}static getDerivedStateFromProps(t,n){let r=null,{activeIndex:i,direction:o,indicatorClicked:s}=n;return t.activeIndex!==i&&(t.activeIndex===i+1?o="end":t.activeIndex===i-1?o="start":t.activeIndex{this.props.next()},parseInt(this.props.interval,10)))}clearInterval(){clearInterval(this.cycleInterval)}hoverStart(...t){this.props.pause==="hover"&&this.clearInterval(),this.props.mouseEnter&&this.props.mouseEnter(...t)}hoverEnd(...t){this.props.pause==="hover"&&this.setInterval(),this.props.mouseLeave&&this.props.mouseLeave(...t)}renderItems(t,n){const{slide:r}=this.props;return U.createElement("div",{className:n},t.map((i,o)=>{const s=o===this.state.activeIndex;return U.cloneElement(i,{in:s,slide:r})}))}render(){const{cssModule:t,slide:n,className:r,dark:i,fade:o}=this.props,s=Cr(this.props,Nre),a=Fe(me(r,"carousel",o&&"carousel-fade",n&&"slide",i&&"carousel-dark"),t),l=Fe(me("carousel-inner"),t),c=this.props.children.filter(_=>_!=null&&typeof _!="boolean");if(c.every(_=>_.type===f6))return U.createElement("div",$e({},s,{className:a,onMouseEnter:this.hoverStart,onMouseLeave:this.hoverEnd}),U.createElement(hm.Provider,{value:this.getContextValue()},this.renderItems(c,l)));if(c[0]instanceof Array){const _=c[0],w=c[1],S=c[2];return U.createElement("div",$e({},s,{className:a,onMouseEnter:this.hoverStart,onMouseLeave:this.hoverEnd}),U.createElement(hm.Provider,{value:this.getContextValue()},this.renderItems(_,l),w,S))}const h=c[0],p=_=>{typeof h.props.onClickHandler=="function"&&this.setState({indicatorClicked:!0},()=>h.props.onClickHandler(_))},m=U.cloneElement(h,{onClickHandler:p}),v=c[1],y=c[2],x=c[3];return U.createElement("div",$e({},s,{className:a,onMouseEnter:this.hoverStart,onMouseLeave:this.hoverEnd,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd}),U.createElement(hm.Provider,{value:this.getContextValue()},m,this.renderItems(v,l),y,x))}}YC.propTypes=d6;YC.defaultProps=Lre;var Dre=YC;const Are=["direction","onClickHandler","cssModule","directionText","className"];function Rw(e){const{direction:t,onClickHandler:n,cssModule:r,directionText:i,className:o}=e,s=qe(e,Are),a=Fe(me(o,`carousel-control-${t}`),r),l=Fe(me(`carousel-control-${t}-icon`),r),c=Fe(me("visually-hidden"),r);return U.createElement("a",$e({},s,{className:a,style:{cursor:"pointer"},role:"button",tabIndex:"0",onClick:f=>{f.preventDefault(),n()}}),U.createElement("span",{className:l,"aria-hidden":"true"}),U.createElement("span",{className:c},i||t))}Rw.propTypes={direction:C.oneOf(["prev","next"]).isRequired,onClickHandler:C.func.isRequired,cssModule:C.object,directionText:C.string,className:C.string};const jre=["items","activeIndex","cssModule","onClickHandler","className"];function h6(e){const{items:t,activeIndex:n,cssModule:r,onClickHandler:i,className:o}=e,s=qe(e,jre),a=Fe(me(o,"carousel-indicators"),r),l=t.map((c,f)=>{const h=Fe(me({active:n===f}),r);return U.createElement("button",{"aria-label":c.caption,"data-bs-target":!0,type:"button",key:`${c.key||Object.values(c).join("")}`,onClick:p=>{p.preventDefault(),i(f)},className:h})});return U.createElement("div",$e({className:a},s),l)}h6.propTypes={activeIndex:C.number.isRequired,className:C.string,cssModule:C.object,items:C.array.isRequired,onClickHandler:C.func.isRequired};function p6(e){const{captionHeader:t,captionText:n,cssModule:r,className:i}=e,o=Fe(me(i,"carousel-caption","d-none","d-md-block"),r);return U.createElement("div",{className:o},U.createElement("h3",null,t),U.createElement("p",null,n))}p6.propTypes={captionHeader:C.node,captionText:C.node.isRequired,className:C.string,cssModule:C.object};const Ire=["defaultActiveIndex","autoPlay","indicators","controls","items","goToIndex"],Fre={items:C.array.isRequired,indicators:C.bool,controls:C.bool,autoPlay:C.bool,defaultActiveIndex:C.number,activeIndex:C.number,next:C.func,previous:C.func,goToIndex:C.func};class m6 extends V.Component{constructor(t){super(t),this.animating=!1,this.state={activeIndex:t.defaultActiveIndex||0},this.next=this.next.bind(this),this.previous=this.previous.bind(this),this.goToIndex=this.goToIndex.bind(this),this.onExiting=this.onExiting.bind(this),this.onExited=this.onExited.bind(this)}onExiting(){this.animating=!0}onExited(){this.animating=!1}next(){this.animating||this.setState(t=>({activeIndex:t.activeIndex===this.props.items.length-1?0:t.activeIndex+1}))}previous(){this.animating||this.setState(t=>({activeIndex:t.activeIndex===0?this.props.items.length-1:t.activeIndex-1}))}goToIndex(t){this.animating||this.setState({activeIndex:t})}render(){const t=this.props,{defaultActiveIndex:n,autoPlay:r,indicators:i,controls:o,items:s,goToIndex:a}=t,l=qe(t,Ire),{activeIndex:c}=this.state,f=s.map(h=>{const p=h.key||h.src;return U.createElement(f6,{onExiting:this.onExiting,onExited:this.onExited,key:p},U.createElement("img",{className:"d-block w-100",src:h.src,alt:h.altText}),U.createElement(p6,{captionText:h.caption,captionHeader:h.header||h.caption}))});return U.createElement(Dre,$e({activeIndex:c,next:this.next,previous:this.previous,ride:r?"carousel":void 0},l),i&&U.createElement(h6,{items:s,activeIndex:l.activeIndex||c,onClickHandler:a||this.goToIndex}),f,o&&U.createElement(Rw,{direction:"prev",directionText:"Previous",onClickHandler:l.previous||this.previous}),o&&U.createElement(Rw,{direction:"next",directionText:"Next",onClickHandler:l.next||this.next}))}}m6.propTypes=Fre;m6.defaultProps={controls:!0,indicators:!0,autoPlay:!0};C.string,C.object;const $re=["className","cssModule","tag"],Bre={className:C.string,cssModule:C.object,tag:Pe},zre={tag:"p"};function qC(e){const{className:t,cssModule:n,tag:r}=e,i=qe(e,$re),o=Fe(me(t,"card-text"),n);return U.createElement(r,$e({},i,{className:o}))}qC.propTypes=Bre;qC.defaultProps=zre;const Ure=["className","cssModule","tag"],Vre={className:C.string,cssModule:C.object,tag:Pe},Hre={tag:"div"};function GC(e){const{className:t,cssModule:n,tag:r}=e,i=qe(e,Ure),o=Fe(me(t,"card-title"),n);return U.createElement(r,$e({},i,{className:o}))}GC.propTypes=Vre;GC.defaultProps=Hre;const Wre=["cssModule","children","isOpen","flip","target","offset","fallbackPlacements","placementPrefix","arrowClassName","hideArrow","popperClassName","tag","container","modifiers","strategy","boundariesElement","onClosed","fade","transition","placement"];function Yre(){}const qre={children:C.oneOfType([C.node,C.func]).isRequired,popperClassName:C.string,placement:C.string,placementPrefix:C.string,arrowClassName:C.string,hideArrow:C.bool,tag:Pe,isOpen:C.bool,cssModule:C.object,offset:C.arrayOf(C.number),fallbackPlacements:C.array,flip:C.bool,container:Us,target:Us.isRequired,modifiers:C.array,strategy:C.string,boundariesElement:C.oneOfType([C.string,DC]),onClosed:C.func,fade:C.bool,transition:C.shape(Zt.propTypes)},Gre={boundariesElement:"scrollParent",placement:"auto",hideArrow:!1,isOpen:!1,offset:[0,0],flip:!0,container:"body",modifiers:[],onClosed:Yre,fade:!0,transition:We({},Zt.defaultProps)};class ZC extends U.Component{constructor(t){super(t),this.setTargetNode=this.setTargetNode.bind(this),this.getTargetNode=this.getTargetNode.bind(this),this.getRef=this.getRef.bind(this),this.onClosed=this.onClosed.bind(this),this.state={isOpen:t.isOpen}}static getDerivedStateFromProps(t,n){return t.isOpen&&!n.isOpen?{isOpen:t.isOpen}:null}componentDidUpdate(){this._element&&this._element.childNodes&&this._element.childNodes[0]&&this._element.childNodes[0].focus&&this._element.childNodes[0].focus()}onClosed(){this.props.onClosed(),this.setState({isOpen:!1})}getTargetNode(){return this.targetNode}getContainerNode(){return jc(this.props.container)}getRef(t){this._element=t}setTargetNode(t){this.targetNode=typeof t=="string"?jc(t):t}renderChildren(){const t=this.props,{cssModule:n,children:r,isOpen:i,flip:o,target:s,offset:a,fallbackPlacements:l,placementPrefix:c,arrowClassName:f,hideArrow:h,popperClassName:p,tag:m,container:v,modifiers:y,strategy:x,boundariesElement:_,onClosed:w,fade:S,transition:T,placement:P}=t,k=qe(t,Wre),N=Fe(me("arrow",f),n),D=Fe(me(p,c?`${c}-auto`:""),this.props.cssModule),z=y.map(J=>J.name),W=[...[{name:"offset",options:{offset:a}},{name:"flip",enabled:o,options:{fallbackPlacements:l}},{name:"preventOverflow",options:{boundary:_}}].filter(J=>!z.includes(J.name)),...y],Y=We(We(We({},Zt.defaultProps),T),{},{baseClass:S?T.baseClass:"",timeout:S?T.timeout:0});return U.createElement(Zt,$e({},Y,k,{in:i,onExited:this.onClosed,tag:m}),U.createElement(XI,{referenceElement:this.targetNode,modifiers:W,placement:P,strategy:x},({ref:J,style:Z,placement:ee,isReferenceHidden:ie,arrowProps:oe,update:G})=>U.createElement("div",{ref:J,style:Z,className:D,"data-popper-placement":ee,"data-popper-reference-hidden":ie?"true":void 0},typeof r=="function"?r({update:G}):r,!h&&U.createElement("span",{ref:oe.ref,className:N,style:oe.style}))))}render(){return this.setTargetNode(this.props.target),this.state.isOpen?this.props.container==="inline"?this.renderChildren():$a.createPortal(U.createElement("div",{ref:this.getRef},this.renderChildren()),this.getContainerNode()):null}}ZC.propTypes=qre;ZC.defaultProps=Gre;var Zre=ZC;C.object.isRequired;Us.isRequired;const m_={children:C.oneOfType([C.node,C.func]),placement:C.oneOf(une),target:Us.isRequired,container:Us,isOpen:C.bool,disabled:C.bool,hideArrow:C.bool,boundariesElement:C.oneOfType([C.string,DC]),className:C.string,innerClassName:C.string,arrowClassName:C.string,popperClassName:C.string,cssModule:C.object,toggle:C.func,autohide:C.bool,placementPrefix:C.string,delay:C.oneOfType([C.shape({show:C.number,hide:C.number}),C.number]),modifiers:C.array,strategy:C.string,offset:C.arrayOf(C.number),innerRef:C.oneOfType([C.func,C.string,C.object]),trigger:C.string,fade:C.bool,flip:C.bool},g6={show:0,hide:50},Kre={isOpen:!1,hideArrow:!1,autohide:!1,delay:g6,toggle:function(){},trigger:"click",fade:!0};function v6(e,t){return t&&(e===t||t.contains(e))}function f3(e,t=[]){return t&&t.length&&t.filter(n=>v6(e,n))[0]}class KC extends U.Component{constructor(t){super(t),this._targets=[],this.currentTargetElement=null,this.addTargetEvents=this.addTargetEvents.bind(this),this.handleDocumentClick=this.handleDocumentClick.bind(this),this.removeTargetEvents=this.removeTargetEvents.bind(this),this.toggle=this.toggle.bind(this),this.showWithDelay=this.showWithDelay.bind(this),this.hideWithDelay=this.hideWithDelay.bind(this),this.onMouseOverTooltipContent=this.onMouseOverTooltipContent.bind(this),this.onMouseLeaveTooltipContent=this.onMouseLeaveTooltipContent.bind(this),this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.onEscKeyDown=this.onEscKeyDown.bind(this),this.getRef=this.getRef.bind(this),this.state={isOpen:t.isOpen},this._isMounted=!1}componentDidMount(){this._isMounted=!0,this.updateTarget()}componentWillUnmount(){this._isMounted=!1,this.removeTargetEvents(),this._targets=null,this.clearShowTimeout(),this.clearHideTimeout()}static getDerivedStateFromProps(t,n){return t.isOpen&&!n.isOpen?{isOpen:t.isOpen}:null}handleDocumentClick(t){const n=this.props.trigger.split(" ");n.indexOf("legacy")>-1&&(this.props.isOpen||f3(t.target,this._targets))?(this._hideTimeout&&this.clearHideTimeout(),this.props.isOpen&&!v6(t.target,this._popover)?this.hideWithDelay(t):this.props.isOpen||this.showWithDelay(t)):n.indexOf("click")>-1&&f3(t.target,this._targets)&&(this._hideTimeout&&this.clearHideTimeout(),this.props.isOpen?this.hideWithDelay(t):this.showWithDelay(t))}onMouseOverTooltipContent(){this.props.trigger.indexOf("hover")>-1&&!this.props.autohide&&(this._hideTimeout&&this.clearHideTimeout(),this.state.isOpen&&!this.props.isOpen&&this.toggle())}onMouseLeaveTooltipContent(t){this.props.trigger.indexOf("hover")>-1&&!this.props.autohide&&(this._showTimeout&&this.clearShowTimeout(),t.persist(),this._hideTimeout=setTimeout(this.hide.bind(this,t),this.getDelay("hide")))}onEscKeyDown(t){t.key==="Escape"&&this.hide(t)}getRef(t){const{innerRef:n}=this.props;n&&(typeof n=="function"?n(t):typeof n=="object"&&(n.current=t)),this._popover=t}getDelay(t){const{delay:n}=this.props;return typeof n=="object"?isNaN(n[t])?g6[t]:n[t]:n}getCurrentTarget(t){if(!t)return null;const n=this._targets.indexOf(t);return n>=0?this._targets[n]:this.getCurrentTarget(t.parentElement)}show(t){if(!this.props.isOpen){if(this.clearShowTimeout(),this.currentTargetElement=t?t.currentTarget||this.getCurrentTarget(t.target):null,t&&t.composedPath&&typeof t.composedPath=="function"){const n=t.composedPath();this.currentTargetElement=n&&n[0]||this.currentTargetElement}this.toggle(t)}}showWithDelay(t){this._hideTimeout&&this.clearHideTimeout(),this._showTimeout=setTimeout(this.show.bind(this,t),this.getDelay("show"))}hide(t){this.props.isOpen&&(this.clearHideTimeout(),this.currentTargetElement=null,this.toggle(t))}hideWithDelay(t){this._showTimeout&&this.clearShowTimeout(),this._hideTimeout=setTimeout(this.hide.bind(this,t),this.getDelay("hide"))}clearShowTimeout(){clearTimeout(this._showTimeout),this._showTimeout=void 0}clearHideTimeout(){clearTimeout(this._hideTimeout),this._hideTimeout=void 0}addEventOnTargets(t,n,r){this._targets.forEach(i=>{i.addEventListener(t,n,r)})}removeEventOnTargets(t,n,r){this._targets.forEach(i=>{i.removeEventListener(t,n,r)})}addTargetEvents(){if(this.props.trigger){let t=this.props.trigger.split(" ");t.indexOf("manual")===-1&&((t.indexOf("click")>-1||t.indexOf("legacy")>-1)&&document.addEventListener("click",this.handleDocumentClick,!0),this._targets&&this._targets.length&&(t.indexOf("hover")>-1&&(this.addEventOnTargets("mouseover",this.showWithDelay,!0),this.addEventOnTargets("mouseout",this.hideWithDelay,!0)),t.indexOf("focus")>-1&&(this.addEventOnTargets("focusin",this.show,!0),this.addEventOnTargets("focusout",this.hide,!0)),this.addEventOnTargets("keydown",this.onEscKeyDown,!0)))}}removeTargetEvents(){this._targets&&(this.removeEventOnTargets("mouseover",this.showWithDelay,!0),this.removeEventOnTargets("mouseout",this.hideWithDelay,!0),this.removeEventOnTargets("keydown",this.onEscKeyDown,!0),this.removeEventOnTargets("focusin",this.show,!0),this.removeEventOnTargets("focusout",this.hide,!0)),document.removeEventListener("click",this.handleDocumentClick,!0)}updateTarget(){const t=jc(this.props.target,!0);t!==this._targets&&(this.removeTargetEvents(),this._targets=t?Array.from(t):[],this.currentTargetElement=this.currentTargetElement||this._targets[0],this.addTargetEvents())}toggle(t){return this.props.disabled||!this._isMounted?t&&t.preventDefault():this.props.toggle(t)}render(){this.props.isOpen&&this.updateTarget();const t=this.currentTargetElement||this._targets[0];if(!t)return null;const{className:n,cssModule:r,innerClassName:i,isOpen:o,hideArrow:s,boundariesElement:a,placement:l,placementPrefix:c,arrowClassName:f,popperClassName:h,container:p,modifiers:m,strategy:v,offset:y,fade:x,flip:_,children:w}=this.props,S=Cr(this.props,Object.keys(m_)),T=Fe(h,r),P=Fe(i,r);return U.createElement(Zre,{className:n,target:t,isOpen:o,hideArrow:s,boundariesElement:a,placement:l,placementPrefix:c,arrowClassName:f,popperClassName:T,container:p,modifiers:m,strategy:v,offset:y,cssModule:r,fade:x,flip:_},({update:k})=>U.createElement("div",$e({},S,{ref:this.getRef,className:P,role:"tooltip",onMouseOver:this.onMouseOverTooltipContent,onMouseLeave:this.onMouseLeaveTooltipContent,onKeyDown:this.onEscKeyDown}),typeof w=="function"?w({update:k}):w))}}KC.propTypes=m_;KC.defaultProps=Kre;var y6=KC;const Xre={placement:"right",placementPrefix:"bs-popover",trigger:"click",offset:[0,8]};function Kd(e){const t=me("popover","show",e.popperClassName),n=me("popover-inner",e.innerClassName);return U.createElement(y6,$e({},e,{arrowClassName:"popover-arrow",popperClassName:t,innerClassName:n}))}Kd.propTypes=m_;Kd.defaultProps=Xre;const Qre=["defaultOpen"];class Jre extends V.Component{constructor(t){super(t),this.state={isOpen:t.defaultOpen||!1},this.toggle=this.toggle.bind(this)}toggle(){this.setState(t=>({isOpen:!t.isOpen}))}render(){return U.createElement(Kd,$e({isOpen:this.state.isOpen,toggle:this.toggle},Cr(this.props,Qre)))}}Jre.propTypes=We({defaultOpen:C.bool},Kd.propTypes);C.string,C.object;C.string,C.object;const eie=["children","className","barClassName","cssModule","value","min","max","animated","striped","color","bar","multi","tag","style","barStyle","barAriaValueText","barAriaLabelledBy"],tie={animated:C.bool,bar:C.bool,barAriaLabelledBy:C.string,barAriaValueText:C.string,barClassName:C.string,barStyle:C.object,children:C.node,className:C.string,cssModule:C.object,color:C.string,max:C.oneOfType([C.string,C.number]),min:C.oneOfType([C.string,C.number]),multi:C.bool,striped:C.bool,style:C.object,tag:Pe,value:C.oneOfType([C.string,C.number])},nie={tag:"div",value:0,min:0,max:100,style:{},barStyle:{}};function XC(e){const{children:t,className:n,barClassName:r,cssModule:i,value:o,min:s,max:a,animated:l,striped:c,color:f,bar:h,multi:p,tag:m,style:v,barStyle:y,barAriaValueText:x,barAriaLabelledBy:_}=e,w=qe(e,eie),S=l3(o)/l3(a)*100,T=Fe(me(n,"progress"),i),k={className:Fe(me("progress-bar",h&&n||r,l?"progress-bar-animated":null,f?`bg-${f}`:null,c||l?"progress-bar-striped":null),i),style:We(We(We({},h?v:{}),y),{},{width:`${S}%`}),role:"progressbar","aria-valuenow":o,"aria-valuemin":s,"aria-valuemax":a,"aria-valuetext":x,"aria-labelledby":_,children:t};return h?U.createElement(m,$e({},w,k)):U.createElement(m,$e({},w,{style:v,className:T}),p?t:U.createElement("div",k))}XC.propTypes=tie;XC.defaultProps=nie;const rie={children:C.node.isRequired,node:C.any};class _6 extends U.Component{componentWillUnmount(){this.defaultNode&&document.body.removeChild(this.defaultNode),this.defaultNode=null}render(){return AC?(!this.props.node&&!this.defaultNode&&(this.defaultNode=document.createElement("div"),document.body.appendChild(this.defaultNode)),$a.createPortal(this.props.children,this.props.node||this.defaultNode)):null}}_6.propTypes=rie;var b6=_6;function sv(){}const d3=C.shape(Zt.propTypes),w6={autoFocus:C.bool,backdrop:C.oneOfType([C.bool,C.oneOf(["static"])]),backdropClassName:C.string,backdropTransition:d3,centered:C.bool,children:C.node,contentClassName:C.string,className:C.string,container:Us,cssModule:C.object,external:C.node,fade:C.bool,fullscreen:C.oneOfType([C.bool,C.oneOf(["sm","md","lg","xl"])]),innerRef:C.oneOfType([C.object,C.string,C.func]),isOpen:C.bool,keyboard:C.bool,labelledBy:C.string,modalClassName:C.string,modalTransition:d3,onClosed:C.func,onEnter:C.func,onExit:C.func,onOpened:C.func,returnFocusAfterClose:C.bool,role:C.string,scrollable:C.bool,size:C.string,toggle:C.func,trapFocus:C.bool,unmountOnClose:C.bool,wrapClassName:C.string,zIndex:C.oneOfType([C.number,C.string])},iie=Object.keys(w6),oie={isOpen:!1,autoFocus:!0,centered:!1,scrollable:!1,role:"dialog",backdrop:!0,keyboard:!0,zIndex:1050,fade:!0,onOpened:sv,onClosed:sv,modalTransition:{timeout:el.Modal},backdropTransition:{mountOnEnter:!0,timeout:el.Fade},unmountOnClose:!0,returnFocusAfterClose:!0,container:"body",trapFocus:!1};class zn extends U.Component{constructor(t){super(t),this._element=null,this._originalBodyPadding=null,this.getFocusableChildren=this.getFocusableChildren.bind(this),this.handleBackdropClick=this.handleBackdropClick.bind(this),this.handleBackdropMouseDown=this.handleBackdropMouseDown.bind(this),this.handleEscape=this.handleEscape.bind(this),this.handleStaticBackdropAnimation=this.handleStaticBackdropAnimation.bind(this),this.handleTab=this.handleTab.bind(this),this.onOpened=this.onOpened.bind(this),this.onClosed=this.onClosed.bind(this),this.manageFocusAfterClose=this.manageFocusAfterClose.bind(this),this.clearBackdropAnimationTimeout=this.clearBackdropAnimationTimeout.bind(this),this.trapFocus=this.trapFocus.bind(this),this.state={isOpen:!1,showStaticBackdropAnimation:!1}}componentDidMount(){const{isOpen:t,autoFocus:n,onEnter:r}=this.props;t&&(this.init(),this.setState({isOpen:!0}),n&&this.setFocus()),r&&r(),document.addEventListener("focus",this.trapFocus,!0),this._isMounted=!0}componentDidUpdate(t,n){if(this.props.isOpen&&!t.isOpen){this.init(),this.setState({isOpen:!0});return}this.props.autoFocus&&this.state.isOpen&&!n.isOpen&&this.setFocus(),this._element&&t.zIndex!==this.props.zIndex&&(this._element.style.zIndex=this.props.zIndex)}componentWillUnmount(){this.clearBackdropAnimationTimeout(),this.props.onExit&&this.props.onExit(),this._element&&(this.destroy(),(this.props.isOpen||this.state.isOpen)&&this.close()),document.removeEventListener("focus",this.trapFocus,!0),this._isMounted=!1}handleBackdropClick(t){if(t.target===this._mouseDownElement){t.stopPropagation();const n=this._dialog?this._dialog.parentNode:null;if(n&&t.target===n&&this.props.backdrop==="static"&&this.handleStaticBackdropAnimation(),!this.props.isOpen||this.props.backdrop!==!0)return;n&&t.target===n&&this.props.toggle&&this.props.toggle(t)}}handleTab(t){if(t.which!==9||this.modalIndex{this.setState({showStaticBackdropAnimation:!1})},100)}onOpened(t,n){this.props.onOpened(),(this.props.modalTransition.onEntered||sv)(t,n)}onClosed(t){const{unmountOnClose:n}=this.props;this.props.onClosed(),(this.props.modalTransition.onExited||sv)(t),n&&this.destroy(),this.close(),this._isMounted&&this.setState({isOpen:!1})}setFocus(){this._dialog&&this._dialog.parentNode&&typeof this._dialog.parentNode.focus=="function"&&this._dialog.parentNode.focus()}getFocusableChildren(){return this._element.querySelectorAll(s6.join(", "))}getFocusedChild(){let t;const n=this.getFocusableChildren();try{t=document.activeElement}catch{t=n[0]}return t}trapFocus(t){if(!this.props.trapFocus||!this._element||this._dialog&&this._dialog.parentNode===t.target||this.modalIndex0&&(t.preventDefault(),t.stopPropagation(),n[0].focus())}init(){try{this._triggeringElement=document.activeElement}catch{this._triggeringElement=null}this._element||(this._element=document.createElement("div"),this._element.setAttribute("tabindex","-1"),this._element.style.position="relative",this._element.style.zIndex=this.props.zIndex,this._mountContainer=jc(this.props.container),this._mountContainer.appendChild(this._element)),this._originalBodyPadding=e6(),zn.openCount<1&&(zn.originalBodyOverflow=window.getComputedStyle(document.body).overflow),t6(),zn.openCount===0&&(document.body.className=me(document.body.className,Fe("modal-open",this.props.cssModule)),document.body.style.overflow="hidden"),this.modalIndex=zn.openCount,zn.openCount+=1}destroy(){this._element&&(this._mountContainer.removeChild(this._element),this._element=null),this.manageFocusAfterClose()}manageFocusAfterClose(){if(this._triggeringElement){const{returnFocusAfterClose:t}=this.props;this._triggeringElement.focus&&t&&this._triggeringElement.focus(),this._triggeringElement=null}}close(){if(zn.openCount<=1){const t=Fe("modal-open",this.props.cssModule),n=new RegExp(`(^| )${t}( |$)`);document.body.className=document.body.className.replace(n," ").trim(),document.body.style.overflow=zn.originalBodyOverflow}this.manageFocusAfterClose(),zn.openCount=Math.max(0,zn.openCount-1),LC(this._originalBodyPadding)}clearBackdropAnimationTimeout(){this._backdropAnimationTimeout&&(clearTimeout(this._backdropAnimationTimeout),this._backdropAnimationTimeout=void 0)}renderModalDialog(){const t=Cr(this.props,iie),n="modal-dialog";return U.createElement("div",$e({},t,{className:Fe(me(n,this.props.className,{[`modal-${this.props.size}`]:this.props.size,[`${n}-centered`]:this.props.centered,[`${n}-scrollable`]:this.props.scrollable,"modal-fullscreen":this.props.fullscreen===!0,[`modal-fullscreen-${this.props.fullscreen}-down`]:typeof this.props.fullscreen=="string"}),this.props.cssModule),role:"document",ref:r=>{this._dialog=r}}),U.createElement("div",{className:Fe(me("modal-content",this.props.contentClassName),this.props.cssModule)},this.props.children))}render(){const{unmountOnClose:t}=this.props;if(this._element&&(this.state.isOpen||!t)){const n=!!this._element&&!this.state.isOpen&&!t;this._element.style.display=n?"none":"block";const{wrapClassName:r,modalClassName:i,backdropClassName:o,cssModule:s,isOpen:a,backdrop:l,role:c,labelledBy:f,external:h,innerRef:p}=this.props,m={onClick:this.handleBackdropClick,onMouseDown:this.handleBackdropMouseDown,onKeyUp:this.handleEscape,onKeyDown:this.handleTab,style:{display:"block"},"aria-labelledby":f,role:c,tabIndex:"-1"},v=this.props.fade,y=We(We(We({},Zt.defaultProps),this.props.modalTransition),{},{baseClass:v?this.props.modalTransition.baseClass:"",timeout:v?this.props.modalTransition.timeout:0}),x=We(We(We({},Zt.defaultProps),this.props.backdropTransition),{},{baseClass:v?this.props.backdropTransition.baseClass:"",timeout:v?this.props.backdropTransition.timeout:0}),_=l&&(v?U.createElement(Zt,$e({},x,{in:a&&!!l,cssModule:s,className:Fe(me("modal-backdrop",o),s)})):U.createElement("div",{className:Fe(me("modal-backdrop","show",o),s)}));return U.createElement(b6,{node:this._element},U.createElement("div",{className:Fe(r)},U.createElement(Zt,$e({},m,y,{in:a,onEntered:this.onOpened,onExited:this.onClosed,cssModule:s,className:Fe(me("modal",i,this.state.showStaticBackdropAnimation&&"modal-static"),s),innerRef:p}),h,this.renderModalDialog()),_))}return null}}zn.propTypes=w6;zn.defaultProps=oie;zn.openCount=0;zn.originalBodyOverflow=null;var Vo=zn;const sie=["className","cssModule","children","toggle","tag","wrapTag","closeAriaLabel","close"],aie={children:C.node,className:C.string,close:C.object,closeAriaLabel:C.string,cssModule:C.object,tag:Pe,toggle:C.func,wrapTag:Pe},lie={tag:"h5",wrapTag:"div",closeAriaLabel:"Close"};function io(e){let t;const{className:n,cssModule:r,children:i,toggle:o,tag:s,wrapTag:a,closeAriaLabel:l,close:c}=e,f=qe(e,sie),h=Fe(me(n,"modal-header"),r);return!c&&o&&(t=U.createElement("button",{type:"button",onClick:o,className:Fe("btn-close",r),"aria-label":l})),U.createElement(a,$e({},f,{className:h}),U.createElement(s,{className:Fe("modal-title",r)},i),c||t)}io.propTypes=aie;io.defaultProps=lie;const cie=["className","cssModule","tag"],uie={className:C.string,cssModule:C.object,tag:Pe},fie={tag:"div"};function Mi(e){const{className:t,cssModule:n,tag:r}=e,i=qe(e,cie),o=Fe(me(t,"modal-body"),n);return U.createElement(r,$e({},i,{className:o}))}Mi.propTypes=uie;Mi.defaultProps=fie;const die=["className","cssModule","tag"],hie={className:C.string,cssModule:C.object,tag:Pe},pie={tag:"div"};function ta(e){const{className:t,cssModule:n,tag:r}=e,i=qe(e,die),o=Fe(me(t,"modal-footer"),n);return U.createElement(r,$e({},i,{className:o}))}ta.propTypes=hie;ta.defaultProps=pie;const mie={placement:"top",autohide:!0,placementPrefix:"bs-tooltip",trigger:"hover focus"};function Xd(e){const t=me("tooltip","show",e.popperClassName),n=me("tooltip-inner",e.innerClassName);return U.createElement(y6,$e({},e,{arrowClassName:"tooltip-arrow",popperClassName:t,innerClassName:n}))}Xd.propTypes=m_;Xd.defaultProps=mie;C.bool,C.bool,C.string,C.object,C.bool,C.bool,C.oneOfType([C.func,C.string,C.object]),C.oneOfType([C.bool,C.string]),C.string,C.bool;const gie=["className","cssModule","tag","flush","horizontal","numbered"],vie={className:C.string,cssModule:C.object,flush:C.bool,horizontal:C.oneOfType([C.bool,C.string]),numbered:C.bool,tag:Pe},yie={tag:"ul",horizontal:!1,numbered:!1},_ie=e=>e===!1?!1:e===!0||e==="xs"?"list-group-horizontal":`list-group-horizontal-${e}`;function QC(e){const{className:t,cssModule:n,tag:r,flush:i,horizontal:o,numbered:s}=e,a=qe(e,gie),l=Fe(me(t,"list-group",i?"list-group-flush":_ie(o),{"list-group-numbered":s}),n);return U.createElement(r,$e({},a,{className:l}))}QC.propTypes=vie;QC.defaultProps=yie;const bie=["className","cssModule","tag","innerRef"],wie={children:C.node,tag:Pe,innerRef:C.oneOfType([C.object,C.func,C.string]),className:C.string,cssModule:C.object},xie={tag:"form"};class x6 extends V.Component{constructor(t){super(t),this.getRef=this.getRef.bind(this),this.submit=this.submit.bind(this)}getRef(t){this.props.innerRef&&this.props.innerRef(t),this.ref=t}submit(){this.ref&&this.ref.submit()}render(){const t=this.props,{className:n,cssModule:r,tag:i,innerRef:o}=t,s=qe(t,bie),a=Fe(n,r);return U.createElement(i,$e({},s,{ref:o,className:a}))}}x6.propTypes=wie;x6.defaultProps=xie;C.node,C.string,C.object,C.bool,C.bool;const Sie=["className","cssModule","row","disabled","check","inline","floating","tag","switch"],Cie={children:C.node,row:C.bool,check:C.bool,switch:C.bool,inline:C.bool,floating:C.bool,disabled:C.bool,tag:Pe,className:C.string,cssModule:C.object},Eie={tag:"div"};function vr(e){const{className:t,cssModule:n,row:r,disabled:i,check:o,inline:s,floating:a,tag:l,switch:c}=e,f=qe(e,Sie),h=o||c,p=Fe(me(t,r?"row":!1,h?"form-check":"mb-3",c?"form-switch":!1,h&&s?"form-check-inline":!1,h&&i?"disabled":!1,a&&"form-floating"),n);return l==="fieldset"&&(f.disabled=i),U.createElement(l,$e({},f,{className:p}))}vr.propTypes=Cie;vr.defaultProps=Eie;C.node,C.bool,C.string,C.string,C.object;const Tie=["className","cssModule","type","bsSize","valid","invalid","tag","addon","plaintext","innerRef"],Oie={children:C.node,type:C.string,size:C.oneOfType([C.number,C.string]),bsSize:C.string,valid:C.bool,invalid:C.bool,tag:Pe,innerRef:C.oneOfType([C.object,C.func,C.string]),plaintext:C.bool,addon:C.bool,className:C.string,cssModule:C.object},Pie={type:"text"};let JC=class extends U.Component{constructor(t){super(t),this.getRef=this.getRef.bind(this),this.focus=this.focus.bind(this)}getRef(t){this.props.innerRef&&this.props.innerRef(t),this.ref=t}focus(){this.ref&&this.ref.focus()}render(){let t=this.props,{className:n,cssModule:r,type:i,bsSize:o,valid:s,invalid:a,tag:l,addon:c,plaintext:f,innerRef:h}=t,p=qe(t,Tie);const m=["switch","radio","checkbox"].indexOf(i)>-1,v=/\D/g,y=i==="textarea",x=i==="select",_=i==="range";let w=l||(x||y?i:"input"),S="form-control";f?(S=`${S}-plaintext`,w=l||"input"):_?S="form-range":x?S="form-select":m&&(c?S=null:S="form-check-input"),p.size&&v.test(p.size)&&(Mw(`Please use the prop "bsSize" instead of the "size" to bootstrap's input sizing.`),o=p.size,delete p.size);const T=Fe(me(n,a&&"is-invalid",s&&"is-valid",o?x?`form-select-${o}`:`form-control-${o}`:!1,S),r);return(w==="input"||l&&typeof l=="function")&&(p.type=i==="switch"?"checkbox":i),p.children&&!(f||i==="select"||typeof w!="string"||w==="select")&&(Mw(`Input with a type of "${i}" cannot have children. Please use "value"/"defaultValue" instead.`),delete p.children),U.createElement(w,$e({},p,{ref:h,className:T,"aria-invalid":a}))}};JC.propTypes=Oie;JC.defaultProps=Pie;var Ic=JC;const kie=["className","cssModule","tag","type","size"],Mie={className:C.string,cssModule:C.object,size:C.string,tag:Pe,type:C.string},Rie={tag:"div"};function Qd(e){const{className:t,cssModule:n,tag:r,type:i,size:o}=e,s=qe(e,kie),a=Fe(me(t,"input-group",o?`input-group-${o}`:null),n);return e.type==="dropdown"?U.createElement(Jc,$e({},s,{className:a})):U.createElement(c6.Provider,{value:{insideInputGroup:!0}},U.createElement(r,$e({},s,{className:a})))}Qd.propTypes=Mie;Qd.defaultProps=Rie;C.string,C.object;const f1=C.oneOfType([C.number,C.string]),Rl=C.oneOfType([C.bool,C.string,C.number,C.shape({size:f1,order:f1,offset:f1})]);C.node,C.bool,C.bool,C.string,C.string,C.string,C.object,C.array;C.bool,C.bool,C.node,C.string,C.object,C.bool,C.bool,C.bool,C.bool,C.bool,C.bool,C.bool;function av(){}const h3=C.shape(Zt.propTypes),S6={autoFocus:C.bool,backdrop:C.bool,backdropClassName:C.string,backdropTransition:h3,children:C.node,className:C.string,container:Us,cssModule:C.object,direction:C.oneOf(["start","end","bottom","top"]),fade:C.bool,innerRef:C.oneOfType([C.object,C.string,C.func]),isOpen:C.bool,keyboard:C.bool,labelledBy:C.string,offcanvasTransition:h3,onClosed:C.func,onEnter:C.func,onExit:C.func,style:C.object,onOpened:C.func,returnFocusAfterClose:C.bool,role:C.string,scrollable:C.bool,toggle:C.func,trapFocus:C.bool,unmountOnClose:C.bool,zIndex:C.oneOfType([C.number,C.string])},Nie=Object.keys(S6),Lie={isOpen:!1,autoFocus:!0,direction:"start",scrollable:!1,role:"dialog",backdrop:!0,keyboard:!0,zIndex:1050,fade:!0,onOpened:av,onClosed:av,offcanvasTransition:{timeout:el.Offcanvas},backdropTransition:{mountOnEnter:!0,timeout:el.Fade},unmountOnClose:!0,returnFocusAfterClose:!0,container:"body",trapFocus:!1};class pi extends U.Component{constructor(t){super(t),this._element=null,this._originalBodyPadding=null,this.getFocusableChildren=this.getFocusableChildren.bind(this),this.handleBackdropClick=this.handleBackdropClick.bind(this),this.handleBackdropMouseDown=this.handleBackdropMouseDown.bind(this),this.handleEscape=this.handleEscape.bind(this),this.handleTab=this.handleTab.bind(this),this.onOpened=this.onOpened.bind(this),this.onClosed=this.onClosed.bind(this),this.manageFocusAfterClose=this.manageFocusAfterClose.bind(this),this.clearBackdropAnimationTimeout=this.clearBackdropAnimationTimeout.bind(this),this.trapFocus=this.trapFocus.bind(this),this.state={isOpen:!1}}componentDidMount(){const{isOpen:t,autoFocus:n,onEnter:r}=this.props;t&&(this.init(),this.setState({isOpen:!0}),n&&this.setFocus()),r&&r(),document.addEventListener("focus",this.trapFocus,!0),this._isMounted=!0}componentDidUpdate(t,n){if(this.props.isOpen&&!t.isOpen){this.init(),this.setState({isOpen:!0});return}this.props.autoFocus&&this.state.isOpen&&!n.isOpen&&this.setFocus(),this._element&&t.zIndex!==this.props.zIndex&&(this._element.style.zIndex=this.props.zIndex)}componentWillUnmount(){this.clearBackdropAnimationTimeout(),this.props.onExit&&this.props.onExit(),this._element&&(this.destroy(),(this.props.isOpen||this.state.isOpen)&&this.close()),document.removeEventListener("focus",this.trapFocus,!0),this._isMounted=!1}handleBackdropClick(t){if(t.target===this._mouseDownElement){t.stopPropagation();const n=this._backdrop;if(!this.props.isOpen||this.props.backdrop!==!0)return;n&&t.target===n&&this.props.toggle&&this.props.toggle(t)}}handleTab(t){if(t.which!==9||this.offcanvasIndex0&&(t.preventDefault(),t.stopPropagation(),n[0].focus())}init(){try{this._triggeringElement=document.activeElement}catch{this._triggeringElement=null}this._element||(this._element=document.createElement("div"),this._element.setAttribute("tabindex","-1"),this._element.style.position="relative",this._element.style.zIndex=this.props.zIndex,this._mountContainer=jc(this.props.container),this._mountContainer.appendChild(this._element)),this._originalBodyPadding=e6(),t6(),pi.openCount===0&&this.props.backdrop&&!this.props.scrollable&&(document.body.style.overflow="hidden"),this.offcanvasIndex=pi.openCount,pi.openCount+=1}destroy(){this._element&&(this._mountContainer.removeChild(this._element),this._element=null),this.manageFocusAfterClose()}manageFocusAfterClose(){if(this._triggeringElement){const{returnFocusAfterClose:t}=this.props;this._triggeringElement.focus&&t&&this._triggeringElement.focus(),this._triggeringElement=null}}close(){this.manageFocusAfterClose(),pi.openCount=Math.max(0,pi.openCount-1),document.body.style.overflow=null,LC(this._originalBodyPadding)}clearBackdropAnimationTimeout(){this._backdropAnimationTimeout&&(clearTimeout(this._backdropAnimationTimeout),this._backdropAnimationTimeout=void 0)}render(){const{direction:t,unmountOnClose:n}=this.props;if(this._element&&(this.state.isOpen||!n)){const r=!!this._element&&!this.state.isOpen&&!n;this._element.style.display=r?"none":"block";const{className:i,backdropClassName:o,cssModule:s,isOpen:a,backdrop:l,role:c,labelledBy:f,style:h}=this.props,p={onKeyUp:this.handleEscape,onKeyDown:this.handleTab,"aria-labelledby":f,role:c,tabIndex:"-1"},m=this.props.fade,v=We(We(We({},Zt.defaultProps),this.props.offcanvasTransition),{},{baseClass:m?this.props.offcanvasTransition.baseClass:"",timeout:m?this.props.offcanvasTransition.timeout:0}),y=We(We(We({},Zt.defaultProps),this.props.backdropTransition),{},{baseClass:m?this.props.backdropTransition.baseClass:"",timeout:m?this.props.backdropTransition.timeout:0}),x=l&&(m?U.createElement(Zt,$e({},y,{in:a&&!!l,innerRef:w=>{this._backdrop=w},cssModule:s,className:Fe(me("offcanvas-backdrop",o),s),onClick:this.handleBackdropClick,onMouseDown:this.handleBackdropMouseDown})):U.createElement("div",{className:Fe(me("offcanvas-backdrop","show",o),s),onClick:this.handleBackdropClick,onMouseDown:this.handleBackdropMouseDown})),_=Cr(this.props,Nie);return U.createElement(b6,{node:this._element},U.createElement(Zt,$e({},_,p,v,{in:a,onEntered:this.onOpened,onExited:this.onClosed,cssModule:s,className:Fe(me("offcanvas",i,`offcanvas-${t}`),s),innerRef:w=>{this._dialog=w},style:We(We({},h),{},{visibility:a?"visible":"hidden"})}),this.props.children),x)}return null}}pi.propTypes=S6;pi.defaultProps=Lie;pi.openCount=0;C.string,C.object;C.node,C.string,C.object,C.string,C.object,C.func;const Die=["className","listClassName","cssModule","size","tag","listTag","aria-label"],Aie={children:C.node,className:C.string,listClassName:C.string,cssModule:C.object,size:C.string,tag:Pe,listTag:Pe,"aria-label":C.string},jie={tag:"nav",listTag:"ul","aria-label":"pagination"};function g_(e){const{className:t,listClassName:n,cssModule:r,size:i,tag:o,listTag:s,"aria-label":a}=e,l=qe(e,Die),c=Fe(me(t),r),f=Fe(me(n,"pagination",{[`pagination-${i}`]:!!i}),r);return U.createElement(o,{className:c,"aria-label":a},U.createElement(s,$e({},l,{className:f})))}g_.propTypes=Aie;g_.defaultProps=jie;const Iie=["active","className","cssModule","disabled","tag"],Fie={active:C.bool,children:C.node,className:C.string,cssModule:C.object,disabled:C.bool,tag:Pe},$ie={tag:"li"};function Rs(e){const{active:t,className:n,cssModule:r,disabled:i,tag:o}=e,s=qe(e,Iie),a=Fe(me(n,"page-item",{active:t,disabled:i}),r);return U.createElement(o,$e({},s,{className:a}))}Rs.propTypes=Fie;Rs.defaultProps=$ie;const Bie=["className","cssModule","next","previous","first","last","tag"],zie={"aria-label":C.string,children:C.node,className:C.string,cssModule:C.object,next:C.bool,previous:C.bool,first:C.bool,last:C.bool,tag:Pe},Uie={tag:"a"};function Ns(e){let{className:t,cssModule:n,next:r,previous:i,first:o,last:s,tag:a}=e,l=qe(e,Bie);const c=Fe(me(t,"page-link"),n);let f;i?f="Previous":r?f="Next":o?f="First":s&&(f="Last");const h=e["aria-label"]||f;let p;i?p="‹":r?p="›":o?p="«":s&&(p="»");let{children:m}=e;return m&&Array.isArray(m)&&m.length===0&&(m=null),!l.href&&a==="a"&&(a="button"),(i||r||o||s)&&(m=[U.createElement("span",{"aria-hidden":"true",key:"caret"},m||p),U.createElement("span",{className:"visually-hidden",key:"ariaLabel"},h)]),U.createElement(a,$e({},l,{className:c,"aria-label":h}),m)}Ns.propTypes=zie;Ns.defaultProps=Uie;const Vie=U.createContext({}),C6={tag:Pe,activeTab:C.any,className:C.string,cssModule:C.object},Hie={tag:"div"};class E6 extends V.Component{static getDerivedStateFromProps(t,n){return n.activeTab!==t.activeTab?{activeTab:t.activeTab}:null}constructor(t){super(t),this.state={activeTab:this.props.activeTab}}render(){const{className:t,cssModule:n,tag:r}=this.props,i=Cr(this.props,Object.keys(C6)),o=Fe(me("tab-content",t),n);return U.createElement(Vie.Provider,{value:{activeTabId:this.state.activeTab}},U.createElement(r,$e({},i,{className:o})))}}E6.propTypes=C6;E6.defaultProps=Hie;C.string,C.object,C.any;const Wie=["className","closeClassName","closeAriaLabel","cssModule","tag","color","isOpen","toggle","children","transition","fade","innerRef"],Yie={children:C.node,className:C.string,closeClassName:C.string,closeAriaLabel:C.string,color:C.string,cssModule:C.object,fade:C.bool,innerRef:C.oneOfType([C.object,C.string,C.func]),isOpen:C.bool,tag:Pe,toggle:C.func,transition:C.shape(Zt.propTypes)},qie={color:"success",isOpen:!0,tag:"div",closeAriaLabel:"Close",fade:!0,transition:We(We({},Zt.defaultProps),{},{unmountOnExit:!0})};function eE(e){const{className:t,closeClassName:n,closeAriaLabel:r,cssModule:i,tag:o,color:s,isOpen:a,toggle:l,children:c,transition:f,fade:h,innerRef:p}=e,m=qe(e,Wie),v=Fe(me(t,"alert",`alert-${s}`,{"alert-dismissible":l}),i),y=Fe(me("btn-close",n),i),x=We(We(We({},Zt.defaultProps),f),{},{baseClass:h?f.baseClass:"",timeout:h?f.timeout:0});return U.createElement(Zt,$e({},m,x,{tag:o,className:v,in:a,role:"alert",innerRef:p}),l?U.createElement("button",{type:"button",className:y,"aria-label":r,onClick:l}):null,c)}eE.propTypes=Yie;eE.defaultProps=qie;C.node,C.string,C.object,C.bool,C.bool,C.shape(Zt.propTypes),C.oneOfType([C.object,C.string,C.func]);We(We({},Zt.defaultProps),{},{unmountOnExit:!0});C.string,C.object,C.oneOfType([C.object,C.string,C.func]);C.oneOfType([C.string,C.node]),C.func,C.string,C.object,C.node,C.string,C.oneOfType([C.string,C.number]),C.object,C.string;const Gie=["className","cssModule","tag","active","disabled","action","color"],Zie={action:C.bool,active:C.bool,className:C.string,cssModule:C.object,color:C.string,disabled:C.bool,tag:Pe},Kie={tag:"li"},Xie=e=>{e.preventDefault()};function tE(e){const{className:t,cssModule:n,tag:r,active:i,disabled:o,action:s,color:a}=e,l=qe(e,Gie),c=Fe(me(t,i?"active":!1,o?"disabled":!1,s?"list-group-item-action":!1,a?`list-group-item-${a}`:!1,"list-group-item"),n);return o&&(l.onClick=Xie),U.createElement(r,$e({},l,{className:c}))}tE.propTypes=Zie;tE.defaultProps=Kie;C.string,C.object;C.string,C.object;const Qie=["className","cssModule","tag","type"],Jie={className:C.string,cssModule:C.object,tag:Pe,type:C.string},eoe={tag:"ul"},nE=V.forwardRef((e,t)=>{const{className:n,cssModule:r,tag:i,type:o}=e,s=qe(e,Qie),a=Fe(me(n,o?`list-${o}`:!1),r);return U.createElement(i,$e({},s,{className:a,ref:t}))});nE.name="List";nE.propTypes=Jie;nE.defaultProps=eoe;const toe=["className","cssModule","tag"],noe={className:C.string,cssModule:C.object,tag:Pe},roe={tag:"li"},rE=V.forwardRef((e,t)=>{const{className:n,cssModule:r,tag:i}=e,o=qe(e,toe),s=Fe(me(n,"list-inline-item"),r);return U.createElement(i,$e({},o,{className:s,ref:t}))});rE.name="ListInlineItem";rE.propTypes=noe;rE.defaultProps=roe;const ioe=["defaultOpen"];class ooe extends V.Component{constructor(t){super(t),this.state={isOpen:t.defaultOpen||!1},this.toggle=this.toggle.bind(this)}toggle(){this.setState(t=>({isOpen:!t.isOpen}))}render(){return U.createElement(VC,$e({isOpen:this.state.isOpen,toggle:this.toggle},Cr(this.props,ioe)))}}ooe.propTypes=We({defaultOpen:C.bool},VC.propTypes);const soe=["toggleEvents","defaultOpen"],aoe={defaultOpen:C.bool,toggler:C.string.isRequired,toggleEvents:C.arrayOf(C.string)},loe={toggleEvents:hne};class T6 extends V.Component{constructor(t){super(t),this.togglers=null,this.removeEventListeners=null,this.toggle=this.toggle.bind(this),this.state={isOpen:t.defaultOpen||!1}}componentDidMount(){this.togglers=o6(this.props.toggler),this.togglers.length&&(this.removeEventListeners=pne(this.togglers,this.toggle,this.props.toggleEvents))}componentWillUnmount(){this.togglers.length&&this.removeEventListeners&&this.removeEventListeners()}toggle(t){this.setState(({isOpen:n})=>({isOpen:!n})),t.preventDefault()}render(){return U.createElement(u6,$e({isOpen:this.state.isOpen},Cr(this.props,soe)))}}T6.propTypes=aoe;T6.defaultProps=loe;const coe=["defaultOpen"];class Jd extends V.Component{constructor(t){super(t),this.state={isOpen:t.defaultOpen||!1},this.toggle=this.toggle.bind(this)}toggle(t){this.setState(n=>({isOpen:!n.isOpen}),()=>{this.props.onToggle&&this.props.onToggle(t,this.state.isOpen)})}render(){return U.createElement(Jc,$e({isOpen:this.state.isOpen,toggle:this.toggle},Cr(this.props,coe)))}}Jd.propTypes=We({defaultOpen:C.bool,onToggle:C.func},Jc.propTypes);const uoe=["defaultOpen"];class Er extends V.Component{constructor(t){super(t),this.state={isOpen:t.defaultOpen||!1},this.toggle=this.toggle.bind(this)}toggle(){this.setState(t=>({isOpen:!t.isOpen}))}render(){return U.createElement(Xd,$e({isOpen:this.state.isOpen,toggle:this.toggle},Cr(this.props,uoe)))}}Er.propTypes=We({defaultOpen:C.bool},Xd.propTypes);C.oneOf(["border","grow"]),C.oneOf(["sm"]),C.oneOf(["primary","secondary","success","danger","warning","info","light","dark"]),C.string,C.object,C.string;We(We({},jC.propTypes),{},{color:C.string,tag:Pe,animation:C.oneOf(["glow","wave"]),innerRef:C.oneOfType([C.object,C.func,C.string]),size:C.oneOf(["lg","sm","xs"])});C.string,C.string,C.bool,C.string,C.object;(()=>{if(typeof window!="object"||typeof window.CustomEvent=="function")return;const e=(t,n)=>{n=n||{bubbles:!1,cancelable:!1,detail:null};let r=document.createEvent("CustomEvent");return r.initCustomEvent(t,n.bubbles,n.cancelable,n.detail),r};window.CustomEvent=e})();(()=>{if(typeof Object.values=="function")return;Object.values=t=>Object.keys(t).map(n=>t[n])})();const foe="Left",doe="Right",hoe="Up",poe="Down",tc={delta:10,preventScrollOnSwipe:!1,rotationAngle:0,trackMouse:!1,trackTouch:!0,swipeDuration:1/0,touchEventOptions:{passive:!0}},Nw={first:!0,initial:[0,0],start:0,swiping:!1,xy:[0,0]},p3="mousemove",m3="mouseup",moe="touchend",goe="touchmove",voe="touchstart";function yoe(e,t,n,r){return e>t?n>0?doe:foe:r>0?poe:hoe}function g3(e,t){if(t===0)return e;const n=Math.PI/180*t,r=e[0]*Math.cos(n)+e[1]*Math.sin(n),i=e[1]*Math.cos(n)-e[0]*Math.sin(n);return[r,i]}function _oe(e,t){const n=f=>{const h="touches"in f;h&&f.touches.length>1||e((p,m)=>{m.trackMouse&&!h&&(document.addEventListener(p3,r),document.addEventListener(m3,s));const{clientX:v,clientY:y}=h?f.touches[0]:f,x=g3([v,y],m.rotationAngle);return m.onTouchStartOrOnMouseDown&&m.onTouchStartOrOnMouseDown({event:f}),Object.assign(Object.assign(Object.assign({},p),Nw),{initial:x.slice(),xy:x,start:f.timeStamp||0})})},r=f=>{e((h,p)=>{const m="touches"in f;if(m&&f.touches.length>1)return h;if(f.timeStamp-h.start>p.swipeDuration)return h.swiping?Object.assign(Object.assign({},h),{swiping:!1}):h;const{clientX:v,clientY:y}=m?f.touches[0]:f,[x,_]=g3([v,y],p.rotationAngle),w=x-h.xy[0],S=_-h.xy[1],T=Math.abs(w),P=Math.abs(S),k=(f.timeStamp||0)-h.start,N=Math.sqrt(T*T+P*P)/(k||1),D=[w/(k||1),S/(k||1)],z=yoe(T,P,w,S),A=typeof p.delta=="number"?p.delta:p.delta[z.toLowerCase()]||tc.delta;if(T{e((h,p)=>{let m;if(h.swiping&&h.eventData){if(f.timeStamp-h.start{document.removeEventListener(p3,r),document.removeEventListener(m3,s)},s=f=>{o(),i(f)},a=(f,h)=>{let p=()=>{};if(f&&f.addEventListener){const m=Object.assign(Object.assign({},tc.touchEventOptions),h.touchEventOptions),v=[[voe,n,m],[goe,r,Object.assign(Object.assign({},m),h.preventScrollOnSwipe?{passive:!1}:{})],[moe,i,m]];v.forEach(([y,x,_])=>f.addEventListener(y,x,_)),p=()=>v.forEach(([y,x])=>f.removeEventListener(y,x))}return p},c={ref:f=>{f!==null&&e((h,p)=>{if(h.el===f)return h;const m={};return h.el&&h.el!==f&&h.cleanUpTouch&&(h.cleanUpTouch(),m.cleanUpTouch=void 0),p.trackTouch&&f&&(m.cleanUpTouch=a(f,p)),Object.assign(Object.assign(Object.assign({},h),{el:f}),m)})}};return t.trackMouse&&(c.onMouseDown=n),[c,a]}function boe(e,t,n,r){return!t.trackTouch||!e.el?(e.cleanUpTouch&&e.cleanUpTouch(),Object.assign(Object.assign({},e),{cleanUpTouch:void 0})):e.cleanUpTouch?t.preventScrollOnSwipe!==n.preventScrollOnSwipe||t.touchEventOptions.passive!==n.touchEventOptions.passive?(e.cleanUpTouch(),Object.assign(Object.assign({},e),{cleanUpTouch:r(e.el,t)})):e:Object.assign(Object.assign({},e),{cleanUpTouch:r(e.el,t)})}function woe(e){const{trackMouse:t}=e,n=V.useRef(Object.assign({},Nw)),r=V.useRef(Object.assign({},tc)),i=V.useRef(Object.assign({},r.current));i.current=Object.assign({},r.current),r.current=Object.assign(Object.assign({},tc),e);let o;for(o in tc)r.current[o]===void 0&&(r.current[o]=tc[o]);const[s,a]=V.useMemo(()=>_oe(l=>n.current=l(n.current,r.current),{trackMouse:t}),[t]);return n.current=boe(n.current,r.current,i.current,a),s}var Op,xoe=new Uint8Array(16);function Soe(){if(!Op&&(Op=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!Op))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Op(xoe)}const Coe=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Eoe(e){return typeof e=="string"&&Coe.test(e)}var Fn=[];for(var d1=0;d1<256;++d1)Fn.push((d1+256).toString(16).substr(1));function Toe(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(Fn[e[t+0]]+Fn[e[t+1]]+Fn[e[t+2]]+Fn[e[t+3]]+"-"+Fn[e[t+4]]+Fn[e[t+5]]+"-"+Fn[e[t+6]]+Fn[e[t+7]]+"-"+Fn[e[t+8]]+Fn[e[t+9]]+"-"+Fn[e[t+10]]+Fn[e[t+11]]+Fn[e[t+12]]+Fn[e[t+13]]+Fn[e[t+14]]+Fn[e[t+15]]).toLowerCase();if(!Eoe(n))throw TypeError("Stringified UUID is invalid");return n}function iE(e,t,n){e=e||{};var r=e.random||(e.rng||Soe)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return Toe(r)}const Ooe=2e3,Poe=(e,t)=>(n=!1,r=Ooe)=>{const[i,o]=V.useState(n),s=V.useRef(void 0);return[i,()=>{o(!n),s.current&&t(s.current),s.current=e(()=>o(n),r)}]},hn=(e=!1)=>{const[t,n]=V.useState(e);return[t,()=>n(!t),()=>n(!0),()=>n(!1)]},koe=(e,t)=>{const n=r=>i=>{i.event.composedPath().some(({classList:s})=>s==null?void 0:s.contains("visits-table"))||document.querySelector(".modal")||r()};return woe({delta:40,onSwipedLeft:n(t),onSwipedRight:n(e)})},Moe=(e,t)=>{const[n,r]=V.useState(t);return[n,o=>{const{location:s,history:a}=window,l=fl(s.search);l[e]=o,a.pushState(null,"",`${s.pathname}?${Vd(l)}`),r(o)}]},Roe=(e,t)=>{const n=V.useRef(!0);V.useEffect(()=>{!n.current&&e(),n.current=!1},t)},na=()=>{const e=Fo();return()=>e(-1)},Noe=()=>{const{search:e}=Pn();return fl(e)},v_=()=>{const{current:e}=V.useRef(`dom-${iE()}`);return e},dl=()=>V.useRef(null),cn=({title:e,children:t,bodyClassName:n,...r})=>g.jsxs(Sr,{...r,children:[e&&g.jsx(nl,{role:"heading",children:e}),g.jsx(tl,{className:n,children:t})]});const Loe=({isOpen:e,toggle:t,forceUpdate:n})=>{const[r,,i]=hn(),o=()=>{i(),n()};return g.jsxs(eE,{className:"app-update-banner",isOpen:e,toggle:t,tag:cn,color:"secondary",children:[g.jsx("h4",{className:"mb-4",children:"This app has just been updated!"}),g.jsxs("p",{className:"mb-0",children:["Restart it to enjoy the new features.",g.jsxs(ht,{role:"button",disabled:r,className:"ms-2",color:"secondary",size:"sm",onClick:o,children:[!r&&g.jsxs(g.Fragment,{children:["Restart now ",g.jsx(je,{icon:AQ,className:"ms-1"})]}),r&&g.jsx(g.Fragment,{children:"Restarting..."})]})]})]})},O6=({to:e="/",children:t="Home"})=>g.jsx("div",{className:"home",children:g.jsxs(cn,{className:"p-4",children:[g.jsx("h2",{children:"Oops! We could not find requested route."}),g.jsx("p",{children:"Use your browser's back button to navigate to the page you have previously come from, or just press this button."}),g.jsx("br",{}),g.jsx(Lt,{to:e,className:"btn btn-outline-primary btn-lg",children:t})]})}),Doe=async()=>{var t;(await((t=navigator.serviceWorker)==null?void 0:t.getRegistrations())??[]).forEach(({waiting:n})=>{n==null||n.addEventListener("statechange",r=>{var i;((i=r.target)==null?void 0:i.state)==="activated"&&window.location.reload()}),n==null||n.postMessage({type:"SKIP_WAITING"})})},oE="#4696e5",Aoe="rgba(70, 150, 229, 0.4)",P6="#f77f28",joe="rgba(247, 127, 40, 0.4)",Ioe="white",Foe="#161b22",k6=e=>{var t,n;return(n=(t=document.getElementsByTagName("html"))==null?void 0:t[0])==null?void 0:n.setAttribute("data-theme",e)},$oe=()=>{var e,t;return((t=(e=document.getElementsByTagName("html"))==null?void 0:e[0])==null?void 0:t.getAttribute("data-theme"))==="dark"};const Boe=(e,t,n,r,i,o,s,a)=>({fetchServers:l,servers:c,settings:f,appUpdated:h,resetAppUpdate:p})=>{const v=Pn().pathname==="/";return V.useEffect(()=>{var y;Object.keys(c).length===0&&l(),k6(((y=f.ui)==null?void 0:y.theme)??"light")},[]),g.jsxs("div",{className:"container-fluid app-container",children:[g.jsx(e,{}),g.jsxs("div",{className:"app",children:[g.jsx("div",{className:me("shlink-wrapper",{"d-flex d-md-block align-items-center":v}),children:g.jsxs(Zy,{children:[g.jsx(gt,{index:!0,element:g.jsx(t,{})}),g.jsx(gt,{path:"/settings/*",element:g.jsx(o,{})}),g.jsx(gt,{path:"/manage-servers",element:g.jsx(s,{})}),g.jsx(gt,{path:"/server/create",element:g.jsx(r,{})}),g.jsx(gt,{path:"/server/:serverId/edit",element:g.jsx(i,{})}),g.jsx(gt,{path:"/server/:serverId/*",element:g.jsx(n,{})}),g.jsx(gt,{path:"*",element:g.jsx(O6,{})})]})}),g.jsx("div",{className:"shlink-footer",children:g.jsx(a,{})})]}),g.jsx(Loe,{isOpen:h,toggle:p,forceUpdate:Doe})]})};function gi(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:sE(e)?2:aE(e)?3:0}function hc(e,t){return tu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function zoe(e,t){return tu(e)===2?e.get(t):e[t]}function M6(e,t,n){var r=tu(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function R6(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function sE(e){return qoe&&e instanceof Map}function aE(e){return Goe&&e instanceof Set}function Ta(e){return e.o||e.t}function lE(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=L6(e);delete t[At];for(var n=pc(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=Uoe),Object.freeze(e),t&&rl(e,function(n,r){return cE(r,!0)},!0)),e}function Uoe(){gi(2)}function uE(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Qi(e){var t=jw[e];return t||gi(18,e),t}function Voe(e,t){jw[e]||(jw[e]=t)}function Lw(){return yd}function h1(e,t){t&&(Qi("Patches"),e.u=[],e.s=[],e.v=t)}function lv(e){Dw(e),e.p.forEach(Hoe),e.p=null}function Dw(e){e===yd&&(yd=e.l)}function v3(e){return yd={p:[],l:yd,h:e,m:!0,_:0}}function Hoe(e){var t=e[At];t.i===0||t.i===1?t.j():t.O=!0}function p1(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||Qi("ES5").S(t,e,r),r?(n[At].P&&(lv(t),gi(4)),Lo(e)&&(e=cv(t,e),t.l||uv(t,e)),t.u&&Qi("Patches").M(n[At].t,e,t.u,t.s)):e=cv(t,n,[]),lv(t),t.u&&t.v(t.u,t.s),e!==N6?e:void 0}function cv(e,t,n){if(uE(t))return t;var r=t[At];if(!r)return rl(t,function(o,s){return y3(e,r,t,o,s,n)},!0),t;if(r.A!==e)return t;if(!r.P)return uv(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=lE(r.k):r.o;rl(r.i===3?new Set(i):i,function(o,s){return y3(e,r,i,o,s,n)}),uv(e,i,!1),n&&e.u&&Qi("Patches").R(r,n,e.u,e.s)}return r.o}function y3(e,t,n,r,i,o){if(Vs(i)){var s=cv(e,i,o&&t&&t.i!==3&&!hc(t.D,r)?o.concat(r):void 0);if(M6(n,r,s),!Vs(s))return;e.m=!1}if(Lo(i)&&!uE(i)){if(!e.h.F&&e._<1)return;cv(e,i),t&&t.A.l||uv(e,i)}}function uv(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&cE(t,n)}function m1(e,t){var n=e[At];return(n?Ta(n):e)[t]}function _3(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function as(e){e.P||(e.P=!0,e.l&&as(e.l))}function g1(e){e.o||(e.o=lE(e.t))}function Aw(e,t,n){var r=sE(t)?Qi("MapSet").N(t,n):aE(t)?Qi("MapSet").T(t,n):e.g?function(i,o){var s=Array.isArray(i),a={i:s?1:0,A:o?o.A:Lw(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=a,c=_d;s&&(l=[a],c=Xu);var f=Proxy.revocable(l,c),h=f.revoke,p=f.proxy;return a.k=p,a.j=h,p}(t,n):Qi("ES5").J(t,n);return(n?n.A:Lw()).p.push(r),r}function Woe(e){return Vs(e)||gi(22,e),function t(n){if(!Lo(n))return n;var r,i=n[At],o=tu(n);if(i){if(!i.P&&(i.i<4||!Qi("ES5").K(i)))return i.t;i.I=!0,r=b3(n,o),i.I=!1}else r=b3(n,o);return rl(r,function(s,a){i&&zoe(i.t,s)===a||M6(r,s,t(a))}),o===3?new Set(r):r}(e)}function b3(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return lE(e)}function Yoe(){function e(o,s){var a=i[o];return a?a.enumerable=s:i[o]=a={configurable:!0,enumerable:s,get:function(){var l=this[At];return _d.get(l,o)},set:function(l){var c=this[At];_d.set(c,o,l)}},a}function t(o){for(var s=o.length-1;s>=0;s--){var a=o[s][At];if(!a.P)switch(a.i){case 5:r(a)&&as(a);break;case 4:n(a)&&as(a)}}}function n(o){for(var s=o.t,a=o.k,l=pc(a),c=l.length-1;c>=0;c--){var f=l[c];if(f!==At){var h=s[f];if(h===void 0&&!hc(s,f))return!0;var p=a[f],m=p&&p[At];if(m?m.t!==h:!R6(p,h))return!0}}var v=!!s[At];return l.length!==pc(s).length+(v?0:1)}function r(o){var s=o.k;if(s.length!==o.t.length)return!0;var a=Object.getOwnPropertyDescriptor(s,s.length-1);if(a&&!a.get)return!0;for(var l=0;l1?_-1:0),S=1;S<_;S++)w[S-1]=arguments[S];return l.produce(y,function(T){var P;return(P=o).call.apply(P,[x,T].concat(w))})}}var c;if(typeof o!="function"&&gi(6),s!==void 0&&typeof s!="function"&&gi(7),Lo(i)){var f=v3(r),h=Aw(r,i,void 0),p=!0;try{c=o(h),p=!1}finally{p?lv(f):Dw(f)}return typeof Promise<"u"&&c instanceof Promise?c.then(function(y){return h1(f,s),p1(y,f)},function(y){throw lv(f),y}):(h1(f,s),p1(c,f))}if(!i||typeof i!="object"){if((c=o(i))===void 0&&(c=i),c===N6&&(c=void 0),r.F&&cE(c,!0),s){var m=[],v=[];Qi("Patches").M(i,c,m,v),s(m,v)}return c}gi(21,i)},this.produceWithPatches=function(i,o){if(typeof i=="function")return function(c){for(var f=arguments.length,h=Array(f>1?f-1:0),p=1;p=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var s=Qi("Patches").$;return Vs(n)?s(n,r):this.produce(n,function(a){return s(a,r)})},e}(),Ar=new Koe,D6=Ar.produce;Ar.produceWithPatches.bind(Ar);Ar.setAutoFreeze.bind(Ar);Ar.setUseProxies.bind(Ar);Ar.applyPatches.bind(Ar);Ar.createDraft.bind(Ar);Ar.finishDraft.bind(Ar);function Xoe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function E3(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Zn(1));return n(A6)(e,t)}if(typeof e!="function")throw new Error(Zn(2));var i=e,o=t,s=[],a=s,l=!1;function c(){a===s&&(a=s.slice())}function f(){if(l)throw new Error(Zn(3));return o}function h(y){if(typeof y!="function")throw new Error(Zn(4));if(l)throw new Error(Zn(5));var x=!0;return c(),a.push(y),function(){if(x){if(l)throw new Error(Zn(6));x=!1,c();var w=a.indexOf(y);a.splice(w,1),s=null}}}function p(y){if(!Qoe(y))throw new Error(Zn(7));if(typeof y.type>"u")throw new Error(Zn(8));if(l)throw new Error(Zn(9));try{l=!0,o=i(o,y)}finally{l=!1}for(var x=s=a,_=0;_"u")throw new Error(Zn(12));if(typeof n(void 0,{type:fv.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Zn(13))})}function j6(e){for(var t=Object.keys(e),n={},r=0;r"u")throw c&&c.type,new Error(Zn(14));h[m]=x,f=f||x!==y}return f=f||o.length!==Object.keys(l).length,f?h:l}}function dv(){for(var e=arguments.length,t=new Array(e),n=0;n0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]0)for(var S=m.getState(),T=Array.from(n.values()),P=0,k=T;P!0,resetAppUpdate:()=>!1}}),{appUpdateAvailable:Use,resetAppUpdate:Vse}=Bse,Hse=zse,Wse=(e,t)=>{e.serviceFactory("App",Boe,"MainHeader","Home","MenuLayout","CreateServer","EditServer","Settings","ManageServers","ShlinkVersionsContainer"),e.decorator("App",t(["servers","settings","appUpdated"],["fetchServers","resetAppUpdate"])),e.serviceFactory("appUpdateAvailable",()=>Use),e.serviceFactory("resetAppUpdate",()=>Vse)};function pv(e){return t=>{const{resetSelectedServer:n}=t;return V.useEffect(()=>{n()},[]),g.jsx(e,{...t})}}const Nl=({children:e,to:t,className:n,...r})=>g.jsx(oj,{className:({isActive:i})=>me("aside-menu__item",n,{"aside-menu__item--selected":i}),to:t,...r,children:e}),Yse=e=>({selectedServer:t,showOnMobile:n=!1})=>{const r=Ms(t),i=r?t.id:"",{pathname:o}=Pn(),s=me("aside-menu",{"aside-menu--hidden":!n}),a=l=>`/server/${i}${l}`;return g.jsx("aside",{className:s,children:g.jsxs("nav",{className:"nav flex-column aside-menu__nav",children:[g.jsxs(Nl,{to:a("/overview"),children:[g.jsx(je,{fixedWidth:!0,icon:SQ}),g.jsx("span",{className:"aside-menu__item-text",children:"Overview"})]}),g.jsxs(Nl,{to:a("/list-short-urls/1"),className:me({"aside-menu__item--selected":o.match("/list-short-urls")!==null}),children:[g.jsx(je,{fixedWidth:!0,icon:Qj}),g.jsx("span",{className:"aside-menu__item-text",children:"List short URLs"})]}),g.jsxs(Nl,{to:a("/create-short-url"),children:[g.jsx(je,{fixedWidth:!0,icon:PQ,flip:"horizontal"}),g.jsx("span",{className:"aside-menu__item-text",children:"Create short URL"})]}),g.jsxs(Nl,{to:a("/manage-tags"),children:[g.jsx(je,{fixedWidth:!0,icon:eI}),g.jsx("span",{className:"aside-menu__item-text",children:"Manage tags"})]}),g.jsxs(Nl,{to:a("/manage-domains"),children:[g.jsx(je,{fixedWidth:!0,icon:nQ}),g.jsx("span",{className:"aside-menu__item-text",children:"Manage domains"})]}),g.jsxs(Nl,{to:a("/edit"),className:"aside-menu__item--push",children:[g.jsx(je,{fixedWidth:!0,icon:fQ}),g.jsx("span",{className:"aside-menu__item-text",children:"Edit this server"})]}),r&&g.jsx(e,{className:"aside-menu__item aside-menu__item--danger",textClassName:"aside-menu__item-text",server:t})]})})},qse=({location:e},{error:t})=>class extends V.Component{constructor(n){super(n),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(n){t(n)}render(){const{hasError:n}=this.state;if(n)return g.jsx("div",{className:"home",children:g.jsxs(cn,{className:"p-4",children:[g.jsx("h1",{children:"Oops! This is awkward :S"}),g.jsx("p",{children:"It seems that something went wrong. Try refreshing the page or just click this button."}),g.jsx("br",{}),g.jsx(ht,{outline:!0,color:"primary",onClick:()=>e.reload(),children:"Take me back"})]})});const{children:r}=this.props;return r}},Ci=({href:e,children:t,rel:n,...r})=>g.jsx("a",{target:"_blank",rel:`noopener noreferrer${n?` ${n}`:""}`,href:e,...r,children:t??e});const Gse=({id:e,name:t})=>g.jsxs(tE,{tag:Lt,to:`/server/${e}`,className:"servers-list__server-item",children:[t,g.jsx(je,{icon:LQ,className:"servers-list__server-item-icon"})]}),G6=({servers:e,children:t,embedded:n=!1})=>g.jsxs(g.Fragment,{children:[t&&g.jsx("h5",{className:"mb-md-3",children:t}),e.length>0&&g.jsx(QC,{className:me("servers-list__list-group",{"servers-list__list-group--embedded":n}),children:e.map(({id:r,name:i})=>g.jsx(Gse,{id:r,name:i},r))})]}),Z6=({color:e=oE,className:t})=>g.jsx("svg",{className:t,viewBox:"0 0 512 512",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:g.jsxs("g",{fill:e,children:[g.jsx("path",{d:" M 23.71 85.08 C 17.22 49.81 49.44 14.86 85.08 18.12 C 118.83 19.21 145.72 53.33 139.45 86.37 C 155.64 102.30 171.32 118.83 187.87 134.36 C 198.32 111.73 208.84 89.12 219.57 66.62 C 226.05 53.84 243.47 48.74 255.73 56.27 C 263.76 62.10 270.34 69.69 277.25 76.75 C 286.28 86.61 285.72 102.89 276.31 112.31 C 223.38 165.37 170.38 218.37 117.35 271.34 C 107.72 280.99 91.01 281.25 81.11 271.86 C 74.39 264.94 66.82 258.69 61.24 250.77 C 53.72 238.52 58.85 221.07 71.64 214.62 C 94.11 203.87 116.72 193.38 139.33 182.91 C 123.81 166.36 107.30 150.68 91.37 134.49 C 60.20 140.28 27.37 116.78 23.71 85.08 Z"}),g.jsx("path",{d:" M 205.21 201.23 C 225.32 181.36 260.88 181.11 281.14 200.86 C 299.25 218.75 317.37 236.65 335.10 254.93 C 356.73 278.01 352.01 318.70 326.03 336.56 C 320.07 330.47 313.73 324.65 308.12 318.28 C 323.86 309.39 328.76 286.18 316.63 272.39 C 301.73 256.95 286.30 242.03 271.24 226.75 C 264.49 219.65 256.80 212.00 246.37 211.52 C 224.65 208.64 205.52 233.36 214.49 253.58 C 221.09 266.81 234.22 275.12 243.62 286.24 C 240.43 295.96 238.09 306.13 238.29 316.46 C 225.55 304.29 213.16 291.73 200.89 279.09 C 180.97 257.57 183.10 220.45 205.21 201.23 Z"}),g.jsx("path",{d:" M 273.90 352.07 C 252.28 328.99 256.98 288.31 282.96 270.46 C 288.93 276.54 295.26 282.36 300.88 288.72 C 285.14 297.62 280.23 320.82 292.38 334.61 C 307.27 350.05 322.70 364.96 337.75 380.25 C 344.51 387.35 352.20 395.00 362.64 395.48 C 384.35 398.37 403.49 373.64 394.51 353.42 C 387.92 340.18 374.78 331.88 365.38 320.76 C 368.56 311.04 370.91 300.86 370.71 290.54 C 383.45 302.70 395.84 315.27 408.11 327.91 C 428.03 349.43 425.90 386.55 403.78 405.77 C 383.68 425.64 348.13 425.89 327.86 406.14 C 309.75 388.25 291.60 370.37 273.90 352.07 Z"}),g.jsx("path",{d:" M 422.11 403.83 C 431.96 394.07 441.60 384.06 451.66 374.51 C 460.90 383.74 471.89 392.70 474.89 406.11 C 480.16 429.97 484.08 454.13 488.76 478.12 C 490.00 483.41 484.47 488.29 479.35 486.63 C 454.66 481.52 429.55 478.12 405.14 471.84 C 393.17 467.97 385.20 457.75 376.55 449.27 C 386.39 439.49 396.13 429.60 406.06 419.91 C 416.37 433.45 435.74 414.00 422.11 403.83 Z"})]})});const Zse=({servers:e})=>{const t=Fo(),n=Kc(e),r=!Wn(n);return V.useEffect(()=>{const i=n.find(({autoConnect:o})=>o);i&&t(`/server/${i.id}`)},[]),g.jsx("div",{className:"home",children:g.jsx(Sr,{className:"home__main-card",children:g.jsxs(Qn,{className:"g-0",children:[g.jsx("div",{className:"col-md-5 d-none d-md-block",children:g.jsx("div",{className:"home__logo-wrapper",children:g.jsx("div",{className:"home__logo",children:g.jsx(Z6,{})})})}),g.jsxs("div",{className:"col-md-7 home__servers-container",children:[g.jsx("div",{className:"home__title-wrapper",children:g.jsx("h1",{className:"home__title",children:"Welcome!"})}),g.jsx(G6,{embedded:!0,servers:n,children:!r&&g.jsxs("div",{className:"p-4 text-center",children:[g.jsx("p",{className:"mb-5",children:"This application will help you manage your Shlink servers."}),g.jsx("p",{children:g.jsxs(Lt,{to:"/server/create",className:"btn btn-outline-primary btn-lg me-2",children:[g.jsx(je,{icon:dC})," ",g.jsx("span",{className:"ms-1",children:"Add a server"})]})}),g.jsx("p",{className:"mb-0 mt-5",children:g.jsx(Ci,{href:"https://shlink.io/documentation",children:g.jsxs("small",{children:[g.jsx("span",{className:"me-1",children:"Learn more about Shlink"})," ",g.jsx(je,{icon:pQ})]})})})]})})]})]})})})};const Kse=e=>()=>{const[t,n,,r]=hn(),i=Pn(),{pathname:o}=i;V.useEffect(r,[i]);const s="/settings",a=me("main-header__toggle-icon",{"main-header__toggle-icon--opened":t});return g.jsxs(IC,{color:"primary",dark:!0,fixed:"top",className:"main-header",expand:"md",children:[g.jsxs(FC,{tag:Lt,to:"/",children:[g.jsx(Z6,{className:"main-header__brand-logo",color:"white"})," Shlink"]}),g.jsx($C,{onClick:n,children:g.jsx(je,{icon:RQ,className:a})}),g.jsx(u6,{navbar:!0,isOpen:t,children:g.jsxs(c_,{navbar:!0,className:"ms-auto",children:[g.jsx(BC,{children:g.jsxs(l6,{tag:Lt,to:s,active:o.startsWith(s),children:[g.jsx(je,{icon:IQ}),"  Settings"]})}),g.jsx(e,{})]})})]})};const nu=({children:e})=>g.jsx("div",{className:"no-menu-wrapper container-xl",children:e}),Xse=e=>({error:"border-danger",default:""})[e],Qse=e=>({error:"text-danger",default:"text-muted"})[e],Co=({className:e,children:t,loading:n=!1,type:r="default",fullWidth:i=!1})=>{const o=me({"col-md-12":i,"col-md-10 offset-md-1":!i});return g.jsx(Qn,{className:me("g-0",e),children:g.jsx("div",{className:o,children:g.jsx(Sr,{className:Xse(r),body:!0,children:g.jsxs("h3",{className:me("text-center mb-0",Qse(r)),children:[n&&g.jsx(je,{icon:Xj,spin:!0}),n&&g.jsx("span",{className:"ms-2",children:t??"Loading..."}),!n&&t]})})})})};function K6(e,t){return n=>{const r=Xs(),{selectServer:i,selectedServer:o}=n;return V.useEffect(()=>{r.serverId&&i(r.serverId)},[r.serverId]),o?AZ(o)?g.jsx(t,{}):g.jsx(e,{...n}):g.jsx(nu,{children:g.jsx(Co,{loading:!0})})}}const rr=(e,t)=>wse(e,t,{serializeError:GS}),Jse=(e,t)=>{const n=D3(e),r=D3(t),i=n.pop(),o=r.pop(),s=I3(n,r);return s!==0?s:i&&o?I3(i.split("."),o.split(".")):i||o?i?-1:1:0},$w=(e,t,n)=>{rae(n);const r=Jse(e,t);return X6[n].includes(r)},eae=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,D3=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const t=e.match(eae);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},A3=e=>e==="*"||e==="x"||e==="X",j3=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},tae=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],nae=(e,t)=>{if(A3(e)||A3(t))return 0;const[n,r]=tae(j3(e),j3(t));return n>r?1:n{for(let n=0;n":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1]},F3=Object.keys(X6),rae=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(F3.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${F3.join("|")}`)},mE=(e,t,n=1)=>QS(n,e+1).map(t),vi=e=>!$o(e)&&!Wn(e),rh=e=>Dt(t=>t.preventDefault(),e),b1=e=>Wn(e)?null:e,ga=e=>t=>e===t,Q6=e=>e?"true":"false",w1=e=>e===void 0?void 0:Q6(e),iae=(e,{maxVersion:t,minVersion:n})=>{if(!vi(e))return!1;const r=!n||$w(e,n,">=");return(!t||$w(e,t,"<="))&&r},J6=Oj(GS,e=>{try{return $w(e,e,"=")}catch{return!1}}),e5=e=>J6(e)?`v${e}`:e,t5=(e="latest")=>t=>J6(t)?t:e,gE="shlink/selectedServer",oae="1.0.0",sae="999.999.999",aae="latest",lae=Dt(e=>e===aae?sae:e,t5(oae)),cae=Oj(e=>`${e.id}_${e.url}_${e.apiKey}`,async(e,t)=>t().then(({version:n})=>({version:lae(n),printableVersion:e5(n)}))),$3=null,vE=yn(`${gE}/resetSelectedServer`),n5=e=>rr(`${gE}/selectServer`,async(t,{dispatch:n,getState:r})=>{n(vE());const{servers:i}=r(),o=i[t];if(!o)return{serverNotFound:!0};try{const{health:s}=e(o),{version:a,printableVersion:l}=await cae(o,s);return{...o,version:a,printableVersion:l}}catch{return{...o,serverNotReachable:!0}}}),uae=(e,t)=>{const n=$se();return n.startListening({actionCreator:e.fulfilled,effect:({payload:r},{dispatch:i})=>{Jy(r)&&i(t())}}),n},fae=e=>Yn({name:gE,initialState:$3,reducers:{},extraReducers:t=>{t.addCase(vE,()=>$3),t.addCase(e.fulfilled,(n,{payload:r})=>r)}}),Fi=e=>t=>Jy(t)&&iae(t.version,{minVersion:e}),yE={forwardQuery:Fi("2.9.0"),nonRestCors:Fi("2.9.0"),defaultDomainRedirectsEdition:Fi("2.10.0"),nonOrphanVisits:Fi("3.0.0"),allTagsFiltering:Fi("3.0.0"),tagsStats:Fi("3.0.0"),domainVisits:Fi("3.1.0"),excludeBotsOnShortUrls:Fi("3.4.0"),filterDisabledUrls:Fi("3.4.0"),deviceLongUrls:Fi("3.5.0")};Object.freeze(yE);const ki=(e,t)=>V.useMemo(()=>yE[e](t),[e,n5]);const dae=(e,t,n,r,i,o,s,a,l,c,f,h,p)=>K6(({selectedServer:m,sidebarNotPresent:v,sidebarPresent:y})=>{const x=Pn(),[_,w,S,T]=hn(),P=Jy(m);if(V.useEffect(()=>T(),[x]),V.useEffect(()=>(P&&y(),()=>v()),[]),!P)return g.jsx(c,{});const k=ki("nonOrphanVisits",m),N=ki("domainVisits",m),D=me("menu-layout__burger-icon",{"menu-layout__burger-icon--active":_}),z=koe(S,T);return g.jsxs(g.Fragment,{children:[g.jsx(je,{icon:XX,className:D,onClick:w}),g.jsx("div",{...z,className:"menu-layout__swipeable",children:g.jsxs("div",{className:"menu-layout__swipeable-inner",children:[g.jsx(n,{selectedServer:m,showOnMobile:_}),g.jsx("div",{className:"menu-layout__container",onClick:()=>T(),children:g.jsx("div",{className:"container-xl",children:g.jsxs(Zy,{children:[g.jsx(gt,{index:!0,element:g.jsx(BS,{replace:!0,to:"overview"})}),g.jsx(gt,{path:"/overview",element:g.jsx(f,{})}),g.jsx(gt,{path:"/list-short-urls/:page",element:g.jsx(t,{})}),g.jsx(gt,{path:"/create-short-url",element:g.jsx(r,{})}),g.jsx(gt,{path:"/short-code/:shortCode/visits/*",element:g.jsx(i,{})}),g.jsx(gt,{path:"/short-code/:shortCode/edit",element:g.jsx(h,{})}),g.jsx(gt,{path:"/tag/:tag/visits/*",element:g.jsx(o,{})}),N&&g.jsx(gt,{path:"/domain/:domain/visits/*",element:g.jsx(s,{})}),g.jsx(gt,{path:"/orphan-visits/*",element:g.jsx(a,{})}),k&&g.jsx(gt,{path:"/non-orphan-visits/*",element:g.jsx(l,{})}),g.jsx(gt,{path:"/manage-tags",element:g.jsx(e,{})}),g.jsx(gt,{path:"/manage-domains",element:g.jsx(p,{})}),g.jsx(gt,{path:"*",element:g.jsx(O6,{to:`/server/${m.id}/list-short-urls/1`,children:"List short URLs"})})]})})})]})})]})},c),hae={sidebarPresent:!1},{actions:pae,reducer:mae}=Yn({name:"shlink/sidebar",initialState:hae,reducers:{sidebarPresent:()=>({sidebarPresent:!0}),sidebarNotPresent:()=>({sidebarPresent:!1})}}),{sidebarPresent:gae,sidebarNotPresent:vae}=pae,yae=mae,_ae=({children:e})=>{const t=Pn();return V.useEffect(()=>{scrollTo(0,0)},[t]),g.jsx(g.Fragment,{children:e})},bae="%_VERSION_%",wae=Dt(t5(),e5),B3=({project:e,version:t})=>g.jsx(Ci,{href:`https://github.com/shlinkio/${e}/releases/${t}`,className:"text-muted",children:g.jsx("b",{children:t})}),xae=({selectedServer:e,clientVersion:t=bae})=>{const n=wae(t);return g.jsxs("small",{className:"text-muted",children:[Jy(e)&&g.jsxs(g.Fragment,{children:["Server: ",g.jsx(B3,{project:"shlink",version:e.printableVersion})," - "]}),"Client: ",g.jsx(B3,{project:"shlink-web-client",version:n})]})};const Sae=({selectedServer:e,sidebar:t})=>{const n=me("text-center",{"shlink-versions-container--with-sidebar":t.sidebarPresent});return g.jsx("div",{className:n,children:g.jsx(xae,{selectedServer:e})})},z3={"Content-Type":"application/json"},U3=e=>e!=null&&e.body?e?{...e,headers:{...e.headers??{},...z3}}:{headers:z3}:e;class Cae{constructor(t){xe(this,"fetchJson",(t,n)=>this.fetch(t,U3(n)).then(async r=>{const i=await r.json();if(!r.ok)throw i;return i}));xe(this,"fetchEmpty",(t,n)=>this.fetch(t,U3(n)).then(async r=>{if(!r.ok)throw await r.json()}));xe(this,"fetchBlob",t=>this.fetch(t).then(n=>n.blob()));this.fetch=t}}const r5=({document:e},t,n)=>{const r=e.createElement("a");r.setAttribute("href",t),r.setAttribute("download",n),r.style.visibility="hidden",e.body.appendChild(r),r.click(),e.body.removeChild(r)},i5=(e,t,n)=>{const r=new Blob([t],{type:"text/csv;charset=utf-8;"}),i=URL.createObjectURL(r);r5(e,i,n)};class Eae{constructor(t,n){this.httpClient=t,this.window=n}async saveImage(t,n){const r=await this.httpClient.fetchBlob(t),i=URL.createObjectURL(r);r5(this.window,i,n)}}class Tae{constructor(t,n){xe(this,"exportVisits",(t,n)=>{n.length&&this.exportCsv(t,n)});xe(this,"exportShortUrls",t=>{t.length&&this.exportCsv("short_urls.csv",t)});xe(this,"exportCsv",(t,n)=>{const r=this.jsonToCsv(n);i5(this.window,r,t)});this.window=t,this.jsonToCsv=n}}const Oae=(e,t)=>{e.constant("window",window),e.constant("console",console),e.constant("fetch",window.fetch.bind(window)),e.service("HttpClient",Cae,"fetch"),e.service("ImageDownloader",Eae,"HttpClient","window"),e.service("ReportExporter",Tae,"window","jsonToCsv"),e.serviceFactory("ScrollToTop",()=>_ae),e.serviceFactory("MainHeader",Kse,"ServersDropdown"),e.serviceFactory("Home",()=>Zse),e.decorator("Home",pv),e.decorator("Home",t(["servers"],["resetSelectedServer"])),e.serviceFactory("MenuLayout",dae,"TagsList","ShortUrlsList","AsideMenu","CreateShortUrl","ShortUrlVisits","TagVisits","DomainVisits","OrphanVisits","NonOrphanVisits","ServerError","Overview","EditShortUrl","ManageDomains"),e.decorator("MenuLayout",t(["selectedServer"],["selectServer","sidebarPresent","sidebarNotPresent"])),e.serviceFactory("AsideMenu",Yse,"DeleteServerButton"),e.serviceFactory("ShlinkVersionsContainer",()=>Sae),e.decorator("ShlinkVersionsContainer",t(["selectedServer","sidebar"])),e.serviceFactory("ErrorHandler",qse,"window","console"),e.serviceFactory("sidebarPresent",()=>gae),e.serviceFactory("sidebarNotPresent",()=>vae)};const Ho=({text:e,disabled:t=!1,className:n,children:r,dropdownClassName:i,noCaret:o,end:s=!1,minWidth:a,inline:l,size:c})=>{const[f,h]=hn(),p=me("dropdown-btn__toggle",n,{"btn-block":!l,"dropdown-btn__toggle--with-caret":!o}),m={minWidth:a&&`${a}px`};return g.jsxs(Jc,{isOpen:f,toggle:h,disabled:t,className:i,children:[g.jsx(Zd,{size:c,caret:!o,className:p,color:"primary",children:e}),g.jsx(eu,{className:"w-100",end:s,style:m,children:r})]})};const Pae=({listDomains:e,value:t,domainsList:n,onChange:r})=>{const[i,,o,s]=hn(),{domains:a}=n,l=Wn(t),c=()=>r("");return V.useEffect(()=>{e()},[]),i?g.jsxs(Qd,{children:[g.jsx(Ic,{value:t??"",placeholder:"Domain",onChange:f=>r(f.target.value)}),g.jsx(ht,{id:"backToDropdown",outline:!0,type:"button",className:"domains-dropdown__back-btn","aria-label":"Back to domains list",onClick:Dt(c,s),children:g.jsx(je,{icon:yQ})}),g.jsx(Er,{target:"backToDropdown",placement:"left",trigger:"hover",children:"Existing domains"})]}):g.jsxs(Ho,{text:l?"Domain":`Domain: ${t}`,className:l?"domains-dropdown__toggle-btn":"domains-dropdown__toggle-btn--active",children:[a.map(({domain:f,isDefault:h})=>g.jsxs(Ue,{active:(t===f||h)&&l,onClick:()=>r(f),children:[f,h&&g.jsx("span",{className:"float-end text-muted",children:"default"})]},f)),g.jsx(Ue,{divider:!0}),g.jsx(Ue,{onClick:Dt(c,o),children:g.jsx("i",{children:"New domain"})})]})},Do=({errorData:e,fallbackMessage:t})=>g.jsxs(g.Fragment,{children:[(e==null?void 0:e.detail)??t,LX(e)&&g.jsxs("p",{className:"mb-0",children:["Invalid elements: [",e.invalidElements.join(", "),"]"]})]}),Nr=({children:e,type:t,className:n,small:r=!1})=>g.jsx(Qn,{className:n,children:g.jsx("div",{className:me({"col-md-10 offset-md-1":!r,"col-12":r}),children:g.jsx(cn,{role:"document",className:me("text-center",{"bg-main":t==="success","bg-danger":t==="error","bg-warning":t==="warning","text-white":t!=="warning"}),bodyClassName:me({"p-2":r}),children:e})})});const kae=500;let Pp;const ih=({onChange:e,className:t,large:n=!0,noBorder:r=!1,initialValue:i=""})=>{const[o,s]=V.useState(i),a=()=>{Pp&&clearTimeout(Pp),Pp=null},l=(c,f=kae)=>{s(c),a(),Pp=setTimeout(()=>{e(c),a()},f)};return g.jsxs("div",{className:me("search-field",t),children:[g.jsx("input",{type:"text",className:me("form-control search-field__input",{"form-control-lg":n,"search-field__input--no-border":r}),placeholder:"Search...",value:o,onChange:c=>l(c.target.value)}),g.jsx(je,{icon:MQ,className:"search-field__icon"}),g.jsx("div",{className:"close search-field__close btn-close",hidden:o==="",id:"search-field__close",onClick:()=>l("",0)})]})},__=({children:e,minWidth:t})=>g.jsx(Ho,{text:g.jsx(je,{className:"px-1",icon:wQ}),size:"sm",minWidth:t,end:!0,noCaret:!0,inline:!0,children:e}),Ef=(e,t,n)=>$o(n)?e.shortCode===t&&!e.domain:e.shortCode===t&&e.domain===n,Mae=(e,t)=>!e.domain&&t===N5?!0:e.domain===t,Rae=(e,t)=>{const n=(t==null?void 0:t.validateUrls)??!1;return e?{longUrl:e.longUrl,tags:e.tags,title:e.title??void 0,domain:e.domain??void 0,validSince:e.meta.validSince??void 0,validUntil:e.meta.validUntil??void 0,maxVisits:e.meta.maxVisits??void 0,crawlable:e.crawlable,forwardQuery:e.forwardQuery,deviceLongUrls:e.deviceLongUrls,validateUrl:n}:{longUrl:"",validateUrl:n}},o5="__",Nae=e=>e.replaceAll("/",o5),pm=e=>e.replaceAll(o5,"/");function Qe(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function Oe(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function mm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?mm=function(n){return typeof n}:mm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},mm(e)}function Me(e){Oe(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||mm(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function hl(e,t){Oe(2,arguments);var n=Me(e),r=Qe(t);return isNaN(r)?new Date(NaN):(r&&n.setDate(n.getDate()+r),n)}function no(e,t){Oe(2,arguments);var n=Me(e),r=Qe(t);if(isNaN(r))return new Date(NaN);if(!r)return n;var i=n.getDate(),o=new Date(n.getTime());o.setMonth(n.getMonth()+r+1,0);var s=o.getDate();return i>=s?o:(n.setFullYear(o.getFullYear(),o.getMonth(),i),n)}function gm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?gm=function(n){return typeof n}:gm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},gm(e)}function Lae(e,t){if(Oe(2,arguments),!t||gm(t)!=="object")return new Date(NaN);var n=t.years?Qe(t.years):0,r=t.months?Qe(t.months):0,i=t.weeks?Qe(t.weeks):0,o=t.days?Qe(t.days):0,s=t.hours?Qe(t.hours):0,a=t.minutes?Qe(t.minutes):0,l=t.seconds?Qe(t.seconds):0,c=Me(e),f=r||n?no(c,r+n*12):c,h=o||i?hl(f,o+i*7):f,p=a+s*60,m=l+p*60,v=m*1e3,y=new Date(h.getTime()+v);return y}function _E(e,t){Oe(2,arguments);var n=Me(e).getTime(),r=Qe(t);return new Date(n+r)}var Dae=36e5;function Aae(e,t){Oe(2,arguments);var n=Qe(t);return _E(e,n*Dae)}var jae={};function Wo(){return jae}function s5(e,t){var n,r,i,o,s,a,l,c;Oe(1,arguments);var f=Wo(),h=Qe((n=(r=(i=(o=t==null?void 0:t.weekStartsOn)!==null&&o!==void 0?o:t==null||(s=t.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.weekStartsOn)!==null&&i!==void 0?i:f.weekStartsOn)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Me(e),m=p.getDay(),v=(m=i.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function Fae(e){Oe(1,arguments);var t=Iae(e),n=new Date(0);n.setFullYear(t,0,4),n.setHours(0,0,0,0);var r=wd(n);return r}function Fc(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function Lr(e){Oe(1,arguments);var t=Me(e);return t.setHours(0,0,0,0),t}var $ae=864e5;function xd(e,t){Oe(2,arguments);var n=Lr(e),r=Lr(t),i=n.getTime()-Fc(n),o=r.getTime()-Fc(r);return Math.round((i-o)/$ae)}var Bae=6e4;function Bw(e,t){Oe(2,arguments);var n=Qe(t);return _E(e,n*Bae)}function bE(e,t){Oe(2,arguments);var n=Qe(t),r=n*7;return hl(e,r)}function $c(e,t){Oe(2,arguments);var n=Qe(t);return no(e,n*12)}function vm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?vm=function(n){return typeof n}:vm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},vm(e)}function V3(e){Oe(1,arguments);var t;if(e&&typeof e.forEach=="function")t=e;else if(vm(e)==="object"&&e!==null)t=Array.prototype.slice.call(e);else return new Date(NaN);var n;return t.forEach(function(r){var i=Me(r);(n===void 0||ni||isNaN(i.getDate()))&&(n=i)}),n||new Date(NaN)}function _m(e,t){Oe(2,arguments);var n=Me(e),r=Me(t),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}var wE=6e4,b_=36e5,zae=1e3;function Uae(e,t){Oe(2,arguments);var n=Lr(e),r=Lr(t);return n.getTime()===r.getTime()}function bm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?bm=function(n){return typeof n}:bm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},bm(e)}function xE(e){return Oe(1,arguments),e instanceof Date||bm(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function a5(e){if(Oe(1,arguments),!xE(e)&&typeof e!="number")return!1;var t=Me(e);return!isNaN(Number(t))}function Sd(e,t){Oe(2,arguments);var n=Me(e),r=Me(t),i=n.getFullYear()-r.getFullYear(),o=n.getMonth()-r.getMonth();return i*12+o}function zw(e){Oe(1,arguments);var t=Me(e),n=Math.floor(t.getMonth()/3)+1;return n}function mv(e,t){Oe(2,arguments);var n=Me(e),r=Me(t);return n.getFullYear()-r.getFullYear()}function W3(e,t){var n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function SE(e,t){Oe(2,arguments);var n=Me(e),r=Me(t),i=W3(n,r),o=Math.abs(xd(n,r));n.setDate(n.getDate()-i*o);var s=+(W3(n,r)===-i),a=i*(o-s);return a===0?0:a}function l5(e,t){return Oe(2,arguments),Me(e).getTime()-Me(t).getTime()}var Y3={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},Vae="trunc";function CE(e){return e?Y3[e]:Y3[Vae]}function Hae(e,t,n){Oe(2,arguments);var r=l5(e,t)/b_;return CE(n==null?void 0:n.roundingMethod)(r)}function il(e){Oe(1,arguments);var t=Me(e);return t.setHours(23,59,59,999),t}function Wae(e){Oe(1,arguments);var t=Me(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function Yae(e){Oe(1,arguments);var t=Me(e);return il(t).getTime()===Wae(t).getTime()}function gv(e,t){Oe(2,arguments);var n=Me(e),r=Me(t),i=_m(n,r),o=Math.abs(Sd(n,r)),s;if(o<1)s=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-i*o);var a=_m(n,r)===-i;Yae(Me(e))&&o===1&&_m(e,r)===1&&(a=!1),s=i*(o-Number(a))}return s===0?0:s}function qae(e,t,n){Oe(2,arguments);var r=l5(e,t)/1e3;return CE(n==null?void 0:n.roundingMethod)(r)}function Gae(e,t,n){Oe(2,arguments);var r=SE(e,t)/7;return CE(n==null?void 0:n.roundingMethod)(r)}function Uw(e){Oe(1,arguments);var t=Me(e),n=t.getMonth(),r=n-n%3;return t.setMonth(r,1),t.setHours(0,0,0,0),t}function Zae(e){Oe(1,arguments);var t=Me(e);return t.setDate(1),t.setHours(0,0,0,0),t}function Kae(e){Oe(1,arguments);var t=Me(e),n=new Date(0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Xae(e,t){var n,r,i,o,s,a,l,c;Oe(1,arguments);var f=Wo(),h=Qe((n=(r=(i=(o=t==null?void 0:t.weekStartsOn)!==null&&o!==void 0?o:t==null||(s=t.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.weekStartsOn)!==null&&i!==void 0?i:f.weekStartsOn)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Me(e),m=p.getDay(),v=(m=i.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function tle(e){Oe(1,arguments);var t=u5(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var r=Bc(n);return r}var nle=6048e5;function f5(e){Oe(1,arguments);var t=Me(e),n=Bc(t).getTime()-tle(t).getTime();return Math.round(n/nle)+1}function ol(e,t){var n,r,i,o,s,a,l,c;Oe(1,arguments);var f=Wo(),h=Qe((n=(r=(i=(o=t==null?void 0:t.weekStartsOn)!==null&&o!==void 0?o:t==null||(s=t.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.weekStartsOn)!==null&&i!==void 0?i:f.weekStartsOn)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Me(e),m=p.getUTCDay(),v=(m=1&&m<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var v=new Date(0);v.setUTCFullYear(h+1,0,m),v.setUTCHours(0,0,0,0);var y=ol(v,t),x=new Date(0);x.setUTCFullYear(h,0,m),x.setUTCHours(0,0,0,0);var _=ol(x,t);return f.getTime()>=y.getTime()?h+1:f.getTime()>=_.getTime()?h:h-1}function rle(e,t){var n,r,i,o,s,a,l,c;Oe(1,arguments);var f=Wo(),h=Qe((n=(r=(i=(o=t==null?void 0:t.firstWeekContainsDate)!==null&&o!==void 0?o:t==null||(s=t.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.firstWeekContainsDate)!==null&&i!==void 0?i:f.firstWeekContainsDate)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(c=l.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&n!==void 0?n:1),p=EE(e,t),m=new Date(0);m.setUTCFullYear(p,0,h),m.setUTCHours(0,0,0,0);var v=ol(m,t);return v}var ile=6048e5;function d5(e,t){Oe(1,arguments);var n=Me(e),r=ol(n,t).getTime()-rle(n,t).getTime();return Math.round(r/ile)+1}function tt(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length0?r:1-r;return tt(n==="yy"?i%100:i,n.length)},M:function(t,n){var r=t.getUTCMonth();return n==="M"?String(r+1):tt(r+1,2)},d:function(t,n){return tt(t.getUTCDate(),n.length)},a:function(t,n){var r=t.getUTCHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h:function(t,n){return tt(t.getUTCHours()%12||12,n.length)},H:function(t,n){return tt(t.getUTCHours(),n.length)},m:function(t,n){return tt(t.getUTCMinutes(),n.length)},s:function(t,n){return tt(t.getUTCSeconds(),n.length)},S:function(t,n){var r=n.length,i=t.getUTCMilliseconds(),o=Math.floor(i*Math.pow(10,r-3));return tt(o,n.length)}};const Xo=ole;var Ll={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},sle={G:function(t,n,r){var i=t.getUTCFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return r.era(i,{width:"abbreviated"});case"GGGGG":return r.era(i,{width:"narrow"});case"GGGG":default:return r.era(i,{width:"wide"})}},y:function(t,n,r){if(n==="yo"){var i=t.getUTCFullYear(),o=i>0?i:1-i;return r.ordinalNumber(o,{unit:"year"})}return Xo.y(t,n)},Y:function(t,n,r,i){var o=EE(t,i),s=o>0?o:1-o;if(n==="YY"){var a=s%100;return tt(a,2)}return n==="Yo"?r.ordinalNumber(s,{unit:"year"}):tt(s,n.length)},R:function(t,n){var r=u5(t);return tt(r,n.length)},u:function(t,n){var r=t.getUTCFullYear();return tt(r,n.length)},Q:function(t,n,r){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(n){case"Q":return String(i);case"QQ":return tt(i,2);case"Qo":return r.ordinalNumber(i,{unit:"quarter"});case"QQQ":return r.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(i,{width:"wide",context:"formatting"})}},q:function(t,n,r){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(n){case"q":return String(i);case"qq":return tt(i,2);case"qo":return r.ordinalNumber(i,{unit:"quarter"});case"qqq":return r.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(i,{width:"wide",context:"standalone"})}},M:function(t,n,r){var i=t.getUTCMonth();switch(n){case"M":case"MM":return Xo.M(t,n);case"Mo":return r.ordinalNumber(i+1,{unit:"month"});case"MMM":return r.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(i,{width:"wide",context:"formatting"})}},L:function(t,n,r){var i=t.getUTCMonth();switch(n){case"L":return String(i+1);case"LL":return tt(i+1,2);case"Lo":return r.ordinalNumber(i+1,{unit:"month"});case"LLL":return r.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(i,{width:"wide",context:"standalone"})}},w:function(t,n,r,i){var o=d5(t,i);return n==="wo"?r.ordinalNumber(o,{unit:"week"}):tt(o,n.length)},I:function(t,n,r){var i=f5(t);return n==="Io"?r.ordinalNumber(i,{unit:"week"}):tt(i,n.length)},d:function(t,n,r){return n==="do"?r.ordinalNumber(t.getUTCDate(),{unit:"date"}):Xo.d(t,n)},D:function(t,n,r){var i=ele(t);return n==="Do"?r.ordinalNumber(i,{unit:"dayOfYear"}):tt(i,n.length)},E:function(t,n,r){var i=t.getUTCDay();switch(n){case"E":case"EE":case"EEE":return r.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(i,{width:"short",context:"formatting"});case"EEEE":default:return r.day(i,{width:"wide",context:"formatting"})}},e:function(t,n,r,i){var o=t.getUTCDay(),s=(o-i.weekStartsOn+8)%7||7;switch(n){case"e":return String(s);case"ee":return tt(s,2);case"eo":return r.ordinalNumber(s,{unit:"day"});case"eee":return r.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(o,{width:"short",context:"formatting"});case"eeee":default:return r.day(o,{width:"wide",context:"formatting"})}},c:function(t,n,r,i){var o=t.getUTCDay(),s=(o-i.weekStartsOn+8)%7||7;switch(n){case"c":return String(s);case"cc":return tt(s,n.length);case"co":return r.ordinalNumber(s,{unit:"day"});case"ccc":return r.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(o,{width:"narrow",context:"standalone"});case"cccccc":return r.day(o,{width:"short",context:"standalone"});case"cccc":default:return r.day(o,{width:"wide",context:"standalone"})}},i:function(t,n,r){var i=t.getUTCDay(),o=i===0?7:i;switch(n){case"i":return String(o);case"ii":return tt(o,n.length);case"io":return r.ordinalNumber(o,{unit:"day"});case"iii":return r.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(i,{width:"short",context:"formatting"});case"iiii":default:return r.day(i,{width:"wide",context:"formatting"})}},a:function(t,n,r){var i=t.getUTCHours(),o=i/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(t,n,r){var i=t.getUTCHours(),o;switch(i===12?o=Ll.noon:i===0?o=Ll.midnight:o=i/12>=1?"pm":"am",n){case"b":case"bb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(t,n,r){var i=t.getUTCHours(),o;switch(i>=17?o=Ll.evening:i>=12?o=Ll.afternoon:i>=4?o=Ll.morning:o=Ll.night,n){case"B":case"BB":case"BBB":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(t,n,r){if(n==="ho"){var i=t.getUTCHours()%12;return i===0&&(i=12),r.ordinalNumber(i,{unit:"hour"})}return Xo.h(t,n)},H:function(t,n,r){return n==="Ho"?r.ordinalNumber(t.getUTCHours(),{unit:"hour"}):Xo.H(t,n)},K:function(t,n,r){var i=t.getUTCHours()%12;return n==="Ko"?r.ordinalNumber(i,{unit:"hour"}):tt(i,n.length)},k:function(t,n,r){var i=t.getUTCHours();return i===0&&(i=24),n==="ko"?r.ordinalNumber(i,{unit:"hour"}):tt(i,n.length)},m:function(t,n,r){return n==="mo"?r.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):Xo.m(t,n)},s:function(t,n,r){return n==="so"?r.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):Xo.s(t,n)},S:function(t,n){return Xo.S(t,n)},X:function(t,n,r,i){var o=i._originalDate||t,s=o.getTimezoneOffset();if(s===0)return"Z";switch(n){case"X":return G3(s);case"XXXX":case"XX":return Oa(s);case"XXXXX":case"XXX":default:return Oa(s,":")}},x:function(t,n,r,i){var o=i._originalDate||t,s=o.getTimezoneOffset();switch(n){case"x":return G3(s);case"xxxx":case"xx":return Oa(s);case"xxxxx":case"xxx":default:return Oa(s,":")}},O:function(t,n,r,i){var o=i._originalDate||t,s=o.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+q3(s,":");case"OOOO":default:return"GMT"+Oa(s,":")}},z:function(t,n,r,i){var o=i._originalDate||t,s=o.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+q3(s,":");case"zzzz":default:return"GMT"+Oa(s,":")}},t:function(t,n,r,i){var o=i._originalDate||t,s=Math.floor(o.getTime()/1e3);return tt(s,n.length)},T:function(t,n,r,i){var o=i._originalDate||t,s=o.getTime();return tt(s,n.length)}};function q3(e,t){var n=e>0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),o=r%60;if(o===0)return n+String(i);var s=t||"";return n+String(i)+s+tt(o,2)}function G3(e,t){if(e%60===0){var n=e>0?"-":"+";return n+tt(Math.abs(e)/60,2)}return Oa(e,t)}function Oa(e,t){var n=t||"",r=e>0?"-":"+",i=Math.abs(e),o=tt(Math.floor(i/60),2),s=tt(i%60,2);return r+o+n+s}const ale=sle;var Z3=function(t,n){switch(t){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},h5=function(t,n){switch(t){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},lle=function(t,n){var r=t.match(/(P+)(p+)?/)||[],i=r[1],o=r[2];if(!o)return Z3(t,n);var s;switch(i){case"P":s=n.dateTime({width:"short"});break;case"PP":s=n.dateTime({width:"medium"});break;case"PPP":s=n.dateTime({width:"long"});break;case"PPPP":default:s=n.dateTime({width:"full"});break}return s.replace("{{date}}",Z3(i,n)).replace("{{time}}",h5(o,n))},cle={p:h5,P:lle};const Vw=cle;var ule=["D","DD"],fle=["YY","YYYY"];function p5(e){return ule.indexOf(e)!==-1}function m5(e){return fle.indexOf(e)!==-1}function vv(e,t,n){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var dle={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"}},hle=function(t,n,r){var i,o=dle[t];return typeof o=="string"?i=o:n===1?i=o.one:i=o.other.replace("{{count}}",n.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+i:i+" ago":i};const ple=hle;function x1(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,r=e.formats[n]||e.formats[e.defaultWidth];return r}}var mle={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},gle={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},vle={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},yle={date:x1({formats:mle,defaultWidth:"full"}),time:x1({formats:gle,defaultWidth:"full"}),dateTime:x1({formats:vle,defaultWidth:"full"})};const _le=yle;var ble={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},wle=function(t,n,r,i){return ble[t]};const xle=wle;function ju(e){return function(t,n){var r=n!=null&&n.context?String(n.context):"standalone",i;if(r==="formatting"&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):o;i=e.formattingValues[s]||e.formattingValues[o]}else{var a=e.defaultWidth,l=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[l]||e.values[a]}var c=e.argumentCallback?e.argumentCallback(t):t;return i[c]}}var Sle={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Cle={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Ele={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"]},Tle={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"]},Ole={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"}},Ple={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"}},kle=function(t,n){var r=Number(t),i=r%100;if(i>20||i<10)switch(i%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},Mle={ordinalNumber:kle,era:ju({values:Sle,defaultWidth:"wide"}),quarter:ju({values:Cle,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:ju({values:Ele,defaultWidth:"wide"}),day:ju({values:Tle,defaultWidth:"wide"}),dayPeriod:ju({values:Ole,defaultWidth:"wide",formattingValues:Ple,defaultFormattingWidth:"wide"})};const Rle=Mle;function Iu(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;var s=o[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?Lle(a,function(h){return h.test(s)}):Nle(a,function(h){return h.test(s)}),c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;var f=t.slice(s.length);return{value:c,rest:f}}}function Nle(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function Lle(e,t){for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:{},r=t.match(e.matchPattern);if(!r)return null;var i=r[0],o=t.match(e.parsePattern);if(!o)return null;var s=e.valueCallback?e.valueCallback(o[0]):o[0];s=n.valueCallback?n.valueCallback(s):s;var a=t.slice(i.length);return{value:s,rest:a}}}var Ale=/^(\d+)(th|st|nd|rd)?/i,jle=/\d+/i,Ile={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},Fle={any:[/^b/i,/^(a|c)/i]},$le={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Ble={any:[/1/i,/2/i,/3/i,/4/i]},zle={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},Ule={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]},Vle={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},Hle={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]},Wle={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},Yle={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}},qle={ordinalNumber:Dle({matchPattern:Ale,parsePattern:jle,valueCallback:function(t){return parseInt(t,10)}}),era:Iu({matchPatterns:Ile,defaultMatchWidth:"wide",parsePatterns:Fle,defaultParseWidth:"any"}),quarter:Iu({matchPatterns:$le,defaultMatchWidth:"wide",parsePatterns:Ble,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:Iu({matchPatterns:zle,defaultMatchWidth:"wide",parsePatterns:Ule,defaultParseWidth:"any"}),day:Iu({matchPatterns:Vle,defaultMatchWidth:"wide",parsePatterns:Hle,defaultParseWidth:"any"}),dayPeriod:Iu({matchPatterns:Wle,defaultMatchWidth:"any",parsePatterns:Yle,defaultParseWidth:"any"})};const Gle=qle;var Zle={code:"en-US",formatDistance:ple,formatLong:_le,formatRelative:xle,localize:Rle,match:Gle,options:{weekStartsOn:0,firstWeekContainsDate:1}};const TE=Zle;var Kle=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Xle=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Qle=/^'([^]*?)'?$/,Jle=/''/g,ece=/[a-zA-Z]/;function yo(e,t,n){var r,i,o,s,a,l,c,f,h,p,m,v,y,x,_,w,S,T;Oe(2,arguments);var P=String(t),k=Wo(),N=(r=(i=n==null?void 0:n.locale)!==null&&i!==void 0?i:k.locale)!==null&&r!==void 0?r:TE,D=Qe((o=(s=(a=(l=n==null?void 0:n.firstWeekContainsDate)!==null&&l!==void 0?l:n==null||(c=n.locale)===null||c===void 0||(f=c.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&a!==void 0?a:k.firstWeekContainsDate)!==null&&s!==void 0?s:(h=k.locale)===null||h===void 0||(p=h.options)===null||p===void 0?void 0:p.firstWeekContainsDate)!==null&&o!==void 0?o:1);if(!(D>=1&&D<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var z=Qe((m=(v=(y=(x=n==null?void 0:n.weekStartsOn)!==null&&x!==void 0?x:n==null||(_=n.locale)===null||_===void 0||(w=_.options)===null||w===void 0?void 0:w.weekStartsOn)!==null&&y!==void 0?y:k.weekStartsOn)!==null&&v!==void 0?v:(S=k.locale)===null||S===void 0||(T=S.options)===null||T===void 0?void 0:T.weekStartsOn)!==null&&m!==void 0?m:0);if(!(z>=0&&z<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!N.localize)throw new RangeError("locale must contain localize property");if(!N.formatLong)throw new RangeError("locale must contain formatLong property");var A=Me(e);if(!a5(A))throw new RangeError("Invalid time value");var W=Fc(A),Y=c5(A,W),J={firstWeekContainsDate:D,weekStartsOn:z,locale:N,_originalDate:A},Z=P.match(Xle).map(function(ee){var ie=ee[0];if(ie==="p"||ie==="P"){var oe=Vw[ie];return oe(ee,N.formatLong)}return ee}).join("").match(Kle).map(function(ee){if(ee==="''")return"'";var ie=ee[0];if(ie==="'")return tce(ee);var oe=ale[ie];if(oe)return!(n!=null&&n.useAdditionalWeekYearTokens)&&m5(ee)&&vv(ee,t,String(e)),!(n!=null&&n.useAdditionalDayOfYearTokens)&&p5(ee)&&vv(ee,t,String(e)),oe(Y,ee,N.localize,J);if(ie.match(ece))throw new RangeError("Format string contains an unescaped latin alphabet character `"+ie+"`");return ee}).join("");return Z}function tce(e){var t=e.match(Qle);return t?t[1].replace(Jle,"'"):e}function OE(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function nce(e){return OE({},e)}var K3=1440,rce=2520,S1=43200,ice=86400;function oce(e,t,n){var r,i;Oe(2,arguments);var o=Wo(),s=(r=(i=n==null?void 0:n.locale)!==null&&i!==void 0?i:o.locale)!==null&&r!==void 0?r:TE;if(!s.formatDistance)throw new RangeError("locale must contain formatDistance property");var a=_m(e,t);if(isNaN(a))throw new RangeError("Invalid time value");var l=OE(nce(n),{addSuffix:!!(n!=null&&n.addSuffix),comparison:a}),c,f;a>0?(c=Me(t),f=Me(e)):(c=Me(e),f=Me(t));var h=qae(f,c),p=(Fc(f)-Fc(c))/1e3,m=Math.round((h-p)/60),v;if(m<2)return n!=null&&n.includeSeconds?h<5?s.formatDistance("lessThanXSeconds",5,l):h<10?s.formatDistance("lessThanXSeconds",10,l):h<20?s.formatDistance("lessThanXSeconds",20,l):h<40?s.formatDistance("halfAMinute",0,l):h<60?s.formatDistance("lessThanXMinutes",1,l):s.formatDistance("xMinutes",1,l):m===0?s.formatDistance("lessThanXMinutes",1,l):s.formatDistance("xMinutes",m,l);if(m<45)return s.formatDistance("xMinutes",m,l);if(m<90)return s.formatDistance("aboutXHours",1,l);if(mr.getTime()}function Gr(e,t){Oe(2,arguments);var n=Me(e),r=Me(t);return n.getTime()"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _v(e){return _v=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},_v(e)}function PE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Q3(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function bv(e){return bv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},bv(e)}function tR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Tce=function(e){xce(n,e);var t=Sce(n);function n(){var r;bce(this,n);for(var i=arguments.length,o=new Array(i),s=0;s0,r=n?t:1-t,i;if(r<=50)i=e||100;else{var o=r+50,s=Math.floor(o/100)*100,a=e>=o%100;i=e+s-(a?100:0)}return n?i:1-i}function x5(e){return e%400===0||e%4===0&&e%100!==0}function Sm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Sm=function(n){return typeof n}:Sm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Sm(e)}function Oce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function xv(e){return xv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},xv(e)}function rR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Lce=function(e){kce(n,e);var t=Mce(n);function n(){var r;Oce(this,n);for(var i=arguments.length,o=new Array(i),s=0;s0}},{key:"set",value:function(i,o,s){var a=i.getUTCFullYear();if(s.isTwoDigitYear){var l=w5(s.year,a);return i.setUTCFullYear(l,0,1),i.setUTCHours(0,0,0,0),i}var c=!("era"in o)||o.era===1?s.year:1-s.year;return i.setUTCFullYear(c,0,1),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function Cm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Cm=function(n){return typeof n}:Cm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Cm(e)}function Dce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function iR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Sv(e){return Sv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Sv(e)}function oR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Bce=function(e){jce(n,e);var t=Ice(n);function n(){var r;Dce(this,n);for(var i=arguments.length,o=new Array(i),s=0;s0}},{key:"set",value:function(i,o,s,a){var l=EE(i,a);if(s.isTwoDigitYear){var c=w5(s.year,l);return i.setUTCFullYear(c,0,a.firstWeekContainsDate),i.setUTCHours(0,0,0,0),ol(i,a)}var f=!("era"in o)||o.era===1?s.year:1-s.year;return i.setUTCFullYear(f,0,a.firstWeekContainsDate),i.setUTCHours(0,0,0,0),ol(i,a)}}]),n}(pt);function Em(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Em=function(n){return typeof n}:Em=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Em(e)}function zce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Cv(e){return Cv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Cv(e)}function aR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var qce=function(e){Vce(n,e);var t=Hce(n);function n(){var r;zce(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ev(e){return Ev=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Ev(e)}function cR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var eue=function(e){Kce(n,e);var t=Xce(n);function n(){var r;Gce(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Tv(e){return Tv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Tv(e)}function fR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var aue=function(e){rue(n,e);var t=iue(n);function n(){var r;tue(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=4}},{key:"set",value:function(i,o,s){return i.setUTCMonth((s-1)*3,1),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function Pm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Pm=function(n){return typeof n}:Pm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Pm(e)}function lue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ov(e){return Ov=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Ov(e)}function hR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var pue=function(e){uue(n,e);var t=fue(n);function n(){var r;lue(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=4}},{key:"set",value:function(i,o,s){return i.setUTCMonth((s-1)*3,1),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function km(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?km=function(n){return typeof n}:km=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},km(e)}function mue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Pv(e){return Pv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Pv(e)}function mR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var wue=function(e){vue(n,e);var t=yue(n);function n(){var r;mue(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=11}},{key:"set",value:function(i,o,s){return i.setUTCMonth(s,1),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function Mm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Mm=function(n){return typeof n}:Mm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Mm(e)}function xue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function kv(e){return kv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},kv(e)}function vR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Pue=function(e){Cue(n,e);var t=Eue(n);function n(){var r;xue(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=11}},{key:"set",value:function(i,o,s){return i.setUTCMonth(s,1),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function kue(e,t,n){Oe(2,arguments);var r=Me(e),i=Qe(t),o=d5(r,n)-i;return r.setUTCDate(r.getUTCDate()-o*7),r}function Rm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Rm=function(n){return typeof n}:Rm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Rm(e)}function Mue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Mv(e){return Mv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Mv(e)}function _R(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var jue=function(e){Nue(n,e);var t=Lue(n);function n(){var r;Mue(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=53}},{key:"set",value:function(i,o,s,a){return ol(kue(i,s,a),a)}}]),n}(pt);function Iue(e,t){Oe(2,arguments);var n=Me(e),r=Qe(t),i=f5(n)-r;return n.setUTCDate(n.getUTCDate()-i*7),n}function Nm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Nm=function(n){return typeof n}:Nm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Nm(e)}function Fue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Rv(e){return Rv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Rv(e)}function wR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Hue=function(e){Bue(n,e);var t=zue(n);function n(){var r;Fue(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=53}},{key:"set",value:function(i,o,s){return Bc(Iue(i,s))}}]),n}(pt);function Lm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Lm=function(n){return typeof n}:Lm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Lm(e)}function Wue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Nv(e){return Nv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Nv(e)}function C1(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Xue=[31,28,31,30,31,30,31,31,30,31,30,31],Que=[31,29,31,30,31,30,31,31,30,31,30,31],Jue=function(e){que(n,e);var t=Gue(n);function n(){var r;Wue(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=Que[l]:o>=1&&o<=Xue[l]}},{key:"set",value:function(i,o,s){return i.setUTCDate(s),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function Am(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Am=function(n){return typeof n}:Am=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Am(e)}function efe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function SR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Lv(e){return Lv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Lv(e)}function E1(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var sfe=function(e){nfe(n,e);var t=rfe(n);function n(){var r;efe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=366:o>=1&&o<=365}},{key:"set",value:function(i,o,s){return i.setUTCMonth(0,s),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function RE(e,t,n){var r,i,o,s,a,l,c,f;Oe(2,arguments);var h=Wo(),p=Qe((r=(i=(o=(s=n==null?void 0:n.weekStartsOn)!==null&&s!==void 0?s:n==null||(a=n.locale)===null||a===void 0||(l=a.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&o!==void 0?o:h.weekStartsOn)!==null&&i!==void 0?i:(c=h.locale)===null||c===void 0||(f=c.options)===null||f===void 0?void 0:f.weekStartsOn)!==null&&r!==void 0?r:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=Me(e),v=Qe(t),y=m.getUTCDay(),x=v%7,_=(x+7)%7,w=(_"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Dv(e){return Dv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Dv(e)}function ER(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var hfe=function(e){cfe(n,e);var t=ufe(n);function n(){var r;afe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=6}},{key:"set",value:function(i,o,s,a){return i=RE(i,s,a),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function Fm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Fm=function(n){return typeof n}:Fm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Fm(e)}function pfe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function TR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Av(e){return Av=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Av(e)}function OR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var bfe=function(e){gfe(n,e);var t=vfe(n);function n(){var r;pfe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=6}},{key:"set",value:function(i,o,s,a){return i=RE(i,s,a),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function $m(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?$m=function(n){return typeof n}:$m=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},$m(e)}function wfe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function jv(e){return jv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},jv(e)}function kR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ofe=function(e){Sfe(n,e);var t=Cfe(n);function n(){var r;wfe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=6}},{key:"set",value:function(i,o,s,a){return i=RE(i,s,a),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function Pfe(e,t){Oe(2,arguments);var n=Qe(t);n%7===0&&(n=n-7);var r=1,i=Me(e),o=i.getUTCDay(),s=n%7,a=(s+7)%7,l=(a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Iv(e){return Iv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Iv(e)}function RR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Afe=function(e){Rfe(n,e);var t=Nfe(n);function n(){var r;kfe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=7}},{key:"set",value:function(i,o,s){return i=Pfe(i,s),i.setUTCHours(0,0,0,0),i}}]),n}(pt);function zm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?zm=function(n){return typeof n}:zm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},zm(e)}function jfe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function NR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Fv(e){return Fv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Fv(e)}function LR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ufe=function(e){Ffe(n,e);var t=$fe(n);function n(){var r;jfe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function $v(e){return $v=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},$v(e)}function AR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Zfe=function(e){Wfe(n,e);var t=Yfe(n);function n(){var r;Vfe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Bv(e){return Bv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Bv(e)}function IR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var nde=function(e){Qfe(n,e);var t=Jfe(n);function n(){var r;Kfe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function zv(e){return zv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},zv(e)}function $R(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var cde=function(e){ode(n,e);var t=sde(n);function n(){var r;rde(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=12}},{key:"set",value:function(i,o,s){var a=i.getUTCHours()>=12;return a&&s<12?i.setUTCHours(s+12,0,0,0):!a&&s===12?i.setUTCHours(0,0,0,0):i.setUTCHours(s,0,0,0),i}}]),n}(pt);function Wm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Wm=function(n){return typeof n}:Wm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Wm(e)}function ude(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function BR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Uv(e){return Uv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Uv(e)}function zR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var gde=function(e){dde(n,e);var t=hde(n);function n(){var r;ude(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=23}},{key:"set",value:function(i,o,s){return i.setUTCHours(s,0,0,0),i}}]),n}(pt);function Ym(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ym=function(n){return typeof n}:Ym=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Ym(e)}function vde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function UR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Vv(e){return Vv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Vv(e)}function VR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Sde=function(e){_de(n,e);var t=bde(n);function n(){var r;vde(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=11}},{key:"set",value:function(i,o,s){var a=i.getUTCHours()>=12;return a&&s<12?i.setUTCHours(s+12,0,0,0):i.setUTCHours(s,0,0,0),i}}]),n}(pt);function qm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?qm=function(n){return typeof n}:qm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},qm(e)}function Cde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function HR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Hv(e){return Hv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Hv(e)}function WR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Mde=function(e){Tde(n,e);var t=Ode(n);function n(){var r;Cde(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=1&&o<=24}},{key:"set",value:function(i,o,s){var a=s<=24?s%24:s;return i.setUTCHours(a,0,0,0),i}}]),n}(pt);function Gm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Gm=function(n){return typeof n}:Gm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Gm(e)}function Rde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function YR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Wv(e){return Wv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Wv(e)}function qR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ide=function(e){Lde(n,e);var t=Dde(n);function n(){var r;Rde(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=59}},{key:"set",value:function(i,o,s){return i.setUTCMinutes(s,0,0),i}}]),n}(pt);function Zm(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Zm=function(n){return typeof n}:Zm=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Zm(e)}function Fde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function GR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Yv(e){return Yv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Yv(e)}function ZR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Hde=function(e){Bde(n,e);var t=zde(n);function n(){var r;Fde(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=0&&o<=59}},{key:"set",value:function(i,o,s){return i.setUTCSeconds(s,0),i}}]),n}(pt);function Km(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Km=function(n){return typeof n}:Km=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Km(e)}function Wde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function KR(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function qv(e){return qv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},qv(e)}function XR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Xde=function(e){qde(n,e);var t=Gde(n);function n(){var r;Wde(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Gv(e){return Gv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Gv(e)}function JR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ihe=function(e){ehe(n,e);var t=the(n);function n(){var r;Qde(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Zv(e){return Zv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Zv(e)}function tN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var fhe=function(e){ahe(n,e);var t=lhe(n);function n(){var r;ohe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Kv(e){return Kv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Kv(e)}function rN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var yhe=function(e){phe(n,e);var t=mhe(n);function n(){var r;dhe(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Xv(e){return Xv=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Xv(e)}function oN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ehe=function(e){whe(n,e);var t=xhe(n);function n(){var r;_he(this,n);for(var i=arguments.length,o=new Array(i),s=0;s"u"||e[Symbol.iterator]==null){if(Array.isArray(e)||(n=Ohe(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,a;return{s:function(){n=e[Symbol.iterator]()},n:function(){var c=n.next();return o=c.done,c},e:function(c){s=!0,a=c},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}}}function Ohe(e,t){if(e){if(typeof e=="string")return aN(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return aN(e,t)}}function aN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=1&&A<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var W=Qe((v=(y=(x=(_=r==null?void 0:r.weekStartsOn)!==null&&_!==void 0?_:r==null||(w=r.locale)===null||w===void 0||(S=w.options)===null||S===void 0?void 0:S.weekStartsOn)!==null&&x!==void 0?x:D.weekStartsOn)!==null&&y!==void 0?y:(T=D.locale)===null||T===void 0||(P=T.options)===null||P===void 0?void 0:P.weekStartsOn)!==null&&v!==void 0?v:0);if(!(W>=0&&W<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(N==="")return k===""?Me(n):new Date(NaN);var Y={firstWeekContainsDate:A,weekStartsOn:W,locale:z},J=[new vce],Z=N.match(khe).map(function(O){var R=O[0];if(R in Vw){var I=Vw[R];return I(O,z.formatLong)}return O}).join("").match(Phe),ee=[],ie=sN(Z),oe;try{var G=function(){var R=oe.value;!(r!=null&&r.useAdditionalWeekYearTokens)&&m5(R)&&vv(R,N,e),!(r!=null&&r.useAdditionalDayOfYearTokens)&&p5(R)&&vv(R,N,e);var I=R[0],X=The[I];if(X){var K=X.incompatibleTokens;if(Array.isArray(K)){var ae=ee.find(function(Le){return K.includes(Le.token)||Le.token===I});if(ae)throw new RangeError("The format string mustn't contain `".concat(ae.fullToken,"` and `").concat(R,"` at the same time"))}else if(X.incompatibleTokens==="*"&&ee.length>0)throw new RangeError("The format string mustn't contain `".concat(R,"` and any other token at the same time"));ee.push({token:I,fullToken:R});var ge=X.run(k,R,z.match,Y);if(!ge)return{v:new Date(NaN)};J.push(ge.setter),k=ge.rest}else{if(I.match(Lhe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+I+"`");if(R==="''"?R="'":I==="'"&&(R=Dhe(R)),k.indexOf(R)===0)k=k.slice(R.length);else return{v:new Date(NaN)}}};for(ie.s();!(oe=ie.n()).done;){var F=G();if(tg(F)==="object")return F.v}}catch(O){ie.e(O)}finally{ie.f()}if(k.length>0&&Nhe.test(k))return new Date(NaN);var j=J.map(function(O){return O.priority}).sort(function(O,R){return R-O}).filter(function(O,R,I){return I.indexOf(O)===R}).map(function(O){return J.filter(function(R){return R.priority===O}).sort(function(R,I){return I.subPriority-R.subPriority})}).map(function(O){return O[0]}),B=Me(n);if(isNaN(B.getTime()))return new Date(NaN);var ne=c5(B,Fc(B)),H={},q=sN(j),te;try{for(q.s();!(te=q.n()).done;){var se=te.value;if(!se.validate(ne,Y))return new Date(NaN);var pe=se.set(ne,H,Y);Array.isArray(pe)?(ne=pe[0],OE(H,pe[1])):ne=pe}}catch(O){q.e(O)}finally{q.f()}return ne}function Dhe(e){return e.match(Mhe)[1].replace(Rhe,"'")}function Ahe(e,t){Oe(2,arguments);var n=Me(e),r=Me(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function jhe(e,t){Oe(2,arguments);var n=Uw(e),r=Uw(t);return n.getTime()===r.getTime()}function Ihe(e,t){Oe(2,arguments);var n=Me(e),r=Me(t);return n.getFullYear()===r.getFullYear()}function zc(e,t){Oe(2,arguments);var n=Me(e).getTime(),r=Me(t.start).getTime(),i=Me(t.end).getTime();if(!(r<=i))throw new RangeError("Invalid interval");return n>=r&&n<=i}function NE(e,t){Oe(2,arguments);var n=Qe(t);return hl(e,-n)}function Ao(e,t){var n;Oe(1,arguments);var r=Qe((n=t==null?void 0:t.additionalDigits)!==null&&n!==void 0?n:2);if(r!==2&&r!==1&&r!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof e=="string"||Object.prototype.toString.call(e)==="[object String]"))return new Date(NaN);var i=zhe(e),o;if(i.date){var s=Uhe(i.date,r);o=Vhe(s.restDateString,s.year)}if(!o||isNaN(o.getTime()))return new Date(NaN);var a=o.getTime(),l=0,c;if(i.time&&(l=Hhe(i.time),isNaN(l)))return new Date(NaN);if(i.timezone){if(c=Whe(i.timezone),isNaN(c))return new Date(NaN)}else{var f=new Date(a+l),h=new Date(0);return h.setFullYear(f.getUTCFullYear(),f.getUTCMonth(),f.getUTCDate()),h.setHours(f.getUTCHours(),f.getUTCMinutes(),f.getUTCSeconds(),f.getUTCMilliseconds()),h}return new Date(a+l+c)}var kp={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Fhe=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,$he=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Bhe=/^([+-])(\d{2})(?::?(\d{2}))?$/;function zhe(e){var t={},n=e.split(kp.dateTimeDelimiter),r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],kp.timeZoneDelimiter.test(t.date)&&(t.date=e.split(kp.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){var i=kp.timezone.exec(r);i?(t.time=r.replace(i[1],""),t.timezone=i[1]):t.time=r}return t}function Uhe(e,t){var n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};var i=r[1]?parseInt(r[1]):null,o=r[2]?parseInt(r[2]):null;return{year:o===null?i:o*100,restDateString:e.slice((r[1]||r[2]).length)}}function Vhe(e,t){if(t===null)return new Date(NaN);var n=e.match(Fhe);if(!n)return new Date(NaN);var r=!!n[4],i=Fu(n[1]),o=Fu(n[2])-1,s=Fu(n[3]),a=Fu(n[4]),l=Fu(n[5])-1;if(r)return Khe(t,a,l)?Yhe(t,a,l):new Date(NaN);var c=new Date(0);return!Ghe(t,o,s)||!Zhe(t,i)?new Date(NaN):(c.setUTCFullYear(t,o,Math.max(i,s)),c)}function Fu(e){return e?parseInt(e):1}function Hhe(e){var t=e.match($he);if(!t)return NaN;var n=O1(t[1]),r=O1(t[2]),i=O1(t[3]);return Xhe(n,r,i)?n*b_+r*wE+i*1e3:NaN}function O1(e){return e&&parseFloat(e.replace(",","."))||0}function Whe(e){if(e==="Z")return 0;var t=e.match(Bhe);if(!t)return 0;var n=t[1]==="+"?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return Qhe(r,i)?n*(r*b_+i*wE):NaN}function Yhe(e,t,n){var r=new Date(0);r.setUTCFullYear(e,0,4);var i=r.getUTCDay()||7,o=(t-1)*7+n+1-i;return r.setUTCDate(r.getUTCDate()+o),r}var qhe=[31,null,31,30,31,30,31,31,30,31,30,31];function S5(e){return e%400===0||e%4===0&&e%100!==0}function Ghe(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(qhe[t]||(S5(e)?29:28))}function Zhe(e,t){return t>=1&&t<=(S5(e)?366:365)}function Khe(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function Xhe(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function Qhe(e,t){return t>=0&&t<=59}function Yi(e,t){Oe(2,arguments);var n=Me(e),r=Qe(t),i=n.getFullYear(),o=n.getDate(),s=new Date(0);s.setFullYear(i,r,15),s.setHours(0,0,0,0);var a=lce(s);return n.setMonth(r,Math.min(o,a)),n}function Tf(e,t){Oe(2,arguments);var n=Me(e),r=Qe(t);return n.setHours(r),n}function Of(e,t){Oe(2,arguments);var n=Me(e),r=Qe(t);return n.setMinutes(r),n}function Qu(e,t){Oe(2,arguments);var n=Me(e),r=Qe(t),i=Math.floor(n.getMonth()/3)+1,o=r-i;return Yi(n,n.getMonth()+o*3)}function Jhe(e,t){Oe(2,arguments);var n=Me(e),r=Qe(t);return n.setSeconds(r),n}function Qv(e,t){Oe(2,arguments);var n=Me(e),r=Qe(t);return isNaN(n.getTime())?new Date(NaN):(n.setFullYear(r),n)}function Cd(e,t){Oe(2,arguments);var n=Qe(t);return no(e,-n)}function epe(e,t){Oe(2,arguments);var n=Qe(t);return bE(e,-n)}function Ed(e,t){Oe(2,arguments);var n=Qe(t);return $c(e,-n)}const Pf="yyyy-MM-dd",LE="yyyy-MM-dd HH:mm",Ws=()=>new Date,DE=e=>typeof e!="string",C5=(e,t)=>!e||!DE(e)?e:t?yo(e,t):sce(e),E5=(e=Pf)=>t=>C5(t,e),Ys=e=>C5(e,void 0),Mp=E5(),Jv=E5(LE),bi=e=>DE(e)?e:Ao(e),lN=e=>e?bi(e):null,oh=(e,t,n)=>{try{return zc(bi(e),{start:bi(t??e),end:bi(n??e)})}catch{return!1}},va=(e,t)=>g5(e,t)||Gr(e,t),sh="all",T5={today:"Today",yesterday:"Yesterday",last7Days:"Last 7 days",last30Days:"Last 30 days",last90Days:"Last 90 days",last180Days:"Last 180 days",last365Days:"Last 365 days",[sh]:void 0},O5=Object.keys(T5),P5=e=>e===void 0||Wn(Sj(Boolean,e)),ey=e=>typeof e=="string"&&O5.includes(e),tpe=O5.filter(e=>e!==sh),k5=(e,t)=>({startDate:lN(e),endDate:lN(t)}),npe=e=>{if(!(!e||P5(e)))return e.startDate&&!e.endDate?`Since ${Mp(e.startDate)}`:!e.startDate&&e.endDate?`Until ${Mp(e.endDate)}`:`${Mp(e.startDate)} - ${Mp(e.endDate)}`},AE=e=>{if(!(!e||e===sh))return ey(e)?T5[e]:npe(e)},Yr=e=>Lr(NE(Ws(),e)),Dl=e=>({startDate:e,endDate:il(Ws())}),M5=XS([[ga("today"),()=>Dl(Lr(Ws()))],[ga("yesterday"),()=>({startDate:Yr(1),endDate:il(NE(Ws(),1))})],[ga("last7Days"),()=>Dl(Yr(7))],[ga("last30Days"),()=>Dl(Yr(30))],[ga("last90Days"),()=>Dl(Yr(90))],[ga("last180Days"),()=>Dl(Yr(180))],[ga("last365Days"),()=>Dl(Yr(365))],[gj,()=>({})]]),rpe=e=>{const t=bi(e);return XS([[()=>va(Lr(Ws()),t),()=>"today"],[()=>va(Yr(1),t),()=>"yesterday"],[()=>va(Yr(7),t),()=>"last7Days"],[()=>va(Yr(30),t),()=>"last30Days"],[()=>va(Yr(90),t),()=>"last90Days"],[()=>va(Yr(180),t),()=>"last180Days"],[()=>va(Yr(365),t),()=>"last365Days"],[gj,()=>sh]])()},ipe=e=>ey(e)?M5(e):e,ah=yn("shlink/visitCreation/createNewVisits",e=>({payload:{createdVisits:e}})),cN=5e3,uN=4,fN=2,ope=({currentPage:e,pagesCount:t})=>e>=t,spe=(e,t)=>t*100/e,lh=({typePrefix:e,createLoaders:t,getExtraFulfilledPayload:n,shouldCancel:r})=>{const i=yn(`${e}/progressChanged`),o=yn(`${e}/large`),s=yn(`${e}/fallbackToInterval`),a=rr(e,async(l,{getState:c,dispatch:f})=>{var w;const[h,p]=t(l,c),m=async S=>Promise.all(S.map(async T=>h(T,cN).then(at("data")))).then(nZ),v=async(S,T=0)=>{if(r(c))return[];const P=await m(S[T]);return f(i(spe(S.length,T+fN))),T{const{pagination:T,data:P}=await h(S,cN);if(!T||ope(T))return P;const k=QS(fN,T.pagesCount+1),N=ad(uN,k);return T.pagesCount-1>uN&&f(o()),P.concat(await v(N))},[x,_]=await Promise.all([y(),p((w=l.query)==null?void 0:w.excludeBots)]);return!x.length&&_&&f(s(rpe(_.date))),{...n(l),visits:x}});return Object.assign(a,{progressChanged:i,large:o,fallbackToInterval:s})},ch=(e,t)=>async n=>e?t({page:1,itemsPerPage:1,excludeBots:n}).then(({data:r})=>r[0]):Promise.resolve(void 0),uh=({name:e,asyncThunkCreator:t,initialState:n,filterCreatedVisits:r})=>{const{pending:i,rejected:o,fulfilled:s,large:a,progressChanged:l,fallbackToInterval:c}=t,{reducer:f,actions:h}=Yn({name:e,initialState:n,reducers:{cancelGetVisits:m=>({...m,cancelLoad:!0})},extraReducers:m=>{m.addCase(i,()=>({...n,loading:!0})),m.addCase(o,(v,{error:y})=>({...n,error:!0,errorData:ro(y)})),m.addCase(s,(v,{payload:y})=>({...v,...y,loading:!1,loadingLarge:!1,error:!1})),m.addCase(a,v=>({...v,loadingLarge:!0})),m.addCase(l,(v,{payload:y})=>({...v,progress:y})),m.addCase(c,(v,{payload:y})=>({...v,fallbackInterval:y})),m.addCase(ah,(v,{payload:y})=>{const{visits:x}=v,_=r(v,y.createdVisits).map(({visit:w})=>w);return _.length?{...v,visits:[..._,...x]}:v})}}),{cancelGetVisits:p}=h;return{reducer:f,cancelGetVisits:p}},R5="shlink/domainVisits",N5="DEFAULT",ape={visits:[],domain:"",loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},lpe=e=>lh({typePrefix:`${R5}/getDomainVisits`,createLoaders:({domain:t,query:n={},doIntervalFallback:r=!1},i)=>{const{getDomainVisits:o}=e(i),s=async(l,c)=>o(t,{...n,page:l,itemsPerPage:c}),a=ch(r,async l=>o(t,l));return[s,a]},getExtraFulfilledPayload:({domain:t,query:n={}})=>({domain:t,query:n}),shouldCancel:t=>t().domainVisits.cancelLoad}),cpe=e=>uh({name:R5,initialState:ape,asyncThunkCreator:e,filterCreatedVisits:({domain:t,query:n={}},r)=>{const{startDate:i,endDate:o}=n;return r.filter(({shortUrl:s,visit:a})=>s&&Mae(s,t)&&oh(a.date,i,o))}}),ru=({children:e,label:t,className:n="",labelClassName:r="",noMargin:i=!1,id:o})=>g.jsxs("div",{className:`${n} ${i?"":"mb-3"}`,children:[g.jsx("label",{className:`form-label ${r}`,htmlFor:o,children:t}),e]}),ng=({children:e,value:t,onChange:n,type:r,required:i,placeholder:o,className:s,labelClassName:a})=>{const l=v_();return g.jsx(ru,{label:g.jsxs(g.Fragment,{children:[e,":"]}),className:s??"",labelClassName:a,id:l,children:g.jsx("input",{id:l,className:"form-control",type:r??"text",value:t,required:i??!0,placeholder:o,onChange:c=>n(c.target.value)})})},rg=({className:e="",placement:t,children:n})=>{const r=dl();return g.jsxs(g.Fragment,{children:[g.jsx("span",{className:e,ref:r,children:g.jsx(je,{icon:fC})}),g.jsx(Er,{target:r,placement:t,children:n})]})},P1=({isLast:e,...t})=>g.jsx(ng,{...t,required:!1,type:"url",placeholder:"No redirect",className:e?"mb-0":""}),upe=({isOpen:e,toggle:t,domain:n,editDomainRedirects:r})=>{var h,p,m;const[i,o]=V.useState(((h=n.redirects)==null?void 0:h.baseUrlRedirect)??""),[s,a]=V.useState(((p=n.redirects)==null?void 0:p.regular404Redirect)??""),[l,c]=V.useState(((m=n.redirects)==null?void 0:m.invalidShortUrlRedirect)??""),f=rh(async()=>r({domain:n.domain,redirects:{baseUrlRedirect:b1(i),regular404Redirect:b1(s),invalidShortUrlRedirect:b1(l)}}).then(t));return g.jsx(Vo,{isOpen:e,toggle:t,centered:!0,children:g.jsxs("form",{name:"domainRedirectsModal",onSubmit:f,children:[g.jsxs(io,{toggle:t,children:["Edit redirects for ",g.jsx("b",{children:n.domain})]}),g.jsxs(Mi,{children:[g.jsxs(P1,{value:i,onChange:o,children:[g.jsxs(rg,{className:"me-2",placement:"bottom",children:["Visitors accessing the base url, as in ",g.jsxs("b",{children:["https://",n.domain,"/"]}),", will be redirected to this URL."]}),"Base URL"]}),g.jsxs(P1,{value:s,onChange:a,children:[g.jsxs(rg,{className:"me-2",placement:"bottom",children:["Visitors accessing a url not matching a short URL pattern, as in ",g.jsxs("b",{children:["https://",n.domain,"/???/[...]"]}),", will be redirected to this URL."]}),"Regular 404"]}),g.jsxs(P1,{value:l,isLast:!0,onChange:c,children:[g.jsx(rg,{className:"me-2",placement:"bottom",children:"Visitors accessing a url matching a short URL pattern, but not matching an existing short code, will be redirected to this URL."}),"Invalid short URL"]})]}),g.jsxs(ta,{children:[g.jsx(ht,{color:"link",type:"button",onClick:t,children:"Cancel"}),g.jsx(ht,{color:"primary",children:"Save"})]})]})})},fpe=({domain:e,editDomainRedirects:t,selectedServer:n})=>{const[r,i]=hn(),{isDefault:o}=e,s=!o||ki("defaultDomainRedirectsEdition",n),a=ki("domainVisits",n),l=Ud(n);return g.jsxs(__,{children:[a&&g.jsxs(Ue,{tag:Lt,to:`/server/${l}/domain/${e.domain}${e.isDefault?`_${N5}`:""}/visits`,children:[g.jsx(je,{icon:uC,fixedWidth:!0})," Visit stats"]}),g.jsxs(Ue,{disabled:!s,onClick:s?i:void 0,children:[g.jsx(je,{fixedWidth:!0,icon:cC})," Edit redirects"]}),g.jsx(upe,{domain:e,isOpen:r,toggle:i,editDomainRedirects:t})]})},dpe=({status:e,matchMedia:t=window.matchMedia})=>{const n=dl(),r=()=>t("(max-width: 991px)").matches,[i,o]=V.useState(r());return V.useEffect(()=>{const s=()=>o(r());return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[]),e==="validating"?g.jsx(je,{fixedWidth:!0,icon:Xj,spin:!0}):g.jsxs(g.Fragment,{children:[g.jsx("span",{ref:n,children:e==="valid"?g.jsx(je,{fixedWidth:!0,icon:cd,className:"text-muted"}):g.jsx(je,{fixedWidth:!0,icon:uw,className:"text-danger"})}),g.jsx(Er,{target:n,placement:i?"top-start":"left",autohide:e==="valid",children:e==="valid"?"Congratulations! This domain is properly configured.":g.jsxs("span",{children:["Oops! There is some missing configuration, and short URLs shared with this domain will not work.",g.jsx("br",{}),"Check the ",g.jsx(Ci,{href:"https://slnk.to/multi-domain-docs",children:"documentation"})," in order to find out what is missing."]})})]})},k1=({fallback:e})=>g.jsxs("span",{className:"text-muted",children:[!e&&g.jsx("small",{children:"No redirect"}),e&&g.jsxs(g.Fragment,{children:[e," ",g.jsx("small",{children:"(as fallback)"})]})]}),hpe=()=>g.jsxs(g.Fragment,{children:[g.jsx(je,{fixedWidth:!0,icon:JX,className:"text-primary",id:"defaultDomainIcon"}),g.jsx(Er,{target:"defaultDomainIcon",placement:"right",children:"Default domain"})]}),ppe=({domain:e,editDomainRedirects:t,checkDomainHealth:n,defaultRedirects:r,selectedServer:i})=>{const{domain:o,isDefault:s,redirects:a,status:l}=e;return V.useEffect(()=>{n(e.domain)},[]),g.jsxs("tr",{className:"responsive-table__row",children:[g.jsx("td",{className:"responsive-table__cell","data-th":"Is default domain",children:s&&g.jsx(hpe,{})}),g.jsx("th",{className:"responsive-table__cell","data-th":"Domain",children:o}),g.jsx("td",{className:"responsive-table__cell","data-th":"Base path redirect",children:(a==null?void 0:a.baseUrlRedirect)??g.jsx(k1,{fallback:r==null?void 0:r.baseUrlRedirect})}),g.jsx("td",{className:"responsive-table__cell","data-th":"Regular 404 redirect",children:(a==null?void 0:a.regular404Redirect)??g.jsx(k1,{fallback:r==null?void 0:r.regular404Redirect})}),g.jsx("td",{className:"responsive-table__cell","data-th":"Invalid short URL redirect",children:(a==null?void 0:a.invalidShortUrlRedirect)??g.jsx(k1,{fallback:r==null?void 0:r.invalidShortUrlRedirect})}),g.jsx("td",{className:"responsive-table__cell text-lg-center","data-th":"Status",children:g.jsx(dpe,{status:l})}),g.jsx("td",{className:"responsive-table__cell text-end",children:g.jsx(fpe,{domain:e,editDomainRedirects:t,selectedServer:i})})]})},dN=["","Domain","Base path redirect","Regular 404 redirect","Invalid short URL redirect","",""],mpe=({listDomains:e,domainsList:t,filterDomains:n,editDomainRedirects:r,checkDomainHealth:i,selectedServer:o})=>{var m;const{filteredDomains:s,defaultRedirects:a,loading:l,error:c,errorData:f}=t,h=a??((m=s.find(({isDefault:v})=>v))==null?void 0:m.redirects);if(V.useEffect(()=>{e()},[]),l)return g.jsx(Co,{loading:!0});const p=()=>c?g.jsx(Nr,{type:"error",children:g.jsx(Do,{errorData:f,fallbackMessage:"Error loading domains :("})}):g.jsx(cn,{children:g.jsxs("table",{className:"table table-hover responsive-table mb-0",children:[g.jsx("thead",{className:"responsive-table__header",children:g.jsx("tr",{children:dN.map((v,y)=>g.jsx("th",{children:v},y))})}),g.jsxs("tbody",{children:[s.length<1&&g.jsx("tr",{children:g.jsx("td",{colSpan:dN.length,className:"text-center",children:"No results found"})}),s.map(v=>g.jsx(ppe,{domain:v,editDomainRedirects:r,checkDomainHealth:i,defaultRedirects:h,selectedServer:o},v.domain))]})]})});return g.jsxs(g.Fragment,{children:[g.jsx(ih,{className:"mb-3",onChange:n}),p()]})},gpe="shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS",vpe=e=>rr(gpe,async({domain:t,redirects:n},{getState:r})=>{const{editDomainRedirects:i}=e(r),o=await i({domain:t,...n});return{domain:t,redirects:o}}),ype=(e,t)=>{const[n,r]=e.split("://"),[,...i]=r.split("/"),o=i.length?`/${i.join("/")}`:"";return`${n}://${t}${o}`},Rp="shlink/domainsList",Np={domains:[],filteredDomains:[],loading:!1,error:!1},hN=({domain:e,redirects:t})=>n=>n.domain!==e?n:{...n,redirects:t},pN=(e,t)=>n=>n.domain!==e?n:{...n,status:t},_pe=(e,t)=>{const n=rr(`${Rp}/listDomains`,async(s,{getState:a})=>{const{listDomains:l}=e(a),{data:c,defaultRedirects:f}=await l();return{domains:c.map(h=>({...h,status:"validating"})),defaultRedirects:f}}),r=rr(`${Rp}/checkDomainHealth`,async(s,{getState:a})=>{const{selectedServer:l}=a();if(!JS(l))return{domain:s,status:"invalid"};try{const{url:c,...f}=l,{health:h}=e({...f,url:ype(c,s)}),{status:p}=await h();return{domain:s,status:p==="pass"?"valid":"invalid"}}catch{return{domain:s,status:"invalid"}}}),i=yn(`${Rp}/filterDomains`),{reducer:o}=Yn({name:Rp,initialState:Np,reducers:{},extraReducers:s=>{s.addCase(n.pending,()=>({...Np,loading:!0})),s.addCase(n.rejected,(a,{error:l})=>({...Np,error:!0,errorData:ro(l)})),s.addCase(n.fulfilled,(a,{payload:l})=>({...Np,...l,filteredDomains:l.domains})),s.addCase(r.fulfilled,({domains:a,filteredDomains:l,...c},{payload:f})=>({...c,domains:a.map(pN(f.domain,f.status)),filteredDomains:l.map(pN(f.domain,f.status))})),s.addCase(i,(a,{payload:l})=>({...a,filteredDomains:a.domains.filter(({domain:c})=>c.toLowerCase().match(l.toLowerCase()))})),s.addCase(t.fulfilled,(a,{payload:l})=>({...a,domains:a.domains.map(hN(l)),filteredDomains:a.filteredDomains.map(hN(l))}))}});return{reducer:o,listDomains:n,checkDomainHealth:r,filterDomains:i}},bpe=(e,t)=>{e.serviceFactory("DomainSelector",()=>Pae),e.decorator("DomainSelector",t(["domainsList"],["listDomains"])),e.serviceFactory("ManageDomains",()=>mpe),e.decorator("ManageDomains",t(["domainsList","selectedServer"],["listDomains","filterDomains","editDomainRedirects","checkDomainHealth"])),e.serviceFactory("domainsListReducerCreator",_pe,"buildShlinkApiClient","editDomainRedirects"),e.serviceFactory("domainsListReducer",at("reducer"),"domainsListReducerCreator"),e.serviceFactory("listDomains",at("listDomains"),"domainsListReducerCreator"),e.serviceFactory("filterDomains",at("filterDomains"),"domainsListReducerCreator"),e.serviceFactory("editDomainRedirects",vpe,"buildShlinkApiClient"),e.serviceFactory("checkDomainHealth",at("checkDomainHealth"),"domainsListReducerCreator")},mN="shlink/mercure",wpe={loading:!0,error:!1},xpe=e=>{const t=rr(`${mN}/loadMercureInfo`,(r,{getState:i})=>{const{settings:o}=i();if(!o.realTimeUpdates.enabled)throw new Error("Real time updates not enabled");return e(i).mercureInfo()}),{reducer:n}=Yn({name:mN,initialState:wpe,reducers:{},extraReducers:r=>{r.addCase(t.pending,i=>({...i,loading:!0,error:!1})),r.addCase(t.rejected,i=>({...i,loading:!1,error:!0})),r.addCase(t.fulfilled,(i,{payload:o})=>({...o,loading:!1,error:!1}))}});return{loadMercureInfo:t,reducer:n}},Spe=e=>{e.serviceFactory("mercureInfoReducerCreator",xpe,"buildShlinkApiClient"),e.serviceFactory("mercureInfoReducer",at("reducer"),"mercureInfoReducerCreator"),e.serviceFactory("loadMercureInfo",at("loadMercureInfo"),"mercureInfoReducerCreator")},L5=({isOpen:e,duplicatedServers:t,onDiscard:n,onSave:r})=>{const i=t.length>1;return g.jsxs(Vo,{centered:!0,isOpen:e,children:[g.jsxs(io,{children:["Duplicated server",i&&"s"]}),g.jsxs(Mi,{children:[g.jsx("p",{children:i?"The next servers already exist:":"There is already a server with:"}),g.jsx("ul",{children:t.map(({url:o,apiKey:s},a)=>i?g.jsxs("li",{children:[g.jsx("b",{children:o})," - ",g.jsx("b",{children:s})]},a):g.jsxs(V.Fragment,{children:[g.jsxs("li",{children:["URL: ",g.jsx("b",{children:o})]}),g.jsxs("li",{children:["API key: ",g.jsx("b",{children:s})]})]},a))}),g.jsxs("span",{children:[i?"Do you want to ignore duplicated servers":"Do you want to save this server anyway","?"]})]}),g.jsxs(ta,{children:[g.jsx(ht,{color:"link",onClick:n,children:i?"Ignore duplicated":"Discard"}),g.jsx(ht,{color:"primary",onClick:r,children:"Save anyway"})]})]})},D5=({onSubmit:e,initialValues:t,children:n,title:r})=>{const[i,o]=V.useState(""),[s,a]=V.useState(""),[l,c]=V.useState(""),f=rh(()=>e({name:i,url:s,apiKey:l}));return V.useEffect(()=>{t&&o(t.name),t&&a(t.url),t&&c(t.apiKey)},[t]),g.jsxs("form",{className:"server-form",name:"serverForm",onSubmit:f,children:[g.jsxs(cn,{className:"mb-3",title:r,children:[g.jsx(ng,{value:i,onChange:o,children:"Name"}),g.jsx(ng,{type:"url",value:s,onChange:a,children:"URL"}),g.jsx(ng,{value:l,onChange:c,children:"API key"})]}),g.jsx("div",{className:"text-end",children:n})]})},gN=4e3,vN=({type:e})=>g.jsx("div",{className:"mt-3",children:g.jsxs(Nr,{type:e,children:[e==="success"&&"Servers properly imported. You can now select one from the list :)",e==="error"&&"The servers could not be imported. Make sure the format is correct."]})}),Cpe=(e,t)=>({servers:n,createServers:r})=>{const i=Fo(),o=na(),s=!!Object.keys(n).length,[a,l]=t(!1,gN),[c,f]=t(!1,gN),[h,p]=hn(),[m,v]=V.useState(),y=()=>{if(!m)return;const x=iE();r([{...m,id:x}]),i(`/server/${x}`)};return V.useEffect(()=>{Object.values(n).some(({url:_,apiKey:w})=>(m==null?void 0:m.url)===_&&(m==null?void 0:m.apiKey)===w)?p():y()},[m]),g.jsxs(nu,{children:[g.jsxs(D5,{title:g.jsx("h5",{className:"mb-0",children:"Add new server"}),onSubmit:v,children:[!s&&g.jsx(e,{tooltipPlacement:"top",onImport:l,onImportError:f}),s&&g.jsx(ht,{outline:!0,onClick:o,children:"Cancel"}),g.jsx(ht,{outline:!0,color:"primary",className:"ms-2",children:"Create server"})]}),a&&g.jsx(vN,{type:"success"}),c&&g.jsx(vN,{type:"error"}),g.jsx(L5,{isOpen:h,duplicatedServers:m?[m]:[],onDiscard:o,onSave:y})]})},Epe=e=>({server:t,className:n,children:r,textClassName:i})=>{const[o,,s,a]=hn();return g.jsxs(g.Fragment,{children:[g.jsxs("span",{className:n,onClick:s,children:[!r&&g.jsx(je,{fixedWidth:!0,icon:lC}),g.jsx("span",{className:i,children:r??"Remove this server"})]}),g.jsx(e,{server:t,isOpen:o,toggle:a})]})},Tpe=({server:e,toggle:t,isOpen:n,deleteServer:r,redirectHome:i=!0})=>{const o=Fo(),s=V.useRef(!1),a=()=>{s.current=!0,t()},l=()=>{s.current&&(r(e),i&&o("/"))};return g.jsxs(Vo,{isOpen:n,toggle:t,centered:!0,onClosed:l,children:[g.jsx(io,{toggle:t,className:"text-danger",children:"Remove server"}),g.jsxs(Mi,{children:[g.jsxs("p",{children:["Are you sure you want to remove ",g.jsx("b",{children:e?e.name:""}),"?"]}),g.jsx("p",{children:g.jsx("i",{children:"No data will be deleted, only the access to this server will be removed from this device. You can create it again at any moment."})})]}),g.jsxs(ta,{children:[g.jsx(ht,{color:"link",onClick:t,children:"Cancel"}),g.jsx(ht,{color:"danger",onClick:a,children:"Delete"})]})]})},Ope=e=>K6(({editServer:t,selectedServer:n,selectServer:r})=>{const i=na(),{reconnect:o}=Noe();if(!Ms(n))return null;const s=a=>{t(n.id,a),o==="true"&&r(n.id),i()};return g.jsx(nu,{children:g.jsxs(D5,{title:g.jsxs("h5",{className:"mb-0",children:['Edit "',n.name,'"']}),initialValues:n,onSubmit:s,children:[g.jsx(ht,{outline:!0,className:"me-2",onClick:i,children:"Cancel"}),g.jsx(ht,{outline:!0,color:"primary",children:"Save"})]})})},e);const yN=e=>({url:t,apiKey:n})=>e.some(r=>r.url===t&&r.apiKey===n),Ppe=({importServersFromFile:e})=>({createServers:t,servers:n,children:r,onImport:i=()=>{},onImportError:o=()=>{},tooltipPlacement:s="bottom",className:a=""})=>{const l=dl(),[c,f]=V.useState(),[h,p]=V.useState([]),[m,,v,y]=hn(),x=Dt(t,i),_=Dt(()=>x(c??[]),y),w=Dt(()=>x((c??[]).filter(_G(yN(h)))),y),S=async({target:T})=>{var P;return e((P=T.files)==null?void 0:P[0]).then(f).then(()=>{T.value=null}).catch(o)};return V.useEffect(()=>{if(!c)return;const T=Object.values(n),P=c.filter(yN(T)),k=!!P.length;k?p(P):x(c),k&&v()},[c]),g.jsxs(g.Fragment,{children:[g.jsxs(ht,{outline:!0,id:"importBtn",className:a,onClick:()=>{var T;return(T=l.current)==null?void 0:T.click()},children:[g.jsx(je,{icon:oQ,fixedWidth:!0})," ",r??"Import from file"]}),g.jsxs(Er,{placement:s,target:"importBtn",children:["You can create servers by importing a CSV file with columns ",g.jsx("b",{children:"name"}),", ",g.jsx("b",{children:"apiKey"})," and ",g.jsx("b",{children:"url"}),"."]}),g.jsx("input",{type:"file",accept:"text/csv",className:"import-servers-btn__csv-select",ref:l,onChange:S}),g.jsx(L5,{isOpen:m,duplicatedServers:h,onDiscard:w,onSave:_})]})};const kpe=e=>({servers:t,selectedServer:n})=>g.jsx(nu,{children:g.jsxs("div",{className:"server-error__container flex-column",children:[g.jsxs(Co,{className:"w-100 mb-3 mb-md-5",type:"error",fullWidth:!0,children:[!Ms(n)&&"Could not find this Shlink server.",Ms(n)&&g.jsxs(g.Fragment,{children:[g.jsx("p",{children:"Oops! Could not connect to this Shlink server."}),"Make sure you have internet connection, and the server is properly configured and on-line."]})]}),g.jsxs(G6,{servers:Object.values(t),children:["These are the Shlink servers currently configured. Choose one of them or ",g.jsx(Lt,{to:"/server/create",children:"add a new one"}),"."]}),Ms(n)&&g.jsx("div",{className:"container mt-3 mt-md-5",children:g.jsxs("h5",{children:["Alternatively, if you think you may have miss-configured this server, you can ",g.jsx(e,{server:n,className:"server-error__delete-btn",children:"remove it"})," or ",g.jsx(Lt,{to:`/server/${n.id}/edit?reconnect=true`,children:"edit it"}),"."]})})]})}),Mpe=4e3,Rpe=(e,t,n,r)=>({servers:i})=>{const o=Object.values(i),[s,a]=V.useState(o),l=p=>a(o.filter(({name:m,url:v})=>`${m} ${v}`.toLowerCase().match(p.toLowerCase()))),c=s.some(({autoConnect:p})=>!!p),[f,h]=n(!1,Mpe);return V.useEffect(()=>{a(Object.values(i))},[i]),g.jsxs(nu,{children:[g.jsx(ih,{className:"mb-3",onChange:l}),g.jsxs(Qn,{className:"mb-3",children:[g.jsxs("div",{className:"col-md-6 d-flex d-md-block mb-2 mb-md-0",children:[g.jsx(t,{className:"flex-fill",onImportError:h,children:"Import servers"}),o.length>0&&g.jsxs(ht,{outline:!0,className:"ms-2 flex-fill",onClick:async()=>e.exportServers(),children:[g.jsx(je,{icon:nI,fixedWidth:!0})," Export servers"]})]}),g.jsx("div",{className:"col-md-6 text-md-end d-flex d-md-block",children:g.jsxs(ht,{outline:!0,color:"primary",className:"flex-fill",tag:Lt,to:"/server/create",children:[g.jsx(je,{icon:dC,fixedWidth:!0})," Add a server"]})})]}),g.jsx(cn,{children:g.jsxs("table",{className:"table table-hover responsive-table mb-0",children:[g.jsx("thead",{className:"responsive-table__header",children:g.jsxs("tr",{children:[c&&g.jsx("th",{"aria-label":"Auto-connect",style:{width:"50px"}}),g.jsx("th",{children:"Name"}),g.jsx("th",{children:"Base URL"}),g.jsx("th",{"aria-label":"Options"})]})}),g.jsxs("tbody",{children:[!s.length&&g.jsx("tr",{className:"text-center",children:g.jsx("td",{colSpan:4,children:"No servers found."})}),s.map(p=>g.jsx(r,{server:p,hasAutoConnect:c},p.id))]})]})}),f&&g.jsx("div",{className:"mt-3",children:g.jsx(Nr,{type:"error",children:"The servers could not be imported. Make sure the format is correct."})})]})},Npe=e=>({server:t,hasAutoConnect:n})=>g.jsxs("tr",{className:"responsive-table__row",children:[n&&g.jsx("td",{className:"responsive-table__cell","data-th":"Auto-connect",children:t.autoConnect&&g.jsxs(g.Fragment,{children:[g.jsx(je,{icon:cd,className:"text-primary",id:"autoConnectIcon"}),g.jsx(Er,{target:"autoConnectIcon",placement:"right",children:"Auto-connect to this server"})]})}),g.jsx("th",{className:"responsive-table__cell","data-th":"Name",children:g.jsx(Lt,{to:`/server/${t.id}`,children:t.name})}),g.jsx("td",{className:"responsive-table__cell","data-th":"Base URL",children:t.url}),g.jsx("td",{className:"responsive-table__cell text-end",children:g.jsx(e,{server:t})})]});var Lpe={prefix:"far",iconName:"calendar-days",icon:[448,512,["calendar-alt"],"f073","M152 24c0-13.3-10.7-24-24-24s-24 10.7-24 24V64H64C28.7 64 0 92.7 0 128v16 48V448c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V192 144 128c0-35.3-28.7-64-64-64H344V24c0-13.3-10.7-24-24-24s-24 10.7-24 24V64H152V24zM48 192h80v56H48V192zm0 104h80v64H48V296zm128 0h96v64H176V296zm144 0h80v64H320V296zm80-48H320V192h80v56zm0 160v40c0 8.8-7.2 16-16 16H320V408h80zm-128 0v56H176V408h96zm-144 0v56H64c-8.8 0-16-7.2-16-16V408h80zM272 248H176V192h96v56z"]},Dpe=Lpe,Ape={prefix:"far",iconName:"circle-right",icon:[512,512,[61838,"arrow-alt-circle-right"],"f35a","M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM294.6 135.1c-4.2-4.5-10.1-7.1-16.3-7.1C266 128 256 138 256 150.3V208H160c-17.7 0-32 14.3-32 32v32c0 17.7 14.3 32 32 32h96v57.7c0 12.3 10 22.3 22.3 22.3c6.2 0 12.1-2.6 16.3-7.1l99.9-107.1c3.5-3.8 5.5-8.7 5.5-13.8s-2-10.1-5.5-13.8L294.6 135.1z"]},jpe=Ape,Ipe={prefix:"far",iconName:"circle",icon:[512,512,[128308,128309,128992,128993,128994,128995,128996,9679,9898,9899,11044,61708,61915],"f111","M512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256zM256 48C141.1 48 48 141.1 48 256C48 370.9 141.1 464 256 464C370.9 464 464 370.9 464 256C464 141.1 370.9 48 256 48z"]},A5={prefix:"far",iconName:"clone",icon:[512,512,[],"f24d","M64 464H288c8.8 0 16-7.2 16-16V384h48v64c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V224c0-35.3 28.7-64 64-64h64v48H64c-8.8 0-16 7.2-16 16V448c0 8.8 7.2 16 16 16zM224 304H448c8.8 0 16-7.2 16-16V64c0-8.8-7.2-16-16-16H224c-8.8 0-16 7.2-16 16V288c0 8.8 7.2 16 16 16zm-64-16V64c0-35.3 28.7-64 64-64H448c35.3 0 64 28.7 64 64V288c0 35.3-28.7 64-64 64H224c-35.3 0-64-28.7-64-64z"]};const Fpe=e=>({server:t,setAutoConnect:n})=>{const[r,,i,o]=hn(),s=`/server/${t.id}`,{autoConnect:a}=t,l=a?rQ:Ipe;return g.jsxs(__,{minWidth:170,children:[g.jsxs(Ue,{tag:Lt,to:s,children:[g.jsx(je,{icon:tQ,fixedWidth:!0})," Connect"]}),g.jsxs(Ue,{tag:Lt,to:`${s}/edit`,children:[g.jsx(je,{icon:cC,fixedWidth:!0})," Edit server"]}),g.jsxs(Ue,{onClick:()=>n(t,!a),children:[g.jsx(je,{icon:l,fixedWidth:!0})," ",a?"Do not a":"A","uto-connect"]}),g.jsx(Ue,{divider:!0}),g.jsxs(Ue,{className:"dropdown-item--danger",onClick:i,children:[g.jsx(je,{icon:lC,fixedWidth:!0})," Remove server"]}),g.jsx(e,{redirectHome:!1,server:t,isOpen:r,toggle:o})]})};var Jx={exports:{}};/** @license * eventsource.js * Available under MIT License (MIT) * https://github.com/Yaffle/EventSource/ */(function(e,t){(function(n){var r=n.setTimeout,i=n.clearTimeout,o=n.XMLHttpRequest,s=n.XDomainRequest,a=n.ActiveXObject,l=n.EventSource,c=n.document,f=n.Promise,h=n.fetch,p=n.Response,m=n.TextDecoder,v=n.TextEncoder,y=n.AbortController;if(typeof window<"u"&&typeof c<"u"&&!("readyState"in c)&&c.body==null&&(c.readyState="loading",window.addEventListener("load",function(ue){c.readyState="complete"},!1)),o==null&&a!=null&&(o=function(){return new a("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(ue){function ve(){}return ve.prototype=ue,new ve}),Date.now||(Date.now=function(){return new Date().getTime()}),y==null){var x=h;h=function(ue,ve){var _e=ve.signal;return x(ue,{headers:ve.headers,credentials:ve.credentials,cache:ve.cache}).then(function(Te){var De=Te.body.getReader();return _e._reader=De,_e._aborted&&_e._reader.cancel(),{status:Te.status,statusText:Te.statusText,headers:Te.headers,body:{getReader:function(){return De}}}})},y=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function _(){this.bitsNeeded=0,this.codePoint=0}_.prototype.decode=function(ue){function ve(be,ye,Ce){if(Ce===1)return be>=128>>ye&&be<=2048>>ye&&be<=57344>>ye&&be<=65536>>ye&&be<>6>15?3:ye>31?2:1;if(be===6*2)return ye>15?3:2;if(be===6*3)return 3;throw new Error}for(var Te=65533,De="",Re=this.bitsNeeded,Ne=this.codePoint,ce=0;ce191||!ve(Ne<<6|de&63,Re-6,_e(Re,Ne)))&&(Re=0,Ne=Te,De+=String.fromCharCode(Ne)),Re===0?(de>=0&&de<=127?(Re=0,Ne=de):de>=192&&de<=223?(Re=6*1,Ne=de&31):de>=224&&de<=239?(Re=6*2,Ne=de&15):de>=240&&de<=247?(Re=6*3,Ne=de&7):(Re=0,Ne=Te),Re!==0&&!ve(Ne,Re,_e(Re,Ne))&&(Re=0,Ne=Te)):(Re-=6,Ne=Ne<<6|de&63),Re===0&&(Ne<=65535?De+=String.fromCharCode(Ne):(De+=String.fromCharCode(55296+(Ne-65535-1>>10)),De+=String.fromCharCode(56320+(Ne-65535-1&1023))))}return this.bitsNeeded=Re,this.codePoint=Ne,De};var w=function(){try{return new m().decode(new v().encode("test"),{stream:!0})==="test"}catch(ue){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+ue)}return!1};(m==null||v==null||!w())&&(m=_);var S=function(){};function T(ue){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=S,this.onload=S,this.onerror=S,this.onreadystatechange=S,this._contentType="",this._xhr=ue,this._sendTimeout=0,this._abort=S}T.prototype.open=function(ue,ve){this._abort(!0);var _e=this,Te=this._xhr,De=1,Re=0;this._abort=function(Ce){_e._sendTimeout!==0&&(i(_e._sendTimeout),_e._sendTimeout=0),(De===1||De===2||De===3)&&(De=4,Te.onload=S,Te.onerror=S,Te.onabort=S,Te.onprogress=S,Te.onreadystatechange=S,Te.abort(),Re!==0&&(i(Re),Re=0),Ce||(_e.readyState=4,_e.onabort(null),_e.onreadystatechange())),De=0};var Ne=function(){if(De===1){var Ce=0,ke="",Ie=void 0;if("contentType"in Te)Ce=200,ke="OK",Ie=Te.contentType;else try{Ce=Te.status,ke=Te.statusText,Ie=Te.getResponseHeader("Content-Type")}catch{Ce=0,ke="",Ie=void 0}Ce!==0&&(De=2,_e.readyState=2,_e.status=Ce,_e.statusText=ke,_e._contentType=Ie,_e.onreadystatechange())}},ce=function(){if(Ne(),De===2||De===3){De=3;var Ce="";try{Ce=Te.responseText}catch{}_e.readyState=3,_e.responseText=Ce,_e.onprogress()}},de=function(Ce,ke){if((ke==null||ke.preventDefault==null)&&(ke={preventDefault:S}),ce(),De===1||De===2||De===3){if(De=4,Re!==0&&(i(Re),Re=0),_e.readyState=4,Ce==="load")_e.onload(ke);else if(Ce==="error")_e.onerror(ke);else if(Ce==="abort")_e.onabort(ke);else throw new TypeError;_e.onreadystatechange()}},be=function(Ce){Te!=null&&(Te.readyState===4?(!("onload"in Te)||!("onerror"in Te)||!("onabort"in Te))&&de(Te.responseText===""?"error":"load",Ce):Te.readyState===3?"onprogress"in Te||ce():Te.readyState===2&&Ne())},ye=function(){Re=r(function(){ye()},500),Te.readyState===3&&ce()};"onload"in Te&&(Te.onload=function(Ce){de("load",Ce)}),"onerror"in Te&&(Te.onerror=function(Ce){de("error",Ce)}),"onabort"in Te&&(Te.onabort=function(Ce){de("abort",Ce)}),"onprogress"in Te&&(Te.onprogress=ce),"onreadystatechange"in Te&&(Te.onreadystatechange=function(Ce){be(Ce)}),("contentType"in Te||!("ontimeout"in o.prototype))&&(ve+=(ve.indexOf("?")===-1?"?":"&")+"padding=true"),Te.open(ue,ve,!0),"readyState"in Te&&(Re=r(function(){ye()},0))},T.prototype.abort=function(){this._abort(!1)},T.prototype.getResponseHeader=function(ue){return this._contentType},T.prototype.setRequestHeader=function(ue,ve){var _e=this._xhr;"setRequestHeader"in _e&&_e.setRequestHeader(ue,ve)},T.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},T.prototype.send=function(){if((!("ontimeout"in o.prototype)||!("sendAsBinary"in o.prototype)&&!("mozAnon"in o.prototype))&&c!=null&&c.readyState!=null&&c.readyState!=="complete"){var ue=this;ue._sendTimeout=r(function(){ue._sendTimeout=0,ue.send()},4);return}var ve=this._xhr;"withCredentials"in ve&&(ve.withCredentials=this.withCredentials);try{ve.send(void 0)}catch(_e){throw _e}};function P(ue){return ue.replace(/[A-Z]/g,function(ve){return String.fromCharCode(ve.charCodeAt(0)+32)})}function k(ue){for(var ve=Object.create(null),_e=ue.split(`\r -`),Te=0;Te<_e.length;Te+=1){var De=_e[Te],Re=De.split(": "),Ne=Re.shift(),ce=Re.join(": ");ve[P(Ne)]=ce}this._map=ve}k.prototype.get=function(ue){return this._map[P(ue)]},o!=null&&o.HEADERS_RECEIVED==null&&(o.HEADERS_RECEIVED=2);function N(){}N.prototype.open=function(ue,ve,_e,Te,De,Re,Ne){ue.open("GET",De);var ce=0;ue.onprogress=function(){var be=ue.responseText,ye=be.slice(ce);ce+=ye.length,_e(ye)},ue.onerror=function(be){be.preventDefault(),Te(new Error("NetworkError"))},ue.onload=function(){Te(null)},ue.onabort=function(){Te(null)},ue.onreadystatechange=function(){if(ue.readyState===o.HEADERS_RECEIVED){var be=ue.status,ye=ue.statusText,Ce=ue.getResponseHeader("Content-Type"),ke=ue.getAllResponseHeaders();ve(be,ye,Ce,new k(ke))}},ue.withCredentials=Re;for(var de in Ne)Object.prototype.hasOwnProperty.call(Ne,de)&&ue.setRequestHeader(de,Ne[de]);return ue.send(),ue};function D(ue){this._headers=ue}D.prototype.get=function(ue){return this._headers.get(ue)};function z(){}z.prototype.open=function(ue,ve,_e,Te,De,Re,Ne){var ce=null,de=new y,be=de.signal,ye=new m;return h(De,{headers:Ne,credentials:Re?"include":"same-origin",signal:be,cache:"no-store"}).then(function(Ce){return ce=Ce.body.getReader(),ve(Ce.status,Ce.statusText,Ce.headers.get("Content-Type"),new D(Ce.headers)),new f(function(ke,Ie){var Je=function(){ce.read().then(function(et){if(et.done)ke(void 0);else{var Ge=ye.decode(et.value,{stream:!0});_e(Ge),Je()}}).catch(function(et){Ie(et)})};Je()})}).catch(function(Ce){if(Ce.name!=="AbortError")return Ce}).then(function(Ce){Te(Ce)}),{abort:function(){ce!=null&&ce.cancel(),de.abort()}}};function A(){this._listeners=Object.create(null)}function W(ue){r(function(){throw ue},0)}A.prototype.dispatchEvent=function(ue){ue.target=this;var ve=this._listeners[ue.type];if(ve!=null)for(var _e=ve.length,Te=0;Te<_e;Te+=1){var De=ve[Te];try{typeof De.handleEvent=="function"?De.handleEvent(ue):De.call(this,ue)}catch(Re){W(Re)}}},A.prototype.addEventListener=function(ue,ve){ue=String(ue);var _e=this._listeners,Te=_e[ue];Te==null&&(Te=[],_e[ue]=Te);for(var De=!1,Re=0;Re"u"?typeof window<"u"?window:typeof self<"u"?self:zl:globalThis)})(Mpe,ty);const Rpe=(e,t,n,r)=>{const{mercureHubUrl:i,token:o,loading:s,error:a}=e;if(s||a||!i)return;const l=({data:h})=>n(JSON.parse(h)),c=({status:h})=>h===401&&r(),f=t.map(h=>{const p=new URL(i);p.searchParams.append("topic",h);const m=new ty.EventSourcePolyfill(p,{headers:{Authorization:`Bearer ${o}`}});return m.onmessage=l,m.onerror=c,m});return()=>f.forEach(h=>h.close())};function ra(e,t){const n=new Set;return r=>{const{createNewVisits:i,loadMercureInfo:o,mercureInfo:s}=r,{interval:a}=s,l=Ks();return V.useEffect(()=>{const c=m=>a?n.add(m):i([m]),f=t(r,l),h=Rpe(s,f,c,o);if(!a)return h;const p=setInterval(()=>{i([...n]),n.clear()},a*1e3*60);return Dt(()=>clearInterval(p),()=>h==null?void 0:h())},[s]),g.jsx(e,{...r})}}class Xr{}xe(Xr,"visits","https://shlink.io/new-visit"),xe(Xr,"orphanVisits","https://shlink.io/new-orphan-visit"),xe(Xr,"shortUrlVisits",t=>`https://shlink.io/new-visit/${t}`);const BE="shlink/shortUrlDeletion",CN={shortCode:"",loading:!1,deleted:!1,error:!1},Npe=e=>rr(`${BE}/deleteShortUrl`,async({shortCode:t,domain:n},{getState:r})=>{const{deleteShortUrl:i}=e(r);return await i(t,n),{shortCode:t,domain:n}}),k5=yn(`${BE}/shortUrlDeleted`),Lpe=e=>{const{actions:t,reducer:n}=Yn({name:BE,initialState:CN,reducers:{resetDeleteShortUrl:()=>CN},extraReducers:i=>{i.addCase(e.pending,o=>({...o,loading:!0,error:!1,deleted:!1})),i.addCase(e.rejected,(o,{error:s})=>({...o,errorData:no(s),loading:!1,error:!0,deleted:!1})),i.addCase(e.fulfilled,(o,{payload:s})=>({...o,shortCode:s.shortCode,loading:!1,error:!1,deleted:!0}))}}),{resetDeleteShortUrl:r}=t;return{reducer:n,resetDeleteShortUrl:r}},M5="shlink/shortUrlsList",R5=5,Dpe={loading:!0,error:!1},Ape=e=>rr(`${M5}/listShortUrls`,(t,{getState:n})=>{const{listShortUrls:r}=e(n);return r(t??{})}),jpe=(e,t,n)=>Yn({name:M5,initialState:Dpe,reducers:{},extraReducers:r=>{r.addCase(e.pending,i=>({...i,loading:!0,error:!1})),r.addCase(e.rejected,()=>({loading:!1,error:!0})),r.addCase(e.fulfilled,(i,{payload:o})=>({loading:!1,error:!1,shortUrls:o})),r.addCase(n.fulfilled,Dt((i,{payload:o})=>i.shortUrls?Pl(["shortUrls","data"],[o,...i.shortUrls.data.slice(0,R5-1)],i):i,i=>i.shortUrls?Pl(["shortUrls","pagination","totalItems"],i.shortUrls.pagination.totalItems+1,i):i)),r.addCase(t.fulfilled,(i,{payload:o})=>i.shortUrls?Pl(["shortUrls","data"],i.shortUrls.data.map(s=>{const{shortCode:a,domain:l}=o;return Of(s,a,l)?o:s}),i):i),r.addCase(k5,Dt((i,{payload:o})=>i.shortUrls?Pl(["shortUrls","data"],Ud(s=>Of(s,o.shortCode,o.domain),i.shortUrls.data),i):i,i=>i.shortUrls?Pl(["shortUrls","pagination","totalItems"],i.shortUrls.pagination.totalItems-1,i):i)),r.addCase(ah,(i,{payload:o})=>{var s,a;return Pl(["shortUrls","data"],(a=(s=i.shortUrls)==null?void 0:s.data)==null?void 0:a.map(l=>{var c;return((c=qG(o.createdVisits.filter(({shortUrl:f})=>f&&Of(l,f.shortCode,f.domain))))==null?void 0:c.shortUrl)??l}),i)})}}),EN=10,{ceil:Ipe}=Math,Fpe=new Intl.NumberFormat("en-US"),_n=e=>Fpe.format(Number(e)),$pe=e=>Ipe(e/EN)*EN;const Bpe=e=>e?{tag:Lt,to:e}:{},a2=({children:e,title:t,link:n,tooltip:r})=>{const i=pl();return g.jsxs(g.Fragment,{children:[g.jsxs(Sr,{innerRef:i,className:"highlight-card",body:!0,...Bpe(n),children:[n&&g.jsx(je,{size:"3x",className:"highlight-card__link-icon",icon:Ope}),g.jsx(QC,{tag:"h5",className:"highlight-card__title",children:t}),g.jsx(XC,{tag:"h2",children:e})]}),r&&g.jsx(Er,{target:i,placement:"bottom",children:r})]})},TN=({loading:e,excludeBots:t,visitsSummary:n,...r})=>g.jsx(a2,{tooltip:n.bots!==void 0?g.jsxs(g.Fragment,{children:[t?"Plus":"Including"," ",g.jsx("b",{children:_n(n.bots)})," potential bot visits"]}):void 0,...r,children:e?"Loading...":_n(t&&n.nonBots?n.nonBots:n.total)}),zpe=(e,t)=>ra(({shortUrlsList:n,listShortUrls:r,listTags:i,tagsList:o,selectedServer:s,loadVisitsOverview:a,visitsOverview:l,settings:{visits:c}})=>{const{loading:f,shortUrls:h}=n,{loading:p}=o,{loading:m,nonOrphanVisits:v,orphanVisits:y}=l,x=Vd(s),_=Pi("nonOrphanVisits",s),w=Io();return V.useEffect(()=>{r({itemsPerPage:R5,orderBy:{field:"dateCreated",dir:"DESC"}}),i(),a()},[]),g.jsxs(g.Fragment,{children:[g.jsxs(Qn,{children:[g.jsx("div",{className:"col-lg-6 col-xl-3 mb-3",children:g.jsx(TN,{title:"Visits",link:_?`/server/${x}/non-orphan-visits`:void 0,excludeBots:(c==null?void 0:c.excludeBots)??!1,loading:m,visitsSummary:v})}),g.jsx("div",{className:"col-lg-6 col-xl-3 mb-3",children:g.jsx(TN,{title:"Orphan visits",link:`/server/${x}/orphan-visits`,excludeBots:(c==null?void 0:c.excludeBots)??!1,loading:m,visitsSummary:y})}),g.jsx("div",{className:"col-lg-6 col-xl-3 mb-3",children:g.jsx(a2,{title:"Short URLs",link:`/server/${x}/list-short-urls/1`,children:f?"Loading...":_n((h==null?void 0:h.pagination.totalItems)??0)})}),g.jsx("div",{className:"col-lg-6 col-xl-3 mb-3",children:g.jsx(a2,{title:"Tags",link:`/server/${x}/manage-tags`,children:p?"Loading...":_n(o.tags.length)})})]}),g.jsxs(Sr,{className:"mb-3",children:[g.jsxs(rl,{children:[g.jsx("span",{className:"d-sm-none",children:"Create a short URL"}),g.jsx("h5",{className:"d-none d-sm-inline",children:"Create a short URL"}),g.jsx(Lt,{className:"float-end",to:`/server/${x}/create-short-url`,children:"Advanced options »"})]}),g.jsx(nl,{children:g.jsx(t,{basicMode:!0})})]}),g.jsxs(Sr,{children:[g.jsxs(rl,{children:[g.jsx("span",{className:"d-sm-none",children:"Recently created URLs"}),g.jsx("h5",{className:"d-none d-sm-inline",children:"Recently created URLs"}),g.jsx(Lt,{className:"float-end",to:`/server/${x}/list-short-urls/1`,children:"See all »"})]}),g.jsx(nl,{children:g.jsx(e,{shortUrlsList:n,selectedServer:s,className:"mb-0",onTagClick:S=>w(`/server/${x}/list-short-urls/1?tags=${encodeURIComponent(S)}`)})})]})]})},()=>[Xr.visits,Xr.orphanVisits]),Upe={},Vpe=e=>e.id?e:ld("id",lE(),e),Hpe=XS((e,t)=>ld(t.id,t,e),{}),{actions:Wpe,reducer:Ype}=Yn({name:"shlink/servers",initialState:Upe,reducers:{editServer:{prepare:(e,t)=>({payload:{serverId:e,serverData:t}}),reducer:(e,{payload:t})=>{const{serverId:n,serverData:r}=t;return e[n]?ld(n,{...e[n],...r},e):e}},deleteServer:(e,{payload:t})=>WG(t.id,e),setAutoConnect:{prepare:({id:e},t)=>({payload:{serverId:e,autoConnect:t}}),reducer:(e,{payload:t})=>{const{serverId:n,autoConnect:r}=t;return e[n]?r?Ku(qg(e).map(([i,o])=>[i,{...o,autoConnect:i===n}])):ld(n,{...e[n],autoConnect:r},e):e}},createServers:{prepare:Dt(zd(Vpe),Hpe,e=>({payload:e})),reducer:(e,{payload:t})=>({...e,...t})}}}),{editServer:qpe,deleteServer:Gpe,setAutoConnect:Zpe,createServers:N5}=Wpe,Kpe=Ype,Xpe=e=>Array.isArray(e)?e.filter(iC):[],Qpe=e=>rr("shlink/remoteServers/fetchServers",async(t,{dispatch:n})=>{const r=await e.fetchJson(`${Ug.homepage}/servers.json`),i=Xpe(r);n(N5(i))}),Jpe=({servers:e,selectedServer:t})=>{const n=Qc(e),r=()=>Wn(n)?g.jsxs(Ue,{tag:Lt,to:"/server/create",children:[g.jsx(je,{icon:vC})," ",g.jsx("span",{className:"ms-1",children:"Add a server"})]}):g.jsxs(g.Fragment,{children:[n.map(({name:i,id:o})=>g.jsx(Ue,{tag:Lt,to:`/server/${o}`,active:Vd(t)===o,children:i},o)),g.jsx(Ue,{divider:!0}),g.jsxs(Ue,{tag:Lt,to:"/manage-servers",children:[g.jsx(je,{icon:xM})," ",g.jsx("span",{className:"ms-1",children:"Manage servers"})]})]});return g.jsxs(Jd,{nav:!0,inNavbar:!0,children:[g.jsxs(nu,{nav:!0,caret:!0,children:[g.jsx(je,{icon:xM})," ",g.jsx("span",{className:"ms-1",children:"Servers"})]}),g.jsx(hl,{end:!0,style:{right:0},children:r()})]})},eme="shlink-servers.csv";class tme{constructor(t,n,r){xe(this,"exportServers",async()=>{const t=Qc(this.storage.get("servers")??{}).map(RZ);try{const n=this.jsonToCsv(t);X6(this.window,n,eme)}catch(n){console.error(n)}});this.storage=t,this.window=n,this.jsonToCsv=r}}const nme=e=>typeof e.url=="string"&&typeof e.apiKey=="string"&&typeof e.name=="string",rme=e=>Array.isArray(e)&&e.every(nme);class ime{constructor(t,n){xe(this,"importServersFromFile",async t=>{if(!t)throw new Error("No file provided");const n=this.fileReaderFactory();return new Promise((r,i)=>{n.addEventListener("loadend",async o=>{var s,a;try{const l=((a=(s=o.target)==null?void 0:s.result)==null?void 0:a.toString())??"",c=await this.csvToJson(l);if(!rme(c))throw new Error("Provided file does not have the right format.");r(c)}catch(l){i(l)}}),n.readAsText(t)})});this.csvToJson=t,this.fileReaderFactory=n}}const ome=(e,t)=>{e.serviceFactory("ManageServers",xpe,"ServersExporter","ImportServersBtn","useTimeoutToggle","ManageServersRow"),e.decorator("ManageServers",pv),e.decorator("ManageServers",t(["selectedServer","servers"],["resetSelectedServer"])),e.serviceFactory("ManageServersRow",Spe,"ManageServersRowDropdown"),e.serviceFactory("ManageServersRowDropdown",kpe,"DeleteServerModal"),e.decorator("ManageServersRowDropdown",t(null,["setAutoConnect"])),e.serviceFactory("CreateServer",mpe,"ImportServersBtn","useTimeoutToggle"),e.decorator("CreateServer",pv),e.decorator("CreateServer",t(["selectedServer","servers"],["createServers","resetSelectedServer"])),e.serviceFactory("EditServer",ype,"ServerError"),e.decorator("EditServer",t(["selectedServer"],["editServer","selectServer","resetSelectedServer"])),e.serviceFactory("ServersDropdown",()=>Jpe),e.decorator("ServersDropdown",t(["servers","selectedServer"])),e.serviceFactory("DeleteServerModal",()=>vpe),e.decorator("DeleteServerModal",t(null,["deleteServer"])),e.serviceFactory("DeleteServerButton",gpe,"DeleteServerModal"),e.serviceFactory("ImportServersBtn",_pe,"ServersImporter"),e.decorator("ImportServersBtn",t(["servers"],["createServers"])),e.serviceFactory("ServerError",bpe,"DeleteServerButton"),e.decorator("ServerError",t(["servers","selectedServer"])),e.serviceFactory("Overview",zpe,"ShortUrlsTable","CreateShortUrl"),e.decorator("Overview",t(["shortUrlsList","tagsList","selectedServer","mercureInfo","visitsOverview","settings"],["listShortUrls","listTags","createNewVisits","loadMercureInfo","loadVisitsOverview"])),e.constant("fileReaderFactory",()=>new FileReader),e.service("ServersImporter",ime,"csvToJson","fileReaderFactory"),e.service("ServersExporter",tme,"Storage","window","jsonToCsv"),e.serviceFactory("selectServer",Z6,"buildShlinkApiClient","loadMercureInfo"),e.serviceFactory("createServers",()=>N5),e.serviceFactory("deleteServer",()=>Gpe),e.serviceFactory("editServer",()=>qpe),e.serviceFactory("setAutoConnect",()=>Zpe),e.serviceFactory("fetchServers",Qpe,"HttpClient"),e.serviceFactory("resetSelectedServer",()=>wE),e.serviceFactory("selectServerListener",tae,"selectServer","loadMercureInfo"),e.serviceFactory("selectedServerReducerCreator",nae,"selectServer"),e.serviceFactory("selectedServerReducer",at("reducer"),"selectedServerReducerCreator")},_c=({children:e})=>g.jsx("small",{className:"form-text text-muted d-block",children:e}),L5=({checked:e=!1,onChange:t=JS,className:n,children:r,type:i,inline:o=!1})=>{const s=b_(),a=f=>t(f.target.checked,f),l={"form-switch":i==="switch","form-checkbox":i==="checkbox"},c=o?{display:"inline-block"}:{};return g.jsxs("span",{className:me("form-check",l,n),style:c,children:[g.jsx("input",{type:"checkbox",className:"form-check-input",id:s,checked:e,onChange:a}),g.jsx("label",{className:"form-check-label",htmlFor:s,children:r})]})},Hc=e=>g.jsx(L5,{type:"switch",...e}),sme=e=>e?`${e}`:"",ame=({settings:{realTimeUpdates:e},toggleRealTimeUpdates:t,setRealTimeUpdatesInterval:n})=>{const r=b_();return g.jsxs(un,{title:"Real-time updates",className:"h-100",children:[g.jsx(vr,{children:g.jsxs(Hc,{checked:e.enabled,onChange:t,children:["Enable or disable real-time updates.",g.jsxs(_c,{children:["Real-time updates are currently being ",g.jsx("b",{children:e.enabled?"processed":"ignored"}),"."]})]})}),g.jsxs(ou,{noMargin:!0,label:"Real-time updates frequency (in minutes):",labelClassName:me("form-label",{"text-muted":!e.enabled}),id:r,children:[g.jsx($c,{type:"number",min:0,placeholder:"Immediate",disabled:!e.enabled,value:sme(e.interval),id:r,onChange:({target:i})=>n(Number(i.value))}),e.enabled&&g.jsxs(_c,{children:[e.interval!==void 0&&e.interval>0&&g.jsxs("span",{children:["Updates will be reflected in the UI every ",g.jsx("b",{children:e.interval})," minute",e.interval>1&&"s","."]}),!e.interval&&"Updates will be reflected in the UI as soon as they happen."]})]})]})},zE={field:"dateCreated",dir:"DESC"},lme={realTimeUpdates:{enabled:!0},shortUrlCreation:{validateUrls:!1},ui:{theme:"light"},visits:{defaultInterval:"last30Days"},shortUrlsList:{defaultOrdering:zE}},cme=(e,{payload:t})=>Ej(e,t),ya=e=>({reducer:cme,prepare:e}),_a=e=>({payload:e}),{reducer:ume,actions:fme}=Yn({name:"shlink/settings",initialState:lme,reducers:{toggleRealTimeUpdates:ya(e=>_a({realTimeUpdates:{enabled:e}})),setRealTimeUpdatesInterval:ya(e=>_a({realTimeUpdates:{interval:e}})),setShortUrlCreationSettings:ya(e=>_a({shortUrlCreation:e})),setShortUrlsListSettings:ya(e=>_a({shortUrlsList:e})),setUiSettings:ya(e=>_a({ui:e})),setVisitsSettings:ya(e=>_a({visits:e})),setTagsSettings:ya(e=>_a({tags:e}))}}),{toggleRealTimeUpdates:dme,setRealTimeUpdatesInterval:hme,setShortUrlCreationSettings:pme,setShortUrlsListSettings:mme,setUiSettings:gme,setVisitsSettings:vme,setTagsSettings:yme}=fme,_me=ume;const Rf=({children:e,...t})=>g.jsx(t6,{className:"nav-pills__nav-link",tag:nj,...t,children:e}),D5=({children:e,fill:t=!1,className:n=""})=>g.jsx(Sr,{className:`nav-pills__nav p-0 overflow-hidden ${n}`,body:!0,children:g.jsx(f_,{pills:!0,fill:t,children:V.Children.map(e,r=>{if(!V.isValidElement(r)||r.type!==Rf)throw new Error("Only NavPillItem children are allowed inside NavPills.");return r})})}),L1=({items:e})=>g.jsx(g.Fragment,{children:e.map((t,n)=>g.jsx("div",{className:"mb-3",children:t},n))}),bme=(e,t,n,r,i,o)=>()=>g.jsxs(iu,{children:[g.jsxs(D5,{className:"mb-3",children:[g.jsx(Rf,{to:"general",children:"General"}),g.jsx(Rf,{to:"short-urls",children:"Short URLs"}),g.jsx(Rf,{to:"other-items",children:"Other items"})]}),g.jsxs(Xy,{children:[g.jsx(gt,{path:"general",element:g.jsx(L1,{items:[g.jsx(r,{}),g.jsx(e,{})]})}),g.jsx(gt,{path:"short-urls",element:g.jsx(L1,{items:[g.jsx(t,{}),g.jsx(n,{})]})}),g.jsx(gt,{path:"other-items",element:g.jsx(L1,{items:[g.jsx(o,{}),g.jsx(i,{})]})}),g.jsx(gt,{path:"*",element:g.jsx(WS,{replace:!0,to:"general"})})]})]}),D1=e=>e==="includes"?"Suggest tags including input":"Suggest tags starting with input",wme=e=>e==="includes"?g.jsxs(g.Fragment,{children:["The list of suggested tags will contain those ",g.jsx("b",{children:"including"})," provided input."]}):g.jsxs(g.Fragment,{children:["The list of suggested tags will contain those ",g.jsx("b",{children:"starting with"})," provided input."]}),xme=({settings:e,setShortUrlCreationSettings:t})=>{const n=e.shortUrlCreation??{validateUrls:!1},r=i=>()=>t({...n??{validateUrls:!1},tagFilteringMode:i});return g.jsxs(un,{title:"Short URLs form",className:"h-100",children:[g.jsx(vr,{children:g.jsxs(Hc,{checked:n.validateUrls??!1,onChange:i=>t({...n,validateUrls:i}),children:["Request validation on long URLs when creating new short URLs.",g.jsxs(_c,{children:["The initial state of the ",g.jsx("b",{children:"Validate URL"})," checkbox will be ",g.jsx("b",{children:n.validateUrls?"checked":"unchecked"}),"."]})]})}),g.jsx(vr,{children:g.jsxs(Hc,{checked:n.forwardQuery??!0,onChange:i=>t({...n,forwardQuery:i}),children:["Make all new short URLs forward their query params to the long URL.",g.jsxs(_c,{children:["The initial state of the ",g.jsx("b",{children:"Forward query params on redirect"})," checkbox will be ",g.jsx("b",{children:n.forwardQuery??!0?"checked":"unchecked"}),"."]})]})}),g.jsxs(ou,{noMargin:!0,label:"Tag suggestions search mode:",children:[g.jsxs(na,{text:D1(n.tagFilteringMode),children:[g.jsx(Ue,{active:!n.tagFilteringMode||n.tagFilteringMode==="startsWith",onClick:r("startsWith"),children:D1("startsWith")}),g.jsx(Ue,{active:n.tagFilteringMode==="includes",onClick:r("includes"),children:D1("includes")})]}),g.jsx(_c,{children:wme(n.tagFilteringMode)})]})]})},A5={dateCreated:"Created at",shortCode:"Short URL",longUrl:"Long URL",title:"Title",visits:"Visits"};function fh({items:e,order:t,onChange:n,isButton:r=!0,right:i=!1,prefixed:o=!0}){const s=a=>()=>{const l=n_(a,t.field,t.dir);n(l?a:void 0,l)};return g.jsxs(Jd,{children:[g.jsxs(nu,{caret:!0,color:r?"primary":"link",className:me({"dropdown-btn__toggle btn-block pe-4 overflow-hidden":r,"btn-sm p-0":!r}),children:[!r&&g.jsx(g.Fragment,{children:"Order by"}),r&&!t.field&&g.jsx("i",{children:"Order by..."}),r&&t.field&&g.jsxs(g.Fragment,{children:[o&&"Order by: ",e[t.field]," - ",g.jsx("small",{children:t.dir??"DESC"})]})]}),g.jsxs(hl,{end:i,className:me("w-100",{"ordering-dropdown__menu--link":!r}),children:[qg(e).map(([a,l])=>g.jsxs(Ue,{active:t.field===a,onClick:s(a),children:[l,t.field===a&&g.jsx(je,{icon:t.dir==="ASC"?_Q:iQ,className:"ordering-dropdown__sort-icon"})]},a)),g.jsx(Ue,{divider:!0}),g.jsx(Ue,{disabled:!t.field,onClick:()=>n(),children:g.jsx("i",{children:"Clear selection"})})]})]})}const Sme=({settings:{shortUrlsList:e},setShortUrlsListSettings:t})=>g.jsx(un,{title:"Short URLs list",className:"h-100",children:g.jsx(ou,{noMargin:!0,label:"Default ordering for short URLs list:",children:g.jsx(fh,{items:A5,order:(e==null?void 0:e.defaultOrdering)??zE,onChange:(n,r)=>t({defaultOrdering:{field:n,dir:r}})})})}),j5={tag:"Tag",shortUrls:"Short URLs",visits:"Visits"},Cme=({settings:{tags:e},setTagsSettings:t})=>g.jsx(un,{title:"Tags",className:"h-100",children:g.jsx(ou,{noMargin:!0,label:"Default ordering for tags list:",children:g.jsx(fh,{items:j5,order:(e==null?void 0:e.defaultOrdering)??{},onChange:(n,r)=>t({...e,defaultOrdering:{field:n,dir:r}})})})});const Eme=({settings:{ui:e},setUiSettings:t})=>g.jsxs(un,{title:"User interface",className:"h-100",children:[g.jsx(je,{icon:(e==null?void 0:e.theme)==="dark"?LQ:wQ,className:"user-interface__theme-icon"}),g.jsx(Hc,{checked:(e==null?void 0:e.theme)==="dark",onChange:n=>{const r=n?"dark":"light";t({...e,theme:r}),x6(r)},children:"Use dark theme."})]}),I5=({active:e,allText:t,onChange:n})=>g.jsxs(g.Fragment,{children:[g.jsx(Ue,{active:e==="all",onClick:()=>n("all"),children:t}),g.jsx(Ue,{divider:!0}),Yhe.map(r=>g.jsx(Ue,{active:e===r,onClick:()=>n(r),children:$E(r)},r))]}),Tme=({onChange:e,active:t,allText:n})=>g.jsx(na,{text:$E(t)??n,children:g.jsx(I5,{allText:n,active:t,onChange:e})}),ON=e=>{var t;return((t=e.visits)==null?void 0:t.defaultInterval)??"last30Days"},Ome=({settings:e,setVisitsSettings:t})=>{var n,r;return g.jsxs(un,{title:"Visits",className:"h-100",children:[g.jsx(vr,{children:g.jsxs(Hc,{checked:!!((n=e.visits)!=null&&n.excludeBots),onChange:i=>t({defaultInterval:ON(e),excludeBots:i}),children:["Exclude bots wherever possible (this option‘s effect might depend on Shlink server‘s version).",g.jsxs(_c,{children:["The visits coming from potential bots will be ",g.jsx("b",{children:(r=e.visits)!=null&&r.excludeBots?"excluded":"included"}),"."]})]})}),g.jsx(ou,{noMargin:!0,label:"Default interval to load on visits sections:",children:g.jsx(Tme,{allText:"All visits",active:ON(e),onChange:i=>t({defaultInterval:i})})})]})},Pme=(e,t)=>{e.serviceFactory("Settings",bme,"RealTimeUpdatesSettings","ShortUrlCreationSettings","ShortUrlsListSettings","UserInterfaceSettings","VisitsSettings","TagsSettings"),e.decorator("Settings",pv),e.decorator("Settings",t(null,["resetSelectedServer"])),e.serviceFactory("RealTimeUpdatesSettings",()=>ame),e.decorator("RealTimeUpdatesSettings",t(["settings"],["toggleRealTimeUpdates","setRealTimeUpdatesInterval"])),e.serviceFactory("ShortUrlCreationSettings",()=>xme),e.decorator("ShortUrlCreationSettings",t(["settings"],["setShortUrlCreationSettings"])),e.serviceFactory("UserInterfaceSettings",()=>Eme),e.decorator("UserInterfaceSettings",t(["settings"],["setUiSettings"])),e.serviceFactory("VisitsSettings",()=>Ome),e.decorator("VisitsSettings",t(["settings"],["setVisitsSettings"])),e.serviceFactory("TagsSettings",()=>Cme),e.decorator("TagsSettings",t(["settings"],["setTagsSettings"])),e.serviceFactory("ShortUrlsListSettings",()=>Sme),e.decorator("ShortUrlsListSettings",t(["settings"],["setShortUrlsListSettings"])),e.serviceFactory("toggleRealTimeUpdates",()=>dme),e.serviceFactory("setRealTimeUpdatesInterval",()=>hme),e.serviceFactory("setShortUrlCreationSettings",()=>pme),e.serviceFactory("setShortUrlsListSettings",()=>mme),e.serviceFactory("setUiSettings",()=>gme),e.serviceFactory("setVisitsSettings",()=>vme),e.serviceFactory("setTagsSettings",()=>yme)},kme=e=>({longUrl:"",tags:[],customSlug:"",title:void 0,shortCodeLength:void 0,domain:"",validSince:void 0,validUntil:void 0,maxVisits:void 0,findIfExists:!1,validateUrl:(e==null?void 0:e.validateUrls)??!1,forwardQuery:(e==null?void 0:e.forwardQuery)??!0}),Mme=(e,t)=>({createShortUrl:n,shortUrlCreation:r,resetCreateShortUrl:i,selectedServer:o,basicMode:s=!1,settings:{shortUrlCreation:a}})=>{const l=V.useMemo(()=>kme(a),[a]);return g.jsxs(g.Fragment,{children:[g.jsx(e,{initialState:l,saving:r.saving,selectedServer:o,mode:s?"create-basic":"create",onSave:async c=>(i(),n(c))}),g.jsx(t,{creation:r,resetCreateShortUrl:i,canBeClosed:s})]})},Rme=e=>({settings:{shortUrlCreation:t},selectedServer:n,shortUrlDetail:r,getShortUrlDetail:i,shortUrlEdition:o,editShortUrl:s})=>{const{search:a}=Pn(),l=Ks(),c=ta(),{loading:f,error:h,errorData:p,shortUrl:m}=r,{saving:v,saved:y,error:x,errorData:_}=o,{domain:w}=dl(a),S=V.useMemo(()=>xae(m,t),[m,t]);return V.useEffect(()=>{l.shortCode&&i({shortCode:hm(l.shortCode),domain:w})},[]),f?g.jsx(So,{loading:!0}):h?g.jsx(Nr,{type:"error",children:g.jsx(Lo,{errorData:p,fallbackMessage:"An error occurred while loading short URL detail :("})}):g.jsxs(g.Fragment,{children:[g.jsx("header",{className:"mb-3",children:g.jsx(Sr,{body:!0,children:g.jsxs("h2",{className:"d-sm-flex justify-content-between align-items-center mb-0",children:[g.jsx(ht,{color:"link",size:"lg",className:"p-0 me-3",onClick:c,children:g.jsx(je,{icon:Kj})}),g.jsx("span",{className:"text-center",children:g.jsxs("small",{children:["Edit ",g.jsx(Si,{href:(m==null?void 0:m.shortUrl)??""})]})}),g.jsx("span",{})]})})}),g.jsx(e,{initialState:S,saving:v,selectedServer:n,mode:"edit",onSave:async T=>{m&&s({...m,data:T})}}),y&&x&&g.jsx(Nr,{type:"error",className:"mt-3",children:g.jsx(Lo,{errorData:_,fallbackMessage:"An error occurred while updating short URL :("})}),y&&!x&&g.jsx(Nr,{type:"success",className:"mt-3",children:"Short URL properly edited."})]})};var C_={},Nme=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var h=PN[t.format]||PN.default;window.clipboardData.setData(h,e)}else f.clipboardData.clearData(),f.clipboardData.setData(t.format,e);t.onCopy&&(f.preventDefault(),t.onCopy(f.clipboardData))}),document.body.appendChild(a),o.selectNodeContents(a),s.addRange(o);var c=document.execCommand("copy");if(!c)throw new Error("copy command was unsuccessful");l=!0}catch(f){n&&console.error("unable to copy using execCommand: ",f),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),l=!0}catch(h){n&&console.error("unable to copy using clipboardData: ",h),n&&console.error("falling back to prompt"),r=Ame("message"in t?t.message:Dme),window.prompt(r,e)}}finally{s&&(typeof s.removeRange=="function"?s.removeRange(o):s.removeAllRanges()),a&&document.body.removeChild(a),i()}return l}var Ime=jme;function l2(e){return l2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l2(e)}Object.defineProperty(C_,"__esModule",{value:!0});C_.CopyToClipboard=void 0;var Np=F5(V),Fme=F5(Ime),$me=["text","onCopy","options","children"];function F5(e){return e&&e.__esModule?e:{default:e}}function kN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function MN(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function zme(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function Ume(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function RN(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ny(e){return ny=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},ny(e)}function UE(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var B5=function(e){Hme(n,e);var t=Wme(n);function n(){var r;Ume(this,n);for(var i=arguments.length,o=new Array(i),s=0;s({creation:t,resetCreateShortUrl:n,canBeClosed:r=!1})=>{const[i,o]=e(),{error:s,saved:a}=t;if(V.useEffect(()=>{n()},[]),s)return g.jsxs(Nr,{type:"error",className:"mt-3",children:[r&&g.jsx(je,{icon:yw,className:"float-end pointer",onClick:n}),g.jsx(Lo,{errorData:t.errorData,fallbackMessage:"An error occurred while creating the URL :("})]});if(!a)return null;const{shortUrl:l}=t.result;return g.jsxs(Nr,{type:"success",className:"mt-3",children:[r&&g.jsx(je,{icon:yw,className:"float-end pointer",onClick:n}),g.jsxs("span",{children:[g.jsx("b",{children:"Great!"})," The short URL is ",g.jsx("b",{children:l})]}),g.jsx(z5,{text:l,onCopy:o,children:g.jsxs("button",{className:"btn btn-light btn-sm create-short-url-result__copy-btn",id:"copyBtn",type:"button",children:[g.jsx(je,{icon:P5})," Copy"]})}),g.jsx(Xd,{placement:"left",isOpen:i,target:"copyBtn",children:"Copied!"})]})},A1="delete",Kme=({shortUrl:e,toggle:t,isOpen:n,shortUrlDeletion:r,resetDeleteShortUrl:i,deleteShortUrl:o,shortUrlDeleted:s})=>{const[a,l]=V.useState("");V.useEffect(()=>i,[]);const{loading:c,error:f,deleted:h,errorData:p}=r,m=Dt(i,t),v=rh(()=>o(e).then(t));return g.jsx(Uo,{isOpen:n,toggle:m,centered:!0,onClosed:()=>h&&s(e),children:g.jsxs("form",{onSubmit:v,children:[g.jsx(ro,{toggle:m,children:g.jsx("span",{className:"text-danger",children:"Delete short URL"})}),g.jsxs(ki,{children:[g.jsxs("p",{children:[g.jsx("b",{className:"text-danger",children:"Caution!"})," You are about to delete a short URL."]}),g.jsx("p",{children:"This action cannot be undone. Once you have deleted it, all the visits stats will be lost."}),g.jsxs("p",{children:["Write ",g.jsx("b",{children:A1})," to confirm deletion."]}),g.jsx("input",{type:"text",className:"form-control",placeholder:`Insert ${A1}`,value:a,onChange:y=>l(y.target.value)}),f&&g.jsx(Nr,{type:PX(p)?"warning":"error",small:!0,className:"mt-2",children:g.jsx(Lo,{errorData:p,fallbackMessage:"Something went wrong while deleting the URL :("})})]}),g.jsxs(ea,{children:[g.jsx("button",{type:"button",className:"btn btn-link",onClick:m,children:"Cancel"}),g.jsx("button",{type:"submit",className:"btn btn-danger",disabled:a!==A1||c,children:c?"Deleting...":"Delete"})]})]})})},U5=({amount:e=0,loading:t=!1,...n})=>g.jsxs(ht,{...n,outline:!0,color:"primary",disabled:t,children:[g.jsx(je,{icon:UX})," ",t?"Exporting...":g.jsxs(g.Fragment,{children:["Export (",_n(e),")"]})]}),E_=()=>{const e=Io(),{search:t}=Pn(),{serverId:n=""}=Ks(),r=V.useMemo(Dt(()=>dl(t),({orderBy:o,tags:s,excludeBots:a,excludeMaxVisitsReached:l,excludePastValidUntil:c,...f})=>{const h=o?NZ(o):void 0,p=(s==null?void 0:s.split(","))??[];return{...f,orderBy:h,tags:p,excludeBots:a!==void 0?a==="true":void 0,excludeMaxVisitsReached:l!==void 0?l==="true":void 0,excludePastValidUntil:c!==void 0?c==="true":void 0}}),[t]);return[r,o=>{const s={...r,...o},{orderBy:a,tags:l,excludeBots:c,excludeMaxVisitsReached:f,excludePastValidUntil:h,...p}=s,m={...p,orderBy:a&&Mj(a),tags:l.length>0?l.join(","):void 0,excludeBots:C1(c),excludeMaxVisitsReached:C1(f),excludePastValidUntil:C1(h)},v=Hd(m),y=Wn(v)?"":`?${v}`;e(`/server/${n}/list-short-urls/1${y}`)}]},NN=20,Xme=(e,{exportShortUrls:t})=>({amount:n=0,selectedServer:r})=>{const[{tags:i,search:o,startDate:s,endDate:a,orderBy:l,tagsMode:c}]=E_(),[f,,h,p]=It(),m=V.useCallback(async()=>{if(!Ps(r))return;const v=n/NN,{listShortUrls:y}=e(r),x=async(w=1)=>{const{data:S}=await y({page:`${w}`,tags:i,searchTerm:o,startDate:s,endDate:a,orderBy:l,tagsMode:c,itemsPerPage:NN});return w>=v?S:S.concat(await x(w+1))};h();const _=await x();t(_.map(w=>{var k;const{hostname:S,pathname:T}=new URL(w.shortUrl),P=T.substring(1);return{createdAt:w.dateCreated,domain:S,shortCode:P,shortUrl:w.shortUrl,longUrl:w.longUrl,title:w.title??"",tags:w.tags.join("|"),visits:((k=w==null?void 0:w.visitsSummary)==null?void 0:k.total)??w.visitsCount}})),p()},[r]);return g.jsx(U5,{loading:f,className:"btn-md-block",amount:n,onClick:m})};const V5=({text:e,onCopy:t})=>g.jsx(z5,{text:e,onCopy:t,children:g.jsx(je,{icon:P5,className:"ms-2 copy-to-clipboard-icon"})}),Qme=(e,{margin:t,...n})=>{const r=`${e}/qr-code`,i=Hd({...n,margin:t>0?t:void 0});return`${r}${Wn(i)?"":`?${i}`}`},Jme=({errorCorrection:e,setErrorCorrection:t})=>g.jsxs(na,{text:`Error correction (${e})`,children:[g.jsxs(Ue,{active:e==="L",onClick:()=>t("L"),children:[g.jsx("b",{children:"L"}),"ow"]}),g.jsxs(Ue,{active:e==="M",onClick:()=>t("M"),children:[g.jsx("b",{children:"M"}),"edium"]}),g.jsxs(Ue,{active:e==="Q",onClick:()=>t("Q"),children:[g.jsx("b",{children:"Q"}),"uartile"]}),g.jsxs(Ue,{active:e==="H",onClick:()=>t("H"),children:[g.jsx("b",{children:"H"}),"igh"]})]}),ege=({format:e,setFormat:t})=>g.jsxs(na,{text:`Format (${e})`,children:[g.jsx(Ue,{active:e==="png",onClick:()=>t("png"),children:"PNG"}),g.jsx(Ue,{active:e==="svg",onClick:()=>t("svg"),children:"SVG"})]});const tge=e=>({shortUrl:{shortUrl:t,shortCode:n},toggle:r,isOpen:i,selectedServer:o})=>{const[s,a]=V.useState(300),[l,c]=V.useState(0),[f,h]=V.useState("png"),[p,m]=V.useState("L"),v=Pi("nonRestCors",o),y=V.useMemo(()=>Qme(t,{size:s,format:f,margin:l,errorCorrection:p}),[t,s,f,l,p]),x=V.useMemo(()=>s+l,[s,l]),_=V.useMemo(()=>{if(!(x<500))return x<800?"lg":"xl"},[x]);return g.jsxs(Uo,{isOpen:i,toggle:r,centered:!0,size:_,children:[g.jsxs(ro,{toggle:r,children:["QR code for ",g.jsx(Si,{href:t,children:t})]}),g.jsxs(ki,{children:[g.jsxs(Qn,{children:[g.jsxs(vr,{className:"d-grid col-md-4",children:[g.jsxs("label",{children:["Size: ",s,"px"]}),g.jsx("input",{type:"range",className:"form-control-range",value:s,step:10,min:50,max:1e3,onChange:w=>a(Number(w.target.value))})]}),g.jsxs(vr,{className:"d-grid col-md-4",children:[g.jsxs("label",{htmlFor:"marginControl",children:["Margin: ",l,"px"]}),g.jsx("input",{id:"marginControl",type:"range",className:"form-control-range",value:l,step:1,min:0,max:100,onChange:w=>c(Number(w.target.value))})]}),g.jsx(vr,{className:"d-grid col-md-4",children:g.jsx(ege,{format:f,setFormat:h})}),g.jsx(vr,{className:"col-md-6",children:g.jsx(Jme,{errorCorrection:p,setErrorCorrection:m})})]}),g.jsxs("div",{className:"text-center",children:[g.jsxs("div",{className:"mb-3",children:[g.jsx(Si,{href:y}),g.jsx(V5,{text:y})]}),g.jsx("img",{src:y,className:"qr-code-modal__img",alt:"QR code"}),v&&g.jsx("div",{className:"mt-3",children:g.jsxs(ht,{block:!0,color:"primary",onClick:()=>{e.saveImage(y,`${n}-qr-code.${f}`).catch(()=>{})},children:["Download ",g.jsx(je,{icon:Xj,className:"ms-1"})]})})]})]})]})},ry=({date:e,format:t=IE,relative:n=!1})=>{const r=FE(e)?e:Do(e);return g.jsx("time",{dateTime:`${rce(r)}000`,children:n?`${Kle(Vs(),r)} ago`:vo(r,t)})},nge=e=>{const{meta:t,visitsCount:n,visitsSummary:r}=e,{maxVisits:i,validSince:o,validUntil:s}=t,a=(r==null?void 0:r.total)??n;return i&&a>=i?{icon:DQ,className:"text-danger",description:g.jsxs(g.Fragment,{children:["This short URL cannot be currently visited because it has reached the maximum amount of ",g.jsx("b",{children:i})," visit",i>1?"s":"","."]})}:s&&Gr(_i(s),Vs())?{icon:SM,className:"text-danger",description:g.jsxs(g.Fragment,{children:["This short URL cannot be visited since ",g.jsx("b",{className:"indivisible",children:Jv(_i(s))}),"."]})}:o&&Gr(Vs(),_i(o))?{icon:SM,className:"text-warning",description:g.jsxs(g.Fragment,{children:["This short URL will start working on ",g.jsx("b",{className:"indivisible",children:Jv(_i(o))}),"."]})}:{icon:fd,className:"text-primary",description:"This short URL can be visited normally."}},rge=({shortUrl:e})=>{const t=pl(),{icon:n,className:r,description:i}=nge(e);return g.jsxs(g.Fragment,{children:[g.jsx("span",{style:{cursor:i?"help":void 0},ref:t,children:g.jsx(je,{icon:n,className:r})}),g.jsx(Er,{target:t,placement:"bottom",children:i})]})},ige=({id:e},{shortCode:t,domain:n},r)=>{const i=n?`?domain=${n}`:"";return`/server/${e}/short-code/${Sae(t)}/${r}${i}`},f2=({selectedServer:e,shortUrl:t,suffix:n,children:r,...i})=>!e||!Ps(e)||!t?g.jsx("span",{...i,children:r}):g.jsx(Lt,{to:ige(e,t,n),...i,children:r});const H5=({visitsCount:e,shortUrl:t,selectedServer:n,active:r=!1})=>{const{maxVisits:i,validSince:o,validUntil:s}=(t==null?void 0:t.meta)??{},a=!!i||!!o||!!s,l=g.jsx(f2,{selectedServer:n,shortUrl:t,suffix:"visits",children:g.jsx("strong",{className:me("short-url-visits-count__amount",{"short-url-visits-count__amount--big":r}),children:_n(e)})});if(!a)return l;const c=pl();return g.jsxs(g.Fragment,{children:[g.jsxs("span",{className:"indivisible",children:[l,g.jsxs("small",{className:"short-urls-visits-count__max-visits-control",ref:c,children:[i&&g.jsxs(g.Fragment,{children:[" / ",_n(i)]}),g.jsx("sup",{className:"ms-1",children:g.jsx(je,{icon:gC})})]})]}),g.jsx(Er,{target:c,placement:"bottom",children:g.jsxs("ul",{className:"list-unstyled mb-0",children:[i&&g.jsxs("li",{className:"short-url-visits-count__tooltip-list-item",children:["This short URL will not accept more than ",g.jsx("b",{children:_n(i)})," visit",i===1?"":"s","."]}),o&&g.jsxs("li",{className:"short-url-visits-count__tooltip-list-item",children:["This short URL will not accept visits before ",g.jsx("b",{className:"indivisible",children:Jv(_i(o))}),"."]}),s&&g.jsxs("li",{className:"short-url-visits-count__tooltip-list-item",children:["This short URL will not accept visits after ",g.jsx("b",{className:"indivisible",children:Jv(_i(s))}),"."]})]})})]})};const VE=({text:e,children:t,clearable:n,className:r="",colorGenerator:i,onClick:o,onClose:s})=>g.jsxs("span",{className:me("badge tag",r,{"tag--light-bg":i.isColorLightForKey(e)}),style:{backgroundColor:i.getColorForKey(e),cursor:n||!o?"auto":"pointer"},onClick:o,children:[t??e,n&&g.jsx("span",{"aria-label":`Remove ${e}`,className:"close tag__close-selected-tag",onClick:s,children:"×"})]}),oge=({tags:e,onTagClick:t,colorGenerator:n})=>Wn(e)?g.jsx("i",{className:"indivisible",children:g.jsx("small",{children:"No tags"})}):g.jsx(g.Fragment,{children:e.map(r=>g.jsx(VE,{text:r,colorGenerator:n,onClick:()=>t==null?void 0:t(r)},r))});const sge=(e,t,n)=>({shortUrl:r,selectedServer:i,onTagClick:o,settings:s})=>{var y,x,_,w;const[a,l]=n(),[c,f]=n(!1,500),h=V.useRef(!0),[{excludeBots:p}]=E_(),{visits:m}=s,v=p??(m==null?void 0:m.excludeBots);return V.useEffect(()=>{!h.current&&f(),h.current=!1},[(y=r.visitsSummary)==null?void 0:y.total,(x=r.visitsSummary)==null?void 0:x.nonBots,r.visitsCount]),g.jsxs("tr",{className:"responsive-table__row",children:[g.jsx("td",{className:"indivisible short-urls-row__cell responsive-table__cell","data-th":"Created at",children:g.jsx(ry,{date:r.dateCreated})}),g.jsx("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Short URL",children:g.jsxs("span",{className:"position-relative short-urls-row__cell--indivisible",children:[g.jsx("span",{className:"short-urls-row__short-url-wrapper",children:g.jsx(Si,{href:r.shortUrl})}),g.jsx(V5,{text:r.shortUrl,onCopy:l}),g.jsx("span",{className:"badge bg-warning text-black short-urls-row__copy-hint",hidden:!a,children:"Copied short URL!"})]})}),g.jsx("td",{className:"responsive-table__cell short-urls-row__cell short-urls-row__cell--break","data-th":`${r.title?"Title":"Long URL"}`,children:g.jsx(Si,{href:r.longUrl,children:r.title??r.longUrl})}),r.title&&g.jsx("td",{className:"short-urls-row__cell responsive-table__cell short-urls-row__cell--break d-lg-none","data-th":"Long URL",children:g.jsx(Si,{href:r.longUrl})}),g.jsx("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Tags",children:g.jsx(oge,{tags:r.tags,colorGenerator:t,onTagClick:o})}),g.jsx("td",{className:"responsive-table__cell short-urls-row__cell text-lg-end","data-th":"Visits",children:g.jsx(H5,{visitsCount:(v?(_=r.visitsSummary)==null?void 0:_.nonBots:(w=r.visitsSummary)==null?void 0:w.total)??r.visitsCount,shortUrl:r,selectedServer:i,active:c})}),g.jsx("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Status",children:g.jsx(rge,{shortUrl:r})}),g.jsx("td",{className:"responsive-table__cell short-urls-row__cell",children:g.jsx(e,{selectedServer:i,shortUrl:r})})]})},age=(e,t)=>({shortUrl:n,selectedServer:r})=>{const[i,o]=It(),[s,,a,l]=It(),[c,,f,h]=It();return g.jsxs(x_,{toggle:o,isOpen:i,children:[g.jsxs(Ue,{tag:f2,selectedServer:r,shortUrl:n,suffix:"visits",children:[g.jsx(je,{icon:mC,fixedWidth:!0})," Visit stats"]}),g.jsxs(Ue,{tag:f2,selectedServer:r,shortUrl:n,suffix:"edit",children:[g.jsx(je,{icon:pC,fixedWidth:!0})," Edit short URL"]}),g.jsxs(Ue,{onClick:a,children:[g.jsx(je,{icon:NQ,fixedWidth:!0})," QR code"]}),g.jsx(t,{shortUrl:n,isOpen:s,toggle:l}),g.jsx(Ue,{divider:!0}),g.jsxs(Ue,{className:"dropdown-item--danger",onClick:f,children:[g.jsx(je,{icon:hC,fixedWidth:!0})," Delete short URL"]}),g.jsx(e,{shortUrl:n,isOpen:c,toggle:h})]})},W5="shlink/shortUrlCreation",LN={saving:!1,saved:!1,error:!1},lge=e=>rr(`${W5}/createShortUrl`,(t,{getState:n})=>e(n).createShortUrl(t)),cge=e=>{const{reducer:t,actions:n}=Yn({name:W5,initialState:LN,reducers:{resetCreateShortUrl:()=>LN},extraReducers:i=>{i.addCase(e.pending,()=>({saving:!0,saved:!1,error:!1})),i.addCase(e.rejected,(o,{error:s})=>({saving:!1,saved:!1,error:!0,errorData:no(s)})),i.addCase(e.fulfilled,(o,{payload:s})=>({result:s,saving:!1,saved:!0,error:!1}))}}),{resetCreateShortUrl:r}=n;return{reducer:t,resetCreateShortUrl:r}},DN="shlink/shortUrlDetail",AN={loading:!1,error:!1},uge=e=>{const t=rr(`${DN}/getShortUrlDetail`,async({shortCode:r,domain:i},{getState:o})=>{var l;const{shortUrlsList:s}=o();return((l=s==null?void 0:s.shortUrls)==null?void 0:l.data.find(c=>Of(c,r,i)))??await e(o).getShortUrl(r,i)}),{reducer:n}=Yn({name:DN,initialState:AN,reducers:{},extraReducers:r=>{r.addCase(t.pending,()=>({loading:!0,error:!1})),r.addCase(t.rejected,(i,{error:o})=>({loading:!1,error:!0,errorData:no(o)})),r.addCase(t.fulfilled,(i,{payload:o})=>({...AN,shortUrl:o}))}});return{reducer:n,getShortUrlDetail:t}},Y5="shlink/shortUrlEdition",fge={saving:!1,saved:!1,error:!1},dge=e=>rr(`${Y5}/editShortUrl`,({shortCode:t,domain:n,data:r},{getState:i})=>{const{updateShortUrl:o}=e(i);return o(t,n,r)}),hge=e=>Yn({name:Y5,initialState:fge,reducers:{},extraReducers:t=>{t.addCase(e.pending,n=>({...n,saving:!0,error:!1,saved:!1})),t.addCase(e.rejected,(n,{error:r})=>({...n,saving:!1,error:!0,saved:!1,errorData:no(r)})),t.addCase(e.fulfilled,(n,{payload:r})=>({shortUrl:r,saving:!1,error:!1,saved:!0}))}});var pge={prefix:"fab",iconName:"apple",icon:[384,512,[],"f179","M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z"]},mge={prefix:"fab",iconName:"android",icon:[576,512,[],"f17b","M420.55,301.93a24,24,0,1,1,24-24,24,24,0,0,1-24,24m-265.1,0a24,24,0,1,1,24-24,24,24,0,0,1-24,24m273.7-144.48,47.94-83a10,10,0,1,0-17.27-10h0l-48.54,84.07a301.25,301.25,0,0,0-246.56,0L116.18,64.45a10,10,0,1,0-17.27,10h0l47.94,83C64.53,202.22,8.24,285.55,0,384H576c-8.24-98.45-64.54-181.78-146.85-226.55"]};const q5=e=>g.jsx(L5,{type:"checkbox",...e});function gge(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,d2(e,t)}function d2(e,t){return d2=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},d2(e,t)}function vge(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function jN(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function yge(e,t,n){return e===t?!0:e.correspondingElement?e.correspondingElement.classList.contains(n):e.classList.contains(n)}function _ge(e,t,n){if(e===t)return!0;for(;e.parentNode||e.host;){if(e.parentNode&&yge(e,t,n))return!0;e=e.parentNode||e.host}return e}function bge(e){return document.documentElement.clientWidth<=e.clientX||document.documentElement.clientHeight<=e.clientY}var wge=function(){if(!(typeof window>"u"||typeof window.addEventListener!="function")){var t=!1,n=Object.defineProperty({},"passive",{get:function(){t=!0}}),r=function(){};return window.addEventListener("testPassiveEventSupport",r,n),window.removeEventListener("testPassiveEventSupport",r,n),t}};function xge(e){return e===void 0&&(e=0),function(){return++e}}var Sge=xge(),h2,Lp={},j1={},Cge=["touchstart","touchmove"],Ege="ignore-react-onclickoutside";function IN(e,t){var n=null,r=Cge.indexOf(t)!==-1;return r&&h2&&(n={passive:!e.props.preventDefault}),n}function T_(e,t){var n,r,i=e.displayName||e.name||"Component";return r=n=function(o){gge(s,o);function s(l){var c;return c=o.call(this,l)||this,c.__outsideClickHandler=function(f){if(typeof c.__clickOutsideHandlerProp=="function"){c.__clickOutsideHandlerProp(f);return}var h=c.getInstance();if(typeof h.props.handleClickOutside=="function"){h.props.handleClickOutside(f);return}if(typeof h.handleClickOutside=="function"){h.handleClickOutside(f);return}throw new Error("WrappedComponent: "+i+" lacks a handleClickOutside(event) function for processing outside click events.")},c.__getComponentNode=function(){var f=c.getInstance();return t&&typeof t.setClickOutsideRef=="function"?t.setClickOutsideRef()(f):typeof f.setClickOutsideRef=="function"?f.setClickOutsideRef():Ya.findDOMNode(f)},c.enableOnClickOutside=function(){if(!(typeof document>"u"||j1[c._uid])){typeof h2>"u"&&(h2=wge()),j1[c._uid]=!0;var f=c.props.eventTypes;f.forEach||(f=[f]),Lp[c._uid]=function(h){if(c.componentNode!==null&&(c.props.preventDefault&&h.preventDefault(),c.props.stopPropagation&&h.stopPropagation(),!(c.props.excludeScrollbar&&bge(h)))){var p=h.composed&&h.composedPath&&h.composedPath().shift()||h.target;_ge(p,c.componentNode,c.props.outsideClickIgnoreClass)===document&&c.__outsideClickHandler(h)}},f.forEach(function(h){document.addEventListener(h,Lp[c._uid],IN(jN(c),h))})}},c.disableOnClickOutside=function(){delete j1[c._uid];var f=Lp[c._uid];if(f&&typeof document<"u"){var h=c.props.eventTypes;h.forEach||(h=[h]),h.forEach(function(p){return document.removeEventListener(p,f,IN(jN(c),p))}),delete Lp[c._uid]}},c.getRef=function(f){return c.instanceRef=f},c._uid=Sge(),c}var a=s.prototype;return a.getInstance=function(){if(e.prototype&&!e.prototype.isReactComponent)return this;var c=this.instanceRef;return c.getInstance?c.getInstance():c},a.componentDidMount=function(){if(!(typeof document>"u"||!document.createElement)){var c=this.getInstance();if(t&&typeof t.handleClickOutside=="function"&&(this.__clickOutsideHandlerProp=t.handleClickOutside(c),typeof this.__clickOutsideHandlerProp!="function"))throw new Error("WrappedComponent: "+i+" lacks a function for processing outside click events specified by the handleClickOutside config option.");this.componentNode=this.__getComponentNode(),!this.props.disableOnClickOutside&&this.enableOnClickOutside()}},a.componentDidUpdate=function(){this.componentNode=this.__getComponentNode()},a.componentWillUnmount=function(){this.disableOnClickOutside()},a.render=function(){var c=this.props;c.excludeScrollbar;var f=vge(c,["excludeScrollbar"]);return e.prototype&&e.prototype.isReactComponent?f.ref=this.getRef:f.wrappedRef=this.getRef,f.disableOnClickOutside=this.disableOnClickOutside,f.enableOnClickOutside=this.enableOnClickOutside,V.createElement(e,f)},s}(V.Component),n.displayName="OnClickOutside("+i+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:t&&t.excludeScrollbar||!1,outsideClickIgnoreClass:Ege,preventDefault:!1,stopPropagation:!1},n.getClass=function(){return e.getClass?e.getClass():e},r}var G5=V.createContext(),Z5=V.createContext();function Tge(e){var t=e.children,n=V.useState(null),r=n[0],i=n[1],o=V.useRef(!1);V.useEffect(function(){return function(){o.current=!0}},[]);var s=V.useCallback(function(a){o.current||i(a)},[]);return V.createElement(G5.Provider,{value:r},V.createElement(Z5.Provider,{value:s},t))}var K5=function(t){return Array.isArray(t)?t[0]:t},X5=function(t){if(typeof t=="function"){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=m2(e);if(t){var i=m2(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Dge(this,n)}}function e8(e){return function(t){if(Array.isArray(t))return I1(t)}(e)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||function(t,n){if(t){if(typeof t=="string")return I1(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return I1(t,n)}}(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function I1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(o=k1(e,t.slice(0,e.length),new Date)),ns(o)||(o=new Date(e))),ns(o)&&a?o:null)}function ns(e,t){return t=t||new Date("1/1/1000"),e5(e)&&!Gr(e,t)}function sn(e,t,n){if(n==="en")return vo(e,t,{awareOfUnicodeTokens:!0});var r=Ns(n);return n&&!r&&console.warn('A locale object was not found for the provided string ["'.concat(n,'"].')),!r&&Va()&&Ns(Va())&&(r=Ns(Va())),vo(e,t,{locale:r||null,awareOfUnicodeTokens:!0})}function F1(e,t){var n=t.dateFormat,r=t.locale;return e&&sn(e,Array.isArray(n)?n[0]:n,r)||""}function WN(e,t){var n=t.hour,r=n===void 0?0:n,i=t.minute,o=i===void 0?0:i,s=t.second;return Pf(kf(Hhe(e,s===void 0?0:s),o),r)}function Fge(e,t){var n=t&&Ns(t)||Va()&&Ns(Va());return tce(e,n?{locale:n}:null)}function $ge(e,t){return sn(e,"ddd",t)}function Bge(e){return Lr(e)}function HE(e,t,n){var r=Ns(t||Va());return J6(e,{locale:r,weekStartsOn:n})}function Ua(e){return Bae(e)}function tf(e){return zae(e)}function zge(e){return Kw(e)}function t8(e,t){return e&&t?Phe(e,t):!e&&!t}function gs(e,t){return e&&t?The(e,t):!e&&!t}function iy(e,t){return e&&t?Ohe(e,t):!e&&!t}function pr(e,t){return e&&t?Lae(e,t):!e&&!t}function vs(e,t){return e&&t?c5(e,t):!e&&!t}function rg(e,t,n){var r,i=Lr(t),o=ol(n);try{r=Vc(e,{start:i,end:o})}catch{r=!1}return r}function Va(){return(typeof window<"u"?window:globalThis).__localeId__}function Ns(e){if(typeof e=="string"){var t=typeof window<"u"?window:globalThis;return t.__localeData__?t.__localeData__[e]:null}return e}function n8(e,t){return sn(Wi(hn(),e),"LLLL",t)}function r8(e,t){return sn(Wi(hn(),e),"LLL",t)}function Uge(e,t){return sn(ef(hn(),e),"QQQ",t)}function P_(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate,i=t.excludeDates,o=t.excludeDateIntervals,s=t.includeDates,a=t.includeDateIntervals,l=t.filterDate;return k_(e,{minDate:n,maxDate:r})||i&&i.some(function(c){return pr(e,c)})||o&&o.some(function(c){var f=c.start,h=c.end;return Vc(e,{start:f,end:h})})||s&&!s.some(function(c){return pr(e,c)})||a&&!a.some(function(c){var f=c.start,h=c.end;return Vc(e,{start:f,end:h})})||l&&!l(hn(e))||!1}function WE(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.excludeDates,r=t.excludeDateIntervals;return r&&r.length>0?r.some(function(i){var o=i.start,s=i.end;return Vc(e,{start:o,end:s})}):n&&n.some(function(i){return pr(e,i)})||!1}function Vge(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate,i=t.excludeDates,o=t.includeDates,s=t.filterDate;return k_(e,{minDate:n,maxDate:r})||i&&i.some(function(a){return gs(e,a)})||o&&!o.some(function(a){return gs(e,a)})||s&&!s(hn(e))||!1}function Hge(e,t,n,r){var i=dt(e),o=lr(e),s=dt(t),a=lr(t),l=dt(r);return i===s&&i===l?o<=n&&n<=a:i=n||li:void 0}function Wge(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate,i=t.excludeDates,o=t.includeDates,s=t.filterDate;return k_(e,{minDate:n,maxDate:r})||i&&i.some(function(a){return iy(e,a)})||o&&!o.some(function(a){return iy(e,a)})||s&&!s(hn(e))||!1}function Yge(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate,i=new Date(e,0,1);return k_(i,{minDate:n,maxDate:r})||!1}function qge(e,t,n,r){var i=dt(e),o=Zw(e),s=dt(t),a=Zw(t),l=dt(r);return i===s&&i===l?o<=n&&n<=a:i=n||li:void 0}function k_(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate;return n&&Cd(e,n)<0||r&&Cd(e,r)>0}function YN(e,t){return t.some(function(n){return Ci(n)===Ci(e)&&Ei(n)===Ei(e)})}function qN(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.excludeTimes,r=t.includeTimes,i=t.filterTime;return n&&YN(e,n)||r&&!YN(e,r)||i&&!i(e)||!1}function GN(e,t){var n=t.minTime,r=t.maxTime;if(!n||!r)throw new Error("Both minTime and maxTime props required");var i,o=hn(),s=Pf(kf(o,Ei(e)),Ci(e)),a=Pf(kf(o,Ei(n)),Ci(n)),l=Pf(kf(o,Ei(r)),Ci(r));try{i=!Vc(s,{start:a,end:l})}catch{i=!1}return i}function ZN(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.includeDates,i=Td(e,1);return n&&Ed(n,i)>0||r&&r.every(function(o){return Ed(o,i)>0})||!1}function KN(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.maxDate,r=t.includeDates,i=to(e,1);return n&&Ed(i,n)>0||r&&r.every(function(o){return Ed(i,o)>0})||!1}function XN(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.includeDates,i=Od(e,1);return n&&mv(n,i)>0||r&&r.every(function(o){return mv(o,i)>0})||!1}function QN(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.maxDate,r=t.includeDates,i=zc(e,1);return n&&mv(i,n)>0||r&&r.every(function(o){return mv(i,o)>0})||!1}function i8(e){var t=e.minDate,n=e.includeDates;if(n&&t){var r=n.filter(function(i){return Cd(i,t)>=0});return Z3(r)}return n?Z3(n):t}function o8(e){var t=e.maxDate,n=e.includeDates;if(n&&t){var r=n.filter(function(i){return Cd(i,t)<=0});return G3(r)}return n?G3(n):t}function JN(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"react-datepicker__day--highlighted",n=new Map,r=0,i=e.length;r1&&arguments[1]!==void 0?arguments[1]:12,n=Math.ceil(dt(e)/t)*t,r=n-(t-1);return{startPeriod:r,endPeriod:n}}function Zge(e,t,n,r){for(var i=[],o=0;o<2*t+1;o++){var s=e+t-o,a=!0;n&&(a=dt(n)<=s),r&&a&&(a=dt(r)>=s),a&&i.push(s)}return i}var Kge=T_(function(e){Rn(n,U.Component);var t=Nn(n);function n(r){var i;kn(this,n),re(le(i=t.call(this,r)),"renderOptions",function(){var l=i.props.year,c=i.state.yearsList.map(function(p){return U.createElement("div",{className:l===p?"react-datepicker__year-option react-datepicker__year-option--selected_year":"react-datepicker__year-option",key:p,onClick:i.onChange.bind(le(i),p),"aria-selected":l===p?"true":void 0},l===p?U.createElement("span",{className:"react-datepicker__year-option--selected"},"✓"):"",p)}),f=i.props.minDate?dt(i.props.minDate):null,h=i.props.maxDate?dt(i.props.maxDate):null;return h&&i.state.yearsList.find(function(p){return p===h})||c.unshift(U.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:i.incrementYears},U.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),f&&i.state.yearsList.find(function(p){return p===f})||c.push(U.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:i.decrementYears},U.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),c}),re(le(i),"onChange",function(l){i.props.onChange(l)}),re(le(i),"handleClickOutside",function(){i.props.onCancel()}),re(le(i),"shiftYears",function(l){var c=i.state.yearsList.map(function(f){return f+l});i.setState({yearsList:c})}),re(le(i),"incrementYears",function(){return i.shiftYears(1)}),re(le(i),"decrementYears",function(){return i.shiftYears(-1)});var o=r.yearDropdownItemNumber,s=r.scrollableYearDropdown,a=o||(s?10:5);return i.state={yearsList:Zge(i.props.year,a,i.props.minDate,i.props.maxDate)},i.dropdownRef=V.createRef(),i}return Mn(n,[{key:"componentDidMount",value:function(){var r=this.dropdownRef.current;r&&(r.scrollTop=r.scrollHeight/2-r.clientHeight/2)}},{key:"render",value:function(){var r=me({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return U.createElement("div",{className:r,ref:this.dropdownRef},this.renderOptions())}}]),n}()),Xge=function(e){Rn(n,U.Component);var t=Nn(n);function n(){var r;kn(this,n);for(var i=arguments.length,o=new Array(i),s=0;s0&&arguments[0]!==void 0?arguments[0]:{},l=!1;r.getTabIndex()===0&&!a.isInputFocused&&r.isSameDay(r.props.preSelection)&&(document.activeElement&&document.activeElement!==document.body||(l=!0),r.props.inline&&!r.props.shouldFocusDayInline&&(l=!1),r.props.containerRef&&r.props.containerRef.current&&r.props.containerRef.current.contains(document.activeElement)&&document.activeElement.classList.contains("react-datepicker__day")&&(l=!0)),l&&r.dayEl.current.focus({preventScroll:!0})}),re(le(r),"renderDayContents",function(){return r.props.monthShowsDuplicateDaysEnd&&r.isAfterMonth()||r.props.monthShowsDuplicateDaysStart&&r.isBeforeMonth()?null:r.props.renderDayContents?r.props.renderDayContents(nR(r.props.day),r.props.day):nR(r.props.day)}),re(le(r),"render",function(){return U.createElement("div",{ref:r.dayEl,className:r.getClassNames(r.props.day),onKeyDown:r.handleOnKeyDown,onClick:r.handleClick,onMouseEnter:r.handleMouseEnter,tabIndex:r.getTabIndex(),"aria-label":r.getAriaLabel(),role:"option","aria-disabled":r.isDisabled(),"aria-current":r.isCurrentDay()?"date":void 0,"aria-selected":r.isSelected()},r.renderDayContents())}),r}return Mn(n,[{key:"componentDidMount",value:function(){this.handleFocusDay()}},{key:"componentDidUpdate",value:function(r){this.handleFocusDay(r)}}]),n}(),ive=function(e){Rn(n,U.Component);var t=Nn(n);function n(){var r;kn(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=6,m=!l&&!r.isWeekInMonth(h);if(p||m){if(!r.props.peekNextMonth)break;f=!0}}return a}),re(le(r),"onMonthClick",function(a,l){r.handleDayClick(Ua(Wi(r.props.day,l)),a)}),re(le(r),"handleMonthNavigation",function(a,l){r.isDisabled(l)||r.isExcluded(l)||(r.props.setPreSelection(l),r.MONTH_REFS[a].current&&r.MONTH_REFS[a].current.focus())}),re(le(r),"onMonthKeyDown",function(a,l){var c=a.key;if(!r.props.disabledKeyboardNavigation)switch(c){case"Enter":r.onMonthClick(a,l),r.props.setPreSelection(r.props.selected);break;case"ArrowRight":r.handleMonthNavigation(l===11?0:l+1,to(r.props.preSelection,1));break;case"ArrowLeft":r.handleMonthNavigation(l===0?11:l-1,Td(r.props.preSelection,1))}}),re(le(r),"onQuarterClick",function(a,l){r.handleDayClick(zge(ef(r.props.day,l)),a)}),re(le(r),"getMonthClassNames",function(a){var l=r.props,c=l.day,f=l.startDate,h=l.endDate,p=l.selected,m=l.minDate,v=l.maxDate,y=l.preSelection,x=l.monthClassName,_=x?x(c):void 0;return me("react-datepicker__month-text","react-datepicker__month-".concat(a),_,{"react-datepicker__month--disabled":(m||v)&&Vge(Wi(c,a),r.props),"react-datepicker__month--selected":r.isSelectedMonth(c,a,p),"react-datepicker__month-text--keyboard-selected":lr(y)===a,"react-datepicker__month--in-range":Hge(f,h,a,c),"react-datepicker__month--range-start":r.isRangeStartMonth(a),"react-datepicker__month--range-end":r.isRangeEndMonth(a),"react-datepicker__month-text--today":r.isCurrentMonth(c,a)})}),re(le(r),"getTabIndex",function(a){var l=lr(r.props.preSelection);return r.props.disabledKeyboardNavigation||a!==l?"-1":"0"}),re(le(r),"getAriaLabel",function(a){var l=r.props,c=l.chooseDayAriaLabelPrefix,f=c===void 0?"Choose":c,h=l.disabledDayAriaLabelPrefix,p=h===void 0?"Not available":h,m=l.day,v=Wi(m,a),y=r.isDisabled(v)||r.isExcluded(v)?p:f;return"".concat(y," ").concat(sn(v,"MMMM yyyy"))}),re(le(r),"getQuarterClassNames",function(a){var l=r.props,c=l.day,f=l.startDate,h=l.endDate,p=l.selected,m=l.minDate,v=l.maxDate;return me("react-datepicker__quarter-text","react-datepicker__quarter-".concat(a),{"react-datepicker__quarter--disabled":(m||v)&&Wge(ef(c,a),r.props),"react-datepicker__quarter--selected":r.isSelectedQuarter(c,a,p),"react-datepicker__quarter--in-range":qge(f,h,a,c),"react-datepicker__quarter--range-start":r.isRangeStartQuarter(a),"react-datepicker__quarter--range-end":r.isRangeEndQuarter(a)})}),re(le(r),"renderMonths",function(){var a=r.props,l=a.showFullMonthYearPicker,c=a.showTwoColumnMonthYearPicker,f=a.showFourColumnMonthYearPicker,h=a.locale,p=a.day,m=a.selected;return(f?[[0,1,2,3],[4,5,6,7],[8,9,10,11]]:c?[[0,1],[2,3],[4,5],[6,7],[8,9],[10,11]]:[[0,1,2],[3,4,5],[6,7,8],[9,10,11]]).map(function(v,y){return U.createElement("div",{className:"react-datepicker__month-wrapper",key:y},v.map(function(x,_){return U.createElement("div",{ref:r.MONTH_REFS[x],key:_,onClick:function(w){r.onMonthClick(w,x)},onKeyDown:function(w){r.onMonthKeyDown(w,x)},tabIndex:r.getTabIndex(x),className:r.getMonthClassNames(x),role:"option","aria-label":r.getAriaLabel(x),"aria-current":r.isCurrentMonth(p,x)?"date":void 0,"aria-selected":r.isSelectedMonth(p,x,m)},l?n8(x,h):r8(x,h))}))})}),re(le(r),"renderQuarters",function(){var a=r.props,l=a.day,c=a.selected;return U.createElement("div",{className:"react-datepicker__quarter-wrapper"},[1,2,3,4].map(function(f,h){return U.createElement("div",{key:h,role:"option",onClick:function(p){r.onQuarterClick(p,f)},className:r.getQuarterClassNames(f),"aria-selected":r.isSelectedQuarter(l,f,c)},Uge(f,r.props.locale))}))}),re(le(r),"getClassNames",function(){var a=r.props;a.day;var l=a.selectingDate,c=a.selectsStart,f=a.selectsEnd,h=a.showMonthYearPicker,p=a.showQuarterYearPicker;return me("react-datepicker__month",{"react-datepicker__month--selecting-range":l&&(c||f)},{"react-datepicker__monthPicker":h},{"react-datepicker__quarterPicker":p})}),r}return Mn(n,[{key:"render",value:function(){var r=this.props,i=r.showMonthYearPicker,o=r.showQuarterYearPicker,s=r.day,a=r.ariaLabelPrefix,l=a===void 0?"month ":a;return U.createElement("div",{className:this.getClassNames(),onMouseLeave:this.handleMouseLeave,"aria-label":"".concat(l," ").concat(sn(s,"yyyy-MM")),role:"listbox"},i?this.renderMonths():o?this.renderQuarters():this.renderWeeks())}}]),n}(),s8=function(e){Rn(n,U.Component);var t=Nn(n);function n(){var r;kn(this,n);for(var i=arguments.length,o=new Array(i),s=0;s0&&arguments[0]!==void 0?arguments[0]:{}).className||"").split(/\s+/);return uve.some(function(a){return s.indexOf(a)>=0})})(o.target)&&i.props.onDropdownFocus()}),re(le(i),"getDateInView",function(){var o=i.props,s=o.preSelection,a=o.selected,l=o.openToDate,c=i8(i.props),f=o8(i.props),h=hn(),p=l||a||s;return p||(c&&Gr(h,c)?c:f&&Us(h,f)?f:h)}),re(le(i),"increaseMonth",function(){i.setState(function(o){var s=o.date;return{date:to(s,1)}},function(){return i.handleMonthChange(i.state.date)})}),re(le(i),"decreaseMonth",function(){i.setState(function(o){var s=o.date;return{date:Td(s,1)}},function(){return i.handleMonthChange(i.state.date)})}),re(le(i),"handleDayClick",function(o,s,a){i.props.onSelect(o,s,a),i.props.setPreSelection&&i.props.setPreSelection(o)}),re(le(i),"handleDayMouseEnter",function(o){i.setState({selectingDate:o}),i.props.onDayMouseEnter&&i.props.onDayMouseEnter(o)}),re(le(i),"handleMonthMouseLeave",function(){i.setState({selectingDate:null}),i.props.onMonthMouseLeave&&i.props.onMonthMouseLeave()}),re(le(i),"handleYearChange",function(o){i.props.onYearChange&&i.props.onYearChange(o),i.props.adjustDateOnChange&&(i.props.onSelect&&i.props.onSelect(o),i.props.setOpen&&i.props.setOpen(!0)),i.props.setPreSelection&&i.props.setPreSelection(o)}),re(le(i),"handleMonthChange",function(o){i.props.onMonthChange&&i.props.onMonthChange(o),i.props.adjustDateOnChange&&(i.props.onSelect&&i.props.onSelect(o),i.props.setOpen&&i.props.setOpen(!0)),i.props.setPreSelection&&i.props.setPreSelection(o)}),re(le(i),"handleMonthYearChange",function(o){i.handleYearChange(o),i.handleMonthChange(o)}),re(le(i),"changeYear",function(o){i.setState(function(s){var a=s.date;return{date:Qv(a,o)}},function(){return i.handleYearChange(i.state.date)})}),re(le(i),"changeMonth",function(o){i.setState(function(s){var a=s.date;return{date:Wi(a,o)}},function(){return i.handleMonthChange(i.state.date)})}),re(le(i),"changeMonthYear",function(o){i.setState(function(s){var a=s.date;return{date:Qv(Wi(a,lr(o)),dt(o))}},function(){return i.handleMonthYearChange(i.state.date)})}),re(le(i),"header",function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:i.state.date,s=HE(o,i.props.locale,i.props.calendarStartDay),a=[];return i.props.showWeekNumbers&&a.push(U.createElement("div",{key:"W",className:"react-datepicker__day-name"},i.props.weekLabel||"#")),a.concat([0,1,2,3,4,5,6].map(function(l){var c=ml(s,l),f=i.formatWeekday(c,i.props.locale),h=i.props.weekDayClassName?i.props.weekDayClassName(c):void 0;return U.createElement("div",{key:l,className:me("react-datepicker__day-name",h)},f)}))}),re(le(i),"formatWeekday",function(o,s){return i.props.formatWeekDay?function(a,l,c){return l(sn(a,"EEEE",c))}(o,i.props.formatWeekDay,s):i.props.useWeekdaysShort?function(a,l){return sn(a,"EEE",l)}(o,s):function(a,l){return sn(a,"EEEEEE",l)}(o,s)}),re(le(i),"decreaseYear",function(){i.setState(function(o){var s=o.date;return{date:Od(s,i.props.showYearPicker?i.props.yearItemNumber:1)}},function(){return i.handleYearChange(i.state.date)})}),re(le(i),"renderPreviousButton",function(){if(!i.props.renderCustomHeader){var o;switch(!0){case i.props.showMonthYearPicker:o=XN(i.state.date,i.props);break;case i.props.showYearPicker:o=function(_){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},S=w.minDate,T=w.yearItemNumber,P=T===void 0?12:T,k=Nf(tf(Od(_,P)),P).endPeriod,N=S&&dt(S);return N&&N>k||!1}(i.state.date,i.props);break;default:o=ZN(i.state.date,i.props)}if((i.props.forceShowMonthNavigation||i.props.showDisabledMonthNavigation||!o)&&!i.props.showTimeSelectOnly){var s=["react-datepicker__navigation","react-datepicker__navigation--previous"],a=i.decreaseMonth;(i.props.showMonthYearPicker||i.props.showQuarterYearPicker||i.props.showYearPicker)&&(a=i.decreaseYear),o&&i.props.showDisabledMonthNavigation&&(s.push("react-datepicker__navigation--previous--disabled"),a=null);var l=i.props.showMonthYearPicker||i.props.showQuarterYearPicker||i.props.showYearPicker,c=i.props,f=c.previousMonthButtonLabel,h=c.previousYearButtonLabel,p=i.props,m=p.previousMonthAriaLabel,v=m===void 0?typeof f=="string"?f:"Previous Month":m,y=p.previousYearAriaLabel,x=y===void 0?typeof h=="string"?h:"Previous Year":y;return U.createElement("button",{type:"button",className:s.join(" "),onClick:a,onKeyDown:i.props.handleOnKeyDown,"aria-label":l?x:v},U.createElement("span",{className:["react-datepicker__navigation-icon","react-datepicker__navigation-icon--previous"].join(" ")},l?i.props.previousYearButtonLabel:i.props.previousMonthButtonLabel))}}}),re(le(i),"increaseYear",function(){i.setState(function(o){var s=o.date;return{date:zc(s,i.props.showYearPicker?i.props.yearItemNumber:1)}},function(){return i.handleYearChange(i.state.date)})}),re(le(i),"renderNextButton",function(){if(!i.props.renderCustomHeader){var o;switch(!0){case i.props.showMonthYearPicker:o=QN(i.state.date,i.props);break;case i.props.showYearPicker:o=function(_){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},S=w.maxDate,T=w.yearItemNumber,P=T===void 0?12:T,k=Nf(zc(_,P),P).startPeriod,N=S&&dt(S);return N&&N0&&arguments[0]!==void 0?arguments[0]:i.state.date,s=["react-datepicker__current-month"];return i.props.showYearDropdown&&s.push("react-datepicker__current-month--hasYearDropdown"),i.props.showMonthDropdown&&s.push("react-datepicker__current-month--hasMonthDropdown"),i.props.showMonthYearDropdown&&s.push("react-datepicker__current-month--hasMonthYearDropdown"),U.createElement("div",{className:s.join(" ")},sn(o,i.props.dateFormat,i.props.locale))}),re(le(i),"renderYearDropdown",function(){var o=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(i.props.showYearDropdown&&!o)return U.createElement(Xge,{adjustDateOnChange:i.props.adjustDateOnChange,date:i.state.date,onSelect:i.props.onSelect,setOpen:i.props.setOpen,dropdownMode:i.props.dropdownMode,onChange:i.changeYear,minDate:i.props.minDate,maxDate:i.props.maxDate,year:dt(i.state.date),scrollableYearDropdown:i.props.scrollableYearDropdown,yearDropdownItemNumber:i.props.yearDropdownItemNumber})}),re(le(i),"renderMonthDropdown",function(){var o=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(i.props.showMonthDropdown&&!o)return U.createElement(Jge,{dropdownMode:i.props.dropdownMode,locale:i.props.locale,onChange:i.changeMonth,month:lr(i.state.date),useShortMonthInDropdown:i.props.useShortMonthInDropdown})}),re(le(i),"renderMonthYearDropdown",function(){var o=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(i.props.showMonthYearDropdown&&!o)return U.createElement(nve,{dropdownMode:i.props.dropdownMode,locale:i.props.locale,dateFormat:i.props.dateFormat,onChange:i.changeMonthYear,minDate:i.props.minDate,maxDate:i.props.maxDate,date:i.state.date,scrollableMonthYearDropdown:i.props.scrollableMonthYearDropdown})}),re(le(i),"renderTodayButton",function(){if(i.props.todayButton&&!i.props.showTimeSelectOnly)return U.createElement("div",{className:"react-datepicker__today-button",onClick:function(o){return i.props.onSelect(Lr(hn()),o)}},i.props.todayButton)}),re(le(i),"renderDefaultHeader",function(o){var s=o.monthDate,a=o.i;return U.createElement("div",{className:"react-datepicker__header ".concat(i.props.showTimeSelect?"react-datepicker__header--has-time-select":"")},i.renderCurrentMonth(s),U.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(i.props.dropdownMode),onFocus:i.handleDropdownFocus},i.renderMonthDropdown(a!==0),i.renderMonthYearDropdown(a!==0),i.renderYearDropdown(a!==0)),U.createElement("div",{className:"react-datepicker__day-names"},i.header(s)))}),re(le(i),"renderCustomHeader",function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=o.monthDate,a=o.i;if(i.props.showTimeSelect&&!i.state.monthContainer||i.props.showTimeSelectOnly)return null;var l=ZN(i.state.date,i.props),c=KN(i.state.date,i.props),f=XN(i.state.date,i.props),h=QN(i.state.date,i.props),p=!i.props.showMonthYearPicker&&!i.props.showQuarterYearPicker&&!i.props.showYearPicker;return U.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:i.props.onDropdownFocus},i.props.renderCustomHeader(zN(zN({},i.state),{},{customHeaderCount:a,monthDate:s,changeMonth:i.changeMonth,changeYear:i.changeYear,decreaseMonth:i.decreaseMonth,increaseMonth:i.increaseMonth,decreaseYear:i.decreaseYear,increaseYear:i.increaseYear,prevMonthButtonDisabled:l,nextMonthButtonDisabled:c,prevYearButtonDisabled:f,nextYearButtonDisabled:h})),p&&U.createElement("div",{className:"react-datepicker__day-names"},i.header(s)))}),re(le(i),"renderYearHeader",function(){var o=i.state.date,s=i.props,a=s.showYearPicker,l=Nf(o,s.yearItemNumber),c=l.startPeriod,f=l.endPeriod;return U.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},a?"".concat(c," - ").concat(f):dt(o))}),re(le(i),"renderHeader",function(o){switch(!0){case i.props.renderCustomHeader!==void 0:return i.renderCustomHeader(o);case(i.props.showMonthYearPicker||i.props.showQuarterYearPicker||i.props.showYearPicker):return i.renderYearHeader(o);default:return i.renderDefaultHeader(o)}}),re(le(i),"renderMonths",function(){if(!i.props.showTimeSelectOnly&&!i.props.showYearPicker){for(var o=[],s=i.props.showPreviousMonths?i.props.monthsShown-1:0,a=Td(i.state.date,s),l=0;l0;o.push(U.createElement("div",{key:h,ref:function(v){i.monthContainer=v},className:"react-datepicker__month-container"},i.renderHeader({monthDate:f,i:l}),U.createElement(sve,{chooseDayAriaLabelPrefix:i.props.chooseDayAriaLabelPrefix,disabledDayAriaLabelPrefix:i.props.disabledDayAriaLabelPrefix,weekAriaLabelPrefix:i.props.weekAriaLabelPrefix,ariaLabelPrefix:i.props.monthAriaLabelPrefix,onChange:i.changeMonthYear,day:f,dayClassName:i.props.dayClassName,calendarStartDay:i.props.calendarStartDay,monthClassName:i.props.monthClassName,onDayClick:i.handleDayClick,handleOnKeyDown:i.props.handleOnDayKeyDown,onDayMouseEnter:i.handleDayMouseEnter,onMouseLeave:i.handleMonthMouseLeave,onWeekSelect:i.props.onWeekSelect,orderInDisplay:l,formatWeekNumber:i.props.formatWeekNumber,locale:i.props.locale,minDate:i.props.minDate,maxDate:i.props.maxDate,excludeDates:i.props.excludeDates,excludeDateIntervals:i.props.excludeDateIntervals,highlightDates:i.props.highlightDates,selectingDate:i.state.selectingDate,includeDates:i.props.includeDates,includeDateIntervals:i.props.includeDateIntervals,inline:i.props.inline,shouldFocusDayInline:i.props.shouldFocusDayInline,fixedHeight:i.props.fixedHeight,filterDate:i.props.filterDate,preSelection:i.props.preSelection,setPreSelection:i.props.setPreSelection,selected:i.props.selected,selectsStart:i.props.selectsStart,selectsEnd:i.props.selectsEnd,selectsRange:i.props.selectsRange,selectsDisabledDaysInRange:i.props.selectsDisabledDaysInRange,showWeekNumbers:i.props.showWeekNumbers,startDate:i.props.startDate,endDate:i.props.endDate,peekNextMonth:i.props.peekNextMonth,setOpen:i.props.setOpen,shouldCloseOnSelect:i.props.shouldCloseOnSelect,renderDayContents:i.props.renderDayContents,disabledKeyboardNavigation:i.props.disabledKeyboardNavigation,showMonthYearPicker:i.props.showMonthYearPicker,showFullMonthYearPicker:i.props.showFullMonthYearPicker,showTwoColumnMonthYearPicker:i.props.showTwoColumnMonthYearPicker,showFourColumnMonthYearPicker:i.props.showFourColumnMonthYearPicker,showYearPicker:i.props.showYearPicker,showQuarterYearPicker:i.props.showQuarterYearPicker,isInputFocused:i.props.isInputFocused,containerRef:i.containerRef,monthShowsDuplicateDaysEnd:p,monthShowsDuplicateDaysStart:m})))}return o}}),re(le(i),"renderYears",function(){if(!i.props.showTimeSelectOnly)return i.props.showYearPicker?U.createElement("div",{className:"react-datepicker__year--container"},i.renderHeader(),U.createElement(ave,O_({onDayClick:i.handleDayClick,date:i.state.date},i.props))):void 0}),re(le(i),"renderTimeSection",function(){if(i.props.showTimeSelect&&(i.state.monthContainer||i.props.showTimeSelectOnly))return U.createElement(s8,{selected:i.props.selected,openToDate:i.props.openToDate,onChange:i.props.onTimeChange,timeClassName:i.props.timeClassName,format:i.props.timeFormat,includeTimes:i.props.includeTimes,intervals:i.props.timeIntervals,minTime:i.props.minTime,maxTime:i.props.maxTime,excludeTimes:i.props.excludeTimes,filterTime:i.props.filterTime,timeCaption:i.props.timeCaption,todayButton:i.props.todayButton,showMonthDropdown:i.props.showMonthDropdown,showMonthYearDropdown:i.props.showMonthYearDropdown,showYearDropdown:i.props.showYearDropdown,withPortal:i.props.withPortal,monthRef:i.state.monthContainer,injectTimes:i.props.injectTimes,locale:i.props.locale,handleOnKeyDown:i.props.handleOnKeyDown,showTimeSelectOnly:i.props.showTimeSelectOnly})}),re(le(i),"renderInputTimeSection",function(){var o=new Date(i.props.selected),s=ns(o)&&i.props.selected?"".concat(eL(o.getHours()),":").concat(eL(o.getMinutes())):"";if(i.props.showTimeInput)return U.createElement(lve,{date:o,timeString:s,timeInputLabel:i.props.timeInputLabel,onChange:i.props.onTimeChange,customTimeInput:i.props.customTimeInput})}),i.containerRef=U.createRef(),i.state={date:i.getDateInView(),selectingDate:null,monthContainer:null},i}return Mn(n,[{key:"componentDidMount",value:function(){var r=this;this.props.showTimeSelect&&(this.assignMonthContainer=void r.setState({monthContainer:r.monthContainer}))}},{key:"componentDidUpdate",value:function(r){this.props.preSelection&&!pr(this.props.preSelection,r.preSelection)?this.setState({date:this.props.preSelection}):this.props.openToDate&&!pr(this.props.openToDate,r.openToDate)&&this.setState({date:this.props.openToDate})}},{key:"render",value:function(){var r=this.props.container||cve;return U.createElement("div",{ref:this.containerRef},U.createElement(r,{className:me("react-datepicker",this.props.className,{"react-datepicker--time-only":this.props.showTimeSelectOnly}),showPopperArrow:this.props.showPopperArrow,arrowProps:this.props.arrowProps},this.renderPreviousButton(),this.renderNextButton(),this.renderMonths(),this.renderYears(),this.renderTodayButton(),this.renderTimeSection(),this.renderInputTimeSection(),this.props.children))}}],[{key:"defaultProps",get:function(){return{onDropdownFocus:function(){},monthsShown:1,monthSelectedIn:0,forceShowMonthNavigation:!1,timeCaption:"Time",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",customTimeInput:null,yearItemNumber:12}}}]),n}(),a8=function(e){Rn(n,U.Component);var t=Nn(n);function n(r){var i;return kn(this,n),(i=t.call(this,r)).el=document.createElement("div"),i}return Mn(n,[{key:"componentDidMount",value:function(){this.portalRoot=(this.props.portalHost||document).getElementById(this.props.portalId),this.portalRoot||(this.portalRoot=document.createElement("div"),this.portalRoot.setAttribute("id",this.props.portalId),(this.props.portalHost||document.body).appendChild(this.portalRoot)),this.portalRoot.appendChild(this.el)}},{key:"componentWillUnmount",value:function(){this.portalRoot.removeChild(this.el)}},{key:"render",value:function(){return $a.createPortal(this.props.children,this.el)}}]),n}(),dve=function(e){return!e.disabled&&e.tabIndex!==-1},hve=function(e){Rn(n,U.Component);var t=Nn(n);function n(r){var i;return kn(this,n),re(le(i=t.call(this,r)),"getTabChildren",function(){return Array.prototype.slice.call(i.tabLoopRef.current.querySelectorAll("[tabindex], a, button, input, select, textarea"),1,-1).filter(dve)}),re(le(i),"handleFocusStart",function(o){var s=i.getTabChildren();s&&s.length>1&&s[s.length-1].focus()}),re(le(i),"handleFocusEnd",function(o){var s=i.getTabChildren();s&&s.length>1&&s[0].focus()}),i.tabLoopRef=U.createRef(),i}return Mn(n,[{key:"render",value:function(){return this.props.enableTabLoop?U.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},U.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:"0",onFocus:this.handleFocusStart}),this.props.children,U.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:"0",onFocus:this.handleFocusEnd})):this.props.children}}],[{key:"defaultProps",get:function(){return{enableTabLoop:!0}}}]),n}(),pve=function(e){Rn(n,U.Component);var t=Nn(n);function n(){return kn(this,n),t.apply(this,arguments)}return Mn(n,[{key:"render",value:function(){var r,i=this.props,o=i.className,s=i.wrapperClassName,a=i.hidePopper,l=i.popperComponent,c=i.popperModifiers,f=i.popperPlacement,h=i.popperProps,p=i.targetComponent,m=i.enableTabLoop,v=i.popperOnKeyDown,y=i.portalId,x=i.portalHost;if(!a){var _=me("react-datepicker-popper",o);r=U.createElement(Nge,O_({modifiers:c,placement:f},h),function(S){var T=S.ref,P=S.style,k=S.placement,N=S.arrowProps;return U.createElement(hve,{enableTabLoop:m},U.createElement("div",{ref:T,style:P,className:_,"data-placement":k,onKeyDown:v},U.cloneElement(l,{arrowProps:N})))})}this.props.popperContainer&&(r=U.createElement(this.props.popperContainer,{},r)),y&&!a&&(r=U.createElement(a8,{portalId:y,portalHost:x},r));var w=me("react-datepicker-wrapper",s);return U.createElement(Tge,{className:"react-datepicker-manager"},U.createElement(Lge,null,function(S){var T=S.ref;return U.createElement("div",{ref:T,className:w},p)}),r)}}],[{key:"defaultProps",get:function(){return{hidePopper:!0,popperModifiers:[],popperProps:{},popperPlacement:"bottom-start"}}}]),n}(),mve=T_(fve),gve=function(e){Rn(n,U.Component);var t=Nn(n);function n(r){var i;return kn(this,n),re(le(i=t.call(this,r)),"getPreSelection",function(){return i.props.openToDate?i.props.openToDate:i.props.selectsEnd&&i.props.startDate?i.props.startDate:i.props.selectsStart&&i.props.endDate?i.props.endDate:hn()}),re(le(i),"calcInitialState",function(){var o,s=i.getPreSelection(),a=i8(i.props),l=o8(i.props),c=a&&Gr(s,Lr(a))?a:l&&Us(s,ol(l))?l:s;return{open:i.props.startOpen||!1,preventFocus:!1,preSelection:(o=i.props.selectsRange?i.props.startDate:i.props.selected)!==null&&o!==void 0?o:c,highlightDates:JN(i.props.highlightDates),focused:!1,shouldFocusDayInline:!1}}),re(le(i),"clearPreventFocusTimeout",function(){i.preventFocusTimeout&&clearTimeout(i.preventFocusTimeout)}),re(le(i),"setFocus",function(){i.input&&i.input.focus&&i.input.focus({preventScroll:!0})}),re(le(i),"setBlur",function(){i.input&&i.input.blur&&i.input.blur(),i.cancelFocusInput()}),re(le(i),"setOpen",function(o){var s=arguments.length>1&&arguments[1]!==void 0&&arguments[1];i.setState({open:o,preSelection:o&&i.state.open?i.state.preSelection:i.calcInitialState().preSelection,lastPreSelectChange:$1},function(){o||i.setState(function(a){return{focused:!!s&&a.focused}},function(){!s&&i.setBlur(),i.setState({inputValue:null})})})}),re(le(i),"inputOk",function(){return TE(i.state.preSelection)}),re(le(i),"isCalendarOpen",function(){return i.props.open===void 0?i.state.open&&!i.props.disabled&&!i.props.readOnly:i.props.open}),re(le(i),"handleFocus",function(o){i.state.preventFocus||(i.props.onFocus(o),i.props.preventOpenOnFocus||i.props.readOnly||i.setOpen(!0)),i.setState({focused:!0})}),re(le(i),"cancelFocusInput",function(){clearTimeout(i.inputFocusTimeout),i.inputFocusTimeout=null}),re(le(i),"deferFocusInput",function(){i.cancelFocusInput(),i.inputFocusTimeout=setTimeout(function(){return i.setFocus()},1)}),re(le(i),"handleDropdownFocus",function(){i.cancelFocusInput()}),re(le(i),"handleBlur",function(o){(!i.state.open||i.props.withPortal||i.props.showTimeInput)&&i.props.onBlur(o),i.setState({focused:!1})}),re(le(i),"handleCalendarClickOutside",function(o){i.props.inline||i.setOpen(!1),i.props.onClickOutside(o),i.props.withPortal&&o.preventDefault()}),re(le(i),"handleChange",function(){for(var o=arguments.length,s=new Array(o),a=0;a{const{className:t,isClearable:n,selected:r,dateFormat:i}=e,o=!n||Fo(r),s=V.useRef();return g.jsxs("div",{className:"icon-input-container",children:[g.jsx(gve,{...e,popperModifiers:[{name:"arrow",options:{padding:24}}],dateFormat:i??Mf,className:me("icon-input-container__input form-control",t),ref:s}),o&&g.jsx(je,{icon:Epe,className:"icon-input-container__icon",onClick:()=>{var a;return(a=s.current)==null?void 0:a.input.focus()}})]})},yve=e=>g.jsx(g2,{...e,dateFormat:IE,showTimeSelect:!0,timeIntervals:10});const _ve=({icon:e,className:t,...n})=>{const r=pl(),i=me("icon-input-container__input",t);return g.jsxs("div",{className:"icon-input-container",children:[g.jsx($c,{className:i,innerRef:r,...n}),g.jsx(je,{icon:e,fixedWidth:!0,className:"icon-input-container__icon",onClick:()=>{var o;return(o=r.current)==null?void 0:o.focus()}})]})},B1=({children:e,infoTooltip:t,checked:n,onChange:r})=>g.jsxs("p",{children:[g.jsx(q5,{inline:!0,checked:n,className:t?"me-2":"",onChange:r,children:e}),t&&g.jsx(ng,{placement:"right",children:t})]});const bve=({isOpen:e,toggle:t})=>g.jsxs(Uo,{isOpen:e,toggle:t,centered:!0,size:"lg",children:[g.jsx(ro,{toggle:t,children:"Info"}),g.jsxs(ki,{children:[g.jsxs("p",{children:["When the ",g.jsx("b",{children:g.jsx("i",{children:'"Use existing URL if found"'})})," checkbox is checked, the server will return an existing short URL if it matches provided params."]}),g.jsx("p",{children:"These are the checks performed by Shlink in order to determine if an existing short URL should be returned:"}),g.jsxs("ul",{children:[g.jsx("li",{children:"When only the long URL is provided: The most recent match will be returned, or a new short URL will be created if none is found."}),g.jsxs("li",{children:["When long URL and custom slug and/or domain are provided: Same as in previous case, but it will try to match the short URL using both the long URL and the slug, the long URL and the domain, or the three of them.",g.jsx("br",{}),"If the slug is being used by another long URL, an error will be returned."]}),g.jsx("li",{children:"When other params are provided: Same as in previous cases, but it will try to match existing short URLs with all provided data. If any of them does not match, a new short URL will be created"})]})]})]}),wve=()=>{const[e,t]=It();return g.jsxs(g.Fragment,{children:[g.jsx("span",{title:"What does this mean?",children:g.jsx(je,{icon:gC,style:{cursor:"pointer"},onClick:t})}),g.jsx(bve,{isOpen:e,toggle:t})]})};const xve=Dt(PZ,yZ(/ /g,"-")),z1=e=>typeof e=="string"?Do(e):e,Sve=(e,t)=>({mode:n,saving:r,onSave:i,initialState:o,selectedServer:s})=>{const[a,l]=V.useState(o),c=()=>l(o),f=Pi("deviceLongUrls",s),h=n==="edit",p=n==="create-basic",m=P=>l({...a,tags:P.map(xve)}),v=(P,k)=>gi(P)?P:gi(k)?null:void 0,y=rh(async()=>i({...a,validSince:Hs(a.validSince)??null,validUntil:Hs(a.validUntil)??null,maxVisits:gi(a.maxVisits)?Number(a.maxVisits):null}).then(()=>!h&&c()).catch(()=>{}));V.useEffect(()=>{l(o)},[o]);const x=(P,k,N="text",D={},z={})=>g.jsx(vr,{...z,children:g.jsx($c,{id:P,type:N,placeholder:k,value:a[P]??"",onChange:D.onChange??(A=>l({...a,[P]:A.target.value})),...D})}),_=(P,k,N)=>{var D;return g.jsx(_ve,{icon:N,id:P,type:"url",placeholder:k,value:((D=a.deviceLongUrls)==null?void 0:D[P])??"",onChange:z=>{var A;return l({...a,deviceLongUrls:{...a.deviceLongUrls??{},[P]:v(z.target.value,(A=o.deviceLongUrls)==null?void 0:A[P])}})}})},w=(P,k,N={})=>g.jsx(yve,{selected:a[P]?z1(a[P]):null,placeholderText:k,isClearable:!0,onChange:D=>l({...a,[P]:D}),...N}),S=g.jsxs(g.Fragment,{children:[g.jsx(vr,{children:g.jsx($c,{bsSize:"lg",type:"url",placeholder:"URL to be shortened",required:!0,value:a.longUrl,onChange:P=>l({...a,longUrl:P.target.value})})}),g.jsxs(Qn,{children:[p&&x("customSlug","Custom slug","text",{bsSize:"lg"},{className:"col-lg-6"}),g.jsx("div",{className:p?"col-lg-6 mb-3":"col-12",children:g.jsx(e,{selectedTags:a.tags??[],onChange:m})})]})]}),T=Pi("forwardQuery",s);return g.jsxs("form",{name:"shortUrlForm",className:"short-url-form",onSubmit:y,children:[p&&S,!p&&g.jsxs(g.Fragment,{children:[g.jsxs(Qn,{children:[g.jsx("div",{className:me("mb-3",{"col-sm-6":f,"col-12":!f}),children:g.jsx(un,{title:"Main options",className:"mb-3",children:S})}),f&&g.jsx("div",{className:"col-sm-6 mb-3",children:g.jsxs(un,{title:"Device-specific long URLs",children:[g.jsx(vr,{children:_("android","Android-specific redirection",mge)}),g.jsx(vr,{children:_("ios","iOS-specific redirection",pge)}),_("desktop","Desktop-specific redirection",AQ)]})})]}),g.jsxs(Qn,{children:[g.jsx("div",{className:"col-sm-6 mb-3",children:g.jsxs(un,{title:"Customize the short URL",children:[x("title","Title","text",{onChange:({target:P})=>l({...a,title:v(P.value,o.title)})}),!h&&g.jsxs(g.Fragment,{children:[g.jsxs(Qn,{children:[g.jsx("div",{className:"col-lg-6",children:x("customSlug","Custom slug","text",{disabled:gi(a.shortCodeLength)})}),g.jsx("div",{className:"col-lg-6",children:x("shortCodeLength","Short code length","number",{min:4,disabled:gi(a.customSlug)})})]}),g.jsx(t,{value:a.domain,onChange:P=>l({...a,domain:P})})]})]})}),g.jsx("div",{className:"col-sm-6 mb-3",children:g.jsxs(un,{title:"Limit access to the short URL",children:[x("maxVisits","Maximum number of visits allowed","number",{min:1}),g.jsx("div",{className:"mb-3",children:w("validSince","Enabled since...",{maxDate:a.validUntil?z1(a.validUntil):void 0})}),w("validUntil","Enabled until...",{minDate:a.validSince?z1(a.validSince):void 0})]})})]}),g.jsxs(Qn,{children:[g.jsx("div",{className:"col-sm-6 mb-3",children:g.jsxs(un,{title:"Extra checks",children:[g.jsx(B1,{infoTooltip:"If checked, Shlink will try to reach the long URL, failing in case it's not publicly accessible.",checked:a.validateUrl,onChange:P=>l({...a,validateUrl:P}),children:"Validate URL"}),!h&&g.jsxs("p",{children:[g.jsx(q5,{inline:!0,className:"me-2",checked:a.findIfExists,onChange:P=>l({...a,findIfExists:P}),children:"Use existing URL if found"}),g.jsx(wve,{})]})]})}),g.jsx("div",{className:"col-sm-6 mb-3",children:g.jsxs(un,{title:"Configure behavior",children:[g.jsx(B1,{infoTooltip:"This short URL will be included in the robots.txt for your Shlink instance, allowing web crawlers (like Google) to index it.",checked:a.crawlable,onChange:P=>l({...a,crawlable:P}),children:"Make it crawlable"}),T&&g.jsx(B1,{infoTooltip:"When this short URL is visited, any query params appended to it will be forwarded to the long URL.",checked:a.forwardQuery,onChange:P=>l({...a,forwardQuery:P}),children:"Forward query params on redirect"})]})})]})]}),g.jsx("div",{className:"text-center",children:g.jsx(ht,{outline:!0,color:"primary",disabled:r||Wn(a.longUrl),className:"btn-xs-block",children:r?"Saving...":"Save"})})]})},Cve=({startDate:e=null,endDate:t=null,disabled:n=!1,onStartDateChange:r,onEndDateChange:i})=>g.jsxs("div",{className:"row",children:[g.jsx("div",{className:"col-md-6",children:g.jsx(g2,{selected:e,placeholderText:"Since...",isClearable:!0,maxDate:t??void 0,disabled:n,onChange:r})}),g.jsx("div",{className:"col-md-6",children:g.jsx(g2,{className:"mt-2 mt-md-0",selected:t,placeholderText:"Until...",isClearable:!0,minDate:e??void 0,disabled:n,onChange:o=>i(o&&ol(o))})})]}),l8=({onDatesChange:e,initialDateRange:t,defaultText:n,disabled:r,updatable:i=!1})=>{const o=ey(t),[s,a]=V.useState(o?t:void 0),[l,c]=V.useState(o?void 0:t),f=p=>{a(w5(p)?sh:void 0),c(p),e(p)},h=p=>{a(p),c(void 0),e(S5(p))};return i&&xoe(()=>{const p=ey(t);p&&h(t),t&&!p&&f(t)},[t]),g.jsxs(na,{disabled:r,text:$E(s??l)??n,children:[g.jsx(I5,{allText:n,active:s,onChange:h}),g.jsx(Ue,{divider:!0}),g.jsx(Ue,{header:!0,children:"Custom:"}),g.jsx(Ue,{text:!0,children:g.jsx(Cve,{...l,onStartDateChange:p=>f({...l,startDate:p}),onEndDateChange:p=>f({...l,endDate:p})})})]})},Eve=({onChange:e,selected:t={},className:n,supportsDisabledFiltering:r})=>{const{excludeBots:i=!1,excludeMaxVisitsReached:o=!1,excludePastValidUntil:s=!1}=t,a=l=>()=>e({...t,[l]:!(t!=null&&t[l])});return g.jsxs(na,{text:"Filters",dropdownClassName:n,className:"me-3",right:!0,minWidth:250,children:[g.jsx(Ue,{header:!0,children:"Visits:"}),g.jsx(Ue,{active:i,onClick:a("excludeBots"),children:"Ignore visits from bots"}),r&&g.jsxs(g.Fragment,{children:[g.jsx(Ue,{divider:!0}),g.jsx(Ue,{header:!0,children:"Short URLs:"}),g.jsx(Ue,{active:o,onClick:a("excludeMaxVisitsReached"),children:"Exclude with visits reached"}),g.jsx(Ue,{active:s,onClick:a("excludePastValidUntil"),children:"Exclude enabled in the past"})]}),g.jsx(Ue,{divider:!0}),g.jsx(Ue,{disabled:!gi(t),onClick:()=>e({excludeBots:!1,excludeMaxVisitsReached:!1,excludePastValidUntil:!1}),children:g.jsx("i",{children:"Clear filters"})})]})};const Tve=(e,t)=>({selectedServer:n,className:r,shortUrlsAmount:i,order:o,handleOrderBy:s,settings:a})=>{var D;const[l,c]=E_(),{search:f,tags:h,startDate:p,endDate:m,excludeBots:v,excludeMaxVisitsReached:y,excludePastValidUntil:x,tagsMode:_="any"}=l,w=Pi("filterDisabledUrls",n),S=Dt(({startDate:z,endDate:A})=>({startDate:Hs(z)??void 0,endDate:Hs(A)??void 0}),c),T=Dt(z=>Wn(z)?void 0:z,z=>c({search:z})),P=z=>c({tags:z}),k=Pi("allTagsFiltering",n),N=Dt(()=>_==="any"?"all":"any",z=>c({tagsMode:z}));return g.jsxs("div",{className:me("short-urls-filtering-bar-container",r),children:[g.jsx(ih,{initialValue:f,onChange:T}),g.jsxs(Qd,{className:"mt-3",children:[g.jsx(t,{allowNew:!1,placeholder:"With tags...",selectedTags:h,onChange:P}),k&&h.length>1&&g.jsxs(g.Fragment,{children:[g.jsx(ht,{outline:!0,color:"secondary",onClick:N,id:"tagsModeBtn","aria-label":"Change tags mode",children:g.jsx(je,{className:"short-urls-filtering-bar__tags-icon",icon:_==="all"?Zj:cQ})}),g.jsx(Er,{target:"tagsModeBtn",placement:"left",children:_==="all"?"With all the tags.":"With any of the tags."})]})]}),g.jsxs(Qn,{className:"flex-lg-row-reverse",children:[g.jsx("div",{className:"col-lg-8 col-xl-6 mt-3",children:g.jsxs("div",{className:"d-md-flex",children:[g.jsx("div",{className:"flex-fill",children:g.jsx(l8,{defaultText:"All short URLs",initialDateRange:x5(p,m),onDatesChange:S})}),g.jsx(Eve,{className:"ms-0 ms-md-2 mt-3 mt-md-0",selected:{excludeBots:v??((D=a.visits)==null?void 0:D.excludeBots),excludeMaxVisitsReached:y,excludePastValidUntil:x},onChange:c,supportsDisabledFiltering:w})]})}),g.jsx("div",{className:"col-6 col-lg-4 col-xl-6 mt-3",children:g.jsx(e,{amount:i})}),g.jsx("div",{className:"col-6 d-lg-none mt-3",children:g.jsx(fh,{prefixed:!1,items:A5,order:o,onChange:s})})]})]})};function Lf({currentOrder:e,field:t,className:n="ms-1"}){return!e.dir||e.field!==t?null:g.jsx(je,{icon:e.dir==="ASC"?tQ:hQ,className:n})}const Il=2,v2="...",c8=(e,t)=>{const n=rC(pj(Il,e-Il),Tj(t-1,e+Il)+1);return e-Il>Il&&n.unshift(v2),e+Ile===v2,u8=e=>Pd(e)?e:_n(e),f8=(e,t)=>Pd(e)?`${e}_${t}`:`${e}`,Ove=({paginator:e,serverId:t,currentQueryString:n=""})=>{const{currentPage:r=0,pagesCount:i=0}=e??{},o=a=>`/server/${t}/list-short-urls/${a}${n}`;if(i<=1)return g.jsx("div",{className:"pb-3"});const s=()=>c8(r,i).map((a,l)=>g.jsx(ks,{disabled:Pd(a),active:r===a,children:g.jsx(Ms,{tag:Lt,to:o(a),children:u8(a)})},f8(a,l)));return g.jsxs(__,{className:"sticky-card-paginator py-3",listClassName:"flex-wrap justify-content-center mb-0",children:[g.jsx(ks,{disabled:r===1,children:g.jsx(Ms,{previous:!0,tag:Lt,to:o(r-1)})}),s(),g.jsx(ks,{disabled:r>=i,children:g.jsx(Ms,{next:!0,tag:Lt,to:o(r+1)})})]})},Pve=(e,t)=>ra(({listShortUrls:n,shortUrlsList:r,selectedServer:i,settings:o})=>{var Z,ee,ie;const s=Vd(i),{page:a}=Ks(),l=Pn(),[c,f]=E_(),{tags:h,search:p,startDate:m,endDate:v,orderBy:y,tagsMode:x,excludeBots:_,excludePastValidUntil:w,excludeMaxVisitsReached:S}=c,[T,P]=V.useState(y??((Z=o.shortUrlsList)==null?void 0:Z.defaultOrdering)??zE),{pagination:k}=(r==null?void 0:r.shortUrls)??{},N=_??((ee=o.visits)==null?void 0:ee.excludeBots),D=Pi("excludeBotsOnShortUrls",i),z=(oe,G)=>{f({orderBy:{field:oe,dir:G}}),P({field:oe,dir:G})},A=oe=>()=>z(oe,n_(oe,T.field,T.dir)),W=oe=>g.jsx(Lf,{currentOrder:T,field:oe}),Y=Dt(oe=>[...new Set([...h,oe])],oe=>f({tags:oe})),J=({field:oe,dir:G})=>D&&N&&oe==="visits"?{field:"nonBotVisits",dir:G}:{field:oe,dir:G};return V.useEffect(()=>{n({page:a,searchTerm:p,tags:h,startDate:m,endDate:v,orderBy:J(T),tagsMode:x,excludePastValidUntil:w,excludeMaxVisitsReached:S})},[a,p,h,m,v,T.field,T.dir,x,w,S]),g.jsxs(g.Fragment,{children:[g.jsx(t,{selectedServer:i,shortUrlsAmount:(ie=r.shortUrls)==null?void 0:ie.pagination.totalItems,order:T,handleOrderBy:z,settings:o,className:"mb-3"}),g.jsxs(Sr,{body:!0,className:"pb-0",children:[g.jsx(e,{selectedServer:i,shortUrlsList:r,orderByColumn:A,renderOrderIcon:W,onTagClick:Y}),g.jsx(Ove,{paginator:k,serverId:s,currentQueryString:l.search})]})]})},()=>[Xr.visits]);const kve=e=>({orderByColumn:t,renderOrderIcon:n,shortUrlsList:r,onTagClick:i,selectedServer:o,className:s})=>{const{error:a,loading:l,shortUrls:c}=r,f=me({"short-urls-table__header-cell--with-action":!!t}),h=me("short-urls-table__header-cell",f),p=me("table table-hover responsive-table short-urls-table",s),m=()=>a?g.jsx("tr",{children:g.jsx("td",{colSpan:6,className:"text-center table-danger text-dark",children:"Something went wrong while loading short URLs :("})}):l?g.jsx("tr",{children:g.jsx("td",{colSpan:6,className:"text-center",children:"Loading..."})}):!l&&Wn(c==null?void 0:c.data)?g.jsx("tr",{children:g.jsx("td",{colSpan:6,className:"text-center",children:"No results found"})}):c==null?void 0:c.data.map(v=>g.jsx(e,{shortUrl:v,selectedServer:o,onTagClick:i},v.shortUrl));return g.jsxs("table",{className:p,children:[g.jsx("thead",{className:"responsive-table__header short-urls-table__header",children:g.jsxs("tr",{children:[g.jsxs("th",{className:h,onClick:t==null?void 0:t("dateCreated"),children:["Created at ",n==null?void 0:n("dateCreated")]}),g.jsxs("th",{className:h,onClick:t==null?void 0:t("shortCode"),children:["Short URL ",n==null?void 0:n("shortCode")]}),g.jsxs("th",{className:"short-urls-table__header-cell",children:[g.jsxs("span",{className:f,onClick:t==null?void 0:t("title"),children:["Title ",n==null?void 0:n("title")]}),"  /  ",g.jsxs("span",{className:f,onClick:t==null?void 0:t("longUrl"),children:[g.jsx("span",{className:"indivisible",children:"Long URL"})," ",n==null?void 0:n("longUrl")]})]}),g.jsx("th",{className:"short-urls-table__header-cell",children:"Tags"}),g.jsx("th",{className:h,onClick:t==null?void 0:t("visits"),children:g.jsxs("span",{className:"indivisible",children:["Visits ",n==null?void 0:n("visits")]})}),g.jsx("th",{className:"short-urls-table__header-cell",colSpan:2})]})}),g.jsx("tbody",{children:m()})]})},Mve=(e,t)=>{e.serviceFactory("ShortUrlsList",Pve,"ShortUrlsTable","ShortUrlsFilteringBar"),e.decorator("ShortUrlsList",t(["selectedServer","mercureInfo","shortUrlsList","settings"],["listShortUrls","createNewVisits","loadMercureInfo"])),e.serviceFactory("ShortUrlsTable",kve,"ShortUrlsRow"),e.serviceFactory("ShortUrlsRow",sge,"ShortUrlsRowMenu","ColorGenerator","useTimeoutToggle"),e.decorator("ShortUrlsRow",t(["settings"])),e.serviceFactory("ShortUrlsRowMenu",age,"DeleteShortUrlModal","QrCodeModal"),e.serviceFactory("CreateShortUrlResult",Zme,"useTimeoutToggle"),e.serviceFactory("ShortUrlForm",Sve,"TagsSelector","DomainSelector"),e.serviceFactory("CreateShortUrl",Mme,"ShortUrlForm","CreateShortUrlResult"),e.decorator("CreateShortUrl",t(["shortUrlCreation","selectedServer","settings"],["createShortUrl","resetCreateShortUrl"])),e.serviceFactory("EditShortUrl",Rme,"ShortUrlForm"),e.decorator("EditShortUrl",t(["shortUrlDetail","shortUrlEdition","selectedServer","settings"],["getShortUrlDetail","editShortUrl"])),e.serviceFactory("DeleteShortUrlModal",()=>Kme),e.decorator("DeleteShortUrlModal",t(["shortUrlDeletion"],["deleteShortUrl","shortUrlDeleted","resetDeleteShortUrl"])),e.serviceFactory("QrCodeModal",tge,"ImageDownloader"),e.decorator("QrCodeModal",t(["selectedServer"])),e.serviceFactory("ShortUrlsFilteringBar",Tve,"ExportShortUrlsBtn","TagsSelector"),e.serviceFactory("ExportShortUrlsBtn",Xme,"buildShlinkApiClient","ReportExporter"),e.decorator("ExportShortUrlsBtn",t(["selectedServer"])),e.serviceFactory("shortUrlsListReducerCreator",jpe,"listShortUrls","editShortUrl","createShortUrl"),e.serviceFactory("shortUrlsListReducer",at("reducer"),"shortUrlsListReducerCreator"),e.serviceFactory("shortUrlCreationReducerCreator",cge,"createShortUrl"),e.serviceFactory("shortUrlCreationReducer",at("reducer"),"shortUrlCreationReducerCreator"),e.serviceFactory("shortUrlEditionReducerCreator",hge,"editShortUrl"),e.serviceFactory("shortUrlEditionReducer",at("reducer"),"shortUrlEditionReducerCreator"),e.serviceFactory("shortUrlDeletionReducerCreator",Lpe,"deleteShortUrl"),e.serviceFactory("shortUrlDeletionReducer",at("reducer"),"shortUrlDeletionReducerCreator"),e.serviceFactory("shortUrlDetailReducerCreator",uge,"buildShlinkApiClient"),e.serviceFactory("shortUrlDetailReducer",at("reducer"),"shortUrlDetailReducerCreator"),e.serviceFactory("listShortUrls",Ape,"buildShlinkApiClient"),e.serviceFactory("createShortUrl",lge,"buildShlinkApiClient"),e.serviceFactory("resetCreateShortUrl",at("resetCreateShortUrl"),"shortUrlCreationReducerCreator"),e.serviceFactory("deleteShortUrl",Npe,"buildShlinkApiClient"),e.serviceFactory("resetDeleteShortUrl",at("resetDeleteShortUrl"),"shortUrlDeletionReducerCreator"),e.serviceFactory("shortUrlDeleted",()=>k5),e.serviceFactory("getShortUrlDetail",at("getShortUrlDetail"),"shortUrlDetailReducerCreator"),e.serviceFactory("editShortUrl",dge,"buildShlinkApiClient")},Rve=({tag:e,toggle:t,isOpen:n,deleteTag:r,tagDelete:i,tagDeleted:o})=>{const{deleting:s,error:a,deleted:l,errorData:c}=i,f=async()=>{await r(e),t()};return g.jsxs(Uo,{toggle:t,isOpen:n,centered:!0,onClosed:()=>l&&o(e),children:[g.jsx(ro,{toggle:t,className:"text-danger",children:"Delete tag"}),g.jsxs(ki,{children:["Are you sure you want to delete tag ",g.jsx("b",{children:e}),"?",a&&g.jsx(Nr,{type:"error",small:!0,className:"mt-2",children:g.jsx(Lo,{errorData:c,fallbackMessage:"Something went wrong while deleting the tag :("})})]}),g.jsxs(ea,{children:[g.jsx(ht,{color:"link",onClick:t,children:"Cancel"}),g.jsx(ht,{color:"danger",disabled:s,onClick:f,children:s?"Deleting tag...":"Delete tag"})]})]})};function M_(){return(M_=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function y2(e){var t=V.useRef(e),n=V.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var kd=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:x.buttons>0)&&i.current?o(tL(i.current,x,a.current)):y(!1)},v=function(){return y(!1)};function y(x){var _=l.current,w=_2(i.current),S=x?w.addEventListener:w.removeEventListener;S(_?"touchmove":"mousemove",m),S(_?"touchend":"mouseup",v)}return[function(x){var _=x.nativeEvent,w=i.current;if(w&&(nL(_),!function(T,P){return P&&!Df(T)}(_,l.current)&&w)){if(Df(_)){l.current=!0;var S=_.changedTouches||[];S.length&&(a.current=S[0].identifier)}w.focus(),o(tL(w,_,a.current)),y(!0)}},function(x){var _=x.which||x.keyCode;_<37||_>40||(x.preventDefault(),s({left:_===39?.05:_===37?-.05:0,top:_===40?.05:_===38?-.05:0}))},y]},[s,o]),f=c[0],h=c[1],p=c[2];return V.useEffect(function(){return p},[p]),U.createElement("div",M_({},r,{onTouchStart:f,onMouseDown:f,className:"react-colorful__interactive",ref:i,onKeyDown:h,tabIndex:0,role:"slider"}))}),YE=function(e){return e.filter(Boolean).join(" ")},p8=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=YE(["react-colorful__pointer",e.className]);return U.createElement("div",{className:o,style:{top:100*i+"%",left:100*n+"%"}},U.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},Un=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},Nve=function(e){return Ive(b2(e))},b2=function(e){return e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?Un(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?Un(parseInt(e.substring(6,8),16)/255,2):1}},Lve=function(e){return jve(Ave(e))},Dve=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:Un(e.h),s:Un(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:Un(i/2),a:Un(r,2)}},w2=function(e){var t=Dve(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},Ave=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),s=r*(1-n),a=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),c=o%6;return{r:Un(255*[r,a,s,s,l,r][c]),g:Un(255*[l,r,r,a,s,s][c]),b:Un(255*[s,s,l,r,r,a][c]),a:Un(i,2)}},Dp=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},jve=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=i<1?Dp(Un(255*i)):"";return"#"+Dp(t)+Dp(n)+Dp(r)+o},Ive=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),s=o-Math.min(t,n,r),a=s?o===t?(n-r)/s:o===n?2+(r-t)/s:4+(t-n)/s:0;return{h:Un(60*(a<0?a+6:a)),s:Un(o?s/o*100:0),v:Un(o/255*100),a:i}},Fve=U.memo(function(e){var t=e.hue,n=e.onChange,r=YE(["react-colorful__hue",e.className]);return U.createElement("div",{className:r},U.createElement(h8,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:kd(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":Un(t),"aria-valuemax":"360","aria-valuemin":"0"},U.createElement(p8,{className:"react-colorful__hue-pointer",left:t/360,color:w2({h:t,s:100,v:100,a:1})})))}),$ve=U.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:w2({h:t.h,s:100,v:100,a:1})};return U.createElement("div",{className:"react-colorful__saturation",style:r},U.createElement(h8,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:kd(t.s+100*i.left,0,100),v:kd(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+Un(t.s)+"%, Brightness "+Un(t.v)+"%"},U.createElement(p8,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:w2(t)})))}),m8=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},Bve=function(e,t){return e.toLowerCase()===t.toLowerCase()||m8(b2(e),b2(t))};function zve(e,t,n){var r=y2(n),i=V.useState(function(){return e.toHsva(t)}),o=i[0],s=i[1],a=V.useRef({color:t,hsva:o});V.useEffect(function(){if(!e.equal(t,a.current.color)){var c=e.toHsva(t);a.current={hsva:c,color:t},s(c)}},[t,e]),V.useEffect(function(){var c;m8(o,a.current.hsva)||e.equal(c=e.fromHsva(o),a.current.color)||(a.current={hsva:o,color:c},r(c))},[o,e,r]);var l=V.useCallback(function(c){s(function(f){return Object.assign({},f,c)})},[]);return[o,l]}var Uve=typeof window<"u"?V.useLayoutEffect:V.useEffect,Vve=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},rL=new Map,Hve=function(e){Uve(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!rL.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,rL.set(t,n);var r=Vve();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},Wve=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,s=d8(e,["className","colorModel","color","onChange"]),a=V.useRef(null);Hve(a);var l=zve(n,i,o),c=l[0],f=l[1],h=YE(["react-colorful",t]);return U.createElement("div",M_({},s,{ref:a,className:h}),U.createElement($ve,{hsva:c,onChange:f}),U.createElement(Fve,{hue:c.h,onChange:f,className:"react-colorful__last-control"}))},Yve={defaultColor:"000",toHsva:Nve,fromHsva:function(e){return Lve({h:e.h,s:e.s,v:e.v,a:1})},equal:Bve},qve=function(e){return U.createElement(Wve,M_({},e,{colorModel:Yve}))};const Gve=({getColorForKey:e})=>({tag:t,editTag:n,toggle:r,tagEdited:i,isOpen:o,tagEdit:s})=>{const[a,l]=V.useState(t),[c,f]=V.useState(e(t)),[h,p,,m]=It(),{editing:v,error:y,edited:x,errorData:_}=s,w=rh(async()=>{await n({oldName:t,newName:a,color:c}),r()}),S=Dt(m,()=>x&&i({oldName:t,newName:a,color:c}));return g.jsx(Uo,{isOpen:o,toggle:r,centered:!0,onClosed:S,children:g.jsxs("form",{name:"editTag",onSubmit:w,children:[g.jsx(ro,{toggle:r,children:"Edit tag"}),g.jsxs(ki,{children:[g.jsxs(Qd,{children:[g.jsx("div",{id:"colorPickerBtn",className:"input-group-text edit-tag-modal__color-picker-toggle",style:{backgroundColor:c,borderColor:c},onClick:p,children:g.jsx(je,{icon:nQ,className:"edit-tag-modal__color-icon"})}),g.jsx(Kd,{isOpen:h,toggle:p,target:"colorPickerBtn",placement:"right",hideArrow:!0,popperClassName:"edit-tag-modal__popover",children:g.jsx(qve,{color:c,onChange:f})}),g.jsx($c,{value:a,placeholder:"Tag",required:!0,onChange:({target:T})=>l(T.value)})]}),y&&g.jsx(Nr,{type:"error",small:!0,className:"mt-2",children:g.jsx(Lo,{errorData:_,fallbackMessage:"Something went wrong while editing the tag :("})})]}),g.jsxs(ea,{children:[g.jsx(ht,{type:"button",color:"link",onClick:r,children:"Cancel"}),g.jsx(ht,{color:"primary",disabled:v,children:v?"Saving...":"Save"})]})]})})};function Zve(e){return U.createElement("button",{type:"button",className:e.classNames.selectedTag,title:e.removeButtonText,onClick:e.onDelete},U.createElement("span",{className:e.classNames.selectedTagName},e.tag.name))}const Kve={position:"absolute",width:0,height:0,visibility:"hidden",overflow:"scroll",whiteSpace:"pre"},Xve=["fontSize","fontFamily","fontWeight","fontStyle","letterSpacing","textTransform"];class Qve extends U.Component{constructor(t){super(t),this.state={inputWidth:null},this.input=U.createRef(),this.sizer=U.createRef()}componentDidMount(){this.props.autoresize&&(this.copyInputStyles(),this.updateInputWidth())}componentDidUpdate({query:t,placeholderText:n}){(t!==this.props.query||n!==this.props.placeholderText)&&this.updateInputWidth()}copyInputStyles(){const t=window.getComputedStyle(this.input.current);Xve.forEach(n=>{this.sizer.current.style[n]=t[n]})}updateInputWidth(){let t;this.props.autoresize&&(t=Math.ceil(this.sizer.current.scrollWidth)+2),t!==this.state.inputWidth&&this.setState({inputWidth:t})}render(){const{id:t,query:n,ariaLabelText:r,placeholderText:i,expanded:o,classNames:s,inputAttributes:a,inputEventHandlers:l,index:c}=this.props;return U.createElement("div",{className:s.searchWrapper},U.createElement("input",Object.assign({},a,l,{ref:this.input,value:n,placeholder:i,className:s.searchInput,role:"combobox","aria-autocomplete":"list","aria-label":r||i,"aria-owns":t,"aria-activedescendant":c>-1?`${t}-${c}`:null,"aria-expanded":o,style:{width:this.state.inputWidth}})),U.createElement("div",{ref:this.sizer,style:Kve},n||i))}}function qE(e){return e.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")}function Jve(e){return new RegExp(qE(e),"gi")}function eye(e){return new RegExp(`(?:^|\\s)${qE(e)}`,"i")}function tye(e){return new RegExp(`^${qE(e)}$`,"i")}function nye(e,t){const n=Jve(t);return e.replace(n,"$&")}function rye({item:e,query:t}){return U.createElement("span",{dangerouslySetInnerHTML:{__html:nye(e.name,t)}})}function iye(e){const t=e.suggestionComponent||rye,n=e.options.map((r,i)=>{const o=`${e.id}-${i}`,s=[];return e.index===i&&s.push(e.classNames.suggestionActive),r.disabled&&s.push(e.classNames.suggestionDisabled),U.createElement("li",{id:o,key:o,role:"option",className:s.join(" "),"aria-disabled":!!r.disabled,onMouseDown:a=>a.preventDefault(),onClick:()=>e.addTag(r)},r.prefix?U.createElement("span",{className:e.classNames.suggestionPrefix},r.prefix," "):null,r.disableMarkIt?r.name:U.createElement(t,{item:r,query:e.query}))});return U.createElement("div",{className:e.classNames.suggestions},U.createElement("ul",{role:"listbox",id:e.id},n))}function oye(e,t){const n=e.querySelectorAll("a,button,input"),r=Array.prototype.findIndex.call(n,o=>o===t),i=n[r-1]||n[r+1];i&&i.focus()}const ka={ENTER:"Enter",TAB:"Tab",BACKSPACE:"Backspace",UP_ARROW:"ArrowUp",UP_ARROW_COMPAT:"Up",DOWN_ARROW:"ArrowDown",DOWN_ARROW_COMPAT:"Down"},g8={root:"react-tags",rootFocused:"is-focused",selected:"react-tags__selected",selectedTag:"react-tags__selected-tag",selectedTagName:"react-tags__selected-tag-name",search:"react-tags__search",searchWrapper:"react-tags__search-wrapper",searchInput:"react-tags__search-input",suggestions:"react-tags__suggestions",suggestionActive:"is-active",suggestionDisabled:"is-disabled",suggestionPrefix:"react-tags__suggestion-prefix"};function v8(e,t){return e.findIndex(n=>tye(t).test(n.name))}function U1(){if(this.state.query.length>=this.props.minQueryLength){const e=v8(this.state.options,this.state.query),t=this.state.index===-1?e:this.state.index,n=t>-1?this.state.options[t]:null;n?this.addTag(n):this.props.allowNew&&this.addTag({name:this.state.query})}}function sye(e){e.preventDefault();const t=this.state.options.length-1;this.setState({index:this.state.index<=0?t:this.state.index-1})}function aye(e){e.preventDefault();const t=this.state.options.length-1;this.setState({index:this.state.index>=t?0:this.state.index+1})}function lye(){this.state.query.length||this.deleteTag(this.props.tags.length-1)}function cye(e,t){return eye(t).test(e.name)}function uye(e,t){let n;return e.suggestionsTransform?n=e.suggestionsTransform(t.query,e.suggestions):n=e.suggestions.filter(r=>e.suggestionsFilter(r,t.query)),n=n.slice(0,e.maxSuggestionsLength),e.allowNew&&e.newTagText&&v8(n,t.query)===-1?n.push({id:0,name:t.query,prefix:e.newTagText,disableMarkIt:!0}):e.noSuggestionsText&&n.length===0&&n.push({id:0,name:e.noSuggestionsText,disabled:!0,disableMarkIt:!0}),n}class GE extends U.Component{constructor(t){super(t),this.state={query:"",focused:!1,index:-1},this.inputEventHandlers={onChange:()=>{},onBlur:this.onBlur.bind(this),onFocus:this.onFocus.bind(this),onInput:this.onInput.bind(this),onKeyDown:this.onKeyDown.bind(this)},this.container=U.createRef(),this.input=U.createRef()}onInput(t){const n=t.target.value;this.props.onInput&&this.props.onInput(n),n.length===this.state.query.length+1&&this.props.delimiters.indexOf(n.slice(-1))>-1?U1.call(this):n!==this.state.query&&this.setState({query:n})}onKeyDown(t){this.props.delimiters.indexOf(t.key)>-1&&((this.state.query||this.state.index>-1)&&t.preventDefault(),U1.call(this)),t.key===ka.BACKSPACE&&this.props.allowBackspace&&lye.call(this,t),(t.key===ka.UP_ARROW||t.key===ka.UP_ARROW_COMPAT)&&sye.call(this,t),(t.key===ka.DOWN_ARROW||t.key===ka.DOWN_ARROW_COMPAT)&&aye.call(this,t)}onClick(t){document.activeElement!==t.target&&this.focusInput()}onBlur(){this.setState({focused:!1,index:-1}),this.props.onBlur&&this.props.onBlur(),this.props.addOnBlur&&U1.call(this)}onFocus(){this.setState({focused:!0}),this.props.onFocus&&this.props.onFocus()}onDeleteTag(t,n){this.container.current&&oye(this.container.current,n.currentTarget),this.deleteTag(t)}addTag(t){t.disabled||typeof this.props.onValidate=="function"&&!this.props.onValidate(t)||(this.props.onAddition({id:t.id,name:t.name}),this.clearInput())}deleteTag(t){this.props.onDelete(t)}clearInput(){this.setState({query:"",index:-1})}clearSelectedIndex(){this.setState({index:-1})}focusInput(){this.input.current&&this.input.current.input.current&&this.input.current.input.current.focus()}render(){const t=this.props.tagComponent||Zve,n=this.state.focused&&this.state.query.length>=this.props.minQueryLength,r=Object.assign({},g8,this.props.classNames),i=[r.root];return this.state.focused&&i.push(r.rootFocused),U.createElement("div",{ref:this.container,className:i.join(" "),onClick:this.onClick.bind(this)},U.createElement("div",{className:r.selected,"aria-relevant":"additions removals","aria-live":"polite"},this.props.tags.map((o,s)=>U.createElement(t,{key:s,tag:o,removeButtonText:this.props.removeButtonText,classNames:r,onDelete:this.onDeleteTag.bind(this,s)}))),U.createElement("div",{className:r.search},U.createElement(Qve,Object.assign({},this.state,{id:this.props.id,ref:this.input,classNames:r,inputAttributes:this.props.inputAttributes,inputEventHandlers:this.inputEventHandlers,autoresize:this.props.autoresize,expanded:n,placeholderText:this.props.placeholderText,ariaLabelText:this.props.ariaLabelText})),n&&this.state.options.length?U.createElement(iye,Object.assign({},this.state,{id:this.props.id,classNames:r,expanded:n,addTag:this.addTag.bind(this),suggestionComponent:this.props.suggestionComponent})):null))}static getDerivedStateFromProps(t,n){return n.prevQuery!==n.query||n.prevSuggestions!==t.suggestions?{prevQuery:n.query,prevSuggestions:t.suggestions,options:uye(t,n)}:null}}GE.defaultProps={id:"ReactTags",tags:[],placeholderText:"Add new tag",removeButtonText:"Click to remove tag",noSuggestionsText:null,newTagText:null,suggestions:[],suggestionsFilter:cye,suggestionsTransform:null,autoresize:!0,classNames:g8,delimiters:[ka.TAB,ka.ENTER],minQueryLength:2,maxSuggestionsLength:6,allowNew:!1,allowBackspace:!0,addOnBlur:!1,tagComponent:null,suggestionComponent:null,inputAttributes:{}};GE.propTypes={id:C.string,tags:C.arrayOf(C.object),placeholderText:C.string,ariaLabelText:C.string,removeButtonText:C.string,noSuggestionsText:C.string,newTagText:C.string,suggestions:C.arrayOf(C.object),suggestionsFilter:C.func,suggestionsTransform:C.func,autoresize:C.bool,delimiters:C.arrayOf(C.string),onDelete:C.func.isRequired,onAddition:C.func.isRequired,onInput:C.func,onFocus:C.func,onBlur:C.func,onValidate:C.func,minQueryLength:C.number,maxSuggestionsLength:C.number,classNames:C.object,allowNew:C.bool,allowBackspace:C.bool,addOnBlur:C.bool,tagComponent:C.oneOfType([C.func,C.element]),suggestionComponent:C.oneOfType([C.func,C.element]),inputAttributes:C.object};const y8=({tag:e,colorGenerator:t})=>g.jsx("div",{style:{backgroundColor:t.getColorForKey(e)},className:"tag-bullet"}),iL=e=>({id:e,name:e}),fye=e=>({selectedTags:t,onChange:n,placeholder:r,listTags:i,tagsList:o,settings:s,allowNew:a=!0})=>{var h;V.useEffect(()=>{i()},[]);const l=((h=s.shortUrlCreation)==null?void 0:h.tagFilteringMode)??"startsWith",c=({tag:p,onDelete:m})=>g.jsx(VE,{colorGenerator:e,text:p.name,clearable:!0,className:"react-tags__tag",onClose:m}),f=({item:p})=>g.jsxs(g.Fragment,{children:[g.jsx(y8,{tag:`${p.name}`,colorGenerator:e}),p.name]});return g.jsx(GE,{tags:t.map(iL),tagComponent:c,suggestions:o.tags.filter(p=>!t.includes(p)).map(iL),suggestionComponent:f,allowNew:a,addOnBlur:!0,placeholderText:r??"Add tags to the URL",minQueryLength:1,delimiters:["Enter","Tab",","],suggestionsTransform:l==="includes"?(p,m)=>m.filter(({name:v})=>v.includes(p)):void 0,onDelete:p=>{const m=[...t];m.splice(p,1),n(m)},onAddition:({name:p})=>n([...new Set([...t,...p.toLowerCase().split(",")])])})},x2="shlink/tagDelete",dye={deleting:!1,deleted:!1,error:!1},_8=yn(`${x2}/tagDeleted`),hye=e=>{const t=rr(`${x2}/deleteTag`,async(r,{getState:i})=>{const{deleteTags:o}=e(i);await o([r])}),{reducer:n}=Yn({name:x2,initialState:dye,reducers:{},extraReducers:r=>{r.addCase(t.pending,()=>({deleting:!0,deleted:!1,error:!1})),r.addCase(t.rejected,(i,{error:o})=>({deleting:!1,deleted:!1,error:!0,errorData:no(o)})),r.addCase(t.fulfilled,()=>({deleting:!1,deleted:!0,error:!1}))}});return{reducer:n,deleteTag:t}},ZE="shlink/tagEdit",pye={editing:!1,edited:!1,error:!1},b8=yn(`${ZE}/tagEdited`),mye=(e,t)=>rr(`${ZE}/editTag`,async({oldName:n,newName:r,color:i},{getState:o})=>(await e(o).editTag(n,r),t.setColorForKey(r,i),{oldName:n,newName:r,color:i})),gye=e=>Yn({name:ZE,initialState:pye,reducers:{},extraReducers:t=>{t.addCase(e.pending,()=>({editing:!0,edited:!1,error:!1})),t.addCase(e.rejected,(n,{error:r})=>({editing:!1,edited:!1,error:!0,errorData:no(r)})),t.addCase(e.fulfilled,(n,{payload:r})=>({...Oj(["oldName","newName"],r),editing:!1,edited:!0,error:!1}))}}),KE="shlink/tagsList",V1={tags:[],filteredTags:[],stats:{},loading:!1,error:!1},oL=(e,t)=>n=>n===e?t:n,sL=(e,t)=>Ud(n=>n===t,e),vye=(e,t)=>e.reduce((n,[r,i])=>{if(!n[r])return n;const{bots:o,nonBots:s}=i,a=n[r];return{...n,[r]:{...a,visitsSummary:a.visitsSummary&&{total:a.visitsSummary.total+o+s,bots:a.visitsSummary.bots+o,nonBots:a.visitsSummary.nonBots+s},visitsCount:a.visitsCount+o+s}}},{...t}),yye=e=>Object.entries(e.reduce((t,{shortUrl:n,visit:r})=>(n==null||n.tags.forEach(i=>{t[i]||(t[i]={bots:0,nonBots:0}),r.potentialBot?t[i].bots+=1:t[i].nonBots+=1}),t),{})),_ye=(e,t=!0)=>rr(`${KE}/listTags`,async(n,{getState:r})=>{const{tagsList:i,selectedServer:o}=r();if(!t&&!Wn(i.tags))return i;const{listTags:s,tagsStats:a}=e(r),{tags:l,stats:c}=await(xE.tagsStats(o)?a():s()),f=c.reduce((h,{tag:p,...m})=>(h[p]=m,h),{});return{tags:l,stats:f}}),w8=yn(`${KE}/filterTags`),bye=(e,t)=>Yn({name:KE,initialState:V1,reducers:{},extraReducers:n=>{n.addCase(w8,(r,{payload:i})=>({...r,filteredTags:r.tags.filter(o=>o.toLowerCase().match(i.toLowerCase()))})),n.addCase(e.pending,r=>({...r,loading:!0,error:!1})),n.addCase(e.rejected,(r,{error:i})=>({...V1,error:!0,errorData:no(i)})),n.addCase(e.fulfilled,(r,{payload:i})=>({...V1,stats:i.stats,tags:i.tags,filteredTags:i.tags})),n.addCase(_8,({tags:r,filteredTags:i,...o},{payload:s})=>({...o,tags:sL(r,s),filteredTags:sL(i,s)})),n.addCase(b8,({tags:r,filteredTags:i,stats:o,...s},{payload:a})=>({...s,stats:{...o,[a.newName]:o[a.oldName]},tags:r.map(oL(a.oldName,a.newName)).sort(),filteredTags:i.map(oL(a.oldName,a.newName)).sort()})),n.addCase(ah,(r,{payload:i})=>({...r,stats:vye(yye(i.createdVisits),r.stats)})),n.addCase(t.fulfilled,({tags:r,...i},{payload:o})=>({...i,tags:r.concat(o.tags.filter(s=>!r.includes(s)))}))}}),wye=e=>ra(({filterTags:t,forceListTags:n,tagsList:r,selectedServer:i,settings:o})=>{var h;const[s,a]=V.useState(((h=o.tags)==null?void 0:h.defaultOrdering)??{}),l=Dt(()=>r.filteredTags.map(p=>{var y,x,_;const m=r.stats[p],v=((y=o.visits)!=null&&y.excludeBots?(x=m==null?void 0:m.visitsSummary)==null?void 0:x.nonBots:(_=m==null?void 0:m.visitsSummary)==null?void 0:_.total)??(m==null?void 0:m.visitsCount)??0;return{tag:p,visits:v,shortUrls:(m==null?void 0:m.shortUrlsCount)??0}}),p=>kj(p,s));if(V.useEffect(()=>{n()},[]),r.loading)return g.jsx(So,{loading:!0});if(r.error)return g.jsx(Nr,{type:"error",children:g.jsx(Lo,{errorData:r.errorData,fallbackMessage:"Error loading tags :("})});const c=p=>()=>{const m=n_(p,s.field,s.dir);a({field:m?p:void 0,dir:m})},f=()=>{if(r.filteredTags.length<1)return g.jsx(So,{children:"No tags found"});const p=l();return g.jsx(e,{sortedTags:p,selectedServer:i,currentOrder:s,orderByColumn:c})};return g.jsxs(g.Fragment,{children:[g.jsx(ih,{className:"mb-3",onChange:t}),g.jsx(Qn,{className:"mb-3",children:g.jsx("div",{className:"col-lg-6 offset-lg-6",children:g.jsx(fh,{items:j5,order:s,onChange:(p,m)=>a({field:p,dir:m})})})}),f()]})},()=>[Xr.visits]);const XE=({pagesCount:e,currentPage:t,setCurrentPage:n,centered:r=!0})=>{if(e<2)return null;const i=o=>()=>!Pd(o)&&n(o);return g.jsxs(__,{listClassName:me("flex-wrap mb-0 simple-paginator",{"justify-content-center":r}),children:[g.jsx(ks,{disabled:t<=1,children:g.jsx(Ms,{previous:!0,tag:"span",onClick:i(t-1)})}),c8(t,e).map((o,s)=>g.jsx(ks,{disabled:Pd(o),active:t===o,children:g.jsx(Ms,{role:"link",tag:"span",onClick:i(o),children:u8(o)})},f8(o,s))),g.jsx(ks,{disabled:t>=e,children:g.jsx(Ms,{next:!0,tag:"span",onClick:i(t+1)})})]})};const xye=20,Sye=e=>({sortedTags:t,selectedServer:n,orderByColumn:r,currentOrder:i})=>{const o=V.useRef(!0),{search:s}=Pn(),{page:a=1}=dl(s),[l,c]=woe("page",Number(a)),f=cd(xye,t),h=f.length>1,p=f[l-1]??[];return V.useEffect(()=>{!o.current&&c(1),o.current=!1},[t]),V.useEffect(()=>{scrollTo(0,0)},[l]),g.jsxs(un,{bodyClassName:h?"pb-1":"",children:[g.jsxs("table",{className:"table table-hover responsive-table mb-0",children:[g.jsxs("thead",{className:"responsive-table__header",children:[g.jsxs("tr",{children:[g.jsxs("th",{className:"tags-table__header-cell",onClick:r("tag"),children:["Tag ",g.jsx(Lf,{currentOrder:i,field:"tag"})]}),g.jsxs("th",{className:"tags-table__header-cell text-lg-end",onClick:r("shortUrls"),children:["Short URLs ",g.jsx(Lf,{currentOrder:i,field:"shortUrls"})]}),g.jsxs("th",{className:"tags-table__header-cell text-lg-end",onClick:r("visits"),children:["Visits ",g.jsx(Lf,{currentOrder:i,field:"visits"})]}),g.jsx("th",{"aria-label":"Options",className:"tags-table__header-cell"})]}),g.jsx("tr",{children:g.jsx("th",{"aria-label":"Separator",colSpan:4,className:"p-0 border-top-0"})})]}),g.jsxs("tbody",{children:[p.length===0&&g.jsx("tr",{children:g.jsx("td",{colSpan:4,className:"text-center",children:"No results found"})}),p.map(m=>g.jsx(e,{tag:m,selectedServer:n},m.tag))]})]}),h&&g.jsx("div",{className:"sticky-card-paginator",children:g.jsx(XE,{pagesCount:f.length,currentPage:l,setCurrentPage:c})})]},l)},Cye=(e,t,n)=>({tag:r,selectedServer:i})=>{const[o,s]=It(),[a,l]=It(),[c,f]=It(),h=Vd(i);return g.jsxs("tr",{className:"responsive-table__row",children:[g.jsxs("th",{className:"responsive-table__cell","data-th":"Tag",children:[g.jsx(y8,{tag:r.tag,colorGenerator:n})," ",r.tag]}),g.jsx("td",{className:"responsive-table__cell text-lg-end","data-th":"Short URLs",children:g.jsx(Lt,{to:`/server/${h}/list-short-urls/1?tags=${encodeURIComponent(r.tag)}`,children:_n(r.shortUrls)})}),g.jsx("td",{className:"responsive-table__cell text-lg-end","data-th":"Visits",children:g.jsx(Lt,{to:`/server/${h}/tag/${r.tag}/visits`,children:_n(r.visits)})}),g.jsx("td",{className:"responsive-table__cell text-lg-end",children:g.jsxs(x_,{toggle:f,isOpen:c,children:[g.jsxs(Ue,{onClick:l,children:[g.jsx(je,{icon:HX,fixedWidth:!0,className:"me-1"})," Edit"]}),g.jsxs(Ue,{onClick:s,children:[g.jsx(je,{icon:sQ,fixedWidth:!0,className:"me-1"})," Delete"]})]})}),g.jsx(t,{tag:r.tag,toggle:l,isOpen:a}),g.jsx(e,{tag:r.tag,toggle:s,isOpen:o})]})},Eye=(e,t)=>{e.serviceFactory("TagsSelector",fye,"ColorGenerator"),e.decorator("TagsSelector",t(["tagsList","settings"],["listTags"])),e.serviceFactory("DeleteTagConfirmModal",()=>Rve),e.decorator("DeleteTagConfirmModal",t(["tagDelete"],["deleteTag","tagDeleted"])),e.serviceFactory("EditTagModal",Gve,"ColorGenerator"),e.decorator("EditTagModal",t(["tagEdit"],["editTag","tagEdited"])),e.serviceFactory("TagsTableRow",Cye,"DeleteTagConfirmModal","EditTagModal","ColorGenerator"),e.decorator("TagsTableRow",t(["settings"])),e.serviceFactory("TagsTable",Sye,"TagsTableRow"),e.serviceFactory("TagsList",wye,"TagsTable"),e.decorator("TagsList",t(["tagsList","selectedServer","mercureInfo","settings"],["forceListTags","filterTags","createNewVisits","loadMercureInfo"])),e.serviceFactory("tagEditReducerCreator",gye,"editTag"),e.serviceFactory("tagEditReducer",at("reducer"),"tagEditReducerCreator"),e.serviceFactory("tagDeleteReducerCreator",hye,"buildShlinkApiClient"),e.serviceFactory("tagDeleteReducer",at("reducer"),"tagDeleteReducerCreator"),e.serviceFactory("tagsListReducerCreator",bye,"listTags","createShortUrl"),e.serviceFactory("tagsListReducer",at("reducer"),"tagsListReducerCreator");const n=r=>({buildShlinkApiClient:i})=>_ye(i,r);e.factory("listTags",n(!1)),e.factory("forceListTags",n(!0)),e.serviceFactory("filterTags",()=>w8),e.serviceFactory("deleteTag",at("deleteTag"),"tagDeleteReducerCreator"),e.serviceFactory("tagDeleted",()=>_8),e.serviceFactory("editTag",mye,"buildShlinkApiClient","ColorGenerator"),e.serviceFactory("tagEdited",()=>b8)};var Tye="Expected a function",x8="__lodash_hash_undefined__",S8=1/0,Oye="[object Function]",Pye="[object GeneratorFunction]",kye="[object Symbol]",Mye=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Rye=/^\w*$/,Nye=/^\./,Lye=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Dye=/[\\^$.*+?()[\]{}|]/g,Aye=/\\(\\)?/g,jye=/^\[object .+?Constructor\]$/,Iye=typeof zl=="object"&&zl&&zl.Object===Object&&zl,Fye=typeof self=="object"&&self&&self.Object===Object&&self,QE=Iye||Fye||Function("return this")();function $ye(e,t){return e==null?void 0:e[t]}function Bye(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var zye=Array.prototype,Uye=Function.prototype,C8=Object.prototype,H1=QE["__core-js_shared__"],aL=function(){var e=/[^.]+$/.exec(H1&&H1.keys&&H1.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),E8=Uye.toString,JE=C8.hasOwnProperty,T8=C8.toString,Vye=RegExp("^"+E8.call(JE).replace(Dye,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),lL=QE.Symbol,Hye=zye.splice,Wye=O8(QE,"Map"),Md=O8(Object,"create"),cL=lL?lL.prototype:void 0,uL=cL?cL.toString:void 0;function al(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1}function t_e(e,t){var n=this.__data__,r=R_(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}su.prototype.clear=Xye;su.prototype.delete=Qye;su.prototype.get=Jye;su.prototype.has=e_e;su.prototype.set=t_e;function gl(e){var t=-1,n=e?e.length:0;for(this.clear();++tt.toFixed(e.decimals).replace(".",e.separator):t=>`${t}`.replace(".",e.separator):e.decimals?t=>t.toFixed(e.decimals):t=>`${t}`}function nT(e={}){const t=typeof e.quote=="string"?e.quote:'"',n=typeof e.escapedQuote=="string"?e.escapedQuote:`${t}${t}`;return!t||t===n?r=>r:r=>(r.includes(t)&&(r=r.replace(new RegExp(t,"g"),n)),`${t}${r}${t}`)}function S_e(e={stringFormatter:nT()}){return t=>e.stringFormatter(t.toString().slice(7,-1))}function C_e(e={stringFormatter:nT()}){return t=>t===null||(t=JSON.stringify(t),t===void 0)?"":(t[0]==='"'&&(t=t.replace(/^"(.+)"$/,"$1")),e.stringFormatter(t))}function dL(e,t,n){const r=e[t];return r===void 0?n:r}function M8(e,t){try{return Array.isArray(t)?e.push(...t):e.push(t),e}catch{return e.concat(t)}}function S2(e,t){let n=!0;return e.reduce((r,i)=>(i==null&&(i=""),n?(n=!1,`${i}`):`${r}${t}${i}`),"")}class E_e{constructor(t){this.opts=this.preprocessOpts(t)}preprocessOpts(t){const n=Object.assign({},t);n.fields&&(n.fields=this.preprocessFieldsInfo(n.fields,n.defaultValue)),n.transforms=n.transforms||[];const r=n.formatters&&n.formatters.string||nT(),i=C_e({stringFormatter:r}),o={header:r,undefined:W1,boolean:W1,number:x_e(),bigint:W1,string:r,symbol:S_e({stringFormatter:r}),function:i,object:i};return n.formatters={...o,...n.formatters},n.delimiter=n.delimiter||",",n.eol=n.eol||` -`,n.header=n.header!==!1,n.includeEmptyRows=n.includeEmptyRows||!1,n.withBOM=n.withBOM||!1,n}preprocessFieldsInfo(t,n){return t.map(r=>{if(typeof r=="string")return{label:r,value:r.includes(".")||r.includes("[")?i=>fL(i,r,n):i=>dL(i,r,n)};if(typeof r=="object"){const i="default"in r?r.default:n;if(typeof r.value=="string")return{label:r.label||r.value,value:r.value.includes(".")||r.value.includes("[")?o=>fL(o,r.value,i):o=>dL(o,r.value,i)};if(typeof r.value=="function"){const o=r.label||r.value.name||"",s={label:o,default:i};return{label:o,value(a){const l=r.value(a,s);return l??i}}}}throw new Error("Invalid field info option. "+JSON.stringify(r))})}getHeader(){return S2(this.opts.fields.map(t=>this.opts.formatters.header(t.label)),this.opts.delimiter)}preprocessRow(t){return this.opts.transforms.reduce((n,r)=>n.map(i=>r(i)).reduce(M8,[]),[t])}processRow(t){if(!t)return;const n=this.opts.fields.map(r=>this.processCell(t,r));if(!(!this.opts.includeEmptyRows&&n.every(r=>r==="")))return S2(n,this.opts.delimiter)}processCell(t,n){return this.processValue(n.value(t))}processValue(t){return this.opts.formatters[typeof t](t)}}class T_e extends E_e{constructor(t){super(t)}parse(t){const n=this.preprocessData(t);this.opts.fields=this.opts.fields||this.preprocessFieldsInfo(n.reduce((s,a)=>(Object.keys(a).forEach(l=>{s.includes(l)||s.push(l)}),s),[]));const r=this.opts.header?this.getHeader():"",i=this.processData(n);return(this.opts.withBOM?"\uFEFF":"")+r+(r&&i?this.opts.eol:"")+i}preprocessData(t){const n=Array.isArray(t)?t:[t];if(!this.opts.fields&&(n.length===0||typeof n[0]!="object"))throw new Error('Data should not be empty or the "fields" option should be included');return this.opts.transforms.length===0?n:n.map(r=>this.preprocessRow(r)).reduce(M8,[])}processData(t){return S2(t.map(n=>this.processRow(n)).filter(n=>n),this.opts.eol)}}var xn;(function(e){e[e.BACKSPACE=8]="BACKSPACE",e[e.FORM_FEED=12]="FORM_FEED",e[e.NEWLINE=10]="NEWLINE",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.TAB=9]="TAB",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.NUMBER_SIGN=35]="NUMBER_SIGN",e[e.DOLLAR_SIGN=36]="DOLLAR_SIGN",e[e.PERCENT_SIGN=37]="PERCENT_SIGN",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.LEFT_PARENTHESIS=40]="LEFT_PARENTHESIS",e[e.RIGHT_PARENTHESIS=41]="RIGHT_PARENTHESIS",e[e.ASTERISK=42]="ASTERISK",e[e.PLUS_SIGN=43]="PLUS_SIGN",e[e.COMMA=44]="COMMA",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.FULL_STOP=46]="FULL_STOP",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_ZERO=48]="DIGIT_ZERO",e[e.DIGIT_ONE=49]="DIGIT_ONE",e[e.DIGIT_TWO=50]="DIGIT_TWO",e[e.DIGIT_THREE=51]="DIGIT_THREE",e[e.DIGIT_FOUR=52]="DIGIT_FOUR",e[e.DIGIT_FIVE=53]="DIGIT_FIVE",e[e.DIGIT_SIX=54]="DIGIT_SIX",e[e.DIGIT_SEVEN=55]="DIGIT_SEVEN",e[e.DIGIT_EIGHT=56]="DIGIT_EIGHT",e[e.DIGIT_NINE=57]="DIGIT_NINE",e[e.COLON=58]="COLON",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.COMMERCIAL_AT=64]="COMMERCIAL_AT",e[e.LATIN_CAPITAL_LETTER_A=65]="LATIN_CAPITAL_LETTER_A",e[e.LATIN_CAPITAL_LETTER_B=66]="LATIN_CAPITAL_LETTER_B",e[e.LATIN_CAPITAL_LETTER_C=67]="LATIN_CAPITAL_LETTER_C",e[e.LATIN_CAPITAL_LETTER_D=68]="LATIN_CAPITAL_LETTER_D",e[e.LATIN_CAPITAL_LETTER_E=69]="LATIN_CAPITAL_LETTER_E",e[e.LATIN_CAPITAL_LETTER_F=70]="LATIN_CAPITAL_LETTER_F",e[e.LATIN_CAPITAL_LETTER_G=71]="LATIN_CAPITAL_LETTER_G",e[e.LATIN_CAPITAL_LETTER_H=72]="LATIN_CAPITAL_LETTER_H",e[e.LATIN_CAPITAL_LETTER_I=73]="LATIN_CAPITAL_LETTER_I",e[e.LATIN_CAPITAL_LETTER_J=74]="LATIN_CAPITAL_LETTER_J",e[e.LATIN_CAPITAL_LETTER_K=75]="LATIN_CAPITAL_LETTER_K",e[e.LATIN_CAPITAL_LETTER_L=76]="LATIN_CAPITAL_LETTER_L",e[e.LATIN_CAPITAL_LETTER_M=77]="LATIN_CAPITAL_LETTER_M",e[e.LATIN_CAPITAL_LETTER_N=78]="LATIN_CAPITAL_LETTER_N",e[e.LATIN_CAPITAL_LETTER_O=79]="LATIN_CAPITAL_LETTER_O",e[e.LATIN_CAPITAL_LETTER_P=80]="LATIN_CAPITAL_LETTER_P",e[e.LATIN_CAPITAL_LETTER_Q=81]="LATIN_CAPITAL_LETTER_Q",e[e.LATIN_CAPITAL_LETTER_R=82]="LATIN_CAPITAL_LETTER_R",e[e.LATIN_CAPITAL_LETTER_S=83]="LATIN_CAPITAL_LETTER_S",e[e.LATIN_CAPITAL_LETTER_T=84]="LATIN_CAPITAL_LETTER_T",e[e.LATIN_CAPITAL_LETTER_U=85]="LATIN_CAPITAL_LETTER_U",e[e.LATIN_CAPITAL_LETTER_V=86]="LATIN_CAPITAL_LETTER_V",e[e.LATIN_CAPITAL_LETTER_W=87]="LATIN_CAPITAL_LETTER_W",e[e.LATIN_CAPITAL_LETTER_X=88]="LATIN_CAPITAL_LETTER_X",e[e.LATIN_CAPITAL_LETTER_Y=89]="LATIN_CAPITAL_LETTER_Y",e[e.LATIN_CAPITAL_LETTER_Z=90]="LATIN_CAPITAL_LETTER_Z",e[e.LEFT_SQUARE_BRACKET=91]="LEFT_SQUARE_BRACKET",e[e.REVERSE_SOLIDUS=92]="REVERSE_SOLIDUS",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.CIRCUMFLEX_ACCENT=94]="CIRCUMFLEX_ACCENT",e[e.LOW_LINE=95]="LOW_LINE",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_LETTER_A=97]="LATIN_SMALL_LETTER_A",e[e.LATIN_SMALL_LETTER_B=98]="LATIN_SMALL_LETTER_B",e[e.LATIN_SMALL_LETTER_C=99]="LATIN_SMALL_LETTER_C",e[e.LATIN_SMALL_LETTER_D=100]="LATIN_SMALL_LETTER_D",e[e.LATIN_SMALL_LETTER_E=101]="LATIN_SMALL_LETTER_E",e[e.LATIN_SMALL_LETTER_F=102]="LATIN_SMALL_LETTER_F",e[e.LATIN_SMALL_LETTER_G=103]="LATIN_SMALL_LETTER_G",e[e.LATIN_SMALL_LETTER_H=104]="LATIN_SMALL_LETTER_H",e[e.LATIN_SMALL_LETTER_I=105]="LATIN_SMALL_LETTER_I",e[e.LATIN_SMALL_LETTER_J=106]="LATIN_SMALL_LETTER_J",e[e.LATIN_SMALL_LETTER_K=107]="LATIN_SMALL_LETTER_K",e[e.LATIN_SMALL_LETTER_L=108]="LATIN_SMALL_LETTER_L",e[e.LATIN_SMALL_LETTER_M=109]="LATIN_SMALL_LETTER_M",e[e.LATIN_SMALL_LETTER_N=110]="LATIN_SMALL_LETTER_N",e[e.LATIN_SMALL_LETTER_O=111]="LATIN_SMALL_LETTER_O",e[e.LATIN_SMALL_LETTER_P=112]="LATIN_SMALL_LETTER_P",e[e.LATIN_SMALL_LETTER_Q=113]="LATIN_SMALL_LETTER_Q",e[e.LATIN_SMALL_LETTER_R=114]="LATIN_SMALL_LETTER_R",e[e.LATIN_SMALL_LETTER_S=115]="LATIN_SMALL_LETTER_S",e[e.LATIN_SMALL_LETTER_T=116]="LATIN_SMALL_LETTER_T",e[e.LATIN_SMALL_LETTER_U=117]="LATIN_SMALL_LETTER_U",e[e.LATIN_SMALL_LETTER_V=118]="LATIN_SMALL_LETTER_V",e[e.LATIN_SMALL_LETTER_W=119]="LATIN_SMALL_LETTER_W",e[e.LATIN_SMALL_LETTER_X=120]="LATIN_SMALL_LETTER_X",e[e.LATIN_SMALL_LETTER_Y=121]="LATIN_SMALL_LETTER_Y",e[e.LATIN_SMALL_LETTER_Z=122]="LATIN_SMALL_LETTER_Z",e[e.LEFT_CURLY_BRACKET=123]="LEFT_CURLY_BRACKET",e[e.VERTICAL_LINE=124]="VERTICAL_LINE",e[e.RIGHT_CURLY_BRACKET=125]="RIGHT_CURLY_BRACKET",e[e.TILDE=126]="TILDE"})(xn||(xn={}));xn.QUOTATION_MARK+"",xn.QUOTATION_MARK,xn.REVERSE_SOLIDUS+"",xn.REVERSE_SOLIDUS,xn.SOLIDUS+"",xn.SOLIDUS,xn.LATIN_SMALL_LETTER_B+"",xn.BACKSPACE,xn.LATIN_SMALL_LETTER_F+"",xn.FORM_FEED,xn.LATIN_SMALL_LETTER_N+"",xn.NEWLINE,xn.LATIN_SMALL_LETTER_R+"",xn.CARRIAGE_RETURN,xn.LATIN_SMALL_LETTER_T+"",xn.TAB;var hL;(function(e){e[e.LEFT_BRACE=1]="LEFT_BRACE",e[e.RIGHT_BRACE=2]="RIGHT_BRACE",e[e.LEFT_BRACKET=3]="LEFT_BRACKET",e[e.RIGHT_BRACKET=4]="RIGHT_BRACKET",e[e.COLON=5]="COLON",e[e.COMMA=6]="COMMA",e[e.TRUE=7]="TRUE",e[e.FALSE=8]="FALSE",e[e.NULL=9]="NULL",e[e.STRING=10]="STRING",e[e.NUMBER=11]="NUMBER",e[e.SEPARATOR=12]="SEPARATOR"})(hL||(hL={}));var pL;(function(e){e[e.START=0]="START",e[e.ENDED=1]="ENDED",e[e.ERROR=2]="ERROR",e[e.TRUE1=3]="TRUE1",e[e.TRUE2=4]="TRUE2",e[e.TRUE3=5]="TRUE3",e[e.FALSE1=6]="FALSE1",e[e.FALSE2=7]="FALSE2",e[e.FALSE3=8]="FALSE3",e[e.FALSE4=9]="FALSE4",e[e.NULL1=10]="NULL1",e[e.NULL2=11]="NULL2",e[e.NULL3=12]="NULL3",e[e.STRING_DEFAULT=13]="STRING_DEFAULT",e[e.STRING_AFTER_BACKSLASH=14]="STRING_AFTER_BACKSLASH",e[e.STRING_UNICODE_DIGIT_1=15]="STRING_UNICODE_DIGIT_1",e[e.STRING_UNICODE_DIGIT_2=16]="STRING_UNICODE_DIGIT_2",e[e.STRING_UNICODE_DIGIT_3=17]="STRING_UNICODE_DIGIT_3",e[e.STRING_UNICODE_DIGIT_4=18]="STRING_UNICODE_DIGIT_4",e[e.STRING_INCOMPLETE_CHAR=19]="STRING_INCOMPLETE_CHAR",e[e.NUMBER_AFTER_INITIAL_MINUS=20]="NUMBER_AFTER_INITIAL_MINUS",e[e.NUMBER_AFTER_INITIAL_ZERO=21]="NUMBER_AFTER_INITIAL_ZERO",e[e.NUMBER_AFTER_INITIAL_NON_ZERO=22]="NUMBER_AFTER_INITIAL_NON_ZERO",e[e.NUMBER_AFTER_FULL_STOP=23]="NUMBER_AFTER_FULL_STOP",e[e.NUMBER_AFTER_DECIMAL=24]="NUMBER_AFTER_DECIMAL",e[e.NUMBER_AFTER_E=25]="NUMBER_AFTER_E",e[e.NUMBER_AFTER_E_AND_SIGN=26]="NUMBER_AFTER_E_AND_SIGN",e[e.NUMBER_AFTER_E_AND_DIGIT=27]="NUMBER_AFTER_E_AND_DIGIT",e[e.SEPARATOR=28]="SEPARATOR"})(pL||(pL={}));var mL;(function(e){e[e.VALUE=0]="VALUE",e[e.KEY=1]="KEY",e[e.COLON=2]="COLON",e[e.COMMA=3]="COMMA",e[e.ENDED=4]="ENDED",e[e.ERROR=5]="ERROR",e[e.SEPARATOR=6]="SEPARATOR"})(mL||(mL={}));var gL;(function(e){e[e.OBJECT=0]="OBJECT",e[e.ARRAY=1]="ARRAY"})(gL||(gL={}));var O_e=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(r,i,o){n.o(r,i)||Object.defineProperty(r,i,{enumerable:!0,get:o})},n.r=function(r){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n.t=function(r,i){if(1&i&&(r=n(r)),8&i||4&i&&typeof r=="object"&&r&&r.__esModule)return r;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:r}),2&i&&typeof r!="string")for(var s in r)n.d(o,s,function(a){return r[a]}.bind(null,s));return o},n.n=function(r){var i=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(i,"a",i),i},n.o=function(r,i){return Object.prototype.hasOwnProperty.call(r,i)},n.p="",n(n.s=32)}([function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch{typeof window=="object"&&(n=window)}e.exports=n},function(e,t,n){var r=n(6),i=Object.keys||function(v){var y=[];for(var x in v)y.push(x);return y};e.exports=h;var o=n(5);o.inherits=n(2);var s=n(23),a=n(14);o.inherits(h,s);for(var l=i(a.prototype),c=0;c"u"?typeof window<"u"?window:typeof self<"u"?self:$l:globalThis)})(Jx,Jx.exports);var $pe=Jx.exports;const Bpe=(e,t,n,r)=>{const{mercureHubUrl:i,token:o,loading:s,error:a}=e;if(s||a||!i)return;const l=({data:h})=>n(JSON.parse(h)),c=({status:h})=>h===401&&r(),f=t.map(h=>{const p=new URL(i);p.searchParams.append("topic",h);const m=new $pe.EventSourcePolyfill(p,{headers:{Authorization:`Bearer ${o}`}});return m.onmessage=l,m.onerror=c,m});return()=>f.forEach(h=>h.close())};function ra(e,t){const n=new Set;return r=>{const{createNewVisits:i,loadMercureInfo:o,mercureInfo:s}=r,{interval:a}=s,l=Xs();return V.useEffect(()=>{const c=m=>a?n.add(m):i([m]),f=t(r,l),h=Bpe(s,f,c,o);if(!a)return h;const p=setInterval(()=>{i([...n]),n.clear()},a*1e3*60);return Dt(()=>clearInterval(p),()=>h==null?void 0:h())},[s]),g.jsx(e,{...r})}}class Xr{}xe(Xr,"visits","https://shlink.io/new-visit"),xe(Xr,"orphanVisits","https://shlink.io/new-orphan-visit"),xe(Xr,"shortUrlVisits",t=>`https://shlink.io/new-visit/${t}`);const jE="shlink/shortUrlDeletion",_N={shortCode:"",loading:!1,deleted:!1,error:!1},zpe=e=>rr(`${jE}/deleteShortUrl`,async({shortCode:t,domain:n},{getState:r})=>{const{deleteShortUrl:i}=e(r);return await i(t,n),{shortCode:t,domain:n}}),j5=yn(`${jE}/shortUrlDeleted`),Upe=e=>{const{actions:t,reducer:n}=Yn({name:jE,initialState:_N,reducers:{resetDeleteShortUrl:()=>_N},extraReducers:i=>{i.addCase(e.pending,o=>({...o,loading:!0,error:!1,deleted:!1})),i.addCase(e.rejected,(o,{error:s})=>({...o,errorData:ro(s),loading:!1,error:!0,deleted:!1})),i.addCase(e.fulfilled,(o,{payload:s})=>({...o,shortCode:s.shortCode,loading:!1,error:!1,deleted:!0}))}}),{resetDeleteShortUrl:r}=t;return{reducer:n,resetDeleteShortUrl:r}},I5="shlink/shortUrlsList",F5=5,Vpe={loading:!0,error:!1},Hpe=e=>rr(`${I5}/listShortUrls`,(t,{getState:n})=>{const{listShortUrls:r}=e(n);return r(t??{})}),Wpe=(e,t,n)=>Yn({name:I5,initialState:Vpe,reducers:{},extraReducers:r=>{r.addCase(e.pending,i=>({...i,loading:!0,error:!1})),r.addCase(e.rejected,()=>({loading:!1,error:!0})),r.addCase(e.fulfilled,(i,{payload:o})=>({loading:!1,error:!1,shortUrls:o})),r.addCase(n.fulfilled,Dt((i,{payload:o})=>i.shortUrls?Tl(["shortUrls","data"],[o,...i.shortUrls.data.slice(0,F5-1)],i):i,i=>i.shortUrls?Tl(["shortUrls","pagination","totalItems"],i.shortUrls.pagination.totalItems+1,i):i)),r.addCase(t.fulfilled,(i,{payload:o})=>i.shortUrls?Tl(["shortUrls","data"],i.shortUrls.data.map(s=>{const{shortCode:a,domain:l}=o;return Ef(s,a,l)?o:s}),i):i),r.addCase(j5,Dt((i,{payload:o})=>i.shortUrls?Tl(["shortUrls","data"],zd(s=>Ef(s,o.shortCode,o.domain),i.shortUrls.data),i):i,i=>i.shortUrls?Tl(["shortUrls","pagination","totalItems"],i.shortUrls.pagination.totalItems-1,i):i)),r.addCase(ah,(i,{payload:o})=>{var s,a;return Tl(["shortUrls","data"],(a=(s=i.shortUrls)==null?void 0:s.data)==null?void 0:a.map(l=>{var c;return((c=QG(o.createdVisits.filter(({shortUrl:f})=>f&&Ef(l,f.shortCode,f.domain))))==null?void 0:c.shortUrl)??l}),i)})}}),bN=10,{ceil:Ype}=Math,qpe=new Intl.NumberFormat("en-US"),_n=e=>qpe.format(Number(e)),Gpe=e=>Ype(e/bN)*bN;const Zpe=e=>e?{tag:Lt,to:e}:{},e2=({children:e,title:t,link:n,tooltip:r})=>{const i=dl();return g.jsxs(g.Fragment,{children:[g.jsxs(Sr,{innerRef:i,className:"highlight-card",body:!0,...Zpe(n),children:[n&&g.jsx(je,{size:"3x",className:"highlight-card__link-icon",icon:jpe}),g.jsx(GC,{tag:"h5",className:"highlight-card__title",children:t}),g.jsx(qC,{tag:"h2",children:e})]}),r&&g.jsx(Er,{target:i,placement:"bottom",children:r})]})},wN=({loading:e,excludeBots:t,visitsSummary:n,...r})=>g.jsx(e2,{tooltip:n.bots!==void 0?g.jsxs(g.Fragment,{children:[t?"Plus":"Including"," ",g.jsx("b",{children:_n(n.bots)})," potential bot visits"]}):void 0,...r,children:e?"Loading...":_n(t&&n.nonBots?n.nonBots:n.total)}),Kpe=(e,t)=>ra(({shortUrlsList:n,listShortUrls:r,listTags:i,tagsList:o,selectedServer:s,loadVisitsOverview:a,visitsOverview:l,settings:{visits:c}})=>{const{loading:f,shortUrls:h}=n,{loading:p}=o,{loading:m,nonOrphanVisits:v,orphanVisits:y}=l,x=Ud(s),_=ki("nonOrphanVisits",s),w=Fo();return V.useEffect(()=>{r({itemsPerPage:F5,orderBy:{field:"dateCreated",dir:"DESC"}}),i(),a()},[]),g.jsxs(g.Fragment,{children:[g.jsxs(Qn,{children:[g.jsx("div",{className:"col-lg-6 col-xl-3 mb-3",children:g.jsx(wN,{title:"Visits",link:_?`/server/${x}/non-orphan-visits`:void 0,excludeBots:(c==null?void 0:c.excludeBots)??!1,loading:m,visitsSummary:v})}),g.jsx("div",{className:"col-lg-6 col-xl-3 mb-3",children:g.jsx(wN,{title:"Orphan visits",link:`/server/${x}/orphan-visits`,excludeBots:(c==null?void 0:c.excludeBots)??!1,loading:m,visitsSummary:y})}),g.jsx("div",{className:"col-lg-6 col-xl-3 mb-3",children:g.jsx(e2,{title:"Short URLs",link:`/server/${x}/list-short-urls/1`,children:f?"Loading...":_n((h==null?void 0:h.pagination.totalItems)??0)})}),g.jsx("div",{className:"col-lg-6 col-xl-3 mb-3",children:g.jsx(e2,{title:"Tags",link:`/server/${x}/manage-tags`,children:p?"Loading...":_n(o.tags.length)})})]}),g.jsxs(Sr,{className:"mb-3",children:[g.jsxs(nl,{children:[g.jsx("span",{className:"d-sm-none",children:"Create a short URL"}),g.jsx("h5",{className:"d-none d-sm-inline",children:"Create a short URL"}),g.jsx(Lt,{className:"float-end",to:`/server/${x}/create-short-url`,children:"Advanced options »"})]}),g.jsx(tl,{children:g.jsx(t,{basicMode:!0})})]}),g.jsxs(Sr,{children:[g.jsxs(nl,{children:[g.jsx("span",{className:"d-sm-none",children:"Recently created URLs"}),g.jsx("h5",{className:"d-none d-sm-inline",children:"Recently created URLs"}),g.jsx(Lt,{className:"float-end",to:`/server/${x}/list-short-urls/1`,children:"See all »"})]}),g.jsx(tl,{children:g.jsx(e,{shortUrlsList:n,selectedServer:s,className:"mb-0",onTagClick:S=>w(`/server/${x}/list-short-urls/1?tags=${encodeURIComponent(S)}`)})})]})]})},()=>[Xr.visits,Xr.orphanVisits]),Xpe={},Qpe=e=>e.id?e:sd("id",iE(),e),Jpe=YS((e,t)=>sd(t.id,t,e),{}),{actions:eme,reducer:tme}=Yn({name:"shlink/servers",initialState:Xpe,reducers:{editServer:{prepare:(e,t)=>({payload:{serverId:e,serverData:t}}),reducer:(e,{payload:t})=>{const{serverId:n,serverData:r}=t;return e[n]?sd(n,{...e[n],...r},e):e}},deleteServer:(e,{payload:t})=>KG(t.id,e),setAutoConnect:{prepare:({id:e},t)=>({payload:{serverId:e,autoConnect:t}}),reducer:(e,{payload:t})=>{const{serverId:n,autoConnect:r}=t;return e[n]?r?Gu(qg(e).map(([i,o])=>[i,{...o,autoConnect:i===n}])):sd(n,{...e[n],autoConnect:r},e):e}},createServers:{prepare:Dt(Bd(Qpe),Jpe,e=>({payload:e})),reducer:(e,{payload:t})=>({...e,...t})}}}),{editServer:nme,deleteServer:rme,setAutoConnect:ime,createServers:$5}=eme,ome=tme,sme=e=>Array.isArray(e)?e.filter(JS):[],ame=e=>rr("shlink/remoteServers/fetchServers",async(t,{dispatch:n})=>{const r=await e.fetchJson(`${Ug.homepage}/servers.json`),i=sme(r);n($5(i))}),lme=({servers:e,selectedServer:t})=>{const n=Kc(e),r=()=>Wn(n)?g.jsxs(Ue,{tag:Lt,to:"/server/create",children:[g.jsx(je,{icon:dC})," ",g.jsx("span",{className:"ms-1",children:"Add a server"})]}):g.jsxs(g.Fragment,{children:[n.map(({name:i,id:o})=>g.jsx(Ue,{tag:Lt,to:`/server/${o}`,active:Ud(t)===o,children:i},o)),g.jsx(Ue,{divider:!0}),g.jsxs(Ue,{tag:Lt,to:"/manage-servers",children:[g.jsx(je,{icon:vM})," ",g.jsx("span",{className:"ms-1",children:"Manage servers"})]})]});return g.jsxs(Jd,{nav:!0,inNavbar:!0,children:[g.jsxs(Zd,{nav:!0,caret:!0,children:[g.jsx(je,{icon:vM})," ",g.jsx("span",{className:"ms-1",children:"Servers"})]}),g.jsx(eu,{end:!0,style:{right:0},children:r()})]})},cme="shlink-servers.csv";class ume{constructor(t,n,r){xe(this,"exportServers",async()=>{const t=Kc(this.storage.get("servers")??{}).map(jZ);try{const n=this.jsonToCsv(t);i5(this.window,n,cme)}catch(n){console.error(n)}});this.storage=t,this.window=n,this.jsonToCsv=r}}const fme=e=>typeof e.url=="string"&&typeof e.apiKey=="string"&&typeof e.name=="string",dme=e=>Array.isArray(e)&&e.every(fme);class hme{constructor(t,n){xe(this,"importServersFromFile",async t=>{if(!t)throw new Error("No file provided");const n=this.fileReaderFactory();return new Promise((r,i)=>{n.addEventListener("loadend",async o=>{var s,a;try{const l=((a=(s=o.target)==null?void 0:s.result)==null?void 0:a.toString())??"",c=await this.csvToJson(l);if(!dme(c))throw new Error("Provided file does not have the right format.");r(c)}catch(l){i(l)}}),n.readAsText(t)})});this.csvToJson=t,this.fileReaderFactory=n}}const pme=(e,t)=>{e.serviceFactory("ManageServers",Rpe,"ServersExporter","ImportServersBtn","useTimeoutToggle","ManageServersRow"),e.decorator("ManageServers",pv),e.decorator("ManageServers",t(["selectedServer","servers"],["resetSelectedServer"])),e.serviceFactory("ManageServersRow",Npe,"ManageServersRowDropdown"),e.serviceFactory("ManageServersRowDropdown",Fpe,"DeleteServerModal"),e.decorator("ManageServersRowDropdown",t(null,["setAutoConnect"])),e.serviceFactory("CreateServer",Cpe,"ImportServersBtn","useTimeoutToggle"),e.decorator("CreateServer",pv),e.decorator("CreateServer",t(["selectedServer","servers"],["createServers","resetSelectedServer"])),e.serviceFactory("EditServer",Ope,"ServerError"),e.decorator("EditServer",t(["selectedServer"],["editServer","selectServer","resetSelectedServer"])),e.serviceFactory("ServersDropdown",()=>lme),e.decorator("ServersDropdown",t(["servers","selectedServer"])),e.serviceFactory("DeleteServerModal",()=>Tpe),e.decorator("DeleteServerModal",t(null,["deleteServer"])),e.serviceFactory("DeleteServerButton",Epe,"DeleteServerModal"),e.serviceFactory("ImportServersBtn",Ppe,"ServersImporter"),e.decorator("ImportServersBtn",t(["servers"],["createServers"])),e.serviceFactory("ServerError",kpe,"DeleteServerButton"),e.decorator("ServerError",t(["servers","selectedServer"])),e.serviceFactory("Overview",Kpe,"ShortUrlsTable","CreateShortUrl"),e.decorator("Overview",t(["shortUrlsList","tagsList","selectedServer","mercureInfo","visitsOverview","settings"],["listShortUrls","listTags","createNewVisits","loadMercureInfo","loadVisitsOverview"])),e.constant("fileReaderFactory",()=>new FileReader),e.service("ServersImporter",hme,"csvToJson","fileReaderFactory"),e.service("ServersExporter",ume,"Storage","window","jsonToCsv"),e.serviceFactory("selectServer",n5,"buildShlinkApiClient","loadMercureInfo"),e.serviceFactory("createServers",()=>$5),e.serviceFactory("deleteServer",()=>rme),e.serviceFactory("editServer",()=>nme),e.serviceFactory("setAutoConnect",()=>ime),e.serviceFactory("fetchServers",ame,"HttpClient"),e.serviceFactory("resetSelectedServer",()=>vE),e.serviceFactory("selectServerListener",uae,"selectServer","loadMercureInfo"),e.serviceFactory("selectedServerReducerCreator",fae,"selectServer"),e.serviceFactory("selectedServerReducer",at("reducer"),"selectedServerReducerCreator")},vc=({children:e})=>g.jsx("small",{className:"form-text text-muted d-block",children:e}),B5=({checked:e=!1,onChange:t=GS,className:n,children:r,type:i,inline:o=!1})=>{const s=v_(),a=f=>t(f.target.checked,f),l={"form-switch":i==="switch","form-checkbox":i==="checkbox"},c=o?{display:"inline-block"}:{};return g.jsxs("span",{className:me("form-check",l,n),style:c,children:[g.jsx("input",{type:"checkbox",className:"form-check-input",id:s,checked:e,onChange:a}),g.jsx("label",{className:"form-check-label",htmlFor:s,children:r})]})},Uc=e=>g.jsx(B5,{type:"switch",...e}),mme=e=>e?`${e}`:"",gme=({settings:{realTimeUpdates:e},toggleRealTimeUpdates:t,setRealTimeUpdatesInterval:n})=>{const r=v_();return g.jsxs(cn,{title:"Real-time updates",className:"h-100",children:[g.jsx(vr,{children:g.jsxs(Uc,{checked:e.enabled,onChange:t,children:["Enable or disable real-time updates.",g.jsxs(vc,{children:["Real-time updates are currently being ",g.jsx("b",{children:e.enabled?"processed":"ignored"}),"."]})]})}),g.jsxs(ru,{noMargin:!0,label:"Real-time updates frequency (in minutes):",labelClassName:me("form-label",{"text-muted":!e.enabled}),id:r,children:[g.jsx(Ic,{type:"number",min:0,placeholder:"Immediate",disabled:!e.enabled,value:mme(e.interval),id:r,onChange:({target:i})=>n(Number(i.value))}),e.enabled&&g.jsxs(vc,{children:[e.interval!==void 0&&e.interval>0&&g.jsxs("span",{children:["Updates will be reflected in the UI every ",g.jsx("b",{children:e.interval})," minute",e.interval>1&&"s","."]}),!e.interval&&"Updates will be reflected in the UI as soon as they happen."]})]})]})},IE={field:"dateCreated",dir:"DESC"},vme={realTimeUpdates:{enabled:!0},shortUrlCreation:{validateUrls:!1},ui:{theme:"light"},visits:{defaultInterval:"last30Days"},shortUrlsList:{defaultOrdering:IE}},yme=(e,{payload:t})=>Pj(e,t),ya=e=>({reducer:yme,prepare:e}),_a=e=>({payload:e}),{reducer:_me,actions:bme}=Yn({name:"shlink/settings",initialState:vme,reducers:{toggleRealTimeUpdates:ya(e=>_a({realTimeUpdates:{enabled:e}})),setRealTimeUpdatesInterval:ya(e=>_a({realTimeUpdates:{interval:e}})),setShortUrlCreationSettings:ya(e=>_a({shortUrlCreation:e})),setShortUrlsListSettings:ya(e=>_a({shortUrlsList:e})),setUiSettings:ya(e=>_a({ui:e})),setVisitsSettings:ya(e=>_a({visits:e})),setTagsSettings:ya(e=>_a({tags:e}))}}),{toggleRealTimeUpdates:wme,setRealTimeUpdatesInterval:xme,setShortUrlCreationSettings:Sme,setShortUrlsListSettings:Cme,setUiSettings:Eme,setVisitsSettings:Tme,setTagsSettings:Ome}=bme,Pme=_me;const kf=({children:e,...t})=>g.jsx(l6,{className:"nav-pills__nav-link",tag:oj,...t,children:e}),z5=({children:e,fill:t=!1,className:n=""})=>g.jsx(Sr,{className:`nav-pills__nav p-0 overflow-hidden ${n}`,body:!0,children:g.jsx(c_,{pills:!0,fill:t,children:V.Children.map(e,r=>{if(!V.isValidElement(r)||r.type!==kf)throw new Error("Only NavPillItem children are allowed inside NavPills.");return r})})}),M1=({items:e})=>g.jsx(g.Fragment,{children:e.map((t,n)=>g.jsx("div",{className:"mb-3",children:t},n))}),kme=(e,t,n,r,i,o)=>()=>g.jsxs(nu,{children:[g.jsxs(z5,{className:"mb-3",children:[g.jsx(kf,{to:"general",children:"General"}),g.jsx(kf,{to:"short-urls",children:"Short URLs"}),g.jsx(kf,{to:"other-items",children:"Other items"})]}),g.jsxs(Zy,{children:[g.jsx(gt,{path:"general",element:g.jsx(M1,{items:[g.jsx(r,{}),g.jsx(e,{})]})}),g.jsx(gt,{path:"short-urls",element:g.jsx(M1,{items:[g.jsx(t,{}),g.jsx(n,{})]})}),g.jsx(gt,{path:"other-items",element:g.jsx(M1,{items:[g.jsx(o,{}),g.jsx(i,{})]})}),g.jsx(gt,{path:"*",element:g.jsx(BS,{replace:!0,to:"general"})})]})]}),R1=e=>e==="includes"?"Suggest tags including input":"Suggest tags starting with input",Mme=e=>e==="includes"?g.jsxs(g.Fragment,{children:["The list of suggested tags will contain those ",g.jsx("b",{children:"including"})," provided input."]}):g.jsxs(g.Fragment,{children:["The list of suggested tags will contain those ",g.jsx("b",{children:"starting with"})," provided input."]}),Rme=({settings:e,setShortUrlCreationSettings:t})=>{const n=e.shortUrlCreation??{validateUrls:!1},r=i=>()=>t({...n??{validateUrls:!1},tagFilteringMode:i});return g.jsxs(cn,{title:"Short URLs form",className:"h-100",children:[g.jsx(vr,{children:g.jsxs(Uc,{checked:n.validateUrls??!1,onChange:i=>t({...n,validateUrls:i}),children:["Request validation on long URLs when creating new short URLs.",g.jsxs(vc,{children:["The initial state of the ",g.jsx("b",{children:"Validate URL"})," checkbox will be ",g.jsx("b",{children:n.validateUrls?"checked":"unchecked"}),"."]})]})}),g.jsx(vr,{children:g.jsxs(Uc,{checked:n.forwardQuery??!0,onChange:i=>t({...n,forwardQuery:i}),children:["Make all new short URLs forward their query params to the long URL.",g.jsxs(vc,{children:["The initial state of the ",g.jsx("b",{children:"Forward query params on redirect"})," checkbox will be ",g.jsx("b",{children:n.forwardQuery??!0?"checked":"unchecked"}),"."]})]})}),g.jsxs(ru,{noMargin:!0,label:"Tag suggestions search mode:",children:[g.jsxs(Ho,{text:R1(n.tagFilteringMode),children:[g.jsx(Ue,{active:!n.tagFilteringMode||n.tagFilteringMode==="startsWith",onClick:r("startsWith"),children:R1("startsWith")}),g.jsx(Ue,{active:n.tagFilteringMode==="includes",onClick:r("includes"),children:R1("includes")})]}),g.jsx(vc,{children:Mme(n.tagFilteringMode)})]})]})},U5={dateCreated:"Created at",shortCode:"Short URL",longUrl:"Long URL",title:"Title",visits:"Visits"};function fh({items:e,order:t,onChange:n,isButton:r=!0,right:i=!1,prefixed:o=!0}){const s=a=>()=>{const l=e_(a,t.field,t.dir);n(l?a:void 0,l)};return g.jsxs(Jd,{children:[g.jsxs(Zd,{caret:!0,color:r?"primary":"link",className:me({"dropdown-btn__toggle btn-block pe-4 overflow-hidden":r,"btn-sm p-0":!r}),children:[!r&&g.jsx(g.Fragment,{children:"Order by"}),r&&!t.field&&g.jsx("i",{children:"Order by..."}),r&&t.field&&g.jsxs(g.Fragment,{children:[o&&"Order by: ",e[t.field]," - ",g.jsx("small",{children:t.dir??"DESC"})]})]}),g.jsxs(eu,{end:i,className:me("w-100",{"ordering-dropdown__menu--link":!r}),children:[qg(e).map(([a,l])=>g.jsxs(Ue,{active:t.field===a,onClick:s(a),children:[l,t.field===a&&g.jsx(je,{icon:t.dir==="ASC"?EQ:uQ,className:"ordering-dropdown__sort-icon"})]},a)),g.jsx(Ue,{divider:!0}),g.jsx(Ue,{disabled:!t.field,onClick:()=>n(),children:g.jsx("i",{children:"Clear selection"})})]})]})}const Nme=({settings:{shortUrlsList:e},setShortUrlsListSettings:t})=>g.jsx(cn,{title:"Short URLs list",className:"h-100",children:g.jsx(ru,{noMargin:!0,label:"Default ordering for short URLs list:",children:g.jsx(fh,{items:U5,order:(e==null?void 0:e.defaultOrdering)??IE,onChange:(n,r)=>t({defaultOrdering:{field:n,dir:r}})})})}),V5={tag:"Tag",shortUrls:"Short URLs",visits:"Visits"},Lme=({settings:{tags:e},setTagsSettings:t})=>g.jsx(cn,{title:"Tags",className:"h-100",children:g.jsx(ru,{noMargin:!0,label:"Default ordering for tags list:",children:g.jsx(fh,{items:V5,order:(e==null?void 0:e.defaultOrdering)??{},onChange:(n,r)=>t({...e,defaultOrdering:{field:n,dir:r}})})})});const Dme=({settings:{ui:e},setUiSettings:t})=>g.jsxs(cn,{title:"User interface",className:"h-100",children:[g.jsx(je,{icon:(e==null?void 0:e.theme)==="dark"?$Q:OQ,className:"user-interface__theme-icon"}),g.jsx(Uc,{checked:(e==null?void 0:e.theme)==="dark",onChange:n=>{const r=n?"dark":"light";t({...e,theme:r}),k6(r)},children:"Use dark theme."})]}),H5=({active:e,allText:t,onChange:n})=>g.jsxs(g.Fragment,{children:[g.jsx(Ue,{active:e==="all",onClick:()=>n("all"),children:t}),g.jsx(Ue,{divider:!0}),tpe.map(r=>g.jsx(Ue,{active:e===r,onClick:()=>n(r),children:AE(r)},r))]}),Ame=({onChange:e,active:t,allText:n})=>g.jsx(Ho,{text:AE(t)??n,children:g.jsx(H5,{allText:n,active:t,onChange:e})}),xN=e=>{var t;return((t=e.visits)==null?void 0:t.defaultInterval)??"last30Days"},jme=({settings:e,setVisitsSettings:t})=>{var n,r;return g.jsxs(cn,{title:"Visits",className:"h-100",children:[g.jsx(vr,{children:g.jsxs(Uc,{checked:!!((n=e.visits)!=null&&n.excludeBots),onChange:i=>t({defaultInterval:xN(e),excludeBots:i}),children:["Exclude bots wherever possible (this option‘s effect might depend on Shlink server‘s version).",g.jsxs(vc,{children:["The visits coming from potential bots will be ",g.jsx("b",{children:(r=e.visits)!=null&&r.excludeBots?"excluded":"included"}),"."]})]})}),g.jsx(ru,{noMargin:!0,label:"Default interval to load on visits sections:",children:g.jsx(Ame,{allText:"All visits",active:xN(e),onChange:i=>t({defaultInterval:i})})})]})},Ime=(e,t)=>{e.serviceFactory("Settings",kme,"RealTimeUpdatesSettings","ShortUrlCreationSettings","ShortUrlsListSettings","UserInterfaceSettings","VisitsSettings","TagsSettings"),e.decorator("Settings",pv),e.decorator("Settings",t(null,["resetSelectedServer"])),e.serviceFactory("RealTimeUpdatesSettings",()=>gme),e.decorator("RealTimeUpdatesSettings",t(["settings"],["toggleRealTimeUpdates","setRealTimeUpdatesInterval"])),e.serviceFactory("ShortUrlCreationSettings",()=>Rme),e.decorator("ShortUrlCreationSettings",t(["settings"],["setShortUrlCreationSettings"])),e.serviceFactory("UserInterfaceSettings",()=>Dme),e.decorator("UserInterfaceSettings",t(["settings"],["setUiSettings"])),e.serviceFactory("VisitsSettings",()=>jme),e.decorator("VisitsSettings",t(["settings"],["setVisitsSettings"])),e.serviceFactory("TagsSettings",()=>Lme),e.decorator("TagsSettings",t(["settings"],["setTagsSettings"])),e.serviceFactory("ShortUrlsListSettings",()=>Nme),e.decorator("ShortUrlsListSettings",t(["settings"],["setShortUrlsListSettings"])),e.serviceFactory("toggleRealTimeUpdates",()=>wme),e.serviceFactory("setRealTimeUpdatesInterval",()=>xme),e.serviceFactory("setShortUrlCreationSettings",()=>Sme),e.serviceFactory("setShortUrlsListSettings",()=>Cme),e.serviceFactory("setUiSettings",()=>Eme),e.serviceFactory("setVisitsSettings",()=>Tme),e.serviceFactory("setTagsSettings",()=>Ome)},Fme=e=>({longUrl:"",tags:[],customSlug:"",title:void 0,shortCodeLength:void 0,domain:"",validSince:void 0,validUntil:void 0,maxVisits:void 0,findIfExists:!1,validateUrl:(e==null?void 0:e.validateUrls)??!1,forwardQuery:(e==null?void 0:e.forwardQuery)??!0}),$me=(e,t)=>({createShortUrl:n,shortUrlCreation:r,resetCreateShortUrl:i,selectedServer:o,basicMode:s=!1,settings:{shortUrlCreation:a}})=>{const l=V.useMemo(()=>Fme(a),[a]);return g.jsxs(g.Fragment,{children:[g.jsx(e,{initialState:l,saving:r.saving,selectedServer:o,mode:s?"create-basic":"create",onSave:async c=>(i(),n(c))}),g.jsx(t,{creation:r,resetCreateShortUrl:i,canBeClosed:s})]})},Bme=e=>({settings:{shortUrlCreation:t},selectedServer:n,shortUrlDetail:r,getShortUrlDetail:i,shortUrlEdition:o,editShortUrl:s})=>{const{search:a}=Pn(),l=Xs(),c=na(),{loading:f,error:h,errorData:p,shortUrl:m}=r,{saving:v,saved:y,error:x,errorData:_}=o,{domain:w}=fl(a),S=V.useMemo(()=>Rae(m,t),[m,t]);return V.useEffect(()=>{l.shortCode&&i({shortCode:pm(l.shortCode),domain:w})},[]),f?g.jsx(Co,{loading:!0}):h?g.jsx(Nr,{type:"error",children:g.jsx(Do,{errorData:p,fallbackMessage:"An error occurred while loading short URL detail :("})}):g.jsxs(g.Fragment,{children:[g.jsx("header",{className:"mb-3",children:g.jsx(Sr,{body:!0,children:g.jsxs("h2",{className:"d-sm-flex justify-content-between align-items-center mb-0",children:[g.jsx(ht,{color:"link",size:"lg",className:"p-0 me-3",onClick:c,children:g.jsx(je,{icon:tI})}),g.jsx("span",{className:"text-center",children:g.jsxs("small",{children:["Edit ",g.jsx(Ci,{href:(m==null?void 0:m.shortUrl)??""})]})}),g.jsx("span",{})]})})}),g.jsx(e,{initialState:S,saving:v,selectedServer:n,mode:"edit",onSave:async T=>{m&&s({...m,data:T})}}),y&&x&&g.jsx(Nr,{type:"error",className:"mt-3",children:g.jsx(Do,{errorData:_,fallbackMessage:"An error occurred while updating short URL :("})}),y&&!x&&g.jsx(Nr,{type:"success",className:"mt-3",children:"Short URL properly edited."})]})};var w_={},zme=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var h=SN[t.format]||SN.default;window.clipboardData.setData(h,e)}else f.clipboardData.clearData(),f.clipboardData.setData(t.format,e);t.onCopy&&(f.preventDefault(),t.onCopy(f.clipboardData))}),document.body.appendChild(a),o.selectNodeContents(a),s.addRange(o);var c=document.execCommand("copy");if(!c)throw new Error("copy command was unsuccessful");l=!0}catch(f){n&&console.error("unable to copy using execCommand: ",f),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),l=!0}catch(h){n&&console.error("unable to copy using clipboardData: ",h),n&&console.error("falling back to prompt"),r=Hme("message"in t?t.message:Vme),window.prompt(r,e)}}finally{s&&(typeof s.removeRange=="function"?s.removeRange(o):s.removeAllRanges()),a&&document.body.removeChild(a),i()}return l}var Yme=Wme;function t2(e){return t2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t2(e)}Object.defineProperty(w_,"__esModule",{value:!0});w_.CopyToClipboard=void 0;var Lp=W5(V),qme=W5(Yme),Gme=["text","onCopy","options","children"];function W5(e){return e&&e.__esModule?e:{default:e}}function CN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function EN(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Kme(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function Xme(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function TN(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ty(e){return ty=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},ty(e)}function FE(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var q5=function(e){Jme(n,e);var t=ege(n);function n(){var r;Xme(this,n);for(var i=arguments.length,o=new Array(i),s=0;s({creation:t,resetCreateShortUrl:n,canBeClosed:r=!1})=>{const[i,o]=e(),{error:s,saved:a}=t;if(V.useEffect(()=>{n()},[]),s)return g.jsxs(Nr,{type:"error",className:"mt-3",children:[r&&g.jsx(je,{icon:uw,className:"float-end pointer",onClick:n}),g.jsx(Do,{errorData:t.errorData,fallbackMessage:"An error occurred while creating the URL :("})]});if(!a)return null;const{shortUrl:l}=t.result;return g.jsxs(Nr,{type:"success",className:"mt-3",children:[r&&g.jsx(je,{icon:uw,className:"float-end pointer",onClick:n}),g.jsxs("span",{children:[g.jsx("b",{children:"Great!"})," The short URL is ",g.jsx("b",{children:l})]}),g.jsx(G5,{text:l,onCopy:o,children:g.jsxs("button",{className:"btn btn-light btn-sm create-short-url-result__copy-btn",id:"copyBtn",type:"button",children:[g.jsx(je,{icon:A5})," Copy"]})}),g.jsx(Xd,{placement:"left",isOpen:i,target:"copyBtn",children:"Copied!"})]})},N1="delete",sge=({shortUrl:e,toggle:t,isOpen:n,shortUrlDeletion:r,resetDeleteShortUrl:i,deleteShortUrl:o,shortUrlDeleted:s})=>{const[a,l]=V.useState("");V.useEffect(()=>i,[]);const{loading:c,error:f,deleted:h,errorData:p}=r,m=Dt(i,t),v=rh(()=>o(e).then(t));return g.jsx(Vo,{isOpen:n,toggle:m,centered:!0,onClosed:()=>h&&s(e),children:g.jsxs("form",{onSubmit:v,children:[g.jsx(io,{toggle:m,children:g.jsx("span",{className:"text-danger",children:"Delete short URL"})}),g.jsxs(Mi,{children:[g.jsxs("p",{children:[g.jsx("b",{className:"text-danger",children:"Caution!"})," You are about to delete a short URL."]}),g.jsx("p",{children:"This action cannot be undone. Once you have deleted it, all the visits stats will be lost."}),g.jsxs("p",{children:["Write ",g.jsx("b",{children:N1})," to confirm deletion."]}),g.jsx("input",{type:"text",className:"form-control",placeholder:`Insert ${N1}`,value:a,onChange:y=>l(y.target.value)}),f&&g.jsx(Nr,{type:DX(p)?"warning":"error",small:!0,className:"mt-2",children:g.jsx(Do,{errorData:p,fallbackMessage:"Something went wrong while deleting the URL :("})})]}),g.jsxs(ta,{children:[g.jsx("button",{type:"button",className:"btn btn-link",onClick:m,children:"Cancel"}),g.jsx("button",{type:"submit",className:"btn btn-danger",disabled:a!==N1||c,children:c?"Deleting...":"Delete"})]})]})})},Z5=({amount:e=0,loading:t=!1,...n})=>g.jsxs(ht,{...n,outline:!0,color:"primary",disabled:t,children:[g.jsx(je,{icon:GX})," ",t?"Exporting...":g.jsxs(g.Fragment,{children:["Export (",_n(e),")"]})]}),x_=()=>{const e=Fo(),{search:t}=Pn(),{serverId:n=""}=Xs(),r=V.useMemo(Dt(()=>fl(t),({orderBy:o,tags:s,excludeBots:a,excludeMaxVisitsReached:l,excludePastValidUntil:c,...f})=>{const h=o?IZ(o):void 0,p=(s==null?void 0:s.split(","))??[];return{...f,orderBy:h,tags:p,excludeBots:a!==void 0?a==="true":void 0,excludeMaxVisitsReached:l!==void 0?l==="true":void 0,excludePastValidUntil:c!==void 0?c==="true":void 0}}),[t]);return[r,o=>{const s={...r,...o},{orderBy:a,tags:l,excludeBots:c,excludeMaxVisitsReached:f,excludePastValidUntil:h,...p}=s,m={...p,orderBy:a&&Lj(a),tags:l.length>0?l.join(","):void 0,excludeBots:w1(c),excludeMaxVisitsReached:w1(f),excludePastValidUntil:w1(h)},v=Vd(m),y=Wn(v)?"":`?${v}`;e(`/server/${n}/list-short-urls/1${y}`)}]},ON=20,age=(e,{exportShortUrls:t})=>({amount:n=0,selectedServer:r})=>{const[{tags:i,search:o,startDate:s,endDate:a,orderBy:l,tagsMode:c}]=x_(),[f,,h,p]=hn(),m=V.useCallback(async()=>{if(!Ms(r))return;const v=n/ON,{listShortUrls:y}=e(r),x=async(w=1)=>{const{data:S}=await y({page:`${w}`,tags:i,searchTerm:o,startDate:s,endDate:a,orderBy:l,tagsMode:c,itemsPerPage:ON});return w>=v?S:S.concat(await x(w+1))};h();const _=await x();t(_.map(w=>{var k;const{hostname:S,pathname:T}=new URL(w.shortUrl),P=T.substring(1);return{createdAt:w.dateCreated,domain:S,shortCode:P,shortUrl:w.shortUrl,longUrl:w.longUrl,title:w.title??"",tags:w.tags.join("|"),visits:((k=w==null?void 0:w.visitsSummary)==null?void 0:k.total)??w.visitsCount}})),p()},[r]);return g.jsx(Z5,{loading:f,className:"btn-md-block",amount:n,onClick:m})};const K5=({text:e,onCopy:t})=>g.jsx(G5,{text:e,onCopy:t,children:g.jsx(je,{icon:A5,className:"ms-2 copy-to-clipboard-icon"})}),lge=(e,{margin:t,...n})=>{const r=`${e}/qr-code`,i=Vd({...n,margin:t>0?t:void 0});return`${r}${Wn(i)?"":`?${i}`}`},cge=({errorCorrection:e,setErrorCorrection:t})=>g.jsxs(Ho,{text:`Error correction (${e})`,children:[g.jsxs(Ue,{active:e==="L",onClick:()=>t("L"),children:[g.jsx("b",{children:"L"}),"ow"]}),g.jsxs(Ue,{active:e==="M",onClick:()=>t("M"),children:[g.jsx("b",{children:"M"}),"edium"]}),g.jsxs(Ue,{active:e==="Q",onClick:()=>t("Q"),children:[g.jsx("b",{children:"Q"}),"uartile"]}),g.jsxs(Ue,{active:e==="H",onClick:()=>t("H"),children:[g.jsx("b",{children:"H"}),"igh"]})]}),uge=({format:e,setFormat:t})=>g.jsxs(Ho,{text:`Format (${e})`,children:[g.jsx(Ue,{active:e==="png",onClick:()=>t("png"),children:"PNG"}),g.jsx(Ue,{active:e==="svg",onClick:()=>t("svg"),children:"SVG"})]});const fge=e=>({shortUrl:{shortUrl:t,shortCode:n},toggle:r,isOpen:i,selectedServer:o})=>{const[s,a]=V.useState(300),[l,c]=V.useState(0),[f,h]=V.useState("png"),[p,m]=V.useState("L"),v=ki("nonRestCors",o),y=V.useMemo(()=>lge(t,{size:s,format:f,margin:l,errorCorrection:p}),[t,s,f,l,p]),x=V.useMemo(()=>s+l,[s,l]),_=V.useMemo(()=>{if(!(x<500))return x<800?"lg":"xl"},[x]);return g.jsxs(Vo,{isOpen:i,toggle:r,centered:!0,size:_,children:[g.jsxs(io,{toggle:r,children:["QR code for ",g.jsx(Ci,{href:t,children:t})]}),g.jsxs(Mi,{children:[g.jsxs(Qn,{children:[g.jsxs(vr,{className:"d-grid col-md-4",children:[g.jsxs("label",{children:["Size: ",s,"px"]}),g.jsx("input",{type:"range",className:"form-control-range",value:s,step:10,min:50,max:1e3,onChange:w=>a(Number(w.target.value))})]}),g.jsxs(vr,{className:"d-grid col-md-4",children:[g.jsxs("label",{htmlFor:"marginControl",children:["Margin: ",l,"px"]}),g.jsx("input",{id:"marginControl",type:"range",className:"form-control-range",value:l,step:1,min:0,max:100,onChange:w=>c(Number(w.target.value))})]}),g.jsx(vr,{className:"d-grid col-md-4",children:g.jsx(uge,{format:f,setFormat:h})}),g.jsx(vr,{className:"col-md-6",children:g.jsx(cge,{errorCorrection:p,setErrorCorrection:m})})]}),g.jsxs("div",{className:"text-center",children:[g.jsxs("div",{className:"mb-3",children:[g.jsx(Ci,{href:y}),g.jsx(K5,{text:y})]}),g.jsx("img",{src:y,className:"qr-code-modal__img",alt:"QR code"}),v&&g.jsx("div",{className:"mt-3",children:g.jsxs(ht,{block:!0,color:"primary",onClick:()=>{e.saveImage(y,`${n}-qr-code.${f}`).catch(()=>{})},children:["Download ",g.jsx(je,{icon:nI,className:"ms-1"})]})})]})]})]})},ny=({date:e,format:t=LE,relative:n=!1})=>{const r=DE(e)?e:Ao(e);return g.jsx("time",{dateTime:`${dce(r)}000`,children:n?`${oce(Ws(),r)} ago`:yo(r,t)})},dge=e=>{const{meta:t,visitsCount:n,visitsSummary:r}=e,{maxVisits:i,validSince:o,validUntil:s}=t,a=(r==null?void 0:r.total)??n;return i&&a>=i?{icon:BQ,className:"text-danger",description:g.jsxs(g.Fragment,{children:["This short URL cannot be currently visited because it has reached the maximum amount of ",g.jsx("b",{children:i})," visit",i>1?"s":"","."]})}:s&&Gr(bi(s),Ws())?{icon:yM,className:"text-danger",description:g.jsxs(g.Fragment,{children:["This short URL cannot be visited since ",g.jsx("b",{className:"indivisible",children:Jv(bi(s))}),"."]})}:o&&Gr(Ws(),bi(o))?{icon:yM,className:"text-warning",description:g.jsxs(g.Fragment,{children:["This short URL will start working on ",g.jsx("b",{className:"indivisible",children:Jv(bi(o))}),"."]})}:{icon:cd,className:"text-primary",description:"This short URL can be visited normally."}},hge=({shortUrl:e})=>{const t=dl(),{icon:n,className:r,description:i}=dge(e);return g.jsxs(g.Fragment,{children:[g.jsx("span",{style:{cursor:i?"help":void 0},ref:t,children:g.jsx(je,{icon:n,className:r})}),g.jsx(Er,{target:t,placement:"bottom",children:i})]})},pge=({id:e},{shortCode:t,domain:n},r)=>{const i=n?`?domain=${n}`:"";return`/server/${e}/short-code/${Nae(t)}/${r}${i}`},i2=({selectedServer:e,shortUrl:t,suffix:n,children:r,...i})=>!e||!Ms(e)||!t?g.jsx("span",{...i,children:r}):g.jsx(Lt,{to:pge(e,t,n),...i,children:r});const X5=({visitsCount:e,shortUrl:t,selectedServer:n,active:r=!1})=>{const{maxVisits:i,validSince:o,validUntil:s}=(t==null?void 0:t.meta)??{},a=!!i||!!o||!!s,l=g.jsx(i2,{selectedServer:n,shortUrl:t,suffix:"visits",children:g.jsx("strong",{className:me("short-url-visits-count__amount",{"short-url-visits-count__amount--big":r}),children:_n(e)})});if(!a)return l;const c=dl();return g.jsxs(g.Fragment,{children:[g.jsxs("span",{className:"indivisible",children:[l,g.jsxs("small",{className:"short-urls-visits-count__max-visits-control",ref:c,children:[i&&g.jsxs(g.Fragment,{children:[" / ",_n(i)]}),g.jsx("sup",{className:"ms-1",children:g.jsx(je,{icon:fC})})]})]}),g.jsx(Er,{target:c,placement:"bottom",children:g.jsxs("ul",{className:"list-unstyled mb-0",children:[i&&g.jsxs("li",{className:"short-url-visits-count__tooltip-list-item",children:["This short URL will not accept more than ",g.jsx("b",{children:_n(i)})," visit",i===1?"":"s","."]}),o&&g.jsxs("li",{className:"short-url-visits-count__tooltip-list-item",children:["This short URL will not accept visits before ",g.jsx("b",{className:"indivisible",children:Jv(bi(o))}),"."]}),s&&g.jsxs("li",{className:"short-url-visits-count__tooltip-list-item",children:["This short URL will not accept visits after ",g.jsx("b",{className:"indivisible",children:Jv(bi(s))}),"."]})]})})]})};const $E=({text:e,children:t,clearable:n,className:r="",colorGenerator:i,onClick:o,onClose:s})=>g.jsxs("span",{className:me("badge tag",r,{"tag--light-bg":i.isColorLightForKey(e)}),style:{backgroundColor:i.getColorForKey(e),cursor:n||!o?"auto":"pointer"},onClick:o,children:[t??e,n&&g.jsx("span",{"aria-label":`Remove ${e}`,className:"close tag__close-selected-tag",onClick:s,children:"×"})]}),mge=({tags:e,onTagClick:t,colorGenerator:n})=>Wn(e)?g.jsx("i",{className:"indivisible",children:g.jsx("small",{children:"No tags"})}):g.jsx(g.Fragment,{children:e.map(r=>g.jsx($E,{text:r,colorGenerator:n,onClick:()=>t==null?void 0:t(r)},r))});const gge=(e,t,n)=>({shortUrl:r,selectedServer:i,onTagClick:o,settings:s})=>{var y,x,_,w;const[a,l]=n(),[c,f]=n(!1,500),h=V.useRef(!0),[{excludeBots:p}]=x_(),{visits:m}=s,v=p??(m==null?void 0:m.excludeBots);return V.useEffect(()=>{!h.current&&f(),h.current=!1},[(y=r.visitsSummary)==null?void 0:y.total,(x=r.visitsSummary)==null?void 0:x.nonBots,r.visitsCount]),g.jsxs("tr",{className:"responsive-table__row",children:[g.jsx("td",{className:"indivisible short-urls-row__cell responsive-table__cell","data-th":"Created at",children:g.jsx(ny,{date:r.dateCreated})}),g.jsx("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Short URL",children:g.jsxs("span",{className:"position-relative short-urls-row__cell--indivisible",children:[g.jsx("span",{className:"short-urls-row__short-url-wrapper",children:g.jsx(Ci,{href:r.shortUrl})}),g.jsx(K5,{text:r.shortUrl,onCopy:l}),g.jsx("span",{className:"badge bg-warning text-black short-urls-row__copy-hint",hidden:!a,children:"Copied short URL!"})]})}),g.jsx("td",{className:"responsive-table__cell short-urls-row__cell short-urls-row__cell--break","data-th":`${r.title?"Title":"Long URL"}`,children:g.jsx(Ci,{href:r.longUrl,children:r.title??r.longUrl})}),r.title&&g.jsx("td",{className:"short-urls-row__cell responsive-table__cell short-urls-row__cell--break d-lg-none","data-th":"Long URL",children:g.jsx(Ci,{href:r.longUrl})}),g.jsx("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Tags",children:g.jsx(mge,{tags:r.tags,colorGenerator:t,onTagClick:o})}),g.jsx("td",{className:"responsive-table__cell short-urls-row__cell text-lg-end","data-th":"Visits",children:g.jsx(X5,{visitsCount:(v?(_=r.visitsSummary)==null?void 0:_.nonBots:(w=r.visitsSummary)==null?void 0:w.total)??r.visitsCount,shortUrl:r,selectedServer:i,active:c})}),g.jsx("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Status",children:g.jsx(hge,{shortUrl:r})}),g.jsx("td",{className:"responsive-table__cell short-urls-row__cell text-end",children:g.jsx(e,{selectedServer:i,shortUrl:r})})]})},vge=(e,t)=>({shortUrl:n,selectedServer:r})=>{const[i,,o,s]=hn(),[a,,l,c]=hn();return g.jsxs(__,{minWidth:190,children:[g.jsxs(Ue,{tag:i2,selectedServer:r,shortUrl:n,suffix:"visits",children:[g.jsx(je,{icon:uC,fixedWidth:!0})," Visit stats"]}),g.jsxs(Ue,{tag:i2,selectedServer:r,shortUrl:n,suffix:"edit",children:[g.jsx(je,{icon:cC,fixedWidth:!0})," Edit short URL"]}),g.jsxs(Ue,{onClick:o,children:[g.jsx(je,{icon:FQ,fixedWidth:!0})," QR code"]}),g.jsx(t,{shortUrl:n,isOpen:i,toggle:s}),g.jsx(Ue,{divider:!0}),g.jsxs(Ue,{className:"dropdown-item--danger",onClick:l,children:[g.jsx(je,{icon:lC,fixedWidth:!0})," Delete short URL"]}),g.jsx(e,{shortUrl:n,isOpen:a,toggle:c})]})},Q5="shlink/shortUrlCreation",PN={saving:!1,saved:!1,error:!1},yge=e=>rr(`${Q5}/createShortUrl`,(t,{getState:n})=>e(n).createShortUrl(t)),_ge=e=>{const{reducer:t,actions:n}=Yn({name:Q5,initialState:PN,reducers:{resetCreateShortUrl:()=>PN},extraReducers:i=>{i.addCase(e.pending,()=>({saving:!0,saved:!1,error:!1})),i.addCase(e.rejected,(o,{error:s})=>({saving:!1,saved:!1,error:!0,errorData:ro(s)})),i.addCase(e.fulfilled,(o,{payload:s})=>({result:s,saving:!1,saved:!0,error:!1}))}}),{resetCreateShortUrl:r}=n;return{reducer:t,resetCreateShortUrl:r}},kN="shlink/shortUrlDetail",MN={loading:!1,error:!1},bge=e=>{const t=rr(`${kN}/getShortUrlDetail`,async({shortCode:r,domain:i},{getState:o})=>{var l;const{shortUrlsList:s}=o();return((l=s==null?void 0:s.shortUrls)==null?void 0:l.data.find(c=>Ef(c,r,i)))??await e(o).getShortUrl(r,i)}),{reducer:n}=Yn({name:kN,initialState:MN,reducers:{},extraReducers:r=>{r.addCase(t.pending,()=>({loading:!0,error:!1})),r.addCase(t.rejected,(i,{error:o})=>({loading:!1,error:!0,errorData:ro(o)})),r.addCase(t.fulfilled,(i,{payload:o})=>({...MN,shortUrl:o}))}});return{reducer:n,getShortUrlDetail:t}},J5="shlink/shortUrlEdition",wge={saving:!1,saved:!1,error:!1},xge=e=>rr(`${J5}/editShortUrl`,({shortCode:t,domain:n,data:r},{getState:i})=>{const{updateShortUrl:o}=e(i);return o(t,n,r)}),Sge=e=>Yn({name:J5,initialState:wge,reducers:{},extraReducers:t=>{t.addCase(e.pending,n=>({...n,saving:!0,error:!1,saved:!1})),t.addCase(e.rejected,(n,{error:r})=>({...n,saving:!1,error:!0,saved:!1,errorData:ro(r)})),t.addCase(e.fulfilled,(n,{payload:r})=>({shortUrl:r,saving:!1,error:!1,saved:!0}))}});var Cge={prefix:"fab",iconName:"apple",icon:[384,512,[],"f179","M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z"]},Ege={prefix:"fab",iconName:"android",icon:[576,512,[],"f17b","M420.55,301.93a24,24,0,1,1,24-24,24,24,0,0,1-24,24m-265.1,0a24,24,0,1,1,24-24,24,24,0,0,1-24,24m273.7-144.48,47.94-83a10,10,0,1,0-17.27-10h0l-48.54,84.07a301.25,301.25,0,0,0-246.56,0L116.18,64.45a10,10,0,1,0-17.27,10h0l47.94,83C64.53,202.22,8.24,285.55,0,384H576c-8.24-98.45-64.54-181.78-146.85-226.55"]};const e8=e=>g.jsx(B5,{type:"checkbox",...e});function Tge(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,o2(e,t)}function o2(e,t){return o2=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},o2(e,t)}function Oge(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function RN(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Pge(e,t,n){return e===t?!0:e.correspondingElement?e.correspondingElement.classList.contains(n):e.classList.contains(n)}function kge(e,t,n){if(e===t)return!0;for(;e.parentNode||e.host;){if(e.parentNode&&Pge(e,t,n))return!0;e=e.parentNode||e.host}return e}function Mge(e){return document.documentElement.clientWidth<=e.clientX||document.documentElement.clientHeight<=e.clientY}var Rge=function(){if(!(typeof window>"u"||typeof window.addEventListener!="function")){var t=!1,n=Object.defineProperty({},"passive",{get:function(){t=!0}}),r=function(){};return window.addEventListener("testPassiveEventSupport",r,n),window.removeEventListener("testPassiveEventSupport",r,n),t}};function Nge(e){return e===void 0&&(e=0),function(){return++e}}var Lge=Nge(),s2,Dp={},L1={},Dge=["touchstart","touchmove"],Age="ignore-react-onclickoutside";function NN(e,t){var n=null,r=Dge.indexOf(t)!==-1;return r&&s2&&(n={passive:!e.props.preventDefault}),n}function S_(e,t){var n,r,i=e.displayName||e.name||"Component";return r=n=function(o){Tge(s,o);function s(l){var c;return c=o.call(this,l)||this,c.__outsideClickHandler=function(f){if(typeof c.__clickOutsideHandlerProp=="function"){c.__clickOutsideHandlerProp(f);return}var h=c.getInstance();if(typeof h.props.handleClickOutside=="function"){h.props.handleClickOutside(f);return}if(typeof h.handleClickOutside=="function"){h.handleClickOutside(f);return}throw new Error("WrappedComponent: "+i+" lacks a handleClickOutside(event) function for processing outside click events.")},c.__getComponentNode=function(){var f=c.getInstance();return t&&typeof t.setClickOutsideRef=="function"?t.setClickOutsideRef()(f):typeof f.setClickOutsideRef=="function"?f.setClickOutsideRef():Id.findDOMNode(f)},c.enableOnClickOutside=function(){if(!(typeof document>"u"||L1[c._uid])){typeof s2>"u"&&(s2=Rge()),L1[c._uid]=!0;var f=c.props.eventTypes;f.forEach||(f=[f]),Dp[c._uid]=function(h){if(c.componentNode!==null&&(c.props.preventDefault&&h.preventDefault(),c.props.stopPropagation&&h.stopPropagation(),!(c.props.excludeScrollbar&&Mge(h)))){var p=h.composed&&h.composedPath&&h.composedPath().shift()||h.target;kge(p,c.componentNode,c.props.outsideClickIgnoreClass)===document&&c.__outsideClickHandler(h)}},f.forEach(function(h){document.addEventListener(h,Dp[c._uid],NN(RN(c),h))})}},c.disableOnClickOutside=function(){delete L1[c._uid];var f=Dp[c._uid];if(f&&typeof document<"u"){var h=c.props.eventTypes;h.forEach||(h=[h]),h.forEach(function(p){return document.removeEventListener(p,f,NN(RN(c),p))}),delete Dp[c._uid]}},c.getRef=function(f){return c.instanceRef=f},c._uid=Lge(),c}var a=s.prototype;return a.getInstance=function(){if(e.prototype&&!e.prototype.isReactComponent)return this;var c=this.instanceRef;return c.getInstance?c.getInstance():c},a.componentDidMount=function(){if(!(typeof document>"u"||!document.createElement)){var c=this.getInstance();if(t&&typeof t.handleClickOutside=="function"&&(this.__clickOutsideHandlerProp=t.handleClickOutside(c),typeof this.__clickOutsideHandlerProp!="function"))throw new Error("WrappedComponent: "+i+" lacks a function for processing outside click events specified by the handleClickOutside config option.");this.componentNode=this.__getComponentNode(),!this.props.disableOnClickOutside&&this.enableOnClickOutside()}},a.componentDidUpdate=function(){this.componentNode=this.__getComponentNode()},a.componentWillUnmount=function(){this.disableOnClickOutside()},a.render=function(){var c=this.props;c.excludeScrollbar;var f=Oge(c,["excludeScrollbar"]);return e.prototype&&e.prototype.isReactComponent?f.ref=this.getRef:f.wrappedRef=this.getRef,f.disableOnClickOutside=this.disableOnClickOutside,f.enableOnClickOutside=this.enableOnClickOutside,V.createElement(e,f)},s}(V.Component),n.displayName="OnClickOutside("+i+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:t&&t.excludeScrollbar||!1,outsideClickIgnoreClass:Age,preventDefault:!1,stopPropagation:!1},n.getClass=function(){return e.getClass?e.getClass():e},r}var t8=V.createContext(),n8=V.createContext();function jge(e){var t=e.children,n=V.useState(null),r=n[0],i=n[1],o=V.useRef(!1);V.useEffect(function(){return function(){o.current=!0}},[]);var s=V.useCallback(function(a){o.current||i(a)},[]);return V.createElement(t8.Provider,{value:r},V.createElement(n8.Provider,{value:s},t))}var r8=function(t){return Array.isArray(t)?t[0]:t},i8=function(t){if(typeof t=="function"){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=l2(e);if(t){var i=l2(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Hge(this,n)}}function a8(e){return function(t){if(Array.isArray(t))return D1(t)}(e)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||function(t,n){if(t){if(typeof t=="string")return D1(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return D1(t,n)}}(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function D1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(o=T1(e,t.slice(0,e.length),new Date)),is(o)||(o=new Date(e))),is(o)&&a?o:null)}function is(e,t){return t=t||new Date("1/1/1000"),a5(e)&&!Gr(e,t)}function on(e,t,n){if(n==="en")return yo(e,t,{awareOfUnicodeTokens:!0});var r=Ds(n);return n&&!r&&console.warn('A locale object was not found for the provided string ["'.concat(n,'"].')),!r&&Va()&&Ds(Va())&&(r=Ds(Va())),yo(e,t,{locale:r||null,awareOfUnicodeTokens:!0})}function A1(e,t){var n=t.dateFormat,r=t.locale;return e&&on(e,Array.isArray(n)?n[0]:n,r)||""}function BN(e,t){var n=t.hour,r=n===void 0?0:n,i=t.minute,o=i===void 0?0:i,s=t.second;return Tf(Of(Jhe(e,s===void 0?0:s),o),r)}function Gge(e,t){var n=t&&Ds(t)||Va()&&Ds(Va());return uce(e,n?{locale:n}:null)}function Zge(e,t){return on(e,"ddd",t)}function Kge(e){return Lr(e)}function BE(e,t,n){var r=Ds(t||Va());return s5(e,{locale:r,weekStartsOn:n})}function Ua(e){return Zae(e)}function Ju(e){return Kae(e)}function Xge(e){return Uw(e)}function l8(e,t){return e&&t?Ihe(e,t):!e&&!t}function ys(e,t){return e&&t?Ahe(e,t):!e&&!t}function ry(e,t){return e&&t?jhe(e,t):!e&&!t}function pr(e,t){return e&&t?Uae(e,t):!e&&!t}function _s(e,t){return e&&t?g5(e,t):!e&&!t}function ig(e,t,n){var r,i=Lr(t),o=il(n);try{r=zc(e,{start:i,end:o})}catch{r=!1}return r}function Va(){return(typeof window<"u"?window:globalThis).__localeId__}function Ds(e){if(typeof e=="string"){var t=typeof window<"u"?window:globalThis;return t.__localeData__?t.__localeData__[e]:null}return e}function c8(e,t){return on(Yi(dn(),e),"LLLL",t)}function u8(e,t){return on(Yi(dn(),e),"LLL",t)}function Qge(e,t){return on(Qu(dn(),e),"QQQ",t)}function E_(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate,i=t.excludeDates,o=t.excludeDateIntervals,s=t.includeDates,a=t.includeDateIntervals,l=t.filterDate;return T_(e,{minDate:n,maxDate:r})||i&&i.some(function(c){return pr(e,c)})||o&&o.some(function(c){var f=c.start,h=c.end;return zc(e,{start:f,end:h})})||s&&!s.some(function(c){return pr(e,c)})||a&&!a.some(function(c){var f=c.start,h=c.end;return zc(e,{start:f,end:h})})||l&&!l(dn(e))||!1}function zE(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.excludeDates,r=t.excludeDateIntervals;return r&&r.length>0?r.some(function(i){var o=i.start,s=i.end;return zc(e,{start:o,end:s})}):n&&n.some(function(i){return pr(e,i)})||!1}function Jge(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate,i=t.excludeDates,o=t.includeDates,s=t.filterDate;return T_(e,{minDate:n,maxDate:r})||i&&i.some(function(a){return ys(e,a)})||o&&!o.some(function(a){return ys(e,a)})||s&&!s(dn(e))||!1}function eve(e,t,n,r){var i=dt(e),o=lr(e),s=dt(t),a=lr(t),l=dt(r);return i===s&&i===l?o<=n&&n<=a:i=n||li:void 0}function tve(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate,i=t.excludeDates,o=t.includeDates,s=t.filterDate;return T_(e,{minDate:n,maxDate:r})||i&&i.some(function(a){return ry(e,a)})||o&&!o.some(function(a){return ry(e,a)})||s&&!s(dn(e))||!1}function nve(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate,i=new Date(e,0,1);return T_(i,{minDate:n,maxDate:r})||!1}function rve(e,t,n,r){var i=dt(e),o=zw(e),s=dt(t),a=zw(t),l=dt(r);return i===s&&i===l?o<=n&&n<=a:i=n||li:void 0}function T_(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.maxDate;return n&&xd(e,n)<0||r&&xd(e,r)>0}function zN(e,t){return t.some(function(n){return Ei(n)===Ei(e)&&Ti(n)===Ti(e)})}function UN(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.excludeTimes,r=t.includeTimes,i=t.filterTime;return n&&zN(e,n)||r&&!zN(e,r)||i&&!i(e)||!1}function VN(e,t){var n=t.minTime,r=t.maxTime;if(!n||!r)throw new Error("Both minTime and maxTime props required");var i,o=dn(),s=Tf(Of(o,Ti(e)),Ei(e)),a=Tf(Of(o,Ti(n)),Ei(n)),l=Tf(Of(o,Ti(r)),Ei(r));try{i=!zc(s,{start:a,end:l})}catch{i=!1}return i}function HN(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.includeDates,i=Cd(e,1);return n&&Sd(n,i)>0||r&&r.every(function(o){return Sd(o,i)>0})||!1}function WN(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.maxDate,r=t.includeDates,i=no(e,1);return n&&Sd(i,n)>0||r&&r.every(function(o){return Sd(i,o)>0})||!1}function YN(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.minDate,r=t.includeDates,i=Ed(e,1);return n&&mv(n,i)>0||r&&r.every(function(o){return mv(o,i)>0})||!1}function qN(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.maxDate,r=t.includeDates,i=$c(e,1);return n&&mv(i,n)>0||r&&r.every(function(o){return mv(i,o)>0})||!1}function f8(e){var t=e.minDate,n=e.includeDates;if(n&&t){var r=n.filter(function(i){return xd(i,t)>=0});return H3(r)}return n?H3(n):t}function d8(e){var t=e.maxDate,n=e.includeDates;if(n&&t){var r=n.filter(function(i){return xd(i,t)<=0});return V3(r)}return n?V3(n):t}function GN(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"react-datepicker__day--highlighted",n=new Map,r=0,i=e.length;r1&&arguments[1]!==void 0?arguments[1]:12,n=Math.ceil(dt(e)/t)*t,r=n-(t-1);return{startPeriod:r,endPeriod:n}}function ove(e,t,n,r){for(var i=[],o=0;o<2*t+1;o++){var s=e+t-o,a=!0;n&&(a=dt(n)<=s),r&&a&&(a=dt(r)>=s),a&&i.push(s)}return i}var sve=S_(function(e){Rn(n,U.Component);var t=Nn(n);function n(r){var i;kn(this,n),re(le(i=t.call(this,r)),"renderOptions",function(){var l=i.props.year,c=i.state.yearsList.map(function(p){return U.createElement("div",{className:l===p?"react-datepicker__year-option react-datepicker__year-option--selected_year":"react-datepicker__year-option",key:p,onClick:i.onChange.bind(le(i),p),"aria-selected":l===p?"true":void 0},l===p?U.createElement("span",{className:"react-datepicker__year-option--selected"},"✓"):"",p)}),f=i.props.minDate?dt(i.props.minDate):null,h=i.props.maxDate?dt(i.props.maxDate):null;return h&&i.state.yearsList.find(function(p){return p===h})||c.unshift(U.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:i.incrementYears},U.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),f&&i.state.yearsList.find(function(p){return p===f})||c.push(U.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:i.decrementYears},U.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),c}),re(le(i),"onChange",function(l){i.props.onChange(l)}),re(le(i),"handleClickOutside",function(){i.props.onCancel()}),re(le(i),"shiftYears",function(l){var c=i.state.yearsList.map(function(f){return f+l});i.setState({yearsList:c})}),re(le(i),"incrementYears",function(){return i.shiftYears(1)}),re(le(i),"decrementYears",function(){return i.shiftYears(-1)});var o=r.yearDropdownItemNumber,s=r.scrollableYearDropdown,a=o||(s?10:5);return i.state={yearsList:ove(i.props.year,a,i.props.minDate,i.props.maxDate)},i.dropdownRef=V.createRef(),i}return Mn(n,[{key:"componentDidMount",value:function(){var r=this.dropdownRef.current;r&&(r.scrollTop=r.scrollHeight/2-r.clientHeight/2)}},{key:"render",value:function(){var r=me({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return U.createElement("div",{className:r,ref:this.dropdownRef},this.renderOptions())}}]),n}()),ave=function(e){Rn(n,U.Component);var t=Nn(n);function n(){var r;kn(this,n);for(var i=arguments.length,o=new Array(i),s=0;s0&&arguments[0]!==void 0?arguments[0]:{},l=!1;r.getTabIndex()===0&&!a.isInputFocused&&r.isSameDay(r.props.preSelection)&&(document.activeElement&&document.activeElement!==document.body||(l=!0),r.props.inline&&!r.props.shouldFocusDayInline&&(l=!1),r.props.containerRef&&r.props.containerRef.current&&r.props.containerRef.current.contains(document.activeElement)&&document.activeElement.classList.contains("react-datepicker__day")&&(l=!0)),l&&r.dayEl.current.focus({preventScroll:!0})}),re(le(r),"renderDayContents",function(){return r.props.monthShowsDuplicateDaysEnd&&r.isAfterMonth()||r.props.monthShowsDuplicateDaysStart&&r.isBeforeMonth()?null:r.props.renderDayContents?r.props.renderDayContents(X3(r.props.day),r.props.day):X3(r.props.day)}),re(le(r),"render",function(){return U.createElement("div",{ref:r.dayEl,className:r.getClassNames(r.props.day),onKeyDown:r.handleOnKeyDown,onClick:r.handleClick,onMouseEnter:r.handleMouseEnter,tabIndex:r.getTabIndex(),"aria-label":r.getAriaLabel(),role:"option","aria-disabled":r.isDisabled(),"aria-current":r.isCurrentDay()?"date":void 0,"aria-selected":r.isSelected()},r.renderDayContents())}),r}return Mn(n,[{key:"componentDidMount",value:function(){this.handleFocusDay()}},{key:"componentDidUpdate",value:function(r){this.handleFocusDay(r)}}]),n}(),pve=function(e){Rn(n,U.Component);var t=Nn(n);function n(){var r;kn(this,n);for(var i=arguments.length,o=new Array(i),s=0;s=6,m=!l&&!r.isWeekInMonth(h);if(p||m){if(!r.props.peekNextMonth)break;f=!0}}return a}),re(le(r),"onMonthClick",function(a,l){r.handleDayClick(Ua(Yi(r.props.day,l)),a)}),re(le(r),"handleMonthNavigation",function(a,l){r.isDisabled(l)||r.isExcluded(l)||(r.props.setPreSelection(l),r.MONTH_REFS[a].current&&r.MONTH_REFS[a].current.focus())}),re(le(r),"onMonthKeyDown",function(a,l){var c=a.key;if(!r.props.disabledKeyboardNavigation)switch(c){case"Enter":r.onMonthClick(a,l),r.props.setPreSelection(r.props.selected);break;case"ArrowRight":r.handleMonthNavigation(l===11?0:l+1,no(r.props.preSelection,1));break;case"ArrowLeft":r.handleMonthNavigation(l===0?11:l-1,Cd(r.props.preSelection,1))}}),re(le(r),"onQuarterClick",function(a,l){r.handleDayClick(Xge(Qu(r.props.day,l)),a)}),re(le(r),"getMonthClassNames",function(a){var l=r.props,c=l.day,f=l.startDate,h=l.endDate,p=l.selected,m=l.minDate,v=l.maxDate,y=l.preSelection,x=l.monthClassName,_=x?x(c):void 0;return me("react-datepicker__month-text","react-datepicker__month-".concat(a),_,{"react-datepicker__month--disabled":(m||v)&&Jge(Yi(c,a),r.props),"react-datepicker__month--selected":r.isSelectedMonth(c,a,p),"react-datepicker__month-text--keyboard-selected":lr(y)===a,"react-datepicker__month--in-range":eve(f,h,a,c),"react-datepicker__month--range-start":r.isRangeStartMonth(a),"react-datepicker__month--range-end":r.isRangeEndMonth(a),"react-datepicker__month-text--today":r.isCurrentMonth(c,a)})}),re(le(r),"getTabIndex",function(a){var l=lr(r.props.preSelection);return r.props.disabledKeyboardNavigation||a!==l?"-1":"0"}),re(le(r),"getAriaLabel",function(a){var l=r.props,c=l.chooseDayAriaLabelPrefix,f=c===void 0?"Choose":c,h=l.disabledDayAriaLabelPrefix,p=h===void 0?"Not available":h,m=l.day,v=Yi(m,a),y=r.isDisabled(v)||r.isExcluded(v)?p:f;return"".concat(y," ").concat(on(v,"MMMM yyyy"))}),re(le(r),"getQuarterClassNames",function(a){var l=r.props,c=l.day,f=l.startDate,h=l.endDate,p=l.selected,m=l.minDate,v=l.maxDate;return me("react-datepicker__quarter-text","react-datepicker__quarter-".concat(a),{"react-datepicker__quarter--disabled":(m||v)&&tve(Qu(c,a),r.props),"react-datepicker__quarter--selected":r.isSelectedQuarter(c,a,p),"react-datepicker__quarter--in-range":rve(f,h,a,c),"react-datepicker__quarter--range-start":r.isRangeStartQuarter(a),"react-datepicker__quarter--range-end":r.isRangeEndQuarter(a)})}),re(le(r),"renderMonths",function(){var a=r.props,l=a.showFullMonthYearPicker,c=a.showTwoColumnMonthYearPicker,f=a.showFourColumnMonthYearPicker,h=a.locale,p=a.day,m=a.selected;return(f?[[0,1,2,3],[4,5,6,7],[8,9,10,11]]:c?[[0,1],[2,3],[4,5],[6,7],[8,9],[10,11]]:[[0,1,2],[3,4,5],[6,7,8],[9,10,11]]).map(function(v,y){return U.createElement("div",{className:"react-datepicker__month-wrapper",key:y},v.map(function(x,_){return U.createElement("div",{ref:r.MONTH_REFS[x],key:_,onClick:function(w){r.onMonthClick(w,x)},onKeyDown:function(w){r.onMonthKeyDown(w,x)},tabIndex:r.getTabIndex(x),className:r.getMonthClassNames(x),role:"option","aria-label":r.getAriaLabel(x),"aria-current":r.isCurrentMonth(p,x)?"date":void 0,"aria-selected":r.isSelectedMonth(p,x,m)},l?c8(x,h):u8(x,h))}))})}),re(le(r),"renderQuarters",function(){var a=r.props,l=a.day,c=a.selected;return U.createElement("div",{className:"react-datepicker__quarter-wrapper"},[1,2,3,4].map(function(f,h){return U.createElement("div",{key:h,role:"option",onClick:function(p){r.onQuarterClick(p,f)},className:r.getQuarterClassNames(f),"aria-selected":r.isSelectedQuarter(l,f,c)},Qge(f,r.props.locale))}))}),re(le(r),"getClassNames",function(){var a=r.props;a.day;var l=a.selectingDate,c=a.selectsStart,f=a.selectsEnd,h=a.showMonthYearPicker,p=a.showQuarterYearPicker;return me("react-datepicker__month",{"react-datepicker__month--selecting-range":l&&(c||f)},{"react-datepicker__monthPicker":h},{"react-datepicker__quarterPicker":p})}),r}return Mn(n,[{key:"render",value:function(){var r=this.props,i=r.showMonthYearPicker,o=r.showQuarterYearPicker,s=r.day,a=r.ariaLabelPrefix,l=a===void 0?"month ":a;return U.createElement("div",{className:this.getClassNames(),onMouseLeave:this.handleMouseLeave,"aria-label":"".concat(l," ").concat(on(s,"yyyy-MM")),role:"listbox"},i?this.renderMonths():o?this.renderQuarters():this.renderWeeks())}}]),n}(),h8=function(e){Rn(n,U.Component);var t=Nn(n);function n(){var r;kn(this,n);for(var i=arguments.length,o=new Array(i),s=0;s0&&arguments[0]!==void 0?arguments[0]:{}).className||"").split(/\s+/);return bve.some(function(a){return s.indexOf(a)>=0})})(o.target)&&i.props.onDropdownFocus()}),re(le(i),"getDateInView",function(){var o=i.props,s=o.preSelection,a=o.selected,l=o.openToDate,c=f8(i.props),f=d8(i.props),h=dn(),p=l||a||s;return p||(c&&Gr(h,c)?c:f&&Hs(h,f)?f:h)}),re(le(i),"increaseMonth",function(){i.setState(function(o){var s=o.date;return{date:no(s,1)}},function(){return i.handleMonthChange(i.state.date)})}),re(le(i),"decreaseMonth",function(){i.setState(function(o){var s=o.date;return{date:Cd(s,1)}},function(){return i.handleMonthChange(i.state.date)})}),re(le(i),"handleDayClick",function(o,s,a){i.props.onSelect(o,s,a),i.props.setPreSelection&&i.props.setPreSelection(o)}),re(le(i),"handleDayMouseEnter",function(o){i.setState({selectingDate:o}),i.props.onDayMouseEnter&&i.props.onDayMouseEnter(o)}),re(le(i),"handleMonthMouseLeave",function(){i.setState({selectingDate:null}),i.props.onMonthMouseLeave&&i.props.onMonthMouseLeave()}),re(le(i),"handleYearChange",function(o){i.props.onYearChange&&i.props.onYearChange(o),i.props.adjustDateOnChange&&(i.props.onSelect&&i.props.onSelect(o),i.props.setOpen&&i.props.setOpen(!0)),i.props.setPreSelection&&i.props.setPreSelection(o)}),re(le(i),"handleMonthChange",function(o){i.props.onMonthChange&&i.props.onMonthChange(o),i.props.adjustDateOnChange&&(i.props.onSelect&&i.props.onSelect(o),i.props.setOpen&&i.props.setOpen(!0)),i.props.setPreSelection&&i.props.setPreSelection(o)}),re(le(i),"handleMonthYearChange",function(o){i.handleYearChange(o),i.handleMonthChange(o)}),re(le(i),"changeYear",function(o){i.setState(function(s){var a=s.date;return{date:Qv(a,o)}},function(){return i.handleYearChange(i.state.date)})}),re(le(i),"changeMonth",function(o){i.setState(function(s){var a=s.date;return{date:Yi(a,o)}},function(){return i.handleMonthChange(i.state.date)})}),re(le(i),"changeMonthYear",function(o){i.setState(function(s){var a=s.date;return{date:Qv(Yi(a,lr(o)),dt(o))}},function(){return i.handleMonthYearChange(i.state.date)})}),re(le(i),"header",function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:i.state.date,s=BE(o,i.props.locale,i.props.calendarStartDay),a=[];return i.props.showWeekNumbers&&a.push(U.createElement("div",{key:"W",className:"react-datepicker__day-name"},i.props.weekLabel||"#")),a.concat([0,1,2,3,4,5,6].map(function(l){var c=hl(s,l),f=i.formatWeekday(c,i.props.locale),h=i.props.weekDayClassName?i.props.weekDayClassName(c):void 0;return U.createElement("div",{key:l,className:me("react-datepicker__day-name",h)},f)}))}),re(le(i),"formatWeekday",function(o,s){return i.props.formatWeekDay?function(a,l,c){return l(on(a,"EEEE",c))}(o,i.props.formatWeekDay,s):i.props.useWeekdaysShort?function(a,l){return on(a,"EEE",l)}(o,s):function(a,l){return on(a,"EEEEEE",l)}(o,s)}),re(le(i),"decreaseYear",function(){i.setState(function(o){var s=o.date;return{date:Ed(s,i.props.showYearPicker?i.props.yearItemNumber:1)}},function(){return i.handleYearChange(i.state.date)})}),re(le(i),"renderPreviousButton",function(){if(!i.props.renderCustomHeader){var o;switch(!0){case i.props.showMonthYearPicker:o=YN(i.state.date,i.props);break;case i.props.showYearPicker:o=function(_){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},S=w.minDate,T=w.yearItemNumber,P=T===void 0?12:T,k=Mf(Ju(Ed(_,P)),P).endPeriod,N=S&&dt(S);return N&&N>k||!1}(i.state.date,i.props);break;default:o=HN(i.state.date,i.props)}if((i.props.forceShowMonthNavigation||i.props.showDisabledMonthNavigation||!o)&&!i.props.showTimeSelectOnly){var s=["react-datepicker__navigation","react-datepicker__navigation--previous"],a=i.decreaseMonth;(i.props.showMonthYearPicker||i.props.showQuarterYearPicker||i.props.showYearPicker)&&(a=i.decreaseYear),o&&i.props.showDisabledMonthNavigation&&(s.push("react-datepicker__navigation--previous--disabled"),a=null);var l=i.props.showMonthYearPicker||i.props.showQuarterYearPicker||i.props.showYearPicker,c=i.props,f=c.previousMonthButtonLabel,h=c.previousYearButtonLabel,p=i.props,m=p.previousMonthAriaLabel,v=m===void 0?typeof f=="string"?f:"Previous Month":m,y=p.previousYearAriaLabel,x=y===void 0?typeof h=="string"?h:"Previous Year":y;return U.createElement("button",{type:"button",className:s.join(" "),onClick:a,onKeyDown:i.props.handleOnKeyDown,"aria-label":l?x:v},U.createElement("span",{className:["react-datepicker__navigation-icon","react-datepicker__navigation-icon--previous"].join(" ")},l?i.props.previousYearButtonLabel:i.props.previousMonthButtonLabel))}}}),re(le(i),"increaseYear",function(){i.setState(function(o){var s=o.date;return{date:$c(s,i.props.showYearPicker?i.props.yearItemNumber:1)}},function(){return i.handleYearChange(i.state.date)})}),re(le(i),"renderNextButton",function(){if(!i.props.renderCustomHeader){var o;switch(!0){case i.props.showMonthYearPicker:o=qN(i.state.date,i.props);break;case i.props.showYearPicker:o=function(_){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},S=w.maxDate,T=w.yearItemNumber,P=T===void 0?12:T,k=Mf($c(_,P),P).startPeriod,N=S&&dt(S);return N&&N0&&arguments[0]!==void 0?arguments[0]:i.state.date,s=["react-datepicker__current-month"];return i.props.showYearDropdown&&s.push("react-datepicker__current-month--hasYearDropdown"),i.props.showMonthDropdown&&s.push("react-datepicker__current-month--hasMonthDropdown"),i.props.showMonthYearDropdown&&s.push("react-datepicker__current-month--hasMonthYearDropdown"),U.createElement("div",{className:s.join(" ")},on(o,i.props.dateFormat,i.props.locale))}),re(le(i),"renderYearDropdown",function(){var o=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(i.props.showYearDropdown&&!o)return U.createElement(ave,{adjustDateOnChange:i.props.adjustDateOnChange,date:i.state.date,onSelect:i.props.onSelect,setOpen:i.props.setOpen,dropdownMode:i.props.dropdownMode,onChange:i.changeYear,minDate:i.props.minDate,maxDate:i.props.maxDate,year:dt(i.state.date),scrollableYearDropdown:i.props.scrollableYearDropdown,yearDropdownItemNumber:i.props.yearDropdownItemNumber})}),re(le(i),"renderMonthDropdown",function(){var o=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(i.props.showMonthDropdown&&!o)return U.createElement(cve,{dropdownMode:i.props.dropdownMode,locale:i.props.locale,onChange:i.changeMonth,month:lr(i.state.date),useShortMonthInDropdown:i.props.useShortMonthInDropdown})}),re(le(i),"renderMonthYearDropdown",function(){var o=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(i.props.showMonthYearDropdown&&!o)return U.createElement(dve,{dropdownMode:i.props.dropdownMode,locale:i.props.locale,dateFormat:i.props.dateFormat,onChange:i.changeMonthYear,minDate:i.props.minDate,maxDate:i.props.maxDate,date:i.state.date,scrollableMonthYearDropdown:i.props.scrollableMonthYearDropdown})}),re(le(i),"renderTodayButton",function(){if(i.props.todayButton&&!i.props.showTimeSelectOnly)return U.createElement("div",{className:"react-datepicker__today-button",onClick:function(o){return i.props.onSelect(Lr(dn()),o)}},i.props.todayButton)}),re(le(i),"renderDefaultHeader",function(o){var s=o.monthDate,a=o.i;return U.createElement("div",{className:"react-datepicker__header ".concat(i.props.showTimeSelect?"react-datepicker__header--has-time-select":"")},i.renderCurrentMonth(s),U.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(i.props.dropdownMode),onFocus:i.handleDropdownFocus},i.renderMonthDropdown(a!==0),i.renderMonthYearDropdown(a!==0),i.renderYearDropdown(a!==0)),U.createElement("div",{className:"react-datepicker__day-names"},i.header(s)))}),re(le(i),"renderCustomHeader",function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=o.monthDate,a=o.i;if(i.props.showTimeSelect&&!i.state.monthContainer||i.props.showTimeSelectOnly)return null;var l=HN(i.state.date,i.props),c=WN(i.state.date,i.props),f=YN(i.state.date,i.props),h=qN(i.state.date,i.props),p=!i.props.showMonthYearPicker&&!i.props.showQuarterYearPicker&&!i.props.showYearPicker;return U.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:i.props.onDropdownFocus},i.props.renderCustomHeader(jN(jN({},i.state),{},{customHeaderCount:a,monthDate:s,changeMonth:i.changeMonth,changeYear:i.changeYear,decreaseMonth:i.decreaseMonth,increaseMonth:i.increaseMonth,decreaseYear:i.decreaseYear,increaseYear:i.increaseYear,prevMonthButtonDisabled:l,nextMonthButtonDisabled:c,prevYearButtonDisabled:f,nextYearButtonDisabled:h})),p&&U.createElement("div",{className:"react-datepicker__day-names"},i.header(s)))}),re(le(i),"renderYearHeader",function(){var o=i.state.date,s=i.props,a=s.showYearPicker,l=Mf(o,s.yearItemNumber),c=l.startPeriod,f=l.endPeriod;return U.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},a?"".concat(c," - ").concat(f):dt(o))}),re(le(i),"renderHeader",function(o){switch(!0){case i.props.renderCustomHeader!==void 0:return i.renderCustomHeader(o);case(i.props.showMonthYearPicker||i.props.showQuarterYearPicker||i.props.showYearPicker):return i.renderYearHeader(o);default:return i.renderDefaultHeader(o)}}),re(le(i),"renderMonths",function(){if(!i.props.showTimeSelectOnly&&!i.props.showYearPicker){for(var o=[],s=i.props.showPreviousMonths?i.props.monthsShown-1:0,a=Cd(i.state.date,s),l=0;l0;o.push(U.createElement("div",{key:h,ref:function(v){i.monthContainer=v},className:"react-datepicker__month-container"},i.renderHeader({monthDate:f,i:l}),U.createElement(gve,{chooseDayAriaLabelPrefix:i.props.chooseDayAriaLabelPrefix,disabledDayAriaLabelPrefix:i.props.disabledDayAriaLabelPrefix,weekAriaLabelPrefix:i.props.weekAriaLabelPrefix,ariaLabelPrefix:i.props.monthAriaLabelPrefix,onChange:i.changeMonthYear,day:f,dayClassName:i.props.dayClassName,calendarStartDay:i.props.calendarStartDay,monthClassName:i.props.monthClassName,onDayClick:i.handleDayClick,handleOnKeyDown:i.props.handleOnDayKeyDown,onDayMouseEnter:i.handleDayMouseEnter,onMouseLeave:i.handleMonthMouseLeave,onWeekSelect:i.props.onWeekSelect,orderInDisplay:l,formatWeekNumber:i.props.formatWeekNumber,locale:i.props.locale,minDate:i.props.minDate,maxDate:i.props.maxDate,excludeDates:i.props.excludeDates,excludeDateIntervals:i.props.excludeDateIntervals,highlightDates:i.props.highlightDates,selectingDate:i.state.selectingDate,includeDates:i.props.includeDates,includeDateIntervals:i.props.includeDateIntervals,inline:i.props.inline,shouldFocusDayInline:i.props.shouldFocusDayInline,fixedHeight:i.props.fixedHeight,filterDate:i.props.filterDate,preSelection:i.props.preSelection,setPreSelection:i.props.setPreSelection,selected:i.props.selected,selectsStart:i.props.selectsStart,selectsEnd:i.props.selectsEnd,selectsRange:i.props.selectsRange,selectsDisabledDaysInRange:i.props.selectsDisabledDaysInRange,showWeekNumbers:i.props.showWeekNumbers,startDate:i.props.startDate,endDate:i.props.endDate,peekNextMonth:i.props.peekNextMonth,setOpen:i.props.setOpen,shouldCloseOnSelect:i.props.shouldCloseOnSelect,renderDayContents:i.props.renderDayContents,disabledKeyboardNavigation:i.props.disabledKeyboardNavigation,showMonthYearPicker:i.props.showMonthYearPicker,showFullMonthYearPicker:i.props.showFullMonthYearPicker,showTwoColumnMonthYearPicker:i.props.showTwoColumnMonthYearPicker,showFourColumnMonthYearPicker:i.props.showFourColumnMonthYearPicker,showYearPicker:i.props.showYearPicker,showQuarterYearPicker:i.props.showQuarterYearPicker,isInputFocused:i.props.isInputFocused,containerRef:i.containerRef,monthShowsDuplicateDaysEnd:p,monthShowsDuplicateDaysStart:m})))}return o}}),re(le(i),"renderYears",function(){if(!i.props.showTimeSelectOnly)return i.props.showYearPicker?U.createElement("div",{className:"react-datepicker__year--container"},i.renderHeader(),U.createElement(vve,C_({onDayClick:i.handleDayClick,date:i.state.date},i.props))):void 0}),re(le(i),"renderTimeSection",function(){if(i.props.showTimeSelect&&(i.state.monthContainer||i.props.showTimeSelectOnly))return U.createElement(h8,{selected:i.props.selected,openToDate:i.props.openToDate,onChange:i.props.onTimeChange,timeClassName:i.props.timeClassName,format:i.props.timeFormat,includeTimes:i.props.includeTimes,intervals:i.props.timeIntervals,minTime:i.props.minTime,maxTime:i.props.maxTime,excludeTimes:i.props.excludeTimes,filterTime:i.props.filterTime,timeCaption:i.props.timeCaption,todayButton:i.props.todayButton,showMonthDropdown:i.props.showMonthDropdown,showMonthYearDropdown:i.props.showMonthYearDropdown,showYearDropdown:i.props.showYearDropdown,withPortal:i.props.withPortal,monthRef:i.state.monthContainer,injectTimes:i.props.injectTimes,locale:i.props.locale,handleOnKeyDown:i.props.handleOnKeyDown,showTimeSelectOnly:i.props.showTimeSelectOnly})}),re(le(i),"renderInputTimeSection",function(){var o=new Date(i.props.selected),s=is(o)&&i.props.selected?"".concat(ZN(o.getHours()),":").concat(ZN(o.getMinutes())):"";if(i.props.showTimeInput)return U.createElement(yve,{date:o,timeString:s,timeInputLabel:i.props.timeInputLabel,onChange:i.props.onTimeChange,customTimeInput:i.props.customTimeInput})}),i.containerRef=U.createRef(),i.state={date:i.getDateInView(),selectingDate:null,monthContainer:null},i}return Mn(n,[{key:"componentDidMount",value:function(){var r=this;this.props.showTimeSelect&&(this.assignMonthContainer=void r.setState({monthContainer:r.monthContainer}))}},{key:"componentDidUpdate",value:function(r){this.props.preSelection&&!pr(this.props.preSelection,r.preSelection)?this.setState({date:this.props.preSelection}):this.props.openToDate&&!pr(this.props.openToDate,r.openToDate)&&this.setState({date:this.props.openToDate})}},{key:"render",value:function(){var r=this.props.container||_ve;return U.createElement("div",{ref:this.containerRef},U.createElement(r,{className:me("react-datepicker",this.props.className,{"react-datepicker--time-only":this.props.showTimeSelectOnly}),showPopperArrow:this.props.showPopperArrow,arrowProps:this.props.arrowProps},this.renderPreviousButton(),this.renderNextButton(),this.renderMonths(),this.renderYears(),this.renderTodayButton(),this.renderTimeSection(),this.renderInputTimeSection(),this.props.children))}}],[{key:"defaultProps",get:function(){return{onDropdownFocus:function(){},monthsShown:1,monthSelectedIn:0,forceShowMonthNavigation:!1,timeCaption:"Time",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",customTimeInput:null,yearItemNumber:12}}}]),n}(),p8=function(e){Rn(n,U.Component);var t=Nn(n);function n(r){var i;return kn(this,n),(i=t.call(this,r)).el=document.createElement("div"),i}return Mn(n,[{key:"componentDidMount",value:function(){this.portalRoot=(this.props.portalHost||document).getElementById(this.props.portalId),this.portalRoot||(this.portalRoot=document.createElement("div"),this.portalRoot.setAttribute("id",this.props.portalId),(this.props.portalHost||document.body).appendChild(this.portalRoot)),this.portalRoot.appendChild(this.el)}},{key:"componentWillUnmount",value:function(){this.portalRoot.removeChild(this.el)}},{key:"render",value:function(){return $a.createPortal(this.props.children,this.el)}}]),n}(),xve=function(e){return!e.disabled&&e.tabIndex!==-1},Sve=function(e){Rn(n,U.Component);var t=Nn(n);function n(r){var i;return kn(this,n),re(le(i=t.call(this,r)),"getTabChildren",function(){return Array.prototype.slice.call(i.tabLoopRef.current.querySelectorAll("[tabindex], a, button, input, select, textarea"),1,-1).filter(xve)}),re(le(i),"handleFocusStart",function(o){var s=i.getTabChildren();s&&s.length>1&&s[s.length-1].focus()}),re(le(i),"handleFocusEnd",function(o){var s=i.getTabChildren();s&&s.length>1&&s[0].focus()}),i.tabLoopRef=U.createRef(),i}return Mn(n,[{key:"render",value:function(){return this.props.enableTabLoop?U.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},U.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:"0",onFocus:this.handleFocusStart}),this.props.children,U.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:"0",onFocus:this.handleFocusEnd})):this.props.children}}],[{key:"defaultProps",get:function(){return{enableTabLoop:!0}}}]),n}(),Cve=function(e){Rn(n,U.Component);var t=Nn(n);function n(){return kn(this,n),t.apply(this,arguments)}return Mn(n,[{key:"render",value:function(){var r,i=this.props,o=i.className,s=i.wrapperClassName,a=i.hidePopper,l=i.popperComponent,c=i.popperModifiers,f=i.popperPlacement,h=i.popperProps,p=i.targetComponent,m=i.enableTabLoop,v=i.popperOnKeyDown,y=i.portalId,x=i.portalHost;if(!a){var _=me("react-datepicker-popper",o);r=U.createElement(Uge,C_({modifiers:c,placement:f},h),function(S){var T=S.ref,P=S.style,k=S.placement,N=S.arrowProps;return U.createElement(Sve,{enableTabLoop:m},U.createElement("div",{ref:T,style:P,className:_,"data-placement":k,onKeyDown:v},U.cloneElement(l,{arrowProps:N})))})}this.props.popperContainer&&(r=U.createElement(this.props.popperContainer,{},r)),y&&!a&&(r=U.createElement(p8,{portalId:y,portalHost:x},r));var w=me("react-datepicker-wrapper",s);return U.createElement(jge,{className:"react-datepicker-manager"},U.createElement(Vge,null,function(S){var T=S.ref;return U.createElement("div",{ref:T,className:w},p)}),r)}}],[{key:"defaultProps",get:function(){return{hidePopper:!0,popperModifiers:[],popperProps:{},popperPlacement:"bottom-start"}}}]),n}(),Eve=S_(wve),Tve=function(e){Rn(n,U.Component);var t=Nn(n);function n(r){var i;return kn(this,n),re(le(i=t.call(this,r)),"getPreSelection",function(){return i.props.openToDate?i.props.openToDate:i.props.selectsEnd&&i.props.startDate?i.props.startDate:i.props.selectsStart&&i.props.endDate?i.props.endDate:dn()}),re(le(i),"calcInitialState",function(){var o,s=i.getPreSelection(),a=f8(i.props),l=d8(i.props),c=a&&Gr(s,Lr(a))?a:l&&Hs(s,il(l))?l:s;return{open:i.props.startOpen||!1,preventFocus:!1,preSelection:(o=i.props.selectsRange?i.props.startDate:i.props.selected)!==null&&o!==void 0?o:c,highlightDates:GN(i.props.highlightDates),focused:!1,shouldFocusDayInline:!1}}),re(le(i),"clearPreventFocusTimeout",function(){i.preventFocusTimeout&&clearTimeout(i.preventFocusTimeout)}),re(le(i),"setFocus",function(){i.input&&i.input.focus&&i.input.focus({preventScroll:!0})}),re(le(i),"setBlur",function(){i.input&&i.input.blur&&i.input.blur(),i.cancelFocusInput()}),re(le(i),"setOpen",function(o){var s=arguments.length>1&&arguments[1]!==void 0&&arguments[1];i.setState({open:o,preSelection:o&&i.state.open?i.state.preSelection:i.calcInitialState().preSelection,lastPreSelectChange:j1},function(){o||i.setState(function(a){return{focused:!!s&&a.focused}},function(){!s&&i.setBlur(),i.setState({inputValue:null})})})}),re(le(i),"inputOk",function(){return xE(i.state.preSelection)}),re(le(i),"isCalendarOpen",function(){return i.props.open===void 0?i.state.open&&!i.props.disabled&&!i.props.readOnly:i.props.open}),re(le(i),"handleFocus",function(o){i.state.preventFocus||(i.props.onFocus(o),i.props.preventOpenOnFocus||i.props.readOnly||i.setOpen(!0)),i.setState({focused:!0})}),re(le(i),"cancelFocusInput",function(){clearTimeout(i.inputFocusTimeout),i.inputFocusTimeout=null}),re(le(i),"deferFocusInput",function(){i.cancelFocusInput(),i.inputFocusTimeout=setTimeout(function(){return i.setFocus()},1)}),re(le(i),"handleDropdownFocus",function(){i.cancelFocusInput()}),re(le(i),"handleBlur",function(o){(!i.state.open||i.props.withPortal||i.props.showTimeInput)&&i.props.onBlur(o),i.setState({focused:!1})}),re(le(i),"handleCalendarClickOutside",function(o){i.props.inline||i.setOpen(!1),i.props.onClickOutside(o),i.props.withPortal&&o.preventDefault()}),re(le(i),"handleChange",function(){for(var o=arguments.length,s=new Array(o),a=0;a{const{className:t,isClearable:n,selected:r,dateFormat:i}=e,o=!n||$o(r),s=V.useRef();return g.jsxs("div",{className:"icon-input-container",children:[g.jsx(Tve,{...e,popperModifiers:[{name:"arrow",options:{padding:24}}],dateFormat:i??Pf,className:me("icon-input-container__input form-control",t),ref:s}),o&&g.jsx(je,{icon:Dpe,className:"icon-input-container__icon",onClick:()=>{var a;return(a=s.current)==null?void 0:a.input.focus()}})]})},Pve=e=>g.jsx(c2,{...e,dateFormat:LE,showTimeSelect:!0,timeIntervals:10});const kve=({icon:e,className:t,...n})=>{const r=dl(),i=me("icon-input-container__input",t);return g.jsxs("div",{className:"icon-input-container",children:[g.jsx(Ic,{className:i,innerRef:r,...n}),g.jsx(je,{icon:e,fixedWidth:!0,className:"icon-input-container__icon",onClick:()=>{var o;return(o=r.current)==null?void 0:o.focus()}})]})},I1=({children:e,infoTooltip:t,checked:n,onChange:r})=>g.jsxs("p",{children:[g.jsx(e8,{inline:!0,checked:n,className:t?"me-2":"",onChange:r,children:e}),t&&g.jsx(rg,{placement:"right",children:t})]});const Mve=({isOpen:e,toggle:t})=>g.jsxs(Vo,{isOpen:e,toggle:t,centered:!0,size:"lg",children:[g.jsx(io,{toggle:t,children:"Info"}),g.jsxs(Mi,{children:[g.jsxs("p",{children:["When the ",g.jsx("b",{children:g.jsx("i",{children:'"Use existing URL if found"'})})," checkbox is checked, the server will return an existing short URL if it matches provided params."]}),g.jsx("p",{children:"These are the checks performed by Shlink in order to determine if an existing short URL should be returned:"}),g.jsxs("ul",{children:[g.jsx("li",{children:"When only the long URL is provided: The most recent match will be returned, or a new short URL will be created if none is found."}),g.jsxs("li",{children:["When long URL and custom slug and/or domain are provided: Same as in previous case, but it will try to match the short URL using both the long URL and the slug, the long URL and the domain, or the three of them.",g.jsx("br",{}),"If the slug is being used by another long URL, an error will be returned."]}),g.jsx("li",{children:"When other params are provided: Same as in previous cases, but it will try to match existing short URLs with all provided data. If any of them does not match, a new short URL will be created"})]})]})]}),Rve=()=>{const[e,t]=hn();return g.jsxs(g.Fragment,{children:[g.jsx("span",{title:"What does this mean?",children:g.jsx(je,{icon:fC,style:{cursor:"pointer"},onClick:t})}),g.jsx(Mve,{isOpen:e,toggle:t})]})};const Nve=Dt(LZ,SZ(/ /g,"-")),F1=e=>typeof e=="string"?Ao(e):e,Lve=(e,t)=>({mode:n,saving:r,onSave:i,initialState:o,selectedServer:s})=>{const[a,l]=V.useState(o),c=()=>l(o),f=ki("deviceLongUrls",s),h=n==="edit",p=n==="create-basic",m=P=>l({...a,tags:P.map(Nve)}),v=(P,k)=>vi(P)?P:vi(k)?null:void 0,y=rh(async()=>i({...a,validSince:Ys(a.validSince)??null,validUntil:Ys(a.validUntil)??null,maxVisits:vi(a.maxVisits)?Number(a.maxVisits):null}).then(()=>!h&&c()).catch(()=>{}));V.useEffect(()=>{l(o)},[o]);const x=(P,k,N="text",D={},z={})=>g.jsx(vr,{...z,children:g.jsx(Ic,{id:P,type:N,placeholder:k,value:a[P]??"",onChange:D.onChange??(A=>l({...a,[P]:A.target.value})),...D})}),_=(P,k,N)=>{var D;return g.jsx(kve,{icon:N,id:P,type:"url",placeholder:k,value:((D=a.deviceLongUrls)==null?void 0:D[P])??"",onChange:z=>{var A;return l({...a,deviceLongUrls:{...a.deviceLongUrls??{},[P]:v(z.target.value,(A=o.deviceLongUrls)==null?void 0:A[P])}})}})},w=(P,k,N={})=>g.jsx(Pve,{selected:a[P]?F1(a[P]):null,placeholderText:k,isClearable:!0,onChange:D=>l({...a,[P]:D}),...N}),S=g.jsxs(g.Fragment,{children:[g.jsx(vr,{children:g.jsx(Ic,{bsSize:"lg",type:"url",placeholder:"URL to be shortened",required:!0,value:a.longUrl,onChange:P=>l({...a,longUrl:P.target.value})})}),g.jsxs(Qn,{children:[p&&x("customSlug","Custom slug","text",{bsSize:"lg"},{className:"col-lg-6"}),g.jsx("div",{className:p?"col-lg-6 mb-3":"col-12",children:g.jsx(e,{selectedTags:a.tags??[],onChange:m})})]})]}),T=ki("forwardQuery",s);return g.jsxs("form",{name:"shortUrlForm",className:"short-url-form",onSubmit:y,children:[p&&S,!p&&g.jsxs(g.Fragment,{children:[g.jsxs(Qn,{children:[g.jsx("div",{className:me("mb-3",{"col-sm-6":f,"col-12":!f}),children:g.jsx(cn,{title:"Main options",className:"mb-3",children:S})}),f&&g.jsx("div",{className:"col-sm-6 mb-3",children:g.jsxs(cn,{title:"Device-specific long URLs",children:[g.jsx(vr,{children:_("android","Android-specific redirection",Ege)}),g.jsx(vr,{children:_("ios","iOS-specific redirection",Cge)}),_("desktop","Desktop-specific redirection",zQ)]})})]}),g.jsxs(Qn,{children:[g.jsx("div",{className:"col-sm-6 mb-3",children:g.jsxs(cn,{title:"Customize the short URL",children:[x("title","Title","text",{onChange:({target:P})=>l({...a,title:v(P.value,o.title)})}),!h&&g.jsxs(g.Fragment,{children:[g.jsxs(Qn,{children:[g.jsx("div",{className:"col-lg-6",children:x("customSlug","Custom slug","text",{disabled:vi(a.shortCodeLength)})}),g.jsx("div",{className:"col-lg-6",children:x("shortCodeLength","Short code length","number",{min:4,disabled:vi(a.customSlug)})})]}),g.jsx(t,{value:a.domain,onChange:P=>l({...a,domain:P})})]})]})}),g.jsx("div",{className:"col-sm-6 mb-3",children:g.jsxs(cn,{title:"Limit access to the short URL",children:[x("maxVisits","Maximum number of visits allowed","number",{min:1}),g.jsx("div",{className:"mb-3",children:w("validSince","Enabled since...",{maxDate:a.validUntil?F1(a.validUntil):void 0})}),w("validUntil","Enabled until...",{minDate:a.validSince?F1(a.validSince):void 0})]})})]}),g.jsxs(Qn,{children:[g.jsx("div",{className:"col-sm-6 mb-3",children:g.jsxs(cn,{title:"Extra checks",children:[g.jsx(I1,{infoTooltip:"If checked, Shlink will try to reach the long URL, failing in case it's not publicly accessible.",checked:a.validateUrl,onChange:P=>l({...a,validateUrl:P}),children:"Validate URL"}),!h&&g.jsxs("p",{children:[g.jsx(e8,{inline:!0,className:"me-2",checked:a.findIfExists,onChange:P=>l({...a,findIfExists:P}),children:"Use existing URL if found"}),g.jsx(Rve,{})]})]})}),g.jsx("div",{className:"col-sm-6 mb-3",children:g.jsxs(cn,{title:"Configure behavior",children:[g.jsx(I1,{infoTooltip:"This short URL will be included in the robots.txt for your Shlink instance, allowing web crawlers (like Google) to index it.",checked:a.crawlable,onChange:P=>l({...a,crawlable:P}),children:"Make it crawlable"}),T&&g.jsx(I1,{infoTooltip:"When this short URL is visited, any query params appended to it will be forwarded to the long URL.",checked:a.forwardQuery,onChange:P=>l({...a,forwardQuery:P}),children:"Forward query params on redirect"})]})})]})]}),g.jsx("div",{className:"text-center",children:g.jsx(ht,{outline:!0,color:"primary",disabled:r||Wn(a.longUrl),className:"btn-xs-block",children:r?"Saving...":"Save"})})]})},Dve=({startDate:e=null,endDate:t=null,disabled:n=!1,onStartDateChange:r,onEndDateChange:i})=>g.jsxs("div",{className:"row",children:[g.jsx("div",{className:"col-md-6",children:g.jsx(c2,{selected:e,placeholderText:"Since...",isClearable:!0,maxDate:t??void 0,disabled:n,onChange:r})}),g.jsx("div",{className:"col-md-6",children:g.jsx(c2,{className:"mt-2 mt-md-0",selected:t,placeholderText:"Until...",isClearable:!0,minDate:e??void 0,disabled:n,onChange:o=>i(o&&il(o))})})]}),m8=({onDatesChange:e,initialDateRange:t,defaultText:n,disabled:r,updatable:i=!1})=>{const o=ey(t),[s,a]=V.useState(o?t:void 0),[l,c]=V.useState(o?void 0:t),f=p=>{a(P5(p)?sh:void 0),c(p),e(p)},h=p=>{a(p),c(void 0),e(M5(p))};return i&&Roe(()=>{const p=ey(t);p&&h(t),t&&!p&&f(t)},[t]),g.jsxs(Ho,{disabled:r,text:AE(s??l)??n,children:[g.jsx(H5,{allText:n,active:s,onChange:h}),g.jsx(Ue,{divider:!0}),g.jsx(Ue,{header:!0,children:"Custom:"}),g.jsx(Ue,{text:!0,children:g.jsx(Dve,{...l,onStartDateChange:p=>f({...l,startDate:p}),onEndDateChange:p=>f({...l,endDate:p})})})]})},Ave=({onChange:e,selected:t={},className:n,supportsDisabledFiltering:r})=>{const{excludeBots:i=!1,excludeMaxVisitsReached:o=!1,excludePastValidUntil:s=!1}=t,a=l=>()=>e({...t,[l]:!(t!=null&&t[l])});return g.jsxs(Ho,{text:"Filters",dropdownClassName:n,inline:!0,end:!0,minWidth:250,children:[g.jsx(Ue,{header:!0,children:"Visits:"}),g.jsx(Ue,{active:i,onClick:a("excludeBots"),children:"Ignore visits from bots"}),r&&g.jsxs(g.Fragment,{children:[g.jsx(Ue,{divider:!0}),g.jsx(Ue,{header:!0,children:"Short URLs:"}),g.jsx(Ue,{active:o,onClick:a("excludeMaxVisitsReached"),children:"Exclude with visits reached"}),g.jsx(Ue,{active:s,onClick:a("excludePastValidUntil"),children:"Exclude enabled in the past"})]}),g.jsx(Ue,{divider:!0}),g.jsx(Ue,{disabled:!vi(t),onClick:()=>e({excludeBots:!1,excludeMaxVisitsReached:!1,excludePastValidUntil:!1}),children:g.jsx("i",{children:"Clear filters"})})]})};const jve=(e,t)=>({selectedServer:n,className:r,shortUrlsAmount:i,order:o,handleOrderBy:s,settings:a})=>{var D;const[l,c]=x_(),{search:f,tags:h,startDate:p,endDate:m,excludeBots:v,excludeMaxVisitsReached:y,excludePastValidUntil:x,tagsMode:_="any"}=l,w=ki("filterDisabledUrls",n),S=Dt(({startDate:z,endDate:A})=>({startDate:Ys(z)??void 0,endDate:Ys(A)??void 0}),c),T=Dt(z=>Wn(z)?void 0:z,z=>c({search:z})),P=z=>c({tags:z}),k=ki("allTagsFiltering",n),N=Dt(()=>_==="any"?"all":"any",z=>c({tagsMode:z}));return g.jsxs("div",{className:me("short-urls-filtering-bar-container",r),children:[g.jsx(ih,{initialValue:f,onChange:T}),g.jsxs(Qd,{className:"mt-3",children:[g.jsx(t,{allowNew:!1,placeholder:"With tags...",selectedTags:h,onChange:P}),k&&h.length>1&&g.jsxs(g.Fragment,{children:[g.jsx(ht,{outline:!0,color:"secondary",onClick:N,id:"tagsModeBtn","aria-label":"Change tags mode",children:g.jsx(je,{className:"short-urls-filtering-bar__tags-icon",icon:_==="all"?eI:mQ})}),g.jsx(Er,{target:"tagsModeBtn",placement:"left",children:_==="all"?"With all the tags.":"With any of the tags."})]})]}),g.jsxs(Qn,{className:"flex-lg-row-reverse",children:[g.jsx("div",{className:"col-lg-8 col-xl-6 mt-3",children:g.jsxs("div",{className:"d-md-flex",children:[g.jsx("div",{className:"flex-fill",children:g.jsx(m8,{defaultText:"All short URLs",initialDateRange:k5(p,m),onDatesChange:S})}),g.jsx(Ave,{className:"ms-0 ms-md-2 mt-3 mt-md-0",selected:{excludeBots:v??((D=a.visits)==null?void 0:D.excludeBots),excludeMaxVisitsReached:y,excludePastValidUntil:x},onChange:c,supportsDisabledFiltering:w})]})}),g.jsx("div",{className:"col-6 col-lg-4 col-xl-6 mt-3",children:g.jsx(e,{amount:i})}),g.jsx("div",{className:"col-6 d-lg-none mt-3",children:g.jsx(fh,{prefixed:!1,items:U5,order:o,onChange:s})})]})]})};function Rf({currentOrder:e,field:t,className:n="ms-1"}){return!e.dir||e.field!==t?null:g.jsx(je,{icon:e.dir==="ASC"?aQ:_Q,className:n})}const Al=2,u2="...",g8=(e,t)=>{const n=QS(vj(Al,e-Al),kj(t-1,e+Al)+1);return e-Al>Al&&n.unshift(u2),e+Ale===u2,v8=e=>Td(e)?e:_n(e),y8=(e,t)=>Td(e)?`${e}_${t}`:`${e}`,Ive=({paginator:e,serverId:t,currentQueryString:n=""})=>{const{currentPage:r=0,pagesCount:i=0}=e??{},o=a=>`/server/${t}/list-short-urls/${a}${n}`;if(i<=1)return g.jsx("div",{className:"pb-3"});const s=()=>g8(r,i).map((a,l)=>g.jsx(Rs,{disabled:Td(a),active:r===a,children:g.jsx(Ns,{tag:Lt,to:o(a),children:v8(a)})},y8(a,l)));return g.jsxs(g_,{className:"sticky-card-paginator py-3",listClassName:"flex-wrap justify-content-center mb-0",children:[g.jsx(Rs,{disabled:r===1,children:g.jsx(Ns,{previous:!0,tag:Lt,to:o(r-1)})}),s(),g.jsx(Rs,{disabled:r>=i,children:g.jsx(Ns,{next:!0,tag:Lt,to:o(r+1)})})]})},Fve=(e,t)=>ra(({listShortUrls:n,shortUrlsList:r,selectedServer:i,settings:o})=>{var Z,ee,ie;const s=Ud(i),{page:a}=Xs(),l=Pn(),[c,f]=x_(),{tags:h,search:p,startDate:m,endDate:v,orderBy:y,tagsMode:x,excludeBots:_,excludePastValidUntil:w,excludeMaxVisitsReached:S}=c,[T,P]=V.useState(y??((Z=o.shortUrlsList)==null?void 0:Z.defaultOrdering)??IE),{pagination:k}=(r==null?void 0:r.shortUrls)??{},N=_??((ee=o.visits)==null?void 0:ee.excludeBots),D=ki("excludeBotsOnShortUrls",i),z=(oe,G)=>{f({orderBy:{field:oe,dir:G}}),P({field:oe,dir:G})},A=oe=>()=>z(oe,e_(oe,T.field,T.dir)),W=oe=>g.jsx(Rf,{currentOrder:T,field:oe}),Y=Dt(oe=>[...new Set([...h,oe])],oe=>f({tags:oe})),J=({field:oe,dir:G})=>D&&N&&oe==="visits"?{field:"nonBotVisits",dir:G}:{field:oe,dir:G};return V.useEffect(()=>{n({page:a,searchTerm:p,tags:h,startDate:m,endDate:v,orderBy:J(T),tagsMode:x,excludePastValidUntil:w,excludeMaxVisitsReached:S})},[a,p,h,m,v,T.field,T.dir,x,w,S]),g.jsxs(g.Fragment,{children:[g.jsx(t,{selectedServer:i,shortUrlsAmount:(ie=r.shortUrls)==null?void 0:ie.pagination.totalItems,order:T,handleOrderBy:z,settings:o,className:"mb-3"}),g.jsxs(Sr,{body:!0,className:"pb-0",children:[g.jsx(e,{selectedServer:i,shortUrlsList:r,orderByColumn:A,renderOrderIcon:W,onTagClick:Y}),g.jsx(Ive,{paginator:k,serverId:s,currentQueryString:l.search})]})]})},()=>[Xr.visits]);const $ve=e=>({orderByColumn:t,renderOrderIcon:n,shortUrlsList:r,onTagClick:i,selectedServer:o,className:s})=>{const{error:a,loading:l,shortUrls:c}=r,f=me({"short-urls-table__header-cell--with-action":!!t}),h=me("short-urls-table__header-cell",f),p=me("table table-hover responsive-table short-urls-table",s),m=()=>a?g.jsx("tr",{children:g.jsx("td",{colSpan:6,className:"text-center table-danger text-dark",children:"Something went wrong while loading short URLs :("})}):l?g.jsx("tr",{children:g.jsx("td",{colSpan:6,className:"text-center",children:"Loading..."})}):!l&&Wn(c==null?void 0:c.data)?g.jsx("tr",{children:g.jsx("td",{colSpan:6,className:"text-center",children:"No results found"})}):c==null?void 0:c.data.map(v=>g.jsx(e,{shortUrl:v,selectedServer:o,onTagClick:i},v.shortUrl));return g.jsxs("table",{className:p,children:[g.jsx("thead",{className:"responsive-table__header short-urls-table__header",children:g.jsxs("tr",{children:[g.jsxs("th",{className:h,onClick:t==null?void 0:t("dateCreated"),children:["Created at ",n==null?void 0:n("dateCreated")]}),g.jsxs("th",{className:h,onClick:t==null?void 0:t("shortCode"),children:["Short URL ",n==null?void 0:n("shortCode")]}),g.jsxs("th",{className:"short-urls-table__header-cell",children:[g.jsxs("span",{className:f,onClick:t==null?void 0:t("title"),children:["Title ",n==null?void 0:n("title")]}),"  /  ",g.jsxs("span",{className:f,onClick:t==null?void 0:t("longUrl"),children:[g.jsx("span",{className:"indivisible",children:"Long URL"})," ",n==null?void 0:n("longUrl")]})]}),g.jsx("th",{className:"short-urls-table__header-cell",children:"Tags"}),g.jsx("th",{className:h,onClick:t==null?void 0:t("visits"),children:g.jsxs("span",{className:"indivisible",children:["Visits ",n==null?void 0:n("visits")]})}),g.jsx("th",{className:"short-urls-table__header-cell",colSpan:2})]})}),g.jsx("tbody",{children:m()})]})},Bve=(e,t)=>{e.serviceFactory("ShortUrlsList",Fve,"ShortUrlsTable","ShortUrlsFilteringBar"),e.decorator("ShortUrlsList",t(["selectedServer","mercureInfo","shortUrlsList","settings"],["listShortUrls","createNewVisits","loadMercureInfo"])),e.serviceFactory("ShortUrlsTable",$ve,"ShortUrlsRow"),e.serviceFactory("ShortUrlsRow",gge,"ShortUrlsRowMenu","ColorGenerator","useTimeoutToggle"),e.decorator("ShortUrlsRow",t(["settings"])),e.serviceFactory("ShortUrlsRowMenu",vge,"DeleteShortUrlModal","QrCodeModal"),e.serviceFactory("CreateShortUrlResult",oge,"useTimeoutToggle"),e.serviceFactory("ShortUrlForm",Lve,"TagsSelector","DomainSelector"),e.serviceFactory("CreateShortUrl",$me,"ShortUrlForm","CreateShortUrlResult"),e.decorator("CreateShortUrl",t(["shortUrlCreation","selectedServer","settings"],["createShortUrl","resetCreateShortUrl"])),e.serviceFactory("EditShortUrl",Bme,"ShortUrlForm"),e.decorator("EditShortUrl",t(["shortUrlDetail","shortUrlEdition","selectedServer","settings"],["getShortUrlDetail","editShortUrl"])),e.serviceFactory("DeleteShortUrlModal",()=>sge),e.decorator("DeleteShortUrlModal",t(["shortUrlDeletion"],["deleteShortUrl","shortUrlDeleted","resetDeleteShortUrl"])),e.serviceFactory("QrCodeModal",fge,"ImageDownloader"),e.decorator("QrCodeModal",t(["selectedServer"])),e.serviceFactory("ShortUrlsFilteringBar",jve,"ExportShortUrlsBtn","TagsSelector"),e.serviceFactory("ExportShortUrlsBtn",age,"buildShlinkApiClient","ReportExporter"),e.decorator("ExportShortUrlsBtn",t(["selectedServer"])),e.serviceFactory("shortUrlsListReducerCreator",Wpe,"listShortUrls","editShortUrl","createShortUrl"),e.serviceFactory("shortUrlsListReducer",at("reducer"),"shortUrlsListReducerCreator"),e.serviceFactory("shortUrlCreationReducerCreator",_ge,"createShortUrl"),e.serviceFactory("shortUrlCreationReducer",at("reducer"),"shortUrlCreationReducerCreator"),e.serviceFactory("shortUrlEditionReducerCreator",Sge,"editShortUrl"),e.serviceFactory("shortUrlEditionReducer",at("reducer"),"shortUrlEditionReducerCreator"),e.serviceFactory("shortUrlDeletionReducerCreator",Upe,"deleteShortUrl"),e.serviceFactory("shortUrlDeletionReducer",at("reducer"),"shortUrlDeletionReducerCreator"),e.serviceFactory("shortUrlDetailReducerCreator",bge,"buildShlinkApiClient"),e.serviceFactory("shortUrlDetailReducer",at("reducer"),"shortUrlDetailReducerCreator"),e.serviceFactory("listShortUrls",Hpe,"buildShlinkApiClient"),e.serviceFactory("createShortUrl",yge,"buildShlinkApiClient"),e.serviceFactory("resetCreateShortUrl",at("resetCreateShortUrl"),"shortUrlCreationReducerCreator"),e.serviceFactory("deleteShortUrl",zpe,"buildShlinkApiClient"),e.serviceFactory("resetDeleteShortUrl",at("resetDeleteShortUrl"),"shortUrlDeletionReducerCreator"),e.serviceFactory("shortUrlDeleted",()=>j5),e.serviceFactory("getShortUrlDetail",at("getShortUrlDetail"),"shortUrlDetailReducerCreator"),e.serviceFactory("editShortUrl",xge,"buildShlinkApiClient")},zve=({tag:e,toggle:t,isOpen:n,deleteTag:r,tagDelete:i,tagDeleted:o})=>{const{deleting:s,error:a,deleted:l,errorData:c}=i,f=async()=>{await r(e),t()};return g.jsxs(Vo,{toggle:t,isOpen:n,centered:!0,onClosed:()=>l&&o(e),children:[g.jsx(io,{toggle:t,className:"text-danger",children:"Delete tag"}),g.jsxs(Mi,{children:["Are you sure you want to delete tag ",g.jsx("b",{children:e}),"?",a&&g.jsx(Nr,{type:"error",small:!0,className:"mt-2",children:g.jsx(Do,{errorData:c,fallbackMessage:"Something went wrong while deleting the tag :("})})]}),g.jsxs(ta,{children:[g.jsx(ht,{color:"link",onClick:t,children:"Cancel"}),g.jsx(ht,{color:"danger",disabled:s,onClick:f,children:s?"Deleting tag...":"Delete tag"})]})]})};function O_(){return(O_=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function f2(e){var t=V.useRef(e),n=V.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var Od=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:x.buttons>0)&&i.current?o(KN(i.current,x,a.current)):y(!1)},v=function(){return y(!1)};function y(x){var _=l.current,w=d2(i.current),S=x?w.addEventListener:w.removeEventListener;S(_?"touchmove":"mousemove",m),S(_?"touchend":"mouseup",v)}return[function(x){var _=x.nativeEvent,w=i.current;if(w&&(XN(_),!function(T,P){return P&&!Nf(T)}(_,l.current)&&w)){if(Nf(_)){l.current=!0;var S=_.changedTouches||[];S.length&&(a.current=S[0].identifier)}w.focus(),o(KN(w,_,a.current)),y(!0)}},function(x){var _=x.which||x.keyCode;_<37||_>40||(x.preventDefault(),s({left:_===39?.05:_===37?-.05:0,top:_===40?.05:_===38?-.05:0}))},y]},[s,o]),f=c[0],h=c[1],p=c[2];return V.useEffect(function(){return p},[p]),U.createElement("div",O_({},r,{onTouchStart:f,onMouseDown:f,className:"react-colorful__interactive",ref:i,onKeyDown:h,tabIndex:0,role:"slider"}))}),UE=function(e){return e.filter(Boolean).join(" ")},w8=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=UE(["react-colorful__pointer",e.className]);return U.createElement("div",{className:o,style:{top:100*i+"%",left:100*n+"%"}},U.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},Un=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},Uve=function(e){return qve(h2(e))},h2=function(e){return e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?Un(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?Un(parseInt(e.substring(6,8),16)/255,2):1}},Vve=function(e){return Yve(Wve(e))},Hve=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:Un(e.h),s:Un(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:Un(i/2),a:Un(r,2)}},p2=function(e){var t=Hve(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},Wve=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),s=r*(1-n),a=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),c=o%6;return{r:Un(255*[r,a,s,s,l,r][c]),g:Un(255*[l,r,r,a,s,s][c]),b:Un(255*[s,s,l,r,r,a][c]),a:Un(i,2)}},Ap=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Yve=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=i<1?Ap(Un(255*i)):"";return"#"+Ap(t)+Ap(n)+Ap(r)+o},qve=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),s=o-Math.min(t,n,r),a=s?o===t?(n-r)/s:o===n?2+(r-t)/s:4+(t-n)/s:0;return{h:Un(60*(a<0?a+6:a)),s:Un(o?s/o*100:0),v:Un(o/255*100),a:i}},Gve=U.memo(function(e){var t=e.hue,n=e.onChange,r=UE(["react-colorful__hue",e.className]);return U.createElement("div",{className:r},U.createElement(b8,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:Od(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":Un(t),"aria-valuemax":"360","aria-valuemin":"0"},U.createElement(w8,{className:"react-colorful__hue-pointer",left:t/360,color:p2({h:t,s:100,v:100,a:1})})))}),Zve=U.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:p2({h:t.h,s:100,v:100,a:1})};return U.createElement("div",{className:"react-colorful__saturation",style:r},U.createElement(b8,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:Od(t.s+100*i.left,0,100),v:Od(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+Un(t.s)+"%, Brightness "+Un(t.v)+"%"},U.createElement(w8,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:p2(t)})))}),x8=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},Kve=function(e,t){return e.toLowerCase()===t.toLowerCase()||x8(h2(e),h2(t))};function Xve(e,t,n){var r=f2(n),i=V.useState(function(){return e.toHsva(t)}),o=i[0],s=i[1],a=V.useRef({color:t,hsva:o});V.useEffect(function(){if(!e.equal(t,a.current.color)){var c=e.toHsva(t);a.current={hsva:c,color:t},s(c)}},[t,e]),V.useEffect(function(){var c;x8(o,a.current.hsva)||e.equal(c=e.fromHsva(o),a.current.color)||(a.current={hsva:o,color:c},r(c))},[o,e,r]);var l=V.useCallback(function(c){s(function(f){return Object.assign({},f,c)})},[]);return[o,l]}var Qve=typeof window<"u"?V.useLayoutEffect:V.useEffect,Jve=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},QN=new Map,eye=function(e){Qve(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!QN.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,QN.set(t,n);var r=Jve();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},tye=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,s=_8(e,["className","colorModel","color","onChange"]),a=V.useRef(null);eye(a);var l=Xve(n,i,o),c=l[0],f=l[1],h=UE(["react-colorful",t]);return U.createElement("div",O_({},s,{ref:a,className:h}),U.createElement(Zve,{hsva:c,onChange:f}),U.createElement(Gve,{hue:c.h,onChange:f,className:"react-colorful__last-control"}))},nye={defaultColor:"000",toHsva:Uve,fromHsva:function(e){return Vve({h:e.h,s:e.s,v:e.v,a:1})},equal:Kve},rye=function(e){return U.createElement(tye,O_({},e,{colorModel:nye}))};const iye=({getColorForKey:e})=>({tag:t,editTag:n,toggle:r,tagEdited:i,isOpen:o,tagEdit:s})=>{const[a,l]=V.useState(t),[c,f]=V.useState(e(t)),[h,p,,m]=hn(),{editing:v,error:y,edited:x,errorData:_}=s,w=rh(async()=>{await n({oldName:t,newName:a,color:c}),r()}),S=Dt(m,()=>x&&i({oldName:t,newName:a,color:c}));return g.jsx(Vo,{isOpen:o,toggle:r,centered:!0,onClosed:S,children:g.jsxs("form",{name:"editTag",onSubmit:w,children:[g.jsx(io,{toggle:r,children:"Edit tag"}),g.jsxs(Mi,{children:[g.jsxs(Qd,{children:[g.jsx("div",{id:"colorPickerBtn",className:"input-group-text edit-tag-modal__color-picker-toggle",style:{backgroundColor:c,borderColor:c},onClick:p,children:g.jsx(je,{icon:lQ,className:"edit-tag-modal__color-icon"})}),g.jsx(Kd,{isOpen:h,toggle:p,target:"colorPickerBtn",placement:"right",hideArrow:!0,popperClassName:"edit-tag-modal__popover",children:g.jsx(rye,{color:c,onChange:f})}),g.jsx(Ic,{value:a,placeholder:"Tag",required:!0,onChange:({target:T})=>l(T.value)})]}),y&&g.jsx(Nr,{type:"error",small:!0,className:"mt-2",children:g.jsx(Do,{errorData:_,fallbackMessage:"Something went wrong while editing the tag :("})})]}),g.jsxs(ta,{children:[g.jsx(ht,{type:"button",color:"link",onClick:r,children:"Cancel"}),g.jsx(ht,{color:"primary",disabled:v,children:v?"Saving...":"Save"})]})]})})};function oye(e){return U.createElement("button",{type:"button",className:e.classNames.selectedTag,title:e.removeButtonText,onClick:e.onDelete},U.createElement("span",{className:e.classNames.selectedTagName},e.tag.name))}const sye={position:"absolute",width:0,height:0,visibility:"hidden",overflow:"scroll",whiteSpace:"pre"},aye=["fontSize","fontFamily","fontWeight","fontStyle","letterSpacing","textTransform"];class lye extends U.Component{constructor(t){super(t),this.state={inputWidth:null},this.input=U.createRef(),this.sizer=U.createRef()}componentDidMount(){this.props.autoresize&&(this.copyInputStyles(),this.updateInputWidth())}componentDidUpdate({query:t,placeholderText:n}){(t!==this.props.query||n!==this.props.placeholderText)&&this.updateInputWidth()}copyInputStyles(){const t=window.getComputedStyle(this.input.current);aye.forEach(n=>{this.sizer.current.style[n]=t[n]})}updateInputWidth(){let t;this.props.autoresize&&(t=Math.ceil(this.sizer.current.scrollWidth)+2),t!==this.state.inputWidth&&this.setState({inputWidth:t})}render(){const{id:t,query:n,ariaLabelText:r,placeholderText:i,expanded:o,classNames:s,inputAttributes:a,inputEventHandlers:l,index:c}=this.props;return U.createElement("div",{className:s.searchWrapper},U.createElement("input",Object.assign({},a,l,{ref:this.input,value:n,placeholder:i,className:s.searchInput,role:"combobox","aria-autocomplete":"list","aria-label":r||i,"aria-owns":t,"aria-activedescendant":c>-1?`${t}-${c}`:null,"aria-expanded":o,style:{width:this.state.inputWidth}})),U.createElement("div",{ref:this.sizer,style:sye},n||i))}}function VE(e){return e.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")}function cye(e){return new RegExp(VE(e),"gi")}function uye(e){return new RegExp(`(?:^|\\s)${VE(e)}`,"i")}function fye(e){return new RegExp(`^${VE(e)}$`,"i")}function dye(e,t){const n=cye(t);return e.replace(n,"$&")}function hye({item:e,query:t}){return U.createElement("span",{dangerouslySetInnerHTML:{__html:dye(e.name,t)}})}function pye(e){const t=e.suggestionComponent||hye,n=e.options.map((r,i)=>{const o=`${e.id}-${i}`,s=[];return e.index===i&&s.push(e.classNames.suggestionActive),r.disabled&&s.push(e.classNames.suggestionDisabled),U.createElement("li",{id:o,key:o,role:"option",className:s.join(" "),"aria-disabled":!!r.disabled,onMouseDown:a=>a.preventDefault(),onClick:()=>e.addTag(r)},r.prefix?U.createElement("span",{className:e.classNames.suggestionPrefix},r.prefix," "):null,r.disableMarkIt?r.name:U.createElement(t,{item:r,query:e.query}))});return U.createElement("div",{className:e.classNames.suggestions},U.createElement("ul",{role:"listbox",id:e.id},n))}function mye(e,t){const n=e.querySelectorAll("a,button,input"),r=Array.prototype.findIndex.call(n,o=>o===t),i=n[r-1]||n[r+1];i&&i.focus()}const ka={ENTER:"Enter",TAB:"Tab",BACKSPACE:"Backspace",UP_ARROW:"ArrowUp",UP_ARROW_COMPAT:"Up",DOWN_ARROW:"ArrowDown",DOWN_ARROW_COMPAT:"Down"},S8={root:"react-tags",rootFocused:"is-focused",selected:"react-tags__selected",selectedTag:"react-tags__selected-tag",selectedTagName:"react-tags__selected-tag-name",search:"react-tags__search",searchWrapper:"react-tags__search-wrapper",searchInput:"react-tags__search-input",suggestions:"react-tags__suggestions",suggestionActive:"is-active",suggestionDisabled:"is-disabled",suggestionPrefix:"react-tags__suggestion-prefix"};function C8(e,t){return e.findIndex(n=>fye(t).test(n.name))}function $1(){if(this.state.query.length>=this.props.minQueryLength){const e=C8(this.state.options,this.state.query),t=this.state.index===-1?e:this.state.index,n=t>-1?this.state.options[t]:null;n?this.addTag(n):this.props.allowNew&&this.addTag({name:this.state.query})}}function gye(e){e.preventDefault();const t=this.state.options.length-1;this.setState({index:this.state.index<=0?t:this.state.index-1})}function vye(e){e.preventDefault();const t=this.state.options.length-1;this.setState({index:this.state.index>=t?0:this.state.index+1})}function yye(){this.state.query.length||this.deleteTag(this.props.tags.length-1)}function _ye(e,t){return uye(t).test(e.name)}function bye(e,t){let n;return e.suggestionsTransform?n=e.suggestionsTransform(t.query,e.suggestions):n=e.suggestions.filter(r=>e.suggestionsFilter(r,t.query)),n=n.slice(0,e.maxSuggestionsLength),e.allowNew&&e.newTagText&&C8(n,t.query)===-1?n.push({id:0,name:t.query,prefix:e.newTagText,disableMarkIt:!0}):e.noSuggestionsText&&n.length===0&&n.push({id:0,name:e.noSuggestionsText,disabled:!0,disableMarkIt:!0}),n}class HE extends U.Component{constructor(t){super(t),this.state={query:"",focused:!1,index:-1},this.inputEventHandlers={onChange:()=>{},onBlur:this.onBlur.bind(this),onFocus:this.onFocus.bind(this),onInput:this.onInput.bind(this),onKeyDown:this.onKeyDown.bind(this)},this.container=U.createRef(),this.input=U.createRef()}onInput(t){const n=t.target.value;this.props.onInput&&this.props.onInput(n),n.length===this.state.query.length+1&&this.props.delimiters.indexOf(n.slice(-1))>-1?$1.call(this):n!==this.state.query&&this.setState({query:n})}onKeyDown(t){this.props.delimiters.indexOf(t.key)>-1&&((this.state.query||this.state.index>-1)&&t.preventDefault(),$1.call(this)),t.key===ka.BACKSPACE&&this.props.allowBackspace&&yye.call(this,t),(t.key===ka.UP_ARROW||t.key===ka.UP_ARROW_COMPAT)&&gye.call(this,t),(t.key===ka.DOWN_ARROW||t.key===ka.DOWN_ARROW_COMPAT)&&vye.call(this,t)}onClick(t){document.activeElement!==t.target&&this.focusInput()}onBlur(){this.setState({focused:!1,index:-1}),this.props.onBlur&&this.props.onBlur(),this.props.addOnBlur&&$1.call(this)}onFocus(){this.setState({focused:!0}),this.props.onFocus&&this.props.onFocus()}onDeleteTag(t,n){this.container.current&&mye(this.container.current,n.currentTarget),this.deleteTag(t)}addTag(t){t.disabled||typeof this.props.onValidate=="function"&&!this.props.onValidate(t)||(this.props.onAddition({id:t.id,name:t.name}),this.clearInput())}deleteTag(t){this.props.onDelete(t)}clearInput(){this.setState({query:"",index:-1})}clearSelectedIndex(){this.setState({index:-1})}focusInput(){this.input.current&&this.input.current.input.current&&this.input.current.input.current.focus()}render(){const t=this.props.tagComponent||oye,n=this.state.focused&&this.state.query.length>=this.props.minQueryLength,r=Object.assign({},S8,this.props.classNames),i=[r.root];return this.state.focused&&i.push(r.rootFocused),U.createElement("div",{ref:this.container,className:i.join(" "),onClick:this.onClick.bind(this)},U.createElement("div",{className:r.selected,"aria-relevant":"additions removals","aria-live":"polite"},this.props.tags.map((o,s)=>U.createElement(t,{key:s,tag:o,removeButtonText:this.props.removeButtonText,classNames:r,onDelete:this.onDeleteTag.bind(this,s)}))),U.createElement("div",{className:r.search},U.createElement(lye,Object.assign({},this.state,{id:this.props.id,ref:this.input,classNames:r,inputAttributes:this.props.inputAttributes,inputEventHandlers:this.inputEventHandlers,autoresize:this.props.autoresize,expanded:n,placeholderText:this.props.placeholderText,ariaLabelText:this.props.ariaLabelText})),n&&this.state.options.length?U.createElement(pye,Object.assign({},this.state,{id:this.props.id,classNames:r,expanded:n,addTag:this.addTag.bind(this),suggestionComponent:this.props.suggestionComponent})):null))}static getDerivedStateFromProps(t,n){return n.prevQuery!==n.query||n.prevSuggestions!==t.suggestions?{prevQuery:n.query,prevSuggestions:t.suggestions,options:bye(t,n)}:null}}HE.defaultProps={id:"ReactTags",tags:[],placeholderText:"Add new tag",removeButtonText:"Click to remove tag",noSuggestionsText:null,newTagText:null,suggestions:[],suggestionsFilter:_ye,suggestionsTransform:null,autoresize:!0,classNames:S8,delimiters:[ka.TAB,ka.ENTER],minQueryLength:2,maxSuggestionsLength:6,allowNew:!1,allowBackspace:!0,addOnBlur:!1,tagComponent:null,suggestionComponent:null,inputAttributes:{}};HE.propTypes={id:C.string,tags:C.arrayOf(C.object),placeholderText:C.string,ariaLabelText:C.string,removeButtonText:C.string,noSuggestionsText:C.string,newTagText:C.string,suggestions:C.arrayOf(C.object),suggestionsFilter:C.func,suggestionsTransform:C.func,autoresize:C.bool,delimiters:C.arrayOf(C.string),onDelete:C.func.isRequired,onAddition:C.func.isRequired,onInput:C.func,onFocus:C.func,onBlur:C.func,onValidate:C.func,minQueryLength:C.number,maxSuggestionsLength:C.number,classNames:C.object,allowNew:C.bool,allowBackspace:C.bool,addOnBlur:C.bool,tagComponent:C.oneOfType([C.func,C.element]),suggestionComponent:C.oneOfType([C.func,C.element]),inputAttributes:C.object};const E8=({tag:e,colorGenerator:t})=>g.jsx("div",{style:{backgroundColor:t.getColorForKey(e)},className:"tag-bullet"}),JN=e=>({id:e,name:e}),wye=e=>({selectedTags:t,onChange:n,placeholder:r,listTags:i,tagsList:o,settings:s,allowNew:a=!0})=>{var h;V.useEffect(()=>{i()},[]);const l=((h=s.shortUrlCreation)==null?void 0:h.tagFilteringMode)??"startsWith",c=({tag:p,onDelete:m})=>g.jsx($E,{colorGenerator:e,text:p.name,clearable:!0,className:"react-tags__tag",onClose:m}),f=({item:p})=>g.jsxs(g.Fragment,{children:[g.jsx(E8,{tag:`${p.name}`,colorGenerator:e}),p.name]});return g.jsx(HE,{tags:t.map(JN),tagComponent:c,suggestions:o.tags.filter(p=>!t.includes(p)).map(JN),suggestionComponent:f,allowNew:a,addOnBlur:!0,placeholderText:r??"Add tags to the URL",minQueryLength:1,delimiters:["Enter","Tab",","],suggestionsTransform:l==="includes"?(p,m)=>m.filter(({name:v})=>v.includes(p)):void 0,onDelete:p=>{const m=[...t];m.splice(p,1),n(m)},onAddition:({name:p})=>n([...new Set([...t,...p.toLowerCase().split(",")])])})},m2="shlink/tagDelete",xye={deleting:!1,deleted:!1,error:!1},T8=yn(`${m2}/tagDeleted`),Sye=e=>{const t=rr(`${m2}/deleteTag`,async(r,{getState:i})=>{const{deleteTags:o}=e(i);await o([r])}),{reducer:n}=Yn({name:m2,initialState:xye,reducers:{},extraReducers:r=>{r.addCase(t.pending,()=>({deleting:!0,deleted:!1,error:!1})),r.addCase(t.rejected,(i,{error:o})=>({deleting:!1,deleted:!1,error:!0,errorData:ro(o)})),r.addCase(t.fulfilled,()=>({deleting:!1,deleted:!0,error:!1}))}});return{reducer:n,deleteTag:t}},WE="shlink/tagEdit",Cye={editing:!1,edited:!1,error:!1},O8=yn(`${WE}/tagEdited`),Eye=(e,t)=>rr(`${WE}/editTag`,async({oldName:n,newName:r,color:i},{getState:o})=>(await e(o).editTag(n,r),t.setColorForKey(r,i),{oldName:n,newName:r,color:i})),Tye=e=>Yn({name:WE,initialState:Cye,reducers:{},extraReducers:t=>{t.addCase(e.pending,()=>({editing:!0,edited:!1,error:!1})),t.addCase(e.rejected,(n,{error:r})=>({editing:!1,edited:!1,error:!0,errorData:ro(r)})),t.addCase(e.fulfilled,(n,{payload:r})=>({...Mj(["oldName","newName"],r),editing:!1,edited:!0,error:!1}))}}),YE="shlink/tagsList",B1={tags:[],filteredTags:[],stats:{},loading:!1,error:!1},eL=(e,t)=>n=>n===e?t:n,tL=(e,t)=>zd(n=>n===t,e),Oye=(e,t)=>e.reduce((n,[r,i])=>{if(!n[r])return n;const{bots:o,nonBots:s}=i,a=n[r];return{...n,[r]:{...a,visitsSummary:a.visitsSummary&&{total:a.visitsSummary.total+o+s,bots:a.visitsSummary.bots+o,nonBots:a.visitsSummary.nonBots+s},visitsCount:a.visitsCount+o+s}}},{...t}),Pye=e=>Object.entries(e.reduce((t,{shortUrl:n,visit:r})=>(n==null||n.tags.forEach(i=>{t[i]||(t[i]={bots:0,nonBots:0}),r.potentialBot?t[i].bots+=1:t[i].nonBots+=1}),t),{})),kye=(e,t=!0)=>rr(`${YE}/listTags`,async(n,{getState:r})=>{const{tagsList:i,selectedServer:o}=r();if(!t&&!Wn(i.tags))return i;const{listTags:s,tagsStats:a}=e(r),{tags:l,stats:c}=await(yE.tagsStats(o)?a():s()),f=c.reduce((h,{tag:p,...m})=>(h[p]=m,h),{});return{tags:l,stats:f}}),P8=yn(`${YE}/filterTags`),Mye=(e,t)=>Yn({name:YE,initialState:B1,reducers:{},extraReducers:n=>{n.addCase(P8,(r,{payload:i})=>({...r,filteredTags:r.tags.filter(o=>o.toLowerCase().match(i.toLowerCase()))})),n.addCase(e.pending,r=>({...r,loading:!0,error:!1})),n.addCase(e.rejected,(r,{error:i})=>({...B1,error:!0,errorData:ro(i)})),n.addCase(e.fulfilled,(r,{payload:i})=>({...B1,stats:i.stats,tags:i.tags,filteredTags:i.tags})),n.addCase(T8,({tags:r,filteredTags:i,...o},{payload:s})=>({...o,tags:tL(r,s),filteredTags:tL(i,s)})),n.addCase(O8,({tags:r,filteredTags:i,stats:o,...s},{payload:a})=>({...s,stats:{...o,[a.newName]:o[a.oldName]},tags:r.map(eL(a.oldName,a.newName)).sort(),filteredTags:i.map(eL(a.oldName,a.newName)).sort()})),n.addCase(ah,(r,{payload:i})=>({...r,stats:Oye(Pye(i.createdVisits),r.stats)})),n.addCase(t.fulfilled,({tags:r,...i},{payload:o})=>({...i,tags:r.concat(o.tags.filter(s=>!r.includes(s)))}))}}),Rye=e=>ra(({filterTags:t,forceListTags:n,tagsList:r,selectedServer:i,settings:o})=>{var h;const[s,a]=V.useState(((h=o.tags)==null?void 0:h.defaultOrdering)??{}),l=Dt(()=>r.filteredTags.map(p=>{var y,x,_;const m=r.stats[p],v=((y=o.visits)!=null&&y.excludeBots?(x=m==null?void 0:m.visitsSummary)==null?void 0:x.nonBots:(_=m==null?void 0:m.visitsSummary)==null?void 0:_.total)??(m==null?void 0:m.visitsCount)??0;return{tag:p,visits:v,shortUrls:(m==null?void 0:m.shortUrlsCount)??0}}),p=>Nj(p,s));if(V.useEffect(()=>{n()},[]),r.loading)return g.jsx(Co,{loading:!0});if(r.error)return g.jsx(Nr,{type:"error",children:g.jsx(Do,{errorData:r.errorData,fallbackMessage:"Error loading tags :("})});const c=p=>()=>{const m=e_(p,s.field,s.dir);a({field:m?p:void 0,dir:m})},f=()=>{if(r.filteredTags.length<1)return g.jsx(Co,{children:"No tags found"});const p=l();return g.jsx(e,{sortedTags:p,selectedServer:i,currentOrder:s,orderByColumn:c})};return g.jsxs(g.Fragment,{children:[g.jsx(ih,{className:"mb-3",onChange:t}),g.jsx(Qn,{className:"mb-3",children:g.jsx("div",{className:"col-lg-6 offset-lg-6",children:g.jsx(fh,{items:V5,order:s,onChange:(p,m)=>a({field:p,dir:m})})})}),f()]})},()=>[Xr.visits]);const qE=({pagesCount:e,currentPage:t,setCurrentPage:n,centered:r=!0})=>{if(e<2)return null;const i=o=>()=>!Td(o)&&n(o);return g.jsxs(g_,{listClassName:me("flex-wrap mb-0 simple-paginator",{"justify-content-center":r}),children:[g.jsx(Rs,{disabled:t<=1,children:g.jsx(Ns,{previous:!0,tag:"span",onClick:i(t-1)})}),g8(t,e).map((o,s)=>g.jsx(Rs,{disabled:Td(o),active:t===o,children:g.jsx(Ns,{role:"link",tag:"span",onClick:i(o),children:v8(o)})},y8(o,s))),g.jsx(Rs,{disabled:t>=e,children:g.jsx(Ns,{next:!0,tag:"span",onClick:i(t+1)})})]})};const Nye=20,Lye=e=>({sortedTags:t,selectedServer:n,orderByColumn:r,currentOrder:i})=>{const o=V.useRef(!0),{search:s}=Pn(),{page:a=1}=fl(s),[l,c]=Moe("page",Number(a)),f=ad(Nye,t),h=f.length>1,p=f[l-1]??[];return V.useEffect(()=>{!o.current&&c(1),o.current=!1},[t]),V.useEffect(()=>{scrollTo(0,0)},[l]),g.jsxs(cn,{bodyClassName:h?"pb-1":"",children:[g.jsxs("table",{className:"table table-hover responsive-table mb-0",children:[g.jsxs("thead",{className:"responsive-table__header",children:[g.jsxs("tr",{children:[g.jsxs("th",{className:"tags-table__header-cell",onClick:r("tag"),children:["Tag ",g.jsx(Rf,{currentOrder:i,field:"tag"})]}),g.jsxs("th",{className:"tags-table__header-cell text-lg-end",onClick:r("shortUrls"),children:["Short URLs ",g.jsx(Rf,{currentOrder:i,field:"shortUrls"})]}),g.jsxs("th",{className:"tags-table__header-cell text-lg-end",onClick:r("visits"),children:["Visits ",g.jsx(Rf,{currentOrder:i,field:"visits"})]}),g.jsx("th",{"aria-label":"Options",className:"tags-table__header-cell"})]}),g.jsx("tr",{children:g.jsx("th",{"aria-label":"Separator",colSpan:4,className:"p-0 border-top-0"})})]}),g.jsxs("tbody",{children:[p.length===0&&g.jsx("tr",{children:g.jsx("td",{colSpan:4,className:"text-center",children:"No results found"})}),p.map(m=>g.jsx(e,{tag:m,selectedServer:n},m.tag))]})]}),h&&g.jsx("div",{className:"sticky-card-paginator",children:g.jsx(qE,{pagesCount:f.length,currentPage:l,setCurrentPage:c})})]},l)},Dye=(e,t,n)=>({tag:r,selectedServer:i})=>{const[o,s]=hn(),[a,l]=hn(),c=Ud(i);return g.jsxs("tr",{className:"responsive-table__row",children:[g.jsxs("th",{className:"responsive-table__cell","data-th":"Tag",children:[g.jsx(E8,{tag:r.tag,colorGenerator:n})," ",r.tag]}),g.jsx("td",{className:"responsive-table__cell text-lg-end","data-th":"Short URLs",children:g.jsx(Lt,{to:`/server/${c}/list-short-urls/1?tags=${encodeURIComponent(r.tag)}`,children:_n(r.shortUrls)})}),g.jsx("td",{className:"responsive-table__cell text-lg-end","data-th":"Visits",children:g.jsx(Lt,{to:`/server/${c}/tag/${r.tag}/visits`,children:_n(r.visits)})}),g.jsx("td",{className:"responsive-table__cell text-lg-end",children:g.jsxs(__,{children:[g.jsxs(Ue,{onClick:l,children:[g.jsx(je,{icon:KX,fixedWidth:!0,className:"me-1"})," Edit"]}),g.jsxs(Ue,{onClick:s,children:[g.jsx(je,{icon:dQ,fixedWidth:!0,className:"me-1"})," Delete"]})]})}),g.jsx(t,{tag:r.tag,toggle:l,isOpen:a}),g.jsx(e,{tag:r.tag,toggle:s,isOpen:o})]})},Aye=(e,t)=>{e.serviceFactory("TagsSelector",wye,"ColorGenerator"),e.decorator("TagsSelector",t(["tagsList","settings"],["listTags"])),e.serviceFactory("DeleteTagConfirmModal",()=>zve),e.decorator("DeleteTagConfirmModal",t(["tagDelete"],["deleteTag","tagDeleted"])),e.serviceFactory("EditTagModal",iye,"ColorGenerator"),e.decorator("EditTagModal",t(["tagEdit"],["editTag","tagEdited"])),e.serviceFactory("TagsTableRow",Dye,"DeleteTagConfirmModal","EditTagModal","ColorGenerator"),e.decorator("TagsTableRow",t(["settings"])),e.serviceFactory("TagsTable",Lye,"TagsTableRow"),e.serviceFactory("TagsList",Rye,"TagsTable"),e.decorator("TagsList",t(["tagsList","selectedServer","mercureInfo","settings"],["forceListTags","filterTags","createNewVisits","loadMercureInfo"])),e.serviceFactory("tagEditReducerCreator",Tye,"editTag"),e.serviceFactory("tagEditReducer",at("reducer"),"tagEditReducerCreator"),e.serviceFactory("tagDeleteReducerCreator",Sye,"buildShlinkApiClient"),e.serviceFactory("tagDeleteReducer",at("reducer"),"tagDeleteReducerCreator"),e.serviceFactory("tagsListReducerCreator",Mye,"listTags","createShortUrl"),e.serviceFactory("tagsListReducer",at("reducer"),"tagsListReducerCreator");const n=r=>({buildShlinkApiClient:i})=>kye(i,r);e.factory("listTags",n(!1)),e.factory("forceListTags",n(!0)),e.serviceFactory("filterTags",()=>P8),e.serviceFactory("deleteTag",at("deleteTag"),"tagDeleteReducerCreator"),e.serviceFactory("tagDeleted",()=>T8),e.serviceFactory("editTag",Eye,"buildShlinkApiClient","ColorGenerator"),e.serviceFactory("tagEdited",()=>O8)};var jye="Expected a function",k8="__lodash_hash_undefined__",M8=1/0,Iye="[object Function]",Fye="[object GeneratorFunction]",$ye="[object Symbol]",Bye=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,zye=/^\w*$/,Uye=/^\./,Vye=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Hye=/[\\^$.*+?()[\]{}|]/g,Wye=/\\(\\)?/g,Yye=/^\[object .+?Constructor\]$/,qye=typeof $l=="object"&&$l&&$l.Object===Object&&$l,Gye=typeof self=="object"&&self&&self.Object===Object&&self,GE=qye||Gye||Function("return this")();function Zye(e,t){return e==null?void 0:e[t]}function Kye(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var Xye=Array.prototype,Qye=Function.prototype,R8=Object.prototype,z1=GE["__core-js_shared__"],nL=function(){var e=/[^.]+$/.exec(z1&&z1.keys&&z1.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),N8=Qye.toString,ZE=R8.hasOwnProperty,L8=R8.toString,Jye=RegExp("^"+N8.call(ZE).replace(Hye,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),rL=GE.Symbol,e_e=Xye.splice,t_e=D8(GE,"Map"),Pd=D8(Object,"create"),iL=rL?rL.prototype:void 0,oL=iL?iL.toString:void 0;function sl(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1}function f_e(e,t){var n=this.__data__,r=P_(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}iu.prototype.clear=a_e;iu.prototype.delete=l_e;iu.prototype.get=c_e;iu.prototype.has=u_e;iu.prototype.set=f_e;function pl(e){var t=-1,n=e?e.length:0;for(this.clear();++tt.toFixed(e.decimals).replace(".",e.separator):t=>`${t}`.replace(".",e.separator):e.decimals?t=>t.toFixed(e.decimals):t=>`${t}`}function QE(e={}){const t=typeof e.quote=="string"?e.quote:'"',n=typeof e.escapedQuote=="string"?e.escapedQuote:`${t}${t}`;return!t||t===n?r=>r:r=>(r.includes(t)&&(r=r.replace(new RegExp(t,"g"),n)),`${t}${r}${t}`)}function D_e(e={stringFormatter:QE()}){return t=>e.stringFormatter(t.toString().slice(7,-1))}function A_e(e={stringFormatter:QE()}){return t=>t===null||(t=JSON.stringify(t),t===void 0)?"":(t[0]==='"'&&(t=t.replace(/^"(.+)"$/,"$1")),e.stringFormatter(t))}function aL(e,t,n){const r=e[t];return r===void 0?n:r}function I8(e,t){try{return Array.isArray(t)?e.push(...t):e.push(t),e}catch{return e.concat(t)}}function g2(e,t){let n=!0;return e.reduce((r,i)=>(i==null&&(i=""),n?(n=!1,`${i}`):`${r}${t}${i}`),"")}class j_e{constructor(t){this.opts=this.preprocessOpts(t)}preprocessOpts(t){const n=Object.assign({},t);n.fields&&(n.fields=this.preprocessFieldsInfo(n.fields,n.defaultValue)),n.transforms=n.transforms||[];const r=n.formatters&&n.formatters.string||QE(),i=A_e({stringFormatter:r}),o={header:r,undefined:U1,boolean:U1,number:L_e(),bigint:U1,string:r,symbol:D_e({stringFormatter:r}),function:i,object:i};return n.formatters={...o,...n.formatters},n.delimiter=n.delimiter||",",n.eol=n.eol||` +`,n.header=n.header!==!1,n.includeEmptyRows=n.includeEmptyRows||!1,n.withBOM=n.withBOM||!1,n}preprocessFieldsInfo(t,n){return t.map(r=>{if(typeof r=="string")return{label:r,value:r.includes(".")||r.includes("[")?i=>sL(i,r,n):i=>aL(i,r,n)};if(typeof r=="object"){const i="default"in r?r.default:n;if(typeof r.value=="string")return{label:r.label||r.value,value:r.value.includes(".")||r.value.includes("[")?o=>sL(o,r.value,i):o=>aL(o,r.value,i)};if(typeof r.value=="function"){const o=r.label||r.value.name||"",s={label:o,default:i};return{label:o,value(a){const l=r.value(a,s);return l??i}}}}throw new Error("Invalid field info option. "+JSON.stringify(r))})}getHeader(){return g2(this.opts.fields.map(t=>this.opts.formatters.header(t.label)),this.opts.delimiter)}preprocessRow(t){return this.opts.transforms.reduce((n,r)=>n.map(i=>r(i)).reduce(I8,[]),[t])}processRow(t){if(!t)return;const n=this.opts.fields.map(r=>this.processCell(t,r));if(!(!this.opts.includeEmptyRows&&n.every(r=>r==="")))return g2(n,this.opts.delimiter)}processCell(t,n){return this.processValue(n.value(t))}processValue(t){return this.opts.formatters[typeof t](t)}}class I_e extends j_e{constructor(t){super(t)}parse(t){const n=this.preprocessData(t);this.opts.fields=this.opts.fields||this.preprocessFieldsInfo(n.reduce((s,a)=>(Object.keys(a).forEach(l=>{s.includes(l)||s.push(l)}),s),[]));const r=this.opts.header?this.getHeader():"",i=this.processData(n);return(this.opts.withBOM?"\uFEFF":"")+r+(r&&i?this.opts.eol:"")+i}preprocessData(t){const n=Array.isArray(t)?t:[t];if(!this.opts.fields&&(n.length===0||typeof n[0]!="object"))throw new Error('Data should not be empty or the "fields" option should be included');return this.opts.transforms.length===0?n:n.map(r=>this.preprocessRow(r)).reduce(I8,[])}processData(t){return g2(t.map(n=>this.processRow(n)).filter(n=>n),this.opts.eol)}}var xn;(function(e){e[e.BACKSPACE=8]="BACKSPACE",e[e.FORM_FEED=12]="FORM_FEED",e[e.NEWLINE=10]="NEWLINE",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.TAB=9]="TAB",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.NUMBER_SIGN=35]="NUMBER_SIGN",e[e.DOLLAR_SIGN=36]="DOLLAR_SIGN",e[e.PERCENT_SIGN=37]="PERCENT_SIGN",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.LEFT_PARENTHESIS=40]="LEFT_PARENTHESIS",e[e.RIGHT_PARENTHESIS=41]="RIGHT_PARENTHESIS",e[e.ASTERISK=42]="ASTERISK",e[e.PLUS_SIGN=43]="PLUS_SIGN",e[e.COMMA=44]="COMMA",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.FULL_STOP=46]="FULL_STOP",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_ZERO=48]="DIGIT_ZERO",e[e.DIGIT_ONE=49]="DIGIT_ONE",e[e.DIGIT_TWO=50]="DIGIT_TWO",e[e.DIGIT_THREE=51]="DIGIT_THREE",e[e.DIGIT_FOUR=52]="DIGIT_FOUR",e[e.DIGIT_FIVE=53]="DIGIT_FIVE",e[e.DIGIT_SIX=54]="DIGIT_SIX",e[e.DIGIT_SEVEN=55]="DIGIT_SEVEN",e[e.DIGIT_EIGHT=56]="DIGIT_EIGHT",e[e.DIGIT_NINE=57]="DIGIT_NINE",e[e.COLON=58]="COLON",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.COMMERCIAL_AT=64]="COMMERCIAL_AT",e[e.LATIN_CAPITAL_LETTER_A=65]="LATIN_CAPITAL_LETTER_A",e[e.LATIN_CAPITAL_LETTER_B=66]="LATIN_CAPITAL_LETTER_B",e[e.LATIN_CAPITAL_LETTER_C=67]="LATIN_CAPITAL_LETTER_C",e[e.LATIN_CAPITAL_LETTER_D=68]="LATIN_CAPITAL_LETTER_D",e[e.LATIN_CAPITAL_LETTER_E=69]="LATIN_CAPITAL_LETTER_E",e[e.LATIN_CAPITAL_LETTER_F=70]="LATIN_CAPITAL_LETTER_F",e[e.LATIN_CAPITAL_LETTER_G=71]="LATIN_CAPITAL_LETTER_G",e[e.LATIN_CAPITAL_LETTER_H=72]="LATIN_CAPITAL_LETTER_H",e[e.LATIN_CAPITAL_LETTER_I=73]="LATIN_CAPITAL_LETTER_I",e[e.LATIN_CAPITAL_LETTER_J=74]="LATIN_CAPITAL_LETTER_J",e[e.LATIN_CAPITAL_LETTER_K=75]="LATIN_CAPITAL_LETTER_K",e[e.LATIN_CAPITAL_LETTER_L=76]="LATIN_CAPITAL_LETTER_L",e[e.LATIN_CAPITAL_LETTER_M=77]="LATIN_CAPITAL_LETTER_M",e[e.LATIN_CAPITAL_LETTER_N=78]="LATIN_CAPITAL_LETTER_N",e[e.LATIN_CAPITAL_LETTER_O=79]="LATIN_CAPITAL_LETTER_O",e[e.LATIN_CAPITAL_LETTER_P=80]="LATIN_CAPITAL_LETTER_P",e[e.LATIN_CAPITAL_LETTER_Q=81]="LATIN_CAPITAL_LETTER_Q",e[e.LATIN_CAPITAL_LETTER_R=82]="LATIN_CAPITAL_LETTER_R",e[e.LATIN_CAPITAL_LETTER_S=83]="LATIN_CAPITAL_LETTER_S",e[e.LATIN_CAPITAL_LETTER_T=84]="LATIN_CAPITAL_LETTER_T",e[e.LATIN_CAPITAL_LETTER_U=85]="LATIN_CAPITAL_LETTER_U",e[e.LATIN_CAPITAL_LETTER_V=86]="LATIN_CAPITAL_LETTER_V",e[e.LATIN_CAPITAL_LETTER_W=87]="LATIN_CAPITAL_LETTER_W",e[e.LATIN_CAPITAL_LETTER_X=88]="LATIN_CAPITAL_LETTER_X",e[e.LATIN_CAPITAL_LETTER_Y=89]="LATIN_CAPITAL_LETTER_Y",e[e.LATIN_CAPITAL_LETTER_Z=90]="LATIN_CAPITAL_LETTER_Z",e[e.LEFT_SQUARE_BRACKET=91]="LEFT_SQUARE_BRACKET",e[e.REVERSE_SOLIDUS=92]="REVERSE_SOLIDUS",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.CIRCUMFLEX_ACCENT=94]="CIRCUMFLEX_ACCENT",e[e.LOW_LINE=95]="LOW_LINE",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_LETTER_A=97]="LATIN_SMALL_LETTER_A",e[e.LATIN_SMALL_LETTER_B=98]="LATIN_SMALL_LETTER_B",e[e.LATIN_SMALL_LETTER_C=99]="LATIN_SMALL_LETTER_C",e[e.LATIN_SMALL_LETTER_D=100]="LATIN_SMALL_LETTER_D",e[e.LATIN_SMALL_LETTER_E=101]="LATIN_SMALL_LETTER_E",e[e.LATIN_SMALL_LETTER_F=102]="LATIN_SMALL_LETTER_F",e[e.LATIN_SMALL_LETTER_G=103]="LATIN_SMALL_LETTER_G",e[e.LATIN_SMALL_LETTER_H=104]="LATIN_SMALL_LETTER_H",e[e.LATIN_SMALL_LETTER_I=105]="LATIN_SMALL_LETTER_I",e[e.LATIN_SMALL_LETTER_J=106]="LATIN_SMALL_LETTER_J",e[e.LATIN_SMALL_LETTER_K=107]="LATIN_SMALL_LETTER_K",e[e.LATIN_SMALL_LETTER_L=108]="LATIN_SMALL_LETTER_L",e[e.LATIN_SMALL_LETTER_M=109]="LATIN_SMALL_LETTER_M",e[e.LATIN_SMALL_LETTER_N=110]="LATIN_SMALL_LETTER_N",e[e.LATIN_SMALL_LETTER_O=111]="LATIN_SMALL_LETTER_O",e[e.LATIN_SMALL_LETTER_P=112]="LATIN_SMALL_LETTER_P",e[e.LATIN_SMALL_LETTER_Q=113]="LATIN_SMALL_LETTER_Q",e[e.LATIN_SMALL_LETTER_R=114]="LATIN_SMALL_LETTER_R",e[e.LATIN_SMALL_LETTER_S=115]="LATIN_SMALL_LETTER_S",e[e.LATIN_SMALL_LETTER_T=116]="LATIN_SMALL_LETTER_T",e[e.LATIN_SMALL_LETTER_U=117]="LATIN_SMALL_LETTER_U",e[e.LATIN_SMALL_LETTER_V=118]="LATIN_SMALL_LETTER_V",e[e.LATIN_SMALL_LETTER_W=119]="LATIN_SMALL_LETTER_W",e[e.LATIN_SMALL_LETTER_X=120]="LATIN_SMALL_LETTER_X",e[e.LATIN_SMALL_LETTER_Y=121]="LATIN_SMALL_LETTER_Y",e[e.LATIN_SMALL_LETTER_Z=122]="LATIN_SMALL_LETTER_Z",e[e.LEFT_CURLY_BRACKET=123]="LEFT_CURLY_BRACKET",e[e.VERTICAL_LINE=124]="VERTICAL_LINE",e[e.RIGHT_CURLY_BRACKET=125]="RIGHT_CURLY_BRACKET",e[e.TILDE=126]="TILDE"})(xn||(xn={}));xn.QUOTATION_MARK+"",xn.QUOTATION_MARK,xn.REVERSE_SOLIDUS+"",xn.REVERSE_SOLIDUS,xn.SOLIDUS+"",xn.SOLIDUS,xn.LATIN_SMALL_LETTER_B+"",xn.BACKSPACE,xn.LATIN_SMALL_LETTER_F+"",xn.FORM_FEED,xn.LATIN_SMALL_LETTER_N+"",xn.NEWLINE,xn.LATIN_SMALL_LETTER_R+"",xn.CARRIAGE_RETURN,xn.LATIN_SMALL_LETTER_T+"",xn.TAB;var lL;(function(e){e[e.LEFT_BRACE=1]="LEFT_BRACE",e[e.RIGHT_BRACE=2]="RIGHT_BRACE",e[e.LEFT_BRACKET=3]="LEFT_BRACKET",e[e.RIGHT_BRACKET=4]="RIGHT_BRACKET",e[e.COLON=5]="COLON",e[e.COMMA=6]="COMMA",e[e.TRUE=7]="TRUE",e[e.FALSE=8]="FALSE",e[e.NULL=9]="NULL",e[e.STRING=10]="STRING",e[e.NUMBER=11]="NUMBER",e[e.SEPARATOR=12]="SEPARATOR"})(lL||(lL={}));var cL;(function(e){e[e.START=0]="START",e[e.ENDED=1]="ENDED",e[e.ERROR=2]="ERROR",e[e.TRUE1=3]="TRUE1",e[e.TRUE2=4]="TRUE2",e[e.TRUE3=5]="TRUE3",e[e.FALSE1=6]="FALSE1",e[e.FALSE2=7]="FALSE2",e[e.FALSE3=8]="FALSE3",e[e.FALSE4=9]="FALSE4",e[e.NULL1=10]="NULL1",e[e.NULL2=11]="NULL2",e[e.NULL3=12]="NULL3",e[e.STRING_DEFAULT=13]="STRING_DEFAULT",e[e.STRING_AFTER_BACKSLASH=14]="STRING_AFTER_BACKSLASH",e[e.STRING_UNICODE_DIGIT_1=15]="STRING_UNICODE_DIGIT_1",e[e.STRING_UNICODE_DIGIT_2=16]="STRING_UNICODE_DIGIT_2",e[e.STRING_UNICODE_DIGIT_3=17]="STRING_UNICODE_DIGIT_3",e[e.STRING_UNICODE_DIGIT_4=18]="STRING_UNICODE_DIGIT_4",e[e.STRING_INCOMPLETE_CHAR=19]="STRING_INCOMPLETE_CHAR",e[e.NUMBER_AFTER_INITIAL_MINUS=20]="NUMBER_AFTER_INITIAL_MINUS",e[e.NUMBER_AFTER_INITIAL_ZERO=21]="NUMBER_AFTER_INITIAL_ZERO",e[e.NUMBER_AFTER_INITIAL_NON_ZERO=22]="NUMBER_AFTER_INITIAL_NON_ZERO",e[e.NUMBER_AFTER_FULL_STOP=23]="NUMBER_AFTER_FULL_STOP",e[e.NUMBER_AFTER_DECIMAL=24]="NUMBER_AFTER_DECIMAL",e[e.NUMBER_AFTER_E=25]="NUMBER_AFTER_E",e[e.NUMBER_AFTER_E_AND_SIGN=26]="NUMBER_AFTER_E_AND_SIGN",e[e.NUMBER_AFTER_E_AND_DIGIT=27]="NUMBER_AFTER_E_AND_DIGIT",e[e.SEPARATOR=28]="SEPARATOR"})(cL||(cL={}));var uL;(function(e){e[e.VALUE=0]="VALUE",e[e.KEY=1]="KEY",e[e.COLON=2]="COLON",e[e.COMMA=3]="COMMA",e[e.ENDED=4]="ENDED",e[e.ERROR=5]="ERROR",e[e.SEPARATOR=6]="SEPARATOR"})(uL||(uL={}));var fL;(function(e){e[e.OBJECT=0]="OBJECT",e[e.ARRAY=1]="ARRAY"})(fL||(fL={}));var F_e=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(r,i,o){n.o(r,i)||Object.defineProperty(r,i,{enumerable:!0,get:o})},n.r=function(r){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n.t=function(r,i){if(1&i&&(r=n(r)),8&i||4&i&&typeof r=="object"&&r&&r.__esModule)return r;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:r}),2&i&&typeof r!="string")for(var s in r)n.d(o,s,function(a){return r[a]}.bind(null,s));return o},n.n=function(r){var i=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(i,"a",i),i},n.o=function(r,i){return Object.prototype.hasOwnProperty.call(r,i)},n.p="",n(n.s=32)}([function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch{typeof window=="object"&&(n=window)}e.exports=n},function(e,t,n){var r=n(6),i=Object.keys||function(v){var y=[];for(var x in v)y.push(x);return y};e.exports=h;var o=n(5);o.inherits=n(2);var s=n(23),a=n(14);o.inherits(h,s);for(var l=i(a.prototype),c=0;c @@ -922,17 +922,17 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `+ke.stack.join(` `)}G("warning",Ce)||ae(Ce,"",!0)}}function X(ce){for(var de=[],be=0;be0?function(ye){for(var Ce=ye.stack.replace(/\s+$/g,"").split(` `),ke=0;ke0&&ye.name!="SyntaxError"&&(Ce=Ce.slice(ke)),Ce}(ce):[" (No stack trace)"],{message:be,stack:ce.name=="SyntaxError"?de:X(de)}}function ae(ce,de,be){if(typeof console<"u"){var ye;if(_.isObject(ce)){var Ce=ce.stack;ye=de+N(Ce,ce)}else ye=de+String(ce);typeof m=="function"?m(ye,be):typeof console.log!="function"&&typeof console.log!="object"||console.log(ye)}}function ge(ce,de,be,ye){var Ce=!1;try{typeof de=="function"&&(Ce=!0,ce==="rejectionHandled"?de(ye):de(be,ye))}catch(ke){y.throwLater(ke)}ce==="unhandledRejection"?G(ce,be,ye)||Ce||ae(be,"Unhandled rejection "):G(ce,ye)}function Le(ce){var de;if(typeof ce=="function")de="[function "+(ce.name||"anonymous")+"]";else{if(de=ce&&typeof ce.toString=="function"?ce.toString():_.toString(ce),/\[object [a-zA-Z0-9$_]+\]/.test(de))try{de=JSON.stringify(ce)}catch{}de.length===0&&(de="(empty array)")}return"(<"+function(be){return be.length<41?be:be.substr(0,38)+"..."}(de)+">, no stack trace)"}function ue(){return typeof Re=="function"}var ve=function(){return!1},_e=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;function Te(ce){var de=ce.match(_e);if(de)return{fileName:de[1],line:parseInt(de[2],10)}}function De(ce){this._parent=ce,this._promisesCreated=0;var de=this._length=1+(ce===void 0?0:ce._length);Re(this,De),de>32&&this.uncycle()}_.inherits(De,Error),f.CapturedTrace=De,De.prototype.uncycle=function(){var ce=this._length;if(!(ce<2)){for(var de=[],be={},ye=0,Ce=this;Ce!==void 0;++ye)de.push(Ce),Ce=Ce._parent;for(ye=(ce=this._length=ye)-1;ye>=0;--ye){var ke=de[ye].stack;be[ke]===void 0&&(be[ke]=ye)}for(ye=0;ye0&&(de[Ie-1]._parent=void 0,de[Ie-1]._length=1),de[ye]._parent=void 0,de[ye]._length=1;var Je=ye>0?de[ye-1]:this;Ie=0;--Ge)de[Ge]._length=et,et++;return}}}},De.prototype.attachExtraTrace=function(ce){if(!ce.__stackCleaned__){this.uncycle();for(var de=K(ce),be=de.message,ye=[de.stack],Ce=this;Ce!==void 0;)ye.push(X(Ce.stack.split(` -`))),Ce=Ce._parent;(function(ke){for(var Ie=ke[0],Je=1;Je=0;--wn)if(et[wn]===Wt){$t=wn;break}for(wn=$t;wn>=0;--wn){var ir=et[wn];if(Ie[Ge]!==ir)break;Ie.pop(),Ge--}Ie=et}})(ye),function(ke){for(var Ie=0;Ie=0;--wn)if(et[wn]===Ht){Ft=wn;break}for(wn=Ft;wn>=0;--wn){var ir=et[wn];if(Ie[Ge]!==ir)break;Ie.pop(),Ge--}Ie=et}})(ye),function(ke){for(var Ie=0;Ie=0)return k=/@/,N=de,D=!0,function(ke){ke.stack=new Error().stack};try{throw new Error}catch(ke){ye="stack"in ke}return"stack"in Ce||!ye||typeof Error.stackTraceLimit!="number"?(N=function(ke,Ie){return typeof ke=="string"?ke:typeof Ie!="object"&&typeof Ie!="function"||Ie.name===void 0||Ie.message===void 0?Le(Ie):Ie.toString()},null):(k=ce,N=de,function(ke){Error.stackTraceLimit+=6;try{throw new Error}catch(Ie){ke.stack=Ie.stack}Error.stackTraceLimit-=6})}();typeof console<"u"&&console.warn!==void 0&&(m=function(ce){console.warn(ce)},_.isNode&&r.stderr.isTTY?m=function(ce,de){var be=de?"\x1B[33m":"\x1B[31m";console.warn(be+ce+`\x1B[0m `)}:_.isNode||typeof new Error().stack!="string"||(m=function(ce,de){console.warn("%c"+ce,de?"color: darkorange":"color: red")}));var Ne={warnings:A,longStackTraces:!1,cancellation:!1,monitoring:!1};return W&&c.longStackTraces(),{longStackTraces:function(){return Ne.longStackTraces},warnings:function(){return Ne.warnings},cancellation:function(){return Ne.cancellation},monitoring:function(){return Ne.monitoring},propagateFromFunction:function(){return se},boundValueFunction:function(){return pe},checkForgottenReturns:function(ce,de,be,ye,Ce){if(ce===void 0&&de!==null&&Y){if(Ce!==void 0&&Ce._returnedNonUndefined()||!(65535&ye._bitField))return;be&&(be+=" ");var ke="",Ie="";if(de._trace){for(var Je=de._trace.stack.split(` -`),et=X(Je),Ge=et.length-1;Ge>=0;--Ge){var Wt=et[Ge];if(!T.test(Wt)){var $t=Wt.match(P);$t&&(ke="at "+$t[1]+":"+$t[2]+":"+$t[3]+" ");break}}if(et.length>0){var wn=et[0];for(Ge=0;Ge0&&(Ie=` +`),et=X(Je),Ge=et.length-1;Ge>=0;--Ge){var Ht=et[Ge];if(!T.test(Ht)){var Ft=Ht.match(P);Ft&&(ke="at "+Ft[1]+":"+Ft[2]+":"+Ft[3]+" ");break}}if(et.length>0){var wn=et[0];for(Ge=0;Ge0&&(Ie=` `+Je[Ge-1]);break}}}var ir="a promise was created in a "+be+"handler "+ke+"but was not returned from it, see http://goo.gl/rRqMUw"+Ie;ye._warn(ir,!0,de)}},setBounds:function(ce,de){if(ue()){for(var be,ye,Ce=ce.stack.split(` `),ke=de.stack.split(` -`),Ie=-1,Je=-1,et=0;et=Je||(ve=function(Wt){if(S.test(Wt))return!0;var $t=Te(Wt);return!!($t&&$t.fileName===be&&Ie<=$t.line&&$t.line<=Je)})}},warn:I,deprecated:function(ce,de){var be=ce+" is deprecated and will be removed in a future version.";return de&&(be+=" Use "+de+" instead."),I(be)},CapturedTrace:De,fireDomEvent:Z,fireGlobalEvent:ee}}},{"./errors":12,"./util":36}],10:[function(s,a,l){a.exports=function(c){function f(){return this.value}function h(){throw this.reason}c.prototype.return=c.prototype.thenReturn=function(p){return p instanceof c&&p.suppressUnhandledRejections(),this._then(f,void 0,void 0,{value:p},void 0)},c.prototype.throw=c.prototype.thenThrow=function(p){return this._then(h,void 0,void 0,{reason:p},void 0)},c.prototype.catchThrow=function(p){if(arguments.length<=1)return this._then(void 0,h,void 0,{reason:p},void 0);var m=arguments[1];return this.caught(p,function(){throw m})},c.prototype.catchReturn=function(p){if(arguments.length<=1)return p instanceof c&&p.suppressUnhandledRejections(),this._then(void 0,f,void 0,{value:p},void 0);var m=arguments[1];return m instanceof c&&m.suppressUnhandledRejections(),this.caught(p,function(){return m})}}},{}],11:[function(s,a,l){a.exports=function(c,f){var h=c.reduce,p=c.all;function m(){return p(this)}c.prototype.each=function(v){return h(this,v,f,0)._then(m,void 0,void 0,this,void 0)},c.prototype.mapSeries=function(v){return h(this,v,f,f)},c.each=function(v,y){return h(v,y,f,0)._then(m,void 0,void 0,v,void 0)},c.mapSeries=function(v,y){return h(v,y,f,f)}}},{}],12:[function(s,a,l){var c,f,h=s("./es5"),p=h.freeze,m=s("./util"),v=m.inherits,y=m.notEnumerableProp;function x(A,W){function Y(J){if(!(this instanceof Y))return new Y(J);y(this,"message",typeof J=="string"?J:W),y(this,"name",A),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return v(Y,Error),Y}var _=x("Warning","warning"),w=x("CancellationError","cancellation error"),S=x("TimeoutError","timeout error"),T=x("AggregateError","aggregate error");try{c=TypeError,f=RangeError}catch{c=x("TypeError","type error"),f=x("RangeError","range error")}for(var P="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),k=0;k=Je||(ve=function(Ht){if(S.test(Ht))return!0;var Ft=Te(Ht);return!!(Ft&&Ft.fileName===be&&Ie<=Ft.line&&Ft.line<=Je)})}},warn:I,deprecated:function(ce,de){var be=ce+" is deprecated and will be removed in a future version.";return de&&(be+=" Use "+de+" instead."),I(be)},CapturedTrace:De,fireDomEvent:Z,fireGlobalEvent:ee}}},{"./errors":12,"./util":36}],10:[function(s,a,l){a.exports=function(c){function f(){return this.value}function h(){throw this.reason}c.prototype.return=c.prototype.thenReturn=function(p){return p instanceof c&&p.suppressUnhandledRejections(),this._then(f,void 0,void 0,{value:p},void 0)},c.prototype.throw=c.prototype.thenThrow=function(p){return this._then(h,void 0,void 0,{reason:p},void 0)},c.prototype.catchThrow=function(p){if(arguments.length<=1)return this._then(void 0,h,void 0,{reason:p},void 0);var m=arguments[1];return this.caught(p,function(){throw m})},c.prototype.catchReturn=function(p){if(arguments.length<=1)return p instanceof c&&p.suppressUnhandledRejections(),this._then(void 0,f,void 0,{value:p},void 0);var m=arguments[1];return m instanceof c&&m.suppressUnhandledRejections(),this.caught(p,function(){return m})}}},{}],11:[function(s,a,l){a.exports=function(c,f){var h=c.reduce,p=c.all;function m(){return p(this)}c.prototype.each=function(v){return h(this,v,f,0)._then(m,void 0,void 0,this,void 0)},c.prototype.mapSeries=function(v){return h(this,v,f,f)},c.each=function(v,y){return h(v,y,f,0)._then(m,void 0,void 0,v,void 0)},c.mapSeries=function(v,y){return h(v,y,f,f)}}},{}],12:[function(s,a,l){var c,f,h=s("./es5"),p=h.freeze,m=s("./util"),v=m.inherits,y=m.notEnumerableProp;function x(A,W){function Y(J){if(!(this instanceof Y))return new Y(J);y(this,"message",typeof J=="string"?J:W),y(this,"name",A),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return v(Y,Error),Y}var _=x("Warning","warning"),w=x("CancellationError","cancellation error"),S=x("TimeoutError","timeout error"),T=x("AggregateError","aggregate error");try{c=TypeError,f=RangeError}catch{c=x("TypeError","type error"),f=x("RangeError","range error")}for(var P="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),k=0;k0?(typeof B=="string"||se.objectMode||Object.getPrototypeOf(B)===f.prototype||(B=function(pe){return f.from(pe)}(B)),H?se.endEmitted?j.emit("error",new Error("stream.unshift() after end event")):k(j,se,B,!0):se.ended?j.emit("error",new Error("stream.push() after EOF")):(se.reading=!1,se.decoder&&!ne?(B=se.decoder.write(B),se.objectMode||B.length!==0?k(j,se,B,!1):W(j,se)):k(j,se,B,!1))):H||(se.reading=!1)),function(pe){return!pe.ended&&(pe.needReadable||pe.lengthB.highWaterMark&&(B.highWaterMark=function(ne){return ne>=N?ne=N:(ne--,ne|=ne>>>1,ne|=ne>>>2,ne|=ne>>>4,ne|=ne>>>8,ne|=ne>>>16,ne++),ne}(j)),j<=B.length?j:B.ended?B.length:(B.needReadable=!0,0))}function z(j){var B=j._readableState;B.needReadable=!1,B.emittedReadable||(v("emitReadable",B.flowing),B.emittedReadable=!0,B.sync?o.nextTick(A,j):A(j))}function A(j){v("emit readable"),j.emit("readable"),ee(j)}function W(j,B){B.readingMore||(B.readingMore=!0,o.nextTick(Y,j,B))}function Y(j,B){for(var ne=B.length;!B.reading&&!B.flowing&&!B.ended&&B.length=B.length?(ne=B.decoder?B.buffer.join(""):B.buffer.length===1?B.buffer.head.data:B.buffer.concat(B.length),B.buffer.clear()):ne=function(H,q,te){var se;return HK.length?K.length:pe;if(ae===K.length?X+=K:X+=K.slice(0,pe),(pe-=ae)==0){ae===K.length?(++I,R.next?O.head=R.next:O.head=O.tail=null):(O.head=R,R.data=K.slice(ae));break}++I}return O.length-=I,X}(H,q):function(pe,O){var R=f.allocUnsafe(pe),I=O.head,X=1;for(I.data.copy(R),pe-=I.data.length;I=I.next;){var K=I.data,ae=pe>K.length?K.length:pe;if(K.copy(R,R.length-pe,0,ae),(pe-=ae)==0){ae===K.length?(++X,I.next?O.head=I.next:O.head=O.tail=null):(O.head=I,I.data=K.slice(ae));break}++X}return O.length-=X,R}(H,q),se}(j,B.buffer,B.decoder),ne);var ne}function oe(j){var B=j._readableState;if(B.length>0)throw new Error('"endReadable()" called on non-empty stream');B.endEmitted||(B.ended=!0,o.nextTick(G,B,j))}function G(j,B){j.endEmitted||j.length!==0||(j.endEmitted=!0,B.readable=!1,B.emit("end"))}function F(j,B){for(var ne=0,H=j.length;ne=B.highWaterMark||B.ended))return v("read: emitReadable",B.length,B.ended),B.length===0&&B.ended?oe(this):z(this),null;if((j=D(j,B))===0&&B.ended)return B.length===0&&oe(this),null;var H,q=B.needReadable;return v("need readable",q),(B.length===0||B.length-j0?ie(j,B):null)===null?(B.needReadable=!0,j=0):B.length-=j,B.length===0&&(B.ended||(B.needReadable=!0),ne!==j&&B.ended&&oe(this)),H!==null&&this.emit("data",H),H},T.prototype._read=function(j){this.emit("error",new Error("_read() is not implemented"))},T.prototype.pipe=function(j,B){var ne=this,H=this._readableState;switch(H.pipesCount){case 0:H.pipes=j;break;case 1:H.pipes=[H.pipes,j];break;default:H.pipes.push(j)}H.pipesCount+=1,v("pipe count=%d opts=%j",H.pipesCount,B);var q=B&&B.end===!1||j===i.stdout||j===i.stderr?ae:te;function te(){v("onend"),j.end()}H.endEmitted?o.nextTick(q):ne.once("end",q),j.on("unpipe",function ge(Le,ue){v("onunpipe"),Le===ne&&ue&&ue.hasUnpiped===!1&&(ue.hasUnpiped=!0,v("cleanup"),j.removeListener("close",X),j.removeListener("finish",K),j.removeListener("drain",se),j.removeListener("error",I),j.removeListener("unpipe",ge),ne.removeListener("end",te),ne.removeListener("end",ae),ne.removeListener("data",R),pe=!0,!H.awaitDrain||j._writableState&&!j._writableState.needDrain||se())});var se=function(ge){return function(){var Le=ge._readableState;v("pipeOnDrain",Le.awaitDrain),Le.awaitDrain&&Le.awaitDrain--,Le.awaitDrain===0&&l(ge,"data")&&(Le.flowing=!0,ee(ge))}}(ne);j.on("drain",se);var pe=!1,O=!1;function R(ge){v("ondata"),O=!1,j.write(ge)!==!1||O||((H.pipesCount===1&&H.pipes===j||H.pipesCount>1&&F(H.pipes,j)!==-1)&&!pe&&(v("false write response, pause",ne._readableState.awaitDrain),ne._readableState.awaitDrain++,O=!0),ne.pause())}function I(ge){v("onerror",ge),ae(),j.removeListener("error",I),l(j,"error")===0&&j.emit("error",ge)}function X(){j.removeListener("finish",K),ae()}function K(){v("onfinish"),j.removeListener("close",X),ae()}function ae(){v("unpipe"),ne.unpipe(j)}return ne.on("data",R),function(ge,Le,ue){if(typeof ge.prependListener=="function")return ge.prependListener(Le,ue);ge._events&&ge._events[Le]?a(ge._events[Le])?ge._events[Le].unshift(ue):ge._events[Le]=[ue,ge._events[Le]]:ge.on(Le,ue)}(j,"error",I),j.once("close",X),j.once("finish",K),j.emit("pipe",ne),H.flowing||(v("pipe resume"),ne.resume()),j},T.prototype.unpipe=function(j){var B=this._readableState,ne={hasUnpiped:!1};if(B.pipesCount===0)return this;if(B.pipesCount===1)return j&&j!==B.pipes?this:(j||(j=B.pipes),B.pipes=null,B.pipesCount=0,B.flowing=!1,j&&j.emit("unpipe",this,ne),this);if(!j){var H=B.pipes,q=B.pipesCount;B.pipes=null,B.pipesCount=0,B.flowing=!1;for(var te=0;te>5==6?2:v>>4==14?3:v>>3==30?4:v>>6==2?-1:-2}function a(v){var y=this.lastTotal-this.lastNeed,x=function(_,w,S){if((192&w[0])!=128)return _.lastNeed=0,"�";if(_.lastNeed>1&&w.length>1){if((192&w[1])!=128)return _.lastNeed=1,"�";if(_.lastNeed>2&&w.length>2&&(192&w[2])!=128)return _.lastNeed=2,"�"}}(this,v);return x!==void 0?x:this.lastNeed<=v.length?(v.copy(this.lastChar,y,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(v.copy(this.lastChar,y,0,v.length),void(this.lastNeed-=v.length))}function l(v,y){if((v.length-y)%2==0){var x=v.toString("utf16le",y);if(x){var _=x.charCodeAt(x.length-1);if(_>=55296&&_<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=v[v.length-2],this.lastChar[1]=v[v.length-1],x.slice(0,-1)}return x}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=v[v.length-1],v.toString("utf16le",y,v.length-1)}function c(v){var y=v&&v.length?this.write(v):"";if(this.lastNeed){var x=this.lastTotal-this.lastNeed;return y+this.lastChar.toString("utf16le",0,x)}return y}function f(v,y){var x=(v.length-y)%3;return x===0?v.toString("base64",y):(this.lastNeed=3-x,this.lastTotal=3,x===1?this.lastChar[0]=v[v.length-1]:(this.lastChar[0]=v[v.length-2],this.lastChar[1]=v[v.length-1]),v.toString("base64",y,v.length-x))}function h(v){var y=v&&v.length?this.write(v):"";return this.lastNeed?y+this.lastChar.toString("base64",0,3-this.lastNeed):y}function p(v){return v.toString(this.encoding)}function m(v){return v&&v.length?this.write(v):""}t.StringDecoder=o,o.prototype.write=function(v){if(v.length===0)return"";var y,x;if(this.lastNeed){if((y=this.fillLast(v))===void 0)return"";x=this.lastNeed,this.lastNeed=0}else x=0;return x=0?(k>0&&(w.lastNeed=k-1),k):--P=0?(k>0&&(w.lastNeed=k-2),k):--P=0?(k>0&&(k===2?k=0:w.lastNeed=k-3),k):0}(this,v,y);if(!this.lastNeed)return v.toString("utf8",y);this.lastTotal=x;var _=v.length-(x-this.lastNeed);return v.copy(this.lastChar,0,_),v.toString("utf8",y,_)},o.prototype.fillLast=function(v){if(this.lastNeed<=v.length)return v.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);v.copy(this.lastChar,this.lastTotal-this.lastNeed,0,v.length),this.lastNeed-=v.length}},function(e,t,n){e.exports=o;var r=n(1),i=n(5);function o(l){if(!(this instanceof o))return new o(l);r.call(this,l),this._transformState={afterTransform:function(c,f){var h=this._transformState;h.transforming=!1;var p=h.writecb;if(!p)return this.emit("error",new Error("write callback called multiple times"));h.writechunk=null,h.writecb=null,f!=null&&this.push(f),p(c);var m=this._readableState;m.reading=!1,(m.needReadable||m.length-1&&s.push(i[a]);return s},t.trimLeft=String.prototype.trimLeft?function(i){return i.trimLeft()}:function(i){return i.replace(/^\s+/,"")},t.trimRight=String.prototype.trimRight?function(i){return i.trimRight()}:function(i){return i.replace(/\s+$/,"")}}).call(this,n(3).Buffer)},function(e,t,n){var r=this&&this.__extends||function(){var o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,a){s.__proto__=a}||function(s,a){for(var l in a)a.hasOwnProperty(l)&&(s[l]=a[l])};return function(s,a){function l(){this.constructor=s}o(s,a),s.prototype=a===null?Object.create(a):(l.prototype=a.prototype,new l)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(o){function s(a,l,c){var f=o.call(this,"Error: "+a+". JSON Line number: "+l+(c?" near: "+c:""))||this;return f.err=a,f.line=l,f.extra=c,f.name="CSV Parse Error",f}return r(s,o),s.column_mismatched=function(a,l){return new s("column_mismatched",a,l)},s.unclosed_quote=function(a,l){return new s("unclosed_quote",a,l)},s.fromJSON=function(a){return new s(a.err,a.line,a.extra)},s.prototype.toJSON=function(){return{err:this.err,line:this.line,extra:this.extra}},s}(Error);t.default=i},function(e,t,n){var r=n(18),i=n(68),o=n(69),s=r?r.toStringTag:void 0;e.exports=function(a){return a==null?a===void 0?"[object Undefined]":"[object Null]":s&&s in Object(a)?i(a):o(a)}},function(e,t){e.exports=function(n,r){return n===r||n!=n&&r!=r}},function(e,t,n){e.exports=n(33)},function(e,t,n){var r=n(34),i=function(o,s){return new r.Converter(o,s)};i.csv=i,i.Converter=r.Converter,e.exports=i},function(e,t,n){(function(r){var i=this&&this.__extends||function(){var m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,y){v.__proto__=y}||function(v,y){for(var x in y)y.hasOwnProperty(x)&&(v[x]=y[x])};return function(v,y){function x(){this.constructor=v}m(v,y),v.prototype=y===null?Object.create(y):(x.prototype=y.prototype,new x)}}(),o=this&&this.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(36),a=n(50),l=n(51),c=o(n(15)),f=n(52),h=n(105),p=function(m){function v(y,x){x===void 0&&(x={});var _=m.call(this,x)||this;return _.options=x,_.params=a.mergeParams(y),_.runtime=l.initParseRuntime(_),_.result=new h.Result(_),_.processor=new f.ProcessorLocal(_),_.once("error",function(w){r(function(){_.result.processError(w),_.emit("done",w)})}),_.once("done",function(){_.processor.destroy()}),_}return i(v,m),v.prototype.preRawData=function(y){return this.runtime.preRawDataHook=y,this},v.prototype.preFileLine=function(y){return this.runtime.preFileLineHook=y,this},v.prototype.subscribe=function(y,x,_){return this.parseRuntime.subscribe={onNext:y,onError:x,onCompleted:_},this},v.prototype.fromFile=function(y,x){var _=this,w=n(!function(){var S=new Error("Cannot find module 'fs'");throw S.code="MODULE_NOT_FOUND",S}());return w.exists(y,function(S){S?w.createReadStream(y,x).pipe(_):_.emit("error",new Error("File does not exist. Check to make sure the file path to your csv is correct."))}),this},v.prototype.fromStream=function(y){return y.pipe(this),this},v.prototype.fromString=function(y){y.toString();var x=new s.Readable,_=0;return x._read=function(w){if(_>=y.length)this.push(null);else{var S=y.substr(_,w);this.push(S),_+=w}},this.fromStream(x)},v.prototype.then=function(y,x){var _=this;return new c.default(function(w,S){_.parseRuntime.then={onfulfilled:function(T){w(y?y(T):T)},onrejected:function(T){x?w(x(T)):S(T)}}})},Object.defineProperty(v.prototype,"parseParam",{get:function(){return this.params},enumerable:!0,configurable:!0}),Object.defineProperty(v.prototype,"parseRuntime",{get:function(){return this.runtime},enumerable:!0,configurable:!0}),v.prototype._transform=function(y,x,_){var w=this;this.processor.process(y).then(function(S){if(S.length>0)return w.runtime.started=!0,w.result.processResult(S)}).then(function(){w.emit("drained"),_()},function(S){w.runtime.hasError=!0,w.runtime.error=S,w.emit("error",S),_()})},v.prototype._flush=function(y){var x=this;this.processor.flush().then(function(_){if(_.length>0)return x.result.processResult(_)}).then(function(){x.processEnd(y)},function(_){x.emit("error",_),y()})},v.prototype.processEnd=function(y){this.result.endProcess(),this.emit("done"),y()},Object.defineProperty(v.prototype,"parsedLineNumber",{get:function(){return this.runtime.parsedLineNumber},enumerable:!0,configurable:!0}),v}(s.Transform);t.Converter=p}).call(this,n(11).setImmediate)},function(e,t,n){(function(r,i){(function(o,s){if(!o.setImmediate){var a,l=1,c={},f=!1,h=o.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(o);p=p&&p.setTimeout?p:o,{}.toString.call(o.process)==="[object process]"?a=function(y){i.nextTick(function(){v(y)})}:function(){if(o.postMessage&&!o.importScripts){var y=!0,x=o.onmessage;return o.onmessage=function(){y=!1},o.postMessage("","*"),o.onmessage=x,y}}()?function(){var y="setImmediate$"+Math.random()+"$",x=function(_){_.source===o&&typeof _.data=="string"&&_.data.indexOf(y)===0&&v(+_.data.slice(y.length))};o.addEventListener?o.addEventListener("message",x,!1):o.attachEvent("onmessage",x),a=function(_){o.postMessage(y+_,"*")}}():o.MessageChannel?function(){var y=new MessageChannel;y.port1.onmessage=function(x){v(x.data)},a=function(x){y.port2.postMessage(x)}}():h&&"onreadystatechange"in h.createElement("script")?function(){var y=h.documentElement;a=function(x){var _=h.createElement("script");_.onreadystatechange=function(){v(x),_.onreadystatechange=null,y.removeChild(_),_=null},y.appendChild(_)}}():a=function(y){setTimeout(v,0,y)},p.setImmediate=function(y){typeof y!="function"&&(y=new Function(""+y));for(var x=new Array(arguments.length-1),_=0;_"u"?r===void 0?this:r:self)}).call(this,n(0),n(4))},function(e,t,n){e.exports=i;var r=n(12).EventEmitter;function i(){r.call(this)}n(2)(i,r),i.Readable=n(13),i.Writable=n(46),i.Duplex=n(47),i.Transform=n(48),i.PassThrough=n(49),i.Stream=i,i.prototype.pipe=function(o,s){var a=this;function l(y){o.writable&&o.write(y)===!1&&a.pause&&a.pause()}function c(){a.readable&&a.resume&&a.resume()}a.on("data",l),o.on("drain",c),o._isStdio||s&&s.end===!1||(a.on("end",h),a.on("close",p));var f=!1;function h(){f||(f=!0,o.end())}function p(){f||(f=!0,typeof o.destroy=="function"&&o.destroy())}function m(y){if(v(),r.listenerCount(this,"error")===0)throw y}function v(){a.removeListener("data",l),o.removeListener("drain",c),a.removeListener("end",h),a.removeListener("close",p),a.removeListener("error",m),o.removeListener("error",m),a.removeListener("end",v),a.removeListener("close",v),o.removeListener("close",v)}return a.on("error",m),o.on("error",m),a.on("end",v),a.on("close",v),o.on("close",v),o.emit("pipe",a),o}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(r){return n.call(r)=="[object Array]"}},function(e,t,n){t.byteLength=function(p){var m=c(p),v=m[0],y=m[1];return 3*(v+y)/4-y},t.toByteArray=function(p){for(var m,v=c(p),y=v[0],x=v[1],_=new o(3*(y+x)/4-x),w=0,S=x>0?y-4:y,T=0;T>16&255,_[w++]=m>>8&255,_[w++]=255&m;return x===2&&(m=i[p.charCodeAt(T)]<<2|i[p.charCodeAt(T+1)]>>4,_[w++]=255&m),x===1&&(m=i[p.charCodeAt(T)]<<10|i[p.charCodeAt(T+1)]<<4|i[p.charCodeAt(T+2)]>>2,_[w++]=m>>8&255,_[w++]=255&m),_},t.fromByteArray=function(p){for(var m,v=p.length,y=v%3,x=[],_=0,w=v-y;_w?w:_+16383));return y===1?(m=p[v-1],x.push(r[m>>2]+r[m<<4&63]+"==")):y===2&&(m=(p[v-2]<<8)+p[v-1],x.push(r[m>>10]+r[m>>4&63]+r[m<<2&63]+"=")),x.join("")};for(var r=[],i=[],o=typeof Uint8Array<"u"?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,l=s.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var v=p.indexOf("=");return v===-1&&(v=m),[v,v===m?0:4-v%4]}function f(p){return r[p>>18&63]+r[p>>12&63]+r[p>>6&63]+r[63&p]}function h(p,m,v){for(var y,x=[],_=m;_>1,p=-7,m=i?s-1:0,v=i?-1:1,y=n[r+m];for(m+=v,a=y&(1<<-p)-1,y>>=-p,p+=c;p>0;a=256*a+n[r+m],m+=v,p-=8);for(l=a&(1<<-p)-1,a>>=-p,p+=o;p>0;l=256*l+n[r+m],m+=v,p-=8);if(a===0)a=1-h;else{if(a===f)return l?NaN:1/0*(y?-1:1);l+=Math.pow(2,o),a-=h}return(y?-1:1)*l*Math.pow(2,a-o)},t.write=function(n,r,i,o,s,a){var l,c,f,h=8*a-s-1,p=(1<>1,v=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,y=o?0:a-1,x=o?1:-1,_=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(c=isNaN(r)?1:0,l=p):(l=Math.floor(Math.log(r)/Math.LN2),r*(f=Math.pow(2,-l))<1&&(l--,f*=2),(r+=l+m>=1?v/f:v*Math.pow(2,1-m))*f>=2&&(l++,f/=2),l+m>=p?(c=0,l=p):l+m>=1?(c=(r*f-1)*Math.pow(2,s),l+=m):(c=r*Math.pow(2,m-1)*Math.pow(2,s),l=0));s>=8;n[i+y]=255&c,y+=x,c/=256,s-=8);for(l=l<0;n[i+y]=255&l,y+=x,l/=256,h-=8);n[i+y-x]|=128*_}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(r){return n.call(r)=="[object Array]"}},function(e,t){},function(e,t,n){var r=n(7).Buffer,i=n(43);function o(s,a,l){s.copy(a,l)}e.exports=function(){function s(){(function(a,l){if(!(a instanceof l))throw new TypeError("Cannot call a class as a function")})(this,s),this.head=null,this.tail=null,this.length=0}return s.prototype.push=function(a){var l={data:a,next:null};this.length>0?this.tail.next=l:this.head=l,this.tail=l,++this.length},s.prototype.unshift=function(a){var l={data:a,next:this.head};this.length===0&&(this.tail=l),this.head=l,++this.length},s.prototype.shift=function(){if(this.length!==0){var a=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,a}},s.prototype.clear=function(){this.head=this.tail=null,this.length=0},s.prototype.join=function(a){if(this.length===0)return"";for(var l=this.head,c=""+l.data;l=l.next;)c+=a+l.data;return c},s.prototype.concat=function(a){if(this.length===0)return r.alloc(0);if(this.length===1)return this.head.data;for(var l=r.allocUnsafe(a>>>0),c=this.head,f=0;c;)o(c.data,l,f),f+=c.data.length,c=c.next;return l},s}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var s=i.inspect({length:this.length});return this.constructor.name+" "+s})},function(e,t){},function(e,t,n){(function(r){function i(o){try{if(!r.localStorage)return!1}catch{return!1}var s=r.localStorage[o];return s!=null&&String(s).toLowerCase()==="true"}e.exports=function(o,s){if(i("noDeprecation"))return o;var a=!1;return function(){if(!a){if(i("throwDeprecation"))throw new Error(s);i("traceDeprecation")?console.trace(s):console.warn(s),a=!0}return o.apply(this,arguments)}}}).call(this,n(0))},function(e,t,n){e.exports=o;var r=n(27),i=n(5);function o(s){if(!(this instanceof o))return new o(s);r.call(this,s)}i.inherits=n(2),i.inherits(o,r),o.prototype._transform=function(s,a,l){l(null,s)}},function(e,t,n){e.exports=n(14)},function(e,t,n){e.exports=n(1)},function(e,t,n){e.exports=n(13).Transform},function(e,t,n){e.exports=n(13).PassThrough},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.mergeParams=function(r){var i={delimiter:",",ignoreColumns:void 0,includeColumns:void 0,quote:'"',trim:!0,checkType:!1,ignoreEmpty:!1,noheader:!1,headers:void 0,flatKeys:!1,maxRowLength:0,checkColumn:!1,escape:'"',colParser:{},eol:void 0,alwaysSplitAtEOL:!1,output:"json",nullObject:!1,downstreamFormat:"line",needEmitAll:!0};for(var o in r||(r={}),r)r.hasOwnProperty(o)&&(Array.isArray(r[o])?i[o]=[].concat(r[o]):i[o]=r[o]);return i}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.initParseRuntime=function(r){var i=r.parseParam,o={needProcessIgnoreColumn:!1,needProcessIncludeColumn:!1,selectedColumns:void 0,ended:!1,hasError:!1,error:void 0,delimiter:r.parseParam.delimiter,eol:r.parseParam.eol,columnConv:[],headerType:[],headerTitle:[],headerFlag:[],headers:void 0,started:!1,parsedLineNumber:0,columnValueSetter:[]};return i.ignoreColumns&&(o.needProcessIgnoreColumn=!0),i.includeColumns&&(o.needProcessIncludeColumn=!0),o}},function(e,t,n){(function(r){var i=this&&this.__extends||function(){var x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,w){_.__proto__=w}||function(_,w){for(var S in w)w.hasOwnProperty(S)&&(_[S]=w[S])};return function(_,w){function S(){this.constructor=_}x(_,w),_.prototype=w===null?Object.create(w):(S.prototype=w.prototype,new S)}}(),o=this&&this.__importDefault||function(x){return x&&x.__esModule?x:{default:x}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(53),a=o(n(15)),l=n(54),c=o(n(16)),f=n(57),h=n(28),p=n(58),m=o(n(59)),v=o(n(29)),y=function(x){function _(){var w=x!==null&&x.apply(this,arguments)||this;return w.rowSplit=new p.RowSplit(w.converter),w.eolEmitted=!1,w._needEmitEol=void 0,w.headEmitted=!1,w._needEmitHead=void 0,w}return i(_,x),_.prototype.flush=function(){var w=this;if(this.runtime.csvLineBuffer&&this.runtime.csvLineBuffer.length>0){var S=this.runtime.csvLineBuffer;return this.runtime.csvLineBuffer=void 0,this.process(S,!0).then(function(T){return w.runtime.csvLineBuffer&&w.runtime.csvLineBuffer.length>0?a.default.reject(v.default.unclosed_quote(w.runtime.parsedLineNumber,w.runtime.csvLineBuffer.toString())):a.default.resolve(T)})}return a.default.resolve([])},_.prototype.destroy=function(){return a.default.resolve()},Object.defineProperty(_.prototype,"needEmitEol",{get:function(){return this._needEmitEol===void 0&&(this._needEmitEol=this.converter.listeners("eol").length>0),this._needEmitEol},enumerable:!0,configurable:!0}),Object.defineProperty(_.prototype,"needEmitHead",{get:function(){return this._needEmitHead===void 0&&(this._needEmitHead=this.converter.listeners("header").length>0),this._needEmitHead},enumerable:!0,configurable:!0}),_.prototype.process=function(w,S){var T,P=this;return S===void 0&&(S=!1),T=S?w.toString():l.prepareData(w,this.converter.parseRuntime),a.default.resolve().then(function(){return P.runtime.preRawDataHook?P.runtime.preRawDataHook(T):T}).then(function(k){return k&&k.length>0?P.processCSV(k,S):a.default.resolve([])})},_.prototype.processCSV=function(w,S){var T=this,P=this.params,k=this.runtime;k.eol||c.default(w,k),this.needEmitEol&&!this.eolEmitted&&k.eol&&(this.converter.emit("eol",k.eol),this.eolEmitted=!0),P.ignoreEmpty&&!k.started&&(w=h.trimLeft(w));var N=f.stringToLines(w,k);return S?(N.lines.push(N.partial),N.partial=""):this.prependLeftBuf(h.bufFromString(N.partial)),N.lines.length>0?(k.preFileLineHook?this.runPreLineHook(N.lines):a.default.resolve(N.lines)).then(function(D){return k.started||T.runtime.headers?T.processCSVBody(D):T.processDataWithHead(D)}):a.default.resolve([])},_.prototype.processDataWithHead=function(w){if(this.params.noheader)this.params.headers?this.runtime.headers=this.params.headers:this.runtime.headers=[];else{for(var S="",T=[];w.length;){var P=S+w.shift(),k=this.rowSplit.parse(P);if(k.closed){T=k.cells,S="";break}S=P+c.default(P,this.runtime)}if(this.prependLeftBuf(h.bufFromString(S)),T.length===0)return[];this.params.headers?this.runtime.headers=this.params.headers:this.runtime.headers=T}return(this.runtime.needProcessIgnoreColumn||this.runtime.needProcessIncludeColumn)&&this.filterHeader(),this.needEmitHead&&!this.headEmitted&&(this.converter.emit("header",this.runtime.headers),this.headEmitted=!0),this.processCSVBody(w)},_.prototype.filterHeader=function(){if(this.runtime.selectedColumns=[],this.runtime.headers){for(var w=this.runtime.headers,S=0;S=N.length)A();else if(D.preFileLineHook){var W=N[z],Y=D.preFileLineHook(W,D.parsedLineNumber+z);if(z++,Y&&Y.then)Y.then(function(J){N[z-1]=J,k(N,D,z,A)});else{for(N[z-1]=Y;z0?r.concat([h.csvLineBuffer,f]):f}(s,a);a.csvLineBuffer=void 0;var c=function(f,h){var p=f.length-1;if(128&f[p]){for(;(192&f[p])==128;)p--;p--}return p!=f.length-1?(h.csvLineBuffer=f.slice(p+1),f.slice(0,p+1)):f}(l,a).toString("utf8");return a.started===!1?o.default(c):c}}).call(this,n(3).Buffer)},function(e,t,n){(function(r){var i=n(56);e.exports=function(o){return typeof o=="string"&&o.charCodeAt(0)===65279?o.slice(1):r.isBuffer(o)&&i(o)&&o[0]===239&&o[1]===187&&o[2]===191?o.slice(3):o}}).call(this,n(3).Buffer)},function(e,t){e.exports=function(n){for(var r=0;r0),this._needEmitDelimiter},enumerable:!0,configurable:!0}),l.prototype.parse=function(c){if(c.length===0||this.conv.parseParam.ignoreEmpty&&c.trim().length===0)return{cells:[],closed:!0};var f=this.quote,h=this.trim;this.escape,(this.conv.parseRuntime.delimiter instanceof Array||this.conv.parseRuntime.delimiter.toLowerCase()==="auto")&&(this.conv.parseRuntime.delimiter=this.getDelimiter(c)),this.needEmitDelimiter&&!this.delimiterEmitted&&(this.conv.emit("delimiter",this.conv.parseRuntime.delimiter),this.delimiterEmitted=!0);var p=this.conv.parseRuntime.delimiter,m=c.split(p);if(f==="off"){if(h)for(var v=0;vh&&(p=m,h=v)}),p},l.prototype.isQuoteOpen=function(c){var f=this.quote,h=this.escape;return c[0]===f&&(c[1]!==f||c[1]===h&&(c[2]===f||c.length===2))},l.prototype.isQuoteClose=function(c){var f=this.quote,h=this.escape;this.conv.parseParam.trim&&(c=o.trimRight(c));for(var p=0,m=c.length-1;c[m]===f||c[m]===h;)m--,p++;return p%2!=0},l.prototype.escapeQuote=function(c){var f="es|"+this.quote+"|"+this.escape;this.cachedRegExp[f]===void 0&&(this.cachedRegExp[f]=new RegExp("\\"+this.escape+"\\"+this.quote,"g"));var h=this.cachedRegExp[f];return c.replace(h,this.quote)},l.prototype.parseMultiLines=function(c){for(var f=[],h="";c.length;){var p=h+c.shift(),m=this.parse(p);m.cells.length===0&&this.conv.parseParam.ignoreEmpty||(m.closed||this.conv.parseParam.alwaysSplitAtEOL?(this.conv.parseRuntime.selectedColumns?f.push(o.filterArray(m.cells,this.conv.parseRuntime.selectedColumns)):f.push(m.cells),h=""):h=p+(i.default(p,this.conv.parseRuntime)||` `))}return{rowsCells:f,partial:h}},l}();t.RowSplit=a},function(e,t,n){var r=this&&this.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(29)),o=r(n(60)),s=/^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$/;function a(_,w,S){if(w.parseParam.checkColumn&&w.parseRuntime.headers&&_.length!==w.parseRuntime.headers.length)throw i.default.column_mismatched(w.parseRuntime.parsedLineNumber+S);return function(T,P,k){for(var N=!1,D={},z=0,A=T.length;z-1){for(var k=w.split("."),N=!0;k.length>0;)if(k.shift().length===0){N=!1;break}!N||T.parseParam.colParser[w]&&T.parseParam.colParser[w].flat?T.parseRuntime.columnValueSetter[P]=h:T.parseRuntime.columnValueSetter[P]=p}else T.parseRuntime.columnValueSetter[P]=h;T.parseParam.nullObject===!0&&S==="null"&&(S=null),T.parseRuntime.columnValueSetter[P](_,w,S)}function h(_,w,S){_[w]=S}function p(_,w,S){o.default(_,w,S)}function m(_,w,S,T){return T.parseRuntime.headerType[S]?T.parseRuntime.headerType[S]:w.indexOf("number#!")>-1?T.parseRuntime.headerType[S]=v:w.indexOf("string#!")>-1?T.parseRuntime.headerType[S]=y:T.parseParam.checkType?T.parseRuntime.headerType[S]=x:T.parseRuntime.headerType[S]=y}function v(_){var w=parseFloat(_);return isNaN(w)?_:w}function y(_){return _.toString()}function x(_){var w=_.trim();return w===""?y(_):s.test(w)?v(_):w.length===5&&w.toLowerCase()==="false"||w.length===4&&w.toLowerCase()==="true"?function(S){var T=S.trim();return T.length!==5||T.toLowerCase()!=="false"}(_):w[0]==="{"&&w[w.length-1]==="}"||w[0]==="["&&w[w.length-1]==="]"?function(S){try{return JSON.parse(S)}catch{return S}}(_):y(_)}},function(e,t,n){var r=n(61);e.exports=function(i,o,s){return i==null?i:r(i,o,s)}},function(e,t,n){var r=n(62),i=n(74),o=n(103),s=n(20),a=n(104);e.exports=function(l,c,f,h){if(!s(l))return l;for(var p=-1,m=(c=i(c,l)).length,v=m-1,y=l;y!=null&&++p-1}},function(e,t,n){var r=n(9);e.exports=function(i,o){var s=this.__data__,a=r(s,i);return a<0?(++this.size,s.push([i,o])):s[a][1]=o,this}},function(e,t,n){var r=n(17)(n(19),"Map");e.exports=r},function(e,t,n){var r=n(10);e.exports=function(i){var o=r(this,i).delete(i);return this.size-=o?1:0,o}},function(e,t){e.exports=function(n){var r=typeof n;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?n!=="__proto__":n===null}},function(e,t,n){var r=n(10);e.exports=function(i){return r(this,i).get(i)}},function(e,t,n){var r=n(10);e.exports=function(i){return r(this,i).has(i)}},function(e,t,n){var r=n(10);e.exports=function(i,o){var s=r(this,i),a=s.size;return s.set(i,o),this.size+=s.size==a?0:1,this}},function(e,t,n){var r=n(101);e.exports=function(i){return i==null?"":r(i)}},function(e,t,n){var r=n(18),i=n(102),o=n(21),s=n(22),a=r?r.prototype:void 0,l=a?a.toString:void 0;e.exports=function c(f){if(typeof f=="string")return f;if(o(f))return i(f,c)+"";if(s(f))return l?l.call(f):"";var h=f+"";return h=="0"&&1/f==-1/0?"-0":h}},function(e,t){e.exports=function(n,r){for(var i=-1,o=n==null?0:n.length,s=Array(o);++i-1&&r%1==0&&r0||this.converter.listeners("readable").length>0),this._needPushDownstream},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"needEmitAll",{get:function(){return!!this.converter.parseRuntime.then&&this.converter.parseParam.needEmitAll},enumerable:!0,configurable:!0}),l.prototype.processResult=function(c){var f=this,h=this.converter.parseRuntime.parsedLineNumber;return this.needPushDownstream&&this.converter.parseParam.downstreamFormat==="array"&&h===0&&a(this.converter,"["+o.EOL),new i.default(function(p,m){f.needEmitLine?function v(y,x,_,w,S){if(_>=y.length)S();else if(x.parseRuntime.subscribe&&x.parseRuntime.subscribe.onNext){var T=x.parseRuntime.subscribe.onNext,P=y[_],k=T(P,x.parseRuntime.parsedLineNumber+_);if(_++,k&&k.then)k.then(function(){(function(D,z,A,W,Y,J,Z){Y&&a(A,Z),v(D,A,W,Y,J)})(y,0,x,_,w,S,P)},S);else{for(w&&a(x,P);_new Promise(t=>{O_e().fromString(e).then(t)}),k_e=new T_e,M_e=e=>k_e.parse(e),R_e=6,vL="0123456789ABCDEF",N_e=128,{floor:L_e,random:D_e,sqrt:A_e,round:j_e}=Math,I_e=()=>`#${_E(R_e,()=>vL[L_e(D_e()*vL.length)]).join("")}`,yL=e=>e.toLowerCase().trim(),F_e=e=>(e.match(/../g)??[]).map(t=>parseInt(t,16)||0),$_e=(e=0,t=0,n=0)=>j_e(A_e(.299*e**2+.587*t**2+.114*n**2));class B_e{constructor(t){xe(this,"colors");xe(this,"lights");xe(this,"getColorForKey",t=>{const n=yL(t),r=this.colors[n];return r||this.setColorForKey(n,I_e())});xe(this,"setColorForKey",(t,n)=>{const r=yL(t);return this.colors[r]=n,this.storage.set("colors",this.colors),n});xe(this,"isColorLightForKey",t=>{const n=this.getColorForKey(t).substring(1);if(Fo(this.lights[n])){const r=F_e(n);this.lights[n]=$_e(...r)>=N_e}return this.lights[n]});this.storage=t,this.colors=this.storage.get("colors")??{},this.lights={}}}const z_e="shlink",_L=e=>`${z_e}.${e}`;class U_e{constructor(t){xe(this,"get",t=>{const n=this.localStorage.getItem(_L(t));return n?JSON.parse(n):void 0});xe(this,"set",(t,n)=>this.localStorage.setItem(_L(t),JSON.stringify(n)));this.localStorage=t}}const V_e=e=>{e.constant("localStorage",window.localStorage),e.service("Storage",U_e,"localStorage"),e.service("ColorGenerator",B_e,"Storage"),e.constant("csvToJson",P_e),e.constant("jsonToCsv",M_e),e.constant("setTimeout",window.setTimeout),e.constant("clearTimeout",window.clearTimeout),e.serviceFactory("useTimeoutToggle",_oe,"setTimeout","clearTimeout")},rT=e=>e.visitedUrl!==void 0,H_e=e=>e.visitedUrl!==void 0,W_e=Dt(eZ(e=>rT(e.visit)?"orphanVisits":"nonOrphanVisits"),e=>({orphanVisits:[],nonOrphanVisits:[],...e})),Ap=(e,t)=>Sj(at(t),e),dh=({page:e,itemsPerPage:t,filter:n,dateRange:r})=>{const i=((r==null?void 0:r.startDate)&&Hs(r==null?void 0:r.startDate))??void 0,o=((r==null?void 0:r.endDate)&&Hs(r==null?void 0:r.endDate))??void 0,s=(n==null?void 0:n.excludeBots)||void 0;return{page:e,itemsPerPage:t,startDate:i,endDate:o,excludeBots:s}},hh=({visits:e,goBack:t,shortUrl:n,children:r,title:i})=>g.jsx("header",{children:g.jsxs(Sr,{body:!0,children:[g.jsxs("h2",{className:"d-flex justify-content-between align-items-center mb-0",children:[g.jsx(ht,{color:"link",size:"lg",className:"p-0 me-3",onClick:t,children:g.jsx(je,{icon:Kj})}),g.jsx("span",{className:"text-center d-none d-sm-block",children:g.jsx("small",{children:i})}),g.jsxs("span",{className:"badge badge-main ms-3",children:["Visits:"," ",g.jsx(H5,{visitsCount:e.length,shortUrl:n})]})]}),g.jsx("h3",{className:"text-center d-block d-sm-none mb-0 mt-3",children:g.jsx("small",{children:i})}),r&&g.jsx("div",{className:"mt-md-2",children:r})]})});const R8=({title:e,footer:t,children:n})=>g.jsxs(Sr,{role:"document",children:[g.jsx(rl,{className:"chart-card__header",children:typeof e=="function"?e():e}),g.jsx(nl,{children:n}),t&&g.jsx(ZC,{className:"chart-card__footer--sticky",children:t})]}),N8="label";function bL(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function Y_e(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function L8(e,t){e.labels=t}function D8(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:N8;const r=[];e.datasets=t.map(i=>{const o=e.datasets.find(s=>s[n]===i[n]);return!o||!i.data||r.includes(o)?{...i}:(r.push(o),Object.assign(o,i),o)})}function q_e(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:N8;const n={labels:[],datasets:[]};return L8(n,e.labels),D8(n,e.datasets,t),n}function A8(e,t){return e.getElementsAtEventForMode(t.nativeEvent,"nearest",{intersect:!0},!1)}function G_e(e,t){const{height:n=150,width:r=300,redraw:i=!1,datasetIdKey:o,type:s,data:a,options:l,plugins:c=[],fallbackContent:f,updateMode:h,...p}=e,m=V.useRef(null),v=V.useRef(),y=()=>{m.current&&(v.current=new fy(m.current,{type:s,data:q_e(a,o),options:l&&{...l},plugins:c}),bL(t,v.current))},x=()=>{bL(t,null),v.current&&(v.current.destroy(),v.current=null)};return V.useEffect(()=>{!i&&v.current&&l&&Y_e(v.current,l)},[i,l]),V.useEffect(()=>{!i&&v.current&&L8(v.current.config.data,a.labels)},[i,a.labels]),V.useEffect(()=>{!i&&v.current&&a.datasets&&D8(v.current.config.data,a.datasets,o)},[i,a.datasets]),V.useEffect(()=>{v.current&&(i?(x(),setTimeout(y)):v.current.update(h))},[i,l,a.labels,a.datasets,h]),V.useEffect(()=>{v.current&&(x(),setTimeout(y))},[s]),V.useEffect(()=>(y(),()=>x()),[]),U.createElement("canvas",Object.assign({ref:m,role:"img",height:n,width:r},p),f)}const Z_e=V.forwardRef(G_e);function iT(e,t){return fy.register(t),V.forwardRef((n,r)=>U.createElement(Z_e,Object.assign({},n,{ref:r,type:e})))}const K_e=iT("line",cf),X_e=iT("bar",lf),Q_e=iT("doughnut",ls),j8=({native:e},[t])=>{if(!(e!=null&&e.target))return;const n=e.target;n.style.cursor=t?"pointer":"default"},I8=({dataset:e,raw:t})=>`${e.label}: ${_n(`${t}`)}`,J_e=({label:e,raw:t})=>`${e}: ${_n(`${t}`)}`;const e0e=({chart:e})=>{const{config:t}=e,{labels:n=[],datasets:r=[]}=t.data??{},[{backgroundColor:i}]=r,{defaultColor:o}=t.options??{};return g.jsx("ul",{className:"doughnut-chart-legend",children:n.map((s,a)=>g.jsxs("li",{className:"doughnut-chart-legend__item d-flex",children:[g.jsx("div",{className:"doughnut-chart-legend__item-color",style:{backgroundColor:i[a]??o}}),g.jsx("small",{className:"doughnut-chart-legend__item-text flex-fill",children:s})]},s))})},t0e=e=>[{data:e,backgroundColor:["#97BBCD","#F7464A","#46BFBD","#FDB45C","#949FB1","#57A773","#414066","#08B2E3","#B6C454","#DCDCDC","#463730"],borderColor:Moe()?koe:Poe,borderWidth:2}],n0e=(e,t)=>({labels:e,datasets:t0e(t)}),r0e=V.memo(({stats:e})=>{const[t,n]=V.useState(),r=Ji(e),i=Qc(e),o={plugins:{legend:{display:!1},tooltip:{intersect:!0,callbacks:{label:J_e}}}},s=n0e(r,i);return g.jsxs("div",{className:"row",children:[g.jsx("div",{className:"col-sm-12 col-md-7",children:g.jsx(Q_e,{height:300,data:s,options:o,ref:a=>{n(a??void 0)}})}),g.jsx("div",{className:"col-sm-12 col-md-5",children:t&&g.jsx(e0e,{chart:t})})]})}),wL=({title:e,stats:t})=>g.jsx(R8,{title:e,children:g.jsx(r0e,{stats:t})}),i0e={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},F8={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},en={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},sr={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},Xo={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class we{static getFirstMatch(t,n){const r=n.match(t);return r&&r.length>0&&r[1]||""}static getSecondMatch(t,n){const r=n.match(t);return r&&r.length>1&&r[2]||""}static matchAndReturnConst(t,n,r){if(t.test(n))return r}static getWindowsVersionName(t){switch(t){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(t){const n=t.split(".").splice(0,2).map(r=>parseInt(r,10)||0);if(n.push(0),n[0]===10)switch(n[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(t){const n=t.split(".").splice(0,2).map(r=>parseInt(r,10)||0);if(n.push(0),!(n[0]===1&&n[1]<5)){if(n[0]===1&&n[1]<6)return"Cupcake";if(n[0]===1&&n[1]>=6)return"Donut";if(n[0]===2&&n[1]<2)return"Eclair";if(n[0]===2&&n[1]===2)return"Froyo";if(n[0]===2&&n[1]>2)return"Gingerbread";if(n[0]===3)return"Honeycomb";if(n[0]===4&&n[1]<1)return"Ice Cream Sandwich";if(n[0]===4&&n[1]<4)return"Jelly Bean";if(n[0]===4&&n[1]>=4)return"KitKat";if(n[0]===5)return"Lollipop";if(n[0]===6)return"Marshmallow";if(n[0]===7)return"Nougat";if(n[0]===8)return"Oreo";if(n[0]===9)return"Pie"}}static getVersionPrecision(t){return t.split(".").length}static compareVersions(t,n,r=!1){const i=we.getVersionPrecision(t),o=we.getVersionPrecision(n);let s=Math.max(i,o),a=0;const l=we.map([t,n],c=>{const f=s-we.getVersionPrecision(c),h=c+new Array(f+1).join(".0");return we.map(h.split("."),p=>new Array(20-p.length).join("0")+p).reverse()});for(r&&(a=s-Math.min(i,o)),s-=1;s>=a;){if(l[0][s]>l[1][s])return 1;if(l[0][s]===l[1][s]){if(s===a)return 0;s-=1}else if(l[0][s]{r[l]=s[l]})}return t}static getBrowserAlias(t){return i0e[t]}static getBrowserTypeByAlias(t){return F8[t]||""}}const xt=/version\/(\d+(\.?_?\d+)+)/i,o0e=[{test:[/googlebot/i],describe(e){const t={name:"Googlebot"},n=we.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||we.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/opera/i],describe(e){const t={name:"Opera"},n=we.getFirstMatch(xt,e)||we.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){const t={name:"Opera"},n=we.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||we.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){const t={name:"Samsung Internet for Android"},n=we.getFirstMatch(xt,e)||we.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe(e){const t={name:"NAVER Whale Browser"},n=we.getFirstMatch(xt,e)||we.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){const t={name:"MZ Browser"},n=we.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||we.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){const t={name:"Focus"},n=we.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||we.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){const t={name:"Swing"},n=we.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||we.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){const t={name:"Opera Coast"},n=we.getFirstMatch(xt,e)||we.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(e){const t={name:"Opera Touch"},n=we.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||we.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){const t={name:"Yandex Browser"},n=we.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||we.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){const t={name:"UC Browser"},n=we.getFirstMatch(xt,e)||we.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){const t={name:"Maxthon"},n=we.getFirstMatch(xt,e)||we.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){const t={name:"Epiphany"},n=we.getFirstMatch(xt,e)||we.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){const t={name:"Puffin"},n=we.getFirstMatch(xt,e)||we.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){const t={name:"Sleipnir"},n=we.getFirstMatch(xt,e)||we.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe(e){const t={name:"K-Meleon"},n=we.getFirstMatch(xt,e)||we.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){const t={name:"WeChat"},n=we.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||we.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe(e){const t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=we.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||we.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){const t={name:"Internet Explorer"},n=we.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){const t={name:"Microsoft Edge"},n=we.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe(e){const t={name:"Microsoft Edge"},n=we.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){const t={name:"Vivaldi"},n=we.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){const t={name:"SeaMonkey"},n=we.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){const t={name:"Sailfish"},n=we.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe(e){const t={name:"Amazon Silk"},n=we.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){const t={name:"PhantomJS"},n=we.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){const t={name:"SlimerJS"},n=we.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t={name:"BlackBerry"},n=we.getFirstMatch(xt,e)||we.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe(e){const t={name:"WebOS Browser"},n=we.getFirstMatch(xt,e)||we.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe(e){const t={name:"Bada"},n=we.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){const t={name:"Tizen"},n=we.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||we.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){const t={name:"QupZilla"},n=we.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||we.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){const t={name:"Firefox"},n=we.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe(e){const t={name:"Electron"},n=we.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe(e){const t={name:"Miui"},n=we.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe(e){const t={name:"Chromium"},n=we.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||we.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){const t={name:"Chrome"},n=we.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe(e){const t={name:"Google Search"},n=we.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t={name:"Android Browser"},n=we.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){const t={name:"PlayStation 4"},n=we.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){const t={name:"Safari"},n=we.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){const t=/^(.*)\/(.*) /,n=/^(.*)\/(.*)[ \t]\((.*)/,i=e.search("\\(")!==-1?n:t;return{name:we.getFirstMatch(i,e),version:we.getSecondMatch(i,e)}}}],s0e=[{test:[/Roku\/DVP/],describe(e){const t=we.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:sr.Roku,version:t}}},{test:[/windows phone/i],describe(e){const t=we.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:sr.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){const t=we.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=we.getWindowsVersionName(t);return{name:sr.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){const t={name:sr.iOS},n=we.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){const t=we.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=we.getMacOSVersionName(t),r={name:sr.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){const t=we.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:sr.iOS,version:t}}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t=we.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=we.getAndroidVersionName(t),r={name:sr.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){const t=we.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:sr.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t=we.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||we.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||we.getFirstMatch(/\bbb(\d+)/i,e);return{name:sr.BlackBerry,version:t}}},{test:[/bada/i],describe(e){const t=we.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:sr.Bada,version:t}}},{test:[/tizen/i],describe(e){const t=we.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:sr.Tizen,version:t}}},{test:[/linux/i],describe(){return{name:sr.Linux}}},{test:[/CrOS/],describe(){return{name:sr.ChromeOS}}},{test:[/PlayStation 4/],describe(e){const t=we.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:sr.PlayStation4,version:t}}}],a0e=[{test:[/googlebot/i],describe(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe(e){const t=we.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:en.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:en.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:en.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:en.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:en.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:en.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:en.tablet}}},{test(e){const t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe(e){const t=we.getFirstMatch(/(ipod|iphone)/i,e);return{type:en.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:en.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe(){return{type:en.mobile}}},{test(e){return e.getBrowserName(!0)==="blackberry"},describe(){return{type:en.mobile,vendor:"BlackBerry"}}},{test(e){return e.getBrowserName(!0)==="bada"},describe(){return{type:en.mobile}}},{test(e){return e.getBrowserName()==="windows phone"},describe(){return{type:en.mobile,vendor:"Microsoft"}}},{test(e){const t=Number(String(e.getOSVersion()).split(".")[0]);return e.getOSName(!0)==="android"&&t>=3},describe(){return{type:en.tablet}}},{test(e){return e.getOSName(!0)==="android"},describe(){return{type:en.mobile}}},{test(e){return e.getOSName(!0)==="macos"},describe(){return{type:en.desktop,vendor:"Apple"}}},{test(e){return e.getOSName(!0)==="windows"},describe(){return{type:en.desktop}}},{test(e){return e.getOSName(!0)==="linux"},describe(){return{type:en.desktop}}},{test(e){return e.getOSName(!0)==="playstation 4"},describe(){return{type:en.tv}}},{test(e){return e.getOSName(!0)==="roku"},describe(){return{type:en.tv}}}],l0e=[{test(e){return e.getBrowserName(!0)==="microsoft edge"},describe(e){if(/\sedg\//i.test(e))return{name:Xo.Blink};const n=we.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:Xo.EdgeHTML,version:n}}},{test:[/trident/i],describe(e){const t={name:Xo.Trident},n=we.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){return e.test(/presto/i)},describe(e){const t={name:Xo.Presto},n=we.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe(e){const t={name:Xo.Gecko},n=we.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:Xo.Blink}}},{test:[/(apple)?webkit/i],describe(e){const t={name:Xo.WebKit},n=we.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];class xL{constructor(t,n=!1){if(t==null||t==="")throw new Error("UserAgent parameter can't be empty");this._ua=t,this.parsedResult={},n!==!0&&this.parse()}getUA(){return this._ua}test(t){return t.test(this._ua)}parseBrowser(){this.parsedResult.browser={};const t=we.find(o0e,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(t){return t?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};const t=we.find(s0e,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os}getOSName(t){const{name:n}=this.getOS();return t?String(n).toLowerCase()||"":n||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(t=!1){const{type:n}=this.getPlatform();return t?String(n).toLowerCase()||"":n||""}parsePlatform(){this.parsedResult.platform={};const t=we.find(a0e,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(t){return t?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};const t=we.find(l0e,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return we.assign({},this.parsedResult)}satisfies(t){const n={};let r=0;const i={};let o=0;if(Object.keys(t).forEach(a=>{const l=t[a];typeof l=="string"?(i[a]=l,o+=1):typeof l=="object"&&(n[a]=l,r+=1)}),r>0){const a=Object.keys(n),l=we.find(a,f=>this.isOS(f));if(l){const f=this.satisfies(n[l]);if(f!==void 0)return f}const c=we.find(a,f=>this.isPlatform(f));if(c){const f=this.satisfies(n[c]);if(f!==void 0)return f}}if(o>0){const a=Object.keys(i),l=we.find(a,c=>this.isBrowser(c,!0));if(l!==void 0)return this.compareVersion(i[l])}}isBrowser(t,n=!1){const r=this.getBrowserName().toLowerCase();let i=t.toLowerCase();const o=we.getBrowserTypeByAlias(i);return n&&o&&(i=o.toLowerCase()),i===r}compareVersion(t){let n=[0],r=t,i=!1;const o=this.getBrowserVersion();if(typeof o=="string")return t[0]===">"||t[0]==="<"?(r=t.substr(1),t[1]==="="?(i=!0,r=t.substr(2)):n=[],t[0]===">"?n.push(1):n.push(-1)):t[0]==="="?r=t.substr(1):t[0]==="~"&&(i=!0,r=t.substr(1)),n.indexOf(we.compareVersions(o,r,i))>-1}isOS(t){return this.getOSName(!0)===String(t).toLowerCase()}isPlatform(t){return this.getPlatformType(!0)===String(t).toLowerCase()}isEngine(t){return this.getEngineName(!0)===String(t).toLowerCase()}is(t,n=!1){return this.isBrowser(t,n)||this.isOS(t)||this.isPlatform(t)}some(t=[]){return t.some(n=>this.is(n))}}/*! +`,t.homedir=function(){return"/"}}]);const $_e=ri(F_e),B_e=e=>new Promise(t=>{$_e().fromString(e).then(t)}),z_e=new I_e,U_e=e=>z_e.parse(e),V_e=6,dL="0123456789ABCDEF",H_e=128,{floor:W_e,random:Y_e,sqrt:q_e,round:G_e}=Math,Z_e=()=>`#${mE(V_e,()=>dL[W_e(Y_e()*dL.length)]).join("")}`,hL=e=>e.toLowerCase().trim(),K_e=e=>(e.match(/../g)??[]).map(t=>parseInt(t,16)||0),X_e=(e=0,t=0,n=0)=>G_e(q_e(.299*e**2+.587*t**2+.114*n**2));class Q_e{constructor(t){xe(this,"colors");xe(this,"lights");xe(this,"getColorForKey",t=>{const n=hL(t),r=this.colors[n];return r||this.setColorForKey(n,Z_e())});xe(this,"setColorForKey",(t,n)=>{const r=hL(t);return this.colors[r]=n,this.storage.set("colors",this.colors),n});xe(this,"isColorLightForKey",t=>{const n=this.getColorForKey(t).substring(1);if($o(this.lights[n])){const r=K_e(n);this.lights[n]=X_e(...r)>=H_e}return this.lights[n]});this.storage=t,this.colors=this.storage.get("colors")??{},this.lights={}}}const J_e="shlink",pL=e=>`${J_e}.${e}`;class e0e{constructor(t){xe(this,"get",t=>{const n=this.localStorage.getItem(pL(t));return n?JSON.parse(n):void 0});xe(this,"set",(t,n)=>this.localStorage.setItem(pL(t),JSON.stringify(n)));this.localStorage=t}}const t0e=e=>{e.constant("localStorage",window.localStorage),e.service("Storage",e0e,"localStorage"),e.service("ColorGenerator",Q_e,"Storage"),e.constant("csvToJson",B_e),e.constant("jsonToCsv",U_e),e.constant("setTimeout",window.setTimeout),e.constant("clearTimeout",window.clearTimeout),e.serviceFactory("useTimeoutToggle",Poe,"setTimeout","clearTimeout")},JE=e=>e.visitedUrl!==void 0,n0e=e=>e.visitedUrl!==void 0,r0e=Dt(oZ(e=>JE(e.visit)?"orphanVisits":"nonOrphanVisits"),e=>({orphanVisits:[],nonOrphanVisits:[],...e})),jp=(e,t)=>Tj(at(t),e),dh=({page:e,itemsPerPage:t,filter:n,dateRange:r})=>{const i=((r==null?void 0:r.startDate)&&Ys(r==null?void 0:r.startDate))??void 0,o=((r==null?void 0:r.endDate)&&Ys(r==null?void 0:r.endDate))??void 0,s=(n==null?void 0:n.excludeBots)||void 0;return{page:e,itemsPerPage:t,startDate:i,endDate:o,excludeBots:s}},hh=({visits:e,goBack:t,shortUrl:n,children:r,title:i})=>g.jsx("header",{children:g.jsxs(Sr,{body:!0,children:[g.jsxs("h2",{className:"d-flex justify-content-between align-items-center mb-0",children:[g.jsx(ht,{color:"link",size:"lg",className:"p-0 me-3",onClick:t,children:g.jsx(je,{icon:tI})}),g.jsx("span",{className:"text-center d-none d-sm-block",children:g.jsx("small",{children:i})}),g.jsxs("span",{className:"badge badge-main ms-3",children:["Visits:"," ",g.jsx(X5,{visitsCount:e.length,shortUrl:n})]})]}),g.jsx("h3",{className:"text-center d-block d-sm-none mb-0 mt-3",children:g.jsx("small",{children:i})}),r&&g.jsx("div",{className:"mt-md-2",children:r})]})});const F8=({title:e,footer:t,children:n})=>g.jsxs(Sr,{role:"document",children:[g.jsx(nl,{className:"chart-card__header",children:typeof e=="function"?e():e}),g.jsx(tl,{children:n}),t&&g.jsx(WC,{className:"chart-card__footer--sticky",children:t})]}),$8="label";function mL(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function i0e(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function B8(e,t){e.labels=t}function z8(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:$8;const r=[];e.datasets=t.map(i=>{const o=e.datasets.find(s=>s[n]===i[n]);return!o||!i.data||r.includes(o)?{...i}:(r.push(o),Object.assign(o,i),o)})}function o0e(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:$8;const n={labels:[],datasets:[]};return B8(n,e.labels),z8(n,e.datasets,t),n}function U8(e,t){return e.getElementsAtEventForMode(t.nativeEvent,"nearest",{intersect:!0},!1)}function s0e(e,t){const{height:n=150,width:r=300,redraw:i=!1,datasetIdKey:o,type:s,data:a,options:l,plugins:c=[],fallbackContent:f,updateMode:h,...p}=e,m=V.useRef(null),v=V.useRef(),y=()=>{m.current&&(v.current=new cy(m.current,{type:s,data:o0e(a,o),options:l&&{...l},plugins:c}),mL(t,v.current))},x=()=>{mL(t,null),v.current&&(v.current.destroy(),v.current=null)};return V.useEffect(()=>{!i&&v.current&&l&&i0e(v.current,l)},[i,l]),V.useEffect(()=>{!i&&v.current&&B8(v.current.config.data,a.labels)},[i,a.labels]),V.useEffect(()=>{!i&&v.current&&a.datasets&&z8(v.current.config.data,a.datasets,o)},[i,a.datasets]),V.useEffect(()=>{v.current&&(i?(x(),setTimeout(y)):v.current.update(h))},[i,l,a.labels,a.datasets,h]),V.useEffect(()=>{v.current&&(x(),setTimeout(y))},[s]),V.useEffect(()=>(y(),()=>x()),[]),U.createElement("canvas",Object.assign({ref:m,role:"img",height:n,width:r},p),f)}const a0e=V.forwardRef(s0e);function eT(e,t){return cy.register(t),V.forwardRef((n,r)=>U.createElement(a0e,Object.assign({},n,{ref:r,type:e})))}const l0e=eT("line",af),c0e=eT("bar",sf),u0e=eT("doughnut",us),V8=({native:e},[t])=>{if(!(e!=null&&e.target))return;const n=e.target;n.style.cursor=t?"pointer":"default"},H8=({dataset:e,raw:t})=>`${e.label}: ${_n(`${t}`)}`,f0e=({label:e,raw:t})=>`${e}: ${_n(`${t}`)}`;const d0e=({chart:e})=>{const{config:t}=e,{labels:n=[],datasets:r=[]}=t.data??{},[{backgroundColor:i}]=r,{defaultColor:o}=t.options??{};return g.jsx("ul",{className:"doughnut-chart-legend",children:n.map((s,a)=>g.jsxs("li",{className:"doughnut-chart-legend__item d-flex",children:[g.jsx("div",{className:"doughnut-chart-legend__item-color",style:{backgroundColor:i[a]??o}}),g.jsx("small",{className:"doughnut-chart-legend__item-text flex-fill",children:s})]},s))})},h0e=e=>[{data:e,backgroundColor:["#97BBCD","#F7464A","#46BFBD","#FDB45C","#949FB1","#57A773","#414066","#08B2E3","#B6C454","#DCDCDC","#463730"],borderColor:$oe()?Foe:Ioe,borderWidth:2}],p0e=(e,t)=>({labels:e,datasets:h0e(t)}),m0e=V.memo(({stats:e})=>{const[t,n]=V.useState(),r=eo(e),i=Kc(e),o={plugins:{legend:{display:!1},tooltip:{intersect:!0,callbacks:{label:f0e}}}},s=p0e(r,i);return g.jsxs("div",{className:"row",children:[g.jsx("div",{className:"col-sm-12 col-md-7",children:g.jsx(u0e,{height:300,data:s,options:o,ref:a=>{n(a??void 0)}})}),g.jsx("div",{className:"col-sm-12 col-md-5",children:t&&g.jsx(d0e,{chart:t})})]})}),gL=({title:e,stats:t})=>g.jsx(F8,{title:e,children:g.jsx(m0e,{stats:t})}),g0e={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},W8={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},Jt={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},sr={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},Jo={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class we{static getFirstMatch(t,n){const r=n.match(t);return r&&r.length>0&&r[1]||""}static getSecondMatch(t,n){const r=n.match(t);return r&&r.length>1&&r[2]||""}static matchAndReturnConst(t,n,r){if(t.test(n))return r}static getWindowsVersionName(t){switch(t){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(t){const n=t.split(".").splice(0,2).map(r=>parseInt(r,10)||0);if(n.push(0),n[0]===10)switch(n[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(t){const n=t.split(".").splice(0,2).map(r=>parseInt(r,10)||0);if(n.push(0),!(n[0]===1&&n[1]<5)){if(n[0]===1&&n[1]<6)return"Cupcake";if(n[0]===1&&n[1]>=6)return"Donut";if(n[0]===2&&n[1]<2)return"Eclair";if(n[0]===2&&n[1]===2)return"Froyo";if(n[0]===2&&n[1]>2)return"Gingerbread";if(n[0]===3)return"Honeycomb";if(n[0]===4&&n[1]<1)return"Ice Cream Sandwich";if(n[0]===4&&n[1]<4)return"Jelly Bean";if(n[0]===4&&n[1]>=4)return"KitKat";if(n[0]===5)return"Lollipop";if(n[0]===6)return"Marshmallow";if(n[0]===7)return"Nougat";if(n[0]===8)return"Oreo";if(n[0]===9)return"Pie"}}static getVersionPrecision(t){return t.split(".").length}static compareVersions(t,n,r=!1){const i=we.getVersionPrecision(t),o=we.getVersionPrecision(n);let s=Math.max(i,o),a=0;const l=we.map([t,n],c=>{const f=s-we.getVersionPrecision(c),h=c+new Array(f+1).join(".0");return we.map(h.split("."),p=>new Array(20-p.length).join("0")+p).reverse()});for(r&&(a=s-Math.min(i,o)),s-=1;s>=a;){if(l[0][s]>l[1][s])return 1;if(l[0][s]===l[1][s]){if(s===a)return 0;s-=1}else if(l[0][s]{r[l]=s[l]})}return t}static getBrowserAlias(t){return g0e[t]}static getBrowserTypeByAlias(t){return W8[t]||""}}const xt=/version\/(\d+(\.?_?\d+)+)/i,v0e=[{test:[/googlebot/i],describe(e){const t={name:"Googlebot"},n=we.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||we.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/opera/i],describe(e){const t={name:"Opera"},n=we.getFirstMatch(xt,e)||we.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){const t={name:"Opera"},n=we.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||we.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){const t={name:"Samsung Internet for Android"},n=we.getFirstMatch(xt,e)||we.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe(e){const t={name:"NAVER Whale Browser"},n=we.getFirstMatch(xt,e)||we.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){const t={name:"MZ Browser"},n=we.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||we.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){const t={name:"Focus"},n=we.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||we.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){const t={name:"Swing"},n=we.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||we.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){const t={name:"Opera Coast"},n=we.getFirstMatch(xt,e)||we.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(e){const t={name:"Opera Touch"},n=we.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||we.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){const t={name:"Yandex Browser"},n=we.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||we.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){const t={name:"UC Browser"},n=we.getFirstMatch(xt,e)||we.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){const t={name:"Maxthon"},n=we.getFirstMatch(xt,e)||we.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){const t={name:"Epiphany"},n=we.getFirstMatch(xt,e)||we.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){const t={name:"Puffin"},n=we.getFirstMatch(xt,e)||we.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){const t={name:"Sleipnir"},n=we.getFirstMatch(xt,e)||we.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe(e){const t={name:"K-Meleon"},n=we.getFirstMatch(xt,e)||we.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){const t={name:"WeChat"},n=we.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||we.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe(e){const t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=we.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||we.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){const t={name:"Internet Explorer"},n=we.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){const t={name:"Microsoft Edge"},n=we.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe(e){const t={name:"Microsoft Edge"},n=we.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){const t={name:"Vivaldi"},n=we.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){const t={name:"SeaMonkey"},n=we.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){const t={name:"Sailfish"},n=we.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe(e){const t={name:"Amazon Silk"},n=we.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){const t={name:"PhantomJS"},n=we.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){const t={name:"SlimerJS"},n=we.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t={name:"BlackBerry"},n=we.getFirstMatch(xt,e)||we.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe(e){const t={name:"WebOS Browser"},n=we.getFirstMatch(xt,e)||we.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe(e){const t={name:"Bada"},n=we.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){const t={name:"Tizen"},n=we.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||we.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){const t={name:"QupZilla"},n=we.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||we.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){const t={name:"Firefox"},n=we.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe(e){const t={name:"Electron"},n=we.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe(e){const t={name:"Miui"},n=we.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe(e){const t={name:"Chromium"},n=we.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||we.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){const t={name:"Chrome"},n=we.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe(e){const t={name:"Google Search"},n=we.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t={name:"Android Browser"},n=we.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){const t={name:"PlayStation 4"},n=we.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){const t={name:"Safari"},n=we.getFirstMatch(xt,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){const t=/^(.*)\/(.*) /,n=/^(.*)\/(.*)[ \t]\((.*)/,i=e.search("\\(")!==-1?n:t;return{name:we.getFirstMatch(i,e),version:we.getSecondMatch(i,e)}}}],y0e=[{test:[/Roku\/DVP/],describe(e){const t=we.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:sr.Roku,version:t}}},{test:[/windows phone/i],describe(e){const t=we.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:sr.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){const t=we.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=we.getWindowsVersionName(t);return{name:sr.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){const t={name:sr.iOS},n=we.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){const t=we.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=we.getMacOSVersionName(t),r={name:sr.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){const t=we.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:sr.iOS,version:t}}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t=we.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=we.getAndroidVersionName(t),r={name:sr.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){const t=we.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:sr.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t=we.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||we.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||we.getFirstMatch(/\bbb(\d+)/i,e);return{name:sr.BlackBerry,version:t}}},{test:[/bada/i],describe(e){const t=we.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:sr.Bada,version:t}}},{test:[/tizen/i],describe(e){const t=we.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:sr.Tizen,version:t}}},{test:[/linux/i],describe(){return{name:sr.Linux}}},{test:[/CrOS/],describe(){return{name:sr.ChromeOS}}},{test:[/PlayStation 4/],describe(e){const t=we.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:sr.PlayStation4,version:t}}}],_0e=[{test:[/googlebot/i],describe(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe(e){const t=we.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:Jt.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:Jt.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:Jt.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:Jt.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:Jt.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:Jt.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:Jt.tablet}}},{test(e){const t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe(e){const t=we.getFirstMatch(/(ipod|iphone)/i,e);return{type:Jt.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:Jt.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe(){return{type:Jt.mobile}}},{test(e){return e.getBrowserName(!0)==="blackberry"},describe(){return{type:Jt.mobile,vendor:"BlackBerry"}}},{test(e){return e.getBrowserName(!0)==="bada"},describe(){return{type:Jt.mobile}}},{test(e){return e.getBrowserName()==="windows phone"},describe(){return{type:Jt.mobile,vendor:"Microsoft"}}},{test(e){const t=Number(String(e.getOSVersion()).split(".")[0]);return e.getOSName(!0)==="android"&&t>=3},describe(){return{type:Jt.tablet}}},{test(e){return e.getOSName(!0)==="android"},describe(){return{type:Jt.mobile}}},{test(e){return e.getOSName(!0)==="macos"},describe(){return{type:Jt.desktop,vendor:"Apple"}}},{test(e){return e.getOSName(!0)==="windows"},describe(){return{type:Jt.desktop}}},{test(e){return e.getOSName(!0)==="linux"},describe(){return{type:Jt.desktop}}},{test(e){return e.getOSName(!0)==="playstation 4"},describe(){return{type:Jt.tv}}},{test(e){return e.getOSName(!0)==="roku"},describe(){return{type:Jt.tv}}}],b0e=[{test(e){return e.getBrowserName(!0)==="microsoft edge"},describe(e){if(/\sedg\//i.test(e))return{name:Jo.Blink};const n=we.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:Jo.EdgeHTML,version:n}}},{test:[/trident/i],describe(e){const t={name:Jo.Trident},n=we.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){return e.test(/presto/i)},describe(e){const t={name:Jo.Presto},n=we.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe(e){const t={name:Jo.Gecko},n=we.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:Jo.Blink}}},{test:[/(apple)?webkit/i],describe(e){const t={name:Jo.WebKit},n=we.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];class vL{constructor(t,n=!1){if(t==null||t==="")throw new Error("UserAgent parameter can't be empty");this._ua=t,this.parsedResult={},n!==!0&&this.parse()}getUA(){return this._ua}test(t){return t.test(this._ua)}parseBrowser(){this.parsedResult.browser={};const t=we.find(v0e,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(t){return t?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};const t=we.find(y0e,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os}getOSName(t){const{name:n}=this.getOS();return t?String(n).toLowerCase()||"":n||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(t=!1){const{type:n}=this.getPlatform();return t?String(n).toLowerCase()||"":n||""}parsePlatform(){this.parsedResult.platform={};const t=we.find(_0e,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(t){return t?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};const t=we.find(b0e,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return we.assign({},this.parsedResult)}satisfies(t){const n={};let r=0;const i={};let o=0;if(Object.keys(t).forEach(a=>{const l=t[a];typeof l=="string"?(i[a]=l,o+=1):typeof l=="object"&&(n[a]=l,r+=1)}),r>0){const a=Object.keys(n),l=we.find(a,f=>this.isOS(f));if(l){const f=this.satisfies(n[l]);if(f!==void 0)return f}const c=we.find(a,f=>this.isPlatform(f));if(c){const f=this.satisfies(n[c]);if(f!==void 0)return f}}if(o>0){const a=Object.keys(i),l=we.find(a,c=>this.isBrowser(c,!0));if(l!==void 0)return this.compareVersion(i[l])}}isBrowser(t,n=!1){const r=this.getBrowserName().toLowerCase();let i=t.toLowerCase();const o=we.getBrowserTypeByAlias(i);return n&&o&&(i=o.toLowerCase()),i===r}compareVersion(t){let n=[0],r=t,i=!1;const o=this.getBrowserVersion();if(typeof o=="string")return t[0]===">"||t[0]==="<"?(r=t.substr(1),t[1]==="="?(i=!0,r=t.substr(2)):n=[],t[0]===">"?n.push(1):n.push(-1)):t[0]==="="?r=t.substr(1):t[0]==="~"&&(i=!0,r=t.substr(1)),n.indexOf(we.compareVersions(o,r,i))>-1}isOS(t){return this.getOSName(!0)===String(t).toLowerCase()}isPlatform(t){return this.getPlatformType(!0)===String(t).toLowerCase()}isEngine(t){return this.getEngineName(!0)===String(t).toLowerCase()}is(t,n=!1){return this.isBrowser(t,n)||this.isOS(t)||this.isPlatform(t)}some(t=[]){return t.some(n=>this.is(n))}}/*! * Bowser - a browser detector * https://github.com/lancedikson/bowser * MIT License | (c) Dustin Diaz 2012-2015 * MIT License | (c) Denis Demchenko 2015-2019 - */class c0e{static getParser(t,n=!1){if(typeof t!="string")throw new Error("UserAgent should be a string");return new xL(t,n)}static parse(t){return new xL(t).getResult()}static get BROWSER_MAP(){return F8}static get ENGINE_MAP(){return Xo}static get OS_MAP(){return sr}static get PLATFORMS_MAP(){return en}}const jp="Others",u0e=["Android Browser","Chrome","Chromium","Firefox","Internet Explorer","Microsoft Edge","Opera","Safari","Samsung Internet for Android","Vivaldi","WeChat"],f0e=e=>{if(!gi(e))return{browser:jp,os:jp};const{browser:{name:t},os:{name:n}}=c0e.parse(e);return{os:n??jp,browser:t&&u0e.includes(t)?t:jp}},d0e=e=>{var t;return gi(e)?((t=e.split("/")[e.includes("://")?2:0])==null?void 0:t.split(":")[0])??"":"Direct"},oT=(e,t)=>Object.values({...Pj(t,t.map(()=>0)),...e});const SL={monthly:"Month",weekly:"Week",daily:"Day",hourly:"Hour"},h0e={hourly:e=>({hours:e}),daily:e=>({days:e}),weekly:e=>({weeks:e}),monthly:e=>({months:e})},p0e={hourly:Aae,daily:OE,weekly:$ae,monthly:gv},sT={hourly:e=>vo(e,"yyyy-MM-dd HH:00"),daily:e=>vo(e,Mf),weekly(e){const t=vo(Sd(e),Mf),n=vo(Vae(e),Mf);return`${t} - ${n}`},monthly:e=>vo(e,"yyyy-MM")},m0e=e=>{const t=new Date,n=Do(e);return nC([[()=>OE(t,n)<=2,q0("hourly")],[()=>gv(t,n)<=1,q0("daily")],[()=>gv(t,n)<=6,q0("weekly")]])()??"monthly"},CL=(e,t)=>Sj(n=>sT[e](Do(n.date)),t),g0e=(e,t)=>t.reduce((n,r)=>{const i=sT[e](Do(r.date));return n[i]=n[i]??[],n[i].push(r),n},{}),v0e=(e,t)=>{const n=p0e[e],r=sT[e],i=Do(t[0].date),o=Do(t[t.length-1].date),s=n(i,o),a=h0e[e];return[r(o),..._E(s,l=>r(Cae(o,a(l))))]},y0e=(e,t,n,r)=>{if(r)return[Object.keys(t),Object.values(t)];const i=v0e(n,e);return[i,oT(t,i)]},EL=(e,t,n)=>({label:t,data:e,fill:!1,tension:.2,borderColor:n,backgroundColor:n});let Y1=null;const _0e=(e,t,[n],r)=>{if(!r||!n)return;const{index:i}=n;Y1===e[i]?(r([]),Y1=null):(r(e[i]&&t[e[i]]?t[e[i]]:[]),Y1=e[i]??null)},b0e=({title:e,visits:t,highlightedVisits:n,highlightedLabel:r="Selected",setSelectedVisits:i})=>{const[o,s]=V.useState(t.length>0?m0e(t[t.length-1].date):"monthly"),[a,l]=It(!0),c=V.useRef(null),f=V.useRef(null),h=V.useMemo(()=>g0e(o,t),[o,t]),p=V.useMemo(()=>CL(o,cw(t)),[o,t]),[m,v]=V.useMemo(()=>y0e(t,p,o,a),[t,o,a]),y=V.useMemo(()=>oT(CL(o,cw(n)),m),[n,o,m]),x=()=>{const T=EL(v,"Visits",cE);if(n.length===0)return[T];const P=EL(y,r,w6);return[T,P]},_=()=>({labels:m,datasets:x()}),w={maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{intersect:!1,axis:"x",callbacks:{label:I8}}},scales:{y:{beginAtZero:!0,ticks:{precision:0,callback:_n}},x:{title:{display:!0,text:SL[o]}}},onHover:j8},S=T=>g.jsx(K_e,{ref:T,data:_(),options:w,onClick:P=>_0e(m,h,A8(T.current,P),i)});return g.jsxs(Sr,{children:[g.jsxs(rl,{role:"heading",children:[e,g.jsx("div",{className:"float-end",children:g.jsxs(Jd,{children:[g.jsx(nu,{caret:!0,color:"link",className:"btn-sm p-0",children:"Group by"}),g.jsx(hl,{end:!0,children:Object.entries(SL).map(([T,P])=>g.jsx(Ue,{active:o===T,onClick:()=>s(T),children:P},T))})]})}),g.jsx("div",{className:"float-end me-2",children:g.jsx(Hc,{checked:a,onChange:l,children:g.jsx("small",{children:"Skip dates with no visits"})})})]}),g.jsxs(nl,{className:"line-chart-card__body",children:[n.length>0&&S(c),n.length===0&&S(f)]})]})},w0e=({toggleClassName:e,ranges:t,value:n,setValue:r})=>g.jsxs(Jd,{children:[g.jsx(nu,{caret:!0,color:"link",className:e,children:"Paginate"}),g.jsxs(hl,{end:!0,children:[t.map(i=>g.jsxs(Ue,{active:i===n,onClick:()=>r(i),children:[g.jsx("b",{children:i})," items per page"]},i)),g.jsx(Ue,{divider:!0}),g.jsx(Ue,{disabled:n===1/0,onClick:()=>r(1/0),children:g.jsx("i",{children:"Clear pagination"})})]})]}),x0e=e=>e.startsWith("hidden")?"":e,S0e=e=>!!e&&Object.keys(e).length>0,C0e=e=>e.length>20?e.length*10:void 0,E0e=(e,t,n)=>{const r={data:e,label:n?"Non-selected":"Visits",backgroundColor:Toe,borderColor:cE,borderWidth:2};return t.every(o=>o===0)?[r]:[r,{label:n??"Selected",data:t,backgroundColor:Ooe,borderColor:w6,borderWidth:2}]},T0e=(e,t,n,r)=>({labels:e,datasets:E0e(t,n,r)}),O0e=(e,[t],n)=>{!n||!t||n(e[t.index])},P0e=({stats:e,highlightedStats:t,highlightedLabel:n,onClick:r,max:i})=>{const o=Ji(e).map(x0e),s=Qc(S0e(t)?Ji(t).reduce((v,y)=>(v[y]&&(v[y]-=t[y]),v),{...e}):e),a=oT(t??{},o),l=V.useRef(null),c=V.useRef(null),f={plugins:{legend:{display:!1},tooltip:{mode:"y",filter:({label:v})=>v!=="",callbacks:{label:I8}}},scales:{x:{beginAtZero:!0,stacked:!0,max:i,ticks:{precision:0,callback:_n}},y:{stacked:!0}},onHover:j8,indexAxis:"y"},h=T0e(o,s,a,n),p=C0e(o),m=(v,y)=>g.jsx(X_e,{ref:y,data:h,options:f,height:p,onClick:x=>O0e(o,A8(y.current,x),r)},`${p}_${v}`);return g.jsxs(g.Fragment,{children:[t!==void 0&&m("with_stats",l),t===void 0&&m("without_stats",c)]})},k0e=e=>Wg(e)==="String"?SZ(e):e,TL=([e])=>e,OL=([,e])=>e,Ip=({stats:e,highlightedStats:t,title:n,sortingItems:r,extraHeaderContent:i,withPagination:o=!0,...s})=>{const[a,l]=V.useState({}),[c,f]=V.useState(1),[h,p]=V.useState(50),m=(N,D)=>{const z=qg(N),A=a.field?bZ(Dt(a.field===Object.keys(D)[0]?TL:OL,k0e),z):z;return!a.dir||a.dir==="ASC"?A:cw(A)},v=N=>{const D=N[c-1];if(c[`hidden_${A}`,0])]},y=N=>g.jsx(XE,{currentPage:c,pagesCount:N,setCurrentPage:f}),x=(N,D,z)=>{const A=m(N,D),W=A.map(TL),Y=z&&qg({...Pj(W,W.map(()=>0)),...z});if(A.length<=h)return{currentPageStats:Ku(A),currentPageHighlightedStats:Y&&Ku(Y)};const J=cd(h,A),Z=Y&&cd(h,Y);return{currentPageStats:Ku(v(J)),currentPageHighlightedStats:Z&&Ku(v(Z)),pagination:y(J.length),max:$pe(Math.max(...A.map(OL)))}},{currentPageStats:_,currentPageHighlightedStats:w,pagination:S,max:T}=x(e,r,t&&Object.keys(t).length>0?t:void 0),P=Object.keys(_),k=()=>g.jsxs(g.Fragment,{children:[n,g.jsx("div",{className:"float-end",children:g.jsx(fh,{isButton:!1,right:!0,items:r,order:a,onChange:(N,D)=>{l({field:N,dir:D}),f(1)}})}),o&&Object.keys(e).length>50&&g.jsx("div",{className:"float-end",children:g.jsx(w0e,{toggleClassName:"btn-sm p-0 me-3",ranges:[50,100,200,500],value:h,setValue:N=>{p(N),f(1)}})}),i&&g.jsx("div",{className:"float-end",children:i(S?P:void 0)})]});return g.jsx(R8,{title:k,footer:S,children:g.jsx(P0e,{stats:_,highlightedStats:w,max:T,...s})})},M0e=()=>{const e=Io(),{search:t}=Pn(),{filtering:n,domain:r}=V.useMemo(Dt(()=>dl(t),({startDate:o,endDate:s,orphanVisitsType:a,excludeBots:l,domain:c})=>({domain:c,filtering:{dateRange:o!=null||s!=null?x5(o,s):void 0,visitsFilter:{orphanVisitsType:a,excludeBots:Fo(l)?void 0:l==="true"}}})),[t]);return[n,o=>{const{dateRange:s,visitsFilter:a}=Ej(n,o),{excludeBots:l,orphanVisitsType:c}=a,f={startDate:(s==null?void 0:s.startDate)&&Hs(s.startDate)||"",endDate:(s==null?void 0:s.endDate)&&Hs(s.endDate)||"",excludeBots:l===void 0?void 0:W6(l),orphanVisitsType:c,domain:r},h=Hd(f),p=Wn(h)?"":`?${h}`;e(p,{replace:!0,relative:"route"})}]};function $8(e,t){const n=V.useRef(t);V.useEffect(function(){t!==n.current&&e.attributionControl!=null&&(n.current!=null&&e.attributionControl.removeAttribution(n.current),t!=null&&e.attributionControl.addAttribution(t)),n.current=t},[e,t])}const R0e=1;function N0e(e){return Object.freeze({__version:R0e,map:e})}function L0e(e,t){return Object.freeze({...e,...t})}const B8=V.createContext(null),z8=B8.Provider;function U8(){const e=V.useContext(B8);if(e==null)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of ");return e}function D0e(e){function t(n,r){const{instance:i,context:o}=e(n).current;return V.useImperativeHandle(r,()=>i),n.children==null?null:U.createElement(z8,{value:o},n.children)}return V.forwardRef(t)}function A0e(e){function t(n,r){const[i,o]=V.useState(!1),{instance:s}=e(n,o).current;V.useImperativeHandle(r,()=>s),V.useEffect(function(){i&&s.update()},[s,i,n.children]);const a=s._contentNode;return a?Ya.createPortal(n.children,a):null}return V.forwardRef(t)}function j0e(e){function t(n,r){const{instance:i}=e(n).current;return V.useImperativeHandle(r,()=>i),null}return V.forwardRef(t)}function V8(e,t){const n=V.useRef();V.useEffect(function(){return t!=null&&e.instance.on(t),n.current=t,function(){n.current!=null&&e.instance.off(n.current),n.current=null}},[e,t])}function aT(e,t){const n=e.pane??t.pane;return n?{...e,pane:n}:e}function I0e(e,t){return function(r,i){const o=U8(),s=e(aT(r,o),o);return $8(o.map,r.attribution),V8(s.current,r.eventHandlers),t(s.current,o,r,i),s}}var Ws={},F0e={get exports(){return Ws},set exports(e){Ws=e}};/* @preserve + */class w0e{static getParser(t,n=!1){if(typeof t!="string")throw new Error("UserAgent should be a string");return new vL(t,n)}static parse(t){return new vL(t).getResult()}static get BROWSER_MAP(){return W8}static get ENGINE_MAP(){return Jo}static get OS_MAP(){return sr}static get PLATFORMS_MAP(){return Jt}}const Ip="Others",x0e=["Android Browser","Chrome","Chromium","Firefox","Internet Explorer","Microsoft Edge","Opera","Safari","Samsung Internet for Android","Vivaldi","WeChat"],S0e=e=>{if(!vi(e))return{browser:Ip,os:Ip};const{browser:{name:t},os:{name:n}}=w0e.parse(e);return{os:n??Ip,browser:t&&x0e.includes(t)?t:Ip}},C0e=e=>{var t;return vi(e)?((t=e.split("/")[e.includes("://")?2:0])==null?void 0:t.split(":")[0])??"":"Direct"},tT=(e,t)=>Object.values({...Rj(t,t.map(()=>0)),...e});const yL={monthly:"Month",weekly:"Week",daily:"Day",hourly:"Hour"},E0e={hourly:e=>({hours:e}),daily:e=>({days:e}),weekly:e=>({weeks:e}),monthly:e=>({months:e})},T0e={hourly:Hae,daily:SE,weekly:Gae,monthly:gv},nT={hourly:e=>yo(e,"yyyy-MM-dd HH:00"),daily:e=>yo(e,Pf),weekly(e){const t=yo(wd(e),Pf),n=yo(Qae(e),Pf);return`${t} - ${n}`},monthly:e=>yo(e,"yyyy-MM")},O0e=e=>{const t=new Date,n=Ao(e);return XS([[()=>SE(t,n)<=2,H0("hourly")],[()=>gv(t,n)<=1,H0("daily")],[()=>gv(t,n)<=6,H0("weekly")]])()??"monthly"},_L=(e,t)=>Tj(n=>nT[e](Ao(n.date)),t),P0e=(e,t)=>t.reduce((n,r)=>{const i=nT[e](Ao(r.date));return n[i]=n[i]??[],n[i].push(r),n},{}),k0e=(e,t)=>{const n=T0e[e],r=nT[e],i=Ao(t[0].date),o=Ao(t[t.length-1].date),s=n(i,o),a=E0e[e];return[r(o),...mE(s,l=>r(Lae(o,a(l))))]},M0e=(e,t,n,r)=>{if(r)return[Object.keys(t),Object.values(t)];const i=k0e(n,e);return[i,tT(t,i)]},bL=(e,t,n)=>({label:t,data:e,fill:!1,tension:.2,borderColor:n,backgroundColor:n});let V1=null;const R0e=(e,t,[n],r)=>{if(!r||!n)return;const{index:i}=n;V1===e[i]?(r([]),V1=null):(r(e[i]&&t[e[i]]?t[e[i]]:[]),V1=e[i]??null)},N0e=({title:e,visits:t,highlightedVisits:n,highlightedLabel:r="Selected",setSelectedVisits:i})=>{const[o,s]=V.useState(t.length>0?O0e(t[t.length-1].date):"monthly"),[a,l]=hn(!0),c=V.useRef(null),f=V.useRef(null),h=V.useMemo(()=>P0e(o,t),[o,t]),p=V.useMemo(()=>_L(o,rw(t)),[o,t]),[m,v]=V.useMemo(()=>M0e(t,p,o,a),[t,o,a]),y=V.useMemo(()=>tT(_L(o,rw(n)),m),[n,o,m]),x=()=>{const T=bL(v,"Visits",oE);if(n.length===0)return[T];const P=bL(y,r,P6);return[T,P]},_=()=>({labels:m,datasets:x()}),w={maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{intersect:!1,axis:"x",callbacks:{label:H8}}},scales:{y:{beginAtZero:!0,ticks:{precision:0,callback:_n}},x:{title:{display:!0,text:yL[o]}}},onHover:V8},S=T=>g.jsx(l0e,{ref:T,data:_(),options:w,onClick:P=>R0e(m,h,U8(T.current,P),i)});return g.jsxs(Sr,{children:[g.jsxs(nl,{role:"heading",children:[e,g.jsx("div",{className:"float-end",children:g.jsxs(Jd,{children:[g.jsx(Zd,{caret:!0,color:"link",className:"btn-sm p-0",children:"Group by"}),g.jsx(eu,{end:!0,children:Object.entries(yL).map(([T,P])=>g.jsx(Ue,{active:o===T,onClick:()=>s(T),children:P},T))})]})}),g.jsx("div",{className:"float-end me-2",children:g.jsx(Uc,{checked:a,onChange:l,children:g.jsx("small",{children:"Skip dates with no visits"})})})]}),g.jsxs(tl,{className:"line-chart-card__body",children:[n.length>0&&S(c),n.length===0&&S(f)]})]})},L0e=({toggleClassName:e,ranges:t,value:n,setValue:r})=>g.jsxs(Jd,{children:[g.jsx(Zd,{caret:!0,color:"link",className:e,children:"Paginate"}),g.jsxs(eu,{end:!0,children:[t.map(i=>g.jsxs(Ue,{active:i===n,onClick:()=>r(i),children:[g.jsx("b",{children:i})," items per page"]},i)),g.jsx(Ue,{divider:!0}),g.jsx(Ue,{disabled:n===1/0,onClick:()=>r(1/0),children:g.jsx("i",{children:"Clear pagination"})})]})]}),D0e=e=>e.startsWith("hidden")?"":e,A0e=e=>!!e&&Object.keys(e).length>0,j0e=e=>e.length>20?e.length*10:void 0,I0e=(e,t,n)=>{const r={data:e,label:n?"Non-selected":"Visits",backgroundColor:Aoe,borderColor:oE,borderWidth:2};return t.every(o=>o===0)?[r]:[r,{label:n??"Selected",data:t,backgroundColor:joe,borderColor:P6,borderWidth:2}]},F0e=(e,t,n,r)=>({labels:e,datasets:I0e(t,n,r)}),$0e=(e,[t],n)=>{!n||!t||n(e[t.index])},B0e=({stats:e,highlightedStats:t,highlightedLabel:n,onClick:r,max:i})=>{const o=eo(e).map(D0e),s=Kc(A0e(t)?eo(t).reduce((v,y)=>(v[y]&&(v[y]-=t[y]),v),{...e}):e),a=tT(t??{},o),l=V.useRef(null),c=V.useRef(null),f={plugins:{legend:{display:!1},tooltip:{mode:"y",filter:({label:v})=>v!=="",callbacks:{label:H8}}},scales:{x:{beginAtZero:!0,stacked:!0,max:i,ticks:{precision:0,callback:_n}},y:{stacked:!0}},onHover:V8,indexAxis:"y"},h=F0e(o,s,a,n),p=j0e(o),m=(v,y)=>g.jsx(c0e,{ref:y,data:h,options:f,height:p,onClick:x=>$0e(o,U8(y.current,x),r)},`${p}_${v}`);return g.jsxs(g.Fragment,{children:[t!==void 0&&m("with_stats",l),t===void 0&&m("without_stats",c)]})},z0e=e=>Wg(e)==="String"?PZ(e):e,wL=([e])=>e,xL=([,e])=>e,Fp=({stats:e,highlightedStats:t,title:n,sortingItems:r,extraHeaderContent:i,withPagination:o=!0,...s})=>{const[a,l]=V.useState({}),[c,f]=V.useState(1),[h,p]=V.useState(50),m=(N,D)=>{const z=qg(N),A=a.field?EZ(Dt(a.field===Object.keys(D)[0]?wL:xL,z0e),z):z;return!a.dir||a.dir==="ASC"?A:rw(A)},v=N=>{const D=N[c-1];if(c[`hidden_${A}`,0])]},y=N=>g.jsx(qE,{currentPage:c,pagesCount:N,setCurrentPage:f}),x=(N,D,z)=>{const A=m(N,D),W=A.map(wL),Y=z&&qg({...Rj(W,W.map(()=>0)),...z});if(A.length<=h)return{currentPageStats:Gu(A),currentPageHighlightedStats:Y&&Gu(Y)};const J=ad(h,A),Z=Y&&ad(h,Y);return{currentPageStats:Gu(v(J)),currentPageHighlightedStats:Z&&Gu(v(Z)),pagination:y(J.length),max:Gpe(Math.max(...A.map(xL)))}},{currentPageStats:_,currentPageHighlightedStats:w,pagination:S,max:T}=x(e,r,t&&Object.keys(t).length>0?t:void 0),P=Object.keys(_),k=()=>g.jsxs(g.Fragment,{children:[n,g.jsx("div",{className:"float-end",children:g.jsx(fh,{isButton:!1,right:!0,items:r,order:a,onChange:(N,D)=>{l({field:N,dir:D}),f(1)}})}),o&&Object.keys(e).length>50&&g.jsx("div",{className:"float-end",children:g.jsx(L0e,{toggleClassName:"btn-sm p-0 me-3",ranges:[50,100,200,500],value:h,setValue:N=>{p(N),f(1)}})}),i&&g.jsx("div",{className:"float-end",children:i(S?P:void 0)})]});return g.jsx(F8,{title:k,footer:S,children:g.jsx(B0e,{stats:_,highlightedStats:w,max:T,...s})})},U0e=()=>{const e=Fo(),{search:t}=Pn(),{filtering:n,domain:r}=V.useMemo(Dt(()=>fl(t),({startDate:o,endDate:s,orphanVisitsType:a,excludeBots:l,domain:c})=>({domain:c,filtering:{dateRange:o!=null||s!=null?k5(o,s):void 0,visitsFilter:{orphanVisitsType:a,excludeBots:$o(l)?void 0:l==="true"}}})),[t]);return[n,o=>{const{dateRange:s,visitsFilter:a}=Pj(n,o),{excludeBots:l,orphanVisitsType:c}=a,f={startDate:(s==null?void 0:s.startDate)&&Ys(s.startDate)||"",endDate:(s==null?void 0:s.endDate)&&Ys(s.endDate)||"",excludeBots:l===void 0?void 0:Q6(l),orphanVisitsType:c,domain:r},h=Vd(f),p=Wn(h)?"":`?${h}`;e(p,{replace:!0,relative:"route"})}]};function Y8(e,t){const n=V.useRef(t);V.useEffect(function(){t!==n.current&&e.attributionControl!=null&&(n.current!=null&&e.attributionControl.removeAttribution(n.current),t!=null&&e.attributionControl.addAttribution(t)),n.current=t},[e,t])}const V0e=1;function H0e(e){return Object.freeze({__version:V0e,map:e})}function W0e(e,t){return Object.freeze({...e,...t})}const q8=V.createContext(null),G8=q8.Provider;function Z8(){const e=V.useContext(q8);if(e==null)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of ");return e}function Y0e(e){function t(n,r){const{instance:i,context:o}=e(n).current;return V.useImperativeHandle(r,()=>i),n.children==null?null:U.createElement(G8,{value:o},n.children)}return V.forwardRef(t)}function q0e(e){function t(n,r){const[i,o]=V.useState(!1),{instance:s}=e(n,o).current;V.useImperativeHandle(r,()=>s),V.useEffect(function(){i&&s.update()},[s,i,n.children]);const a=s._contentNode;return a?Id.createPortal(n.children,a):null}return V.forwardRef(t)}function G0e(e){function t(n,r){const{instance:i}=e(n).current;return V.useImperativeHandle(r,()=>i),null}return V.forwardRef(t)}function K8(e,t){const n=V.useRef();V.useEffect(function(){return t!=null&&e.instance.on(t),n.current=t,function(){n.current!=null&&e.instance.off(n.current),n.current=null}},[e,t])}function rT(e,t){const n=e.pane??t.pane;return n?{...e,pane:n}:e}function Z0e(e,t){return function(r,i){const o=Z8(),s=e(rT(r,o),o);return Y8(o.map,r.attribution),K8(s.current,r.eventHandlers),t(s.current,o,r,i),s}}var v2={exports:{}};/* @preserve * Leaflet 1.9.3, a JS library for interactive maps. https://leafletjs.com * (c) 2010-2022 Vladimir Agafonkin, (c) 2010-2011 CloudMade - */(function(e,t){(function(n,r){r(t)})(zl,function(n){var r="1.9.3";function i(u){var d,b,E,M;for(b=1,E=arguments.length;b"u"||!L||!L.Mixin)){u=S(u)?u:[u];for(var d=0;d0?Math.floor(u):Math.ceil(u)};G.prototype={clone:function(){return new G(this.x,this.y)},add:function(u){return this.clone()._add(j(u))},_add:function(u){return this.x+=u.x,this.y+=u.y,this},subtract:function(u){return this.clone()._subtract(j(u))},_subtract:function(u){return this.x-=u.x,this.y-=u.y,this},divideBy:function(u){return this.clone()._divideBy(u)},_divideBy:function(u){return this.x/=u,this.y/=u,this},multiplyBy:function(u){return this.clone()._multiplyBy(u)},_multiplyBy:function(u){return this.x*=u,this.y*=u,this},scaleBy:function(u){return new G(this.x*u.x,this.y*u.y)},unscaleBy:function(u){return new G(this.x/u.x,this.y/u.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=F(this.x),this.y=F(this.y),this},distanceTo:function(u){u=j(u);var d=u.x-this.x,b=u.y-this.y;return Math.sqrt(d*d+b*b)},equals:function(u){return u=j(u),u.x===this.x&&u.y===this.y},contains:function(u){return u=j(u),Math.abs(u.x)<=Math.abs(this.x)&&Math.abs(u.y)<=Math.abs(this.y)},toString:function(){return"Point("+p(this.x)+", "+p(this.y)+")"}};function j(u,d,b){return u instanceof G?u:S(u)?new G(u[0],u[1]):u==null?u:typeof u=="object"&&"x"in u&&"y"in u?new G(u.x,u.y):new G(u,d,b)}function B(u,d){if(u)for(var b=d?[u,d]:u,E=0,M=b.length;E=this.min.x&&b.x<=this.max.x&&d.y>=this.min.y&&b.y<=this.max.y},intersects:function(u){u=ne(u);var d=this.min,b=this.max,E=u.min,M=u.max,$=M.x>=d.x&&E.x<=b.x,Q=M.y>=d.y&&E.y<=b.y;return $&&Q},overlaps:function(u){u=ne(u);var d=this.min,b=this.max,E=u.min,M=u.max,$=M.x>d.x&&E.xd.y&&E.y=d.lat&&M.lat<=b.lat&&E.lng>=d.lng&&M.lng<=b.lng},intersects:function(u){u=q(u);var d=this._southWest,b=this._northEast,E=u.getSouthWest(),M=u.getNorthEast(),$=M.lat>=d.lat&&E.lat<=b.lat,Q=M.lng>=d.lng&&E.lng<=b.lng;return $&&Q},overlaps:function(u){u=q(u);var d=this._southWest,b=this._northEast,E=u.getSouthWest(),M=u.getNorthEast(),$=M.lat>d.lat&&E.latd.lng&&E.lng1,Qt=function(){var u=!1;try{var d=Object.defineProperty({},"passive",{get:function(){u=!0}});window.addEventListener("testPassiveEventSupport",h,d),window.removeEventListener("testPassiveEventSupport",h,d)}catch{}return u}(),or=function(){return!!document.createElement("canvas").getContext}(),Dn=!!(document.createElementNS&&Le("svg").createSVGRect),An=!!Dn&&function(){var u=document.createElement("div");return u.innerHTML="",(u.firstChild&&u.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),pn=!Dn&&function(){try{var u=document.createElement("div");u.innerHTML='';var d=u.firstChild;return d.style.behavior="url(#default#VML)",d&&typeof d.adj=="object"}catch{return!1}}(),si=navigator.platform.indexOf("Mac")===0,ai=navigator.platform.indexOf("Linux")===0;function jn(u){return navigator.userAgent.toLowerCase().indexOf(u)>=0}var He={ie:_e,ielt9:Te,edge:De,webkit:Re,android:Ne,android23:ce,androidStock:be,opera:ye,chrome:Ce,gecko:ke,safari:Ie,phantom:Je,opera12:et,win:Ge,ie3d:Wt,webkit3d:$t,gecko3d:wn,any3d:ir,mobile:Mi,mobileWebkit:Ln,mobileWebkit3d:au,msPointer:Ri,pointer:mh,touch:vh,touchNative:gh,mobileOpera:lu,mobileGecko:oa,retina:an,passiveEvents:Qt,canvas:or,svg:Dn,vml:pn,inlineSvg:An,mac:si,linux:ai},dT=He.msPointer?"MSPointerDown":"pointerdown",hT=He.msPointer?"MSPointerMove":"pointermove",pT=He.msPointer?"MSPointerUp":"pointerup",mT=He.msPointer?"MSPointerCancel":"pointercancel",L_={touchstart:dT,touchmove:hT,touchend:pT,touchcancel:mT},gT={touchstart:cF,touchmove:yh,touchend:yh,touchcancel:yh},vl={},vT=!1;function iF(u,d,b){return d==="touchstart"&&lF(),gT[d]?(b=gT[d].bind(this,b),u.addEventListener(L_[d],b,!1),b):(console.warn("wrong event specified:",d),h)}function oF(u,d,b){if(!L_[d]){console.warn("wrong event specified:",d);return}u.removeEventListener(L_[d],b,!1)}function sF(u){vl[u.pointerId]=u}function aF(u){vl[u.pointerId]&&(vl[u.pointerId]=u)}function yT(u){delete vl[u.pointerId]}function lF(){vT||(document.addEventListener(dT,sF,!0),document.addEventListener(hT,aF,!0),document.addEventListener(pT,yT,!0),document.addEventListener(mT,yT,!0),vT=!0)}function yh(u,d){if(d.pointerType!==(d.MSPOINTER_TYPE_MOUSE||"mouse")){d.touches=[];for(var b in vl)d.touches.push(vl[b]);d.changedTouches=[d],u(d)}}function cF(u,d){d.MSPOINTER_TYPE_TOUCH&&d.pointerType===d.MSPOINTER_TYPE_TOUCH&&In(d),yh(u,d)}function uF(u){var d={},b,E;for(E in u)b=u[E],d[E]=b&&b.bind?b.bind(u):b;return u=d,d.type="dblclick",d.detail=2,d.isTrusted=!1,d._simulated=!0,d}var fF=200;function dF(u,d){u.addEventListener("dblclick",d);var b=0,E;function M($){if($.detail!==1){E=$.detail;return}if(!($.pointerType==="mouse"||$.sourceCapabilities&&!$.sourceCapabilities.firesTouchEvents)){var Q=ST($);if(!(Q.some(function(he){return he instanceof HTMLLabelElement&&he.attributes.for})&&!Q.some(function(he){return he instanceof HTMLInputElement||he instanceof HTMLSelectElement}))){var fe=Date.now();fe-b<=fF?(E++,E===2&&d(uF($))):E=1,b=fe}}}return u.addEventListener("click",M),{dblclick:d,simDblclick:M}}function hF(u,d){u.removeEventListener("dblclick",d.dblclick),u.removeEventListener("click",d.simDblclick)}var D_=wh(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),cu=wh(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),_T=cu==="webkitTransition"||cu==="OTransition"?cu+"End":"transitionend";function bT(u){return typeof u=="string"?document.getElementById(u):u}function uu(u,d){var b=u.style[d]||u.currentStyle&&u.currentStyle[d];if((!b||b==="auto")&&document.defaultView){var E=document.defaultView.getComputedStyle(u,null);b=E?E[d]:null}return b==="auto"?null:b}function ft(u,d,b){var E=document.createElement(u);return E.className=d||"",b&&b.appendChild(E),E}function Bt(u){var d=u.parentNode;d&&d.removeChild(u)}function _h(u){for(;u.firstChild;)u.removeChild(u.firstChild)}function yl(u){var d=u.parentNode;d&&d.lastChild!==u&&d.appendChild(u)}function _l(u){var d=u.parentNode;d&&d.firstChild!==u&&d.insertBefore(u,d.firstChild)}function A_(u,d){if(u.classList!==void 0)return u.classList.contains(d);var b=bh(u);return b.length>0&&new RegExp("(^|\\s)"+d+"(\\s|$)").test(b)}function Xe(u,d){if(u.classList!==void 0)for(var b=v(d),E=0,M=b.length;E0?2*window.devicePixelRatio:1;function ET(u){return He.edge?u.wheelDeltaY/2:u.deltaY&&u.deltaMode===0?-u.deltaY/gF:u.deltaY&&u.deltaMode===1?-u.deltaY*20:u.deltaY&&u.deltaMode===2?-u.deltaY*60:u.deltaX||u.deltaZ?0:u.wheelDelta?(u.wheelDeltaY||u.wheelDelta)/2:u.detail&&Math.abs(u.detail)<32765?-u.detail*20:u.detail?u.detail/-32765*60:0}function q_(u,d){var b=d.relatedTarget;if(!b)return!0;try{for(;b&&b!==u;)b=b.parentNode}catch{return!1}return b!==u}var vF={__proto__:null,on:Ze,off:St,stopPropagation:la,disableScrollPropagation:Y_,disableClickPropagation:pu,preventDefault:In,stop:ca,getPropagationPath:ST,getMousePosition:CT,getWheelDelta:ET,isExternalTarget:q_,addListener:Ze,removeListener:St},TT=oe.extend({run:function(u,d,b,E){this.stop(),this._el=u,this._inProgress=!0,this._duration=b||.25,this._easeOutPower=1/Math.max(E||.5,.2),this._startPos=aa(u),this._offset=d.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=W(this._animate,this),this._step()},_step:function(u){var d=+new Date-this._startTime,b=this._duration*1e3;dthis.options.maxZoom)?this.setZoom(u):this},panInsideBounds:function(u,d){this._enforcingBounds=!0;var b=this.getCenter(),E=this._limitCenter(b,this._zoom,q(u));return b.equals(E)||this.panTo(E,d),this._enforcingBounds=!1,this},panInside:function(u,d){d=d||{};var b=j(d.paddingTopLeft||d.padding||[0,0]),E=j(d.paddingBottomRight||d.padding||[0,0]),M=this.project(this.getCenter()),$=this.project(u),Q=this.getPixelBounds(),fe=ne([Q.min.add(b),Q.max.subtract(E)]),he=fe.getSize();if(!fe.contains($)){this._enforcingBounds=!0;var Se=$.subtract(fe.getCenter()),Ae=fe.extend($).getSize().subtract(he);M.x+=Se.x<0?-Ae.x:Ae.x,M.y+=Se.y<0?-Ae.y:Ae.y,this.panTo(this.unproject(M),d),this._enforcingBounds=!1}return this},invalidateSize:function(u){if(!this._loaded)return this;u=i({animate:!1,pan:!0},u===!0?{animate:!0}:u);var d=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var b=this.getSize(),E=d.divideBy(2).round(),M=b.divideBy(2).round(),$=E.subtract(M);return!$.x&&!$.y?this:(u.animate&&u.pan?this.panBy($):(u.pan&&this._rawPanBy($),this.fire("move"),u.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(s(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:d,newSize:b}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(u){if(u=this._locateOptions=i({timeout:1e4,watch:!1},u),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var d=s(this._handleGeolocationResponse,this),b=s(this._handleGeolocationError,this);return u.watch?this._locationWatchId=navigator.geolocation.watchPosition(d,b,u):navigator.geolocation.getCurrentPosition(d,b,u),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(u){if(this._container._leaflet_id){var d=u.code,b=u.message||(d===1?"permission denied":d===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:d,message:"Geolocation error: "+b+"."})}},_handleGeolocationResponse:function(u){if(this._container._leaflet_id){var d=u.coords.latitude,b=u.coords.longitude,E=new te(d,b),M=E.toBounds(u.coords.accuracy*2),$=this._locateOptions;if($.setView){var Q=this.getBoundsZoom(M);this.setView(E,$.maxZoom?Math.min(Q,$.maxZoom):Q)}var fe={latlng:E,bounds:M,timestamp:u.timestamp};for(var he in u.coords)typeof u.coords[he]=="number"&&(fe[he]=u.coords[he]);this.fire("locationfound",fe)}},addHandler:function(u,d){if(!d)return this;var b=this[u]=new d(this);return this._handlers.push(b),this.options[u]&&b.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),Bt(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(Y(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var u;for(u in this._layers)this._layers[u].remove();for(u in this._panes)Bt(this._panes[u]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(u,d){var b="leaflet-pane"+(u?" leaflet-"+u.replace("Pane","")+"-pane":""),E=ft("div",b,d||this._mapPane);return u&&(this._panes[u]=E),E},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var u=this.getPixelBounds(),d=this.unproject(u.getBottomLeft()),b=this.unproject(u.getTopRight());return new H(d,b)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(u,d,b){u=q(u),b=j(b||[0,0]);var E=this.getZoom()||0,M=this.getMinZoom(),$=this.getMaxZoom(),Q=u.getNorthWest(),fe=u.getSouthEast(),he=this.getSize().subtract(b),Se=ne(this.project(fe,E),this.project(Q,E)).getSize(),Ae=He.any3d?this.options.zoomSnap:1,Ye=he.x/Se.x,nt=he.y/Se.y,Ur=d?Math.max(Ye,nt):Math.min(Ye,nt);return E=this.getScaleZoom(Ur,E),Ae&&(E=Math.round(E/(Ae/100))*(Ae/100),E=d?Math.ceil(E/Ae)*Ae:Math.floor(E/Ae)*Ae),Math.max(M,Math.min($,E))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new G(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(u,d){var b=this._getTopLeftPoint(u,d);return new B(b,b.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(u){return this.options.crs.getProjectedBounds(u===void 0?this.getZoom():u)},getPane:function(u){return typeof u=="string"?this._panes[u]:u},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(u,d){var b=this.options.crs;return d=d===void 0?this._zoom:d,b.scale(u)/b.scale(d)},getScaleZoom:function(u,d){var b=this.options.crs;d=d===void 0?this._zoom:d;var E=b.zoom(u*b.scale(d));return isNaN(E)?1/0:E},project:function(u,d){return d=d===void 0?this._zoom:d,this.options.crs.latLngToPoint(se(u),d)},unproject:function(u,d){return d=d===void 0?this._zoom:d,this.options.crs.pointToLatLng(j(u),d)},layerPointToLatLng:function(u){var d=j(u).add(this.getPixelOrigin());return this.unproject(d)},latLngToLayerPoint:function(u){var d=this.project(se(u))._round();return d._subtract(this.getPixelOrigin())},wrapLatLng:function(u){return this.options.crs.wrapLatLng(se(u))},wrapLatLngBounds:function(u){return this.options.crs.wrapLatLngBounds(q(u))},distance:function(u,d){return this.options.crs.distance(se(u),se(d))},containerPointToLayerPoint:function(u){return j(u).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(u){return j(u).add(this._getMapPanePos())},containerPointToLatLng:function(u){var d=this.containerPointToLayerPoint(j(u));return this.layerPointToLatLng(d)},latLngToContainerPoint:function(u){return this.layerPointToContainerPoint(this.latLngToLayerPoint(se(u)))},mouseEventToContainerPoint:function(u){return CT(u,this._container)},mouseEventToLayerPoint:function(u){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(u))},mouseEventToLatLng:function(u){return this.layerPointToLatLng(this.mouseEventToLayerPoint(u))},_initContainer:function(u){var d=this._container=bT(u);if(d){if(d._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");Ze(d,"scroll",this._onScroll,this),this._containerId=l(d)},_initLayout:function(){var u=this._container;this._fadeAnimated=this.options.fadeAnimation&&He.any3d,Xe(u,"leaflet-container"+(He.touch?" leaflet-touch":"")+(He.retina?" leaflet-retina":"")+(He.ielt9?" leaflet-oldie":"")+(He.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var d=uu(u,"position");d!=="absolute"&&d!=="relative"&&d!=="fixed"&&d!=="sticky"&&(u.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var u=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),ln(this._mapPane,new G(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(Xe(u.markerPane,"leaflet-zoom-hide"),Xe(u.shadowPane,"leaflet-zoom-hide"))},_resetView:function(u,d,b){ln(this._mapPane,new G(0,0));var E=!this._loaded;this._loaded=!0,d=this._limitZoom(d),this.fire("viewprereset");var M=this._zoom!==d;this._moveStart(M,b)._move(u,d)._moveEnd(M),this.fire("viewreset"),E&&this.fire("load")},_moveStart:function(u,d){return u&&this.fire("zoomstart"),d||this.fire("movestart"),this},_move:function(u,d,b,E){d===void 0&&(d=this._zoom);var M=this._zoom!==d;return this._zoom=d,this._lastCenter=u,this._pixelOrigin=this._getNewPixelOrigin(u),E?b&&b.pinch&&this.fire("zoom",b):((M||b&&b.pinch)&&this.fire("zoom",b),this.fire("move",b)),this},_moveEnd:function(u){return u&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return Y(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(u){ln(this._mapPane,this._getMapPanePos().subtract(u))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(u){this._targets={},this._targets[l(this._container)]=this;var d=u?St:Ze;d(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&d(window,"resize",this._onResize,this),He.any3d&&this.options.transform3DLimit&&(u?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){Y(this._resizeRequest),this._resizeRequest=W(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var u=this._getMapPanePos();Math.max(Math.abs(u.x),Math.abs(u.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(u,d){for(var b=[],E,M=d==="mouseout"||d==="mouseover",$=u.target||u.srcElement,Q=!1;$;){if(E=this._targets[l($)],E&&(d==="click"||d==="preclick")&&this._draggableMoved(E)){Q=!0;break}if(E&&E.listens(d,!0)&&(M&&!q_($,u)||(b.push(E),M))||$===this._container)break;$=$.parentNode}return!b.length&&!Q&&!M&&this.listens(d,!0)&&(b=[this]),b},_isClickDisabled:function(u){for(;u&&u!==this._container;){if(u._leaflet_disable_click)return!0;u=u.parentNode}},_handleDOMEvent:function(u){var d=u.target||u.srcElement;if(!(!this._loaded||d._leaflet_disable_events||u.type==="click"&&this._isClickDisabled(d))){var b=u.type;b==="mousedown"&&z_(d),this._fireDOMEvent(u,b)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(u,d,b){if(u.type==="click"){var E=i({},u);E.type="preclick",this._fireDOMEvent(E,E.type,b)}var M=this._findEventTargets(u,d);if(b){for(var $=[],Q=0;Q0?Math.round(u-d)/2:Math.max(0,Math.ceil(u))-Math.max(0,Math.floor(d))},_limitZoom:function(u){var d=this.getMinZoom(),b=this.getMaxZoom(),E=He.any3d?this.options.zoomSnap:1;return E&&(u=Math.round(u/E)*E),Math.max(d,Math.min(b,u))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Jt(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(u,d){var b=this._getCenterOffset(u)._trunc();return(d&&d.animate)!==!0&&!this.getSize().contains(b)?!1:(this.panBy(b,d),!0)},_createAnimProxy:function(){var u=this._proxy=ft("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(u),this.on("zoomanim",function(d){var b=D_,E=this._proxy.style[b];sa(this._proxy,this.project(d.center,d.zoom),this.getZoomScale(d.zoom,1)),E===this._proxy.style[b]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){Bt(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var u=this.getCenter(),d=this.getZoom();sa(this._proxy,this.project(u,d),this.getZoomScale(d,1))},_catchTransitionEnd:function(u){this._animatingZoom&&u.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(u,d,b){if(this._animatingZoom)return!0;if(b=b||{},!this._zoomAnimated||b.animate===!1||this._nothingToAnimate()||Math.abs(d-this._zoom)>this.options.zoomAnimationThreshold)return!1;var E=this.getZoomScale(d),M=this._getCenterOffset(u)._divideBy(1-1/E);return b.animate!==!0&&!this.getSize().contains(M)?!1:(W(function(){this._moveStart(!0,!1)._animateZoom(u,d,!0)},this),!0)},_animateZoom:function(u,d,b,E){this._mapPane&&(b&&(this._animatingZoom=!0,this._animateToCenter=u,this._animateToZoom=d,Xe(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:u,zoom:d,noUpdate:E}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(s(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Jt(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function yF(u,d){return new ot(u,d)}var li=Z.extend({options:{position:"topright"},initialize:function(u){y(this,u)},getPosition:function(){return this.options.position},setPosition:function(u){var d=this._map;return d&&d.removeControl(this),this.options.position=u,d&&d.addControl(this),this},getContainer:function(){return this._container},addTo:function(u){this.remove(),this._map=u;var d=this._container=this.onAdd(u),b=this.getPosition(),E=u._controlCorners[b];return Xe(d,"leaflet-control"),b.indexOf("bottom")!==-1?E.insertBefore(d,E.firstChild):E.appendChild(d),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(Bt(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(u){this._map&&u&&u.screenX>0&&u.screenY>0&&this._map.getContainer().focus()}}),mu=function(u){return new li(u)};ot.include({addControl:function(u){return u.addTo(this),this},removeControl:function(u){return u.remove(),this},_initControlPos:function(){var u=this._controlCorners={},d="leaflet-",b=this._controlContainer=ft("div",d+"control-container",this._container);function E(M,$){var Q=d+M+" "+d+$;u[M+$]=ft("div",Q,b)}E("top","left"),E("top","right"),E("bottom","left"),E("bottom","right")},_clearControlPos:function(){for(var u in this._controlCorners)Bt(this._controlCorners[u]);Bt(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var OT=li.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(u,d,b,E){return b1,this._baseLayersList.style.display=u?"":"none"),this._separator.style.display=d&&u?"":"none",this},_onLayerChange:function(u){this._handlingClick||this._update();var d=this._getLayer(l(u.target)),b=d.overlay?u.type==="add"?"overlayadd":"overlayremove":u.type==="add"?"baselayerchange":null;b&&this._map.fire(b,d)},_createRadioElement:function(u,d){var b='",E=document.createElement("div");return E.innerHTML=b,E.firstChild},_addItem:function(u){var d=document.createElement("label"),b=this._map.hasLayer(u.layer),E;u.overlay?(E=document.createElement("input"),E.type="checkbox",E.className="leaflet-control-layers-selector",E.defaultChecked=b):E=this._createRadioElement("leaflet-base-layers_"+l(this),b),this._layerControlInputs.push(E),E.layerId=l(u.layer),Ze(E,"click",this._onInputClick,this);var M=document.createElement("span");M.innerHTML=" "+u.name;var $=document.createElement("span");d.appendChild($),$.appendChild(E),$.appendChild(M);var Q=u.overlay?this._overlaysList:this._baseLayersList;return Q.appendChild(d),this._checkDisabledLayers(),d},_onInputClick:function(){var u=this._layerControlInputs,d,b,E=[],M=[];this._handlingClick=!0;for(var $=u.length-1;$>=0;$--)d=u[$],b=this._getLayer(d.layerId).layer,d.checked?E.push(b):d.checked||M.push(b);for($=0;$=0;M--)d=u[M],b=this._getLayer(d.layerId).layer,d.disabled=b.options.minZoom!==void 0&&Eb.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var u=this._section;Ze(u,"click",In),this.expand(),setTimeout(function(){St(u,"click",In)})}}),_F=function(u,d,b){return new OT(u,d,b)},G_=li.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(u){var d="leaflet-control-zoom",b=ft("div",d+" leaflet-bar"),E=this.options;return this._zoomInButton=this._createButton(E.zoomInText,E.zoomInTitle,d+"-in",b,this._zoomIn),this._zoomOutButton=this._createButton(E.zoomOutText,E.zoomOutTitle,d+"-out",b,this._zoomOut),this._updateDisabled(),u.on("zoomend zoomlevelschange",this._updateDisabled,this),b},onRemove:function(u){u.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(u){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(u.shiftKey?3:1))},_createButton:function(u,d,b,E,M){var $=ft("a",b,E);return $.innerHTML=u,$.href="#",$.title=d,$.setAttribute("role","button"),$.setAttribute("aria-label",d),pu($),Ze($,"click",ca),Ze($,"click",M,this),Ze($,"click",this._refocusOnMap,this),$},_updateDisabled:function(){var u=this._map,d="leaflet-disabled";Jt(this._zoomInButton,d),Jt(this._zoomOutButton,d),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||u._zoom===u.getMinZoom())&&(Xe(this._zoomOutButton,d),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||u._zoom===u.getMaxZoom())&&(Xe(this._zoomInButton,d),this._zoomInButton.setAttribute("aria-disabled","true"))}});ot.mergeOptions({zoomControl:!0}),ot.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new G_,this.addControl(this.zoomControl))});var bF=function(u){return new G_(u)},PT=li.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(u){var d="leaflet-control-scale",b=ft("div",d),E=this.options;return this._addScales(E,d+"-line",b),u.on(E.updateWhenIdle?"moveend":"move",this._update,this),u.whenReady(this._update,this),b},onRemove:function(u){u.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(u,d,b){u.metric&&(this._mScale=ft("div",d,b)),u.imperial&&(this._iScale=ft("div",d,b))},_update:function(){var u=this._map,d=u.getSize().y/2,b=u.distance(u.containerPointToLatLng([0,d]),u.containerPointToLatLng([this.options.maxWidth,d]));this._updateScales(b)},_updateScales:function(u){this.options.metric&&u&&this._updateMetric(u),this.options.imperial&&u&&this._updateImperial(u)},_updateMetric:function(u){var d=this._getRoundNum(u),b=d<1e3?d+" m":d/1e3+" km";this._updateScale(this._mScale,b,d/u)},_updateImperial:function(u){var d=u*3.2808399,b,E,M;d>5280?(b=d/5280,E=this._getRoundNum(b),this._updateScale(this._iScale,E+" mi",E/b)):(M=this._getRoundNum(d),this._updateScale(this._iScale,M+" ft",M/d))},_updateScale:function(u,d,b){u.style.width=Math.round(this.options.maxWidth*b)+"px",u.innerHTML=d},_getRoundNum:function(u){var d=Math.pow(10,(Math.floor(u)+"").length-1),b=u/d;return b=b>=10?10:b>=5?5:b>=3?3:b>=2?2:1,d*b}}),wF=function(u){return new PT(u)},xF='',Z_=li.extend({options:{position:"bottomright",prefix:''+(He.inlineSvg?xF+" ":"")+"Leaflet"},initialize:function(u){y(this,u),this._attributions={}},onAdd:function(u){u.attributionControl=this,this._container=ft("div","leaflet-control-attribution"),pu(this._container);for(var d in u._layers)u._layers[d].getAttribution&&this.addAttribution(u._layers[d].getAttribution());return this._update(),u.on("layeradd",this._addAttribution,this),this._container},onRemove:function(u){u.off("layeradd",this._addAttribution,this)},_addAttribution:function(u){u.layer.getAttribution&&(this.addAttribution(u.layer.getAttribution()),u.layer.once("remove",function(){this.removeAttribution(u.layer.getAttribution())},this))},setPrefix:function(u){return this.options.prefix=u,this._update(),this},addAttribution:function(u){return u?(this._attributions[u]||(this._attributions[u]=0),this._attributions[u]++,this._update(),this):this},removeAttribution:function(u){return u?(this._attributions[u]&&(this._attributions[u]--,this._update()),this):this},_update:function(){if(this._map){var u=[];for(var d in this._attributions)this._attributions[d]&&u.push(d);var b=[];this.options.prefix&&b.push(this.options.prefix),u.length&&b.push(u.join(", ")),this._container.innerHTML=b.join(' ')}}});ot.mergeOptions({attributionControl:!0}),ot.addInitHook(function(){this.options.attributionControl&&new Z_().addTo(this)});var SF=function(u){return new Z_(u)};li.Layers=OT,li.Zoom=G_,li.Scale=PT,li.Attribution=Z_,mu.layers=_F,mu.zoom=bF,mu.scale=wF,mu.attribution=SF;var Li=Z.extend({initialize:function(u){this._map=u},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Li.addTo=function(u,d){return u.addHandler(d,this),this};var CF={Events:ie},kT=He.touch?"touchstart mousedown":"mousedown",Ho=oe.extend({options:{clickTolerance:3},initialize:function(u,d,b,E){y(this,E),this._element=u,this._dragStartTarget=d||u,this._preventOutline=b},enable:function(){this._enabled||(Ze(this._dragStartTarget,kT,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Ho._dragging===this&&this.finishDrag(!0),St(this._dragStartTarget,kT,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(u){if(this._enabled&&(this._moved=!1,!A_(this._element,"leaflet-zoom-anim"))){if(u.touches&&u.touches.length!==1){Ho._dragging===this&&this.finishDrag();return}if(!(Ho._dragging||u.shiftKey||u.which!==1&&u.button!==1&&!u.touches)&&(Ho._dragging=this,this._preventOutline&&z_(this._element),F_(),fu(),!this._moving)){this.fire("down");var d=u.touches?u.touches[0]:u,b=wT(this._element);this._startPoint=new G(d.clientX,d.clientY),this._startPos=aa(this._element),this._parentScale=U_(b);var E=u.type==="mousedown";Ze(document,E?"mousemove":"touchmove",this._onMove,this),Ze(document,E?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(u){if(this._enabled){if(u.touches&&u.touches.length>1){this._moved=!0;return}var d=u.touches&&u.touches.length===1?u.touches[0]:u,b=new G(d.clientX,d.clientY)._subtract(this._startPoint);!b.x&&!b.y||Math.abs(b.x)+Math.abs(b.y)$&&(Q=fe,$=he);$>b&&(d[Q]=1,K_(u,d,b,E,Q),K_(u,d,b,Q,M))}function OF(u,d){for(var b=[u[0]],E=1,M=0,$=u.length;E<$;E++)PF(u[E],u[M])>d&&(b.push(u[E]),M=E);return M<$-1&&b.push(u[$-1]),b}var NT;function LT(u,d,b,E,M){var $=E?NT:ua(u,b),Q=ua(d,b),fe,he,Se;for(NT=Q;;){if(!($|Q))return[u,d];if($&Q)return!1;fe=$||Q,he=Ch(u,d,fe,b,M),Se=ua(he,b),fe===$?(u=he,$=Se):(d=he,Q=Se)}}function Ch(u,d,b,E,M){var $=d.x-u.x,Q=d.y-u.y,fe=E.min,he=E.max,Se,Ae;return b&8?(Se=u.x+$*(he.y-u.y)/Q,Ae=he.y):b&4?(Se=u.x+$*(fe.y-u.y)/Q,Ae=fe.y):b&2?(Se=he.x,Ae=u.y+Q*(he.x-u.x)/$):b&1&&(Se=fe.x,Ae=u.y+Q*(fe.x-u.x)/$),new G(Se,Ae,M)}function ua(u,d){var b=0;return u.xd.max.x&&(b|=2),u.yd.max.y&&(b|=8),b}function PF(u,d){var b=d.x-u.x,E=d.y-u.y;return b*b+E*E}function gu(u,d,b,E){var M=d.x,$=d.y,Q=b.x-M,fe=b.y-$,he=Q*Q+fe*fe,Se;return he>0&&(Se=((u.x-M)*Q+(u.y-$)*fe)/he,Se>1?(M=b.x,$=b.y):Se>0&&(M+=Q*Se,$+=fe*Se)),Q=u.x-M,fe=u.y-$,E?Q*Q+fe*fe:new G(M,$)}function zr(u){return!S(u[0])||typeof u[0][0]!="object"&&typeof u[0][0]<"u"}function DT(u){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),zr(u)}function AT(u,d){var b,E,M,$,Q,fe,he,Se;if(!u||u.length===0)throw new Error("latlngs not passed");zr(u)||(console.warn("latlngs are not flat! Only the first ring will be used"),u=u[0]);var Ae=[];for(var Ye in u)Ae.push(d.project(se(u[Ye])));var nt=Ae.length;for(b=0,E=0;bE){he=($-E)/M,Se=[fe.x-he*(fe.x-Q.x),fe.y-he*(fe.y-Q.y)];break}return d.unproject(j(Se))}var kF={__proto__:null,simplify:MT,pointToSegmentDistance:RT,closestPointOnSegment:EF,clipSegment:LT,_getEdgeIntersection:Ch,_getBitCode:ua,_sqClosestPointOnSegment:gu,isFlat:zr,_flat:DT,polylineCenter:AT};function jT(u,d,b){var E,M=[1,4,2,8],$,Q,fe,he,Se,Ae,Ye,nt;for($=0,Ae=u.length;$1e-7;fe++)Se=M*Math.sin(Q),Se=Math.pow((1-Se)/(1+Se),M/2),he=Math.PI/2-2*Math.atan($*Se)-Q,Q+=he;return new te(Q*d,u.x*d/b)}},RF={__proto__:null,LonLat:X_,Mercator:Q_,SphericalMercator:I},NF=i({},O,{code:"EPSG:3395",projection:Q_,transformation:function(){var u=.5/(Math.PI*Q_.R);return K(u,.5,-u,.5)}()}),FT=i({},O,{code:"EPSG:4326",projection:X_,transformation:K(1/180,1,-1/180,.5)}),LF=i({},pe,{projection:X_,transformation:K(1,0,-1,0),scale:function(u){return Math.pow(2,u)},zoom:function(u){return Math.log(u)/Math.LN2},distance:function(u,d){var b=d.lng-u.lng,E=d.lat-u.lat;return Math.sqrt(b*b+E*E)},infinite:!0});pe.Earth=O,pe.EPSG3395=NF,pe.EPSG3857=ae,pe.EPSG900913=ge,pe.EPSG4326=FT,pe.Simple=LF;var ci=oe.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(u){return u.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(u){return u&&u.removeLayer(this),this},getPane:function(u){return this._map.getPane(u?this.options[u]||u:this.options.pane)},addInteractiveTarget:function(u){return this._map._targets[l(u)]=this,this},removeInteractiveTarget:function(u){return delete this._map._targets[l(u)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(u){var d=u.target;if(d.hasLayer(this)){if(this._map=d,this._zoomAnimated=d._zoomAnimated,this.getEvents){var b=this.getEvents();d.on(b,this),this.once("remove",function(){d.off(b,this)},this)}this.onAdd(d),this.fire("add"),d.fire("layeradd",{layer:this})}}});ot.include({addLayer:function(u){if(!u._layerAdd)throw new Error("The provided object is not a Layer.");var d=l(u);return this._layers[d]?this:(this._layers[d]=u,u._mapToAdd=this,u.beforeAdd&&u.beforeAdd(this),this.whenReady(u._layerAdd,u),this)},removeLayer:function(u){var d=l(u);return this._layers[d]?(this._loaded&&u.onRemove(this),delete this._layers[d],this._loaded&&(this.fire("layerremove",{layer:u}),u.fire("remove")),u._map=u._mapToAdd=null,this):this},hasLayer:function(u){return l(u)in this._layers},eachLayer:function(u,d){for(var b in this._layers)u.call(d,this._layers[b]);return this},_addLayers:function(u){u=u?S(u)?u:[u]:[];for(var d=0,b=u.length;dthis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&d[0]instanceof te&&d[0].equals(d[b-1])&&d.pop(),d},_setLatLngs:function(u){oo.prototype._setLatLngs.call(this,u),zr(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return zr(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var u=this._renderer._bounds,d=this.options.weight,b=new G(d,d);if(u=new B(u.min.subtract(b),u.max.add(b)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(u))){if(this.options.noClip){this._parts=this._rings;return}for(var E=0,M=this._rings.length,$;Eu.y!=M.y>u.y&&u.x<(M.x-E.x)*(u.y-E.y)/(M.y-E.y)+E.x&&(d=!d);return d||oo.prototype._containsPoint.call(this,u,!0)}});function zF(u,d){return new xl(u,d)}var so=io.extend({initialize:function(u,d){y(this,d),this._layers={},u&&this.addData(u)},addData:function(u){var d=S(u)?u:u.features,b,E,M;if(d){for(b=0,E=d.length;b0?E:[d.src];return}S(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(d.style,"objectFit")&&(d.style.objectFit="fill"),d.autoplay=!!this.options.autoplay,d.loop=!!this.options.loop,d.muted=!!this.options.muted,d.playsInline=!!this.options.playsInline;for(var $=0;$M?(d.height=M+"px",Xe(u,$)):Jt(u,$),this._containerWidth=this._container.offsetWidth},_animateZoom:function(u){var d=this._map._latLngToNewLayerPoint(this._latlng,u.zoom,u.center),b=this._getAnchor();ln(this._container,d.add(b))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var u=this._map,d=parseInt(uu(this._container,"marginBottom"),10)||0,b=this._container.offsetHeight+d,E=this._containerWidth,M=new G(this._containerLeft,-b-this._containerBottom);M._add(aa(this._container));var $=u.layerPointToContainerPoint(M),Q=j(this.options.autoPanPadding),fe=j(this.options.autoPanPaddingTopLeft||Q),he=j(this.options.autoPanPaddingBottomRight||Q),Se=u.getSize(),Ae=0,Ye=0;$.x+E+he.x>Se.x&&(Ae=$.x+E-Se.x+he.x),$.x-Ae-fe.x<0&&(Ae=$.x-fe.x),$.y+b+he.y>Se.y&&(Ye=$.y+b-Se.y+he.y),$.y-Ye-fe.y<0&&(Ye=$.y-fe.y),(Ae||Ye)&&(this.options.keepInView&&(this._autopanning=!0),u.fire("autopanstart").panBy([Ae,Ye]))}},_getAnchor:function(){return j(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),YF=function(u,d){return new Nh(u,d)};ot.mergeOptions({closePopupOnClick:!0}),ot.include({openPopup:function(u,d,b){return this._initOverlay(Nh,u,d,b).openOn(this),this},closePopup:function(u){return u=arguments.length?u:this._popup,u&&u.close(),this}}),ci.include({bindPopup:function(u,d){return this._popup=this._initOverlay(Nh,this._popup,u,d),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(u){return this._popup&&(this instanceof io||(this._popup._source=this),this._popup._prepareOpen(u||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(u){return this._popup&&this._popup.setContent(u),this},getPopup:function(){return this._popup},_openPopup:function(u){if(!(!this._popup||!this._map)){ca(u);var d=u.layer||u.target;if(this._popup._source===d&&!(d instanceof Wo)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(u.latlng);return}this._popup._source=d,this.openPopup(u.latlng)}},_movePopup:function(u){this._popup.setLatLng(u.latlng)},_onKeyPress:function(u){u.originalEvent.keyCode===13&&this._openPopup(u)}});var Lh=Di.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(u){Di.prototype.onAdd.call(this,u),this.setOpacity(this.options.opacity),u.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(u){Di.prototype.onRemove.call(this,u),u.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var u=Di.prototype.getEvents.call(this);return this.options.permanent||(u.preclick=this.close),u},_initLayout:function(){var u="leaflet-tooltip",d=u+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=ft("div",d),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+l(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(u){var d,b,E=this._map,M=this._container,$=E.latLngToContainerPoint(E.getCenter()),Q=E.layerPointToContainerPoint(u),fe=this.options.direction,he=M.offsetWidth,Se=M.offsetHeight,Ae=j(this.options.offset),Ye=this._getAnchor();fe==="top"?(d=he/2,b=Se):fe==="bottom"?(d=he/2,b=0):fe==="center"?(d=he/2,b=Se/2):fe==="right"?(d=0,b=Se/2):fe==="left"?(d=he,b=Se/2):Q.x<$.x?(fe="right",d=0,b=Se/2):(fe="left",d=he+(Ae.x+Ye.x)*2,b=Se/2),u=u.subtract(j(d,b,!0)).add(Ae).add(Ye),Jt(M,"leaflet-tooltip-right"),Jt(M,"leaflet-tooltip-left"),Jt(M,"leaflet-tooltip-top"),Jt(M,"leaflet-tooltip-bottom"),Xe(M,"leaflet-tooltip-"+fe),ln(M,u)},_updatePosition:function(){var u=this._map.latLngToLayerPoint(this._latlng);this._setPosition(u)},setOpacity:function(u){this.options.opacity=u,this._container&&Br(this._container,u)},_animateZoom:function(u){var d=this._map._latLngToNewLayerPoint(this._latlng,u.zoom,u.center);this._setPosition(d)},_getAnchor:function(){return j(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),qF=function(u,d){return new Lh(u,d)};ot.include({openTooltip:function(u,d,b){return this._initOverlay(Lh,u,d,b).openOn(this),this},closeTooltip:function(u){return u.close(),this}}),ci.include({bindTooltip:function(u,d){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(Lh,this._tooltip,u,d),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(u){if(!(!u&&this._tooltipHandlersAdded)){var d=u?"off":"on",b={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?b.add=this._openTooltip:(b.mouseover=this._openTooltip,b.mouseout=this.closeTooltip,b.click=this._openTooltip,this._map?this._addFocusListeners():b.add=this._addFocusListeners),this._tooltip.options.sticky&&(b.mousemove=this._moveTooltip),this[d](b),this._tooltipHandlersAdded=!u}},openTooltip:function(u){return this._tooltip&&(this instanceof io||(this._tooltip._source=this),this._tooltip._prepareOpen(u)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(u){return this._tooltip&&this._tooltip.setContent(u),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(u){var d=u.getElement();d&&(Ze(d,"focus",function(){this._tooltip._source=u,this.openTooltip()},this),Ze(d,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(u){var d=u.getElement();d&&d.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(u){!this._tooltip||!this._map||this._map.dragging&&this._map.dragging.moving()||(this._tooltip._source=u.layer||u.target,this.openTooltip(this._tooltip.options.sticky?u.latlng:void 0))},_moveTooltip:function(u){var d=u.latlng,b,E;this._tooltip.options.sticky&&u.originalEvent&&(b=this._map.mouseEventToContainerPoint(u.originalEvent),E=this._map.containerPointToLayerPoint(b),d=this._map.layerPointToLatLng(E)),this._tooltip.setLatLng(d)}});var HT=wl.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(u){var d=u&&u.tagName==="DIV"?u:document.createElement("div"),b=this.options;if(b.html instanceof Element?(_h(d),d.appendChild(b.html)):d.innerHTML=b.html!==!1?b.html:"",b.bgPos){var E=j(b.bgPos);d.style.backgroundPosition=-E.x+"px "+-E.y+"px"}return this._setIconStyles(d,"icon"),d},createShadow:function(){return null}});function GF(u){return new HT(u)}wl.Default=vu;var yu=ci.extend({options:{tileSize:256,opacity:1,updateWhenIdle:He.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(u){y(this,u)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(u){u._addZoomLimit(this)},onRemove:function(u){this._removeAllTiles(),Bt(this._container),u._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(yl(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(_l(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(u){return this.options.opacity=u,this._updateOpacity(),this},setZIndex:function(u){return this.options.zIndex=u,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var u=this._clampZoom(this._map.getZoom());u!==this._tileZoom&&(this._tileZoom=u,this._updateLevels()),this._update()}return this},getEvents:function(){var u={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=c(this._onMoveEnd,this.options.updateInterval,this)),u.move=this._onMove),this._zoomAnimated&&(u.zoomanim=this._animateZoom),u},createTile:function(){return document.createElement("div")},getTileSize:function(){var u=this.options.tileSize;return u instanceof G?u:new G(u,u)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(u){for(var d=this.getPane().children,b=-u(-1/0,1/0),E=0,M=d.length,$;Ethis.options.maxZoom||bE?this._retainParent(M,$,Q,E):!1)},_retainChildren:function(u,d,b,E){for(var M=2*u;M<2*u+2;M++)for(var $=2*d;$<2*d+2;$++){var Q=new G(M,$);Q.z=b+1;var fe=this._tileCoordsToKey(Q),he=this._tiles[fe];if(he&&he.active){he.retain=!0;continue}else he&&he.loaded&&(he.retain=!0);b+1this.options.maxZoom||this.options.minZoom!==void 0&&M1){this._setView(u,b);return}for(var Ye=M.min.y;Ye<=M.max.y;Ye++)for(var nt=M.min.x;nt<=M.max.x;nt++){var Ur=new G(nt,Ye);if(Ur.z=this._tileZoom,!!this._isValidTile(Ur)){var fa=this._tiles[this._tileCoordsToKey(Ur)];fa?fa.current=!0:Q.push(Ur)}}if(Q.sort(function(Yo,r0){return Yo.distanceTo($)-r0.distanceTo($)}),Q.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Ah=document.createDocumentFragment();for(nt=0;ntb.max.x)||!d.wrapLat&&(u.yb.max.y))return!1}if(!this.options.bounds)return!0;var E=this._tileCoordsToBounds(u);return q(this.options.bounds).overlaps(E)},_keyToBounds:function(u){return this._tileCoordsToBounds(this._keyToTileCoords(u))},_tileCoordsToNwSe:function(u){var d=this._map,b=this.getTileSize(),E=u.scaleBy(b),M=E.add(b),$=d.unproject(E,u.z),Q=d.unproject(M,u.z);return[$,Q]},_tileCoordsToBounds:function(u){var d=this._tileCoordsToNwSe(u),b=new H(d[0],d[1]);return this.options.noWrap||(b=this._map.wrapLatLngBounds(b)),b},_tileCoordsToKey:function(u){return u.x+":"+u.y+":"+u.z},_keyToTileCoords:function(u){var d=u.split(":"),b=new G(+d[0],+d[1]);return b.z=+d[2],b},_removeTile:function(u){var d=this._tiles[u];d&&(Bt(d.el),delete this._tiles[u],this.fire("tileunload",{tile:d.el,coords:this._keyToTileCoords(u)}))},_initTile:function(u){Xe(u,"leaflet-tile");var d=this.getTileSize();u.style.width=d.x+"px",u.style.height=d.y+"px",u.onselectstart=h,u.onmousemove=h,He.ielt9&&this.options.opacity<1&&Br(u,this.options.opacity)},_addTile:function(u,d){var b=this._getTilePos(u),E=this._tileCoordsToKey(u),M=this.createTile(this._wrapCoords(u),s(this._tileReady,this,u));this._initTile(M),this.createTile.length<2&&W(s(this._tileReady,this,u,null,M)),ln(M,b),this._tiles[E]={el:M,coords:u,current:!0},d.appendChild(M),this.fire("tileloadstart",{tile:M,coords:u})},_tileReady:function(u,d,b){d&&this.fire("tileerror",{error:d,tile:b,coords:u});var E=this._tileCoordsToKey(u);b=this._tiles[E],b&&(b.loaded=+new Date,this._map._fadeAnimated?(Br(b.el,0),Y(this._fadeFrame),this._fadeFrame=W(this._updateOpacity,this)):(b.active=!0,this._pruneTiles()),d||(Xe(b.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:b.el,coords:u})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),He.ielt9||!this._map._fadeAnimated?W(this._pruneTiles,this):setTimeout(s(this._pruneTiles,this),250)))},_getTilePos:function(u){return u.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(u){var d=new G(this._wrapX?f(u.x,this._wrapX):u.x,this._wrapY?f(u.y,this._wrapY):u.y);return d.z=u.z,d},_pxBoundsToTileRange:function(u){var d=this.getTileSize();return new B(u.min.unscaleBy(d).floor(),u.max.unscaleBy(d).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var u in this._tiles)if(!this._tiles[u].loaded)return!1;return!0}});function ZF(u){return new yu(u)}var Cl=yu.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(u,d){this._url=u,d=y(this,d),d.detectRetina&&He.retina&&d.maxZoom>0?(d.tileSize=Math.floor(d.tileSize/2),d.zoomReverse?(d.zoomOffset--,d.minZoom=Math.min(d.maxZoom,d.minZoom+1)):(d.zoomOffset++,d.maxZoom=Math.max(d.minZoom,d.maxZoom-1)),d.minZoom=Math.max(0,d.minZoom)):d.zoomReverse?d.minZoom=Math.min(d.maxZoom,d.minZoom):d.maxZoom=Math.max(d.minZoom,d.maxZoom),typeof d.subdomains=="string"&&(d.subdomains=d.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(u,d){return this._url===u&&d===void 0&&(d=!0),this._url=u,d||this.redraw(),this},createTile:function(u,d){var b=document.createElement("img");return Ze(b,"load",s(this._tileOnLoad,this,d,b)),Ze(b,"error",s(this._tileOnError,this,d,b)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(b.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(b.referrerPolicy=this.options.referrerPolicy),b.alt="",b.src=this.getTileUrl(u),b},getTileUrl:function(u){var d={r:He.retina?"@2x":"",s:this._getSubdomain(u),x:u.x,y:u.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var b=this._globalTileRange.max.y-u.y;this.options.tms&&(d.y=b),d["-y"]=b}return w(this._url,i(d,this.options))},_tileOnLoad:function(u,d){He.ielt9?setTimeout(s(u,this,null,d),0):u(null,d)},_tileOnError:function(u,d,b){var E=this.options.errorTileUrl;E&&d.getAttribute("src")!==E&&(d.src=E),u(b,d)},_onTileRemove:function(u){u.tile.onload=null},_getZoomForUrl:function(){var u=this._tileZoom,d=this.options.maxZoom,b=this.options.zoomReverse,E=this.options.zoomOffset;return b&&(u=d-u),u+E},_getSubdomain:function(u){var d=Math.abs(u.x+u.y)%this.options.subdomains.length;return this.options.subdomains[d]},_abortLoading:function(){var u,d;for(u in this._tiles)if(this._tiles[u].coords.z!==this._tileZoom&&(d=this._tiles[u].el,d.onload=h,d.onerror=h,!d.complete)){d.src=P;var b=this._tiles[u].coords;Bt(d),delete this._tiles[u],this.fire("tileabort",{tile:d,coords:b})}},_removeTile:function(u){var d=this._tiles[u];if(d)return d.el.setAttribute("src",P),yu.prototype._removeTile.call(this,u)},_tileReady:function(u,d,b){if(!(!this._map||b&&b.getAttribute("src")===P))return yu.prototype._tileReady.call(this,u,d,b)}});function WT(u,d){return new Cl(u,d)}var YT=Cl.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(u,d){this._url=u;var b=i({},this.defaultWmsParams);for(var E in d)E in this.options||(b[E]=d[E]);d=y(this,d);var M=d.detectRetina&&He.retina?2:1,$=this.getTileSize();b.width=$.x*M,b.height=$.y*M,this.wmsParams=b},onAdd:function(u){this._crs=this.options.crs||u.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var d=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[d]=this._crs.code,Cl.prototype.onAdd.call(this,u)},getTileUrl:function(u){var d=this._tileCoordsToNwSe(u),b=this._crs,E=ne(b.project(d[0]),b.project(d[1])),M=E.min,$=E.max,Q=(this._wmsVersion>=1.3&&this._crs===FT?[M.y,M.x,$.y,$.x]:[M.x,M.y,$.x,$.y]).join(","),fe=Cl.prototype.getTileUrl.call(this,u);return fe+x(this.wmsParams,fe,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+Q},setParams:function(u,d){return i(this.wmsParams,u),d||this.redraw(),this}});function KF(u,d){return new YT(u,d)}Cl.WMS=YT,WT.wms=KF;var ao=ci.extend({options:{padding:.1},initialize:function(u){y(this,u),l(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&Xe(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var u={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(u.zoomanim=this._onAnimZoom),u},_onAnimZoom:function(u){this._updateTransform(u.center,u.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(u,d){var b=this._map.getZoomScale(d,this._zoom),E=this._map.getSize().multiplyBy(.5+this.options.padding),M=this._map.project(this._center,d),$=E.multiplyBy(-b).add(M).subtract(this._map._getNewPixelOrigin(u,d));He.any3d?sa(this._container,$,b):ln(this._container,$)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var u in this._layers)this._layers[u]._reset()},_onZoomEnd:function(){for(var u in this._layers)this._layers[u]._project()},_updatePaths:function(){for(var u in this._layers)this._layers[u]._update()},_update:function(){var u=this.options.padding,d=this._map.getSize(),b=this._map.containerPointToLayerPoint(d.multiplyBy(-u)).round();this._bounds=new B(b,b.add(d.multiplyBy(1+u*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),qT=ao.extend({options:{tolerance:0},getEvents:function(){var u=ao.prototype.getEvents.call(this);return u.viewprereset=this._onViewPreReset,u},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){ao.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var u=this._container=document.createElement("canvas");Ze(u,"mousemove",this._onMouseMove,this),Ze(u,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Ze(u,"mouseout",this._handleMouseOut,this),u._leaflet_disable_events=!0,this._ctx=u.getContext("2d")},_destroyContainer:function(){Y(this._redrawRequest),delete this._ctx,Bt(this._container),St(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var u;this._redrawBounds=null;for(var d in this._layers)u=this._layers[d],u._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){ao.prototype._update.call(this);var u=this._bounds,d=this._container,b=u.getSize(),E=He.retina?2:1;ln(d,u.min),d.width=E*b.x,d.height=E*b.y,d.style.width=b.x+"px",d.style.height=b.y+"px",He.retina&&this._ctx.scale(2,2),this._ctx.translate(-u.min.x,-u.min.y),this.fire("update")}},_reset:function(){ao.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(u){this._updateDashArray(u),this._layers[l(u)]=u;var d=u._order={layer:u,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=d),this._drawLast=d,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(u){this._requestRedraw(u)},_removePath:function(u){var d=u._order,b=d.next,E=d.prev;b?b.prev=E:this._drawLast=E,E?E.next=b:this._drawFirst=b,delete u._order,delete this._layers[l(u)],this._requestRedraw(u)},_updatePath:function(u){this._extendRedrawBounds(u),u._project(),u._update(),this._requestRedraw(u)},_updateStyle:function(u){this._updateDashArray(u),this._requestRedraw(u)},_updateDashArray:function(u){if(typeof u.options.dashArray=="string"){var d=u.options.dashArray.split(/[, ]+/),b=[],E,M;for(M=0;M')}}catch{}return function(u){return document.createElement("<"+u+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),XF={_initContainer:function(){this._container=ft("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(ao.prototype._update.call(this),this.fire("update"))},_initPath:function(u){var d=u._container=_u("shape");Xe(d,"leaflet-vml-shape "+(this.options.className||"")),d.coordsize="1 1",u._path=_u("path"),d.appendChild(u._path),this._updateStyle(u),this._layers[l(u)]=u},_addPath:function(u){var d=u._container;this._container.appendChild(d),u.options.interactive&&u.addInteractiveTarget(d)},_removePath:function(u){var d=u._container;Bt(d),u.removeInteractiveTarget(d),delete this._layers[l(u)]},_updateStyle:function(u){var d=u._stroke,b=u._fill,E=u.options,M=u._container;M.stroked=!!E.stroke,M.filled=!!E.fill,E.stroke?(d||(d=u._stroke=_u("stroke")),M.appendChild(d),d.weight=E.weight+"px",d.color=E.color,d.opacity=E.opacity,E.dashArray?d.dashStyle=S(E.dashArray)?E.dashArray.join(" "):E.dashArray.replace(/( *, *)/g," "):d.dashStyle="",d.endcap=E.lineCap.replace("butt","flat"),d.joinstyle=E.lineJoin):d&&(M.removeChild(d),u._stroke=null),E.fill?(b||(b=u._fill=_u("fill")),M.appendChild(b),b.color=E.fillColor||E.color,b.opacity=E.fillOpacity):b&&(M.removeChild(b),u._fill=null)},_updateCircle:function(u){var d=u._point.round(),b=Math.round(u._radius),E=Math.round(u._radiusY||b);this._setPath(u,u._empty()?"M0 0":"AL "+d.x+","+d.y+" "+b+","+E+" 0,"+65535*360)},_setPath:function(u,d){u._path.v=d},_bringToFront:function(u){yl(u._container)},_bringToBack:function(u){_l(u._container)}},Dh=He.vml?_u:Le,bu=ao.extend({_initContainer:function(){this._container=Dh("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Dh("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){Bt(this._container),St(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){ao.prototype._update.call(this);var u=this._bounds,d=u.getSize(),b=this._container;(!this._svgSize||!this._svgSize.equals(d))&&(this._svgSize=d,b.setAttribute("width",d.x),b.setAttribute("height",d.y)),ln(b,u.min),b.setAttribute("viewBox",[u.min.x,u.min.y,d.x,d.y].join(" ")),this.fire("update")}},_initPath:function(u){var d=u._path=Dh("path");u.options.className&&Xe(d,u.options.className),u.options.interactive&&Xe(d,"leaflet-interactive"),this._updateStyle(u),this._layers[l(u)]=u},_addPath:function(u){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(u._path),u.addInteractiveTarget(u._path)},_removePath:function(u){Bt(u._path),u.removeInteractiveTarget(u._path),delete this._layers[l(u)]},_updatePath:function(u){u._project(),u._update()},_updateStyle:function(u){var d=u._path,b=u.options;d&&(b.stroke?(d.setAttribute("stroke",b.color),d.setAttribute("stroke-opacity",b.opacity),d.setAttribute("stroke-width",b.weight),d.setAttribute("stroke-linecap",b.lineCap),d.setAttribute("stroke-linejoin",b.lineJoin),b.dashArray?d.setAttribute("stroke-dasharray",b.dashArray):d.removeAttribute("stroke-dasharray"),b.dashOffset?d.setAttribute("stroke-dashoffset",b.dashOffset):d.removeAttribute("stroke-dashoffset")):d.setAttribute("stroke","none"),b.fill?(d.setAttribute("fill",b.fillColor||b.color),d.setAttribute("fill-opacity",b.fillOpacity),d.setAttribute("fill-rule",b.fillRule||"evenodd")):d.setAttribute("fill","none"))},_updatePoly:function(u,d){this._setPath(u,ue(u._parts,d))},_updateCircle:function(u){var d=u._point,b=Math.max(Math.round(u._radius),1),E=Math.max(Math.round(u._radiusY),1)||b,M="a"+b+","+E+" 0 1,0 ",$=u._empty()?"M0 0":"M"+(d.x-b)+","+d.y+M+b*2+",0 "+M+-b*2+",0 ";this._setPath(u,$)},_setPath:function(u,d){u._path.setAttribute("d",d)},_bringToFront:function(u){yl(u._path)},_bringToBack:function(u){_l(u._path)}});He.vml&&bu.include(XF);function ZT(u){return He.svg||He.vml?new bu(u):null}ot.include({getRenderer:function(u){var d=u.options.renderer||this._getPaneRenderer(u.options.pane)||this.options.renderer||this._renderer;return d||(d=this._renderer=this._createRenderer()),this.hasLayer(d)||this.addLayer(d),d},_getPaneRenderer:function(u){if(u==="overlayPane"||u===void 0)return!1;var d=this._paneRenderers[u];return d===void 0&&(d=this._createRenderer({pane:u}),this._paneRenderers[u]=d),d},_createRenderer:function(u){return this.options.preferCanvas&>(u)||ZT(u)}});var KT=xl.extend({initialize:function(u,d){xl.prototype.initialize.call(this,this._boundsToLatLngs(u),d)},setBounds:function(u){return this.setLatLngs(this._boundsToLatLngs(u))},_boundsToLatLngs:function(u){return u=q(u),[u.getSouthWest(),u.getNorthWest(),u.getNorthEast(),u.getSouthEast()]}});function QF(u,d){return new KT(u,d)}bu.create=Dh,bu.pointsToPath=ue,so.geometryToLayer=Oh,so.coordsToLatLng=e0,so.coordsToLatLngs=Ph,so.latLngToCoords=t0,so.latLngsToCoords=kh,so.getFeature=Sl,so.asFeature=Mh,ot.mergeOptions({boxZoom:!0});var XT=Li.extend({initialize:function(u){this._map=u,this._container=u._container,this._pane=u._panes.overlayPane,this._resetStateTimeout=0,u.on("unload",this._destroy,this)},addHooks:function(){Ze(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){St(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){Bt(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(u){if(!u.shiftKey||u.which!==1&&u.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),fu(),F_(),this._startPoint=this._map.mouseEventToContainerPoint(u),Ze(document,{contextmenu:ca,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(u){this._moved||(this._moved=!0,this._box=ft("div","leaflet-zoom-box",this._container),Xe(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(u);var d=new B(this._point,this._startPoint),b=d.getSize();ln(this._box,d.min),this._box.style.width=b.x+"px",this._box.style.height=b.y+"px"},_finish:function(){this._moved&&(Bt(this._box),Jt(this._container,"leaflet-crosshair")),du(),$_(),St(document,{contextmenu:ca,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(u){if(!(u.which!==1&&u.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(s(this._resetState,this),0);var d=new H(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(d).fire("boxzoomend",{boxZoomBounds:d})}},_onKeyDown:function(u){u.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});ot.addInitHook("addHandler","boxZoom",XT),ot.mergeOptions({doubleClickZoom:!0});var QT=Li.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(u){var d=this._map,b=d.getZoom(),E=d.options.zoomDelta,M=u.originalEvent.shiftKey?b-E:b+E;d.options.doubleClickZoom==="center"?d.setZoom(M):d.setZoomAround(u.containerPoint,M)}});ot.addInitHook("addHandler","doubleClickZoom",QT),ot.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var JT=Li.extend({addHooks:function(){if(!this._draggable){var u=this._map;this._draggable=new Ho(u._mapPane,u._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),u.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),u.on("zoomend",this._onZoomEnd,this),u.whenReady(this._onZoomEnd,this))}Xe(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Jt(this._map._container,"leaflet-grab"),Jt(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var u=this._map;if(u._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var d=q(this._map.options.maxBounds);this._offsetLimit=ne(this._map.latLngToContainerPoint(d.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(d.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;u.fire("movestart").fire("dragstart"),u.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(u){if(this._map.options.inertia){var d=this._lastTime=+new Date,b=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(b),this._times.push(d),this._prunePositions(d)}this._map.fire("move",u).fire("drag",u)},_prunePositions:function(u){for(;this._positions.length>1&&u-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var u=this._map.getSize().divideBy(2),d=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=d.subtract(u).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(u,d){return u-(u-d)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var u=this._draggable._newPos.subtract(this._draggable._startPos),d=this._offsetLimit;u.xd.max.x&&(u.x=this._viscousLimit(u.x,d.max.x)),u.y>d.max.y&&(u.y=this._viscousLimit(u.y,d.max.y)),this._draggable._newPos=this._draggable._startPos.add(u)}},_onPreDragWrap:function(){var u=this._worldWidth,d=Math.round(u/2),b=this._initialWorldOffset,E=this._draggable._newPos.x,M=(E-d+b)%u+d-b,$=(E+d+b)%u-d-b,Q=Math.abs(M+b)0?$:-$))-d;this._delta=0,this._startTime=null,Q&&(u.options.scrollWheelZoom==="center"?u.setZoom(d+Q):u.setZoomAround(this._lastMousePos,d+Q))}});ot.addInitHook("addHandler","scrollWheelZoom",tO);var JF=600;ot.mergeOptions({tapHold:He.touchNative&&He.safari&&He.mobile,tapTolerance:15});var nO=Li.extend({addHooks:function(){Ze(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){St(this._map._container,"touchstart",this._onDown,this)},_onDown:function(u){if(clearTimeout(this._holdTimeout),u.touches.length===1){var d=u.touches[0];this._startPos=this._newPos=new G(d.clientX,d.clientY),this._holdTimeout=setTimeout(s(function(){this._cancel(),this._isTapValid()&&(Ze(document,"touchend",In),Ze(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",d))},this),JF),Ze(document,"touchend touchcancel contextmenu",this._cancel,this),Ze(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function u(){St(document,"touchend",In),St(document,"touchend touchcancel",u)},_cancel:function(){clearTimeout(this._holdTimeout),St(document,"touchend touchcancel contextmenu",this._cancel,this),St(document,"touchmove",this._onMove,this)},_onMove:function(u){var d=u.touches[0];this._newPos=new G(d.clientX,d.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(u,d){var b=new MouseEvent(u,{bubbles:!0,cancelable:!0,view:window,screenX:d.screenX,screenY:d.screenY,clientX:d.clientX,clientY:d.clientY});b._simulated=!0,d.target.dispatchEvent(b)}});ot.addInitHook("addHandler","tapHold",nO),ot.mergeOptions({touchZoom:He.touch,bounceAtZoomLimits:!0});var rO=Li.extend({addHooks:function(){Xe(this._map._container,"leaflet-touch-zoom"),Ze(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Jt(this._map._container,"leaflet-touch-zoom"),St(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(u){var d=this._map;if(!(!u.touches||u.touches.length!==2||d._animatingZoom||this._zooming)){var b=d.mouseEventToContainerPoint(u.touches[0]),E=d.mouseEventToContainerPoint(u.touches[1]);this._centerPoint=d.getSize()._divideBy(2),this._startLatLng=d.containerPointToLatLng(this._centerPoint),d.options.touchZoom!=="center"&&(this._pinchStartLatLng=d.containerPointToLatLng(b.add(E)._divideBy(2))),this._startDist=b.distanceTo(E),this._startZoom=d.getZoom(),this._moved=!1,this._zooming=!0,d._stop(),Ze(document,"touchmove",this._onTouchMove,this),Ze(document,"touchend touchcancel",this._onTouchEnd,this),In(u)}},_onTouchMove:function(u){if(!(!u.touches||u.touches.length!==2||!this._zooming)){var d=this._map,b=d.mouseEventToContainerPoint(u.touches[0]),E=d.mouseEventToContainerPoint(u.touches[1]),M=b.distanceTo(E)/this._startDist;if(this._zoom=d.getScaleZoom(M,this._startZoom),!d.options.bounceAtZoomLimits&&(this._zoomd.getMaxZoom()&&M>1)&&(this._zoom=d._limitZoom(this._zoom)),d.options.touchZoom==="center"){if(this._center=this._startLatLng,M===1)return}else{var $=b._add(E)._divideBy(2)._subtract(this._centerPoint);if(M===1&&$.x===0&&$.y===0)return;this._center=d.unproject(d.project(this._pinchStartLatLng,this._zoom).subtract($),this._zoom)}this._moved||(d._moveStart(!0,!1),this._moved=!0),Y(this._animRequest);var Q=s(d._move,d,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=W(Q,this,!0),In(u)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,Y(this._animRequest),St(document,"touchmove",this._onTouchMove,this),St(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});ot.addInitHook("addHandler","touchZoom",rO),ot.BoxZoom=XT,ot.DoubleClickZoom=QT,ot.Drag=JT,ot.Keyboard=eO,ot.ScrollWheelZoom=tO,ot.TapHold=nO,ot.TouchZoom=rO,n.Bounds=B,n.Browser=He,n.CRS=pe,n.Canvas=qT,n.Circle=J_,n.CircleMarker=Th,n.Class=Z,n.Control=li,n.DivIcon=HT,n.DivOverlay=Di,n.DomEvent=vF,n.DomUtil=mF,n.Draggable=Ho,n.Evented=oe,n.FeatureGroup=io,n.GeoJSON=so,n.GridLayer=yu,n.Handler=Li,n.Icon=wl,n.ImageOverlay=Rh,n.LatLng=te,n.LatLngBounds=H,n.Layer=ci,n.LayerGroup=bl,n.LineUtil=kF,n.Map=ot,n.Marker=Eh,n.Mixin=CF,n.Path=Wo,n.Point=G,n.PolyUtil=MF,n.Polygon=xl,n.Polyline=oo,n.Popup=Nh,n.PosAnimation=TT,n.Projection=RF,n.Rectangle=KT,n.Renderer=ao,n.SVG=bu,n.SVGOverlay=VT,n.TileLayer=Cl,n.Tooltip=Lh,n.Transformation=X,n.Util=J,n.VideoOverlay=UT,n.bind=s,n.bounds=ne,n.canvas=GT,n.circle=$F,n.circleMarker=FF,n.control=mu,n.divIcon=GF,n.extend=i,n.featureGroup=AF,n.geoJSON=zT,n.geoJson=UF,n.gridLayer=ZF,n.icon=jF,n.imageOverlay=VF,n.latLng=se,n.latLngBounds=q,n.layerGroup=DF,n.map=yF,n.marker=IF,n.point=j,n.polygon=zF,n.polyline=BF,n.popup=YF,n.rectangle=QF,n.setOptions=y,n.stamp=l,n.svg=ZT,n.svgOverlay=WF,n.tileLayer=WT,n.tooltip=qF,n.transformation=K,n.version=r,n.videoOverlay=HF;var e$=window.L;n.noConflict=function(){return window.L=e$,this},window.L=n})})(F0e,Ws);const PL=Ws;function lT(e,t,n){return Object.freeze({instance:e,context:t,container:n})}function cT(e,t){return t==null?function(r,i){const o=V.useRef();return o.current||(o.current=e(r,i)),o}:function(r,i){const o=V.useRef();o.current||(o.current=e(r,i));const s=V.useRef(r),{instance:a}=o.current;return V.useEffect(function(){s.current!==r&&(t(a,r,s.current),s.current=r)},[a,r,i]),o}}function $0e(e,t){V.useEffect(function(){return(t.layerContainer??t.map).addLayer(e.instance),function(){var o;(o=t.layerContainer)==null||o.removeLayer(e.instance),t.map.removeLayer(e.instance)}},[t,e])}function H8(e){return function(n){const r=U8(),i=e(aT(n,r),r);return $8(r.map,n.attribution),V8(i.current,n.eventHandlers),$0e(i.current,r),i}}function B0e(e,t){const n=cT(e,t),r=H8(n);return D0e(r)}function z0e(e,t){const n=cT(e),r=I0e(n,t);return A0e(r)}function U0e(e,t){const n=cT(e,t),r=H8(n);return j0e(r)}function V0e(e,t,n){const{opacity:r,zIndex:i}=t;r!=null&&r!==n.opacity&&e.setOpacity(r),i!=null&&i!==n.zIndex&&e.setZIndex(i)}function C2(){return C2=Object.assign||function(e){for(var t=1;t(m==null?void 0:m.map)??null,[m]);const y=V.useCallback(_=>{if(_!==null&&m===null){const w=new Ws.Map(_,f);n!=null&&c!=null?w.setView(n,c):e!=null&&w.fitBounds(e,t),l!=null&&w.whenReady(l),v(N0e(w))}},[]);V.useEffect(()=>()=>{m==null||m.map.remove()},[m]);const x=m?U.createElement(z8,{value:m},r):s??null;return U.createElement("div",C2({},p,{ref:y}),x)}const W0e=V.forwardRef(H0e),Y0e=B0e(function({position:t,...n},r){const i=new Ws.Marker(t,n);return lT(i,L0e(r,{overlayContainer:i}))},function(t,n,r){n.position!==r.position&&t.setLatLng(n.position),n.icon!=null&&n.icon!==r.icon&&t.setIcon(n.icon),n.zIndexOffset!=null&&n.zIndexOffset!==r.zIndexOffset&&t.setZIndexOffset(n.zIndexOffset),n.opacity!=null&&n.opacity!==r.opacity&&t.setOpacity(n.opacity),t.dragging!=null&&n.draggable!==r.draggable&&(n.draggable===!0?t.dragging.enable():t.dragging.disable())}),q0e=z0e(function(t,n){const r=new Ws.Popup(t,n.overlayContainer);return lT(r,n)},function(t,n,{position:r},i){V.useEffect(function(){const{instance:s}=t;function a(c){c.popup===s&&(s.update(),i(!0))}function l(c){c.popup===s&&i(!1)}return n.map.on({popupopen:a,popupclose:l}),n.overlayContainer==null?(r!=null&&s.setLatLng(r),s.openOn(n.map)):n.overlayContainer.bindPopup(s),function(){var f;n.map.off({popupopen:a,popupclose:l}),(f=n.overlayContainer)==null||f.unbindPopup(),n.map.removeLayer(s)}},[t,n,i,r])}),G0e=U0e(function({url:t,...n},r){const i=new Ws.TileLayer(t,aT(n,r));return lT(i,r)},function(t,n,r){V0e(t,n,r);const{url:i}=n;i!=null&&i!==r.url&&t.setUrl(i)});const Z0e=()=>g.jsx(G0e,{attribution:'© OpenStreetMap contributors',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),K0e=e=>{if(e.length===0)return{};if(e.length>1)return{bounds:e.map(at("latLong"))};const[{latLong:t}]=e;return{zoom:10,center:t}},W8=({toggle:e,isOpen:t,title:n,locations:r=[]})=>g.jsx(Uo,{toggle:e,isOpen:t,className:"map-modal__modal",contentClassName:"map-modal__modal-content",children:g.jsxs(ki,{className:"map-modal__modal-body",children:[g.jsxs("h3",{className:"map-modal__modal-title",children:[n,g.jsx("button",{type:"button",className:"btn-close float-end","aria-label":"Close",onClick:e})]}),g.jsxs(W0e,{...K0e(r),children:[g.jsx(Z0e,{}),r.map(({cityName:i,latLong:o,count:s},a)=>g.jsx(Y0e,{position:o,children:g.jsxs(q0e,{children:[g.jsx("b",{children:s})," visit",s>1?"s":""," from ",g.jsx("b",{children:i})]})},a))]})]})});const X0e=({modalTitle:e,activeCities:t,locations:n=[]})=>{const[r,,i,o]=It(),[s,a,l]=It(),[c,f]=V.useState([]),h=b_(),p=y=>t?y.filter(({cityName:x})=>t==null?void 0:t.includes(x)):y,m=()=>{if(!t){f(n),i();return}l()},v=y=>()=>{f(y?p(n):n),i()};return g.jsxs(g.Fragment,{children:[g.jsx(ht,{color:"link",className:"open-map-modal-btn__btn",id:h,onClick:m,children:g.jsx(je,{icon:Gj})}),g.jsx(Er,{placement:"left",target:h,children:"Show in map"}),g.jsx(tu,{isOpen:s,toggle:a,inNavbar:!0,children:g.jsxs(hl,{end:!0,children:[g.jsx(Ue,{onClick:v(!1),children:"Show all locations"}),g.jsx(Ue,{onClick:v(!0),children:"Show locations in current page"})]})}),g.jsx(W8,{toggle:o,isOpen:r,title:e,locations:c})]})},Q0e=({onChange:e,selected:t={},className:n,isOrphanVisits:r})=>{const{orphanVisitsType:i,excludeBots:o=!1}=t,s=l=>({active:i===l,onClick:()=>e({...t,orphanVisitsType:l===(t==null?void 0:t.orphanVisitsType)?void 0:l})}),a=()=>e({...t,excludeBots:!(t!=null&&t.excludeBots)});return g.jsxs(na,{text:"Filters",dropdownClassName:n,className:"me-3",right:!0,minWidth:250,children:[g.jsx(Ue,{header:!0,children:"Bots:"}),g.jsx(Ue,{active:o,onClick:a,children:"Exclude potential bots"}),r&&g.jsxs(g.Fragment,{children:[g.jsx(Ue,{divider:!0}),g.jsx(Ue,{header:!0,children:"Orphan visits type:"}),g.jsx(Ue,{...s("base_url"),children:"Base URL"}),g.jsx(Ue,{...s("invalid_short_url"),children:"Invalid short URL"}),g.jsx(Ue,{...s("regular_404"),children:"Regular 404"})]}),g.jsx(Ue,{divider:!0}),g.jsx(Ue,{disabled:!gi(t),onClick:()=>e({excludeBots:!1,orphanVisitsType:void 0}),children:g.jsx("i",{children:"Clear filters"})})]})},Y8=(e,t)=>!Fo(e)&&gi(e[t]),kL=e=>typeof e=="number"?e:e?parseFloat(e):0,J0e=(e,{os:t})=>{e[t]=(e[t]||0)+1},e1e=(e,{browser:t})=>{e[t]=(e[t]||0)+1},t1e=(e,{referer:t})=>{e[t]=(e[t]||0)+1},q8=e=>(t,n)=>{const i=Y8(n,e)?n[e]:"Unknown";t[i]=(t[i]||0)+1},n1e=q8("country"),r1e=q8("city"),i1e=(e,t)=>{if(!Y8(t,"city")||t.city==="Unknown")return;const{city:n,latitude:r,longitude:i}=t,o=e[n]||{cityName:n,count:0,latLong:[kL(r),kL(i)]};o.count+=1,e[n]=o},o1e=(e,t)=>{if(!H_e(t))return;const{visitedUrl:n}=t;e[n]=(e[n]||0)+1},G8=e=>e.reduce((t,n)=>(J0e(t.os,n),e1e(t.browsers,n),t1e(t.referrers,n),n1e(t.countries,n),r1e(t.cities,n),i1e(t.citiesForMap,n),o1e(t.visitedUrls,n),t),{os:{},browsers:{},referrers:{},countries:{},cities:{},citiesForMap:{},visitedUrls:{}}),Z8=zd(e=>{const{userAgent:t,date:n,referer:r,visitLocation:i,potentialBot:o}=e,s={date:n,potentialBot:o,...f0e(t),referer:d0e(r),country:(i==null?void 0:i.countryName)||"Unknown",city:(i==null?void 0:i.cityName)||"Unknown",latitude:i==null?void 0:i.latitude,longitude:i==null?void 0:i.longitude};return rT(e)?{...s,type:e.type,visitedUrl:e.visitedUrl}:s}),s1e=Object.freeze(Object.defineProperty({__proto__:null,normalizeVisits:Z8,processStatsFromVisits:G8},Symbol.toStringTag,{value:"Module"}));const nf=20,a1e=({browser:e,os:t,referer:n,country:r,city:i,...o},s)=>`${e} ${t} ${n} ${r} ${i} ${o.visitedUrl}`.toLowerCase().includes(s.toLowerCase()),l1e=(e,t)=>t.filter(n=>a1e(n,e)),c1e=(e,t)=>kj(t,e),u1e=(e,t,n)=>{const r=t?l1e(t,e):[...e],i=c1e(n,r),o=i.length;return{visitsGroups:cd(nf,i),total:o}},f1e=({visits:e,selectedVisits:t=[],setSelectedVisits:n,matchMedia:r=window.matchMedia,isOrphanVisits:i=!1})=>{var k,N;const o="visits-table__header-cell visits-table__sticky",s=()=>r("(max-width: 767px)").matches,[a,l]=V.useState(s()),[c,f]=V.useState(void 0),[h,p]=V.useState({}),m=V.useMemo(()=>u1e(e,c,h),[c,h]),v=V.useRef(!0),[y,x]=V.useState(1),_=y*nf,w=_-nf,S=8+Number(i),T=D=>()=>p({field:D,dir:n_(D,h.field,h.dir)}),P=D=>g.jsx(Lf,{currentOrder:h,field:D,className:"visits-table__header-icon"});return V.useEffect(()=>{const D=()=>l(s());return window.addEventListener("resize",D),()=>window.removeEventListener("resize",D)},[]),V.useEffect(()=>{x(1),!v.current&&n([]),v.current=!1},[c]),g.jsx("div",{className:"table-responsive-md",children:g.jsxs("table",{className:"table table-bordered table-hover table-sm visits-table",children:[g.jsxs("thead",{className:"visits-table__header",children:[g.jsxs("tr",{children:[g.jsx("th",{className:`${o} text-center`,onClick:()=>n(t.length0})})}),g.jsxs("th",{className:`${o} text-center`,onClick:T("potentialBot"),children:[g.jsx(je,{icon:CM}),P("potentialBot")]}),g.jsxs("th",{className:o,onClick:T("date"),children:["Date",P("date")]}),g.jsxs("th",{className:o,onClick:T("country"),children:["Country",P("country")]}),g.jsxs("th",{className:o,onClick:T("city"),children:["City",P("city")]}),g.jsxs("th",{className:o,onClick:T("browser"),children:["Browser",P("browser")]}),g.jsxs("th",{className:o,onClick:T("os"),children:["OS",P("os")]}),g.jsxs("th",{className:o,onClick:T("referer"),children:["Referrer",P("referer")]}),i&&g.jsxs("th",{className:o,onClick:T("visitedUrl"),children:["Visited URL",P("visitedUrl")]})]}),g.jsx("tr",{children:g.jsx("td",{colSpan:S,className:"p-0",children:g.jsx(ih,{noBorder:!0,large:!1,onChange:f})})})]}),g.jsxs("tbody",{children:[!((k=m.visitsGroups[y-1])!=null&&k.length)&&g.jsx("tr",{children:g.jsx("td",{colSpan:S,className:"text-center",children:"No visits found with current filtering"})}),(N=m.visitsGroups[y-1])==null?void 0:N.map((D,z)=>{const A=t.includes(D);return g.jsxs("tr",{style:{cursor:"pointer"},className:me({"table-active":A}),onClick:()=>n(A?t.filter(W=>W!==D):[...t,D]),children:[g.jsx("td",{className:"text-center",children:A&&g.jsx(je,{icon:fd,className:"text-primary"})}),g.jsx("td",{className:"text-center",children:D.potentialBot&&g.jsxs(g.Fragment,{children:[g.jsx(je,{icon:CM,id:`botIcon${z}`}),g.jsx(Er,{placement:"right",target:`botIcon${z}`,children:"Potentially a visit from a bot or crawler"})]})}),g.jsx("td",{children:g.jsx(ry,{date:D.date})}),g.jsx("td",{children:D.country}),g.jsx("td",{children:D.city}),g.jsx("td",{children:D.browser}),g.jsx("td",{children:D.os}),g.jsx("td",{children:D.referer}),i&&g.jsx("td",{children:D.visitedUrl})]},z)})]}),m.total>nf&&g.jsx("tfoot",{children:g.jsx("tr",{children:g.jsx("td",{colSpan:S,className:"visits-table__footer-cell visits-table__sticky",children:g.jsxs("div",{className:"row",children:[g.jsx("div",{className:"col-md-6",children:g.jsx(XE,{pagesCount:Math.ceil(m.total/nf),currentPage:y,setCurrentPage:x,centered:a})}),g.jsx("div",{className:me("col-md-6",{"d-flex align-items-center flex-row-reverse":!a,"text-center mt-3":a}),children:g.jsxs("div",{children:["Visits ",g.jsx("b",{children:_n(w+1)})," to"," ",g.jsx("b",{children:_n(Tj(_,m.total))})," of"," ",g.jsx("b",{children:_n(m.total)})]})})]})})})})]})})},Fl={byTime:{title:"By time",subPath:"by-time",icon:BX},byContext:{title:"By context",subPath:"by-context",icon:mC},byLocation:{title:"By location",subPath:"by-location",icon:Gj},list:{title:"List",subPath:"list",icon:qj}};let Fp;const ph=({children:e,visitsInfo:t,getVisits:n,cancelGetVisits:r,settings:i,exportCsv:o,isOrphanVisits:s=!1})=>{var H;const{visits:a,loading:l,loadingLarge:c,error:f,errorData:h,progress:p,fallbackInterval:m}=t,[{dateRange:v,visitsFilter:y},x]=M0e(),_=Dt(({startDate:q,endDate:te})=>({dateRange:{startDate:q??void 0,endDate:te??void 0}}),x),w=V.useRef(v??m??((H=i.visits)==null?void 0:H.defaultInterval)??"last30Days"),[S,T]=V.useState([]),[P,k]=V.useState(),N=V.useRef(!0),{search:D}=Pn(),z=q=>q?`${q}${D}`:D,A=V.useMemo(()=>Z8(a),[a]),{os:W,browsers:Y,referrers:J,countries:Z,cities:ee,citiesForMap:ie,visitedUrls:oe}=V.useMemo(()=>G8(A),[A]),G=V.useMemo(()=>{var q;return{...y,excludeBots:y.excludeBots??((q=i.visits)==null?void 0:q.excludeBots)}},[y]),F=Qc(ie),j=q=>{Fp=void 0,T(q)},B=q=>te=>{const se=`${q}_${te}`;Fp===se?(T([]),k(void 0),Fp=void 0):(T(A.filter(mZ(q,te))),k(te),Fp=se)};V.useEffect(()=>r,[]),V.useEffect(()=>{const q=N.current?v??Zhe(w.current):v;n({dateRange:q,filter:G},N.current),N.current=!1},[v,y]),V.useEffect(()=>{var q;m&&w.current===(((q=i.visits)==null?void 0:q.defaultInterval)??"last30Days")&&(w.current=m)},[m]);const ne=()=>c?g.jsxs(So,{loading:!0,children:["This is going to take a while... :S",g.jsx(tE,{value:p,striped:p===100,className:"mt-3"})]}):l?g.jsx(So,{loading:!0}):f?g.jsx(Nr,{type:"error",children:g.jsx(Lo,{errorData:h,fallbackMessage:"An error occurred while loading visits :("})}):Wn(a)?g.jsx(So,{children:"There are no visits matching current filter"}):g.jsxs(g.Fragment,{children:[g.jsx(D5,{fill:!0,children:Object.values(Fl).map(({title:q,icon:te,subPath:se},pe)=>g.jsxs(Rf,{to:z(se),replace:!0,children:[g.jsx(je,{icon:te}),g.jsx("span",{className:"ms-2 d-none d-sm-inline",children:q})]},pe))}),g.jsx(Qn,{children:g.jsxs(Xy,{children:[g.jsx(gt,{path:Fl.byTime.subPath,element:g.jsx("div",{className:"col-12 mt-3",children:g.jsx(b0e,{title:"Visits during time",visits:A,highlightedVisits:S,highlightedLabel:P,setSelectedVisits:j})})}),g.jsx(gt,{path:Fl.byContext.subPath,element:g.jsxs(g.Fragment,{children:[g.jsx("div",{className:me("mt-3 col-lg-6",{"col-xl-4":!s}),children:g.jsx(wL,{title:"Operating systems",stats:W})}),g.jsx("div",{className:me("mt-3 col-lg-6",{"col-xl-4":!s}),children:g.jsx(wL,{title:"Browsers",stats:Y})}),g.jsx("div",{className:me("mt-3",{"col-xl-4":!s,"col-lg-6":s}),children:g.jsx(Ip,{title:"Referrers",stats:J,withPagination:!1,highlightedStats:Ap(S,"referer"),highlightedLabel:P,sortingItems:{name:"Referrer name",amount:"Visits amount"},onClick:B("referer")})}),s&&g.jsx("div",{className:"mt-3 col-lg-6",children:g.jsx(Ip,{title:"Visited URLs",stats:oe,highlightedLabel:P,highlightedStats:Ap(S,"visitedUrl"),sortingItems:{visitedUrl:"Visited URL",amount:"Visits amount"},onClick:B("visitedUrl")})})]})}),g.jsx(gt,{path:Fl.byLocation.subPath,element:g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"col-lg-6 mt-3",children:g.jsx(Ip,{title:"Countries",stats:Z,highlightedStats:Ap(S,"country"),highlightedLabel:P,sortingItems:{name:"Country name",amount:"Visits amount"},onClick:B("country")})}),g.jsx("div",{className:"col-lg-6 mt-3",children:g.jsx(Ip,{title:"Cities",stats:ee,highlightedStats:Ap(S,"city"),highlightedLabel:P,extraHeaderContent:q=>F.length>0&&g.jsx(X0e,{modalTitle:"Cities",locations:F,activeCities:q}),sortingItems:{name:"City name",amount:"Visits amount"},onClick:B("city")})})]})}),g.jsx(gt,{path:Fl.list.subPath,element:g.jsx("div",{className:"col-12",children:g.jsx(f1e,{visits:A,selectedVisits:S,setSelectedVisits:j,isOrphanVisits:s})})}),g.jsx(gt,{path:"*",element:g.jsx(WS,{replace:!0,to:z(Fl.byTime.subPath)})})]})})]});return g.jsxs(g.Fragment,{children:[e,g.jsx("section",{className:"mt-3",children:g.jsxs("div",{className:"row flex-md-row-reverse",children:[g.jsx("div",{className:"col-lg-7 col-xl-6",children:g.jsxs("div",{className:"d-md-flex",children:[g.jsx("div",{className:"flex-fill",children:g.jsx(l8,{updatable:!0,disabled:l,initialDateRange:w.current,defaultText:"All visits",onDatesChange:_})}),g.jsx(Q0e,{className:"ms-0 ms-md-2 mt-3 mt-md-0",isOrphanVisits:s,selected:G,onChange:q=>x({visitsFilter:q})})]})}),a.length>0&&g.jsx("div",{className:"col-lg-5 col-xl-6 mt-3 mt-lg-0",children:g.jsxs("div",{className:"d-flex",children:[g.jsx(U5,{className:"btn-md-block",amount:A.length,onClick:()=>o(A)}),g.jsxs(ht,{outline:!0,disabled:S.length===0,className:"btn-md-block ms-2",onClick:()=>j([]),children:["Clear selection ",S.length>0&&g.jsxs(g.Fragment,{children:["(",_n(S.length),")"]})]})]})})]})}),g.jsx("section",{className:"mt-3",children:ne()})]})},d1e=({exportVisits:e})=>ra(({getDomainVisits:t,domainVisits:n,cancelGetDomainVisits:r,settings:i})=>{const o=ta(),{domain:s=""}=Ks(),[a,l=a]=s.split("_"),c=(h,p)=>t({domain:l,query:dh(h),doIntervalFallback:p}),f=h=>e(`domain_${a}_visits.csv`,h);return g.jsx(ph,{getVisits:c,cancelGetVisits:r,visitsInfo:n,settings:i,exportCsv:f,children:g.jsx(hh,{goBack:o,visits:n.visits,title:`"${a}" visits`})})},()=>[Xr.visits]),h1e=({exportVisits:e})=>ra(({getNonOrphanVisits:t,nonOrphanVisits:n,cancelGetNonOrphanVisits:r,settings:i})=>{const o=ta(),s=l=>e("non_orphan_visits.csv",l),a=(l,c)=>t({query:dh(l),doIntervalFallback:c});return g.jsx(ph,{getVisits:a,cancelGetVisits:r,visitsInfo:n,settings:i,exportCsv:s,children:g.jsx(hh,{title:"Non-orphan visits",goBack:o,visits:n.visits})})},()=>[Xr.visits]),p1e=({exportVisits:e})=>ra(({getOrphanVisits:t,orphanVisits:n,cancelGetOrphanVisits:r,settings:i})=>{const o=ta(),s=l=>e("orphan_visits.csv",l),a=(l,c)=>{var f;return t({query:dh(l),orphanVisitsType:(f=l.filter)==null?void 0:f.orphanVisitsType,doIntervalFallback:c})};return g.jsx(ph,{getVisits:a,cancelGetVisits:r,visitsInfo:n,settings:i,exportCsv:s,isOrphanVisits:!0,children:g.jsx(hh,{title:"Orphan visits",goBack:o,visits:n.visits})})},()=>[Xr.orphanVisits]),K8="shlink/orphanVisits",m1e={visits:[],loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},g1e=e=>lh({typePrefix:`${K8}/getNonOrphanVisits`,createLoaders:({query:t={},doIntervalFallback:n=!1},r)=>{const{getNonOrphanVisits:i}=e(r),o=async(a,l)=>i({...t,page:a,itemsPerPage:l}),s=ch(n,i);return[o,s]},getExtraFulfilledPayload:({query:t={}})=>({query:t}),shouldCancel:t=>t().orphanVisits.cancelLoad}),v1e=e=>uh({name:K8,initialState:m1e,asyncThunkCreator:e,filterCreatedVisits:({query:t={}},n)=>{const{startDate:r,endDate:i}=t;return n.filter(({visit:o})=>oh(o.date,r,i))}}),X8="shlink/orphanVisits",y1e={visits:[],loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},_1e=(e,t)=>!t||t===e.type,b1e=e=>lh({typePrefix:`${X8}/getOrphanVisits`,createLoaders:({orphanVisitsType:t,query:n={},doIntervalFallback:r=!1},i)=>{const{getOrphanVisits:o}=e(i),s=async(l,c)=>o({...n,page:l,itemsPerPage:c}).then(f=>{const h=f.data.filter(p=>rT(p)&&_1e(p,t));return{...f,data:h}}),a=ch(r,o);return[s,a]},getExtraFulfilledPayload:({query:t={}})=>({query:t}),shouldCancel:t=>t().orphanVisits.cancelLoad}),w1e=e=>uh({name:X8,initialState:y1e,asyncThunkCreator:e,filterCreatedVisits:({query:t={}},n)=>{const{startDate:r,endDate:i}=t;return n.filter(({visit:o,shortUrl:s})=>!s&&oh(o.date,r,i))}}),Q8="shlink/shortUrlVisits",x1e={visits:[],shortCode:"",domain:void 0,loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},S1e=e=>lh({typePrefix:`${Q8}/getShortUrlVisits`,createLoaders:({shortCode:t,query:n={},doIntervalFallback:r=!1},i)=>{const{getShortUrlVisits:o}=e(i),s=async(l,c)=>o(t,{...n,page:l,itemsPerPage:c}),a=ch(r,async l=>o(t,{...l,domain:n.domain}));return[s,a]},getExtraFulfilledPayload:({shortCode:t,query:n={}})=>({shortCode:t,query:n,domain:n.domain}),shouldCancel:t=>t().shortUrlVisits.cancelLoad}),C1e=e=>uh({name:Q8,initialState:x1e,asyncThunkCreator:e,filterCreatedVisits:({shortCode:t,domain:n,query:r={}},i)=>{const{startDate:o,endDate:s}=r;return i.filter(({shortUrl:a,visit:l})=>a&&Of(a,t,n)&&oh(l.date,o,s))}}),J8="shlink/tagVisits",E1e={visits:[],tag:"",loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},T1e=e=>lh({typePrefix:`${J8}/getTagVisits`,createLoaders:({tag:t,query:n={},doIntervalFallback:r=!1},i)=>{const{getTagVisits:o}=e(i),s=async(l,c)=>o(t,{...n,page:l,itemsPerPage:c}),a=ch(r,async l=>o(t,l));return[s,a]},getExtraFulfilledPayload:({tag:t,query:n={}})=>({tag:t,query:n}),shouldCancel:t=>t().tagVisits.cancelLoad}),O1e=e=>uh({name:J8,initialState:E1e,asyncThunkCreator:e,filterCreatedVisits:({tag:t,query:n={}},r)=>{const{startDate:i,endDate:o}=n;return r.filter(({shortUrl:s,visit:a})=>(s==null?void 0:s.tags.includes(t))&&oh(a.date,i,o))}}),eF="shlink/visitsOverview",$p={nonOrphanVisits:{total:0},orphanVisits:{total:0},loading:!1,error:!1},ML=e=>e.filter(({visit:t})=>t.potentialBot).length,P1e=e=>rr(`${eF}/loadVisitsOverview`,(t,{getState:n})=>e(n).getVisitsOverview().then(r=>{var i,o,s,a,l,c;return{nonOrphanVisits:{total:((i=r.nonOrphanVisits)==null?void 0:i.total)??r.visitsCount,nonBots:(o=r.nonOrphanVisits)==null?void 0:o.nonBots,bots:(s=r.nonOrphanVisits)==null?void 0:s.bots},orphanVisits:{total:((a=r.orphanVisits)==null?void 0:a.total)??r.orphanVisitsCount,nonBots:(l=r.orphanVisits)==null?void 0:l.nonBots,bots:(c=r.orphanVisits)==null?void 0:c.bots}}})),k1e=e=>Yn({name:eF,initialState:$p,reducers:{},extraReducers:t=>{t.addCase(e.pending,()=>({...$p,loading:!0})),t.addCase(e.rejected,()=>({...$p,error:!0})),t.addCase(e.fulfilled,(n,{payload:r})=>({...$p,...r})),t.addCase(ah,({nonOrphanVisits:n,orphanVisits:r,...i},{payload:o})=>{const{nonOrphanVisits:s,orphanVisits:a}=W_e(o.createdVisits),l=s.length,c=ML(s),f=l-c,h=a.length,p=ML(a),m=h-p;return{...i,nonOrphanVisits:{total:n.total+l,bots:n.bots&&n.bots+c,nonBots:n.nonBots&&n.nonBots+f},orphanVisits:{total:r.total+h,bots:r.bots&&r.bots+p,nonBots:r.nonBots&&r.nonBots+m}}})}});const M1e=({shortUrlDetail:e,shortUrlVisits:t,goBack:n})=>{const{shortUrl:r,loading:i}=e,{visits:o}=t,s=(r==null?void 0:r.shortUrl)??"",a=(r==null?void 0:r.longUrl)??"",l=r==null?void 0:r.title,c=()=>r?g.jsxs("span",{children:[g.jsx("b",{id:"created",className:"short-url-visits-header__created-at",children:g.jsx(ry,{date:r.dateCreated,relative:!0})}),g.jsx(Er,{placement:"bottom",target:"created",children:g.jsx(ry,{date:r.dateCreated})})]}):g.jsx("small",{children:"Loading..."}),f=g.jsxs(g.Fragment,{children:["Visits for ",g.jsx(Si,{href:s})]});return g.jsxs(hh,{title:f,goBack:n,visits:o,shortUrl:r,children:[g.jsx("hr",{}),g.jsxs("div",{children:["Created: ",c()]}),g.jsxs("div",{className:"long-url-container",children:[`${l?"Title":"Long URL"}: `,i&&g.jsx("small",{children:"Loading..."}),!i&&g.jsx(Si,{href:a,children:l??a})]})]})},R1e=({exportVisits:e})=>ra(({shortUrlVisits:t,shortUrlDetail:n,getShortUrlVisits:r,getShortUrlDetail:i,cancelGetShortUrlVisits:o,settings:s})=>{const{shortCode:a=""}=Ks(),{search:l}=Pn(),c=ta(),{domain:f}=dl(l),h=(m,v)=>r({shortCode:hm(a),query:{...dh(m),domain:f},doIntervalFallback:v}),p=m=>{var v;return e(`short-url_${(v=n.shortUrl)==null?void 0:v.shortUrl.replace(/https?:\/\//g,"")}_visits.csv`,m)};return V.useEffect(()=>{i({shortCode:hm(a),domain:f})},[]),g.jsx(ph,{getVisits:h,cancelGetVisits:o,visitsInfo:t,settings:s,exportCsv:p,children:g.jsx(M1e,{shortUrlDetail:n,shortUrlVisits:t,goBack:c})})},(t,n)=>n.shortCode?[Xr.shortUrlVisits(hm(n.shortCode))]:[]),N1e=({tagVisits:e,goBack:t,colorGenerator:n})=>{const{visits:r,tag:i}=e,o=g.jsxs("span",{className:"d-flex align-items-center justify-content-center",children:[g.jsx("span",{className:"me-2",children:"Visits for"}),g.jsx(VE,{text:i,colorGenerator:n})]});return g.jsx(hh,{title:o,goBack:t,visits:r})},L1e=(e,{exportVisits:t})=>ra(({getTagVisits:n,tagVisits:r,cancelGetTagVisits:i,settings:o})=>{const s=ta(),{tag:a=""}=Ks(),l=(f,h)=>n({tag:a,query:dh(f),doIntervalFallback:h}),c=f=>t(`tag_${a}_visits.csv`,f);return g.jsx(ph,{getVisits:l,cancelGetVisits:i,visitsInfo:r,settings:o,exportCsv:c,children:g.jsx(N1e,{tagVisits:r,goBack:s,colorGenerator:e})})},()=>[Xr.visits]),D1e=(e,t)=>{e.serviceFactory("MapModal",()=>W8),e.serviceFactory("ShortUrlVisits",R1e,"ReportExporter"),e.decorator("ShortUrlVisits",t(["shortUrlVisits","shortUrlDetail","mercureInfo","settings"],["getShortUrlVisits","getShortUrlDetail","cancelGetShortUrlVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("TagVisits",L1e,"ColorGenerator","ReportExporter"),e.decorator("TagVisits",t(["tagVisits","mercureInfo","settings"],["getTagVisits","cancelGetTagVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("DomainVisits",d1e,"ReportExporter"),e.decorator("DomainVisits",t(["domainVisits","mercureInfo","settings"],["getDomainVisits","cancelGetDomainVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("OrphanVisits",p1e,"ReportExporter"),e.decorator("OrphanVisits",t(["orphanVisits","mercureInfo","settings"],["getOrphanVisits","cancelGetOrphanVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("NonOrphanVisits",h1e,"ReportExporter"),e.decorator("NonOrphanVisits",t(["nonOrphanVisits","mercureInfo","settings"],["getNonOrphanVisits","cancelGetNonOrphanVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("VisitsParser",()=>s1e),e.serviceFactory("getShortUrlVisits",S1e,"buildShlinkApiClient"),e.serviceFactory("cancelGetShortUrlVisits",at("cancelGetVisits"),"shortUrlVisitsReducerCreator"),e.serviceFactory("getTagVisits",T1e,"buildShlinkApiClient"),e.serviceFactory("cancelGetTagVisits",at("cancelGetVisits"),"tagVisitsReducerCreator"),e.serviceFactory("getDomainVisits",Jhe,"buildShlinkApiClient"),e.serviceFactory("cancelGetDomainVisits",at("cancelGetVisits"),"domainVisitsReducerCreator"),e.serviceFactory("getOrphanVisits",b1e,"buildShlinkApiClient"),e.serviceFactory("cancelGetOrphanVisits",at("cancelGetVisits"),"orphanVisitsReducerCreator"),e.serviceFactory("getNonOrphanVisits",g1e,"buildShlinkApiClient"),e.serviceFactory("cancelGetNonOrphanVisits",at("cancelGetVisits"),"nonOrphanVisitsReducerCreator"),e.serviceFactory("createNewVisits",()=>ah),e.serviceFactory("loadVisitsOverview",P1e,"buildShlinkApiClient"),e.serviceFactory("visitsOverviewReducerCreator",k1e,"loadVisitsOverview"),e.serviceFactory("visitsOverviewReducer",at("reducer"),"visitsOverviewReducerCreator"),e.serviceFactory("domainVisitsReducerCreator",epe,"getDomainVisits"),e.serviceFactory("domainVisitsReducer",at("reducer"),"domainVisitsReducerCreator"),e.serviceFactory("nonOrphanVisitsReducerCreator",v1e,"getNonOrphanVisits"),e.serviceFactory("nonOrphanVisitsReducer",at("reducer"),"nonOrphanVisitsReducerCreator"),e.serviceFactory("orphanVisitsReducerCreator",w1e,"getOrphanVisits"),e.serviceFactory("orphanVisitsReducer",at("reducer"),"orphanVisitsReducerCreator"),e.serviceFactory("shortUrlVisitsReducerCreator",C1e,"getShortUrlVisits"),e.serviceFactory("shortUrlVisitsReducer",at("reducer"),"shortUrlVisitsReducerCreator"),e.serviceFactory("tagVisitsReducerCreator",O1e,"getTagVisits"),e.serviceFactory("tagVisitsReducer",at("reducer"),"tagVisitsReducerCreator")},oi=new Sq,{container:uT}=oi,A1e=(e,t)=>(...n)=>e[t](...n),j1e=(e,t)=>({...e,[t]:A1e(uT,t)}),ia=(e,t=[])=>WW(e?Oj(e):null,t.reduce(j1e,{}));jse(oi,ia);yae(oi,ia);IX(oi);Mve(oi,ia);ome(oi,ia);Eye(oi,ia);D1e(oi,ia);V_e(oi);ppe(oi);Pme(oi,ia);fpe(oi,ia);var fT={},oy={},I1e={get exports(){return oy},set exports(e){oy=e}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isPlainObject=t.clone=t.recursive=t.merge=t.main=void 0,e.exports=t=n,t.default=n;function n(){for(var c=[],f=0;fF.length)&&(j=F.length);for(var B=0,ne=Array(j);Bk6({servers:Kpe,selectedServer:e.selectedServerReducer,shortUrlsList:e.shortUrlsListReducer,shortUrlCreation:e.shortUrlCreationReducer,shortUrlDeletion:e.shortUrlDeletionReducer,shortUrlEdition:e.shortUrlEditionReducer,shortUrlDetail:e.shortUrlDetailReducer,shortUrlVisits:e.shortUrlVisitsReducer,tagVisits:e.tagVisitsReducer,domainVisits:e.domainVisitsReducer,orphanVisits:e.orphanVisitsReducer,nonOrphanVisits:e.nonOrphanVisitsReducer,tagsList:e.tagsListReducer,tagDelete:e.tagDeleteReducer,tagEdit:e.tagEditReducer,mercureInfo:e.mercureInfoReducer,settings:_me,domainsList:e.domainsListReducer,visitsOverview:e.visitsOverviewReducer,appUpdated:Ase,sidebar:cae}),$1e=e=>{var t;return e.settings&&((t=e.settings.visits)==null?void 0:t.defaultInterval)==="last180days"&&e.settings.visits&&(e.settings.visits.defaultInterval="last180Days"),e},B1e=!0,tF={states:["settings","servers"],namespace:"shlink",namespaceSeparator:".",debounce:300},z1e=$1e(fT.load(tF)),U1e=e=>ose({devTools:!B1e,reducer:F1e(e),preloadedState:z1e,middleware:t=>t({immutableCheck:!1,serializableCheck:!1}).prepend(e.selectServerListener.middleware).concat(fT.save(tF))}),V1e=!!(window.location.hostname==="localhost"||window.location.hostname==="[::1]"||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));function H1e(e){if("serviceWorker"in navigator){if(new URL(Ug.homepage,window.location.href).origin!==window.location.origin)return;window.addEventListener("load",()=>{const n=`${Ug.homepage}/service-worker.js`;V1e?(W1e(n,e),navigator.serviceWorker.ready.then(()=>{console.log("This web app is being served cache-first by a service worker. To learn more, visit https://cra.link/PWA")})):nF(n,e)})}}function nF(e,t){navigator.serviceWorker.register(e).then(n=>{n.onupdatefound=()=>{const r=n.installing;r!=null&&(r.onstatechange=()=>{r.state==="installed"&&(navigator.serviceWorker.controller?(console.log("New content is available and will be used when all tabs for this page are closed. See https://cra.link/PWA."),t&&t.onUpdate&&t.onUpdate(n)):(console.log("Content is cached for offline use."),t&&t.onSuccess&&t.onSuccess(n)))})}}).catch(n=>{console.error("Error during service worker registration:",n)})}function W1e(e,t){fetch(e,{headers:{"Service-Worker":"script"}}).then(n=>{const r=n.headers.get("content-type");n.status===404||r!=null&&r.indexOf("javascript")===-1?navigator.serviceWorker.ready.then(i=>{i.unregister().then(()=>{window.location.reload()})}):nF(e,t)}).catch(()=>{console.log("No internet connection found. App is running in offline mode.")})}const Y1e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=",q1e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABSCAMAAAAhFXfZAAAC91BMVEVMaXEzeak2f7I4g7g3g7cua5gzeKg8hJo3grY4g7c3grU0gLI2frE0daAubJc2gbQwd6QzeKk2gLMtd5sxdKIua5g1frA2f7IydaM0e6w2fq41fK01eqo3grgubJgta5cxdKI1f7AydaQydaMxc6EubJgvbJkwcZ4ubZkwcJwubZgubJcydqUydKIxapgubJctbJcubZcubJcvbJYubJcvbZkubJctbJctbZcubJg2f7AubJcrbZcubJcubJcua5g3grY0fq8ubJcubJdEkdEwhsw6i88vhswuhcsuhMtBjMgthMsrg8srgss6is8qgcs8i9A9iMYtg8spgcoogMo7hcMngMonf8olfso4gr8kfck5iM8jfMk4iM8he8k1fro7itAgesk2hs8eecgzfLcofssdeMg0hc4cd8g2hcsxeLQbdsgZdcgxeLImfcszhM0vda4xgckzhM4xg84wf8Yxgs4udKsvfcQucqhUndROmdM1fK0wcZ8vb5w0eqpQm9MzeKhXoNVcpdYydKNWn9VZotVKltJFjsIwcJ1Rms9OlslLmtH///8+kc9epdYzd6dbo9VHkMM2f7FHmNBClM8ydqVcpNY9hro3gLM9hLczealQmcw3fa46f7A8gLMxc6I3eagyc6FIldJMl9JSnNRSntNNl9JPnNJFi75UnM9ZodVKksg8kM45jc09e6ZHltFBk883gbRBh7pDk9EwcaBzn784g7dKkcY2i81Om9M7j85Llc81is09g7Q4grY/j9A0eqxKmdFFltBEjcXf6fFImdBCiLxJl9FGlNFBi78yiMxVndEvbpo6js74+vx+psPP3+o/ks5HkcpGmNCjwdZCkNDM3ehYoNJEls+lxNkxh8xHks0+jdC1zd5Lg6r+/v/H2ufz9/o3jM3t8/edvdM/k89Th61OiLBSjbZklbaTt9BfptdjmL1AicBHj8hGk9FAgK1dkLNTjLRekrdClc/k7fM0icy0y9tgp9c4jc2NtM9Dlc8zicxeXZn3AAAAQ3RSTlMAHDdTb4yPA+LtnEQmC4L2EmHqB7XA0d0sr478x4/Yd5i1zOfyPkf1sLVq4Nh3FvjxopQ2/STNuFzUwFIwxKaejILpIBEV9wAABhVJREFUeF6s1NdyFEcYBeBeoQIhRAkLlRDGrhIgY3BJL8CVeKzuyXFzzjkn5ZxzzuScg3PO8cKzu70JkO0LfxdTU//pM9vTu7Xgf6KqOVTb9X7toRrVEfBf1HTVjZccrT/2by1VV928Yty9ZbVuucdz90frG8DBjl9pVApbOstvmMuvVgaNXSfAAd6pGxpy6yxf5ph43pS/4f3uoaGm2rdu72S9xzOvMymkZFq/ptDrk90mhW7e4zl7HLzhxGWPR20xmSxJ/VqldG5m9XhaVOA1DadsNh3Pu5L2N6QtPO/32JpqQBVVk20oy/Pi2s23WEvyfHbe1thadVQttvm7Llf65gGmXK67XtupyoM7HQhmXdLS8oGWJNeOJ3C5fG5XCEJnkez3/oFdsvgJ4l2ANZwhrJKk/7OSXa+3Vw2WJMlKnGkobouYk6T0TyX30klOUnTD9HJ5qpckL3EW/w4XF3Xd0FGywXUrstrclVsqz5Pd/sXFYyDnPdrLcQODmGOK47IZb4CmibmMn+MYRzFZ5jg33ZL/EJrWcszHmANy3ARBK/IXtciJy8VsitPSdE3uuHxzougojcUdr8/32atnz/ev3f/K5wtpxUTpcaI45zusVDpYtZi+jg0oU9b3x74h7+n9ABvYEZeKaVq0sh0AtLKsFtqNBdeT0MrSzwwlq9+x6xAO4tgOtSzbCjrNQQiNvQUbUEubvzBUeGw26yDCsRHCoLkTHDa7IdOLIThs/gHvChszh2CimE8peRs47cxANI0lYNB5y1DljpOF0IhzBDPOZnDOqYYbeGKECbPzWnXludPphw5c2YBq5zlwXphIbO4VDCZ0gnPfUO1TwZoYwAs2ExPCedAu9DAjfQUjzITQb3jNj0KG2Sgt6BHaQUdYzWz+XmBktOHwanXjaSTcwwziBcuMOtwBmqPrTOxFQR/DRKKPqyur0aiW6cULYsx6tBm0jXpR/AUWR6HRq9WVW6MRhIq5jLyjbaCTDCijyYJNpCajdyobP/eTw0iexBAKkJ3gA5KcQb2zBXsIBckn+xVv8jkZSaEFHE+jFEleAEfayRU0MouNoBmB/L50Ai/HSLIHxcrpCvnhSQAuakKp2C/YbCylJjXRVy/z3+Kv/RrNcCo+WUzlVEhzKffnTQnxeN9fWF88fiNCUdSTsaufaChKWInHeysygfpIqagoakW+vV20J8uyl6TyNKEZWV4oRSPyCkWpgOLSbkCObT8o2r6tlG58HQquf6O0v50tB7JM7F4EORd2dx/K0w/KHsVkLPaoYrwgP/y7krr3SSMA4zj+OBgmjYkxcdIJQyQRKgg2viX9Hddi9UBb29LrKR7CVVEEEXWojUkXNyfTNDE14W9gbHJNuhjDettN3ZvbOvdOqCD3Jp/9l+/wJE+9PkYGjx/fqkys3S2rMozM/o2106rfMUINo6hVqz+eu/hd1c4xTg0TAfy5kV+4UG6+IthHTU9woWmxuKNbTfuCSfovBCxq7EtHqvYL4Sm6F8GVxsSXHMQ07TOi1DKtZxjWaaIyi4CXWjxPccUw8WVbMYY5wxC1mzEyXMJWkllpRloi+Kkoq69sxBTlElF6aAxYUbjXNlhlDZilDnM4U5SlN5biRsRHnbx3mbeWjEh4mEyiuJDl5XcWVmX5GvNkFgLWZM5qwsop4/AWfLhU1cR7k1VVvcYCWRkOI6Xy5gmnphCYIkvzuNYzHzosq2oNk2RtSs8khfUOfHIDgR6ysYBaMpl4uEgk2U/oJTs9AaTSwma7dT69geAE2ZpEjUsn2ieJNHeKfrI3EcAGJ2ZaNgVuC8EBctCLc57P5u5led6IOBkIYkuQMrmmjChs4VkfOerHqSBkPzZlhe06RslZ3zMjk2sscqKwY0RcjKK+LWbzd7KiHhkncs/siFJ+V5eXxD34B8nVuJEpGJNmxN2gH3vSvp7J70tF+D1Ej8qUJD1TkErAND2GZwTFg/LubvmgiBG3SOvdlsqFQrkEzJCL1rstlnVFROixZoDDSuXQFHESwVGlcuQcMb/b42NgjLowh5MTDFE3vNB5qStRIErdCQEh6pLPR92anSUb/wAIhldAaDMpGgAAAABJRU5ErkJggg==",G1e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC",Z1e=()=>{delete PL.Icon.Default.prototype._getIconUrl,PL.Icon.Default.mergeOptions({iconRetinaUrl:q1e,iconUrl:Y1e,shadowUrl:G1e})};Z1e();const rF=U1e(uT),{App:K1e,ScrollToTop:X1e,ErrorHandler:Q1e,appUpdateAvailable:J1e}=uT;F4(document.getElementById("root")).render(g.jsx(YW,{store:rF,children:g.jsx(qY,{basename:Ug.homepage,children:g.jsx(Q1e,{children:g.jsx(X1e,{children:g.jsx(K1e,{})})})})}));H1e({onUpdate(){rF.dispatch(J1e())}}); + */(function(e,t){(function(n,r){r(t)})($l,function(n){var r="1.9.3";function i(u){var d,b,E,M;for(b=1,E=arguments.length;b"u"||!L||!L.Mixin)){u=S(u)?u:[u];for(var d=0;d0?Math.floor(u):Math.ceil(u)};G.prototype={clone:function(){return new G(this.x,this.y)},add:function(u){return this.clone()._add(j(u))},_add:function(u){return this.x+=u.x,this.y+=u.y,this},subtract:function(u){return this.clone()._subtract(j(u))},_subtract:function(u){return this.x-=u.x,this.y-=u.y,this},divideBy:function(u){return this.clone()._divideBy(u)},_divideBy:function(u){return this.x/=u,this.y/=u,this},multiplyBy:function(u){return this.clone()._multiplyBy(u)},_multiplyBy:function(u){return this.x*=u,this.y*=u,this},scaleBy:function(u){return new G(this.x*u.x,this.y*u.y)},unscaleBy:function(u){return new G(this.x/u.x,this.y/u.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=F(this.x),this.y=F(this.y),this},distanceTo:function(u){u=j(u);var d=u.x-this.x,b=u.y-this.y;return Math.sqrt(d*d+b*b)},equals:function(u){return u=j(u),u.x===this.x&&u.y===this.y},contains:function(u){return u=j(u),Math.abs(u.x)<=Math.abs(this.x)&&Math.abs(u.y)<=Math.abs(this.y)},toString:function(){return"Point("+p(this.x)+", "+p(this.y)+")"}};function j(u,d,b){return u instanceof G?u:S(u)?new G(u[0],u[1]):u==null?u:typeof u=="object"&&"x"in u&&"y"in u?new G(u.x,u.y):new G(u,d,b)}function B(u,d){if(u)for(var b=d?[u,d]:u,E=0,M=b.length;E=this.min.x&&b.x<=this.max.x&&d.y>=this.min.y&&b.y<=this.max.y},intersects:function(u){u=ne(u);var d=this.min,b=this.max,E=u.min,M=u.max,$=M.x>=d.x&&E.x<=b.x,Q=M.y>=d.y&&E.y<=b.y;return $&&Q},overlaps:function(u){u=ne(u);var d=this.min,b=this.max,E=u.min,M=u.max,$=M.x>d.x&&E.xd.y&&E.y=d.lat&&M.lat<=b.lat&&E.lng>=d.lng&&M.lng<=b.lng},intersects:function(u){u=q(u);var d=this._southWest,b=this._northEast,E=u.getSouthWest(),M=u.getNorthEast(),$=M.lat>=d.lat&&E.lat<=b.lat,Q=M.lng>=d.lng&&E.lng<=b.lng;return $&&Q},overlaps:function(u){u=q(u);var d=this._southWest,b=this._northEast,E=u.getSouthWest(),M=u.getNorthEast(),$=M.lat>d.lat&&E.latd.lng&&E.lng1,Xt=function(){var u=!1;try{var d=Object.defineProperty({},"passive",{get:function(){u=!0}});window.addEventListener("testPassiveEventSupport",h,d),window.removeEventListener("testPassiveEventSupport",h,d)}catch{}return u}(),or=function(){return!!document.createElement("canvas").getContext}(),Dn=!!(document.createElementNS&&Le("svg").createSVGRect),An=!!Dn&&function(){var u=document.createElement("div");return u.innerHTML="",(u.firstChild&&u.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),pn=!Dn&&function(){try{var u=document.createElement("div");u.innerHTML='';var d=u.firstChild;return d.style.behavior="url(#default#VML)",d&&typeof d.adj=="object"}catch{return!1}}(),ai=navigator.platform.indexOf("Mac")===0,li=navigator.platform.indexOf("Linux")===0;function jn(u){return navigator.userAgent.toLowerCase().indexOf(u)>=0}var He={ie:_e,ielt9:Te,edge:De,webkit:Re,android:Ne,android23:ce,androidStock:be,opera:ye,chrome:Ce,gecko:ke,safari:Ie,phantom:Je,opera12:et,win:Ge,ie3d:Ht,webkit3d:Ft,gecko3d:wn,any3d:ir,mobile:Ri,mobileWebkit:Ln,mobileWebkit3d:ou,msPointer:Ni,pointer:gh,touch:yh,touchNative:vh,mobileOpera:su,mobileGecko:oa,retina:sn,passiveEvents:Xt,canvas:or,svg:Dn,vml:pn,inlineSvg:An,mac:ai,linux:li},lT=He.msPointer?"MSPointerDown":"pointerdown",cT=He.msPointer?"MSPointerMove":"pointermove",uT=He.msPointer?"MSPointerUp":"pointerup",fT=He.msPointer?"MSPointerCancel":"pointercancel",M_={touchstart:lT,touchmove:cT,touchend:uT,touchcancel:fT},dT={touchstart:gF,touchmove:_h,touchend:_h,touchcancel:_h},ml={},hT=!1;function fF(u,d,b){return d==="touchstart"&&mF(),dT[d]?(b=dT[d].bind(this,b),u.addEventListener(M_[d],b,!1),b):(console.warn("wrong event specified:",d),h)}function dF(u,d,b){if(!M_[d]){console.warn("wrong event specified:",d);return}u.removeEventListener(M_[d],b,!1)}function hF(u){ml[u.pointerId]=u}function pF(u){ml[u.pointerId]&&(ml[u.pointerId]=u)}function pT(u){delete ml[u.pointerId]}function mF(){hT||(document.addEventListener(lT,hF,!0),document.addEventListener(cT,pF,!0),document.addEventListener(uT,pT,!0),document.addEventListener(fT,pT,!0),hT=!0)}function _h(u,d){if(d.pointerType!==(d.MSPOINTER_TYPE_MOUSE||"mouse")){d.touches=[];for(var b in ml)d.touches.push(ml[b]);d.changedTouches=[d],u(d)}}function gF(u,d){d.MSPOINTER_TYPE_TOUCH&&d.pointerType===d.MSPOINTER_TYPE_TOUCH&&In(d),_h(u,d)}function vF(u){var d={},b,E;for(E in u)b=u[E],d[E]=b&&b.bind?b.bind(u):b;return u=d,d.type="dblclick",d.detail=2,d.isTrusted=!1,d._simulated=!0,d}var yF=200;function _F(u,d){u.addEventListener("dblclick",d);var b=0,E;function M($){if($.detail!==1){E=$.detail;return}if(!($.pointerType==="mouse"||$.sourceCapabilities&&!$.sourceCapabilities.firesTouchEvents)){var Q=_T($);if(!(Q.some(function(he){return he instanceof HTMLLabelElement&&he.attributes.for})&&!Q.some(function(he){return he instanceof HTMLInputElement||he instanceof HTMLSelectElement}))){var fe=Date.now();fe-b<=yF?(E++,E===2&&d(vF($))):E=1,b=fe}}}return u.addEventListener("click",M),{dblclick:d,simDblclick:M}}function bF(u,d){u.removeEventListener("dblclick",d.dblclick),u.removeEventListener("click",d.simDblclick)}var R_=xh(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),au=xh(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),mT=au==="webkitTransition"||au==="OTransition"?au+"End":"transitionend";function gT(u){return typeof u=="string"?document.getElementById(u):u}function lu(u,d){var b=u.style[d]||u.currentStyle&&u.currentStyle[d];if((!b||b==="auto")&&document.defaultView){var E=document.defaultView.getComputedStyle(u,null);b=E?E[d]:null}return b==="auto"?null:b}function ft(u,d,b){var E=document.createElement(u);return E.className=d||"",b&&b.appendChild(E),E}function $t(u){var d=u.parentNode;d&&d.removeChild(u)}function bh(u){for(;u.firstChild;)u.removeChild(u.firstChild)}function gl(u){var d=u.parentNode;d&&d.lastChild!==u&&d.appendChild(u)}function vl(u){var d=u.parentNode;d&&d.firstChild!==u&&d.insertBefore(u,d.firstChild)}function N_(u,d){if(u.classList!==void 0)return u.classList.contains(d);var b=wh(u);return b.length>0&&new RegExp("(^|\\s)"+d+"(\\s|$)").test(b)}function Xe(u,d){if(u.classList!==void 0)for(var b=v(d),E=0,M=b.length;E0?2*window.devicePixelRatio:1;function wT(u){return He.edge?u.wheelDeltaY/2:u.deltaY&&u.deltaMode===0?-u.deltaY/SF:u.deltaY&&u.deltaMode===1?-u.deltaY*20:u.deltaY&&u.deltaMode===2?-u.deltaY*60:u.deltaX||u.deltaZ?0:u.wheelDelta?(u.wheelDeltaY||u.wheelDelta)/2:u.detail&&Math.abs(u.detail)<32765?-u.detail*20:u.detail?u.detail/-32765*60:0}function H_(u,d){var b=d.relatedTarget;if(!b)return!0;try{for(;b&&b!==u;)b=b.parentNode}catch{return!1}return b!==u}var CF={__proto__:null,on:Ze,off:St,stopPropagation:la,disableScrollPropagation:V_,disableClickPropagation:du,preventDefault:In,stop:ca,getPropagationPath:_T,getMousePosition:bT,getWheelDelta:wT,isExternalTarget:H_,addListener:Ze,removeListener:St},xT=oe.extend({run:function(u,d,b,E){this.stop(),this._el=u,this._inProgress=!0,this._duration=b||.25,this._easeOutPower=1/Math.max(E||.5,.2),this._startPos=aa(u),this._offset=d.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=W(this._animate,this),this._step()},_step:function(u){var d=+new Date-this._startTime,b=this._duration*1e3;dthis.options.maxZoom)?this.setZoom(u):this},panInsideBounds:function(u,d){this._enforcingBounds=!0;var b=this.getCenter(),E=this._limitCenter(b,this._zoom,q(u));return b.equals(E)||this.panTo(E,d),this._enforcingBounds=!1,this},panInside:function(u,d){d=d||{};var b=j(d.paddingTopLeft||d.padding||[0,0]),E=j(d.paddingBottomRight||d.padding||[0,0]),M=this.project(this.getCenter()),$=this.project(u),Q=this.getPixelBounds(),fe=ne([Q.min.add(b),Q.max.subtract(E)]),he=fe.getSize();if(!fe.contains($)){this._enforcingBounds=!0;var Se=$.subtract(fe.getCenter()),Ae=fe.extend($).getSize().subtract(he);M.x+=Se.x<0?-Ae.x:Ae.x,M.y+=Se.y<0?-Ae.y:Ae.y,this.panTo(this.unproject(M),d),this._enforcingBounds=!1}return this},invalidateSize:function(u){if(!this._loaded)return this;u=i({animate:!1,pan:!0},u===!0?{animate:!0}:u);var d=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var b=this.getSize(),E=d.divideBy(2).round(),M=b.divideBy(2).round(),$=E.subtract(M);return!$.x&&!$.y?this:(u.animate&&u.pan?this.panBy($):(u.pan&&this._rawPanBy($),this.fire("move"),u.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(s(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:d,newSize:b}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(u){if(u=this._locateOptions=i({timeout:1e4,watch:!1},u),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var d=s(this._handleGeolocationResponse,this),b=s(this._handleGeolocationError,this);return u.watch?this._locationWatchId=navigator.geolocation.watchPosition(d,b,u):navigator.geolocation.getCurrentPosition(d,b,u),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(u){if(this._container._leaflet_id){var d=u.code,b=u.message||(d===1?"permission denied":d===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:d,message:"Geolocation error: "+b+"."})}},_handleGeolocationResponse:function(u){if(this._container._leaflet_id){var d=u.coords.latitude,b=u.coords.longitude,E=new te(d,b),M=E.toBounds(u.coords.accuracy*2),$=this._locateOptions;if($.setView){var Q=this.getBoundsZoom(M);this.setView(E,$.maxZoom?Math.min(Q,$.maxZoom):Q)}var fe={latlng:E,bounds:M,timestamp:u.timestamp};for(var he in u.coords)typeof u.coords[he]=="number"&&(fe[he]=u.coords[he]);this.fire("locationfound",fe)}},addHandler:function(u,d){if(!d)return this;var b=this[u]=new d(this);return this._handlers.push(b),this.options[u]&&b.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),$t(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(Y(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var u;for(u in this._layers)this._layers[u].remove();for(u in this._panes)$t(this._panes[u]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(u,d){var b="leaflet-pane"+(u?" leaflet-"+u.replace("Pane","")+"-pane":""),E=ft("div",b,d||this._mapPane);return u&&(this._panes[u]=E),E},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var u=this.getPixelBounds(),d=this.unproject(u.getBottomLeft()),b=this.unproject(u.getTopRight());return new H(d,b)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(u,d,b){u=q(u),b=j(b||[0,0]);var E=this.getZoom()||0,M=this.getMinZoom(),$=this.getMaxZoom(),Q=u.getNorthWest(),fe=u.getSouthEast(),he=this.getSize().subtract(b),Se=ne(this.project(fe,E),this.project(Q,E)).getSize(),Ae=He.any3d?this.options.zoomSnap:1,Ye=he.x/Se.x,nt=he.y/Se.y,Ur=d?Math.max(Ye,nt):Math.min(Ye,nt);return E=this.getScaleZoom(Ur,E),Ae&&(E=Math.round(E/(Ae/100))*(Ae/100),E=d?Math.ceil(E/Ae)*Ae:Math.floor(E/Ae)*Ae),Math.max(M,Math.min($,E))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new G(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(u,d){var b=this._getTopLeftPoint(u,d);return new B(b,b.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(u){return this.options.crs.getProjectedBounds(u===void 0?this.getZoom():u)},getPane:function(u){return typeof u=="string"?this._panes[u]:u},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(u,d){var b=this.options.crs;return d=d===void 0?this._zoom:d,b.scale(u)/b.scale(d)},getScaleZoom:function(u,d){var b=this.options.crs;d=d===void 0?this._zoom:d;var E=b.zoom(u*b.scale(d));return isNaN(E)?1/0:E},project:function(u,d){return d=d===void 0?this._zoom:d,this.options.crs.latLngToPoint(se(u),d)},unproject:function(u,d){return d=d===void 0?this._zoom:d,this.options.crs.pointToLatLng(j(u),d)},layerPointToLatLng:function(u){var d=j(u).add(this.getPixelOrigin());return this.unproject(d)},latLngToLayerPoint:function(u){var d=this.project(se(u))._round();return d._subtract(this.getPixelOrigin())},wrapLatLng:function(u){return this.options.crs.wrapLatLng(se(u))},wrapLatLngBounds:function(u){return this.options.crs.wrapLatLngBounds(q(u))},distance:function(u,d){return this.options.crs.distance(se(u),se(d))},containerPointToLayerPoint:function(u){return j(u).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(u){return j(u).add(this._getMapPanePos())},containerPointToLatLng:function(u){var d=this.containerPointToLayerPoint(j(u));return this.layerPointToLatLng(d)},latLngToContainerPoint:function(u){return this.layerPointToContainerPoint(this.latLngToLayerPoint(se(u)))},mouseEventToContainerPoint:function(u){return bT(u,this._container)},mouseEventToLayerPoint:function(u){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(u))},mouseEventToLatLng:function(u){return this.layerPointToLatLng(this.mouseEventToLayerPoint(u))},_initContainer:function(u){var d=this._container=gT(u);if(d){if(d._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");Ze(d,"scroll",this._onScroll,this),this._containerId=l(d)},_initLayout:function(){var u=this._container;this._fadeAnimated=this.options.fadeAnimation&&He.any3d,Xe(u,"leaflet-container"+(He.touch?" leaflet-touch":"")+(He.retina?" leaflet-retina":"")+(He.ielt9?" leaflet-oldie":"")+(He.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var d=lu(u,"position");d!=="absolute"&&d!=="relative"&&d!=="fixed"&&d!=="sticky"&&(u.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var u=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),an(this._mapPane,new G(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(Xe(u.markerPane,"leaflet-zoom-hide"),Xe(u.shadowPane,"leaflet-zoom-hide"))},_resetView:function(u,d,b){an(this._mapPane,new G(0,0));var E=!this._loaded;this._loaded=!0,d=this._limitZoom(d),this.fire("viewprereset");var M=this._zoom!==d;this._moveStart(M,b)._move(u,d)._moveEnd(M),this.fire("viewreset"),E&&this.fire("load")},_moveStart:function(u,d){return u&&this.fire("zoomstart"),d||this.fire("movestart"),this},_move:function(u,d,b,E){d===void 0&&(d=this._zoom);var M=this._zoom!==d;return this._zoom=d,this._lastCenter=u,this._pixelOrigin=this._getNewPixelOrigin(u),E?b&&b.pinch&&this.fire("zoom",b):((M||b&&b.pinch)&&this.fire("zoom",b),this.fire("move",b)),this},_moveEnd:function(u){return u&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return Y(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(u){an(this._mapPane,this._getMapPanePos().subtract(u))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(u){this._targets={},this._targets[l(this._container)]=this;var d=u?St:Ze;d(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&d(window,"resize",this._onResize,this),He.any3d&&this.options.transform3DLimit&&(u?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){Y(this._resizeRequest),this._resizeRequest=W(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var u=this._getMapPanePos();Math.max(Math.abs(u.x),Math.abs(u.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(u,d){for(var b=[],E,M=d==="mouseout"||d==="mouseover",$=u.target||u.srcElement,Q=!1;$;){if(E=this._targets[l($)],E&&(d==="click"||d==="preclick")&&this._draggableMoved(E)){Q=!0;break}if(E&&E.listens(d,!0)&&(M&&!H_($,u)||(b.push(E),M))||$===this._container)break;$=$.parentNode}return!b.length&&!Q&&!M&&this.listens(d,!0)&&(b=[this]),b},_isClickDisabled:function(u){for(;u&&u!==this._container;){if(u._leaflet_disable_click)return!0;u=u.parentNode}},_handleDOMEvent:function(u){var d=u.target||u.srcElement;if(!(!this._loaded||d._leaflet_disable_events||u.type==="click"&&this._isClickDisabled(d))){var b=u.type;b==="mousedown"&&F_(d),this._fireDOMEvent(u,b)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(u,d,b){if(u.type==="click"){var E=i({},u);E.type="preclick",this._fireDOMEvent(E,E.type,b)}var M=this._findEventTargets(u,d);if(b){for(var $=[],Q=0;Q0?Math.round(u-d)/2:Math.max(0,Math.ceil(u))-Math.max(0,Math.floor(d))},_limitZoom:function(u){var d=this.getMinZoom(),b=this.getMaxZoom(),E=He.any3d?this.options.zoomSnap:1;return E&&(u=Math.round(u/E)*E),Math.max(d,Math.min(b,u))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Qt(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(u,d){var b=this._getCenterOffset(u)._trunc();return(d&&d.animate)!==!0&&!this.getSize().contains(b)?!1:(this.panBy(b,d),!0)},_createAnimProxy:function(){var u=this._proxy=ft("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(u),this.on("zoomanim",function(d){var b=R_,E=this._proxy.style[b];sa(this._proxy,this.project(d.center,d.zoom),this.getZoomScale(d.zoom,1)),E===this._proxy.style[b]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){$t(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var u=this.getCenter(),d=this.getZoom();sa(this._proxy,this.project(u,d),this.getZoomScale(d,1))},_catchTransitionEnd:function(u){this._animatingZoom&&u.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(u,d,b){if(this._animatingZoom)return!0;if(b=b||{},!this._zoomAnimated||b.animate===!1||this._nothingToAnimate()||Math.abs(d-this._zoom)>this.options.zoomAnimationThreshold)return!1;var E=this.getZoomScale(d),M=this._getCenterOffset(u)._divideBy(1-1/E);return b.animate!==!0&&!this.getSize().contains(M)?!1:(W(function(){this._moveStart(!0,!1)._animateZoom(u,d,!0)},this),!0)},_animateZoom:function(u,d,b,E){this._mapPane&&(b&&(this._animatingZoom=!0,this._animateToCenter=u,this._animateToZoom=d,Xe(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:u,zoom:d,noUpdate:E}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(s(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Qt(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function EF(u,d){return new ot(u,d)}var ci=Z.extend({options:{position:"topright"},initialize:function(u){y(this,u)},getPosition:function(){return this.options.position},setPosition:function(u){var d=this._map;return d&&d.removeControl(this),this.options.position=u,d&&d.addControl(this),this},getContainer:function(){return this._container},addTo:function(u){this.remove(),this._map=u;var d=this._container=this.onAdd(u),b=this.getPosition(),E=u._controlCorners[b];return Xe(d,"leaflet-control"),b.indexOf("bottom")!==-1?E.insertBefore(d,E.firstChild):E.appendChild(d),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?($t(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(u){this._map&&u&&u.screenX>0&&u.screenY>0&&this._map.getContainer().focus()}}),hu=function(u){return new ci(u)};ot.include({addControl:function(u){return u.addTo(this),this},removeControl:function(u){return u.remove(),this},_initControlPos:function(){var u=this._controlCorners={},d="leaflet-",b=this._controlContainer=ft("div",d+"control-container",this._container);function E(M,$){var Q=d+M+" "+d+$;u[M+$]=ft("div",Q,b)}E("top","left"),E("top","right"),E("bottom","left"),E("bottom","right")},_clearControlPos:function(){for(var u in this._controlCorners)$t(this._controlCorners[u]);$t(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var ST=ci.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(u,d,b,E){return b1,this._baseLayersList.style.display=u?"":"none"),this._separator.style.display=d&&u?"":"none",this},_onLayerChange:function(u){this._handlingClick||this._update();var d=this._getLayer(l(u.target)),b=d.overlay?u.type==="add"?"overlayadd":"overlayremove":u.type==="add"?"baselayerchange":null;b&&this._map.fire(b,d)},_createRadioElement:function(u,d){var b='",E=document.createElement("div");return E.innerHTML=b,E.firstChild},_addItem:function(u){var d=document.createElement("label"),b=this._map.hasLayer(u.layer),E;u.overlay?(E=document.createElement("input"),E.type="checkbox",E.className="leaflet-control-layers-selector",E.defaultChecked=b):E=this._createRadioElement("leaflet-base-layers_"+l(this),b),this._layerControlInputs.push(E),E.layerId=l(u.layer),Ze(E,"click",this._onInputClick,this);var M=document.createElement("span");M.innerHTML=" "+u.name;var $=document.createElement("span");d.appendChild($),$.appendChild(E),$.appendChild(M);var Q=u.overlay?this._overlaysList:this._baseLayersList;return Q.appendChild(d),this._checkDisabledLayers(),d},_onInputClick:function(){var u=this._layerControlInputs,d,b,E=[],M=[];this._handlingClick=!0;for(var $=u.length-1;$>=0;$--)d=u[$],b=this._getLayer(d.layerId).layer,d.checked?E.push(b):d.checked||M.push(b);for($=0;$=0;M--)d=u[M],b=this._getLayer(d.layerId).layer,d.disabled=b.options.minZoom!==void 0&&Eb.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var u=this._section;Ze(u,"click",In),this.expand(),setTimeout(function(){St(u,"click",In)})}}),TF=function(u,d,b){return new ST(u,d,b)},W_=ci.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(u){var d="leaflet-control-zoom",b=ft("div",d+" leaflet-bar"),E=this.options;return this._zoomInButton=this._createButton(E.zoomInText,E.zoomInTitle,d+"-in",b,this._zoomIn),this._zoomOutButton=this._createButton(E.zoomOutText,E.zoomOutTitle,d+"-out",b,this._zoomOut),this._updateDisabled(),u.on("zoomend zoomlevelschange",this._updateDisabled,this),b},onRemove:function(u){u.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(u){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(u.shiftKey?3:1))},_createButton:function(u,d,b,E,M){var $=ft("a",b,E);return $.innerHTML=u,$.href="#",$.title=d,$.setAttribute("role","button"),$.setAttribute("aria-label",d),du($),Ze($,"click",ca),Ze($,"click",M,this),Ze($,"click",this._refocusOnMap,this),$},_updateDisabled:function(){var u=this._map,d="leaflet-disabled";Qt(this._zoomInButton,d),Qt(this._zoomOutButton,d),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||u._zoom===u.getMinZoom())&&(Xe(this._zoomOutButton,d),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||u._zoom===u.getMaxZoom())&&(Xe(this._zoomInButton,d),this._zoomInButton.setAttribute("aria-disabled","true"))}});ot.mergeOptions({zoomControl:!0}),ot.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new W_,this.addControl(this.zoomControl))});var OF=function(u){return new W_(u)},CT=ci.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(u){var d="leaflet-control-scale",b=ft("div",d),E=this.options;return this._addScales(E,d+"-line",b),u.on(E.updateWhenIdle?"moveend":"move",this._update,this),u.whenReady(this._update,this),b},onRemove:function(u){u.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(u,d,b){u.metric&&(this._mScale=ft("div",d,b)),u.imperial&&(this._iScale=ft("div",d,b))},_update:function(){var u=this._map,d=u.getSize().y/2,b=u.distance(u.containerPointToLatLng([0,d]),u.containerPointToLatLng([this.options.maxWidth,d]));this._updateScales(b)},_updateScales:function(u){this.options.metric&&u&&this._updateMetric(u),this.options.imperial&&u&&this._updateImperial(u)},_updateMetric:function(u){var d=this._getRoundNum(u),b=d<1e3?d+" m":d/1e3+" km";this._updateScale(this._mScale,b,d/u)},_updateImperial:function(u){var d=u*3.2808399,b,E,M;d>5280?(b=d/5280,E=this._getRoundNum(b),this._updateScale(this._iScale,E+" mi",E/b)):(M=this._getRoundNum(d),this._updateScale(this._iScale,M+" ft",M/d))},_updateScale:function(u,d,b){u.style.width=Math.round(this.options.maxWidth*b)+"px",u.innerHTML=d},_getRoundNum:function(u){var d=Math.pow(10,(Math.floor(u)+"").length-1),b=u/d;return b=b>=10?10:b>=5?5:b>=3?3:b>=2?2:1,d*b}}),PF=function(u){return new CT(u)},kF='',Y_=ci.extend({options:{position:"bottomright",prefix:''+(He.inlineSvg?kF+" ":"")+"Leaflet"},initialize:function(u){y(this,u),this._attributions={}},onAdd:function(u){u.attributionControl=this,this._container=ft("div","leaflet-control-attribution"),du(this._container);for(var d in u._layers)u._layers[d].getAttribution&&this.addAttribution(u._layers[d].getAttribution());return this._update(),u.on("layeradd",this._addAttribution,this),this._container},onRemove:function(u){u.off("layeradd",this._addAttribution,this)},_addAttribution:function(u){u.layer.getAttribution&&(this.addAttribution(u.layer.getAttribution()),u.layer.once("remove",function(){this.removeAttribution(u.layer.getAttribution())},this))},setPrefix:function(u){return this.options.prefix=u,this._update(),this},addAttribution:function(u){return u?(this._attributions[u]||(this._attributions[u]=0),this._attributions[u]++,this._update(),this):this},removeAttribution:function(u){return u?(this._attributions[u]&&(this._attributions[u]--,this._update()),this):this},_update:function(){if(this._map){var u=[];for(var d in this._attributions)this._attributions[d]&&u.push(d);var b=[];this.options.prefix&&b.push(this.options.prefix),u.length&&b.push(u.join(", ")),this._container.innerHTML=b.join(' ')}}});ot.mergeOptions({attributionControl:!0}),ot.addInitHook(function(){this.options.attributionControl&&new Y_().addTo(this)});var MF=function(u){return new Y_(u)};ci.Layers=ST,ci.Zoom=W_,ci.Scale=CT,ci.Attribution=Y_,hu.layers=TF,hu.zoom=OF,hu.scale=PF,hu.attribution=MF;var Di=Z.extend({initialize:function(u){this._map=u},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Di.addTo=function(u,d){return u.addHandler(d,this),this};var RF={Events:ie},ET=He.touch?"touchstart mousedown":"mousedown",Yo=oe.extend({options:{clickTolerance:3},initialize:function(u,d,b,E){y(this,E),this._element=u,this._dragStartTarget=d||u,this._preventOutline=b},enable:function(){this._enabled||(Ze(this._dragStartTarget,ET,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Yo._dragging===this&&this.finishDrag(!0),St(this._dragStartTarget,ET,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(u){if(this._enabled&&(this._moved=!1,!N_(this._element,"leaflet-zoom-anim"))){if(u.touches&&u.touches.length!==1){Yo._dragging===this&&this.finishDrag();return}if(!(Yo._dragging||u.shiftKey||u.which!==1&&u.button!==1&&!u.touches)&&(Yo._dragging=this,this._preventOutline&&F_(this._element),A_(),cu(),!this._moving)){this.fire("down");var d=u.touches?u.touches[0]:u,b=vT(this._element);this._startPoint=new G(d.clientX,d.clientY),this._startPos=aa(this._element),this._parentScale=$_(b);var E=u.type==="mousedown";Ze(document,E?"mousemove":"touchmove",this._onMove,this),Ze(document,E?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(u){if(this._enabled){if(u.touches&&u.touches.length>1){this._moved=!0;return}var d=u.touches&&u.touches.length===1?u.touches[0]:u,b=new G(d.clientX,d.clientY)._subtract(this._startPoint);!b.x&&!b.y||Math.abs(b.x)+Math.abs(b.y)$&&(Q=fe,$=he);$>b&&(d[Q]=1,q_(u,d,b,E,Q),q_(u,d,b,Q,M))}function DF(u,d){for(var b=[u[0]],E=1,M=0,$=u.length;E<$;E++)AF(u[E],u[M])>d&&(b.push(u[E]),M=E);return M<$-1&&b.push(u[$-1]),b}var PT;function kT(u,d,b,E,M){var $=E?PT:ua(u,b),Q=ua(d,b),fe,he,Se;for(PT=Q;;){if(!($|Q))return[u,d];if($&Q)return!1;fe=$||Q,he=Eh(u,d,fe,b,M),Se=ua(he,b),fe===$?(u=he,$=Se):(d=he,Q=Se)}}function Eh(u,d,b,E,M){var $=d.x-u.x,Q=d.y-u.y,fe=E.min,he=E.max,Se,Ae;return b&8?(Se=u.x+$*(he.y-u.y)/Q,Ae=he.y):b&4?(Se=u.x+$*(fe.y-u.y)/Q,Ae=fe.y):b&2?(Se=he.x,Ae=u.y+Q*(he.x-u.x)/$):b&1&&(Se=fe.x,Ae=u.y+Q*(fe.x-u.x)/$),new G(Se,Ae,M)}function ua(u,d){var b=0;return u.xd.max.x&&(b|=2),u.yd.max.y&&(b|=8),b}function AF(u,d){var b=d.x-u.x,E=d.y-u.y;return b*b+E*E}function pu(u,d,b,E){var M=d.x,$=d.y,Q=b.x-M,fe=b.y-$,he=Q*Q+fe*fe,Se;return he>0&&(Se=((u.x-M)*Q+(u.y-$)*fe)/he,Se>1?(M=b.x,$=b.y):Se>0&&(M+=Q*Se,$+=fe*Se)),Q=u.x-M,fe=u.y-$,E?Q*Q+fe*fe:new G(M,$)}function zr(u){return!S(u[0])||typeof u[0][0]!="object"&&typeof u[0][0]<"u"}function MT(u){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),zr(u)}function RT(u,d){var b,E,M,$,Q,fe,he,Se;if(!u||u.length===0)throw new Error("latlngs not passed");zr(u)||(console.warn("latlngs are not flat! Only the first ring will be used"),u=u[0]);var Ae=[];for(var Ye in u)Ae.push(d.project(se(u[Ye])));var nt=Ae.length;for(b=0,E=0;bE){he=($-E)/M,Se=[fe.x-he*(fe.x-Q.x),fe.y-he*(fe.y-Q.y)];break}return d.unproject(j(Se))}var jF={__proto__:null,simplify:TT,pointToSegmentDistance:OT,closestPointOnSegment:NF,clipSegment:kT,_getEdgeIntersection:Eh,_getBitCode:ua,_sqClosestPointOnSegment:pu,isFlat:zr,_flat:MT,polylineCenter:RT};function NT(u,d,b){var E,M=[1,4,2,8],$,Q,fe,he,Se,Ae,Ye,nt;for($=0,Ae=u.length;$1e-7;fe++)Se=M*Math.sin(Q),Se=Math.pow((1-Se)/(1+Se),M/2),he=Math.PI/2-2*Math.atan($*Se)-Q,Q+=he;return new te(Q*d,u.x*d/b)}},FF={__proto__:null,LonLat:G_,Mercator:Z_,SphericalMercator:I},$F=i({},O,{code:"EPSG:3395",projection:Z_,transformation:function(){var u=.5/(Math.PI*Z_.R);return K(u,.5,-u,.5)}()}),DT=i({},O,{code:"EPSG:4326",projection:G_,transformation:K(1/180,1,-1/180,.5)}),BF=i({},pe,{projection:G_,transformation:K(1,0,-1,0),scale:function(u){return Math.pow(2,u)},zoom:function(u){return Math.log(u)/Math.LN2},distance:function(u,d){var b=d.lng-u.lng,E=d.lat-u.lat;return Math.sqrt(b*b+E*E)},infinite:!0});pe.Earth=O,pe.EPSG3395=$F,pe.EPSG3857=ae,pe.EPSG900913=ge,pe.EPSG4326=DT,pe.Simple=BF;var ui=oe.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(u){return u.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(u){return u&&u.removeLayer(this),this},getPane:function(u){return this._map.getPane(u?this.options[u]||u:this.options.pane)},addInteractiveTarget:function(u){return this._map._targets[l(u)]=this,this},removeInteractiveTarget:function(u){return delete this._map._targets[l(u)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(u){var d=u.target;if(d.hasLayer(this)){if(this._map=d,this._zoomAnimated=d._zoomAnimated,this.getEvents){var b=this.getEvents();d.on(b,this),this.once("remove",function(){d.off(b,this)},this)}this.onAdd(d),this.fire("add"),d.fire("layeradd",{layer:this})}}});ot.include({addLayer:function(u){if(!u._layerAdd)throw new Error("The provided object is not a Layer.");var d=l(u);return this._layers[d]?this:(this._layers[d]=u,u._mapToAdd=this,u.beforeAdd&&u.beforeAdd(this),this.whenReady(u._layerAdd,u),this)},removeLayer:function(u){var d=l(u);return this._layers[d]?(this._loaded&&u.onRemove(this),delete this._layers[d],this._loaded&&(this.fire("layerremove",{layer:u}),u.fire("remove")),u._map=u._mapToAdd=null,this):this},hasLayer:function(u){return l(u)in this._layers},eachLayer:function(u,d){for(var b in this._layers)u.call(d,this._layers[b]);return this},_addLayers:function(u){u=u?S(u)?u:[u]:[];for(var d=0,b=u.length;dthis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&d[0]instanceof te&&d[0].equals(d[b-1])&&d.pop(),d},_setLatLngs:function(u){so.prototype._setLatLngs.call(this,u),zr(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return zr(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var u=this._renderer._bounds,d=this.options.weight,b=new G(d,d);if(u=new B(u.min.subtract(b),u.max.add(b)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(u))){if(this.options.noClip){this._parts=this._rings;return}for(var E=0,M=this._rings.length,$;Eu.y!=M.y>u.y&&u.x<(M.x-E.x)*(u.y-E.y)/(M.y-E.y)+E.x&&(d=!d);return d||so.prototype._containsPoint.call(this,u,!0)}});function GF(u,d){return new bl(u,d)}var ao=oo.extend({initialize:function(u,d){y(this,d),this._layers={},u&&this.addData(u)},addData:function(u){var d=S(u)?u:u.features,b,E,M;if(d){for(b=0,E=d.length;b0?E:[d.src];return}S(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(d.style,"objectFit")&&(d.style.objectFit="fill"),d.autoplay=!!this.options.autoplay,d.loop=!!this.options.loop,d.muted=!!this.options.muted,d.playsInline=!!this.options.playsInline;for(var $=0;$M?(d.height=M+"px",Xe(u,$)):Qt(u,$),this._containerWidth=this._container.offsetWidth},_animateZoom:function(u){var d=this._map._latLngToNewLayerPoint(this._latlng,u.zoom,u.center),b=this._getAnchor();an(this._container,d.add(b))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var u=this._map,d=parseInt(lu(this._container,"marginBottom"),10)||0,b=this._container.offsetHeight+d,E=this._containerWidth,M=new G(this._containerLeft,-b-this._containerBottom);M._add(aa(this._container));var $=u.layerPointToContainerPoint(M),Q=j(this.options.autoPanPadding),fe=j(this.options.autoPanPaddingTopLeft||Q),he=j(this.options.autoPanPaddingBottomRight||Q),Se=u.getSize(),Ae=0,Ye=0;$.x+E+he.x>Se.x&&(Ae=$.x+E-Se.x+he.x),$.x-Ae-fe.x<0&&(Ae=$.x-fe.x),$.y+b+he.y>Se.y&&(Ye=$.y+b-Se.y+he.y),$.y-Ye-fe.y<0&&(Ye=$.y-fe.y),(Ae||Ye)&&(this.options.keepInView&&(this._autopanning=!0),u.fire("autopanstart").panBy([Ae,Ye]))}},_getAnchor:function(){return j(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),JF=function(u,d){return new Lh(u,d)};ot.mergeOptions({closePopupOnClick:!0}),ot.include({openPopup:function(u,d,b){return this._initOverlay(Lh,u,d,b).openOn(this),this},closePopup:function(u){return u=arguments.length?u:this._popup,u&&u.close(),this}}),ui.include({bindPopup:function(u,d){return this._popup=this._initOverlay(Lh,this._popup,u,d),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(u){return this._popup&&(this instanceof oo||(this._popup._source=this),this._popup._prepareOpen(u||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(u){return this._popup&&this._popup.setContent(u),this},getPopup:function(){return this._popup},_openPopup:function(u){if(!(!this._popup||!this._map)){ca(u);var d=u.layer||u.target;if(this._popup._source===d&&!(d instanceof qo)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(u.latlng);return}this._popup._source=d,this.openPopup(u.latlng)}},_movePopup:function(u){this._popup.setLatLng(u.latlng)},_onKeyPress:function(u){u.originalEvent.keyCode===13&&this._openPopup(u)}});var Dh=Ai.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(u){Ai.prototype.onAdd.call(this,u),this.setOpacity(this.options.opacity),u.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(u){Ai.prototype.onRemove.call(this,u),u.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var u=Ai.prototype.getEvents.call(this);return this.options.permanent||(u.preclick=this.close),u},_initLayout:function(){var u="leaflet-tooltip",d=u+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=ft("div",d),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+l(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(u){var d,b,E=this._map,M=this._container,$=E.latLngToContainerPoint(E.getCenter()),Q=E.layerPointToContainerPoint(u),fe=this.options.direction,he=M.offsetWidth,Se=M.offsetHeight,Ae=j(this.options.offset),Ye=this._getAnchor();fe==="top"?(d=he/2,b=Se):fe==="bottom"?(d=he/2,b=0):fe==="center"?(d=he/2,b=Se/2):fe==="right"?(d=0,b=Se/2):fe==="left"?(d=he,b=Se/2):Q.x<$.x?(fe="right",d=0,b=Se/2):(fe="left",d=he+(Ae.x+Ye.x)*2,b=Se/2),u=u.subtract(j(d,b,!0)).add(Ae).add(Ye),Qt(M,"leaflet-tooltip-right"),Qt(M,"leaflet-tooltip-left"),Qt(M,"leaflet-tooltip-top"),Qt(M,"leaflet-tooltip-bottom"),Xe(M,"leaflet-tooltip-"+fe),an(M,u)},_updatePosition:function(){var u=this._map.latLngToLayerPoint(this._latlng);this._setPosition(u)},setOpacity:function(u){this.options.opacity=u,this._container&&Br(this._container,u)},_animateZoom:function(u){var d=this._map._latLngToNewLayerPoint(this._latlng,u.zoom,u.center);this._setPosition(d)},_getAnchor:function(){return j(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),e$=function(u,d){return new Dh(u,d)};ot.include({openTooltip:function(u,d,b){return this._initOverlay(Dh,u,d,b).openOn(this),this},closeTooltip:function(u){return u.close(),this}}),ui.include({bindTooltip:function(u,d){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(Dh,this._tooltip,u,d),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(u){if(!(!u&&this._tooltipHandlersAdded)){var d=u?"off":"on",b={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?b.add=this._openTooltip:(b.mouseover=this._openTooltip,b.mouseout=this.closeTooltip,b.click=this._openTooltip,this._map?this._addFocusListeners():b.add=this._addFocusListeners),this._tooltip.options.sticky&&(b.mousemove=this._moveTooltip),this[d](b),this._tooltipHandlersAdded=!u}},openTooltip:function(u){return this._tooltip&&(this instanceof oo||(this._tooltip._source=this),this._tooltip._prepareOpen(u)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(u){return this._tooltip&&this._tooltip.setContent(u),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(u){var d=u.getElement();d&&(Ze(d,"focus",function(){this._tooltip._source=u,this.openTooltip()},this),Ze(d,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(u){var d=u.getElement();d&&d.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(u){!this._tooltip||!this._map||this._map.dragging&&this._map.dragging.moving()||(this._tooltip._source=u.layer||u.target,this.openTooltip(this._tooltip.options.sticky?u.latlng:void 0))},_moveTooltip:function(u){var d=u.latlng,b,E;this._tooltip.options.sticky&&u.originalEvent&&(b=this._map.mouseEventToContainerPoint(u.originalEvent),E=this._map.containerPointToLayerPoint(b),d=this._map.layerPointToLatLng(E)),this._tooltip.setLatLng(d)}});var BT=_l.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(u){var d=u&&u.tagName==="DIV"?u:document.createElement("div"),b=this.options;if(b.html instanceof Element?(bh(d),d.appendChild(b.html)):d.innerHTML=b.html!==!1?b.html:"",b.bgPos){var E=j(b.bgPos);d.style.backgroundPosition=-E.x+"px "+-E.y+"px"}return this._setIconStyles(d,"icon"),d},createShadow:function(){return null}});function t$(u){return new BT(u)}_l.Default=mu;var gu=ui.extend({options:{tileSize:256,opacity:1,updateWhenIdle:He.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(u){y(this,u)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(u){u._addZoomLimit(this)},onRemove:function(u){this._removeAllTiles(),$t(this._container),u._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(gl(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(vl(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(u){return this.options.opacity=u,this._updateOpacity(),this},setZIndex:function(u){return this.options.zIndex=u,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var u=this._clampZoom(this._map.getZoom());u!==this._tileZoom&&(this._tileZoom=u,this._updateLevels()),this._update()}return this},getEvents:function(){var u={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=c(this._onMoveEnd,this.options.updateInterval,this)),u.move=this._onMove),this._zoomAnimated&&(u.zoomanim=this._animateZoom),u},createTile:function(){return document.createElement("div")},getTileSize:function(){var u=this.options.tileSize;return u instanceof G?u:new G(u,u)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(u){for(var d=this.getPane().children,b=-u(-1/0,1/0),E=0,M=d.length,$;Ethis.options.maxZoom||bE?this._retainParent(M,$,Q,E):!1)},_retainChildren:function(u,d,b,E){for(var M=2*u;M<2*u+2;M++)for(var $=2*d;$<2*d+2;$++){var Q=new G(M,$);Q.z=b+1;var fe=this._tileCoordsToKey(Q),he=this._tiles[fe];if(he&&he.active){he.retain=!0;continue}else he&&he.loaded&&(he.retain=!0);b+1this.options.maxZoom||this.options.minZoom!==void 0&&M1){this._setView(u,b);return}for(var Ye=M.min.y;Ye<=M.max.y;Ye++)for(var nt=M.min.x;nt<=M.max.x;nt++){var Ur=new G(nt,Ye);if(Ur.z=this._tileZoom,!!this._isValidTile(Ur)){var fa=this._tiles[this._tileCoordsToKey(Ur)];fa?fa.current=!0:Q.push(Ur)}}if(Q.sort(function(Go,e0){return Go.distanceTo($)-e0.distanceTo($)}),Q.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var jh=document.createDocumentFragment();for(nt=0;ntb.max.x)||!d.wrapLat&&(u.yb.max.y))return!1}if(!this.options.bounds)return!0;var E=this._tileCoordsToBounds(u);return q(this.options.bounds).overlaps(E)},_keyToBounds:function(u){return this._tileCoordsToBounds(this._keyToTileCoords(u))},_tileCoordsToNwSe:function(u){var d=this._map,b=this.getTileSize(),E=u.scaleBy(b),M=E.add(b),$=d.unproject(E,u.z),Q=d.unproject(M,u.z);return[$,Q]},_tileCoordsToBounds:function(u){var d=this._tileCoordsToNwSe(u),b=new H(d[0],d[1]);return this.options.noWrap||(b=this._map.wrapLatLngBounds(b)),b},_tileCoordsToKey:function(u){return u.x+":"+u.y+":"+u.z},_keyToTileCoords:function(u){var d=u.split(":"),b=new G(+d[0],+d[1]);return b.z=+d[2],b},_removeTile:function(u){var d=this._tiles[u];d&&($t(d.el),delete this._tiles[u],this.fire("tileunload",{tile:d.el,coords:this._keyToTileCoords(u)}))},_initTile:function(u){Xe(u,"leaflet-tile");var d=this.getTileSize();u.style.width=d.x+"px",u.style.height=d.y+"px",u.onselectstart=h,u.onmousemove=h,He.ielt9&&this.options.opacity<1&&Br(u,this.options.opacity)},_addTile:function(u,d){var b=this._getTilePos(u),E=this._tileCoordsToKey(u),M=this.createTile(this._wrapCoords(u),s(this._tileReady,this,u));this._initTile(M),this.createTile.length<2&&W(s(this._tileReady,this,u,null,M)),an(M,b),this._tiles[E]={el:M,coords:u,current:!0},d.appendChild(M),this.fire("tileloadstart",{tile:M,coords:u})},_tileReady:function(u,d,b){d&&this.fire("tileerror",{error:d,tile:b,coords:u});var E=this._tileCoordsToKey(u);b=this._tiles[E],b&&(b.loaded=+new Date,this._map._fadeAnimated?(Br(b.el,0),Y(this._fadeFrame),this._fadeFrame=W(this._updateOpacity,this)):(b.active=!0,this._pruneTiles()),d||(Xe(b.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:b.el,coords:u})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),He.ielt9||!this._map._fadeAnimated?W(this._pruneTiles,this):setTimeout(s(this._pruneTiles,this),250)))},_getTilePos:function(u){return u.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(u){var d=new G(this._wrapX?f(u.x,this._wrapX):u.x,this._wrapY?f(u.y,this._wrapY):u.y);return d.z=u.z,d},_pxBoundsToTileRange:function(u){var d=this.getTileSize();return new B(u.min.unscaleBy(d).floor(),u.max.unscaleBy(d).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var u in this._tiles)if(!this._tiles[u].loaded)return!1;return!0}});function n$(u){return new gu(u)}var xl=gu.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(u,d){this._url=u,d=y(this,d),d.detectRetina&&He.retina&&d.maxZoom>0?(d.tileSize=Math.floor(d.tileSize/2),d.zoomReverse?(d.zoomOffset--,d.minZoom=Math.min(d.maxZoom,d.minZoom+1)):(d.zoomOffset++,d.maxZoom=Math.max(d.minZoom,d.maxZoom-1)),d.minZoom=Math.max(0,d.minZoom)):d.zoomReverse?d.minZoom=Math.min(d.maxZoom,d.minZoom):d.maxZoom=Math.max(d.minZoom,d.maxZoom),typeof d.subdomains=="string"&&(d.subdomains=d.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(u,d){return this._url===u&&d===void 0&&(d=!0),this._url=u,d||this.redraw(),this},createTile:function(u,d){var b=document.createElement("img");return Ze(b,"load",s(this._tileOnLoad,this,d,b)),Ze(b,"error",s(this._tileOnError,this,d,b)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(b.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(b.referrerPolicy=this.options.referrerPolicy),b.alt="",b.src=this.getTileUrl(u),b},getTileUrl:function(u){var d={r:He.retina?"@2x":"",s:this._getSubdomain(u),x:u.x,y:u.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var b=this._globalTileRange.max.y-u.y;this.options.tms&&(d.y=b),d["-y"]=b}return w(this._url,i(d,this.options))},_tileOnLoad:function(u,d){He.ielt9?setTimeout(s(u,this,null,d),0):u(null,d)},_tileOnError:function(u,d,b){var E=this.options.errorTileUrl;E&&d.getAttribute("src")!==E&&(d.src=E),u(b,d)},_onTileRemove:function(u){u.tile.onload=null},_getZoomForUrl:function(){var u=this._tileZoom,d=this.options.maxZoom,b=this.options.zoomReverse,E=this.options.zoomOffset;return b&&(u=d-u),u+E},_getSubdomain:function(u){var d=Math.abs(u.x+u.y)%this.options.subdomains.length;return this.options.subdomains[d]},_abortLoading:function(){var u,d;for(u in this._tiles)if(this._tiles[u].coords.z!==this._tileZoom&&(d=this._tiles[u].el,d.onload=h,d.onerror=h,!d.complete)){d.src=P;var b=this._tiles[u].coords;$t(d),delete this._tiles[u],this.fire("tileabort",{tile:d,coords:b})}},_removeTile:function(u){var d=this._tiles[u];if(d)return d.el.setAttribute("src",P),gu.prototype._removeTile.call(this,u)},_tileReady:function(u,d,b){if(!(!this._map||b&&b.getAttribute("src")===P))return gu.prototype._tileReady.call(this,u,d,b)}});function zT(u,d){return new xl(u,d)}var UT=xl.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(u,d){this._url=u;var b=i({},this.defaultWmsParams);for(var E in d)E in this.options||(b[E]=d[E]);d=y(this,d);var M=d.detectRetina&&He.retina?2:1,$=this.getTileSize();b.width=$.x*M,b.height=$.y*M,this.wmsParams=b},onAdd:function(u){this._crs=this.options.crs||u.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var d=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[d]=this._crs.code,xl.prototype.onAdd.call(this,u)},getTileUrl:function(u){var d=this._tileCoordsToNwSe(u),b=this._crs,E=ne(b.project(d[0]),b.project(d[1])),M=E.min,$=E.max,Q=(this._wmsVersion>=1.3&&this._crs===DT?[M.y,M.x,$.y,$.x]:[M.x,M.y,$.x,$.y]).join(","),fe=xl.prototype.getTileUrl.call(this,u);return fe+x(this.wmsParams,fe,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+Q},setParams:function(u,d){return i(this.wmsParams,u),d||this.redraw(),this}});function r$(u,d){return new UT(u,d)}xl.WMS=UT,zT.wms=r$;var lo=ui.extend({options:{padding:.1},initialize:function(u){y(this,u),l(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&Xe(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var u={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(u.zoomanim=this._onAnimZoom),u},_onAnimZoom:function(u){this._updateTransform(u.center,u.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(u,d){var b=this._map.getZoomScale(d,this._zoom),E=this._map.getSize().multiplyBy(.5+this.options.padding),M=this._map.project(this._center,d),$=E.multiplyBy(-b).add(M).subtract(this._map._getNewPixelOrigin(u,d));He.any3d?sa(this._container,$,b):an(this._container,$)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var u in this._layers)this._layers[u]._reset()},_onZoomEnd:function(){for(var u in this._layers)this._layers[u]._project()},_updatePaths:function(){for(var u in this._layers)this._layers[u]._update()},_update:function(){var u=this.options.padding,d=this._map.getSize(),b=this._map.containerPointToLayerPoint(d.multiplyBy(-u)).round();this._bounds=new B(b,b.add(d.multiplyBy(1+u*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),VT=lo.extend({options:{tolerance:0},getEvents:function(){var u=lo.prototype.getEvents.call(this);return u.viewprereset=this._onViewPreReset,u},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){lo.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var u=this._container=document.createElement("canvas");Ze(u,"mousemove",this._onMouseMove,this),Ze(u,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Ze(u,"mouseout",this._handleMouseOut,this),u._leaflet_disable_events=!0,this._ctx=u.getContext("2d")},_destroyContainer:function(){Y(this._redrawRequest),delete this._ctx,$t(this._container),St(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var u;this._redrawBounds=null;for(var d in this._layers)u=this._layers[d],u._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){lo.prototype._update.call(this);var u=this._bounds,d=this._container,b=u.getSize(),E=He.retina?2:1;an(d,u.min),d.width=E*b.x,d.height=E*b.y,d.style.width=b.x+"px",d.style.height=b.y+"px",He.retina&&this._ctx.scale(2,2),this._ctx.translate(-u.min.x,-u.min.y),this.fire("update")}},_reset:function(){lo.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(u){this._updateDashArray(u),this._layers[l(u)]=u;var d=u._order={layer:u,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=d),this._drawLast=d,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(u){this._requestRedraw(u)},_removePath:function(u){var d=u._order,b=d.next,E=d.prev;b?b.prev=E:this._drawLast=E,E?E.next=b:this._drawFirst=b,delete u._order,delete this._layers[l(u)],this._requestRedraw(u)},_updatePath:function(u){this._extendRedrawBounds(u),u._project(),u._update(),this._requestRedraw(u)},_updateStyle:function(u){this._updateDashArray(u),this._requestRedraw(u)},_updateDashArray:function(u){if(typeof u.options.dashArray=="string"){var d=u.options.dashArray.split(/[, ]+/),b=[],E,M;for(M=0;M')}}catch{}return function(u){return document.createElement("<"+u+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),i$={_initContainer:function(){this._container=ft("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(lo.prototype._update.call(this),this.fire("update"))},_initPath:function(u){var d=u._container=vu("shape");Xe(d,"leaflet-vml-shape "+(this.options.className||"")),d.coordsize="1 1",u._path=vu("path"),d.appendChild(u._path),this._updateStyle(u),this._layers[l(u)]=u},_addPath:function(u){var d=u._container;this._container.appendChild(d),u.options.interactive&&u.addInteractiveTarget(d)},_removePath:function(u){var d=u._container;$t(d),u.removeInteractiveTarget(d),delete this._layers[l(u)]},_updateStyle:function(u){var d=u._stroke,b=u._fill,E=u.options,M=u._container;M.stroked=!!E.stroke,M.filled=!!E.fill,E.stroke?(d||(d=u._stroke=vu("stroke")),M.appendChild(d),d.weight=E.weight+"px",d.color=E.color,d.opacity=E.opacity,E.dashArray?d.dashStyle=S(E.dashArray)?E.dashArray.join(" "):E.dashArray.replace(/( *, *)/g," "):d.dashStyle="",d.endcap=E.lineCap.replace("butt","flat"),d.joinstyle=E.lineJoin):d&&(M.removeChild(d),u._stroke=null),E.fill?(b||(b=u._fill=vu("fill")),M.appendChild(b),b.color=E.fillColor||E.color,b.opacity=E.fillOpacity):b&&(M.removeChild(b),u._fill=null)},_updateCircle:function(u){var d=u._point.round(),b=Math.round(u._radius),E=Math.round(u._radiusY||b);this._setPath(u,u._empty()?"M0 0":"AL "+d.x+","+d.y+" "+b+","+E+" 0,"+65535*360)},_setPath:function(u,d){u._path.v=d},_bringToFront:function(u){gl(u._container)},_bringToBack:function(u){vl(u._container)}},Ah=He.vml?vu:Le,yu=lo.extend({_initContainer:function(){this._container=Ah("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Ah("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){$t(this._container),St(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){lo.prototype._update.call(this);var u=this._bounds,d=u.getSize(),b=this._container;(!this._svgSize||!this._svgSize.equals(d))&&(this._svgSize=d,b.setAttribute("width",d.x),b.setAttribute("height",d.y)),an(b,u.min),b.setAttribute("viewBox",[u.min.x,u.min.y,d.x,d.y].join(" ")),this.fire("update")}},_initPath:function(u){var d=u._path=Ah("path");u.options.className&&Xe(d,u.options.className),u.options.interactive&&Xe(d,"leaflet-interactive"),this._updateStyle(u),this._layers[l(u)]=u},_addPath:function(u){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(u._path),u.addInteractiveTarget(u._path)},_removePath:function(u){$t(u._path),u.removeInteractiveTarget(u._path),delete this._layers[l(u)]},_updatePath:function(u){u._project(),u._update()},_updateStyle:function(u){var d=u._path,b=u.options;d&&(b.stroke?(d.setAttribute("stroke",b.color),d.setAttribute("stroke-opacity",b.opacity),d.setAttribute("stroke-width",b.weight),d.setAttribute("stroke-linecap",b.lineCap),d.setAttribute("stroke-linejoin",b.lineJoin),b.dashArray?d.setAttribute("stroke-dasharray",b.dashArray):d.removeAttribute("stroke-dasharray"),b.dashOffset?d.setAttribute("stroke-dashoffset",b.dashOffset):d.removeAttribute("stroke-dashoffset")):d.setAttribute("stroke","none"),b.fill?(d.setAttribute("fill",b.fillColor||b.color),d.setAttribute("fill-opacity",b.fillOpacity),d.setAttribute("fill-rule",b.fillRule||"evenodd")):d.setAttribute("fill","none"))},_updatePoly:function(u,d){this._setPath(u,ue(u._parts,d))},_updateCircle:function(u){var d=u._point,b=Math.max(Math.round(u._radius),1),E=Math.max(Math.round(u._radiusY),1)||b,M="a"+b+","+E+" 0 1,0 ",$=u._empty()?"M0 0":"M"+(d.x-b)+","+d.y+M+b*2+",0 "+M+-b*2+",0 ";this._setPath(u,$)},_setPath:function(u,d){u._path.setAttribute("d",d)},_bringToFront:function(u){gl(u._path)},_bringToBack:function(u){vl(u._path)}});He.vml&&yu.include(i$);function WT(u){return He.svg||He.vml?new yu(u):null}ot.include({getRenderer:function(u){var d=u.options.renderer||this._getPaneRenderer(u.options.pane)||this.options.renderer||this._renderer;return d||(d=this._renderer=this._createRenderer()),this.hasLayer(d)||this.addLayer(d),d},_getPaneRenderer:function(u){if(u==="overlayPane"||u===void 0)return!1;var d=this._paneRenderers[u];return d===void 0&&(d=this._createRenderer({pane:u}),this._paneRenderers[u]=d),d},_createRenderer:function(u){return this.options.preferCanvas&&HT(u)||WT(u)}});var YT=bl.extend({initialize:function(u,d){bl.prototype.initialize.call(this,this._boundsToLatLngs(u),d)},setBounds:function(u){return this.setLatLngs(this._boundsToLatLngs(u))},_boundsToLatLngs:function(u){return u=q(u),[u.getSouthWest(),u.getNorthWest(),u.getNorthEast(),u.getSouthEast()]}});function o$(u,d){return new YT(u,d)}yu.create=Ah,yu.pointsToPath=ue,ao.geometryToLayer=Ph,ao.coordsToLatLng=X_,ao.coordsToLatLngs=kh,ao.latLngToCoords=Q_,ao.latLngsToCoords=Mh,ao.getFeature=wl,ao.asFeature=Rh,ot.mergeOptions({boxZoom:!0});var qT=Di.extend({initialize:function(u){this._map=u,this._container=u._container,this._pane=u._panes.overlayPane,this._resetStateTimeout=0,u.on("unload",this._destroy,this)},addHooks:function(){Ze(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){St(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){$t(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(u){if(!u.shiftKey||u.which!==1&&u.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),cu(),A_(),this._startPoint=this._map.mouseEventToContainerPoint(u),Ze(document,{contextmenu:ca,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(u){this._moved||(this._moved=!0,this._box=ft("div","leaflet-zoom-box",this._container),Xe(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(u);var d=new B(this._point,this._startPoint),b=d.getSize();an(this._box,d.min),this._box.style.width=b.x+"px",this._box.style.height=b.y+"px"},_finish:function(){this._moved&&($t(this._box),Qt(this._container,"leaflet-crosshair")),uu(),j_(),St(document,{contextmenu:ca,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(u){if(!(u.which!==1&&u.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(s(this._resetState,this),0);var d=new H(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(d).fire("boxzoomend",{boxZoomBounds:d})}},_onKeyDown:function(u){u.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});ot.addInitHook("addHandler","boxZoom",qT),ot.mergeOptions({doubleClickZoom:!0});var GT=Di.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(u){var d=this._map,b=d.getZoom(),E=d.options.zoomDelta,M=u.originalEvent.shiftKey?b-E:b+E;d.options.doubleClickZoom==="center"?d.setZoom(M):d.setZoomAround(u.containerPoint,M)}});ot.addInitHook("addHandler","doubleClickZoom",GT),ot.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var ZT=Di.extend({addHooks:function(){if(!this._draggable){var u=this._map;this._draggable=new Yo(u._mapPane,u._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),u.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),u.on("zoomend",this._onZoomEnd,this),u.whenReady(this._onZoomEnd,this))}Xe(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Qt(this._map._container,"leaflet-grab"),Qt(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var u=this._map;if(u._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var d=q(this._map.options.maxBounds);this._offsetLimit=ne(this._map.latLngToContainerPoint(d.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(d.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;u.fire("movestart").fire("dragstart"),u.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(u){if(this._map.options.inertia){var d=this._lastTime=+new Date,b=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(b),this._times.push(d),this._prunePositions(d)}this._map.fire("move",u).fire("drag",u)},_prunePositions:function(u){for(;this._positions.length>1&&u-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var u=this._map.getSize().divideBy(2),d=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=d.subtract(u).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(u,d){return u-(u-d)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var u=this._draggable._newPos.subtract(this._draggable._startPos),d=this._offsetLimit;u.xd.max.x&&(u.x=this._viscousLimit(u.x,d.max.x)),u.y>d.max.y&&(u.y=this._viscousLimit(u.y,d.max.y)),this._draggable._newPos=this._draggable._startPos.add(u)}},_onPreDragWrap:function(){var u=this._worldWidth,d=Math.round(u/2),b=this._initialWorldOffset,E=this._draggable._newPos.x,M=(E-d+b)%u+d-b,$=(E+d+b)%u-d-b,Q=Math.abs(M+b)0?$:-$))-d;this._delta=0,this._startTime=null,Q&&(u.options.scrollWheelZoom==="center"?u.setZoom(d+Q):u.setZoomAround(this._lastMousePos,d+Q))}});ot.addInitHook("addHandler","scrollWheelZoom",XT);var s$=600;ot.mergeOptions({tapHold:He.touchNative&&He.safari&&He.mobile,tapTolerance:15});var QT=Di.extend({addHooks:function(){Ze(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){St(this._map._container,"touchstart",this._onDown,this)},_onDown:function(u){if(clearTimeout(this._holdTimeout),u.touches.length===1){var d=u.touches[0];this._startPos=this._newPos=new G(d.clientX,d.clientY),this._holdTimeout=setTimeout(s(function(){this._cancel(),this._isTapValid()&&(Ze(document,"touchend",In),Ze(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",d))},this),s$),Ze(document,"touchend touchcancel contextmenu",this._cancel,this),Ze(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function u(){St(document,"touchend",In),St(document,"touchend touchcancel",u)},_cancel:function(){clearTimeout(this._holdTimeout),St(document,"touchend touchcancel contextmenu",this._cancel,this),St(document,"touchmove",this._onMove,this)},_onMove:function(u){var d=u.touches[0];this._newPos=new G(d.clientX,d.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(u,d){var b=new MouseEvent(u,{bubbles:!0,cancelable:!0,view:window,screenX:d.screenX,screenY:d.screenY,clientX:d.clientX,clientY:d.clientY});b._simulated=!0,d.target.dispatchEvent(b)}});ot.addInitHook("addHandler","tapHold",QT),ot.mergeOptions({touchZoom:He.touch,bounceAtZoomLimits:!0});var JT=Di.extend({addHooks:function(){Xe(this._map._container,"leaflet-touch-zoom"),Ze(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Qt(this._map._container,"leaflet-touch-zoom"),St(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(u){var d=this._map;if(!(!u.touches||u.touches.length!==2||d._animatingZoom||this._zooming)){var b=d.mouseEventToContainerPoint(u.touches[0]),E=d.mouseEventToContainerPoint(u.touches[1]);this._centerPoint=d.getSize()._divideBy(2),this._startLatLng=d.containerPointToLatLng(this._centerPoint),d.options.touchZoom!=="center"&&(this._pinchStartLatLng=d.containerPointToLatLng(b.add(E)._divideBy(2))),this._startDist=b.distanceTo(E),this._startZoom=d.getZoom(),this._moved=!1,this._zooming=!0,d._stop(),Ze(document,"touchmove",this._onTouchMove,this),Ze(document,"touchend touchcancel",this._onTouchEnd,this),In(u)}},_onTouchMove:function(u){if(!(!u.touches||u.touches.length!==2||!this._zooming)){var d=this._map,b=d.mouseEventToContainerPoint(u.touches[0]),E=d.mouseEventToContainerPoint(u.touches[1]),M=b.distanceTo(E)/this._startDist;if(this._zoom=d.getScaleZoom(M,this._startZoom),!d.options.bounceAtZoomLimits&&(this._zoomd.getMaxZoom()&&M>1)&&(this._zoom=d._limitZoom(this._zoom)),d.options.touchZoom==="center"){if(this._center=this._startLatLng,M===1)return}else{var $=b._add(E)._divideBy(2)._subtract(this._centerPoint);if(M===1&&$.x===0&&$.y===0)return;this._center=d.unproject(d.project(this._pinchStartLatLng,this._zoom).subtract($),this._zoom)}this._moved||(d._moveStart(!0,!1),this._moved=!0),Y(this._animRequest);var Q=s(d._move,d,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=W(Q,this,!0),In(u)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,Y(this._animRequest),St(document,"touchmove",this._onTouchMove,this),St(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});ot.addInitHook("addHandler","touchZoom",JT),ot.BoxZoom=qT,ot.DoubleClickZoom=GT,ot.Drag=ZT,ot.Keyboard=KT,ot.ScrollWheelZoom=XT,ot.TapHold=QT,ot.TouchZoom=JT,n.Bounds=B,n.Browser=He,n.CRS=pe,n.Canvas=VT,n.Circle=K_,n.CircleMarker=Oh,n.Class=Z,n.Control=ci,n.DivIcon=BT,n.DivOverlay=Ai,n.DomEvent=CF,n.DomUtil=xF,n.Draggable=Yo,n.Evented=oe,n.FeatureGroup=oo,n.GeoJSON=ao,n.GridLayer=gu,n.Handler=Di,n.Icon=_l,n.ImageOverlay=Nh,n.LatLng=te,n.LatLngBounds=H,n.Layer=ui,n.LayerGroup=yl,n.LineUtil=jF,n.Map=ot,n.Marker=Th,n.Mixin=RF,n.Path=qo,n.Point=G,n.PolyUtil=IF,n.Polygon=bl,n.Polyline=so,n.Popup=Lh,n.PosAnimation=xT,n.Projection=FF,n.Rectangle=YT,n.Renderer=lo,n.SVG=yu,n.SVGOverlay=$T,n.TileLayer=xl,n.Tooltip=Dh,n.Transformation=X,n.Util=J,n.VideoOverlay=FT,n.bind=s,n.bounds=ne,n.canvas=HT,n.circle=YF,n.circleMarker=WF,n.control=hu,n.divIcon=t$,n.extend=i,n.featureGroup=UF,n.geoJSON=IT,n.geoJson=ZF,n.gridLayer=n$,n.icon=VF,n.imageOverlay=KF,n.latLng=se,n.latLngBounds=q,n.layerGroup=zF,n.map=EF,n.marker=HF,n.point=j,n.polygon=GF,n.polyline=qF,n.popup=JF,n.rectangle=o$,n.setOptions=y,n.stamp=l,n.svg=WT,n.svgOverlay=QF,n.tileLayer=zT,n.tooltip=e$,n.transformation=K,n.version=r,n.videoOverlay=XF;var a$=window.L;n.noConflict=function(){return window.L=a$,this},window.L=n})})(v2,v2.exports);var ph=v2.exports;const SL=ri(ph);function iT(e,t,n){return Object.freeze({instance:e,context:t,container:n})}function oT(e,t){return t==null?function(r,i){const o=V.useRef();return o.current||(o.current=e(r,i)),o}:function(r,i){const o=V.useRef();o.current||(o.current=e(r,i));const s=V.useRef(r),{instance:a}=o.current;return V.useEffect(function(){s.current!==r&&(t(a,r,s.current),s.current=r)},[a,r,i]),o}}function K0e(e,t){V.useEffect(function(){return(t.layerContainer??t.map).addLayer(e.instance),function(){var o;(o=t.layerContainer)==null||o.removeLayer(e.instance),t.map.removeLayer(e.instance)}},[t,e])}function X8(e){return function(n){const r=Z8(),i=e(rT(n,r),r);return Y8(r.map,n.attribution),K8(i.current,n.eventHandlers),K0e(i.current,r),i}}function X0e(e,t){const n=oT(e,t),r=X8(n);return Y0e(r)}function Q0e(e,t){const n=oT(e),r=Z0e(n,t);return q0e(r)}function J0e(e,t){const n=oT(e,t),r=X8(n);return G0e(r)}function e1e(e,t,n){const{opacity:r,zIndex:i}=t;r!=null&&r!==n.opacity&&e.setOpacity(r),i!=null&&i!==n.zIndex&&e.setZIndex(i)}function y2(){return y2=Object.assign||function(e){for(var t=1;t(m==null?void 0:m.map)??null,[m]);const y=V.useCallback(_=>{if(_!==null&&m===null){const w=new ph.Map(_,f);n!=null&&c!=null?w.setView(n,c):e!=null&&w.fitBounds(e,t),l!=null&&w.whenReady(l),v(H0e(w))}},[]);V.useEffect(()=>()=>{m==null||m.map.remove()},[m]);const x=m?U.createElement(G8,{value:m},r):s??null;return U.createElement("div",y2({},p,{ref:y}),x)}const n1e=V.forwardRef(t1e),r1e=X0e(function({position:t,...n},r){const i=new ph.Marker(t,n);return iT(i,W0e(r,{overlayContainer:i}))},function(t,n,r){n.position!==r.position&&t.setLatLng(n.position),n.icon!=null&&n.icon!==r.icon&&t.setIcon(n.icon),n.zIndexOffset!=null&&n.zIndexOffset!==r.zIndexOffset&&t.setZIndexOffset(n.zIndexOffset),n.opacity!=null&&n.opacity!==r.opacity&&t.setOpacity(n.opacity),t.dragging!=null&&n.draggable!==r.draggable&&(n.draggable===!0?t.dragging.enable():t.dragging.disable())}),i1e=Q0e(function(t,n){const r=new ph.Popup(t,n.overlayContainer);return iT(r,n)},function(t,n,{position:r},i){V.useEffect(function(){const{instance:s}=t;function a(c){c.popup===s&&(s.update(),i(!0))}function l(c){c.popup===s&&i(!1)}return n.map.on({popupopen:a,popupclose:l}),n.overlayContainer==null?(r!=null&&s.setLatLng(r),s.openOn(n.map)):n.overlayContainer.bindPopup(s),function(){var f;n.map.off({popupopen:a,popupclose:l}),(f=n.overlayContainer)==null||f.unbindPopup(),n.map.removeLayer(s)}},[t,n,i,r])}),o1e=J0e(function({url:t,...n},r){const i=new ph.TileLayer(t,rT(n,r));return iT(i,r)},function(t,n,r){e1e(t,n,r);const{url:i}=n;i!=null&&i!==r.url&&t.setUrl(i)});const s1e=()=>g.jsx(o1e,{attribution:'© OpenStreetMap contributors',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),a1e=e=>{if(e.length===0)return{};if(e.length>1)return{bounds:e.map(at("latLong"))};const[{latLong:t}]=e;return{zoom:10,center:t}},Q8=({toggle:e,isOpen:t,title:n,locations:r=[]})=>g.jsx(Vo,{toggle:e,isOpen:t,className:"map-modal__modal",contentClassName:"map-modal__modal-content",children:g.jsxs(Mi,{className:"map-modal__modal-body",children:[g.jsxs("h3",{className:"map-modal__modal-title",children:[n,g.jsx("button",{type:"button",className:"btn-close float-end","aria-label":"Close",onClick:e})]}),g.jsxs(n1e,{...a1e(r),children:[g.jsx(s1e,{}),r.map(({cityName:i,latLong:o,count:s},a)=>g.jsx(r1e,{position:o,children:g.jsxs(i1e,{children:[g.jsx("b",{children:s})," visit",s>1?"s":""," from ",g.jsx("b",{children:i})]})},a))]})]})});const l1e=({modalTitle:e,activeCities:t,locations:n=[]})=>{const[r,,i,o]=hn(),[s,a,l]=hn(),[c,f]=V.useState([]),h=v_(),p=y=>t?y.filter(({cityName:x})=>t==null?void 0:t.includes(x)):y,m=()=>{if(!t){f(n),i();return}l()},v=y=>()=>{f(y?p(n):n),i()};return g.jsxs(g.Fragment,{children:[g.jsx(ht,{color:"link",className:"open-map-modal-btn__btn",id:h,onClick:m,children:g.jsx(je,{icon:Jj})}),g.jsx(Er,{placement:"left",target:h,children:"Show in map"}),g.jsx(Jc,{isOpen:s,toggle:a,inNavbar:!0,children:g.jsxs(eu,{end:!0,children:[g.jsx(Ue,{onClick:v(!1),children:"Show all locations"}),g.jsx(Ue,{onClick:v(!0),children:"Show locations in current page"})]})}),g.jsx(Q8,{toggle:o,isOpen:r,title:e,locations:c})]})},c1e=({onChange:e,selected:t={},className:n,isOrphanVisits:r})=>{const{orphanVisitsType:i,excludeBots:o=!1}=t,s=l=>({active:i===l,onClick:()=>e({...t,orphanVisitsType:l===(t==null?void 0:t.orphanVisitsType)?void 0:l})}),a=()=>e({...t,excludeBots:!(t!=null&&t.excludeBots)});return g.jsxs(Ho,{text:"Filters",dropdownClassName:n,inline:!0,end:!0,minWidth:250,children:[g.jsx(Ue,{header:!0,children:"Bots:"}),g.jsx(Ue,{active:o,onClick:a,children:"Exclude potential bots"}),r&&g.jsxs(g.Fragment,{children:[g.jsx(Ue,{divider:!0}),g.jsx(Ue,{header:!0,children:"Orphan visits type:"}),g.jsx(Ue,{...s("base_url"),children:"Base URL"}),g.jsx(Ue,{...s("invalid_short_url"),children:"Invalid short URL"}),g.jsx(Ue,{...s("regular_404"),children:"Regular 404"})]}),g.jsx(Ue,{divider:!0}),g.jsx(Ue,{disabled:!vi(t),onClick:()=>e({excludeBots:!1,orphanVisitsType:void 0}),children:g.jsx("i",{children:"Clear filters"})})]})},J8=(e,t)=>!$o(e)&&vi(e[t]),CL=e=>typeof e=="number"?e:e?parseFloat(e):0,u1e=(e,{os:t})=>{e[t]=(e[t]||0)+1},f1e=(e,{browser:t})=>{e[t]=(e[t]||0)+1},d1e=(e,{referer:t})=>{e[t]=(e[t]||0)+1},eF=e=>(t,n)=>{const i=J8(n,e)?n[e]:"Unknown";t[i]=(t[i]||0)+1},h1e=eF("country"),p1e=eF("city"),m1e=(e,t)=>{if(!J8(t,"city")||t.city==="Unknown")return;const{city:n,latitude:r,longitude:i}=t,o=e[n]||{cityName:n,count:0,latLong:[CL(r),CL(i)]};o.count+=1,e[n]=o},g1e=(e,t)=>{if(!n0e(t))return;const{visitedUrl:n}=t;e[n]=(e[n]||0)+1},tF=e=>e.reduce((t,n)=>(u1e(t.os,n),f1e(t.browsers,n),d1e(t.referrers,n),h1e(t.countries,n),p1e(t.cities,n),m1e(t.citiesForMap,n),g1e(t.visitedUrls,n),t),{os:{},browsers:{},referrers:{},countries:{},cities:{},citiesForMap:{},visitedUrls:{}}),nF=Bd(e=>{const{userAgent:t,date:n,referer:r,visitLocation:i,potentialBot:o}=e,s={date:n,potentialBot:o,...S0e(t),referer:C0e(r),country:(i==null?void 0:i.countryName)||"Unknown",city:(i==null?void 0:i.cityName)||"Unknown",latitude:i==null?void 0:i.latitude,longitude:i==null?void 0:i.longitude};return JE(e)?{...s,type:e.type,visitedUrl:e.visitedUrl}:s}),v1e=Object.freeze(Object.defineProperty({__proto__:null,normalizeVisits:nF,processStatsFromVisits:tF},Symbol.toStringTag,{value:"Module"}));const ef=20,y1e=({browser:e,os:t,referer:n,country:r,city:i,...o},s)=>`${e} ${t} ${n} ${r} ${i} ${o.visitedUrl}`.toLowerCase().includes(s.toLowerCase()),_1e=(e,t)=>t.filter(n=>y1e(n,e)),b1e=(e,t)=>Nj(t,e),w1e=(e,t,n)=>{const r=t?_1e(t,e):[...e],i=b1e(n,r),o=i.length;return{visitsGroups:ad(ef,i),total:o}},x1e=({visits:e,selectedVisits:t=[],setSelectedVisits:n,matchMedia:r=window.matchMedia,isOrphanVisits:i=!1})=>{var k,N;const o="visits-table__header-cell visits-table__sticky",s=()=>r("(max-width: 767px)").matches,[a,l]=V.useState(s()),[c,f]=V.useState(void 0),[h,p]=V.useState({}),m=V.useMemo(()=>w1e(e,c,h),[c,h]),v=V.useRef(!0),[y,x]=V.useState(1),_=y*ef,w=_-ef,S=8+Number(i),T=D=>()=>p({field:D,dir:e_(D,h.field,h.dir)}),P=D=>g.jsx(Rf,{currentOrder:h,field:D,className:"visits-table__header-icon"});return V.useEffect(()=>{const D=()=>l(s());return window.addEventListener("resize",D),()=>window.removeEventListener("resize",D)},[]),V.useEffect(()=>{x(1),!v.current&&n([]),v.current=!1},[c]),g.jsx("div",{className:"table-responsive-md",children:g.jsxs("table",{className:"table table-bordered table-hover table-sm visits-table",children:[g.jsxs("thead",{className:"visits-table__header",children:[g.jsxs("tr",{children:[g.jsx("th",{className:`${o} text-center`,onClick:()=>n(t.length0})})}),g.jsxs("th",{className:`${o} text-center`,onClick:T("potentialBot"),children:[g.jsx(je,{icon:_M}),P("potentialBot")]}),g.jsxs("th",{className:o,onClick:T("date"),children:["Date",P("date")]}),g.jsxs("th",{className:o,onClick:T("country"),children:["Country",P("country")]}),g.jsxs("th",{className:o,onClick:T("city"),children:["City",P("city")]}),g.jsxs("th",{className:o,onClick:T("browser"),children:["Browser",P("browser")]}),g.jsxs("th",{className:o,onClick:T("os"),children:["OS",P("os")]}),g.jsxs("th",{className:o,onClick:T("referer"),children:["Referrer",P("referer")]}),i&&g.jsxs("th",{className:o,onClick:T("visitedUrl"),children:["Visited URL",P("visitedUrl")]})]}),g.jsx("tr",{children:g.jsx("td",{colSpan:S,className:"p-0",children:g.jsx(ih,{noBorder:!0,large:!1,onChange:f})})})]}),g.jsxs("tbody",{children:[!((k=m.visitsGroups[y-1])!=null&&k.length)&&g.jsx("tr",{children:g.jsx("td",{colSpan:S,className:"text-center",children:"No visits found with current filtering"})}),(N=m.visitsGroups[y-1])==null?void 0:N.map((D,z)=>{const A=t.includes(D);return g.jsxs("tr",{style:{cursor:"pointer"},className:me({"table-active":A}),onClick:()=>n(A?t.filter(W=>W!==D):[...t,D]),children:[g.jsx("td",{className:"text-center",children:A&&g.jsx(je,{icon:cd,className:"text-primary"})}),g.jsx("td",{className:"text-center",children:D.potentialBot&&g.jsxs(g.Fragment,{children:[g.jsx(je,{icon:_M,id:`botIcon${z}`}),g.jsx(Er,{placement:"right",target:`botIcon${z}`,children:"Potentially a visit from a bot or crawler"})]})}),g.jsx("td",{children:g.jsx(ny,{date:D.date})}),g.jsx("td",{children:D.country}),g.jsx("td",{children:D.city}),g.jsx("td",{children:D.browser}),g.jsx("td",{children:D.os}),g.jsx("td",{children:D.referer}),i&&g.jsx("td",{children:D.visitedUrl})]},z)})]}),m.total>ef&&g.jsx("tfoot",{children:g.jsx("tr",{children:g.jsx("td",{colSpan:S,className:"visits-table__footer-cell visits-table__sticky",children:g.jsxs("div",{className:"row",children:[g.jsx("div",{className:"col-md-6",children:g.jsx(qE,{pagesCount:Math.ceil(m.total/ef),currentPage:y,setCurrentPage:x,centered:a})}),g.jsx("div",{className:me("col-md-6",{"d-flex align-items-center flex-row-reverse":!a,"text-center mt-3":a}),children:g.jsxs("div",{children:["Visits ",g.jsx("b",{children:_n(w+1)})," to"," ",g.jsx("b",{children:_n(kj(_,m.total))})," of"," ",g.jsx("b",{children:_n(m.total)})]})})]})})})})]})})},jl={byTime:{title:"By time",subPath:"by-time",icon:YX},byContext:{title:"By context",subPath:"by-context",icon:uC},byLocation:{title:"By location",subPath:"by-location",icon:Jj},list:{title:"List",subPath:"list",icon:Qj}};let $p;const mh=({children:e,visitsInfo:t,getVisits:n,cancelGetVisits:r,settings:i,exportCsv:o,isOrphanVisits:s=!1})=>{var H;const{visits:a,loading:l,loadingLarge:c,error:f,errorData:h,progress:p,fallbackInterval:m}=t,[{dateRange:v,visitsFilter:y},x]=U0e(),_=Dt(({startDate:q,endDate:te})=>({dateRange:{startDate:q??void 0,endDate:te??void 0}}),x),w=V.useRef(v??m??((H=i.visits)==null?void 0:H.defaultInterval)??"last30Days"),[S,T]=V.useState([]),[P,k]=V.useState(),N=V.useRef(!0),{search:D}=Pn(),z=q=>q?`${q}${D}`:D,A=V.useMemo(()=>nF(a),[a]),{os:W,browsers:Y,referrers:J,countries:Z,cities:ee,citiesForMap:ie,visitedUrls:oe}=V.useMemo(()=>tF(A),[A]),G=V.useMemo(()=>{var q;return{...y,excludeBots:y.excludeBots??((q=i.visits)==null?void 0:q.excludeBots)}},[y]),F=Kc(ie),j=q=>{$p=void 0,T(q)},B=q=>te=>{const se=`${q}_${te}`;$p===se?(T([]),k(void 0),$p=void 0):(T(A.filter(bZ(q,te))),k(te),$p=se)};V.useEffect(()=>r,[]),V.useEffect(()=>{const q=N.current?v??ipe(w.current):v;n({dateRange:q,filter:G},N.current),N.current=!1},[v,y]),V.useEffect(()=>{var q;m&&w.current===(((q=i.visits)==null?void 0:q.defaultInterval)??"last30Days")&&(w.current=m)},[m]);const ne=()=>c?g.jsxs(Co,{loading:!0,children:["This is going to take a while... :S",g.jsx(XC,{value:p,striped:p===100,className:"mt-3"})]}):l?g.jsx(Co,{loading:!0}):f?g.jsx(Nr,{type:"error",children:g.jsx(Do,{errorData:h,fallbackMessage:"An error occurred while loading visits :("})}):Wn(a)?g.jsx(Co,{children:"There are no visits matching current filter"}):g.jsxs(g.Fragment,{children:[g.jsx(z5,{fill:!0,children:Object.values(jl).map(({title:q,icon:te,subPath:se},pe)=>g.jsxs(kf,{to:z(se),replace:!0,children:[g.jsx(je,{icon:te}),g.jsx("span",{className:"ms-2 d-none d-sm-inline",children:q})]},pe))}),g.jsx(Qn,{children:g.jsxs(Zy,{children:[g.jsx(gt,{path:jl.byTime.subPath,element:g.jsx("div",{className:"col-12 mt-3",children:g.jsx(N0e,{title:"Visits during time",visits:A,highlightedVisits:S,highlightedLabel:P,setSelectedVisits:j})})}),g.jsx(gt,{path:jl.byContext.subPath,element:g.jsxs(g.Fragment,{children:[g.jsx("div",{className:me("mt-3 col-lg-6",{"col-xl-4":!s}),children:g.jsx(gL,{title:"Operating systems",stats:W})}),g.jsx("div",{className:me("mt-3 col-lg-6",{"col-xl-4":!s}),children:g.jsx(gL,{title:"Browsers",stats:Y})}),g.jsx("div",{className:me("mt-3",{"col-xl-4":!s,"col-lg-6":s}),children:g.jsx(Fp,{title:"Referrers",stats:J,withPagination:!1,highlightedStats:jp(S,"referer"),highlightedLabel:P,sortingItems:{name:"Referrer name",amount:"Visits amount"},onClick:B("referer")})}),s&&g.jsx("div",{className:"mt-3 col-lg-6",children:g.jsx(Fp,{title:"Visited URLs",stats:oe,highlightedLabel:P,highlightedStats:jp(S,"visitedUrl"),sortingItems:{visitedUrl:"Visited URL",amount:"Visits amount"},onClick:B("visitedUrl")})})]})}),g.jsx(gt,{path:jl.byLocation.subPath,element:g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"col-lg-6 mt-3",children:g.jsx(Fp,{title:"Countries",stats:Z,highlightedStats:jp(S,"country"),highlightedLabel:P,sortingItems:{name:"Country name",amount:"Visits amount"},onClick:B("country")})}),g.jsx("div",{className:"col-lg-6 mt-3",children:g.jsx(Fp,{title:"Cities",stats:ee,highlightedStats:jp(S,"city"),highlightedLabel:P,extraHeaderContent:q=>F.length>0&&g.jsx(l1e,{modalTitle:"Cities",locations:F,activeCities:q}),sortingItems:{name:"City name",amount:"Visits amount"},onClick:B("city")})})]})}),g.jsx(gt,{path:jl.list.subPath,element:g.jsx("div",{className:"col-12",children:g.jsx(x1e,{visits:A,selectedVisits:S,setSelectedVisits:j,isOrphanVisits:s})})}),g.jsx(gt,{path:"*",element:g.jsx(BS,{replace:!0,to:z(jl.byTime.subPath)})})]})})]});return g.jsxs(g.Fragment,{children:[e,g.jsx("section",{className:"mt-3",children:g.jsxs("div",{className:"row flex-md-row-reverse",children:[g.jsx("div",{className:"col-lg-7 col-xl-6",children:g.jsxs("div",{className:"d-md-flex",children:[g.jsx("div",{className:"flex-fill",children:g.jsx(m8,{updatable:!0,disabled:l,initialDateRange:w.current,defaultText:"All visits",onDatesChange:_})}),g.jsx(c1e,{className:"ms-0 ms-md-2 mt-3 mt-md-0",isOrphanVisits:s,selected:G,onChange:q=>x({visitsFilter:q})})]})}),a.length>0&&g.jsx("div",{className:"col-lg-5 col-xl-6 mt-3 mt-lg-0",children:g.jsxs("div",{className:"d-flex",children:[g.jsx(Z5,{className:"btn-md-block",amount:A.length,onClick:()=>o(A)}),g.jsxs(ht,{outline:!0,disabled:S.length===0,className:"btn-md-block ms-2",onClick:()=>j([]),children:["Clear selection ",S.length>0&&g.jsxs(g.Fragment,{children:["(",_n(S.length),")"]})]})]})})]})}),g.jsx("section",{className:"mt-3",children:ne()})]})},S1e=({exportVisits:e})=>ra(({getDomainVisits:t,domainVisits:n,cancelGetDomainVisits:r,settings:i})=>{const o=na(),{domain:s=""}=Xs(),[a,l=a]=s.split("_"),c=(h,p)=>t({domain:l,query:dh(h),doIntervalFallback:p}),f=h=>e(`domain_${a}_visits.csv`,h);return g.jsx(mh,{getVisits:c,cancelGetVisits:r,visitsInfo:n,settings:i,exportCsv:f,children:g.jsx(hh,{goBack:o,visits:n.visits,title:`"${a}" visits`})})},()=>[Xr.visits]),C1e=({exportVisits:e})=>ra(({getNonOrphanVisits:t,nonOrphanVisits:n,cancelGetNonOrphanVisits:r,settings:i})=>{const o=na(),s=l=>e("non_orphan_visits.csv",l),a=(l,c)=>t({query:dh(l),doIntervalFallback:c});return g.jsx(mh,{getVisits:a,cancelGetVisits:r,visitsInfo:n,settings:i,exportCsv:s,children:g.jsx(hh,{title:"Non-orphan visits",goBack:o,visits:n.visits})})},()=>[Xr.visits]),E1e=({exportVisits:e})=>ra(({getOrphanVisits:t,orphanVisits:n,cancelGetOrphanVisits:r,settings:i})=>{const o=na(),s=l=>e("orphan_visits.csv",l),a=(l,c)=>{var f;return t({query:dh(l),orphanVisitsType:(f=l.filter)==null?void 0:f.orphanVisitsType,doIntervalFallback:c})};return g.jsx(mh,{getVisits:a,cancelGetVisits:r,visitsInfo:n,settings:i,exportCsv:s,isOrphanVisits:!0,children:g.jsx(hh,{title:"Orphan visits",goBack:o,visits:n.visits})})},()=>[Xr.orphanVisits]),rF="shlink/orphanVisits",T1e={visits:[],loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},O1e=e=>lh({typePrefix:`${rF}/getNonOrphanVisits`,createLoaders:({query:t={},doIntervalFallback:n=!1},r)=>{const{getNonOrphanVisits:i}=e(r),o=async(a,l)=>i({...t,page:a,itemsPerPage:l}),s=ch(n,i);return[o,s]},getExtraFulfilledPayload:({query:t={}})=>({query:t}),shouldCancel:t=>t().orphanVisits.cancelLoad}),P1e=e=>uh({name:rF,initialState:T1e,asyncThunkCreator:e,filterCreatedVisits:({query:t={}},n)=>{const{startDate:r,endDate:i}=t;return n.filter(({visit:o})=>oh(o.date,r,i))}}),iF="shlink/orphanVisits",k1e={visits:[],loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},M1e=(e,t)=>!t||t===e.type,R1e=e=>lh({typePrefix:`${iF}/getOrphanVisits`,createLoaders:({orphanVisitsType:t,query:n={},doIntervalFallback:r=!1},i)=>{const{getOrphanVisits:o}=e(i),s=async(l,c)=>o({...n,page:l,itemsPerPage:c}).then(f=>{const h=f.data.filter(p=>JE(p)&&M1e(p,t));return{...f,data:h}}),a=ch(r,o);return[s,a]},getExtraFulfilledPayload:({query:t={}})=>({query:t}),shouldCancel:t=>t().orphanVisits.cancelLoad}),N1e=e=>uh({name:iF,initialState:k1e,asyncThunkCreator:e,filterCreatedVisits:({query:t={}},n)=>{const{startDate:r,endDate:i}=t;return n.filter(({visit:o,shortUrl:s})=>!s&&oh(o.date,r,i))}}),oF="shlink/shortUrlVisits",L1e={visits:[],shortCode:"",domain:void 0,loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},D1e=e=>lh({typePrefix:`${oF}/getShortUrlVisits`,createLoaders:({shortCode:t,query:n={},doIntervalFallback:r=!1},i)=>{const{getShortUrlVisits:o}=e(i),s=async(l,c)=>o(t,{...n,page:l,itemsPerPage:c}),a=ch(r,async l=>o(t,{...l,domain:n.domain}));return[s,a]},getExtraFulfilledPayload:({shortCode:t,query:n={}})=>({shortCode:t,query:n,domain:n.domain}),shouldCancel:t=>t().shortUrlVisits.cancelLoad}),A1e=e=>uh({name:oF,initialState:L1e,asyncThunkCreator:e,filterCreatedVisits:({shortCode:t,domain:n,query:r={}},i)=>{const{startDate:o,endDate:s}=r;return i.filter(({shortUrl:a,visit:l})=>a&&Ef(a,t,n)&&oh(l.date,o,s))}}),sF="shlink/tagVisits",j1e={visits:[],tag:"",loading:!1,loadingLarge:!1,error:!1,cancelLoad:!1,progress:0},I1e=e=>lh({typePrefix:`${sF}/getTagVisits`,createLoaders:({tag:t,query:n={},doIntervalFallback:r=!1},i)=>{const{getTagVisits:o}=e(i),s=async(l,c)=>o(t,{...n,page:l,itemsPerPage:c}),a=ch(r,async l=>o(t,l));return[s,a]},getExtraFulfilledPayload:({tag:t,query:n={}})=>({tag:t,query:n}),shouldCancel:t=>t().tagVisits.cancelLoad}),F1e=e=>uh({name:sF,initialState:j1e,asyncThunkCreator:e,filterCreatedVisits:({tag:t,query:n={}},r)=>{const{startDate:i,endDate:o}=n;return r.filter(({shortUrl:s,visit:a})=>(s==null?void 0:s.tags.includes(t))&&oh(a.date,i,o))}}),aF="shlink/visitsOverview",Bp={nonOrphanVisits:{total:0},orphanVisits:{total:0},loading:!1,error:!1},EL=e=>e.filter(({visit:t})=>t.potentialBot).length,$1e=e=>rr(`${aF}/loadVisitsOverview`,(t,{getState:n})=>e(n).getVisitsOverview().then(r=>{var i,o,s,a,l,c;return{nonOrphanVisits:{total:((i=r.nonOrphanVisits)==null?void 0:i.total)??r.visitsCount,nonBots:(o=r.nonOrphanVisits)==null?void 0:o.nonBots,bots:(s=r.nonOrphanVisits)==null?void 0:s.bots},orphanVisits:{total:((a=r.orphanVisits)==null?void 0:a.total)??r.orphanVisitsCount,nonBots:(l=r.orphanVisits)==null?void 0:l.nonBots,bots:(c=r.orphanVisits)==null?void 0:c.bots}}})),B1e=e=>Yn({name:aF,initialState:Bp,reducers:{},extraReducers:t=>{t.addCase(e.pending,()=>({...Bp,loading:!0})),t.addCase(e.rejected,()=>({...Bp,error:!0})),t.addCase(e.fulfilled,(n,{payload:r})=>({...Bp,...r})),t.addCase(ah,({nonOrphanVisits:n,orphanVisits:r,...i},{payload:o})=>{const{nonOrphanVisits:s,orphanVisits:a}=r0e(o.createdVisits),l=s.length,c=EL(s),f=l-c,h=a.length,p=EL(a),m=h-p;return{...i,nonOrphanVisits:{total:n.total+l,bots:n.bots&&n.bots+c,nonBots:n.nonBots&&n.nonBots+f},orphanVisits:{total:r.total+h,bots:r.bots&&r.bots+p,nonBots:r.nonBots&&r.nonBots+m}}})}});const z1e=({shortUrlDetail:e,shortUrlVisits:t,goBack:n})=>{const{shortUrl:r,loading:i}=e,{visits:o}=t,s=(r==null?void 0:r.shortUrl)??"",a=(r==null?void 0:r.longUrl)??"",l=r==null?void 0:r.title,c=()=>r?g.jsxs("span",{children:[g.jsx("b",{id:"created",className:"short-url-visits-header__created-at",children:g.jsx(ny,{date:r.dateCreated,relative:!0})}),g.jsx(Er,{placement:"bottom",target:"created",children:g.jsx(ny,{date:r.dateCreated})})]}):g.jsx("small",{children:"Loading..."}),f=g.jsxs(g.Fragment,{children:["Visits for ",g.jsx(Ci,{href:s})]});return g.jsxs(hh,{title:f,goBack:n,visits:o,shortUrl:r,children:[g.jsx("hr",{}),g.jsxs("div",{children:["Created: ",c()]}),g.jsxs("div",{className:"long-url-container",children:[`${l?"Title":"Long URL"}: `,i&&g.jsx("small",{children:"Loading..."}),!i&&g.jsx(Ci,{href:a,children:l??a})]})]})},U1e=({exportVisits:e})=>ra(({shortUrlVisits:t,shortUrlDetail:n,getShortUrlVisits:r,getShortUrlDetail:i,cancelGetShortUrlVisits:o,settings:s})=>{const{shortCode:a=""}=Xs(),{search:l}=Pn(),c=na(),{domain:f}=fl(l),h=(m,v)=>r({shortCode:pm(a),query:{...dh(m),domain:f},doIntervalFallback:v}),p=m=>{var v;return e(`short-url_${(v=n.shortUrl)==null?void 0:v.shortUrl.replace(/https?:\/\//g,"")}_visits.csv`,m)};return V.useEffect(()=>{i({shortCode:pm(a),domain:f})},[]),g.jsx(mh,{getVisits:h,cancelGetVisits:o,visitsInfo:t,settings:s,exportCsv:p,children:g.jsx(z1e,{shortUrlDetail:n,shortUrlVisits:t,goBack:c})})},(t,n)=>n.shortCode?[Xr.shortUrlVisits(pm(n.shortCode))]:[]),V1e=({tagVisits:e,goBack:t,colorGenerator:n})=>{const{visits:r,tag:i}=e,o=g.jsxs("span",{className:"d-flex align-items-center justify-content-center",children:[g.jsx("span",{className:"me-2",children:"Visits for"}),g.jsx($E,{text:i,colorGenerator:n})]});return g.jsx(hh,{title:o,goBack:t,visits:r})},H1e=(e,{exportVisits:t})=>ra(({getTagVisits:n,tagVisits:r,cancelGetTagVisits:i,settings:o})=>{const s=na(),{tag:a=""}=Xs(),l=(f,h)=>n({tag:a,query:dh(f),doIntervalFallback:h}),c=f=>t(`tag_${a}_visits.csv`,f);return g.jsx(mh,{getVisits:l,cancelGetVisits:i,visitsInfo:r,settings:o,exportCsv:c,children:g.jsx(V1e,{tagVisits:r,goBack:s,colorGenerator:e})})},()=>[Xr.visits]),W1e=(e,t)=>{e.serviceFactory("MapModal",()=>Q8),e.serviceFactory("ShortUrlVisits",U1e,"ReportExporter"),e.decorator("ShortUrlVisits",t(["shortUrlVisits","shortUrlDetail","mercureInfo","settings"],["getShortUrlVisits","getShortUrlDetail","cancelGetShortUrlVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("TagVisits",H1e,"ColorGenerator","ReportExporter"),e.decorator("TagVisits",t(["tagVisits","mercureInfo","settings"],["getTagVisits","cancelGetTagVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("DomainVisits",S1e,"ReportExporter"),e.decorator("DomainVisits",t(["domainVisits","mercureInfo","settings"],["getDomainVisits","cancelGetDomainVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("OrphanVisits",E1e,"ReportExporter"),e.decorator("OrphanVisits",t(["orphanVisits","mercureInfo","settings"],["getOrphanVisits","cancelGetOrphanVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("NonOrphanVisits",C1e,"ReportExporter"),e.decorator("NonOrphanVisits",t(["nonOrphanVisits","mercureInfo","settings"],["getNonOrphanVisits","cancelGetNonOrphanVisits","createNewVisits","loadMercureInfo"])),e.serviceFactory("VisitsParser",()=>v1e),e.serviceFactory("getShortUrlVisits",D1e,"buildShlinkApiClient"),e.serviceFactory("cancelGetShortUrlVisits",at("cancelGetVisits"),"shortUrlVisitsReducerCreator"),e.serviceFactory("getTagVisits",I1e,"buildShlinkApiClient"),e.serviceFactory("cancelGetTagVisits",at("cancelGetVisits"),"tagVisitsReducerCreator"),e.serviceFactory("getDomainVisits",lpe,"buildShlinkApiClient"),e.serviceFactory("cancelGetDomainVisits",at("cancelGetVisits"),"domainVisitsReducerCreator"),e.serviceFactory("getOrphanVisits",R1e,"buildShlinkApiClient"),e.serviceFactory("cancelGetOrphanVisits",at("cancelGetVisits"),"orphanVisitsReducerCreator"),e.serviceFactory("getNonOrphanVisits",O1e,"buildShlinkApiClient"),e.serviceFactory("cancelGetNonOrphanVisits",at("cancelGetVisits"),"nonOrphanVisitsReducerCreator"),e.serviceFactory("createNewVisits",()=>ah),e.serviceFactory("loadVisitsOverview",$1e,"buildShlinkApiClient"),e.serviceFactory("visitsOverviewReducerCreator",B1e,"loadVisitsOverview"),e.serviceFactory("visitsOverviewReducer",at("reducer"),"visitsOverviewReducerCreator"),e.serviceFactory("domainVisitsReducerCreator",cpe,"getDomainVisits"),e.serviceFactory("domainVisitsReducer",at("reducer"),"domainVisitsReducerCreator"),e.serviceFactory("nonOrphanVisitsReducerCreator",P1e,"getNonOrphanVisits"),e.serviceFactory("nonOrphanVisitsReducer",at("reducer"),"nonOrphanVisitsReducerCreator"),e.serviceFactory("orphanVisitsReducerCreator",N1e,"getOrphanVisits"),e.serviceFactory("orphanVisitsReducer",at("reducer"),"orphanVisitsReducerCreator"),e.serviceFactory("shortUrlVisitsReducerCreator",A1e,"getShortUrlVisits"),e.serviceFactory("shortUrlVisitsReducer",at("reducer"),"shortUrlVisitsReducerCreator"),e.serviceFactory("tagVisitsReducerCreator",F1e,"getTagVisits"),e.serviceFactory("tagVisitsReducer",at("reducer"),"tagVisitsReducerCreator")},si=new Pq,{container:sT}=si,Y1e=(e,t)=>(...n)=>e[t](...n),q1e=(e,t)=>({...e,[t]:Y1e(sT,t)}),ia=(e,t=[])=>ZW(e?Mj(e):null,t.reduce(q1e,{}));Wse(si,ia);Oae(si,ia);VX(si);Bve(si,ia);pme(si,ia);Aye(si,ia);W1e(si,ia);t0e(si);Spe(si);Ime(si,ia);bpe(si,ia);var aT={},_2={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isPlainObject=t.clone=t.recursive=t.merge=t.main=void 0,e.exports=t=n,t.default=n;function n(){for(var c=[],f=0;fF.length)&&(j=F.length);for(var B=0,ne=Array(j);Bj6({servers:ome,selectedServer:e.selectedServerReducer,shortUrlsList:e.shortUrlsListReducer,shortUrlCreation:e.shortUrlCreationReducer,shortUrlDeletion:e.shortUrlDeletionReducer,shortUrlEdition:e.shortUrlEditionReducer,shortUrlDetail:e.shortUrlDetailReducer,shortUrlVisits:e.shortUrlVisitsReducer,tagVisits:e.tagVisitsReducer,domainVisits:e.domainVisitsReducer,orphanVisits:e.orphanVisitsReducer,nonOrphanVisits:e.nonOrphanVisitsReducer,tagsList:e.tagsListReducer,tagDelete:e.tagDeleteReducer,tagEdit:e.tagEditReducer,mercureInfo:e.mercureInfoReducer,settings:Pme,domainsList:e.domainsListReducer,visitsOverview:e.visitsOverviewReducer,appUpdated:Hse,sidebar:yae}),K1e=e=>{var t;return e.settings&&((t=e.settings.visits)==null?void 0:t.defaultInterval)==="last180days"&&e.settings.visits&&(e.settings.visits.defaultInterval="last180Days"),e},X1e=!0,lF={states:["settings","servers"],namespace:"shlink",namespaceSeparator:".",debounce:300},Q1e=K1e(aT.load(lF)),J1e=e=>pse({devTools:!X1e,reducer:Z1e(e),preloadedState:Q1e,middleware:t=>t({immutableCheck:!1,serializableCheck:!1}).prepend(e.selectServerListener.middleware).concat(aT.save(lF))}),ebe=!!(window.location.hostname==="localhost"||window.location.hostname==="[::1]"||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));function tbe(e){if("serviceWorker"in navigator){if(new URL(Ug.homepage,window.location.href).origin!==window.location.origin)return;window.addEventListener("load",()=>{const n=`${Ug.homepage}/service-worker.js`;ebe?(nbe(n,e),navigator.serviceWorker.ready.then(()=>{console.log("This web app is being served cache-first by a service worker. To learn more, visit https://cra.link/PWA")})):cF(n,e)})}}function cF(e,t){navigator.serviceWorker.register(e).then(n=>{n.onupdatefound=()=>{const r=n.installing;r!=null&&(r.onstatechange=()=>{r.state==="installed"&&(navigator.serviceWorker.controller?(console.log("New content is available and will be used when all tabs for this page are closed. See https://cra.link/PWA."),t&&t.onUpdate&&t.onUpdate(n)):(console.log("Content is cached for offline use."),t&&t.onSuccess&&t.onSuccess(n)))})}}).catch(n=>{console.error("Error during service worker registration:",n)})}function nbe(e,t){fetch(e,{headers:{"Service-Worker":"script"}}).then(n=>{const r=n.headers.get("content-type");n.status===404||r!=null&&r.indexOf("javascript")===-1?navigator.serviceWorker.ready.then(i=>{i.unregister().then(()=>{window.location.reload()})}):cF(e,t)}).catch(()=>{console.log("No internet connection found. App is running in offline mode.")})}const rbe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=",ibe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABSCAMAAAAhFXfZAAAC91BMVEVMaXEzeak2f7I4g7g3g7cua5gzeKg8hJo3grY4g7c3grU0gLI2frE0daAubJc2gbQwd6QzeKk2gLMtd5sxdKIua5g1frA2f7IydaM0e6w2fq41fK01eqo3grgubJgta5cxdKI1f7AydaQydaMxc6EubJgvbJkwcZ4ubZkwcJwubZgubJcydqUydKIxapgubJctbJcubZcubJcvbJYubJcvbZkubJctbJctbZcubJg2f7AubJcrbZcubJcubJcua5g3grY0fq8ubJcubJdEkdEwhsw6i88vhswuhcsuhMtBjMgthMsrg8srgss6is8qgcs8i9A9iMYtg8spgcoogMo7hcMngMonf8olfso4gr8kfck5iM8jfMk4iM8he8k1fro7itAgesk2hs8eecgzfLcofssdeMg0hc4cd8g2hcsxeLQbdsgZdcgxeLImfcszhM0vda4xgckzhM4xg84wf8Yxgs4udKsvfcQucqhUndROmdM1fK0wcZ8vb5w0eqpQm9MzeKhXoNVcpdYydKNWn9VZotVKltJFjsIwcJ1Rms9OlslLmtH///8+kc9epdYzd6dbo9VHkMM2f7FHmNBClM8ydqVcpNY9hro3gLM9hLczealQmcw3fa46f7A8gLMxc6I3eagyc6FIldJMl9JSnNRSntNNl9JPnNJFi75UnM9ZodVKksg8kM45jc09e6ZHltFBk883gbRBh7pDk9EwcaBzn784g7dKkcY2i81Om9M7j85Llc81is09g7Q4grY/j9A0eqxKmdFFltBEjcXf6fFImdBCiLxJl9FGlNFBi78yiMxVndEvbpo6js74+vx+psPP3+o/ks5HkcpGmNCjwdZCkNDM3ehYoNJEls+lxNkxh8xHks0+jdC1zd5Lg6r+/v/H2ufz9/o3jM3t8/edvdM/k89Th61OiLBSjbZklbaTt9BfptdjmL1AicBHj8hGk9FAgK1dkLNTjLRekrdClc/k7fM0icy0y9tgp9c4jc2NtM9Dlc8zicxeXZn3AAAAQ3RSTlMAHDdTb4yPA+LtnEQmC4L2EmHqB7XA0d0sr478x4/Yd5i1zOfyPkf1sLVq4Nh3FvjxopQ2/STNuFzUwFIwxKaejILpIBEV9wAABhVJREFUeF6s1NdyFEcYBeBeoQIhRAkLlRDGrhIgY3BJL8CVeKzuyXFzzjkn5ZxzzuScg3PO8cKzu70JkO0LfxdTU//pM9vTu7Xgf6KqOVTb9X7toRrVEfBf1HTVjZccrT/2by1VV928Yty9ZbVuucdz90frG8DBjl9pVApbOstvmMuvVgaNXSfAAd6pGxpy6yxf5ph43pS/4f3uoaGm2rdu72S9xzOvMymkZFq/ptDrk90mhW7e4zl7HLzhxGWPR20xmSxJ/VqldG5m9XhaVOA1DadsNh3Pu5L2N6QtPO/32JpqQBVVk20oy/Pi2s23WEvyfHbe1thadVQttvm7Llf65gGmXK67XtupyoM7HQhmXdLS8oGWJNeOJ3C5fG5XCEJnkez3/oFdsvgJ4l2ANZwhrJKk/7OSXa+3Vw2WJMlKnGkobouYk6T0TyX30klOUnTD9HJ5qpckL3EW/w4XF3Xd0FGywXUrstrclVsqz5Pd/sXFYyDnPdrLcQODmGOK47IZb4CmibmMn+MYRzFZ5jg33ZL/EJrWcszHmANy3ARBK/IXtciJy8VsitPSdE3uuHxzougojcUdr8/32atnz/ev3f/K5wtpxUTpcaI45zusVDpYtZi+jg0oU9b3x74h7+n9ABvYEZeKaVq0sh0AtLKsFtqNBdeT0MrSzwwlq9+x6xAO4tgOtSzbCjrNQQiNvQUbUEubvzBUeGw26yDCsRHCoLkTHDa7IdOLIThs/gHvChszh2CimE8peRs47cxANI0lYNB5y1DljpOF0IhzBDPOZnDOqYYbeGKECbPzWnXludPphw5c2YBq5zlwXphIbO4VDCZ0gnPfUO1TwZoYwAs2ExPCedAu9DAjfQUjzITQb3jNj0KG2Sgt6BHaQUdYzWz+XmBktOHwanXjaSTcwwziBcuMOtwBmqPrTOxFQR/DRKKPqyur0aiW6cULYsx6tBm0jXpR/AUWR6HRq9WVW6MRhIq5jLyjbaCTDCijyYJNpCajdyobP/eTw0iexBAKkJ3gA5KcQb2zBXsIBckn+xVv8jkZSaEFHE+jFEleAEfayRU0MouNoBmB/L50Ai/HSLIHxcrpCvnhSQAuakKp2C/YbCylJjXRVy/z3+Kv/RrNcCo+WUzlVEhzKffnTQnxeN9fWF88fiNCUdSTsaufaChKWInHeysygfpIqagoakW+vV20J8uyl6TyNKEZWV4oRSPyCkWpgOLSbkCObT8o2r6tlG58HQquf6O0v50tB7JM7F4EORd2dx/K0w/KHsVkLPaoYrwgP/y7krr3SSMA4zj+OBgmjYkxcdIJQyQRKgg2viX9Hddi9UBb29LrKR7CVVEEEXWojUkXNyfTNDE14W9gbHJNuhjDettN3ZvbOvdOqCD3Jp/9l+/wJE+9PkYGjx/fqkys3S2rMozM/o2106rfMUINo6hVqz+eu/hd1c4xTg0TAfy5kV+4UG6+IthHTU9woWmxuKNbTfuCSfovBCxq7EtHqvYL4Sm6F8GVxsSXHMQ07TOi1DKtZxjWaaIyi4CXWjxPccUw8WVbMYY5wxC1mzEyXMJWkllpRloi+Kkoq69sxBTlElF6aAxYUbjXNlhlDZilDnM4U5SlN5biRsRHnbx3mbeWjEh4mEyiuJDl5XcWVmX5GvNkFgLWZM5qwsop4/AWfLhU1cR7k1VVvcYCWRkOI6Xy5gmnphCYIkvzuNYzHzosq2oNk2RtSs8khfUOfHIDgR6ysYBaMpl4uEgk2U/oJTs9AaTSwma7dT69geAE2ZpEjUsn2ieJNHeKfrI3EcAGJ2ZaNgVuC8EBctCLc57P5u5led6IOBkIYkuQMrmmjChs4VkfOerHqSBkPzZlhe06RslZ3zMjk2sscqKwY0RcjKK+LWbzd7KiHhkncs/siFJ+V5eXxD34B8nVuJEpGJNmxN2gH3vSvp7J70tF+D1Ej8qUJD1TkErAND2GZwTFg/LubvmgiBG3SOvdlsqFQrkEzJCL1rstlnVFROixZoDDSuXQFHESwVGlcuQcMb/b42NgjLowh5MTDFE3vNB5qStRIErdCQEh6pLPR92anSUb/wAIhldAaDMpGgAAAABJRU5ErkJggg==",obe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC",sbe=()=>{delete SL.Icon.Default.prototype._getIconUrl,SL.Icon.Default.mergeOptions({iconRetinaUrl:ibe,iconUrl:rbe,shadowUrl:obe})};sbe();const uF=J1e(sT),{App:abe,ScrollToTop:lbe,ErrorHandler:cbe,appUpdateAvailable:ube}=sT;I4(document.getElementById("root")).render(g.jsx(KW,{store:uF,children:g.jsx(QY,{basename:Ug.homepage,children:g.jsx(cbe,{children:g.jsx(lbe,{children:g.jsx(abe,{})})})})}));tbe({onUpdate(){uF.dispatch(ube())}}); diff --git a/develop/index.html b/develop/index.html index 55b1404c..13fa8660 100644 --- a/develop/index.html +++ b/develop/index.html @@ -79,8 +79,8 @@ Shlink — The URL shortener - - + +