diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e375e3f..319a0f7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,19 +2,18 @@ name: build on: push: branches: - - master + - main pull_request: branches: - - master + - main jobs: build: - if: "!contains(github.event.head_commit.message, '[skip ci]')" runs-on: ubuntu-latest strategy: matrix: - ruby: [ '2.6', '3.0' ] + ruby: [ '3.1', '3.3.4', '3.3.5' ] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} diff --git a/.ruby-version b/.ruby-version index a51b01e..fa7adc7 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.0.1 +3.3.5 diff --git a/Gemfile.lock b/Gemfile.lock index 38cd4c4..4964b79 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,62 +1,70 @@ PATH remote: . specs: - iruby-chartkick (0.3.1) - chartkick (~> 4.1.0) + iruby-chartkick (0.4.0) + chartkick (~> 5.1.0) iruby GEM remote: https://rubygems.org/ specs: - chartkick (4.1.0) + chartkick (5.1.0) data_uri (0.1.0) - diff-lcs (1.4.4) - ffi (1.15.4) + diff-lcs (1.5.1) + ffi (1.17.0) ffi-rzmq (2.0.7) ffi-rzmq-core (>= 1.0.7) ffi-rzmq-core (1.0.7) ffi - io-console (0.5.9) - irb (1.3.7) - reline (>= 0.2.7) - iruby (0.7.4) + io-console (0.7.2) + irb (1.14.1) + rdoc (>= 4.0.0) + reline (>= 0.4.2) + iruby (0.8.0) data_uri (~> 0.1) ffi-rzmq irb + logger mime-types (>= 3.3.1) multi_json (~> 1.11) native-package-installer - mime-types (3.3.1) + logger (1.6.1) + mime-types (3.6.0) + logger mime-types-data (~> 3.2015) - mime-types-data (3.2021.0901) + mime-types-data (3.2024.1001) multi_json (1.15.0) - native-package-installer (1.1.1) - rake (13.0.6) - reline (0.2.7) + native-package-installer (1.1.9) + psych (5.1.2) + stringio + rake (13.2.1) + rdoc (6.7.0) + psych (>= 4.0.0) + reline (0.5.10) io-console (~> 0.5) - rspec (3.10.0) - rspec-core (~> 3.10.0) - rspec-expectations (~> 3.10.0) - rspec-mocks (~> 3.10.0) - rspec-core (3.10.1) - rspec-support (~> 3.10.0) - rspec-expectations (3.10.1) + rspec (3.13.0) + rspec-core (~> 3.13.0) + rspec-expectations (~> 3.13.0) + rspec-mocks (~> 3.13.0) + rspec-core (3.13.1) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.3) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.10.0) - rspec-mocks (3.10.2) + rspec-support (~> 3.13.0) + rspec-mocks (3.13.2) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.10.0) - rspec-support (3.10.2) + rspec-support (~> 3.13.0) + rspec-support (3.13.1) + stringio (3.1.1) PLATFORMS - x86_64-darwin-20 - x86_64-linux + ruby DEPENDENCIES bundler iruby-chartkick! - rake (~> 13.0) - rspec (~> 3.0) + rake (~> 13.2.1) + rspec (~> 3.13.0) BUNDLED WITH - 2.2.15 + 2.5.21 diff --git a/README.md b/README.md index 15883ed..ea743e3 100644 --- a/README.md +++ b/README.md @@ -11,24 +11,24 @@ You like writing [Ruby within Juypter](https://github.com/SciRuby/iruby/) notebo ### Usage You can either include the module `IRuby::Chartkick` and use the wrapper methods, like `line_chart`: - + ```ruby include IRuby::Chartkick - + data = { 2019 => 1, 2020 => 122, 2021 => 34 } - + line_chart(data) ``` -Or you use the chart wrapper classes directly: +Or you use the chart wrapper classes directly: ```ruby include IRuby::Chartkick - + data = { 2019 => 1, 2020 => 122, diff --git a/iruby-chartkick.gemspec b/iruby-chartkick.gemspec index de49d51..39ed719 100644 --- a/iruby-chartkick.gemspec +++ b/iruby-chartkick.gemspec @@ -26,9 +26,9 @@ Gem::Specification.new do |spec| spec.require_paths = ["lib"] spec.add_runtime_dependency "iruby" - spec.add_dependency "chartkick", "~> 4.1.0" + spec.add_dependency "chartkick", "~> 5.1.0" spec.add_development_dependency "bundler" - spec.add_development_dependency "rake", "~> 13.0" - spec.add_development_dependency "rspec", "~> 3.0" + spec.add_development_dependency "rake", "~> 13.2.1" + spec.add_development_dependency "rspec", "~> 3.13.0" end diff --git a/lib/iruby/chartkick/version.rb b/lib/iruby/chartkick/version.rb index ade34bc..ec8c62f 100644 --- a/lib/iruby/chartkick/version.rb +++ b/lib/iruby/chartkick/version.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true module IRuby module Chartkick - VERSION = "0.3.1" + VERSION = "0.4.0" end end diff --git a/package-lock.json b/package-lock.json index 0f5e279..bd7bdd2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,1076 +1,727 @@ { "name": "iruby-chartkick", + "lockfileVersion": 2, "requires": true, - "lockfileVersion": 1, - "dependencies": { - "@discoveryjs/json-ext": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.5.tgz", - "integrity": "sha512-6nFkfkmSeV/rqSaS4oWHgmpnYw194f6hmWF5is6b0J1naJZoiD0NTc9AiUwPHvWsowkjuHErCZT1wa0jg+BLIA==", - "dev": true - }, - "@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", - "dev": true, - "requires": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - } - }, - "@jridgewell/resolve-uri": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", - "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", - "dev": true - }, - "@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", - "dev": true - }, - "@jridgewell/source-map": { + "packages": { + "": { + "name": "iruby-chartkick", + "dependencies": { + "chart.js": "^4.4.4", + "chartkick": "^5.0.1" + }, + "devDependencies": { + "esbuild": "^0.24.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.24.0.tgz", + "integrity": "sha512-WtKdFM7ls47zkKHFVzMz8opM7LkcsIp9amDUBIAWirg70RM71WRSjdILPsY5Uv1D42ZpUfaPILDlfactHgsRkw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.24.0.tgz", + "integrity": "sha512-arAtTPo76fJ/ICkXWetLCc9EwEHKaeya4vMrReVlEIUCAUncH7M4bhMQ+M9Vf+FFOZJdTNMXNBrWwW+OXWpSew==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.24.0.tgz", + "integrity": "sha512-Vsm497xFM7tTIPYK9bNTYJyF/lsP590Qc1WxJdlB6ljCbdZKU9SY8i7+Iin4kyhV/KV5J2rOKsBQbB77Ab7L/w==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.24.0.tgz", + "integrity": "sha512-t8GrvnFkiIY7pa7mMgJd7p8p8qqYIz1NYiAoKc75Zyv73L3DZW++oYMSHPRarcotTKuSs6m3hTOa5CKHaS02TQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.24.0.tgz", + "integrity": "sha512-CKyDpRbK1hXwv79soeTJNHb5EiG6ct3efd/FTPdzOWdbZZfGhpbcqIpiD0+vwmpu0wTIL97ZRPZu8vUt46nBSw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.24.0.tgz", + "integrity": "sha512-rgtz6flkVkh58od4PwTRqxbKH9cOjaXCMZgWD905JOzjFKW+7EiUObfd/Kav+A6Gyud6WZk9w+xu6QLytdi2OA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.24.0.tgz", + "integrity": "sha512-6Mtdq5nHggwfDNLAHkPlyLBpE5L6hwsuXZX8XNmHno9JuL2+bg2BX5tRkwjyfn6sKbxZTq68suOjgWqCicvPXA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.24.0.tgz", + "integrity": "sha512-D3H+xh3/zphoX8ck4S2RxKR6gHlHDXXzOf6f/9dbFt/NRBDIE33+cVa49Kil4WUjxMGW0ZIYBYtaGCa2+OsQwQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.24.0.tgz", + "integrity": "sha512-gJKIi2IjRo5G6Glxb8d3DzYXlxdEj2NlkixPsqePSZMhLudqPhtZ4BUrpIuTjJYXxvF9njql+vRjB2oaC9XpBw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.24.0.tgz", + "integrity": "sha512-TDijPXTOeE3eaMkRYpcy3LarIg13dS9wWHRdwYRnzlwlA370rNdZqbcp0WTyyV/k2zSxfko52+C7jU5F9Tfj1g==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.24.0.tgz", + "integrity": "sha512-K40ip1LAcA0byL05TbCQ4yJ4swvnbzHscRmUilrmP9Am7//0UjPreh4lpYzvThT2Quw66MhjG//20mrufm40mA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.24.0.tgz", + "integrity": "sha512-0mswrYP/9ai+CU0BzBfPMZ8RVm3RGAN/lmOMgW4aFUSOQBjA31UP8Mr6DDhWSuMwj7jaWOT0p0WoZ6jeHhrD7g==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.24.0.tgz", + "integrity": "sha512-hIKvXm0/3w/5+RDtCJeXqMZGkI2s4oMUGj3/jM0QzhgIASWrGO5/RlzAzm5nNh/awHE0A19h/CvHQe6FaBNrRA==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.24.0.tgz", + "integrity": "sha512-HcZh5BNq0aC52UoocJxaKORfFODWXZxtBaaZNuN3PUX3MoDsChsZqopzi5UupRhPHSEHotoiptqikjN/B77mYQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.24.0.tgz", + "integrity": "sha512-bEh7dMn/h3QxeR2KTy1DUszQjUrIHPZKyO6aN1X4BCnhfYhuQqedHaa5MxSQA/06j3GpiIlFGSsy1c7Gf9padw==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.24.0.tgz", + "integrity": "sha512-ZcQ6+qRkw1UcZGPyrCiHHkmBaj9SiCD8Oqd556HldP+QlpUIe2Wgn3ehQGVoPOvZvtHm8HPx+bH20c9pvbkX3g==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.24.0.tgz", + "integrity": "sha512-vbutsFqQ+foy3wSSbmjBXXIJ6PL3scghJoM8zCL142cGaZKAdCZHyf+Bpu/MmX9zT9Q0zFBVKb36Ma5Fzfa8xA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.24.0.tgz", + "integrity": "sha512-hjQ0R/ulkO8fCYFsG0FZoH+pWgTTDreqpqY7UnQntnaKv95uP5iW3+dChxnx7C3trQQU40S+OgWhUVwCjVFLvg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.24.0.tgz", + "integrity": "sha512-MD9uzzkPQbYehwcN583yx3Tu5M8EIoTD+tUgKF982WYL9Pf5rKy9ltgD0eUgs8pvKnmizxjXZyLt0z6DC3rRXg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.24.0.tgz", + "integrity": "sha512-4ir0aY1NGUhIC1hdoCzr1+5b43mw99uNwVzhIq1OY3QcEwPDO3B7WNXBzaKY5Nsf1+N11i1eOfFcq+D/gOS15Q==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.24.0.tgz", + "integrity": "sha512-jVzdzsbM5xrotH+W5f1s+JtUy1UWgjU0Cf4wMvffTB8m6wP5/kx0KiaLHlbJO+dMgtxKV8RQ/JvtlFcdZ1zCPA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.24.0.tgz", + "integrity": "sha512-iKc8GAslzRpBytO2/aN3d2yb2z8XTVfNV0PjGlCxKo5SgWmNXx82I/Q3aG1tFfS+A2igVCY97TJ8tnYwpUWLCA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.24.0.tgz", + "integrity": "sha512-vQW36KZolfIudCcTnaTpmLQ24Ha1RjygBo39/aLkM2kmjkWmZGEJ5Gn9l5/7tzXA42QGIoWbICfg6KLLkIw6yw==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.24.0.tgz", + "integrity": "sha512-7IAFPrjSQIJrGsK6flwg7NFmwBoSTyF3rl7If0hNUFQU4ilTsEPL6GuMuU9BfIWVVGuRnuIidkSMC+c0Otu8IA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@kurkle/color": { "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz", - "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==", - "dev": true, - "requires": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" - } - }, - "@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", - "dev": true - }, - "@jridgewell/trace-mapping": { - "version": "0.3.14", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.14.tgz", - "integrity": "sha512-bJWEfQ9lPTvm3SneWwRFVLzrh6nhjwqw7TUFFBEMzwvg7t7PCDenf2lDwqo4NQXzdpgBXyFgDWnQA+2vkruksQ==", - "dev": true, - "requires": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" - } - }, - "@types/eslint": { - "version": "7.28.1", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-7.28.1.tgz", - "integrity": "sha512-XhZKznR3i/W5dXqUhgU9fFdJekufbeBd5DALmkuXoeFcjbQcPk+2cL+WLHf6Q81HWAnM2vrslIHpGVyCAviRwg==", - "dev": true, - "requires": { - "@types/estree": "*", - "@types/json-schema": "*" - } - }, - "@types/eslint-scope": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.1.tgz", - "integrity": "sha512-SCFeogqiptms4Fg29WpOTk5nHIzfpKCemSN63ksBQYKTcXoJEmJagV+DhVmbapZzY4/5YaOV1nZwrsU79fFm1g==", - "dev": true, - "requires": { - "@types/eslint": "*", - "@types/estree": "*" - } - }, - "@types/estree": { - "version": "0.0.50", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.50.tgz", - "integrity": "sha512-C6N5s2ZFtuZRj54k2/zyRhNDjJwwcViAM3Nbm8zjBpbqAdZ00mr0CFxvSKeO8Y/e03WVFLpQMdHYVfUd6SB+Hw==", - "dev": true - }, - "@types/json-schema": { - "version": "7.0.9", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", - "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", - "dev": true - }, - "@types/node": { - "version": "16.10.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.10.3.tgz", - "integrity": "sha512-ho3Ruq+fFnBrZhUYI46n/bV2GjwzSkwuT4dTf0GkuNFmnb8nq4ny2z9JEVemFi6bdEJanHLlYfy9c6FN9B9McQ==", - "dev": true - }, - "@webassemblyjs/ast": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", - "integrity": "sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==", - "dev": true, - "requires": { - "@webassemblyjs/helper-numbers": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1" - } - }, - "@webassemblyjs/floating-point-hex-parser": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz", - "integrity": "sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==", - "dev": true - }, - "@webassemblyjs/helper-api-error": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz", - "integrity": "sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==", - "dev": true - }, - "@webassemblyjs/helper-buffer": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz", - "integrity": "sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==", - "dev": true - }, - "@webassemblyjs/helper-numbers": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz", - "integrity": "sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==", - "dev": true, - "requires": { - "@webassemblyjs/floating-point-hex-parser": "1.11.1", - "@webassemblyjs/helper-api-error": "1.11.1", - "@xtuc/long": "4.2.2" - } - }, - "@webassemblyjs/helper-wasm-bytecode": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz", - "integrity": "sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==", - "dev": true - }, - "@webassemblyjs/helper-wasm-section": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz", - "integrity": "sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1" - } - }, - "@webassemblyjs/ieee754": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz", - "integrity": "sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==", - "dev": true, - "requires": { - "@xtuc/ieee754": "^1.2.0" - } - }, - "@webassemblyjs/leb128": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.1.tgz", - "integrity": "sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==", - "dev": true, - "requires": { - "@xtuc/long": "4.2.2" - } - }, - "@webassemblyjs/utf8": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.1.tgz", - "integrity": "sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==", - "dev": true - }, - "@webassemblyjs/wasm-edit": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz", - "integrity": "sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/helper-wasm-section": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1", - "@webassemblyjs/wasm-opt": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1", - "@webassemblyjs/wast-printer": "1.11.1" - } - }, - "@webassemblyjs/wasm-gen": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz", - "integrity": "sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/ieee754": "1.11.1", - "@webassemblyjs/leb128": "1.11.1", - "@webassemblyjs/utf8": "1.11.1" - } - }, - "@webassemblyjs/wasm-opt": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz", - "integrity": "sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1" - } - }, - "@webassemblyjs/wasm-parser": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz", - "integrity": "sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-api-error": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/ieee754": "1.11.1", - "@webassemblyjs/leb128": "1.11.1", - "@webassemblyjs/utf8": "1.11.1" - } + "resolved": "https://registry.npmjs.org/@kurkle/color/-/color-0.3.2.tgz", + "integrity": "sha512-fuscdXJ9G1qb7W8VdHi+IwRqij3lBkosAm4ydQtEmbY58OzHXqQhvlxqEkoz0yssNVn38bcpRWgA9PP+OGoisw==" }, - "@webassemblyjs/wast-printer": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz", - "integrity": "sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.11.1", - "@xtuc/long": "4.2.2" - } - }, - "@webpack-cli/configtest": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.1.0.tgz", - "integrity": "sha512-ttOkEkoalEHa7RaFYpM0ErK1xc4twg3Am9hfHhL7MVqlHebnkYd2wuI/ZqTDj0cVzZho6PdinY0phFZV3O0Mzg==", - "dev": true - }, - "@webpack-cli/info": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.4.0.tgz", - "integrity": "sha512-F6b+Man0rwE4n0409FyAJHStYA5OIZERxmnUfLVwv0mc0V1wLad3V7jqRlMkgKBeAq07jUvglacNaa6g9lOpuw==", - "dev": true, - "requires": { - "envinfo": "^7.7.3" - } - }, - "@webpack-cli/serve": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.6.0.tgz", - "integrity": "sha512-ZkVeqEmRpBV2GHvjjUZqEai2PpUbuq8Bqd//vEYsp63J8WyexI8ppCqVS3Zs0QADf6aWuPdU+0XsPI647PVlQA==", - "dev": true - }, - "@xtuc/ieee754": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", - "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", - "dev": true - }, - "@xtuc/long": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", - "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", - "dev": true - }, - "acorn": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.5.0.tgz", - "integrity": "sha512-yXbYeFy+jUuYd3/CDcg2NkIYE991XYX/bje7LmjJigUciaeO1JR4XxXgCIV1/Zc/dRuFEyw1L0pbA+qynJkW5Q==", - "dev": true - }, - "acorn-import-assertions": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz", - "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==", - "dev": true - }, - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true - }, - "browserslist": { - "version": "4.17.3", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.17.3.tgz", - "integrity": "sha512-59IqHJV5VGdcJZ+GZ2hU5n4Kv3YiASzW6Xk5g9tf5a/MAzGeFwgGWU39fVzNIOVcgB3+Gp+kiQu0HEfTVU/3VQ==", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30001264", - "electron-to-chromium": "^1.3.857", - "escalade": "^3.1.1", - "node-releases": "^1.1.77", - "picocolors": "^0.2.1" + "node_modules/chart.js": { + "version": "4.4.4", + "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.4.4.tgz", + "integrity": "sha512-emICKGBABnxhMjUjlYRR12PmOXhJ2eJjEHL2/dZlWjxRAZT1D8xplLFq5M0tMQK8ja+wBS/tuVEJB5C6r7VxJA==", + "dependencies": { + "@kurkle/color": "^0.3.0" + }, + "engines": { + "pnpm": ">=8" } }, - "buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true - }, - "caniuse-lite": { - "version": "1.0.30001265", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001265.tgz", - "integrity": "sha512-YzBnspggWV5hep1m9Z6sZVLOt7vrju8xWooFAgN6BA5qvy98qPAPb7vNUzypFaoh2pb3vlfzbDO8tB57UPGbtw==", - "dev": true - }, - "chart.js": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-3.6.0.tgz", - "integrity": "sha512-iOzzDKePL+bj+ccIsVAgWQehCXv8xOKGbaU2fO/myivH736zcx535PGJzQGanvcSGVOqX6yuLZsN3ygcQ35UgQ==" - }, - "chartjs-adapter-date-fns": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/chartjs-adapter-date-fns/-/chartjs-adapter-date-fns-2.0.0.tgz", - "integrity": "sha512-rmZINGLe+9IiiEB0kb57vH3UugAtYw33anRiw5kS2Tu87agpetDDoouquycWc9pRsKtQo5j+vLsYHyr8etAvFw==", - "optional": true - }, - "chartkick": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chartkick/-/chartkick-4.1.0.tgz", - "integrity": "sha512-BBf1JWV7SRsxDng9Fh4MRGuj93VPkF8F1pcrOfbCD/ey+/Fyo+tFF8vqpGAjOyu7oNd4cc1IC/OUixUtPsfNmg==", - "requires": { - "chart.js": ">=3.0.2", - "chartjs-adapter-date-fns": ">=2.0.0", + "node_modules/chartjs-adapter-date-fns": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chartjs-adapter-date-fns/-/chartjs-adapter-date-fns-3.0.0.tgz", + "integrity": "sha512-Rs3iEB3Q5pJ973J93OBTpnP7qoGwvq3nUnoMdtxO+9aoJof7UFcRbWcIDteXuYd1fgAvct/32T9qaLyLuZVwCg==", + "optional": true, + "peerDependencies": { + "chart.js": ">=2.8.0", "date-fns": ">=2.0.0" } }, - "chrome-trace-event": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", - "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", - "dev": true - }, - "clone-deep": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", - "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4", - "kind-of": "^6.0.2", - "shallow-clone": "^3.0.0" + "node_modules/chartkick": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/chartkick/-/chartkick-5.0.1.tgz", + "integrity": "sha512-4F3tWI3eBQgnjCYZIZ+fHOaJuNyxeyhDE2Tm+voOWB19hDjSJceys/spzN52DOn8bWepNESGXvPVTGU1jeFsbA==", + "optionalDependencies": { + "chart.js": "4", + "chartjs-adapter-date-fns": ">=3", + "date-fns": ">=2" } }, - "colorette": { - "version": "2.0.16", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.16.tgz", - "integrity": "sha512-hUewv7oMjCp+wkBv5Rm0v87eJhq4woh5rSR+42YSQJKecCqgIqNkZ6lAlQms/BwHPJA5NKMRlpxPRv0n8HQW6g==", - "dev": true - }, - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - }, - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "date-fns": { + "node_modules/date-fns": { "version": "2.25.0", "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.25.0.tgz", "integrity": "sha512-ovYRFnTrbGPD4nqaEqescPEv1mNwvt+UTqI3Ay9SzNtey9NZnYu6E2qCcBBgJ6/2VF1zGGygpyTDITqpQQ5e+w==", - "optional": true - }, - "electron-to-chromium": { - "version": "1.3.864", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.864.tgz", - "integrity": "sha512-v4rbad8GO6/yVI92WOeU9Wgxc4NA0n4f6P1FvZTY+jyY7JHEhw3bduYu60v3Q1h81Cg6eo4ApZrFPuycwd5hGw==", - "dev": true - }, - "enhanced-resolve": { - "version": "5.8.3", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.8.3.tgz", - "integrity": "sha512-EGAbGvH7j7Xt2nc0E7D99La1OiEs8LnyimkRgwExpUMScN6O+3x9tIWs7PLQZVNx4YD+00skHXPXi1yQHpAmZA==", - "dev": true, - "requires": { - "graceful-fs": "^4.2.4", - "tapable": "^2.2.0" - } - }, - "envinfo": { - "version": "7.8.1", - "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.8.1.tgz", - "integrity": "sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==", - "dev": true - }, - "es-module-lexer": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz", - "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==", - "dev": true - }, - "escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true - }, - "eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - } - }, - "esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "requires": { - "estraverse": "^5.2.0" + "optional": true, + "engines": { + "node": ">=0.11" }, - "dependencies": { - "estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", - "dev": true - } + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/date-fns" } }, - "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true - }, - "events": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "dev": true - }, - "execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "node_modules/esbuild": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.0.tgz", + "integrity": "sha512-FuLPevChGDshgSicjisSooU0cemp/sGXR841D5LHMB7mTVOmsEHcAxaH3irL53+8YDIeVNQEySh4DaYU/iuPqQ==", "dev": true, - "requires": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" - } - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "fastest-levenshtein": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.12.tgz", - "integrity": "sha512-On2N+BpYJ15xIC974QNVuYGMOlEVt4s0EOI3wwMqOmK1fdDY+FN/zltPV8vosq4ad4c/gJ1KHScUn/6AWIgiow==", - "dev": true - }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "dev": true - }, - "glob-to-regexp": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", - "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", - "dev": true - }, - "graceful-fs": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", - "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==", - "dev": true - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.24.0", + "@esbuild/android-arm": "0.24.0", + "@esbuild/android-arm64": "0.24.0", + "@esbuild/android-x64": "0.24.0", + "@esbuild/darwin-arm64": "0.24.0", + "@esbuild/darwin-x64": "0.24.0", + "@esbuild/freebsd-arm64": "0.24.0", + "@esbuild/freebsd-x64": "0.24.0", + "@esbuild/linux-arm": "0.24.0", + "@esbuild/linux-arm64": "0.24.0", + "@esbuild/linux-ia32": "0.24.0", + "@esbuild/linux-loong64": "0.24.0", + "@esbuild/linux-mips64el": "0.24.0", + "@esbuild/linux-ppc64": "0.24.0", + "@esbuild/linux-riscv64": "0.24.0", + "@esbuild/linux-s390x": "0.24.0", + "@esbuild/linux-x64": "0.24.0", + "@esbuild/netbsd-x64": "0.24.0", + "@esbuild/openbsd-arm64": "0.24.0", + "@esbuild/openbsd-x64": "0.24.0", + "@esbuild/sunos-x64": "0.24.0", + "@esbuild/win32-arm64": "0.24.0", + "@esbuild/win32-ia32": "0.24.0", + "@esbuild/win32-x64": "0.24.0" } - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", - "dev": true - }, - "import-local": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.0.3.tgz", - "integrity": "sha512-bE9iaUY3CXH8Cwfan/abDKAxe1KGT9kyGsBPqf6DMK/z0a2OzAsrukeYNgIH6cH5Xr452jb1TUL8rSfCLjZ9uA==", + } + }, + "dependencies": { + "@esbuild/aix-ppc64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.24.0.tgz", + "integrity": "sha512-WtKdFM7ls47zkKHFVzMz8opM7LkcsIp9amDUBIAWirg70RM71WRSjdILPsY5Uv1D42ZpUfaPILDlfactHgsRkw==", "dev": true, - "requires": { - "pkg-dir": "^4.2.0", - "resolve-cwd": "^3.0.0" - } - }, - "interpret": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-2.2.0.tgz", - "integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==", - "dev": true + "optional": true }, - "is-core-module": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.7.0.tgz", - "integrity": "sha512-ByY+tjCciCr+9nLryBYcSD50EOGWt95c7tIsKTG1J2ixKKXPvF7Ej3AVd+UfDydAJom3biBGDBALaO79ktwgEQ==", + "@esbuild/android-arm": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.24.0.tgz", + "integrity": "sha512-arAtTPo76fJ/ICkXWetLCc9EwEHKaeya4vMrReVlEIUCAUncH7M4bhMQ+M9Vf+FFOZJdTNMXNBrWwW+OXWpSew==", "dev": true, - "requires": { - "has": "^1.0.3" - } + "optional": true }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "@esbuild/android-arm64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.24.0.tgz", + "integrity": "sha512-Vsm497xFM7tTIPYK9bNTYJyF/lsP590Qc1WxJdlB6ljCbdZKU9SY8i7+Iin4kyhV/KV5J2rOKsBQbB77Ab7L/w==", "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "dev": true - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true + "optional": true }, - "jest-worker": { - "version": "27.2.5", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.2.5.tgz", - "integrity": "sha512-HTjEPZtcNKZ4LnhSp02NEH4vE+5OpJ0EsOWYvGQpHgUMLngydESAAMH5Wd/asPf29+XUDQZszxpLg1BkIIA2aw==", + "@esbuild/android-x64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.24.0.tgz", + "integrity": "sha512-t8GrvnFkiIY7pa7mMgJd7p8p8qqYIz1NYiAoKc75Zyv73L3DZW++oYMSHPRarcotTKuSs6m3hTOa5CKHaS02TQ==", "dev": true, - "requires": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - } - }, - "json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true - }, - "loader-runner": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.2.0.tgz", - "integrity": "sha512-92+huvxMvYlMzMt0iIOukcwYBFpkYJdpl2xsZ7LrlayO7E8SOv+JJUEK17B/dJIHAOLMfh2dZZ/Y18WgmGtYNw==", - "dev": true + "optional": true }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "@esbuild/darwin-arm64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.24.0.tgz", + "integrity": "sha512-CKyDpRbK1hXwv79soeTJNHb5EiG6ct3efd/FTPdzOWdbZZfGhpbcqIpiD0+vwmpu0wTIL97ZRPZu8vUt46nBSw==", "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true - }, - "mime-db": { - "version": "1.50.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.50.0.tgz", - "integrity": "sha512-9tMZCDlYHqeERXEHO9f/hKfNXhre5dK2eE/krIvUjZbS2KPcqGDfNShIWS1uW9XOTKQKqK6qbeOci18rbfW77A==", - "dev": true + "optional": true }, - "mime-types": { - "version": "2.1.33", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.33.tgz", - "integrity": "sha512-plLElXp7pRDd0bNZHw+nMd52vRYjLwQjygaNg7ddJ2uJtTlmnTCjWuPKxVu6//AdaRuME84SvLW91sIkBqGT0g==", + "@esbuild/darwin-x64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.24.0.tgz", + "integrity": "sha512-rgtz6flkVkh58od4PwTRqxbKH9cOjaXCMZgWD905JOzjFKW+7EiUObfd/Kav+A6Gyud6WZk9w+xu6QLytdi2OA==", "dev": true, - "requires": { - "mime-db": "1.50.0" - } - }, - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true - }, - "neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "dev": true - }, - "node-releases": { - "version": "1.1.77", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.77.tgz", - "integrity": "sha512-rB1DUFUNAN4Gn9keO2K1efO35IDK7yKHCdCaIMvFO7yUYmmZYeDjnGKle26G4rwj+LKRQpjyUUvMkPglwGCYNQ==", - "dev": true + "optional": true }, - "npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "@esbuild/freebsd-arm64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.24.0.tgz", + "integrity": "sha512-6Mtdq5nHggwfDNLAHkPlyLBpE5L6hwsuXZX8XNmHno9JuL2+bg2BX5tRkwjyfn6sKbxZTq68suOjgWqCicvPXA==", "dev": true, - "requires": { - "path-key": "^3.0.0" - } + "optional": true }, - "onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "@esbuild/freebsd-x64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.24.0.tgz", + "integrity": "sha512-D3H+xh3/zphoX8ck4S2RxKR6gHlHDXXzOf6f/9dbFt/NRBDIE33+cVa49Kil4WUjxMGW0ZIYBYtaGCa2+OsQwQ==", "dev": true, - "requires": { - "mimic-fn": "^2.1.0" - } + "optional": true }, - "p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "@esbuild/linux-arm": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.24.0.tgz", + "integrity": "sha512-gJKIi2IjRo5G6Glxb8d3DzYXlxdEj2NlkixPsqePSZMhLudqPhtZ4BUrpIuTjJYXxvF9njql+vRjB2oaC9XpBw==", "dev": true, - "requires": { - "yocto-queue": "^0.1.0" - } + "optional": true }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "@esbuild/linux-arm64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.24.0.tgz", + "integrity": "sha512-TDijPXTOeE3eaMkRYpcy3LarIg13dS9wWHRdwYRnzlwlA370rNdZqbcp0WTyyV/k2zSxfko52+C7jU5F9Tfj1g==", "dev": true, - "requires": { - "p-limit": "^2.2.0" - }, - "dependencies": { - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - } - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true - }, - "path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, - "picocolors": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", - "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", - "dev": true + "optional": true }, - "pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "@esbuild/linux-ia32": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.24.0.tgz", + "integrity": "sha512-K40ip1LAcA0byL05TbCQ4yJ4swvnbzHscRmUilrmP9Am7//0UjPreh4lpYzvThT2Quw66MhjG//20mrufm40mA==", "dev": true, - "requires": { - "find-up": "^4.0.0" - } - }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true + "optional": true }, - "randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "@esbuild/linux-loong64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.24.0.tgz", + "integrity": "sha512-0mswrYP/9ai+CU0BzBfPMZ8RVm3RGAN/lmOMgW4aFUSOQBjA31UP8Mr6DDhWSuMwj7jaWOT0p0WoZ6jeHhrD7g==", "dev": true, - "requires": { - "safe-buffer": "^5.1.0" - } + "optional": true }, - "rechoir": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz", - "integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==", + "@esbuild/linux-mips64el": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.24.0.tgz", + "integrity": "sha512-hIKvXm0/3w/5+RDtCJeXqMZGkI2s4oMUGj3/jM0QzhgIASWrGO5/RlzAzm5nNh/awHE0A19h/CvHQe6FaBNrRA==", "dev": true, - "requires": { - "resolve": "^1.9.0" - } + "optional": true }, - "resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "@esbuild/linux-ppc64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.24.0.tgz", + "integrity": "sha512-HcZh5BNq0aC52UoocJxaKORfFODWXZxtBaaZNuN3PUX3MoDsChsZqopzi5UupRhPHSEHotoiptqikjN/B77mYQ==", "dev": true, - "requires": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" - } + "optional": true }, - "resolve-cwd": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", - "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "@esbuild/linux-riscv64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.24.0.tgz", + "integrity": "sha512-bEh7dMn/h3QxeR2KTy1DUszQjUrIHPZKyO6aN1X4BCnhfYhuQqedHaa5MxSQA/06j3GpiIlFGSsy1c7Gf9padw==", "dev": true, - "requires": { - "resolve-from": "^5.0.0" - } - }, - "resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true - }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true + "optional": true }, - "schema-utils": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", - "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "@esbuild/linux-s390x": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.24.0.tgz", + "integrity": "sha512-ZcQ6+qRkw1UcZGPyrCiHHkmBaj9SiCD8Oqd556HldP+QlpUIe2Wgn3ehQGVoPOvZvtHm8HPx+bH20c9pvbkX3g==", "dev": true, - "requires": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - } + "optional": true }, - "serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "@esbuild/linux-x64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.24.0.tgz", + "integrity": "sha512-vbutsFqQ+foy3wSSbmjBXXIJ6PL3scghJoM8zCL142cGaZKAdCZHyf+Bpu/MmX9zT9Q0zFBVKb36Ma5Fzfa8xA==", "dev": true, - "requires": { - "randombytes": "^2.1.0" - } + "optional": true }, - "shallow-clone": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", - "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "@esbuild/netbsd-x64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.24.0.tgz", + "integrity": "sha512-hjQ0R/ulkO8fCYFsG0FZoH+pWgTTDreqpqY7UnQntnaKv95uP5iW3+dChxnx7C3trQQU40S+OgWhUVwCjVFLvg==", "dev": true, - "requires": { - "kind-of": "^6.0.2" - } + "optional": true }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "@esbuild/openbsd-arm64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.24.0.tgz", + "integrity": "sha512-MD9uzzkPQbYehwcN583yx3Tu5M8EIoTD+tUgKF982WYL9Pf5rKy9ltgD0eUgs8pvKnmizxjXZyLt0z6DC3rRXg==", "dev": true, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true - }, - "signal-exit": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.5.tgz", - "integrity": "sha512-KWcOiKeQj6ZyXx7zq4YxSMgHRlod4czeBQZrPb8OKcohcqAXShm7E20kEMle9WBt26hFcAf0qLOcp5zmY7kOqQ==", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true + "optional": true }, - "source-map-support": { - "version": "0.5.20", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.20.tgz", - "integrity": "sha512-n1lZZ8Ve4ksRqizaBQgxXDgKwttHDhyfQjA6YZZn8+AroHbsIz+JjwxQDxbp+7y5OYCI8t1Yk7etjD9CRd2hIw==", + "@esbuild/openbsd-x64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.24.0.tgz", + "integrity": "sha512-4ir0aY1NGUhIC1hdoCzr1+5b43mw99uNwVzhIq1OY3QcEwPDO3B7WNXBzaKY5Nsf1+N11i1eOfFcq+D/gOS15Q==", "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", - "dev": true + "optional": true }, - "supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "@esbuild/sunos-x64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.24.0.tgz", + "integrity": "sha512-jVzdzsbM5xrotH+W5f1s+JtUy1UWgjU0Cf4wMvffTB8m6wP5/kx0KiaLHlbJO+dMgtxKV8RQ/JvtlFcdZ1zCPA==", "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - }, - "tapable": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", - "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", - "dev": true + "optional": true }, - "terser": { - "version": "5.14.2", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.14.2.tgz", - "integrity": "sha512-oL0rGeM/WFQCUd0y2QrWxYnq7tfSuKBiqTjRPWrRgB46WD/kiwHwF8T23z78H6Q6kGCuuHcPB+KULHRdxvVGQA==", + "@esbuild/win32-arm64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.24.0.tgz", + "integrity": "sha512-iKc8GAslzRpBytO2/aN3d2yb2z8XTVfNV0PjGlCxKo5SgWmNXx82I/Q3aG1tFfS+A2igVCY97TJ8tnYwpUWLCA==", "dev": true, - "requires": { - "@jridgewell/source-map": "^0.3.2", - "acorn": "^8.5.0", - "commander": "^2.20.0", - "source-map-support": "~0.5.20" - } + "optional": true }, - "terser-webpack-plugin": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.2.4.tgz", - "integrity": "sha512-E2CkNMN+1cho04YpdANyRrn8CyN4yMy+WdFKZIySFZrGXZxJwJP6PMNGGc/Mcr6qygQHUUqRxnAPmi0M9f00XA==", + "@esbuild/win32-ia32": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.24.0.tgz", + "integrity": "sha512-vQW36KZolfIudCcTnaTpmLQ24Ha1RjygBo39/aLkM2kmjkWmZGEJ5Gn9l5/7tzXA42QGIoWbICfg6KLLkIw6yw==", "dev": true, - "requires": { - "jest-worker": "^27.0.6", - "p-limit": "^3.1.0", - "schema-utils": "^3.1.1", - "serialize-javascript": "^6.0.0", - "source-map": "^0.6.1", - "terser": "^5.7.2" - } + "optional": true }, - "uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "@esbuild/win32-x64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.24.0.tgz", + "integrity": "sha512-7IAFPrjSQIJrGsK6flwg7NFmwBoSTyF3rl7If0hNUFQU4ilTsEPL6GuMuU9BfIWVVGuRnuIidkSMC+c0Otu8IA==", "dev": true, - "requires": { - "punycode": "^2.1.0" - } - }, - "v8-compile-cache": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", - "dev": true + "optional": true }, - "watchpack": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.2.0.tgz", - "integrity": "sha512-up4YAn/XHgZHIxFBVCdlMiWDj6WaLKpwVeGQk2I5thdYxF/KmF0aaz6TfJZ/hfl1h/XlcDr7k1KH7ThDagpFaA==", - "dev": true, - "requires": { - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.1.2" - } + "@kurkle/color": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@kurkle/color/-/color-0.3.2.tgz", + "integrity": "sha512-fuscdXJ9G1qb7W8VdHi+IwRqij3lBkosAm4ydQtEmbY58OzHXqQhvlxqEkoz0yssNVn38bcpRWgA9PP+OGoisw==" }, - "webpack": { - "version": "5.58.1", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.58.1.tgz", - "integrity": "sha512-4Z/dmbTU+VmkCb2XNgW7wkE5TfEcSooclprn/UEuVeAkwHhn07OcgUsyaKHGtCY/VobjnsYBlyhKeMLiSoOqPg==", - "dev": true, + "chart.js": { + "version": "4.4.4", + "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.4.4.tgz", + "integrity": "sha512-emICKGBABnxhMjUjlYRR12PmOXhJ2eJjEHL2/dZlWjxRAZT1D8xplLFq5M0tMQK8ja+wBS/tuVEJB5C6r7VxJA==", "requires": { - "@types/eslint-scope": "^3.7.0", - "@types/estree": "^0.0.50", - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/wasm-edit": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1", - "acorn": "^8.4.1", - "acorn-import-assertions": "^1.7.6", - "browserslist": "^4.14.5", - "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.8.3", - "es-module-lexer": "^0.9.0", - "eslint-scope": "5.1.1", - "events": "^3.2.0", - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.2.4", - "json-parse-better-errors": "^1.0.2", - "loader-runner": "^4.2.0", - "mime-types": "^2.1.27", - "neo-async": "^2.6.2", - "schema-utils": "^3.1.0", - "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.1.3", - "watchpack": "^2.2.0", - "webpack-sources": "^3.2.0" + "@kurkle/color": "^0.3.0" } }, - "webpack-cli": { - "version": "4.9.0", - "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.9.0.tgz", - "integrity": "sha512-n/jZZBMzVEl4PYIBs+auy2WI0WTQ74EnJDiyD98O2JZY6IVIHJNitkYp/uTXOviIOMfgzrNvC9foKv/8o8KSZw==", - "dev": true, - "requires": { - "@discoveryjs/json-ext": "^0.5.0", - "@webpack-cli/configtest": "^1.1.0", - "@webpack-cli/info": "^1.4.0", - "@webpack-cli/serve": "^1.6.0", - "colorette": "^2.0.14", - "commander": "^7.0.0", - "execa": "^5.0.0", - "fastest-levenshtein": "^1.0.12", - "import-local": "^3.0.2", - "interpret": "^2.2.0", - "rechoir": "^0.7.0", - "v8-compile-cache": "^2.2.0", - "webpack-merge": "^5.7.3" - }, - "dependencies": { - "commander": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", - "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", - "dev": true - } - } + "chartjs-adapter-date-fns": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chartjs-adapter-date-fns/-/chartjs-adapter-date-fns-3.0.0.tgz", + "integrity": "sha512-Rs3iEB3Q5pJ973J93OBTpnP7qoGwvq3nUnoMdtxO+9aoJof7UFcRbWcIDteXuYd1fgAvct/32T9qaLyLuZVwCg==", + "optional": true, + "requires": {} }, - "webpack-merge": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.8.0.tgz", - "integrity": "sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q==", - "dev": true, + "chartkick": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/chartkick/-/chartkick-5.0.1.tgz", + "integrity": "sha512-4F3tWI3eBQgnjCYZIZ+fHOaJuNyxeyhDE2Tm+voOWB19hDjSJceys/spzN52DOn8bWepNESGXvPVTGU1jeFsbA==", "requires": { - "clone-deep": "^4.0.1", - "wildcard": "^2.0.0" + "chart.js": "4", + "chartjs-adapter-date-fns": ">=3", + "date-fns": ">=2" } }, - "webpack-sources": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.1.tgz", - "integrity": "sha512-t6BMVLQ0AkjBOoRTZgqrWm7xbXMBzD+XDq2EZ96+vMfn3qKgsvdXZhbPZ4ElUOpdv4u+iiGe+w3+J75iy/bYGA==", - "dev": true + "date-fns": { + "version": "2.25.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.25.0.tgz", + "integrity": "sha512-ovYRFnTrbGPD4nqaEqescPEv1mNwvt+UTqI3Ay9SzNtey9NZnYu6E2qCcBBgJ6/2VF1zGGygpyTDITqpQQ5e+w==", + "optional": true }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" + "esbuild": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.0.tgz", + "integrity": "sha512-FuLPevChGDshgSicjisSooU0cemp/sGXR841D5LHMB7mTVOmsEHcAxaH3irL53+8YDIeVNQEySh4DaYU/iuPqQ==", + "dev": true, + "requires": { + "@esbuild/aix-ppc64": "0.24.0", + "@esbuild/android-arm": "0.24.0", + "@esbuild/android-arm64": "0.24.0", + "@esbuild/android-x64": "0.24.0", + "@esbuild/darwin-arm64": "0.24.0", + "@esbuild/darwin-x64": "0.24.0", + "@esbuild/freebsd-arm64": "0.24.0", + "@esbuild/freebsd-x64": "0.24.0", + "@esbuild/linux-arm": "0.24.0", + "@esbuild/linux-arm64": "0.24.0", + "@esbuild/linux-ia32": "0.24.0", + "@esbuild/linux-loong64": "0.24.0", + "@esbuild/linux-mips64el": "0.24.0", + "@esbuild/linux-ppc64": "0.24.0", + "@esbuild/linux-riscv64": "0.24.0", + "@esbuild/linux-s390x": "0.24.0", + "@esbuild/linux-x64": "0.24.0", + "@esbuild/netbsd-x64": "0.24.0", + "@esbuild/openbsd-arm64": "0.24.0", + "@esbuild/openbsd-x64": "0.24.0", + "@esbuild/sunos-x64": "0.24.0", + "@esbuild/win32-arm64": "0.24.0", + "@esbuild/win32-ia32": "0.24.0", + "@esbuild/win32-x64": "0.24.0" } - }, - "wildcard": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz", - "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==", - "dev": true - }, - "yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true } } } diff --git a/package.json b/package.json index b46b5f1..600833d 100644 --- a/package.json +++ b/package.json @@ -1,14 +1,13 @@ { "name": "iruby-chartkick", "scripts": { - "build": "webpack ./vendor/assets/javascripts/main.js --output-path='./vendor/assets/javascripts/' --output-filename=bundle.js --mode=production" + "build": "esbuild ./vendor/assets/javascripts/main.js --bundle --outfile=./vendor/assets/javascripts/bundle.js --minify" }, "dependencies": { - "chart.js": "^3.6.0", - "chartkick": "^4.1.0" + "chart.js": "^4.4.4", + "chartkick": "^5.0.1" }, "devDependencies": { - "webpack": "^5.58.1", - "webpack-cli": "^4.9.0" + "esbuild": "^0.24.0" } } diff --git a/vendor/assets/javascripts/bundle.js b/vendor/assets/javascripts/bundle.js index 4c584af..dec5f25 100644 --- a/vendor/assets/javascripts/bundle.js +++ b/vendor/assets/javascripts/bundle.js @@ -1,2 +1,47 @@ -/*! For license information please see bundle.js.LICENSE.txt */ -(()=>{var t={616:function(t){t.exports=function(){"use strict";function t(t){return"[object Array]"===Object.prototype.toString.call(t)}function e(t){return t instanceof Function}function i(t){return"[object Object]"===Object.prototype.toString.call(t)&&!e(t)&&t instanceof Object}function n(e,r){var o;for(o in r)"__proto__"!==o&&(i(r[o])||t(r[o])?(i(r[o])&&!i(e[o])&&(e[o]={}),t(r[o])&&!t(e[o])&&(e[o]=[]),n(e[o],r[o])):void 0!==r[o]&&(e[o]=r[o]))}function r(t,e){var i={};return n(i,t),n(i,e),i}var o=/^(\d\d\d\d)(-)?(\d\d)(-)?(\d\d)$/i;function a(t){return""+t}function s(t){return parseFloat(t)}function l(t){var e,i,n,r;if("object"!=typeof t)if("number"==typeof t)t=new Date(1e3*t);else{if(e=(t=a(t)).match(o))return i=parseInt(e[1],10),n=parseInt(e[3],10)-1,r=parseInt(e[5],10),new Date(i,n,r);var s=t.replace(/ /,"T").replace(" ","").replace("UTC","Z");t=new Date(Date.parse(s)||t)}return t}function h(e){if(!t(e)){var i,n=[];for(i in e)e.hasOwnProperty(i)&&n.push([i,e[i]]);e=n}return e}function c(t,e,i,n,o,a,s,l){return function(h,c,u){var d=h.data,f=r({},t);return f=r(f,u||{}),(h.singleSeriesFormat||"legend"in c)&&e(f,c.legend,h.singleSeriesFormat),c.title&&i(f,c.title),"min"in c?n(f,c.min):function(t){var e,i,n;for(e=0;e=6}function w(t){return"number"==typeof t}var _=["bytes","KB","MB","GB","TB","PB","EB"];function M(t,e,i,n){t=t||"",i.prefix&&(e<0&&(e*=-1,t+="-"),t+=i.prefix);var r=i.suffix||"",o=i.precision,s=i.round;if(i.byteScale){var l,h=n?i.byteScale:e;h>=0x1000000000000000?(e/=0x1000000000000000,l=6):h>=0x4000000000000?(e/=0x4000000000000,l=5):h>=1099511627776?(e/=1099511627776,l=4):h>=1073741824?(e/=1073741824,l=3):h>=1048576?(e/=1048576,l=2):h>=1024?(e/=1024,l=1):l=0,void 0===o&&void 0===s&&(e>=1023.5&&l<_.length-1&&(e=1,l+=1),o=e>=1e3?4:3),r=" "+_[l]}if(void 0!==o&&void 0!==s)throw Error("Use either round or precision, not both");if(!n&&(void 0!==o&&(e=e.toPrecision(o),i.zeros||(e=parseFloat(e))),void 0!==s))if(s<0){var c=Math.pow(10,-1*s);e=parseInt((1*e/c).toFixed(0))*c}else e=e.toFixed(s),i.zeros||(e=parseFloat(e));if(i.thousands||i.decimal){var u=(e=a(e)).split(".");e=u[0],i.thousands&&(e=e.replace(/\B(?=(\d{3})+(?!\d))/g,i.thousands)),u.length>1&&(e+=(i.decimal||".")+u[1])}return t+e+r}function k(t,e,i){return i in e?e[i]:i in t.options?t.options[i]:null}var C={maintainAspectRatio:!1,animation:!1,plugins:{legend:{},tooltip:{displayColors:!1,callbacks:{}},title:{font:{size:20},color:"#333"}},interaction:{}},T={scales:{y:{ticks:{maxTicksLimit:4},title:{font:{size:16},color:"#333"},grid:{}},x:{grid:{drawOnChartArea:!1},title:{font:{size:16},color:"#333"},time:{},ticks:{}}}},D=["#3366CC","#DC3912","#FF9900","#109618","#990099","#3B3EAC","#0099C6","#DD4477","#66AA00","#B82E2E","#316395","#994499","#22AA99","#AAAA11","#6633CC","#E67300","#8B0707","#329262","#5574A6","#651067"],S=function(t,e,i){void 0!==e?(t.plugins.legend.display=!!e,e&&!0!==e&&(t.plugins.legend.position=e)):i&&(t.plugins.legend.display=!1)},P=function(t,e){t.plugins.title.display=!0,t.plugins.title.text=e},z=function(t,e){null!==e&&(t.scales.x.min=s(e))},O=function(t,e){t.scales.x.max=s(e)},A=function(t,e){t.scales.x.stacked=!!e,t.scales.y.stacked=!!e},E=function(t,e){t.scales.x.title.display=!0,t.scales.x.title.text=e},L=function(t,e){t.scales.y.title.display=!0,t.scales.y.title.text=e},R=function(t,e){var i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return i?"rgba("+parseInt(i[1],16)+", "+parseInt(i[2],16)+", "+parseInt(i[3],16)+", "+e+")":t},F=function(t){return null!=t},I=function(e,i,n){var r={prefix:e.options.prefix,suffix:e.options.suffix,thousands:e.options.thousands,decimal:e.options.decimal,precision:e.options.precision,round:e.options.round,zeros:e.options.zeros};if(e.options.bytes){var o=e.data;"pie"===n&&(o=[{data:o}]);for(var a=0,s=0;sa&&(a=l.data[h][1]);for(var c=1;a>=1024;)c*=1024,a/=1024;r.byteScale=c}if("pie"!==n){var u=i.scales.y;"bar"===n&&(u=i.scales.x),r.byteScale&&(u.ticks.stepSize||(u.ticks.stepSize=r.byteScale/2),u.ticks.maxTicksLimit||(u.ticks.maxTicksLimit=4)),u.ticks.callback||(u.ticks.callback=function(t){return M("",t,r,!0)})}if(!i.plugins.tooltip.callbacks.label)if("scatter"===n)i.plugins.tooltip.callbacks.label=function(t){var e=t.dataset.label||"";return e&&(e+=": "),e+"("+t.label+", "+t.formattedValue+")"};else if("bubble"===n)i.plugins.tooltip.callbacks.label=function(t){var e=t.dataset.label||"";e&&(e+=": ");var i=t.raw;return e+"("+i.x+", "+i.y+", "+i.v+")"};else if("pie"===n)i.plugins.tooltip.callbacks.label=function(e){var i=e.label;return t(i)?(i=i.slice())[0]+=": ":i+=": ",M(i,e.parsed,r)};else{var d="bar"===n?"x":"y";i.plugins.tooltip.callbacks.label=function(t){if(null!==t.parsed[d]){var e=t.dataset.label||"";return e&&(e+=": "),M(e,t.parsed[d],r)}}}},N=c(r(C,T),S,P,(function(t,e){null!==e&&(t.scales.y.min=s(e))}),(function(t,e){t.scales.y.max=s(e)}),A,E,L),H=function(e,i,n){var o,a=[],h=[],c=e.options.colors||D,u=!0,d=!0,v=!0,w=!0,_=!0,M=!0,C=e.data,T=0;if("bubble"===n)for(var S=0;ST&&(T=P.data[z][2]);var O,A,E,L,I,N,H,B=[],W=[];if("bar"===n||"column"===n||"number"!==e.xtype&&"bubble"!==e.xtype){var U,V,j=[];for(O=0;O0){var et=(F(J)?l(J):h[0]).getTime(),it=(F(tt)?l(tt):h[0]).getTime();for(O=1;Oit&&(it=nt)}var rt,ot=(it-et)/864e5;if(!i.scales.x.time.unit&&(w||ot>3650?(i.scales.x.time.unit="year",rt=365):v||ot>300?(i.scales.x.time.unit="month",rt=30):u||ot>10?(i.scales.x.time.unit="day",rt=1):_||ot>.5?(i.scales.x.time.displayFormats={hour:"MMM d, h a"},i.scales.x.time.unit="hour",rt=1/24):M&&(i.scales.x.time.displayFormats={minute:"h:mm a"},i.scales.x.time.unit="minute",rt=1/24/60),rt&&ot>0)){var at=e.element.offsetWidth;if(at>0){var st=Math.ceil(ot/rt/(at/100));d&&1===rt&&(st=7*Math.ceil(st/7)),i.scales.x.time.stepSize=st}}i.scales.x.time.tooltipFormat||(u?i.scales.x.time.tooltipFormat="PP":_?i.scales.x.time.tooltipFormat="MMM d, h a":M&&(i.scales.x.time.tooltipFormat="h:mm a"))}return{labels:h,datasets:a}},B=function(t){this.name="chartjs",this.library=t};B.prototype.renderLineChart=function(t,e){var i={};!t.options.max&&function(t){var e,i,n;for(e=0;e25?n=25:n<10&&(n=10),i.scales.x.ticks.callback||(i.scales.x.ticks.callback=function(t){return(t=a(this.getLabelForValue(t))).length>n?t.substring(0,n-2)+"...":t})}(t,o,i),this.drawChart(t,"bar",o,i)},B.prototype.renderAreaChart=function(t){this.renderLineChart(t,"area")},B.prototype.renderBarChart=function(t){this.renderColumnChart(t,"bar")},B.prototype.renderScatterChart=function(t,e){e=e||"scatter";var i=N(t,t.options);I(t,i,e),"showLine"in i||(i.showLine=!1);var n=H(t,i,e);i.scales.x.type=i.scales.x.type||"linear",i.scales.x.position=i.scales.x.position||"bottom","mode"in i.interaction||(i.interaction.mode="nearest"),this.drawChart(t,e,n,i)},B.prototype.renderBubbleChart=function(t){this.renderScatterChart(t,"bubble")},B.prototype.destroy=function(t){t.chart&&t.chart.destroy()},B.prototype.drawChart=function(t,e,i,n){if(this.destroy(t),!t.destroyed){var r={type:e,data:i,options:n};t.options.code&&window.console.log("new Chart(ctx, "+JSON.stringify(r)+");"),t.element.innerHTML="";var o=t.element.getElementsByTagName("CANVAS")[0];t.chart=new this.library(o,r)}};var W={chart:{},xAxis:{title:{text:null},labels:{style:{fontSize:"12px"}}},yAxis:{title:{text:null},labels:{style:{fontSize:"12px"}}},title:{text:null},credits:{enabled:!1},legend:{borderWidth:0},tooltip:{style:{fontSize:"12px"}},plotOptions:{areaspline:{},area:{},series:{marker:{}}},time:{useUTC:!1}},U=function(t,e,i){void 0!==e?(t.legend.enabled=!!e,e&&!0!==e&&("top"===e||"bottom"===e?t.legend.verticalAlign=e:(t.legend.layout="vertical",t.legend.verticalAlign="middle",t.legend.align=e))):i&&(t.legend.enabled=!1)},V=function(t,e){t.title.text=e},j=c(W,U,V,(function(t,e){t.yAxis.min=e}),(function(t,e){t.yAxis.max=e}),(function(t,e){var i=e?!0===e?"normal":e:null;t.plotOptions.series.stacking=i,t.plotOptions.area.stacking=i,t.plotOptions.areaspline.stacking=i}),(function(t,e){t.xAxis.title.text=e}),(function(t,e){t.yAxis.title.text=e})),Y=function(t,e,i){var n={prefix:t.options.prefix,suffix:t.options.suffix,thousands:t.options.thousands,decimal:t.options.decimal,precision:t.options.precision,round:t.options.round,zeros:t.options.zeros};"pie"===i||e.yAxis.labels.formatter||(e.yAxis.labels.formatter=function(){return M("",this.value,n)}),e.tooltip.pointFormatter||e.tooltip.pointFormat||(e.tooltip.pointFormatter=function(){return' '+M(this.series.name+": ",this.y,n)+"
"})},$=function(t){this.name="highcharts",this.library=t};$.prototype.renderLineChart=function(t,e){var i={};"areaspline"===(e=e||"spline")&&(i={plotOptions:{areaspline:{stacking:"normal"},area:{stacking:"normal"},series:{marker:{enabled:!1}}}}),!1===t.options.curve&&("areaspline"===e?e="area":"spline"===e&&(e="line"));var n,r,o,a=j(t,t.options,i);"number"===t.xtype?a.xAxis.type=a.xAxis.type||"linear":a.xAxis.type="string"===t.xtype?"category":"datetime",a.chart.type||(a.chart.type=e),Y(t,a,e);var s=t.data;for(r=0;r0)return!1;return!0}function ct(t,e,i){if(t.addEventListener)return t.addEventListener(e,i,!1),i;var n=function(){return i.call(t,window.event)};return t.attachEvent("on"+e,n),n}function ut(t,e,i){t.removeEventListener?t.removeEventListener(e,i,!1):t.detachEvent("on"+e,i)}function dt(t,e){if(t===e)return!1;for(;e&&e!==t;)e=e.parentNode;return e===t}rt.prototype.renderLineChart=function(t){var e=this;this.waitForLoaded(t,(function(){var i={};!1===t.options.curve&&(i.curveType="none"),!1===t.options.points&&(i.pointSize=0);var n=nt(t,t.options,i),r=e.createDataTable(t.data,t.xtype);e.drawChart(t,"LineChart",r,n)}))},rt.prototype.renderPieChart=function(t){var e=this;this.waitForLoaded(t,(function(){var i={chartArea:{top:"10%",height:"80%"},legend:{}};t.options.colors&&(i.colors=t.options.colors),t.options.donut&&(i.pieHole=.5),"legend"in t.options&&G(i,t.options.legend),t.options.title&&K(i,t.options.title);var n=r(r(Q,i),t.options.library||{}),o=new e.library.visualization.DataTable;o.addColumn("string",""),o.addColumn("number","Value"),o.addRows(t.data),e.drawChart(t,"PieChart",o,n)}))},rt.prototype.renderColumnChart=function(t){var e=this;this.waitForLoaded(t,(function(){var i=nt(t,t.options),n=e.createDataTable(t.data,t.xtype);e.drawChart(t,"ColumnChart",n,i)}))},rt.prototype.renderBarChart=function(t){var e=this;this.waitForLoaded(t,(function(){var i=c(Q,G,K,Z,J,tt,et,it)(t,t.options,{hAxis:{gridlines:{color:"#ccc"}}}),n=e.createDataTable(t.data,t.xtype);e.drawChart(t,"BarChart",n,i)}))},rt.prototype.renderAreaChart=function(t){var e=this;this.waitForLoaded(t,(function(){var i=nt(t,t.options,{isStacked:!0,pointSize:0,areaOpacity:.5}),n=e.createDataTable(t.data,t.xtype);e.drawChart(t,"AreaChart",n,i)}))},rt.prototype.renderGeoChart=function(t){var e=this;this.waitForLoaded(t,"geochart",(function(){var i={legend:"none",colorAxis:{colors:t.options.colors||["#f6c7b6","#ce502d"]}},n=r(r(Q,i),t.options.library||{}),o=new e.library.visualization.DataTable;o.addColumn("string",""),o.addColumn("number",t.options.label||"Value"),o.addRows(t.data),e.drawChart(t,"GeoChart",o,n)}))},rt.prototype.renderScatterChart=function(t){var e=this;this.waitForLoaded(t,(function(){var i,n,r,o,a=nt(t,t.options,{}),s=t.data,l=[];for(i=0;i0?new Error("No charting library found for "+t):new Error("No charting libraries found - be sure to include one before your charts")})(t,i),i.options.download&&!i.__downloadAttached&&"chartjs"===i.adapter&&function(t){var e=t.element,i=document.createElement("a"),n=t.options.download;!0===n?n={}:"string"==typeof n&&(n={filename:n}),i.download=n.filename||"chart.png",i.style.position="absolute",i.style.top="20px",i.style.right="20px",i.style.zIndex=1e3,i.style.lineHeight="20px",i.target="_blank";var r=document.createElement("img");r.alt="Download",r.style.border="none",r.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAMAAAC6V+0/AAABCFBMVEUAAADMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMywEsqxAAAAV3RSTlMAAQIDBggJCgsMDQ4PERQaHB0eISIjJCouLzE0OTo/QUJHSUpLTU5PUllhYmltcHh5foWLjI+SlaCio6atr7S1t7m6vsHHyM7R2tze5Obo7fHz9ff5+/1hlxK2AAAA30lEQVQYGUXBhVYCQQBA0TdYWAt2d3d3YWAHyur7/z9xgD16Lw0DW+XKx+1GgX+FRzM3HWQWrHl5N/oapW5RPe0PkBu+UYeICvozTWZVK23Ao04B79oJrOsJDOoxkZoQPWgX29pHpCZEk7rEvQYiNSFq1UMqvlCjJkRBS1R8hb00Vb/TajtBL7nTHE1X1vyMQF732dQhyF2o6SAwrzP06iUQzvwsArlnzcOdrgBhJyHa1QOgO9U1GsKuvjUTjavliZYQ8nNPapG6sap/3nrIdJ6bOWzmX/fy0XVpfzZP3S8OJT3g9EEiJwAAAABJRU5ErkJggg==",i.appendChild(r),e.style.position="relative",t.__downloadAttached=!0,t.__enterEvent=ct(e,"mouseover",(function(r){var o=r.relatedTarget;o&&(o===this||dt(this,o))||!t.options.download||(i.href=t.toImage(n),e.appendChild(i))})),t.__leaveEvent=ct(e,"mouseout",(function(t){var e=t.relatedTarget;e&&(e===this||dt(this,e))||i.parentNode&&i.parentNode.removeChild(i)}))}(i)}var Ct=function(t,e,i){var n;if("string"==typeof t&&(n=t,!(t=document.getElementById(t))))throw new Error("No element with id "+n);this.element=t,this.options=r(Rt.options,i||{}),this.dataSource=e,Rt.charts[t.id]=this,_t(this,e,!0),this.options.refresh&&this.startRefresh()};Ct.prototype.getElement=function(){return this.element},Ct.prototype.getDataSource=function(){return this.dataSource},Ct.prototype.getData=function(){return this.data},Ct.prototype.getOptions=function(){return this.options},Ct.prototype.getChartObject=function(){return this.chart},Ct.prototype.getAdapter=function(){return this.adapter},Ct.prototype.updateData=function(t,e){this.dataSource=t,e&&this.__updateOptions(e),_t(this,t,!0)},Ct.prototype.setOptions=function(t){this.__updateOptions(t),this.redraw()},Ct.prototype.redraw=function(){_t(this,this.rawData)},Ct.prototype.refreshData=function(){if("string"==typeof this.dataSource){var t=-1===this.dataSource.indexOf("?")?"?":"&";_t(this,this.dataSource+t+"_="+(new Date).getTime())}else"function"==typeof this.dataSource&&_t(this,this.dataSource)},Ct.prototype.startRefresh=function(){var t=this,e=this.options.refresh;if(e&&"string"!=typeof this.dataSource&&"function"!=typeof this.dataSource)throw new Error("Data source must be a URL or callback for refresh");if(!this.intervalId){if(!e)throw new Error("No refresh interval");this.intervalId=setInterval((function(){t.refreshData()}),1e3*e)}},Ct.prototype.stopRefresh=function(){this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null)},Ct.prototype.toImage=function(t){if("chartjs"===this.adapter){if(t&&t.background&&"transparent"!==t.background){var e=this.chart.canvas,i=this.chart.ctx,n=document.createElement("canvas"),r=n.getContext("2d");return n.width=i.canvas.width,n.height=i.canvas.height,r.fillStyle=t.background,r.fillRect(0,0,n.width,n.height),r.drawImage(e,0,0),n.toDataURL("image/png")}return this.chart.toBase64Image()}throw new Error("Feature only available for Chart.js")},Ct.prototype.destroy=function(){this.destroyed=!0,this.stopRefresh(),this.__adapterObject&&this.__adapterObject.destroy(this),this.__enterEvent&&ut(this.element,"mouseover",this.__enterEvent),this.__leaveEvent&&ut(this.element,"mouseout",this.__leaveEvent)},Ct.prototype.__updateOptions=function(t){var e=t.refresh&&t.refresh!==this.options.refresh;this.options=r(Rt.options,t),e&&(this.stopRefresh(),this.startRefresh())},Ct.prototype.__render=function(){this.data=this.__processData(),kt(this.__chartName(),this)},Ct.prototype.__config=function(){return bt};var Tt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__processData=function(){return st(this)},e.prototype.__chartName=function(){return"LineChart"},e}(Ct),Dt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__processData=function(){return lt(this)},e.prototype.__chartName=function(){return"PieChart"},e}(Ct),St=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__processData=function(){return st(this,null,!0)},e.prototype.__chartName=function(){return"ColumnChart"},e}(Ct),Pt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__processData=function(){return st(this,null,!0)},e.prototype.__chartName=function(){return"BarChart"},e}(Ct),zt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__processData=function(){return st(this)},e.prototype.__chartName=function(){return"AreaChart"},e}(Ct),Ot=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__processData=function(){return lt(this)},e.prototype.__chartName=function(){return"GeoChart"},e}(Ct),At=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__processData=function(){return st(this,"number")},e.prototype.__chartName=function(){return"ScatterChart"},e}(Ct),Et=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__processData=function(){return st(this,"bubble")},e.prototype.__chartName=function(){return"BubbleChart"},e}(Ct),Lt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__processData=function(){var t,e=this.rawData;for(t=0;t{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";var t=i(616),e=i.n(t);const n="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function r(t,e,i){const r=i||(t=>Array.prototype.slice.call(t));let o=!1,a=[];return function(...i){a=r(i),o||(o=!0,n.call(window,(()=>{o=!1,t.apply(e,a)})))}}const o=t=>"start"===t?"left":"end"===t?"right":"center",a=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2;function s(){}const l=function(){let t=0;return function(){return t++}}();function h(t){return null==t}function c(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)}function u(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}const d=t=>("number"==typeof t||t instanceof Number)&&isFinite(+t);function f(t,e){return d(t)?t:e}function g(t,e){return void 0===t?e:t}const p=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function m(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function b(t,e,i,n){let r,o,a;if(c(t))if(o=t.length,n)for(r=o-1;r>=0;r--)e.call(i,t[r],r);else for(r=0;ri;)t=t[e.substr(i,n-i)],i=n+1,n=C(e,i);return t}function D(t){return t.charAt(0).toUpperCase()+t.slice(1)}const S=t=>void 0!==t,P=t=>"function"==typeof t,z=Math.PI,O=2*z,A=O+z,E=Number.POSITIVE_INFINITY,L=z/180,R=z/2,F=z/4,I=2*z/3,N=Math.log10,H=Math.sign;function B(t){const e=Math.round(t);t=U(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(N(t))),n=t/i;return(n<=1?1:n<=2?2:n<=5?5:10)*i}function W(t){return!isNaN(parseFloat(t))&&isFinite(t)}function U(t,e,i){return Math.abs(t-e)l&&h0===t||1===t,J=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*O/i),tt=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*O/i)+1,et={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*R),easeOutSine:t=>Math.sin(t*R),easeInOutSine:t=>-.5*(Math.cos(z*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>Z(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>Z(t)?t:J(t,.075,.3),easeOutElastic:t=>Z(t)?t:tt(t,.075,.3),easeInOutElastic(t){const e=.1125;return Z(t)?t:t<.5?.5*J(2*t,e,.45):.5+.5*tt(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-et.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*et.easeInBounce(2*t):.5*et.easeOutBounce(2*t-1)+.5},it={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},nt="0123456789ABCDEF",rt=t=>nt[15&t],ot=t=>nt[(240&t)>>4]+nt[15&t],at=t=>(240&t)>>4==(15&t);function st(t){return t+.5|0}const lt=(t,e,i)=>Math.max(Math.min(t,i),e);function ht(t){return lt(st(2.55*t),0,255)}function ct(t){return lt(st(255*t),0,255)}function ut(t){return lt(st(t/2.55)/100,0,1)}function dt(t){return lt(st(100*t),0,100)}const ft=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/,gt=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function pt(t,e,i){const n=e*Math.min(i,1-i),r=(e,r=(e+t/30)%12)=>i-n*Math.max(Math.min(r-3,9-r,1),-1);return[r(0),r(8),r(4)]}function mt(t,e,i){const n=(n,r=(n+t/60)%6)=>i-i*e*Math.max(Math.min(r,4-r,1),0);return[n(5),n(3),n(1)]}function bt(t,e,i){const n=pt(t,1,.5);let r;for(e+i>1&&(r=1/(e+i),e*=r,i*=r),r=0;r<3;r++)n[r]*=1-e-i,n[r]+=e;return n}function xt(t){const e=t.r/255,i=t.g/255,n=t.b/255,r=Math.max(e,i,n),o=Math.min(e,i,n),a=(r+o)/2;let s,l,h;return r!==o&&(h=r-o,l=a>.5?h/(2-r-o):h/(r+o),s=r===e?(i-n)/h+(i=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=ct(t[3]))):(e=Tt(t,{r:0,g:0,b:0,a:1})).a=ct(e.a),e}function St(t){return"r"===t.charAt(0)?function(t){const e=ft.exec(t);let i,n,r,o=255;if(e){if(e[7]!==i){const t=+e[7];o=255&(e[8]?ht(t):255*t)}return i=+e[1],n=+e[3],r=+e[5],i=255&(e[2]?ht(i):i),n=255&(e[4]?ht(n):n),r=255&(e[6]?ht(r):r),{r:i,g:n,b:r,a:o}}}(t):function(t){const e=gt.exec(t);let i,n=255;if(!e)return;e[5]!==i&&(n=e[6]?ht(+e[5]):ct(+e[5]));const r=wt(+e[2]),o=+e[3]/100,a=+e[4]/100;return i="hwb"===e[1]?function(t,e,i){return yt(bt,t,e,i)}(r,o,a):"hsv"===e[1]?function(t,e,i){return yt(mt,t,e,i)}(r,o,a):vt(r,o,a),{r:i[0],g:i[1],b:i[2],a:n}}(t)}class Pt{constructor(t){if(t instanceof Pt)return t;const e=typeof t;let i;var n,r,o;"object"===e?i=Dt(t):"string"===e&&(o=(n=t).length,"#"===n[0]&&(4===o||5===o?r={r:255&17*it[n[1]],g:255&17*it[n[2]],b:255&17*it[n[3]],a:5===o?17*it[n[4]]:255}:7!==o&&9!==o||(r={r:it[n[1]]<<4|it[n[2]],g:it[n[3]]<<4|it[n[4]],b:it[n[5]]<<4|it[n[6]],a:9===o?it[n[7]]<<4|it[n[8]]:255})),i=r||function(t){kt||(kt=function(){const t={},e=Object.keys(Mt),i=Object.keys(_t);let n,r,o,a,s;for(n=0;n>16&255,o>>8&255,255&o]}return t}(),kt.transparent=[0,0,0,0]);const e=kt[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}(t)||St(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=Tt(this._rgb);return t&&(t.a=ut(t.a)),t}set rgb(t){this._rgb=Dt(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${ut(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):this._rgb;var t}hexString(){return this._valid?(t=this._rgb,e=function(t){return at(t.r)&&at(t.g)&&at(t.b)&&at(t.a)}(t)?rt:ot,t?"#"+e(t.r)+e(t.g)+e(t.b)+(t.a<255?e(t.a):""):t):this._rgb;var t,e}hslString(){return this._valid?function(t){if(!t)return;const e=xt(t),i=e[0],n=dt(e[1]),r=dt(e[2]);return t.a<255?`hsla(${i}, ${n}%, ${r}%, ${ut(t.a)})`:`hsl(${i}, ${n}%, ${r}%)`}(this._rgb):this._rgb}mix(t,e){const i=this;if(t){const n=i.rgb,r=t.rgb;let o;const a=e===o?.5:e,s=2*a-1,l=n.a-r.a,h=((s*l==-1?s:(s+l)/(1+s*l))+1)/2;o=1-h,n.r=255&h*n.r+o*r.r+.5,n.g=255&h*n.g+o*r.g+.5,n.b=255&h*n.b+o*r.b+.5,n.a=a*n.a+(1-a)*r.a,i.rgb=n}return i}clone(){return new Pt(this.rgb)}alpha(t){return this._rgb.a=ct(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=st(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.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 Ct(this._rgb,2,t),this}darken(t){return Ct(this._rgb,2,-t),this}saturate(t){return Ct(this._rgb,1,t),this}desaturate(t){return Ct(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=xt(t);i[0]=wt(i[0]+e),i=vt(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function zt(t){return new Pt(t)}const Ot=t=>t instanceof CanvasGradient||t instanceof CanvasPattern;function At(t){return Ot(t)?t:zt(t)}function Et(t){return Ot(t)?t:zt(t).saturate(.5).darken(.1).hexString()}const Lt=Object.create(null),Rt=Object.create(null);function Ft(t,e){if(!e)return t;const i=e.split(".");for(let e=0,n=i.length;et.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=(t,e)=>Et(e.backgroundColor),this.hoverBorderColor=(t,e)=>Et(e.borderColor),this.hoverColor=(t,e)=>Et(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0},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.describe(t)}set(t,e){return It(this,t,e)}get(t){return Ft(this,t)}describe(t,e){return It(Rt,t,e)}override(t,e){return It(Lt,t,e)}route(t,e,i,n){const r=Ft(this,t),o=Ft(this,i),a="_"+e;Object.defineProperties(r,{[a]:{value:r[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[a],e=o[n];return u(t)?Object.assign({},e,t):g(t,e)},set(t){this[a]=t}}})}}({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function Ht(t,e,i,n,r){let o=e[r];return o||(o=e[r]=t.measureText(r).width,i.push(r)),o>n&&(n=o),n}function Bt(t,e,i,n){let r=(n=n||{}).data=n.data||{},o=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(r=n.data={},o=n.garbageCollect=[],n.font=e),t.save(),t.font=e;let a=0;const s=i.length;let l,h,u,d,f;for(l=0;li.length){for(l=0;l0&&t.stroke()}}function jt(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.xe.top-i&&t.y0&&""!==o.strokeColor;let l,u;for(t.save(),t.font=r.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),h(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,o),l=0;lg(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of r)i[t]=+o(t)||0;return i}function ie(t){return ee(t,{top:"y",right:"x",bottom:"y",left:"x"})}function ne(t){return ee(t,["topLeft","topRight","bottomLeft","bottomRight"])}function re(t){const e=ie(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function oe(t,e){t=t||{},e=e||Nt.font;let i=g(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let n=g(t.style,e.style);n&&!(""+n).match(Jt)&&(console.warn('Invalid font style specified: "'+n+'"'),n="");const r={family:g(t.family,e.family),lineHeight:te(g(t.lineHeight,e.lineHeight),i),size:i,style:n,weight:g(t.weight,e.weight),string:""};return r.string=function(t){return!t||h(t.size)||h(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(r),r}function ae(t,e,i,n){let r,o,a,s=!0;for(r=0,o=t.length;rt[i]1;)n=o+r>>1,i(n)?o=n:r=n;return{lo:o,hi:r}}const he=(t,e,i)=>le(t,i,(n=>t[n][e]le(t,i,(n=>t[n][e]>=i)),ue=["push","pop","shift","splice","unshift"];function de(t,e){const i=t._chartjs;if(!i)return;const n=i.listeners,r=n.indexOf(e);-1!==r&&n.splice(r,1),n.length>0||(ue.forEach((e=>{delete t[e]})),delete t._chartjs)}function fe(t){const e=new Set;let i,n;for(i=0,n=t.length;it[0])){S(n)||(n=Ce("_fallback",t));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:i,_fallback:n,_getTarget:r,override:r=>ge([r,...t],e,i,n)};return new Proxy(o,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,n)=>ye(i,n,(()=>function(t,e,i,n){let r;for(const o of e)if(r=Ce(be(o,t),i),S(r))return xe(t,r)?Me(i,n,t,r):r}(n,e,t,i))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>Te(t).includes(e),ownKeys:t=>Te(t),set:(t,e,i)=>((t._storage||(t._storage=r()))[e]=i,delete t[e],delete t._keys,!0)})}function pe(t,e,i,n){const r={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:me(t,n),setContext:e=>pe(t,e,i,n),override:r=>pe(t.override(r),e,i,n)};return new Proxy(r,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>ye(t,e,(()=>function(t,e,i){const{_proxy:n,_context:r,_subProxy:o,_descriptors:a}=t;let s=n[e];return P(s)&&a.isScriptable(e)&&(s=function(t,e,i,n){const{_proxy:r,_context:o,_subProxy:a,_stack:s}=i;if(s.has(t))throw new Error("Recursion detected: "+Array.from(s).join("->")+"->"+t);return s.add(t),e=e(o,a||n),s.delete(t),u(e)&&(e=Me(r._scopes,r,t,e)),e}(e,s,t,i)),c(s)&&s.length&&(s=function(t,e,i,n){const{_proxy:r,_context:o,_subProxy:a,_descriptors:s}=i;if(S(o.index)&&n(t))e=e[o.index%e.length];else if(u(e[0])){const i=e,n=r._scopes.filter((t=>t!==i));e=[];for(const l of i){const i=Me(n,r,t,l);e.push(pe(i,o,a&&a[t],s))}}return e}(e,s,t,a.isIndexable)),xe(e,s)&&(s=pe(s,r,o&&o[e],a)),s}(t,e,i))),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,n)=>(t[i]=n,delete e[i],!0)})}function me(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:n=e.indexable,_allKeys:r=e.allKeys}=t;return{allKeys:r,scriptable:i,indexable:n,isScriptable:P(i)?i:()=>i,isIndexable:P(n)?n:()=>n}}const be=(t,e)=>t?t+D(e):e,xe=(t,e)=>u(e)&&"adapters"!==t;function ye(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const n=i();return t[e]=n,n}function ve(t,e,i){return P(t)?t(e,i):t}const we=(t,e)=>!0===t?e:"string"==typeof t?T(e,t):void 0;function _e(t,e,i,n){for(const r of e){const e=we(i,r);if(e){t.add(e);const r=ve(e._fallback,i,e);if(S(r)&&r!==i&&r!==n)return r}else if(!1===e&&S(n)&&i!==n)return null}return!1}function Me(t,e,i,n){const r=e._rootScopes,o=ve(e._fallback,i,n),a=[...t,...r],s=new Set;s.add(n);let l=ke(s,a,i,o||i);return null!==l&&(!S(o)||o===i||(l=ke(s,a,o,l),null!==l))&&ge(Array.from(s),[""],r,o,(()=>function(t,e,i){const n=t._getTarget();e in n||(n[e]={});const r=n[e];return c(r)&&u(i)?i:r}(e,i,n)))}function ke(t,e,i,n){for(;i;)i=_e(t,e,i,n);return i}function Ce(t,e){for(const i of e){if(!i)continue;const e=i[t];if(S(e))return e}}function Te(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}const De=Number.EPSILON||1e-14,Se=(t,e)=>e"x"===t?"y":"x";function ze(t,e,i,n){const r=t.skip?e:t,o=e,a=i.skip?e:i,s=q(o,r),l=q(a,o);let h=s/(s+l),c=l/(s+l);h=isNaN(h)?0:h,c=isNaN(c)?0:c;const u=n*h,d=n*c;return{previous:{x:o.x-u*(a.x-r.x),y:o.y-u*(a.y-r.y)},next:{x:o.x+d*(a.x-r.x),y:o.y+d*(a.y-r.y)}}}function Oe(t,e,i){return Math.max(Math.min(t,i),e)}function Ae(t,e,i,n,r){let o,a,s,l;if(e.spanGaps&&(t=t.filter((t=>!t.skip))),"monotone"===e.cubicInterpolationMode)!function(t,e="x"){const i=Pe(e),n=t.length,r=Array(n).fill(0),o=Array(n);let a,s,l,h=Se(t,0);for(a=0;awindow.getComputedStyle(t,null),Ie=["top","right","bottom","left"];function Ne(t,e,i){const n={};i=i?"-"+i:"";for(let r=0;r<4;r++){const o=Ie[r];n[o]=parseFloat(t[e+"-"+o+i])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function He(t,e){const{canvas:i,currentDevicePixelRatio:n}=e,r=Fe(i),o="border-box"===r.boxSizing,a=Ne(r,"padding"),s=Ne(r,"border","width"),{x:l,y:h,box:c}=function(t,e){const i=t.native||t,n=i.touches,r=n&&n.length?n[0]:i,{offsetX:o,offsetY:a}=r;let s,l,h=!1;if(((t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot))(o,a,i.target))s=o,l=a;else{const t=e.getBoundingClientRect();s=r.clientX-t.left,l=r.clientY-t.top,h=!0}return{x:s,y:l,box:h}}(t,i),u=a.left+(c&&s.left),d=a.top+(c&&s.top);let{width:f,height:g}=e;return o&&(f-=a.width+s.width,g-=a.height+s.height),{x:Math.round((l-u)/f*i.width/n),y:Math.round((h-d)/g*i.height/n)}}const Be=t=>Math.round(10*t)/10;function We(t,e,i){const n=e||1,r=Math.floor(t.height*n),o=Math.floor(t.width*n);t.height=r/n,t.width=o/n;const a=t.canvas;return a.style&&(i||!a.style.height&&!a.style.width)&&(a.style.height=`${t.height}px`,a.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==n||a.height!==r||a.width!==o)&&(t.currentDevicePixelRatio=n,a.height=r,a.width=o,t.ctx.setTransform(n,0,0,n,0,0),!0)}const Ue=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t}();function Ve(t,e){const i=function(t,e){return Fe(t).getPropertyValue(e)}(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function je(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function Ye(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:"middle"===n?i<.5?t.y:e.y:"after"===n?i<1?t.y:e.y:i>0?e.y:t.y}}function $e(t,e,i,n){const r={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},a=je(t,r,i),s=je(r,o,i),l=je(o,e,i),h=je(a,s,i),c=je(s,l,i);return je(h,c,i)}const qe=new Map;function Xe(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let n=qe.get(i);return n||(n=new Intl.NumberFormat(t,e),qe.set(i,n)),n}(e,i).format(t)}function Qe(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function Ge(t,e){let i,n;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,n=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=n)}function Ke(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function Ze(t){return"angle"===t?{between:G,compare:X,normalize:Q}:{between:(t,e,i)=>t>=Math.min(e,i)&&t<=Math.max(i,e),compare:(t,e)=>t-e,normalize:t=>t}}function Je({start:t,end:e,count:i,loop:n,style:r}){return{start:t%i,end:e%i,loop:n&&(e-t+1)%i==0,style:r}}function ti(t,e,i){if(!i)return[t];const{property:n,start:r,end:o}=i,a=e.length,{compare:s,between:l,normalize:h}=Ze(n),{start:c,end:u,loop:d,style:f}=function(t,e,i){const{property:n,start:r,end:o}=i,{between:a,normalize:s}=Ze(n),l=e.length;let h,c,{start:u,end:d,loop:f}=t;if(f){for(u+=l,d+=l,h=0,c=l;hn({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(i-e.start,o)})))}_refresh(){this._request||(this._running=!0,this._request=n.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(t=Date.now()){let e=0;this._charts.forEach(((i,n)=>{if(!i.running||!i.items.length)return;const r=i.items;let o,a=r.length-1,s=!1;for(;a>=0;--a)o=r[a],o._active?(o._total>i.duration&&(i.duration=o._total),o.tick(t),s=!0):(r[a]=r[r.length-1],r.pop());s&&(n.draw(),this._notify(n,i,t,"progress")),r.length||(i.running=!1,this._notify(n,i,t,"complete"),i.initial=!1),e+=r.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}};const oi="transparent",ai={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const n=At(t||oi),r=n.valid&&At(e||oi);return r&&r.valid?r.mix(n,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class si{constructor(t,e,i,n){const r=e[i];n=ae([t.to,n,r,t.from]);const o=ae([t.from,r,n]);this._active=!0,this._fn=t.fn||ai[t.type||typeof o],this._easing=et[t.easing]||et.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=o,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const n=this._target[this._prop],r=i-this._start,o=this._duration-r;this._start=i,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=r,this._loop=!!t.loop,this._to=ae([t.to,e,n,t.from]),this._from=ae([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,n=this._prop,r=this._from,o=this._loop,a=this._to;let s;if(this._active=r!==a&&(o||e1?2-s:s,s=this._easing(Math.min(1,Math.max(0,s))),this._target[n]=this._fn(r,a,s))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,i)=>{t.push({res:e,rej:i})}))}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),Nt.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),Nt.describe("animations",{_fallback:"animation"}),Nt.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=>0|t}}}});class hi{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!u(t))return;const e=this._properties;Object.getOwnPropertyNames(t).forEach((i=>{const n=t[i];if(!u(n))return;const r={};for(const t of li)r[t]=n[t];(c(n.properties)&&n.properties||[i]).forEach((t=>{t!==i&&e.has(t)||e.set(t,r)}))}))}_animateOptions(t,e){const i=e.options,n=function(t,e){if(!e)return;let i=t.options;if(i)return i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}})),i;t.options=e}(t,i);if(!n)return[];const r=this._createAnimations(n,i);return i.$shared&&function(t,e){const i=[],n=Object.keys(e);for(let e=0;e{t.options=i}),(()=>{})),r}_createAnimations(t,e){const i=this._properties,n=[],r=t.$animations||(t.$animations={}),o=Object.keys(e),a=Date.now();let s;for(s=o.length-1;s>=0;--s){const l=o[s];if("$"===l.charAt(0))continue;if("options"===l){n.push(...this._animateOptions(t,e));continue}const h=e[l];let c=r[l];const u=i.get(l);if(c){if(u&&c.active()){c.update(u,h,a);continue}c.cancel()}u&&u.duration?(r[l]=c=new si(u,t,l,h),n.push(c)):t[l]=h}return n}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(ri.add(this._chart,i),!0):void 0}}function ci(t,e){const i=t&&t.options||{},n=i.reverse,r=void 0===i.min?e:0,o=void 0===i.max?e:0;return{start:n?o:r,end:n?r:o}}function ui(t,e){const i=[],n=t._getSortedDatasetMetas(e);let r,o;for(r=0,o=n.length;r0||!i&&e<0)return r.index}return null}function mi(t,e){const{chart:i,_cachedMeta:n}=t,r=i._stacks||(i._stacks={}),{iScale:o,vScale:a,index:s}=n,l=o.axis,h=a.axis,c=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(o,a,n),u=e.length;let d;for(let t=0;ti[t].axis===e)).shift()}function xi(t,e){const i=t.controller.index,n=t.vScale&&t.vScale.axis;if(n){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[n]||void 0===e[n][i])return;delete e[n][i]}}}const yi=t=>"reset"===t||"none"===t,vi=(t,e)=>e?t:Object.assign({},t);class wi{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,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.$context=void 0,this._syncList=[],this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=fi(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&xi(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),n=(t,e,i,n)=>"x"===t?e:"r"===t?n:i,r=e.xAxisID=g(i.xAxisID,bi(t,"x")),o=e.yAxisID=g(i.yAxisID,bi(t,"y")),a=e.rAxisID=g(i.rAxisID,bi(t,"r")),s=e.indexAxis,l=e.iAxisID=n(s,r,o,a),h=e.vAxisID=n(s,o,r,a);e.xScale=this.getScaleForId(r),e.yScale=this.getScaleForId(o),e.rScale=this.getScaleForId(a),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(h)}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 e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&de(this._data,this),t._stacked&&xi(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(u(e))this._data=function(t){const e=Object.keys(t),i=new Array(e.length);let n,r,o;for(n=0,r=e.length;n{const e="_onData"+D(t),i=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...t){const r=i.apply(this,t);return n._chartjs.listeners.forEach((i=>{"function"==typeof i[e]&&i[e](...t)})),r}})})))),this._syncList=[],this._data=e}var n}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let n=!1;this._dataCheck();const r=e._stacked;e._stacked=fi(e.vScale,e),e.stack!==i.stack&&(n=!0,xi(e),e.stack=i.stack),this._resyncElements(t),(n||r!==e._stacked)&&mi(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing}parse(t,e){const{_cachedMeta:i,_data:n}=this,{iScale:r,_stacked:o}=i,a=r.axis;let s,l,h,d=0===t&&e===n.length||i._sorted,f=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=n,i._sorted=!0,h=n;else{h=c(n[t])?this.parseArrayData(i,n,t,e):u(n[t])?this.parseObjectData(i,n,t,e):this.parsePrimitiveData(i,n,t,e);const r=()=>null===l[a]||f&&l[a]t&&!e.hidden&&e._stacked&&{keys:ui(i,!0),values:null})(e,i,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:c}=function(t){const{min:e,max:i,minDefined:n,maxDefined:r}=t.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:r?i:Number.POSITIVE_INFINITY}}(a);let u,f;function g(){f=n[u];const e=f[a.axis];return!d(f[t.axis])||h>e||c=0;--u)if(!g()){this.updateRangeFromParsed(l,t,f,s);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let n,r,o;for(n=0,r=e.length;n=0&&tthis.getContext(i,n)),c);return f.$shared&&(f.$shared=s,r[o]=Object.freeze(vi(f,s))),f}_resolveAnimations(t,e,i){const n=this.chart,r=this._cachedDataOpts,o=`animation-${e}`,a=r[o];if(a)return a;let s;if(!1!==n.options.animation){const n=this.chart.config,r=n.datasetAnimationScopeKeys(this._type,e),o=n.getOptionScopes(this.getDataset(),r);s=n.createResolver(o,this.getContext(t,i,e))}const l=new hi(n,s&&s.animations);return s&&s._cacheable&&(r[o]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||yi(t)||this.chart._animationsDisabled}updateElement(t,e,i,n){yi(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!yi(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;const r=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(r)||r})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"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 e=this._data,i=this._cachedMeta.data;for(const[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];const n=i.length,r=e.length,o=Math.min(r,n);o&&this.parse(0,o),r>n?this._insertElements(n,r-n,t):r{for(t.length+=e,a=t.length-1;a>=o;a--)t[a]=t[a-e]};for(s(r),a=t;at-e)))}return t._cache.$bar}(e,t.type);let n,r,o,a,s=e._length;const l=()=>{32767!==o&&-32768!==o&&(S(a)&&(s=Math.min(s,Math.abs(o-a)||s)),a=o)};for(n=0,r=i.length;nMath.abs(s)&&(l=s,h=a),e[i.axis]=h,e._custom={barStart:l,barEnd:h,start:r,end:o,min:a,max:s}}(t,e,i,n):e[i.axis]=i.parse(t,n),e}function ki(t,e,i,n){const r=t.iScale,o=t.vScale,a=r.getLabels(),s=r===o,l=[];let h,c,u,d;for(h=i,c=i+n;ht.x,i="left",n="right"):(e=t.base=i?1:-1)}(u,e,o)*r,d===o&&(m-=u/2),c=m+u),m===e.getPixelForValue(o)){const t=H(u)*e.getLineWidthForValue(o)/2;m+=t,u-=t}return{size:u,base:m,head:c,center:c+u/2}}_calculateBarIndexPixels(t,e){const i=e.scale,n=this.options,r=n.skipNull,o=g(n.maxBarThickness,1/0);let a,s;if(e.grouped){const i=r?this._getStackCount(t):e.stackCount,l="flex"===n.barThickness?function(t,e,i,n){const r=e.pixels,o=r[t];let a=t>0?r[t-1]:null,s=t=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,{xScale:i,yScale:n}=e,r=this.getParsed(t),o=i.getLabelForValue(r.x),a=n.getLabelForValue(r.y),s=r._custom;return{label:e.label,value:"("+o+", "+a+(s?", "+s:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,n){const r="reset"===n,{iScale:o,vScale:a}=this._cachedMeta,s=this.resolveDataElementOptions(e,n),l=this.getSharedOptions(s),h=this.includeOptions(n,l),c=o.axis,u=a.axis;for(let s=e;s""}}}};class Ai extends wi{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,n=this._cachedMeta;if(!1===this._parsing)n._parsed=i;else{let r,o,a=t=>+i[t];if(u(i[t])){const{key:t="value"}=this._parsing;a=e=>+T(i[e],t)}for(r=t,o=t+e;rG(t,s,l,!0)?1:Math.max(e,e*i,n,n*i),g=(t,e,n)=>G(t,s,l,!0)?-1:Math.min(e,e*i,n,n*i),p=f(0,h,u),m=f(R,c,d),b=g(z,h,u),x=g(z+R,c,d);n=(p-b)/2,r=(m-x)/2,o=-(p+b)/2,a=-(m+x)/2}return{ratioX:n,ratioY:r,offsetX:o,offsetY:a}}(d,u,s),x=(i.width-o)/f,y=(i.height-o)/g,v=Math.max(Math.min(x,y)/2,0),w=p(this.options.radius,v),_=(w-Math.max(w*s,0))/this._getVisibleDatasetWeightTotal();this.offsetX=m*w,this.offsetY=b*w,n.total=this.calculateTotal(),this.outerRadius=w-_*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-_*c,0),this.updateElements(r,0,r.length,t)}_circumference(t,e){const i=this.options,n=this._cachedMeta,r=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===n._parsed[t]||n.data[t].hidden?0:this.calculateCircumference(n._parsed[t]*r/O)}updateElements(t,e,i,n){const r="reset"===n,o=this.chart,a=o.chartArea,s=o.options.animation,l=(a.left+a.right)/2,h=(a.top+a.bottom)/2,c=r&&s.animateScale,u=c?0:this.innerRadius,d=c?0:this.outerRadius,f=this.resolveDataElementOptions(e,n),g=this.getSharedOptions(f),p=this.includeOptions(n,g);let m,b=this._getRotation();for(m=0;m0&&!isNaN(t)?O*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],r=Xe(e._parsed[t],i.options.locale);return{label:n[t]||"",value:r}}getMaxBorderWidth(t){let e=0;const i=this.chart;let n,r,o,a,s;if(!t)for(n=0,r=i.data.datasets.length;n"spacing"!==t,_indexable:t=>"spacing"!==t},Ai.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,n)=>{const r=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label(t){let e=t.label;const i=": "+t.formattedValue;return c(e)?(e=e.slice(),e[0]+=i):e+=i,e}}}}};class Ei extends wi{initialize(){this.enableOptionSharing=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:n=[],_dataset:r}=e,o=this.chart._animationsDisabled;let{start:a,count:s}=function(t,e,i){const n=e.length;let r=0,o=n;if(t._sorted){const{iScale:a,_parsed:s}=t,l=a.axis,{min:h,max:c,minDefined:u,maxDefined:d}=a.getUserBounds();u&&(r=K(Math.min(he(s,a.axis,h).lo,i?n:he(e,l,a.getPixelForValue(h)).lo),0,n-1)),o=d?K(Math.max(he(s,a.axis,c).hi+1,i?0:he(e,l,a.getPixelForValue(c)).hi+1),r,n)-r:n-r}return{start:r,count:o}}(e,n,o);this._drawStart=a,this._drawCount=s,function(t){const{xScale:e,yScale:i,_scaleRanges:n}=t,r={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!n)return t._scaleRanges=r,!0;const o=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==i.min||n.ymax!==i.max;return Object.assign(n,r),o}(e)&&(a=0,s=n.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!r._decimated,i.points=n;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(i,void 0,{animated:!o,options:l},t),this.updateElements(n,a,s,t)}updateElements(t,e,i,n){const r="reset"===n,{iScale:o,vScale:a,_stacked:s,_dataset:l}=this._cachedMeta,c=this.resolveDataElementOptions(e,n),u=this.getSharedOptions(c),d=this.includeOptions(n,u),f=o.axis,g=a.axis,{spanGaps:p,segment:m}=this.options,b=W(p)?p:Number.POSITIVE_INFINITY,x=this.chart._animationsDisabled||r||"none"===n;let y=e>0&&this.getParsed(e-1);for(let c=e;c0&&i[f]-y[f]>b,m&&(p.parsed=i,p.raw=l.data[c]),d&&(p.options=u||this.resolveDataElementOptions(c,e.active?"active":n)),x||this.updateElement(e,c,p,n),y=i}this.updateSharedOptions(u,n,c)}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return i;const r=n[0].size(this.resolveDataElementOptions(0)),o=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,r,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}Ei.id="line",Ei.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},Ei.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class Li extends wi{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],r=Xe(e._parsed[t].r,i.options.locale);return{label:n[t]||"",value:r}}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),r=Math.max(n/2,0),o=(r-Math.max(i.cutoutPercentage?r/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=r-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(t,e,i,n){const r="reset"===n,o=this.chart,a=this.getDataset(),s=o.options.animation,l=this._cachedMeta.rScale,h=l.xCenter,c=l.yCenter,u=l.getIndexAngle(0)-.5*z;let d,f=u;const g=360/this.countVisibleElements();for(d=0;d{!isNaN(t.data[n])&&this.chart.getDataVisibility(n)&&i++})),i}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?j(this.resolveDataElementOptions(t,e).angle||i):0}}Li.id="polarArea",Li.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},Li.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map(((e,n)=>{const r=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label:t=>t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class Ri extends Ai{}Ri.id="pie",Ri.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class Fi extends wi{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}update(t){const e=this._cachedMeta,i=e.dataset,n=e.data||[],r=e.iScale.getLabels();if(i.points=n,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const o={_loop:!0,_fullLoop:r.length===n.length,options:e};this.updateElement(i,void 0,o,t)}this.updateElements(n,0,n.length,t)}updateElements(t,e,i,n){const r=this.getDataset(),o=this._cachedMeta.rScale,a="reset"===n;for(let s=e;s"",label:t=>"("+t.label+", "+t.formattedValue+")"}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var Ni=Object.freeze({__proto__:null,BarController:zi,BubbleController:Oi,DoughnutController:Ai,LineController:Ei,PolarAreaController:Li,PieController:Ri,RadarController:Fi,ScatterController:Ii});function Hi(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Bi{constructor(t){this.options=t||{}}formats(){return Hi()}parse(t,e){return Hi()}format(t,e){return Hi()}add(t,e,i){return Hi()}diff(t,e,i){return Hi()}startOf(t,e,i){return Hi()}endOf(t,e){return Hi()}}Bi.override=function(t){Object.assign(Bi.prototype,t)};var Wi={_date:Bi};function Ui(t,e){return"native"in t?{x:t.x,y:t.y}:He(t,e)}function Vi(t,e,i,n){const{controller:r,data:o,_sorted:a}=t,s=r._cachedMeta.iScale;if(s&&e===s.axis&&a&&o.length){const t=s._reversePixels?ce:he;if(!n)return t(o,e,i);if(r._sharedOptions){const n=o[0],r="function"==typeof n.getRange&&n.getRange(e);if(r){const n=t(o,e,i-r),a=t(o,e,i+r);return{lo:n.lo,hi:a.hi}}}}return{lo:0,hi:o.length-1}}function ji(t,e,i,n,r){const o=t.getSortedVisibleDatasetMetas(),a=i[e];for(let t=0,i=o.length;t{t[s](r[a],n)&&o.push({element:t,datasetIndex:e,index:i}),t.inRange(r.x,r.y,n)&&(l=!0)})),i.intersect&&!l?[]:o}var Xi={modes:{index(t,e,i,n){const r=Ui(e,t),o=i.axis||"x",a=i.intersect?Yi(t,r,o,n):$i(t,r,o,!1,n),s=[];return a.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=a[0].index,i=t.data[e];i&&!i.skip&&s.push({element:i,datasetIndex:t.index,index:e})})),s):[]},dataset(t,e,i,n){const r=Ui(e,t),o=i.axis||"xy";let a=i.intersect?Yi(t,r,o,n):$i(t,r,o,!1,n);if(a.length>0){const e=a[0].datasetIndex,i=t.getDatasetMeta(e).data;a=[];for(let t=0;tYi(t,Ui(e,t),i.axis||"xy",n),nearest:(t,e,i,n)=>$i(t,Ui(e,t),i.axis||"xy",i.intersect,n),x:(t,e,i,n)=>(i.axis="x",qi(t,e,i,n)),y:(t,e,i,n)=>(i.axis="y",qi(t,e,i,n))}};const Qi=["left","top","right","bottom"];function Gi(t,e){return t.filter((t=>t.pos===e))}function Ki(t,e){return t.filter((t=>-1===Qi.indexOf(t.pos)&&t.box.axis===e))}function Zi(t,e){return t.sort(((t,i)=>{const n=e?i:t,r=e?t:i;return n.weight===r.weight?n.index-r.index:n.weight-r.weight}))}function Ji(t,e,i,n){return Math.max(t[i],e[i])+Math.max(t[n],e[n])}function tn(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function en(t,e,i,n){const{pos:r,box:o}=i,a=t.maxPadding;if(!u(r)){i.size&&(t[r]-=i.size);const e=n[i.stack]||{size:0,count:1};e.size=Math.max(e.size,i.horizontal?o.height:o.width),i.size=e.size/e.count,t[r]+=i.size}o.getPadding&&tn(a,o.getPadding());const s=Math.max(0,e.outerWidth-Ji(a,t,"left","right")),l=Math.max(0,e.outerHeight-Ji(a,t,"top","bottom")),h=s!==t.w,c=l!==t.h;return t.w=s,t.h=l,i.horizontal?{same:h,other:c}:{same:c,other:h}}function nn(t,e){const i=e.maxPadding;return function(t){const n={left:0,top:0,right:0,bottom:0};return t.forEach((t=>{n[t]=Math.max(e[t],i[t])})),n}(t?["left","right"]:["top","bottom"])}function rn(t,e,i,n){const r=[];let o,a,s,l,h,c;for(o=0,a=t.length,h=0;ot.box.fullSize)),!0),n=Zi(Gi(e,"left"),!0),r=Zi(Gi(e,"right")),o=Zi(Gi(e,"top"),!0),a=Zi(Gi(e,"bottom")),s=Ki(e,"x"),l=Ki(e,"y");return{fullSize:i,leftAndTop:n.concat(o),rightAndBottom:r.concat(l).concat(a).concat(s),chartArea:Gi(e,"chartArea"),vertical:n.concat(r).concat(l),horizontal:o.concat(a).concat(s)}}(t.boxes),l=s.vertical,h=s.horizontal;b(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const c=l.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,u=Object.freeze({outerWidth:e,outerHeight:i,padding:r,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/c,hBoxMaxHeight:a/2}),d=Object.assign({},r);tn(d,re(n));const f=Object.assign({maxPadding:d,w:o,h:a,x:r.left,y:r.top},r),g=function(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:n,stackWeight:r}=i;if(!t||!Qi.includes(n))continue;const o=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=r}return e}(t),{vBoxMaxWidth:n,hBoxMaxHeight:r}=e;let o,a,s;for(o=0,a=t.length;o{const i=e.box;Object.assign(i,t.chartArea),i.update(f.w,f.h)}))}};class ln{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,n){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):i)}}isAttached(t){return!0}updateConfig(t){}}class hn extends ln{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const cn={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},un=t=>null===t||""===t,dn=!!Ue&&{passive:!0};function fn(t,e,i){t.canvas.removeEventListener(e,i,dn)}function gn(t,e,i){const n=t.canvas,r=new MutationObserver((t=>{for(const e of t)for(const t of e.addedNodes)if(t===n||t.contains(n))return i()}));return r.observe(document,{childList:!0,subtree:!0}),r}function pn(t,e,i){const n=t.canvas,r=new MutationObserver((t=>{for(const e of t)for(const t of e.removedNodes)if(t===n||t.contains(n))return i()}));return r.observe(document,{childList:!0,subtree:!0}),r}const mn=new Map;let bn=0;function xn(){const t=window.devicePixelRatio;t!==bn&&(bn=t,mn.forEach(((e,i)=>{i.currentDevicePixelRatio!==t&&e()})))}function yn(t,e,i){const n=t.canvas,o=n&&Le(n);if(!o)return;const a=r(((t,e)=>{const n=o.clientWidth;i(t,e),n{const e=t[0],i=e.contentRect.width,n=e.contentRect.height;0===i&&0===n||a(i,n)}));return s.observe(o),function(t,e){mn.size||window.addEventListener("resize",xn),mn.set(t,e)}(t,a),s}function vn(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){mn.delete(t),mn.size||window.removeEventListener("resize",xn)}(t)}function wn(t,e,i){const n=t.canvas,o=r((e=>{null!==t.ctx&&i(function(t,e){const i=cn[t.type]||t.type,{x:n,y:r}=He(t,e);return{type:i,chart:e,native:t,x:void 0!==n?n:null,y:void 0!==r?r:null}}(e,t))}),t,(t=>{const e=t[0];return[e,e.offsetX,e.offsetY]}));return function(t,e,i){t.addEventListener(e,i,dn)}(n,e,o),o}class _n extends ln{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,n=t.getAttribute("height"),r=t.getAttribute("width");if(t.$chartjs={initial:{height:n,width:r,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",un(r)){const e=Ve(t,"width");void 0!==e&&(t.width=e)}if(un(n))if(""===t.style.height)t.height=t.width/(e||2);else{const e=Ve(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e.$chartjs)return!1;const i=e.$chartjs.initial;["height","width"].forEach((t=>{const n=i[t];h(n)?e.removeAttribute(t):e.setAttribute(t,n)}));const n=i.style||{};return Object.keys(n).forEach((t=>{e.style[t]=n[t]})),e.width=e.width,delete e.$chartjs,!0}addEventListener(t,e,i){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),r={attach:gn,detach:pn,resize:yn}[e]||wn;n[e]=r(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];n&&(({attach:vn,detach:vn,resize:vn}[e]||fn)(t,e,n),i[e]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return function(t,e,i,n){const r=Fe(t),o=Ne(r,"margin"),a=Re(r.maxWidth,t,"clientWidth")||E,s=Re(r.maxHeight,t,"clientHeight")||E,l=function(t,e,i){let n,r;if(void 0===e||void 0===i){const o=Le(t);if(o){const t=o.getBoundingClientRect(),a=Fe(o),s=Ne(a,"border","width"),l=Ne(a,"padding");e=t.width-l.width-s.width,i=t.height-l.height-s.height,n=Re(a.maxWidth,o,"clientWidth"),r=Re(a.maxHeight,o,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:n||E,maxHeight:r||E}}(t,e,i);let{width:h,height:c}=l;if("content-box"===r.boxSizing){const t=Ne(r,"border","width"),e=Ne(r,"padding");h-=e.width+t.width,c-=e.height+t.height}return h=Math.max(0,h-o.width),c=Math.max(0,n?Math.floor(h/n):c-o.height),h=Be(Math.min(h,a,l.maxWidth)),c=Be(Math.min(c,s,l.maxHeight)),h&&!c&&(c=Be(h/2)),{width:h,height:c}}(t,e,i,n)}isAttached(t){const e=Le(t);return!(!e||!e.isConnected)}}class Mn{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return W(this.x)&&W(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const n={};return t.forEach((t=>{n[t]=i[t]&&i[t].active()?i[t]._to:this[t]})),n}}Mn.defaults={},Mn.defaultRoutes=void 0;const kn={values:t=>c(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const n=this.chart.options.locale;let r,o=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(r="scientific"),o=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t)),i}(t,i)}const a=N(Math.abs(o)),s=Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:r,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(l,this.options.ticks.format),Xe(t,n,l)},logarithmic(t,e,i){if(0===t)return"0";const n=t/Math.pow(10,Math.floor(N(t)));return 1===n||2===n||5===n?kn.numeric.call(this,t,e,i):""}};var Cn={formatters:kn};function Tn(t,e,i,n,r){const o=g(n,0),a=Math.min(g(r,t.length),t.length);let s,l,h,c=0;for(i=Math.ceil(i),r&&(s=r-n,i=s/Math.floor(s/i)),h=o;h<0;)c++,h=Math.round(o+c*i);for(l=Math.max(o,0);le.lineWidth,tickColor:(t,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth: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:Cn.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),Nt.route("scale.ticks","color","","color"),Nt.route("scale.grid","color","","borderColor"),Nt.route("scale.grid","borderColor","","borderColor"),Nt.route("scale.title","color","","color"),Nt.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t}),Nt.describe("scales",{_fallback:"scale"}),Nt.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t});const Dn=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i;function Sn(t,e){const i=[],n=t.length/e,r=t.length;let o=0;for(;oa+s)))return h}function zn(t){return t.drawTicks?t.tickLength:0}function On(t,e){if(!t.display)return 0;const i=oe(t.font,e),n=re(t.padding);return(c(t.text)?t.text.length:1)*i.lineHeight+n.height}function An(t,e,i){let n=o(t);return(i&&"right"!==e||!i&&"right"===e)&&(n=(t=>"left"===t?"right":"right"===t?"left":t)(n)),n}class En extends Mn{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,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._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:n}=this;return t=f(t,Number.POSITIVE_INFINITY),e=f(e,Number.NEGATIVE_INFINITY),i=f(i,Number.POSITIVE_INFINITY),n=f(n,Number.NEGATIVE_INFINITY),{min:f(t,i),max:f(e,n),minDefined:d(t),maxDefined:d(e)}}getMinMax(t){let e,{min:i,max:n,minDefined:r,maxDefined:o}=this.getUserBounds();if(r&&o)return{min:i,max:n};const a=this.getMatchingVisibleMetas();for(let s=0,l=a.length;sn?n:i,n=r&&i>n?i:n,{min:f(i,f(n,i)),max:f(n,f(i,n))}}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||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){m(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:n,grace:r,ticks:o}=this.options,a=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,e,i){const{min:n,max:r}=t,o=p(e,(r-n)/2),a=(t,e)=>i&&0===t?0:t+e;return{min:a(n,-Math.abs(o)),max:a(r,o)}}(this,r,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const s=an)return function(t,e,i,n){let r,o=0,a=i[0];for(n=Math.ceil(n),r=0;rt-e)).pop(),e}(n);for(let t=0,e=o.length-1;tr)return e}return Math.max(r,1)}(r,e,n);if(o>0){let t,i;const n=o>1?Math.round((s-a)/(o-1)):null;for(Tn(e,l,c,h(n)?0:a-n,a),t=0,i=o-1;t=r||i<=1||!this.isHorizontal())return void(this.labelRotation=n);const h=this._getLabelSizes(),c=h.widest.width,u=h.highest.height,d=K(this.chart.width-c,0,this.maxWidth);o=t.offset?this.maxWidth/i:d/(i-1),c+6>o&&(o=d/(i-(t.offset?.5:1)),a=this.maxHeight-zn(t.grid)-e.padding-On(t.title,this.chart.options.font),s=Math.sqrt(c*c+u*u),l=Y(Math.min(Math.asin(K((h.highest.height+6)/o,-1,1)),Math.asin(K(a/s,-1,1))-Math.asin(K(u/s,-1,1)))),l=Math.max(n,Math.min(r,l))),this.labelRotation=l}afterCalculateLabelRotation(){m(this.options.afterCalculateLabelRotation,[this])}beforeFit(){m(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:n,grid:r}}=this,o=this._isVisible(),a=this.isHorizontal();if(o){const o=On(n,e.options.font);if(a?(t.width=this.maxWidth,t.height=zn(r)+o):(t.height=this.maxHeight,t.width=zn(r)+o),i.display&&this.ticks.length){const{first:e,last:n,widest:r,highest:o}=this._getLabelSizes(),s=2*i.padding,l=j(this.labelRotation),h=Math.cos(l),c=Math.sin(l);if(a){const e=i.mirror?0:c*r.width+h*o.height;t.height=Math.min(this.maxHeight,t.height+e+s)}else{const e=i.mirror?0:h*r.width+c*o.height;t.width=Math.min(this.maxWidth,t.width+e+s)}this._calculatePadding(e,n,c,h)}}this._handleMargins(),a?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,n){const{ticks:{align:r,padding:o},position:a}=this.options,s=0!==this.labelRotation,l="top"!==a&&"x"===this.axis;if(this.isHorizontal()){const a=this.getPixelForTick(0)-this.left,h=this.right-this.getPixelForTick(this.ticks.length-1);let c=0,u=0;s?l?(c=n*t.width,u=i*e.height):(c=i*t.height,u=n*e.width):"start"===r?u=e.width:"end"===r?c=t.width:(c=t.width/2,u=e.width/2),this.paddingLeft=Math.max((c-a+o)*this.width/(this.width-a),0),this.paddingRight=Math.max((u-h+o)*this.width/(this.width-h),0)}else{let i=e.height/2,n=t.height/2;"start"===r?(i=0,n=t.height):"end"===r&&(i=e.height,n=0),this.paddingTop=i+o,this.paddingBottom=n+o}}_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(){m(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e{const i=t.gc,n=i.length/2;let r;if(n>e){for(r=0;r({width:r[t]||0,height:o[t]||0});return{first:k(0),last:k(e-1),widest:k(_),highest:k(M),widths:r,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return K(this._alignToPixels?Wt(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&ta*n?a/i:s/n:s*n0}_computeGridLineItems(t){const e=this.axis,i=this.chart,n=this.options,{grid:r,position:o}=n,a=r.offset,s=this.isHorizontal(),l=this.ticks.length+(a?1:0),h=zn(r),c=[],d=r.setContext(this.getContext()),f=d.drawBorder?d.borderWidth:0,p=f/2,m=function(t){return Wt(i,t,f)};let b,x,y,v,w,_,M,k,C,T,D,S;if("top"===o)b=m(this.bottom),_=this.bottom-h,k=b-p,T=m(t.top)+p,S=t.bottom;else if("bottom"===o)b=m(this.top),T=t.top,S=m(t.bottom)-p,_=b+p,k=this.top+h;else if("left"===o)b=m(this.right),w=this.right-h,M=b-p,C=m(t.left)+p,D=t.right;else if("right"===o)b=m(this.left),C=t.left,D=m(t.right)-p,w=b+p,M=this.left+h;else if("x"===e){if("center"===o)b=m((t.top+t.bottom)/2+.5);else if(u(o)){const t=Object.keys(o)[0],e=o[t];b=m(this.chart.scales[t].getPixelForValue(e))}T=t.top,S=t.bottom,_=b+p,k=_+h}else if("y"===e){if("center"===o)b=m((t.left+t.right)/2);else if(u(o)){const t=Object.keys(o)[0],e=o[t];b=m(this.chart.scales[t].getPixelForValue(e))}w=b-p,M=w-h,C=t.left,D=t.right}const P=g(n.ticks.maxTicksLimit,l),z=Math.max(1,Math.ceil(l/P));for(x=0;xe.value===t));return i>=0?e.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const e=this.options.grid,i=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let r,o;const a=(t,e,n)=>{n.width&&n.color&&(i.save(),i.lineWidth=n.width,i.strokeStyle=n.color,i.setLineDash(n.borderDash||[]),i.lineDashOffset=n.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(r=0,o=n.length;r{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",n=[];let r,o;for(r=0,o=e.length;r{const n=i.split("."),r=n.pop(),o=[t].concat(n).join("."),a=e[i].split("."),s=a.pop(),l=a.join(".");Nt.route(o,r,l,s)}))}(e,t.defaultRoutes),t.descriptors&&Nt.describe(e,t.descriptors)}(t,o,i),this.override&&Nt.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,n=this.scope;i in e&&delete e[i],n&&i in Nt[n]&&(delete Nt[n][i],this.override&&delete Lt[i])}}var Rn=new class{constructor(){this.controllers=new Ln(wi,"datasets",!0),this.elements=new Ln(Mn,"elements"),this.plugins=new Ln(Object,"plugins"),this.scales=new Ln(En,"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,e,i){[...e].forEach((e=>{const n=i||this._getRegistryForType(e);i||n.isForType(e)||n===this.plugins&&e.id?this._exec(t,n,e):b(e,(e=>{const n=i||this._getRegistryForType(e);this._exec(t,n,e)}))}))}_exec(t,e,i){const n=D(t);m(i["before"+n],[],i),e[t](i),m(i["after"+n],[],i)}_getRegistryForType(t){for(let e=0;et.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(n(e,i),t,"stop"),this._notify(n(i,e),t,"start")}}function In(t,e){return e||!1!==t?!0===t?{}:t:null}function Nn(t,e,i,n){const r=t.pluginScopeKeys(e),o=t.getOptionScopes(i,r);return t.createResolver(o,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Hn(t,e){const i=Nt.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function Bn(t,e){return"x"===t||"y"===t?t:e.axis||("top"===(i=e.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.charAt(0).toLowerCase();var i}function Wn(t){const e=t.options||(t.options={});e.plugins=g(e.plugins,{}),e.scales=function(t,e){const i=Lt[t.type]||{scales:{}},n=e.scales||{},r=Hn(t.type,e),o=Object.create(null),a=Object.create(null);return Object.keys(n).forEach((t=>{const e=n[t];if(!u(e))return console.error(`Invalid scale configuration for scale: ${t}`);if(e._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);const s=Bn(t,e),l=function(t,e){return t===e?"_index_":"_value_"}(s,r),h=i.scales||{};o[s]=o[s]||t,a[t]=M(Object.create(null),[{axis:s},e,h[s],h[l]])})),t.data.datasets.forEach((i=>{const r=i.type||t.type,s=i.indexAxis||Hn(r,e),l=(Lt[r]||{}).scales||{};Object.keys(l).forEach((t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,s),r=i[e+"AxisID"]||o[e]||e;a[r]=a[r]||Object.create(null),M(a[r],[{axis:e},n[r],l[t]])}))})),Object.keys(a).forEach((t=>{const e=a[t];M(e,[Nt.scales[e.type],Nt.scale])})),a}(t,e)}function Un(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const Vn=new Map,jn=new Set;function Yn(t,e){let i=Vn.get(t);return i||(i=e(),Vn.set(t,i),jn.add(i)),i}const $n=(t,e,i)=>{const n=T(e,i);void 0!==n&&t.add(n)};class qn{constructor(t){this._config=function(t){return(t=t||{}).data=Un(t.data),Wn(t),t}(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=Un(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(),Wn(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Yn(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return Yn(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return Yn(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return Yn(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const i=this._scopeCache;let n=i.get(t);return n&&!e||(n=new Map,i.set(t,n)),n}getOptionScopes(t,e,i){const{options:n,type:r}=this,o=this._cachedScopes(t,i),a=o.get(e);if(a)return a;const s=new Set;e.forEach((e=>{t&&(s.add(t),e.forEach((e=>$n(s,t,e)))),e.forEach((t=>$n(s,n,t))),e.forEach((t=>$n(s,Lt[r]||{},t))),e.forEach((t=>$n(s,Nt,t))),e.forEach((t=>$n(s,Rt,t)))}));const l=Array.from(s);return 0===l.length&&l.push(Object.create(null)),jn.has(e)&&o.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,Lt[e]||{},Nt.datasets[e]||{},{type:e},Nt,Rt]}resolveNamedOptions(t,e,i,n=[""]){const r={$shared:!0},{resolver:o,subPrefixes:a}=Xn(this._resolverCache,t,n);let s=o;(function(t,e){const{isScriptable:i,isIndexable:n}=me(t);for(const r of e){const e=i(r),o=n(r),a=(o||e)&&t[r];if(e&&(P(a)||Qn(a))||o&&c(a))return!0}return!1})(o,e)&&(r.$shared=!1,s=pe(o,i=P(i)?i():i,this.createResolver(t,i,a)));for(const t of e)r[t]=s[t];return r}createResolver(t,e,i=[""],n){const{resolver:r}=Xn(this._resolverCache,t,i);return u(e)?pe(r,e,void 0,n):r}}function Xn(t,e,i){let n=t.get(e);n||(n=new Map,t.set(e,n));const r=i.join();let o=n.get(r);return o||(o={resolver:ge(e,i),subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},n.set(r,o)),o}const Qn=t=>u(t)&&Object.getOwnPropertyNames(t).reduce(((e,i)=>e||P(t[i])),!1),Gn=["top","bottom","left","right","chartArea"];function Kn(t,e){return"top"===t||"bottom"===t||-1===Gn.indexOf(t)&&"x"===e}function Zn(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}function Jn(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),m(i&&i.onComplete,[t],e)}function tr(t){const e=t.chart,i=e.options.animation;m(i&&i.onProgress,[t],e)}function er(t){return Ee()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const ir={},nr=t=>{const e=er(t);return Object.values(ir).filter((t=>t.canvas===e)).pop()};class rr{constructor(t,e){const i=this.config=new qn(e),n=er(t),r=nr(n);if(r)throw new Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||function(t){return!Ee()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?hn:_n}(n)),this.platform.updateConfig(i);const a=this.platform.acquireContext(n,o.aspectRatio),s=a&&a.canvas,h=s&&s.height,c=s&&s.width;this.id=l(),this.ctx=a,this.canvas=s,this.width=c,this.height=h,this._options=o,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 Fn,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let i;return function(...n){return e?(clearTimeout(i),i=setTimeout(t,e,n)):t.apply(this,n),e}}((t=>this.update(t)),o.resizeDelay||0),ir[this.id]=this,a&&s?(ri.listen(this,"complete",Jn),ri.listen(this,"progress",tr),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:r}=this;return h(t)?e&&r?r:n?i/n: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}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():We(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Ut(this.canvas,this.ctx),this}stop(){return ri.stop(this),this}resize(t,e){ri.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,n=this.canvas,r=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(n,t,e,r),a=i.devicePixelRatio||this.platform.getDevicePixelRatio(),s=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,We(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),m(i.onResize,[this,o],this),this.attached&&this._doResize(s)&&this.render())}ensureScalesHaveIDs(){b(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,n=Object.keys(i).reduce(((t,e)=>(t[e]=!1,t)),{});let r=[];e&&(r=r.concat(Object.keys(e).map((t=>{const i=e[t],n=Bn(t,i),r="r"===n,o="x"===n;return{options:i,dposition:r?"chartArea":o?"bottom":"left",dtype:r?"radialLinear":o?"category":"linear"}})))),b(r,(e=>{const r=e.options,o=r.id,a=Bn(o,r),s=g(r.type,e.dtype);void 0!==r.position&&Kn(r.position,a)===Kn(e.dposition)||(r.position=e.dposition),n[o]=!0;let l=null;o in i&&i[o].type===s?l=i[o]:(l=new(Rn.getScale(s))({id:o,type:s,ctx:this.ctx,chart:this}),i[l.id]=l),l.init(r,t)})),b(n,((t,e)=>{t||delete i[e]})),b(i,(t=>{sn.configure(this,t,t.options),sn.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort(((t,e)=>t.index-e.index)),i>e){for(let t=e;te.length&&delete this._stacks,t.forEach(((t,i)=>{0===e.filter((e=>e===t._dataset)).length&&this._destroyDatasetMeta(i)}))}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,n;for(this._removeUnreferencedMetasets(),i=0,n=e.length;i{this.getDatasetMeta(e).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext());b(this.scales,(t=>{sn.removeBox(this,t)}));const n=this._animationsDisabled=!i.animation;if(this.ensureScalesHaveIDs(),this.buildOrUpdateScales(),((t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0})(new Set(Object.keys(this._listeners)),new Set(i.events))&&!!this._responsiveListeners===i.responsive||(this.unbindEvents(),this.bindEvents()),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let t=0,e=this.data.datasets.length;t{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Zn("z","_idx")),this._lastEvent&&this._eventHandler(this._lastEvent,!0),this.render()}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;sn.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],b(this.boxes,(t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))}),this),this._layers.forEach(((t,e)=>{t._idx=e})),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let e=0,i=this.data.datasets.length;e=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,n=!i.disabled,r=this.chartArea,o={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",o)&&(n&&Yt(e,{left:!1===i.left?0:r.left-i.left,right:!1===i.right?this.width:r.right+i.right,top:!1===i.top?0:r.top-i.top,bottom:!1===i.bottom?this.height:r.bottom+i.bottom}),t.controller.draw(),n&&$t(e),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}getElementsAtEventForMode(t,e,i,n){const r=Xi.modes[e];return"function"==typeof r?r(this,t,i,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let n=i.filter((t=>t&&t._dataset===e)).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(n)),n}getContext(){return this.$context||(this.$context=se(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const n=i?"show":"hide",r=this.getDatasetMeta(t),o=r.controller._resolveAnimations(void 0,n);S(e)?(r.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),o.update(r,{visible:i}),this.update((e=>e.datasetIndex===t?n:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),ri.remove(this),t=0,e=this.data.datasets.length;t{e.addEventListener(this,i,n),t[i]=n},n=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};b(this.options.events,(t=>i(t,n)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,n)=>{e.addEventListener(this,i,n),t[i]=n},n=(i,n)=>{t[i]&&(e.removeEventListener(this,i,n),delete t[i])},r=(t,e)=>{this.canvas&&this.resize(t,e)};let o;const a=()=>{n("attach",a),this.attached=!0,this.resize(),i("resize",r),i("detach",o)};o=()=>{this.attached=!1,n("resize",r),this._stop(),this._resize(0,0),i("attach",a)},e.isAttached(this.canvas)?a():o()}unbindEvents(){b(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},b(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const n=i?"set":"remove";let r,o,a,s;for("dataset"===e&&(r=this.getDatasetMeta(t[0].datasetIndex),r.controller["_"+n+"DatasetHoverStyle"]()),a=0,s=t.length;a{const i=this.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}));!x(i,e)&&(this._active=i,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}_updateHoverStyles(t,e,i){const n=this.options.hover,r=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),o=r(e,t),a=i?t:r(t,e);o.length&&this.updateHoverStyle(o,n.mode,!1),a.length&&n.mode&&this.updateHoverStyle(a,n.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0},n=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,n))return;const r=this._handleEvent(t,e);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,n),(r||i.changed)&&this.render(),this}_handleEvent(t,e){const{_active:i=[],options:n}=this,r=n.hover,o=e;let a=[],s=!1,l=null;return"mouseout"!==t.type&&(a=this.getElementsAtEventForMode(t,r.mode,r,o),l="click"===t.type?this._lastEvent:t),this._lastEvent=null,jt(t,this.chartArea,this._minPadding)&&(m(n.onHover,[t,a,this],this),"mouseup"!==t.type&&"click"!==t.type&&"contextmenu"!==t.type||m(n.onClick,[t,a,this],this)),s=!x(a,i),(s||e)&&(this._active=a,this._updateHoverStyles(a,i,e)),this._lastEvent=l,s}}const or=()=>b(rr.instances,(t=>t._plugins.invalidate())),ar=!0;function sr(t,e,i){const{startAngle:n,pixelMargin:r,x:o,y:a,outerRadius:s,innerRadius:l}=e;let h=r/s;t.beginPath(),t.arc(o,a,s,n-h,i+h),l>r?(h=r/l,t.arc(o,a,l,i+h,n-h,!0)):t.arc(o,a,r,i+R,n-R),t.closePath(),t.clip()}function lr(t,e,i,n){return{x:i+t*Math.cos(e),y:n+t*Math.sin(e)}}function hr(t,e,i,n,r){const{x:o,y:a,startAngle:s,pixelMargin:l,innerRadius:h}=e,c=Math.max(e.outerRadius+n+i-l,0),u=h>0?h+n+i+l:0;let d=0;const f=r-s;if(n){const t=((h>0?h-n:0)+(c>0?c-n:0))/2;d=(f-(0!==t?f*t/(t+n):f))/2}const g=(f-Math.max(.001,f*c-i/z)/c)/2,p=s+g+d,m=r-g-d,{outerStart:b,outerEnd:x,innerStart:y,innerEnd:v}=function(t,e,i,n){const r=ee(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]),o=(i-e)/2,a=Math.min(o,n*e/2),s=t=>{const e=(i-Math.min(o,t))*n/2;return K(t,0,Math.min(o,e))};return{outerStart:s(r.outerStart),outerEnd:s(r.outerEnd),innerStart:K(r.innerStart,0,a),innerEnd:K(r.innerEnd,0,a)}}(e,u,c,m-p),w=c-b,_=c-x,M=p+b/w,k=m-x/_,C=u+y,T=u+v,D=p+y/C,S=m-v/T;if(t.beginPath(),t.arc(o,a,c,M,k),x>0){const e=lr(_,k,o,a);t.arc(e.x,e.y,x,k,m+R)}const P=lr(T,m,o,a);if(t.lineTo(P.x,P.y),v>0){const e=lr(T,S,o,a);t.arc(e.x,e.y,v,m+R,S+Math.PI)}if(t.arc(o,a,u,m-v/u,p+y/u,!0),y>0){const e=lr(C,D,o,a);t.arc(e.x,e.y,y,D+Math.PI,p-R)}const O=lr(w,p,o,a);if(t.lineTo(O.x,O.y),b>0){const e=lr(w,M,o,a);t.arc(e.x,e.y,b,p-R,M)}t.closePath()}Object.defineProperties(rr,{defaults:{enumerable:ar,value:Nt},instances:{enumerable:ar,value:ir},overrides:{enumerable:ar,value:Lt},registry:{enumerable:ar,value:Rn},version:{enumerable:ar,value:"3.6.0"},getChart:{enumerable:ar,value:nr},register:{enumerable:ar,value:(...t)=>{Rn.add(...t),or()}},unregister:{enumerable:ar,value:(...t)=>{Rn.remove(...t),or()}}});class cr extends Mn{constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.getProps(["x","y"],i),{angle:r,distance:o}=function(t,e){const i=e.x-t.x,n=e.y-t.y,r=Math.sqrt(i*i+n*n);let o=Math.atan2(n,i);return o<-.5*z&&(o+=O),{angle:o,distance:r}}(n,{x:t,y:e}),{startAngle:a,endAngle:s,innerRadius:l,outerRadius:h,circumference:c}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),u=this.options.spacing/2;return(c>=O||G(r,a,s))&&o>=l+u&&o<=h+u}getCenterPoint(t){const{x:e,y:i,startAngle:n,endAngle:r,innerRadius:o,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:s,spacing:l}=this.options,h=(n+r)/2,c=(o+a+l+s)/2;return{x:e+Math.cos(h)*c,y:i+Math.sin(h)*c}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,n=(e.offset||0)/2,r=(e.spacing||0)/2;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>O?Math.floor(i/O):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();let o=0;if(n){o=n/2;const e=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(e)*o,Math.sin(e)*o),this.circumference>=z&&(o=n)}t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor;const a=function(t,e,i,n){const{fullCircles:r,startAngle:o,circumference:a}=e;let s=e.endAngle;if(r){hr(t,e,i,n,o+O);for(let e=0;es&&o>s;return{count:n,start:l,loop:e.loop,ilen:h(a+(h?s-t:t))%o,y=()=>{f!==g&&(t.lineTo(m,g),t.lineTo(m,f),t.lineTo(m,p))};for(l&&(u=r[x(0)],t.moveTo(u.x,u.y)),c=0;c<=s;++c){if(u=r[x(c)],u.skip)continue;const e=u.x,i=u.y,n=0|e;n===d?(ig&&(g=i),m=(b*m+e)/++b):(y(),t.lineTo(e,i),d=n,b=0,f=g=i),p=i}y()}function mr(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i?gr:pr}cr.id="arc",cr.defaults={borderAlign:"center",borderColor:"#fff",borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0},cr.defaultRoutes={backgroundColor:"backgroundColor"};const br="function"==typeof Path2D;class xr extends Mn{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,e){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const n=i.spanGaps?this._loop:this._fullLoop;Ae(this._points,i,t,n,e),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=function(t,e){const i=t.points,n=t.options.spanGaps,r=i.length;if(!r)return[];const o=!!t._loop,{start:a,end:s}=function(t,e,i,n){let r=0,o=e-1;if(i&&!n)for(;rr&&t[o%e].skip;)o--;return o%=e,{start:r,end:o}}(i,r,o,n);return function(t,e,i,n){return n&&n.setContext&&i?function(t,e,i,n){const r=t._chart.getContext(),o=ii(t.options),{_datasetIndex:a,options:{spanGaps:s}}=t,l=i.length,h=[];let c=o,u=e[0].start,d=u;function f(t,e,n,r){const o=s?-1:1;if(t!==e){for(t+=l;i[t%l].skip;)t-=o;for(;i[e%l].skip;)e+=o;t%l!=e%l&&(h.push({start:t%l,end:e%l,loop:n,style:r}),c=r,u=e%l)}}for(const t of e){u=s?u:t.start;let e,o=i[u%l];for(d=u+1;d<=t.end;d++){const s=i[d%l];e=ii(n.setContext(se(r,{type:"segment",p0:o,p1:s,p0DataIndex:(d-1)%l,p1DataIndex:d%l,datasetIndex:a}))),ni(e,c)&&f(u,d-1,t.loop,c),o=s,c=e}u"borderDash"!==t&&"fill"!==t};class vr extends Mn{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.options,{x:r,y:o}=this.getProps(["x","y"],i);return Math.pow(t-r,2)+Math.pow(e-o,2)=a.left&&e<=a.right)&&(o||i>=a.top&&i<=a.bottom)}function kr(t,e){t.rect(e.x,e.y,e.w,e.h)}function Cr(t,e,i={}){const n=t.x!==i.x?-e:0,r=t.y!==i.y?-e:0,o=(t.x+t.w!==i.x+i.w?e:0)-n,a=(t.y+t.h!==i.y+i.h?e:0)-r;return{x:t.x+n,y:t.y+r,w:t.w+o,h:t.h+a,radius:t.radius}}vr.id="point",vr.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},vr.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};class Tr extends Mn{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:i,backgroundColor:n}}=this,{inner:r,outer:o}=function(t){const e=wr(t),i=e.right-e.left,n=e.bottom-e.top,r=function(t,e,i){const n=t.options.borderWidth,r=t.borderSkipped,o=ie(n);return{t:_r(r.top,o.top,0,i),r:_r(r.right,o.right,0,e),b:_r(r.bottom,o.bottom,0,i),l:_r(r.left,o.left,0,e)}}(t,i/2,n/2),o=function(t,e,i){const{enableBorderRadius:n}=t.getProps(["enableBorderRadius"]),r=t.options.borderRadius,o=ne(r),a=Math.min(e,i),s=t.borderSkipped,l=n||u(r);return{topLeft:_r(!l||s.top||s.left,o.topLeft,0,a),topRight:_r(!l||s.top||s.right,o.topRight,0,a),bottomLeft:_r(!l||s.bottom||s.left,o.bottomLeft,0,a),bottomRight:_r(!l||s.bottom||s.right,o.bottomRight,0,a)}}(t,i/2,n/2);return{outer:{x:e.left,y:e.top,w:i,h:n,radius:o},inner:{x:e.left+r.l,y:e.top+r.t,w:i-r.l-r.r,h:n-r.t-r.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(r.t,r.l)),topRight:Math.max(0,o.topRight-Math.max(r.t,r.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(r.b,r.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(r.b,r.r))}}}}(this),a=(s=o.radius).topLeft||s.topRight||s.bottomLeft||s.bottomRight?Kt:kr;var s;t.save(),o.w===r.w&&o.h===r.h||(t.beginPath(),a(t,Cr(o,e,r)),t.clip(),a(t,Cr(r,-e,o)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),a(t,Cr(r,e)),t.fillStyle=n,t.fill(),t.restore()}inRange(t,e,i){return Mr(this,t,e,i)}inXRange(t,e){return Mr(this,t,null,e)}inYRange(t,e){return Mr(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:n,horizontal:r}=this.getProps(["x","y","base","horizontal"],t);return{x:r?(e+n)/2:e,y:r?i:(i+n)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}Tr.id="bar",Tr.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0},Tr.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};var Dr=Object.freeze({__proto__:null,ArcElement:cr,LineElement:xr,PointElement:vr,BarElement:Tr});function Sr(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{value:e})}}function Pr(t){t.data.datasets.forEach((t=>{Sr(t)}))}var zr={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,i)=>{if(!i.enabled)return void Pr(t);const n=t.width;t.data.datasets.forEach(((e,r)=>{const{_data:o,indexAxis:a}=e,s=t.getDatasetMeta(r),l=o||e.data;if("y"===ae([a,t.options.indexAxis]))return;if("line"!==s.type)return;const c=t.scales[s.xAxisID];if("linear"!==c.type&&"time"!==c.type)return;if(t.options.parsing)return;let u,{start:d,count:f}=function(t,e){const i=e.length;let n,r=0;const{iScale:o}=t,{min:a,max:s,minDefined:l,maxDefined:h}=o.getUserBounds();return l&&(r=K(he(e,o.axis,a).lo,0,i-1)),n=h?K(he(e,o.axis,s).hi+1,r,i)-r:i-r,{start:r,count:n}}(s,l);if(f<=(i.threshold||4*n))Sr(e);else{switch(h(o)&&(e._data=l,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),i.algorithm){case"lttb":u=function(t,e,i,n,r){const o=r.samples||n;if(o>=i)return t.slice(e,e+i);const a=[],s=(i-2)/(o-2);let l=0;const h=e+i-1;let c,u,d,f,g,p=e;for(a[l++]=t[p],c=0;cd&&(d=f,u=t[n],g=n);a[l++]=u,p=g}return a[l++]=t[h],a}(l,d,f,n,i);break;case"min-max":u=function(t,e,i,n){let r,o,a,s,l,c,u,d,f,g,p=0,m=0;const b=[],x=e+i-1,y=t[e].x,v=t[x].x-y;for(r=e;rg&&(g=s,u=r),p=(m*p+o.x)/++m;else{const i=r-1;if(!h(c)&&!h(u)){const e=Math.min(c,u),n=Math.max(c,u);e!==d&&e!==i&&b.push({...t[e],x:p}),n!==d&&n!==i&&b.push({...t[n],x:p})}r>0&&i!==d&&b.push(t[i]),b.push(o),l=e,m=0,f=g=s,c=u=d=r}}return b}(l,d,f,n);break;default:throw new Error(`Unsupported decimation algorithm '${i.algorithm}'`)}e._decimated=u}}))},destroy(t){Pr(t)}};function Or(t,e,i){const n=function(t){const e=t.options,i=e.fill;let n=g(i&&i.target,i);return void 0===n&&(n=!!e.backgroundColor),!1!==n&&null!==n&&(!0===n?"origin":n)}(t);if(u(n))return!isNaN(n.value)&&n;let r=parseFloat(n);return d(r)&&Math.floor(r)===r?("-"!==n[0]&&"+"!==n[0]||(r=e+r),!(r===e||r<0||r>=i)&&r):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}class Ar{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:n,y:r,radius:o}=this;return e=e||{start:0,end:O},t.arc(n,r,o,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:n}=this,r=t.angle;return{x:e+Math.cos(r)*n,y:i+Math.sin(r)*n,angle:r}}}function Er(t,e,i){for(;e>t;e--){const t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function Lr(t,e,i){const n=[];for(let r=0;r=n&&r<=h){s=r===n,l=r===h;break}}return{first:s,last:l,point:n}}function Fr(t){const{chart:e,fill:i,line:n}=t;if(d(i))return function(t,e){const i=t.getDatasetMeta(e);return i&&t.isDatasetVisible(e)?i.dataset:null}(e,i);if("stack"===i)return function(t){const{scale:e,index:i,line:n}=t,r=[],o=n.segments,a=n.points,s=function(t,e){const i=[],n=t.getMatchingVisibleMetas("line");for(let t=0;t{e=Er(t,e,r);const a=r[t],s=r[e];null!==n?(o.push({x:a.x,y:n}),o.push({x:s.x,y:n})):null!==i&&(o.push({x:i,y:a.y}),o.push({x:i,y:s.y}))})),o}(t,e),i.length?new xr({points:i,options:{tension:0},_loop:n,_fullLoop:n}):null}function Nr(t,e,i){let n=t[e].fill;const r=[e];let o;if(!i)return n;for(;!1!==n&&-1===r.indexOf(n);){if(!d(n))return n;if(o=t[n],!o)return!1;if(o.visible)return n;r.push(n),n=o.fill}return!1}function Hr(t,e,i){t.beginPath(),e.path(t),t.lineTo(e.last().x,i),t.lineTo(e.first().x,i),t.closePath(),t.clip()}function Br(t,e,i,n){if(n)return;let r=e[t],o=i[t];return"angle"===t&&(r=Q(r),o=Q(o)),{property:t,start:r,end:o}}function Wr(t,e,i,n){return t&&e?n(t[i],e[i]):t?t[i]:e?e[i]:0}function Ur(t,e,i){const{top:n,bottom:r}=e.chart.chartArea,{property:o,start:a,end:s}=i||{};"x"===o&&(t.beginPath(),t.rect(a,n,s-a,r-n),t.clip())}function Vr(t,e,i,n){const r=e.interpolate(i,n);r&&t.lineTo(r.x,r.y)}function jr(t,e){const{line:i,target:n,property:r,color:o,scale:a}=e,s=function(t,e,i){const n=t.segments,r=t.points,o=e.points,a=[];for(const t of n){let{start:n,end:s}=t;s=Er(n,s,r);const l=Br(i,r[n],r[s],t.loop);if(!e.segments){a.push({source:t,target:l,start:r[n],end:r[s]});continue}const h=ei(e,l);for(const e of h){const n=Br(i,o[e.start],o[e.end],e.loop),s=ti(t,r,n);for(const t of s)a.push({source:t,target:e,start:{[i]:Wr(l,n,"start",Math.max)},end:{[i]:Wr(l,n,"end",Math.min)}})}}return a}(i,n,r);for(const{source:e,target:l,start:h,end:c}of s){const{style:{backgroundColor:s=o}={}}=e,u=!0!==n;t.save(),t.fillStyle=s,Ur(t,a,u&&Br(r,h,c)),t.beginPath();const d=!!i.pathSegment(t,e);let f;if(u){d?t.closePath():Vr(t,n,c,r);const e=!!n.pathSegment(t,l,{move:d,reverse:!0});f=d&&e,f||Vr(t,n,h,r)}t.closePath(),t.fill(f?"evenodd":"nonzero"),t.restore()}}function Yr(t,e,i){const n=Fr(e),{line:r,scale:o,axis:a}=e,s=r.options,l=s.fill,h=s.backgroundColor,{above:c=h,below:u=h}=l||{};n&&r.points.length&&(Yt(t,i),function(t,e){const{line:i,target:n,above:r,below:o,area:a,scale:s}=e,l=i._loop?"angle":e.axis;t.save(),"x"===l&&o!==r&&(Hr(t,n,a.top),jr(t,{line:i,target:n,color:r,scale:s,property:l}),t.restore(),t.save(),Hr(t,n,a.bottom)),jr(t,{line:i,target:n,color:o,scale:s,property:l}),t.restore()}(t,{line:r,target:n,above:c,below:u,area:i,scale:o,axis:a}),$t(t))}var $r={id:"filler",afterDatasetsUpdate(t,e,i){const n=(t.data.datasets||[]).length,r=[];let o,a,s,l;for(a=0;a=0;--e){const i=r[e].$filler;i&&(i.line.updateControlPoints(o,i.axis),n&&Yr(t.ctx,i,o))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;const n=t.getSortedVisibleDatasetMetas();for(let e=n.length-1;e>=0;--e){const i=n[e].$filler;i&&Yr(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,i){const n=e.meta.$filler;n&&!1!==n.fill&&"beforeDatasetDraw"===i.drawTime&&Yr(t.ctx,n,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const qr=(t,e)=>{let{boxHeight:i=e,boxWidth:n=e}=t;return t.usePointStyle&&(i=Math.min(i,e),n=Math.min(n,e)),{boxWidth:n,boxHeight:i,itemHeight:Math.max(e,i)}};class Xr extends Mn{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,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,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 e=m(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter((e=>t.filter(e,this.chart.data)))),t.sort&&(e=e.sort(((e,i)=>t.sort(e,i,this.chart.data)))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const i=t.labels,n=oe(i.font),r=n.size,o=this._computeTitleHeight(),{boxWidth:a,itemHeight:s}=qr(i,r);let l,h;e.font=n.string,this.isHorizontal()?(l=this.maxWidth,h=this._fitRows(o,r,a,s)+10):(h=this.maxHeight,l=this._fitCols(o,r,a,s)+10),this.width=Math.min(l,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,n){const{ctx:r,maxWidth:o,options:{labels:{padding:a}}}=this,s=this.legendHitBoxes=[],l=this.lineWidths=[0],h=n+a;let c=t;r.textAlign="left",r.textBaseline="middle";let u=-1,d=-h;return this.legendItems.forEach(((t,f)=>{const g=i+e/2+r.measureText(t.text).width;(0===f||l[l.length-1]+g+2*a>o)&&(c+=h,l[l.length-(f>0?0:1)]=0,d+=h,u++),s[f]={left:0,top:d,row:u,width:g,height:n},l[l.length-1]+=g+a})),c}_fitCols(t,e,i,n){const{ctx:r,maxHeight:o,options:{labels:{padding:a}}}=this,s=this.legendHitBoxes=[],l=this.columnSizes=[],h=o-t;let c=a,u=0,d=0,f=0,g=0;return this.legendItems.forEach(((t,o)=>{const p=i+e/2+r.measureText(t.text).width;o>0&&d+n+2*a>h&&(c+=u+a,l.push({width:u,height:d}),f+=u+a,g++,u=d=0),s[o]={left:f,top:d,col:g,width:p,height:n},u=Math.max(u,p),d+=n+a})),c+=u,l.push({width:u,height:d}),c}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:n},rtl:r}}=this,o=Qe(r,this.left,this.width);if(this.isHorizontal()){let r=0,s=a(i,this.left+n,this.right-this.lineWidths[r]);for(const l of e)r!==l.row&&(r=l.row,s=a(i,this.left+n,this.right-this.lineWidths[r])),l.top+=this.top+t+n,l.left=o.leftForLtr(o.x(s),l.width),s+=l.width+n}else{let r=0,s=a(i,this.top+t+n,this.bottom-this.columnSizes[r].height);for(const l of e)l.col!==r&&(r=l.col,s=a(i,this.top+t+n,this.bottom-this.columnSizes[r].height)),l.top=s,l.left+=this.left+n,l.left=o.leftForLtr(o.x(l.left),l.width),s+=l.height+n}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;Yt(t,this),this._draw(),$t(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:n}=this,{align:r,labels:o}=t,s=Nt.color,l=Qe(t.rtl,this.left,this.width),h=oe(o.font),{color:c,padding:u}=o,d=h.size,f=d/2;let p;this.drawTitle(),n.textAlign=l.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=h.string;const{boxWidth:m,boxHeight:b,itemHeight:x}=qr(o,d),y=this.isHorizontal(),v=this._computeTitleHeight();p=y?{x:a(r,this.left+u,this.right-i[0]),y:this.top+u+v,line:0}:{x:this.left+u,y:a(r,this.top+v+u,this.bottom-e[0].height),line:0},Ge(this.ctx,t.textDirection);const w=x+u;this.legendItems.forEach(((_,M)=>{n.strokeStyle=_.fontColor||c,n.fillStyle=_.fontColor||c;const k=n.measureText(_.text).width,C=l.textAlign(_.textAlign||(_.textAlign=o.textAlign)),T=m+f+k;let D=p.x,S=p.y;l.setWidth(this.width),y?M>0&&D+T+u>this.right&&(S=p.y+=w,p.line++,D=p.x=a(r,this.left+u,this.right-i[p.line])):M>0&&S+w>this.bottom&&(D=p.x=D+e[p.line].width+u,p.line++,S=p.y=a(r,this.top+v+u,this.bottom-e[p.line].height)),function(t,e,i){if(isNaN(m)||m<=0||isNaN(b)||b<0)return;n.save();const r=g(i.lineWidth,1);if(n.fillStyle=g(i.fillStyle,s),n.lineCap=g(i.lineCap,"butt"),n.lineDashOffset=g(i.lineDashOffset,0),n.lineJoin=g(i.lineJoin,"miter"),n.lineWidth=r,n.strokeStyle=g(i.strokeStyle,s),n.setLineDash(g(i.lineDash,[])),o.usePointStyle){const o={radius:m*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:r},a=l.xPlus(t,m/2);Vt(n,o,a,e+f)}else{const o=e+Math.max((d-b)/2,0),a=l.leftForLtr(t,m),s=ne(i.borderRadius);n.beginPath(),Object.values(s).some((t=>0!==t))?Kt(n,{x:a,y:o,w:m,h:b,radius:s}):n.rect(a,o,m,b),n.fill(),0!==r&&n.stroke()}n.restore()}(l.x(D),S,_),D=((t,e,i,n)=>t===(n?"left":"right")?i:"center"===t?(e+i)/2:e)(C,D+m+f,y?D+T:this.right,t.rtl),function(t,e,i){Qt(n,i.text,t,e+x/2,h,{strikethrough:i.hidden,textAlign:l.textAlign(i.textAlign)})}(l.x(D),S,_),y?p.x+=T+u:p.y+=w})),Ke(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=oe(e.font),n=re(e.padding);if(!e.display)return;const r=Qe(t.rtl,this.left,this.width),s=this.ctx,l=e.position,h=i.size/2,c=n.top+h;let u,d=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),u=this.top+c,d=a(t.align,d,this.right-f);else{const e=this.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);u=c+a(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const g=a(l,d,d+f);s.textAlign=r.textAlign(o(l)),s.textBaseline="middle",s.strokeStyle=e.color,s.fillStyle=e.color,s.font=i.string,Qt(s,e.text,g,u,i)}_computeTitleHeight(){const t=this.options.title,e=oe(t.font),i=re(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,n,r;if(t>=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom)for(r=this.legendHitBoxes,i=0;i=n.left&&t<=n.left+n.width&&e>=n.top&&e<=n.top+n.height)return this.legendItems[i];return null}handleEvent(t){const e=this.options;if(!function(t,e){return!("mousemove"!==t||!e.onHover&&!e.onLeave)||!(!e.onClick||"click"!==t&&"mouseup"!==t)}(t.type,e))return;const i=this._getLegendItemAt(t.x,t.y);if("mousemove"===t.type){const o=this._hoveredItem,a=(r=i,null!==(n=o)&&null!==r&&n.datasetIndex===r.datasetIndex&&n.index===r.index);o&&!a&&m(e.onLeave,[t,o,this],this),this._hoveredItem=i,i&&!a&&m(e.onHover,[t,i,this],this)}else i&&m(e.onClick,[t,i,this],this);var n,r}}var Qr={id:"legend",_element:Xr,start(t,e,i){const n=t.legend=new Xr({ctx:t.ctx,options:i,chart:t});sn.configure(t,n,i),sn.addBox(t,n)},stop(t){sn.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){const n=t.legend;sn.configure(t,n,i),n.options=i},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){const n=e.datasetIndex,r=i.chart;r.isDatasetVisible(n)?(r.hide(n),e.hidden=!0):(r.show(n),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:n,textAlign:r,color:o}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const a=t.controller.getStyle(i?0:void 0),s=re(a.borderWidth);return{text:e[t.index].label,fillStyle:a.backgroundColor,fontColor:o,hidden:!t.visible,lineCap:a.borderCapStyle,lineDash:a.borderDash,lineDashOffset:a.borderDashOffset,lineJoin:a.borderJoinStyle,lineWidth:(s.width+s.height)/4,strokeStyle:a.borderColor,pointStyle:n||a.pointStyle,rotation:a.rotation,textAlign:r||a.textAlign,borderRadius:0,datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class Gr extends Mn{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,e){const i=this.options;if(this.left=0,this.top=0,!i.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const n=c(i.text)?i.text.length:1;this._padding=re(i.padding);const r=n*oe(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=r:this.width=r}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:i,bottom:n,right:r,options:o}=this,s=o.align;let l,h,c,u=0;return this.isHorizontal()?(h=a(s,i,r),c=e+t,l=r-i):("left"===o.position?(h=i+t,c=a(s,n,e),u=-.5*z):(h=r-t,c=a(s,e,n),u=.5*z),l=n-e),{titleX:h,titleY:c,maxWidth:l,rotation:u}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=oe(e.font),n=i.lineHeight/2+this._padding.top,{titleX:r,titleY:a,maxWidth:s,rotation:l}=this._drawArgs(n);Qt(t,e.text,0,0,i,{color:e.color,maxWidth:s,rotation:l,textAlign:o(e.align),textBaseline:"middle",translation:[r,a]})}}var Kr={id:"title",_element:Gr,start(t,e,i){!function(t,e){const i=new Gr({ctx:t.ctx,options:e,chart:t});sn.configure(t,i,e),sn.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){const e=t.titleBlock;sn.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){const n=t.titleBlock;sn.configure(t,n,i),n.options=i},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 Zr=new WeakMap;var Jr={id:"subtitle",start(t,e,i){const n=new Gr({ctx:t.ctx,options:i,chart:t});sn.configure(t,n,i),sn.addBox(t,n),Zr.set(t,n)},stop(t){sn.removeBox(t,Zr.get(t)),Zr.delete(t)},beforeUpdate(t,e,i){const n=Zr.get(t);sn.configure(t,n,i),n.options=i},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 to={average(t){if(!t.length)return!1;let e,i,n=0,r=0,o=0;for(e=0,i=t.length;e-1?t.split("\n"):t}function no(t,e){const{element:i,datasetIndex:n,index:r}=e,o=t.getDatasetMeta(n).controller,{label:a,value:s}=o.getLabelAndValue(r);return{chart:t,label:a,parsed:o.getParsed(r),raw:t.data.datasets[n].data[r],formattedValue:s,dataset:o.getDataset(),dataIndex:r,datasetIndex:n,element:i}}function ro(t,e){const i=t._chart.ctx,{body:n,footer:r,title:o}=t,{boxWidth:a,boxHeight:s}=e,l=oe(e.bodyFont),h=oe(e.titleFont),c=oe(e.footerFont),u=o.length,d=r.length,f=n.length,g=re(e.padding);let p=g.height,m=0,x=n.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);x+=t.beforeBody.length+t.afterBody.length,u&&(p+=u*h.lineHeight+(u-1)*e.titleSpacing+e.titleMarginBottom),x&&(p+=f*(e.displayColors?Math.max(s,l.lineHeight):l.lineHeight)+(x-f)*l.lineHeight+(x-1)*e.bodySpacing),d&&(p+=e.footerMarginTop+d*c.lineHeight+(d-1)*e.footerSpacing);let y=0;const v=function(t){m=Math.max(m,i.measureText(t).width+y)};return i.save(),i.font=h.string,b(t.title,v),i.font=l.string,b(t.beforeBody.concat(t.afterBody),v),y=e.displayColors?a+2+e.boxPadding:0,b(n,(t=>{b(t.before,v),b(t.lines,v),b(t.after,v)})),y=0,i.font=c.string,b(t.footer,v),i.restore(),m+=g.width,{width:m,height:p}}function oo(t,e,i,n){const{x:r,width:o}=i,{width:a,chartArea:{left:s,right:l}}=t;let h="center";return"center"===n?h=r<=(s+l)/2?"left":"right":r<=o/2?h="left":r>=a-o/2&&(h="right"),function(t,e,i,n){const{x:r,width:o}=n,a=i.caretSize+i.caretPadding;return"left"===t&&r+o+a>e.width||"right"===t&&r-o-a<0||void 0}(h,t,e,i)&&(h="center"),h}function ao(t,e,i){const n=e.yAlign||function(t,e){const{y:i,height:n}=e;return it.height-n/2?"bottom":"center"}(t,i);return{xAlign:e.xAlign||oo(t,e,i,n),yAlign:n}}function so(t,e,i,n){const{caretSize:r,caretPadding:o,cornerRadius:a}=t,{xAlign:s,yAlign:l}=i,h=r+o,{topLeft:c,topRight:u,bottomLeft:d,bottomRight:f}=ne(a);let g=function(t,e){let{x:i,width:n}=t;return"right"===e?i-=n:"center"===e&&(i-=n/2),i}(e,s);const p=function(t,e,i){let{y:n,height:r}=t;return"top"===e?n+=i:n-="bottom"===e?r+i:r/2,n}(e,l,h);return"center"===l?"left"===s?g+=h:"right"===s&&(g-=h):"left"===s?g-=Math.max(c,d)+o:"right"===s&&(g+=Math.max(u,f)+o),{x:K(g,0,n.width-e.width),y:K(p,0,n.height-e.height)}}function lo(t,e,i){const n=re(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-n.right:t.x+n.left}function ho(t){return eo([],io(t))}function co(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}class uo extends Mn{constructor(t){super(),this.opacity=0,this._active=[],this._chart=t._chart,this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,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 e=this._chart,i=this.options.setContext(this.getContext()),n=i.enabled&&e.options.animation&&i.animations,r=new hi(this._chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=(this,se(this._chart.getContext(),{tooltip:this,tooltipItems:this._tooltipItems,type:"tooltip"})))}getTitle(t,e){const{callbacks:i}=e,n=i.beforeTitle.apply(this,[t]),r=i.title.apply(this,[t]),o=i.afterTitle.apply(this,[t]);let a=[];return a=eo(a,io(n)),a=eo(a,io(r)),a=eo(a,io(o)),a}getBeforeBody(t,e){return ho(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){const{callbacks:i}=e,n=[];return b(t,(t=>{const e={before:[],lines:[],after:[]},r=co(i,t);eo(e.before,io(r.beforeLabel.call(this,t))),eo(e.lines,r.label.call(this,t)),eo(e.after,io(r.afterLabel.call(this,t))),n.push(e)})),n}getAfterBody(t,e){return ho(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){const{callbacks:i}=e,n=i.beforeFooter.apply(this,[t]),r=i.footer.apply(this,[t]),o=i.afterFooter.apply(this,[t]);let a=[];return a=eo(a,io(n)),a=eo(a,io(r)),a=eo(a,io(o)),a}_createItems(t){const e=this._active,i=this._chart.data,n=[],r=[],o=[];let a,s,l=[];for(a=0,s=e.length;at.filter(e,n,r,i)))),t.itemSort&&(l=l.sort(((e,n)=>t.itemSort(e,n,i)))),b(l,(e=>{const i=co(t.callbacks,e);n.push(i.labelColor.call(this,e)),r.push(i.labelPointStyle.call(this,e)),o.push(i.labelTextColor.call(this,e))})),this.labelColors=n,this.labelPointStyles=r,this.labelTextColors=o,this.dataPoints=l,l}update(t,e){const i=this.options.setContext(this.getContext()),n=this._active;let r,o=[];if(n.length){const t=to[i.position].call(this,n,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const e=this._size=ro(this,i),a=Object.assign({},t,e),s=ao(this._chart,i,a),l=so(i,a,s,this._chart);this.xAlign=s.xAlign,this.yAlign=s.yAlign,r={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(r={opacity:0});this._tooltipItems=o,this.$context=void 0,r&&this._resolveAnimations().update(this,r),t&&i.external&&i.external.call(this,{chart:this._chart,tooltip:this,replay:e})}drawCaret(t,e,i,n){const r=this.getCaretPosition(t,i,n);e.lineTo(r.x1,r.y1),e.lineTo(r.x2,r.y2),e.lineTo(r.x3,r.y3)}getCaretPosition(t,e,i){const{xAlign:n,yAlign:r}=this,{caretSize:o,cornerRadius:a}=i,{topLeft:s,topRight:l,bottomLeft:h,bottomRight:c}=ne(a),{x:u,y:d}=t,{width:f,height:g}=e;let p,m,b,x,y,v;return"center"===r?(y=d+g/2,"left"===n?(p=u,m=p-o,x=y+o,v=y-o):(p=u+f,m=p+o,x=y-o,v=y+o),b=p):(m="left"===n?u+Math.max(s,h)+o:"right"===n?u+f-Math.max(l,c)-o:this.caretX,"top"===r?(x=d,y=x-o,p=m-o,b=m+o):(x=d+g,y=x+o,p=m+o,b=m-o),v=x),{x1:p,x2:m,x3:b,y1:x,y2:y,y3:v}}drawTitle(t,e,i){const n=this.title,r=n.length;let o,a,s;if(r){const l=Qe(i.rtl,this.x,this.width);for(t.x=lo(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",o=oe(i.titleFont),a=i.titleSpacing,e.fillStyle=i.titleColor,e.font=o.string,s=0;s0!==t))?(t.beginPath(),t.fillStyle=r.multiKeyBackground,Kt(t,{x:e,y:g,w:l,h:s,radius:a}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),Kt(t,{x:i,y:g+1,w:l-2,h:s-2,radius:a}),t.fill()):(t.fillStyle=r.multiKeyBackground,t.fillRect(e,g,l,s),t.strokeRect(e,g,l,s),t.fillStyle=o.backgroundColor,t.fillRect(i,g+1,l-2,s-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:n}=this,{bodySpacing:r,bodyAlign:o,displayColors:a,boxHeight:s,boxWidth:l,boxPadding:h}=i,c=oe(i.bodyFont);let u=c.lineHeight,d=0;const f=Qe(i.rtl,this.x,this.width),g=function(i){e.fillText(i,f.x(t.x+d),t.y+u/2),t.y+=u+r},p=f.textAlign(o);let m,x,y,v,w,_,M;for(e.textAlign=o,e.textBaseline="middle",e.font=c.string,t.x=lo(this,p,i),e.fillStyle=i.bodyColor,b(this.beforeBody,g),d=a&&"right"!==p?"center"===o?l/2+h:l+2+h:0,v=0,_=n.length;v<_;++v){for(m=n[v],x=this.labelTextColors[v],e.fillStyle=x,b(m.before,g),y=m.lines,a&&y.length&&(this._drawColorBox(e,t,v,f,i),u=Math.max(c.lineHeight,s)),w=0,M=y.length;w0&&e.stroke()}_updateAnimationTarget(t){const e=this._chart,i=this.$animations,n=i&&i.x,r=i&&i.y;if(n||r){const i=to[t.position].call(this,this._active,this._eventPosition);if(!i)return;const o=this._size=ro(this,t),a=Object.assign({},i,this._size),s=ao(e,t,a),l=so(t,a,s,e);n._to===l.x&&r._to===l.y||(this.xAlign=s.xAlign,this.yAlign=s.yAlign,this.width=o.width,this.height=o.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const n={width:this.width,height:this.height},r={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=re(e.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&a&&(t.save(),t.globalAlpha=i,this.drawBackground(r,t,n,e),Ge(t,e.textDirection),r.y+=o.top,this.drawTitle(r,t,e),this.drawBody(r,t,e),this.drawFooter(r,t,e),Ke(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,n=t.map((({datasetIndex:t,index:e})=>{const i=this._chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}})),r=!x(i,n),o=this._positionChanged(n,e);(r||o)&&(this._active=n,this._eventPosition=e,this.update(!0))}handleEvent(t,e){const i=this.options,n=this._active||[];let r=!1,o=[];"mouseout"!==t.type&&(o=this._chart.getElementsAtEventForMode(t,i.mode,i,e),i.reverse&&o.reverse());const a=this._positionChanged(o,t);return r=e||!x(o,n)||a,r&&(this._active=o,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),r}_positionChanged(t,e){const{caretX:i,caretY:n,options:r}=this,o=to[r.position].call(this,t,e);return!1!==o&&(i!==o.x||n!==o.y)}}uo.positioners=to;var fo={id:"tooltip",_element:uo,positioners:to,afterInit(t,e,i){i&&(t.tooltip=new uo({_chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip,i={tooltip:e};!1!==t.notifyPlugins("beforeTooltipDraw",i)&&(e&&e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i))},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i)&&(e.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:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.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:{beforeTitle:s,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,n=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},go=Object.freeze({__proto__:null,Decimation:zr,Filler:$r,Legend:Qr,SubTitle:Jr,Title:Kr,Tooltip:fo});class po extends En{constructor(t){super(t),this._startValue=void 0,this._valueRange=0}parse(t,e){if(h(t))return null;const i=this.getLabels();return((t,e)=>null===t?null:K(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:function(t,e,i){const n=t.indexOf(e);return-1===n?((t,e,i)=>"string"==typeof e?t.push(e)-1:isNaN(e)?null:i)(t,e,i):n!==t.lastIndexOf(e)?i:n}(i,t,g(e,t)),i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:n}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(n=this.getLabels().length-1)),this.min=i,this.max=n}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,n=[];let r=this.getLabels();r=0===t&&e===r.length-1?r:r.slice(t,e+1),this._valueRange=Math.max(r.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let i=t;i<=e;i++)n.push({value:i});return n}getLabelForValue(t){const e=this.getLabels();return t>=0&&te.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function mo(t,e,{horizontal:i,minRotation:n}){const r=j(n),o=(i?Math.sin(r):Math.cos(r))||.001,a=.75*e*(""+t).length;return Math.min(e/o,a)}po.id="category",po.defaults={ticks:{callback:po.prototype.getLabelForValue}};class bo extends En{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return h(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:n,max:r}=this;const o=t=>n=e?n:t,a=t=>r=i?r:t;if(t){const t=H(n),e=H(r);t<0&&e<0?a(0):t>0&&e>0&&o(0)}if(n===r){let e=1;(r>=Number.MAX_SAFE_INTEGER||n<=Number.MIN_SAFE_INTEGER)&&(e=Math.abs(.05*r)),a(r+e),t||o(n-e)}this.min=n,this.max=r}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:n}=t;return n?(e=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const n=function(t,e){const i=[],{bounds:n,step:r,min:o,max:a,precision:s,count:l,maxTicks:c,maxDigits:u,includeBounds:d}=t,f=r||1,g=c-1,{min:p,max:m}=e,b=!h(o),x=!h(a),y=!h(l),v=(m-p)/(u+1);let w,_,M,k,C=B((m-p)/g/f)*f;if(C<1e-14&&!b&&!x)return[{value:p},{value:m}];k=Math.ceil(m/C)-Math.floor(p/C),k>g&&(C=B(k*C/g/f)*f),h(s)||(w=Math.pow(10,s),C=Math.ceil(C*w)/w),"ticks"===n?(_=Math.floor(p/C)*C,M=Math.ceil(m/C)*C):(_=p,M=m),b&&x&&r&&function(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}((a-o)/r,C/1e3)?(k=Math.round(Math.min((a-o)/C,c)),C=(a-o)/k,_=o,M=a):y?(_=b?o:_,M=x?a:M,k=l-1,C=(M-_)/k):(k=(M-_)/C,k=U(k,Math.round(k),C/1e3)?Math.round(k):Math.ceil(k));const T=Math.max($(C),$(_));w=Math.pow(10,h(s)?T:s),_=Math.round(_*w)/w,M=Math.round(M*w)/w;let D=0;for(b&&(d&&_!==o?(i.push({value:o}),_0?i:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=d(t)?Math.max(0,t):null,this.max=d(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,n=this.max;const r=e=>i=t?i:e,o=t=>n=e?n:t,a=(t,e)=>Math.pow(10,Math.floor(N(t))+e);i===n&&(i<=0?(r(1),o(10)):(r(a(i,-1)),o(a(n,1)))),i<=0&&r(a(n,-1)),n<=0&&o(a(i,1)),this._zero&&this.min!==this._suggestedMin&&i===a(this.min,0)&&r(a(i,-1)),this.min=i,this.max=n}buildTicks(){const t=this.options,e=function(t,e){const i=Math.floor(N(e.max)),n=Math.ceil(e.max/Math.pow(10,i)),r=[];let o=f(t.min,Math.pow(10,Math.floor(N(e.min)))),a=Math.floor(N(o)),s=Math.floor(o/Math.pow(10,a)),l=a<0?Math.pow(10,Math.abs(a)):1;do{r.push({value:o,major:yo(o)}),++s,10===s&&(s=1,++a,l=a>=0?1:l),o=Math.round(s*Math.pow(10,a)*l)/l}while(ar?{start:e-i,end:e}:{start:e,end:e+i}}function Mo(t){return 0===t||180===t?"center":t<180?"left":"right"}function ko(t,e,i){return 90===i||270===i?t-=e/2:(i>270||i<90)&&(t-=e),t}function Co(t,e,i,n){const{ctx:r}=t;if(i)r.arc(t.xCenter,t.yCenter,e,0,O);else{let i=t.getPointPosition(0,e);r.moveTo(i.x,i.y);for(let o=1;o{const i=m(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""}))}fit(){const t=this.options;t.display&&t.pointLabels.display?function(t){const e={l:0,r:t.width,t:0,b:t.height-t.paddingTop},i={},n=[],r=[],o=t.getLabels().length;for(let h=0;he.r&&(e.r=m.end,i.r=g),b.starte.b&&(e.b=b.end,i.b=g)}var a,s,l;t._setReductions(t.drawingArea,e,i),t._pointLabelItems=function(t,e,i){const n=[],r=t.getLabels().length,o=t.options,a=wo(o),s=t.getDistanceFromCenterForValue(o.ticks.reverse?t.min:t.max);for(let o=0;o=0&&t=0;r--){const e=n.setContext(t.getPointLabelContext(r)),o=oe(e.font),{x:a,y:s,textAlign:l,left:c,top:u,right:d,bottom:f}=t._pointLabelItems[r],{backdropColor:g}=e;if(!h(g)){const t=re(e.backdropPadding);i.fillStyle=g,i.fillRect(c-t.left,u-t.top,d-c+t.width,f-u+t.height)}Qt(i,t._pointLabels[r],a,s+o.lineHeight/2,o,{color:e.color,textAlign:l,textBaseline:"middle"})}}(this,r),n.display&&this.ticks.forEach(((t,e)=>{0!==e&&(a=this.getDistanceFromCenterForValue(t.value),function(t,e,i,n){const r=t.ctx,o=e.circular,{color:a,lineWidth:s}=e;!o&&!n||!a||!s||i<0||(r.save(),r.strokeStyle=a,r.lineWidth=s,r.setLineDash(e.borderDash),r.lineDashOffset=e.borderDashOffset,r.beginPath(),Co(t,i,o,n),r.closePath(),r.stroke(),r.restore())}(this,n.setContext(this.getContext(e-1)),a,r))})),i.display){for(t.save(),o=this.getLabels().length-1;o>=0;o--){const n=i.setContext(this.getPointLabelContext(o)),{color:r,lineWidth:l}=n;l&&r&&(t.lineWidth=l,t.strokeStyle=r,t.setLineDash(n.borderDash),t.lineDashOffset=n.borderDashOffset,a=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),s=this.getPointPosition(o,a),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(s.x,s.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const n=this.getIndexAngle(0);let r,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach(((n,a)=>{if(0===a&&!e.reverse)return;const s=i.setContext(this.getContext(a)),l=oe(s.font);if(r=this.getDistanceFromCenterForValue(this.ticks[a].value),s.showLabelBackdrop){t.font=l.string,o=t.measureText(n.label).width,t.fillStyle=s.backdropColor;const e=re(s.backdropPadding);t.fillRect(-o/2-e.left,-r-l.size/2-e.top,o+e.width,l.size+e.height)}Qt(t,n.label,0,-r,l,{color:s.color})})),t.restore()}drawTitle(){}}Do.id="radialLinear",Do.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Cn.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5}},Do.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},Do.descriptors={angleLines:{_fallback:"grid"}};const So={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}},Po=Object.keys(So);function zo(t,e){return t-e}function Oo(t,e){if(h(e))return null;const i=t._adapter,{parser:n,round:r,isoWeekday:o}=t._parseOpts;let a=e;return"function"==typeof n&&(a=n(a)),d(a)||(a="string"==typeof n?i.parse(a,n):i.parse(a)),null===a?null:(r&&(a="week"!==r||!W(o)&&!0!==o?i.startOf(a,r):i.startOf(a,"isoWeek",o)),+a)}function Ao(t,e,i,n){const r=Po.length;for(let o=Po.indexOf(t);o=e?i[n]:i[r]]=!0}}else t[e]=!0}function Lo(t,e,i){const n=[],r={},o=e.length;let a,s;for(a=0;a=0&&(e[l].major=!0);return e}(t,n,r,i):n}class Ro extends En{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e){const i=t.time||(t.time={}),n=this._adapter=new Wi._date(t.adapters.date);M(i.displayFormats,n.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:Oo(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:n,max:r,minDefined:o,maxDefined:a}=this.getUserBounds();function s(t){o||isNaN(t.min)||(n=Math.min(n,t.min)),a||isNaN(t.max)||(r=Math.max(r,t.max))}o&&a||(s(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||s(this.getMinMax(!1))),n=d(n)&&!isNaN(n)?n:+e.startOf(Date.now(),i),r=d(r)&&!isNaN(r)?r:+e.endOf(Date.now(),i)+1,this.min=Math.min(n,r-1),this.max=Math.max(n+1,r)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,n="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const r=this.min,o=function(t,e,i){let n=0,r=t.length;for(;nn&&t[r-1]>i;)r--;return n>0||r=Po.indexOf(i);o--){const i=Po[o];if(So[i].common&&t._adapter.diff(r,n,i)>=e-1)return i}return Po[i?Po.indexOf(i):0]}(this,o.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(let e=Po.indexOf(t)+1,i=Po.length;e1e5*a)throw new Error(e+" and "+i+" are too far apart with stepSize of "+a+" "+o);const f="data"===n.ticks.source&&this.getDataTimestamps();for(c=d,u=0;ct-e)).map((t=>+t))}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}_tickFormatFunction(t,e,i,n){const r=this.options,o=r.time.displayFormats,a=this._unit,s=this._majorUnit,l=a&&o[a],h=s&&o[s],c=i[e],u=s&&h&&c&&c.major,d=this._adapter.format(t,n||(u?h:l)),f=r.ticks.callback;return f?m(f,[d,e,i],this):d}generateTickLabels(t){let e,i,n;for(e=0,i=t.length;e0?a:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(t=0,e=n.length;t=t[s].pos&&e<=t[l].pos&&({lo:s,hi:l}=he(t,"pos",e)),({pos:n,time:o}=t[s]),({pos:r,time:a}=t[l])):(e>=t[s].time&&e<=t[l].time&&({lo:s,hi:l}=he(t,"time",e)),({time:n,pos:o}=t[s]),({time:r,pos:a}=t[l]));const h=r-n;return h?o+(a-o)*(e-n)/h:o}Ro.id="time",Ro.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};class Io extends Ro{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=Fo(e,this.min),this._tableRange=Fo(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,n=[],r=[];let o,a,s,l,h;for(o=0,a=t.length;o=e&&l<=i&&n.push(l);if(n.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(o=0,a=n.length;o1?"s":"")+" required, but only "+e.length+" present")}function Wo(t){Bo(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"==typeof t&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(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://git.io/fjule"),console.warn((new Error).stack)),new Date(NaN))}var Uo={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"}};function Vo(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.width?String(e.width):t.defaultWidth,n=t.formats[i]||t.formats[t.defaultWidth];return n}}var jo,Yo={date:Vo({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Vo({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Vo({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},$o={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function qo(t){return function(e,i){var n,r=i||{};if("formatting"===(r.context?String(r.context):"standalone")&&t.formattingValues){var o=t.defaultFormattingWidth||t.defaultWidth,a=r.width?String(r.width):o;n=t.formattingValues[a]||t.formattingValues[o]}else{var s=t.defaultWidth,l=r.width?String(r.width):t.defaultWidth;n=t.values[l]||t.values[s]}return n[t.argumentCallback?t.argumentCallback(e):e]}}function Xo(t){return function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=i.width,r=n&&t.matchPatterns[n]||t.matchPatterns[t.defaultMatchWidth],o=e.match(r);if(!o)return null;var a,s=o[0],l=n&&t.parsePatterns[n]||t.parsePatterns[t.defaultParseWidth],h=Array.isArray(l)?Go(l,(function(t){return t.test(s)})):Qo(l,(function(t){return t.test(s)}));a=t.valueCallback?t.valueCallback(h):h,a=i.valueCallback?i.valueCallback(a):a;var c=e.slice(s.length);return{value:a,rest:c}}}function Qo(t,e){for(var i in t)if(t.hasOwnProperty(i)&&e(t[i]))return i}function Go(t,e){for(var i=0;i0?"in "+n:n+" ago":n},formatLong:Yo,formatRelative:function(t,e,i,n){return $o[t]},localize:{ordinalNumber:function(t,e){var i=Number(t),n=i%100;if(n>20||n<10)switch(n%10){case 1:return i+"st";case 2:return i+"nd";case 3:return i+"rd"}return i+"th"},era:qo({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:qo({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:qo({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:qo({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:qo({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(jo={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.match(jo.matchPattern);if(!i)return null;var n=i[0],r=t.match(jo.parsePattern);if(!r)return null;var o=jo.valueCallback?jo.valueCallback(r[0]):r[0];o=e.valueCallback?e.valueCallback(o):o;var a=t.slice(n.length);return{value:o,rest:a}}),era:Xo({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Xo({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:Xo({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Xo({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Xo({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function Zo(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function Jo(t,e){Bo(2,arguments);var i=Wo(t).getTime(),n=Zo(e);return new Date(i+n)}function ta(t,e){Bo(2,arguments);var i=Zo(e);return Jo(t,-i)}function ea(t,e){if(null==t)throw new TypeError("assign requires that input parameter not be null or undefined");for(var i in e=e||{})Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}function ia(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}}function na(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}}var ra={p:na,P:function(t,e){var i,n=t.match(/(P+)(p+)?/),r=n[1],o=n[2];if(!o)return ia(t,e);switch(r){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;default:i=e.dateTime({width:"full"})}return i.replace("{{date}}",ia(r,e)).replace("{{time}}",na(o,e))}};const oa=ra;function aa(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}var sa=["D","DD"],la=["YY","YYYY"];function ha(t){return-1!==sa.indexOf(t)}function ca(t){return-1!==la.indexOf(t)}function ua(t,e,i){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://git.io/fxCyr"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://git.io/fxCyr"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://git.io/fxCyr"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://git.io/fxCyr"))}function da(t,e){Bo(1,arguments);var i=e||{},n=i.locale,r=n&&n.options&&n.options.weekStartsOn,o=null==r?0:Zo(r),a=null==i.weekStartsOn?o:Zo(i.weekStartsOn);if(!(a>=0&&a<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=Wo(t),l=s.getUTCDay(),h=(l=1&&l<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var h=new Date(0);h.setUTCFullYear(n+1,0,l),h.setUTCHours(0,0,0,0);var c=da(h,e),u=new Date(0);u.setUTCFullYear(n,0,l),u.setUTCHours(0,0,0,0);var d=da(u,e);return i.getTime()>=c.getTime()?n+1:i.getTime()>=d.getTime()?n:n-1}function ga(t,e,i){Bo(2,arguments);var n=i||{},r=n.locale,o=r&&r.options&&r.options.weekStartsOn,a=null==o?0:Zo(o),s=null==n.weekStartsOn?a:Zo(n.weekStartsOn);if(!(s>=0&&s<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var l=Wo(t),h=Zo(e),c=l.getUTCDay(),u=h%7,d=(u+7)%7,f=(d=r.getTime()?i+1:e.getTime()>=a.getTime()?i:i-1}function ba(t){Bo(1,arguments);var e=ma(t),i=new Date(0);i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0);var n=pa(i);return n}var xa=6048e5;function ya(t){Bo(1,arguments);var e=Wo(t),i=pa(e).getTime()-ba(e).getTime();return Math.round(i/xa)+1}function va(t,e){Bo(1,arguments);var i=e||{},n=i.locale,r=n&&n.options&&n.options.firstWeekContainsDate,o=null==r?1:Zo(r),a=null==i.firstWeekContainsDate?o:Zo(i.firstWeekContainsDate),s=fa(t,e),l=new Date(0);l.setUTCFullYear(s,0,a),l.setUTCHours(0,0,0,0);var h=da(l,e);return h}var wa=6048e5;function _a(t,e){Bo(1,arguments);var i=Wo(t),n=da(i,e).getTime()-va(i,e).getTime();return Math.round(n/wa)+1}var Ma=/^(1[0-2]|0?\d)/,ka=/^(3[0-1]|[0-2]?\d)/,Ca=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,Ta=/^(5[0-3]|[0-4]?\d)/,Da=/^(2[0-3]|[0-1]?\d)/,Sa=/^(2[0-4]|[0-1]?\d)/,Pa=/^(1[0-1]|0?\d)/,za=/^(1[0-2]|0?\d)/,Oa=/^[0-5]?\d/,Aa=/^[0-5]?\d/,Ea=/^\d/,La=/^\d{1,2}/,Ra=/^\d{1,3}/,Fa=/^\d{1,4}/,Ia=/^-?\d+/,Na=/^-?\d/,Ha=/^-?\d{1,2}/,Ba=/^-?\d{1,3}/,Wa=/^-?\d{1,4}/,Ua=/^([+-])(\d{2})(\d{2})?|Z/,Va=/^([+-])(\d{2})(\d{2})|Z/,ja=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,Ya=/^([+-])(\d{2}):(\d{2})|Z/,$a=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function qa(t,e,i){var n=e.match(t);if(!n)return null;var r=parseInt(n[0],10);return{value:i?i(r):r,rest:e.slice(n[0].length)}}function Xa(t,e){var i=e.match(t);return i?"Z"===i[0]?{value:0,rest:e.slice(1)}:{value:("+"===i[1]?1:-1)*(36e5*(i[2]?parseInt(i[2],10):0)+6e4*(i[3]?parseInt(i[3],10):0)+1e3*(i[5]?parseInt(i[5],10):0)),rest:e.slice(i[0].length)}:null}function Qa(t,e){return qa(Ia,t,e)}function Ga(t,e,i){switch(t){case 1:return qa(Ea,e,i);case 2:return qa(La,e,i);case 3:return qa(Ra,e,i);case 4:return qa(Fa,e,i);default:return qa(new RegExp("^\\d{1,"+t+"}"),e,i)}}function Ka(t,e,i){switch(t){case 1:return qa(Na,e,i);case 2:return qa(Ha,e,i);case 3:return qa(Ba,e,i);case 4:return qa(Wa,e,i);default:return qa(new RegExp("^-?\\d{1,"+t+"}"),e,i)}}function Za(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function Ja(t,e){var i,n=e>0,r=n?e:1-e;if(r<=50)i=t||100;else{var o=r+50;i=t+100*Math.floor(o/100)-(t>=o%100?100:0)}return n?i:1-i}var ts=[31,28,31,30,31,30,31,31,30,31,30,31],es=[31,29,31,30,31,30,31,31,30,31,30,31];function is(t){return t%400==0||t%4==0&&t%100!=0}const ns={G:{priority:140,parse:function(t,e,i,n){switch(e){case"G":case"GG":case"GGG":return i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"});case"GGGGG":return i.era(t,{width:"narrow"});default:return i.era(t,{width:"wide"})||i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"})}},set:function(t,e,i,n){return e.era=i,t.setUTCFullYear(i,0,1),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["R","u","t","T"]},y:{priority:130,parse:function(t,e,i,n){var r=function(t){return{year:t,isTwoDigitYear:"yy"===e}};switch(e){case"y":return Ga(4,t,r);case"yo":return i.ordinalNumber(t,{unit:"year",valueCallback:r});default:return Ga(e.length,t,r)}},validate:function(t,e,i){return e.isTwoDigitYear||e.year>0},set:function(t,e,i,n){var r=t.getUTCFullYear();if(i.isTwoDigitYear){var o=Ja(i.year,r);return t.setUTCFullYear(o,0,1),t.setUTCHours(0,0,0,0),t}var a="era"in e&&1!==e.era?1-i.year:i.year;return t.setUTCFullYear(a,0,1),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["Y","R","u","w","I","i","e","c","t","T"]},Y:{priority:130,parse:function(t,e,i,n){var r=function(t){return{year:t,isTwoDigitYear:"YY"===e}};switch(e){case"Y":return Ga(4,t,r);case"Yo":return i.ordinalNumber(t,{unit:"year",valueCallback:r});default:return Ga(e.length,t,r)}},validate:function(t,e,i){return e.isTwoDigitYear||e.year>0},set:function(t,e,i,n){var r=fa(t,n);if(i.isTwoDigitYear){var o=Ja(i.year,r);return t.setUTCFullYear(o,0,n.firstWeekContainsDate),t.setUTCHours(0,0,0,0),da(t,n)}var a="era"in e&&1!==e.era?1-i.year:i.year;return t.setUTCFullYear(a,0,n.firstWeekContainsDate),t.setUTCHours(0,0,0,0),da(t,n)},incompatibleTokens:["y","R","u","Q","q","M","L","I","d","D","i","t","T"]},R:{priority:130,parse:function(t,e,i,n){return Ka("R"===e?4:e.length,t)},set:function(t,e,i,n){var r=new Date(0);return r.setUTCFullYear(i,0,4),r.setUTCHours(0,0,0,0),pa(r)},incompatibleTokens:["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]},u:{priority:130,parse:function(t,e,i,n){return Ka("u"===e?4:e.length,t)},set:function(t,e,i,n){return t.setUTCFullYear(i,0,1),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["G","y","Y","R","w","I","i","e","c","t","T"]},Q:{priority:120,parse:function(t,e,i,n){switch(e){case"Q":case"QQ":return Ga(e.length,t);case"Qo":return i.ordinalNumber(t,{unit:"quarter"});case"QQQ":return i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return i.quarter(t,{width:"narrow",context:"formatting"});default:return i.quarter(t,{width:"wide",context:"formatting"})||i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"})}},validate:function(t,e,i){return e>=1&&e<=4},set:function(t,e,i,n){return t.setUTCMonth(3*(i-1),1),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]},q:{priority:120,parse:function(t,e,i,n){switch(e){case"q":case"qq":return Ga(e.length,t);case"qo":return i.ordinalNumber(t,{unit:"quarter"});case"qqq":return i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return i.quarter(t,{width:"narrow",context:"standalone"});default:return i.quarter(t,{width:"wide",context:"standalone"})||i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"})}},validate:function(t,e,i){return e>=1&&e<=4},set:function(t,e,i,n){return t.setUTCMonth(3*(i-1),1),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]},M:{priority:110,parse:function(t,e,i,n){var r=function(t){return t-1};switch(e){case"M":return qa(Ma,t,r);case"MM":return Ga(2,t,r);case"Mo":return i.ordinalNumber(t,{unit:"month",valueCallback:r});case"MMM":return i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return i.month(t,{width:"narrow",context:"formatting"});default:return i.month(t,{width:"wide",context:"formatting"})||i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"})}},validate:function(t,e,i){return e>=0&&e<=11},set:function(t,e,i,n){return t.setUTCMonth(i,1),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]},L:{priority:110,parse:function(t,e,i,n){var r=function(t){return t-1};switch(e){case"L":return qa(Ma,t,r);case"LL":return Ga(2,t,r);case"Lo":return i.ordinalNumber(t,{unit:"month",valueCallback:r});case"LLL":return i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return i.month(t,{width:"narrow",context:"standalone"});default:return i.month(t,{width:"wide",context:"standalone"})||i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"})}},validate:function(t,e,i){return e>=0&&e<=11},set:function(t,e,i,n){return t.setUTCMonth(i,1),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]},w:{priority:100,parse:function(t,e,i,n){switch(e){case"w":return qa(Ta,t);case"wo":return i.ordinalNumber(t,{unit:"week"});default:return Ga(e.length,t)}},validate:function(t,e,i){return e>=1&&e<=53},set:function(t,e,i,n){return da(function(t,e,i){Bo(2,arguments);var n=Wo(t),r=Zo(e),o=_a(n,i)-r;return n.setUTCDate(n.getUTCDate()-7*o),n}(t,i,n),n)},incompatibleTokens:["y","R","u","q","Q","M","L","I","d","D","i","t","T"]},I:{priority:100,parse:function(t,e,i,n){switch(e){case"I":return qa(Ta,t);case"Io":return i.ordinalNumber(t,{unit:"week"});default:return Ga(e.length,t)}},validate:function(t,e,i){return e>=1&&e<=53},set:function(t,e,i,n){return pa(function(t,e){Bo(2,arguments);var i=Wo(t),n=Zo(e),r=ya(i)-n;return i.setUTCDate(i.getUTCDate()-7*r),i}(t,i,n),n)},incompatibleTokens:["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]},d:{priority:90,subPriority:1,parse:function(t,e,i,n){switch(e){case"d":return qa(ka,t);case"do":return i.ordinalNumber(t,{unit:"date"});default:return Ga(e.length,t)}},validate:function(t,e,i){var n=is(t.getUTCFullYear()),r=t.getUTCMonth();return n?e>=1&&e<=es[r]:e>=1&&e<=ts[r]},set:function(t,e,i,n){return t.setUTCDate(i),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["Y","R","q","Q","w","I","D","i","e","c","t","T"]},D:{priority:90,subPriority:1,parse:function(t,e,i,n){switch(e){case"D":case"DD":return qa(Ca,t);case"Do":return i.ordinalNumber(t,{unit:"date"});default:return Ga(e.length,t)}},validate:function(t,e,i){return is(t.getUTCFullYear())?e>=1&&e<=366:e>=1&&e<=365},set:function(t,e,i,n){return t.setUTCMonth(0,i),t.setUTCHours(0,0,0,0),t},incompatibleTokens:["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]},E:{priority:90,parse:function(t,e,i,n){switch(e){case"E":case"EE":case"EEE":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return i.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}},validate:function(t,e,i){return e>=0&&e<=6},set:function(t,e,i,n){return(t=ga(t,i,n)).setUTCHours(0,0,0,0),t},incompatibleTokens:["D","i","e","c","t","T"]},e:{priority:90,parse:function(t,e,i,n){var r=function(t){var e=7*Math.floor((t-1)/7);return(t+n.weekStartsOn+6)%7+e};switch(e){case"e":case"ee":return Ga(e.length,t,r);case"eo":return i.ordinalNumber(t,{unit:"day",valueCallback:r});case"eee":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"eeeee":return i.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}},validate:function(t,e,i){return e>=0&&e<=6},set:function(t,e,i,n){return(t=ga(t,i,n)).setUTCHours(0,0,0,0),t},incompatibleTokens:["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]},c:{priority:90,parse:function(t,e,i,n){var r=function(t){var e=7*Math.floor((t-1)/7);return(t+n.weekStartsOn+6)%7+e};switch(e){case"c":case"cc":return Ga(e.length,t,r);case"co":return i.ordinalNumber(t,{unit:"day",valueCallback:r});case"ccc":return i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});case"ccccc":return i.day(t,{width:"narrow",context:"standalone"});case"cccccc":return i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});default:return i.day(t,{width:"wide",context:"standalone"})||i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"})}},validate:function(t,e,i){return e>=0&&e<=6},set:function(t,e,i,n){return(t=ga(t,i,n)).setUTCHours(0,0,0,0),t},incompatibleTokens:["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]},i:{priority:90,parse:function(t,e,i,n){var r=function(t){return 0===t?7:t};switch(e){case"i":case"ii":return Ga(e.length,t);case"io":return i.ordinalNumber(t,{unit:"day"});case"iii":return i.day(t,{width:"abbreviated",context:"formatting",valueCallback:r})||i.day(t,{width:"short",context:"formatting",valueCallback:r})||i.day(t,{width:"narrow",context:"formatting",valueCallback:r});case"iiiii":return i.day(t,{width:"narrow",context:"formatting",valueCallback:r});case"iiiiii":return i.day(t,{width:"short",context:"formatting",valueCallback:r})||i.day(t,{width:"narrow",context:"formatting",valueCallback:r});default:return i.day(t,{width:"wide",context:"formatting",valueCallback:r})||i.day(t,{width:"abbreviated",context:"formatting",valueCallback:r})||i.day(t,{width:"short",context:"formatting",valueCallback:r})||i.day(t,{width:"narrow",context:"formatting",valueCallback:r})}},validate:function(t,e,i){return e>=1&&e<=7},set:function(t,e,i,n){return t=function(t,e){Bo(2,arguments);var i=Zo(e);i%7==0&&(i-=7);var n=1,r=Wo(t),o=r.getUTCDay(),a=((i%7+7)%7=1&&e<=12},set:function(t,e,i,n){var r=t.getUTCHours()>=12;return r&&i<12?t.setUTCHours(i+12,0,0,0):r||12!==i?t.setUTCHours(i,0,0,0):t.setUTCHours(0,0,0,0),t},incompatibleTokens:["H","K","k","t","T"]},H:{priority:70,parse:function(t,e,i,n){switch(e){case"H":return qa(Da,t);case"Ho":return i.ordinalNumber(t,{unit:"hour"});default:return Ga(e.length,t)}},validate:function(t,e,i){return e>=0&&e<=23},set:function(t,e,i,n){return t.setUTCHours(i,0,0,0),t},incompatibleTokens:["a","b","h","K","k","t","T"]},K:{priority:70,parse:function(t,e,i,n){switch(e){case"K":return qa(Pa,t);case"Ko":return i.ordinalNumber(t,{unit:"hour"});default:return Ga(e.length,t)}},validate:function(t,e,i){return e>=0&&e<=11},set:function(t,e,i,n){return t.getUTCHours()>=12&&i<12?t.setUTCHours(i+12,0,0,0):t.setUTCHours(i,0,0,0),t},incompatibleTokens:["a","b","h","H","k","t","T"]},k:{priority:70,parse:function(t,e,i,n){switch(e){case"k":return qa(Sa,t);case"ko":return i.ordinalNumber(t,{unit:"hour"});default:return Ga(e.length,t)}},validate:function(t,e,i){return e>=1&&e<=24},set:function(t,e,i,n){var r=i<=24?i%24:i;return t.setUTCHours(r,0,0,0),t},incompatibleTokens:["a","b","h","H","K","t","T"]},m:{priority:60,parse:function(t,e,i,n){switch(e){case"m":return qa(Oa,t);case"mo":return i.ordinalNumber(t,{unit:"minute"});default:return Ga(e.length,t)}},validate:function(t,e,i){return e>=0&&e<=59},set:function(t,e,i,n){return t.setUTCMinutes(i,0,0),t},incompatibleTokens:["t","T"]},s:{priority:50,parse:function(t,e,i,n){switch(e){case"s":return qa(Aa,t);case"so":return i.ordinalNumber(t,{unit:"second"});default:return Ga(e.length,t)}},validate:function(t,e,i){return e>=0&&e<=59},set:function(t,e,i,n){return t.setUTCSeconds(i,0),t},incompatibleTokens:["t","T"]},S:{priority:30,parse:function(t,e,i,n){return Ga(e.length,t,(function(t){return Math.floor(t*Math.pow(10,3-e.length))}))},set:function(t,e,i,n){return t.setUTCMilliseconds(i),t},incompatibleTokens:["t","T"]},X:{priority:10,parse:function(t,e,i,n){switch(e){case"X":return Xa(Ua,t);case"XX":return Xa(Va,t);case"XXXX":return Xa(ja,t);case"XXXXX":return Xa($a,t);default:return Xa(Ya,t)}},set:function(t,e,i,n){return e.timestampIsSet?t:new Date(t.getTime()-i)},incompatibleTokens:["t","T","x"]},x:{priority:10,parse:function(t,e,i,n){switch(e){case"x":return Xa(Ua,t);case"xx":return Xa(Va,t);case"xxxx":return Xa(ja,t);case"xxxxx":return Xa($a,t);default:return Xa(Ya,t)}},set:function(t,e,i,n){return e.timestampIsSet?t:new Date(t.getTime()-i)},incompatibleTokens:["t","T","X"]},t:{priority:40,parse:function(t,e,i,n){return Qa(t)},set:function(t,e,i,n){return[new Date(1e3*i),{timestampIsSet:!0}]},incompatibleTokens:"*"},T:{priority:20,parse:function(t,e,i,n){return Qa(t)},set:function(t,e,i,n){return[new Date(i),{timestampIsSet:!0}]},incompatibleTokens:"*"}};var rs=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,os=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,as=/^'([^]*?)'?$/,ss=/''/g,ls=/\S/,hs=/[a-zA-Z]/;function cs(t,e){if(e.timestampIsSet)return t;var i=new Date(0);return i.setFullYear(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()),i.setHours(t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()),i}function us(t){return t.match(as)[1].replace(ss,"'")}var ds=36e5,fs={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},gs=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,ps=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,ms=/^([+-])(\d{2})(?::?(\d{2}))?$/;function bs(t){var e,i={},n=t.split(fs.dateTimeDelimiter);if(n.length>2)return i;if(/:/.test(n[0])?(i.date=null,e=n[0]):(i.date=n[0],e=n[1],fs.timeZoneDelimiter.test(i.date)&&(i.date=t.split(fs.timeZoneDelimiter)[0],e=t.substr(i.date.length,t.length))),e){var r=fs.timezone.exec(e);r?(i.time=e.replace(r[1],""),i.timezone=r[1]):i.time=e}return i}function xs(t,e){var i=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),n=t.match(i);if(!n)return{year:null};var r=n[1]&&parseInt(n[1]),o=n[2]&&parseInt(n[2]);return{year:null==o?r:100*o,restDateString:t.slice((n[1]||n[2]).length)}}function ys(t,e){if(null===e)return null;var i=t.match(gs);if(!i)return null;var n=!!i[4],r=vs(i[1]),o=vs(i[2])-1,a=vs(i[3]),s=vs(i[4]),l=vs(i[5])-1;if(n)return function(t,e,i){return e>=1&&e<=53&&i>=0&&i<=6}(0,s,l)?function(t,e,i){var n=new Date(0);n.setUTCFullYear(t,0,4);var r=7*(e-1)+i+1-(n.getUTCDay()||7);return n.setUTCDate(n.getUTCDate()+r),n}(e,s,l):new Date(NaN);var h=new Date(0);return function(t,e,i){return e>=0&&e<=11&&i>=1&&i<=(ks[e]||(Cs(t)?29:28))}(e,o,a)&&function(t,e){return e>=1&&e<=(Cs(t)?366:365)}(e,r)?(h.setUTCFullYear(e,o,Math.max(r,a)),h):new Date(NaN)}function vs(t){return t?parseInt(t):1}function ws(t){var e=t.match(ps);if(!e)return null;var i=_s(e[1]),n=_s(e[2]),r=_s(e[3]);return function(t,e,i){return 24===t?0===e&&0===i:i>=0&&i<60&&e>=0&&e<60&&t>=0&&t<25}(i,n,r)?i*ds+6e4*n+1e3*r:NaN}function _s(t){return t&&parseFloat(t.replace(",","."))||0}function Ms(t){if("Z"===t)return 0;var e=t.match(ms);if(!e)return 0;var i="+"===e[1]?-1:1,n=parseInt(e[2]),r=e[3]&&parseInt(e[3])||0;return function(t,e){return e>=0&&e<=59}(0,r)?i*(n*ds+6e4*r):NaN}var ks=[31,null,31,30,31,30,31,31,30,31,30,31];function Cs(t){return t%400==0||t%4==0&&t%100}function Ts(t){return Bo(1,arguments),t instanceof Date||"object"==typeof t&&"[object Date]"===Object.prototype.toString.call(t)}function Ds(t){if(Bo(1,arguments),!Ts(t)&&"number"!=typeof t)return!1;var e=Wo(t);return!isNaN(Number(e))}function Ss(t,e){for(var i=t<0?"-":"",n=Math.abs(t).toString();n.length0?i:1-i;return Ss("yy"===e?n%100:n,e.length)},zs=function(t,e){var i=t.getUTCMonth();return"M"===e?String(i+1):Ss(i+1,2)},Os=function(t,e){return Ss(t.getUTCDate(),e.length)},As=function(t,e){return Ss(t.getUTCHours()%12||12,e.length)},Es=function(t,e){return Ss(t.getUTCHours(),e.length)},Ls=function(t,e){return Ss(t.getUTCMinutes(),e.length)},Rs=function(t,e){return Ss(t.getUTCSeconds(),e.length)},Fs=function(t,e){var i=e.length,n=t.getUTCMilliseconds();return Ss(Math.floor(n*Math.pow(10,i-3)),e.length)};var Is=864e5;function Ns(t,e){var i=t>0?"-":"+",n=Math.abs(t),r=Math.floor(n/60),o=n%60;if(0===o)return i+String(r);var a=e||"";return i+String(r)+a+Ss(o,2)}function Hs(t,e){return t%60==0?(t>0?"-":"+")+Ss(Math.abs(t)/60,2):Bs(t,e)}function Bs(t,e){var i=e||"",n=t>0?"-":"+",r=Math.abs(t);return n+Ss(Math.floor(r/60),2)+i+Ss(r%60,2)}const Ws={G:function(t,e,i){var n=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(n,{width:"abbreviated"});case"GGGGG":return i.era(n,{width:"narrow"});default:return i.era(n,{width:"wide"})}},y:function(t,e,i){if("yo"===e){var n=t.getUTCFullYear(),r=n>0?n:1-n;return i.ordinalNumber(r,{unit:"year"})}return Ps(t,e)},Y:function(t,e,i,n){var r=fa(t,n),o=r>0?r:1-r;return"YY"===e?Ss(o%100,2):"Yo"===e?i.ordinalNumber(o,{unit:"year"}):Ss(o,e.length)},R:function(t,e){return Ss(ma(t),e.length)},u:function(t,e){return Ss(t.getUTCFullYear(),e.length)},Q:function(t,e,i){var n=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(n);case"QQ":return Ss(n,2);case"Qo":return i.ordinalNumber(n,{unit:"quarter"});case"QQQ":return i.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(n,{width:"narrow",context:"formatting"});default:return i.quarter(n,{width:"wide",context:"formatting"})}},q:function(t,e,i){var n=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(n);case"qq":return Ss(n,2);case"qo":return i.ordinalNumber(n,{unit:"quarter"});case"qqq":return i.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(n,{width:"narrow",context:"standalone"});default:return i.quarter(n,{width:"wide",context:"standalone"})}},M:function(t,e,i){var n=t.getUTCMonth();switch(e){case"M":case"MM":return zs(t,e);case"Mo":return i.ordinalNumber(n+1,{unit:"month"});case"MMM":return i.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(n,{width:"narrow",context:"formatting"});default:return i.month(n,{width:"wide",context:"formatting"})}},L:function(t,e,i){var n=t.getUTCMonth();switch(e){case"L":return String(n+1);case"LL":return Ss(n+1,2);case"Lo":return i.ordinalNumber(n+1,{unit:"month"});case"LLL":return i.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(n,{width:"narrow",context:"standalone"});default:return i.month(n,{width:"wide",context:"standalone"})}},w:function(t,e,i,n){var r=_a(t,n);return"wo"===e?i.ordinalNumber(r,{unit:"week"}):Ss(r,e.length)},I:function(t,e,i){var n=ya(t);return"Io"===e?i.ordinalNumber(n,{unit:"week"}):Ss(n,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):Os(t,e)},D:function(t,e,i){var n=function(t){Bo(1,arguments);var e=Wo(t),i=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var n=e.getTime(),r=i-n;return Math.floor(r/Is)+1}(t);return"Do"===e?i.ordinalNumber(n,{unit:"dayOfYear"}):Ss(n,e.length)},E:function(t,e,i){var n=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return i.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(n,{width:"short",context:"formatting"});default:return i.day(n,{width:"wide",context:"formatting"})}},e:function(t,e,i,n){var r=t.getUTCDay(),o=(r-n.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return Ss(o,2);case"eo":return i.ordinalNumber(o,{unit:"day"});case"eee":return i.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(r,{width:"short",context:"formatting"});default:return i.day(r,{width:"wide",context:"formatting"})}},c:function(t,e,i,n){var r=t.getUTCDay(),o=(r-n.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return Ss(o,e.length);case"co":return i.ordinalNumber(o,{unit:"day"});case"ccc":return i.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(r,{width:"narrow",context:"standalone"});case"cccccc":return i.day(r,{width:"short",context:"standalone"});default:return i.day(r,{width:"wide",context:"standalone"})}},i:function(t,e,i){var n=t.getUTCDay(),r=0===n?7:n;switch(e){case"i":return String(r);case"ii":return Ss(r,e.length);case"io":return i.ordinalNumber(r,{unit:"day"});case"iii":return i.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(n,{width:"short",context:"formatting"});default:return i.day(n,{width:"wide",context:"formatting"})}},a:function(t,e,i){var n=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(n,{width:"narrow",context:"formatting"});default:return i.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(t,e,i){var n,r=t.getUTCHours();switch(n=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(n,{width:"narrow",context:"formatting"});default:return i.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(t,e,i){var n,r=t.getUTCHours();switch(n=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",e){case"B":case"BB":case"BBB":return i.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(n,{width:"narrow",context:"formatting"});default:return i.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){var n=t.getUTCHours()%12;return 0===n&&(n=12),i.ordinalNumber(n,{unit:"hour"})}return As(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):Es(t,e)},K:function(t,e,i){var n=t.getUTCHours()%12;return"Ko"===e?i.ordinalNumber(n,{unit:"hour"}):Ss(n,e.length)},k:function(t,e,i){var n=t.getUTCHours();return 0===n&&(n=24),"ko"===e?i.ordinalNumber(n,{unit:"hour"}):Ss(n,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):Ls(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):Rs(t,e)},S:function(t,e){return Fs(t,e)},X:function(t,e,i,n){var r=(n._originalDate||t).getTimezoneOffset();if(0===r)return"Z";switch(e){case"X":return Hs(r);case"XXXX":case"XX":return Bs(r);default:return Bs(r,":")}},x:function(t,e,i,n){var r=(n._originalDate||t).getTimezoneOffset();switch(e){case"x":return Hs(r);case"xxxx":case"xx":return Bs(r);default:return Bs(r,":")}},O:function(t,e,i,n){var r=(n._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Ns(r,":");default:return"GMT"+Bs(r,":")}},z:function(t,e,i,n){var r=(n._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Ns(r,":");default:return"GMT"+Bs(r,":")}},t:function(t,e,i,n){var r=n._originalDate||t;return Ss(Math.floor(r.getTime()/1e3),e.length)},T:function(t,e,i,n){return Ss((n._originalDate||t).getTime(),e.length)}};var Us=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Vs=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,js=/^'([^]*?)'?$/,Ys=/''/g,$s=/[a-zA-Z]/;function qs(t){return t.match(js)[1].replace(Ys,"'")}var Xs=36e5;function Qs(t,e){Bo(2,arguments);var i=Wo(t),n=Zo(e);return isNaN(n)?new Date(NaN):n?(i.setDate(i.getDate()+n),i):i}function Gs(t,e){Bo(2,arguments);var i=Wo(t),n=Zo(e);if(isNaN(n))return new Date(NaN);if(!n)return i;var r=i.getDate(),o=new Date(i.getTime());o.setMonth(i.getMonth()+n+1,0);var a=o.getDate();return r>=a?o:(i.setFullYear(o.getFullYear(),o.getMonth(),r),i)}function Ks(t,e){return Bo(2,arguments),Wo(t).getTime()-Wo(e).getTime()}var Zs={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}};function Js(t){return t?Zs[t]:Zs.trunc}Math.pow(10,8);var tl=36e5;function el(t){Bo(1,arguments);var e=Wo(t);return e.setHours(0,0,0,0),e}var il=864e5;function nl(t,e){Bo(2,arguments);var i=el(t),n=el(e),r=i.getTime()-aa(i),o=n.getTime()-aa(n);return Math.round((r-o)/il)}function rl(t,e){var i=t.getFullYear()-e.getFullYear()||t.getMonth()-e.getMonth()||t.getDate()-e.getDate()||t.getHours()-e.getHours()||t.getMinutes()-e.getMinutes()||t.getSeconds()-e.getSeconds()||t.getMilliseconds()-e.getMilliseconds();return i<0?-1:i>0?1:i}function ol(t,e){Bo(2,arguments);var i=Wo(t),n=Wo(e),r=rl(i,n),o=Math.abs(nl(i,n));i.setDate(i.getDate()-r*o);var a=Number(rl(i,n)===-r),s=r*(o-a);return 0===s?0:s}function al(t,e){Bo(2,arguments);var i=Wo(t),n=Wo(e),r=i.getFullYear()-n.getFullYear(),o=i.getMonth()-n.getMonth();return 12*r+o}function sl(t,e){Bo(2,arguments);var i=Wo(t),n=Wo(e),r=i.getTime()-n.getTime();return r<0?-1:r>0?1:r}function ll(t){Bo(1,arguments);var e=Wo(t);return e.setHours(23,59,59,999),e}function hl(t){Bo(1,arguments);var e=Wo(t),i=e.getMonth();return e.setFullYear(e.getFullYear(),i+1,0),e.setHours(23,59,59,999),e}function cl(t){Bo(1,arguments);var e=Wo(t);return ll(e).getTime()===hl(e).getTime()}function ul(t,e){Bo(2,arguments);var i,n=Wo(t),r=Wo(e),o=sl(n,r),a=Math.abs(al(n,r));if(a<1)i=0;else{1===n.getMonth()&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-o*a);var s=sl(n,r)===-o;cl(Wo(t))&&1===a&&1===sl(t,r)&&(s=!1),i=o*(a-Number(s))}return 0===i?0:i}function dl(t,e){Bo(2,arguments);var i=Wo(t),n=Wo(e);return i.getFullYear()-n.getFullYear()}function fl(t,e){Bo(1,arguments);var i=e||{},n=i.locale,r=n&&n.options&&n.options.weekStartsOn,o=null==r?0:Zo(r),a=null==i.weekStartsOn?o:Zo(i.weekStartsOn);if(!(a>=0&&a<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=Wo(t),l=s.getDay(),h=(l=1&&c<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var u=s.options&&s.options.weekStartsOn,d=null==u?0:Zo(u),f=null==a.weekStartsOn?d:Zo(a.weekStartsOn);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===o)return""===r?Wo(i):new Date(NaN);var g,p={firstWeekContainsDate:c,weekStartsOn:f,locale:s},m=[{priority:10,subPriority:-1,set:cs,index:0}],b=o.match(os).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,oa[e])(t,s.formatLong,p):t})).join("").match(rs),x=[];for(g=0;g0&&ls.test(r))return new Date(NaN);var D=m.map((function(t){return t.priority})).sort((function(t,e){return e-t})).filter((function(t,e,i){return i.indexOf(t)===e})).map((function(t){return m.filter((function(e){return e.priority===t})).sort((function(t,e){return e.subPriority-t.subPriority}))})).map((function(t){return t[0]})),S=Wo(i);if(isNaN(S))return new Date(NaN);var P=ta(S,aa(S)),z={};for(g=0;g=1&&l<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var h=o.options&&o.options.weekStartsOn,c=null==h?0:Zo(h),u=null==r.weekStartsOn?c:Zo(r.weekStartsOn);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!o.localize)throw new RangeError("locale must contain localize property");if(!o.formatLong)throw new RangeError("locale must contain formatLong property");var d=Wo(t);if(!Ds(d))throw new RangeError("Invalid time value");var f=aa(d),g=ta(d,f),p={firstWeekContainsDate:l,weekStartsOn:u,locale:o,_originalDate:d};return n.match(Vs).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,oa[e])(t,o.formatLong,p):t})).join("").match(Us).map((function(i){if("''"===i)return"'";var n=i[0];if("'"===n)return qs(i);var a=Ws[n];if(a)return!r.useAdditionalWeekYearTokens&&ca(i)&&ua(i,e,t),!r.useAdditionalDayOfYearTokens&&ha(i)&&ua(i,e,t),a(g,i,o.localize,p);if(n.match($s))throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`");return i})).join("")}(t,e,this.options)},add:function(t,e,i){switch(i){case"millisecond":return Jo(t,e);case"second":return function(t,e){Bo(2,arguments);var i=Zo(e);return Jo(t,1e3*i)}(t,e);case"minute":return function(t,e){Bo(2,arguments);var i=Zo(e);return Jo(t,6e4*i)}(t,e);case"hour":return function(t,e){Bo(2,arguments);var i=Zo(e);return Jo(t,i*Xs)}(t,e);case"day":return Qs(t,e);case"week":return function(t,e){Bo(2,arguments);var i=Zo(e);return Qs(t,7*i)}(t,e);case"month":return Gs(t,e);case"quarter":return function(t,e){Bo(2,arguments);var i=Zo(e);return Gs(t,3*i)}(t,e);case"year":return function(t,e){Bo(2,arguments);var i=Zo(e);return Gs(t,12*i)}(t,e);default:return t}},diff:function(t,e,i){switch(i){case"millisecond":return Ks(t,e);case"second":return function(t,e,i){Bo(2,arguments);var n=Ks(t,e)/1e3;return Js(null==i?void 0:i.roundingMethod)(n)}(t,e);case"minute":return function(t,e,i){Bo(2,arguments);var n=Ks(t,e)/6e4;return Js(null==i?void 0:i.roundingMethod)(n)}(t,e);case"hour":return function(t,e,i){Bo(2,arguments);var n=Ks(t,e)/tl;return Js(null==i?void 0:i.roundingMethod)(n)}(t,e);case"day":return ol(t,e);case"week":return function(t,e,i){Bo(2,arguments);var n=ol(t,e)/7;return Js(null==i?void 0:i.roundingMethod)(n)}(t,e);case"month":return ul(t,e);case"quarter":return function(t,e,i){Bo(2,arguments);var n=ul(t,e)/3;return Js(null==i?void 0:i.roundingMethod)(n)}(t,e);case"year":return function(t,e){Bo(2,arguments);var i=Wo(t),n=Wo(e),r=sl(i,n),o=Math.abs(dl(i,n));i.setFullYear(1584),n.setFullYear(1584);var a=sl(i,n)===-r,s=r*(o-Number(a));return 0===s?0:s}(t,e);default:return 0}},startOf:function(t,e,i){switch(e){case"second":return function(t){Bo(1,arguments);var e=Wo(t);return e.setMilliseconds(0),e}(t);case"minute":return function(t){Bo(1,arguments);var e=Wo(t);return e.setSeconds(0,0),e}(t);case"hour":return function(t){Bo(1,arguments);var e=Wo(t);return e.setMinutes(0,0,0),e}(t);case"day":return el(t);case"week":return fl(t);case"isoWeek":return fl(t,{weekStartsOn:+i});case"month":return function(t){Bo(1,arguments);var e=Wo(t);return e.setDate(1),e.setHours(0,0,0,0),e}(t);case"quarter":return function(t){Bo(1,arguments);var e=Wo(t),i=e.getMonth(),n=i-i%3;return e.setMonth(n,1),e.setHours(0,0,0,0),e}(t);case"year":return function(t){Bo(1,arguments);var e=Wo(t),i=new Date(0);return i.setFullYear(e.getFullYear(),0,1),i.setHours(0,0,0,0),i}(t);default:return t}},endOf:function(t,e){switch(e){case"second":return function(t){Bo(1,arguments);var e=Wo(t);return e.setMilliseconds(999),e}(t);case"minute":return function(t){Bo(1,arguments);var e=Wo(t);return e.setSeconds(59,999),e}(t);case"hour":return function(t){Bo(1,arguments);var e=Wo(t);return e.setMinutes(59,59,999),e}(t);case"day":return ll(t);case"week":return function(t,e){Bo(1,arguments);var i=e||{},n=i.locale,r=n&&n.options&&n.options.weekStartsOn,o=null==r?0:Zo(r),a=null==i.weekStartsOn?o:Zo(i.weekStartsOn);if(!(a>=0&&a<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=Wo(t),l=s.getDay(),h=6+(l{function jt(e){return Object.prototype.toString.call(e)==="[object Array]"}function os(e){return e instanceof Function}function Ln(e){return Object.prototype.toString.call(e)==="[object Object]"&&!os(e)&&e instanceof Object}function ss(e,t){for(var n in t)n!=="__proto__"&&(Ln(t[n])||jt(t[n])?(Ln(t[n])&&!Ln(e[n])&&(e[n]={}),jt(t[n])&&!jt(e[n])&&(e[n]=[]),ss(e[n],t[n])):t[n]!==void 0&&(e[n]=t[n]))}function $(e,t){var n={};return ss(n,e),ss(n,t),n}var sc=/^(\d\d\d\d)(?:-)?(\d\d)(?:-)?(\d\d)$/i;function rc(e){for(var t=0;t=6}function lc(e){return typeof e=="number"}var eo=["bytes","KB","MB","GB","TB","PB","EB"];function bt(e,t,n,i){e=e||"",n.prefix&&(t<0&&(t=t*-1,e+="-"),e+=n.prefix);var s=n.suffix||"",r=n.precision,o=n.round;if(n.byteScale){var a=t>=0;a||(t*=-1);var l=i?n.byteScale:t,c;l>=1152921504606847e3?(t/=1152921504606847e3,c=6):l>=0x4000000000000?(t/=0x4000000000000,c=5):l>=1099511627776?(t/=1099511627776,c=4):l>=1073741824?(t/=1073741824,c=3):l>=1048576?(t/=1048576,c=2):l>=1024?(t/=1024,c=1):c=0,r===void 0&&o===void 0&&(t>=1023.5&&c=1e3?4:3),s=" "+eo[c],a||(t*=-1)}if(r!==void 0&&o!==void 0)throw Error("Use either round or precision, not both");if(!i&&(r!==void 0&&(t=t.toPrecision(r),n.zeros||(t=parseFloat(t))),o!==void 0))if(o<0){var u=Math.pow(10,-1*o);t=parseInt((1*t/u).toFixed(0))*u}else t=t.toFixed(o),n.zeros||(t=parseFloat(t));if(n.thousands||n.decimal){t=Rt(t);var f=t.split(".");t=f[0],n.thousands&&(t=t.replace(/\B(?=(\d{3})+(?!\d))/g,n.thousands)),f.length>1&&(t+=(n.decimal||".")+f[1])}return e+t+s}function no(e,t,n){return n in t?t[n]:n in e.options?e.options[n]:null}var cs={maintainAspectRatio:!1,animation:!1,plugins:{legend:{},tooltip:{displayColors:!1,callbacks:{}},title:{font:{size:20},color:"#333"}},interaction:{}},lo={scales:{y:{ticks:{maxTicksLimit:4},title:{font:{size:16},color:"#333"},grid:{}},x:{grid:{drawOnChartArea:!1},title:{font:{size:16},color:"#333"},time:{},ticks:{}}}},co=["#3366CC","#DC3912","#FF9900","#109618","#990099","#3B3EAC","#0099C6","#DD4477","#66AA00","#B82E2E","#316395","#994499","#22AA99","#AAAA11","#6633CC","#E67300","#8B0707","#329262","#5574A6","#651067"];function us(e,t,n){t!==void 0?(e.plugins.legend.display=!!t,t&&t!==!0&&(e.plugins.legend.position=t)):n&&(e.plugins.legend.display=!1)}function fs(e,t){e.plugins.title.display=!0,e.plugins.title.text=t}function cc(e,t){t!==null&&(e.scales.y.min=wt(t))}function uc(e,t){e.scales.y.max=wt(t)}function fc(e,t){t!==null&&(e.scales.x.min=wt(t))}function dc(e,t){e.scales.x.max=wt(t)}function uo(e,t){e.scales.x.stacked=!!t,e.scales.y.stacked=!!t}function fo(e,t){e.scales.x.title.display=!0,e.scales.x.title.text=t}function ho(e,t){e.scales.y.title.display=!0,e.scales.y.title.text=t}function io(e,t){var n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return n?"rgba("+parseInt(n[1],16)+", "+parseInt(n[2],16)+", "+parseInt(n[3],16)+", "+t+")":e}function qt(e){return e!=null}function hc(e,t,n){var i=Math.ceil(e.element.offsetWidth/4/t.labels.length);i>25?i=25:i<10&&(i=10),n.scales.x.ticks.callback||(n.scales.x.ticks.callback=function(s){return s=Rt(this.getLabelForValue(s)),s.length>i?s.substring(0,i-2)+"...":s})}function pc(e){for(var t=1,n=gc(e);n>=1024;)t*=1024,n/=1024;return t}function Fn(e,t,n){var i={thousands:e.options.thousands,decimal:e.options.decimal},s=$({prefix:e.options.prefix,suffix:e.options.suffix,precision:e.options.precision,round:e.options.round,zeros:e.options.zeros},i);if(e.options.bytes){var r=e.data;n==="pie"&&(r=[{data:r}]),s.byteScale=pc(r)}if(n!=="pie"){var o=t.scales.y;n==="bar"&&(o=t.scales.x),s.byteScale&&(o.ticks.stepSize||(o.ticks.stepSize=s.byteScale/2),o.ticks.maxTicksLimit||(o.ticks.maxTicksLimit=4)),o.ticks.callback||(o.ticks.callback=function(l){return bt("",l,s,!0)}),(n==="scatter"||n==="bubble")&&!t.scales.x.ticks.callback&&(t.scales.x.ticks.callback=function(l){return bt("",l,i,!0)})}if(!t.plugins.tooltip.callbacks.label)if(n==="scatter")t.plugins.tooltip.callbacks.label=function(l){var c=l.dataset.label||"";c&&(c+=": ");var u=l.parsed;return c+"("+bt("",u.x,i)+", "+bt("",u.y,s)+")"};else if(n==="bubble")t.plugins.tooltip.callbacks.label=function(l){var c=l.dataset.label||"";c&&(c+=": ");var u=l.raw;return c+"("+bt("",u.x,i)+", "+bt("",u.y,s)+", "+bt("",u.v,i)+")"};else if(n==="pie")t.plugins.tooltip.callbacks.label=function(l){return bt("",l.parsed,s)};else{var a=n==="bar"?"x":"y";t.plugins.tooltip.callbacks.label=function(l){if(l.parsed[a]!==null){var c=l.dataset.label||"";return c&&(c+=": "),bt(c,l.parsed[a],s)}}}(n==="line"||n==="area")&&e.xtype==="number"&&(t.scales.x.ticks.callback||(t.scales.x.ticks.callback=function(l){return Rt(l)}),t.plugins.tooltip.callbacks.title||(t.plugins.tooltip.callbacks.title=function(l){return Rt(l[0].parsed.x)}))}function gc(e){for(var t=0,n=0;nt&&(t=r)}return t}function mc(e){for(var t=0,n=0;nt&&(t=r)}return t}var ds=Je($(cs,lo),us,fs,cc,uc,uo,fo,ho);function bc(e){for(var t=e.data,n={},i=[],s=[],r=[],o=0;o0){for(var v=(qt(x)?_t(x):s[0]).getTime(),k=(qt(y)?_t(y):s[0]).getTime(),S=1;Sk&&(k=D)}var C=(k-v)/(86400*1e3);if(!t.scales.x.time.unit){var T;if(w==="year"||C>365*10?(t.scales.x.time.unit="year",T=365):w==="month"||C>30*10?(t.scales.x.time.unit="month",T=30):w==="week"||w==="day"||C>10?(t.scales.x.time.unit="day",T=1):w==="hour"||C>.5?(t.scales.x.time.displayFormats={hour:"MMM d, h a"},t.scales.x.time.unit="hour",T=1/24):w==="minute"&&(t.scales.x.time.displayFormats={minute:"h:mm a"},t.scales.x.time.unit="minute",T=1/24/60),T&&C>0){var P=e.element.offsetWidth;if(P>0){var I=Math.ceil(C/T/(P/100));w==="week"&&T===1&&(I=Math.ceil(I/7)*7),t.scales.x.ticks.stepSize=I}}}t.scales.x.time.tooltipFormat||(w==="year"?t.scales.x.time.tooltipFormat="yyyy":w==="month"?t.scales.x.time.tooltipFormat="MMM yyyy":w==="week"||w==="day"?t.scales.x.time.tooltipFormat="PP":w==="hour"?t.scales.x.time.tooltipFormat="MMM d, h a":w==="minute"&&(t.scales.x.time.tooltipFormat="h:mm a"))}}return{labels:s,datasets:a}}var Mt=function(t){this.name="chartjs",this.library=t};Mt.prototype.renderLineChart=function(t,n){n||(n="line");var i={},s=ds(t,$(i,t.options));Fn(t,s,n);var r=hs(t,s,n);t.xtype==="number"?(s.scales.x.type=s.scales.x.type||"linear",s.scales.x.position=s.scales.x.position||"bottom"):s.scales.x.type=t.xtype==="string"?"category":"time",this.drawChart(t,"line",r,s)};Mt.prototype.renderPieChart=function(t){var n=$({},cs);t.options.donut&&(n.cutout="50%"),"legend"in t.options&&us(n,t.options.legend),t.options.title&&fs(n,t.options.title),n=$(n,t.options.library||{}),Fn(t,n,"pie");for(var i=[],s=[],r=0;r\u25CF '+bt(this.series.name+": ",this.y,i)+"
"})}var Ft=function(t){this.name="highcharts",this.library=t};Ft.prototype.renderLineChart=function(t,n){n=n||"spline";var i={};n==="areaspline"&&(i={plotOptions:{areaspline:{stacking:"normal"},area:{stacking:"normal"},series:{marker:{enabled:!1}}}}),t.options.curve===!1&&(n==="areaspline"?n="area":n==="spline"&&(n="line"));var s=ps(t,t.options,i);t.xtype==="number"?s.xAxis.type=s.xAxis.type||"linear":s.xAxis.type=t.xtype==="string"?"category":"datetime",s.chart.type||(s.chart.type=n),gs(t,s,n);for(var r=t.data,o=0;o0?new Error("No charting library found for "+e):new Error("No charting libraries found - be sure to include one before your charts")}var W={charts:{},configure:function(e){for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(W.config[t]=e[t])},setDefaultOptions:function(e){W.options=e},eachChart:function(e){for(var t in W.charts)Object.prototype.hasOwnProperty.call(W.charts,t)&&e(W.charts[t])},destroyAll:function(){for(var e in W.charts)Object.prototype.hasOwnProperty.call(W.charts,e)&&(W.charts[e].destroy(),delete W.charts[e])},config:{},options:{},adapters:ae,addAdapter:Ke,use:function(e){return Ke(e),W}};function Ec(e){for(var t=[],n=0;n0)return!1;return!0}function Nc(e){var t=e.options.download;t===!0?t={}:typeof t=="string"&&(t={filename:t});var n=document.createElement("a");n.download=t.filename||"chart.png",n.style.position="absolute",n.style.top="20px",n.style.right="20px",n.style.zIndex=1e3,n.style.lineHeight="20px",n.target="_blank";var i=document.createElement("img"),s='';i.src="data:image/svg+xml;utf8,"+encodeURIComponent(s),i.alt="Download",i.style.width="20px",i.style.height="20px",i.style.border="none",n.appendChild(i);var r=e.element;r.style.position="relative",e.__downloadAttached=!0,e.__enterEvent=r.addEventListener("mouseover",function(o){var a=o.relatedTarget;(!a||a!==this&&!this.contains(a))&&e.options.download&&(n.href=e.toImage(t),r.appendChild(n))}),e.__leaveEvent=r.addEventListener("mouseout",function(o){var a=o.relatedTarget;(!a||a!==this&&!this.contains(a))&&n.parentNode&&n.parentNode.removeChild(n)})}var wo=[],rs=0,zc=4;function Bc(e,t,n){wo.push([e,t,n]),xs()}function xs(){if(rsMath.max(Math.min(e,n),t);function en(e){return Xt(sn(e*2.55),0,255)}function $t(e){return Xt(sn(e*255),0,255)}function Wt(e){return Xt(sn(e/2.55)/100,0,1)}function Mo(e){return Xt(sn(e*100),0,100)}var ht={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},_s=[..."0123456789ABCDEF"],tu=e=>_s[e&15],eu=e=>_s[(e&240)>>4]+_s[e&15],Nn=e=>(e&240)>>4===(e&15),nu=e=>Nn(e.r)&&Nn(e.g)&&Nn(e.b)&&Nn(e.a);function iu(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&ht[e[1]]*17,g:255&ht[e[2]]*17,b:255&ht[e[3]]*17,a:t===5?ht[e[4]]*17:255}:(t===7||t===9)&&(n={r:ht[e[1]]<<4|ht[e[2]],g:ht[e[3]]<<4|ht[e[4]],b:ht[e[5]]<<4|ht[e[6]],a:t===9?ht[e[7]]<<4|ht[e[8]]:255})),n}var su=(e,t)=>e<255?t(e):"";function ru(e){var t=nu(e)?tu:eu;return e?"#"+t(e.r)+t(e.g)+t(e.b)+su(e.a,t):void 0}var ou=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Co(e,t,n){let i=t*Math.min(n,1-n),s=(r,o=(r+e/30)%12)=>n-i*Math.max(Math.min(o-3,9-o,1),-1);return[s(0),s(8),s(4)]}function au(e,t,n){let i=(s,r=(s+e/60)%6)=>n-n*t*Math.max(Math.min(r,4-r,1),0);return[i(5),i(3),i(1)]}function lu(e,t,n){let i=Co(e,1,.5),s;for(t+n>1&&(s=1/(t+n),t*=s,n*=s),s=0;s<3;s++)i[s]*=1-t-n,i[s]+=t;return i}function cu(e,t,n,i,s){return e===s?(t-n)/i+(t.5?u/(2-r-o):u/(r+o),l=cu(n,i,s,u,r),l=l*60+.5),[l|0,c||0,a]}function Ms(e,t,n,i){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,i)).map($t)}function ks(e,t,n){return Ms(Co,e,t,n)}function uu(e,t,n){return Ms(lu,e,t,n)}function fu(e,t,n){return Ms(au,e,t,n)}function Oo(e){return(e%360+360)%360}function du(e){let t=ou.exec(e),n=255,i;if(!t)return;t[5]!==i&&(n=t[6]?en(+t[5]):$t(+t[5]));let s=Oo(+t[2]),r=+t[3]/100,o=+t[4]/100;return t[1]==="hwb"?i=uu(s,r,o):t[1]==="hsv"?i=fu(s,r,o):i=ks(s,r,o),{r:i[0],g:i[1],b:i[2],a:n}}function hu(e,t){var n=ws(e);n[0]=Oo(n[0]+t),n=ks(n),e.r=n[0],e.g=n[1],e.b=n[2]}function pu(e){if(!e)return;let t=ws(e),n=t[0],i=Mo(t[1]),s=Mo(t[2]);return e.a<255?`hsla(${n}, ${i}%, ${s}%, ${Wt(e.a)})`:`hsl(${n}, ${i}%, ${s}%)`}var ko={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"},So={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 gu(){let e={},t=Object.keys(So),n=Object.keys(ko),i,s,r,o,a;for(i=0;i>16&255,r>>8&255,r&255]}return e}var zn;function mu(e){zn||(zn=gu(),zn.transparent=[0,0,0,0]);let t=zn[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}var bu=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function xu(e){let t=bu.exec(e),n=255,i,s,r;if(t){if(t[7]!==i){let o=+t[7];n=t[8]?en(o):Xt(o*255,0,255)}return i=+t[1],s=+t[3],r=+t[5],i=255&(t[2]?en(i):Xt(i,0,255)),s=255&(t[4]?en(s):Xt(s,0,255)),r=255&(t[6]?en(r):Xt(r,0,255)),{r:i,g:s,b:r,a:n}}}function yu(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${Wt(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}var vs=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,Se=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function vu(e,t,n){let i=Se(Wt(e.r)),s=Se(Wt(e.g)),r=Se(Wt(e.b));return{r:$t(vs(i+n*(Se(Wt(t.r))-i))),g:$t(vs(s+n*(Se(Wt(t.g))-s))),b:$t(vs(r+n*(Se(Wt(t.b))-r))),a:e.a+n*(t.a-e.a)}}function Bn(e,t,n){if(e){let i=ws(e);i[t]=Math.max(0,Math.min(i[t]+i[t]*n,t===0?360:1)),i=ks(i),e.r=i[0],e.g=i[1],e.b=i[2]}}function To(e,t){return e&&Object.assign(t||{},e)}function Do(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=$t(e[3]))):(t=To(e,{r:0,g:0,b:0,a:1}),t.a=$t(t.a)),t}function _u(e){return e.charAt(0)==="r"?xu(e):du(e)}var nn=class e{constructor(t){if(t instanceof e)return t;let n=typeof t,i;n==="object"?i=Do(t):n==="string"&&(i=iu(t)||mu(t)||_u(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=To(this._rgb);return t&&(t.a=Wt(t.a)),t}set rgb(t){this._rgb=Do(t)}rgbString(){return this._valid?yu(this._rgb):void 0}hexString(){return this._valid?ru(this._rgb):void 0}hslString(){return this._valid?pu(this._rgb):void 0}mix(t,n){if(t){let i=this.rgb,s=t.rgb,r,o=n===r?.5:n,a=2*o-1,l=i.a-s.a,c=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;r=1-c,i.r=255&c*i.r+r*s.r+.5,i.g=255&c*i.g+r*s.g+.5,i.b=255&c*i.b+r*s.b+.5,i.a=o*i.a+(1-o)*s.a,this.rgb=i}return this}interpolate(t,n){return t&&(this._rgb=vu(this._rgb,t._rgb,n)),this}clone(){return new e(this.rgb)}alpha(t){return this._rgb.a=$t(t),this}clearer(t){let n=this._rgb;return n.a*=1-t,this}greyscale(){let t=this._rgb,n=sn(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){let n=this._rgb;return n.a*=1+t,this}negate(){let t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Bn(this._rgb,2,t),this}darken(t){return Bn(this._rgb,2,-t),this}saturate(t){return Bn(this._rgb,1,t),this}desaturate(t){return Bn(this._rgb,1,-t),this}rotate(t){return hu(this._rgb,t),this}};function Dt(){}var Bo=(()=>{let e=0;return()=>e++})();function F(e){return e===null||typeof e>"u"}function U(e){if(Array.isArray&&Array.isArray(e))return!0;let t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function L(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function Q(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function ut(e,t){return Q(e)?e:t}function A(e,t){return typeof e>"u"?t:e}var Ho=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,Os=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function H(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function z(e,t,n,i){let s,r,o;if(U(e))if(r=e.length,i)for(s=r-1;s>=0;s--)t.call(n,e[s],s);else for(s=0;se,x:e=>e.x,y:e=>e.y};function ku(e){let t=e.split("."),n=[],i="";for(let s of t)i+=s,i.endsWith("\\")?i=i.slice(0,-1)+".":(n.push(i),i="");return n}function Su(e){let t=ku(e);return n=>{for(let i of t){if(i==="")break;n=n&&n[i]}return n}}function Bt(e,t){return(Po[t]||(Po[t]=Su(t)))(e)}function $n(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Pe=e=>typeof e<"u",Nt=e=>typeof e=="function",Ts=(e,t)=>{if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0};function Uo(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}var V=Math.PI,q=2*V,Du=q+V,qn=Number.POSITIVE_INFINITY,Cu=V/180,J=V/2,le=V/4,Ao=V*2/3,zt=Math.log10,xt=Math.sign;function Ae(e,t,n){return Math.abs(e-t)s-r).pop(),t}function fe(e){return!isNaN(parseFloat(e))&&isFinite(e)}function qo(e,t){let n=Math.round(e);return n-t<=e&&n+t>=e}function As(e,t,n){let i,s,r;for(i=0,s=e.length;il&&c=Math.min(t,n)-i&&e<=Math.max(t,n)+i}function Gn(e,t,n){n=n||(o=>e[o]1;)r=s+i>>1,n(r)?s=r:i=r;return{lo:s,hi:i}}var kt=(e,t,n,i)=>Gn(e,n,i?s=>{let r=e[s][t];return re[s][t]Gn(e,n,i=>e[i][t]>=n);function $o(e,t,n){let i=0,s=e.length;for(;ii&&e[s-1]>n;)s--;return i>0||s{let i="_onData"+$n(n),s=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...r){let o=s.apply(this,r);return e._chartjs.listeners.forEach(a=>{typeof a[i]=="function"&&a[i](...r)}),o}})})}function Es(e,t){let n=e._chartjs;if(!n)return;let i=n.listeners,s=i.indexOf(t);s!==-1&&i.splice(s,1),!(i.length>0)&&(Qo.forEach(r=>{delete e[r]}),delete e._chartjs)}function Rs(e){let t=new Set(e);return t.size===e.length?e:Array.from(t)}var Fs=function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame}();function Ws(e,t){let n=[],i=!1;return function(...s){n=s,i||(i=!0,Fs.call(window,()=>{i=!1,e.apply(t,n)}))}}function Ko(e,t){let n;return function(...i){return t?(clearTimeout(n),n=setTimeout(e,t,i)):e.apply(this,i),t}}var Kn=e=>e==="start"?"left":e==="end"?"right":"center",st=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,Zo=(e,t,n,i)=>e===(i?"left":"right")?n:e==="center"?(t+n)/2:t;function Ns(e,t,n){let i=t.length,s=0,r=i;if(e._sorted){let{iScale:o,_parsed:a}=e,l=o.axis,{min:c,max:u,minDefined:f,maxDefined:d}=o.getUserBounds();f&&(s=it(Math.min(kt(a,l,c).lo,n?i:kt(t,l,o.getPixelForValue(c)).lo),0,i-1)),d?r=it(Math.max(kt(a,o.axis,u,!0).hi+1,n?0:kt(t,l,o.getPixelForValue(u),!0).hi+1),s,i)-s:r=i-s}return{start:s,count:r}}function zs(e){let{xScale:t,yScale:n,_scaleRanges:i}=e,s={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!i)return e._scaleRanges=s,!0;let r=i.xmin!==t.min||i.xmax!==t.max||i.ymin!==n.min||i.ymax!==n.max;return Object.assign(i,s),r}var Hn=e=>e===0||e===1,Io=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*q/n)),Lo=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*q/n)+1,De={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*J)+1,easeOutSine:e=>Math.sin(e*J),easeInOutSine:e=>-.5*(Math.cos(V*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=>Hn(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=>Hn(e)?e:Io(e,.075,.3),easeOutElastic:e=>Hn(e)?e:Lo(e,.075,.3),easeInOutElastic(e){return Hn(e)?e:e<.5?.5*Io(e*2,.1125,.45):.5+.5*Lo(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-De.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?De.easeInBounce(e*2)*.5:De.easeOutBounce(e*2-1)*.5+.5};function Bs(e){if(e&&typeof e=="object"){let t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function Hs(e){return Bs(e)?e:new nn(e)}function Ss(e){return Bs(e)?e:new nn(e).saturate(.5).darken(.1).hexString()}var Tu=["x","y","borderWidth","radius","tension"],Pu=["color","borderColor","backgroundColor"];function Au(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:Pu},numbers:{type:"number",properties:Tu}}),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 Iu(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}var Eo=new Map;function Lu(e,t){t=t||{};let n=e+JSON.stringify(t),i=Eo.get(n);return i||(i=new Intl.NumberFormat(e,t),Eo.set(n,i)),i}function Le(e,t,n){return Lu(t,n).format(e)}var Jo={values(e){return U(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";let i=this.chart.options.locale,s,r=e;if(n.length>1){let c=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(c<1e-4||c>1e15)&&(s="scientific"),r=Eu(e,n)}let o=zt(Math.abs(r)),a=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:s,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),Le(e,i,l)},logarithmic(e,t,n){if(e===0)return"0";let i=n[t].significand||e/Math.pow(10,Math.floor(zt(e)));return[1,2,3,5,10,15].includes(i)||t>.8*n.length?Jo.numeric.call(this,e,t,n):""}};function Eu(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 ln={formatters:Jo};function Ru(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,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:ln.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"})}var Gt=Object.create(null),Zn=Object.create(null);function rn(e,t){if(!t)return e;let n=t.split(".");for(let i=0,s=n.length;ii.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=(i,s)=>Ss(s.backgroundColor),this.hoverBorderColor=(i,s)=>Ss(s.borderColor),this.hoverColor=(i,s)=>Ss(s.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 Ds(this,t,n)}get(t){return rn(this,t)}describe(t,n){return Ds(Zn,t,n)}override(t,n){return Ds(Gt,t,n)}route(t,n,i,s){let r=rn(this,t),o=rn(this,i),a="_"+n;Object.defineProperties(r,{[a]:{value:r[n],writable:!0},[n]:{enumerable:!0,get(){let l=this[a],c=o[s];return L(l)?Object.assign({},c,l):A(l,c)},set(l){this[a]=l}}})}apply(t){t.forEach(n=>n(this))}},G=new Cs({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Au,Iu,Ru]);function Fu(e){return!e||F(e.size)||F(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function on(e,t,n,i,s){let r=t[s];return r||(r=t[s]=e.measureText(s).width,n.push(s)),r>i&&(i=r),i}function ta(e,t,n,i){i=i||{};let s=i.data=i.data||{},r=i.garbageCollect=i.garbageCollect||[];i.font!==t&&(s=i.data={},r=i.garbageCollect=[],i.font=t),e.save(),e.font=t;let o=0,a=n.length,l,c,u,f,d;for(l=0;ln.length){for(l=0;l0&&e.stroke()}}function St(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.xt.top-n&&e.y0&&r.strokeColor!=="",l,c;for(e.save(),e.font=s.string,Wu(e,r),l=0;l+e||0;function ti(e,t){let n={},i=L(t),s=i?Object.keys(t):t,r=L(e)?i?o=>A(e[o],e[t[o]]):o=>e[o]:()=>e;for(let o of s)n[o]=Uu(r(o));return n}function Vs(e){return ti(e,{top:"y",right:"x",bottom:"y",left:"x"})}function Jt(e){return ti(e,["topLeft","topRight","bottomLeft","bottomRight"])}function rt(e){let t=Vs(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function nt(e,t){e=e||{},t=t||G.font;let n=A(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let i=A(e.style,t.style);i&&!(""+i).match(Hu)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);let s={family:A(e.family,t.family),lineHeight:Yu(A(e.lineHeight,t.lineHeight),n),size:n,style:i,weight:A(e.weight,t.weight),string:""};return s.string=Fu(s),s}function Re(e,t,n,i){let s=!0,r,o,a;for(r=0,o=e.length;rn&&a===0?0:a+l;return{min:o(i,-Math.abs(r)),max:o(s,r)}}function Ht(e,t){return Object.assign(Object.create(e),t)}function ei(e,t=[""],n,i,s=()=>e[0]){let r=n||e;typeof i>"u"&&(i=oa("_fallback",e));let o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:r,_fallback:i,_getTarget:s,override:a=>ei([a,...e],t,r,i)};return new Proxy(o,{deleteProperty(a,l){return delete a[l],delete a._keys,delete e[0][l],!0},get(a,l){return sa(a,l,()=>Ku(l,t,e,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(a,l){return Fo(a).includes(l)},ownKeys(a){return Fo(a)},set(a,l,c){let u=a._storage||(a._storage=s());return a[l]=u[l]=c,delete a._keys,!0}})}function ue(e,t,n,i){let s={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:qs(e,i),setContext:r=>ue(e,r,n,i),override:r=>ue(e.override(r),t,n,i)};return new Proxy(s,{deleteProperty(r,o){return delete r[o],delete e[o],!0},get(r,o,a){return sa(r,o,()=>qu(r,o,a))},getOwnPropertyDescriptor(r,o){return r._descriptors.allKeys?Reflect.has(e,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,o)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(r,o){return Reflect.has(e,o)},ownKeys(){return Reflect.ownKeys(e)},set(r,o,a){return e[o]=a,delete r[o],!0}})}function qs(e,t={scriptable:!0,indexable:!0}){let{_scriptable:n=t.scriptable,_indexable:i=t.indexable,_allKeys:s=t.allKeys}=e;return{allKeys:s,scriptable:n,indexable:i,isScriptable:Nt(n)?n:()=>n,isIndexable:Nt(i)?i:()=>i}}var Vu=(e,t)=>e?e+$n(t):t,js=(e,t)=>L(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function sa(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t==="constructor")return e[t];let i=n();return e[t]=i,i}function qu(e,t,n){let{_proxy:i,_context:s,_subProxy:r,_descriptors:o}=e,a=i[t];return Nt(a)&&o.isScriptable(t)&&(a=ju(t,a,e,n)),U(a)&&a.length&&(a=Xu(t,a,e,o.isIndexable)),js(t,a)&&(a=ue(a,s,r&&r[t],o)),a}function ju(e,t,n,i){let{_proxy:s,_context:r,_subProxy:o,_stack:a}=n;if(a.has(e))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+e);a.add(e);let l=t(r,o||i);return a.delete(e),js(e,l)&&(l=Xs(s._scopes,s,e,l)),l}function Xu(e,t,n,i){let{_proxy:s,_context:r,_subProxy:o,_descriptors:a}=n;if(typeof r.index<"u"&&i(e))return t[r.index%t.length];if(L(t[0])){let l=t,c=s._scopes.filter(u=>u!==l);t=[];for(let u of l){let f=Xs(c,s,e,u);t.push(ue(f,r,o&&o[e],a))}}return t}function ra(e,t,n){return Nt(e)?e(t,n):e}var $u=(e,t)=>e===!0?t:typeof e=="string"?Bt(t,e):void 0;function Qu(e,t,n,i,s){for(let r of t){let o=$u(n,r);if(o){e.add(o);let a=ra(o._fallback,n,s);if(typeof a<"u"&&a!==n&&a!==i)return a}else if(o===!1&&typeof i<"u"&&n!==i)return null}return!1}function Xs(e,t,n,i){let s=t._rootScopes,r=ra(t._fallback,n,i),o=[...e,...s],a=new Set;a.add(i);let l=Ro(a,o,n,r||n,i);return l===null||typeof r<"u"&&r!==n&&(l=Ro(a,o,r,l,i),l===null)?!1:ei(Array.from(a),[""],s,r,()=>Gu(t,n,i))}function Ro(e,t,n,i,s){for(;n;)n=Qu(e,t,n,i,s);return n}function Gu(e,t,n){let i=e._getTarget();t in i||(i[t]={});let s=i[t];return U(s)&&L(n)?n:s||{}}function Ku(e,t,n,i){let s;for(let r of t)if(s=oa(Vu(r,e),n),typeof s<"u")return js(e,s)?Xs(n,i,e,s):s}function oa(e,t){for(let n of t){if(!n)continue;let i=n[e];if(typeof i<"u")return i}}function Fo(e){let t=e._keys;return t||(t=e._keys=Zu(e._scopes)),t}function Zu(e){let t=new Set;for(let n of e)for(let i of Object.keys(n).filter(s=>!s.startsWith("_")))t.add(i);return Array.from(t)}function $s(e,t,n,i){let{iScale:s}=e,{key:r="r"}=this._parsing,o=new Array(i),a,l,c,u;for(a=0,l=i;ate==="x"?"y":"x";function tf(e,t,n,i){let s=e.skip?t:e,r=t,o=n.skip?t:n,a=jn(r,s),l=jn(o,r),c=a/(a+l),u=l/(a+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;let f=i*c,d=i*u;return{previous:{x:r.x-f*(o.x-s.x),y:r.y-f*(o.y-s.y)},next:{x:r.x+d*(o.x-s.x),y:r.y+d*(o.y-s.y)}}}function ef(e,t,n){let i=e.length,s,r,o,a,l,c=Oe(e,0);for(let u=0;u!c.skip)),t.cubicInterpolationMode==="monotone")sf(e,s);else{let c=i?e[e.length-1]:e[0];for(r=0,o=e.length;re.ownerDocument.defaultView.getComputedStyle(e,null);function of(e,t){return si(e).getPropertyValue(t)}var af=["top","right","bottom","left"];function ce(e,t,n){let i={};n=n?"-"+n:"";for(let s=0;s<4;s++){let r=af[s];i[r]=parseFloat(e[t+"-"+r+n])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}var lf=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function cf(e,t){let n=e.touches,i=n&&n.length?n[0]:e,{offsetX:s,offsetY:r}=i,o=!1,a,l;if(lf(s,r,e.target))a=s,l=r;else{let c=t.getBoundingClientRect();a=i.clientX-c.left,l=i.clientY-c.top,o=!0}return{x:a,y:l,box:o}}function te(e,t){if("native"in e)return e;let{canvas:n,currentDevicePixelRatio:i}=t,s=si(n),r=s.boxSizing==="border-box",o=ce(s,"padding"),a=ce(s,"border","width"),{x:l,y:c,box:u}=cf(e,n),f=o.left+(u&&a.left),d=o.top+(u&&a.top),{width:h,height:p}=t;return r&&(h-=o.width+a.width,p-=o.height+a.height),{x:Math.round((l-f)/h*n.width/i),y:Math.round((c-d)/p*n.height/i)}}function uf(e,t,n){let i,s;if(t===void 0||n===void 0){let r=e&&ii(e);if(!r)t=e.clientWidth,n=e.clientHeight;else{let o=r.getBoundingClientRect(),a=si(r),l=ce(a,"border","width"),c=ce(a,"padding");t=o.width-c.width-l.width,n=o.height-c.height-l.height,i=Xn(a.maxWidth,r,"clientWidth"),s=Xn(a.maxHeight,r,"clientHeight")}}return{width:t,height:n,maxWidth:i||qn,maxHeight:s||qn}}var Un=e=>Math.round(e*10)/10;function ca(e,t,n,i){let s=si(e),r=ce(s,"margin"),o=Xn(s.maxWidth,e,"clientWidth")||qn,a=Xn(s.maxHeight,e,"clientHeight")||qn,l=uf(e,t,n),{width:c,height:u}=l;if(s.boxSizing==="content-box"){let d=ce(s,"border","width"),h=ce(s,"padding");c-=h.width+d.width,u-=h.height+d.height}return c=Math.max(0,c-r.width),u=Math.max(0,i?c/i:u-r.height),c=Un(Math.min(c,o,l.maxWidth)),u=Un(Math.min(u,a,l.maxHeight)),c&&!u&&(u=Un(c/2)),(t!==void 0||n!==void 0)&&i&&l.height&&u>l.height&&(u=l.height,c=Un(Math.floor(u*i))),{width:c,height:u}}function Qs(e,t,n){let i=t||1,s=Math.floor(e.height*i),r=Math.floor(e.width*i);e.height=Math.floor(e.height),e.width=Math.floor(e.width);let o=e.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height=`${e.height}px`,o.style.width=`${e.width}px`),e.currentDevicePixelRatio!==i||o.height!==s||o.width!==r?(e.currentDevicePixelRatio=i,o.height=s,o.width=r,e.ctx.setTransform(i,0,0,i,0,0),!0):!1}var ua=function(){let e=!1;try{let t={get passive(){return e=!0,!1}};ni()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return e}();function Gs(e,t){let n=of(e,t),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function Qt(e,t,n,i){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function fa(e,t,n,i){return{x:e.x+n*(t.x-e.x),y:i==="middle"?n<.5?e.y:t.y:i==="after"?n<1?e.y:t.y:n>0?t.y:e.y}}function da(e,t,n,i){let s={x:e.cp2x,y:e.cp2y},r={x:t.cp1x,y:t.cp1y},o=Qt(e,s,n),a=Qt(s,r,n),l=Qt(r,t,n),c=Qt(o,a,n),u=Qt(a,l,n);return Qt(c,u,n)}var ff=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,i){return n-i},leftForLtr(n,i){return n-i}}},df=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function de(e,t,n){return e?ff(t,n):df()}function Ks(e,t){let n,i;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,i=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=i)}function Zs(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function ha(e){return e==="angle"?{between:Ie,compare:Ou,normalize:ct}:{between:Ct,compare:(t,n)=>t-n,normalize:t=>t}}function Wo({start:e,end:t,count:n,loop:i,style:s}){return{start:e%n,end:t%n,loop:i&&(t-e+1)%n===0,style:s}}function hf(e,t,n){let{property:i,start:s,end:r}=n,{between:o,normalize:a}=ha(i),l=t.length,{start:c,end:u,loop:f}=e,d,h;if(f){for(c+=l,u+=l,d=0,h=l;dl(s,y,b)&&a(s,y)!==0,v=()=>a(r,b)===0||l(r,y,b),k=()=>g||w(),S=()=>!g||v();for(let D=u,C=u;D<=f;++D)x=t[D%o],!x.skip&&(b=c(x[i]),b!==y&&(g=l(b,s,r),m===null&&k()&&(m=a(b,s)===0?D:C),m!==null&&S()&&(p.push(Wo({start:m,end:D,loop:d,count:o,style:h})),m=null),C=D,y=b));return m!==null&&p.push(Wo({start:m,end:f,loop:d,count:o,style:h})),p}function tr(e,t){let n=[],i=e.segments;for(let s=0;ss&&e[r%t].skip;)r--;return r%=t,{start:s,end:r}}function gf(e,t,n,i){let s=e.length,r=[],o=t,a=e[t],l;for(l=t+1;l<=n;++l){let c=e[l%s];c.skip||c.stop?a.skip||(i=!1,r.push({start:t%s,end:(l-1)%s,loop:i}),t=o=c.stop?l:null):(o=l,a.skip&&(t=l)),a=c}return o!==null&&r.push({start:t%s,end:o%s,loop:i}),r}function pa(e,t){let n=e.points,i=e.options.spanGaps,s=n.length;if(!s)return[];let r=!!e._loop,{start:o,end:a}=pf(n,s,r,i);if(i===!0)return No(e,[{start:o,end:a,loop:r}],n,t);let l=aa({chart:t,initial:n.initial,numSteps:o,currentStep:Math.min(i-n.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=Fs.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((i,s)=>{if(!i.running||!i.items.length)return;let r=i.items,o=r.length-1,a=!1,l;for(;o>=0;--o)l=r[o],l._active?(l._total>i.duration&&(i.duration=l._total),l.tick(t),a=!0):(r[o]=r[r.length-1],r.pop());a&&(s.draw(),this._notify(s,i,t,"progress")),r.length||(i.running=!1,this._notify(s,i,t,"complete"),i.initial=!1),n+=r.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){let n=this._charts,i=n.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,i)),i}listen(t,n,i){this._getAnims(t).listeners[n].push(i)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){let n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((i,s)=>Math.max(i,s._duration),0),this._refresh())}running(t){if(!this._running)return!1;let n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){let n=this._charts.get(t);if(!n||!n.items.length)return;let i=n.items,s=i.length-1;for(;s>=0;--s)i[s].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}},Yt=new ur,ga="transparent",xf={boolean(e,t,n){return n>.5?t:e},color(e,t,n){let i=Hs(e||ga),s=i.valid&&Hs(t||ga);return s&&s.valid?s.mix(i,n).hexString():t},number(e,t,n){return e+(t-e)*n}},fr=class{constructor(t,n,i,s){let r=n[i];s=Re([t.to,s,r,t.from]);let o=Re([t.from,r,s]);this._active=!0,this._fn=t.fn||xf[t.type||typeof o],this._easing=De[t.easing]||De.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=i,this._from=o,this._to=s,this._promises=void 0}active(){return this._active}update(t,n,i){if(this._active){this._notify(!1);let s=this._target[this._prop],r=i-this._start,o=this._duration-r;this._start=i,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=r,this._loop=!!t.loop,this._to=Re([t.to,n,s,t.from]),this._from=Re([t.from,s,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){let n=t-this._start,i=this._duration,s=this._prop,r=this._from,o=this._loop,a=this._to,l;if(this._active=r!==a&&(o||n1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[s]=this._fn(r,a,l)}wait(){let t=this._promises||(this._promises=[]);return new Promise((n,i)=>{t.push({res:n,rej:i})})}_notify(t){let n=t?"res":"rej",i=this._promises||[];for(let s=0;s{let r=t[s];if(!L(r))return;let o={};for(let a of n)o[a]=r[a];(U(r.properties)&&r.properties||[s]).forEach(a=>{(a===s||!i.has(a))&&i.set(a,o)})})}_animateOptions(t,n){let i=n.options,s=vf(t,i);if(!s)return[];let r=this._createAnimations(s,i);return i.$shared&&yf(t.options.$animations,i).then(()=>{t.options=i},()=>{}),r}_createAnimations(t,n){let i=this._properties,s=[],r=t.$animations||(t.$animations={}),o=Object.keys(n),a=Date.now(),l;for(l=o.length-1;l>=0;--l){let c=o[l];if(c.charAt(0)==="$")continue;if(c==="options"){s.push(...this._animateOptions(t,n));continue}let u=n[c],f=r[c],d=i.get(c);if(f)if(d&&f.active()){f.update(d,u,a);continue}else f.cancel();if(!d||!d.duration){t[c]=u;continue}r[c]=f=new fr(d,t,c,u),s.push(f)}return s}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}let i=this._createAnimations(t,n);if(i.length)return Yt.add(this._chart,i),!0}};function yf(e,t){let n=[],i=Object.keys(t);for(let s=0;s0||!n&&r<0)return s.index}return null}function va(e,t){let{chart:n,_cachedMeta:i}=e,s=n._stacks||(n._stacks={}),{iScale:r,vScale:o,index:a}=i,l=r.axis,c=o.axis,u=kf(r,o,i),f=t.length,d;for(let h=0;hn[i].axis===t).shift()}function Cf(e,t){return Ht(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function Of(e,t,n){return Ht(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function fn(e,t){let n=e.controller.index,i=e.vScale&&e.vScale.axis;if(i){t=t||e._parsed;for(let s of t){let r=s._stacks;if(!r||r[i]===void 0||r[i][n]===void 0)return;delete r[i][n],r[i]._visualValues!==void 0&&r[i]._visualValues[n]!==void 0&&delete r[i]._visualValues[n]}}}var nr=e=>e==="reset"||e==="none",_a=(e,t)=>t?e:Object.assign({},e),Tf=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:gl(n,!0),values:null},Pt=class{static defaults={};static datasetElementType=null;static dataElementType=null;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(){let t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=xa(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&&fn(this._cachedMeta),this.index=t}linkScales(){let t=this.chart,n=this._cachedMeta,i=this.getDataset(),s=(f,d,h,p)=>f==="x"?d:f==="r"?p:h,r=n.xAxisID=A(i.xAxisID,er(t,"x")),o=n.yAxisID=A(i.yAxisID,er(t,"y")),a=n.rAxisID=A(i.rAxisID,er(t,"r")),l=n.indexAxis,c=n.iAxisID=s(l,r,o,a),u=n.vAxisID=s(l,o,r,a);n.xScale=this.getScaleForId(r),n.yScale=this.getScaleForId(o),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){let n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){let t=this._cachedMeta;this._data&&Es(this._data,this),t._stacked&&fn(t)}_dataCheck(){let t=this.getDataset(),n=t.data||(t.data=[]),i=this._data;if(L(n)){let s=this._cachedMeta;this._data=Mf(n,s)}else if(i!==n){if(i){Es(i,this);let s=this._cachedMeta;fn(s),s._parsed=[]}n&&Object.isExtensible(n)&&Go(n,this),this._syncList=[],this._data=n}}addElements(){let t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){let n=this._cachedMeta,i=this.getDataset(),s=!1;this._dataCheck();let r=n._stacked;n._stacked=xa(n.vScale,n),n.stack!==i.stack&&(s=!0,fn(n),n.stack=i.stack),this._resyncElements(t),(s||r!==n._stacked)&&va(this,n._parsed)}configure(){let t=this.chart.config,n=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){let{_cachedMeta:i,_data:s}=this,{iScale:r,_stacked:o}=i,a=r.axis,l=t===0&&n===s.length?!0:i._sorted,c=t>0&&i._parsed[t-1],u,f,d;if(this._parsing===!1)i._parsed=s,i._sorted=!0,d=s;else{U(s[t])?d=this.parseArrayData(i,s,t,n):L(s[t])?d=this.parseObjectData(i,s,t,n):d=this.parsePrimitiveData(i,s,t,n);let h=()=>f[a]===null||c&&f[a]g||f=0;--d)if(!p()){this.updateRangeFromParsed(c,t,h,l);break}}return c}getAllParsedValues(t){let n=this._cachedMeta._parsed,i=[],s,r,o;for(s=0,r=n.length;s=0&&tthis.getContext(i,s,n),g=c.resolveNamedOptions(d,h,p,f);return g.$shared&&(g.$shared=l,r[o]=Object.freeze(_a(g,l))),g}_resolveAnimations(t,n,i){let s=this.chart,r=this._cachedDataOpts,o=`animation-${n}`,a=r[o];if(a)return a;let l;if(s.options.animation!==!1){let u=this.chart.config,f=u.datasetAnimationScopeKeys(this._type,n),d=u.getOptionScopes(this.getDataset(),f);l=u.createResolver(d,this.getContext(t,i,n))}let c=new pi(s,l&&l.animations);return l&&l._cacheable&&(r[o]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||nr(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){let i=this.resolveDataElementOptions(t,n),s=this._sharedOptions,r=this.getSharedOptions(i),o=this.includeOptions(n,r)||r!==s;return this.updateSharedOptions(r,n,i),{sharedOptions:r,includeOptions:o}}updateElement(t,n,i,s){nr(s)?Object.assign(t,i):this._resolveAnimations(n,s).update(t,i)}updateSharedOptions(t,n,i){t&&!nr(n)&&this._resolveAnimations(void 0,n).update(t,i)}_setStyle(t,n,i,s){t.active=s;let r=this.getStyle(n,s);this._resolveAnimations(n,i,s).update(t,{options:!s&&this.getSharedOptions(r)||r})}removeHoverStyle(t,n,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,n,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){let n=this._data,i=this._cachedMeta.data;for(let[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];let s=i.length,r=n.length,o=Math.min(r,s);o&&this.parse(0,o),r>s?this._insertElements(s,r-s,t):r{for(c.length+=n,a=c.length-1;a>=o;a--)c[a]=c[a-n]};for(l(r),a=t;as-r))}return e._cache.$bar}function Af(e){let t=e.iScale,n=Pf(t,e.type),i=t._length,s,r,o,a,l=()=>{o===32767||o===-32768||(Pe(a)&&(i=Math.min(i,Math.abs(o-a)||i)),a=o)};for(s=0,r=n.length;s0?s[e-1]:null,a=eMath.abs(a)&&(l=a,c=o),t[n.axis]=c,t._custom={barStart:l,barEnd:c,start:s,end:r,min:o,max:a}}function ml(e,t,n,i){return U(e)?Ef(e,t,n,i):t[n.axis]=n.parse(e,i),t}function wa(e,t,n,i){let s=e.iScale,r=e.vScale,o=s.getLabels(),a=s===r,l=[],c,u,f,d;for(c=n,u=n+i;c=n?1:-1)}function Ff(e){let t,n,i,s,r;return e.horizontal?(t=e.base>e.x,n="left",i="right"):(t=e.baseu.controller.options.grouped),r=i.options.stacked,o=[],a=this._cachedMeta.controller.getParsed(n),l=a&&a[i.axis],c=u=>{let f=u._parsed.find(h=>h[i.axis]===l),d=f&&f[u.vScale.axis];if(F(d)||isNaN(d))return!0};for(let u of s)if(!(n!==void 0&&c(u))&&((r===!1||o.indexOf(u.stack)===-1||r===void 0&&u.stack===void 0)&&o.push(u.stack),u.index===t))break;return o.length||o.push(void 0),o}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,n,i){let s=this._getStacks(t,i),r=n!==void 0?s.indexOf(n):-1;return r===-1?s.length-1:r}_getRuler(){let t=this.options,n=this._cachedMeta,i=n.iScale,s=[],r,o;for(r=0,o=n.data.length;r=0;--i)n=Math.max(n,t[i].size(this.resolveDataElementOptions(i))/2);return n>0&&n}getLabelAndValue(t){let n=this._cachedMeta,i=this.chart.data.labels||[],{xScale:s,yScale:r}=n,o=this.getParsed(t),a=s.getLabelForValue(o.x),l=r.getLabelForValue(o.y),c=o._custom;return{label:i[t]||"",value:"("+a+", "+l+(c?", "+c:"")+")"}}update(t){let n=this._cachedMeta.data;this.updateElements(n,0,n.length,t)}updateElements(t,n,i,s){let r=s==="reset",{iScale:o,vScale:a}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(n,s),u=o.axis,f=a.axis;for(let d=n;dIe(y,a,l,!0)?1:Math.max(w,w*n,v,v*n),p=(y,w,v)=>Ie(y,a,l,!0)?-1:Math.min(w,w*n,v,v*n),g=h(0,c,f),m=h(J,u,d),b=p(V,c,f),x=p(V+J,u,d);i=(g-b)/2,s=(m-x)/2,r=-(g+b)/2,o=-(m+x)/2}return{ratioX:i,ratioY:s,offsetX:r,offsetY:o}}var xn=class extends Pt{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){let n=t.data;if(n.labels.length&&n.datasets.length){let{labels:{pointStyle:i,color:s}}=t.legend.options;return n.labels.map((r,o)=>{let l=t.getDatasetMeta(0).controller.getStyle(o);return{text:r,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:s,lineWidth:l.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(o),index:o}})}return[]}},onClick(t,n,i){i.chart.toggleDataVisibility(n.index),i.chart.update()}}}};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){let i=this.getDataset().data,s=this._cachedMeta;if(this._parsing===!1)s._parsed=i;else{let r=l=>+i[l];if(L(i[t])){let{key:l="value"}=this._parsing;r=c=>+Bt(i[c],l)}let o,a;for(o=t,a=t+n;o0&&!isNaN(t)?q*(Math.abs(t)/n):0}getLabelAndValue(t){let n=this._cachedMeta,i=this.chart,s=i.data.labels||[],r=Le(n._parsed[t],i.options.locale);return{label:s[t]||"",value:r}}getMaxBorderWidth(t){let n=0,i=this.chart,s,r,o,a,l;if(!t){for(s=0,r=i.data.datasets.length;s0&&this.getParsed(n-1);for(let v=0;v=x){S.skip=!0;continue}let D=this.getParsed(v),C=F(D[h]),T=S[d]=o.getPixelForValue(D[d],v),P=S[h]=r||C?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,D,l):D[h],v);S.skip=isNaN(T)||isNaN(P)||C,S.stop=v>0&&Math.abs(D[d]-w[d])>m,g&&(S.parsed=D,S.raw=c.data[v]),f&&(S.options=u||this.resolveDataElementOptions(v,k.active?"active":s)),b||this.updateElement(k,v,S,s),w=D}}getMaxOverflow(){let t=this._cachedMeta,n=t.dataset,i=n.options&&n.options.borderWidth||0,s=t.data||[];if(!s.length)return i;let r=s[0].size(this.resolveDataElementOptions(0)),o=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,r,o)/2}draw(){let t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}},gi=class extends Pt{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){let n=t.data;if(n.labels.length&&n.datasets.length){let{labels:{pointStyle:i,color:s}}=t.legend.options;return n.labels.map((r,o)=>{let l=t.getDatasetMeta(0).controller.getStyle(o);return{text:r,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:s,lineWidth:l.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(o),index:o}})}return[]}},onClick(t,n,i){i.chart.toggleDataVisibility(n.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(t,n){super(t,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){let n=this._cachedMeta,i=this.chart,s=i.data.labels||[],r=Le(n._parsed[t].r,i.options.locale);return{label:s[t]||"",value:r}}parseObjectData(t,n,i,s){return $s.bind(this)(t,n,i,s)}update(t){let n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,t)}getMinMax(){let t=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((i,s)=>{let r=this.getParsed(s).r;!isNaN(r)&&this.chart.getDataVisibility(s)&&(rn.max&&(n.max=r))}),n}_updateRadius(){let t=this.chart,n=t.chartArea,i=t.options,s=Math.min(n.right-n.left,n.bottom-n.top),r=Math.max(s/2,0),o=Math.max(i.cutoutPercentage?r/100*i.cutoutPercentage:1,0),a=(r-o)/t.getVisibleDatasetCount();this.outerRadius=r-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(t,n,i,s){let r=s==="reset",o=this.chart,l=o.options.animation,c=this._cachedMeta.rScale,u=c.xCenter,f=c.yCenter,d=c.getIndexAngle(0)-.5*V,h=d,p,g=360/this.countVisibleElements();for(p=0;p{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&n++}),n}_computeAngle(t,n,i){return this.chart.getDataVisibility(t)?pt(this.resolveDataElementOptions(t,n).angle||i):0}},gr=class extends xn{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}},mr=class extends Pt{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};getLabelAndValue(t){let n=this._cachedMeta.vScale,i=this.getParsed(t);return{label:n.getLabels()[t],value:""+n.getLabelForValue(i[n.axis])}}parseObjectData(t,n,i,s){return $s.bind(this)(t,n,i,s)}update(t){let n=this._cachedMeta,i=n.dataset,s=n.data||[],r=n.iScale.getLabels();if(i.points=s,t!=="resize"){let o=this.resolveDatasetElementOptions(t);this.options.showLine||(o.borderWidth=0);let a={_loop:!0,_fullLoop:r.length===s.length,options:o};this.updateElement(i,void 0,a,t)}this.updateElements(s,0,s.length,t)}updateElements(t,n,i,s){let r=this._cachedMeta.rScale,o=s==="reset";for(let a=n;a0&&this.getParsed(n-1);for(let w=n;w0&&Math.abs(k[h]-y[h])>b,m&&(S.parsed=k,S.raw=c.data[w]),d&&(S.options=f||this.resolveDataElementOptions(w,v.active?"active":s)),x||this.updateElement(v,w,S,s),y=k}this.updateSharedOptions(f,s,u)}getMaxOverflow(){let 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}let i=t.dataset,s=i.options&&i.options.borderWidth||0;if(!n.length)return s;let r=n[0].size(this.resolveDataElementOptions(0)),o=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(s,r,o)/2}},Hf=Object.freeze({__proto__:null,BarController:dr,BubbleController:hr,DoughnutController:xn,LineController:pr,PieController:gr,PolarAreaController:gi,RadarController:mr,ScatterController:br});function he(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}var xr=class e{static override(t){Object.assign(e.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return he()}parse(){return he()}format(){return he()}add(){return he()}diff(){return he()}startOf(){return he()}endOf(){return he()}},Nr={_date:xr};function Yf(e,t,n,i){let{controller:s,data:r,_sorted:o}=e,a=s._cachedMeta.iScale;if(a&&t===a.axis&&t!=="r"&&o&&r.length){let l=a._reversePixels?Xo:kt;if(i){if(s._sharedOptions){let c=r[0],u=typeof c.getRange=="function"&&c.getRange(t);if(u){let f=l(r,t,n-u),d=l(r,t,n+u);return{lo:f.lo,hi:d.hi}}}}else return l(r,t,n)}return{lo:0,hi:r.length-1}}function Mn(e,t,n,i,s){let r=e.getSortedVisibleDatasetMetas(),o=n[t];for(let a=0,l=r.length;a{l[o]&&l[o](t[n],s)&&(r.push({element:l,datasetIndex:c,index:u}),a=a||l.inRange(t.x,t.y,s))}),i&&!a?[]:r}var jf={evaluateInteractionItems:Mn,modes:{index(e,t,n,i){let s=te(t,e),r=n.axis||"x",o=n.includeInvisible||!1,a=n.intersect?sr(e,s,r,i,o):rr(e,s,r,!1,i,o),l=[];return a.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{let u=a[0].index,f=c.data[u];f&&!f.skip&&l.push({element:f,datasetIndex:c.index,index:u})}),l):[]},dataset(e,t,n,i){let s=te(t,e),r=n.axis||"xy",o=n.includeInvisible||!1,a=n.intersect?sr(e,s,r,i,o):rr(e,s,r,!1,i,o);if(a.length>0){let l=a[0].datasetIndex,c=e.getDatasetMeta(l).data;a=[];for(let u=0;un.pos===t)}function Da(e,t){return e.filter(n=>bl.indexOf(n.pos)===-1&&n.box.axis===t)}function hn(e,t){return e.sort((n,i)=>{let s=t?i:n,r=t?n:i;return s.weight===r.weight?s.index-r.index:s.weight-r.weight})}function Xf(e){let t=[],n,i,s,r,o,a;for(n=0,i=(e||[]).length;nc.box.fullSize),!0),i=hn(dn(t,"left"),!0),s=hn(dn(t,"right")),r=hn(dn(t,"top"),!0),o=hn(dn(t,"bottom")),a=Da(t,"x"),l=Da(t,"y");return{fullSize:n,leftAndTop:i.concat(r),rightAndBottom:s.concat(l).concat(o).concat(a),chartArea:dn(t,"chartArea"),vertical:i.concat(s).concat(l),horizontal:r.concat(o).concat(a)}}function Ca(e,t,n,i){return Math.max(e[n],t[n])+Math.max(e[i],t[i])}function xl(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 Kf(e,t,n,i){let{pos:s,box:r}=n,o=e.maxPadding;if(!L(s)){n.size&&(e[s]-=n.size);let f=i[n.stack]||{size:0,count:1};f.size=Math.max(f.size,n.horizontal?r.height:r.width),n.size=f.size/f.count,e[s]+=n.size}r.getPadding&&xl(o,r.getPadding());let a=Math.max(0,t.outerWidth-Ca(o,e,"left","right")),l=Math.max(0,t.outerHeight-Ca(o,e,"top","bottom")),c=a!==e.w,u=l!==e.h;return e.w=a,e.h=l,n.horizontal?{same:c,other:u}:{same:u,other:c}}function Zf(e){let t=e.maxPadding;function n(i){let s=Math.max(t[i]-e[i],0);return e[i]+=s,s}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function Jf(e,t){let n=t.maxPadding;function i(s){let r={left:0,top:0,right:0,bottom:0};return s.forEach(o=>{r[o]=Math.max(t[o],n[o])}),r}return i(e?["left","right"]:["top","bottom"])}function mn(e,t,n,i){let s=[],r,o,a,l,c,u;for(r=0,o=e.length,c=0;r{typeof g.beforeLayout=="function"&&g.beforeLayout()});let u=l.reduce((g,m)=>m.box.options&&m.box.options.display===!1?g:g+1,0)||1,f=Object.freeze({outerWidth:t,outerHeight:n,padding:s,availableWidth:r,availableHeight:o,vBoxMaxWidth:r/2/u,hBoxMaxHeight:o/2}),d=Object.assign({},s);xl(d,rt(i));let h=Object.assign({maxPadding:d,w:r,h:o,x:s.left,y:s.top},s),p=Qf(l.concat(c),f);mn(a.fullSize,h,f,p),mn(l,h,f,p),mn(c,h,f,p)&&mn(l,h,f,p),Zf(h),Oa(a.leftAndTop,h,f,p),h.x+=h.w,h.y+=h.h,Oa(a.rightAndBottom,h,f,p),e.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h,height:h.h,width:h.w},z(a.chartArea,g=>{let m=g.box;Object.assign(m,e.chartArea),m.update(h.w,h.h,{left:0,top:0,right:0,bottom:0})})}},mi=class{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,i){}removeEventListener(t,n,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,i,s){return n=Math.max(0,n||t.width),i=i||t.height,{width:n,height:Math.max(0,s?Math.floor(n/s):i)}}isAttached(t){return!0}updateConfig(t){}},yr=class extends mi{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}},di="$chartjs",td={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Ta=e=>e===null||e==="";function ed(e,t){let n=e.style,i=e.getAttribute("height"),s=e.getAttribute("width");if(e[di]={initial:{height:i,width:s,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",Ta(s)){let r=Gs(e,"width");r!==void 0&&(e.width=r)}if(Ta(i))if(e.style.height==="")e.height=e.width/(t||2);else{let r=Gs(e,"height");r!==void 0&&(e.height=r)}return e}var yl=ua?{passive:!0}:!1;function nd(e,t,n){e&&e.addEventListener(t,n,yl)}function id(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,yl)}function sd(e,t){let n=td[e.type]||e.type,{x:i,y:s}=te(e,t);return{type:n,chart:t,native:e,x:i!==void 0?i:null,y:s!==void 0?s:null}}function bi(e,t){for(let n of e)if(n===t||n.contains(t))return!0}function rd(e,t,n){let i=e.canvas,s=new MutationObserver(r=>{let o=!1;for(let a of r)o=o||bi(a.addedNodes,i),o=o&&!bi(a.removedNodes,i);o&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}function od(e,t,n){let i=e.canvas,s=new MutationObserver(r=>{let o=!1;for(let a of r)o=o||bi(a.removedNodes,i),o=o&&!bi(a.addedNodes,i);o&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}var yn=new Map,Pa=0;function vl(){let e=window.devicePixelRatio;e!==Pa&&(Pa=e,yn.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function ad(e,t){yn.size||window.addEventListener("resize",vl),yn.set(e,t)}function ld(e){yn.delete(e),yn.size||window.removeEventListener("resize",vl)}function cd(e,t,n){let i=e.canvas,s=i&&ii(i);if(!s)return;let r=Ws((a,l)=>{let c=s.clientWidth;n(a,l),c{let l=a[0],c=l.contentRect.width,u=l.contentRect.height;c===0&&u===0||r(c,u)});return o.observe(s),ad(e,r),o}function or(e,t,n){n&&n.disconnect(),t==="resize"&&ld(e)}function ud(e,t,n){let i=e.canvas,s=Ws(r=>{e.ctx!==null&&n(sd(r,e))},e);return nd(i,t,s),s}var vr=class extends mi{acquireContext(t,n){let i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(ed(t,n),i):null}releaseContext(t){let n=t.canvas;if(!n[di])return!1;let i=n[di].initial;["height","width"].forEach(r=>{let o=i[r];F(o)?n.removeAttribute(r):n.setAttribute(r,o)});let s=i.style||{};return Object.keys(s).forEach(r=>{n.style[r]=s[r]}),n.width=n.width,delete n[di],!0}addEventListener(t,n,i){this.removeEventListener(t,n);let s=t.$proxies||(t.$proxies={}),o={attach:rd,detach:od,resize:cd}[n]||ud;s[n]=o(t,n,i)}removeEventListener(t,n){let i=t.$proxies||(t.$proxies={}),s=i[n];if(!s)return;({attach:or,detach:or,resize:or}[n]||id)(t,n,s),i[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,i,s){return ca(t,n,i,s)}isAttached(t){let n=t&&ii(t);return!!(n&&n.isConnected)}};function fd(e){return!ni()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?yr:vr}var yt=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){let{x:n,y:i}=this.getProps(["x","y"],t);return{x:n,y:i}}hasValue(){return fe(this.x)&&fe(this.y)}getProps(t,n){let i=this.$animations;if(!n||!i)return this;let s={};return t.forEach(r=>{s[r]=i[r]&&i[r].active()?i[r]._to:this[r]}),s}};function dd(e,t){let n=e.options.ticks,i=hd(e),s=Math.min(n.maxTicksLimit||i,i),r=n.major.enabled?gd(t):[],o=r.length,a=r[0],l=r[o-1],c=[];if(o>s)return md(t,c,r,o/s),c;let u=pd(r,t,s);if(o>0){let f,d,h=o>1?Math.round((l-a)/(o-1)):null;for(oi(t,c,u,F(h)?0:a-h,a),f=0,d=o-1;fs)return l}return Math.max(s,1)}function gd(e){let t=[],n,i;for(n=0,i=e.length;ne==="left"?"right":e==="right"?"left":e,Aa=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,Ia=(e,t)=>Math.min(t||e,e);function La(e,t){let n=[],i=e.length/t,s=e.length,r=0;for(;ro+a)))return l}function vd(e,t){z(e,n=>{let i=n.gc,s=i.length/2,r;if(s>t){for(r=0;ri?i:n,i=s&&n>i?n:i,{min:ut(n,ut(i,n)),max:ut(i,ut(n,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let 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(){H(this.options.beforeUpdate,[this])}update(t,n,i){let{beginAtZero:s,grace:r,ticks:o}=this.options,a=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=ia(this,r,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let l=a=r||i<=1||!this.isHorizontal()){this.labelRotation=s;return}let u=this._getLabelSizes(),f=u.widest.width,d=u.highest.height,h=it(this.chart.width-f,0,this.maxWidth);a=t.offset?this.maxWidth/i:h/(i-1),f+6>a&&(a=h/(i-(t.offset?.5:1)),l=this.maxHeight-pn(t.grid)-n.padding-Ea(t.title,this.chart.options.font),c=Math.sqrt(f*f+d*d),o=Qn(Math.min(Math.asin(it((u.highest.height+6)/a,-1,1)),Math.asin(it(l/c,-1,1))-Math.asin(it(d/c,-1,1)))),o=Math.max(s,Math.min(r,o))),this.labelRotation=o}afterCalculateLabelRotation(){H(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){H(this.options.beforeFit,[this])}fit(){let t={width:0,height:0},{chart:n,options:{ticks:i,title:s,grid:r}}=this,o=this._isVisible(),a=this.isHorizontal();if(o){let l=Ea(s,n.options.font);if(a?(t.width=this.maxWidth,t.height=pn(r)+l):(t.height=this.maxHeight,t.width=pn(r)+l),i.display&&this.ticks.length){let{first:c,last:u,widest:f,highest:d}=this._getLabelSizes(),h=i.padding*2,p=pt(this.labelRotation),g=Math.cos(p),m=Math.sin(p);if(a){let b=i.mirror?0:m*f.width+g*d.height;t.height=Math.min(this.maxHeight,t.height+b+h)}else{let b=i.mirror?0:g*f.width+m*d.height;t.width=Math.min(this.maxWidth,t.width+b+h)}this._calculatePadding(c,u,m,g)}}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,i,s){let{ticks:{align:r,padding:o},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){let u=this.getPixelForTick(0)-this.left,f=this.right-this.getPixelForTick(this.ticks.length-1),d=0,h=0;l?c?(d=s*t.width,h=i*n.height):(d=i*t.height,h=s*n.width):r==="start"?h=n.width:r==="end"?d=t.width:r!=="inner"&&(d=t.width/2,h=n.width/2),this.paddingLeft=Math.max((d-u+o)*this.width/(this.width-u),0),this.paddingRight=Math.max((h-f+o)*this.width/(this.width-f),0)}else{let u=n.height/2,f=t.height/2;r==="start"?(u=0,f=t.height):r==="end"&&(u=n.height,f=0),this.paddingTop=u+o,this.paddingBottom=f+o}}_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(){H(this.options.afterFit,[this])}isHorizontal(){let{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,i;for(n=0,i=t.length;n({width:o[C]||0,height:a[C]||0});return{first:D(0),last:D(n-1),widest:D(k),highest:D(S),widths:o,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){let n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);let n=this._startPixel+t*this._length;return jo(this._alignToPixels?Kt(this.chart,n,0):n)}getDecimalForPixel(t){let n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){let n=this.ticks||[];if(t>=0&&ta*s?a/i:l/s:l*s0}_computeGridLineItems(t){let n=this.axis,i=this.chart,s=this.options,{grid:r,position:o,border:a}=s,l=r.offset,c=this.isHorizontal(),f=this.ticks.length+(l?1:0),d=pn(r),h=[],p=a.setContext(this.getContext()),g=p.display?p.width:0,m=g/2,b=function(B){return Kt(i,B,g)},x,y,w,v,k,S,D,C,T,P,I,j;if(o==="top")x=b(this.bottom),S=this.bottom-d,C=x-m,P=b(t.top)+m,j=t.bottom;else if(o==="bottom")x=b(this.top),P=t.top,j=b(t.bottom)-m,S=x+m,C=this.top+d;else if(o==="left")x=b(this.right),k=this.right-d,D=x-m,T=b(t.left)+m,I=t.right;else if(o==="right")x=b(this.left),T=t.left,I=b(t.right)-m,k=x+m,D=this.left+d;else if(n==="x"){if(o==="center")x=b((t.top+t.bottom)/2+.5);else if(L(o)){let B=Object.keys(o)[0],E=o[B];x=b(this.chart.scales[B].getPixelForValue(E))}P=t.top,j=t.bottom,S=x+m,C=S+d}else if(n==="y"){if(o==="center")x=b((t.left+t.right)/2);else if(L(o)){let B=Object.keys(o)[0],E=o[B];x=b(this.chart.scales[B].getPixelForValue(E))}k=x-m,D=k-d,T=t.left,I=t.right}let ot=A(s.ticks.maxTicksLimit,f),R=Math.max(1,Math.ceil(f/ot));for(y=0;y0&&(oe-=re/2);break}In={left:oe,top:Ge,width:re+we.width,height:Qe+we.height,color:R.backdropColor}}m.push({label:w,font:C,textOffset:I,options:{rotation:g,color:E,strokeColor:X,strokeWidth:Z,textAlign:_e,textBaseline:j,translation:[v,k],backdrop:In}})}return m}_getXAxisLabelAlignment(){let{position:t,ticks:n}=this.options;if(-pt(this.labelRotation))return t==="top"?"left":"right";let s="center";return n.align==="start"?s="left":n.align==="end"?s="right":n.align==="inner"&&(s="inner"),s}_getYAxisLabelAlignment(t){let{position:n,ticks:{crossAlign:i,mirror:s,padding:r}}=this.options,o=this._getLabelSizes(),a=t+r,l=o.widest.width,c,u;return n==="left"?s?(u=this.right+r,i==="near"?c="left":i==="center"?(c="center",u+=l/2):(c="right",u+=l)):(u=this.right-a,i==="near"?c="right":i==="center"?(c="center",u-=l/2):(c="left",u=this.left)):n==="right"?s?(u=this.left+r,i==="near"?c="right":i==="center"?(c="center",u-=l/2):(c="left",u-=l)):(u=this.left+a,i==="near"?c="left":i==="center"?(c="center",u+=l/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;let t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){let{ctx:t,options:{backgroundColor:n},left:i,top:s,width:r,height:o}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(i,s,r,o),t.restore())}getLineWidthForValue(t){let n=this.options.grid;if(!this._isVisible()||!n.display)return 0;let s=this.ticks.findIndex(r=>r.value===t);return s>=0?n.setContext(this.getContext(s)).lineWidth:0}drawGrid(t){let n=this.options.grid,i=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t)),r,o,a=(l,c,u)=>{!u.width||!u.color||(i.save(),i.lineWidth=u.width,i.strokeStyle=u.color,i.setLineDash(u.borderDash||[]),i.lineDashOffset=u.borderDashOffset,i.beginPath(),i.moveTo(l.x,l.y),i.lineTo(c.x,c.y),i.stroke(),i.restore())};if(n.display)for(r=0,o=s.length;r{this.draw(r)}}]:[{z:i,draw:r=>{this.drawBackground(),this.drawGrid(r),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:n,draw:r=>{this.drawLabels(r)}}]}getMatchingVisibleMetas(t){let n=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",s=[],r,o;for(r=0,o=n.length;r{let i=n.split("."),s=i.pop(),r=[e].concat(i).join("."),o=t[n].split("."),a=o.pop(),l=o.join(".");G.route(r,s,l,a)})}function Cd(e){return"id"in e&&"defaults"in e}var _r=class{constructor(){this.controllers=new We(Pt,"datasets",!0),this.elements=new We(yt,"elements"),this.plugins=new We(Object,"plugins"),this.scales=new We(ge,"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,i){[...n].forEach(s=>{let r=i||this._getRegistryForType(s);i||r.isForType(s)||r===this.plugins&&s.id?this._exec(t,r,s):z(s,o=>{let a=i||this._getRegistryForType(o);this._exec(t,a,o)})})}_exec(t,n,i){let s=$n(t);H(i["before"+s],[],i),n[t](i),H(i["after"+s],[],i)}_getRegistryForType(t){for(let n=0;nr.filter(a=>!o.some(l=>a.plugin.id===l.plugin.id));this._notify(s(n,i),t,"stop"),this._notify(s(i,n),t,"start")}};function Od(e){let t={},n=[],i=Object.keys(Tt.plugins.items);for(let r=0;r1&&Ra(e[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function Fa(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function Rd(e,t){if(t.data&&t.data.datasets){let n=t.data.datasets.filter(i=>i.xAxisID===e||i.yAxisID===e);if(n.length)return Fa(e,"x",n[0])||Fa(e,"y",n[0])}return{}}function Fd(e,t){let n=Gt[e.type]||{scales:{}},i=t.scales||{},s=Mr(e.type,t),r=Object.create(null);return Object.keys(i).forEach(o=>{let a=i[o];if(!L(a))return console.error(`Invalid scale configuration for scale: ${o}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${o}`);let l=kr(o,a,Rd(o,e),G.scales[a.type]),c=Ld(l,s),u=n.scales||{};r[o]=Te(Object.create(null),[{axis:l},a,u[l],u[c]])}),e.data.datasets.forEach(o=>{let a=o.type||e.type,l=o.indexAxis||Mr(a,t),u=(Gt[a]||{}).scales||{};Object.keys(u).forEach(f=>{let d=Id(f,l),h=o[d+"AxisID"]||d;r[h]=r[h]||Object.create(null),Te(r[h],[{axis:d},i[h],u[f]])})}),Object.keys(r).forEach(o=>{let a=r[o];Te(a,[G.scales[a.type],G.scale])}),r}function _l(e){let t=e.options||(e.options={});t.plugins=A(t.plugins,{}),t.scales=Fd(e,t)}function wl(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function Wd(e){return e=e||{},e.data=wl(e.data),_l(e),e}var Wa=new Map,Ml=new Set;function ai(e,t){let n=Wa.get(e);return n||(n=t(),Wa.set(e,n),Ml.add(n)),n}var gn=(e,t,n)=>{let i=Bt(t,n);i!==void 0&&e.add(i)},Sr=class{constructor(t){this._config=Wd(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=wl(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){let t=this._config;this.clearCache(),_l(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return ai(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return ai(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return ai(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){let n=t.id,i=this.type;return ai(`${i}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){let i=this._scopeCache,s=i.get(t);return(!s||n)&&(s=new Map,i.set(t,s)),s}getOptionScopes(t,n,i){let{options:s,type:r}=this,o=this._cachedScopes(t,i),a=o.get(n);if(a)return a;let l=new Set;n.forEach(u=>{t&&(l.add(t),u.forEach(f=>gn(l,t,f))),u.forEach(f=>gn(l,s,f)),u.forEach(f=>gn(l,Gt[r]||{},f)),u.forEach(f=>gn(l,G,f)),u.forEach(f=>gn(l,Zn,f))});let c=Array.from(l);return c.length===0&&c.push(Object.create(null)),Ml.has(n)&&o.set(n,c),c}chartOptionScopes(){let{options:t,type:n}=this;return[t,Gt[n]||{},G.datasets[n]||{},{type:n},G,Zn]}resolveNamedOptions(t,n,i,s=[""]){let r={$shared:!0},{resolver:o,subPrefixes:a}=Na(this._resolverCache,t,s),l=o;if(zd(o,n)){r.$shared=!1,i=Nt(i)?i():i;let c=this.createResolver(t,i,a);l=ue(o,i,c)}for(let c of n)r[c]=l[c];return r}createResolver(t,n,i=[""],s){let{resolver:r}=Na(this._resolverCache,t,i);return L(n)?ue(r,n,void 0,s):r}};function Na(e,t,n){let i=e.get(t);i||(i=new Map,e.set(t,i));let s=n.join(),r=i.get(s);return r||(r={resolver:ei(t,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},i.set(s,r)),r}var Nd=e=>L(e)&&Object.getOwnPropertyNames(e).some(t=>Nt(e[t]));function zd(e,t){let{isScriptable:n,isIndexable:i}=qs(e);for(let s of t){let r=n(s),o=i(s),a=(o||r)&&e[s];if(r&&(Nt(a)||Nd(a))||o&&U(a))return!0}return!1}var Bd="4.4.4",Hd=["top","bottom","left","right","chartArea"];function za(e,t){return e==="top"||e==="bottom"||Hd.indexOf(e)===-1&&t==="x"}function Ba(e,t){return function(n,i){return n[e]===i[e]?n[t]-i[t]:n[e]-i[e]}}function Ha(e){let t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),H(n&&n.onComplete,[e],t)}function Yd(e){let t=e.chart,n=t.options.animation;H(n&&n.onProgress,[e],t)}function kl(e){return ni()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}var hi={},Ya=e=>{let t=kl(e);return Object.values(hi).filter(n=>n.canvas===t).pop()};function Ud(e,t,n){let i=Object.keys(e);for(let s of i){let r=+s;if(r>=t){let o=e[s];delete e[s],(n>0||r>t)&&(e[r+n]=o)}}}function Vd(e,t,n,i){return!n||e.type==="mouseout"?null:i?t:e}function li(e,t,n){return e.options.clip?e[n]:t[n]}function qd(e,t){let{xScale:n,yScale:i}=e;return n&&i?{left:li(n,t,"left"),right:li(n,t,"right"),top:li(i,t,"top"),bottom:li(i,t,"bottom")}:t}var Ne=class{static defaults=G;static instances=hi;static overrides=Gt;static registry=Tt;static version=Bd;static getChart=Ya;static register(...t){Tt.add(...t),Ua()}static unregister(...t){Tt.remove(...t),Ua()}constructor(t,n){let i=this.config=new Sr(n),s=kl(t),r=Ya(s);if(r)throw new Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas with ID '"+r.canvas.id+"' can be reused.");let o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||fd(s)),this.platform.updateConfig(i);let a=this.platform.acquireContext(s,o.aspectRatio),l=a&&a.canvas,c=l&&l.height,u=l&&l.width;if(this.id=Bo(),this.ctx=a,this.canvas=l,this.width=u,this.height=c,this._options=o,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 wr,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Ko(f=>this.update(f),o.resizeDelay||0),this._dataChanges=[],hi[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Yt.listen(this,"complete",Ha),Yt.listen(this,"progress",Yd),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:t,maintainAspectRatio:n},width:i,height:s,_aspectRatio:r}=this;return F(t)?n&&r?r:s?i/s: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 Tt}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Qs(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Ys(this.canvas,this.ctx),this}stop(){return Yt.stop(this),this}resize(t,n){Yt.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){let i=this.options,s=this.canvas,r=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(s,t,n,r),a=i.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,Qs(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),H(i.onResize,[this,o],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){let n=this.options.scales||{};z(n,(i,s)=>{i.id=s})}buildOrUpdateScales(){let t=this.options,n=t.scales,i=this.scales,s=Object.keys(i).reduce((o,a)=>(o[a]=!1,o),{}),r=[];n&&(r=r.concat(Object.keys(n).map(o=>{let a=n[o],l=kr(o,a),c=l==="r",u=l==="x";return{options:a,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),z(r,o=>{let a=o.options,l=a.id,c=kr(l,a),u=A(a.type,o.dtype);(a.position===void 0||za(a.position,c)!==za(o.dposition))&&(a.position=o.dposition),s[l]=!0;let f=null;if(l in i&&i[l].type===u)f=i[l];else{let d=Tt.getScale(u);f=new d({id:l,type:u,ctx:this.ctx,chart:this}),i[f.id]=f}f.init(a,t)}),z(s,(o,a)=>{o||delete i[a]}),z(i,o=>{at.configure(this,o,o.options),at.addBox(this,o)})}_updateMetasets(){let t=this._metasets,n=this.data.datasets.length,i=t.length;if(t.sort((s,r)=>s.index-r.index),i>n){for(let s=n;sn.length&&delete this._stacks,t.forEach((i,s)=>{n.filter(r=>r===i._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){let t=[],n=this.data.datasets,i,s;for(this._removeUnreferencedMetasets(),i=0,s=n.length;i{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){let n=this.config;n.update();let i=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;let r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let c=0,u=this.data.datasets.length;c{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Ba("z","_idx"));let{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){z(this.scales,t=>{at.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let t=this.options,n=new Set(Object.keys(this._listeners)),i=new Set(t.events);(!Ts(n,i)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(let{method:i,start:s,count:r}of n){let o=i==="_removeElements"?-r:r;Ud(t,s,o)}}_getUniformDataChanges(){let t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];let n=this.data.datasets.length,i=r=>new Set(t.filter(o=>o[0]===r).map((o,a)=>a+","+o.splice(1).join(","))),s=i(0);for(let r=1;rr.split(",")).map(r=>({method:r[1],start:+r[2],count:+r[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;at.update(this,this.width,this.height,t);let n=this.chartArea,i=n.width<=0||n.height<=0;this._layers=[],z(this.boxes,s=>{i&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,r)=>{s._idx=r}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,i=this.data.datasets.length;n=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){let n=this.ctx,i=t._clip,s=!i.disabled,r=qd(t,this.chartArea),o={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(s&&cn(n,{left:i.left===!1?0:r.left-i.left,right:i.right===!1?this.width:r.right+i.right,top:i.top===!1?0:r.top-i.top,bottom:i.bottom===!1?this.height:r.bottom+i.bottom}),t.controller.draw(),s&&un(n),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(t){return St(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,i,s){let r=jf.modes[n];return typeof r=="function"?r(this,t,i,s):[]}getDatasetMeta(t){let n=this.data.datasets[t],i=this._metasets,s=i.filter(r=>r&&r._dataset===n).pop();return s||(s={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},i.push(s)),s}getContext(){return this.$context||(this.$context=Ht(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){let n=this.data.datasets[t];if(!n)return!1;let i=this.getDatasetMeta(t);return typeof i.hidden=="boolean"?!i.hidden:!n.hidden}setDatasetVisibility(t,n){let i=this.getDatasetMeta(t);i.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,i){let s=i?"show":"hide",r=this.getDatasetMeta(t),o=r.controller._resolveAnimations(void 0,s);Pe(n)?(r.data[n].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),o.update(r,{visible:i}),this.update(a=>a.datasetIndex===t?s:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){let n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),Yt.remove(this),t=0,n=this.data.datasets.length;t{n.addEventListener(this,r,o),t[r]=o},s=(r,o,a)=>{r.offsetX=o,r.offsetY=a,this._eventHandler(r)};z(this.options.events,r=>i(r,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});let t=this._responsiveListeners,n=this.platform,i=(l,c)=>{n.addEventListener(this,l,c),t[l]=c},s=(l,c)=>{t[l]&&(n.removeEventListener(this,l,c),delete t[l])},r=(l,c)=>{this.canvas&&this.resize(l,c)},o,a=()=>{s("attach",a),this.attached=!0,this.resize(),i("resize",r),i("detach",o)};o=()=>{this.attached=!1,s("resize",r),this._stop(),this._resize(0,0),i("attach",a)},n.isAttached(this.canvas)?a():o()}unbindEvents(){z(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},z(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,i){let s=i?"set":"remove",r,o,a,l;for(n==="dataset"&&(r=this.getDatasetMeta(t[0].datasetIndex),r.controller["_"+s+"DatasetHoverStyle"]()),a=0,l=t.length;a{let a=this.getDatasetMeta(r);if(!a)throw new Error("No dataset found at index "+r);return{datasetIndex:r,element:a.data[o],index:o}});!an(i,n)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,n))}notifyPlugins(t,n,i){return this._plugins.notify(this,t,n,i)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,i){let s=this.options.hover,r=(l,c)=>l.filter(u=>!c.some(f=>u.datasetIndex===f.datasetIndex&&u.index===f.index)),o=r(n,t),a=i?t:r(t,n);o.length&&this.updateHoverStyle(o,s.mode,!1),a.length&&s.mode&&this.updateHoverStyle(a,s.mode,!0)}_eventHandler(t,n){let i={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},s=o=>(o.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",i,s)===!1)return;let r=this._handleEvent(t,n,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(r||i.changed)&&this.render(),this}_handleEvent(t,n,i){let{_active:s=[],options:r}=this,o=n,a=this._getActiveElements(t,s,i,o),l=Uo(t),c=Vd(t,this._lastEvent,i,l);i&&(this._lastEvent=null,H(r.onHover,[t,a,this],this),l&&H(r.onClick,[t,a,this],this));let u=!an(a,s);return(u||n)&&(this._active=a,this._updateHoverStyles(a,s,n)),this._lastEvent=c,u}_getActiveElements(t,n,i,s){if(t.type==="mouseout")return[];if(!i)return n;let r=this.options.hover;return this.getElementsAtEventForMode(t,r.mode,r,s)}};function Ua(){return z(Ne.instances,e=>e._plugins.invalidate())}function jd(e,t,n){let{startAngle:i,pixelMargin:s,x:r,y:o,outerRadius:a,innerRadius:l}=t,c=s/a;e.beginPath(),e.arc(r,o,a,i-c,n+c),l>s?(c=s/l,e.arc(r,o,l,n+c,i-c,!0)):e.arc(r,o,s,n+J,i-J),e.closePath(),e.clip()}function Xd(e){return ti(e,["outerStart","outerEnd","innerStart","innerEnd"])}function $d(e,t,n,i){let s=Xd(e.options.borderRadius),r=(n-t)/2,o=Math.min(r,i*t/2),a=l=>{let c=(n-Math.min(r,l))*i/2;return it(l,0,Math.min(r,c))};return{outerStart:a(s.outerStart),outerEnd:a(s.outerEnd),innerStart:it(s.innerStart,0,o),innerEnd:it(s.innerEnd,0,o)}}function Fe(e,t,n,i){return{x:n+e*Math.cos(t),y:i+e*Math.sin(t)}}function xi(e,t,n,i,s,r){let{x:o,y:a,startAngle:l,pixelMargin:c,innerRadius:u}=t,f=Math.max(t.outerRadius+i+n-c,0),d=u>0?u+i+n+c:0,h=0,p=s-l;if(i){let R=u>0?u-i:0,B=f>0?f-i:0,E=(R+B)/2,X=E!==0?p*E/(E+i):p;h=(p-X)/2}let g=Math.max(.001,p*f-n/V)/f,m=(p-g)/2,b=l+m+h,x=s-m-h,{outerStart:y,outerEnd:w,innerStart:v,innerEnd:k}=$d(t,d,f,x-b),S=f-y,D=f-w,C=b+y/S,T=x-w/D,P=d+v,I=d+k,j=b+v/P,ot=x-k/I;if(e.beginPath(),r){let R=(C+T)/2;if(e.arc(o,a,f,C,R),e.arc(o,a,f,R,T),w>0){let Z=Fe(D,T,o,a);e.arc(Z.x,Z.y,w,T,x+J)}let B=Fe(I,x,o,a);if(e.lineTo(B.x,B.y),k>0){let Z=Fe(I,ot,o,a);e.arc(Z.x,Z.y,k,x+J,ot+Math.PI)}let E=(x-k/d+(b+v/d))/2;if(e.arc(o,a,d,x-k/d,E,!0),e.arc(o,a,d,E,b+v/d,!0),v>0){let Z=Fe(P,j,o,a);e.arc(Z.x,Z.y,v,j+Math.PI,b-J)}let X=Fe(S,b,o,a);if(e.lineTo(X.x,X.y),y>0){let Z=Fe(S,C,o,a);e.arc(Z.x,Z.y,y,b-J,C)}}else{e.moveTo(o,a);let R=Math.cos(C)*f+o,B=Math.sin(C)*f+a;e.lineTo(R,B);let E=Math.cos(T)*f+o,X=Math.sin(T)*f+a;e.lineTo(E,X)}e.closePath()}function Qd(e,t,n,i,s){let{fullCircles:r,startAngle:o,circumference:a}=t,l=t.endAngle;if(r){xi(e,t,n,i,l,s);for(let c=0;ct!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,n,i){let s=this.getProps(["x","y"],i),{angle:r,distance:o}=Ls(s,{x:t,y:n}),{startAngle:a,endAngle:l,innerRadius:c,outerRadius:u,circumference:f}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),d=(this.options.spacing+this.options.borderWidth)/2,h=A(f,l-a),p=Ie(r,a,l)&&a!==l,g=h>=q||p,m=Ct(o,c+d,u+d);return g&&m}getCenterPoint(t){let{x:n,y:i,startAngle:s,endAngle:r,innerRadius:o,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:l,spacing:c}=this.options,u=(s+r)/2,f=(o+a+c+l)/2;return{x:n+Math.cos(u)*f,y:i+Math.sin(u)*f}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){let{options:n,circumference:i}=this,s=(n.offset||0)/4,r=(n.spacing||0)/2,o=n.circular;if(this.pixelMargin=n.borderAlign==="inner"?.33:0,this.fullCircles=i>q?Math.floor(i/q):0,i===0||this.innerRadius<0||this.outerRadius<0)return;t.save();let a=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(a)*s,Math.sin(a)*s);let l=1-Math.sin(Math.min(V,i||0)),c=s*l;t.fillStyle=n.backgroundColor,t.strokeStyle=n.borderColor,Qd(t,this,c,r,o),Gd(t,this,c,r,o),t.restore()}};function Sl(e,t,n=t){e.lineCap=A(n.borderCapStyle,t.borderCapStyle),e.setLineDash(A(n.borderDash,t.borderDash)),e.lineDashOffset=A(n.borderDashOffset,t.borderDashOffset),e.lineJoin=A(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=A(n.borderWidth,t.borderWidth),e.strokeStyle=A(n.borderColor,t.borderColor)}function Kd(e,t,n){e.lineTo(n.x,n.y)}function Zd(e){return e.stepped?ea:e.tension||e.cubicInterpolationMode==="monotone"?na:Kd}function Dl(e,t,n={}){let i=e.length,{start:s=0,end:r=i-1}=n,{start:o,end:a}=t,l=Math.max(s,o),c=Math.min(r,a),u=sa&&r>a;return{count:i,start:l,loop:t.loop,ilen:c(o+(c?a-w:w))%r,y=()=>{g!==m&&(e.lineTo(u,m),e.lineTo(u,g),e.lineTo(u,b))};for(l&&(h=s[x(0)],e.moveTo(h.x,h.y)),d=0;d<=a;++d){if(h=s[x(d)],h.skip)continue;let w=h.x,v=h.y,k=w|0;k===p?(vm&&(m=v),u=(f*u+w)/++f):(y(),e.lineTo(w,v),p=k,f=0,g=m=v),b=v}y()}function Cr(e){let t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?th:Jd}function eh(e){return e.stepped?fa:e.tension||e.cubicInterpolationMode==="monotone"?da:Qt}function nh(e,t,n,i){let s=t._path;s||(s=t._path=new Path2D,t.path(s,n,i)&&s.closePath()),Sl(e,t.options),e.stroke(s)}function ih(e,t,n,i){let{segments:s,options:r}=t,o=Cr(t);for(let a of s)Sl(e,r,a.style),e.beginPath(),o(e,t,a,{start:n,end:n+i-1})&&e.closePath(),e.stroke()}var sh=typeof Path2D=="function";function rh(e,t,n,i){sh&&!t.options.segment?nh(e,t,n,i):ih(e,t,n,i)}var ze=class extends yt{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"};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){let i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){let s=i.spanGaps?this._loop:this._fullLoop;la(this._points,i,t,s,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=pa(this,this.options.segment))}first(){let t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){let t=this.segments,n=this.points,i=t.length;return i&&n[t[i-1].end]}interpolate(t,n){let i=this.options,s=t[n],r=this.points,o=tr(this,{property:n,start:s,end:s});if(!o.length)return;let a=[],l=eh(i),c,u;for(c=0,u=o.length;ce.replace("rgb(","rgba(").replace(")",", 0.5)"));function Ol(e){return Pr[e%Pr.length]}function Tl(e){return qa[e%qa.length]}function dh(e,t){return e.borderColor=Ol(t),e.backgroundColor=Tl(t),++t}function hh(e,t){return e.backgroundColor=e.data.map(()=>Ol(t++)),t}function ph(e,t){return e.backgroundColor=e.data.map(()=>Tl(t++)),t}function gh(e){let t=0;return(n,i)=>{let s=e.getDatasetMeta(i).controller;s instanceof xn?t=hh(n,t):s instanceof gi?t=ph(n,t):s&&(t=dh(n,t))}}function ja(e){let t;for(t in e)if(e[t].borderColor||e[t].backgroundColor)return!0;return!1}function mh(e){return e&&(e.borderColor||e.backgroundColor)}var bh={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,t,n){if(!n.enabled)return;let{data:{datasets:i},options:s}=e.config,{elements:r}=s;if(!n.forceOverride&&(ja(i)||mh(s)||r&&ja(r)))return;let o=gh(e);i.forEach(o)}};function xh(e,t,n,i,s){let r=s.samples||i;if(r>=n)return e.slice(t,t+n);let o=[],a=(n-2)/(r-2),l=0,c=t+n-1,u=t,f,d,h,p,g;for(o[l++]=e[u],f=0;fh&&(h=p,d=e[x],g=x);o[l++]=d,u=g}return o[l++]=e[c],o}function yh(e,t,n,i){let s=0,r=0,o,a,l,c,u,f,d,h,p,g,m=[],b=t+n-1,x=e[t].x,w=e[b].x-x;for(o=t;og&&(g=c,d=o),s=(r*s+a.x)/++r;else{let k=o-1;if(!F(f)&&!F(d)){let S=Math.min(f,d),D=Math.max(f,d);S!==h&&S!==k&&m.push({...e[S],x:s}),D!==h&&D!==k&&m.push({...e[D],x:s})}o>0&&k!==h&&m.push(e[k]),m.push(a),u=v,r=0,p=g=c,f=d=h=o}}return m}function Pl(e){if(e._decimated){let t=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function Xa(e){e.data.datasets.forEach(t=>{Pl(t)})}function vh(e,t){let n=t.length,i=0,s,{iScale:r}=e,{min:o,max:a,minDefined:l,maxDefined:c}=r.getUserBounds();return l&&(i=it(kt(t,r.axis,o).lo,0,n-1)),c?s=it(kt(t,r.axis,a).hi+1,i,n)-i:s=n-i,{start:i,count:s}}var _h={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,t,n)=>{if(!n.enabled){Xa(e);return}let i=e.width;e.data.datasets.forEach((s,r)=>{let{_data:o,indexAxis:a}=s,l=e.getDatasetMeta(r),c=o||s.data;if(Re([a,e.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;let u=e.scales[l.xAxisID];if(u.type!=="linear"&&u.type!=="time"||e.options.parsing)return;let{start:f,count:d}=vh(l,c),h=n.threshold||4*i;if(d<=h){Pl(s);return}F(o)&&(s._data=c,delete s.data,Object.defineProperty(s,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(g){this._data=g}}));let p;switch(n.algorithm){case"lttb":p=xh(c,f,d,i,n);break;case"min-max":p=yh(c,f,d,i);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}s._decimated=p})},destroy(e){Xa(e)}};function wh(e,t,n){let i=e.segments,s=e.points,r=t.points,o=[];for(let a of i){let{start:l,end:c}=a;c=zr(l,c,s);let u=Ar(n,s[l],s[c],a.loop);if(!t.segments){o.push({source:a,target:u,start:s[l],end:s[c]});continue}let f=tr(t,u);for(let d of f){let h=Ar(n,r[d.start],r[d.end],d.loop),p=Js(a,s,h);for(let g of p)o.push({source:g,target:d,start:{[n]:$a(u,h,"start",Math.max)},end:{[n]:$a(u,h,"end",Math.min)}})}}return o}function Ar(e,t,n,i){if(i)return;let s=t[e],r=n[e];return e==="angle"&&(s=ct(s),r=ct(r)),{property:e,start:s,end:r}}function Mh(e,t){let{x:n=null,y:i=null}=e||{},s=t.points,r=[];return t.segments.forEach(({start:o,end:a})=>{a=zr(o,a,s);let l=s[o],c=s[a];i!==null?(r.push({x:l.x,y:i}),r.push({x:c.x,y:i})):n!==null&&(r.push({x:n,y:l.y}),r.push({x:n,y:c.y}))}),r}function zr(e,t,n){for(;t>e;t--){let i=n[t];if(!isNaN(i.x)&&!isNaN(i.y))break}return t}function $a(e,t,n,i){return e&&t?i(e[n],t[n]):e?e[n]:t?t[n]:0}function Al(e,t){let n=[],i=!1;return U(e)?(i=!0,n=e):n=Mh(e,t),n.length?new ze({points:n,options:{tension:0},_loop:i,_fullLoop:i}):null}function Qa(e){return e&&e.fill!==!1}function kh(e,t,n){let s=e[t].fill,r=[t],o;if(!n)return s;for(;s!==!1&&r.indexOf(s)===-1;){if(!Q(s))return s;if(o=e[s],!o)return!1;if(o.visible)return s;r.push(s),s=o.fill}return!1}function Sh(e,t,n){let i=Th(e);if(L(i))return isNaN(i.value)?!1:i;let s=parseFloat(i);return Q(s)&&Math.floor(s)===s?Dh(i[0],t,s,n):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function Dh(e,t,n,i){return(e==="-"||e==="+")&&(n=t+n),n===t||n<0||n>=i?!1:n}function Ch(e,t){let n=null;return e==="start"?n=t.bottom:e==="end"?n=t.top:L(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}function Oh(e,t,n){let i;return e==="start"?i=n:e==="end"?i=t.options.reverse?t.min:t.max:L(e)?i=e.value:i=t.getBaseValue(),i}function Th(e){let t=e.options,n=t.fill,i=A(n&&n.target,n);return i===void 0&&(i=!!t.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function Ph(e){let{scale:t,index:n,line:i}=e,s=[],r=i.segments,o=i.points,a=Ah(t,n);a.push(Al({x:null,y:t.bottom},i));for(let l=0;l=0;--o){let a=s[o].$filler;a&&(a.line.updateControlPoints(r,a.axis),i&&a.fill&&cr(e.ctx,a,r))}},beforeDatasetsDraw(e,t,n){if(n.drawTime!=="beforeDatasetsDraw")return;let i=e.getSortedVisibleDatasetMetas();for(let s=i.length-1;s>=0;--s){let r=i[s].$filler;Qa(r)&&cr(e.ctx,r,e.chartArea)}},beforeDatasetDraw(e,t,n){let i=t.meta.$filler;!Qa(i)||n.drawTime!=="beforeDatasetDraw"||cr(e.ctx,i,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}},Ja=(e,t)=>{let{boxHeight:n=t,boxWidth:i=t}=e;return e.usePointStyle&&(n=Math.min(n,t),i=e.pointStyleWidth||Math.min(i,t)),{boxWidth:i,boxHeight:n,itemHeight:Math.max(t,n)}},Yh=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index,vi=class extends yt{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,i){this.maxWidth=t,this.maxHeight=n,this._margins=i,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(){let t=this.options.labels||{},n=H(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(i=>t.filter(i,this.chart.data))),t.sort&&(n=n.sort((i,s)=>t.sort(i,s,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){let{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}let i=t.labels,s=nt(i.font),r=s.size,o=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=Ja(i,r),c,u;n.font=s.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(o,r,a,l)+10):(u=this.maxHeight,c=this._fitCols(o,s,a,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(u,t.maxHeight||this.maxHeight)}_fitRows(t,n,i,s){let{ctx:r,maxWidth:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],u=s+a,f=t;r.textAlign="left",r.textBaseline="middle";let d=-1,h=-u;return this.legendItems.forEach((p,g)=>{let m=i+n/2+r.measureText(p.text).width;(g===0||c[c.length-1]+m+2*a>o)&&(f+=u,c[c.length-(g>0?0:1)]=0,h+=u,d++),l[g]={left:0,top:h,row:d,width:m,height:s},c[c.length-1]+=m+a}),f}_fitCols(t,n,i,s){let{ctx:r,maxHeight:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],u=o-t,f=a,d=0,h=0,p=0,g=0;return this.legendItems.forEach((m,b)=>{let{itemWidth:x,itemHeight:y}=Uh(i,n,r,m,s);b>0&&h+y+2*a>u&&(f+=d+a,c.push({width:d,height:h}),p+=d+a,g++,d=h=0),l[b]={left:p,top:h,col:g,width:x,height:y},d=Math.max(d,x),h+=y+a}),f+=d,c.push({width:d,height:h}),f}adjustHitBoxes(){if(!this.options.display)return;let t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:i,labels:{padding:s},rtl:r}}=this,o=de(r,this.left,this.width);if(this.isHorizontal()){let a=0,l=st(i,this.left+s,this.right-this.lineWidths[a]);for(let c of n)a!==c.row&&(a=c.row,l=st(i,this.left+s,this.right-this.lineWidths[a])),c.top+=this.top+t+s,c.left=o.leftForLtr(o.x(l),c.width),l+=c.width+s}else{let a=0,l=st(i,this.top+t+s,this.bottom-this.columnSizes[a].height);for(let c of n)c.col!==a&&(a=c.col,l=st(i,this.top+t+s,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+s,c.left=o.leftForLtr(o.x(c.left),c.width),l+=c.height+s}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){let t=this.ctx;cn(t,this),this._draw(),un(t)}}_draw(){let{options:t,columnSizes:n,lineWidths:i,ctx:s}=this,{align:r,labels:o}=t,a=G.color,l=de(t.rtl,this.left,this.width),c=nt(o.font),{padding:u}=o,f=c.size,d=f/2,h;this.drawTitle(),s.textAlign=l.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=c.string;let{boxWidth:p,boxHeight:g,itemHeight:m}=Ja(o,f),b=function(k,S,D){if(isNaN(p)||p<=0||isNaN(g)||g<0)return;s.save();let C=A(D.lineWidth,1);if(s.fillStyle=A(D.fillStyle,a),s.lineCap=A(D.lineCap,"butt"),s.lineDashOffset=A(D.lineDashOffset,0),s.lineJoin=A(D.lineJoin,"miter"),s.lineWidth=C,s.strokeStyle=A(D.strokeStyle,a),s.setLineDash(A(D.lineDash,[])),o.usePointStyle){let T={radius:g*Math.SQRT2/2,pointStyle:D.pointStyle,rotation:D.rotation,borderWidth:C},P=l.xPlus(k,p/2),I=S+d;Us(s,T,P,I,o.pointStyleWidth&&p)}else{let T=S+Math.max((f-g)/2,0),P=l.leftForLtr(k,p),I=Jt(D.borderRadius);s.beginPath(),Object.values(I).some(j=>j!==0)?Ee(s,{x:P,y:T,w:p,h:g,radius:I}):s.rect(P,T,p,g),s.fill(),C!==0&&s.stroke()}s.restore()},x=function(k,S,D){Zt(s,D.text,k,S+m/2,c,{strikethrough:D.hidden,textAlign:l.textAlign(D.textAlign)})},y=this.isHorizontal(),w=this._computeTitleHeight();y?h={x:st(r,this.left+u,this.right-i[0]),y:this.top+u+w,line:0}:h={x:this.left+u,y:st(r,this.top+w+u,this.bottom-n[0].height),line:0},Ks(this.ctx,t.textDirection);let v=m+u;this.legendItems.forEach((k,S)=>{s.strokeStyle=k.fontColor,s.fillStyle=k.fontColor;let D=s.measureText(k.text).width,C=l.textAlign(k.textAlign||(k.textAlign=o.textAlign)),T=p+d+D,P=h.x,I=h.y;l.setWidth(this.width),y?S>0&&P+T+u>this.right&&(I=h.y+=v,h.line++,P=h.x=st(r,this.left+u,this.right-i[h.line])):S>0&&I+v>this.bottom&&(P=h.x=P+n[h.line].width+u,h.line++,I=h.y=st(r,this.top+w+u,this.bottom-n[h.line].height));let j=l.x(P);if(b(j,I,k),P=Zo(C,P+p+d,y?P+T:this.right,t.rtl),x(l.x(P),I,k),y)h.x+=T+u;else if(typeof k.text!="string"){let ot=c.lineHeight;h.y+=Il(k,ot)+u}else h.y+=v}),Zs(this.ctx,t.textDirection)}drawTitle(){let t=this.options,n=t.title,i=nt(n.font),s=rt(n.padding);if(!n.display)return;let r=de(t.rtl,this.left,this.width),o=this.ctx,a=n.position,l=i.size/2,c=s.top+l,u,f=this.left,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),u=this.top+c,f=st(t.align,f,this.right-d);else{let p=this.columnSizes.reduce((g,m)=>Math.max(g,m.height),0);u=c+st(t.align,this.top,this.bottom-p-t.labels.padding-this._computeTitleHeight())}let h=st(a,f,f+d);o.textAlign=r.textAlign(Kn(a)),o.textBaseline="middle",o.strokeStyle=n.color,o.fillStyle=n.color,o.font=i.string,Zt(o,n.text,h,u,i)}_computeTitleHeight(){let t=this.options.title,n=nt(t.font),i=rt(t.padding);return t.display?n.lineHeight+i.height:0}_getLegendItemAt(t,n){let i,s,r;if(Ct(t,this.left,this.right)&&Ct(n,this.top,this.bottom)){for(r=this.legendHitBoxes,i=0;ir.length>o.length?r:o)),t+n.size/2+i.measureText(s).width}function qh(e,t,n){let i=e;return typeof t.text!="string"&&(i=Il(t,n)),i}function Il(e,t){let n=e.text?e.text.length:0;return t*n}function jh(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var Xh={id:"legend",_element:vi,start(e,t,n){let i=e.legend=new vi({ctx:e.ctx,options:n,chart:e});at.configure(e,i,n),at.addBox(e,i)},stop(e){at.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){let i=e.legend;at.configure(e,i,n),i.options=n},afterUpdate(e){let 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){let i=t.datasetIndex,s=n.chart;s.isDatasetVisible(i)?(s.hide(i),t.hidden=!0):(s.show(i),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){let t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:i,textAlign:s,color:r,useBorderRadius:o,borderRadius:a}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{let c=l.controller.getStyle(n?0:void 0),u=rt(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:r,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:i||c.pointStyle,rotation:c.rotation,textAlign:s||c.textAlign,borderRadius:o&&(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)}}},vn=class extends yt{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){let i=this.options;if(this.left=0,this.top=0,!i.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=n;let s=U(i.text)?i.text.length:1;this._padding=rt(i.padding);let r=s*nt(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=r:this.width=r}isHorizontal(){let t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){let{top:n,left:i,bottom:s,right:r,options:o}=this,a=o.align,l=0,c,u,f;return this.isHorizontal()?(u=st(a,i,r),f=n+t,c=r-i):(o.position==="left"?(u=i+t,f=st(a,s,n),l=V*-.5):(u=r-t,f=st(a,n,s),l=V*.5),c=s-n),{titleX:u,titleY:f,maxWidth:c,rotation:l}}draw(){let t=this.ctx,n=this.options;if(!n.display)return;let i=nt(n.font),r=i.lineHeight/2+this._padding.top,{titleX:o,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(r);Zt(t,n.text,0,0,i,{color:n.color,maxWidth:l,rotation:c,textAlign:Kn(n.align),textBaseline:"middle",translation:[o,a]})}};function $h(e,t){let n=new vn({ctx:e.ctx,options:t,chart:e});at.configure(e,n,t),at.addBox(e,n),e.titleBlock=n}var Qh={id:"title",_element:vn,start(e,t,n){$h(e,n)},stop(e){let t=e.titleBlock;at.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){let i=e.titleBlock;at.configure(e,i,n),i.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}},ci=new WeakMap,Gh={id:"subtitle",start(e,t,n){let i=new vn({ctx:e.ctx,options:n,chart:e});at.configure(e,i,n),at.addBox(e,i),ci.set(e,i)},stop(e){at.removeBox(e,ci.get(e)),ci.delete(e)},beforeUpdate(e,t,n){let i=ci.get(e);at.configure(e,i,n),i.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}},bn={average(e){if(!e.length)return!1;let t,n,i=new Set,s=0,r=0;for(t=0,n=e.length;ta+l)/i.size,y:s/r}},nearest(e,t){if(!e.length)return!1;let n=t.x,i=t.y,s=Number.POSITIVE_INFINITY,r,o,a;for(r=0,o=e.length;r-1?e.split(` +`):e}function Kh(e,t){let{element:n,datasetIndex:i,index:s}=t,r=e.getDatasetMeta(i).controller,{label:o,value:a}=r.getLabelAndValue(s);return{chart:e,label:o,parsed:r.getParsed(s),raw:e.data.datasets[i].data[s],formattedValue:a,dataset:r.getDataset(),dataIndex:s,datasetIndex:i,element:n}}function tl(e,t){let n=e.chart.ctx,{body:i,footer:s,title:r}=e,{boxWidth:o,boxHeight:a}=t,l=nt(t.bodyFont),c=nt(t.titleFont),u=nt(t.footerFont),f=r.length,d=s.length,h=i.length,p=rt(t.padding),g=p.height,m=0,b=i.reduce((w,v)=>w+v.before.length+v.lines.length+v.after.length,0);if(b+=e.beforeBody.length+e.afterBody.length,f&&(g+=f*c.lineHeight+(f-1)*t.titleSpacing+t.titleMarginBottom),b){let w=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;g+=h*w+(b-h)*l.lineHeight+(b-1)*t.bodySpacing}d&&(g+=t.footerMarginTop+d*u.lineHeight+(d-1)*t.footerSpacing);let x=0,y=function(w){m=Math.max(m,n.measureText(w).width+x)};return n.save(),n.font=c.string,z(e.title,y),n.font=l.string,z(e.beforeBody.concat(e.afterBody),y),x=t.displayColors?o+2+t.boxPadding:0,z(i,w=>{z(w.before,y),z(w.lines,y),z(w.after,y)}),x=0,n.font=u.string,z(e.footer,y),n.restore(),m+=p.width,{width:m,height:g}}function Zh(e,t){let{y:n,height:i}=t;return ne.height-i/2?"bottom":"center"}function Jh(e,t,n,i){let{x:s,width:r}=i,o=n.caretSize+n.caretPadding;if(e==="left"&&s+r+o>t.width||e==="right"&&s-r-o<0)return!0}function tp(e,t,n,i){let{x:s,width:r}=n,{width:o,chartArea:{left:a,right:l}}=e,c="center";return i==="center"?c=s<=(a+l)/2?"left":"right":s<=r/2?c="left":s>=o-r/2&&(c="right"),Jh(c,e,t,n)&&(c="center"),c}function el(e,t,n){let i=n.yAlign||t.yAlign||Zh(e,n);return{xAlign:n.xAlign||t.xAlign||tp(e,t,n,i),yAlign:i}}function ep(e,t){let{x:n,width:i}=e;return t==="right"?n-=i:t==="center"&&(n-=i/2),n}function np(e,t,n){let{y:i,height:s}=e;return t==="top"?i+=n:t==="bottom"?i-=s+n:i-=s/2,i}function nl(e,t,n,i){let{caretSize:s,caretPadding:r,cornerRadius:o}=e,{xAlign:a,yAlign:l}=n,c=s+r,{topLeft:u,topRight:f,bottomLeft:d,bottomRight:h}=Jt(o),p=ep(t,a),g=np(t,l,c);return l==="center"?a==="left"?p+=c:a==="right"&&(p-=c):a==="left"?p-=Math.max(u,d)+s:a==="right"&&(p+=Math.max(f,h)+s),{x:it(p,0,i.width-t.width),y:it(g,0,i.height-t.height)}}function ui(e,t,n){let i=rt(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-i.right:e.x+i.left}function il(e){return Ot([],Ut(e))}function ip(e,t,n){return Ht(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function sl(e,t){let n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}var Ll={beforeTitle:Dt,title(e){if(e.length>0){let t=e[0],n=t.chart.data.labels,i=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(i>0&&t.dataIndex"u"?Ll[t].call(n,i):s}var _i=class extends yt{static positioners=bn;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(){let t=this._cachedAnimations;if(t)return t;let n=this.chart,i=this.options.setContext(this.getContext()),s=i.enabled&&n.options.animation&&i.animations,r=new pi(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=ip(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){let{callbacks:i}=n,s=ft(i,"beforeTitle",this,t),r=ft(i,"title",this,t),o=ft(i,"afterTitle",this,t),a=[];return a=Ot(a,Ut(s)),a=Ot(a,Ut(r)),a=Ot(a,Ut(o)),a}getBeforeBody(t,n){return il(ft(n.callbacks,"beforeBody",this,t))}getBody(t,n){let{callbacks:i}=n,s=[];return z(t,r=>{let o={before:[],lines:[],after:[]},a=sl(i,r);Ot(o.before,Ut(ft(a,"beforeLabel",this,r))),Ot(o.lines,ft(a,"label",this,r)),Ot(o.after,Ut(ft(a,"afterLabel",this,r))),s.push(o)}),s}getAfterBody(t,n){return il(ft(n.callbacks,"afterBody",this,t))}getFooter(t,n){let{callbacks:i}=n,s=ft(i,"beforeFooter",this,t),r=ft(i,"footer",this,t),o=ft(i,"afterFooter",this,t),a=[];return a=Ot(a,Ut(s)),a=Ot(a,Ut(r)),a=Ot(a,Ut(o)),a}_createItems(t){let n=this._active,i=this.chart.data,s=[],r=[],o=[],a=[],l,c;for(l=0,c=n.length;lt.filter(u,f,d,i))),t.itemSort&&(a=a.sort((u,f)=>t.itemSort(u,f,i))),z(a,u=>{let f=sl(t.callbacks,u);s.push(ft(f,"labelColor",this,u)),r.push(ft(f,"labelPointStyle",this,u)),o.push(ft(f,"labelTextColor",this,u))}),this.labelColors=s,this.labelPointStyles=r,this.labelTextColors=o,this.dataPoints=a,a}update(t,n){let i=this.options.setContext(this.getContext()),s=this._active,r,o=[];if(!s.length)this.opacity!==0&&(r={opacity:0});else{let a=bn[i.position].call(this,s,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);let l=this._size=tl(this,i),c=Object.assign({},a,l),u=el(this.chart,i,c),f=nl(i,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,r={opacity:1,x:f.x,y:f.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=o,this.$context=void 0,r&&this._resolveAnimations().update(this,r),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,i,s){let r=this.getCaretPosition(t,i,s);n.lineTo(r.x1,r.y1),n.lineTo(r.x2,r.y2),n.lineTo(r.x3,r.y3)}getCaretPosition(t,n,i){let{xAlign:s,yAlign:r}=this,{caretSize:o,cornerRadius:a}=i,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:f}=Jt(a),{x:d,y:h}=t,{width:p,height:g}=n,m,b,x,y,w,v;return r==="center"?(w=h+g/2,s==="left"?(m=d,b=m-o,y=w+o,v=w-o):(m=d+p,b=m+o,y=w-o,v=w+o),x=m):(s==="left"?b=d+Math.max(l,u)+o:s==="right"?b=d+p-Math.max(c,f)-o:b=this.caretX,r==="top"?(y=h,w=y-o,m=b-o,x=b+o):(y=h+g,w=y+o,m=b+o,x=b-o),v=y),{x1:m,x2:b,x3:x,y1:y,y2:w,y3:v}}drawTitle(t,n,i){let s=this.title,r=s.length,o,a,l;if(r){let c=de(i.rtl,this.x,this.width);for(t.x=ui(this,i.titleAlign,i),n.textAlign=c.textAlign(i.titleAlign),n.textBaseline="middle",o=nt(i.titleFont),a=i.titleSpacing,n.fillStyle=i.titleColor,n.font=o.string,l=0;lx!==0)?(t.beginPath(),t.fillStyle=r.multiKeyBackground,Ee(t,{x:g,y:p,w:c,h:l,radius:b}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),Ee(t,{x:m,y:p+1,w:c-2,h:l-2,radius:b}),t.fill()):(t.fillStyle=r.multiKeyBackground,t.fillRect(g,p,c,l),t.strokeRect(g,p,c,l),t.fillStyle=o.backgroundColor,t.fillRect(m,p+1,c-2,l-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,n,i){let{body:s}=this,{bodySpacing:r,bodyAlign:o,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:u}=i,f=nt(i.bodyFont),d=f.lineHeight,h=0,p=de(i.rtl,this.x,this.width),g=function(D){n.fillText(D,p.x(t.x+h),t.y+d/2),t.y+=d+r},m=p.textAlign(o),b,x,y,w,v,k,S;for(n.textAlign=o,n.textBaseline="middle",n.font=f.string,t.x=ui(this,m,i),n.fillStyle=i.bodyColor,z(this.beforeBody,g),h=a&&m!=="right"?o==="center"?c/2+u:c+2+u:0,w=0,k=s.length;w0&&n.stroke()}_updateAnimationTarget(t){let n=this.chart,i=this.$animations,s=i&&i.x,r=i&&i.y;if(s||r){let o=bn[t.position].call(this,this._active,this._eventPosition);if(!o)return;let a=this._size=tl(this,t),l=Object.assign({},o,this._size),c=el(n,t,l),u=nl(t,l,c,n);(s._to!==u.x||r._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(t){let n=this.options.setContext(this.getContext()),i=this.opacity;if(!i)return;this._updateAnimationTarget(n);let s={width:this.width,height:this.height},r={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;let o=rt(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=i,this.drawBackground(r,t,s,n),Ks(t,n.textDirection),r.y+=o.top,this.drawTitle(r,t,n),this.drawBody(r,t,n),this.drawFooter(r,t,n),Zs(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){let i=this._active,s=t.map(({datasetIndex:a,index:l})=>{let 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}}),r=!an(i,s),o=this._positionChanged(s,n);(r||o)&&(this._active=s,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,i=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;let s=this.options,r=this._active||[],o=this._getActiveElements(t,r,n,i),a=this._positionChanged(o,t),l=n||!an(o,r)||a;return l&&(this._active=o,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,i,s){let r=this.options;if(t.type==="mouseout")return[];if(!s)return n.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);let o=this.chart.getElementsAtEventForMode(t,r.mode,r,i);return r.reverse&&o.reverse(),o}_positionChanged(t,n){let{caretX:i,caretY:s,options:r}=this,o=bn[r.position].call(this,t,n);return o!==!1&&(i!==o.x||s!==o.y)}},sp={id:"tooltip",_element:_i,positioners:bn,afterInit(e,t,n){n&&(e.tooltip=new _i({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){let t=e.tooltip;if(t&&t._willRender()){let 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){let 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:Ll},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"]},rp=Object.freeze({__proto__:null,Colors:bh,Decimation:_h,Filler:Hh,Legend:Xh,SubTitle:Gh,Title:Qh,Tooltip:sp}),op=(e,t,n,i)=>(typeof t=="string"?(n=e.push(t)-1,i.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function ap(e,t,n,i){let s=e.indexOf(t);if(s===-1)return op(e,t,n,i);let r=e.lastIndexOf(t);return s!==r?n:s}var lp=(e,t)=>e===null?null:it(Math.round(e),0,t);function rl(e){let 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}};function cp(e,t){let n=[],{bounds:s,step:r,min:o,max:a,precision:l,count:c,maxTicks:u,maxDigits:f,includeBounds:d}=e,h=r||1,p=u-1,{min:g,max:m}=t,b=!F(o),x=!F(a),y=!F(c),w=(m-g)/(f+1),v=Ps((m-g)/p/h)*h,k,S,D,C;if(v<1e-14&&!b&&!x)return[{value:g},{value:m}];C=Math.ceil(m/v)-Math.floor(g/v),C>p&&(v=Ps(C*v/p/h)*h),F(l)||(k=Math.pow(10,l),v=Math.ceil(v*k)/k),s==="ticks"?(S=Math.floor(g/v)*v,D=Math.ceil(m/v)*v):(S=g,D=m),b&&x&&r&&qo((a-o)/r,v/1e3)?(C=Math.round(Math.min((a-o)/v,u)),v=(a-o)/C,S=o,D=a):y?(S=b?o:S,D=x?a:D,C=c-1,v=(D-S)/C):(C=(D-S)/v,Ae(C,Math.round(C),v/1e3)?C=Math.round(C):C=Math.ceil(C));let T=Math.max(Is(v),Is(S));k=Math.pow(10,F(l)?T:l),S=Math.round(S*k)/k,D=Math.round(D*k)/k;let P=0;for(b&&(d&&S!==o?(n.push({value:o}),Sa)break;n.push({value:I})}return x&&d&&D!==a?n.length&&Ae(n[n.length-1].value,a,ol(a,w,e))?n[n.length-1].value=a:n.push({value:a}):(!x||D===a)&&n.push({value:D}),n}function ol(e,t,{horizontal:n,minRotation:i}){let s=pt(i),r=(n?Math.sin(s):Math.cos(s))||.001,o=.75*t*(""+e).length;return Math.min(t/r,o)}var Be=class extends ge{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return F(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){let{beginAtZero:t}=this.options,{minDefined:n,maxDefined:i}=this.getUserBounds(),{min:s,max:r}=this,o=l=>s=n?s:l,a=l=>r=i?r:l;if(t){let l=xt(s),c=xt(r);l<0&&c<0?a(0):l>0&&c>0&&o(0)}if(s===r){let l=r===0?1:Math.abs(r*.05);a(r+l),t||o(s-l)}this.min=s,this.max=r}getTickLimit(){let t=this.options.ticks,{maxTicksLimit:n,stepSize:i}=t,s;return i?(s=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),n=n||11),n&&(s=Math.min(n,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){let t=this.options,n=t.ticks,i=this.getTickLimit();i=Math.max(2,i);let s={maxTicks:i,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},r=this._range||this,o=cp(s,r);return t.bounds==="ticks"&&As(o,this,"value"),t.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){let t=this.ticks,n=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){let s=(i-n)/Math.max(t.length-1,1)/2;n-=s,i+=s}this._startValue=n,this._endValue=i,this._valueRange=i-n}getLabelForValue(t){return Le(t,this.chart.options.locale,this.options.ticks.format)}},Lr=class extends Be{static id="linear";static defaults={ticks:{callback:ln.formatters.numeric}};determineDataLimits(){let{min:t,max:n}=this.getMinMax(!0);this.min=Q(t)?t:0,this.max=Q(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){let t=this.isHorizontal(),n=t?this.width:this.height,i=pt(this.options.ticks.minRotation),s=(t?Math.sin(i):Math.cos(i))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,r.lineHeight/s))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}},_n=e=>Math.floor(zt(e)),pe=(e,t)=>Math.pow(10,_n(e)+t);function al(e){return e/Math.pow(10,_n(e))===1}function ll(e,t,n){let i=Math.pow(10,n),s=Math.floor(e/i);return Math.ceil(t/i)-s}function up(e,t){let n=t-e,i=_n(n);for(;ll(e,t,i)>10;)i++;for(;ll(e,t,i)<10;)i--;return Math.min(i,_n(e))}function fp(e,{min:t,max:n}){t=ut(e.min,t);let i=[],s=_n(t),r=up(t,n),o=r<0?Math.pow(10,Math.abs(r)):1,a=Math.pow(10,r),l=s>r?Math.pow(10,s):0,c=Math.round((t-l)*o)/o,u=Math.floor((t-l)/a/10)*a*10,f=Math.floor((c-u)/Math.pow(10,r)),d=ut(e.min,Math.round((l+u+f*Math.pow(10,r))*o)/o);for(;d=10?f=f<15?15:20:f++,f>=20&&(r++,f=2,o=r>=0?1:o),d=Math.round((l+u+f*Math.pow(10,r))*o)/o;let h=ut(e.max,d);return i.push({value:h,major:al(h),significand:f}),i}var Er=class extends ge{static id="logarithmic";static defaults={ticks:{callback:ln.formatters.logarithmic,major:{enabled:!0}}};constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,n){let i=Be.prototype.parse.apply(this,[t,n]);if(i===0){this._zero=!0;return}return Q(i)&&i>0?i:null}determineDataLimits(){let{min:t,max:n}=this.getMinMax(!0);this.min=Q(t)?Math.max(0,t):null,this.max=Q(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!Q(this._userMin)&&(this.min=t===pe(this.min,0)?pe(this.min,-1):pe(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){let{minDefined:t,maxDefined:n}=this.getUserBounds(),i=this.min,s=this.max,r=a=>i=t?i:a,o=a=>s=n?s:a;i===s&&(i<=0?(r(1),o(10)):(r(pe(i,-1)),o(pe(s,1)))),i<=0&&r(pe(s,-1)),s<=0&&o(pe(i,1)),this.min=i,this.max=s}buildTicks(){let t=this.options,n={min:this._userMin,max:this._userMax},i=fp(n,this);return t.bounds==="ticks"&&As(i,this,"value"),t.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(t){return t===void 0?"0":Le(t,this.chart.options.locale,this.options.ticks.format)}configure(){let t=this.min;super.configure(),this._startValue=zt(t),this._valueRange=zt(this.max)-zt(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(zt(t)-this._startValue)/this._valueRange)}getValueForPixel(t){let n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}};function Rr(e){let t=e.ticks;if(t.display&&e.display){let n=rt(t.backdropPadding);return A(t.font&&t.font.size,G.font.size)+n.height}return 0}function dp(e,t,n){return n=U(n)?n:[n],{w:ta(e,t.string,n),h:n.length*t.lineHeight}}function cl(e,t,n,i,s){return e===i||e===s?{start:t-n/2,end:t+n/2}:es?{start:t-n,end:t}:{start:t,end:t+n}}function hp(e){let 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),i=[],s=[],r=e._pointLabels.length,o=e.options.pointLabels,a=o.centerPointLabels?V/r:0;for(let l=0;lt.r&&(a=(i.end-t.r)/r,e.r=Math.max(e.r,t.r+a)),s.startt.b&&(l=(s.end-t.b)/o,e.b=Math.max(e.b,t.b+l))}function gp(e,t,n){let i=e.drawingArea,{extra:s,additionalAngle:r,padding:o,size:a}=n,l=e.getPointPosition(t,i+s+o,r),c=Math.round(Qn(ct(l.angle+J))),u=vp(l.y,a.h,c),f=xp(c),d=yp(l.x,a.w,f);return{visible:!0,x:l.x,y:u,textAlign:f,left:d,top:u,right:d+a.w,bottom:u+a.h}}function mp(e,t){if(!t)return!0;let{left:n,top:i,right:s,bottom:r}=e;return!(St({x:n,y:i},t)||St({x:n,y:r},t)||St({x:s,y:i},t)||St({x:s,y:r},t))}function bp(e,t,n){let i=[],s=e._pointLabels.length,r=e.options,{centerPointLabels:o,display:a}=r.pointLabels,l={extra:Rr(r)/2,additionalAngle:o?V/s:0},c;for(let u=0;u270||n<90)&&(e-=t),e}function _p(e,t,n){let{left:i,top:s,right:r,bottom:o}=n,{backdropColor:a}=t;if(!F(a)){let l=Jt(t.borderRadius),c=rt(t.backdropPadding);e.fillStyle=a;let u=i-c.left,f=s-c.top,d=r-i+c.width,h=o-s+c.height;Object.values(l).some(p=>p!==0)?(e.beginPath(),Ee(e,{x:u,y:f,w:d,h,radius:l}),e.fill()):e.fillRect(u,f,d,h)}}function wp(e,t){let{ctx:n,options:{pointLabels:i}}=e;for(let s=t-1;s>=0;s--){let r=e._pointLabelItems[s];if(!r.visible)continue;let o=i.setContext(e.getPointLabelContext(s));_p(n,o,r);let a=nt(o.font),{x:l,y:c,textAlign:u}=r;Zt(n,e._pointLabels[s],l,c+a.lineHeight/2,a,{color:o.color,textAlign:u,textBaseline:"middle"})}}function El(e,t,n,i){let{ctx:s}=e;if(n)s.arc(e.xCenter,e.yCenter,t,0,q);else{let r=e.getPointPosition(0,t);s.moveTo(r.x,r.y);for(let o=1;o{let s=H(this.options.pointLabels.callback,[n,i],this);return s||s===0?s:""}).filter((n,i)=>this.chart.getDataVisibility(i))}fit(){let t=this.options;t.display&&t.pointLabels.display?hp(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,n,i,s){this.xCenter+=Math.floor((t-n)/2),this.yCenter+=Math.floor((i-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,n,i,s))}getIndexAngle(t){let n=q/(this._pointLabels.length||1),i=this.options.startAngle||0;return ct(t*n+pt(i))}getDistanceFromCenterForValue(t){if(F(t))return NaN;let n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*n:(t-this.min)*n}getValueForDistanceFromCenter(t){if(F(t))return NaN;let n=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(t){let n=this._pointLabels||[];if(t>=0&&t{if(f!==0||f===0&&this.min<0){l=this.getDistanceFromCenterForValue(u.value);let d=this.getContext(f),h=s.setContext(d),p=r.setContext(d);Mp(this,h,l,o,p)}}),i.display){for(t.save(),a=o-1;a>=0;a--){let u=i.setContext(this.getPointLabelContext(a)),{color:f,lineWidth:d}=u;!d||!f||(t.lineWidth=d,t.strokeStyle=f,t.setLineDash(u.borderDash),t.lineDashOffset=u.borderDashOffset,l=this.getDistanceFromCenterForValue(n.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(){let t=this.ctx,n=this.options,i=n.ticks;if(!i.display)return;let s=this.getIndexAngle(0),r,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(s),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((a,l)=>{if(l===0&&this.min>=0&&!n.reverse)return;let c=i.setContext(this.getContext(l)),u=nt(c.font);if(r=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=u.string,o=t.measureText(a.label).width,t.fillStyle=c.backdropColor;let f=rt(c.backdropPadding);t.fillRect(-o/2-f.left,-r-u.size/2-f.top,o+f.width,u.size+f.height)}Zt(t,a.label,0,-r,u,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),t.restore()}drawTitle(){}},wi={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}},dt=Object.keys(wi);function ul(e,t){return e-t}function fl(e,t){if(F(t))return null;let n=e._adapter,{parser:i,round:s,isoWeekday:r}=e._parseOpts,o=t;return typeof i=="function"&&(o=i(o)),Q(o)||(o=typeof i=="string"?n.parse(o,i):n.parse(o)),o===null?null:(s&&(o=s==="week"&&(fe(r)||r===!0)?n.startOf(o,"isoWeek",r):n.startOf(o,s)),+o)}function dl(e,t,n,i){let s=dt.length;for(let r=dt.indexOf(e);r=dt.indexOf(n);r--){let o=dt[r];if(wi[o].common&&e._adapter.diff(s,i,o)>=t-1)return o}return dt[n?dt.indexOf(n):0]}function Dp(e){for(let t=dt.indexOf(e)+1,n=dt.length;t=t?n[i]:n[s];e[r]=!0}}function Cp(e,t,n,i){let s=e._adapter,r=+s.startOf(t[0].value,i),o=t[t.length-1].value,a,l;for(a=r;a<=o;a=+s.add(a,1,i))l=n[a],l>=0&&(t[l].major=!0);return t}function pl(e,t,n){let i=[],s={},r=t.length,o,a;for(o=0;o+t.value))}initOffsets(t=[]){let n=0,i=0,s,r;this.options.offset&&t.length&&(s=this.getDecimalForValue(t[0]),t.length===1?n=1-s:n=(this.getDecimalForValue(t[1])-s)/2,r=this.getDecimalForValue(t[t.length-1]),t.length===1?i=r:i=(r-this.getDecimalForValue(t[t.length-2]))/2);let o=t.length<3?.5:.25;n=it(n,0,o),i=it(i,0,o),this._offsets={start:n,end:i,factor:1/(n+1+i)}}_generate(){let t=this._adapter,n=this.min,i=this.max,s=this.options,r=s.time,o=r.unit||dl(r.minUnit,n,i,this._getLabelCapacity(n)),a=A(s.ticks.stepSize,1),l=o==="week"?r.isoWeekday:!1,c=fe(l)||l===!0,u={},f=n,d,h;if(c&&(f=+t.startOf(f,"isoWeek",l)),f=+t.startOf(f,c?"day":o),t.diff(i,n,o)>1e5*a)throw new Error(n+" and "+i+" are too far apart with stepSize of "+a+" "+o);let p=s.ticks.source==="data"&&this.getDataTimestamps();for(d=f,h=0;d+g)}getLabelForValue(t){let n=this._adapter,i=this.options.time;return i.tooltipFormat?n.format(t,i.tooltipFormat):n.format(t,i.displayFormats.datetime)}format(t,n){let s=this.options.time.displayFormats,r=this._unit,o=n||s[r];return this._adapter.format(t,o)}_tickFormatFunction(t,n,i,s){let r=this.options,o=r.ticks.callback;if(o)return H(o,[t,n,i],this);let a=r.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&a[l],f=c&&a[c],d=i[n],h=c&&f&&d&&d.major;return this._adapter.format(t,s||(h?f:u))}generateTickLabels(t){let n,i,s;for(n=0,i=t.length;n0?a:1}getDataTimestamps(){let t=this._cache.data||[],n,i;if(t.length)return t;let s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(n=0,i=s.length;n=e[i].pos&&t<=e[s].pos&&({lo:i,hi:s}=kt(e,"pos",t)),{pos:r,time:a}=e[i],{pos:o,time:l}=e[s]):(t>=e[i].time&&t<=e[s].time&&({lo:i,hi:s}=kt(e,"time",t)),{time:r,pos:a}=e[i],{time:o,pos:l}=e[s]);let c=o-r;return c?a+(l-a)*(t-r)/c:a}var Wr=class extends wn{static id="timeseries";static defaults=wn.defaults;constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){let t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=fi(n,this.min),this._tableRange=fi(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){let{min:n,max:i}=this,s=[],r=[],o,a,l,c,u;for(o=0,a=t.length;o=n&&c<=i&&s.push(c);if(s.length<2)return[{time:n,pos:0},{time:i,pos:1}];for(o=0,a=s.length;os-r)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;let n=this.getDataTimestamps(),i=this.getLabelTimestamps();return n.length&&i.length?t=this.normalize(n.concat(i)):t=n.length?n:i,t=this._cache.all=t,t}getDecimalForValue(t){return(fi(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){let n=this._offsets,i=this.getDecimalForPixel(t)/n.factor-n.end;return fi(this._table,i*this._tableRange+this._minPos,!0)}},Op=Object.freeze({__proto__:null,CategoryScale:Ir,LinearScale:Lr,LogarithmicScale:Er,RadialLinearScale:Fr,TimeScale:wn,TimeSeriesScale:Wr}),Rl=[Hf,fh,rp,Op];Ne.register(...Rl);var Fl=Ne;function O(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 _(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function M(e){_(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||typeof 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://git.io/fjule"),console.warn(new Error().stack)),new Date(NaN))}function He(e,t){_(2,arguments);var n=M(e),i=O(t);return isNaN(i)?new Date(NaN):(i&&n.setDate(n.getDate()+i),n)}function ne(e,t){_(2,arguments);var n=M(e),i=O(t);if(isNaN(i))return new Date(NaN);if(!i)return n;var s=n.getDate(),r=new Date(n.getTime());r.setMonth(n.getMonth()+i+1,0);var o=r.getDate();return s>=o?r:(n.setFullYear(r.getFullYear(),r.getMonth(),s),n)}function gt(e,t){_(2,arguments);var n=M(e).getTime(),i=O(t);return new Date(n+i)}var Tp=36e5;function Mi(e,t){_(2,arguments);var n=O(t);return gt(e,n*Tp)}function kn(e,t){_(1,arguments);var n=t||{},i=n.locale,s=i&&i.options&&i.options.weekStartsOn,r=s==null?0:O(s),o=n.weekStartsOn==null?r:O(n.weekStartsOn);if(!(o>=0&&o<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var a=M(e),l=a.getDay(),c=(l0?1:s}var Ip=Math.pow(10,8)*24*60*60*1e3,Wl=6e4,Nl=36e5;var gb=-Ip;function Hr(e){return _(1,arguments),e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Ye(e){if(_(1,arguments),!Hr(e)&&typeof e!="number")return!1;var t=M(e);return!isNaN(Number(t))}function Yr(e,t){_(2,arguments);var n=M(e),i=M(t),s=n.getFullYear()-i.getFullYear(),r=n.getMonth()-i.getMonth();return s*12+r}function Ur(e,t){_(2,arguments);var n=M(e),i=M(t);return n.getFullYear()-i.getFullYear()}function zl(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 Ue(e,t){_(2,arguments);var n=M(e),i=M(t),s=zl(n,i),r=Math.abs(Br(n,i));n.setDate(n.getDate()-s*r);var o=+(zl(n,i)===-s),a=s*(r-o);return a===0?0:a}function At(e,t){return _(2,arguments),M(e).getTime()-M(t).getTime()}var Bl={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}},Lp="trunc";function It(e){return e?Bl[e]:Bl[Lp]}function Ti(e,t,n){_(2,arguments);var i=At(e,t)/Nl;return It(n?.roundingMethod)(i)}function Pi(e,t,n){_(2,arguments);var i=At(e,t)/Wl;return It(n?.roundingMethod)(i)}function Ve(e){_(1,arguments);var t=M(e);return t.setHours(23,59,59,999),t}function qe(e){_(1,arguments);var t=M(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function Vr(e){_(1,arguments);var t=M(e);return Ve(t).getTime()===qe(t).getTime()}function je(e,t){_(2,arguments);var n=M(e),i=M(t),s=se(n,i),r=Math.abs(Yr(n,i)),o;if(r<1)o=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-s*r);var a=se(n,i)===-s;Vr(M(e))&&r===1&&se(e,i)===1&&(a=!1),o=s*(r-Number(a))}return o===0?0:o}function Ai(e,t,n){_(2,arguments);var i=je(e,t)/3;return It(n?.roundingMethod)(i)}function Ii(e,t,n){_(2,arguments);var i=At(e,t)/1e3;return It(n?.roundingMethod)(i)}function Li(e,t,n){_(2,arguments);var i=Ue(e,t)/7;return It(n?.roundingMethod)(i)}function Ei(e,t){_(2,arguments);var n=M(e),i=M(t),s=se(n,i),r=Math.abs(Ur(n,i));n.setFullYear(1584),i.setFullYear(1584);var o=se(n,i)===-s,a=s*(r-Number(o));return a===0?0:a}function Ri(e){_(1,arguments);var t=M(e);return t.setSeconds(0,0),t}function Fi(e){_(1,arguments);var t=M(e),n=t.getMonth(),i=n-n%3;return t.setMonth(i,1),t.setHours(0,0,0,0),t}function Wi(e){_(1,arguments);var t=M(e);return t.setDate(1),t.setHours(0,0,0,0),t}function Ni(e){_(1,arguments);var t=M(e),n=new Date(0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function zi(e){_(1,arguments);var t=M(e),n=t.getFullYear();return t.setFullYear(n+1,0,0),t.setHours(23,59,59,999),t}function Bi(e){_(1,arguments);var t=M(e);return t.setMinutes(59,59,999),t}function Hi(e,t){_(1,arguments);var n=t||{},i=n.locale,s=i&&i.options&&i.options.weekStartsOn,r=s==null?0:O(s),o=n.weekStartsOn==null?r:O(n.weekStartsOn);if(!(o>=0&&o<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var a=M(e),l=a.getDay(),c=(l0?"in "+i:i+" ago":i},Hl=Rp;function Sn(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,i=e.formats[n]||e.formats[e.defaultWidth];return i}}var Fp={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Wp={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Np={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},zp={date:Sn({formats:Fp,defaultWidth:"full"}),time:Sn({formats:Wp,defaultWidth:"full"}),dateTime:Sn({formats:Np,defaultWidth:"full"})},Yl=zp;var Bp={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Hp=function(e,t,n,i){return Bp[e]},Ul=Hp;function be(e){return function(t,n){var i=n||{},s=i.context?String(i.context):"standalone",r;if(s==="formatting"&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,a=i.width?String(i.width):o;r=e.formattingValues[a]||e.formattingValues[o]}else{var l=e.defaultWidth,c=i.width?String(i.width):e.defaultWidth;r=e.values[c]||e.values[l]}var u=e.argumentCallback?e.argumentCallback(t):t;return r[u]}}var Yp={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Up={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Vp={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"]},qp={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"]},jp={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"}},Xp={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"}},$p=function(e,t){var n=Number(e),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Qp={ordinalNumber:$p,era:be({values:Yp,defaultWidth:"wide"}),quarter:be({values:Up,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:be({values:Vp,defaultWidth:"wide"}),day:be({values:qp,defaultWidth:"wide"}),dayPeriod:be({values:jp,defaultWidth:"wide",formattingValues:Xp,defaultFormattingWidth:"wide"})},Vl=Qp;function xe(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.width,s=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],r=t.match(s);if(!r)return null;var o=r[0],a=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?Kp(a,function(f){return f.test(o)}):Gp(a,function(f){return f.test(o)}),c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;var u=t.slice(o.length);return{value:c,rest:u}}}function Gp(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function Kp(e,t){for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:{},i=t.match(e.matchPattern);if(!i)return null;var s=i[0],r=t.match(e.parsePattern);if(!r)return null;var o=e.valueCallback?e.valueCallback(r[0]):r[0];o=n.valueCallback?n.valueCallback(o):o;var a=t.slice(s.length);return{value:o,rest:a}}}var Zp=/^(\d+)(th|st|nd|rd)?/i,Jp=/\d+/i,tg={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},eg={any:[/^b/i,/^(a|c)/i]},ng={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},ig={any:[/1/i,/2/i,/3/i,/4/i]},sg={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},rg={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]},og={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},ag={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]},lg={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},cg={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}},ug={ordinalNumber:qr({matchPattern:Zp,parsePattern:Jp,valueCallback:function(e){return parseInt(e,10)}}),era:xe({matchPatterns:tg,defaultMatchWidth:"wide",parsePatterns:eg,defaultParseWidth:"any"}),quarter:xe({matchPatterns:ng,defaultMatchWidth:"wide",parsePatterns:ig,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:xe({matchPatterns:sg,defaultMatchWidth:"wide",parsePatterns:rg,defaultParseWidth:"any"}),day:xe({matchPatterns:og,defaultMatchWidth:"wide",parsePatterns:ag,defaultParseWidth:"any"}),dayPeriod:xe({matchPatterns:lg,defaultMatchWidth:"any",parsePatterns:cg,defaultParseWidth:"any"})},ql=ug;var fg={code:"en-US",formatDistance:Hl,formatLong:Yl,formatRelative:Ul,localize:Vl,match:ql,options:{weekStartsOn:0,firstWeekContainsDate:1}},qi=fg;function Dn(e,t){_(2,arguments);var n=O(t);return gt(e,-n)}function N(e,t){for(var n=e<0?"-":"",i=Math.abs(e).toString();i.length0?n:1-n;return N(t==="yy"?i%100:i,t.length)},M:function(e,t){var n=e.getUTCMonth();return t==="M"?String(n+1):N(n+1,2)},d:function(e,t){return N(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(e,t){return N(e.getUTCHours()%12||12,t.length)},H:function(e,t){return N(e.getUTCHours(),t.length)},m:function(e,t){return N(e.getUTCMinutes(),t.length)},s:function(e,t){return N(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,i=e.getUTCMilliseconds(),s=Math.floor(i*Math.pow(10,n-3));return N(s,t.length)}},Vt=dg;var hg=864e5;function jr(e){_(1,arguments);var t=M(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var i=t.getTime(),s=n-i;return Math.floor(s/hg)+1}function vt(e){_(1,arguments);var t=1,n=M(e),i=n.getUTCDay(),s=(i=s.getTime()?n+1:t.getTime()>=o.getTime()?n:n-1}function Xr(e){_(1,arguments);var t=Cn(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var i=vt(n);return i}var pg=6048e5;function On(e){_(1,arguments);var t=M(e),n=vt(t).getTime()-Xr(t).getTime();return Math.round(n/pg)+1}function mt(e,t){_(1,arguments);var n=t||{},i=n.locale,s=i&&i.options&&i.options.weekStartsOn,r=s==null?0:O(s),o=n.weekStartsOn==null?r:O(n.weekStartsOn);if(!(o>=0&&o<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var a=M(e),l=a.getUTCDay(),c=(l=1&&l<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var c=new Date(0);c.setUTCFullYear(i+1,0,l),c.setUTCHours(0,0,0,0);var u=mt(c,t),f=new Date(0);f.setUTCFullYear(i,0,l),f.setUTCHours(0,0,0,0);var d=mt(f,t);return n.getTime()>=u.getTime()?i+1:n.getTime()>=d.getTime()?i:i-1}function $r(e,t){_(1,arguments);var n=t||{},i=n.locale,s=i&&i.options&&i.options.firstWeekContainsDate,r=s==null?1:O(s),o=n.firstWeekContainsDate==null?r:O(n.firstWeekContainsDate),a=ye(e,t),l=new Date(0);l.setUTCFullYear(a,0,o),l.setUTCHours(0,0,0,0);var c=mt(l,t);return c}var gg=6048e5;function Tn(e,t){_(1,arguments);var n=M(e),i=mt(n,t).getTime()-$r(n,t).getTime();return Math.round(i/gg)+1}var Xe={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},mg={G:function(e,t,n){var i=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});case"GGGG":default:return n.era(i,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){var i=e.getUTCFullYear(),s=i>0?i:1-i;return n.ordinalNumber(s,{unit:"year"})}return Vt.y(e,t)},Y:function(e,t,n,i){var s=ye(e,i),r=s>0?s:1-s;if(t==="YY"){var o=r%100;return N(o,2)}return t==="Yo"?n.ordinalNumber(r,{unit:"year"}):N(r,t.length)},R:function(e,t){var n=Cn(e);return N(n,t.length)},u:function(e,t){var n=e.getUTCFullYear();return N(n,t.length)},Q:function(e,t,n){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(i);case"QQ":return N(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(e,t,n){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(i);case"qq":return N(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(e,t,n){var i=e.getUTCMonth();switch(t){case"M":case"MM":return Vt.M(e,t);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(e,t,n){var i=e.getUTCMonth();switch(t){case"L":return String(i+1);case"LL":return N(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(e,t,n,i){var s=Tn(e,i);return t==="wo"?n.ordinalNumber(s,{unit:"week"}):N(s,t.length)},I:function(e,t,n){var i=On(e);return t==="Io"?n.ordinalNumber(i,{unit:"week"}):N(i,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):Vt.d(e,t)},D:function(e,t,n){var i=jr(e);return t==="Do"?n.ordinalNumber(i,{unit:"dayOfYear"}):N(i,t.length)},E:function(e,t,n){var i=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});case"EEEE":default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(e,t,n,i){var s=e.getUTCDay(),r=(s-i.weekStartsOn+8)%7||7;switch(t){case"e":return String(r);case"ee":return N(r,2);case"eo":return n.ordinalNumber(r,{unit:"day"});case"eee":return n.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(s,{width:"short",context:"formatting"});case"eeee":default:return n.day(s,{width:"wide",context:"formatting"})}},c:function(e,t,n,i){var s=e.getUTCDay(),r=(s-i.weekStartsOn+8)%7||7;switch(t){case"c":return String(r);case"cc":return N(r,t.length);case"co":return n.ordinalNumber(r,{unit:"day"});case"ccc":return n.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(s,{width:"narrow",context:"standalone"});case"cccccc":return n.day(s,{width:"short",context:"standalone"});case"cccc":default:return n.day(s,{width:"wide",context:"standalone"})}},i:function(e,t,n){var i=e.getUTCDay(),s=i===0?7:i;switch(t){case"i":return String(s);case"ii":return N(s,t.length);case"io":return n.ordinalNumber(s,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});case"iiii":default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(e,t,n){var i=e.getUTCHours(),s=i/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(e,t,n){var i=e.getUTCHours(),s;switch(i===12?s=Xe.noon:i===0?s=Xe.midnight:s=i/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(e,t,n){var i=e.getUTCHours(),s;switch(i>=17?s=Xe.evening:i>=12?s=Xe.afternoon:i>=4?s=Xe.morning:s=Xe.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){var i=e.getUTCHours()%12;return i===0&&(i=12),n.ordinalNumber(i,{unit:"hour"})}return Vt.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):Vt.H(e,t)},K:function(e,t,n){var i=e.getUTCHours()%12;return t==="Ko"?n.ordinalNumber(i,{unit:"hour"}):N(i,t.length)},k:function(e,t,n){var i=e.getUTCHours();return i===0&&(i=24),t==="ko"?n.ordinalNumber(i,{unit:"hour"}):N(i,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):Vt.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):Vt.s(e,t)},S:function(e,t){return Vt.S(e,t)},X:function(e,t,n,i){var s=i._originalDate||e,r=s.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Xl(r);case"XXXX":case"XX":return ve(r);case"XXXXX":case"XXX":default:return ve(r,":")}},x:function(e,t,n,i){var s=i._originalDate||e,r=s.getTimezoneOffset();switch(t){case"x":return Xl(r);case"xxxx":case"xx":return ve(r);case"xxxxx":case"xxx":default:return ve(r,":")}},O:function(e,t,n,i){var s=i._originalDate||e,r=s.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+jl(r,":");case"OOOO":default:return"GMT"+ve(r,":")}},z:function(e,t,n,i){var s=i._originalDate||e,r=s.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+jl(r,":");case"zzzz":default:return"GMT"+ve(r,":")}},t:function(e,t,n,i){var s=i._originalDate||e,r=Math.floor(s.getTime()/1e3);return N(r,t.length)},T:function(e,t,n,i){var s=i._originalDate||e,r=s.getTime();return N(r,t.length)}};function jl(e,t){var n=e>0?"-":"+",i=Math.abs(e),s=Math.floor(i/60),r=i%60;if(r===0)return n+String(s);var o=t||"";return n+String(s)+o+N(r,2)}function Xl(e,t){if(e%60===0){var n=e>0?"-":"+";return n+N(Math.abs(e)/60,2)}return ve(e,t)}function ve(e,t){var n=t||"",i=e>0?"-":"+",s=Math.abs(e),r=N(Math.floor(s/60),2),o=N(s%60,2);return i+r+n+o}var $l=mg;function Ql(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}}function Gl(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}}function bg(e,t){var n=e.match(/(P+)(p+)?/),i=n[1],s=n[2];if(!s)return Ql(e,t);var r;switch(i){case"P":r=t.dateTime({width:"short"});break;case"PP":r=t.dateTime({width:"medium"});break;case"PPP":r=t.dateTime({width:"long"});break;case"PPPP":default:r=t.dateTime({width:"full"});break}return r.replace("{{date}}",Ql(i,t)).replace("{{time}}",Gl(s,t))}var xg={p:Gl,P:bg},ji=xg;var yg=["D","DD"],vg=["YY","YYYY"];function Xi(e){return yg.indexOf(e)!==-1}function $i(e){return vg.indexOf(e)!==-1}function $e(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://git.io/fxCyr"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));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://git.io/fxCyr"));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://git.io/fxCyr"))}var _g=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,wg=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Mg=/^'([^]*?)'?$/,kg=/''/g,Sg=/[a-zA-Z]/;function Qi(e,t,n){_(2,arguments);var i=String(t),s=n||{},r=s.locale||qi,o=r.options&&r.options.firstWeekContainsDate,a=o==null?1:O(o),l=s.firstWeekContainsDate==null?a:O(s.firstWeekContainsDate);if(!(l>=1&&l<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var c=r.options&&r.options.weekStartsOn,u=c==null?0:O(c),f=s.weekStartsOn==null?u:O(s.weekStartsOn);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!r.localize)throw new RangeError("locale must contain localize property");if(!r.formatLong)throw new RangeError("locale must contain formatLong property");var d=M(e);if(!Ye(d))throw new RangeError("Invalid time value");var h=ie(d),p=Dn(d,h),g={firstWeekContainsDate:l,weekStartsOn:f,locale:r,_originalDate:d},m=i.match(wg).map(function(b){var x=b[0];if(x==="p"||x==="P"){var y=ji[x];return y(b,r.formatLong,g)}return b}).join("").match(_g).map(function(b){if(b==="''")return"'";var x=b[0];if(x==="'")return Dg(b);var y=$l[x];if(y)return!s.useAdditionalWeekYearTokens&&$i(b)&&$e(b,t,e),!s.useAdditionalDayOfYearTokens&&Xi(b)&&$e(b,t,e),y(p,b,r.localize,g);if(x.match(Sg))throw new RangeError("Format string contains an unescaped latin alphabet character `"+x+"`");return b}).join("");return m}function Dg(e){return e.match(Mg)[1].replace(kg,"'")}function Qr(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");t=t||{};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function Pn(e,t,n){_(2,arguments);var i=n||{},s=i.locale,r=s&&s.options&&s.options.weekStartsOn,o=r==null?0:O(r),a=i.weekStartsOn==null?o:O(i.weekStartsOn);if(!(a>=0&&a<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var l=M(e),c=O(t),u=l.getUTCDay(),f=c%7,d=(f+7)%7,h=(d0,i=n?t:1-t,s;if(i<=50)s=e||100;else{var r=i+50,o=Math.floor(r/100)*100,a=e>=r%100;s=e+o-(a?100:0)}return n?s:1-s}var Pg=[31,28,31,30,31,30,31,31,30,31,30,31],Ag=[31,29,31,30,31,30,31,31,30,31,30,31];function Jl(e){return e%400===0||e%4===0&&e%100!==0}var Ig={G:{priority:140,parse:function(e,t,n,i){switch(t){case"G":case"GG":case"GGG":return n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"});case"GGGGG":return n.era(e,{width:"narrow"});case"GGGG":default:return n.era(e,{width:"wide"})||n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"})}},set:function(e,t,n,i){return t.era=n,e.setUTCFullYear(n,0,1),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["R","u","t","T"]},y:{priority:130,parse:function(e,t,n,i){var s=function(r){return{year:r,isTwoDigitYear:t==="yy"}};switch(t){case"y":return tt(4,e,s);case"yo":return n.ordinalNumber(e,{unit:"year",valueCallback:s});default:return tt(t.length,e,s)}},validate:function(e,t,n){return t.isTwoDigitYear||t.year>0},set:function(e,t,n,i){var s=e.getUTCFullYear();if(n.isTwoDigitYear){var r=Zl(n.year,s);return e.setUTCFullYear(r,0,1),e.setUTCHours(0,0,0,0),e}var o=!("era"in t)||t.era===1?n.year:1-n.year;return e.setUTCFullYear(o,0,1),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["Y","R","u","w","I","i","e","c","t","T"]},Y:{priority:130,parse:function(e,t,n,i){var s=function(r){return{year:r,isTwoDigitYear:t==="YY"}};switch(t){case"Y":return tt(4,e,s);case"Yo":return n.ordinalNumber(e,{unit:"year",valueCallback:s});default:return tt(t.length,e,s)}},validate:function(e,t,n){return t.isTwoDigitYear||t.year>0},set:function(e,t,n,i){var s=ye(e,i);if(n.isTwoDigitYear){var r=Zl(n.year,s);return e.setUTCFullYear(r,0,i.firstWeekContainsDate),e.setUTCHours(0,0,0,0),mt(e,i)}var o=!("era"in t)||t.era===1?n.year:1-n.year;return e.setUTCFullYear(o,0,i.firstWeekContainsDate),e.setUTCHours(0,0,0,0),mt(e,i)},incompatibleTokens:["y","R","u","Q","q","M","L","I","d","D","i","t","T"]},R:{priority:130,parse:function(e,t,n,i){return Gi(t==="R"?4:t.length,e)},set:function(e,t,n,i){var s=new Date(0);return s.setUTCFullYear(n,0,4),s.setUTCHours(0,0,0,0),vt(s)},incompatibleTokens:["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]},u:{priority:130,parse:function(e,t,n,i){return Gi(t==="u"?4:t.length,e)},set:function(e,t,n,i){return e.setUTCFullYear(n,0,1),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["G","y","Y","R","w","I","i","e","c","t","T"]},Q:{priority:120,parse:function(e,t,n,i){switch(t){case"Q":case"QQ":return tt(t.length,e);case"Qo":return n.ordinalNumber(e,{unit:"quarter"});case"QQQ":return n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(e,{width:"wide",context:"formatting"})||n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"})}},validate:function(e,t,n){return t>=1&&t<=4},set:function(e,t,n,i){return e.setUTCMonth((n-1)*3,1),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]},q:{priority:120,parse:function(e,t,n,i){switch(t){case"q":case"qq":return tt(t.length,e);case"qo":return n.ordinalNumber(e,{unit:"quarter"});case"qqq":return n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(e,{width:"wide",context:"standalone"})||n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"})}},validate:function(e,t,n){return t>=1&&t<=4},set:function(e,t,n,i){return e.setUTCMonth((n-1)*3,1),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]},M:{priority:110,parse:function(e,t,n,i){var s=function(r){return r-1};switch(t){case"M":return K(et.month,e,s);case"MM":return tt(2,e,s);case"Mo":return n.ordinalNumber(e,{unit:"month",valueCallback:s});case"MMM":return n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(e,{width:"wide",context:"formatting"})||n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"})}},validate:function(e,t,n){return t>=0&&t<=11},set:function(e,t,n,i){return e.setUTCMonth(n,1),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]},L:{priority:110,parse:function(e,t,n,i){var s=function(r){return r-1};switch(t){case"L":return K(et.month,e,s);case"LL":return tt(2,e,s);case"Lo":return n.ordinalNumber(e,{unit:"month",valueCallback:s});case"LLL":return n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(e,{width:"wide",context:"standalone"})||n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"})}},validate:function(e,t,n){return t>=0&&t<=11},set:function(e,t,n,i){return e.setUTCMonth(n,1),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]},w:{priority:100,parse:function(e,t,n,i){switch(t){case"w":return K(et.week,e);case"wo":return n.ordinalNumber(e,{unit:"week"});default:return tt(t.length,e)}},validate:function(e,t,n){return t>=1&&t<=53},set:function(e,t,n,i){return mt(Zr(e,n,i),i)},incompatibleTokens:["y","R","u","q","Q","M","L","I","d","D","i","t","T"]},I:{priority:100,parse:function(e,t,n,i){switch(t){case"I":return K(et.week,e);case"Io":return n.ordinalNumber(e,{unit:"week"});default:return tt(t.length,e)}},validate:function(e,t,n){return t>=1&&t<=53},set:function(e,t,n,i){return vt(Kr(e,n,i),i)},incompatibleTokens:["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]},d:{priority:90,subPriority:1,parse:function(e,t,n,i){switch(t){case"d":return K(et.date,e);case"do":return n.ordinalNumber(e,{unit:"date"});default:return tt(t.length,e)}},validate:function(e,t,n){var i=e.getUTCFullYear(),s=Jl(i),r=e.getUTCMonth();return s?t>=1&&t<=Ag[r]:t>=1&&t<=Pg[r]},set:function(e,t,n,i){return e.setUTCDate(n),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["Y","R","q","Q","w","I","D","i","e","c","t","T"]},D:{priority:90,subPriority:1,parse:function(e,t,n,i){switch(t){case"D":case"DD":return K(et.dayOfYear,e);case"Do":return n.ordinalNumber(e,{unit:"date"});default:return tt(t.length,e)}},validate:function(e,t,n){var i=e.getUTCFullYear(),s=Jl(i);return s?t>=1&&t<=366:t>=1&&t<=365},set:function(e,t,n,i){return e.setUTCMonth(0,n),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]},E:{priority:90,parse:function(e,t,n,i){switch(t){case"E":case"EE":case"EEE":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEE":default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}},validate:function(e,t,n){return t>=0&&t<=6},set:function(e,t,n,i){return e=Pn(e,n,i),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["D","i","e","c","t","T"]},e:{priority:90,parse:function(e,t,n,i){var s=function(r){var o=Math.floor((r-1)/7)*7;return(r+i.weekStartsOn+6)%7+o};switch(t){case"e":case"ee":return tt(t.length,e,s);case"eo":return n.ordinalNumber(e,{unit:"day",valueCallback:s});case"eee":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeeee":return n.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeee":default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}},validate:function(e,t,n){return t>=0&&t<=6},set:function(e,t,n,i){return e=Pn(e,n,i),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]},c:{priority:90,parse:function(e,t,n,i){var s=function(r){var o=Math.floor((r-1)/7)*7;return(r+i.weekStartsOn+6)%7+o};switch(t){case"c":case"cc":return tt(t.length,e,s);case"co":return n.ordinalNumber(e,{unit:"day",valueCallback:s});case"ccc":return n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"ccccc":return n.day(e,{width:"narrow",context:"standalone"});case"cccccc":return n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"cccc":default:return n.day(e,{width:"wide",context:"standalone"})||n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"})}},validate:function(e,t,n){return t>=0&&t<=6},set:function(e,t,n,i){return e=Pn(e,n,i),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]},i:{priority:90,parse:function(e,t,n,i){var s=function(r){return r===0?7:r};switch(t){case"i":case"ii":return tt(t.length,e);case"io":return n.ordinalNumber(e,{unit:"day"});case"iii":return n.day(e,{width:"abbreviated",context:"formatting",valueCallback:s})||n.day(e,{width:"short",context:"formatting",valueCallback:s})||n.day(e,{width:"narrow",context:"formatting",valueCallback:s});case"iiiii":return n.day(e,{width:"narrow",context:"formatting",valueCallback:s});case"iiiiii":return n.day(e,{width:"short",context:"formatting",valueCallback:s})||n.day(e,{width:"narrow",context:"formatting",valueCallback:s});case"iiii":default:return n.day(e,{width:"wide",context:"formatting",valueCallback:s})||n.day(e,{width:"abbreviated",context:"formatting",valueCallback:s})||n.day(e,{width:"short",context:"formatting",valueCallback:s})||n.day(e,{width:"narrow",context:"formatting",valueCallback:s})}},validate:function(e,t,n){return t>=1&&t<=7},set:function(e,t,n,i){return e=Gr(e,n,i),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]},a:{priority:80,parse:function(e,t,n,i){switch(t){case"a":case"aa":case"aaa":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}},set:function(e,t,n,i){return e.setUTCHours(Jr(n),0,0,0),e},incompatibleTokens:["b","B","H","K","k","t","T"]},b:{priority:80,parse:function(e,t,n,i){switch(t){case"b":case"bb":case"bbb":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}},set:function(e,t,n,i){return e.setUTCHours(Jr(n),0,0,0),e},incompatibleTokens:["a","B","H","K","k","t","T"]},B:{priority:80,parse:function(e,t,n,i){switch(t){case"B":case"BB":case"BBB":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}},set:function(e,t,n,i){return e.setUTCHours(Jr(n),0,0,0),e},incompatibleTokens:["a","b","t","T"]},h:{priority:70,parse:function(e,t,n,i){switch(t){case"h":return K(et.hour12h,e);case"ho":return n.ordinalNumber(e,{unit:"hour"});default:return tt(t.length,e)}},validate:function(e,t,n){return t>=1&&t<=12},set:function(e,t,n,i){var s=e.getUTCHours()>=12;return s&&n<12?e.setUTCHours(n+12,0,0,0):!s&&n===12?e.setUTCHours(0,0,0,0):e.setUTCHours(n,0,0,0),e},incompatibleTokens:["H","K","k","t","T"]},H:{priority:70,parse:function(e,t,n,i){switch(t){case"H":return K(et.hour23h,e);case"Ho":return n.ordinalNumber(e,{unit:"hour"});default:return tt(t.length,e)}},validate:function(e,t,n){return t>=0&&t<=23},set:function(e,t,n,i){return e.setUTCHours(n,0,0,0),e},incompatibleTokens:["a","b","h","K","k","t","T"]},K:{priority:70,parse:function(e,t,n,i){switch(t){case"K":return K(et.hour11h,e);case"Ko":return n.ordinalNumber(e,{unit:"hour"});default:return tt(t.length,e)}},validate:function(e,t,n){return t>=0&&t<=11},set:function(e,t,n,i){var s=e.getUTCHours()>=12;return s&&n<12?e.setUTCHours(n+12,0,0,0):e.setUTCHours(n,0,0,0),e},incompatibleTokens:["a","b","h","H","k","t","T"]},k:{priority:70,parse:function(e,t,n,i){switch(t){case"k":return K(et.hour24h,e);case"ko":return n.ordinalNumber(e,{unit:"hour"});default:return tt(t.length,e)}},validate:function(e,t,n){return t>=1&&t<=24},set:function(e,t,n,i){var s=n<=24?n%24:n;return e.setUTCHours(s,0,0,0),e},incompatibleTokens:["a","b","h","H","K","t","T"]},m:{priority:60,parse:function(e,t,n,i){switch(t){case"m":return K(et.minute,e);case"mo":return n.ordinalNumber(e,{unit:"minute"});default:return tt(t.length,e)}},validate:function(e,t,n){return t>=0&&t<=59},set:function(e,t,n,i){return e.setUTCMinutes(n,0,0),e},incompatibleTokens:["t","T"]},s:{priority:50,parse:function(e,t,n,i){switch(t){case"s":return K(et.second,e);case"so":return n.ordinalNumber(e,{unit:"second"});default:return tt(t.length,e)}},validate:function(e,t,n){return t>=0&&t<=59},set:function(e,t,n,i){return e.setUTCSeconds(n,0),e},incompatibleTokens:["t","T"]},S:{priority:30,parse:function(e,t,n,i){var s=function(r){return Math.floor(r*Math.pow(10,-t.length+3))};return tt(t.length,e,s)},set:function(e,t,n,i){return e.setUTCMilliseconds(n),e},incompatibleTokens:["t","T"]},X:{priority:10,parse:function(e,t,n,i){switch(t){case"X":return Et(Lt.basicOptionalMinutes,e);case"XX":return Et(Lt.basic,e);case"XXXX":return Et(Lt.basicOptionalSeconds,e);case"XXXXX":return Et(Lt.extendedOptionalSeconds,e);case"XXX":default:return Et(Lt.extended,e)}},set:function(e,t,n,i){return t.timestampIsSet?e:new Date(e.getTime()-n)},incompatibleTokens:["t","T","x"]},x:{priority:10,parse:function(e,t,n,i){switch(t){case"x":return Et(Lt.basicOptionalMinutes,e);case"xx":return Et(Lt.basic,e);case"xxxx":return Et(Lt.basicOptionalSeconds,e);case"xxxxx":return Et(Lt.extendedOptionalSeconds,e);case"xxx":default:return Et(Lt.extended,e)}},set:function(e,t,n,i){return t.timestampIsSet?e:new Date(e.getTime()-n)},incompatibleTokens:["t","T","X"]},t:{priority:40,parse:function(e,t,n,i){return Kl(e)},set:function(e,t,n,i){return[new Date(n*1e3),{timestampIsSet:!0}]},incompatibleTokens:"*"},T:{priority:20,parse:function(e,t,n,i){return Kl(e)},set:function(e,t,n,i){return[new Date(n),{timestampIsSet:!0}]},incompatibleTokens:"*"}},tc=Ig;var Lg=10,Eg=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Rg=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Fg=/^'([^]*?)'?$/,Wg=/''/g,Ng=/\S/,zg=/[a-zA-Z]/;function Ki(e,t,n,i){_(3,arguments);var s=String(e),r=String(t),o=i||{},a=o.locale||qi;if(!a.match)throw new RangeError("locale must contain match property");var l=a.options&&a.options.firstWeekContainsDate,c=l==null?1:O(l),u=o.firstWeekContainsDate==null?c:O(o.firstWeekContainsDate);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var f=a.options&&a.options.weekStartsOn,d=f==null?0:O(f),h=o.weekStartsOn==null?d:O(o.weekStartsOn);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(r==="")return s===""?M(n):new Date(NaN);var p={firstWeekContainsDate:u,weekStartsOn:h,locale:a},g=[{priority:Lg,subPriority:-1,set:Bg,index:0}],m,b=r.match(Rg).map(function(E){var X=E[0];if(X==="p"||X==="P"){var Z=ji[X];return Z(E,a.formatLong,p)}return E}).join("").match(Eg),x=[];for(m=0;m0&&Ng.test(s))return new Date(NaN);var P=g.map(function(E){return E.priority}).sort(function(E,X){return X-E}).filter(function(E,X,Z){return Z.indexOf(E)===X}).map(function(E){return g.filter(function(X){return X.priority===E}).sort(function(X,Z){return Z.subPriority-X.subPriority})}).map(function(E){return E[0]}),I=M(n);if(isNaN(I))return new Date(NaN);var j=Dn(I,ie(I)),ot={};for(m=0;m2)return t;if(/:/.test(n[0])?(t.date=null,i=n[0]):(t.date=n[0],i=n[1],ts.timeZoneDelimiter.test(t.date)&&(t.date=e.split(ts.timeZoneDelimiter)[0],i=e.substr(t.date.length,e.length))),i){var s=ts.timezone.exec(i);s?(t.time=i.replace(s[1],""),t.timezone=s[1]):t.time=i}return t}function Xg(e,t){var n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),i=e.match(n);if(!i)return{year:null};var s=i[1]&&parseInt(i[1]),r=i[2]&&parseInt(i[2]);return{year:r==null?s:r*100,restDateString:e.slice((i[1]||i[2]).length)}}function $g(e,t){if(t===null)return null;var n=e.match(Ug);if(!n)return null;var i=!!n[4],s=An(n[1]),r=An(n[2])-1,o=An(n[3]),a=An(n[4]),l=An(n[5])-1;if(i)return em(t,a,l)?Kg(t,a,l):new Date(NaN);var c=new Date(0);return!Jg(t,r,o)||!tm(t,s)?new Date(NaN):(c.setUTCFullYear(t,r,Math.max(s,o)),c)}function An(e){return e?parseInt(e):1}function Qg(e){var t=e.match(Vg);if(!t)return null;var n=to(t[1]),i=to(t[2]),s=to(t[3]);return nm(n,i,s)?n*ec+i*nc+s*1e3:NaN}function to(e){return e&&parseFloat(e.replace(",","."))||0}function Gg(e){if(e==="Z")return 0;var t=e.match(qg);if(!t)return 0;var n=t[1]==="+"?-1:1,i=parseInt(t[2]),s=t[3]&&parseInt(t[3])||0;return im(i,s)?n*(i*ec+s*nc):NaN}function Kg(e,t,n){var i=new Date(0);i.setUTCFullYear(e,0,4);var s=i.getUTCDay()||7,r=(t-1)*7+n+1-s;return i.setUTCDate(i.getUTCDate()+r),i}var Zg=[31,null,31,30,31,30,31,31,30,31,30,31];function ic(e){return e%400===0||e%4===0&&e%100}function Jg(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(Zg[t]||(ic(e)?29:28))}function tm(e,t){return t>=1&&t<=(ic(e)?366:365)}function em(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function nm(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function im(e,t){return t>=0&&t<=59}var sm={datetime:"MMM d, yyyy, h:mm:ss aaaa",millisecond:"h:mm:ss.SSS aaaa",second:"h:mm:ss aaaa",minute:"h:mm aaaa",hour:"ha",day:"MMM d",week:"PP",month:"MMM yyyy",quarter:"qqq - yyyy",year:"yyyy"};Nr._date.override({_id:"date-fns",formats:function(){return sm},parse:function(e,t){if(e===null||typeof e>"u")return null;let n=typeof e;return n==="number"||e instanceof Date?e=M(e):n==="string"&&(typeof t=="string"?e=Ki(e,t,new Date,this.options):e=es(e,this.options)),Ye(e)?e.getTime():null},format:function(e,t){return Qi(e,t,this.options)},add:function(e,t,n){switch(n){case"millisecond":return gt(e,t);case"second":return Di(e,t);case"minute":return ki(e,t);case"hour":return Mi(e,t);case"day":return He(e,t);case"week":return Ci(e,t);case"month":return ne(e,t);case"quarter":return Si(e,t);case"year":return Oi(e,t);default:return e}},diff:function(e,t,n){switch(n){case"millisecond":return At(e,t);case"second":return Ii(e,t);case"minute":return Pi(e,t);case"hour":return Ti(e,t);case"day":return Ue(e,t);case"week":return Li(e,t);case"month":return je(e,t);case"quarter":return Ai(e,t);case"year":return Ei(e,t);default:return 0}},startOf:function(e,t,n){switch(t){case"second":return Ji(e);case"minute":return Ri(e);case"hour":return Zi(e);case"day":return me(e);case"week":return kn(e);case"isoWeek":return kn(e,{weekStartsOn:+n});case"month":return Wi(e);case"quarter":return Fi(e);case"year":return Ni(e);default:return e}},endOf:function(e,t){switch(t){case"second":return Vi(e);case"minute":return Yi(e);case"hour":return Bi(e);case"day":return Ve(e);case"week":return Hi(e);case"month":return qe(e);case"quarter":return Ui(e);case"year":return zi(e);default:return e}}});W.use(Fl);})(); +/*! Bundled license information: + +chartkick/dist/chartkick.esm.js: + (*! + * Chartkick.js v5.0.1 + * Create beautiful charts with one line of JavaScript + * https://github.com/ankane/chartkick.js + * MIT License + *) + +@kurkle/color/dist/color.esm.js: + (*! + * @kurkle/color v0.3.2 + * https://github.com/kurkle/color#readme + * (c) 2023 Jukka Kurkela + * Released under the MIT License + *) + +chart.js/dist/chunks/helpers.segment.js: + (*! + * Chart.js v4.4.4 + * https://www.chartjs.org + * (c) 2024 Chart.js Contributors + * Released under the MIT License + *) + +chart.js/dist/chart.js: + (*! + * Chart.js v4.4.4 + * https://www.chartjs.org + * (c) 2024 Chart.js Contributors + * Released under the MIT License + *) + +chartjs-adapter-date-fns/dist/chartjs-adapter-date-fns.esm.js: + (*! + * chartjs-adapter-date-fns v3.0.0 + * https://www.chartjs.org + * (c) 2022 chartjs-adapter-date-fns Contributors + * Released under the MIT license + *) +*/