Version Description
- Compatibility with PHP v8 and WordPress v5.8
- Fixed log file path and moved out to wp-content/uploads/wp-statistics/debug.log and protected for the public access as well
- Fixed updating widget and compatibility with block-based
- Improvement Image optimisation with ImageAlpha (png8+alpha) and ImageOptim. Thanks vicocotea
- Updated Chart.js to v3.4.1
Download this release
Release Info
Developer | mostafa.s1990 |
Plugin | WP Statistics |
Version | 13.0.9 |
Comparing to | |
See all releases |
Code changes from version 13.0.8 to 13.0.9
- assets/images/browser/Chrome.png +0 -0
- assets/images/browser/Edge.png +0 -0
- assets/images/browser/Firefox.png +0 -0
- assets/images/browser/MSIE.png +0 -0
- assets/images/browser/Opera.png +0 -0
- assets/images/browser/Safari.png +0 -0
- assets/images/browser/unknown.png +0 -0
- assets/images/flags/000.png +0 -0
- assets/images/flags/AD.png +0 -0
- assets/images/flags/AE.png +0 -0
- assets/images/flags/AF.png +0 -0
- assets/images/flags/AG.png +0 -0
- assets/images/flags/AI.png +0 -0
- assets/images/flags/AL.png +0 -0
- assets/images/flags/AM.png +0 -0
- assets/images/flags/AN.png +0 -0
- assets/images/flags/AO.png +0 -0
- assets/images/flags/AQ.png +0 -0
- assets/images/flags/AR.png +0 -0
- assets/images/flags/AS.png +0 -0
- assets/images/flags/AT.png +0 -0
- assets/images/flags/AU.png +0 -0
- assets/images/flags/AW.png +0 -0
- assets/images/flags/AX.png +0 -0
- assets/images/flags/AZ.png +0 -0
- assets/images/flags/BA.png +0 -0
- assets/images/flags/BB.png +0 -0
- assets/images/flags/BD.png +0 -0
- assets/images/flags/BE.png +0 -0
- assets/images/flags/BF.png +0 -0
- assets/images/flags/BG.png +0 -0
- assets/images/flags/BH.png +0 -0
- assets/images/flags/BI.png +0 -0
- assets/images/flags/BJ.png +0 -0
- assets/images/flags/BL.png +0 -0
- assets/images/flags/BM.png +0 -0
- assets/images/flags/BN.png +0 -0
- assets/images/flags/BO.png +0 -0
- assets/images/flags/BR.png +0 -0
- assets/images/flags/BS.png +0 -0
- assets/images/flags/BT.png +0 -0
- assets/images/flags/BW.png +0 -0
- assets/images/flags/BY.png +0 -0
- assets/images/flags/BZ.png +0 -0
- assets/images/flags/CA.png +0 -0
- assets/images/flags/CD.png +0 -0
- assets/images/flags/CF.png +0 -0
- assets/images/flags/CG.png +0 -0
- assets/images/flags/CH.png +0 -0
- assets/images/flags/CI.png +0 -0
- assets/images/flags/CK.png +0 -0
- assets/images/flags/CL.png +0 -0
- assets/images/flags/CM.png +0 -0
- assets/images/flags/CN.png +0 -0
- assets/images/flags/CO.png +0 -0
- assets/images/flags/CR.png +0 -0
- assets/images/flags/CS.png +0 -0
- assets/images/flags/CU.png +0 -0
- assets/images/flags/CV.png +0 -0
- assets/images/flags/CW.png +0 -0
- assets/images/flags/CY.png +0 -0
- assets/images/flags/CZ.png +0 -0
- assets/images/flags/DE.png +0 -0
- assets/images/flags/DJ.png +0 -0
- assets/images/flags/DK.png +0 -0
- assets/images/flags/DM.png +0 -0
- assets/images/flags/DO.png +0 -0
- assets/images/flags/DZ.png +0 -0
- assets/images/flags/EC.png +0 -0
- assets/images/flags/EE.png +0 -0
- assets/images/flags/EG.png +0 -0
- assets/images/flags/EH.png +0 -0
- assets/images/flags/ER.png +0 -0
- assets/images/flags/ES.png +0 -0
- assets/images/flags/ET.png +0 -0
- assets/images/flags/FI.png +0 -0
- assets/images/flags/FJ.png +0 -0
- assets/images/flags/FK.png +0 -0
- assets/images/flags/FM.png +0 -0
- assets/images/flags/FO.png +0 -0
- assets/images/flags/FR.png +0 -0
- assets/images/flags/GA.png +0 -0
- assets/images/flags/GB.png +0 -0
- assets/images/flags/GD.png +0 -0
- assets/images/flags/GE.png +0 -0
- assets/images/flags/GF.png +0 -0
- assets/images/flags/GG.png +0 -0
- assets/images/flags/GH.png +0 -0
- assets/images/flags/GI.png +0 -0
- assets/images/flags/GL.png +0 -0
- assets/images/flags/GM.png +0 -0
- assets/images/flags/GN.png +0 -0
- assets/images/flags/GP.png +0 -0
- assets/images/flags/GQ.png +0 -0
- assets/images/flags/GR.png +0 -0
- assets/images/flags/GT.png +0 -0
- assets/images/flags/GU.png +0 -0
- assets/images/flags/GW.png +0 -0
- assets/images/flags/GY.png +0 -0
- assets/images/flags/HK.png +0 -0
- assets/images/flags/HN.png +0 -0
- assets/images/flags/HR.png +0 -0
- assets/images/flags/HT.png +0 -0
- assets/images/flags/HU.png +0 -0
- assets/images/flags/ID.png +0 -0
- assets/images/flags/IE.png +0 -0
- assets/images/flags/IL.png +0 -0
- assets/images/flags/IM.png +0 -0
- assets/images/flags/IN.png +0 -0
- assets/images/flags/IQ.png +0 -0
- assets/images/flags/IR.png +0 -0
- assets/images/flags/IS.png +0 -0
- assets/images/flags/IT.png +0 -0
- assets/images/flags/JE.png +0 -0
- assets/images/flags/JM.png +0 -0
- assets/images/flags/JO.png +0 -0
- assets/images/flags/JP.png +0 -0
- assets/images/flags/KE.png +0 -0
- assets/images/flags/KG.png +0 -0
- assets/images/flags/KH.png +0 -0
- assets/images/flags/KI.png +0 -0
- assets/images/flags/KM.png +0 -0
- assets/images/flags/KN.png +0 -0
- assets/images/flags/KP.png +0 -0
- assets/images/flags/KR.png +0 -0
- assets/images/flags/KW.png +0 -0
- assets/images/flags/KY.png +0 -0
- assets/images/flags/KZ.png +0 -0
- assets/images/flags/LA.png +0 -0
- assets/images/flags/LB.png +0 -0
- assets/images/flags/LC.png +0 -0
- assets/images/flags/LI.png +0 -0
- assets/images/flags/LK.png +0 -0
- assets/images/flags/LR.png +0 -0
- assets/images/flags/LS.png +0 -0
- assets/images/flags/LT.png +0 -0
- assets/images/flags/LU.png +0 -0
- assets/images/flags/LV.png +0 -0
- assets/images/flags/LY.png +0 -0
- assets/images/flags/MA.png +0 -0
- assets/images/flags/MC.png +0 -0
- assets/images/flags/MD.png +0 -0
- assets/images/flags/ME.png +0 -0
- assets/images/flags/MF.png +0 -0
- assets/images/flags/MG.png +0 -0
- assets/images/flags/MH.png +0 -0
- assets/images/flags/MK.png +0 -0
- assets/images/flags/ML.png +0 -0
- assets/images/flags/MM.png +0 -0
- assets/images/flags/MN.png +0 -0
- assets/images/flags/MO.png +0 -0
- assets/images/flags/MP.png +0 -0
- assets/images/flags/MQ.png +0 -0
- assets/images/flags/MR.png +0 -0
- assets/images/flags/MS.png +0 -0
- assets/images/flags/MT.png +0 -0
- assets/images/flags/MU.png +0 -0
- assets/images/flags/MV.png +0 -0
- assets/images/flags/MW.png +0 -0
- assets/images/flags/MX.png +0 -0
- assets/images/flags/MY.png +0 -0
- assets/images/flags/MZ.png +0 -0
- assets/images/flags/NA.png +0 -0
- assets/images/flags/NATO.png +0 -0
- assets/images/flags/NC.png +0 -0
- assets/images/flags/NE.png +0 -0
- assets/images/flags/NF.png +0 -0
- assets/images/flags/NG.png +0 -0
- assets/images/flags/NI.png +0 -0
- assets/images/flags/NL.png +0 -0
- assets/images/flags/NO.png +0 -0
- assets/images/flags/NP.png +0 -0
- assets/images/flags/NR.png +0 -0
- assets/images/flags/NZ.png +0 -0
- assets/images/flags/OM.png +0 -0
- assets/images/flags/OPEC.png +0 -0
- assets/images/flags/PA.png +0 -0
- assets/images/flags/PE.png +0 -0
- assets/images/flags/PF.png +0 -0
- assets/images/flags/PG.png +0 -0
- assets/images/flags/PH.png +0 -0
- assets/images/flags/PK.png +0 -0
- assets/images/flags/PL.png +0 -0
- assets/images/flags/PR.png +0 -0
- assets/images/flags/PS.png +0 -0
- assets/images/flags/PT.png +0 -0
- assets/images/flags/PW.png +0 -0
- assets/images/flags/PY.png +0 -0
- assets/images/flags/QA.png +0 -0
- assets/images/flags/RE.png +0 -0
- assets/images/flags/RO.png +0 -0
- assets/images/flags/RS.png +0 -0
- assets/images/flags/RU.png +0 -0
- assets/images/flags/RW.png +0 -0
- assets/images/flags/SA.png +0 -0
- assets/images/flags/SB.png +0 -0
- assets/images/flags/SC.png +0 -0
- assets/images/flags/SD.png +0 -0
- assets/images/flags/SE.png +0 -0
- assets/images/flags/SG.png +0 -0
- assets/images/flags/SI.png +0 -0
- assets/images/flags/SK.png +0 -0
- assets/images/flags/SL.png +0 -0
- assets/images/flags/SM.png +0 -0
- assets/images/flags/SN.png +0 -0
- assets/images/flags/SO.png +0 -0
- assets/images/flags/SR.png +0 -0
- assets/images/flags/SS.png +0 -0
- assets/images/flags/ST.png +0 -0
- assets/images/flags/SV.png +0 -0
- assets/images/flags/SY.png +0 -0
- assets/images/flags/SZ.png +0 -0
- assets/images/flags/TC.png +0 -0
- assets/images/flags/TD.png +0 -0
- assets/images/flags/TG.png +0 -0
- assets/images/flags/TH.png +0 -0
- assets/images/flags/TJ.png +0 -0
- assets/images/flags/TL.png +0 -0
- assets/images/flags/TM.png +0 -0
- assets/images/flags/TN.png +0 -0
- assets/images/flags/TO.png +0 -0
- assets/images/flags/TR.png +0 -0
- assets/images/flags/TT.png +0 -0
- assets/images/flags/TV.png +0 -0
- assets/images/flags/TW.png +0 -0
- assets/images/flags/TZ.png +0 -0
- assets/images/flags/UA.png +0 -0
- assets/images/flags/UG.png +0 -0
- assets/images/flags/US.png +0 -0
- assets/images/flags/UY.png +0 -0
- assets/images/flags/UZ.png +0 -0
- assets/images/flags/VA.png +0 -0
- assets/images/flags/VC.png +0 -0
- assets/images/flags/VE.png +0 -0
- assets/images/flags/VG.png +0 -0
- assets/images/flags/VI.png +0 -0
- assets/images/flags/VN.png +0 -0
- assets/images/flags/VU.png +0 -0
- assets/images/flags/WS.png +0 -0
- assets/images/flags/XK.png +0 -0
- assets/images/flags/YE.png +0 -0
- assets/images/flags/YT.png +0 -0
- assets/images/flags/ZA.png +0 -0
- assets/images/flags/ZM.png +0 -0
- assets/images/flags/ZW.png +0 -0
- assets/images/loading.gif +0 -0
- assets/images/logo-250-white.png +0 -0
- assets/images/logo-250.png +0 -0
- assets/images/search-engine/ask.png +0 -0
- assets/images/search-engine/baidu.png +0 -0
- assets/images/search-engine/bing.png +0 -0
- assets/images/search-engine/clearch.png +0 -0
- assets/images/search-engine/duckduckgo.png +0 -0
- assets/images/search-engine/google.png +0 -0
- assets/images/search-engine/qwant.png +0 -0
- assets/images/search-engine/yahoo.png +0 -0
- assets/images/search-engine/yandex.png +0 -0
- assets/images/title-logo.png +0 -0
- assets/images/welcome/icon-github.png +0 -0
- assets/images/welcome/icon-instagram.png +0 -0
- assets/images/welcome/icon-linkedin.png +0 -0
- assets/images/welcome/icon-twitter.png +0 -0
- assets/images/welcome/stars.png +0 -0
- assets/images/welcome/what-is-new/coupon-code.png +0 -0
- assets/images/welcome/what-is-new/wp-telegram-channels.png +0 -0
- assets/images/welcome/what-is-new/wp-telegram-chatbox.gif +0 -0
- assets/images/welcome/what-is-new/wp-telegram-iphone-2.png +0 -0
- assets/images/welcome/what-is-new/wp-telegram-send.png +0 -0
- assets/images/welcome/what-is-new/wp-telegram-settings.png +0 -0
- assets/js/chartjs/chart.bundle.min.js +0 -7
- assets/js/chartjs/chart.min.js +13 -0
- includes/admin/class-wp-statistics-admin-assets.php +1 -1
- includes/admin/meta-box/wp-statistics-meta-box-top-pages-chart.php +2 -2
- includes/admin/templates/pages/pages.php +2 -2
- includes/admin/templates/settings/externals.php +1 -2
- includes/admin/templates/settings/notifications.php +1 -0
- includes/class-wp-statistics-historical.php +1 -1
- includes/class-wp-statistics-meta-box.php +1 -1
- includes/class-wp-statistics-widget.php +26 -28
- includes/class-wp-statistics.php +44 -2
- readme.txt +9 -2
- wp-statistics.php +1 -1
assets/images/browser/Chrome.png
CHANGED
Binary file
|
assets/images/browser/Edge.png
CHANGED
Binary file
|
assets/images/browser/Firefox.png
CHANGED
Binary file
|
assets/images/browser/MSIE.png
CHANGED
Binary file
|
assets/images/browser/Opera.png
CHANGED
Binary file
|
assets/images/browser/Safari.png
CHANGED
Binary file
|
assets/images/browser/unknown.png
CHANGED
Binary file
|
assets/images/flags/000.png
CHANGED
Binary file
|
assets/images/flags/AD.png
CHANGED
Binary file
|
assets/images/flags/AE.png
CHANGED
Binary file
|
assets/images/flags/AF.png
CHANGED
Binary file
|
assets/images/flags/AG.png
CHANGED
Binary file
|
assets/images/flags/AI.png
CHANGED
Binary file
|
assets/images/flags/AL.png
CHANGED
Binary file
|
assets/images/flags/AM.png
CHANGED
Binary file
|
assets/images/flags/AN.png
CHANGED
Binary file
|
assets/images/flags/AO.png
CHANGED
Binary file
|
assets/images/flags/AQ.png
CHANGED
Binary file
|
assets/images/flags/AR.png
CHANGED
Binary file
|
assets/images/flags/AS.png
CHANGED
Binary file
|
assets/images/flags/AT.png
CHANGED
Binary file
|
assets/images/flags/AU.png
CHANGED
Binary file
|
assets/images/flags/AW.png
CHANGED
Binary file
|
assets/images/flags/AX.png
CHANGED
Binary file
|
assets/images/flags/AZ.png
CHANGED
Binary file
|
assets/images/flags/BA.png
CHANGED
Binary file
|
assets/images/flags/BB.png
CHANGED
Binary file
|
assets/images/flags/BD.png
CHANGED
Binary file
|
assets/images/flags/BE.png
CHANGED
Binary file
|
assets/images/flags/BF.png
CHANGED
Binary file
|
assets/images/flags/BG.png
CHANGED
Binary file
|
assets/images/flags/BH.png
CHANGED
Binary file
|
assets/images/flags/BI.png
CHANGED
Binary file
|
assets/images/flags/BJ.png
CHANGED
Binary file
|
assets/images/flags/BL.png
CHANGED
Binary file
|
assets/images/flags/BM.png
CHANGED
Binary file
|
assets/images/flags/BN.png
CHANGED
Binary file
|
assets/images/flags/BO.png
CHANGED
Binary file
|
assets/images/flags/BR.png
CHANGED
Binary file
|
assets/images/flags/BS.png
CHANGED
Binary file
|
assets/images/flags/BT.png
CHANGED
Binary file
|
assets/images/flags/BW.png
CHANGED
Binary file
|
assets/images/flags/BY.png
CHANGED
Binary file
|
assets/images/flags/BZ.png
CHANGED
Binary file
|
assets/images/flags/CA.png
CHANGED
Binary file
|
assets/images/flags/CD.png
CHANGED
Binary file
|
assets/images/flags/CF.png
CHANGED
Binary file
|
assets/images/flags/CG.png
CHANGED
Binary file
|
assets/images/flags/CH.png
CHANGED
Binary file
|
assets/images/flags/CI.png
CHANGED
Binary file
|
assets/images/flags/CK.png
CHANGED
Binary file
|
assets/images/flags/CL.png
CHANGED
Binary file
|
assets/images/flags/CM.png
CHANGED
Binary file
|
assets/images/flags/CN.png
CHANGED
Binary file
|
assets/images/flags/CO.png
CHANGED
Binary file
|
assets/images/flags/CR.png
CHANGED
Binary file
|
assets/images/flags/CS.png
CHANGED
Binary file
|
assets/images/flags/CU.png
CHANGED
Binary file
|
assets/images/flags/CV.png
CHANGED
Binary file
|
assets/images/flags/CW.png
CHANGED
Binary file
|
assets/images/flags/CY.png
CHANGED
Binary file
|
assets/images/flags/CZ.png
CHANGED
Binary file
|
assets/images/flags/DE.png
CHANGED
Binary file
|
assets/images/flags/DJ.png
CHANGED
Binary file
|
assets/images/flags/DK.png
CHANGED
Binary file
|
assets/images/flags/DM.png
CHANGED
Binary file
|
assets/images/flags/DO.png
CHANGED
Binary file
|
assets/images/flags/DZ.png
CHANGED
Binary file
|
assets/images/flags/EC.png
CHANGED
Binary file
|
assets/images/flags/EE.png
CHANGED
Binary file
|
assets/images/flags/EG.png
CHANGED
Binary file
|
assets/images/flags/EH.png
CHANGED
Binary file
|
assets/images/flags/ER.png
CHANGED
Binary file
|
assets/images/flags/ES.png
CHANGED
Binary file
|
assets/images/flags/ET.png
CHANGED
Binary file
|
assets/images/flags/FI.png
CHANGED
Binary file
|
assets/images/flags/FJ.png
CHANGED
Binary file
|
assets/images/flags/FK.png
CHANGED
Binary file
|
assets/images/flags/FM.png
CHANGED
Binary file
|
assets/images/flags/FO.png
CHANGED
Binary file
|
assets/images/flags/FR.png
CHANGED
Binary file
|
assets/images/flags/GA.png
CHANGED
Binary file
|
assets/images/flags/GB.png
CHANGED
Binary file
|
assets/images/flags/GD.png
CHANGED
Binary file
|
assets/images/flags/GE.png
CHANGED
Binary file
|
assets/images/flags/GF.png
CHANGED
Binary file
|
assets/images/flags/GG.png
CHANGED
Binary file
|
assets/images/flags/GH.png
CHANGED
Binary file
|
assets/images/flags/GI.png
CHANGED
Binary file
|
assets/images/flags/GL.png
CHANGED
Binary file
|
assets/images/flags/GM.png
CHANGED
Binary file
|
assets/images/flags/GN.png
CHANGED
Binary file
|
assets/images/flags/GP.png
CHANGED
Binary file
|
assets/images/flags/GQ.png
CHANGED
Binary file
|
assets/images/flags/GR.png
CHANGED
Binary file
|
assets/images/flags/GT.png
CHANGED
Binary file
|
assets/images/flags/GU.png
CHANGED
Binary file
|
assets/images/flags/GW.png
CHANGED
Binary file
|
assets/images/flags/GY.png
CHANGED
Binary file
|
assets/images/flags/HK.png
CHANGED
Binary file
|
assets/images/flags/HN.png
CHANGED
Binary file
|
assets/images/flags/HR.png
CHANGED
Binary file
|
assets/images/flags/HT.png
CHANGED
Binary file
|
assets/images/flags/HU.png
CHANGED
Binary file
|
assets/images/flags/ID.png
CHANGED
Binary file
|
assets/images/flags/IE.png
CHANGED
Binary file
|
assets/images/flags/IL.png
CHANGED
Binary file
|
assets/images/flags/IM.png
CHANGED
Binary file
|
assets/images/flags/IN.png
CHANGED
Binary file
|
assets/images/flags/IQ.png
CHANGED
Binary file
|
assets/images/flags/IR.png
CHANGED
Binary file
|
assets/images/flags/IS.png
CHANGED
Binary file
|
assets/images/flags/IT.png
CHANGED
Binary file
|
assets/images/flags/JE.png
CHANGED
Binary file
|
assets/images/flags/JM.png
CHANGED
Binary file
|
assets/images/flags/JO.png
CHANGED
Binary file
|
assets/images/flags/JP.png
CHANGED
Binary file
|
assets/images/flags/KE.png
CHANGED
Binary file
|
assets/images/flags/KG.png
CHANGED
Binary file
|
assets/images/flags/KH.png
CHANGED
Binary file
|
assets/images/flags/KI.png
CHANGED
Binary file
|
assets/images/flags/KM.png
CHANGED
Binary file
|
assets/images/flags/KN.png
CHANGED
Binary file
|
assets/images/flags/KP.png
CHANGED
Binary file
|
assets/images/flags/KR.png
CHANGED
Binary file
|
assets/images/flags/KW.png
CHANGED
Binary file
|
assets/images/flags/KY.png
CHANGED
Binary file
|
assets/images/flags/KZ.png
CHANGED
Binary file
|
assets/images/flags/LA.png
CHANGED
Binary file
|
assets/images/flags/LB.png
CHANGED
Binary file
|
assets/images/flags/LC.png
CHANGED
Binary file
|
assets/images/flags/LI.png
CHANGED
Binary file
|
assets/images/flags/LK.png
CHANGED
Binary file
|
assets/images/flags/LR.png
CHANGED
Binary file
|
assets/images/flags/LS.png
CHANGED
Binary file
|
assets/images/flags/LT.png
CHANGED
Binary file
|
assets/images/flags/LU.png
CHANGED
Binary file
|
assets/images/flags/LV.png
CHANGED
Binary file
|
assets/images/flags/LY.png
CHANGED
Binary file
|
assets/images/flags/MA.png
CHANGED
Binary file
|
assets/images/flags/MC.png
CHANGED
Binary file
|
assets/images/flags/MD.png
CHANGED
Binary file
|
assets/images/flags/ME.png
CHANGED
Binary file
|
assets/images/flags/MF.png
CHANGED
Binary file
|
assets/images/flags/MG.png
CHANGED
Binary file
|
assets/images/flags/MH.png
CHANGED
Binary file
|
assets/images/flags/MK.png
CHANGED
Binary file
|
assets/images/flags/ML.png
CHANGED
Binary file
|
assets/images/flags/MM.png
CHANGED
Binary file
|
assets/images/flags/MN.png
CHANGED
Binary file
|
assets/images/flags/MO.png
CHANGED
Binary file
|
assets/images/flags/MP.png
CHANGED
Binary file
|
assets/images/flags/MQ.png
CHANGED
Binary file
|
assets/images/flags/MR.png
CHANGED
Binary file
|
assets/images/flags/MS.png
CHANGED
Binary file
|
assets/images/flags/MT.png
CHANGED
Binary file
|
assets/images/flags/MU.png
CHANGED
Binary file
|
assets/images/flags/MV.png
CHANGED
Binary file
|
assets/images/flags/MW.png
CHANGED
Binary file
|
assets/images/flags/MX.png
CHANGED
Binary file
|
assets/images/flags/MY.png
CHANGED
Binary file
|
assets/images/flags/MZ.png
CHANGED
Binary file
|
assets/images/flags/NA.png
CHANGED
Binary file
|
assets/images/flags/NATO.png
CHANGED
Binary file
|
assets/images/flags/NC.png
CHANGED
Binary file
|
assets/images/flags/NE.png
CHANGED
Binary file
|
assets/images/flags/NF.png
CHANGED
Binary file
|
assets/images/flags/NG.png
CHANGED
Binary file
|
assets/images/flags/NI.png
CHANGED
Binary file
|
assets/images/flags/NL.png
CHANGED
Binary file
|
assets/images/flags/NO.png
CHANGED
Binary file
|
assets/images/flags/NP.png
CHANGED
Binary file
|
assets/images/flags/NR.png
CHANGED
Binary file
|
assets/images/flags/NZ.png
CHANGED
Binary file
|
assets/images/flags/OM.png
CHANGED
Binary file
|
assets/images/flags/OPEC.png
CHANGED
Binary file
|
assets/images/flags/PA.png
CHANGED
Binary file
|
assets/images/flags/PE.png
CHANGED
Binary file
|
assets/images/flags/PF.png
CHANGED
Binary file
|
assets/images/flags/PG.png
CHANGED
Binary file
|
assets/images/flags/PH.png
CHANGED
Binary file
|
assets/images/flags/PK.png
CHANGED
Binary file
|
assets/images/flags/PL.png
CHANGED
Binary file
|
assets/images/flags/PR.png
CHANGED
Binary file
|
assets/images/flags/PS.png
CHANGED
Binary file
|
assets/images/flags/PT.png
CHANGED
Binary file
|
assets/images/flags/PW.png
CHANGED
Binary file
|
assets/images/flags/PY.png
CHANGED
Binary file
|
assets/images/flags/QA.png
CHANGED
Binary file
|
assets/images/flags/RE.png
CHANGED
Binary file
|
assets/images/flags/RO.png
CHANGED
Binary file
|
assets/images/flags/RS.png
CHANGED
Binary file
|
assets/images/flags/RU.png
CHANGED
Binary file
|
assets/images/flags/RW.png
CHANGED
Binary file
|
assets/images/flags/SA.png
CHANGED
Binary file
|
assets/images/flags/SB.png
CHANGED
Binary file
|
assets/images/flags/SC.png
CHANGED
Binary file
|
assets/images/flags/SD.png
CHANGED
Binary file
|
assets/images/flags/SE.png
CHANGED
Binary file
|
assets/images/flags/SG.png
CHANGED
Binary file
|
assets/images/flags/SI.png
CHANGED
Binary file
|
assets/images/flags/SK.png
CHANGED
Binary file
|
assets/images/flags/SL.png
CHANGED
Binary file
|
assets/images/flags/SM.png
CHANGED
Binary file
|
assets/images/flags/SN.png
CHANGED
Binary file
|
assets/images/flags/SO.png
CHANGED
Binary file
|
assets/images/flags/SR.png
CHANGED
Binary file
|
assets/images/flags/SS.png
CHANGED
Binary file
|
assets/images/flags/ST.png
CHANGED
Binary file
|
assets/images/flags/SV.png
CHANGED
Binary file
|
assets/images/flags/SY.png
CHANGED
Binary file
|
assets/images/flags/SZ.png
CHANGED
Binary file
|
assets/images/flags/TC.png
CHANGED
Binary file
|
assets/images/flags/TD.png
CHANGED
Binary file
|
assets/images/flags/TG.png
CHANGED
Binary file
|
assets/images/flags/TH.png
CHANGED
Binary file
|
assets/images/flags/TJ.png
CHANGED
Binary file
|
assets/images/flags/TL.png
CHANGED
Binary file
|
assets/images/flags/TM.png
CHANGED
Binary file
|
assets/images/flags/TN.png
CHANGED
Binary file
|
assets/images/flags/TO.png
CHANGED
Binary file
|
assets/images/flags/TR.png
CHANGED
Binary file
|
assets/images/flags/TT.png
CHANGED
Binary file
|
assets/images/flags/TV.png
CHANGED
Binary file
|
assets/images/flags/TW.png
CHANGED
Binary file
|
assets/images/flags/TZ.png
CHANGED
Binary file
|
assets/images/flags/UA.png
CHANGED
Binary file
|
assets/images/flags/UG.png
CHANGED
Binary file
|
assets/images/flags/US.png
CHANGED
Binary file
|
assets/images/flags/UY.png
CHANGED
Binary file
|
assets/images/flags/UZ.png
CHANGED
Binary file
|
assets/images/flags/VA.png
CHANGED
Binary file
|
assets/images/flags/VC.png
CHANGED
Binary file
|
assets/images/flags/VE.png
CHANGED
Binary file
|
assets/images/flags/VG.png
CHANGED
Binary file
|
assets/images/flags/VI.png
CHANGED
Binary file
|
assets/images/flags/VN.png
CHANGED
Binary file
|
assets/images/flags/VU.png
CHANGED
Binary file
|
assets/images/flags/WS.png
CHANGED
Binary file
|
assets/images/flags/XK.png
CHANGED
Binary file
|
assets/images/flags/YE.png
CHANGED
Binary file
|
assets/images/flags/YT.png
CHANGED
Binary file
|
assets/images/flags/ZA.png
CHANGED
Binary file
|
assets/images/flags/ZM.png
CHANGED
Binary file
|
assets/images/flags/ZW.png
CHANGED
Binary file
|
assets/images/loading.gif
CHANGED
Binary file
|
assets/images/logo-250-white.png
CHANGED
Binary file
|
assets/images/logo-250.png
CHANGED
Binary file
|
assets/images/search-engine/ask.png
CHANGED
Binary file
|
assets/images/search-engine/baidu.png
CHANGED
Binary file
|
assets/images/search-engine/bing.png
CHANGED
Binary file
|
assets/images/search-engine/clearch.png
CHANGED
Binary file
|
assets/images/search-engine/duckduckgo.png
CHANGED
Binary file
|
assets/images/search-engine/google.png
CHANGED
Binary file
|
assets/images/search-engine/qwant.png
CHANGED
Binary file
|
assets/images/search-engine/yahoo.png
CHANGED
Binary file
|
assets/images/search-engine/yandex.png
CHANGED
Binary file
|
assets/images/title-logo.png
CHANGED
Binary file
|
assets/images/welcome/icon-github.png
CHANGED
Binary file
|
assets/images/welcome/icon-instagram.png
CHANGED
Binary file
|
assets/images/welcome/icon-linkedin.png
CHANGED
Binary file
|
assets/images/welcome/icon-twitter.png
CHANGED
Binary file
|
assets/images/welcome/stars.png
CHANGED
Binary file
|
assets/images/welcome/what-is-new/coupon-code.png
CHANGED
Binary file
|
assets/images/welcome/what-is-new/wp-telegram-channels.png
CHANGED
Binary file
|
assets/images/welcome/what-is-new/wp-telegram-chatbox.gif
CHANGED
Binary file
|
assets/images/welcome/what-is-new/wp-telegram-iphone-2.png
CHANGED
Binary file
|
assets/images/welcome/what-is-new/wp-telegram-send.png
CHANGED
Binary file
|
assets/images/welcome/what-is-new/wp-telegram-settings.png
CHANGED
Binary file
|
assets/js/chartjs/chart.bundle.min.js
DELETED
@@ -1,7 +0,0 @@
|
|
1 |
-
/*!
|
2 |
-
* Chart.js v2.9.4
|
3 |
-
* https://www.chartjs.org
|
4 |
-
* (c) 2020 Chart.js Contributors
|
5 |
-
* Released under the MIT License
|
6 |
-
*/
|
7 |
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Chart=e()}(this,function(){"use strict";function Va(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function t(t,e){return t(e={exports:{}},e.exports),e.exports}var d={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},u=t(function(t){var u={};for(var e in d)d.hasOwnProperty(e)&&(u[d[e]]=e);var o=t.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var n in o)if(o.hasOwnProperty(n)){if(!("channels"in o[n]))throw new Error("missing channels property: "+n);if(!("labels"in o[n]))throw new Error("missing channel labels property: "+n);if(o[n].labels.length!==o[n].channels)throw new Error("channel and label counts mismatch: "+n);var i=o[n].channels,r=o[n].labels;delete o[n].channels,delete o[n].labels,Object.defineProperty(o[n],"channels",{value:i}),Object.defineProperty(o[n],"labels",{value:r})}o.rgb.hsl=function(t){var e,n,i=t[0]/255,r=t[1]/255,a=t[2]/255,o=Math.min(i,r,a),s=Math.max(i,r,a),l=s-o;return s===o?e=0:i===s?e=(r-a)/l:r===s?e=2+(a-i)/l:a===s&&(e=4+(i-r)/l),(e=Math.min(60*e,360))<0&&(e+=360),n=(o+s)/2,[e,100*(s===o?0:n<=.5?l/(s+o):l/(2-s-o)),100*n]},o.rgb.hsv=function(t){function e(t){return(d-t)/6/h+.5}var n,i,r,a,o,s=t[0]/255,l=t[1]/255,u=t[2]/255,d=Math.max(s,l,u),h=d-Math.min(s,l,u);return 0==h?a=o=0:(o=h/d,n=e(s),i=e(l),r=e(u),s===d?a=r-i:l===d?a=1/3+n-r:u===d&&(a=2/3+i-n),a<0?a+=1:1<a&&--a),[360*a,100*o,100*d]},o.rgb.hwb=function(t){var e=t[0],n=t[1],i=t[2];return[o.rgb.hsl(t)[0],100*(1/255*Math.min(e,Math.min(n,i))),100*(i=1-1/255*Math.max(e,Math.max(n,i)))]},o.rgb.cmyk=function(t){var e=t[0]/255,n=t[1]/255,i=t[2]/255,r=Math.min(1-e,1-n,1-i);return[100*((1-e-r)/(1-r)||0),100*((1-n-r)/(1-r)||0),100*((1-i-r)/(1-r)||0),100*r]},o.rgb.keyword=function(t){var e=u[t];if(e)return e;var n,i,r,a,o,s=1/0;for(var l in d){d.hasOwnProperty(l)&&(i=d[l],a=t,o=i,(r=Math.pow(a[0]-o[0],2)+Math.pow(a[1]-o[1],2)+Math.pow(a[2]-o[2],2))<s&&(s=r,n=l))}return n},o.keyword.rgb=function(t){return d[t]},o.rgb.xyz=function(t){var e=t[0]/255,n=t[1]/255,i=t[2]/255;return[100*(.4124*(e=.04045<e?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(n=.04045<n?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(i=.04045<i?Math.pow((i+.055)/1.055,2.4):i/12.92)),100*(.2126*e+.7152*n+.0722*i),100*(.0193*e+.1192*n+.9505*i)]},o.rgb.lab=function(t){var e=o.rgb.xyz(t),n=e[0],i=e[1],r=e[2];return i/=100,r/=108.883,n=.008856<(n/=95.047)?Math.pow(n,1/3):7.787*n+16/116,[116*(i=.008856<i?Math.pow(i,1/3):7.787*i+16/116)-16,500*(n-i),200*(i-(r=.008856<r?Math.pow(r,1/3):7.787*r+16/116))]},o.hsl.rgb=function(t){var e,n,i,r,a,o=t[0]/360,s=t[1]/100,l=t[2]/100;if(0==s)return[a=255*l,a,a];e=2*l-(n=l<.5?l*(1+s):l+s-l*s),r=[0,0,0];for(var u=0;u<3;u++)(i=o+1/3*-(u-1))<0&&i++,1<i&&i--,a=6*i<1?e+6*(n-e)*i:2*i<1?n:3*i<2?e+(n-e)*(2/3-i)*6:e,r[u]=255*a;return r},o.hsl.hsv=function(t){var e=t[0],n=t[1]/100,i=t[2]/100,r=n,a=Math.max(i,.01);return n*=(i*=2)<=1?i:2-i,r*=a<=1?a:2-a,[e,100*(0===i?2*r/(a+r):2*n/(i+n)),100*((i+n)/2)]},o.hsv.rgb=function(t){var e=t[0]/60,n=t[1]/100,i=t[2]/100,r=Math.floor(e)%6,a=e-Math.floor(e),o=255*i*(1-n),s=255*i*(1-n*a),l=255*i*(1-n*(1-a));switch(i*=255,r){case 0:return[i,l,o];case 1:return[s,i,o];case 2:return[o,i,l];case 3:return[o,s,i];case 4:return[l,o,i];case 5:return[i,o,s]}},o.hsv.hsl=function(t){var e=t[0],n=t[1]/100,i=t[2]/100,r=Math.max(i,.01),a=(2-n)*i,o=(2-n)*r,s=n*r;return[e,100*(s=(s/=o<=1?o:2-o)||0),100*(a/=2)]},o.hwb.rgb=function(t){var e,n,i,r,a,o,s,l=t[0]/360,u=t[1]/100,d=t[2]/100,h=u+d;switch(1<h&&(u/=h,d/=h),i=6*l-(e=Math.floor(6*l)),0!=(1&e)&&(i=1-i),r=u+i*((n=1-d)-u),e){default:case 6:case 0:a=n,o=r,s=u;break;case 1:a=r,o=n,s=u;break;case 2:a=u,o=n,s=r;break;case 3:a=u,o=r,s=n;break;case 4:a=r,o=u,s=n;break;case 5:a=n,o=u,s=r}return[255*a,255*o,255*s]},o.cmyk.rgb=function(t){var e=t[0]/100,n=t[1]/100,i=t[2]/100,r=t[3]/100;return[255*(1-Math.min(1,e*(1-r)+r)),255*(1-Math.min(1,n*(1-r)+r)),255*(1-Math.min(1,i*(1-r)+r))]},o.xyz.rgb=function(t){var e=t[0]/100,n=t[1]/100,i=t[2]/100,r=3.2406*e+-1.5372*n+-.4986*i,a=-.9689*e+1.8758*n+.0415*i,o=.0557*e+-.204*n+1.057*i;return r=.0031308<r?1.055*Math.pow(r,1/2.4)-.055:12.92*r,a=.0031308<a?1.055*Math.pow(a,1/2.4)-.055:12.92*a,o=.0031308<o?1.055*Math.pow(o,1/2.4)-.055:12.92*o,[255*(r=Math.min(Math.max(0,r),1)),255*(a=Math.min(Math.max(0,a),1)),255*(o=Math.min(Math.max(0,o),1))]},o.xyz.lab=function(t){var e=t[0],n=t[1],i=t[2];return n/=100,i/=108.883,e=.008856<(e/=95.047)?Math.pow(e,1/3):7.787*e+16/116,[116*(n=.008856<n?Math.pow(n,1/3):7.787*n+16/116)-16,500*(e-n),200*(n-(i=.008856<i?Math.pow(i,1/3):7.787*i+16/116))]},o.lab.xyz=function(t){var e=(t[0]+16)/116,n=t[1]/500+e,i=e-t[2]/200,r=Math.pow(e,3),a=Math.pow(n,3),o=Math.pow(i,3);return e=.008856<r?r:(e-16/116)/7.787,n=.008856<a?a:(n-16/116)/7.787,i=.008856<o?o:(i-16/116)/7.787,[n*=95.047,e*=100,i*=108.883]},o.lab.lch=function(t){var e=t[0],n=t[1],i=t[2],r=360*Math.atan2(i,n)/2/Math.PI;return r<0&&(r+=360),[e,Math.sqrt(n*n+i*i),r]},o.lch.lab=function(t){var e=t[0],n=t[1],i=t[2]/360*2*Math.PI;return[e,n*Math.cos(i),n*Math.sin(i)]},o.rgb.ansi16=function(t){var e=t[0],n=t[1],i=t[2],r=1 in arguments?arguments[1]:o.rgb.hsv(t)[2];if(0===(r=Math.round(r/50)))return 30;var a=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(e/255));return 2===r&&(a+=60),a},o.hsv.ansi16=function(t){return o.rgb.ansi16(o.hsv.rgb(t),t[2])},o.rgb.ansi256=function(t){var e=t[0],n=t[1],i=t[2];return e===n&&n===i?e<8?16:248<e?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(i/255*5)},o.ansi16.rgb=function(t){var e=t%10;if(0===e||7===e)return 50<t&&(e+=3.5),[e=e/10.5*255,e,e];var n=.5*(1+~~(50<t));return[(1&e)*n*255,(e>>1&1)*n*255,(e>>2&1)*n*255]},o.ansi256.rgb=function(t){if(232<=t){var e=10*(t-232)+8;return[e,e,e]}var n;return t-=16,[Math.floor(t/36)/5*255,Math.floor((n=t%36)/6)/5*255,n%6/5*255]},o.rgb.hex=function(t){var e=(((255&Math.round(t[0]))<<16)+((255&Math.round(t[1]))<<8)+(255&Math.round(t[2]))).toString(16).toUpperCase();return"000000".substring(e.length)+e},o.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var n=e[0];3===e[0].length&&(n=n.split("").map(function(t){return t+t}).join(""));var i=parseInt(n,16);return[i>>16&255,i>>8&255,255&i]},o.rgb.hcg=function(t){var e=t[0]/255,n=t[1]/255,i=t[2]/255,r=Math.max(Math.max(e,n),i),a=Math.min(Math.min(e,n),i),o=r-a,s=o<1?a/(1-o):0,l=o<=0?0:r===e?(n-i)/o%6:r===n?2+(i-e)/o:4+(e-n)/o+4;return l/=6,[360*(l%=1),100*o,100*s]},o.hsl.hcg=function(t){var e=t[1]/100,n=t[2]/100,i=1,r=0;return(i=n<.5?2*e*n:2*e*(1-n))<1&&(r=(n-.5*i)/(1-i)),[t[0],100*i,100*r]},o.hsv.hcg=function(t){var e=t[1]/100,n=t[2]/100,i=e*n,r=i<1?(n-i)/(1-i):0;return[t[0],100*i,100*r]},o.hcg.rgb=function(t){var e=t[0]/360,n=t[1]/100,i=t[2]/100;if(0==n)return[255*i,255*i,255*i];var r,a=[0,0,0],o=e%1*6,s=o%1,l=1-s;switch(Math.floor(o)){case 0:a[0]=1,a[1]=s,a[2]=0;break;case 1:a[0]=l,a[1]=1,a[2]=0;break;case 2:a[0]=0,a[1]=1,a[2]=s;break;case 3:a[0]=0,a[1]=l,a[2]=1;break;case 4:a[0]=s,a[1]=0,a[2]=1;break;default:a[0]=1,a[1]=0,a[2]=l}return r=(1-n)*i,[255*(n*a[0]+r),255*(n*a[1]+r),255*(n*a[2]+r)]},o.hcg.hsv=function(t){var e=t[1]/100,n=e+t[2]/100*(1-e),i=0<n?e/n:0;return[t[0],100*i,100*n]},o.hcg.hsl=function(t){var e=t[1]/100,n=t[2]/100*(1-e)+.5*e,i=0;return 0<n&&n<.5?i=e/(2*n):.5<=n&&n<1&&(i=e/(2*(1-n))),[t[0],100*i,100*n]},o.hcg.hwb=function(t){var e=t[1]/100,n=e+t[2]/100*(1-e);return[t[0],100*(n-e),100*(1-n)]},o.hwb.hcg=function(t){var e=t[1]/100,n=1-t[2]/100,i=n-e,r=i<1?(n-i)/(1-i):0;return[t[0],100*i,100*r]},o.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},o.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},o.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},o.gray.hsl=o.gray.hsv=function(t){return[0,0,t[0]]},o.gray.hwb=function(t){return[0,100,t[0]]},o.gray.cmyk=function(t){return[0,0,0,t[0]]},o.gray.lab=function(t){return[t[0],0,0]},o.gray.hex=function(t){var e=255&Math.round(t[0]/100*255),n=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(n.length)+n},o.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}});u.rgb,u.hsl,u.hsv,u.hwb,u.cmyk,u.xyz,u.lab,u.lch,u.hex,u.keyword,u.ansi16,u.ansi256,u.hcg,u.apple,u.gray;function s(t){var e=function(){for(var t={},e=Object.keys(u),n=e.length,i=0;i<n;i++)t[e[i]]={distance:-1,parent:null};return t}(),n=[t];for(e[t].distance=0;n.length;)for(var i=n.pop(),r=Object.keys(u[i]),a=r.length,o=0;o<a;o++){var s=r[o],l=e[s];-1===l.distance&&(l.distance=e[i].distance+1,l.parent=i,n.unshift(s))}return e}function l(t,e){for(var n=[e[t].parent,t],i=u[e[t].parent][t],r=e[t].parent;e[r].parent;)n.unshift(e[r].parent),i=function(e,n){return function(t){return n(e(t))}}(u[e[r].parent][r],i),r=e[r].parent;return i.conversion=n,i}var r={};function a(e){function t(t){return null==t?t:(1<arguments.length&&(t=Array.prototype.slice.call(arguments)),e(t))}return"conversion"in e&&(t.conversion=e.conversion),t}function o(r){function t(t){if(null==t)return t;1<arguments.length&&(t=Array.prototype.slice.call(arguments));var e=r(t);if("object"==typeof e)for(var n=e.length,i=0;i<n;i++)e[i]=Math.round(e[i]);return e}return"conversion"in r&&(t.conversion=r.conversion),t}Object.keys(u).forEach(function(n){r[n]={},Object.defineProperty(r[n],"channels",{value:u[n].channels}),Object.defineProperty(r[n],"labels",{value:u[n].labels});var i=function(t){for(var e=s(t),n={},i=Object.keys(e),r=i.length,a=0;a<r;a++){var o=i[a];null!==e[o].parent&&(n[o]=l(o,e))}return n}(n);Object.keys(i).forEach(function(t){var e=i[t];r[n][t]=o(e),r[n][t].raw=a(e)})});var h=r,c={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},n={getRgba:i,getHsla:f,getRgb:function(t){var e=i(t);return e&&e.slice(0,3)},getHsl:function(t){var e=f(t);return e&&e.slice(0,3)},getHwb:g,getAlpha:function(t){var e=i(t);{if(e)return e[3];if(e=f(t))return e[3];if(e=g(t))return e[3]}},hexString:function(t,e){e=void 0!==e&&3===t.length?e:t[3];return"#"+b(t[0])+b(t[1])+b(t[2])+(0<=e&&e<1?b(Math.round(255*e)):"")},rgbString:function(t,e){if(e<1||t[3]&&t[3]<1)return m(t,e);return"rgb("+t[0]+", "+t[1]+", "+t[2]+")"},rgbaString:m,percentString:function(t,e){if(e<1||t[3]&&t[3]<1)return p(t,e);var n=Math.round(t[0]/255*100),i=Math.round(t[1]/255*100),r=Math.round(t[2]/255*100);return"rgb("+n+"%, "+i+"%, "+r+"%)"},percentaString:p,hslString:function(t,e){if(e<1||t[3]&&t[3]<1)return v(t,e);return"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"},hslaString:v,hwbString:function(t,e){void 0===e&&(e=void 0!==t[3]?t[3]:1);return"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+(void 0!==e&&1!==e?", "+e:"")+")"},keyword:function(t){return e[t.slice(0,3)]}};function i(t){if(t){var e=[0,0,0],n=1,i=t.match(/^#([a-fA-F0-9]{3,4})$/i),r="";if(i){r=(i=i[1])[3];for(var a=0;a<e.length;a++)e[a]=parseInt(i[a]+i[a],16);r&&(n=Math.round(parseInt(r+r,16)/255*100)/100)}else if(i=t.match(/^#([a-fA-F0-9]{6}([a-fA-F0-9]{2})?)$/i)){r=i[2],i=i[1];for(a=0;a<e.length;a++)e[a]=parseInt(i.slice(2*a,2*a+2),16);r&&(n=Math.round(parseInt(r,16)/255*100)/100)}else if(i=t.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(a=0;a<e.length;a++)e[a]=parseInt(i[a+1]);n=parseFloat(i[4])}else if(i=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(a=0;a<e.length;a++)e[a]=Math.round(2.55*parseFloat(i[a+1]));n=parseFloat(i[4])}else if(i=t.match(/(\w+)/)){if("transparent"==i[1])return[0,0,0,0];if(!(e=c[i[1]]))return}for(a=0;a<e.length;a++)e[a]=y(e[a],0,255);return n=n||0==n?y(n,0,1):1,e[3]=n,e}}function f(t){if(t){var e=t.match(/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(e){var n=parseFloat(e[4]);return[y(parseInt(e[1]),0,360),y(parseFloat(e[2]),0,100),y(parseFloat(e[3]),0,100),y(isNaN(n)?1:n,0,1)]}}}function g(t){if(t){var e=t.match(/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(e){var n=parseFloat(e[4]);return[y(parseInt(e[1]),0,360),y(parseFloat(e[2]),0,100),y(parseFloat(e[3]),0,100),y(isNaN(n)?1:n,0,1)]}}}function m(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+e+")"}function p(t,e){return"rgba("+Math.round(t[0]/255*100)+"%, "+Math.round(t[1]/255*100)+"%, "+Math.round(t[2]/255*100)+"%, "+(e||t[3]||1)+")"}function v(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+e+")"}function y(t,e,n){return Math.min(Math.max(e,t),n)}function b(t){var e=t.toString(16).toUpperCase();return e.length<2?"0"+e:e}var e={};for(var x in c)e[c[x]]=x;var _=function(t){return t instanceof _?t:this instanceof _?(this.valid=!1,this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1},void("string"==typeof t?(e=n.getRgba(t))?this.setValues("rgb",e):(e=n.getHsla(t))?this.setValues("hsl",e):(e=n.getHwb(t))&&this.setValues("hwb",e):"object"==typeof t&&(void 0!==(e=t).r||void 0!==e.red?this.setValues("rgb",e):void 0!==e.l||void 0!==e.lightness?this.setValues("hsl",e):void 0!==e.v||void 0!==e.value?this.setValues("hsv",e):void 0!==e.w||void 0!==e.whiteness?this.setValues("hwb",e):void 0===e.c&&void 0===e.cyan||this.setValues("cmyk",e)))):new _(t);var e};_.prototype={isValid:function(){return this.valid},rgb:function(){return this.setSpace("rgb",arguments)},hsl:function(){return this.setSpace("hsl",arguments)},hsv:function(){return this.setSpace("hsv",arguments)},hwb:function(){return this.setSpace("hwb",arguments)},cmyk:function(){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){var t=this.values;return 1!==t.alpha?t.hwb.concat([t.alpha]):t.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var t=this.values;return t.rgb.concat([t.alpha])},hslaArray:function(){var t=this.values;return t.hsl.concat([t.alpha])},alpha:function(t){return void 0===t?this.values.alpha:(this.setValues("alpha",t),this)},red:function(t){return this.setChannel("rgb",0,t)},green:function(t){return this.setChannel("rgb",1,t)},blue:function(t){return this.setChannel("rgb",2,t)},hue:function(t){return t=t&&((t%=360)<0?360+t:t),this.setChannel("hsl",0,t)},saturation:function(t){return this.setChannel("hsl",1,t)},lightness:function(t){return this.setChannel("hsl",2,t)},saturationv:function(t){return this.setChannel("hsv",1,t)},whiteness:function(t){return this.setChannel("hwb",1,t)},blackness:function(t){return this.setChannel("hwb",2,t)},value:function(t){return this.setChannel("hsv",2,t)},cyan:function(t){return this.setChannel("cmyk",0,t)},magenta:function(t){return this.setChannel("cmyk",1,t)},yellow:function(t){return this.setChannel("cmyk",2,t)},black:function(t){return this.setChannel("cmyk",3,t)},hexString:function(){return n.hexString(this.values.rgb)},rgbString:function(){return n.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return n.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return n.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return n.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return n.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return n.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return n.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var t=this.values.rgb;return t[0]<<16|t[1]<<8|t[2]},luminosity:function(){for(var t=this.values.rgb,e=[],n=0;n<t.length;n++){var i=t[n]/255;e[n]=i<=.03928?i/12.92:Math.pow((.055+i)/1.055,2.4)}return.2126*e[0]+.7152*e[1]+.0722*e[2]},contrast:function(t){var e=this.luminosity(),n=t.luminosity();return n<e?(e+.05)/(n+.05):(n+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return 7.1<=e?"AAA":4.5<=e?"AA":""},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,n=(e[0]+t)%360;return e[0]=n<0?360+n:n,this.setValues("hsl",e),this},mix:function(t,e){var n=this,i=t,r=void 0===e?.5:e,a=2*r-1,o=n.alpha()-i.alpha(),s=(1+(a*o==-1?a:(a+o)/(1+a*o)))/2,l=1-s;return this.rgb(s*n.red()+l*i.red(),s*n.green()+l*i.green(),s*n.blue()+l*i.blue()).alpha(n.alpha()*r+i.alpha()*(1-r))},toJSON:function(){return this.rgb()},clone:function(){var t,e,n=new _,i=this.values,r=n.values;for(var a in i)i.hasOwnProperty(a)&&(t=i[a],"[object Array]"===(e={}.toString.call(t))?r[a]=t.slice(0):"[object Number]"===e?r[a]=t:console.error("unexpected color value:",t));return n}},_.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},_.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},_.prototype.getValues=function(t){for(var e=this.values,n={},i=0;i<t.length;i++)n[t.charAt(i)]=e[t][i];return 1!==e.alpha&&(n.a=e.alpha),n},_.prototype.setValues=function(t,e){var n,i=this.values,r=this.spaces,a=this.maxes,o=1;if(this.valid=!0,"alpha"===t)o=e;else if(e.length)i[t]=e.slice(0,t.length),o=e[t.length];else if(void 0!==e[t.charAt(0)]){for(l=0;l<t.length;l++)i[t][l]=e[t.charAt(l)];o=e.a}else if(void 0!==e[r[t][0]]){for(var s=r[t],l=0;l<t.length;l++)i[t][l]=e[s[l]];o=e.alpha}if(i.alpha=Math.max(0,Math.min(1,void 0===o?i.alpha:o)),"alpha"===t)return!1;for(l=0;l<t.length;l++)n=Math.max(0,Math.min(a[t][l],i[t][l])),i[t][l]=Math.round(n);for(var u in r)u!==t&&(i[u]=h[t][u](i[t]));return!0},_.prototype.setSpace=function(t,e){var n=e[0];return void 0===n?this.getValues(t):("number"==typeof n&&(n=Array.prototype.slice.call(e)),this.setValues(t,n),this)},_.prototype.setChannel=function(t,e,n){var i=this.values[t];return void 0===n?i[e]:(n===i[e]||(i[e]=n,this.setValues(t,i)),this)},"undefined"!=typeof window&&(window.Chart=window.Chart||{},window.Chart.Color=_,void 0===window.Color&&(window.Color=_));var w=_;function k(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}var M,S={noop:function(){},uid:(M=0,function(){return M++}),isNullOrUndef:function(t){return null==t},isArray:function(t){if(Array.isArray&&Array.isArray(t))return!0;var e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)},isObject:function(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)},isFinite:function(t){return("number"==typeof t||t instanceof Number)&&isFinite(t)},valueOrDefault:function(t,e){return void 0===t?e:t},valueAtIndexOrDefault:function(t,e,n){return S.valueOrDefault(S.isArray(t)?t[e]:t,n)},callback:function(t,e,n){if(t&&"function"==typeof t.call)return t.apply(n,e)},each:function(t,e,n,i){var r,a,o;if(S.isArray(t))if(a=t.length,i)for(r=a-1;0<=r;r--)e.call(n,t[r],r);else for(r=0;r<a;r++)e.call(n,t[r],r);else if(S.isObject(t))for(a=(o=Object.keys(t)).length,r=0;r<a;r++)e.call(n,t[o[r]],o[r])},arrayEquals:function(t,e){var n,i,r,a;if(!t||!e||t.length!==e.length)return!1;for(n=0,i=t.length;n<i;++n)if(r=t[n],a=e[n],r instanceof Array&&a instanceof Array){if(!S.arrayEquals(r,a))return!1}else if(r!==a)return!1;return!0},clone:function(t){if(S.isArray(t))return t.map(S.clone);if(S.isObject(t)){for(var e=Object.create(t),n=Object.keys(t),i=n.length,r=0;r<i;++r)e[n[r]]=S.clone(t[n[r]]);return e}return t},_merger:function(t,e,n,i){var r,a;k(t)&&(r=e[t],a=n[t],S.isObject(r)&&S.isObject(a)?S.merge(r,a,i):e[t]=S.clone(a))},_mergerIf:function(t,e,n){var i,r;k(t)&&(i=e[t],r=n[t],S.isObject(i)&&S.isObject(r)?S.mergeIf(i,r):e.hasOwnProperty(t)||(e[t]=S.clone(r)))},merge:function(t,e,n){var i,r,a,o,s,l=S.isArray(e)?e:[e],u=l.length;if(!S.isObject(t))return t;for(i=(n=n||{}).merger||S._merger,r=0;r<u;++r)if(e=l[r],S.isObject(e))for(s=0,o=(a=Object.keys(e)).length;s<o;++s)i(a[s],t,e,n);return t},mergeIf:function(t,e){return S.merge(t,e,{merger:S._mergerIf})},extend:Object.assign||function(t){return S.merge(t,[].slice.call(arguments,1),{merger:function(t,e,n){e[t]=n[t]}})},inherits:function(t){function e(){this.constructor=i}var n=this,i=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return n.apply(this,arguments)};return e.prototype=n.prototype,i.prototype=new e,i.extend=S.inherits,t&&S.extend(i.prototype,t),i.__super__=n.prototype,i},_deprecated:function(t,e,n,i){void 0!==e&&console.warn(t+': "'+n+'" is deprecated. Please use "'+i+'" instead')}},D=S;S.callCallback=S.callback,S.indexOf=function(t,e,n){return Array.prototype.indexOf.call(t,e,n)},S.getValueOrDefault=S.valueOrDefault,S.getValueAtIndexOrDefault=S.valueAtIndexOrDefault;var C={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return--t*t*t+1},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-(--t*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return--t*t*t*t*t+1},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return 1-Math.cos(t*(Math.PI/2))},easeOutSine:function(t){return Math.sin(t*(Math.PI/2))},easeInOutSine:function(t){return-.5*(Math.cos(Math.PI*t)-1)},easeInExpo:function(t){return 0===t?0:Math.pow(2,10*(t-1))},easeOutExpo:function(t){return 1===t?1:1-Math.pow(2,-10*t)},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},easeInCirc:function(t){return 1<=t?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1- --t*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:1===t?1:(n=n||.3,e=i<1?(i=1,n/4):n/(2*Math.PI)*Math.asin(1/i),-(i*Math.pow(2,10*--t)*Math.sin((t-e)*(2*Math.PI)/n)))},easeOutElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:1===t?1:(n=n||.3,e=i<1?(i=1,n/4):n/(2*Math.PI)*Math.asin(1/i),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},easeInOutElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:2==(t/=.5)?1:(n=n||.45,e=i<1?(i=1,n/4):n/(2*Math.PI)*Math.asin(1/i),t<1?i*Math.pow(2,10*--t)*Math.sin((t-e)*(2*Math.PI)/n)*-.5:i*Math.pow(2,-10*--t)*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},easeInBack:function(t){return t*t*(2.70158*t-1.70158)},easeOutBack:function(t){return--t*t*(2.70158*t+1.70158)+1},easeInOutBack:function(t){var 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:function(t){return 1-C.easeOutBounce(1-t)},easeOutBounce:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:function(t){return t<.5?.5*C.easeInBounce(2*t):.5*C.easeOutBounce(2*t-1)+.5}},P={effects:C};D.easingEffects=C;var T=Math.PI,O=T/180,A=2*T,F=T/2,I=T/4,L=2*T/3,R={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,i,r,a){var o,s,l,u,d;a?(s=e+(o=Math.min(a,r/2,i/2)),l=n+o,u=e+i-o,d=n+r-o,t.moveTo(e,l),s<u&&l<d?(t.arc(s,l,o,-T,-F),t.arc(u,l,o,-F,0),t.arc(u,d,o,0,F),t.arc(s,d,o,F,T)):s<u?(t.moveTo(s,n),t.arc(u,l,o,-F,F),t.arc(s,l,o,F,T+F)):l<d?(t.arc(s,l,o,-T,0),t.arc(s,d,o,0,T)):t.arc(s,l,o,-T,T),t.closePath(),t.moveTo(e,n)):t.rect(e,n,i,r)},drawPoint:function(t,e,n,i,r,a){var o,s,l,u,d,h=(a||0)*O;if(e&&"object"==typeof e&&("[object HTMLImageElement]"===(o=e.toString())||"[object HTMLCanvasElement]"===o))return t.save(),t.translate(i,r),t.rotate(h),t.drawImage(e,-e.width/2,-e.height/2,e.width,e.height),void t.restore();if(!(isNaN(n)||n<=0)){switch(t.beginPath(),e){default:t.arc(i,r,n,0,A),t.closePath();break;case"triangle":t.moveTo(i+Math.sin(h)*n,r-Math.cos(h)*n),h+=L,t.lineTo(i+Math.sin(h)*n,r-Math.cos(h)*n),h+=L,t.lineTo(i+Math.sin(h)*n,r-Math.cos(h)*n),t.closePath();break;case"rectRounded":u=n-(d=.516*n),s=Math.cos(h+I)*u,l=Math.sin(h+I)*u,t.arc(i-s,r-l,d,h-T,h-F),t.arc(i+l,r-s,d,h-F,h),t.arc(i+s,r+l,d,h,h+F),t.arc(i-l,r+s,d,h+F,h+T),t.closePath();break;case"rect":if(!a){u=Math.SQRT1_2*n,t.rect(i-u,r-u,2*u,2*u);break}h+=I;case"rectRot":s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,r-l),t.lineTo(i+l,r-s),t.lineTo(i+s,r+l),t.lineTo(i-l,r+s),t.closePath();break;case"crossRot":h+=I;case"cross":s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,r-l),t.lineTo(i+s,r+l),t.moveTo(i+l,r-s),t.lineTo(i-l,r+s);break;case"star":s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,r-l),t.lineTo(i+s,r+l),t.moveTo(i+l,r-s),t.lineTo(i-l,r+s),h+=I,s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,r-l),t.lineTo(i+s,r+l),t.moveTo(i+l,r-s),t.lineTo(i-l,r+s);break;case"line":s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,r-l),t.lineTo(i+s,r+l);break;case"dash":t.moveTo(i,r),t.lineTo(i+Math.cos(h)*n,r+Math.sin(h)*n)}t.fill(),t.stroke()}},_isPointInArea:function(t,e){return t.x>e.left-1e-6&&t.x<e.right+1e-6&&t.y>e.top-1e-6&&t.y<e.bottom+1e-6},clipArea:function(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()},unclipArea:function(t){t.restore()},lineTo:function(t,e,n,i){var r,a=n.steppedLine;if(a)return"middle"===a?(r=(e.x+n.x)/2,t.lineTo(r,i?n.y:e.y),t.lineTo(r,i?e.y:n.y)):"after"===a&&!i||"after"!==a&&i?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y),void t.lineTo(n.x,n.y);n.tension?t.bezierCurveTo(i?e.controlPointPreviousX:e.controlPointNextX,i?e.controlPointPreviousY:e.controlPointNextY,i?n.controlPointNextX:n.controlPointPreviousX,i?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):t.lineTo(n.x,n.y)}},N=R;D.clear=R.clear,D.drawRoundedRectangle=function(t){t.beginPath(),R.roundedRect.apply(R,arguments)};var W={_set:function(t,e){return D.merge(this[t]||(this[t]={}),e)}};W._set("global",{defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",defaultLineHeight:1.2,showLines:!0});var Y=W,z=D.valueOrDefault;var V={toLineHeight:function(t,e){var n=(""+t).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);if(!n||"normal"===n[1])return 1.2*e;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100}return e*t},toPadding:function(t){var e,n,i,r;return D.isObject(t)?(e=+t.top||0,n=+t.right||0,i=+t.bottom||0,r=+t.left||0):e=n=i=r=+t||0,{top:e,right:n,bottom:i,left:r,height:e+i,width:r+n}},_parseFont:function(t){var e,n=Y.global,i=z(t.fontSize,n.defaultFontSize),r={family:z(t.fontFamily,n.defaultFontFamily),lineHeight:D.options.toLineHeight(z(t.lineHeight,n.defaultLineHeight),i),size:i,style:z(t.fontStyle,n.defaultFontStyle),weight:null,string:""};return r.string=!(e=r)||D.isNullOrUndef(e.size)||D.isNullOrUndef(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family,r},resolve:function(t,e,n,i){for(var r,a=!0,o=0,s=t.length;o<s;++o)if(void 0!==(r=t[o])&&(void 0!==e&&"function"==typeof r&&(r=r(e),a=!1),void 0!==n&&D.isArray(r)&&(r=r[n],a=!1),void 0!==r))return i&&!a&&(i.cacheable=!1),r}},E={_factorize:function(t){for(var e=[],n=Math.sqrt(t),i=1;i<n;i++)t%i==0&&(e.push(i),e.push(t/i));return n===(0|n)&&e.push(n),e.sort(function(t,e){return t-e}).pop(),e},log10:Math.log10||function(t){var e=Math.log(t)*Math.LOG10E,n=Math.round(e);return t===Math.pow(10,n)?n:e}},H=E;D.log10=E.log10;var B=D,j=N,U=V,G=H,q={getRtlAdapter:function(t,e,n){return t?(i=e,r=n,{x:function(t){return i+i+r-t},setWidth:function(t){r=t},textAlign:function(t){return"center"===t?t:"right"===t?"left":"right"},xPlus:function(t,e){return t-e},leftForLtr:function(t,e){return t-e}}):{x:function(t){return t},setWidth:function(t){},textAlign:function(t){return t},xPlus:function(t,e){return t+e},leftForLtr:function(t,e){return t}};var i,r},overrideTextDirection:function(t,e){var n,i;"ltr"!==e&&"rtl"!==e||(i=[(n=t.canvas.style).getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=i)},restoreTextDirection:function(t){var e=t.prevTextDirection;void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}};B.easing=P,B.canvas=j,B.options=U,B.math=G,B.rtl=q;function Z(t){B.extend(this,t),this.initialize.apply(this,arguments)}B.extend(Z.prototype,{_type:void 0,initialize:function(){this.hidden=!1},pivot:function(){var t=this;return t._view||(t._view=B.extend({},t._model)),t._start={},t},transition:function(t){var e=this,n=e._model,i=e._start,r=e._view;return n&&1!==t?(r=r||(e._view={}),function(t,e,n,i){for(var r,a,o,s,l,u,d,h=Object.keys(n),c=0,f=h.length;c<f;++c)if(s=n[r=h[c]],e.hasOwnProperty(r)||(e[r]=s),(a=e[r])!==s&&"_"!==r[0]){if(t.hasOwnProperty(r)||(t[r]=a),(l=typeof s)==typeof(o=t[r]))if("string"==l){if((u=w(o)).valid&&(d=w(s)).valid){e[r]=d.mix(u,i).rgbString();continue}}else if(B.isFinite(o)&&B.isFinite(s)){e[r]=o+(s-o)*i;continue}e[r]=s}}(i=i||(e._start={}),r,n,t)):(e._view=B.extend({},n),e._start=null),e},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return B.isNumber(this._model.x)&&B.isNumber(this._model.y)}}),Z.extend=B.inherits;var $=Z,X=$.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),K=X;Object.defineProperty(X.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(X.prototype,"chartInstance",{get:function(){return this.chart},set:function(t){this.chart=t}}),Y._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:B.noop,onComplete:B.noop}});var J={animations:[],request:null,addAnimation:function(t,e,n,i){var r,a,o=this.animations;for(e.chart=t,e.startTime=Date.now(),e.duration=n,i||(t.animating=!0),r=0,a=o.length;r<a;++r)if(o[r].chart===t)return void(o[r]=e);o.push(e),1===o.length&&this.requestAnimationFrame()},cancelAnimation:function(e){var t=B.findIndex(this.animations,function(t){return t.chart===e});-1!==t&&(this.animations.splice(t,1),e.animating=!1)},requestAnimationFrame:function(){var t=this;null===t.request&&(t.request=B.requestAnimFrame.call(window,function(){t.request=null,t.startDigest()}))},startDigest:function(){this.advance(),0<this.animations.length&&this.requestAnimationFrame()},advance:function(){for(var t,e,n,i,r=this.animations,a=0;a<r.length;)e=(t=r[a]).chart,n=t.numSteps,i=Math.floor((Date.now()-t.startTime)/t.duration*n)+1,t.currentStep=Math.min(i,n),B.callback(t.render,[e,t],e),B.callback(t.onAnimationProgress,[t],e),t.currentStep>=n?(B.callback(t.onAnimationComplete,[t],e),e.animating=!1,r.splice(a,1)):++a}},Q=B.options.resolve,tt=["push","pop","shift","splice","unshift"];function et(e,t){var n,i,r=e._chartjs;r&&(-1!==(i=(n=r.listeners).indexOf(t))&&n.splice(i,1),0<n.length||(tt.forEach(function(t){delete e[t]}),delete e._chartjs))}function nt(t,e){this.initialize(t,e)}B.extend(nt.prototype,{datasetElementType:null,dataElementType:null,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth"],_dataElementOptions:["backgroundColor","borderColor","borderWidth","pointStyle"],initialize:function(t,e){var n=this;n.chart=t,n.index=e,n.linkScales(),n.addElements(),n._type=n.getMeta().type},updateIndex:function(t){this.index=t},linkScales:function(){var t=this.getMeta(),e=this.chart,n=e.scales,i=this.getDataset(),r=e.options.scales;null!==t.xAxisID&&t.xAxisID in n&&!i.xAxisID||(t.xAxisID=i.xAxisID||r.xAxes[0].id),null!==t.yAxisID&&t.yAxisID in n&&!i.yAxisID||(t.yAxisID=i.yAxisID||r.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(t){return this.chart.scales[t]},_getValueScaleId:function(){return this.getMeta().yAxisID},_getIndexScaleId:function(){return this.getMeta().xAxisID},_getValueScale:function(){return this.getScaleForId(this._getValueScaleId())},_getIndexScale:function(){return this.getScaleForId(this._getIndexScaleId())},reset:function(){this._update(!0)},destroy:function(){this._data&&et(this._data,this)},createMetaDataset:function(){var t=this.datasetElementType;return t&&new t({_chart:this.chart,_datasetIndex:this.index})},createMetaData:function(t){var e=this.dataElementType;return e&&new e({_chart:this.chart,_datasetIndex:this.index,_index:t})},addElements:function(){for(var t=this.getMeta(),e=this.getDataset().data||[],n=t.data,i=0,r=e.length;i<r;++i)n[i]=n[i]||this.createMetaData(i);t.dataset=t.dataset||this.createMetaDataset()},addElementAndReset:function(t){var e=this.createMetaData(t);this.getMeta().data.splice(t,0,e),this.updateElement(e,t,!0)},buildOrUpdateElements:function(){var r,t,e=this,n=e.getDataset(),i=n.data||(n.data=[]);e._data!==i&&(e._data&&et(e._data,e),i&&Object.isExtensible(i)&&(t=e,(r=i)._chartjs?r._chartjs.listeners.push(t):(Object.defineProperty(r,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),tt.forEach(function(t){var n="onData"+t.charAt(0).toUpperCase()+t.slice(1),i=r[t];Object.defineProperty(r,t,{configurable:!0,enumerable:!1,value:function(){var e=Array.prototype.slice.call(arguments),t=i.apply(this,e);return B.each(r._chartjs.listeners,function(t){"function"==typeof t[n]&&t[n].apply(t,e)}),t}})}))),e._data=i),e.resyncElements()},_configure:function(){this._config=B.merge(Object.create(null),[this.chart.options.datasets[this._type],this.getDataset()],{merger:function(t,e,n){"_meta"!==t&&"data"!==t&&B._merger(t,e,n)}})},_update:function(t){this._configure(),this._cachedDataOpts=null,this.update(t)},update:B.noop,transition:function(t){for(var e=this.getMeta(),n=e.data||[],i=n.length,r=0;r<i;++r)n[r].transition(t);e.dataset&&e.dataset.transition(t)},draw:function(){var t=this.getMeta(),e=t.data||[],n=e.length,i=0;for(t.dataset&&t.dataset.draw();i<n;++i)e[i].draw()},getStyle:function(t){var e,n=this.getMeta(),i=n.dataset;return this._configure(),!1!==(e=i&&void 0===t?this._resolveDatasetElementOptions(i||{}):(t=t||0,this._resolveDataElementOptions(n.data[t]||{},t))).fill&&null!==e.fill||(e.backgroundColor=e.borderColor),e},_resolveDatasetElementOptions:function(t,e){for(var n,i,r=this,a=r.chart,o=r._config,s=t.custom||{},l=a.options.elements[r.datasetElementType.prototype._type]||{},u=r._datasetElementOptions,d={},h={chart:a,dataset:r.getDataset(),datasetIndex:r.index,hover:e},c=0,f=u.length;c<f;++c)n=u[c],i=e?"hover"+n.charAt(0).toUpperCase()+n.slice(1):n,d[n]=Q([s[i],o[i],l[i]],h);return d},_resolveDataElementOptions:function(t,e){var n=this,i=t&&t.custom,r=n._cachedDataOpts;if(r&&!i)return r;var a,o,s,l,u=n.chart,d=n._config,h=u.options.elements[n.dataElementType.prototype._type]||{},c=n._dataElementOptions,f={},g={chart:u,dataIndex:e,dataset:n.getDataset(),datasetIndex:n.index},m={cacheable:!i},i=i||{};if(B.isArray(c))for(o=0,s=c.length;o<s;++o)f[l=c[o]]=Q([i[l],d[l],h[l]],g,e,m);else for(o=0,s=(a=Object.keys(c)).length;o<s;++o)f[l=a[o]]=Q([i[l],d[c[l]],d[l],h[l]],g,e,m);return m.cacheable&&(n._cachedDataOpts=Object.freeze(f)),f},removeHoverStyle:function(t){B.merge(t._model,t.$previousStyle||{}),delete t.$previousStyle},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t._index,i=t.custom||{},r=t._model,a=B.getHoverColor;t.$previousStyle={backgroundColor:r.backgroundColor,borderColor:r.borderColor,borderWidth:r.borderWidth},r.backgroundColor=Q([i.hoverBackgroundColor,e.hoverBackgroundColor,a(r.backgroundColor)],void 0,n),r.borderColor=Q([i.hoverBorderColor,e.hoverBorderColor,a(r.borderColor)],void 0,n),r.borderWidth=Q([i.hoverBorderWidth,e.hoverBorderWidth,r.borderWidth],void 0,n)},_removeDatasetHoverStyle:function(){var t=this.getMeta().dataset;t&&this.removeHoverStyle(t)},_setDatasetHoverStyle:function(){var t,e,n,i,r,a,o=this.getMeta().dataset,s={};if(o){for(a=o._model,r=this._resolveDatasetElementOptions(o,!0),t=0,e=(i=Object.keys(r)).length;t<e;++t)s[n=i[t]]=a[n],a[n]=r[n];o.$previousStyle=s}},resyncElements:function(){var t=this.getMeta(),e=this.getDataset().data,n=t.data.length,i=e.length;i<n?t.data.splice(i,n-i):n<i&&this.insertElements(n,i-n)},insertElements:function(t,e){for(var n=0;n<e;++n)this.addElementAndReset(t+n)},onDataPush:function(){var t=arguments.length;this.insertElements(this.getDataset().data.length-t,t)},onDataPop:function(){this.getMeta().data.pop()},onDataShift:function(){this.getMeta().data.shift()},onDataSplice:function(t,e){this.getMeta().data.splice(t,e),this.insertElements(t,arguments.length-2)},onDataUnshift:function(){this.insertElements(0,arguments.length)}}),nt.extend=B.inherits;var it=nt,rt=2*Math.PI;function at(t,e){var n=e.startAngle,i=e.endAngle,r=e.pixelMargin,a=r/e.outerRadius,o=e.x,s=e.y;t.beginPath(),t.arc(o,s,e.outerRadius,n-a,i+a),e.innerRadius>r?(a=r/e.innerRadius,t.arc(o,s,e.innerRadius-r,i+a,n-a,!0)):t.arc(o,s,r,i+Math.PI/2,n-Math.PI/2),t.closePath(),t.clip()}function ot(t,e,n){var i="inner"===e.borderAlign;i?(t.lineWidth=2*e.borderWidth,t.lineJoin="round"):(t.lineWidth=e.borderWidth,t.lineJoin="bevel"),n.fullCircles&&function(t,e,n,i){var r,a=n.endAngle;for(i&&(n.endAngle=n.startAngle+rt,at(t,n),n.endAngle=a,n.endAngle===n.startAngle&&n.fullCircles&&(n.endAngle+=rt,n.fullCircles--)),t.beginPath(),t.arc(n.x,n.y,n.innerRadius,n.startAngle+rt,n.startAngle,!0),r=0;r<n.fullCircles;++r)t.stroke();for(t.beginPath(),t.arc(n.x,n.y,e.outerRadius,n.startAngle,n.startAngle+rt),r=0;r<n.fullCircles;++r)t.stroke()}(t,e,n,i),i&&at(t,n),t.beginPath(),t.arc(n.x,n.y,e.outerRadius,n.startAngle,n.endAngle),t.arc(n.x,n.y,n.innerRadius,n.endAngle,n.startAngle,!0),t.closePath(),t.stroke()}Y._set("global",{elements:{arc:{backgroundColor:Y.global.defaultColor,borderColor:"#fff",borderWidth:2,borderAlign:"center"}}});var st=$.extend({_type:"arc",inLabelRange:function(t){var e=this._view;return!!e&&Math.pow(t-e.x,2)<Math.pow(e.radius+e.hoverRadius,2)},inRange:function(t,e){var n=this._view;if(n){for(var i=B.getAngleFromPoint(n,{x:t,y:e}),r=i.angle,a=i.distance,o=n.startAngle,s=n.endAngle;s<o;)s+=rt;for(;s<r;)r-=rt;for(;r<o;)r+=rt;var l=o<=r&&r<=s,u=a>=n.innerRadius&&a<=n.outerRadius;return l&&u}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,n=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},getArea:function(){var t=this._view;return Math.PI*((t.endAngle-t.startAngle)/(2*Math.PI))*(Math.pow(t.outerRadius,2)-Math.pow(t.innerRadius,2))},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,n=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},draw:function(){var t,e=this._chart.ctx,n=this._view,i="inner"===n.borderAlign?.33:0,r={x:n.x,y:n.y,innerRadius:n.innerRadius,outerRadius:Math.max(n.outerRadius-i,0),pixelMargin:i,startAngle:n.startAngle,endAngle:n.endAngle,fullCircles:Math.floor(n.circumference/rt)};if(e.save(),e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,r.fullCircles){for(r.endAngle=r.startAngle+rt,e.beginPath(),e.arc(r.x,r.y,r.outerRadius,r.startAngle,r.endAngle),e.arc(r.x,r.y,r.innerRadius,r.endAngle,r.startAngle,!0),e.closePath(),t=0;t<r.fullCircles;++t)e.fill();r.endAngle=r.startAngle+n.circumference%rt}e.beginPath(),e.arc(r.x,r.y,r.outerRadius,r.startAngle,r.endAngle),e.arc(r.x,r.y,r.innerRadius,r.endAngle,r.startAngle,!0),e.closePath(),e.fill(),n.borderWidth&&ot(e,n,r),e.restore()}}),lt=B.valueOrDefault,ut=Y.global.defaultColor;Y._set("global",{elements:{line:{tension:.4,backgroundColor:ut,borderWidth:3,borderColor:ut,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}});var dt=$.extend({_type:"line",draw:function(){var t,e,n,i=this,r=i._view,a=i._chart.ctx,o=r.spanGaps,s=i._children.slice(),l=Y.global,u=l.elements.line,d=-1,h=i._loop;if(s.length){if(i._loop){for(t=0;t<s.length;++t)if(e=B.previousItem(s,t),!s[t]._view.skip&&e._view.skip){s=s.slice(t).concat(s.slice(0,t)),h=o;break}h&&s.push(s[0])}for(a.save(),a.lineCap=r.borderCapStyle||u.borderCapStyle,a.setLineDash&&a.setLineDash(r.borderDash||u.borderDash),a.lineDashOffset=lt(r.borderDashOffset,u.borderDashOffset),a.lineJoin=r.borderJoinStyle||u.borderJoinStyle,a.lineWidth=lt(r.borderWidth,u.borderWidth),a.strokeStyle=r.borderColor||l.defaultColor,a.beginPath(),(n=s[0]._view).skip||(a.moveTo(n.x,n.y),d=0),t=1;t<s.length;++t)n=s[t]._view,e=-1===d?B.previousItem(s,t):s[d],n.skip||(d!==t-1&&!o||-1===d?a.moveTo(n.x,n.y):B.canvas.lineTo(a,e._view,n),d=t);h&&a.closePath(),a.stroke(),a.restore()}}}),ht=B.valueOrDefault,ct=Y.global.defaultColor;function ft(t){var e=this._view;return!!e&&Math.abs(t-e.x)<e.radius+e.hitRadius}Y._set("global",{elements:{point:{radius:3,pointStyle:"circle",backgroundColor:ct,borderColor:ct,borderWidth:1,hitRadius:1,hoverRadius:4,hoverBorderWidth:1}}});var gt=$.extend({_type:"point",inRange:function(t,e){var n=this._view;return!!n&&Math.pow(t-n.x,2)+Math.pow(e-n.y,2)<Math.pow(n.hitRadius+n.radius,2)},inLabelRange:ft,inXRange:ft,inYRange:function(t){var e=this._view;return!!e&&Math.abs(t-e.y)<e.radius+e.hitRadius},getCenterPoint:function(){var t=this._view;return{x:t.x,y:t.y}},getArea:function(){return Math.PI*Math.pow(this._view.radius,2)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y,padding:t.radius+t.borderWidth}},draw:function(t){var e=this._view,n=this._chart.ctx,i=e.pointStyle,r=e.rotation,a=e.radius,o=e.x,s=e.y,l=Y.global,u=l.defaultColor;e.skip||void 0!==t&&!B.canvas._isPointInArea(e,t)||(n.strokeStyle=e.borderColor||u,n.lineWidth=ht(e.borderWidth,l.elements.point.borderWidth),n.fillStyle=e.backgroundColor||u,B.canvas.drawPoint(n,i,a,o,s,r))}}),mt=Y.global.defaultColor;function pt(t){return t&&void 0!==t.width}function vt(t){var e,n,i,r,a=pt(t)?(r=t.width/2,e=t.x-r,n=t.x+r,i=Math.min(t.y,t.base),Math.max(t.y,t.base)):(r=t.height/2,e=Math.min(t.x,t.base),n=Math.max(t.x,t.base),i=t.y-r,t.y+r);return{left:e,top:i,right:n,bottom:a}}function yt(t,e,n){return t===e?n:t===n?e:t}function bt(t,e,n){var i,r,a,o,s,l,u,d=t.borderWidth,h=(r=(i=t).borderSkipped,a={},r&&(i.horizontal?i.base>i.x&&(r=yt(r,"left","right")):i.base<i.y&&(r=yt(r,"bottom","top")),a[r]=!0),a);return B.isObject(d)?(o=+d.top||0,s=+d.right||0,l=+d.bottom||0,u=+d.left||0):o=s=l=u=+d||0,{t:h.top||o<0?0:n<o?n:o,r:h.right||s<0?0:e<s?e:s,b:h.bottom||l<0?0:n<l?n:l,l:h.left||u<0?0:e<u?e:u}}function xt(t,e,n){var i=null===e,r=null===n,a=!(!t||i&&r)&&vt(t);return a&&(i||e>=a.left&&e<=a.right)&&(r||n>=a.top&&n<=a.bottom)}Y._set("global",{elements:{rectangle:{backgroundColor:mt,borderColor:mt,borderSkipped:"bottom",borderWidth:0}}});var _t=$.extend({_type:"rectangle",draw:function(){var t,e,n,i,r,a=this._chart.ctx,o=this._view,s=(e=vt(t=o),n=e.right-e.left,i=e.bottom-e.top,r=bt(t,n/2,i/2),{outer:{x:e.left,y:e.top,w:n,h:i},inner:{x:e.left+r.l,y:e.top+r.t,w:n-r.l-r.r,h:i-r.t-r.b}}),l=s.outer,u=s.inner;a.fillStyle=o.backgroundColor,a.fillRect(l.x,l.y,l.w,l.h),l.w===u.w&&l.h===u.h||(a.save(),a.beginPath(),a.rect(l.x,l.y,l.w,l.h),a.clip(),a.fillStyle=o.borderColor,a.rect(u.x,u.y,u.w,u.h),a.fill("evenodd"),a.restore())},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){return xt(this._view,t,e)},inLabelRange:function(t,e){var n=this._view;return pt(n)?xt(n,t,null):xt(n,null,e)},inXRange:function(t){return xt(this._view,t,null)},inYRange:function(t){return xt(this._view,null,t)},getCenterPoint:function(){var t,e=this._view,n=pt(e)?(t=e.x,(e.y+e.base)/2):(t=(e.x+e.base)/2,e.y);return{x:t,y:n}},getArea:function(){var t=this._view;return pt(t)?t.width*Math.abs(t.y-t.base):t.height*Math.abs(t.x-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}}),wt={},kt=dt,Mt=gt,St=_t;wt.Arc=st,wt.Line=kt,wt.Point=Mt,wt.Rectangle=St;var Dt=B._deprecated,Ct=B.valueOrDefault;function Pt(t,e,n){var i,r=n.barThickness,a=e.stackCount,o=e.pixels[t],s=B.isNullOrUndef(r)?function(t,e){for(var n,i,r=t._length,a=1,o=e.length;a<o;++a)r=Math.min(r,Math.abs(e[a]-e[a-1]));for(a=0,o=t.getTicks().length;a<o;++a)i=t.getPixelForTick(a),r=0<a?Math.min(r,Math.abs(i-n)):r,n=i;return r}(e.scale,e.pixels):-1,l=B.isNullOrUndef(r)?(i=s*n.categoryPercentage,n.barPercentage):(i=r*a,1);return{chunk:i/a,ratio:l,start:o-i/2}}Y._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),Y._set("global",{datasets:{bar:{categoryPercentage:.8,barPercentage:.9}}});var Tt=it.extend({dataElementType:wt.Rectangle,_dataElementOptions:["backgroundColor","borderColor","borderSkipped","borderWidth","barPercentage","barThickness","categoryPercentage","maxBarThickness","minBarLength"],initialize:function(){var t,e,n=this;it.prototype.initialize.apply(n,arguments),(t=n.getMeta()).stack=n.getDataset().stack,t.bar=!0,e=n._getIndexScale().options,Dt("bar chart",e.barPercentage,"scales.[x/y]Axes.barPercentage","dataset.barPercentage"),Dt("bar chart",e.barThickness,"scales.[x/y]Axes.barThickness","dataset.barThickness"),Dt("bar chart",e.categoryPercentage,"scales.[x/y]Axes.categoryPercentage","dataset.categoryPercentage"),Dt("bar chart",n._getValueScale().options.minBarLength,"scales.[x/y]Axes.minBarLength","dataset.minBarLength"),Dt("bar chart",e.maxBarThickness,"scales.[x/y]Axes.maxBarThickness","dataset.maxBarThickness")},update:function(t){var e,n,i=this.getMeta().data;for(this._ruler=this.getRuler(),e=0,n=i.length;e<n;++e)this.updateElement(i[e],e,t)},updateElement:function(t,e,n){var i=this,r=i.getMeta(),a=i.getDataset(),o=i._resolveDataElementOptions(t,e);t._xScale=i.getScaleForId(r.xAxisID),t._yScale=i.getScaleForId(r.yAxisID),t._datasetIndex=i.index,t._index=e,t._model={backgroundColor:o.backgroundColor,borderColor:o.borderColor,borderSkipped:o.borderSkipped,borderWidth:o.borderWidth,datasetLabel:a.label,label:i.chart.data.labels[e]},B.isArray(a.data[e])&&(t._model.borderSkipped=null),i._updateElementGeometry(t,e,n,o),t.pivot()},_updateElementGeometry:function(t,e,n,i){var r=this,a=t._model,o=r._getValueScale(),s=o.getBasePixel(),l=o.isHorizontal(),u=r._ruler||r.getRuler(),d=r.calculateBarValuePixels(r.index,e,i),h=r.calculateBarIndexPixels(r.index,e,u,i);a.horizontal=l,a.base=n?s:d.base,a.x=l?n?s:d.head:h.center,a.y=l?h.center:n?s:d.head,a.height=l?h.size:void 0,a.width=l?void 0:h.size},_getStacks:function(t){for(var e,n=this._getIndexScale(),i=n._getMatchingVisibleMetas(this._type),r=n.options.stacked,a=i.length,o=[],s=0;s<a&&(e=i[s],(!1===r||-1===o.indexOf(e.stack)||void 0===r&&void 0===e.stack)&&o.push(e.stack),e.index!==t);++s);return o},getStackCount:function(){return this._getStacks().length},getStackIndex:function(t,e){var n=this._getStacks(t),i=void 0!==e?n.indexOf(e):-1;return-1===i?n.length-1:i},getRuler:function(){for(var t=this._getIndexScale(),e=[],n=0,i=this.getMeta().data.length;n<i;++n)e.push(t.getPixelForValue(null,n,this.index));return{pixels:e,start:t._startPixel,end:t._endPixel,stackCount:this.getStackCount(),scale:t}},calculateBarValuePixels:function(t,e,n){var i,r,a,o,s,l,u,d=this.chart,h=this._getValueScale(),c=h.isHorizontal(),f=d.data.datasets,g=h._getMatchingVisibleMetas(this._type),m=h._parseValue(f[t].data[e]),p=n.minBarLength,v=h.options.stacked,y=this.getMeta().stack,b=void 0===m.start?0:0<=m.max&&0<=m.min?m.min:m.max,x=void 0===m.start?m.end:0<=m.max&&0<=m.min?m.max-m.min:m.min-m.max,_=g.length;if(v||void 0===v&&void 0!==y)for(i=0;i<_&&(r=g[i]).index!==t;++i)r.stack===y&&(a=void 0===(u=h._parseValue(f[r.index].data[e])).start?u.end:0<=u.min&&0<=u.max?u.max:u.min,(m.min<0&&a<0||0<=m.max&&0<a)&&(b+=a));return o=h.getPixelForValue(b),l=(s=h.getPixelForValue(b+x))-o,void 0!==p&&Math.abs(l)<p&&(l=p,s=0<=x&&!c||x<0&&c?o-p:o+p),{size:l,base:o,head:s,center:s+l/2}},calculateBarIndexPixels:function(t,e,n,i){var r,a,o,s,l,u,d,h,c,f="flex"===i.barThickness?(r=e,o=i,l=(a=n).pixels,u=l[r],d=0<r?l[r-1]:null,h=r<l.length-1?l[r+1]:null,c=o.categoryPercentage,null===d&&(d=u-(null===h?a.end-a.start:h-u)),null===h&&(h=u+u-d),s=u-(u-Math.min(d,h))/2*c,{chunk:Math.abs(h-d)/2*c/a.stackCount,ratio:o.barPercentage,start:s}):Pt(e,n,i),g=this.getStackIndex(t,this.getMeta().stack),m=f.start+f.chunk*g+f.chunk/2,p=Math.min(Ct(i.maxBarThickness,1/0),f.chunk*f.ratio);return{base:m-p/2,head:m+p/2,center:m,size:p}},draw:function(){var t=this.chart,e=this._getValueScale(),n=this.getMeta().data,i=this.getDataset(),r=n.length,a=0;for(B.canvas.clipArea(t.ctx,t.chartArea);a<r;++a){var o=e._parseValue(i.data[a]);isNaN(o.min)||isNaN(o.max)||n[a].draw()}B.canvas.unclipArea(t.ctx)},_resolveDataElementOptions:function(){var t=B.extend({},it.prototype._resolveDataElementOptions.apply(this,arguments)),e=this._getIndexScale().options,n=this._getValueScale().options;return t.barPercentage=Ct(e.barPercentage,t.barPercentage),t.barThickness=Ct(e.barThickness,t.barThickness),t.categoryPercentage=Ct(e.categoryPercentage,t.categoryPercentage),t.maxBarThickness=Ct(e.maxBarThickness,t.maxBarThickness),t.minBarLength=Ct(n.minBarLength,t.minBarLength),t}}),Ot=B.valueOrDefault,At=B.options.resolve;Y._set("bubble",{hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-0"}],yAxes:[{type:"linear",position:"left",id:"y-axis-0"}]},tooltips:{callbacks:{title:function(){return""},label:function(t,e){var n=e.datasets[t.datasetIndex].label||"",i=e.datasets[t.datasetIndex].data[t.index];return n+": ("+t.xLabel+", "+t.yLabel+", "+i.r+")"}}}});var Ft=it.extend({dataElementType:wt.Point,_dataElementOptions:["backgroundColor","borderColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","hoverRadius","hitRadius","pointStyle","rotation"],update:function(n){var i=this,t=i.getMeta().data;B.each(t,function(t,e){i.updateElement(t,e,n)})},updateElement:function(t,e,n){var i=this,r=i.getMeta(),a=t.custom||{},o=i.getScaleForId(r.xAxisID),s=i.getScaleForId(r.yAxisID),l=i._resolveDataElementOptions(t,e),u=i.getDataset().data[e],d=i.index,h=n?o.getPixelForDecimal(.5):o.getPixelForValue("object"==typeof u?u:NaN,e,d),c=n?s.getBasePixel():s.getPixelForValue(u,e,d);t._xScale=o,t._yScale=s,t._options=l,t._datasetIndex=d,t._index=e,t._model={backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,hitRadius:l.hitRadius,pointStyle:l.pointStyle,rotation:l.rotation,radius:n?0:l.radius,skip:a.skip||isNaN(h)||isNaN(c),x:h,y:c},t.pivot()},setHoverStyle:function(t){var e=t._model,n=t._options,i=B.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=Ot(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=Ot(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=Ot(n.hoverBorderWidth,n.borderWidth),e.radius=n.radius+n.hoverRadius},_resolveDataElementOptions:function(t,e){var n=this,i=n.chart,r=n.getDataset(),a=t.custom||{},o=r.data[e]||{},s=it.prototype._resolveDataElementOptions.apply(n,arguments),l={chart:i,dataIndex:e,dataset:r,datasetIndex:n.index};return n._cachedDataOpts===s&&(s=B.extend({},s)),s.radius=At([a.radius,o.r,n._config.radius,i.options.elements.point.radius],l,e),s}}),It=B.valueOrDefault,Lt=Math.PI,Rt=2*Lt,Nt=Lt/2;Y._set("doughnut",{animation:{animateRotate:!0,animateScale:!1},hover:{mode:"single"},legendCallback:function(t){var e,n,i,r=document.createElement("ul"),a=t.data,o=a.datasets,s=a.labels;if(r.setAttribute("class",t.id+"-legend"),o.length)for(n=o[e=0].data.length;e<n;++e)(i=r.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=o[0].backgroundColor[e],s[e]&&i.appendChild(document.createTextNode(s[e]));return r.outerHTML},legend:{labels:{generateLabels:function(r){var a=r.data;return a.labels.length&&a.datasets.length?a.labels.map(function(t,e){var n=r.getDatasetMeta(0),i=n.controller.getStyle(e);return{text:t,fillStyle:i.backgroundColor,strokeStyle:i.borderColor,lineWidth:i.borderWidth,hidden:isNaN(a.datasets[0].data[e])||n.data[e].hidden,index:e}}):[]}},onClick:function(t,e){for(var n,i=e.index,r=this.chart,a=0,o=(r.data.datasets||[]).length;a<o;++a)(n=r.getDatasetMeta(a)).data[i]&&(n.data[i].hidden=!n.data[i].hidden);r.update()}},cutoutPercentage:50,rotation:-Nt,circumference:Rt,tooltips:{callbacks:{title:function(){return""},label:function(t,e){var n=e.labels[t.index],i=": "+e.datasets[t.datasetIndex].data[t.index];return B.isArray(n)?(n=n.slice())[0]+=i:n+=i,n}}}});var Wt=it.extend({dataElementType:wt.Arc,linkScales:B.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],getRingIndex:function(t){for(var e=0,n=0;n<t;++n)this.chart.isDatasetVisible(n)&&++e;return e},update:function(t){var e,n,i,r,a,o,s,l,u,d,h,c,f,g,m,p,v,y=this,b=y.chart,x=b.chartArea,_=b.options,w=1,k=1,M=0,S=0,D=y.getMeta(),C=D.data,P=_.cutoutPercentage/100||0,T=_.circumference,O=y._getRingWeight(y.index);for(T<Rt&&(a=_.rotation%Rt,o=(a+=Lt<=a?-Rt:a<-Lt?Rt:0)+T,s=Math.cos(a),l=Math.sin(a),u=Math.cos(o),d=Math.sin(o),h=a<=0&&0<=o||Rt<=o,c=a<=Nt&&Nt<=o||Rt+Nt<=o,f=a<=-Nt&&-Nt<=o||Lt+Nt<=o,g=a===-Lt||Lt<=o?-1:Math.min(s,s*P,u,u*P),m=f?-1:Math.min(l,l*P,d,d*P),w=((p=h?1:Math.max(s,s*P,u,u*P))-g)/2,k=((v=c?1:Math.max(l,l*P,d,d*P))-m)/2,M=-(p+g)/2,S=-(v+m)/2),i=0,r=C.length;i<r;++i)C[i]._options=y._resolveDataElementOptions(C[i],i);for(b.borderWidth=y.getMaxBorderWidth(),e=(x.right-x.left-b.borderWidth)/w,n=(x.bottom-x.top-b.borderWidth)/k,b.outerRadius=Math.max(Math.min(e,n)/2,0),b.innerRadius=Math.max(b.outerRadius*P,0),b.radiusLength=(b.outerRadius-b.innerRadius)/(y._getVisibleDatasetWeightTotal()||1),b.offsetX=M*b.outerRadius,b.offsetY=S*b.outerRadius,D.total=y.calculateTotal(),y.outerRadius=b.outerRadius-b.radiusLength*y._getRingWeightOffset(y.index),y.innerRadius=Math.max(y.outerRadius-b.radiusLength*O,0),i=0,r=C.length;i<r;++i)y.updateElement(C[i],i,t)},updateElement:function(t,e,n){var i=this,r=i.chart,a=r.chartArea,o=r.options,s=o.animation,l=(a.left+a.right)/2,u=(a.top+a.bottom)/2,d=o.rotation,h=o.rotation,c=i.getDataset(),f=n&&s.animateRotate||t.hidden?0:i.calculateCircumference(c.data[e])*(o.circumference/Rt),g=n&&s.animateScale?0:i.innerRadius,m=n&&s.animateScale?0:i.outerRadius,p=t._options||{};B.extend(t,{_datasetIndex:i.index,_index:e,_model:{backgroundColor:p.backgroundColor,borderColor:p.borderColor,borderWidth:p.borderWidth,borderAlign:p.borderAlign,x:l+r.offsetX,y:u+r.offsetY,startAngle:d,endAngle:h,circumference:f,outerRadius:m,innerRadius:g,label:B.valueAtIndexOrDefault(c.label,e,r.data.labels[e])}});var v=t._model;n&&s.animateRotate||(v.startAngle=0===e?o.rotation:i.getMeta().data[e-1]._model.endAngle,v.endAngle=v.startAngle+v.circumference),t.pivot()},calculateTotal:function(){var n,i=this.getDataset(),t=this.getMeta(),r=0;return B.each(t.data,function(t,e){n=i.data[e],isNaN(n)||t.hidden||(r+=Math.abs(n))}),r},calculateCircumference:function(t){var e=this.getMeta().total;return 0<e&&!isNaN(t)?Rt*(Math.abs(t)/e):0},getMaxBorderWidth:function(t){var e,n,i,r,a,o,s,l,u=0,d=this.chart;if(!t)for(e=0,n=d.data.datasets.length;e<n;++e)if(d.isDatasetVisible(e)){t=(i=d.getDatasetMeta(e)).data,e!==this.index&&(a=i.controller);break}if(!t)return 0;for(e=0,n=t.length;e<n;++e)r=t[e],"inner"!==(o=a?(a._configure(),a._resolveDataElementOptions(r,e)):r._options).borderAlign&&(u=(u=u<(s=o.borderWidth)?s:u)<(l=o.hoverBorderWidth)?l:u);return u},setHoverStyle:function(t){var e=t._model,n=t._options,i=B.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=It(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=It(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=It(n.hoverBorderWidth,n.borderWidth)},_getRingWeightOffset:function(t){for(var e=0,n=0;n<t;++n)this.chart.isDatasetVisible(n)&&(e+=this._getRingWeight(n));return e},_getRingWeight:function(t){return Math.max(It(this.chart.data.datasets[t].weight,1),0)},_getVisibleDatasetWeightTotal:function(){return this._getRingWeightOffset(this.chart.data.datasets.length)}});Y._set("horizontalBar",{hover:{mode:"index",axis:"y"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{type:"category",position:"left",offset:!0,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{mode:"index",axis:"y"}}),Y._set("global",{datasets:{horizontalBar:{categoryPercentage:.8,barPercentage:.9}}});var Yt=Tt.extend({_getValueScaleId:function(){return this.getMeta().xAxisID},_getIndexScaleId:function(){return this.getMeta().yAxisID}}),zt=B.valueOrDefault,Vt=B.options.resolve,Et=B.canvas._isPointInArea;function Ht(t,e){var n=t&&t.options.ticks||{},i=n.reverse,r=void 0===n.min?e:0,a=void 0===n.max?e:0;return{start:i?a:r,end:i?r:a}}Y._set("line",{showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}});var Bt=it.extend({datasetElementType:wt.Line,dataElementType:wt.Point,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth","cubicInterpolationMode","fill"],_dataElementOptions:{backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},update:function(t){var e,n,i=this,r=i.getMeta(),a=r.dataset,o=r.data||[],s=i.chart.options,l=i._config,u=i._showLine=zt(l.showLine,s.showLines);for(i._xScale=i.getScaleForId(r.xAxisID),i._yScale=i.getScaleForId(r.yAxisID),u&&(void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),a._scale=i._yScale,a._datasetIndex=i.index,a._children=o,a._model=i._resolveDatasetElementOptions(a),a.pivot()),e=0,n=o.length;e<n;++e)i.updateElement(o[e],e,t);for(u&&0!==a._model.tension&&i.updateBezierControlPoints(),e=0,n=o.length;e<n;++e)o[e].pivot()},updateElement:function(t,e,n){var i=this,r=i.getMeta(),a=t.custom||{},o=i.getDataset(),s=i.index,l=o.data[e],u=i._xScale,d=i._yScale,h=r.dataset._model,c=i._resolveDataElementOptions(t,e),f=u.getPixelForValue("object"==typeof l?l:NaN,e,s),g=n?d.getBasePixel():i.calculatePointY(l,e,s);t._xScale=u,t._yScale=d,t._options=c,t._datasetIndex=s,t._index=e,t._model={x:f,y:g,skip:a.skip||isNaN(f)||isNaN(g),radius:c.radius,pointStyle:c.pointStyle,rotation:c.rotation,backgroundColor:c.backgroundColor,borderColor:c.borderColor,borderWidth:c.borderWidth,tension:zt(a.tension,h?h.tension:0),steppedLine:!!h&&h.steppedLine,hitRadius:c.hitRadius}},_resolveDatasetElementOptions:function(t){var e,n,i,r,a,o,s,l,u,d,h,c=this,f=c._config,g=t.custom||{},m=c.chart.options,p=m.elements.line,v=it.prototype._resolveDatasetElementOptions.apply(c,arguments);return v.spanGaps=zt(f.spanGaps,m.spanGaps),v.tension=zt(f.lineTension,p.tension),v.steppedLine=Vt([g.steppedLine,f.steppedLine,p.stepped]),v.clip=(e=zt(f.clip,(o=c._xScale,s=c._yScale,l=v.borderWidth,d=Ht(o,u=l/2),{top:(h=Ht(s,u)).end,right:d.end,bottom:h.start,left:d.start})),B.isObject(e)?(n=e.top,i=e.right,r=e.bottom,a=e.left):n=i=r=a=e,{top:n,right:i,bottom:r,left:a}),v},calculatePointY:function(t,e,n){var i,r,a,o,s,l,u,d=this.chart,h=this._yScale,c=0,f=0;if(h.options.stacked){for(s=+h.getRightValue(t),u=(l=d._getSortedVisibleDatasetMetas()).length,i=0;i<u&&(a=l[i]).index!==n;++i)r=d.data.datasets[a.index],"line"===a.type&&a.yAxisID===h.id&&((o=+h.getRightValue(r.data[e]))<0?f+=o||0:c+=o||0);return s<0?h.getPixelForValue(f+s):h.getPixelForValue(c+s)}return h.getPixelForValue(t)},updateBezierControlPoints:function(){var t,e,n,i,r=this.chart,a=this.getMeta(),o=a.dataset._model,s=r.chartArea,l=a.data||[];function u(t,e,n){return Math.max(Math.min(t,n),e)}if(o.spanGaps&&(l=l.filter(function(t){return!t._model.skip})),"monotone"===o.cubicInterpolationMode)B.splineCurveMonotone(l);else for(t=0,e=l.length;t<e;++t)n=l[t]._model,i=B.splineCurve(B.previousItem(l,t)._model,n,B.nextItem(l,t)._model,o.tension),n.controlPointPreviousX=i.previous.x,n.controlPointPreviousY=i.previous.y,n.controlPointNextX=i.next.x,n.controlPointNextY=i.next.y;if(r.options.elements.line.capBezierPoints)for(t=0,e=l.length;t<e;++t)n=l[t]._model,Et(n,s)&&(0<t&&Et(l[t-1]._model,s)&&(n.controlPointPreviousX=u(n.controlPointPreviousX,s.left,s.right),n.controlPointPreviousY=u(n.controlPointPreviousY,s.top,s.bottom)),t<l.length-1&&Et(l[t+1]._model,s)&&(n.controlPointNextX=u(n.controlPointNextX,s.left,s.right),n.controlPointNextY=u(n.controlPointNextY,s.top,s.bottom)))},draw:function(){var t,e=this.chart,n=this.getMeta(),i=n.data||[],r=e.chartArea,a=e.canvas,o=0,s=i.length;for(this._showLine&&(t=n.dataset._model.clip,B.canvas.clipArea(e.ctx,{left:!1===t.left?0:r.left-t.left,right:!1===t.right?a.width:r.right+t.right,top:!1===t.top?0:r.top-t.top,bottom:!1===t.bottom?a.height:r.bottom+t.bottom}),n.dataset.draw(),B.canvas.unclipArea(e.ctx));o<s;++o)i[o].draw(r)},setHoverStyle:function(t){var e=t._model,n=t._options,i=B.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=zt(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=zt(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=zt(n.hoverBorderWidth,n.borderWidth),e.radius=zt(n.hoverRadius,n.radius)}}),jt=B.options.resolve;Y._set("polarArea",{scale:{type:"radialLinear",angleLines:{display:!1},gridLines:{circular:!0},pointLabels:{display:!1},ticks:{beginAtZero:!0}},animation:{animateRotate:!0,animateScale:!0},startAngle:-.5*Math.PI,legendCallback:function(t){var e,n,i,r=document.createElement("ul"),a=t.data,o=a.datasets,s=a.labels;if(r.setAttribute("class",t.id+"-legend"),o.length)for(n=o[e=0].data.length;e<n;++e)(i=r.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=o[0].backgroundColor[e],s[e]&&i.appendChild(document.createTextNode(s[e]));return r.outerHTML},legend:{labels:{generateLabels:function(r){var a=r.data;return a.labels.length&&a.datasets.length?a.labels.map(function(t,e){var n=r.getDatasetMeta(0),i=n.controller.getStyle(e);return{text:t,fillStyle:i.backgroundColor,strokeStyle:i.borderColor,lineWidth:i.borderWidth,hidden:isNaN(a.datasets[0].data[e])||n.data[e].hidden,index:e}}):[]}},onClick:function(t,e){for(var n,i=e.index,r=this.chart,a=0,o=(r.data.datasets||[]).length;a<o;++a)(n=r.getDatasetMeta(a)).data[i].hidden=!n.data[i].hidden;r.update()}},tooltips:{callbacks:{title:function(){return""},label:function(t,e){return e.labels[t.index]+": "+t.yLabel}}}});var Ut=it.extend({dataElementType:wt.Arc,linkScales:B.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(t){var e,n,i,r=this,a=r.getDataset(),o=r.getMeta(),s=r.chart.options.startAngle||0,l=r._starts=[],u=r._angles=[],d=o.data;for(r._updateRadius(),o.count=r.countVisibleElements(),e=0,n=a.data.length;e<n;e++)l[e]=s,i=r._computeAngle(e),s+=u[e]=i;for(e=0,n=d.length;e<n;++e)d[e]._options=r._resolveDataElementOptions(d[e],e),r.updateElement(d[e],e,t)},_updateRadius:function(){var t=this,e=t.chart,n=e.chartArea,i=e.options,r=Math.min(n.right-n.left,n.bottom-n.top);e.outerRadius=Math.max(r/2,0),e.innerRadius=Math.max(i.cutoutPercentage?e.outerRadius/100*i.cutoutPercentage:1,0),e.radiusLength=(e.outerRadius-e.innerRadius)/e.getVisibleDatasetCount(),t.outerRadius=e.outerRadius-e.radiusLength*t.index,t.innerRadius=t.outerRadius-e.radiusLength},updateElement:function(t,e,n){var i=this,r=i.chart,a=i.getDataset(),o=r.options,s=o.animation,l=r.scale,u=r.data.labels,d=l.xCenter,h=l.yCenter,c=o.startAngle,f=t.hidden?0:l.getDistanceFromCenterForValue(a.data[e]),g=i._starts[e],m=g+(t.hidden?0:i._angles[e]),p=s.animateScale?0:l.getDistanceFromCenterForValue(a.data[e]),v=t._options||{};B.extend(t,{_datasetIndex:i.index,_index:e,_scale:l,_model:{backgroundColor:v.backgroundColor,borderColor:v.borderColor,borderWidth:v.borderWidth,borderAlign:v.borderAlign,x:d,y:h,innerRadius:0,outerRadius:n?p:f,startAngle:n&&s.animateRotate?c:g,endAngle:n&&s.animateRotate?c:m,label:B.valueAtIndexOrDefault(u,e,u[e])}}),t.pivot()},countVisibleElements:function(){var n=this.getDataset(),t=this.getMeta(),i=0;return B.each(t.data,function(t,e){isNaN(n.data[e])||t.hidden||i++}),i},setHoverStyle:function(t){var e=t._model,n=t._options,i=B.getHoverColor,r=B.valueOrDefault;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=r(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=r(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=r(n.hoverBorderWidth,n.borderWidth)},_computeAngle:function(t){var e=this,n=this.getMeta().count,i=e.getDataset(),r=e.getMeta();if(isNaN(i.data[t])||r.data[t].hidden)return 0;var a={chart:e.chart,dataIndex:t,dataset:i,datasetIndex:e.index};return jt([e.chart.options.elements.arc.angle,2*Math.PI/n],a,t)}});Y._set("pie",B.clone(Y.doughnut)),Y._set("pie",{cutoutPercentage:0});var Gt=Wt,qt=B.valueOrDefault;Y._set("radar",{spanGaps:!1,scale:{type:"radialLinear"},elements:{line:{fill:"start",tension:0}}});var Zt=it.extend({datasetElementType:wt.Line,dataElementType:wt.Point,linkScales:B.noop,_datasetElementOptions:["backgroundColor","borderWidth","borderColor","borderCapStyle","borderDash","borderDashOffset","borderJoinStyle","fill"],_dataElementOptions:{backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(t){var e,n,i=this,r=i.getMeta(),a=r.dataset,o=r.data||[],s=i.chart.scale,l=i._config;for(void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),a._scale=s,a._datasetIndex=i.index,a._children=o,a._loop=!0,a._model=i._resolveDatasetElementOptions(a),a.pivot(),e=0,n=o.length;e<n;++e)i.updateElement(o[e],e,t);for(i.updateBezierControlPoints(),e=0,n=o.length;e<n;++e)o[e].pivot()},updateElement:function(t,e,n){var i=this,r=t.custom||{},a=i.getDataset(),o=i.chart.scale,s=o.getPointPositionForValue(e,a.data[e]),l=i._resolveDataElementOptions(t,e),u=i.getMeta().dataset._model,d=n?o.xCenter:s.x,h=n?o.yCenter:s.y;t._scale=o,t._options=l,t._datasetIndex=i.index,t._index=e,t._model={x:d,y:h,skip:r.skip||isNaN(d)||isNaN(h),radius:l.radius,pointStyle:l.pointStyle,rotation:l.rotation,backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,tension:qt(r.tension,u?u.tension:0),hitRadius:l.hitRadius}},_resolveDatasetElementOptions:function(){var t=this._config,e=this.chart.options,n=it.prototype._resolveDatasetElementOptions.apply(this,arguments);return n.spanGaps=qt(t.spanGaps,e.spanGaps),n.tension=qt(t.lineTension,e.elements.line.tension),n},updateBezierControlPoints:function(){var t,e,n,i,r=this.getMeta(),a=this.chart.chartArea,o=r.data||[];function s(t,e,n){return Math.max(Math.min(t,n),e)}for(r.dataset._model.spanGaps&&(o=o.filter(function(t){return!t._model.skip})),t=0,e=o.length;t<e;++t)n=o[t]._model,i=B.splineCurve(B.previousItem(o,t,!0)._model,n,B.nextItem(o,t,!0)._model,n.tension),n.controlPointPreviousX=s(i.previous.x,a.left,a.right),n.controlPointPreviousY=s(i.previous.y,a.top,a.bottom),n.controlPointNextX=s(i.next.x,a.left,a.right),n.controlPointNextY=s(i.next.y,a.top,a.bottom)},setHoverStyle:function(t){var e=t._model,n=t._options,i=B.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=qt(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=qt(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=qt(n.hoverBorderWidth,n.borderWidth),e.radius=qt(n.hoverRadius,n.radius)}});Y._set("scatter",{hover:{mode:"single"},scales:{xAxes:[{id:"x-axis-1",type:"linear",position:"bottom"}],yAxes:[{id:"y-axis-1",type:"linear",position:"left"}]},tooltips:{callbacks:{title:function(){return""},label:function(t){return"("+t.xLabel+", "+t.yLabel+")"}}}}),Y._set("global",{datasets:{scatter:{showLine:!1}}});var $t={bar:Tt,bubble:Ft,doughnut:Wt,horizontalBar:Yt,line:Bt,polarArea:Ut,pie:Gt,radar:Zt,scatter:Bt};function Xt(t,e){return t.native?{x:t.x,y:t.y}:B.getRelativePosition(t,e)}function Kt(t,e){for(var n,i,r,a,o=t._getSortedVisibleDatasetMetas(),s=0,l=o.length;s<l;++s)for(i=0,r=(n=o[s].data).length;i<r;++i)(a=n[i])._view.skip||e(a)}function Jt(t,e){var n=[];return Kt(t,function(t){t.inRange(e.x,e.y)&&n.push(t)}),n}function Qt(t,i,r,a){var o=Number.POSITIVE_INFINITY,s=[];return Kt(t,function(t){var e,n;r&&!t.inRange(i.x,i.y)||(e=t.getCenterPoint(),(n=a(i,e))<o?(s=[t],o=n):n===o&&s.push(t))}),s}function te(t){var r=-1!==t.indexOf("x"),a=-1!==t.indexOf("y");return function(t,e){var n=r?Math.abs(t.x-e.x):0,i=a?Math.abs(t.y-e.y):0;return Math.sqrt(Math.pow(n,2)+Math.pow(i,2))}}function ee(t,e,n){var i=Xt(e,t);n.axis=n.axis||"x";var r=te(n.axis),a=n.intersect?Jt(t,i):Qt(t,i,!1,r),o=[];return a.length?(t._getSortedVisibleDatasetMetas().forEach(function(t){var e=t.data[a[0]._index];e&&!e._view.skip&&o.push(e)}),o):[]}var ne={modes:{single:function(t,e){var n=Xt(e,t),i=[];return Kt(t,function(t){return t.inRange(n.x,n.y)&&(i.push(t),i)}),i.slice(0,1)},label:ee,index:ee,dataset:function(t,e,n){var i=Xt(e,t);n.axis=n.axis||"xy";var r=te(n.axis),a=n.intersect?Jt(t,i):Qt(t,i,!1,r);return 0<a.length&&(a=t.getDatasetMeta(a[0]._datasetIndex).data),a},"x-axis":function(t,e){return ee(t,e,{intersect:!1})},point:function(t,e){return Jt(t,Xt(e,t))},nearest:function(t,e,n){var i=Xt(e,t);n.axis=n.axis||"xy";var r=te(n.axis);return Qt(t,i,n.intersect,r)},x:function(t,e,n){var i=Xt(e,t),r=[],a=!1;return Kt(t,function(t){t.inXRange(i.x)&&r.push(t),t.inRange(i.x,i.y)&&(a=!0)}),n.intersect&&!a&&(r=[]),r},y:function(t,e,n){var i=Xt(e,t),r=[],a=!1;return Kt(t,function(t){t.inYRange(i.y)&&r.push(t),t.inRange(i.x,i.y)&&(a=!0)}),n.intersect&&!a&&(r=[]),r}}},ie=B.extend;function re(t,e){return B.where(t,function(t){return t.pos===e})}function ae(t,r){return t.sort(function(t,e){var n=r?e:t,i=r?t:e;return n.weight===i.weight?n.index-i.index:n.weight-i.weight})}function oe(t){var e=function(t){for(var e,n=[],i=0,r=(t||[]).length;i<r;++i)e=t[i],n.push({index:i,box:e,pos:e.position,horizontal:e.isHorizontal(),weight:e.weight});return n}(t),n=ae(re(e,"left"),!0),i=ae(re(e,"right")),r=ae(re(e,"top"),!0),a=ae(re(e,"bottom"));return{leftAndTop:n.concat(r),rightAndBottom:i.concat(a),chartArea:re(e,"chartArea"),vertical:n.concat(i),horizontal:r.concat(a)}}function se(t,e,n,i){return Math.max(t[n],e[n])+Math.max(t[i],e[i])}function le(t,e,n){for(var i,r,a,o,s=[],l=0,u=t.length;l<u;++l)(r=(i=t[l]).box).update(i.width||e.w,i.height||e.h,function(t,n){var i=n.maxPadding;function e(t){var e={left:0,top:0,right:0,bottom:0};return t.forEach(function(t){e[t]=Math.max(n[t],i[t])}),e}return e(t?["left","right"]:["top","bottom"])}(i.horizontal,e)),function(t,e,n){var i,r,a,o=n.box,s=t.maxPadding;if(n.size&&(t[n.pos]-=n.size),n.size=n.horizontal?o.height:o.width,t[n.pos]+=n.size,o.getPadding&&(a=o.getPadding(),s.top=Math.max(s.top,a.top),s.left=Math.max(s.left,a.left),s.bottom=Math.max(s.bottom,a.bottom),s.right=Math.max(s.right,a.right)),i=e.outerWidth-se(s,t,"left","right"),r=e.outerHeight-se(s,t,"top","bottom"),i!==t.w||r!==t.h){t.w=i,t.h=r;var l=n.horizontal?[i,t.w]:[r,t.h];return!(l[0]===l[1]||isNaN(l[0])&&isNaN(l[1]))}}(e,n,i)&&(o=!0,s.length&&(a=!0)),r.fullWidth||s.push(i);return a&&le(s,e,n)||o}function ue(t,e,n){for(var i,r,a=n.padding,o=e.x,s=e.y,l=0,u=t.length;l<u;++l)r=(i=t[l]).box,i.horizontal?(r.left=r.fullWidth?a.left:e.left,r.right=r.fullWidth?n.outerWidth-a.right:e.left+e.w,r.top=s,r.bottom=s+r.height,r.width=r.right-r.left,s=r.bottom):(r.left=o,r.right=o+r.width,r.top=e.top,r.bottom=e.top+e.h,r.height=r.bottom-r.top,o=r.right);e.x=o,e.y=s}Y._set("global",{layout:{padding:{top:0,right:0,bottom:0,left:0}}});var de,he={defaults:{},addBox:function(t,e){t.boxes||(t.boxes=[]),e.fullWidth=e.fullWidth||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw:function(){e.draw.apply(e,arguments)}}]},t.boxes.push(e)},removeBox:function(t,e){var n=t.boxes?t.boxes.indexOf(e):-1;-1!==n&&t.boxes.splice(n,1)},configure:function(t,e,n){for(var i,r=["fullWidth","position","weight"],a=r.length,o=0;o<a;++o)i=r[o],n.hasOwnProperty(i)&&(e[i]=n[i])},update:function(n,t,e){var i,r,a,o,s,l,u,d,h,c,f;function g(t){var e=Math.max(f[t]-c[t],0);return c[t]+=e,e}n&&(i=n.options.layout||{},a=t-(r=B.options.toPadding(i.padding)).width,o=e-r.height,l=(s=oe(n.boxes)).vertical,u=s.horizontal,d=Object.freeze({outerWidth:t,outerHeight:e,padding:r,availableWidth:a,vBoxMaxWidth:a/2/l.length,hBoxMaxHeight:o/2}),h=ie({maxPadding:ie({},r),w:a,h:o,x:r.left,y:r.top},r),function(t,e){for(var n,i=0,r=t.length;i<r;++i)(n=t[i]).width=n.horizontal?n.box.fullWidth&&e.availableWidth:e.vBoxMaxWidth,n.height=n.horizontal&&e.hBoxMaxHeight}(l.concat(u),d),le(l,h,d),le(u,h,d)&&le(l,h,d),f=(c=h).maxPadding,c.y+=g("top"),c.x+=g("left"),g("right"),g("bottom"),ue(s.leftAndTop,h,d),h.x+=h.w,h.y+=h.h,ue(s.rightAndBottom,h,d),n.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h},B.each(s.chartArea,function(t){var e=t.box;ie(e,n.chartArea),e.update(h.w,h.h)}))}},ce=(de=Object.freeze({__proto__:null,default:"/*\r\n * DOM element rendering detection\r\n * https://davidwalsh.name/detect-node-insertion\r\n */\r\n@keyframes chartjs-render-animation {\r\n\tfrom { opacity: 0.99; }\r\n\tto { opacity: 1; }\r\n}\r\n\r\n.chartjs-render-monitor {\r\n\tanimation: chartjs-render-animation 0.001s;\r\n}\r\n\r\n/*\r\n * DOM element resizing detection\r\n * https://github.com/marcj/css-element-queries\r\n */\r\n.chartjs-size-monitor,\r\n.chartjs-size-monitor-expand,\r\n.chartjs-size-monitor-shrink {\r\n\tposition: absolute;\r\n\tdirection: ltr;\r\n\tleft: 0;\r\n\ttop: 0;\r\n\tright: 0;\r\n\tbottom: 0;\r\n\toverflow: hidden;\r\n\tpointer-events: none;\r\n\tvisibility: hidden;\r\n\tz-index: -1;\r\n}\r\n\r\n.chartjs-size-monitor-expand > div {\r\n\tposition: absolute;\r\n\twidth: 1000000px;\r\n\theight: 1000000px;\r\n\tleft: 0;\r\n\ttop: 0;\r\n}\r\n\r\n.chartjs-size-monitor-shrink > div {\r\n\tposition: absolute;\r\n\twidth: 200%;\r\n\theight: 200%;\r\n\tleft: 0;\r\n\ttop: 0;\r\n}\r\n"}))&&de.default||de,fe="$chartjs",ge="chartjs-",me=ge+"size-monitor",pe=ge+"render-monitor",ve=ge+"render-animation",ye=["animationstart","webkitAnimationStart"],be={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function xe(t,e){var n=B.getStyle(t,e),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?Number(i[1]):void 0}var _e=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("e",null,e)}catch(t){}return t}()&&{passive:!0};function we(t,e,n){t.addEventListener(e,n,_e)}function ke(t,e,n){t.removeEventListener(e,n,_e)}function Me(t,e,n,i,r){return{type:t,chart:e,native:r||null,x:void 0!==n?n:null,y:void 0!==i?i:null}}function Se(t){var e=document.createElement("div");return e.className=t||"",e}function De(n,i,r){var t,e,a,o,s,l,u,d,h,c,f,g,m=n[fe]||(n[fe]={}),p=m.resizer=(u=!(s=function(){var t,e;m.resizer&&(e=(t=r.options.maintainAspectRatio&&n.parentNode)?t.clientWidth:0,i(Me("resize",r)),t&&t.clientWidth<e&&r.canvas&&i(Me("resize",r)))}),d=[],t=function(){d=Array.prototype.slice.call(arguments),l=l||this,u||(u=!0,B.requestAnimFrame.call(window,function(){u=!1,s.apply(l,d)}))},e=Se(me),a=Se(me+"-expand"),o=Se(me+"-shrink"),a.appendChild(Se()),o.appendChild(Se()),e.appendChild(a),e.appendChild(o),e._reset=function(){a.scrollLeft=1e6,a.scrollTop=1e6,o.scrollLeft=1e6,o.scrollTop=1e6},we(a,"scroll",v.bind(a,"expand")),we(o,"scroll",v.bind(o,"shrink")),e);function v(){e._reset(),t()}c=function(){var t;m.resizer&&((t=n.parentNode)&&t!==p.parentNode&&t.insertBefore(p,t.firstChild),p._reset())},f=(h=n)[fe]||(h[fe]={}),g=f.renderProxy=function(t){t.animationName===ve&&c()},B.each(ye,function(t){we(h,t,g)}),f.reflow=!!h.offsetParent,h.classList.add(pe)}function Ce(t){var e,n,i,r=t[fe]||{},a=r.resizer;delete r.resizer,n=(e=t)[fe]||{},(i=n.renderProxy)&&(B.each(ye,function(t){ke(e,t,i)}),delete n.renderProxy),e.classList.remove(pe),a&&a.parentNode&&a.parentNode.removeChild(a)}var Pe={disableCSSInjection:!1,_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,_ensureLoaded:function(t){var e,n,i,r,a,o;this.disableCSSInjection||(n=(e=t.getRootNode?t.getRootNode():document).host?e:document.head,r=ce,(o=(i=n)[fe]||(i[fe]={})).containsStyles||(o.containsStyles=!0,r="/* Chart.js */\n"+r,(a=document.createElement("style")).setAttribute("type","text/css"),a.appendChild(document.createTextNode(r)),i.appendChild(a)))},acquireContext:function(t,e){"string"==typeof t?t=document.getElementById(t):t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas);var n,i,r,a,o,s,l,u=t&&t.getContext&&t.getContext("2d");return u&&u.canvas===t?(this._ensureLoaded(t),i=e,o=(n=t).style,s=n.getAttribute("height"),l=n.getAttribute("width"),n[fe]={initial:{height:s,width:l,style:{display:o.display,height:o.height,width:o.width}}},o.display=o.display||"block",null!==l&&""!==l||void 0!==(r=xe(n,"width"))&&(n.width=r),null!==s&&""!==s||(""===n.style.height?n.height=n.width/(i.options.aspectRatio||2):(a=xe(n,"height"),void 0!==r&&(n.height=a))),u):null},releaseContext:function(t){var n,i=t.canvas;i[fe]&&(n=i[fe].initial,["height","width"].forEach(function(t){var e=n[t];B.isNullOrUndef(e)?i.removeAttribute(t):i.setAttribute(t,e)}),B.each(n.style||{},function(t,e){i.style[e]=t}),i.width,delete i[fe])},addEventListener:function(a,t,o){var e,n=a.canvas;"resize"!==t?we(n,t,((e=o[fe]||(o[fe]={})).proxies||(e.proxies={}))[a.id+"_"+t]=function(t){var e,n,i,r;o((n=a,i=be[(e=t).type]||e.type,r=B.getRelativePosition(e,n),Me(i,n,r.x,r.y,e)))}):De(n,o,a)},removeEventListener:function(t,e,n){var i,r=t.canvas;"resize"!==e?(i=((n[fe]||{}).proxies||{})[t.id+"_"+e])&&ke(r,e,i):Ce(r)}};B.addEvent=we,B.removeEvent=ke;var Te=Pe._enabled?Pe:{acquireContext:function(t){return t&&t.canvas&&(t=t.canvas),t&&t.getContext("2d")||null}},Oe=B.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},Te);Y._set("global",{plugins:{}});var Ae={_plugins:[],_cacheId:0,register:function(t){var e=this._plugins;[].concat(t).forEach(function(t){-1===e.indexOf(t)&&e.push(t)}),this._cacheId++},unregister:function(t){var n=this._plugins;[].concat(t).forEach(function(t){var e=n.indexOf(t);-1!==e&&n.splice(e,1)}),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(t,e,n){for(var i,r,a,o,s=this.descriptors(t),l=s.length,u=0;u<l;++u)if("function"==typeof(o=(r=(i=s[u]).plugin)[e])&&((a=[t].concat(n||[])).push(i.options),!1===o.apply(r,a)))return!1;return!0},descriptors:function(t){var e=t.$plugins||(t.$plugins={});if(e.id===this._cacheId)return e.descriptors;var i=[],r=[],n=t&&t.config||{},a=n.options&&n.options.plugins||{};return this._plugins.concat(n.plugins||[]).forEach(function(t){var e,n;-1===i.indexOf(t)&&(e=t.id,!1!==(n=a[e])&&(!0===n&&(n=B.clone(Y.global.plugins[e])),i.push(t),r.push({plugin:t,options:n||{}})))}),e.descriptors=r,e.id=this._cacheId,r},_invalidate:function(t){delete t.$plugins}},Fe={constructors:{},defaults:{},registerScaleType:function(t,e,n){this.constructors[t]=e,this.defaults[t]=B.clone(n)},getScaleConstructor:function(t){return this.constructors.hasOwnProperty(t)?this.constructors[t]:void 0},getScaleDefaults:function(t){return this.defaults.hasOwnProperty(t)?B.merge(Object.create(null),[Y.scale,this.defaults[t]]):{}},updateScaleDefaults:function(t,e){this.defaults.hasOwnProperty(t)&&(this.defaults[t]=B.extend(this.defaults[t],e))},addScalesToLayout:function(e){B.each(e.scales,function(t){t.fullWidth=t.options.fullWidth,t.position=t.options.position,t.weight=t.options.weight,he.addBox(e,t)})}},Ie=B.valueOrDefault,Le=B.rtl.getRtlAdapter;Y._set("global",{tooltips:{enabled:!0,custom:null,mode:"nearest",position:"average",intersect:!0,backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,caretPadding:2,caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,callbacks:{beforeTitle:B.noop,title:function(t,e){var n,i="",r=e.labels,a=r?r.length:0;return 0<t.length&&((n=t[0]).label?i=n.label:n.xLabel?i=n.xLabel:0<a&&n.index<a&&(i=r[n.index])),i},afterTitle:B.noop,beforeBody:B.noop,beforeLabel:B.noop,label:function(t,e){var n=e.datasets[t.datasetIndex].label||"";return n&&(n+=": "),B.isNullOrUndef(t.value)?n+=t.yLabel:n+=t.value,n},labelColor:function(t,e){var n=e.getDatasetMeta(t.datasetIndex).data[t.index]._view;return{borderColor:n.borderColor,backgroundColor:n.backgroundColor}},labelTextColor:function(){return this._options.bodyFontColor},afterLabel:B.noop,afterBody:B.noop,beforeFooter:B.noop,footer:B.noop,afterFooter:B.noop}}});var Re={average:function(t){if(!t.length)return!1;for(var e=0,n=0,i=0,r=0,a=t.length;r<a;++r){var o,s=t[r];s&&s.hasValue()&&(e+=(o=s.tooltipPosition()).x,n+=o.y,++i)}return{x:e/i,y:n/i}},nearest:function(t,e){for(var n,i,r=e.x,a=e.y,o=Number.POSITIVE_INFINITY,s=0,l=t.length;s<l;++s){var u,d,h=t[s];h&&h.hasValue()&&(u=h.getCenterPoint(),(d=B.distanceBetweenPoints(e,u))<o&&(o=d,n=h))}return n&&(r=(i=n.tooltipPosition()).x,a=i.y),{x:r,y:a}}};function Ne(t,e){return e&&(B.isArray(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function We(t){return("string"==typeof t||t instanceof String)&&-1<t.indexOf("\n")?t.split("\n"):t}function Ye(t){var e=Y.global;return{xPadding:t.xPadding,yPadding:t.yPadding,xAlign:t.xAlign,yAlign:t.yAlign,rtl:t.rtl,textDirection:t.textDirection,bodyFontColor:t.bodyFontColor,_bodyFontFamily:Ie(t.bodyFontFamily,e.defaultFontFamily),_bodyFontStyle:Ie(t.bodyFontStyle,e.defaultFontStyle),_bodyAlign:t.bodyAlign,bodyFontSize:Ie(t.bodyFontSize,e.defaultFontSize),bodySpacing:t.bodySpacing,titleFontColor:t.titleFontColor,_titleFontFamily:Ie(t.titleFontFamily,e.defaultFontFamily),_titleFontStyle:Ie(t.titleFontStyle,e.defaultFontStyle),titleFontSize:Ie(t.titleFontSize,e.defaultFontSize),_titleAlign:t.titleAlign,titleSpacing:t.titleSpacing,titleMarginBottom:t.titleMarginBottom,footerFontColor:t.footerFontColor,_footerFontFamily:Ie(t.footerFontFamily,e.defaultFontFamily),_footerFontStyle:Ie(t.footerFontStyle,e.defaultFontStyle),footerFontSize:Ie(t.footerFontSize,e.defaultFontSize),_footerAlign:t.footerAlign,footerSpacing:t.footerSpacing,footerMarginTop:t.footerMarginTop,caretSize:t.caretSize,cornerRadius:t.cornerRadius,backgroundColor:t.backgroundColor,opacity:0,legendColorBackground:t.multiKeyBackground,displayColors:t.displayColors,borderColor:t.borderColor,borderWidth:t.borderWidth}}function ze(t,e){var n=t._chart.ctx,i=2*e.yPadding,r=0,a=e.body,o=a.reduce(function(t,e){return t+e.before.length+e.lines.length+e.after.length},0);o+=e.beforeBody.length+e.afterBody.length;var s=e.title.length,l=e.footer.length,u=e.titleFontSize,d=e.bodyFontSize,h=e.footerFontSize;i+=s*u,i+=s?(s-1)*e.titleSpacing:0,i+=s?e.titleMarginBottom:0,i+=o*d,i+=o?(o-1)*e.bodySpacing:0,i+=l?e.footerMarginTop:0,i+=l*h,i+=l?(l-1)*e.footerSpacing:0;function c(t){r=Math.max(r,n.measureText(t).width+f)}var f=0;return n.font=B.fontString(u,e._titleFontStyle,e._titleFontFamily),B.each(e.title,c),n.font=B.fontString(d,e._bodyFontStyle,e._bodyFontFamily),B.each(e.beforeBody.concat(e.afterBody),c),f=e.displayColors?d+2:0,B.each(a,function(t){B.each(t.before,c),B.each(t.lines,c),B.each(t.after,c)}),f=0,n.font=B.fontString(h,e._footerFontStyle,e._footerFontFamily),B.each(e.footer,c),{width:r+=2*e.xPadding,height:i}}function Ve(t,e){return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-t.xPadding:t.x+t.xPadding}function Ee(t){return Ne([],We(t))}var He=$.extend({initialize:function(){this._model=Ye(this._options),this._lastActive=[]},getTitle:function(){var t=this._options.callbacks,e=t.beforeTitle.apply(this,arguments),n=t.title.apply(this,arguments),i=t.afterTitle.apply(this,arguments),r=Ne(r=[],We(e));return r=Ne(r,We(n)),r=Ne(r,We(i))},getBeforeBody:function(){return Ee(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(t,n){var i=this,r=i._options.callbacks,a=[];return B.each(t,function(t){var e={before:[],lines:[],after:[]};Ne(e.before,We(r.beforeLabel.call(i,t,n))),Ne(e.lines,r.label.call(i,t,n)),Ne(e.after,We(r.afterLabel.call(i,t,n))),a.push(e)}),a},getAfterBody:function(){return Ee(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var t=this._options.callbacks,e=t.beforeFooter.apply(this,arguments),n=t.footer.apply(this,arguments),i=t.afterFooter.apply(this,arguments),r=Ne(r=[],We(e));return r=Ne(r,We(n)),r=Ne(r,We(i))},update:function(t){var e,n,i,r,a,o,s,l,u,d,h,c,f,g,m,p,v,y,b,x,_,w=this,k=w._options,M=w._model,S=w._model=Ye(k),D=w._active,C=w._data,P={xAlign:M.xAlign,yAlign:M.yAlign},T={x:M.x,y:M.y},O={width:M.width,height:M.height},A={x:M.caretX,y:M.caretY};if(D.length){S.opacity=1;for(var F=[],I=[],A=Re[k.position].call(w,D,w._eventPosition),L=[],R=0,N=D.length;R<N;++R)L.push((g=D[R],_=x=b=p=m=void 0,m=g._xScale,p=g._yScale||g._scale,v=g._index,y=g._datasetIndex,b=g._chart.getDatasetMeta(y).controller,x=b._getIndexScale(),_=b._getValueScale(),{xLabel:m?m.getLabelForIndex(v,y):"",yLabel:p?p.getLabelForIndex(v,y):"",label:x?""+x.getLabelForIndex(v,y):"",value:_?""+_.getLabelForIndex(v,y):"",index:v,datasetIndex:y,x:g._model.x,y:g._model.y}));k.filter&&(L=L.filter(function(t){return k.filter(t,C)})),k.itemSort&&(L=L.sort(function(t,e){return k.itemSort(t,e,C)})),B.each(L,function(t){F.push(k.callbacks.labelColor.call(w,t,w._chart)),I.push(k.callbacks.labelTextColor.call(w,t,w._chart))}),S.title=w.getTitle(L,C),S.beforeBody=w.getBeforeBody(L,C),S.body=w.getBody(L,C),S.afterBody=w.getAfterBody(L,C),S.footer=w.getFooter(L,C),S.x=A.x,S.y=A.y,S.caretPadding=k.caretPadding,S.labelColors=F,S.labelTextColors=I,S.dataPoints=L,P=function(t,e){var n,i=t._model,r=t._chart,a=t._chart.chartArea,o="center",s="center";i.y<e.height?s="top":i.y>r.height-e.height&&(s="bottom");var l=(a.left+a.right)/2,u=(a.top+a.bottom)/2,d="center"===s?(n=function(t){return t<=l},function(t){return l<t}):(n=function(t){return t<=e.width/2},function(t){return t>=r.width-e.width/2}),h=function(t){return t+e.width+i.caretSize+i.caretPadding>r.width},c=function(t){return t-e.width-i.caretSize-i.caretPadding<0},f=function(t){return t<=u?"top":"bottom"};n(i.x)?(o="left",h(i.x)&&(o="center",s=f(i.y))):d(i.x)&&(o="right",c(i.x)&&(o="center",s=f(i.y)));var g=t._options;return{xAlign:g.xAlign?g.xAlign:o,yAlign:g.yAlign?g.yAlign:s}}(this,O=ze(this,S)),e=S,n=O,i=P,r=w._chart,a=e.x,o=e.y,s=e.caretSize,l=e.caretPadding,u=e.cornerRadius,d=i.xAlign,h=i.yAlign,c=s+l,f=u+l,"right"===d?a-=n.width:"center"===d&&((a-=n.width/2)+n.width>r.width&&(a=r.width-n.width),a<0&&(a=0)),"top"===h?o+=c:o-="bottom"===h?n.height+c:n.height/2,"center"===h?"left"===d?a+=c:"right"===d&&(a-=c):"left"===d?a-=f:"right"===d&&(a+=f),T={x:a,y:o}}else S.opacity=0;return S.xAlign=P.xAlign,S.yAlign=P.yAlign,S.x=T.x,S.y=T.y,S.width=O.width,S.height=O.height,S.caretX=A.x,S.caretY=A.y,w._model=S,t&&k.custom&&k.custom.call(w,S),w},drawCaret:function(t,e){var n=this._chart.ctx,i=this._view,r=this.getCaretPosition(t,e,i);n.lineTo(r.x1,r.y1),n.lineTo(r.x2,r.y2),n.lineTo(r.x3,r.y3)},getCaretPosition:function(t,e,n){var i,r,a,o,s,l,u,d=n.caretSize,h=n.cornerRadius,c=n.xAlign,f=n.yAlign,g=t.x,m=t.y,p=e.width,v=e.height;return"center"===f?(a=m+v/2,o="left"===c?(i=(u=g)-d,l=u,r=a+d,a-d):(i=(u=g+p)+d,l=u,r=a-d,a+d)):(l=(u="left"===c?(i=g+h+d)-d:"right"===c?(i=g+p-h-d)-d:(i=n.caretX)-d,i+d),"top"===f?(a=(r=m)-d,o=r):(a=(r=m+v)+d,o=r,s=l,l=u,u=s)),{x1:u,x2:i,x3:l,y1:r,y2:a,y3:o}},drawTitle:function(t,e,n){var i,r,a,o=e.title,s=o.length;if(s){var l=Le(e.rtl,e.x,e.width);for(t.x=Ve(e,e._titleAlign),n.textAlign=l.textAlign(e._titleAlign),n.textBaseline="middle",i=e.titleFontSize,r=e.titleSpacing,n.fillStyle=e.titleFontColor,n.font=B.fontString(i,e._titleFontStyle,e._titleFontFamily),a=0;a<s;++a)n.fillText(o[a],l.x(t.x),t.y+i/2),t.y+=i+r,a+1===s&&(t.y+=e.titleMarginBottom-r)}},drawBody:function(e,t,n){function i(t){n.fillText(t,x.x(e.x+y),e.y+f/2),e.y+=f+g}var r,a,o,s,l,u,d,h,c,f=t.bodyFontSize,g=t.bodySpacing,m=t._bodyAlign,p=t.body,v=t.displayColors,y=0,b=v?Ve(t,"left"):0,x=Le(t.rtl,t.x,t.width),_=x.textAlign(m);for(n.textAlign=m,n.textBaseline="middle",n.font=B.fontString(f,t._bodyFontStyle,t._bodyFontFamily),e.x=Ve(t,_),n.fillStyle=t.bodyFontColor,B.each(t.beforeBody,i),y=v&&"right"!==_?"center"===m?f/2+1:f+2:0,l=0,d=p.length;l<d;++l){for(r=p[l],a=t.labelTextColors[l],o=t.labelColors[l],n.fillStyle=a,B.each(r.before,i),u=0,h=(s=r.lines).length;u<h;++u){v&&(c=x.x(b),n.fillStyle=t.legendColorBackground,n.fillRect(x.leftForLtr(c,f),e.y,f,f),n.lineWidth=1,n.strokeStyle=o.borderColor,n.strokeRect(x.leftForLtr(c,f),e.y,f,f),n.fillStyle=o.backgroundColor,n.fillRect(x.leftForLtr(x.xPlus(c,1),f-2),e.y+1,f-2,f-2),n.fillStyle=a),i(s[u])}B.each(r.after,i)}y=0,B.each(t.afterBody,i),e.y-=g},drawFooter:function(t,e,n){var i,r,a=e.footer,o=a.length;if(o){var s=Le(e.rtl,e.x,e.width);for(t.x=Ve(e,e._footerAlign),t.y+=e.footerMarginTop,n.textAlign=s.textAlign(e._footerAlign),n.textBaseline="middle",i=e.footerFontSize,n.fillStyle=e.footerFontColor,n.font=B.fontString(i,e._footerFontStyle,e._footerFontFamily),r=0;r<o;++r)n.fillText(a[r],s.x(t.x),t.y+i/2),t.y+=i+e.footerSpacing}},drawBackground:function(t,e,n,i){n.fillStyle=e.backgroundColor,n.strokeStyle=e.borderColor,n.lineWidth=e.borderWidth;var r=e.xAlign,a=e.yAlign,o=t.x,s=t.y,l=i.width,u=i.height,d=e.cornerRadius;n.beginPath(),n.moveTo(o+d,s),"top"===a&&this.drawCaret(t,i),n.lineTo(o+l-d,s),n.quadraticCurveTo(o+l,s,o+l,s+d),"center"===a&&"right"===r&&this.drawCaret(t,i),n.lineTo(o+l,s+u-d),n.quadraticCurveTo(o+l,s+u,o+l-d,s+u),"bottom"===a&&this.drawCaret(t,i),n.lineTo(o+d,s+u),n.quadraticCurveTo(o,s+u,o,s+u-d),"center"===a&&"left"===r&&this.drawCaret(t,i),n.lineTo(o,s+d),n.quadraticCurveTo(o,s,o+d,s),n.closePath(),n.fill(),0<e.borderWidth&&n.stroke()},draw:function(){var t,e,n,i,r=this._chart.ctx,a=this._view;0!==a.opacity&&(t={width:a.width,height:a.height},e={x:a.x,y:a.y},n=Math.abs(a.opacity<.001)?0:a.opacity,i=a.title.length||a.beforeBody.length||a.body.length||a.afterBody.length||a.footer.length,this._options.enabled&&i&&(r.save(),r.globalAlpha=n,this.drawBackground(e,a,r,t),e.y+=a.yPadding,B.rtl.overrideTextDirection(r,a.textDirection),this.drawTitle(e,a,r),this.drawBody(e,a,r),this.drawFooter(e,a,r),B.rtl.restoreTextDirection(r,a.textDirection),r.restore()))},handleEvent:function(t){var e,n=this,i=n._options;return n._lastActive=n._lastActive||[],"mouseout"===t.type?n._active=[]:(n._active=n._chart.getElementsAtEventForMode(t,i.mode,i),i.reverse&&n._active.reverse()),(e=!B.arrayEquals(n._active,n._lastActive))&&(n._lastActive=n._active,(i.enabled||i.custom)&&(n._eventPosition={x:t.x,y:t.y},n.update(!0),n.pivot())),e}});He.positioners=Re;var Be=B.valueOrDefault;function je(){return B.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,n,i){if("xAxes"===t||"yAxes"===t){var r,a,o,s=n[t].length;for(e[t]||(e[t]=[]),r=0;r<s;++r)o=n[t][r],a=Be(o.type,"xAxes"===t?"category":"linear"),r>=e[t].length&&e[t].push({}),!e[t][r].type||o.type&&o.type!==e[t][r].type?B.merge(e[t][r],[Fe.getScaleDefaults(a),o]):B.merge(e[t][r],o)}else B._merger(t,e,n,i)}})}function Ue(){return B.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,n,i){var r=e[t]||Object.create(null),a=n[t];"scales"===t?e[t]=je(r,a):"scale"===t?e[t]=B.merge(r,[Fe.getScaleDefaults(a.type),a]):B._merger(t,e,n,i)}})}function Ge(t,e,n){for(var i,r=function(t){return t.id===i};i=e+n++,0<=B.findIndex(t,r););return i}function qe(t){return"top"===t||"bottom"===t}function Ze(n,i){return function(t,e){return t[n]===e[n]?t[i]-e[i]:t[n]-e[n]}}Y._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});function $e(t,e){return this.construct(t,e),this}B.extend($e.prototype,{construct:function(t,e){var n,i,r=this;(i=(n=(n=e)||Object.create(null)).data=n.data||{}).datasets=i.datasets||[],i.labels=i.labels||[],n.options=Ue(Y.global,Y[n.type],n.options||{}),e=n;var a=Oe.acquireContext(t,e),o=a&&a.canvas,s=o&&o.height,l=o&&o.width;r.id=B.uid(),r.ctx=a,r.canvas=o,r.config=e,r.width=l,r.height=s,r.aspectRatio=s?l/s:null,r.options=e.options,r._bufferedRender=!1,r._layers=[],(r.chart=r).controller=r,$e.instances[r.id]=r,Object.defineProperty(r,"data",{get:function(){return r.config.data},set:function(t){r.config.data=t}}),a&&o?(r.initialize(),r.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return Ae.notify(t,"beforeInit"),B.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.initToolTip(),Ae.notify(t,"afterInit"),t},clear:function(){return B.canvas.clear(this),this},stop:function(){return J.cancelAnimation(this),this},resize:function(t){var e,n=this,i=n.options,r=n.canvas,a=i.maintainAspectRatio&&n.aspectRatio||null,o=Math.max(0,Math.floor(B.getMaximumWidth(r))),s=Math.max(0,Math.floor(a?o/a:B.getMaximumHeight(r)));n.width===o&&n.height===s||(r.width=n.width=o,r.height=n.height=s,r.style.width=o+"px",r.style.height=s+"px",B.retinaScale(n,i.devicePixelRatio),t||(e={width:o,height:s},Ae.notify(n,"resize",[e]),i.onResize&&i.onResize(n,e),n.stop(),n.update({duration:i.responsiveAnimationDuration})))},ensureScalesHaveIDs:function(){var t=this.options,n=t.scales||{},e=t.scale;B.each(n.xAxes,function(t,e){t.id||(t.id=Ge(n.xAxes,"x-axis-",e))}),B.each(n.yAxes,function(t,e){t.id||(t.id=Ge(n.yAxes,"y-axis-",e))}),e&&(e.id=e.id||"scale")},buildOrUpdateScales:function(){var o=this,t=o.options,s=o.scales||{},e=[],l=Object.keys(s).reduce(function(t,e){return t[e]=!1,t},{});t.scales&&(e=e.concat((t.scales.xAxes||[]).map(function(t){return{options:t,dtype:"category",dposition:"bottom"}}),(t.scales.yAxes||[]).map(function(t){return{options:t,dtype:"linear",dposition:"left"}}))),t.scale&&e.push({options:t.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),B.each(e,function(t){var e=t.options,n=e.id,i=Be(e.type,t.dtype);qe(e.position)!==qe(t.dposition)&&(e.position=t.dposition),l[n]=!0;var r=null;if(n in s&&s[n].type===i)(r=s[n]).options=e,r.ctx=o.ctx,r.chart=o;else{var a=Fe.getScaleConstructor(i);if(!a)return;r=new a({id:n,type:i,options:e,ctx:o.ctx,chart:o}),s[r.id]=r}r.mergeTicksOptions(),t.isDefault&&(o.scale=r)}),B.each(l,function(t,e){t||delete s[e]}),o.scales=s,Fe.addScalesToLayout(this)},buildOrUpdateControllers:function(){for(var t=this,e=[],n=t.data.datasets,i=0,r=n.length;i<r;i++){var a=n[i],o=t.getDatasetMeta(i),s=a.type||t.config.type;if(o.type&&o.type!==s&&(t.destroyDatasetMeta(i),o=t.getDatasetMeta(i)),o.type=s,o.order=a.order||0,o.index=i,o.controller)o.controller.updateIndex(i),o.controller.linkScales();else{var l=$t[o.type];if(void 0===l)throw new Error('"'+o.type+'" is not a chart type.');o.controller=new l(t,i),e.push(o.controller)}}return e},resetElements:function(){var n=this;B.each(n.data.datasets,function(t,e){n.getDatasetMeta(e).controller.reset()},n)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e,n,i=this;if(t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]}),n=(e=i).options,B.each(e.scales,function(t){he.removeBox(e,t)}),n=Ue(Y.global,Y[e.config.type],n),e.options=e.config.options=n,e.ensureScalesHaveIDs(),e.buildOrUpdateScales(),e.tooltip._options=n.tooltips,e.tooltip.initialize(),Ae._invalidate(i),!1!==Ae.notify(i,"beforeUpdate")){i.tooltip._data=i.data;for(var r=i.buildOrUpdateControllers(),a=0,o=i.data.datasets.length;a<o;a++)i.getDatasetMeta(a).controller.buildOrUpdateElements();i.updateLayout(),i.options.animation&&i.options.animation.duration&&B.each(r,function(t){t.reset()}),i.updateDatasets(),i.tooltip.initialize(),i.lastActive=[],Ae.notify(i,"afterUpdate"),i._layers.sort(Ze("z","_idx")),i._bufferedRender?i._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:i.render(t)}},updateLayout:function(){var e=this;!1!==Ae.notify(e,"beforeLayout")&&(he.update(this,this.width,this.height),e._layers=[],B.each(e.boxes,function(t){t._configure&&t._configure(),e._layers.push.apply(e._layers,t._layers())},e),e._layers.forEach(function(t,e){t._idx=e}),Ae.notify(e,"afterScaleUpdate"),Ae.notify(e,"afterLayout"))},updateDatasets:function(){if(!1!==Ae.notify(this,"beforeDatasetsUpdate")){for(var t=0,e=this.data.datasets.length;t<e;++t)this.updateDataset(t);Ae.notify(this,"afterDatasetsUpdate")}},updateDataset:function(t){var e=this.getDatasetMeta(t),n={meta:e,index:t};!1!==Ae.notify(this,"beforeDatasetUpdate",[n])&&(e.controller._update(),Ae.notify(this,"afterDatasetUpdate",[n]))},render:function(t){var e=this;t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]});var n=e.options.animation,i=Be(t.duration,n&&n.duration),r=t.lazy;if(!1!==Ae.notify(e,"beforeRender")){var a,o=function(t){Ae.notify(e,"afterRender"),B.callback(n&&n.onComplete,[t],e)};return n&&i?(a=new K({numSteps:i/16.66,easing:t.easing||n.easing,render:function(t,e){var n=B.easing.effects[e.easing],i=e.currentStep,r=i/e.numSteps;t.draw(n(r),r,i)},onAnimationProgress:n.onProgress,onAnimationComplete:o}),J.addAnimation(e,a,i,r)):(e.draw(),o(new K({numSteps:0,chart:e}))),e}},draw:function(t){var e,n,i=this;if(i.clear(),B.isNullOrUndef(t)&&(t=1),i.transition(t),!(i.width<=0||i.height<=0)&&!1!==Ae.notify(i,"beforeDraw",[t])){for(n=i._layers,e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(i.chartArea);for(i.drawDatasets(t);e<n.length;++e)n[e].draw(i.chartArea);i._drawTooltip(t),Ae.notify(i,"afterDraw",[t])}},transition:function(t){for(var e=0,n=(this.data.datasets||[]).length;e<n;++e)this.isDatasetVisible(e)&&this.getDatasetMeta(e).controller.transition(t);this.tooltip.transition(t)},_getSortedDatasetMetas:function(t){for(var e=[],n=0,i=(this.data.datasets||[]).length;n<i;++n)t&&!this.isDatasetVisible(n)||e.push(this.getDatasetMeta(n));return e.sort(Ze("order","index")),e},_getSortedVisibleDatasetMetas:function(){return this._getSortedDatasetMetas(!0)},drawDatasets:function(t){var e,n;if(!1!==Ae.notify(this,"beforeDatasetsDraw",[t])){for(n=(e=this._getSortedVisibleDatasetMetas()).length-1;0<=n;--n)this.drawDataset(e[n],t);Ae.notify(this,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var n={meta:t,index:t.index,easingValue:e};!1!==Ae.notify(this,"beforeDatasetDraw",[n])&&(t.controller.draw(e),Ae.notify(this,"afterDatasetDraw",[n]))},_drawTooltip:function(t){var e=this.tooltip,n={tooltip:e,easingValue:t};!1!==Ae.notify(this,"beforeTooltipDraw",[n])&&(e.draw(),Ae.notify(this,"afterTooltipDraw",[n]))},getElementAtEvent:function(t){return ne.modes.single(this,t)},getElementsAtEvent:function(t){return ne.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return ne.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,n){var i=ne.modes[e];return"function"==typeof i?i(this,t,n):[]},getDatasetAtEvent:function(t){return ne.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this.data.datasets[t];return e._meta||(e._meta={}),e._meta[this.id]||(e._meta[this.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e.order||0,index:t})},getVisibleDatasetCount:function(){for(var t=0,e=0,n=this.data.datasets.length;e<n;++e)this.isDatasetVisible(e)&&t++;return t},isDatasetVisible:function(t){var e=this.getDatasetMeta(t);return"boolean"==typeof e.hidden?!e.hidden:!this.data.datasets[t].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroyDatasetMeta:function(t){var e=this.id,n=this.data.datasets[t],i=n._meta&&n._meta[e];i&&(i.controller.destroy(),delete n._meta[e])},destroy:function(){var t,e,n=this,i=n.canvas;for(n.stop(),t=0,e=n.data.datasets.length;t<e;++t)n.destroyDatasetMeta(t);i&&(n.unbindEvents(),B.canvas.clear(n),Oe.releaseContext(n.ctx),n.canvas=null,n.ctx=null),Ae.notify(n,"destroy"),delete $e.instances[n.id]},toBase64Image:function(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){var t=this;t.tooltip=new He({_chart:t,_chartInstance:t,_data:t.data,_options:t.options.tooltips},t)},bindEvents:function(){var e=this,n=e._listeners={},i=function(){e.eventHandler.apply(e,arguments)};B.each(e.options.events,function(t){Oe.addEventListener(e,t,i),n[t]=i}),e.options.responsive&&(i=function(){e.resize()},Oe.addEventListener(e,"resize",i),n.resize=i)},unbindEvents:function(){var n=this,t=n._listeners;t&&(delete n._listeners,B.each(t,function(t,e){Oe.removeEventListener(n,e,t)}))},updateHoverStyle:function(t,e,n){for(var i,r=n?"set":"remove",a=0,o=t.length;a<o;++a)(i=t[a])&&this.getDatasetMeta(i._datasetIndex).controller[r+"HoverStyle"](i);"dataset"===e&&this.getDatasetMeta(t[0]._datasetIndex).controller["_"+r+"DatasetHoverStyle"]()},eventHandler:function(t){var e=this,n=e.tooltip;if(!1!==Ae.notify(e,"beforeEvent",[t])){e._bufferedRender=!0,e._bufferedRequest=null;var i=e.handleEvent(t);n&&(i=n._start?n.handleEvent(t):i|n.handleEvent(t)),Ae.notify(e,"afterEvent",[t]);var r=e._bufferedRequest;return r?e.render(r):i&&!e.animating&&(e.stop(),e.render({duration:e.options.hover.animationDuration,lazy:!0})),e._bufferedRender=!1,e._bufferedRequest=null,e}},handleEvent:function(t){var e,n=this,i=n.options||{},r=i.hover;return n.lastActive=n.lastActive||[],"mouseout"===t.type?n.active=[]:n.active=n.getElementsAtEventForMode(t,r.mode,r),B.callback(i.onHover||i.hover.onHover,[t.native,n.active],n),"mouseup"!==t.type&&"click"!==t.type||i.onClick&&i.onClick.call(n,t.native,n.active),n.lastActive.length&&n.updateHoverStyle(n.lastActive,r.mode,!1),n.active.length&&r.mode&&n.updateHoverStyle(n.active,r.mode,!0),e=!B.arrayEquals(n.active,n.lastActive),n.lastActive=n.active,e}}),$e.instances={};var Xe=$e;($e.Controller=$e).types={},B.configMerge=Ue,B.scaleMerge=je;function Ke(){throw new Error("This method is not implemented: either no adapter can be found or an incomplete integration was provided.")}function Je(t){this.options=t||{}}B.extend(Je.prototype,{formats:Ke,parse:Ke,format:Ke,add:Ke,diff:Ke,startOf:Ke,endOf:Ke,_create:function(t){return t}}),Je.override=function(t){B.extend(Je.prototype,t)};var Qe={_date:Je},tn={formatters:{values:function(t){return B.isArray(t)?t:""+t},linear:function(t,e,n){var i=3<n.length?n[2]-n[1]:n[1]-n[0];1<Math.abs(i)&&t!==Math.floor(t)&&(i=t-Math.floor(t));var r,a,o,s=B.log10(Math.abs(i));return 0!==t?Math.max(Math.abs(n[0]),Math.abs(n[n.length-1]))<1e-4?(r=B.log10(Math.abs(t)),a=Math.floor(r)-Math.floor(s),a=Math.max(Math.min(a,20),0),t.toExponential(a)):(o=-1*Math.floor(s),o=Math.max(Math.min(o,20),0),t.toFixed(o)):"0"},logarithmic:function(t,e,n){var i=t/Math.pow(10,Math.floor(B.log10(t)));return 0===t?"0":1==i||2==i||5==i||0===e||e===n.length-1?t.toExponential():""}}},en=B.isArray,nn=B.isNullOrUndef,rn=B.valueOrDefault,an=B.valueAtIndexOrDefault;function on(t,e,n,i){for(var r,a,o,s,l,u,d,h,c,f,g,m,p,v,y=n.length,b=[],x=[],_=[],w=0,k=0,M=0;M<y;++M){if(o=n[M].label,s=n[M].major?e.major:e.minor,t.font=l=s.string,u=i[l]=i[l]||{data:{},gc:[]},d=s.lineHeight,h=c=0,nn(o)||en(o)){if(en(o))for(r=0,a=o.length;r<a;++r)f=o[r],nn(f)||en(f)||(h=B.measureText(t,u.data,u.gc,h,f),c+=d)}else h=B.measureText(t,u.data,u.gc,h,o),c=d;b.push(h),x.push(c),_.push(d/2),w=Math.max(h,w),k=Math.max(c,k)}function S(t){return{width:b[t]||0,height:x[t]||0,offset:_[t]||0}}return p=i,v=y,B.each(p,function(t){var e,n=t.gc,i=n.length/2;if(v<i){for(e=0;e<i;++e)delete t.data[n[e]];n.splice(0,i)}}),g=b.indexOf(w),m=x.indexOf(k),{first:S(0),last:S(y-1),widest:S(g),highest:S(m)}}function sn(t){return t.drawTicks?t.tickMarkLength:0}function ln(t){var e,n;return t.display?(e=B.options._parseFont(t),n=B.options.toPadding(t.padding),e.lineHeight+n.height):0}function un(t,e){return B.extend(B.options._parseFont({fontFamily:rn(e.fontFamily,t.fontFamily),fontSize:rn(e.fontSize,t.fontSize),fontStyle:rn(e.fontStyle,t.fontStyle),lineHeight:rn(e.lineHeight,t.lineHeight)}),{color:B.options.resolve([e.fontColor,t.fontColor,Y.global.defaultFontColor])})}function dn(t){var e=un(t,t.minor);return{minor:e,major:t.major.enabled?un(t,t.major):e}}function hn(t){for(var e,n=[],i=0,r=t.length;i<r;++i)void 0!==(e=t[i])._index&&n.push(e);return n}function cn(t,e,n,i){var r,a,o,s,l=function(t){var e,n,i=t.length;if(i<2)return!1;for(n=t[0],e=1;e<i;++e)if(t[e]-t[e-1]!==n)return!1;return n}(t),u=(e.length-1)/i;if(!l)return Math.max(u,1);for(o=0,s=(r=B.math._factorize(l)).length-1;o<s;o++)if(u<(a=r[o]))return a;return Math.max(u,1)}function fn(t,e,n,i){var r,a,o,s,l=rn(n,0),u=Math.min(rn(i,t.length),t.length),d=0;for(e=Math.ceil(e),i&&(e=(r=i-n)/Math.floor(r/e)),s=l;s<0;)d++,s=Math.round(l+d*e);for(a=Math.max(l,0);a<u;a++)o=t[a],a===s?(o._index=a,d++,s=Math.round(l+d*e)):delete o.label}Y._set("scale",{display:!0,position:"left",offset:!1,gridLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",zeroLineBorderDash:[],zeroLineBorderDashOffset:0,offsetGridLines:!1,borderDash:[],borderDashOffset:0},scaleLabel:{display:!1,labelString:"",padding:{top:4,bottom:4}},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:0,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:tn.formatters.values,minor:{},major:{}}});var gn=$.extend({zeroLineIndex:0,getPadding:function(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}},getTicks:function(){return this._ticks},_getLabels:function(){var t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]},mergeTicksOptions:function(){},beforeUpdate:function(){B.callback(this.options.beforeUpdate,[this])},update:function(t,e,n){var i,r,a,o,s,l=this,u=l.options.ticks,d=u.sampleSize;if(l.beforeUpdate(),l.maxWidth=t,l.maxHeight=e,l.margins=B.extend({left:0,right:0,top:0,bottom:0},n),l._ticks=null,l.ticks=null,l._labelSizes=null,l._maxLabelLines=0,l.longestLabelWidth=0,l.longestTextCache=l.longestTextCache||{},l._gridLineItems=null,l._labelItems=null,l.beforeSetDimensions(),l.setDimensions(),l.afterSetDimensions(),l.beforeDataLimits(),l.determineDataLimits(),l.afterDataLimits(),l.beforeBuildTicks(),o=l.buildTicks()||[],(!(o=l.afterBuildTicks(o)||o)||!o.length)&&l.ticks)for(o=[],i=0,r=l.ticks.length;i<r;++i)o.push({value:l.ticks[i],major:!1});return s=d<(l._ticks=o).length,a=l._convertTicksToLabels(s?function(t,e){for(var n=[],i=t.length/e,r=0,a=t.length;r<a;r+=i)n.push(t[Math.floor(r)]);return n}(o,d):o),l._configure(),l.beforeCalculateTickRotation(),l.calculateTickRotation(),l.afterCalculateTickRotation(),l.beforeFit(),l.fit(),l.afterFit(),l._ticksToDraw=u.display&&(u.autoSkip||"auto"===u.source)?l._autoSkip(o):o,s&&(a=l._convertTicksToLabels(l._ticksToDraw)),l.ticks=a,l.afterUpdate(),l.minSize},_configure:function(){var t,e,n=this,i=n.options.ticks.reverse;n.isHorizontal()?(t=n.left,e=n.right):(t=n.top,e=n.bottom,i=!i),n._startPixel=t,n._endPixel=e,n._reversePixels=i,n._length=e-t},afterUpdate:function(){B.callback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){B.callback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0},afterSetDimensions:function(){B.callback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){B.callback(this.options.beforeDataLimits,[this])},determineDataLimits:B.noop,afterDataLimits:function(){B.callback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){B.callback(this.options.beforeBuildTicks,[this])},buildTicks:B.noop,afterBuildTicks:function(t){var e=this;return en(t)&&t.length?B.callback(e.options.afterBuildTicks,[e,t]):(e.ticks=B.callback(e.options.afterBuildTicks,[e,e.ticks])||e.ticks,t)},beforeTickToLabelConversion:function(){B.callback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var t=this.options.ticks;this.ticks=this.ticks.map(t.userCallback||t.callback,this)},afterTickToLabelConversion:function(){B.callback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){B.callback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var t,e,n,i,r,a,o,s=this,l=s.options,u=l.ticks,d=s.getTicks().length,h=u.minRotation||0,c=u.maxRotation,f=h;!s._isVisible()||!u.display||c<=h||d<=1||!s.isHorizontal()?s.labelRotation=h:(e=(t=s._getLabelSizes()).widest.width,n=t.highest.height-t.highest.offset,i=Math.min(s.maxWidth,s.chart.width-e),(r=l.offset?s.maxWidth/d:i/(d-1))<e+6&&(r=i/(d-(l.offset?.5:1)),a=s.maxHeight-sn(l.gridLines)-u.padding-ln(l.scaleLabel),o=Math.sqrt(e*e+n*n),f=B.toDegrees(Math.min(Math.asin(Math.min((t.highest.height+6)/r,1)),Math.asin(Math.min(a/o,1))-Math.asin(n/o))),f=Math.max(h,Math.min(c,f))),s.labelRotation=f)},afterCalculateTickRotation:function(){B.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){B.callback(this.options.beforeFit,[this])},fit:function(){var t,e,n,i,r,a,o,s,l,u,d,h,c,f,g,m,p,v,y=this,b=y.minSize={width:0,height:0},x=y.chart,_=y.options,w=_.ticks,k=_.scaleLabel,M=_.gridLines,S=y._isVisible(),D="bottom"===_.position,C=y.isHorizontal();C?b.width=y.maxWidth:S&&(b.width=sn(M)+ln(k)),C?S&&(b.height=sn(M)+ln(k)):b.height=y.maxHeight,w.display&&S&&(t=dn(w),n=(e=y._getLabelSizes()).first,i=e.last,r=e.widest,a=e.highest,o=.4*t.minor.lineHeight,s=w.padding,C?(l=0!==y.labelRotation,u=B.toRadians(y.labelRotation),d=Math.cos(u),c=(h=Math.sin(u))*r.width+d*(a.height-(l?a.offset:0))+(l?0:o),b.height=Math.min(y.maxHeight,b.height+c+s),f=y.getPixelForTick(0)-y.left,g=y.right-y.getPixelForTick(y.getTicks().length-1),p=l?(m=D?d*n.width+h*n.offset:h*(n.height-n.offset),D?h*(i.height-i.offset):d*i.width+h*i.offset):(m=n.width/2,i.width/2),y.paddingLeft=Math.max((m-f)*y.width/(y.width-f),0)+3,y.paddingRight=Math.max((p-g)*y.width/(y.width-g),0)+3):(v=w.mirror?0:r.width+s+o,b.width=Math.min(y.maxWidth,b.width+v),y.paddingTop=n.height/2,y.paddingBottom=i.height/2)),y.handleMargins(),C?(y.width=y._length=x.width-y.margins.left-y.margins.right,y.height=b.height):(y.width=b.width,y.height=y._length=x.height-y.margins.top-y.margins.bottom)},handleMargins:function(){var t=this;t.margins&&(t.margins.left=Math.max(t.paddingLeft,t.margins.left),t.margins.top=Math.max(t.paddingTop,t.margins.top),t.margins.right=Math.max(t.paddingRight,t.margins.right),t.margins.bottom=Math.max(t.paddingBottom,t.margins.bottom))},afterFit:function(){B.callback(this.options.afterFit,[this])},isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(nn(t))return NaN;if(("number"==typeof t||t instanceof Number)&&!isFinite(t))return NaN;if(t)if(this.isHorizontal()){if(void 0!==t.x)return this.getRightValue(t.x)}else if(void 0!==t.y)return this.getRightValue(t.y);return t},_convertTicksToLabels:function(t){var e,n,i,r=this;for(r.ticks=t.map(function(t){return t.value}),r.beforeTickToLabelConversion(),e=r.convertTicksToLabels(t)||r.ticks,r.afterTickToLabelConversion(),n=0,i=t.length;n<i;++n)t[n].label=e[n];return e},_getLabelSizes:function(){var t=this,e=t._labelSizes;return e||(t._labelSizes=e=on(t.ctx,dn(t.options.ticks),t.getTicks(),t.longestTextCache),t.longestLabelWidth=e.widest.width),e},_parseValue:function(t){var e,n,i,r=en(t)?(e=+this.getRightValue(t[0]),n=+this.getRightValue(t[1]),i=Math.min(e,n),Math.max(e,n)):(e=void 0,i=n=t=+this.getRightValue(t));return{min:i,max:r,start:e,end:n}},_getScaleLabel:function(t){var e=this._parseValue(t);return void 0!==e.start?"["+e.start+", "+e.end+"]":+this.getRightValue(t)},getLabelForIndex:B.noop,getPixelForValue:B.noop,getValueForPixel:B.noop,getPixelForTick:function(t){var e=this.options.offset,n=this._ticks.length,i=1/Math.max(n-(e?0:1),1);return t<0||n-1<t?null:this.getPixelForDecimal(t*i+(e?i/2:0))},getPixelForDecimal:function(t){return this._reversePixels&&(t=1-t),this._startPixel+t*this._length},getDecimalForPixel:function(t){var e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this.min,e=this.max;return this.beginAtZero?0:t<0&&e<0?e:0<t&&0<e?t:0},_autoSkip:function(t){var e,n,i,r,a=this.options.ticks,o=this._length,s=a.maxTicksLimit||o/this._tickSize()+1,l=a.major.enabled?function(t){for(var e=[],n=0,i=t.length;n<i;n++)t[n].major&&e.push(n);return e}(t):[],u=l.length,d=l[0],h=l[u-1];if(s<u)return function(t,e,n){var i,r,a=0,o=e[0];for(n=Math.ceil(n),i=0;i<t.length;i++)r=t[i],i===o?(r._index=i,o=e[++a*n]):delete r.label}(t,l,u/s),hn(t);if(i=cn(l,t,0,s),0<u){for(e=0,n=u-1;e<n;e++)fn(t,i,l[e],l[e+1]);return r=1<u?(h-d)/(u-1):null,fn(t,i,B.isNullOrUndef(r)?0:d-r,d),fn(t,i,h,B.isNullOrUndef(r)?t.length:h+r),hn(t)}return fn(t,i),hn(t)},_tickSize:function(){var t=this.options.ticks,e=B.toRadians(this.labelRotation),n=Math.abs(Math.cos(e)),i=Math.abs(Math.sin(e)),r=this._getLabelSizes(),a=t.autoSkipPadding||0,o=r?r.widest.width+a:0,s=r?r.highest.height+a:0;return this.isHorizontal()?o*i<s*n?o/n:s/i:s*i<o*n?s/n:o/i},_isVisible:function(){var t,e,n,i=this.chart,r=this.options.display;if("auto"!==r)return!!r;for(t=0,e=i.data.datasets.length;t<e;++t)if(i.isDatasetVisible(t)&&((n=i.getDatasetMeta(t)).xAxisID===this.id||n.yAxisID===this.id))return!0;return!1},_computeGridLineItems:function(t){function e(t){return F(x,t,O)}var n,i,r,a,o,s,l,u,d,h,c,f,g,m,p,v,y,b=this,x=b.chart,_=b.options,w=_.gridLines,k=_.position,M=w.offsetGridLines,S=b.isHorizontal(),D=b._ticksToDraw,C=D.length+(M?1:0),P=sn(w),T=[],O=w.drawBorder?an(w.lineWidth,0,0):0,A=O/2,F=B._alignPixel;for("top"===k?(n=e(b.bottom),l=b.bottom-P,d=n-A,c=e(t.top)+A,g=t.bottom):"bottom"===k?(n=e(b.top),c=t.top,g=e(t.bottom)-A,l=n+A,d=b.top+P):"left"===k?(n=e(b.right),s=b.right-P,u=n-A,h=e(t.left)+A,f=t.right):(n=e(b.left),h=t.left,f=e(t.right)-A,s=n+A,u=b.left+P),i=0;i<C;++i)r=D[i]||{},nn(r.label)&&i<D.length||(y=i===b.zeroLineIndex&&_.offset===M?(m=w.zeroLineWidth,p=w.zeroLineColor,v=w.zeroLineBorderDash||[],w.zeroLineBorderDashOffset||0):(m=an(w.lineWidth,i,1),p=an(w.color,i,"rgba(0,0,0,0.1)"),v=w.borderDash||[],w.borderDashOffset||0),void 0!==(a=function(t,e,n){var i,r=t.getTicks().length,a=Math.min(e,r-1),o=t.getPixelForTick(a),s=t._startPixel,l=t._endPixel;if(!(n&&(i=1===r?Math.max(o-s,l-o):0===e?(t.getPixelForTick(1)-o)/2:(o-t.getPixelForTick(a-1))/2,(o+=a<e?i:-i)<s-1e-6||l+1e-6<o)))return o}(b,r._index||i,M))&&(o=F(x,a,m),S?s=u=h=f=o:l=d=c=g=o,T.push({tx1:s,ty1:l,tx2:u,ty2:d,x1:h,y1:c,x2:f,y2:g,width:m,color:p,borderDash:v,borderDashOffset:y})));return T.ticksLength=C,T.borderValue=n,T},_computeLabelItems:function(){for(var t,e,n,i,r,a,o,s,l,u=this,d=u.options,h=d.ticks,c=d.position,f=h.mirror,g=u.isHorizontal(),m=u._ticksToDraw,p=dn(h),v=h.padding,y=sn(d.gridLines),b=-B.toRadians(u.labelRotation),x=[],_="top"===c?(i=u.bottom-y-v,b?"left":"center"):"bottom"===c?(i=u.top+y+v,b?"right":"center"):"left"===c?(n=u.right-(f?0:y)-v,f?"left":"right"):(n=u.left+(f?0:y)+v,f?"right":"left"),w=0,k=m.length;w<k;++w)e=(t=m[w]).label,nn(e)||(r=u.getPixelForTick(t._index||w)+h.labelOffset,o=(a=t.major?p.major:p.minor).lineHeight,s=en(e)?e.length:1,l=g?(n=r,"top"===c?((b?1:.5)-s)*o:(b?0:.5)*o):(i=r,(1-s)*o/2),x.push({x:n,y:i,rotation:b,label:e,font:a,textOffset:l,textAlign:_}));return x},_drawGrid:function(t){var e=this,n=e.options.gridLines;if(n.display){for(var i,r,a,o,s,l,u,d,h,c,f=e.ctx,g=e.chart,m=B._alignPixel,p=n.drawBorder?an(n.lineWidth,0,0):0,v=e._gridLineItems||(e._gridLineItems=e._computeGridLineItems(t)),y=0,b=v.length;y<b;++y)i=(a=v[y]).width,r=a.color,i&&r&&(f.save(),f.lineWidth=i,f.strokeStyle=r,f.setLineDash&&(f.setLineDash(a.borderDash),f.lineDashOffset=a.borderDashOffset),f.beginPath(),n.drawTicks&&(f.moveTo(a.tx1,a.ty1),f.lineTo(a.tx2,a.ty2)),n.drawOnChartArea&&(f.moveTo(a.x1,a.y1),f.lineTo(a.x2,a.y2)),f.stroke(),f.restore());p&&(o=p,s=an(n.lineWidth,v.ticksLength-1,1),l=v.borderValue,e.isHorizontal()?(u=m(g,e.left,o)-o/2,d=m(g,e.right,s)+s/2,h=c=l):(h=m(g,e.top,o)-o/2,c=m(g,e.bottom,s)+s/2,u=d=l),f.lineWidth=p,f.strokeStyle=an(n.color,0),f.beginPath(),f.moveTo(u,h),f.lineTo(d,c),f.stroke())}},_drawLabels:function(){var t=this;if(t.options.ticks.display)for(var e,n,i,r,a,o,s=t.ctx,l=t._labelItems||(t._labelItems=t._computeLabelItems()),u=0,d=l.length;u<d;++u){if(r=(i=l[u]).font,s.save(),s.translate(i.x,i.y),s.rotate(i.rotation),s.font=r.string,s.fillStyle=r.color,s.textBaseline="middle",s.textAlign=i.textAlign,a=i.label,o=i.textOffset,en(a))for(e=0,n=a.length;e<n;++e)s.fillText(""+a[e],0,o),o+=r.lineHeight;else s.fillText(a,0,o);s.restore()}},_drawTitle:function(){var t,e,n,i,r,a,o,s,l,u=this,d=u.ctx,h=u.options,c=h.scaleLabel;c.display&&(t=rn(c.fontColor,Y.global.defaultFontColor),e=B.options._parseFont(c),n=B.options.toPadding(c.padding),i=e.lineHeight/2,r=h.position,l=0,u.isHorizontal()?(o=u.left+u.width/2,s="bottom"===r?u.bottom-i-n.bottom:u.top+i+n.top):(o=(a="left"===r)?u.left+i+n.top:u.right-i-n.top,s=u.top+u.height/2,l=a?-.5*Math.PI:.5*Math.PI),d.save(),d.translate(o,s),d.rotate(l),d.textAlign="center",d.textBaseline="middle",d.fillStyle=t,d.font=e.string,d.fillText(c.labelString,0,0),d.restore())},draw:function(t){this._isVisible()&&(this._drawGrid(t),this._drawTitle(),this._drawLabels())},_layers:function(){var t=this,e=t.options,n=e.ticks&&e.ticks.z||0,i=e.gridLines&&e.gridLines.z||0;return t._isVisible()&&n!==i&&t.draw===t._draw?[{z:i,draw:function(){t._drawGrid.apply(t,arguments),t._drawTitle.apply(t,arguments)}},{z:n,draw:function(){t._drawLabels.apply(t,arguments)}}]:[{z:n,draw:function(){t.draw.apply(t,arguments)}}]},_getMatchingVisibleMetas:function(e){var n=this,i=n.isHorizontal();return n.chart._getSortedVisibleDatasetMetas().filter(function(t){return(!e||t.type===e)&&(i?t.xAxisID===n.id:t.yAxisID===n.id)})}});gn.prototype._draw=gn.prototype.draw;var mn=gn,pn=B.isNullOrUndef,vn=mn.extend({determineDataLimits:function(){var t,e=this,n=e._getLabels(),i=e.options.ticks,r=i.min,a=i.max,o=0,s=n.length-1;void 0!==r&&0<=(t=n.indexOf(r))&&(o=t),void 0!==a&&0<=(t=n.indexOf(a))&&(s=t),e.minIndex=o,e.maxIndex=s,e.min=n[o],e.max=n[s]},buildTicks:function(){var t=this._getLabels(),e=this.minIndex,n=this.maxIndex;this.ticks=0===e&&n===t.length-1?t:t.slice(e,n+1)},getLabelForIndex:function(t,e){var n=this.chart;return n.getDatasetMeta(e).controller._getValueScaleId()===this.id?this.getRightValue(n.data.datasets[e].data[t]):this._getLabels()[t]},_configure:function(){var t=this,e=t.options.offset,n=t.ticks;mn.prototype._configure.call(t),t.isHorizontal()||(t._reversePixels=!t._reversePixels),n&&(t._startValue=t.minIndex-(e?.5:0),t._valueRange=Math.max(n.length-(e?0:1),1))},getPixelForValue:function(t,e,n){var i,r,a,o=this;return pn(e)||pn(n)||(t=o.chart.data.datasets[n].data[e]),pn(t)||(i=o.isHorizontal()?t.x:t.y),(void 0!==i||void 0!==t&&isNaN(e))&&(r=o._getLabels(),t=B.valueOrDefault(i,t),e=-1!==(a=r.indexOf(t))?a:e,isNaN(e)&&(e=t)),o.getPixelForDecimal((e-o._startValue)/o._valueRange)},getPixelForTick:function(t){var e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t],t+this.minIndex)},getValueForPixel:function(t){var e=Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange);return Math.min(Math.max(e,0),this.ticks.length-1)},getBasePixel:function(){return this.bottom}}),yn={position:"bottom"};vn._defaults=yn;var bn=B.noop,xn=B.isNullOrUndef;var _n=mn.extend({getRightValue:function(t){return"string"==typeof t?+t:mn.prototype.getRightValue.call(this,t)},handleTickRangeOptions:function(){var t,e,n=this,i=n.options.ticks;i.beginAtZero&&(t=B.sign(n.min),e=B.sign(n.max),t<0&&e<0?n.max=0:0<t&&0<e&&(n.min=0));var r=void 0!==i.min||void 0!==i.suggestedMin,a=void 0!==i.max||void 0!==i.suggestedMax;void 0!==i.min?n.min=i.min:void 0!==i.suggestedMin&&(null===n.min?n.min=i.suggestedMin:n.min=Math.min(n.min,i.suggestedMin)),void 0!==i.max?n.max=i.max:void 0!==i.suggestedMax&&(null===n.max?n.max=i.suggestedMax:n.max=Math.max(n.max,i.suggestedMax)),r!=a&&n.min>=n.max&&(r?n.max=n.min+1:n.min=n.max-1),n.min===n.max&&(n.max++,i.beginAtZero||n.min--)},getTickLimit:function(){var t,e=this.options.ticks,n=e.stepSize,i=e.maxTicksLimit;return n?t=Math.ceil(this.max/n)-Math.floor(this.min/n)+1:(t=this._computeTickLimit(),i=i||11),i&&(t=Math.min(i,t)),t},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:bn,buildTicks:function(){var t=this,e=t.options.ticks,n=t.getTickLimit(),i={maxTicks:n=Math.max(2,n),min:e.min,max:e.max,precision:e.precision,stepSize:B.valueOrDefault(e.fixedStepSize,e.stepSize)},r=t.ticks=function(t,e){var n,i,r,a,o=[],s=t.stepSize,l=s||1,u=t.maxTicks-1,d=t.min,h=t.max,c=t.precision,f=e.min,g=e.max,m=B.niceNum((g-f)/u/l)*l;if(m<1e-14&&xn(d)&&xn(h))return[f,g];u<(a=Math.ceil(g/m)-Math.floor(f/m))&&(m=B.niceNum(a*m/u/l)*l),s||xn(c)?n=Math.pow(10,B._decimalPlaces(m)):(n=Math.pow(10,c),m=Math.ceil(m*n)/n),i=Math.floor(f/m)*m,r=Math.ceil(g/m)*m,s&&(!xn(d)&&B.almostWhole(d/m,m/1e3)&&(i=d),!xn(h)&&B.almostWhole(h/m,m/1e3)&&(r=h)),a=(r-i)/m,a=B.almostEquals(a,Math.round(a),m/1e3)?Math.round(a):Math.ceil(a),i=Math.round(i*n)/n,r=Math.round(r*n)/n,o.push(xn(d)?i:d);for(var p=1;p<a;++p)o.push(Math.round((i+p*m)*n)/n);return o.push(xn(h)?r:h),o}(i,t);t.handleDirectionalChanges(),t.max=B.max(r),t.min=B.min(r),e.reverse?(r.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max)},convertTicksToLabels:function(){var t=this;t.ticksAsNumbers=t.ticks.slice(),t.zeroLineIndex=t.ticks.indexOf(0),mn.prototype.convertTicksToLabels.call(t)},_configure:function(){var t,e=this,n=e.getTicks(),i=e.min,r=e.max;mn.prototype._configure.call(e),e.options.offset&&n.length&&(i-=t=(r-i)/Math.max(n.length-1,1)/2,r+=t),e._startValue=i,e._endValue=r,e._valueRange=r-i}}),wn={position:"left",ticks:{callback:tn.formatters.linear}};var kn=_n.extend({determineDataLimits:function(){var t,e,n,i,r=this,a=r.options,o=r.chart.data.datasets,s=r._getMatchingVisibleMetas(),l=a.stacked,u={},d=s.length;if(r.min=Number.POSITIVE_INFINITY,r.max=Number.NEGATIVE_INFINITY,void 0===l)for(t=0;!l&&t<d;++t)l=void 0!==(e=s[t]).stack;for(t=0;t<d;++t)n=o[(e=s[t]).index].data,l?function(t,e,n,i){for(var r,a,o,s,l,u=t.options,d=u.stacked,h=(r=e,a=d,s=[(o=n).type,void 0===a&&void 0===o.stack?o.index:"",o.stack].join("."),void 0===r[s]&&(r[s]={pos:[],neg:[]}),r[s]),c=h.pos,f=h.neg,g=i.length,m=0;m<g;++m)l=t._parseValue(i[m]),isNaN(l.min)||isNaN(l.max)||n.data[m].hidden||(c[m]=c[m]||0,f[m]=f[m]||0,u.relativePoints?c[m]=100:l.min<0||l.max<0?f[m]+=l.min:c[m]+=l.max)}(r,u,e,n):function(t,e,n){for(var i,r=n.length,a=0;a<r;++a)i=t._parseValue(n[a]),isNaN(i.min)||isNaN(i.max)||e.data[a].hidden||(t.min=Math.min(t.min,i.min),t.max=Math.max(t.max,i.max))}(r,e,n);B.each(u,function(t){i=t.pos.concat(t.neg),r.min=Math.min(r.min,B.min(i)),r.max=Math.max(r.max,B.max(i))}),r.min=B.isFinite(r.min)&&!isNaN(r.min)?r.min:0,r.max=B.isFinite(r.max)&&!isNaN(r.max)?r.max:1,r.handleTickRangeOptions()},_computeTickLimit:function(){var t;return this.isHorizontal()?Math.ceil(this.width/40):(t=B.options._parseFont(this.options.ticks),Math.ceil(this.height/t.lineHeight))},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return this._getScaleLabel(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){return this.getPixelForDecimal((this.getRightValue(t)-this._startValue)/this._valueRange)},getValueForPixel:function(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange},getPixelForTick:function(t){var e=this.ticksAsNumbers;return t<0||t>e.length-1?null:this.getPixelForValue(e[t])}});kn._defaults=wn;var Mn=B.valueOrDefault,Sn=B.math.log10;var Dn={position:"left",ticks:{callback:tn.formatters.logarithmic}};function Cn(t,e){return B.isFinite(t)&&0<=t?t:e}var Pn=mn.extend({determineDataLimits:function(){var t,e,n,i,r=this,a=r.options,o=r.chart,s=o.data.datasets,l=r.isHorizontal();function u(t){return l?t.xAxisID===r.id:t.yAxisID===r.id}r.min=Number.POSITIVE_INFINITY,r.max=Number.NEGATIVE_INFINITY,r.minNotZero=Number.POSITIVE_INFINITY;var d=a.stacked;if(void 0===d)for(c=0;c<s.length;c++)if(t=o.getDatasetMeta(c),o.isDatasetVisible(c)&&u(t)&&void 0!==t.stack){d=!0;break}if(a.stacked||d){for(var h={},c=0;c<s.length;c++){var f=[(t=o.getDatasetMeta(c)).type,void 0===a.stacked&&void 0===t.stack?c:"",t.stack].join(".");if(o.isDatasetVisible(c)&&u(t))for(void 0===h[f]&&(h[f]=[]),n=0,i=(e=s[c].data).length;n<i;n++){var g=h[f],m=r._parseValue(e[n]);isNaN(m.min)||isNaN(m.max)||t.data[n].hidden||m.min<0||m.max<0||(g[n]=g[n]||0,g[n]+=m.max)}}B.each(h,function(t){var e,n;0<t.length&&(e=B.min(t),n=B.max(t),r.min=Math.min(r.min,e),r.max=Math.max(r.max,n))})}else for(c=0;c<s.length;c++)if(t=o.getDatasetMeta(c),o.isDatasetVisible(c)&&u(t))for(n=0,i=(e=s[c].data).length;n<i;n++)m=r._parseValue(e[n]),isNaN(m.min)||isNaN(m.max)||t.data[n].hidden||m.min<0||m.max<0||(r.min=Math.min(m.min,r.min),r.max=Math.max(m.max,r.max),0!==m.min&&(r.minNotZero=Math.min(m.min,r.minNotZero)));r.min=B.isFinite(r.min)?r.min:null,r.max=B.isFinite(r.max)?r.max:null,r.minNotZero=B.isFinite(r.minNotZero)?r.minNotZero:null,this.handleTickRangeOptions()},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;t.min=Cn(e.min,t.min),t.max=Cn(e.max,t.max),t.min===t.max&&(0!==t.min&&null!==t.min?(t.min=Math.pow(10,Math.floor(Sn(t.min))-1),t.max=Math.pow(10,Math.floor(Sn(t.max))+1)):(t.min=1,t.max=10)),null===t.min&&(t.min=Math.pow(10,Math.floor(Sn(t.max))-1)),null===t.max&&(t.max=0!==t.min?Math.pow(10,Math.floor(Sn(t.min))+1):10),null===t.minNotZero&&(0<t.min?t.minNotZero=t.min:t.max<1?t.minNotZero=Math.pow(10,Math.floor(Sn(t.max))):t.minNotZero=1)},buildTicks:function(){var t=this,e=t.options.ticks,n=!t.isHorizontal(),i={min:Cn(e.min),max:Cn(e.max)},r=t.ticks=function(t,e){var n,i,r=[],a=Mn(t.min,Math.pow(10,Math.floor(Sn(e.min)))),o=Math.floor(Sn(e.max)),s=Math.ceil(e.max/Math.pow(10,o));0===a?(n=Math.floor(Sn(e.minNotZero)),i=Math.floor(e.minNotZero/Math.pow(10,n)),r.push(a),a=i*Math.pow(10,n)):(n=Math.floor(Sn(a)),i=Math.floor(a/Math.pow(10,n)));for(var l=n<0?Math.pow(10,Math.abs(n)):1;r.push(a),10===++i&&(i=1,l=0<=++n?1:l),a=Math.round(i*Math.pow(10,n)*l)/l,n<o||n===o&&i<s;);var u=Mn(t.max,a);return r.push(u),r}(i,t);t.max=B.max(r),t.min=B.min(r),e.reverse?(n=!n,t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),n&&r.reverse()},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),mn.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(t,e){return this._getScaleLabel(this.chart.data.datasets[e].data[t])},getPixelForTick:function(t){var e=this.tickValues;return t<0||t>e.length-1?null:this.getPixelForValue(e[t])},_getFirstTickValue:function(t){var e=Math.floor(Sn(t));return Math.floor(t/Math.pow(10,e))*Math.pow(10,e)},_configure:function(){var t=this,e=t.min,n=0;mn.prototype._configure.call(t),0===e&&(e=t._getFirstTickValue(t.minNotZero),n=Mn(t.options.ticks.fontSize,Y.global.defaultFontSize)/t._length),t._startValue=Sn(e),t._valueOffset=n,t._valueRange=(Sn(t.max)-Sn(e))/(1-n)},getPixelForValue:function(t){var e=this,n=0;return(t=+e.getRightValue(t))>e.min&&0<t&&(n=(Sn(t)-e._startValue)/e._valueRange+e._valueOffset),e.getPixelForDecimal(n)},getValueForPixel:function(t){var e=this,n=e.getDecimalForPixel(t);return 0===n&&0===e.min?0:Math.pow(10,e._startValue+(n-e._valueOffset)*e._valueRange)}});Pn._defaults=Dn;var Tn=B.valueOrDefault,On=B.valueAtIndexOrDefault,An=B.options.resolve,Fn={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,borderDash:[],borderDashOffset:0},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:tn.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(t){return t}}};function In(t){var e=t.ticks;return e.display&&t.display?Tn(e.fontSize,Y.global.defaultFontSize)+2*e.backdropPaddingY:0}function Ln(t,e,n,i,r){return t===i||t===r?{start:e-n/2,end:e+n/2}:t<i||r<t?{start:e-n,end:e}:{start:e,end:e+n}}function Rn(t){var e,n,i=B.options._parseFont(t.options.pointLabels),r={l:0,r:t.width,t:0,b:t.height-t.paddingTop},a={};t.ctx.font=i.string,t._pointLabelSizes=[];for(var o,s,l,u=t.chart.data.labels.length,d=0;d<u;d++){n=t.getPointPosition(d,t.drawingArea+5),o=t.ctx,s=i.lineHeight,l=t.pointLabels[d],e=B.isArray(l)?{w:B.longestText(o,o.font,l),h:l.length*s}:{w:o.measureText(l).width,h:s},t._pointLabelSizes[d]=e;var h=t.getIndexAngle(d),c=B.toDegrees(h)%360,f=Ln(c,n.x,e.w,0,180),g=Ln(c,n.y,e.h,90,270);f.start<r.l&&(r.l=f.start,a.l=h),f.end>r.r&&(r.r=f.end,a.r=h),g.start<r.t&&(r.t=g.start,a.t=h),g.end>r.b&&(r.b=g.end,a.b=h)}t.setReductions(t.drawingArea,r,a)}function Nn(t){var e=t.ctx,n=t.options,i=n.pointLabels,r=In(n),a=t.getDistanceFromCenterForValue(n.ticks.reverse?t.min:t.max),o=B.options._parseFont(i);e.save(),e.font=o.string,e.textBaseline="middle";for(var s,l,u,d,h=t.chart.data.labels.length-1;0<=h;h--){var c=0===h?r/2:0,f=t.getPointPosition(h,a+c+5),g=On(i.fontColor,h,Y.global.defaultFontColor);e.fillStyle=g;var m=t.getIndexAngle(h),p=B.toDegrees(m);e.textAlign=0===(d=p)||180===d?"center":d<180?"left":"right",s=p,l=t._pointLabelSizes[h],u=f,90===s||270===s?u.y-=l.h/2:(270<s||s<90)&&(u.y-=l.h),function(t,e,n,i){var r,a,o=n.y+i/2;if(B.isArray(e))for(r=0,a=e.length;r<a;++r)t.fillText(e[r],n.x,o),o+=i;else t.fillText(e,n.x,o)}(e,t.pointLabels[h],f,o.lineHeight)}e.restore()}function Wn(t){return B.isNumber(t)?t:0}var Yn=_n.extend({setDimensions:function(){var t=this;t.width=t.maxWidth,t.height=t.maxHeight,t.paddingTop=In(t.options)/2,t.xCenter=Math.floor(t.width/2),t.yCenter=Math.floor((t.height-t.paddingTop)/2),t.drawingArea=Math.min(t.height-t.paddingTop,t.width)/2},determineDataLimits:function(){var r=this,n=r.chart,a=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;B.each(n.data.datasets,function(t,e){var i;n.isDatasetVisible(e)&&(i=n.getDatasetMeta(e),B.each(t.data,function(t,e){var n=+r.getRightValue(t);isNaN(n)||i.data[e].hidden||(a=Math.min(n,a),o=Math.max(n,o))}))}),r.min=a===Number.POSITIVE_INFINITY?0:a,r.max=o===Number.NEGATIVE_INFINITY?0:o,r.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/In(this.options))},convertTicksToLabels:function(){var e=this;_n.prototype.convertTicksToLabels.call(e),e.pointLabels=e.chart.data.labels.map(function(){var t=B.callback(e.options.pointLabels.callback,arguments,e);return t||0===t?t:""})},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){var t=this.options;t.display&&t.pointLabels.display?Rn(this):this.setCenterPoint(0,0,0,0)},setReductions:function(t,e,n){var i=this,r=e.l/Math.sin(n.l),a=Math.max(e.r-i.width,0)/Math.sin(n.r),o=-e.t/Math.cos(n.t),s=-Math.max(e.b-(i.height-i.paddingTop),0)/Math.cos(n.b),r=Wn(r),a=Wn(a),o=Wn(o),s=Wn(s);i.drawingArea=Math.min(Math.floor(t-(r+a)/2),Math.floor(t-(o+s)/2)),i.setCenterPoint(r,a,o,s)},setCenterPoint:function(t,e,n,i){var r=this,a=r.width-e-r.drawingArea,o=t+r.drawingArea,s=n+r.drawingArea,l=r.height-r.paddingTop-i-r.drawingArea;r.xCenter=Math.floor((o+a)/2+r.left),r.yCenter=Math.floor((s+l)/2+r.top+r.paddingTop)},getIndexAngle:function(t){var e=this.chart,n=(t*(360/e.data.labels.length)+((e.options||{}).startAngle||0))%360;return(n<0?360+n:n)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){var e=this;if(B.isNullOrUndef(t))return NaN;var n=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*n:(t-e.min)*n},getPointPosition:function(t,e){var n=this.getIndexAngle(t)-Math.PI/2;return{x:Math.cos(n)*e+this.xCenter,y:Math.sin(n)*e+this.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(t){var e=this.min,n=this.max;return this.getPointPositionForValue(t||0,this.beginAtZero?0:e<0&&n<0?n:0<e&&0<n?e:0)},_drawGrid:function(){var t,n,e,i=this,r=i.ctx,a=i.options,o=a.gridLines,s=a.angleLines,l=Tn(s.lineWidth,o.lineWidth),u=Tn(s.color,o.color);if(a.pointLabels.display&&Nn(i),o.display&&B.each(i.ticks,function(t,e){0!==e&&(n=i.getDistanceFromCenterForValue(i.ticksAsNumbers[e]),function(t,e,n,i){var r,a=t.ctx,o=e.circular,s=t.chart.data.labels.length,l=On(e.color,i-1),u=On(e.lineWidth,i-1);if((o||s)&&l&&u){if(a.save(),a.strokeStyle=l,a.lineWidth=u,a.setLineDash&&(a.setLineDash(e.borderDash||[]),a.lineDashOffset=e.borderDashOffset||0),a.beginPath(),o)a.arc(t.xCenter,t.yCenter,n,0,2*Math.PI);else{r=t.getPointPosition(0,n),a.moveTo(r.x,r.y);for(var d=1;d<s;d++)r=t.getPointPosition(d,n),a.lineTo(r.x,r.y)}a.closePath(),a.stroke(),a.restore()}}(i,o,n,e))}),s.display&&l&&u){for(r.save(),r.lineWidth=l,r.strokeStyle=u,r.setLineDash&&(r.setLineDash(An([s.borderDash,o.borderDash,[]])),r.lineDashOffset=An([s.borderDashOffset,o.borderDashOffset,0])),t=i.chart.data.labels.length-1;0<=t;t--)n=i.getDistanceFromCenterForValue(a.ticks.reverse?i.min:i.max),e=i.getPointPosition(t,n),r.beginPath(),r.moveTo(i.xCenter,i.yCenter),r.lineTo(e.x,e.y),r.stroke();r.restore()}},_drawLabels:function(){var t,n,i,r,a,o=this,s=o.ctx,l=o.options.ticks;l.display&&(t=o.getIndexAngle(0),n=B.options._parseFont(l),i=Tn(l.fontColor,Y.global.defaultFontColor),s.save(),s.font=n.string,s.translate(o.xCenter,o.yCenter),s.rotate(t),s.textAlign="center",s.textBaseline="middle",B.each(o.ticks,function(t,e){0===e&&!l.reverse||(r=o.getDistanceFromCenterForValue(o.ticksAsNumbers[e]),l.showLabelBackdrop&&(a=s.measureText(t).width,s.fillStyle=l.backdropColor,s.fillRect(-a/2-l.backdropPaddingX,-r-n.size/2-l.backdropPaddingY,a+2*l.backdropPaddingX,n.size+2*l.backdropPaddingY)),s.fillStyle=i,s.fillText(t,0,-r))}),s.restore())},_drawTitle:B.noop});Yn._defaults=Fn;var zn=B._deprecated,Vn=B.options.resolve,En=B.valueOrDefault,Hn=Number.MIN_SAFE_INTEGER||-9007199254740991,Bn=Number.MAX_SAFE_INTEGER||9007199254740991,jn={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}},Un=Object.keys(jn);function Gn(t,e){return t-e}function qn(t){return B.valueOrDefault(t.time.min,t.ticks.min)}function Zn(t){return B.valueOrDefault(t.time.max,t.ticks.max)}function $n(t,e,n,i){var r=function(t,e,n){for(var i,r,a,o=0,s=t.length-1;0<=o&&o<=s;){if(r=t[(i=o+s>>1)-1]||null,a=t[i],!r)return{lo:null,hi:a};if(a[e]<n)o=1+i;else{if(!(r[e]>n))return{lo:r,hi:a};s=i-1}}return{lo:a,hi:null}}(t,e,n),a=r.lo?r.hi?r.lo:t[t.length-2]:t[0],o=r.lo?r.hi?r.hi:t[t.length-1]:t[1],s=o[e]-a[e],l=s?(n-a[e])/s:0,u=(o[i]-a[i])*l;return a[i]+u}function Xn(t,e){var n=t._adapter,i=t.options.time,r=i.parser,a=r||i.format,o=e;return"function"==typeof r&&(o=r(o)),B.isFinite(o)||(o="string"==typeof a?n.parse(o,a):n.parse(o)),null!==o?+o:(r||"function"!=typeof a||(o=a(e),B.isFinite(o)||(o=n.parse(o))),o)}function Kn(t,e){if(B.isNullOrUndef(e))return null;var n=t.options.time,i=Xn(t,t.getRightValue(e));return null===i||n.round&&(i=+t._adapter.startOf(i,n.round)),i}function Jn(t,e,n,i){for(var r,a,o=Un.length,s=Un.indexOf(t);s<o-1;++s)if(a=(r=jn[Un[s]]).steps?r.steps:Bn,r.common&&Math.ceil((n-e)/(a*r.size))<=i)return Un[s];return Un[o-1]}function Qn(t,e,n){for(var i,r=[],a={},o=e.length,s=0;s<o;++s)a[i=e[s]]=s,r.push({value:i,major:!1});return 0!==o&&n?function(t,e,n,i){for(var r,a=t._adapter,o=+a.startOf(e[0].value,i),s=e[e.length-1].value,l=o;l<=s;l=+a.add(l,1,i))0<=(r=n[l])&&(e[r].major=!0);return e}(t,r,a,n):r}var ti=mn.extend({initialize:function(){this.mergeTicksOptions(),mn.prototype.initialize.call(this)},update:function(){var t=this.options,e=t.time||(t.time={}),n=this._adapter=new Qe._date(t.adapters.date);return zn("time scale",e.format,"time.format","time.parser"),zn("time scale",e.min,"time.min","ticks.min"),zn("time scale",e.max,"time.max","ticks.max"),B.mergeIf(e.displayFormats,n.formats()),mn.prototype.update.apply(this,arguments)},getRightValue:function(t){return t&&void 0!==t.t&&(t=t.t),mn.prototype.getRightValue.call(this,t)},determineDataLimits:function(){for(var t,e,n,i,r,a=this,o=a.chart,s=a._adapter,l=a.options,u=l.time.unit||"day",d=Bn,h=Hn,c=[],f=[],g=[],m=a._getLabels(),p=0,v=m.length;p<v;++p)g.push(Kn(a,m[p]));for(p=0,v=(o.data.datasets||[]).length;p<v;++p)if(o.isDatasetVisible(p))if(n=o.data.datasets[p].data,B.isObject(n[0]))for(f[p]=[],t=0,e=n.length;t<e;++t)i=Kn(a,n[t]),c.push(i),f[p][t]=i;else f[p]=g.slice(0),r||(c=c.concat(g),r=!0);else f[p]=[];g.length&&(d=Math.min(d,g[0]),h=Math.max(h,g[g.length-1])),c.length&&(c=1<v?function(t){for(var e,n={},i=[],r=0,a=t.length;r<a;++r)n[e=t[r]]||(n[e]=!0,i.push(e));return i}(c).sort(Gn):c.sort(Gn),d=Math.min(d,c[0]),h=Math.max(h,c[c.length-1])),d=Kn(a,qn(l))||d,h=Kn(a,Zn(l))||h,d=d===Bn?+s.startOf(Date.now(),u):d,h=h===Hn?+s.endOf(Date.now(),u)+1:h,a.min=Math.min(d,h),a.max=Math.max(d+1,h),a._table=[],a._timestamps={data:c,datasets:f,labels:g}},buildTicks:function(){var t,e,n,i,r,a,o,s,l,u=this,d=u.min,h=u.max,c=u.options,f=c.ticks,g=c.time,m=u._timestamps,p=[],v=u.getLabelCapacity(d),y=f.source,b=c.distribution,m="data"===y||"auto"===y&&"series"===b?m.data:"labels"===y?m.labels:function(t,e,n,i){var r,a=t._adapter,o=t.options,s=o.time,l=s.unit||Jn(s.minUnit,e,n,i),u=Vn([s.stepSize,s.unitStepSize,1]),d="week"===l&&s.isoWeekday,h=e,c=[];if(d&&(h=+a.startOf(h,"isoWeek",d)),h=+a.startOf(h,d?"day":l),a.diff(n,e,l)>1e5*u)throw e+" and "+n+" are too far apart with stepSize of "+u+" "+l;for(r=h;r<n;r=+a.add(r,u,l))c.push(r);return r!==n&&"ticks"!==o.bounds||c.push(r),c}(u,d,h,v);for("ticks"===c.bounds&&m.length&&(d=m[0],h=m[m.length-1]),d=Kn(u,qn(c))||d,h=Kn(u,Zn(c))||h,t=0,e=m.length;t<e;++t)d<=(n=m[t])&&n<=h&&p.push(n);return u.min=d,u.max=h,u._unit=g.unit||(f.autoSkip?Jn(g.minUnit,u.min,u.max,v):function(t,e,n,i,r){for(var a,o=Un.length-1;o>=Un.indexOf(n);o--)if(a=Un[o],jn[a].common&&t._adapter.diff(r,i,a)>=e-1)return a;return Un[n?Un.indexOf(n):0]}(u,p.length,g.minUnit,u.min,u.max)),u._majorUnit=f.major.enabled&&"year"!==u._unit?function(t){for(var e=Un.indexOf(t)+1,n=Un.length;e<n;++e)if(jn[Un[e]].common)return Un[e]}(u._unit):void 0,u._table=function(t,e,n,i){if("linear"===i||!t.length)return[{time:e,pos:0},{time:n,pos:1}];for(var r,a,o,s=[],l=[e],u=0,d=t.length;u<d;++u)e<(a=t[u])&&a<n&&l.push(a);for(l.push(n),u=0,d=l.length;u<d;++u)o=l[u+1],r=l[u-1],a=l[u],void 0!==r&&void 0!==o&&Math.round((o+r)/2)===a||s.push({time:a,pos:u/(d-1)});return s}(u._timestamps.data,d,h,b),u._offsets=(i=u._table,r=p,l=s=0,c.offset&&r.length&&(a=$n(i,"time",r[0],"pos"),s=1===r.length?1-a:($n(i,"time",r[1],"pos")-a)/2,o=$n(i,"time",r[r.length-1],"pos"),l=1===r.length?o:(o-$n(i,"time",r[r.length-2],"pos"))/2),{start:s,end:l,factor:1/(s+1+l)}),f.reverse&&p.reverse(),Qn(u,p,u._majorUnit)},getLabelForIndex:function(t,e){var n=this,i=n._adapter,r=n.chart.data,a=n.options.time,o=r.labels&&t<r.labels.length?r.labels[t]:"",s=r.datasets[e].data[t];return B.isObject(s)&&(o=n.getRightValue(s)),a.tooltipFormat?i.format(Xn(n,o),a.tooltipFormat):"string"==typeof o?o:i.format(Xn(n,o),a.displayFormats.datetime)},tickFormatFunction:function(t,e,n,i){var r=this._adapter,a=this.options,o=a.time.displayFormats,s=o[this._unit],l=this._majorUnit,u=o[l],d=n[e],h=a.ticks,c=l&&u&&d&&d.major,f=r.format(t,i||(c?u:s)),g=c?h.major:h.minor,m=Vn([g.callback,g.userCallback,h.callback,h.userCallback]);return m?m(f,e,n):f},convertTicksToLabels:function(t){for(var e=[],n=0,i=t.length;n<i;++n)e.push(this.tickFormatFunction(t[n].value,n,t));return e},getPixelForOffset:function(t){var e=this._offsets,n=$n(this._table,"time",t,"pos");return this.getPixelForDecimal((e.start+n)*e.factor)},getPixelForValue:function(t,e,n){var i=null;if(void 0!==e&&void 0!==n&&(i=this._timestamps.datasets[n][e]),null===i&&(i=Kn(this,t)),null!==i)return this.getPixelForOffset(i)},getPixelForTick:function(t){var e=this.getTicks();return 0<=t&&t<e.length?this.getPixelForOffset(e[t].value):null},getValueForPixel:function(t){var e=this._offsets,n=this.getDecimalForPixel(t)/e.factor-e.end,i=$n(this._table,"pos",n,"time");return this._adapter._create(i)},_getLabelSize:function(t){var e=this.options.ticks,n=this.ctx.measureText(t).width,i=B.toRadians(this.isHorizontal()?e.maxRotation:e.minRotation),r=Math.cos(i),a=Math.sin(i),o=En(e.fontSize,Y.global.defaultFontSize);return{w:n*r+o*a,h:n*a+o*r}},getLabelWidth:function(t){return this._getLabelSize(t).w},getLabelCapacity:function(t){var e=this.options.time,n=e.displayFormats,i=n[e.unit]||n.millisecond,r=this.tickFormatFunction(t,0,Qn(this,[t],this._majorUnit),i),a=this._getLabelSize(r),o=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h);return this.options.offset&&o--,0<o?o:1}}),ei={position:"bottom",distribution:"linear",bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}};ti._defaults=ei;var ni={category:vn,linear:kn,logarithmic:Pn,radialLinear:Yn,time:ti},ii=t(function(za,t){za.exports=function(){var e,r;function u(){return e.apply(null,arguments)}function t(t){e=t}function o(t){return t instanceof Array||Object.prototype.toString.call(t)==="[object Array]"}function s(t){return t!=null&&Object.prototype.toString.call(t)==="[object Object]"}function l(t){if(Object.getOwnPropertyNames){return Object.getOwnPropertyNames(t).length===0}else{var e;for(e in t){if(t.hasOwnProperty(e)){return false}}return true}}function a(t){return t===void 0}function d(t){return typeof t==="number"||Object.prototype.toString.call(t)==="[object Number]"}function h(t){return t instanceof Date||Object.prototype.toString.call(t)==="[object Date]"}function n(t,e){var n=[],i;for(i=0;i<t.length;++i){n.push(e(t[i],i))}return n}function c(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function f(t,e){for(var n in e){if(c(e,n)){t[n]=e[n]}}if(c(e,"toString")){t.toString=e.toString}if(c(e,"valueOf")){t.valueOf=e.valueOf}return t}function g(t,e,n,i){return Gn(t,e,n,i,true).utc()}function i(){return{empty:false,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:false,invalidMonth:null,invalidFormat:false,userInvalidated:false,iso:false,parsedDateParts:[],meridiem:null,rfc2822:false,weekdayMismatch:false}}function m(t){if(t._pf==null){t._pf=i()}return t._pf}if(Array.prototype.some){r=Array.prototype.some}else{r=function(t){var e=Object(this);var n=e.length>>>0;for(var i=0;i<n;i++){if(i in e&&t.call(this,e[i],i,e)){return true}}return false}}function p(t){if(t._isValid==null){var e=m(t);var n=r.call(e.parsedDateParts,function(t){return t!=null});var i=!isNaN(t._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&n);if(t._strict){i=i&&e.charsLeftOver===0&&e.unusedTokens.length===0&&e.bigHour===undefined}if(Object.isFrozen==null||!Object.isFrozen(t)){t._isValid=i}else{return i}}return t._isValid}function v(t){var e=g(NaN);if(t!=null){f(m(e),t)}else{m(e).userInvalidated=true}return e}var y=u.momentProperties=[];function b(t,e){var n,i,r;if(!a(e._isAMomentObject)){t._isAMomentObject=e._isAMomentObject}if(!a(e._i)){t._i=e._i}if(!a(e._f)){t._f=e._f}if(!a(e._l)){t._l=e._l}if(!a(e._strict)){t._strict=e._strict}if(!a(e._tzm)){t._tzm=e._tzm}if(!a(e._isUTC)){t._isUTC=e._isUTC}if(!a(e._offset)){t._offset=e._offset}if(!a(e._pf)){t._pf=m(e)}if(!a(e._locale)){t._locale=e._locale}if(y.length>0){for(n=0;n<y.length;n++){i=y[n];r=e[i];if(!a(r)){t[i]=r}}}return t}var x=false;function _(t){b(this,t);this._d=new Date(t._d!=null?t._d.getTime():NaN);if(!this.isValid()){this._d=new Date(NaN)}if(x===false){x=true;u.updateOffset(this);x=false}}function w(t){return t instanceof _||t!=null&&t._isAMomentObject!=null}function k(t){if(t<0){return Math.ceil(t)||0}else{return Math.floor(t)}}function M(t){var e=+t,n=0;if(e!==0&&isFinite(e)){n=k(e)}return n}function S(t,e,n){var i=Math.min(t.length,e.length),r=Math.abs(t.length-e.length),a=0,o;for(o=0;o<i;o++){if(n&&t[o]!==e[o]||!n&&M(t[o])!==M(e[o])){a++}}return a+r}function D(t){if(u.suppressDeprecationWarnings===false&&typeof console!=="undefined"&&console.warn){console.warn("Deprecation warning: "+t)}}function C(r,a){var o=true;return f(function(){if(u.deprecationHandler!=null){u.deprecationHandler(null,r)}if(o){var t=[];var e;for(var n=0;n<arguments.length;n++){e="";if(typeof arguments[n]==="object"){e+="\n["+n+"] ";for(var i in arguments[0]){e+=i+": "+arguments[0][i]+", "}e=e.slice(0,-2)}else{e=arguments[n]}t.push(e)}D(r+"\nArguments: "+Array.prototype.slice.call(t).join("")+"\n"+(new Error).stack);o=false}return a.apply(this,arguments)},a)}var P={},T;function O(t,e){if(u.deprecationHandler!=null){u.deprecationHandler(t,e)}if(!P[t]){D(e);P[t]=true}}function A(t){return t instanceof Function||Object.prototype.toString.call(t)==="[object Function]"}function F(t){var e,n;for(n in t){e=t[n];if(A(e)){this[n]=e}else{this["_"+n]=e}}this._config=t;this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function I(t,e){var n=f({},t),i;for(i in e){if(c(e,i)){if(s(t[i])&&s(e[i])){n[i]={};f(n[i],t[i]);f(n[i],e[i])}else if(e[i]!=null){n[i]=e[i]}else{delete n[i]}}}for(i in t){if(c(t,i)&&!c(e,i)&&s(t[i])){n[i]=f({},n[i])}}return n}function L(t){if(t!=null){this.set(t)}}if(u.suppressDeprecationWarnings=false,u.deprecationHandler=null,Object.keys){T=Object.keys}else{T=function(t){var e,n=[];for(e in t){if(c(t,e)){n.push(e)}}return n}}var R={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function N(t,e,n){var i=this._calendar[t]||this._calendar["sameElse"];return A(i)?i.call(e,n):i}var W={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function Y(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];if(e||!n){return e}this._longDateFormat[t]=n.replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)});return this._longDateFormat[t]}var z="Invalid date";function V(){return this._invalidDate}var E="%d",H=/\d{1,2}/;function B(t){return this._ordinal.replace("%d",t)}var j={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function U(t,e,n,i){var r=this._relativeTime[n];return A(r)?r(t,e,n,i):r.replace(/%d/i,t)}function G(t,e){var n=this._relativeTime[t>0?"future":"past"];return A(n)?n(e):n.replace(/%s/i,e)}var q={};function Z(t,e){var n=t.toLowerCase();q[n]=q[n+"s"]=q[e]=t}function $(t){return typeof t==="string"?q[t]||q[t.toLowerCase()]:undefined}function X(t){var e={},n,i;for(i in t){if(c(t,i)){n=$(i);if(n){e[n]=t[i]}}}return e}var K={};function J(t,e){K[t]=e}function Q(t){var e=[];for(var n in t){e.push({unit:n,priority:K[n]})}e.sort(function(t,e){return t.priority-e.priority});return e}function tt(t,e,n){var i=""+Math.abs(t),r=e-i.length,a=t>=0;return(a?n?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+i}var et=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,nt=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,it={},rt={};function at(t,e,n,i){var r=i;if(typeof i==="string"){r=function(){return this[i]()}}if(t){rt[t]=r}if(e){rt[e[0]]=function(){return tt(r.apply(this,arguments),e[1],e[2])}}if(n){rt[n]=function(){return this.localeData().ordinal(r.apply(this,arguments),t)}}}function ot(t){if(t.match(/\[[\s\S]/)){return t.replace(/^\[|\]$/g,"")}return t.replace(/\\/g,"")}function st(i){var r=i.match(et),t,a;for(t=0,a=r.length;t<a;t++){if(rt[r[t]]){r[t]=rt[r[t]]}else{r[t]=ot(r[t])}}return function(t){var e="",n;for(n=0;n<a;n++){e+=A(r[n])?r[n].call(t,i):r[n]}return e}}function lt(t,e){if(!t.isValid()){return t.localeData().invalidDate()}e=ut(e,t.localeData());it[e]=it[e]||st(e);return it[e](t)}function ut(t,e){var n=5;function i(t){return e.longDateFormat(t)||t}nt.lastIndex=0;while(n>=0&&nt.test(t)){t=t.replace(nt,i);nt.lastIndex=0;n-=1}return t}var dt=/\d/,ht=/\d\d/,ct=/\d{3}/,ft=/\d{4}/,gt=/[+-]?\d{6}/,mt=/\d\d?/,pt=/\d\d\d\d?/,vt=/\d\d\d\d\d\d?/,yt=/\d{1,3}/,bt=/\d{1,4}/,xt=/[+-]?\d{1,6}/,_t=/\d+/,wt=/[+-]?\d+/,kt=/Z|[+-]\d\d:?\d\d/gi,Mt=/Z|[+-]\d\d(?::?\d\d)?/gi,St=/[+-]?\d+(\.\d{1,3})?/,Dt=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Ct={};function Pt(t,n,i){Ct[t]=A(n)?n:function(t,e){return t&&i?i:n}}function Tt(t,e){if(!c(Ct,t)){return new RegExp(Ot(t))}return Ct[t](e._strict,e._locale)}function Ot(t){return At(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,n,i,r){return e||n||i||r}))}function At(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var Ft={};function It(t,n){var e,i=n;if(typeof t==="string"){t=[t]}if(d(n)){i=function(t,e){e[n]=M(t)}}for(e=0;e<t.length;e++){Ft[t[e]]=i}}function Lt(t,r){It(t,function(t,e,n,i){n._w=n._w||{};r(t,n._w,n,i)})}function Rt(t,e,n){if(e!=null&&c(Ft,t)){Ft[t](e,n._a,n,t)}}var Nt=0,Wt=1,Yt=2,zt=3,Vt=4,Et=5,Ht=6,Bt=7,jt=8;function Ut(t){return Gt(t)?366:365}function Gt(t){return t%4===0&&t%100!==0||t%400===0}at("Y",0,0,function(){var t=this.year();return t<=9999?""+t:"+"+t}),at(0,["YY",2],0,function(){return this.year()%100}),at(0,["YYYY",4],0,"year"),at(0,["YYYYY",5],0,"year"),at(0,["YYYYYY",6,true],0,"year"),Z("year","y"),J("year",1),Pt("Y",wt),Pt("YY",mt,ht),Pt("YYYY",bt,ft),Pt("YYYYY",xt,gt),Pt("YYYYYY",xt,gt),It(["YYYYY","YYYYYY"],Nt),It("YYYY",function(t,e){e[Nt]=t.length===2?u.parseTwoDigitYear(t):M(t)}),It("YY",function(t,e){e[Nt]=u.parseTwoDigitYear(t)}),It("Y",function(t,e){e[Nt]=parseInt(t,10)}),u.parseTwoDigitYear=function(t){return M(t)+(M(t)>68?1900:2e3)};var qt=Xt("FullYear",true),Zt;function $t(){return Gt(this.year())}function Xt(e,n){return function(t){if(t!=null){Jt(this,e,t);u.updateOffset(this,n);return this}else{return Kt(this,e)}}}function Kt(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function Jt(t,e,n){if(t.isValid()&&!isNaN(n)){if(e==="FullYear"&&Gt(t.year())&&t.month()===1&&t.date()===29){t._d["set"+(t._isUTC?"UTC":"")+e](n,t.month(),ne(n,t.month()))}else{t._d["set"+(t._isUTC?"UTC":"")+e](n)}}}function Qt(t){t=$(t);if(A(this[t])){return this[t]()}return this}function te(t,e){if(typeof t==="object"){t=X(t);var n=Q(t);for(var i=0;i<n.length;i++){this[n[i].unit](t[n[i].unit])}}else{t=$(t);if(A(this[t])){return this[t](e)}}return this}function ee(t,e){return(t%e+e)%e}if(Array.prototype.indexOf){Zt=Array.prototype.indexOf}else{Zt=function(t){var e;for(e=0;e<this.length;++e){if(this[e]===t){return e}}return-1}}function ne(t,e){if(isNaN(t)||isNaN(e)){return NaN}var n=ee(e,12);t+=(e-n)/12;return n===1?Gt(t)?29:28:31-n%7%2}at("M",["MM",2],"Mo",function(){return this.month()+1}),at("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),at("MMMM",0,0,function(t){return this.localeData().months(this,t)}),Z("month","M"),J("month",8),Pt("M",mt),Pt("MM",mt,ht),Pt("MMM",function(t,e){return e.monthsShortRegex(t)}),Pt("MMMM",function(t,e){return e.monthsRegex(t)}),It(["M","MM"],function(t,e){e[Wt]=M(t)-1}),It(["MMM","MMMM"],function(t,e,n,i){var r=n._locale.monthsParse(t,i,n._strict);if(r!=null){e[Wt]=r}else{m(n).invalidMonth=t}});var ie=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,re="January_February_March_April_May_June_July_August_September_October_November_December".split("_");function ae(t,e){if(!t){return o(this._months)?this._months:this._months["standalone"]}return o(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||ie).test(e)?"format":"standalone"][t.month()]}var oe="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function se(t,e){if(!t){return o(this._monthsShort)?this._monthsShort:this._monthsShort["standalone"]}return o(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[ie.test(e)?"format":"standalone"][t.month()]}function le(t,e,n){var i,r,a,o=t.toLocaleLowerCase();if(!this._monthsParse){this._monthsParse=[];this._longMonthsParse=[];this._shortMonthsParse=[];for(i=0;i<12;++i){a=g([2e3,i]);this._shortMonthsParse[i]=this.monthsShort(a,"").toLocaleLowerCase();this._longMonthsParse[i]=this.months(a,"").toLocaleLowerCase()}}if(n){if(e==="MMM"){r=Zt.call(this._shortMonthsParse,o);return r!==-1?r:null}else{r=Zt.call(this._longMonthsParse,o);return r!==-1?r:null}}else{if(e==="MMM"){r=Zt.call(this._shortMonthsParse,o);if(r!==-1){return r}r=Zt.call(this._longMonthsParse,o);return r!==-1?r:null}else{r=Zt.call(this._longMonthsParse,o);if(r!==-1){return r}r=Zt.call(this._shortMonthsParse,o);return r!==-1?r:null}}}function ue(t,e,n){var i,r,a;if(this._monthsParseExact){return le.call(this,t,e,n)}if(!this._monthsParse){this._monthsParse=[];this._longMonthsParse=[];this._shortMonthsParse=[]}for(i=0;i<12;i++){r=g([2e3,i]);if(n&&!this._longMonthsParse[i]){this._longMonthsParse[i]=new RegExp("^"+this.months(r,"").replace(".","")+"$","i");this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(r,"").replace(".","")+"$","i")}if(!n&&!this._monthsParse[i]){a="^"+this.months(r,"")+"|^"+this.monthsShort(r,"");this._monthsParse[i]=new RegExp(a.replace(".",""),"i")}if(n&&e==="MMMM"&&this._longMonthsParse[i].test(t)){return i}else if(n&&e==="MMM"&&this._shortMonthsParse[i].test(t)){return i}else if(!n&&this._monthsParse[i].test(t)){return i}}}function de(t,e){var n;if(!t.isValid()){return t}if(typeof e==="string"){if(/^\d+$/.test(e)){e=M(e)}else{e=t.localeData().monthsParse(e);if(!d(e)){return t}}}n=Math.min(t.date(),ne(t.year(),e));t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,n);return t}function he(t){if(t!=null){de(this,t);u.updateOffset(this,true);return this}else{return Kt(this,"Month")}}function ce(){return ne(this.year(),this.month())}var fe=Dt;function ge(t){if(this._monthsParseExact){if(!c(this,"_monthsRegex")){ve.call(this)}if(t){return this._monthsShortStrictRegex}else{return this._monthsShortRegex}}else{if(!c(this,"_monthsShortRegex")){this._monthsShortRegex=fe}return this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex}}var me=Dt;function pe(t){if(this._monthsParseExact){if(!c(this,"_monthsRegex")){ve.call(this)}if(t){return this._monthsStrictRegex}else{return this._monthsRegex}}else{if(!c(this,"_monthsRegex")){this._monthsRegex=me}return this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex}}function ve(){function t(t,e){return e.length-t.length}var e=[],n=[],i=[],r,a;for(r=0;r<12;r++){a=g([2e3,r]);e.push(this.monthsShort(a,""));n.push(this.months(a,""));i.push(this.months(a,""));i.push(this.monthsShort(a,""))}e.sort(t);n.sort(t);i.sort(t);for(r=0;r<12;r++){e[r]=At(e[r]);n[r]=At(n[r])}for(r=0;r<24;r++){i[r]=At(i[r])}this._monthsRegex=new RegExp("^("+i.join("|")+")","i");this._monthsShortRegex=this._monthsRegex;this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i");this._monthsShortStrictRegex=new RegExp("^("+e.join("|")+")","i")}function ye(t,e,n,i,r,a,o){var s;if(t<100&&t>=0){s=new Date(t+400,e,n,i,r,a,o);if(isFinite(s.getFullYear())){s.setFullYear(t)}}else{s=new Date(t,e,n,i,r,a,o)}return s}function be(t){var e;if(t<100&&t>=0){var n=Array.prototype.slice.call(arguments);n[0]=t+400;e=new Date(Date.UTC.apply(null,n));if(isFinite(e.getUTCFullYear())){e.setUTCFullYear(t)}}else{e=new Date(Date.UTC.apply(null,arguments))}return e}function xe(t,e,n){var i=7+e-n,r=(7+be(t,0,i).getUTCDay()-e)%7;return-r+i-1}function _e(t,e,n,i,r){var a=(7+n-i)%7,o=xe(t,i,r),s=1+7*(e-1)+a+o,l,u;if(s<=0){l=t-1;u=Ut(l)+s}else if(s>Ut(t)){l=t+1;u=s-Ut(t)}else{l=t;u=s}return{year:l,dayOfYear:u}}function we(t,e,n){var i=xe(t.year(),e,n),r=Math.floor((t.dayOfYear()-i-1)/7)+1,a,o;if(r<1){o=t.year()-1;a=r+ke(o,e,n)}else if(r>ke(t.year(),e,n)){a=r-ke(t.year(),e,n);o=t.year()+1}else{o=t.year();a=r}return{week:a,year:o}}function ke(t,e,n){var i=xe(t,e,n),r=xe(t+1,e,n);return(Ut(t)-i+r)/7}function Me(t){return we(t,this._week.dow,this._week.doy).week}at("w",["ww",2],"wo","week"),at("W",["WW",2],"Wo","isoWeek"),Z("week","w"),Z("isoWeek","W"),J("week",5),J("isoWeek",5),Pt("w",mt),Pt("ww",mt,ht),Pt("W",mt),Pt("WW",mt,ht),Lt(["w","ww","W","WW"],function(t,e,n,i){e[i.substr(0,1)]=M(t)});var Se={dow:0,doy:6};function De(){return this._week.dow}function Ce(){return this._week.doy}function Pe(t){var e=this.localeData().week(this);return t==null?e:this.add((t-e)*7,"d")}function Te(t){var e=we(this,1,4).week;return t==null?e:this.add((t-e)*7,"d")}function Oe(t,e){if(typeof t!=="string"){return t}if(!isNaN(t)){return parseInt(t,10)}t=e.weekdaysParse(t);if(typeof t==="number"){return t}return null}function Ae(t,e){if(typeof t==="string"){return e.weekdaysParse(t)%7||7}return isNaN(t)?null:t}function Fe(t,e){return t.slice(e,7).concat(t.slice(0,e))}at("d",0,"do","day"),at("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),at("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),at("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),at("e",0,0,"weekday"),at("E",0,0,"isoWeekday"),Z("day","d"),Z("weekday","e"),Z("isoWeekday","E"),J("day",11),J("weekday",11),J("isoWeekday",11),Pt("d",mt),Pt("e",mt),Pt("E",mt),Pt("dd",function(t,e){return e.weekdaysMinRegex(t)}),Pt("ddd",function(t,e){return e.weekdaysShortRegex(t)}),Pt("dddd",function(t,e){return e.weekdaysRegex(t)}),Lt(["dd","ddd","dddd"],function(t,e,n,i){var r=n._locale.weekdaysParse(t,i,n._strict);if(r!=null){e.d=r}else{m(n).invalidWeekday=t}}),Lt(["d","e","E"],function(t,e,n,i){e[i]=M(t)});var Ie="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");function Le(t,e){var n=o(this._weekdays)?this._weekdays:this._weekdays[t&&t!==true&&this._weekdays.isFormat.test(e)?"format":"standalone"];return t===true?Fe(n,this._week.dow):t?n[t.day()]:n}var Re="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");function Ne(t){return t===true?Fe(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort}var We="Su_Mo_Tu_We_Th_Fr_Sa".split("_");function Ye(t){return t===true?Fe(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin}function ze(t,e,n){var i,r,a,o=t.toLocaleLowerCase();if(!this._weekdaysParse){this._weekdaysParse=[];this._shortWeekdaysParse=[];this._minWeekdaysParse=[];for(i=0;i<7;++i){a=g([2e3,1]).day(i);this._minWeekdaysParse[i]=this.weekdaysMin(a,"").toLocaleLowerCase();this._shortWeekdaysParse[i]=this.weekdaysShort(a,"").toLocaleLowerCase();this._weekdaysParse[i]=this.weekdays(a,"").toLocaleLowerCase()}}if(n){if(e==="dddd"){r=Zt.call(this._weekdaysParse,o);return r!==-1?r:null}else if(e==="ddd"){r=Zt.call(this._shortWeekdaysParse,o);return r!==-1?r:null}else{r=Zt.call(this._minWeekdaysParse,o);return r!==-1?r:null}}else{if(e==="dddd"){r=Zt.call(this._weekdaysParse,o);if(r!==-1){return r}r=Zt.call(this._shortWeekdaysParse,o);if(r!==-1){return r}r=Zt.call(this._minWeekdaysParse,o);return r!==-1?r:null}else if(e==="ddd"){r=Zt.call(this._shortWeekdaysParse,o);if(r!==-1){return r}r=Zt.call(this._weekdaysParse,o);if(r!==-1){return r}r=Zt.call(this._minWeekdaysParse,o);return r!==-1?r:null}else{r=Zt.call(this._minWeekdaysParse,o);if(r!==-1){return r}r=Zt.call(this._weekdaysParse,o);if(r!==-1){return r}r=Zt.call(this._shortWeekdaysParse,o);return r!==-1?r:null}}}function Ve(t,e,n){var i,r,a;if(this._weekdaysParseExact){return ze.call(this,t,e,n)}if(!this._weekdaysParse){this._weekdaysParse=[];this._minWeekdaysParse=[];this._shortWeekdaysParse=[];this._fullWeekdaysParse=[]}for(i=0;i<7;i++){r=g([2e3,1]).day(i);if(n&&!this._fullWeekdaysParse[i]){this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(r,"").replace(".","\\.?")+"$","i");this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(r,"").replace(".","\\.?")+"$","i");this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(r,"").replace(".","\\.?")+"$","i")}if(!this._weekdaysParse[i]){a="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,"");this._weekdaysParse[i]=new RegExp(a.replace(".",""),"i")}if(n&&e==="dddd"&&this._fullWeekdaysParse[i].test(t)){return i}else if(n&&e==="ddd"&&this._shortWeekdaysParse[i].test(t)){return i}else if(n&&e==="dd"&&this._minWeekdaysParse[i].test(t)){return i}else if(!n&&this._weekdaysParse[i].test(t)){return i}}}function Ee(t){if(!this.isValid()){return t!=null?this:NaN}var e=this._isUTC?this._d.getUTCDay():this._d.getDay();if(t!=null){t=Oe(t,this.localeData());return this.add(t-e,"d")}else{return e}}function He(t){if(!this.isValid()){return t!=null?this:NaN}var e=(this.day()+7-this.localeData()._week.dow)%7;return t==null?e:this.add(t-e,"d")}function Be(t){if(!this.isValid()){return t!=null?this:NaN}if(t!=null){var e=Ae(t,this.localeData());return this.day(this.day()%7?e:e-7)}else{return this.day()||7}}var je=Dt;function Ue(t){if(this._weekdaysParseExact){if(!c(this,"_weekdaysRegex")){Ke.call(this)}if(t){return this._weekdaysStrictRegex}else{return this._weekdaysRegex}}else{if(!c(this,"_weekdaysRegex")){this._weekdaysRegex=je}return this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex}}var Ge=Dt;function qe(t){if(this._weekdaysParseExact){if(!c(this,"_weekdaysRegex")){Ke.call(this)}if(t){return this._weekdaysShortStrictRegex}else{return this._weekdaysShortRegex}}else{if(!c(this,"_weekdaysShortRegex")){this._weekdaysShortRegex=Ge}return this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex}}var Ze=Dt,$e;function Xe(t){if(this._weekdaysParseExact){if(!c(this,"_weekdaysRegex")){Ke.call(this)}if(t){return this._weekdaysMinStrictRegex}else{return this._weekdaysMinRegex}}else{if(!c(this,"_weekdaysMinRegex")){this._weekdaysMinRegex=Ze}return this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex}}function Ke(){function t(t,e){return e.length-t.length}var e=[],n=[],i=[],r=[],a,o,s,l,u;for(a=0;a<7;a++){o=g([2e3,1]).day(a);s=this.weekdaysMin(o,"");l=this.weekdaysShort(o,"");u=this.weekdays(o,"");e.push(s);n.push(l);i.push(u);r.push(s);r.push(l);r.push(u)}e.sort(t);n.sort(t);i.sort(t);r.sort(t);for(a=0;a<7;a++){n[a]=At(n[a]);i[a]=At(i[a]);r[a]=At(r[a])}this._weekdaysRegex=new RegExp("^("+r.join("|")+")","i");this._weekdaysShortRegex=this._weekdaysRegex;this._weekdaysMinRegex=this._weekdaysRegex;this._weekdaysStrictRegex=new RegExp("^("+i.join("|")+")","i");this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i");this._weekdaysMinStrictRegex=new RegExp("^("+e.join("|")+")","i")}function Je(){return this.hours()%12||12}function Qe(){return this.hours()||24}function tn(t,e){at(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function en(t,e){return e._meridiemParse}function nn(t){return(t+"").toLowerCase().charAt(0)==="p"}function rn(t,e,n){if(t>11){return n?"pm":"PM"}else{return n?"am":"AM"}}at("H",["HH",2],0,"hour"),at("h",["hh",2],0,Je),at("k",["kk",2],0,Qe),at("hmm",0,0,function(){return""+Je.apply(this)+tt(this.minutes(),2)}),at("hmmss",0,0,function(){return""+Je.apply(this)+tt(this.minutes(),2)+tt(this.seconds(),2)}),at("Hmm",0,0,function(){return""+this.hours()+tt(this.minutes(),2)}),at("Hmmss",0,0,function(){return""+this.hours()+tt(this.minutes(),2)+tt(this.seconds(),2)}),tn("a",true),tn("A",false),Z("hour","h"),J("hour",13),Pt("a",en),Pt("A",en),Pt("H",mt),Pt("h",mt),Pt("k",mt),Pt("HH",mt,ht),Pt("hh",mt,ht),Pt("kk",mt,ht),Pt("hmm",pt),Pt("hmmss",vt),Pt("Hmm",pt),Pt("Hmmss",vt),It(["H","HH"],zt),It(["k","kk"],function(t,e,n){var i=M(t);e[zt]=i===24?0:i}),It(["a","A"],function(t,e,n){n._isPm=n._locale.isPM(t);n._meridiem=t}),It(["h","hh"],function(t,e,n){e[zt]=M(t);m(n).bigHour=true}),It("hmm",function(t,e,n){var i=t.length-2;e[zt]=M(t.substr(0,i));e[Vt]=M(t.substr(i));m(n).bigHour=true}),It("hmmss",function(t,e,n){var i=t.length-4;var r=t.length-2;e[zt]=M(t.substr(0,i));e[Vt]=M(t.substr(i,2));e[Et]=M(t.substr(r));m(n).bigHour=true}),It("Hmm",function(t,e,n){var i=t.length-2;e[zt]=M(t.substr(0,i));e[Vt]=M(t.substr(i))}),It("Hmmss",function(t,e,n){var i=t.length-4;var r=t.length-2;e[zt]=M(t.substr(0,i));e[Vt]=M(t.substr(i,2));e[Et]=M(t.substr(r))});var an=Xt("Hours",true),on={calendar:R,longDateFormat:W,invalidDate:z,ordinal:E,dayOfMonthOrdinalParse:H,relativeTime:j,months:re,monthsShort:oe,week:Se,weekdays:Ie,weekdaysMin:We,weekdaysShort:Re,meridiemParse:/[ap]\.?m?\.?/i},sn={},ln={},un;function dn(t){return t?t.toLowerCase().replace("_","-"):t}function hn(t){var e=0,n,i,r,a;while(e<t.length){a=dn(t[e]).split("-");n=a.length;i=dn(t[e+1]);i=i?i.split("-"):null;while(n>0){r=cn(a.slice(0,n).join("-"));if(r){return r}if(i&&i.length>=n&&S(a,i,true)>=n-1){break}n--}e++}return un}function cn(t){var e=null;if(!sn[t]&&"object"!=="undefined"&&za&&za.exports){try{e=un._abbr;var n=Va;n("./locale/"+t);fn(e)}catch(t){}}return sn[t]}function fn(t,e){var n;if(t){if(a(e)){n=pn(t)}else{n=gn(t,e)}if(n){un=n}else{if(typeof console!=="undefined"&&console.warn){console.warn("Locale "+t+" not found. Did you forget to load it?")}}}return un._abbr}function gn(t,e){if(e!==null){var n,i=on;e.abbr=t;if(sn[t]!=null){O("defineLocaleOverride","use moment.updateLocale(localeName, config) to change "+"an existing locale. moment.defineLocale(localeName, "+"config) should only be used for creating a new locale "+"See http://momentjs.com/guides/#/warnings/define-locale/ for more info.");i=sn[t]._config}else if(e.parentLocale!=null){if(sn[e.parentLocale]!=null){i=sn[e.parentLocale]._config}else{n=cn(e.parentLocale);if(n!=null){i=n._config}else{if(!ln[e.parentLocale]){ln[e.parentLocale]=[]}ln[e.parentLocale].push({name:t,config:e});return null}}}sn[t]=new L(I(i,e));if(ln[t]){ln[t].forEach(function(t){gn(t.name,t.config)})}fn(t);return sn[t]}else{delete sn[t];return null}}function mn(t,e){if(null!=e){var n,i,r=on;null!=(i=cn(t))&&(r=i._config),e=I(r,e),(n=new L(e)).parentLocale=sn[t],sn[t]=n,fn(t)}else null!=sn[t]&&(null!=sn[t].parentLocale?sn[t]=sn[t].parentLocale:null!=sn[t]&&delete sn[t]);return sn[t]}function pn(t){var e;if(t&&t._locale&&t._locale._abbr){t=t._locale._abbr}if(!t){return un}if(!o(t)){e=cn(t);if(e){return e}t=[t]}return hn(t)}function vn(){return T(sn)}function yn(t){var e;var n=t._a;if(n&&m(t).overflow===-2){e=n[Wt]<0||n[Wt]>11?Wt:n[Yt]<1||n[Yt]>ne(n[Nt],n[Wt])?Yt:n[zt]<0||n[zt]>24||n[zt]===24&&(n[Vt]!==0||n[Et]!==0||n[Ht]!==0)?zt:n[Vt]<0||n[Vt]>59?Vt:n[Et]<0||n[Et]>59?Et:n[Ht]<0||n[Ht]>999?Ht:-1;if(m(t)._overflowDayOfYear&&(e<Nt||e>Yt)){e=Yt}if(m(t)._overflowWeeks&&e===-1){e=Bt}if(m(t)._overflowWeekday&&e===-1){e=jt}m(t).overflow=e}return t}function bn(t,e,n){if(t!=null){return t}if(e!=null){return e}return n}function xn(t){var e=new Date(u.now());if(t._useUTC){return[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]}return[e.getFullYear(),e.getMonth(),e.getDate()]}function _n(t){var e,n,i=[],r,a,o;if(t._d){return}r=xn(t);if(t._w&&t._a[Yt]==null&&t._a[Wt]==null){wn(t)}if(t._dayOfYear!=null){o=bn(t._a[Nt],r[Nt]);if(t._dayOfYear>Ut(o)||t._dayOfYear===0){m(t)._overflowDayOfYear=true}n=be(o,0,t._dayOfYear);t._a[Wt]=n.getUTCMonth();t._a[Yt]=n.getUTCDate()}for(e=0;e<3&&t._a[e]==null;++e){t._a[e]=i[e]=r[e]}for(;e<7;e++){t._a[e]=i[e]=t._a[e]==null?e===2?1:0:t._a[e]}if(t._a[zt]===24&&t._a[Vt]===0&&t._a[Et]===0&&t._a[Ht]===0){t._nextDay=true;t._a[zt]=0}t._d=(t._useUTC?be:ye).apply(null,i);a=t._useUTC?t._d.getUTCDay():t._d.getDay();if(t._tzm!=null){t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm)}if(t._nextDay){t._a[zt]=24}if(t._w&&typeof t._w.d!=="undefined"&&t._w.d!==a){m(t).weekdayMismatch=true}}function wn(t){var e,n,i,r,a,o,s,l;e=t._w;if(e.GG!=null||e.W!=null||e.E!=null){a=1;o=4;n=bn(e.GG,t._a[Nt],we(qn(),1,4).year);i=bn(e.W,1);r=bn(e.E,1);if(r<1||r>7){l=true}}else{a=t._locale._week.dow;o=t._locale._week.doy;var u=we(qn(),a,o);n=bn(e.gg,t._a[Nt],u.year);i=bn(e.w,u.week);if(e.d!=null){r=e.d;if(r<0||r>6){l=true}}else if(e.e!=null){r=e.e+a;if(e.e<0||e.e>6){l=true}}else{r=a}}if(i<1||i>ke(n,a,o)){m(t)._overflowWeeks=true}else if(l!=null){m(t)._overflowWeekday=true}else{s=_e(n,i,r,a,o);t._a[Nt]=s.year;t._dayOfYear=s.dayOfYear}}var kn=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Mn=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Sn=/Z|[+-]\d\d(?::?\d\d)?/,Dn=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,false],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,false],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,false],["YYYYDDD",/\d{7}/]],Cn=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Pn=/^\/?Date\((\-?\d+)/i;function Tn(t){var e,n,i=t._i,r=kn.exec(i)||Mn.exec(i),a,o,s,l;if(r){m(t).iso=true;for(e=0,n=Dn.length;e<n;e++){if(Dn[e][1].exec(r[1])){o=Dn[e][0];a=Dn[e][2]!==false;break}}if(o==null){t._isValid=false;return}if(r[3]){for(e=0,n=Cn.length;e<n;e++){if(Cn[e][1].exec(r[3])){s=(r[2]||" ")+Cn[e][0];break}}if(s==null){t._isValid=false;return}}if(!a&&s!=null){t._isValid=false;return}if(r[4]){if(Sn.exec(r[4])){l="Z"}else{t._isValid=false;return}}t._f=o+(s||"")+(l||"");zn(t)}else{t._isValid=false}}var On=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;function An(t,e,n,i,r,a){var o=[Fn(t),oe.indexOf(e),parseInt(n,10),parseInt(i,10),parseInt(r,10)];if(a){o.push(parseInt(a,10))}return o}function Fn(t){var e=parseInt(t,10);if(e<=49){return 2e3+e}else if(e<=999){return 1900+e}return e}function In(t){return t.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Ln(t,e,n){if(t){var i=Re.indexOf(t),r=new Date(e[0],e[1],e[2]).getDay();if(i!==r){m(n).weekdayMismatch=true;n._isValid=false;return false}}return true}var Rn={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Nn(t,e,n){if(t){return Rn[t]}else if(e){return 0}else{var i=parseInt(n,10);var r=i%100,a=(i-r)/100;return a*60+r}}function Wn(t){var e=On.exec(In(t._i));if(e){var n=An(e[4],e[3],e[2],e[5],e[6],e[7]);if(!Ln(e[1],n,t)){return}t._a=n;t._tzm=Nn(e[8],e[9],e[10]);t._d=be.apply(null,t._a);t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm);m(t).rfc2822=true}else{t._isValid=false}}function Yn(t){var e=Pn.exec(t._i);if(e!==null){t._d=new Date(+e[1]);return}Tn(t);if(t._isValid===false){delete t._isValid}else{return}Wn(t);if(t._isValid===false){delete t._isValid}else{return}u.createFromInputFallback(t)}function zn(t){if(t._f===u.ISO_8601){Tn(t);return}if(t._f===u.RFC_2822){Wn(t);return}t._a=[];m(t).empty=true;var e=""+t._i,n,i,r,a,o,s=e.length,l=0;r=ut(t._f,t._locale).match(et)||[];for(n=0;n<r.length;n++){a=r[n];i=(e.match(Tt(a,t))||[])[0];if(i){o=e.substr(0,e.indexOf(i));if(o.length>0){m(t).unusedInput.push(o)}e=e.slice(e.indexOf(i)+i.length);l+=i.length}if(rt[a]){if(i){m(t).empty=false}else{m(t).unusedTokens.push(a)}Rt(a,i,t)}else if(t._strict&&!i){m(t).unusedTokens.push(a)}}m(t).charsLeftOver=s-l;if(e.length>0){m(t).unusedInput.push(e)}if(t._a[zt]<=12&&m(t).bigHour===true&&t._a[zt]>0){m(t).bigHour=undefined}m(t).parsedDateParts=t._a.slice(0);m(t).meridiem=t._meridiem;t._a[zt]=Vn(t._locale,t._a[zt],t._meridiem);_n(t);yn(t)}function Vn(t,e,n){var i;if(n==null){return e}if(t.meridiemHour!=null){return t.meridiemHour(e,n)}else if(t.isPM!=null){i=t.isPM(n);if(i&&e<12){e+=12}if(!i&&e===12){e=0}return e}else{return e}}function En(t){var e,n,i,r,a;if(t._f.length===0){m(t).invalidFormat=true;t._d=new Date(NaN);return}for(r=0;r<t._f.length;r++){a=0;e=b({},t);if(t._useUTC!=null){e._useUTC=t._useUTC}e._f=t._f[r];zn(e);if(!p(e)){continue}a+=m(e).charsLeftOver;a+=m(e).unusedTokens.length*10;m(e).score=a;if(i==null||a<i){i=a;n=e}}f(t,n||e)}function Hn(t){if(t._d){return}var e=X(t._i);t._a=n([e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],function(t){return t&&parseInt(t,10)});_n(t)}function Bn(t){var e=new _(yn(jn(t)));if(e._nextDay){e.add(1,"d");e._nextDay=undefined}return e}function jn(t){var e=t._i,n=t._f;t._locale=t._locale||pn(t._l);if(e===null||n===undefined&&e===""){return v({nullInput:true})}if(typeof e==="string"){t._i=e=t._locale.preparse(e)}if(w(e)){return new _(yn(e))}else if(h(e)){t._d=e}else if(o(n)){En(t)}else if(n){zn(t)}else{Un(t)}if(!p(t)){t._d=null}return t}function Un(t){var e=t._i;if(a(e)){t._d=new Date(u.now())}else if(h(e)){t._d=new Date(e.valueOf())}else if(typeof e==="string"){Yn(t)}else if(o(e)){t._a=n(e.slice(0),function(t){return parseInt(t,10)});_n(t)}else if(s(e)){Hn(t)}else if(d(e)){t._d=new Date(e)}else{u.createFromInputFallback(t)}}function Gn(t,e,n,i,r){var a={};if(n===true||n===false){i=n;n=undefined}if(s(t)&&l(t)||o(t)&&t.length===0){t=undefined}a._isAMomentObject=true;a._useUTC=a._isUTC=r;a._l=n;a._i=t;a._f=e;a._strict=i;return Bn(a)}function qn(t,e,n,i){return Gn(t,e,n,i,false)}u.createFromInputFallback=C("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), "+"which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are "+"discouraged and will be removed in an upcoming major release. Please refer to "+"http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),u.ISO_8601=function(){},u.RFC_2822=function(){};var Zn=C("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=qn.apply(null,arguments);if(this.isValid()&&t.isValid()){return t<this?this:t}else{return v()}}),$n=C("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=qn.apply(null,arguments);if(this.isValid()&&t.isValid()){return t>this?this:t}else{return v()}});function Xn(t,e){var n,i;if(e.length===1&&o(e[0])){e=e[0]}if(!e.length){return qn()}n=e[0];for(i=1;i<e.length;++i){if(!e[i].isValid()||e[i][t](n)){n=e[i]}}return n}function Kn(){var t;return Xn("isBefore",[].slice.call(arguments,0))}function Jn(){var t;return Xn("isAfter",[].slice.call(arguments,0))}var Qn=function(){return Date.now?Date.now():+new Date},ti=["year","quarter","month","week","day","hour","minute","second","millisecond"];function ei(t){for(var e in t){if(!(Zt.call(ti,e)!==-1&&(t[e]==null||!isNaN(t[e])))){return false}}var n=false;for(var i=0;i<ti.length;++i){if(t[ti[i]]){if(n){return false}if(parseFloat(t[ti[i]])!==M(t[ti[i]])){n=true}}}return true}function ni(){return this._isValid}function ii(){return Si(NaN)}function ri(t){var e=X(t),n=e.year||0,i=e.quarter||0,r=e.month||0,a=e.week||e.isoWeek||0,o=e.day||0,s=e.hour||0,l=e.minute||0,u=e.second||0,d=e.millisecond||0;this._isValid=ei(e);this._milliseconds=+d+u*1e3+l*6e4+s*1e3*60*60;this._days=+o+a*7;this._months=+r+i*3+n*12;this._data={};this._locale=pn();this._bubble()}function ai(t){return t instanceof ri}function oi(t){if(t<0){return Math.round(-1*t)*-1}else{return Math.round(t)}}function si(t,n){at(t,0,0,function(){var t=this.utcOffset();var e="+";if(t<0){t=-t;e="-"}return e+tt(~~(t/60),2)+n+tt(~~t%60,2)})}si("Z",":"),si("ZZ",""),Pt("Z",Mt),Pt("ZZ",Mt),It(["Z","ZZ"],function(t,e,n){n._useUTC=true;n._tzm=ui(Mt,t)});var li=/([\+\-]|\d\d)/gi;function ui(t,e){var n=(e||"").match(t);if(n===null){return null}var i=n[n.length-1]||[];var r=(i+"").match(li)||["-",0,0];var a=+(r[1]*60)+M(r[2]);return a===0?0:r[0]==="+"?a:-a}function di(t,e){var n,i;if(e._isUTC){n=e.clone();i=(w(t)||h(t)?t.valueOf():qn(t).valueOf())-n.valueOf();n._d.setTime(n._d.valueOf()+i);u.updateOffset(n,false);return n}else{return qn(t).local()}}function hi(t){return-Math.round(t._d.getTimezoneOffset()/15)*15}function ci(t,e,n){var i=this._offset||0,r;if(!this.isValid()){return t!=null?this:NaN}if(t!=null){if(typeof t==="string"){t=ui(Mt,t);if(t===null){return this}}else if(Math.abs(t)<16&&!n){t=t*60}if(!this._isUTC&&e){r=hi(this)}this._offset=t;this._isUTC=true;if(r!=null){this.add(r,"m")}if(i!==t){if(!e||this._changeInProgress){Oi(this,Si(t-i,"m"),1,false)}else if(!this._changeInProgress){this._changeInProgress=true;u.updateOffset(this,true);this._changeInProgress=null}}return this}else{return this._isUTC?i:hi(this)}}function fi(t,e){if(t!=null){if(typeof t!=="string"){t=-t}this.utcOffset(t,e);return this}else{return-this.utcOffset()}}function gi(t){return this.utcOffset(0,t)}function mi(t){if(this._isUTC){this.utcOffset(0,t);this._isUTC=false;if(t){this.subtract(hi(this),"m")}}return this}function pi(){if(this._tzm!=null){this.utcOffset(this._tzm,false,true)}else if(typeof this._i==="string"){var t=ui(kt,this._i);if(t!=null){this.utcOffset(t)}else{this.utcOffset(0,true)}}return this}function vi(t){if(!this.isValid()){return false}t=t?qn(t).utcOffset():0;return(this.utcOffset()-t)%60===0}function yi(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function bi(){if(!a(this._isDSTShifted)){return this._isDSTShifted}var t={};b(t,this);t=jn(t);if(t._a){var e=t._isUTC?g(t._a):qn(t._a);this._isDSTShifted=this.isValid()&&S(t._a,e.toArray())>0}else{this._isDSTShifted=false}return this._isDSTShifted}function xi(){return this.isValid()?!this._isUTC:false}function _i(){return this.isValid()?this._isUTC:false}function wi(){return this.isValid()?this._isUTC&&this._offset===0:false}u.updateOffset=function(){};var ki=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Mi=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Si(t,e){var n=t,i=null,r,a,o;if(ai(t)){n={ms:t._milliseconds,d:t._days,M:t._months}}else if(d(t)){n={};if(e){n[e]=t}else{n.milliseconds=t}}else if(!!(i=ki.exec(t))){r=i[1]==="-"?-1:1;n={y:0,d:M(i[Yt])*r,h:M(i[zt])*r,m:M(i[Vt])*r,s:M(i[Et])*r,ms:M(oi(i[Ht]*1e3))*r}}else if(!!(i=Mi.exec(t))){r=i[1]==="-"?-1:1;n={y:Di(i[2],r),M:Di(i[3],r),w:Di(i[4],r),d:Di(i[5],r),h:Di(i[6],r),m:Di(i[7],r),s:Di(i[8],r)}}else if(n==null){n={}}else if(typeof n==="object"&&("from"in n||"to"in n)){o=Pi(qn(n.from),qn(n.to));n={};n.ms=o.milliseconds;n.M=o.months}a=new ri(n);if(ai(t)&&c(t,"_locale")){a._locale=t._locale}return a}function Di(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function Ci(t,e){var n={};n.months=e.month()-t.month()+(e.year()-t.year())*12;if(t.clone().add(n.months,"M").isAfter(e)){--n.months}n.milliseconds=+e-+t.clone().add(n.months,"M");return n}function Pi(t,e){var n;if(!(t.isValid()&&e.isValid())){return{milliseconds:0,months:0}}e=di(e,t);if(t.isBefore(e)){n=Ci(t,e)}else{n=Ci(e,t);n.milliseconds=-n.milliseconds;n.months=-n.months}return n}function Ti(r,a){return function(t,e){var n,i;if(e!==null&&!isNaN(+e)){O(a,"moment()."+a+"(period, number) is deprecated. Please use moment()."+a+"(number, period). "+"See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.");i=t;t=e;e=i}t=typeof t==="string"?+t:t;n=Si(t,e);Oi(this,n,r);return this}}function Oi(t,e,n,i){var r=e._milliseconds,a=oi(e._days),o=oi(e._months);if(!t.isValid()){return}i=i==null?true:i;if(o){de(t,Kt(t,"Month")+o*n)}if(a){Jt(t,"Date",Kt(t,"Date")+a*n)}if(r){t._d.setTime(t._d.valueOf()+r*n)}if(i){u.updateOffset(t,a||o)}}Si.fn=ri.prototype,Si.invalid=ii;var Ai=Ti(1,"add"),Fi=Ti(-1,"subtract");function Ii(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function Li(t,e){var n=t||qn(),i=di(n,this).startOf("day"),r=u.calendarFormat(this,i)||"sameElse";var a=e&&(A(e[r])?e[r].call(this,n):e[r]);return this.format(a||this.localeData().calendar(r,this,qn(n)))}function Ri(){return new _(this)}function Ni(t,e){var n=w(t)?t:qn(t);if(!(this.isValid()&&n.isValid())){return false}e=$(e)||"millisecond";if(e==="millisecond"){return this.valueOf()>n.valueOf()}else{return n.valueOf()<this.clone().startOf(e).valueOf()}}function Wi(t,e){var n=w(t)?t:qn(t);if(!(this.isValid()&&n.isValid())){return false}e=$(e)||"millisecond";if(e==="millisecond"){return this.valueOf()<n.valueOf()}else{return this.clone().endOf(e).valueOf()<n.valueOf()}}function Yi(t,e,n,i){var r=w(t)?t:qn(t),a=w(e)?e:qn(e);if(!(this.isValid()&&r.isValid()&&a.isValid())){return false}i=i||"()";return(i[0]==="("?this.isAfter(r,n):!this.isBefore(r,n))&&(i[1]===")"?this.isBefore(a,n):!this.isAfter(a,n))}function zi(t,e){var n=w(t)?t:qn(t),i;if(!(this.isValid()&&n.isValid())){return false}e=$(e)||"millisecond";if(e==="millisecond"){return this.valueOf()===n.valueOf()}else{i=n.valueOf();return this.clone().startOf(e).valueOf()<=i&&i<=this.clone().endOf(e).valueOf()}}function Vi(t,e){return this.isSame(t,e)||this.isAfter(t,e)}function Ei(t,e){return this.isSame(t,e)||this.isBefore(t,e)}function Hi(t,e,n){var i,r,a;if(!this.isValid()){return NaN}i=di(t,this);if(!i.isValid()){return NaN}r=(i.utcOffset()-this.utcOffset())*6e4;e=$(e);switch(e){case"year":a=Bi(this,i)/12;break;case"month":a=Bi(this,i);break;case"quarter":a=Bi(this,i)/3;break;case"second":a=(this-i)/1e3;break;case"minute":a=(this-i)/6e4;break;case"hour":a=(this-i)/36e5;break;case"day":a=(this-i-r)/864e5;break;case"week":a=(this-i-r)/6048e5;break;default:a=this-i}return n?a:k(a)}function Bi(t,e){var n=(e.year()-t.year())*12+(e.month()-t.month()),i=t.clone().add(n,"months"),r,a;if(e-i<0){r=t.clone().add(n-1,"months");a=(e-i)/(i-r)}else{r=t.clone().add(n+1,"months");a=(e-i)/(r-i)}return-(n+a)||0}function ji(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Ui(t){if(!this.isValid()){return null}var e=t!==true;var n=e?this.clone().utc():this;if(n.year()<0||n.year()>9999){return lt(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ")}if(A(Date.prototype.toISOString)){if(e){return this.toDate().toISOString()}else{return new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",lt(n,"Z"))}}return lt(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Gi(){if(!this.isValid()){return"moment.invalid(/* "+this._i+" */)"}var t="moment";var e="";if(!this.isLocal()){t=this.utcOffset()===0?"moment.utc":"moment.parseZone";e="Z"}var n="["+t+'("]';var i=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY";var r="-MM-DD[T]HH:mm:ss.SSS";var a=e+'[")]';return this.format(n+i+r+a)}function qi(t){if(!t){t=this.isUtc()?u.defaultFormatUtc:u.defaultFormat}var e=lt(this,t);return this.localeData().postformat(e)}function Zi(t,e){if(this.isValid()&&(w(t)&&t.isValid()||qn(t).isValid())){return Si({to:this,from:t}).locale(this.locale()).humanize(!e)}else{return this.localeData().invalidDate()}}function $i(t){return this.from(qn(),t)}function Xi(t,e){if(this.isValid()&&(w(t)&&t.isValid()||qn(t).isValid())){return Si({from:this,to:t}).locale(this.locale()).humanize(!e)}else{return this.localeData().invalidDate()}}function Ki(t){return this.to(qn(),t)}function Ji(t){var e;if(t===undefined){return this._locale._abbr}else{e=pn(t);if(e!=null){this._locale=e}return this}}u.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",u.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Qi=C("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){if(t===undefined){return this.localeData()}else{return this.locale(t)}});function tr(){return this._locale}var er=1e3,nr=60*er,ir=60*nr,rr=(365*400+97)*24*ir;function ar(t,e){return(t%e+e)%e}function or(t,e,n){if(t<100&&t>=0){return new Date(t+400,e,n)-rr}else{return new Date(t,e,n).valueOf()}}function sr(t,e,n){if(t<100&&t>=0){return Date.UTC(t+400,e,n)-rr}else{return Date.UTC(t,e,n)}}function lr(t){var e;t=$(t);if(t===undefined||t==="millisecond"||!this.isValid()){return this}var n=this._isUTC?sr:or;switch(t){case"year":e=n(this.year(),0,1);break;case"quarter":e=n(this.year(),this.month()-this.month()%3,1);break;case"month":e=n(this.year(),this.month(),1);break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=n(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf();e-=ar(e+(this._isUTC?0:this.utcOffset()*nr),ir);break;case"minute":e=this._d.valueOf();e-=ar(e,nr);break;case"second":e=this._d.valueOf();e-=ar(e,er);break}this._d.setTime(e);u.updateOffset(this,true);return this}function ur(t){var e;t=$(t);if(t===undefined||t==="millisecond"||!this.isValid()){return this}var n=this._isUTC?sr:or;switch(t){case"year":e=n(this.year()+1,0,1)-1;break;case"quarter":e=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=n(this.year(),this.month()+1,1)-1;break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf();e+=ir-ar(e+(this._isUTC?0:this.utcOffset()*nr),ir)-1;break;case"minute":e=this._d.valueOf();e+=nr-ar(e,nr)-1;break;case"second":e=this._d.valueOf();e+=er-ar(e,er)-1;break}this._d.setTime(e);u.updateOffset(this,true);return this}function dr(){return this._d.valueOf()-(this._offset||0)*6e4}function hr(){return Math.floor(this.valueOf()/1e3)}function cr(){return new Date(this.valueOf())}function fr(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function gr(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}}function mr(){return this.isValid()?this.toISOString():null}function pr(){return p(this)}function vr(){return f({},m(this))}function yr(){return m(this).overflow}function br(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function xr(t,e){at(0,[t,t.length],0,e)}function _r(t){return Sr.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function wr(t){return Sr.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)}function kr(){return ke(this.year(),1,4)}function Mr(){var t=this.localeData()._week;return ke(this.year(),t.dow,t.doy)}function Sr(t,e,n,i,r){var a;if(t==null){return we(this,i,r).year}else{a=ke(t,i,r);if(e>a){e=a}return Dr.call(this,t,e,n,i,r)}}function Dr(t,e,n,i,r){var a=_e(t,e,n,i,r),o=be(a.year,0,a.dayOfYear);this.year(o.getUTCFullYear());this.month(o.getUTCMonth());this.date(o.getUTCDate());return this}function Cr(t){return t==null?Math.ceil((this.month()+1)/3):this.month((t-1)*3+this.month()%3)}at(0,["gg",2],0,function(){return this.weekYear()%100}),at(0,["GG",2],0,function(){return this.isoWeekYear()%100}),xr("gggg","weekYear"),xr("ggggg","weekYear"),xr("GGGG","isoWeekYear"),xr("GGGGG","isoWeekYear"),Z("weekYear","gg"),Z("isoWeekYear","GG"),J("weekYear",1),J("isoWeekYear",1),Pt("G",wt),Pt("g",wt),Pt("GG",mt,ht),Pt("gg",mt,ht),Pt("GGGG",bt,ft),Pt("gggg",bt,ft),Pt("GGGGG",xt,gt),Pt("ggggg",xt,gt),Lt(["gggg","ggggg","GGGG","GGGGG"],function(t,e,n,i){e[i.substr(0,2)]=M(t)}),Lt(["gg","GG"],function(t,e,n,i){e[i]=u.parseTwoDigitYear(t)}),at("Q",0,"Qo","quarter"),Z("quarter","Q"),J("quarter",7),Pt("Q",dt),It("Q",function(t,e){e[Wt]=(M(t)-1)*3}),at("D",["DD",2],"Do","date"),Z("date","D"),J("date",9),Pt("D",mt),Pt("DD",mt,ht),Pt("Do",function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient}),It(["D","DD"],Yt),It("Do",function(t,e){e[Yt]=M(t.match(mt)[0])});var Pr=Xt("Date",true);function Tr(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return t==null?e:this.add(t-e,"d")}at("DDD",["DDDD",3],"DDDo","dayOfYear"),Z("dayOfYear","DDD"),J("dayOfYear",4),Pt("DDD",yt),Pt("DDDD",ct),It(["DDD","DDDD"],function(t,e,n){n._dayOfYear=M(t)}),at("m",["mm",2],0,"minute"),Z("minute","m"),J("minute",14),Pt("m",mt),Pt("mm",mt,ht),It(["m","mm"],Vt);var Or=Xt("Minutes",false);at("s",["ss",2],0,"second"),Z("second","s"),J("second",15),Pt("s",mt),Pt("ss",mt,ht),It(["s","ss"],Et);var Ar=Xt("Seconds",false),Fr;for(at("S",0,0,function(){return~~(this.millisecond()/100)}),at(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),at(0,["SSS",3],0,"millisecond"),at(0,["SSSS",4],0,function(){return this.millisecond()*10}),at(0,["SSSSS",5],0,function(){return this.millisecond()*100}),at(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),at(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),at(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),at(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),Z("millisecond","ms"),J("millisecond",16),Pt("S",yt,dt),Pt("SS",yt,ht),Pt("SSS",yt,ct),Fr="SSSS";Fr.length<=9;Fr+="S"){Pt(Fr,_t)}function Ir(t,e){e[Ht]=M(("0."+t)*1e3)}for(Fr="S";Fr.length<=9;Fr+="S"){It(Fr,Ir)}var Lr=Xt("Milliseconds",false);function Rr(){return this._isUTC?"UTC":""}function Nr(){return this._isUTC?"Coordinated Universal Time":""}at("z",0,0,"zoneAbbr"),at("zz",0,0,"zoneName");var Wr=_.prototype;function Yr(t){return qn(1e3*t)}function zr(){return qn.apply(null,arguments).parseZone()}function Vr(t){return t}Wr.add=Ai,Wr.calendar=Li,Wr.clone=Ri,Wr.diff=Hi,Wr.endOf=ur,Wr.format=qi,Wr.from=Zi,Wr.fromNow=$i,Wr.to=Xi,Wr.toNow=Ki,Wr.get=Qt,Wr.invalidAt=yr,Wr.isAfter=Ni,Wr.isBefore=Wi,Wr.isBetween=Yi,Wr.isSame=zi,Wr.isSameOrAfter=Vi,Wr.isSameOrBefore=Ei,Wr.isValid=pr,Wr.lang=Qi,Wr.locale=Ji,Wr.localeData=tr,Wr.max=$n,Wr.min=Zn,Wr.parsingFlags=vr,Wr.set=te,Wr.startOf=lr,Wr.subtract=Fi,Wr.toArray=fr,Wr.toObject=gr,Wr.toDate=cr,Wr.toISOString=Ui,Wr.inspect=Gi,Wr.toJSON=mr,Wr.toString=ji,Wr.unix=hr,Wr.valueOf=dr,Wr.creationData=br,Wr.year=qt,Wr.isLeapYear=$t,Wr.weekYear=_r,Wr.isoWeekYear=wr,Wr.quarter=Wr.quarters=Cr,Wr.month=he,Wr.daysInMonth=ce,Wr.week=Wr.weeks=Pe,Wr.isoWeek=Wr.isoWeeks=Te,Wr.weeksInYear=Mr,Wr.isoWeeksInYear=kr,Wr.date=Pr,Wr.day=Wr.days=Ee,Wr.weekday=He,Wr.isoWeekday=Be,Wr.dayOfYear=Tr,Wr.hour=Wr.hours=an,Wr.minute=Wr.minutes=Or,Wr.second=Wr.seconds=Ar,Wr.millisecond=Wr.milliseconds=Lr,Wr.utcOffset=ci,Wr.utc=gi,Wr.local=mi,Wr.parseZone=pi,Wr.hasAlignedHourOffset=vi,Wr.isDST=yi,Wr.isLocal=xi,Wr.isUtcOffset=_i,Wr.isUtc=wi,Wr.isUTC=wi,Wr.zoneAbbr=Rr,Wr.zoneName=Nr,Wr.dates=C("dates accessor is deprecated. Use date instead.",Pr),Wr.months=C("months accessor is deprecated. Use month instead",he),Wr.years=C("years accessor is deprecated. Use year instead",qt),Wr.zone=C("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",fi),Wr.isDSTShifted=C("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",bi);var Er=L.prototype;function Hr(t,e,n,i){var r=pn();var a=g().set(i,e);return r[n](a,t)}function Br(t,e,n){if(d(t)){e=t;t=undefined}t=t||"";if(e!=null){return Hr(t,e,n,"month")}var i;var r=[];for(i=0;i<12;i++){r[i]=Hr(t,i,n,"month")}return r}function jr(t,e,n,i){if(typeof t==="boolean"){if(d(e)){n=e;e=undefined}e=e||""}else{e=t;n=e;t=false;if(d(e)){n=e;e=undefined}e=e||""}var r=pn(),a=t?r._week.dow:0;if(n!=null){return Hr(e,(n+a)%7,i,"day")}var o;var s=[];for(o=0;o<7;o++){s[o]=Hr(e,(o+a)%7,i,"day")}return s}function Ur(t,e){return Br(t,e,"months")}function Gr(t,e){return Br(t,e,"monthsShort")}function qr(t,e,n){return jr(t,e,n,"weekdays")}function Zr(t,e,n){return jr(t,e,n,"weekdaysShort")}function $r(t,e,n){return jr(t,e,n,"weekdaysMin")}Er.calendar=N,Er.longDateFormat=Y,Er.invalidDate=V,Er.ordinal=B,Er.preparse=Vr,Er.postformat=Vr,Er.relativeTime=U,Er.pastFuture=G,Er.set=F,Er.months=ae,Er.monthsShort=se,Er.monthsParse=ue,Er.monthsRegex=pe,Er.monthsShortRegex=ge,Er.week=Me,Er.firstDayOfYear=Ce,Er.firstDayOfWeek=De,Er.weekdays=Le,Er.weekdaysMin=Ye,Er.weekdaysShort=Ne,Er.weekdaysParse=Ve,Er.weekdaysRegex=Ue,Er.weekdaysShortRegex=qe,Er.weekdaysMinRegex=Xe,Er.isPM=nn,Er.meridiem=rn,fn("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,n=M(t%100/10)===1?"th":e===1?"st":e===2?"nd":e===3?"rd":"th";return t+n}}),u.lang=C("moment.lang is deprecated. Use moment.locale instead.",fn),u.langData=C("moment.langData is deprecated. Use moment.localeData instead.",pn);var Xr=Math.abs;function Kr(){var t=this._data;return this._milliseconds=Xr(this._milliseconds),this._days=Xr(this._days),this._months=Xr(this._months),t.milliseconds=Xr(t.milliseconds),t.seconds=Xr(t.seconds),t.minutes=Xr(t.minutes),t.hours=Xr(t.hours),t.months=Xr(t.months),t.years=Xr(t.years),this}function Jr(t,e,n,i){var r=Si(e,n);t._milliseconds+=i*r._milliseconds;t._days+=i*r._days;t._months+=i*r._months;return t._bubble()}function Qr(t,e){return Jr(this,t,e,1)}function ta(t,e){return Jr(this,t,e,-1)}function ea(t){if(t<0){return Math.floor(t)}else{return Math.ceil(t)}}function na(){var t,e,n,i,r,a=this._milliseconds,o=this._days,s=this._months,l=this._data;if(!(0<=a&&0<=o&&0<=s||a<=0&&o<=0&&s<=0))a+=864e5*ea(ra(s)+o),s=o=0;return l.milliseconds=a%1e3,t=k(a/1e3),l.seconds=t%60,e=k(t/60),l.minutes=e%60,n=k(e/60),l.hours=n%24,o+=k(n/24),r=k(ia(o)),s+=r,o-=ea(ra(r)),i=k(s/12),s%=12,l.days=o,l.months=s,l.years=i,this}function ia(t){return t*4800/146097}function ra(t){return t*146097/4800}function aa(t){if(!this.isValid())return NaN;var e,n,i=this._milliseconds;if("month"===(t=$(t))||"quarter"===t||"year"===t)switch(e=this._days+i/864e5,n=this._months+ia(e),t){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(e=this._days+Math.round(ra(this._months)),t){case"week":return e/7+i/6048e5;case"day":return e+i/864e5;case"hour":return 24*e+i/36e5;case"minute":return 1440*e+i/6e4;case"second":return 86400*e+i/1e3;case"millisecond":return Math.floor(864e5*e)+i;default:throw new Error("Unknown unit "+t)}}function oa(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*M(this._months/12):NaN}function sa(t){return function(){return this.as(t)}}var la=sa("ms"),ua=sa("s"),da=sa("m"),ha=sa("h"),ca=sa("d"),fa=sa("w"),ga=sa("M"),ma=sa("Q"),pa=sa("y");function va(){return Si(this)}function ya(t){return t=$(t),this.isValid()?this[t+"s"]():NaN}function ba(t){return function(){return this.isValid()?this._data[t]:NaN}}var xa=ba("milliseconds"),_a=ba("seconds"),wa=ba("minutes"),ka=ba("hours"),Ma=ba("days"),Sa=ba("months"),Da=ba("years");function Ca(){return k(this.days()/7)}var Pa=Math.round,Ta={ss:44,s:45,m:45,h:22,d:26,M:11};function Oa(t,e,n,i,r){return r.relativeTime(e||1,!!n,t,i)}function Aa(t,e,n){var i=Si(t).abs(),r=Pa(i.as("s")),a=Pa(i.as("m")),o=Pa(i.as("h")),s=Pa(i.as("d")),l=Pa(i.as("M")),u=Pa(i.as("y")),d=(r<=Ta.ss?["s",r]:r<Ta.s&&["ss",r])||a<=1&&["m"]||a<Ta.m&&["mm",a]||o<=1&&["h"]||o<Ta.h&&["hh",o]||s<=1&&["d"]||s<Ta.d&&["dd",s]||l<=1&&["M"]||l<Ta.M&&["MM",l]||u<=1&&["y"]||["yy",u];return d[2]=e,d[3]=0<+t,d[4]=n,function(t,e,n,i,r){return r.relativeTime(e||1,!!n,t,i)}.apply(null,d)}function Fa(t){return void 0!==t?"function"==typeof t&&(Pa=t,!0):Pa}function Ia(t,e){if(void 0===Ta[t])return!1;if(void 0===e)return Ta[t];if(Ta[t]=e,"s"===t)Ta.ss=e-1;return!0}function La(t){if(!this.isValid())return this.localeData().invalidDate();var e=this.localeData(),n=function(t,e,n){var i=Si(t).abs(),r=Pa(i.as("s")),a=Pa(i.as("m")),o=Pa(i.as("h")),s=Pa(i.as("d")),l=Pa(i.as("M")),u=Pa(i.as("y")),d=(r<=Ta.ss?["s",r]:r<Ta.s&&["ss",r])||a<=1&&["m"]||a<Ta.m&&["mm",a]||o<=1&&["h"]||o<Ta.h&&["hh",o]||s<=1&&["d"]||s<Ta.d&&["dd",s]||l<=1&&["M"]||l<Ta.M&&["MM",l]||u<=1&&["y"]||["yy",u];return d[2]=e,d[3]=0<+t,d[4]=n,function(t,e,n,i,r){return r.relativeTime(e||1,!!n,t,i)}.apply(null,d)}(this,!t,e);if(t)n=e.pastFuture(+this,n);return e.postformat(n)}var Ra=Math.abs;function Na(t){return(t>0)-(t<0)||+t}function Wa(){if(!this.isValid()){return this.localeData().invalidDate()}var t=Ra(this._milliseconds)/1e3;var e=Ra(this._days);var n=Ra(this._months);var i,r,a;i=k(t/60);r=k(i/60);t%=60;i%=60;a=k(n/12);n%=12;var o=a;var s=n;var l=e;var u=r;var d=i;var h=t?t.toFixed(3).replace(/\.?0+$/,""):"";var c=this.asSeconds();if(!c){return"P0D"}var f=c<0?"-":"";var g=Na(this._months)!==Na(c)?"-":"";var m=Na(this._days)!==Na(c)?"-":"";var p=Na(this._milliseconds)!==Na(c)?"-":"";return f+"P"+(o?g+o+"Y":"")+(s?g+s+"M":"")+(l?m+l+"D":"")+(u||d||h?"T":"")+(u?p+u+"H":"")+(d?p+d+"M":"")+(h?p+h+"S":"")}var Ya=ri.prototype;return Ya.isValid=function(){return this._isValid},Ya.abs=function(){var t=this._data;return this._milliseconds=Xr(this._milliseconds),this._days=Xr(this._days),this._months=Xr(this._months),t.milliseconds=Xr(t.milliseconds),t.seconds=Xr(t.seconds),t.minutes=Xr(t.minutes),t.hours=Xr(t.hours),t.months=Xr(t.months),t.years=Xr(t.years),this},Ya.add=function(t,e){return Jr(this,t,e,1)},Ya.subtract=function(t,e){return Jr(this,t,e,-1)},Ya.as=function(t){if(!this.isValid())return NaN;var e,n,i=this._milliseconds;if("month"===(t=$(t))||"quarter"===t||"year"===t)switch(e=this._days+i/864e5,n=this._months+ia(e),t){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(e=this._days+Math.round(ra(this._months)),t){case"week":return e/7+i/6048e5;case"day":return e+i/864e5;case"hour":return 24*e+i/36e5;case"minute":return 1440*e+i/6e4;case"second":return 86400*e+i/1e3;case"millisecond":return Math.floor(864e5*e)+i;default:throw new Error("Unknown unit "+t)}},Ya.asMilliseconds=la,Ya.asSeconds=ua,Ya.asMinutes=da,Ya.asHours=ha,Ya.asDays=ca,Ya.asWeeks=fa,Ya.asMonths=ga,Ya.asQuarters=ma,Ya.asYears=pa,Ya.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*M(this._months/12):NaN},Ya._bubble=function(){var t,e,n,i,r,a=this._milliseconds,o=this._days,s=this._months,l=this._data;0<=a&&0<=o&&0<=s||a<=0&&o<=0&&s<=0||(a+=864e5*ea(ra(s)+o),s=o=0);return l.milliseconds=a%1e3,t=k(a/1e3),l.seconds=t%60,e=k(t/60),l.minutes=e%60,n=k(e/60),l.hours=n%24,o+=k(n/24),r=k(ia(o)),s+=r,o-=ea(ra(r)),i=k(s/12),s%=12,l.days=o,l.months=s,l.years=i,this},Ya.clone=function(){return Si(this)},Ya.get=function(t){return t=$(t),this.isValid()?this[t+"s"]():NaN},Ya.milliseconds=xa,Ya.seconds=_a,Ya.minutes=wa,Ya.hours=ka,Ya.days=Ma,Ya.weeks=function(){return k(this.days()/7)},Ya.months=Sa,Ya.years=Da,Ya.humanize=function(t){if(!this.isValid())return this.localeData().invalidDate();var e=this.localeData(),n=function(t,e,n){var i=Si(t).abs(),r=Pa(i.as("s")),a=Pa(i.as("m")),o=Pa(i.as("h")),s=Pa(i.as("d")),l=Pa(i.as("M")),u=Pa(i.as("y")),d=(r<=Ta.ss?["s",r]:r<Ta.s&&["ss",r])||a<=1&&["m"]||a<Ta.m&&["mm",a]||o<=1&&["h"]||o<Ta.h&&["hh",o]||s<=1&&["d"]||s<Ta.d&&["dd",s]||l<=1&&["M"]||l<Ta.M&&["MM",l]||u<=1&&["y"]||["yy",u];return d[2]=e,d[3]=0<+t,d[4]=n,function(t,e,n,i,r){return r.relativeTime(e||1,!!n,t,i)}.apply(null,d)}(this,!t,e);t&&(n=e.pastFuture(+this,n));return e.postformat(n)},Ya.toISOString=Wa,Ya.toString=Wa,Ya.toJSON=Wa,Ya.locale=Ji,Ya.localeData=tr,Ya.toIsoString=C("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Wa),Ya.lang=Qi,at("X",0,0,"unix"),at("x",0,0,"valueOf"),Pt("x",wt),Pt("X",/[+-]?\d+(\.\d{1,3})?/),It("X",function(t,e,n){n._d=new Date(1e3*parseFloat(t,10))}),It("x",function(t,e,n){n._d=new Date(M(t))}),u.version="2.24.0",function(t){e=t}(qn),u.fn=Wr,u.min=function(){return Xn("isBefore",[].slice.call(arguments,0))},u.max=function(){return Xn("isAfter",[].slice.call(arguments,0))},u.now=function(){return Date.now?Date.now():+new Date},u.utc=g,u.unix=function(t){return qn(1e3*t)},u.months=function(t,e){return Br(t,e,"months")},u.isDate=h,u.locale=fn,u.invalid=v,u.duration=Si,u.isMoment=w,u.weekdays=function(t,e,n){return jr(t,e,n,"weekdays")},u.parseZone=function(){return qn.apply(null,arguments).parseZone()},u.localeData=pn,u.isDuration=ai,u.monthsShort=function(t,e){return Br(t,e,"monthsShort")},u.weekdaysMin=function(t,e,n){return jr(t,e,n,"weekdaysMin")},u.defineLocale=gn,u.updateLocale=function(t,e){{var n,i,r;null!=e?(r=on,null!=(i=cn(t))&&(r=i._config),e=I(r,e),(n=new L(e)).parentLocale=sn[t],sn[t]=n,fn(t)):null!=sn[t]&&(null!=sn[t].parentLocale?sn[t]=sn[t].parentLocale:null!=sn[t]&&delete sn[t])}return sn[t]},u.locales=function(){return T(sn)},u.weekdaysShort=function(t,e,n){return jr(t,e,n,"weekdaysShort")},u.normalizeUnits=$,u.relativeTimeRounding=function(t){return void 0!==t?"function"==typeof t&&(Pa=t,!0):Pa},u.relativeTimeThreshold=function(t,e){if(void 0===Ta[t])return!1;if(void 0===e)return Ta[t];Ta[t]=e,"s"===t&&(Ta.ss=e-1);return!0},u.calendarFormat=function(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},u.prototype=Wr,u.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},u}()}),ri={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};Qe._date.override("function"==typeof ii?{_id:"moment",formats:function(){return ri},parse:function(t,e){return"string"==typeof t&&"string"==typeof e?t=ii(t,e):t instanceof ii||(t=ii(t)),t.isValid()?t.valueOf():null},format:function(t,e){return ii(t).format(e)},add:function(t,e,n){return ii(t).add(e,n).valueOf()},diff:function(t,e,n){return ii(t).diff(ii(e),n)},startOf:function(t,e,n){return t=ii(t),"isoWeek"===e?t.isoWeekday(n).valueOf():t.startOf(e).valueOf()},endOf:function(t,e){return ii(t).endOf(e).valueOf()},_create:function(t){return ii(t)}}:{}),Y._set("global",{plugins:{filler:{propagate:!0}}});var ai={dataset:function(t){var e=t.fill,n=t.chart,i=n.getDatasetMeta(e),r=i&&n.isDatasetVisible(e)&&i.dataset._children||[],a=r.length||0;return a?function(t,e){return e<a&&r[e]._view||null}:null},boundary:function(t){var n=t.boundary,e=n?n.x:null,i=n?n.y:null;return B.isArray(n)?function(t,e){return n[e]}:function(t){return{x:null===e?t.x:e,y:null===i?t.y:i}}}};function oi(t){return((t.el._scale||{}).getPointPositionForValue?function(t){var e,n,i,r,a,o=t.el._scale,s=o.options,l=o.chart.data.labels.length,u=t.fill,d=[];if(!l)return null;for(e=s.ticks.reverse?o.max:o.min,n=s.ticks.reverse?o.min:o.max,i=o.getPointPositionForValue(0,e),r=0;r<l;++r)a="start"===u||"end"===u?o.getPointPositionForValue(r,"start"===u?e:n):o.getBasePosition(r),s.gridLines.circular&&(a.cx=i.x,a.cy=i.y,a.angle=o.getIndexAngle(r)-Math.PI/2),d.push(a);return d}:function(t){var e,n=t.el._model||{},i=t.el._scale||{},r=t.fill,a=null;if(isFinite(r))return null;if("start"===r?a=void 0===n.scaleBottom?i.bottom:n.scaleBottom:"end"===r?a=void 0===n.scaleTop?i.top:n.scaleTop:void 0!==n.scaleZero?a=n.scaleZero:i.getBasePixel&&(a=i.getBasePixel()),null!=a){if(void 0!==a.x&&void 0!==a.y)return a;if(B.isFinite(a))return{x:(e=i.isHorizontal())?a:null,y:e?null:a}}return null})(t)}function si(t){return t&&!t.skip}function li(t,e,n,i,r){var a,o,s,l;if(i&&r){for(t.moveTo(e[0].x,e[0].y),a=1;a<i;++a)B.canvas.lineTo(t,e[a-1],e[a]);if(void 0===n[0].angle)for(t.lineTo(n[r-1].x,n[r-1].y),a=r-1;0<a;--a)B.canvas.lineTo(t,n[a],n[a-1],!0);else for(o=n[0].cx,s=n[0].cy,l=Math.sqrt(Math.pow(n[0].x-o,2)+Math.pow(n[0].y-s,2)),a=r-1;0<a;--a)t.arc(o,s,l,n[a].angle,n[a-1].angle,!0)}}var ui={id:"filler",afterDatasetsUpdate:function(t,e){for(var n,i,r,a,o,s,l=(t.data.datasets||[]).length,u=e.propagate,d=[],h=0;h<l;++h)r=null,(i=(n=t.getDatasetMeta(h)).dataset)&&i._model&&i instanceof wt.Line&&(r={visible:t.isDatasetVisible(h),fill:function(t,e,n){var i,r=t._model||{},a=r.fill;if(void 0===a&&(a=!!r.backgroundColor),!1===a||null===a)return!1;if(!0===a)return"origin";if(i=parseFloat(a,10),isFinite(i)&&Math.floor(i)===i)return"-"!==a[0]&&"+"!==a[0]||(i=e+i),!(i===e||i<0||n<=i)&&i;switch(a){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return a;default:return!1}}(i,h,l),chart:t,el:i}),n.$filler=r,d.push(r);for(h=0;h<l;++h)(r=d[h])&&(r.fill=function(t,e,n){var i,r=t[e].fill,a=[e];if(!n)return r;for(;!1!==r&&-1===a.indexOf(r);){if(!isFinite(r))return r;if(!(i=t[r]))return!1;if(i.visible)return r;a.push(r),r=i.fill}return!1}(d,h,u),r.boundary=oi(r),r.mapper=(s=void 0,o=(a=r).fill,!(s="dataset")===o?null:(isFinite(o)||(s="boundary"),ai[s](a))))},beforeDatasetsDraw:function(t){for(var e,n,i,r,a,o,s=t._getSortedVisibleDatasetMetas(),l=t.ctx,u=s.length-1;0<=u;--u)(e=s[u].$filler)&&e.visible&&(i=(n=e.el)._view,r=n._children||[],a=e.mapper,o=i.backgroundColor||Y.global.defaultColor,a&&o&&r.length&&(B.canvas.clipArea(l,t.chartArea),function(t,e,n,i,r,a){var o,s,l,u,d,h,c,f,g=e.length,m=i.spanGaps,p=[],v=[],y=0,b=0;for(t.beginPath(),o=0,s=g;o<s;++o)d=n(u=e[l=o%g]._view,l,i),h=si(u),c=si(d),a&&void 0===f&&h&&(s=g+(f=o+1)),h&&c?(y=p.push(u),b=v.push(d)):y&&b&&(m?(h&&p.push(u),c&&v.push(d)):(li(t,p,v,y,b),y=b=0,p=[],v=[]));li(t,p,v,y,b),t.closePath(),t.fillStyle=r,t.fill()}(l,r,a,i,o,n._loop),B.canvas.unclipArea(l)))}},di=B.rtl.getRtlAdapter,hi=B.noop,ci=B.valueOrDefault;function fi(t,e){return t.usePointStyle&&t.boxWidth>e?e:t.boxWidth}Y._set("global",{legend:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(t,e){var n=e.datasetIndex,i=this.chart,r=i.getDatasetMeta(n);r.hidden=null===r.hidden?!i.data.datasets[n].hidden:null,i.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(n){var i=n.data.datasets,t=n.options.legend||{},r=t.labels&&t.labels.usePointStyle;return n._getSortedDatasetMetas().map(function(t){var e=t.controller.getStyle(r?0:void 0);return{text:i[t.index].label,fillStyle:e.backgroundColor,hidden:!n.isDatasetVisible(t.index),lineCap:e.borderCapStyle,lineDash:e.borderDash,lineDashOffset:e.borderDashOffset,lineJoin:e.borderJoinStyle,lineWidth:e.borderWidth,strokeStyle:e.borderColor,pointStyle:e.pointStyle,rotation:e.rotation,datasetIndex:t.index}},this)}}},legendCallback:function(t){var e,n,i,r=document.createElement("ul"),a=t.data.datasets;for(r.setAttribute("class",t.id+"-legend"),e=0,n=a.length;e<n;e++)(i=r.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=a[e].backgroundColor,a[e].label&&i.appendChild(document.createTextNode(a[e].label));return r.outerHTML}});var gi=$.extend({initialize:function(t){B.extend(this,t),this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1},beforeUpdate:hi,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:hi,beforeSetDimensions:hi,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:hi,beforeBuildLabels:hi,buildLabels:function(){var e=this,n=e.options.labels||{},t=B.callback(n.generateLabels,[e.chart],e)||[];n.filter&&(t=t.filter(function(t){return n.filter(t,e.chart.data)})),e.options.reverse&&t.reverse(),e.legendItems=t},afterBuildLabels:hi,beforeFit:hi,fit:function(){var i,r,a,o,s,l,u,d,t=this,e=t.options,h=e.labels,n=e.display,c=t.ctx,f=B.options._parseFont(h),g=f.size,m=t.legendHitBoxes=[],p=t.minSize,v=t.isHorizontal();v?(p.width=t.maxWidth,p.height=n?10:0):(p.width=n?10:0,p.height=t.maxHeight),n?(c.font=f.string,v?(i=t.lineWidths=[0],r=0,c.textAlign="left",c.textBaseline="middle",B.each(t.legendItems,function(t,e){var n=fi(h,g)+g/2+c.measureText(t.text).width;(0===e||i[i.length-1]+n+2*h.padding>p.width)&&(r+=g+h.padding,i[i.length-(0<e?0:1)]=0),m[e]={left:0,top:0,width:n,height:g},i[i.length-1]+=n+h.padding}),p.height+=r):(a=h.padding,o=t.columnWidths=[],s=t.columnHeights=[],l=h.padding,d=u=0,B.each(t.legendItems,function(t,e){var n=fi(h,g)+g/2+c.measureText(t.text).width;0<e&&d+g+2*a>p.height&&(l+=u+h.padding,o.push(u),s.push(d),d=u=0),u=Math.max(u,n),d+=g+a,m[e]={left:0,top:0,width:n,height:g}}),l+=u,o.push(u),s.push(d),p.width+=l),t.width=p.width,t.height=p.height):t.width=p.width=t.height=p.height=0},afterFit:hi,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var _,w,t,e,k,M,S,D,C,P,T,O=this,n=O.options,A=n.labels,i=Y.global,F=i.defaultColor,I=i.elements.line,L=O.height,R=O.columnHeights,N=O.width,W=O.lineWidths;n.display&&(_=di(n.rtl,O.left,O.minSize.width),w=O.ctx,t=ci(A.fontColor,i.defaultFontColor),e=B.options._parseFont(A),k=e.size,w.textAlign=_.textAlign("left"),w.textBaseline="middle",w.lineWidth=.5,w.strokeStyle=t,w.fillStyle=t,w.font=e.string,M=fi(A,k),S=O.legendHitBoxes,D=function(t,e){switch(n.align){case"start":return A.padding;case"end":return t-e;default:return(t-e+A.padding)/2}},C=O.isHorizontal(),P=C?{x:O.left+D(N,W[0]),y:O.top+A.padding,line:0}:{x:O.left+A.padding,y:O.top+D(L,R[0]),line:0},B.rtl.overrideTextDirection(O.ctx,n.textDirection),T=k+A.padding,B.each(O.legendItems,function(t,e){var n=w.measureText(t.text).width,i=M+k/2+n,r=P.x,a=P.y;_.setWidth(O.minSize.width),C?0<e&&r+i+A.padding>O.left+O.minSize.width&&(a=P.y+=T,P.line++,r=P.x=O.left+D(N,W[P.line])):0<e&&a+T>O.top+O.minSize.height&&(r=P.x=r+O.columnWidths[P.line]+A.padding,P.line++,a=P.y=O.top+D(L,R[P.line]));var o,s,l,u,d,h,c,f,g,m,p,v,y,b,x=_.x(r);o=x,s=a,l=t,isNaN(M)||M<=0||(w.save(),u=ci(l.lineWidth,I.borderWidth),w.fillStyle=ci(l.fillStyle,F),w.lineCap=ci(l.lineCap,I.borderCapStyle),w.lineDashOffset=ci(l.lineDashOffset,I.borderDashOffset),w.lineJoin=ci(l.lineJoin,I.borderJoinStyle),w.lineWidth=u,w.strokeStyle=ci(l.strokeStyle,F),w.setLineDash&&w.setLineDash(ci(l.lineDash,I.borderDash)),A&&A.usePointStyle?(d=M*Math.SQRT2/2,h=_.xPlus(o,M/2),c=s+k/2,B.canvas.drawPoint(w,l.pointStyle,d,h,c,l.rotation)):(w.fillRect(_.leftForLtr(o,M),s,M,k),0!==u&&w.strokeRect(_.leftForLtr(o,M),s,M,k)),w.restore()),S[e].left=_.leftForLtr(x,S[e].width),S[e].top=a,f=x,g=a,m=t,p=n,v=k/2,y=_.xPlus(f,M+v),b=g+v,w.fillText(m.text,y,b),m.hidden&&(w.beginPath(),w.lineWidth=2,w.moveTo(y,b),w.lineTo(_.xPlus(y,p),b),w.stroke()),C?P.x+=i+A.padding:P.y+=T}),B.rtl.restoreTextDirection(O.ctx,n.textDirection))},_getLegendItemAt:function(t,e){var n,i,r;if(t>=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom)for(r=this.legendHitBoxes,n=0;n<r.length;++n)if(t>=(i=r[n]).left&&t<=i.left+i.width&&e>=i.top&&e<=i.top+i.height)return this.legendItems[n];return null},handleEvent:function(t){var e,n=this.options,i="mouseup"===t.type?"click":t.type;if("mousemove"===i){if(!n.onHover&&!n.onLeave)return}else{if("click"!==i)return;if(!n.onClick)return}e=this._getLegendItemAt(t.x,t.y),"click"===i?e&&n.onClick&&n.onClick.call(this,t.native,e):(n.onLeave&&e!==this._hoveredItem&&(this._hoveredItem&&n.onLeave.call(this,t.native,this._hoveredItem),this._hoveredItem=e),n.onHover&&e&&n.onHover.call(this,t.native,e))}});function mi(t,e){var n=new gi({ctx:t.ctx,options:e,chart:t});he.configure(t,n,e),he.addBox(t,n),t.legend=n}var pi={id:"legend",_element:gi,beforeInit:function(t){var e=t.options.legend;e&&mi(t,e)},beforeUpdate:function(t){var e=t.options.legend,n=t.legend;e?(B.mergeIf(e,Y.global.legend),n?(he.configure(t,n,e),n.options=e):mi(t,e)):n&&(he.removeBox(t,n),delete t.legend)},afterEvent:function(t,e){var n=t.legend;n&&n.handleEvent(e)}},vi=B.noop;Y._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var yi=$.extend({initialize:function(t){B.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:vi,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:vi,beforeSetDimensions:vi,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:vi,beforeBuildLabels:vi,buildLabels:vi,afterBuildLabels:vi,beforeFit:vi,fit:function(){var t,e=this.options,n=this.minSize={},i=this.isHorizontal();e.display?(t=(B.isArray(e.text)?e.text.length:1)*B.options._parseFont(e).lineHeight+2*e.padding,this.width=n.width=i?this.maxWidth:t,this.height=n.height=i?t:this.maxHeight):this.width=n.width=this.height=n.height=0},afterFit:vi,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this.ctx,e=this.options;if(e.display){var n,i,r,a=B.options._parseFont(e),o=a.lineHeight,s=o/2+e.padding,l=0,u=this.top,d=this.left,h=this.bottom,c=this.right;t.fillStyle=B.valueOrDefault(e.fontColor,Y.global.defaultFontColor),t.font=a.string,this.isHorizontal()?(i=d+(c-d)/2,r=u+s,n=c-d):(i="left"===e.position?d+s:c-s,r=u+(h-u)/2,n=h-u,l=Math.PI*("left"===e.position?-.5:.5)),t.save(),t.translate(i,r),t.rotate(l),t.textAlign="center",t.textBaseline="middle";var f=e.text;if(B.isArray(f))for(var g=0,m=0;m<f.length;++m)t.fillText(f[m],0,g,n),g+=o;else t.fillText(f,0,0,n);t.restore()}}});function bi(t,e){var n=new yi({ctx:t.ctx,options:e,chart:t});he.configure(t,n,e),he.addBox(t,n),t.titleBlock=n}var xi={},_i=ui,wi=pi,ki={id:"title",_element:yi,beforeInit:function(t){var e=t.options.title;e&&bi(t,e)},beforeUpdate:function(t){var e=t.options.title,n=t.titleBlock;e?(B.mergeIf(e,Y.global.title),n?(he.configure(t,n,e),n.options=e):bi(t,e)):n&&(he.removeBox(t,n),delete t.titleBlock)}};function Mi(t,e,n){var i;return"string"==typeof t?(i=parseInt(t,10),-1!==t.indexOf("%")&&(i=i/100*e.parentNode[n])):i=t,i}function Si(t){return null!=t&&"none"!==t}function Di(t,e,n){var i=document.defaultView,r=B._getParentNode(t),a=i.getComputedStyle(t)[e],o=i.getComputedStyle(r)[e],s=Si(a),l=Si(o),u=Number.POSITIVE_INFINITY;return s||l?Math.min(s?Mi(a,t,n):u,l?Mi(o,r,n):u):"none"}for(var Ci in xi.filler=_i,xi.legend=wi,xi.title=ki,(Xe.helpers=B).where=function(t,e){if(B.isArray(t)&&Array.prototype.filter)return t.filter(e);var n=[];return B.each(t,function(t){e(t)&&n.push(t)}),n},B.findIndex=Array.prototype.findIndex?function(t,e,n){return t.findIndex(e,n)}:function(t,e,n){n=void 0===n?t:n;for(var i=0,r=t.length;i<r;++i)if(e.call(n,t[i],i,t))return i;return-1},B.findNextWhere=function(t,e,n){B.isNullOrUndef(n)&&(n=-1);for(var i=n+1;i<t.length;i++){var r=t[i];if(e(r))return r}},B.findPreviousWhere=function(t,e,n){B.isNullOrUndef(n)&&(n=t.length);for(var i=n-1;0<=i;i--){var r=t[i];if(e(r))return r}},B.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},B.almostEquals=function(t,e,n){return Math.abs(t-e)<n},B.almostWhole=function(t,e){var n=Math.round(t);return n-e<=t&&t<=n+e},B.max=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.max(t,e)},Number.NEGATIVE_INFINITY)},B.min=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.min(t,e)},Number.POSITIVE_INFINITY)},B.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0===(t=+t)||isNaN(t)?t:0<t?1:-1},B.toRadians=function(t){return t*(Math.PI/180)},B.toDegrees=function(t){return t*(180/Math.PI)},B._decimalPlaces=function(t){if(B.isFinite(t)){for(var e=1,n=0;Math.round(t*e)/e!==t;)e*=10,n++;return n}},B.getAngleFromPoint=function(t,e){var n=e.x-t.x,i=e.y-t.y,r=Math.sqrt(n*n+i*i),a=Math.atan2(i,n);return a<-.5*Math.PI&&(a+=2*Math.PI),{angle:a,distance:r}},B.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},B.aliasPixel=function(t){return t%2==0?0:.5},B._alignPixel=function(t,e,n){var i=t.currentDevicePixelRatio,r=n/2;return Math.round((e-r)*i)/i+r},B.splineCurve=function(t,e,n,i){var r=t.skip?e:t,a=e,o=n.skip?e:n,s=Math.sqrt(Math.pow(a.x-r.x,2)+Math.pow(a.y-r.y,2)),l=Math.sqrt(Math.pow(o.x-a.x,2)+Math.pow(o.y-a.y,2)),u=s/(s+l),d=l/(s+l),h=i*(u=isNaN(u)?0:u),c=i*(d=isNaN(d)?0:d);return{previous:{x:a.x-h*(o.x-r.x),y:a.y-h*(o.y-r.y)},next:{x:a.x+c*(o.x-r.x),y:a.y+c*(o.y-r.y)}}},B.EPSILON=Number.EPSILON||1e-14,B.splineCurveMonotone=function(t){for(var e,n,i,r,a,o,s,l,u,d=(t||[]).map(function(t){return{model:t._model,deltaK:0,mK:0}}),h=d.length,c=0;c<h;++c){(e=d[c]).model.skip||(i=0<c?d[c-1]:null,(r=c<h-1?d[c+1]:null)&&!r.model.skip&&(n=r.model.x-e.model.x,e.deltaK=0!=n?(r.model.y-e.model.y)/n:0),!i||i.model.skip?e.mK=e.deltaK:!r||r.model.skip?e.mK=i.deltaK:this.sign(i.deltaK)!==this.sign(e.deltaK)?e.mK=0:e.mK=(i.deltaK+e.deltaK)/2)}for(c=0;c<h-1;++c)e=d[c],r=d[c+1],e.model.skip||r.model.skip||(B.almostEquals(e.deltaK,0,this.EPSILON)?e.mK=r.mK=0:(a=e.mK/e.deltaK,o=r.mK/e.deltaK,(l=Math.pow(a,2)+Math.pow(o,2))<=9||(s=3/Math.sqrt(l),e.mK=a*s*e.deltaK,r.mK=o*s*e.deltaK)));for(c=0;c<h;++c)(e=d[c]).model.skip||(i=0<c?d[c-1]:null,r=c<h-1?d[c+1]:null,i&&!i.model.skip&&(u=(e.model.x-i.model.x)/3,e.model.controlPointPreviousX=e.model.x-u,e.model.controlPointPreviousY=e.model.y-u*e.mK),r&&!r.model.skip&&(u=(r.model.x-e.model.x)/3,e.model.controlPointNextX=e.model.x+u,e.model.controlPointNextY=e.model.y+u*e.mK))},B.nextItem=function(t,e,n){return n?e>=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},B.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},B.niceNum=function(t,e){var n=Math.floor(B.log10(t)),i=t/Math.pow(10,n),r=e?i<1.5?1:i<3?2:i<7?5:10:i<=1?1:i<=2?2:i<=5?5:10;return r*Math.pow(10,n)},B.requestAnimFrame="undefined"==typeof window?function(t){t()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},B.getRelativePosition=function(t,e){var n=t.originalEvent||t,i=t.target||t.srcElement,r=i.getBoundingClientRect(),a=n.touches,o=a&&0<a.length?(f=a[0].clientX,a[0].clientY):(f=n.clientX,n.clientY),s=parseFloat(B.getStyle(i,"padding-left")),l=parseFloat(B.getStyle(i,"padding-top")),u=parseFloat(B.getStyle(i,"padding-right")),d=parseFloat(B.getStyle(i,"padding-bottom")),h=r.right-r.left-s-u,c=r.bottom-r.top-l-d,f=Math.round((f-r.left-s)/h*i.width/e.currentDevicePixelRatio);return{x:f,y:o=Math.round((o-r.top-l)/c*i.height/e.currentDevicePixelRatio)}},B.getConstraintWidth=function(t){return Di(t,"max-width","clientWidth")},B.getConstraintHeight=function(t){return Di(t,"max-height","clientHeight")},B._calculatePadding=function(t,e,n){return-1<(e=B.getStyle(t,e)).indexOf("%")?n*parseInt(e,10)/100:parseInt(e,10)},B._getParentNode=function(t){var e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e},B.getMaximumWidth=function(t){var e=B._getParentNode(t);if(!e)return t.clientWidth;var n=e.clientWidth,i=n-B._calculatePadding(e,"padding-left",n)-B._calculatePadding(e,"padding-right",n),r=B.getConstraintWidth(t);return isNaN(r)?i:Math.min(i,r)},B.getMaximumHeight=function(t){var e=B._getParentNode(t);if(!e)return t.clientHeight;var n=e.clientHeight,i=n-B._calculatePadding(e,"padding-top",n)-B._calculatePadding(e,"padding-bottom",n),r=B.getConstraintHeight(t);return isNaN(r)?i:Math.min(i,r)},B.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},B.retinaScale=function(t,e){var n,i,r,a=t.currentDevicePixelRatio=e||"undefined"!=typeof window&&window.devicePixelRatio||1;1!==a&&(n=t.canvas,i=t.height,r=t.width,n.height=i*a,n.width=r*a,t.ctx.scale(a,a),n.style.height||n.style.width||(n.style.height=i+"px",n.style.width=r+"px"))},B.fontString=function(t,e,n){return e+" "+t+"px "+n},B.longestText=function(t,e,n,i){var r=(i=i||{}).data=i.data||{},a=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(r=i.data={},a=i.garbageCollect=[],i.font=e),t.font=e;for(var o,s,l,u,d=0,h=n.length,c=0;c<h;c++)if(null!=(l=n[c])&&!0!==B.isArray(l))d=B.measureText(t,r,a,d,l);else if(B.isArray(l))for(o=0,s=l.length;o<s;o++)null==(u=l[o])||B.isArray(u)||(d=B.measureText(t,r,a,d,u));var f=a.length/2;if(f>n.length){for(c=0;c<f;c++)delete r[a[c]];a.splice(0,f)}return d},B.measureText=function(t,e,n,i,r){var a=e[r];return a||(a=e[r]=t.measureText(r).width,n.push(r)),i<a&&(i=a),i},B.numberOfLabelLines=function(t){var e=1;return B.each(t,function(t){B.isArray(t)&&t.length>e&&(e=t.length)}),e},B.color=w?function(t){return t instanceof CanvasGradient&&(t=Y.global.defaultColor),w(t)}:function(t){return console.error("Color.js not found!"),t},B.getHoverColor=function(t){return t instanceof CanvasPattern||t instanceof CanvasGradient?t:B.color(t).saturate(.5).darken(.1).rgbString()},Xe._adapters=Qe,Xe.Animation=K,Xe.animationService=J,Xe.controllers=$t,Xe.DatasetController=it,Xe.defaults=Y,Xe.Element=$,Xe.elements=wt,Xe.Interaction=ne,Xe.layouts=he,Xe.platform=Oe,Xe.plugins=Ae,Xe.Scale=mn,Xe.scaleService=Fe,Xe.Ticks=tn,Xe.Tooltip=He,Xe.helpers.each(ni,function(t,e){Xe.scaleService.registerScaleType(e,t,t._defaults)}),xi)xi.hasOwnProperty(Ci)&&Xe.plugins.register(xi[Ci]);Xe.platform.initialize();var Pi=Xe;return"undefined"!=typeof window&&(window.Chart=Xe),(Xe.Chart=Xe).Legend=xi.legend._element,Xe.Title=xi.title._element,Xe.pluginService=Xe.plugins,Xe.PluginBase=Xe.Element.extend({}),Xe.canvasHelpers=Xe.helpers.canvas,Xe.layoutService=Xe.layouts,Xe.LinearScaleBase=_n,Xe.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],function(n){Xe[n]=function(t,e){return new Xe(t,Xe.helpers.merge(e||{},{type:n.charAt(0).toLowerCase()+n.slice(1)}))}}),Pi});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/js/chartjs/chart.min.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* Chart.js v3.4.1
|
3 |
+
* https://www.chartjs.org
|
4 |
+
* (c) 2021 Chart.js Contributors
|
5 |
+
* Released under the MIT License
|
6 |
+
*/
|
7 |
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).Chart=e()}(this,(function(){"use strict";const t="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function e(e,i,n){const o=n||(t=>Array.prototype.slice.call(t));let s=!1,a=[];return function(...n){a=o(n),s||(s=!0,t.call(window,(()=>{s=!1,e.apply(i,a)})))}}function i(t,e){let i;return function(){return e?(clearTimeout(i),i=setTimeout(t,e)):t(),e}}const n=t=>"start"===t?"left":"end"===t?"right":"center",o=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2,s=(t,e,i,n)=>t===(n?"left":"right")?i:"center"===t?(e+i)/2:e;var a=new class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,n){const o=e.listeners[n],s=e.duration;o.forEach((n=>n({chart:t,initial:e.initial,numSteps:s,currentStep:Math.min(i-e.start,s)})))}_refresh(){const e=this;e._request||(e._running=!0,e._request=t.call(window,(()=>{e._update(),e._request=null,e._running&&e._refresh()})))}_update(t=Date.now()){const e=this;let i=0;e._charts.forEach(((n,o)=>{if(!n.running||!n.items.length)return;const s=n.items;let a,r=s.length-1,l=!1;for(;r>=0;--r)a=s[r],a._active?(a._total>n.duration&&(n.duration=a._total),a.tick(t),l=!0):(s[r]=s[s.length-1],s.pop());l&&(o.draw(),e._notify(o,n,t,"progress")),s.length||(n.running=!1,e._notify(o,n,t,"complete"),n.initial=!1),i+=s.length})),e._lastDate=t,0===i&&(e._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)}};
|
8 |
+
/*!
|
9 |
+
* @kurkle/color v0.1.9
|
10 |
+
* https://github.com/kurkle/color#readme
|
11 |
+
* (c) 2020 Jukka Kurkela
|
12 |
+
* Released under the MIT License
|
13 |
+
*/const r={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},l="0123456789ABCDEF",c=t=>l[15&t],h=t=>l[(240&t)>>4]+l[15&t],d=t=>(240&t)>>4==(15&t);function u(t){var e=function(t){return d(t.r)&&d(t.g)&&d(t.b)&&d(t.a)}(t)?c:h;return t?"#"+e(t.r)+e(t.g)+e(t.b)+(t.a<255?e(t.a):""):t}function f(t){return t+.5|0}const g=(t,e,i)=>Math.max(Math.min(t,i),e);function p(t){return g(f(2.55*t),0,255)}function m(t){return g(f(255*t),0,255)}function x(t){return g(f(t/2.55)/100,0,1)}function b(t){return g(f(100*t),0,100)}const _=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const y=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function v(t,e,i){const n=e*Math.min(i,1-i),o=(e,o=(e+t/30)%12)=>i-n*Math.max(Math.min(o-3,9-o,1),-1);return[o(0),o(8),o(4)]}function w(t,e,i){const n=(n,o=(n+t/60)%6)=>i-i*e*Math.max(Math.min(o,4-o,1),0);return[n(5),n(3),n(1)]}function M(t,e,i){const n=v(t,1,.5);let o;for(e+i>1&&(o=1/(e+i),e*=o,i*=o),o=0;o<3;o++)n[o]*=1-e-i,n[o]+=e;return n}function k(t){const e=t.r/255,i=t.g/255,n=t.b/255,o=Math.max(e,i,n),s=Math.min(e,i,n),a=(o+s)/2;let r,l,c;return o!==s&&(c=o-s,l=a>.5?c/(2-o-s):c/(o+s),r=o===e?(i-n)/c+(i<n?6:0):o===i?(n-e)/c+2:(e-i)/c+4,r=60*r+.5),[0|r,l||0,a]}function S(t,e,i,n){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,i,n)).map(m)}function P(t,e,i){return S(v,t,e,i)}function D(t){return(t%360+360)%360}function C(t){const e=y.exec(t);let i,n=255;if(!e)return;e[5]!==i&&(n=e[6]?p(+e[5]):m(+e[5]));const o=D(+e[2]),s=+e[3]/100,a=+e[4]/100;return i="hwb"===e[1]?function(t,e,i){return S(M,t,e,i)}(o,s,a):"hsv"===e[1]?function(t,e,i){return S(w,t,e,i)}(o,s,a):P(o,s,a),{r:i[0],g:i[1],b:i[2],a:n}}const O={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"},T={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"};let A;function L(t){A||(A=function(){const t={},e=Object.keys(T),i=Object.keys(O);let n,o,s,a,r;for(n=0;n<e.length;n++){for(a=r=e[n],o=0;o<i.length;o++)s=i[o],r=r.replace(s,O[s]);s=parseInt(T[a],16),t[r]=[s>>16&255,s>>8&255,255&s]}return t}(),A.transparent=[0,0,0,0]);const e=A[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}function R(t,e,i){if(t){let n=k(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*i,0===e?360:1)),n=P(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function E(t,e){return t?Object.assign(e||{},t):t}function z(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=m(t[3]))):(e=E(t,{r:0,g:0,b:0,a:1})).a=m(e.a),e}function I(t){return"r"===t.charAt(0)?function(t){const e=_.exec(t);let i,n,o,s=255;if(e){if(e[7]!==i){const t=+e[7];s=255&(e[8]?p(t):255*t)}return i=+e[1],n=+e[3],o=+e[5],i=255&(e[2]?p(i):i),n=255&(e[4]?p(n):n),o=255&(e[6]?p(o):o),{r:i,g:n,b:o,a:s}}}(t):C(t)}class F{constructor(t){if(t instanceof F)return t;const e=typeof t;let i;var n,o,s;"object"===e?i=z(t):"string"===e&&(s=(n=t).length,"#"===n[0]&&(4===s||5===s?o={r:255&17*r[n[1]],g:255&17*r[n[2]],b:255&17*r[n[3]],a:5===s?17*r[n[4]]:255}:7!==s&&9!==s||(o={r:r[n[1]]<<4|r[n[2]],g:r[n[3]]<<4|r[n[4]],b:r[n[5]]<<4|r[n[6]],a:9===s?r[n[7]]<<4|r[n[8]]:255})),i=o||L(t)||I(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=E(this._rgb);return t&&(t.a=x(t.a)),t}set rgb(t){this._rgb=z(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${x(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):this._rgb;var t}hexString(){return this._valid?u(this._rgb):this._rgb}hslString(){return this._valid?function(t){if(!t)return;const e=k(t),i=e[0],n=b(e[1]),o=b(e[2]);return t.a<255?`hsla(${i}, ${n}%, ${o}%, ${x(t.a)})`:`hsl(${i}, ${n}%, ${o}%)`}(this._rgb):this._rgb}mix(t,e){const i=this;if(t){const n=i.rgb,o=t.rgb;let s;const a=e===s?.5:e,r=2*a-1,l=n.a-o.a,c=((r*l==-1?r:(r+l)/(1+r*l))+1)/2;s=1-c,n.r=255&c*n.r+s*o.r+.5,n.g=255&c*n.g+s*o.g+.5,n.b=255&c*n.b+s*o.b+.5,n.a=a*n.a+(1-a)*o.a,i.rgb=n}return i}clone(){return new F(this.rgb)}alpha(t){return this._rgb.a=m(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=f(.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 R(this._rgb,2,t),this}darken(t){return R(this._rgb,2,-t),this}saturate(t){return R(this._rgb,1,t),this}desaturate(t){return R(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=k(t);i[0]=D(i[0]+e),i=P(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function B(t){return new F(t)}const V=t=>t instanceof CanvasGradient||t instanceof CanvasPattern;function W(t){return V(t)?t:B(t)}function N(t){return V(t)?t:B(t).saturate(.5).darken(.1).hexString()}function H(){}const j=function(){let t=0;return function(){return t++}}();function $(t){return null==t}function Y(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 X=t=>("number"==typeof t||t instanceof Number)&&isFinite(+t);function q(t,e){return X(t)?t:e}function K(t,e){return void 0===t?e:t}const G=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100:t/e,Z=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function Q(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function J(t,e,i,n){let o,s,a;if(Y(t))if(s=t.length,n)for(o=s-1;o>=0;o--)e.call(i,t[o],o);else for(o=0;o<s;o++)e.call(i,t[o],o);else if(U(t))for(a=Object.keys(t),s=a.length,o=0;o<s;o++)e.call(i,t[a[o]],a[o])}function tt(t,e){let i,n,o,s;if(!t||!e||t.length!==e.length)return!1;for(i=0,n=t.length;i<n;++i)if(o=t[i],s=e[i],o.datasetIndex!==s.datasetIndex||o.index!==s.index)return!1;return!0}function et(t){if(Y(t))return t.map(et);if(U(t)){const e=Object.create(null),i=Object.keys(t),n=i.length;let o=0;for(;o<n;++o)e[i[o]]=et(t[i[o]]);return e}return t}function it(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function nt(t,e,i,n){if(!it(t))return;const o=e[t],s=i[t];U(o)&&U(s)?ot(o,s,n):e[t]=et(s)}function ot(t,e,i){const n=Y(e)?e:[e],o=n.length;if(!U(t))return t;const s=(i=i||{}).merger||nt;for(let a=0;a<o;++a){if(!U(e=n[a]))continue;const o=Object.keys(e);for(let n=0,a=o.length;n<a;++n)s(o[n],t,e,i)}return t}function st(t,e){return ot(t,e,{merger:at})}function at(t,e,i){if(!it(t))return;const n=e[t],o=i[t];U(n)&&U(o)?st(n,o):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=et(o))}function rt(t,e){const i=t.indexOf(".",e);return-1===i?t.length:i}function lt(t,e){if(""===e)return t;let i=0,n=rt(e,i);for(;t&&n>i;)t=t[e.substr(i,n-i)],i=n+1,n=rt(e,i);return t}function ct(t){return t.charAt(0).toUpperCase()+t.slice(1)}const ht=t=>void 0!==t,dt=t=>"function"==typeof t,ut=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0},ft=Object.create(null),gt=Object.create(null);function pt(t,e){if(!e)return t;const i=e.split(".");for(let e=0,n=i.length;e<n;++e){const n=i[e];t=t[n]||(t[n]=Object.create(null))}return t}function mt(t,e,i){return"string"==typeof e?ot(pt(t,e),i):ot(pt(t,""),e)}var xt=new class{constructor(t){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=t=>t.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)=>N(e.backgroundColor),this.hoverBorderColor=(t,e)=>N(e.borderColor),this.hoverColor=(t,e)=>N(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 mt(this,t,e)}get(t){return pt(this,t)}describe(t,e){return mt(gt,t,e)}override(t,e){return mt(ft,t,e)}route(t,e,i,n){const o=pt(this,t),s=pt(this,i),a="_"+e;Object.defineProperties(o,{[a]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[a],e=s[n];return U(t)?Object.assign({},e,t):K(t,e)},set(t){this[a]=t}}})}}({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});const bt=Math.PI,_t=2*bt,yt=_t+bt,vt=Number.POSITIVE_INFINITY,wt=bt/180,Mt=bt/2,kt=bt/4,St=2*bt/3,Pt=Math.log10,Dt=Math.sign;function Ct(t){const e=Math.round(t);t=At(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(Pt(t))),n=t/i;return(n<=1?1:n<=2?2:n<=5?5:10)*i}function Ot(t){const e=[],i=Math.sqrt(t);let n;for(n=1;n<i;n++)t%n==0&&(e.push(n),e.push(t/n));return i===(0|i)&&e.push(i),e.sort(((t,e)=>t-e)).pop(),e}function Tt(t){return!isNaN(parseFloat(t))&&isFinite(t)}function At(t,e,i){return Math.abs(t-e)<i}function Lt(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}function Rt(t,e,i){let n,o,s;for(n=0,o=t.length;n<o;n++)s=t[n][i],isNaN(s)||(e.min=Math.min(e.min,s),e.max=Math.max(e.max,s))}function Et(t){return t*(bt/180)}function zt(t){return t*(180/bt)}function It(t){if(!X(t))return;let e=1,i=0;for(;Math.round(t*e)/e!==t;)e*=10,i++;return i}function Ft(t,e){const i=e.x-t.x,n=e.y-t.y,o=Math.sqrt(i*i+n*n);let s=Math.atan2(n,i);return s<-.5*bt&&(s+=_t),{angle:s,distance:o}}function Bt(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Vt(t,e){return(t-e+yt)%_t-bt}function Wt(t){return(t%_t+_t)%_t}function Nt(t,e,i,n){const o=Wt(t),s=Wt(e),a=Wt(i),r=Wt(s-o),l=Wt(a-o),c=Wt(o-s),h=Wt(o-a);return o===s||o===a||n&&s===a||r>l&&c<h}function Ht(t,e,i){return Math.max(e,Math.min(i,t))}function jt(t){return Ht(t,-32768,32767)}function $t(t){return!t||$(t.size)||$(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function Yt(t,e,i,n,o){let s=e[o];return s||(s=e[o]=t.measureText(o).width,i.push(o)),s>n&&(n=s),n}function Ut(t,e,i,n){let o=(n=n||{}).data=n.data||{},s=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(o=n.data={},s=n.garbageCollect=[],n.font=e),t.save(),t.font=e;let a=0;const r=i.length;let l,c,h,d,u;for(l=0;l<r;l++)if(d=i[l],null!=d&&!0!==Y(d))a=Yt(t,o,s,a,d);else if(Y(d))for(c=0,h=d.length;c<h;c++)u=d[c],null==u||Y(u)||(a=Yt(t,o,s,a,u));t.restore();const f=s.length/2;if(f>i.length){for(l=0;l<f;l++)delete o[s[l]];s.splice(0,f)}return a}function Xt(t,e,i){const n=t.currentDevicePixelRatio,o=0!==i?Math.max(i/2,.5):0;return Math.round((e-o)*n)/n+o}function qt(t,e){(e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore()}function Kt(t,e,i,n){let o,s,a,r,l;const c=e.pointStyle,h=e.rotation,d=e.radius;let u=(h||0)*wt;if(c&&"object"==typeof c&&(o=c.toString(),"[object HTMLImageElement]"===o||"[object HTMLCanvasElement]"===o))return t.save(),t.translate(i,n),t.rotate(u),t.drawImage(c,-c.width/2,-c.height/2,c.width,c.height),void t.restore();if(!(isNaN(d)||d<=0)){switch(t.beginPath(),c){default:t.arc(i,n,d,0,_t),t.closePath();break;case"triangle":t.moveTo(i+Math.sin(u)*d,n-Math.cos(u)*d),u+=St,t.lineTo(i+Math.sin(u)*d,n-Math.cos(u)*d),u+=St,t.lineTo(i+Math.sin(u)*d,n-Math.cos(u)*d),t.closePath();break;case"rectRounded":l=.516*d,r=d-l,s=Math.cos(u+kt)*r,a=Math.sin(u+kt)*r,t.arc(i-s,n-a,l,u-bt,u-Mt),t.arc(i+a,n-s,l,u-Mt,u),t.arc(i+s,n+a,l,u,u+Mt),t.arc(i-a,n+s,l,u+Mt,u+bt),t.closePath();break;case"rect":if(!h){r=Math.SQRT1_2*d,t.rect(i-r,n-r,2*r,2*r);break}u+=kt;case"rectRot":s=Math.cos(u)*d,a=Math.sin(u)*d,t.moveTo(i-s,n-a),t.lineTo(i+a,n-s),t.lineTo(i+s,n+a),t.lineTo(i-a,n+s),t.closePath();break;case"crossRot":u+=kt;case"cross":s=Math.cos(u)*d,a=Math.sin(u)*d,t.moveTo(i-s,n-a),t.lineTo(i+s,n+a),t.moveTo(i+a,n-s),t.lineTo(i-a,n+s);break;case"star":s=Math.cos(u)*d,a=Math.sin(u)*d,t.moveTo(i-s,n-a),t.lineTo(i+s,n+a),t.moveTo(i+a,n-s),t.lineTo(i-a,n+s),u+=kt,s=Math.cos(u)*d,a=Math.sin(u)*d,t.moveTo(i-s,n-a),t.lineTo(i+s,n+a),t.moveTo(i+a,n-s),t.lineTo(i-a,n+s);break;case"line":s=Math.cos(u)*d,a=Math.sin(u)*d,t.moveTo(i-s,n-a),t.lineTo(i+s,n+a);break;case"dash":t.moveTo(i,n),t.lineTo(i+Math.cos(u)*d,n+Math.sin(u)*d)}t.fill(),e.borderWidth>0&&t.stroke()}}function Gt(t,e,i){return i=i||.5,t&&t.x>e.left-i&&t.x<e.right+i&&t.y>e.top-i&&t.y<e.bottom+i}function Zt(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function Qt(t){t.restore()}function Jt(t,e,i,n,o){if(!e)return t.lineTo(i.x,i.y);if("middle"===o){const n=(e.x+i.x)/2;t.lineTo(n,e.y),t.lineTo(n,i.y)}else"after"===o!=!!n?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y);t.lineTo(i.x,i.y)}function te(t,e,i,n){if(!e)return t.lineTo(i.x,i.y);t.bezierCurveTo(n?e.cp1x:e.cp2x,n?e.cp1y:e.cp2y,n?i.cp2x:i.cp1x,n?i.cp2y:i.cp1y,i.x,i.y)}function ee(t,e,i,n,o,s={}){const a=Y(e)?e:[e],r=s.strokeWidth>0&&""!==s.strokeColor;let l,c;for(t.save(),t.font=o.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]);$(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,s),l=0;l<a.length;++l)c=a[l],r&&(s.strokeColor&&(t.strokeStyle=s.strokeColor),$(s.strokeWidth)||(t.lineWidth=s.strokeWidth),t.strokeText(c,i,n,s.maxWidth)),t.fillText(c,i,n,s.maxWidth),ie(t,i,n,c,s),n+=o.lineHeight;t.restore()}function ie(t,e,i,n,o){if(o.strikethrough||o.underline){const s=t.measureText(n),a=e-s.actualBoundingBoxLeft,r=e+s.actualBoundingBoxRight,l=i-s.actualBoundingBoxAscent,c=i+s.actualBoundingBoxDescent,h=o.strikethrough?(l+c)/2:c;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=o.decorationWidth||2,t.moveTo(a,h),t.lineTo(r,h),t.stroke()}}function ne(t,e){const{x:i,y:n,w:o,h:s,radius:a}=e;t.arc(i+a.topLeft,n+a.topLeft,a.topLeft,-Mt,bt,!0),t.lineTo(i,n+s-a.bottomLeft),t.arc(i+a.bottomLeft,n+s-a.bottomLeft,a.bottomLeft,bt,Mt,!0),t.lineTo(i+o-a.bottomRight,n+s),t.arc(i+o-a.bottomRight,n+s-a.bottomRight,a.bottomRight,Mt,0,!0),t.lineTo(i+o,n+a.topRight),t.arc(i+o-a.topRight,n+a.topRight,a.topRight,0,-Mt,!0),t.lineTo(i+a.topLeft,n)}function oe(t,e,i){i=i||(i=>t[i]<e);let n,o=t.length-1,s=0;for(;o-s>1;)n=s+o>>1,i(n)?s=n:o=n;return{lo:s,hi:o}}const se=(t,e,i)=>oe(t,i,(n=>t[n][e]<i)),ae=(t,e,i)=>oe(t,i,(n=>t[n][e]>=i));function re(t,e,i){let n=0,o=t.length;for(;n<o&&t[n]<e;)n++;for(;o>n&&t[o-1]>i;)o--;return n>0||o<t.length?t.slice(n,o):t}const le=["push","pop","shift","splice","unshift"];function ce(t,e){t._chartjs?t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),le.forEach((e=>{const i="_onData"+ct(e),n=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value(...e){const o=n.apply(this,e);return t._chartjs.listeners.forEach((t=>{"function"==typeof t[i]&&t[i](...e)})),o}})})))}function he(t,e){const i=t._chartjs;if(!i)return;const n=i.listeners,o=n.indexOf(e);-1!==o&&n.splice(o,1),n.length>0||(le.forEach((e=>{delete t[e]})),delete t._chartjs)}function de(t){const e=new Set;let i,n;for(i=0,n=t.length;i<n;++i)e.add(t[i]);return e.size===n?t:Array.from(e)}function ue(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function fe(t,e,i){let n;return"string"==typeof t?(n=parseInt(t,10),-1!==t.indexOf("%")&&(n=n/100*e.parentNode[i])):n=t,n}const ge=t=>window.getComputedStyle(t,null);function pe(t,e){return ge(t).getPropertyValue(e)}const me=["top","right","bottom","left"];function xe(t,e,i){const n={};i=i?"-"+i:"";for(let o=0;o<4;o++){const s=me[o];n[s]=parseFloat(t[e+"-"+s+i])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function be(t,e){const{canvas:i,currentDevicePixelRatio:n}=e,o=ge(i),s="border-box"===o.boxSizing,a=xe(o,"padding"),r=xe(o,"border","width"),{x:l,y:c,box:h}=function(t,e){const i=t.native||t,n=i.touches,o=n&&n.length?n[0]:i,{offsetX:s,offsetY:a}=o;let r,l,c=!1;if(((t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot))(s,a,i.target))r=s,l=a;else{const t=e.getBoundingClientRect();r=o.clientX-t.left,l=o.clientY-t.top,c=!0}return{x:r,y:l,box:c}}(t,i),d=a.left+(h&&r.left),u=a.top+(h&&r.top);let{width:f,height:g}=e;return s&&(f-=a.width+r.width,g-=a.height+r.height),{x:Math.round((l-d)/f*i.width/n),y:Math.round((c-u)/g*i.height/n)}}const _e=t=>Math.round(10*t)/10;function ye(t,e,i,n){const o=ge(t),s=xe(o,"margin"),a=fe(o.maxWidth,t,"clientWidth")||vt,r=fe(o.maxHeight,t,"clientHeight")||vt,l=function(t,e,i){let n,o;if(void 0===e||void 0===i){const s=ue(t);if(s){const t=s.getBoundingClientRect(),a=ge(s),r=xe(a,"border","width"),l=xe(a,"padding");e=t.width-l.width-r.width,i=t.height-l.height-r.height,n=fe(a.maxWidth,s,"clientWidth"),o=fe(a.maxHeight,s,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:n||vt,maxHeight:o||vt}}(t,e,i);let{width:c,height:h}=l;if("content-box"===o.boxSizing){const t=xe(o,"border","width"),e=xe(o,"padding");c-=e.width+t.width,h-=e.height+t.height}return c=Math.max(0,c-s.width),h=Math.max(0,n?Math.floor(c/n):h-s.height),c=_e(Math.min(c,a,l.maxWidth)),h=_e(Math.min(h,r,l.maxHeight)),c&&!h&&(h=_e(c/2)),{width:c,height:h}}function ve(t,e,i){const n=e||1,o=Math.floor(t.height*n),s=Math.floor(t.width*n);t.height=o/n,t.width=s/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!==o||a.width!==s)&&(t.currentDevicePixelRatio=n,a.height=o,a.width=s,t.ctx.setTransform(n,0,0,n,0,0),!0)}const we=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 Me(t,e){const i=pe(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function ke(t,e){return"native"in t?{x:t.x,y:t.y}:be(t,e)}function Se(t,e,i,n){const{controller:o,data:s,_sorted:a}=t,r=o._cachedMeta.iScale;if(r&&e===r.axis&&a&&s.length){const t=r._reversePixels?ae:se;if(!n)return t(s,e,i);if(o._sharedOptions){const n=s[0],o="function"==typeof n.getRange&&n.getRange(e);if(o){const n=t(s,e,i-o),a=t(s,e,i+o);return{lo:n.lo,hi:a.hi}}}}return{lo:0,hi:s.length-1}}function Pe(t,e,i,n,o){const s=t.getSortedVisibleDatasetMetas(),a=i[e];for(let t=0,i=s.length;t<i;++t){const{index:i,data:r}=s[t],{lo:l,hi:c}=Se(s[t],e,a,o);for(let t=l;t<=c;++t){const e=r[t];e.skip||n(e,i,t)}}}function De(t,e,i,n){const o=[];if(!Gt(e,t.chartArea,t._minPadding))return o;return Pe(t,i,e,(function(t,i,s){t.inRange(e.x,e.y,n)&&o.push({element:t,datasetIndex:i,index:s})}),!0),o}function Ce(t,e,i,n,o){const s=function(t){const e=-1!==t.indexOf("x"),i=-1!==t.indexOf("y");return function(t,n){const o=e?Math.abs(t.x-n.x):0,s=i?Math.abs(t.y-n.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(s,2))}}(i);let a=Number.POSITIVE_INFINITY,r=[];if(!Gt(e,t.chartArea,t._minPadding))return r;return Pe(t,i,e,(function(i,l,c){if(n&&!i.inRange(e.x,e.y,o))return;const h=i.getCenterPoint(o);if(!Gt(h,t.chartArea,t._minPadding))return;const d=s(e,h);d<a?(r=[{element:i,datasetIndex:l,index:c}],a=d):d===a&&r.push({element:i,datasetIndex:l,index:c})})),r}function Oe(t,e,i,n){const o=ke(e,t),s=[],a=i.axis,r="x"===a?"inXRange":"inYRange";let l=!1;return function(t,e){const i=t.getSortedVisibleDatasetMetas();let n,o,s;for(let t=0,a=i.length;t<a;++t){({index:n,data:o}=i[t]);for(let t=0,i=o.length;t<i;++t)s=o[t],s.skip||e(s,n,t)}}(t,((t,e,i)=>{t[r](o[a],n)&&s.push({element:t,datasetIndex:e,index:i}),t.inRange(o.x,o.y,n)&&(l=!0)})),i.intersect&&!l?[]:s}var Te={modes:{index(t,e,i,n){const o=ke(e,t),s=i.axis||"x",a=i.intersect?De(t,o,s,n):Ce(t,o,s,!1,n),r=[];return a.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=a[0].index,i=t.data[e];i&&!i.skip&&r.push({element:i,datasetIndex:t.index,index:e})})),r):[]},dataset(t,e,i,n){const o=ke(e,t),s=i.axis||"xy";let a=i.intersect?De(t,o,s,n):Ce(t,o,s,!1,n);if(a.length>0){const e=a[0].datasetIndex,i=t.getDatasetMeta(e).data;a=[];for(let t=0;t<i.length;++t)a.push({element:i[t],datasetIndex:e,index:t})}return a},point:(t,e,i,n)=>De(t,ke(e,t),i.axis||"xy",n),nearest:(t,e,i,n)=>Ce(t,ke(e,t),i.axis||"xy",i.intersect,n),x:(t,e,i,n)=>(i.axis="x",Oe(t,e,i,n)),y:(t,e,i,n)=>(i.axis="y",Oe(t,e,i,n))}};const Ae=new RegExp(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/),Le=new RegExp(/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/);function Re(t,e){const i=(""+t).match(Ae);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t}function Ee(t,e){const i={},n=U(e),o=n?Object.keys(e):e,s=U(t)?n?i=>K(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of o)i[t]=+s(t)||0;return i}function ze(t){return Ee(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Ie(t){return Ee(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Fe(t){const e=ze(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Be(t,e){t=t||{},e=e||xt.font;let i=K(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let n=K(t.style,e.style);n&&!(""+n).match(Le)&&(console.warn('Invalid font style specified: "'+n+'"'),n="");const o={family:K(t.family,e.family),lineHeight:Re(K(t.lineHeight,e.lineHeight),i),size:i,style:n,weight:K(t.weight,e.weight),string:""};return o.string=$t(o),o}function Ve(t,e,i,n){let o,s,a,r=!0;for(o=0,s=t.length;o<s;++o)if(a=t[o],void 0!==a&&(void 0!==e&&"function"==typeof a&&(a=a(e),r=!1),void 0!==i&&Y(a)&&(a=a[i%a.length],r=!1),void 0!==a))return n&&!r&&(n.cacheable=!1),a}function We(t,e){const{min:i,max:n}=t;return{min:i-Math.abs(Z(e,i)),max:n+Z(e,n)}}const Ne=["left","top","right","bottom"];function He(t,e){return t.filter((t=>t.pos===e))}function je(t,e){return t.filter((t=>-1===Ne.indexOf(t.pos)&&t.box.axis===e))}function $e(t,e){return t.sort(((t,i)=>{const n=e?i:t,o=e?t:i;return n.weight===o.weight?n.index-o.index:n.weight-o.weight}))}function Ye(t,e,i,n){return Math.max(t[i],e[i])+Math.max(t[n],e[n])}function Ue(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 Xe(t,e,i){const n=i.box,o=t.maxPadding;U(i.pos)||(i.size&&(t[i.pos]-=i.size),i.size=i.horizontal?n.height:n.width,t[i.pos]+=i.size),n.getPadding&&Ue(o,n.getPadding());const s=Math.max(0,e.outerWidth-Ye(o,t,"left","right")),a=Math.max(0,e.outerHeight-Ye(o,t,"top","bottom")),r=s!==t.w,l=a!==t.h;return t.w=s,t.h=a,i.horizontal?{same:r,other:l}:{same:l,other:r}}function qe(t,e){const i=e.maxPadding;function n(t){const n={left:0,top:0,right:0,bottom:0};return t.forEach((t=>{n[t]=Math.max(e[t],i[t])})),n}return n(t?["left","right"]:["top","bottom"])}function Ke(t,e,i){const n=[];let o,s,a,r,l,c;for(o=0,s=t.length,l=0;o<s;++o){a=t[o],r=a.box,r.update(a.width||e.w,a.height||e.h,qe(a.horizontal,e));const{same:s,other:h}=Xe(e,i,a);l|=s&&n.length,c=c||h,r.fullSize||n.push(a)}return l&&Ke(n,e,i)||c}function Ge(t,e,i){const n=i.padding;let o,s,a,r,l=e.x,c=e.y;for(o=0,s=t.length;o<s;++o)a=t[o],r=a.box,a.horizontal?(r.left=r.fullSize?n.left:e.left,r.right=r.fullSize?i.outerWidth-n.right:e.left+e.w,r.top=c,r.bottom=c+r.height,r.width=r.right-r.left,c=r.bottom):(r.left=l,r.right=l+r.width,r.top=r.fullSize?n.top:e.top,r.bottom=r.fullSize?i.outerHeight-n.bottom:e.top+e.h,r.height=r.bottom-r.top,l=r.right);e.x=l,e.y=c}xt.set("layout",{padding:{top:0,right:0,bottom:0,left:0}});var Ze={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},t.boxes.push(e)},removeBox(t,e){const i=t.boxes?t.boxes.indexOf(e):-1;-1!==i&&t.boxes.splice(i,1)},configure(t,e,i){e.fullSize=i.fullSize,e.position=i.position,e.weight=i.weight},update(t,e,i,n){if(!t)return;const o=Fe(t.options.layout.padding),s=Math.max(e-o.width,0),a=Math.max(i-o.height,0),r=function(t){const e=function(t){const e=[];let i,n,o;for(i=0,n=(t||[]).length;i<n;++i)o=t[i],e.push({index:i,box:o,pos:o.position,horizontal:o.isHorizontal(),weight:o.weight});return e}(t),i=$e(e.filter((t=>t.box.fullSize)),!0),n=$e(He(e,"left"),!0),o=$e(He(e,"right")),s=$e(He(e,"top"),!0),a=$e(He(e,"bottom")),r=je(e,"x"),l=je(e,"y");return{fullSize:i,leftAndTop:n.concat(s),rightAndBottom:o.concat(l).concat(a).concat(r),chartArea:He(e,"chartArea"),vertical:n.concat(o).concat(l),horizontal:s.concat(a).concat(r)}}(t.boxes),l=r.vertical,c=r.horizontal;J(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const h=l.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,d=Object.freeze({outerWidth:e,outerHeight:i,padding:o,availableWidth:s,availableHeight:a,vBoxMaxWidth:s/2/h,hBoxMaxHeight:a/2}),u=Object.assign({},o);Ue(u,Fe(n));const f=Object.assign({maxPadding:u,w:s,h:a,x:o.left,y:o.top},o);!function(t,e){let i,n,o;for(i=0,n=t.length;i<n;++i)o=t[i],o.horizontal?(o.width=o.box.fullSize&&e.availableWidth,o.height=e.hBoxMaxHeight):(o.width=e.vBoxMaxWidth,o.height=o.box.fullSize&&e.availableHeight)}(l.concat(c),d),Ke(r.fullSize,f,d),Ke(l,f,d),Ke(c,f,d)&&Ke(l,f,d),function(t){const e=t.maxPadding;function i(i){const n=Math.max(e[i]-t[i],0);return t[i]+=n,n}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(f),Ge(r.leftAndTop,f,d),f.x+=f.w,f.y+=f.h,Ge(r.rightAndBottom,f,d),t.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},J(r.chartArea,(e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(f.w,f.h)}))}};class Qe{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}}class Je extends Qe{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}}const ti={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},ei=t=>null===t||""===t;const ii=!!we&&{passive:!0};function ni(t,e,i){t.canvas.removeEventListener(e,i,ii)}function oi(t,e,i){const n=t.canvas,o=n&&ue(n)||n,s=new MutationObserver((t=>{const e=ue(o);t.forEach((t=>{for(let n=0;n<t.addedNodes.length;n++){const s=t.addedNodes[n];s!==o&&s!==e||i(t.target)}}))}));return s.observe(document,{childList:!0,subtree:!0}),s}function si(t,e,i){const n=t.canvas,o=n&&ue(n);if(!o)return;const s=new MutationObserver((t=>{t.forEach((t=>{for(let e=0;e<t.removedNodes.length;e++)if(t.removedNodes[e]===n){i();break}}))}));return s.observe(o,{childList:!0}),s}const ai=new Map;let ri=0;function li(){const t=window.devicePixelRatio;t!==ri&&(ri=t,ai.forEach(((e,i)=>{i.currentDevicePixelRatio!==t&&e()})))}function ci(t,i,n){const o=t.canvas,s=o&&ue(o);if(!s)return;const a=e(((t,e)=>{const i=s.clientWidth;n(t,e),i<s.clientWidth&&n()}),window),r=new ResizeObserver((t=>{const e=t[0],i=e.contentRect.width,n=e.contentRect.height;0===i&&0===n||a(i,n)}));return r.observe(s),function(t,e){ai.size||window.addEventListener("resize",li),ai.set(t,e)}(t,a),r}function hi(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){ai.delete(t),ai.size||window.removeEventListener("resize",li)}(t)}function di(t,i,n){const o=t.canvas,s=e((e=>{null!==t.ctx&&n(function(t,e){const i=ti[t.type]||t.type,{x:n,y:o}=be(t,e);return{type:i,chart:e,native:t,x:void 0!==n?n:null,y:void 0!==o?o:null}}(e,t))}),t,(t=>{const e=t[0];return[e,e.offsetX,e.offsetY]}));return function(t,e,i){t.addEventListener(e,i,ii)}(o,i,s),s}class ui extends Qe{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"),o=t.getAttribute("width");if(t.$chartjs={initial:{height:n,width:o,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",ei(o)){const e=Me(t,"width");void 0!==e&&(t.width=e)}if(ei(n))if(""===t.style.height)t.height=t.width/(e||2);else{const e=Me(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];$(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={}),o={attach:oi,detach:si,resize:ci}[e]||di;n[e]=o(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];if(!n)return;({attach:hi,detach:hi,resize:hi}[e]||ni)(t,e,n),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return ye(t,e,i,n)}isAttached(t){const e=ue(t);return!(!e||!ue(e))}}var fi=Object.freeze({__proto__:null,BasePlatform:Qe,BasicPlatform:Je,DomPlatform:ui});const gi=t=>0===t||1===t,pi=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*_t/i),mi=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*_t/i)+1,xi={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*Mt),easeOutSine:t=>Math.sin(t*Mt),easeInOutSine:t=>-.5*(Math.cos(bt*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=>gi(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=>gi(t)?t:pi(t,.075,.3),easeOutElastic:t=>gi(t)?t:mi(t,.075,.3),easeInOutElastic(t){const e=.1125;return gi(t)?t:t<.5?.5*pi(2*t,e,.45):.5+.5*mi(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-xi.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*xi.easeInBounce(2*t):.5*xi.easeOutBounce(2*t-1)+.5},bi="transparent",_i={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const n=W(t||bi),o=n.valid&&W(e||bi);return o&&o.valid?o.mix(n,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class yi{constructor(t,e,i,n){const o=e[i];n=Ve([t.to,n,o,t.from]);const s=Ve([t.from,o,n]);this._active=!0,this._fn=t.fn||_i[t.type||typeof s],this._easing=xi[t.easing]||xi.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=s,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,i){const n=this;if(n._active){n._notify(!1);const o=n._target[n._prop],s=i-n._start,a=n._duration-s;n._start=i,n._duration=Math.floor(Math.max(a,t.duration)),n._total+=s,n._loop=!!t.loop,n._to=Ve([t.to,e,o,t.from]),n._from=Ve([t.from,o,e])}}cancel(){const t=this;t._active&&(t.tick(Date.now()),t._active=!1,t._notify(!1))}tick(t){const e=this,i=t-e._start,n=e._duration,o=e._prop,s=e._from,a=e._loop,r=e._to;let l;if(e._active=s!==r&&(a||i<n),!e._active)return e._target[o]=r,void e._notify(!0);i<0?e._target[o]=s:(l=i/n%2,l=a&&l>1?2-l:l,l=e._easing(Math.min(1,Math.max(0,l))),e._target[o]=e._fn(s,r,l))}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<i.length;t++)i[t][e]()}}xt.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});const vi=Object.keys(xt.animation);xt.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),xt.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),xt.describe("animations",{_fallback:"animation"}),xt.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 wi{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 o={};for(const t of vi)o[t]=n[t];(Y(n.properties)&&n.properties||[i]).forEach((t=>{t!==i&&e.has(t)||e.set(t,o)}))}))}_animateOptions(t,e){const i=e.options,n=function(t,e){if(!e)return;let i=t.options;if(!i)return void(t.options=e);i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}}));return i}(t,i);if(!n)return[];const o=this._createAnimations(n,i);return i.$shared&&function(t,e){const i=[],n=Object.keys(e);for(let e=0;e<n.length;e++){const o=t[n[e]];o&&o.active()&&i.push(o.wait())}return Promise.all(i)}(t.options.$animations,i).then((()=>{t.options=i}),(()=>{})),o}_createAnimations(t,e){const i=this._properties,n=[],o=t.$animations||(t.$animations={}),s=Object.keys(e),a=Date.now();let r;for(r=s.length-1;r>=0;--r){const l=s[r];if("$"===l.charAt(0))continue;if("options"===l){n.push(...this._animateOptions(t,e));continue}const c=e[l];let h=o[l];const d=i.get(l);if(h){if(d&&h.active()){h.update(d,c,a);continue}h.cancel()}d&&d.duration?(o[l]=h=new yi(d,t,l,c),n.push(h)):t[l]=c}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?(a.add(this._chart,i),!0):void 0}}function Mi(t,e){const i=t&&t.options||{},n=i.reverse,o=void 0===i.min?e:0,s=void 0===i.max?e:0;return{start:n?s:o,end:n?o:s}}function ki(t,e){const i=[],n=t._getSortedDatasetMetas(e);let o,s;for(o=0,s=n.length;o<s;++o)i.push(n[o].index);return i}function Si(t,e,i,n){const o=t.keys,s="single"===n.mode;let a,r,l,c;if(null!==e){for(a=0,r=o.length;a<r;++a){if(l=+o[a],l===i){if(n.all)continue;break}c=t.values[l],X(c)&&(s||0===e||Dt(e)===Dt(c))&&(e+=c)}return e}}function Pi(t,e){const i=t&&t.options.stacked;return i||void 0===i&&void 0!==e.stack}function Di(t,e,i){const n=t[e]||(t[e]={});return n[i]||(n[i]={})}function Ci(t,e,i){for(const n of e.getMatchingVisibleMetas("bar").reverse()){const e=t[n.index];if(i&&e>0||!i&&e<0)return n.index}return null}function Oi(t,e){const{chart:i,_cachedMeta:n}=t,o=i._stacks||(i._stacks={}),{iScale:s,vScale:a,index:r}=n,l=s.axis,c=a.axis,h=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(s,a,n),d=e.length;let u;for(let t=0;t<d;++t){const i=e[t],{[l]:n,[c]:s}=i;u=(i._stacks||(i._stacks={}))[c]=Di(o,h,n),u[r]=s,u._top=Ci(u,a,!0),u._bottom=Ci(u,a,!1)}}function Ti(t,e){const i=t.scales;return Object.keys(i).filter((t=>i[t].axis===e)).shift()}function Ai(t,e){const i=t.vScale&&t.vScale.axis;if(i){e=e||t._parsed;for(const n of e){const e=n._stacks;if(!e||void 0===e[i]||void 0===e[i][t.index])return;delete e[i][t.index]}}}const Li=t=>"reset"===t||"none"===t,Ri=(t,e)=>e?t:Object.assign({},t);class Ei{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,e=t._cachedMeta;t.configure(),t.linkScales(),e._stacked=Pi(e.vScale,e),t.addElements()}updateIndex(t){this.index!==t&&Ai(this._cachedMeta),this.index=t}linkScales(){const t=this,e=t.chart,i=t._cachedMeta,n=t.getDataset(),o=(t,e,i,n)=>"x"===t?e:"r"===t?n:i,s=i.xAxisID=K(n.xAxisID,Ti(e,"x")),a=i.yAxisID=K(n.yAxisID,Ti(e,"y")),r=i.rAxisID=K(n.rAxisID,Ti(e,"r")),l=i.indexAxis,c=i.iAxisID=o(l,s,a,r),h=i.vAxisID=o(l,a,s,r);i.xScale=t.getScaleForId(s),i.yScale=t.getScaleForId(a),i.rScale=t.getScaleForId(r),i.iScale=t.getScaleForId(c),i.vScale=t.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&&he(this._data,this),t._stacked&&Ai(t)}_dataCheck(){const t=this,e=t.getDataset(),i=e.data||(e.data=[]),n=t._data;if(U(i))t._data=function(t){const e=Object.keys(t),i=new Array(e.length);let n,o,s;for(n=0,o=e.length;n<o;++n)s=e[n],i[n]={x:s,y:t[s]};return i}(i);else if(n!==i){if(n){he(n,t);const e=t._cachedMeta;Ai(e),e._parsed=[]}i&&Object.isExtensible(i)&&ce(i,t),t._syncList=[],t._data=i}}addElements(){const t=this,e=t._cachedMeta;t._dataCheck(),t.datasetElementType&&(e.dataset=new t.datasetElementType)}buildOrUpdateElements(t){const e=this,i=e._cachedMeta,n=e.getDataset();let o=!1;e._dataCheck();const s=i._stacked;i._stacked=Pi(i.vScale,i),i.stack!==n.stack&&(o=!0,Ai(i),i.stack=n.stack),e._resyncElements(t),(o||s!==i._stacked)&&Oi(e,i._parsed)}configure(){const t=this,e=t.chart.config,i=e.datasetScopeKeys(t._type),n=e.getOptionScopes(t.getDataset(),i,!0);t.options=e.createResolver(n,t.getContext()),t._parsing=t.options.parsing}parse(t,e){const i=this,{_cachedMeta:n,_data:o}=i,{iScale:s,_stacked:a}=n,r=s.axis;let l,c,h,d=0===t&&e===o.length||n._sorted,u=t>0&&n._parsed[t-1];if(!1===i._parsing)n._parsed=o,n._sorted=!0,h=o;else{h=Y(o[t])?i.parseArrayData(n,o,t,e):U(o[t])?i.parseObjectData(n,o,t,e):i.parsePrimitiveData(n,o,t,e);const s=()=>null===c[r]||u&&c[r]<u[r];for(l=0;l<e;++l)n._parsed[l+t]=c=h[l],d&&(s()&&(d=!1),u=c);n._sorted=d}a&&Oi(i,h)}parsePrimitiveData(t,e,i,n){const{iScale:o,vScale:s}=t,a=o.axis,r=s.axis,l=o.getLabels(),c=o===s,h=new Array(n);let d,u,f;for(d=0,u=n;d<u;++d)f=d+i,h[d]={[a]:c||o.parse(l[f],f),[r]:s.parse(e[f],f)};return h}parseArrayData(t,e,i,n){const{xScale:o,yScale:s}=t,a=new Array(n);let r,l,c,h;for(r=0,l=n;r<l;++r)c=r+i,h=e[c],a[r]={x:o.parse(h[0],c),y:s.parse(h[1],c)};return a}parseObjectData(t,e,i,n){const{xScale:o,yScale:s}=t,{xAxisKey:a="x",yAxisKey:r="y"}=this._parsing,l=new Array(n);let c,h,d,u;for(c=0,h=n;c<h;++c)d=c+i,u=e[d],l[c]={x:o.parse(lt(u,a),d),y:s.parse(lt(u,r),d)};return l}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){const n=this.chart,o=this._cachedMeta,s=e[t.axis];return Si({keys:ki(n,!0),values:e._stacks[t.axis]},s,o.index,{mode:i})}updateRangeFromParsed(t,e,i,n){const o=i[e.axis];let s=null===o?NaN:o;const a=n&&i._stacks[e.axis];n&&a&&(n.values=a,t.min=Math.min(t.min,s),t.max=Math.max(t.max,s),s=Si(n,o,this._cachedMeta.index,{all:!0})),t.min=Math.min(t.min,s),t.max=Math.max(t.max,s)}getMinMax(t,e){const i=this,n=i._cachedMeta,o=n._parsed,s=n._sorted&&t===n.iScale,a=o.length,r=i._getOtherScale(t),l=e&&n._stacked&&{keys:ki(i.chart,!0),values:null},c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:d}=function(t){const{min:e,max:i,minDefined:n,maxDefined:o}=t.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:o?i:Number.POSITIVE_INFINITY}}(r);let u,f,g,p;function m(){return g=o[u],f=g[t.axis],p=g[r.axis],!X(f)||h>p||d<p}for(u=0;u<a&&(m()||(i.updateRangeFromParsed(c,t,g,l),!s));++u);if(s)for(u=a-1;u>=0;--u)if(!m()){i.updateRangeFromParsed(c,t,g,l);break}return c}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let n,o,s;for(n=0,o=e.length;n<o;++n)s=e[n][t.axis],X(s)&&i.push(s);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,i=e.iScale,n=e.vScale,o=this.getParsed(t);return{label:i?""+i.getLabelForValue(o[i.axis]):"",value:n?""+n.getLabelForValue(o[n.axis]):""}}_update(t){const e=this,i=e._cachedMeta;e.configure(),e._cachedDataOpts={},e.update(t||"default"),i._clip=function(t){let e,i,n,o;return U(t)?(e=t.top,i=t.right,n=t.bottom,o=t.left):e=i=n=o=t,{top:e,right:i,bottom:n,left:o,disabled:!1===t}}(K(e.options.clip,function(t,e,i){if(!1===i)return!1;const n=Mi(t,i),o=Mi(e,i);return{top:o.end,right:n.end,bottom:o.start,left:n.start}}(i.xScale,i.yScale,e.getMaxOverflow())))}update(t){}draw(){const t=this,e=t._ctx,i=t.chart,n=t._cachedMeta,o=n.data||[],s=i.chartArea,a=[],r=t._drawStart||0,l=t._drawCount||o.length-r;let c;for(n.dataset&&n.dataset.draw(e,s,r,l),c=r;c<r+l;++c){const t=o[c];t.active?a.push(t):t.draw(e,s)}for(c=0;c<a.length;++c)a[c].draw(e,s)}getStyle(t,e){const i=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){const n=this,o=n.getDataset();let s;if(t>=0&&t<n._cachedMeta.data.length){const e=n._cachedMeta.data[t];s=e.$context||(e.$context=function(t,e,i){return Object.assign(Object.create(t),{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:i,index:e,mode:"default",type:"data"})}(n.getContext(),t,e)),s.parsed=n.getParsed(t),s.raw=o.data[t],s.index=s.dataIndex=t}else s=n.$context||(n.$context=function(t,e){return Object.assign(Object.create(t),{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}(n.chart.getContext(),n.index)),s.dataset=o,s.index=s.datasetIndex=n.index;return s.active=!!e,s.mode=i,s}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",i){const n=this,o="active"===e,s=n._cachedDataOpts,a=t+"-"+e,r=s[a],l=n.enableOptionSharing&&ht(i);if(r)return Ri(r,l);const c=n.chart.config,h=c.datasetElementScopeKeys(n._type,t),d=o?[`${t}Hover`,"hover",t,""]:[t,""],u=c.getOptionScopes(n.getDataset(),h),f=Object.keys(xt.elements[t]),g=c.resolveNamedOptions(u,f,(()=>n.getContext(i,o)),d);return g.$shared&&(g.$shared=l,s[a]=Object.freeze(Ri(g,l))),g}_resolveAnimations(t,e,i){const n=this,o=n.chart,s=n._cachedDataOpts,a=`animation-${e}`,r=s[a];if(r)return r;let l;if(!1!==o.options.animation){const o=n.chart.config,s=o.datasetAnimationScopeKeys(n._type,e),a=o.getOptionScopes(n.getDataset(),s);l=o.createResolver(a,n.getContext(t,i,e))}const c=new wi(o,l&&l.animations);return l&&l._cacheable&&(s[a]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Li(t)||this.chart._animationsDisabled}updateElement(t,e,i,n){Li(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!Li(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;const o=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(o)||o})}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,i=e._data,n=e._cachedMeta.data;for(const[t,i,n]of e._syncList)e[t](i,n);e._syncList=[];const o=n.length,s=i.length,a=Math.min(s,o);a&&e.parse(0,a),s>o?e._insertElements(o,s-o,t):s<o&&e._removeElements(s,o-s)}_insertElements(t,e,i=!0){const n=this,o=n._cachedMeta,s=o.data,a=t+e;let r;const l=t=>{for(t.length+=e,r=t.length-1;r>=a;r--)t[r]=t[r-e]};for(l(s),r=t;r<a;++r)s[r]=new n.dataElementType;n._parsing&&l(o._parsed),n.parse(t,e),i&&n.updateElements(s,t,e,"reset")}updateElements(t,e,i,n){}_removeElements(t,e){const i=this._cachedMeta;if(this._parsing){const n=i._parsed.splice(t,e);i._stacked&&Ai(i,n)}i.data.splice(t,e)}_onDataPush(){const t=arguments.length;this._syncList.push(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._syncList.push(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._syncList.push(["_removeElements",0,1])}_onDataSplice(t,e){this._syncList.push(["_removeElements",t,e]),this._syncList.push(["_insertElements",t,arguments.length-2])}_onDataUnshift(){this._syncList.push(["_insertElements",0,arguments.length])}}Ei.defaults={},Ei.prototype.datasetElementType=null,Ei.prototype.dataElementType=null;class zi{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 Tt(this.x)&&Tt(this.y)}getProps(t,e){const i=this,n=this.$animations;if(!e||!n)return i;const o={};return t.forEach((t=>{o[t]=n[t]&&n[t].active()?n[t]._to:i[t]})),o}}zi.defaults={},zi.defaultRoutes=void 0;const Ii=new Map;function Fi(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let n=Ii.get(i);return n||(n=new Intl.NumberFormat(t,e),Ii.set(i,n)),n}(e,i).format(t)}const Bi={values:t=>Y(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const n=this.chart.options.locale;let o,s=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)&&(o="scientific"),s=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t));return i}(t,i)}const a=Pt(Math.abs(s)),r=Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:o,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(l,this.options.ticks.format),Fi(t,n,l)},logarithmic(t,e,i){if(0===t)return"0";const n=t/Math.pow(10,Math.floor(Pt(t)));return 1===n||2===n||5===n?Bi.numeric.call(this,t,e,i):""}};var Vi={formatters:Bi};function Wi(t,e){const i=t.options.ticks,n=i.maxTicksLimit||function(t){const e=t.options.offset,i=t._tickSize(),n=t._length/i+(e?0:1),o=t._maxLength/i;return Math.floor(Math.min(n,o))}(t),o=i.major.enabled?function(t){const e=[];let i,n;for(i=0,n=t.length;i<n;i++)t[i].major&&e.push(i);return e}(e):[],s=o.length,a=o[0],r=o[s-1],l=[];if(s>n)return function(t,e,i,n){let o,s=0,a=i[0];for(n=Math.ceil(n),o=0;o<t.length;o++)o===a&&(e.push(t[o]),s++,a=i[s*n])}(e,l,o,s/n),l;const c=function(t,e,i){const n=function(t){const e=t.length;let i,n;if(e<2)return!1;for(n=t[0],i=1;i<e;++i)if(t[i]-t[i-1]!==n)return!1;return n}(t),o=e.length/i;if(!n)return Math.max(o,1);const s=Ot(n);for(let t=0,e=s.length-1;t<e;t++){const e=s[t];if(e>o)return e}return Math.max(o,1)}(o,e,n);if(s>0){let t,i;const n=s>1?Math.round((r-a)/(s-1)):null;for(Ni(e,l,c,$(n)?0:a-n,a),t=0,i=s-1;t<i;t++)Ni(e,l,c,o[t],o[t+1]);return Ni(e,l,c,r,$(n)?e.length:r+n),l}return Ni(e,l,c),l}function Ni(t,e,i,n,o){const s=K(n,0),a=Math.min(K(o,t.length),t.length);let r,l,c,h=0;for(i=Math.ceil(i),o&&(r=o-n,i=r/Math.floor(r/i)),c=s;c<0;)h++,c=Math.round(s+h*i);for(l=Math.max(s,0);l<a;l++)l===c&&(e.push(t[l]),h++,c=Math.round(s+h*i))}xt.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.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:Vi.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),xt.route("scale.ticks","color","","color"),xt.route("scale.grid","color","","borderColor"),xt.route("scale.grid","borderColor","","borderColor"),xt.route("scale.title","color","","color"),xt.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t}),xt.describe("scales",{_fallback:"scale"}),xt.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t});const Hi=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i;function ji(t,e){const i=[],n=t.length/e,o=t.length;let s=0;for(;s<o;s+=n)i.push(t[Math.floor(s)]);return i}function $i(t,e,i){const n=t.ticks.length,o=Math.min(e,n-1),s=t._startPixel,a=t._endPixel,r=1e-6;let l,c=t.getPixelForTick(o);if(!(i&&(l=1===n?Math.max(c-s,a-c):0===e?(t.getPixelForTick(1)-c)/2:(c-t.getPixelForTick(o-1))/2,c+=o<e?l:-l,c<s-r||c>a+r)))return c}function Yi(t){return t.drawTicks?t.tickLength:0}function Ui(t,e){if(!t.display)return 0;const i=Be(t.font,e),n=Fe(t.padding);return(Y(t.text)?t.text.length:1)*i.lineHeight+n.height}function Xi(t,e,i){let o=n(t);return(i&&"right"!==e||!i&&"right"===e)&&(o=(t=>"left"===t?"right":"right"===t?"left":t)(o)),o}class qi extends zi{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){const e=this;e.options=t.setContext(e.getContext()),e.axis=t.axis,e._userMin=e.parse(t.min),e._userMax=e.parse(t.max),e._suggestedMin=e.parse(t.suggestedMin),e._suggestedMax=e.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:n}=this;return t=q(t,Number.POSITIVE_INFINITY),e=q(e,Number.NEGATIVE_INFINITY),i=q(i,Number.POSITIVE_INFINITY),n=q(n,Number.NEGATIVE_INFINITY),{min:q(t,i),max:q(e,n),minDefined:X(t),maxDefined:X(e)}}getMinMax(t){const e=this;let i,{min:n,max:o,minDefined:s,maxDefined:a}=e.getUserBounds();if(s&&a)return{min:n,max:o};const r=e.getMatchingVisibleMetas();for(let l=0,c=r.length;l<c;++l)i=r[l].controller.getMinMax(e,t),s||(n=Math.min(n,i.min)),a||(o=Math.max(o,i.max));return{min:q(n,q(o,n)),max:q(o,q(n,o))}}getPadding(){const t=this;return{left:t.paddingLeft||0,top:t.paddingTop||0,right:t.paddingRight||0,bottom:t.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(){Q(this.options.beforeUpdate,[this])}update(t,e,i){const n=this,o=n.options.ticks,s=o.sampleSize;n.beforeUpdate(),n.maxWidth=t,n.maxHeight=e,n._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),n.ticks=null,n._labelSizes=null,n._gridLineItems=null,n._labelItems=null,n.beforeSetDimensions(),n.setDimensions(),n.afterSetDimensions(),n._maxLength=n.isHorizontal()?n.width+i.left+i.right:n.height+i.top+i.bottom,n._dataLimitsCached||(n.beforeDataLimits(),n.determineDataLimits(),n.afterDataLimits(),n._range=We(n,n.options.grace),n._dataLimitsCached=!0),n.beforeBuildTicks(),n.ticks=n.buildTicks()||[],n.afterBuildTicks();const a=s<n.ticks.length;n._convertTicksToLabels(a?ji(n.ticks,s):n.ticks),n.configure(),n.beforeCalculateLabelRotation(),n.calculateLabelRotation(),n.afterCalculateLabelRotation(),o.display&&(o.autoSkip||"auto"===o.source)&&(n.ticks=Wi(n,n.ticks),n._labelSizes=null),a&&n._convertTicksToLabels(n.ticks),n.beforeFit(),n.fit(),n.afterFit(),n.afterUpdate()}configure(){const t=this;let e,i,n=t.options.reverse;t.isHorizontal()?(e=t.left,i=t.right):(e=t.top,i=t.bottom,n=!n),t._startPixel=e,t._endPixel=i,t._reversePixels=n,t._length=i-e,t._alignToPixels=t.options.alignToPixels}afterUpdate(){Q(this.options.afterUpdate,[this])}beforeSetDimensions(){Q(this.options.beforeSetDimensions,[this])}setDimensions(){const t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0}afterSetDimensions(){Q(this.options.afterSetDimensions,[this])}_callHooks(t){const e=this;e.chart.notifyPlugins(t,e.getContext()),Q(e.options[t],[e])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Q(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this,i=e.options.ticks;let n,o,s;for(n=0,o=t.length;n<o;n++)s=t[n],s.label=Q(i.callback,[s.value,n,t],e)}afterTickToLabelConversion(){Q(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Q(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this,e=t.options,i=e.ticks,n=t.ticks.length,o=i.minRotation||0,s=i.maxRotation;let a,r,l,c=o;if(!t._isVisible()||!i.display||o>=s||n<=1||!t.isHorizontal())return void(t.labelRotation=o);const h=t._getLabelSizes(),d=h.widest.width,u=h.highest.height,f=Ht(t.chart.width-d,0,t.maxWidth);a=e.offset?t.maxWidth/n:f/(n-1),d+6>a&&(a=f/(n-(e.offset?.5:1)),r=t.maxHeight-Yi(e.grid)-i.padding-Ui(e.title,t.chart.options.font),l=Math.sqrt(d*d+u*u),c=zt(Math.min(Math.asin(Math.min((h.highest.height+6)/a,1)),Math.asin(Math.min(r/l,1))-Math.asin(u/l))),c=Math.max(o,Math.min(s,c))),t.labelRotation=c}afterCalculateLabelRotation(){Q(this.options.afterCalculateLabelRotation,[this])}beforeFit(){Q(this.options.beforeFit,[this])}fit(){const t=this,e={width:0,height:0},{chart:i,options:{ticks:n,title:o,grid:s}}=t,a=t._isVisible(),r=t.isHorizontal();if(a){const a=Ui(o,i.options.font);if(r?(e.width=t.maxWidth,e.height=Yi(s)+a):(e.height=t.maxHeight,e.width=Yi(s)+a),n.display&&t.ticks.length){const{first:i,last:o,widest:s,highest:a}=t._getLabelSizes(),l=2*n.padding,c=Et(t.labelRotation),h=Math.cos(c),d=Math.sin(c);if(r){const i=n.mirror?0:d*s.width+h*a.height;e.height=Math.min(t.maxHeight,e.height+i+l)}else{const i=n.mirror?0:h*s.width+d*a.height;e.width=Math.min(t.maxWidth,e.width+i+l)}t._calculatePadding(i,o,d,h)}}t._handleMargins(),r?(t.width=t._length=i.width-t._margins.left-t._margins.right,t.height=e.height):(t.width=e.width,t.height=t._length=i.height-t._margins.top-t._margins.bottom)}_calculatePadding(t,e,i,n){const o=this,{ticks:{align:s,padding:a},position:r}=o.options,l=0!==o.labelRotation,c="top"!==r&&"x"===o.axis;if(o.isHorizontal()){const r=o.getPixelForTick(0)-o.left,h=o.right-o.getPixelForTick(o.ticks.length-1);let d=0,u=0;l?c?(d=n*t.width,u=i*e.height):(d=i*t.height,u=n*e.width):"start"===s?u=e.width:"end"===s?d=t.width:(d=t.width/2,u=e.width/2),o.paddingLeft=Math.max((d-r+a)*o.width/(o.width-r),0),o.paddingRight=Math.max((u-h+a)*o.width/(o.width-h),0)}else{let i=e.height/2,n=t.height/2;"start"===s?(i=0,n=t.height):"end"===s&&(i=e.height,n=0),o.paddingTop=i+a,o.paddingBottom=n+a}}_handleMargins(){const t=this;t._margins&&(t._margins.left=Math.max(t.paddingLeft,t._margins.left),t._margins.top=Math.max(t.paddingTop,t._margins.top),t._margins.right=Math.max(t.paddingRight,t._margins.right),t._margins.bottom=Math.max(t.paddingBottom,t._margins.bottom))}afterFit(){Q(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){const e=this;let i,n;for(e.beforeTickToLabelConversion(),e.generateTickLabels(t),i=0,n=t.length;i<n;i++)$(t[i].label)&&(t.splice(i,1),n--,i--);e.afterTickToLabelConversion()}_getLabelSizes(){const t=this;let e=t._labelSizes;if(!e){const i=t.options.ticks.sampleSize;let n=t.ticks;i<n.length&&(n=ji(n,i)),t._labelSizes=e=t._computeLabelSizes(n,n.length)}return e}_computeLabelSizes(t,e){const{ctx:i,_longestTextCache:n}=this,o=[],s=[];let a,r,l,c,h,d,u,f,g,p,m,x=0,b=0;for(a=0;a<e;++a){if(c=t[a].label,h=this._resolveTickFontOptions(a),i.font=d=h.string,u=n[d]=n[d]||{data:{},gc:[]},f=h.lineHeight,g=p=0,$(c)||Y(c)){if(Y(c))for(r=0,l=c.length;r<l;++r)m=c[r],$(m)||Y(m)||(g=Yt(i,u.data,u.gc,g,m),p+=f)}else g=Yt(i,u.data,u.gc,g,c),p=f;o.push(g),s.push(p),x=Math.max(g,x),b=Math.max(p,b)}!function(t,e){J(t,(t=>{const i=t.gc,n=i.length/2;let o;if(n>e){for(o=0;o<n;++o)delete t.data[i[o]];i.splice(0,n)}}))}(n,e);const _=o.indexOf(x),y=s.indexOf(b),v=t=>({width:o[t]||0,height:s[t]||0});return{first:v(0),last:v(e-1),widest:v(_),highest:v(y),widths:o,heights:s}}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){const e=this;e._reversePixels&&(t=1-t);const i=e._startPixel+t*e._length;return jt(e._alignToPixels?Xt(e.chart,i,0):i)}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,i=e.ticks||[];if(t>=0&&t<i.length){const n=i[t];return n.$context||(n.$context=function(t,e,i){return Object.assign(Object.create(t),{tick:i,index:e,type:"tick"})}(e.getContext(),t,n))}return e.$context||(e.$context=(n=e.chart.getContext(),o=e,Object.assign(Object.create(n),{scale:o,type:"scale"})));var n,o}_tickSize(){const t=this,e=t.options.ticks,i=Et(t.labelRotation),n=Math.abs(Math.cos(i)),o=Math.abs(Math.sin(i)),s=t._getLabelSizes(),a=e.autoSkipPadding||0,r=s?s.widest.width+a:0,l=s?s.highest.height+a:0;return t.isHorizontal()?l*n>r*o?r/n:l/o:l*o<r*n?l/n:r/o}_isVisible(){const t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this,i=e.axis,n=e.chart,o=e.options,{grid:s,position:a}=o,r=s.offset,l=e.isHorizontal(),c=e.ticks.length+(r?1:0),h=Yi(s),d=[],u=s.setContext(e.getContext()),f=u.drawBorder?u.borderWidth:0,g=f/2,p=function(t){return Xt(n,t,f)};let m,x,b,_,y,v,w,M,k,S,P,D;if("top"===a)m=p(e.bottom),v=e.bottom-h,M=m-g,S=p(t.top)+g,D=t.bottom;else if("bottom"===a)m=p(e.top),S=t.top,D=p(t.bottom)-g,v=m+g,M=e.top+h;else if("left"===a)m=p(e.right),y=e.right-h,w=m-g,k=p(t.left)+g,P=t.right;else if("right"===a)m=p(e.left),k=t.left,P=p(t.right)-g,y=m+g,w=e.left+h;else if("x"===i){if("center"===a)m=p((t.top+t.bottom)/2+.5);else if(U(a)){const t=Object.keys(a)[0],i=a[t];m=p(e.chart.scales[t].getPixelForValue(i))}S=t.top,D=t.bottom,v=m+g,M=v+h}else if("y"===i){if("center"===a)m=p((t.left+t.right)/2);else if(U(a)){const t=Object.keys(a)[0],i=a[t];m=p(e.chart.scales[t].getPixelForValue(i))}y=m-g,w=y-h,k=t.left,P=t.right}const C=K(o.ticks.maxTicksLimit,c),O=Math.max(1,Math.ceil(c/C));for(x=0;x<c;x+=O){const t=s.setContext(e.getContext(x)),i=t.lineWidth,o=t.color,a=s.borderDash||[],c=t.borderDashOffset,h=t.tickWidth,u=t.tickColor,f=t.tickBorderDash||[],g=t.tickBorderDashOffset;b=$i(e,x,r),void 0!==b&&(_=Xt(n,b,i),l?y=w=k=P=_:v=M=S=D=_,d.push({tx1:y,ty1:v,tx2:w,ty2:M,x1:k,y1:S,x2:P,y2:D,width:i,color:o,borderDash:a,borderDashOffset:c,tickWidth:h,tickColor:u,tickBorderDash:f,tickBorderDashOffset:g}))}return e._ticksLength=c,e._borderValue=m,d}_computeLabelItems(t){const e=this,i=e.axis,n=e.options,{position:o,ticks:s}=n,a=e.isHorizontal(),r=e.ticks,{align:l,crossAlign:c,padding:h,mirror:d}=s,u=Yi(n.grid),f=u+h,g=d?-h:f,p=-Et(e.labelRotation),m=[];let x,b,_,y,v,w,M,k,S,P,D,C,O="middle";if("top"===o)w=e.bottom-g,M=e._getXAxisLabelAlignment();else if("bottom"===o)w=e.top+g,M=e._getXAxisLabelAlignment();else if("left"===o){const t=e._getYAxisLabelAlignment(u);M=t.textAlign,v=t.x}else if("right"===o){const t=e._getYAxisLabelAlignment(u);M=t.textAlign,v=t.x}else if("x"===i){if("center"===o)w=(t.top+t.bottom)/2+f;else if(U(o)){const t=Object.keys(o)[0],i=o[t];w=e.chart.scales[t].getPixelForValue(i)+f}M=e._getXAxisLabelAlignment()}else if("y"===i){if("center"===o)v=(t.left+t.right)/2-f;else if(U(o)){const t=Object.keys(o)[0],i=o[t];v=e.chart.scales[t].getPixelForValue(i)}M=e._getYAxisLabelAlignment(u).textAlign}"y"===i&&("start"===l?O="top":"end"===l&&(O="bottom"));const T=e._getLabelSizes();for(x=0,b=r.length;x<b;++x){_=r[x],y=_.label;const t=s.setContext(e.getContext(x));k=e.getPixelForTick(x)+s.labelOffset,S=e._resolveTickFontOptions(x),P=S.lineHeight,D=Y(y)?y.length:1;const i=D/2,n=t.color,l=t.textStrokeColor,h=t.textStrokeWidth;let u;if(a?(v=k,C="top"===o?"near"===c||0!==p?-D*P+P/2:"center"===c?-T.highest.height/2-i*P+P:-T.highest.height+P/2:"near"===c||0!==p?P/2:"center"===c?T.highest.height/2-i*P:T.highest.height-D*P,d&&(C*=-1)):(w=k,C=(1-D)*P/2),t.showLabelBackdrop){const e=Fe(t.backdropPadding),i=T.heights[x],n=T.widths[x];let o=w+C-e.top,s=v-e.left;switch(O){case"middle":o-=i/2;break;case"bottom":o-=i}switch(M){case"center":s-=n/2;break;case"right":s-=n}u={left:s,top:o,width:n+e.width,height:i+e.height,color:t.backdropColor}}m.push({rotation:p,label:y,font:S,color:n,strokeColor:l,strokeWidth:h,textOffset:C,textAlign:M,textBaseline:O,translation:[v,w],backdrop:u})}return m}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-Et(this.labelRotation))return"top"===t?"left":"right";let i="center";return"start"===e.align?i="left":"end"===e.align&&(i="right"),i}_getYAxisLabelAlignment(t){const e=this,{position:i,ticks:{crossAlign:n,mirror:o,padding:s}}=e.options,a=t+s,r=e._getLabelSizes().widest.width;let l,c;return"left"===i?o?(l="left",c=e.right+s):(c=e.right-a,"near"===n?l="right":"center"===n?(l="center",c-=r/2):(l="left",c=e.left)):"right"===i?o?(l="right",c=e.left+s):(c=e.left+a,"near"===n?l="left":"center"===n?(l="center",c+=r/2):(l="right",c=e.right)):l="right",{textAlign:l,x:c}}_computeLabelArea(){const t=this;if(t.options.ticks.mirror)return;const e=t.chart,i=t.options.position;return"left"===i||"right"===i?{top:0,left:t.left,bottom:e.height,right:t.right}:"top"===i||"bottom"===i?{top:t.top,left:0,bottom:t.bottom,right:e.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:n,width:o,height:s}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,n,o,s),t.restore())}getLineWidthForValue(t){const e=this,i=e.options.grid;if(!e._isVisible()||!i.display)return 0;const n=e.ticks.findIndex((e=>e.value===t));if(n>=0){return i.setContext(e.getContext(n)).lineWidth}return 0}drawGrid(t){const e=this,i=e.options.grid,n=e.ctx,o=e._gridLineItems||(e._gridLineItems=e._computeGridLineItems(t));let s,a;const r=(t,e,i)=>{i.width&&i.color&&(n.save(),n.lineWidth=i.width,n.strokeStyle=i.color,n.setLineDash(i.borderDash||[]),n.lineDashOffset=i.borderDashOffset,n.beginPath(),n.moveTo(t.x,t.y),n.lineTo(e.x,e.y),n.stroke(),n.restore())};if(i.display)for(s=0,a=o.length;s<a;++s){const t=o[s];i.drawOnChartArea&&r({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t),i.drawTicks&&r({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}drawBorder(){const t=this,{chart:e,ctx:i,options:{grid:n}}=t,o=n.setContext(t.getContext()),s=n.drawBorder?o.borderWidth:0;if(!s)return;const a=n.setContext(t.getContext(0)).lineWidth,r=t._borderValue;let l,c,h,d;t.isHorizontal()?(l=Xt(e,t.left,s)-s/2,c=Xt(e,t.right,a)+a/2,h=d=r):(h=Xt(e,t.top,s)-s/2,d=Xt(e,t.bottom,a)+a/2,l=c=r),i.save(),i.lineWidth=o.borderWidth,i.strokeStyle=o.borderColor,i.beginPath(),i.moveTo(l,h),i.lineTo(c,d),i.stroke(),i.restore()}drawLabels(t){const e=this;if(!e.options.ticks.display)return;const i=e.ctx,n=e._computeLabelArea();n&&Zt(i,n);const o=e._labelItems||(e._labelItems=e._computeLabelItems(t));let s,a;for(s=0,a=o.length;s<a;++s){const t=o[s],e=t.font,n=t.label;t.backdrop&&(i.fillStyle=t.backdrop.color,i.fillRect(t.backdrop.left,t.backdrop.top,t.backdrop.width,t.backdrop.height)),ee(i,n,0,t.textOffset,e,t)}n&&Qt(i)}drawTitle(){const{ctx:t,options:{position:e,title:i,reverse:n}}=this;if(!i.display)return;const s=Be(i.font),a=Fe(i.padding),r=i.align;let l=s.lineHeight/2;"bottom"===e?(l+=a.bottom,Y(i.text)&&(l+=s.lineHeight*(i.text.length-1))):l+=a.top;const{titleX:c,titleY:h,maxWidth:d,rotation:u}=function(t,e,i,n){const{top:s,left:a,bottom:r,right:l}=t;let c,h,d,u=0;return t.isHorizontal()?(h=o(n,a,l),d=Hi(t,i,e),c=l-a):(h=Hi(t,i,e),d=o(n,r,s),u="left"===i?-Mt:Mt),{titleX:h,titleY:d,maxWidth:c,rotation:u}}(this,l,e,r);ee(t,i.text,0,0,s,{color:i.color,maxWidth:d,rotation:u,textAlign:Xi(r,e,n),textBaseline:"middle",translation:[c,h]})}draw(t){const e=this;e._isVisible()&&(e.drawBackground(),e.drawGrid(t),e.drawBorder(),e.drawTitle(),e.drawLabels(t))}_layers(){const t=this,e=t.options,i=e.ticks&&e.ticks.z||0,n=e.grid&&e.grid.z||0;return t._isVisible()&&t.draw===qi.prototype.draw?[{z:n,draw(e){t.drawBackground(),t.drawGrid(e),t.drawTitle()}},{z:n+1,draw(){t.drawBorder()}},{z:i,draw(e){t.drawLabels(e)}}]:[{z:i,draw(e){t.draw(e)}}]}getMatchingVisibleMetas(t){const e=this,i=e.chart.getSortedVisibleDatasetMetas(),n=e.axis+"AxisID",o=[];let s,a;for(s=0,a=i.length;s<a;++s){const a=i[s];a[n]!==e.id||t&&a.type!==t||o.push(a)}return o}_resolveTickFontOptions(t){return Be(this.options.ticks.setContext(this.getContext(t)).font)}_maxDigits(){const t=this,e=t._resolveTickFontOptions(0).lineHeight;return(t.isHorizontal()?t.width:t.height)/e}}function Ki(t,e=[""],i=t,n,o=(()=>t[0])){ht(n)||(n=rn("_fallback",t));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:i,_fallback:n,_getTarget:o,override:o=>Ki([o,...t],e,i,n)};return new Proxy(s,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,n)=>tn(i,n,(()=>function(t,e,i,n){let o;for(const s of e)if(o=rn(Qi(s,t),i),ht(o))return Ji(t,o)?sn(i,n,t,o):o}(n,e,t,i))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>ln(t).includes(e),ownKeys:t=>ln(t),set:(t,e,i)=>((t._storage||(t._storage=o()))[e]=i,delete t[e],delete t._keys,!0)})}function Gi(t,e,i,n){const o={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:Zi(t,n),setContext:e=>Gi(t,e,i,n),override:o=>Gi(t.override(o),e,i,n)};return new Proxy(o,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>tn(t,e,(()=>function(t,e,i){const{_proxy:n,_context:o,_subProxy:s,_descriptors:a}=t;let r=n[e];dt(r)&&a.isScriptable(e)&&(r=function(t,e,i,n){const{_proxy:o,_context:s,_subProxy:a,_stack:r}=i;if(r.has(t))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+t);r.add(t),e=e(s,a||n),r.delete(t),U(e)&&(e=sn(o._scopes,o,t,e));return e}(e,r,t,i));Y(r)&&r.length&&(r=function(t,e,i,n){const{_proxy:o,_context:s,_subProxy:a,_descriptors:r}=i;if(ht(s.index)&&n(t))e=e[s.index%e.length];else if(U(e[0])){const i=e,n=o._scopes.filter((t=>t!==i));e=[];for(const l of i){const i=sn(n,o,t,l);e.push(Gi(i,s,a&&a[t],r))}}return e}(e,r,t,a.isIndexable));Ji(e,r)&&(r=Gi(r,o,s&&s[e],a));return r}(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 Zi(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:n=e.indexable,_allKeys:o=e.allKeys}=t;return{allKeys:o,scriptable:i,indexable:n,isScriptable:dt(i)?i:()=>i,isIndexable:dt(n)?n:()=>n}}const Qi=(t,e)=>t?t+ct(e):e,Ji=(t,e)=>U(e)&&"adapters"!==t;function tn(t,e,i){let n=t[e];return ht(n)||(n=i(),ht(n)&&(t[e]=n)),n}function en(t,e,i){return dt(t)?t(e,i):t}const nn=(t,e)=>!0===t?e:"string"==typeof t?lt(e,t):void 0;function on(t,e,i,n){for(const o of e){const e=nn(i,o);if(e){t.add(e);const o=en(e._fallback,i,e);if(ht(o)&&o!==i&&o!==n)return o}else if(!1===e&&ht(n)&&i!==n)return null}return!1}function sn(t,e,i,n){const o=e._rootScopes,s=en(e._fallback,i,n),a=[...t,...o],r=new Set;r.add(n);let l=an(r,a,i,s||i);return null!==l&&((!ht(s)||s===i||(l=an(r,a,s,l),null!==l))&&Ki(Array.from(r),[""],o,s,(()=>function(t,e,i){const n=t._getTarget();e in n||(n[e]={});const o=n[e];if(Y(o)&&U(i))return i;return o}(e,i,n))))}function an(t,e,i,n){for(;i;)i=on(t,e,i,n);return i}function rn(t,e){for(const i of e){if(!i)continue;const e=i[t];if(ht(e))return e}}function ln(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 cn=Number.EPSILON||1e-14,hn=(t,e)=>e<t.length&&!t[e].skip&&t[e],dn=t=>"x"===t?"y":"x";function un(t,e,i,n){const o=t.skip?e:t,s=e,a=i.skip?e:i,r=Bt(s,o),l=Bt(a,s);let c=r/(r+l),h=l/(r+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const d=n*c,u=n*h;return{previous:{x:s.x-d*(a.x-o.x),y:s.y-d*(a.y-o.y)},next:{x:s.x+u*(a.x-o.x),y:s.y+u*(a.y-o.y)}}}function fn(t,e="x"){const i=dn(e),n=t.length,o=Array(n).fill(0),s=Array(n);let a,r,l,c=hn(t,0);for(a=0;a<n;++a)if(r=l,l=c,c=hn(t,a+1),l){if(c){const t=c[e]-l[e];o[a]=0!==t?(c[i]-l[i])/t:0}s[a]=r?c?Dt(o[a-1])!==Dt(o[a])?0:(o[a-1]+o[a])/2:o[a-1]:o[a]}!function(t,e,i){const n=t.length;let o,s,a,r,l,c=hn(t,0);for(let h=0;h<n-1;++h)l=c,c=hn(t,h+1),l&&c&&(At(e[h],0,cn)?i[h]=i[h+1]=0:(o=i[h]/e[h],s=i[h+1]/e[h],r=Math.pow(o,2)+Math.pow(s,2),r<=9||(a=3/Math.sqrt(r),i[h]=o*a*e[h],i[h+1]=s*a*e[h])))}(t,o,s),function(t,e,i="x"){const n=dn(i),o=t.length;let s,a,r,l=hn(t,0);for(let c=0;c<o;++c){if(a=r,r=l,l=hn(t,c+1),!r)continue;const o=r[i],h=r[n];a&&(s=(o-a[i])/3,r[`cp1${i}`]=o-s,r[`cp1${n}`]=h-s*e[c]),l&&(s=(l[i]-o)/3,r[`cp2${i}`]=o+s,r[`cp2${n}`]=h+s*e[c])}}(t,s,e)}function gn(t,e,i){return Math.max(Math.min(t,i),e)}function pn(t,e,i,n,o){let s,a,r,l;if(e.spanGaps&&(t=t.filter((t=>!t.skip))),"monotone"===e.cubicInterpolationMode)fn(t,o);else{let i=n?t[t.length-1]:t[0];for(s=0,a=t.length;s<a;++s)r=t[s],l=un(i,r,t[Math.min(s+1,a-(n?0:1))%a],e.tension),r.cp1x=l.previous.x,r.cp1y=l.previous.y,r.cp2x=l.next.x,r.cp2y=l.next.y,i=r}e.capBezierPoints&&function(t,e){let i,n,o,s,a,r=Gt(t[0],e);for(i=0,n=t.length;i<n;++i)a=s,s=r,r=i<n-1&&Gt(t[i+1],e),s&&(o=t[i],a&&(o.cp1x=gn(o.cp1x,e.left,e.right),o.cp1y=gn(o.cp1y,e.top,e.bottom)),r&&(o.cp2x=gn(o.cp2x,e.left,e.right),o.cp2y=gn(o.cp2y,e.top,e.bottom)))}(t,i)}function mn(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function xn(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 bn(t,e,i,n){const o={x:t.cp2x,y:t.cp2y},s={x:e.cp1x,y:e.cp1y},a=mn(t,o,i),r=mn(o,s,i),l=mn(s,e,i),c=mn(a,r,i),h=mn(r,l,i);return mn(c,h,i)}function _n(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 yn(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 vn(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function wn(t){return"angle"===t?{between:Nt,compare:Vt,normalize:Wt}:{between:(t,e,i)=>t>=Math.min(e,i)&&t<=Math.max(i,e),compare:(t,e)=>t-e,normalize:t=>t}}function Mn({start:t,end:e,count:i,loop:n,style:o}){return{start:t%i,end:e%i,loop:n&&(e-t+1)%i==0,style:o}}function kn(t,e,i){if(!i)return[t];const{property:n,start:o,end:s}=i,a=e.length,{compare:r,between:l,normalize:c}=wn(n),{start:h,end:d,loop:u,style:f}=function(t,e,i){const{property:n,start:o,end:s}=i,{between:a,normalize:r}=wn(n),l=e.length;let c,h,{start:d,end:u,loop:f}=t;if(f){for(d+=l,u+=l,c=0,h=l;c<h&&a(r(e[d%l][n]),o,s);++c)d--,u--;d%=l,u%=l}return u<d&&(u+=l),{start:d,end:u,loop:f,style:t.style}}(t,e,i),g=[];let p,m,x,b=!1,_=null;const y=()=>b||l(o,x,p)&&0!==r(o,x),v=()=>!b||0===r(s,p)||l(s,x,p);for(let t=h,i=h;t<=d;++t)m=e[t%a],m.skip||(p=c(m[n]),p!==x&&(b=l(p,o,s),null===_&&y()&&(_=0===r(p,o)?t:i),null!==_&&v()&&(g.push(Mn({start:_,end:t,loop:u,count:a,style:f})),_=null),i=t,x=p));return null!==_&&g.push(Mn({start:_,end:d,loop:u,count:a,style:f})),g}function Sn(t,e){const i=[],n=t.segments;for(let o=0;o<n.length;o++){const s=kn(n[o],t.points,e);s.length&&i.push(...s)}return i}function Pn(t,e){const i=t.points,n=t.options.spanGaps,o=i.length;if(!o)return[];const s=!!t._loop,{start:a,end:r}=function(t,e,i,n){let o=0,s=e-1;if(i&&!n)for(;o<e&&!t[o].skip;)o++;for(;o<e&&t[o].skip;)o++;for(o%=e,i&&(s+=o);s>o&&t[s%e].skip;)s--;return s%=e,{start:o,end:s}}(i,o,s,n);if(!0===n)return Dn([{start:a,end:r,loop:s}],i,e);return Dn(function(t,e,i,n){const o=t.length,s=[];let a,r=e,l=t[e];for(a=e+1;a<=i;++a){const i=t[a%o];i.skip||i.stop?l.skip||(n=!1,s.push({start:e%o,end:(a-1)%o,loop:n}),e=r=i.stop?a:null):(r=a,l.skip&&(e=a)),l=i}return null!==r&&s.push({start:e%o,end:r%o,loop:n}),s}(i,a,r<a?r+o:r,!!t._fullLoop&&0===a&&r===o-1),i,e)}function Dn(t,e,i){return i&&i.setContext&&e?function(t,e,i){const n=e.length,o=[];let s=t[0].start,a=s;for(const r of t){let t,l,c=e[s%n];for(a=s+1;a<=r.end;a++){const h=e[a%n];l=Cn(i.setContext({type:"segment",p0:c,p1:h})),On(l,t)&&(o.push({start:s,end:a-1,loop:r.loop,style:t}),t=l,s=a-1),c=h,t=l}s<a-1&&(o.push({start:s,end:a-1,loop:r.loop,style:l}),s=a-1)}return o}(t,e,i):t}function Cn(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function On(t,e){return e&&JSON.stringify(t)!==JSON.stringify(e)}var Tn=Object.freeze({__proto__:null,easingEffects:xi,color:W,getHoverColor:N,noop:H,uid:j,isNullOrUndef:$,isArray:Y,isObject:U,isFinite:X,finiteOrDefault:q,valueOrDefault:K,toPercentage:G,toDimension:Z,callback:Q,each:J,_elementsEqual:tt,clone:et,_merger:nt,merge:ot,mergeIf:st,_mergerIf:at,_deprecated:function(t,e,i,n){void 0!==e&&console.warn(t+': "'+i+'" is deprecated. Please use "'+n+'" instead')},resolveObjectKey:lt,_capitalize:ct,defined:ht,isFunction:dt,setsEqual:ut,toFontString:$t,_measureText:Yt,_longestText:Ut,_alignPixel:Xt,clearCanvas:qt,drawPoint:Kt,_isPointInArea:Gt,clipArea:Zt,unclipArea:Qt,_steppedLineTo:Jt,_bezierCurveTo:te,renderText:ee,addRoundedRectPath:ne,_lookup:oe,_lookupByKey:se,_rlookupByKey:ae,_filterBetween:re,listenArrayEvents:ce,unlistenArrayEvents:he,_arrayUnique:de,_createResolver:Ki,_attachContext:Gi,_descriptors:Zi,splineCurve:un,splineCurveMonotone:fn,_updateBezierControlPoints:pn,_getParentNode:ue,getStyle:pe,getRelativePosition:be,getMaximumSize:ye,retinaScale:ve,supportsEventListenerOptions:we,readUsedSize:Me,fontString:function(t,e,i){return e+" "+t+"px "+i},requestAnimFrame:t,throttled:e,debounce:i,_toLeftRightCenter:n,_alignStartEnd:o,_textX:s,_pointInLine:mn,_steppedInterpolation:xn,_bezierInterpolation:bn,formatNumber:Fi,toLineHeight:Re,_readValueToProps:Ee,toTRBL:ze,toTRBLCorners:Ie,toPadding:Fe,toFont:Be,resolve:Ve,_addGrace:We,PI:bt,TAU:_t,PITAU:yt,INFINITY:vt,RAD_PER_DEG:wt,HALF_PI:Mt,QUARTER_PI:kt,TWO_THIRDS_PI:St,log10:Pt,sign:Dt,niceNum:Ct,_factorize:Ot,isNumber:Tt,almostEquals:At,almostWhole:Lt,_setMinAndMaxByKey:Rt,toRadians:Et,toDegrees:zt,_decimalPlaces:It,getAngleFromPoint:Ft,distanceBetweenPoints:Bt,_angleDiff:Vt,_normalizeAngle:Wt,_angleBetween:Nt,_limitValue:Ht,_int16Range:jt,getRtlAdapter:_n,overrideTextDirection:yn,restoreTextDirection:vn,_boundSegment:kn,_boundSegments:Sn,_computeSegments:Pn});class An{constructor(t,e,i){this.type=t,this.scope=e,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=this,i=Object.getPrototypeOf(t);let n;(function(t){return"id"in t&&"defaults"in t})(i)&&(n=e.register(i));const o=e.items,s=t.id,a=e.scope+"."+s;if(!s)throw new Error("class does not have id: "+t);return s in o||(o[s]=t,function(t,e,i){const n=ot(Object.create(null),[i?xt.get(i):{},xt.get(e),t.defaults]);xt.set(e,n),t.defaultRoutes&&function(t,e){Object.keys(e).forEach((i=>{const n=i.split("."),o=n.pop(),s=[t].concat(n).join("."),a=e[i].split("."),r=a.pop(),l=a.join(".");xt.route(s,o,l,r)}))}(e,t.defaultRoutes);t.descriptors&&xt.describe(e,t.descriptors)}(t,a,n),e.override&&xt.override(t.id,t.overrides)),a}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 xt[n]&&(delete xt[n][i],this.override&&delete ft[i])}}var Ln=new class{constructor(){this.controllers=new An(Ei,"datasets",!0),this.elements=new An(zi,"elements"),this.plugins=new An(Object,"plugins"),this.scales=new An(qi,"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){const n=this;[...e].forEach((e=>{const o=i||n._getRegistryForType(e);i||o.isForType(e)||o===n.plugins&&e.id?n._exec(t,o,e):J(e,(e=>{const o=i||n._getRegistryForType(e);n._exec(t,o,e)}))}))}_exec(t,e,i){const n=ct(t);Q(i["before"+n],[],i),e[t](i),Q(i["after"+n],[],i)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const i=this._typedRegistries[e];if(i.isForType(t))return i}return this.plugins}_get(t,e,i){const n=e.get(t);if(void 0===n)throw new Error('"'+t+'" is not a registered '+i+".");return n}};class Rn{constructor(){this._init=[]}notify(t,e,i,n){const o=this;"beforeInit"===e&&(o._init=o._createDescriptors(t,!0),o._notify(o._init,t,"install"));const s=n?o._descriptors(t).filter(n):o._descriptors(t),a=o._notify(s,t,e,i);return"destroy"===e&&(o._notify(s,t,"stop"),o._notify(o._init,t,"uninstall")),a}_notify(t,e,i,n){n=n||{};for(const o of t){const t=o.plugin;if(!1===Q(t[i],[e,n,o.options],t)&&n.cancelable)return!1}return!0}invalidate(){$(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const i=t&&t.config,n=K(i.options&&i.options.plugins,{}),o=function(t){const e=[],i=Object.keys(Ln.plugins.items);for(let t=0;t<i.length;t++)e.push(Ln.getPlugin(i[t]));const n=t.plugins||[];for(let t=0;t<n.length;t++){const i=n[t];-1===e.indexOf(i)&&e.push(i)}return e}(i);return!1!==n||e?function(t,e,i,n){const o=[],s=t.getContext();for(let a=0;a<e.length;a++){const r=e[a],l=En(i[r.id],n);null!==l&&o.push({plugin:r,options:zn(t.config,r,l,s)})}return o}(t,o,n,e):[]}_notifyStateChanges(t){const e=this._oldCache||[],i=this._cache,n=(t,e)=>t.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 En(t,e){return e||!1!==t?!0===t?{}:t:null}function zn(t,e,i,n){const o=t.pluginScopeKeys(e),s=t.getOptionScopes(i,o);return t.createResolver(s,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function In(t,e){const i=xt.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function Fn(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 Bn(t){const e=t.options||(t.options={});e.plugins=K(e.plugins,{}),e.scales=function(t,e){const i=ft[t.type]||{scales:{}},n=e.scales||{},o=In(t.type,e),s=Object.create(null),a=Object.create(null);return Object.keys(n).forEach((t=>{const e=n[t],r=Fn(t,e),l=function(t,e){return t===e?"_index_":"_value_"}(r,o),c=i.scales||{};s[r]=s[r]||t,a[t]=st(Object.create(null),[{axis:r},e,c[r],c[l]])})),t.data.datasets.forEach((i=>{const o=i.type||t.type,r=i.indexAxis||In(o,e),l=(ft[o]||{}).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,r),o=i[e+"AxisID"]||s[e]||e;a[o]=a[o]||Object.create(null),st(a[o],[{axis:e},n[o],l[t]])}))})),Object.keys(a).forEach((t=>{const e=a[t];st(e,[xt.scales[e.type],xt.scale])})),a}(t,e)}function Vn(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const Wn=new Map,Nn=new Set;function Hn(t,e){let i=Wn.get(t);return i||(i=e(),Wn.set(t,i),Nn.add(i)),i}const jn=(t,e,i)=>{const n=lt(e,i);void 0!==n&&t.add(n)};class $n{constructor(t){this._config=function(t){return(t=t||{}).data=Vn(t.data),Bn(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}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=Vn(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(),Bn(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Hn(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return Hn(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return Hn(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return Hn(`${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:o}=this,s=this._cachedScopes(t,i),a=s.get(e);if(a)return a;const r=new Set;e.forEach((e=>{t&&(r.add(t),e.forEach((e=>jn(r,t,e)))),e.forEach((t=>jn(r,n,t))),e.forEach((t=>jn(r,ft[o]||{},t))),e.forEach((t=>jn(r,xt,t))),e.forEach((t=>jn(r,gt,t)))}));const l=Array.from(r);return Nn.has(e)&&s.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,ft[e]||{},xt.datasets[e]||{},{type:e},xt,gt]}resolveNamedOptions(t,e,i,n=[""]){const o={$shared:!0},{resolver:s,subPrefixes:a}=Yn(this._resolverCache,t,n);let r=s;if(function(t,e){const{isScriptable:i,isIndexable:n}=Zi(t);for(const o of e)if(i(o)&&dt(t[o])||n(o)&&Y(t[o]))return!0;return!1}(s,e)){o.$shared=!1;r=Gi(s,i=dt(i)?i():i,this.createResolver(t,i,a))}for(const t of e)o[t]=r[t];return o}createResolver(t,e,i=[""],n){const{resolver:o}=Yn(this._resolverCache,t,i);return U(e)?Gi(o,e,void 0,n):o}}function Yn(t,e,i){let n=t.get(e);n||(n=new Map,t.set(e,n));const o=i.join();let s=n.get(o);if(!s){s={resolver:Ki(e,i),subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},n.set(o,s)}return s}const Un=["top","bottom","left","right","chartArea"];function Xn(t,e){return"top"===t||"bottom"===t||-1===Un.indexOf(t)&&"x"===e}function qn(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}function Kn(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),Q(i&&i.onComplete,[t],e)}function Gn(t){const e=t.chart,i=e.options.animation;Q(i&&i.onProgress,[t],e)}function Zn(){return"undefined"!=typeof window&&"undefined"!=typeof document}function Qn(t){return Zn()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Jn={},to=t=>{const e=Qn(t);return Object.values(Jn).filter((t=>t.canvas===e)).pop()};class eo{constructor(t,e){const n=this;this.config=e=new $n(e);const o=Qn(t),s=to(o);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas can be reused.");const r=e.createResolver(e.chartOptionScopes(),n.getContext());this.platform=n._initializePlatform(o,e);const l=n.platform.acquireContext(o,r.aspectRatio),c=l&&l.canvas,h=c&&c.height,d=c&&c.width;this.id=j(),this.ctx=l,this.canvas=c,this.width=d,this.height=h,this._options=r,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.scale=void 0,this._plugins=new Rn,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=i((()=>this.update("resize")),r.resizeDelay||0),Jn[n.id]=n,l&&c?(a.listen(n,"complete",Kn),a.listen(n,"progress",Gn),n._initialize(),n.attached&&n.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:o}=this;return $(t)?e&&o?o: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(){const t=this;return t.notifyPlugins("beforeInit"),t.options.responsive?t.resize():ve(t,t.options.devicePixelRatio),t.bindEvents(),t.notifyPlugins("afterInit"),t}_initializePlatform(t,e){return e.platform?new e.platform:!Zn()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?new Je:new ui}clear(){return qt(this.canvas,this.ctx),this}stop(){return a.stop(this),this}resize(t,e){a.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this,n=i.options,o=i.canvas,s=n.maintainAspectRatio&&i.aspectRatio,a=i.platform.getMaximumSize(o,t,e,s),r=n.devicePixelRatio||i.platform.getDevicePixelRatio();i.width=a.width,i.height=a.height,i._aspectRatio=i.aspectRatio,ve(i,r,!0)&&(i.notifyPlugins("resize",{size:a}),Q(n.onResize,[i,a],i),i.attached&&i._doResize()&&i.render())}ensureScalesHaveIDs(){J(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this,e=t.options,i=e.scales,n=t.scales,o=Object.keys(n).reduce(((t,e)=>(t[e]=!1,t)),{});let s=[];i&&(s=s.concat(Object.keys(i).map((t=>{const e=i[t],n=Fn(t,e),o="r"===n,s="x"===n;return{options:e,dposition:o?"chartArea":s?"bottom":"left",dtype:o?"radialLinear":s?"category":"linear"}})))),J(s,(i=>{const s=i.options,a=s.id,r=Fn(a,s),l=K(s.type,i.dtype);void 0!==s.position&&Xn(s.position,r)===Xn(i.dposition)||(s.position=i.dposition),o[a]=!0;let c=null;if(a in n&&n[a].type===l)c=n[a];else{c=new(Ln.getScale(l))({id:a,type:l,ctx:t.ctx,chart:t}),n[c.id]=c}c.init(s,e)})),J(o,((t,e)=>{t||delete n[e]})),J(n,(e=>{Ze.configure(t,e,e.options),Ze.addBox(t,e)}))}_updateMetasets(){const t=this,e=t._metasets,i=t.data.datasets.length,n=e.length;if(e.sort(((t,e)=>t.index-e.index)),n>i){for(let e=i;e<n;++e)t._destroyDatasetMeta(e);e.splice(i,n-i)}t._sortedMetasets=e.slice(0).sort(qn("order","index"))}_removeUnreferencedMetasets(){const t=this,{_metasets:e,data:{datasets:i}}=t;e.length>i.length&&delete t._stacks,e.forEach(((e,n)=>{0===i.filter((t=>t===e._dataset)).length&&t._destroyDatasetMeta(n)}))}buildOrUpdateControllers(){const t=this,e=[],i=t.data.datasets;let n,o;for(t._removeUnreferencedMetasets(),n=0,o=i.length;n<o;n++){const o=i[n];let s=t.getDatasetMeta(n);const a=o.type||t.config.type;if(s.type&&s.type!==a&&(t._destroyDatasetMeta(n),s=t.getDatasetMeta(n)),s.type=a,s.indexAxis=o.indexAxis||In(a,t.options),s.order=o.order||0,s.index=n,s.label=""+o.label,s.visible=t.isDatasetVisible(n),s.controller)s.controller.updateIndex(n),s.controller.linkScales();else{const i=Ln.getController(a),{datasetElementType:o,dataElementType:r}=xt.datasets[a];Object.assign(i.prototype,{dataElementType:Ln.getElement(r),datasetElementType:o&&Ln.getElement(o)}),s.controller=new i(t,n),e.push(s.controller)}}return t._updateMetasets(),e}_resetElements(){const t=this;J(t.data.datasets,((e,i)=>{t.getDatasetMeta(i).controller.reset()}),t)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this,i=e.config;i.update(),e._options=i.createResolver(i.chartOptionScopes(),e.getContext()),J(e.scales,(t=>{Ze.removeBox(e,t)}));const n=e._animationsDisabled=!e.options.animation;e.ensureScalesHaveIDs(),e.buildOrUpdateScales();const o=new Set(Object.keys(e._listeners)),s=new Set(e.options.events);if(ut(o,s)&&!!this._responsiveListeners===e.options.responsive||(e.unbindEvents(),e.bindEvents()),e._plugins.invalidate(),!1===e.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const a=e.buildOrUpdateControllers();e.notifyPlugins("beforeElementsUpdate");let r=0;for(let t=0,i=e.data.datasets.length;t<i;t++){const{controller:i}=e.getDatasetMeta(t),o=!n&&-1===a.indexOf(i);i.buildOrUpdateElements(o),r=Math.max(+i.getMaxOverflow(),r)}e._minPadding=r,e._updateLayout(r),n||J(a,(t=>{t.reset()})),e._updateDatasets(t),e.notifyPlugins("afterUpdate",{mode:t}),e._layers.sort(qn("z","_idx")),e._lastEvent&&e._eventHandler(e._lastEvent,!0),e.render()}_updateLayout(t){const e=this;if(!1===e.notifyPlugins("beforeLayout",{cancelable:!0}))return;Ze.update(e,e.width,e.height,t);const i=e.chartArea,n=i.width<=0||i.height<=0;e._layers=[],J(e.boxes,(t=>{n&&"chartArea"===t.position||(t.configure&&t.configure(),e._layers.push(...t._layers()))}),e),e._layers.forEach(((t,e)=>{t._idx=e})),e.notifyPlugins("afterLayout")}_updateDatasets(t){const e=this,i="function"==typeof t;if(!1!==e.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let n=0,o=e.data.datasets.length;n<o;++n)e._updateDataset(n,i?t({datasetIndex:n}):t);e.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const i=this,n=i.getDatasetMeta(t),o={meta:n,index:t,mode:e,cancelable:!0};!1!==i.notifyPlugins("beforeDatasetUpdate",o)&&(n.controller._update(e),o.cancelable=!1,i.notifyPlugins("afterDatasetUpdate",o))}render(){const t=this;!1!==t.notifyPlugins("beforeRender",{cancelable:!0})&&(a.has(t)?t.attached&&!a.running(t)&&a.start(t):(t.draw(),Kn({chart:t})))}draw(){const t=this;let e;if(t._resizeBeforeDraw){const{width:e,height:i}=t._resizeBeforeDraw;t._resize(e,i),t._resizeBeforeDraw=null}if(t.clear(),t.width<=0||t.height<=0)return;if(!1===t.notifyPlugins("beforeDraw",{cancelable:!0}))return;const i=t._layers;for(e=0;e<i.length&&i[e].z<=0;++e)i[e].draw(t.chartArea);for(t._drawDatasets();e<i.length;++e)i[e].draw(t.chartArea);t.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,i=[];let n,o;for(n=0,o=e.length;n<o;++n){const o=e[n];t&&!o.visible||i.push(o)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){const t=this;if(!1===t.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const e=t.getSortedVisibleDatasetMetas();for(let i=e.length-1;i>=0;--i)t._drawDataset(e[i]);t.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this,i=e.ctx,n=t._clip,o=!n.disabled,s=e.chartArea,a={meta:t,index:t.index,cancelable:!0};!1!==e.notifyPlugins("beforeDatasetDraw",a)&&(o&&Zt(i,{left:!1===n.left?0:s.left-n.left,right:!1===n.right?e.width:s.right+n.right,top:!1===n.top?0:s.top-n.top,bottom:!1===n.bottom?e.height:s.bottom+n.bottom}),t.controller.draw(),o&&Qt(i),a.cancelable=!1,e.notifyPlugins("afterDatasetDraw",a))}getElementsAtEventForMode(t,e,i,n){const o=Te.modes[e];return"function"==typeof o?o(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={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]}_updateDatasetVisibility(t,e){const i=this,n=e?"show":"hide",o=i.getDatasetMeta(t),s=o.controller._resolveAnimations(void 0,n);i.setDatasetVisibility(t,e),s.update(o,{visible:e}),i.update((e=>e.datasetIndex===t?n:void 0))}hide(t){this._updateDatasetVisibility(t,!1)}show(t){this._updateDatasetVisibility(t,!0)}_destroyDatasetMeta(t){const e=this,i=e._metasets&&e._metasets[t];i&&i.controller&&(i.controller._destroy(),delete e._metasets[t])}destroy(){const t=this,{canvas:e,ctx:i}=t;let n,o;for(t.stop(),a.remove(t),n=0,o=t.data.datasets.length;n<o;++n)t._destroyDatasetMeta(n);t.config.clearCache(),e&&(t.unbindEvents(),qt(e,i),t.platform.releaseContext(i),t.canvas=null,t.ctx=null),t.notifyPlugins("destroy"),delete Jn[t.id]}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this,e=t._listeners,i=t.platform,n=function(e,i,n){e.offsetX=i,e.offsetY=n,t._eventHandler(e)};J(t.options.events,(o=>((n,o)=>{i.addEventListener(t,n,o),e[n]=o})(o,n)))}bindResponsiveEvents(){const t=this;t._responsiveListeners||(t._responsiveListeners={});const e=t._responsiveListeners,i=t.platform,n=(n,o)=>{i.addEventListener(t,n,o),e[n]=o},o=(n,o)=>{e[n]&&(i.removeEventListener(t,n,o),delete e[n])},s=(e,i)=>{t.canvas&&t.resize(e,i)};let a;const r=()=>{o("attach",r),t.attached=!0,t.resize(),n("resize",s),n("detach",a)};a=()=>{t.attached=!1,o("resize",s),n("attach",r)},i.isAttached(t.canvas)?r():a()}unbindEvents(){const t=this;J(t._listeners,((e,i)=>{t.platform.removeEventListener(t,i,e)})),t._listeners={},J(t._responsiveListeners,((e,i)=>{t.platform.removeEventListener(t,i,e)})),t._responsiveListeners=void 0}updateHoverStyle(t,e,i){const n=i?"set":"remove";let o,s,a,r;for("dataset"===e&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+n+"DatasetHoverStyle"]()),a=0,r=t.length;a<r;++a){s=t[a];const e=s&&this.getDatasetMeta(s.datasetIndex).controller;e&&e[n+"HoverStyle"](s.element,s.datasetIndex,s.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this,i=e._active||[],n=t.map((({datasetIndex:t,index:i})=>{const n=e.getDatasetMeta(t);if(!n)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:n.data[i],index:i}}));!tt(n,i)&&(e._active=n,e._updateHoverStyles(n,i))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}_updateHoverStyles(t,e,i){const n=this,o=n.options.hover,s=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),a=s(e,t),r=i?t:s(t,e);a.length&&n.updateHoverStyle(a,o.mode,!1),r.length&&o.mode&&n.updateHoverStyle(r,o.mode,!0)}_eventHandler(t,e){const i=this,n={event:t,replay:e,cancelable:!0},o=e=>(e.options.events||this.options.events).includes(t.type);if(!1===i.notifyPlugins("beforeEvent",n,o))return;const s=i._handleEvent(t,e);return n.cancelable=!1,i.notifyPlugins("afterEvent",n,o),(s||n.changed)&&i.render(),i}_handleEvent(t,e){const i=this,{_active:n=[],options:o}=i,s=o.hover,a=e;let r=[],l=!1,c=null;return"mouseout"!==t.type&&(r=i.getElementsAtEventForMode(t,s.mode,s,a),c="click"===t.type?i._lastEvent:t),i._lastEvent=null,Gt(t,i.chartArea,i._minPadding)&&(Q(o.onHover,[t,r,i],i),"mouseup"!==t.type&&"click"!==t.type&&"contextmenu"!==t.type||Q(o.onClick,[t,r,i],i)),l=!tt(r,n),(l||e)&&(i._active=r,i._updateHoverStyles(r,n,e)),i._lastEvent=c,l}}const io=()=>J(eo.instances,(t=>t._plugins.invalidate())),no=!0;function oo(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}Object.defineProperties(eo,{defaults:{enumerable:no,value:xt},instances:{enumerable:no,value:Jn},overrides:{enumerable:no,value:ft},registry:{enumerable:no,value:Ln},version:{enumerable:no,value:"3.4.1"},getChart:{enumerable:no,value:to},register:{enumerable:no,value:(...t)=>{Ln.add(...t),io()}},unregister:{enumerable:no,value:(...t)=>{Ln.remove(...t),io()}}});class so{constructor(t){this.options=t||{}}formats(){return oo()}parse(t,e){return oo()}format(t,e){return oo()}add(t,e,i){return oo()}diff(t,e,i){return oo()}startOf(t,e,i){return oo()}endOf(t,e){return oo()}}so.override=function(t){Object.assign(so.prototype,t)};var ao={_date:so};function ro(t){const e=function(t){if(!t._cache.$bar){const e=t.getMatchingVisibleMetas("bar");let i=[];for(let n=0,o=e.length;n<o;n++)i=i.concat(e[n].controller.getAllParsedValues(t));t._cache.$bar=de(i.sort(((t,e)=>t-e)))}return t._cache.$bar}(t);let i,n,o,s,a=t._length;const r=()=>{32767!==o&&-32768!==o&&(ht(s)&&(a=Math.min(a,Math.abs(o-s)||a)),s=o)};for(i=0,n=e.length;i<n;++i)o=t.getPixelForValue(e[i]),r();for(s=void 0,i=0,n=t.ticks.length;i<n;++i)o=t.getPixelForTick(i),r();return a}function lo(t,e,i,n){return Y(t)?function(t,e,i,n){const o=i.parse(t[0],n),s=i.parse(t[1],n),a=Math.min(o,s),r=Math.max(o,s);let l=a,c=r;Math.abs(a)>Math.abs(r)&&(l=r,c=a),e[i.axis]=c,e._custom={barStart:l,barEnd:c,start:o,end:s,min:a,max:r}}(t,e,i,n):e[i.axis]=i.parse(t,n),e}function co(t,e,i,n){const o=t.iScale,s=t.vScale,a=o.getLabels(),r=o===s,l=[];let c,h,d,u;for(c=i,h=i+n;c<h;++c)u=e[c],d={},d[o.axis]=r||o.parse(a[c],c),l.push(lo(u,d,s,c));return l}function ho(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}class uo extends Ei{parsePrimitiveData(t,e,i,n){return co(t,e,i,n)}parseArrayData(t,e,i,n){return co(t,e,i,n)}parseObjectData(t,e,i,n){const{iScale:o,vScale:s}=t,{xAxisKey:a="x",yAxisKey:r="y"}=this._parsing,l="x"===o.axis?a:r,c="x"===s.axis?a:r,h=[];let d,u,f,g;for(d=i,u=i+n;d<u;++d)g=e[d],f={},f[o.axis]=o.parse(lt(g,l),d),h.push(lo(lt(g,c),f,s,d));return h}updateRangeFromParsed(t,e,i,n){super.updateRangeFromParsed(t,e,i,n);const o=i._custom;o&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:i,vScale:n}=e,o=this.getParsed(t),s=o._custom,a=ho(s)?"["+s.start+", "+s.end+"]":""+n.getLabelForValue(o[n.axis]);return{label:""+i.getLabelForValue(o[i.axis]),value:a}}initialize(){const t=this;t.enableOptionSharing=!0,super.initialize();t._cachedMeta.stack=t.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,i,n){const o=this,s="reset"===n,a=o._cachedMeta.vScale,r=a.getBasePixel(),l=a.isHorizontal(),c=o._getRuler(),h=o.resolveDataElementOptions(e,n),d=o.getSharedOptions(h),u=o.includeOptions(n,d);o.updateSharedOptions(d,n,h);for(let h=e;h<e+i;h++){const e=o.getParsed(h),i=s||$(e[a.axis])?{base:r,head:r}:o._calculateBarValuePixels(h),f=o._calculateBarIndexPixels(h,c),g=(e._stacks||{})[a.axis],p={horizontal:l,base:i.base,enableBorderRadius:!g||ho(e._custom)||o.index===g._top||o.index===g._bottom,x:l?i.head:f.center,y:l?f.center:i.head,height:l?f.size:Math.abs(i.size),width:l?Math.abs(i.size):f.size};u&&(p.options=d||o.resolveDataElementOptions(h,t[h].active?"active":n)),o.updateElement(t[h],h,p,n)}}_getStacks(t,e){const i=this._cachedMeta.iScale,n=i.getMatchingVisibleMetas(this._type),o=i.options.stacked,s=n.length,a=[];let r,l;for(r=0;r<s;++r)if(l=n[r],l.controller.options.grouped){if(void 0!==e){const t=l.controller.getParsed(e)[l.controller._cachedMeta.vScale.axis];if($(t)||isNaN(t))continue}if((!1===o||-1===a.indexOf(l.stack)||void 0===o&&void 0===l.stack)&&a.push(l.stack),l.index===t)break}return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){const n=this._getStacks(t,i),o=void 0!==e?n.indexOf(e):-1;return-1===o?n.length-1:o}_getRuler(){const t=this,e=t.options,i=t._cachedMeta,n=i.iScale,o=[];let s,a;for(s=0,a=i.data.length;s<a;++s)o.push(n.getPixelForValue(t.getParsed(s)[n.axis],s));const r=e.barThickness;return{min:r||ro(n),pixels:o,start:n._startPixel,end:n._endPixel,stackCount:t._getStackCount(),scale:n,grouped:e.grouped,ratio:r?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(t){const e=this,{vScale:i,_stacked:n}=e._cachedMeta,{base:o,minBarLength:s}=e.options,a=e.getParsed(t),r=a._custom,l=ho(r);let c,h,d=a[i.axis],u=0,f=n?e.applyStack(i,a,n):d;f!==d&&(u=f-d,f=d),l&&(d=r.barStart,f=r.barEnd-r.barStart,0!==d&&Dt(d)!==Dt(r.barEnd)&&(u=0),u+=d);const g=$(o)||l?u:o;let p=i.getPixelForValue(g);c=this.chart.getDataVisibility(t)?i.getPixelForValue(u+f):p,h=c-p,void 0!==s&&Math.abs(h)<s&&(h=h<0?-s:s,0===d&&(p-=h/2),c=p+h);const m=o||0;if(p===i.getPixelForValue(m)){const t=i.getLineWidthForValue(m)/2;h>0?(p+=t,h-=t):h<0&&(p-=t,h+=t)}return{size:h,base:p,head:c,center:c+h/2}}_calculateBarIndexPixels(t,e){const i=this,n=e.scale,o=i.options,s=o.skipNull,a=K(o.maxBarThickness,1/0);let r,l;if(e.grouped){const n=s?i._getStackCount(t):e.stackCount,c="flex"===o.barThickness?function(t,e,i,n){const o=e.pixels,s=o[t];let a=t>0?o[t-1]:null,r=t<o.length-1?o[t+1]:null;const l=i.categoryPercentage;null===a&&(a=s-(null===r?e.end-e.start:r-s)),null===r&&(r=s+s-a);const c=s-(s-Math.min(a,r))/2*l;return{chunk:Math.abs(r-a)/2*l/n,ratio:i.barPercentage,start:c}}(t,e,o,n):function(t,e,i,n){const o=i.barThickness;let s,a;return $(o)?(s=e.min*i.categoryPercentage,a=i.barPercentage):(s=o*n,a=1),{chunk:s/n,ratio:a,start:e.pixels[t]-s/2}}(t,e,o,n),h=i._getStackIndex(i.index,i._cachedMeta.stack,s?t:void 0);r=c.start+c.chunk*h+c.chunk/2,l=Math.min(a,c.chunk*c.ratio)}else r=n.getPixelForValue(i.getParsed(t)[n.axis],t),l=Math.min(a,e.min*e.ratio);return{base:r-l/2,head:r+l/2,center:r,size:l}}draw(){const t=this,e=t._cachedMeta,i=e.vScale,n=e.data,o=n.length;let s=0;for(;s<o;++s)null!==t.getParsed(s)[i.axis]&&n[s].draw(t._ctx)}}uo.id="bar",uo.defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}},uo.overrides={interaction:{mode:"index"},scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};class fo extends Ei{initialize(){this.enableOptionSharing=!0,super.initialize()}parseObjectData(t,e,i,n){const{xScale:o,yScale:s}=t,{xAxisKey:a="x",yAxisKey:r="y"}=this._parsing,l=[];let c,h,d;for(c=i,h=i+n;c<h;++c)d=e[c],l.push({x:o.parse(lt(d,a),c),y:s.parse(lt(d,r),c),_custom:d&&d.r&&+d.r});return l}getMaxOverflow(){const{data:t,_parsed:e}=this._cachedMeta;let i=0;for(let n=t.length-1;n>=0;--n)i=Math.max(i,t[n].size()/2,e[n]._custom);return i>0&&i}getLabelAndValue(t){const e=this._cachedMeta,{xScale:i,yScale:n}=e,o=this.getParsed(t),s=i.getLabelForValue(o.x),a=n.getLabelForValue(o.y),r=o._custom;return{label:e.label,value:"("+s+", "+a+(r?", "+r:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,n){const o=this,s="reset"===n,{iScale:a,vScale:r}=o._cachedMeta,l=o.resolveDataElementOptions(e,n),c=o.getSharedOptions(l),h=o.includeOptions(n,c),d=a.axis,u=r.axis;for(let l=e;l<e+i;l++){const e=t[l],i=!s&&o.getParsed(l),c={},f=c[d]=s?a.getPixelForDecimal(.5):a.getPixelForValue(i[d]),g=c[u]=s?r.getBasePixel():r.getPixelForValue(i[u]);c.skip=isNaN(f)||isNaN(g),h&&(c.options=o.resolveDataElementOptions(l,e.active?"active":n),s&&(c.options.radius=0)),o.updateElement(e,l,c,n)}o.updateSharedOptions(c,n,l)}resolveDataElementOptions(t,e){const i=this.getParsed(t);let n=super.resolveDataElementOptions(t,e);n.$shared&&(n=Object.assign({},n,{$shared:!1}));const o=n.radius;return"active"!==e&&(n.radius=0),n.radius+=K(i&&i._custom,o),n}}fo.id="bubble",fo.defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}},fo.overrides={scales:{x:{type:"linear"},y:{type:"linear"}},plugins:{tooltip:{callbacks:{title:()=>""}}}};class go extends Ei{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;let o,s;for(o=t,s=t+e;o<s;++o)n._parsed[o]=+i[o]}_getRotation(){return Et(this.options.rotation-90)}_getCircumference(){return Et(this.options.circumference)}_getRotationExtents(){let t=_t,e=-_t;const i=this;for(let n=0;n<i.chart.data.datasets.length;++n)if(i.chart.isDatasetVisible(n)){const o=i.chart.getDatasetMeta(n).controller,s=o._getRotation(),a=o._getCircumference();t=Math.min(t,s),e=Math.max(e,s+a)}return{rotation:t,circumference:e-t}}update(t){const e=this,i=e.chart,{chartArea:n}=i,o=e._cachedMeta,s=o.data,a=e.getMaxBorderWidth()+e.getMaxOffset(s)+e.options.spacing,r=Math.max((Math.min(n.width,n.height)-a)/2,0),l=Math.min(G(e.options.cutout,r),1),c=e._getRingWeight(e.index),{circumference:h,rotation:d}=e._getRotationExtents(),{ratioX:u,ratioY:f,offsetX:g,offsetY:p}=function(t,e,i){let n=1,o=1,s=0,a=0;if(e<_t){const r=t,l=r+e,c=Math.cos(r),h=Math.sin(r),d=Math.cos(l),u=Math.sin(l),f=(t,e,n)=>Nt(t,r,l,!0)?1:Math.max(e,e*i,n,n*i),g=(t,e,n)=>Nt(t,r,l,!0)?-1:Math.min(e,e*i,n,n*i),p=f(0,c,d),m=f(Mt,h,u),x=g(bt,c,d),b=g(bt+Mt,h,u);n=(p-x)/2,o=(m-b)/2,s=-(p+x)/2,a=-(m+b)/2}return{ratioX:n,ratioY:o,offsetX:s,offsetY:a}}(d,h,l),m=(n.width-a)/u,x=(n.height-a)/f,b=Math.max(Math.min(m,x)/2,0),_=Z(e.options.radius,b),y=(_-Math.max(_*l,0))/e._getVisibleDatasetWeightTotal();e.offsetX=g*_,e.offsetY=p*_,o.total=e.calculateTotal(),e.outerRadius=_-y*e._getRingWeightOffset(e.index),e.innerRadius=Math.max(e.outerRadius-y*c,0),e.updateElements(s,0,s.length,t)}_circumference(t,e){const i=this,n=i.options,o=i._cachedMeta,s=i._getCircumference();return e&&n.animation.animateRotate||!this.chart.getDataVisibility(t)||null===o._parsed[t]?0:i.calculateCircumference(o._parsed[t]*s/_t)}updateElements(t,e,i,n){const o=this,s="reset"===n,a=o.chart,r=a.chartArea,l=a.options.animation,c=(r.left+r.right)/2,h=(r.top+r.bottom)/2,d=s&&l.animateScale,u=d?0:o.innerRadius,f=d?0:o.outerRadius,g=o.resolveDataElementOptions(e,n),p=o.getSharedOptions(g),m=o.includeOptions(n,p);let x,b=o._getRotation();for(x=0;x<e;++x)b+=o._circumference(x,s);for(x=e;x<e+i;++x){const e=o._circumference(x,s),i=t[x],a={x:c+o.offsetX,y:h+o.offsetY,startAngle:b,endAngle:b+e,circumference:e,outerRadius:f,innerRadius:u};m&&(a.options=p||o.resolveDataElementOptions(x,i.active?"active":n)),b+=e,o.updateElement(i,x,a,n)}o.updateSharedOptions(p,n,g)}calculateTotal(){const t=this._cachedMeta,e=t.data;let i,n=0;for(i=0;i<e.length;i++){const e=t._parsed[i];null!==e&&!isNaN(e)&&this.chart.getDataVisibility(i)&&(n+=Math.abs(e))}return n}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?_t*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],o=Fi(e._parsed[t],i.options.locale);return{label:n[t]||"",value:o}}getMaxBorderWidth(t){const e=this;let i=0;const n=e.chart;let o,s,a,r,l;if(!t)for(o=0,s=n.data.datasets.length;o<s;++o)if(n.isDatasetVisible(o)){a=n.getDatasetMeta(o),t=a.data,r=a.controller,r!==e&&r.configure();break}if(!t)return 0;for(o=0,s=t.length;o<s;++o)l=r.resolveDataElementOptions(o),"inner"!==l.borderAlign&&(i=Math.max(i,l.borderWidth||0,l.hoverBorderWidth||0));return i}getMaxOffset(t){let e=0;for(let i=0,n=t.length;i<n;++i){const t=this.resolveDataElementOptions(i);e=Math.max(e,t.offset||0,t.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(e+=this._getRingWeight(i));return e}_getRingWeight(t){return Math.max(K(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}go.id="doughnut",go.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"},go.descriptors={_scriptable:t=>"spacing"!==t,_indexable:t=>"spacing"!==t},go.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 o=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.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 Y(e)?(e=e.slice(),e[0]+=i):e+=i,e}}}}};class po extends Ei{initialize(){this.enableOptionSharing=!0,super.initialize()}update(t){const e=this,i=e._cachedMeta,{dataset:n,data:o=[],_dataset:s}=i,a=e.chart._animationsDisabled;let{start:r,count:l}=function(t,e,i){const n=e.length;let o=0,s=n;if(t._sorted){const{iScale:a,_parsed:r}=t,l=a.axis,{min:c,max:h,minDefined:d,maxDefined:u}=a.getUserBounds();d&&(o=Ht(Math.min(se(r,a.axis,c).lo,i?n:se(e,l,a.getPixelForValue(c)).lo),0,n-1)),s=u?Ht(Math.max(se(r,a.axis,h).hi+1,i?0:se(e,l,a.getPixelForValue(h)).hi+1),o,n)-o:n-o}return{start:o,count:s}}(i,o,a);e._drawStart=r,e._drawCount=l,function(t){const{xScale:e,yScale:i,_scaleRanges:n}=t,o={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!n)return t._scaleRanges=o,!0;const s=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==i.min||n.ymax!==i.max;return Object.assign(n,o),s}(i)&&(r=0,l=o.length),n._decimated=!!s._decimated,n.points=o;const c=e.resolveDatasetElementOptions(t);e.options.showLine||(c.borderWidth=0),c.segment=e.options.segment,e.updateElement(n,void 0,{animated:!a,options:c},t),e.updateElements(o,r,l,t)}updateElements(t,e,i,n){const o=this,s="reset"===n,{iScale:a,vScale:r,_stacked:l}=o._cachedMeta,c=o.resolveDataElementOptions(e,n),h=o.getSharedOptions(c),d=o.includeOptions(n,h),u=a.axis,f=r.axis,g=o.options.spanGaps,p=Tt(g)?g:Number.POSITIVE_INFINITY,m=o.chart._animationsDisabled||s||"none"===n;let x=e>0&&o.getParsed(e-1);for(let c=e;c<e+i;++c){const e=t[c],i=o.getParsed(c),g=m?e:{},b=$(i[f]),_=g[u]=a.getPixelForValue(i[u],c),y=g[f]=s||b?r.getBasePixel():r.getPixelForValue(l?o.applyStack(r,i,l):i[f],c);g.skip=isNaN(_)||isNaN(y)||b,g.stop=c>0&&i[u]-x[u]>p,g.parsed=i,d&&(g.options=h||o.resolveDataElementOptions(c,e.active?"active":n)),m||o.updateElement(e,c,g,n),x=i}o.updateSharedOptions(h,n,c)}getMaxOverflow(){const t=this,e=t._cachedMeta,i=e.dataset,n=i.options&&i.options.borderWidth||0,o=e.data||[];if(!o.length)return n;const s=o[0].size(t.resolveDataElementOptions(0)),a=o[o.length-1].size(t.resolveDataElementOptions(o.length-1));return Math.max(n,s,a)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}po.id="line",po.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},po.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class mo extends Ei{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||[],o=Fi(e._parsed[t].r,i.options.locale);return{label:n[t]||"",value:o}}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}_updateRadius(){const t=this,e=t.chart,i=e.chartArea,n=e.options,o=Math.min(i.right-i.left,i.bottom-i.top),s=Math.max(o/2,0),a=(s-Math.max(n.cutoutPercentage?s/100*n.cutoutPercentage:1,0))/e.getVisibleDatasetCount();t.outerRadius=s-a*t.index,t.innerRadius=t.outerRadius-a}updateElements(t,e,i,n){const o=this,s="reset"===n,a=o.chart,r=o.getDataset(),l=a.options.animation,c=o._cachedMeta.rScale,h=c.xCenter,d=c.yCenter,u=c.getIndexAngle(0)-.5*bt;let f,g=u;const p=360/o.countVisibleElements();for(f=0;f<e;++f)g+=o._computeAngle(f,n,p);for(f=e;f<e+i;f++){const e=t[f];let i=g,m=g+o._computeAngle(f,n,p),x=a.getDataVisibility(f)?c.getDistanceFromCenterForValue(r.data[f]):0;g=m,s&&(l.animateScale&&(x=0),l.animateRotate&&(i=m=u));const b={x:h,y:d,innerRadius:0,outerRadius:x,startAngle:i,endAngle:m,options:o.resolveDataElementOptions(f,e.active?"active":n)};o.updateElement(e,f,b,n)}}countVisibleElements(){const t=this.getDataset(),e=this._cachedMeta;let i=0;return e.data.forEach(((e,n)=>{!isNaN(t.data[n])&&this.chart.getDataVisibility(n)&&i++})),i}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?Et(this.resolveDataElementOptions(t,e).angle||i):0}}mo.id="polarArea",mo.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},mo.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 o=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.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 xo extends go{}xo.id="pie",xo.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class bo extends Ei{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,i=e._cachedMeta,n=i.dataset,o=i.data||[],s=i.iScale.getLabels();if(n.points=o,"resize"!==t){const i=e.resolveDatasetElementOptions(t);e.options.showLine||(i.borderWidth=0);const a={_loop:!0,_fullLoop:s.length===o.length,options:i};e.updateElement(n,void 0,a,t)}e.updateElements(o,0,o.length,t)}updateElements(t,e,i,n){const o=this,s=o.getDataset(),a=o._cachedMeta.rScale,r="reset"===n;for(let l=e;l<e+i;l++){const e=t[l],i=o.resolveDataElementOptions(l,e.active?"active":n),c=a.getPointPositionForValue(l,s.data[l]),h=r?a.xCenter:c.x,d=r?a.yCenter:c.y,u={x:h,y:d,angle:c.angle,skip:isNaN(h)||isNaN(d),options:i};o.updateElement(e,l,u,n)}}}bo.id="radar",bo.defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}},bo.overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};class _o extends po{}_o.id="scatter",_o.defaults={showLine:!1,fill:!1},_o.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title:()=>"",label:t=>"("+t.label+", "+t.formattedValue+")"}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var yo=Object.freeze({__proto__:null,BarController:uo,BubbleController:fo,DoughnutController:go,LineController:po,PolarAreaController:mo,PieController:xo,RadarController:bo,ScatterController:_o});function vo(t,e,i){const{startAngle:n,pixelMargin:o,x:s,y:a,outerRadius:r,innerRadius:l}=e;let c=o/r;t.beginPath(),t.arc(s,a,r,n-c,i+c),l>o?(c=o/l,t.arc(s,a,l,i+c,n-c,!0)):t.arc(s,a,o,i+Mt,n-Mt),t.closePath(),t.clip()}function wo(t,e,i,n){const o=Ee(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);const s=(i-e)/2,a=Math.min(s,n*e/2),r=t=>{const e=(i-Math.min(s,t))*n/2;return Ht(t,0,Math.min(s,e))};return{outerStart:r(o.outerStart),outerEnd:r(o.outerEnd),innerStart:Ht(o.innerStart,0,a),innerEnd:Ht(o.innerEnd,0,a)}}function Mo(t,e,i,n){return{x:i+t*Math.cos(e),y:n+t*Math.sin(e)}}function ko(t,e,i,n,o){const{x:s,y:a,startAngle:r,pixelMargin:l,innerRadius:c}=e,h=Math.max(e.outerRadius+n+i-l,0),d=c>0?c+n+i+l:0;let u=0;const f=o-r;if(n){const t=((c>0?c-n:0)+(h>0?h-n:0))/2;u=(f-(0!==t?f*t/(t+n):f))/2}const g=(f-Math.max(.001,f*h-i/bt)/h)/2,p=r+g+u,m=o-g-u,{outerStart:x,outerEnd:b,innerStart:_,innerEnd:y}=wo(e,d,h,m-p),v=h-x,w=h-b,M=p+x/v,k=m-b/w,S=d+_,P=d+y,D=p+_/S,C=m-y/P;if(t.beginPath(),t.arc(s,a,h,M,k),b>0){const e=Mo(w,k,s,a);t.arc(e.x,e.y,b,k,m+Mt)}const O=Mo(P,m,s,a);if(t.lineTo(O.x,O.y),y>0){const e=Mo(P,C,s,a);t.arc(e.x,e.y,y,m+Mt,C+Math.PI)}if(t.arc(s,a,d,m-y/d,p+_/d,!0),_>0){const e=Mo(S,D,s,a);t.arc(e.x,e.y,_,D+Math.PI,p-Mt)}const T=Mo(v,p,s,a);if(t.lineTo(T.x,T.y),x>0){const e=Mo(v,M,s,a);t.arc(e.x,e.y,x,p-Mt,M)}t.closePath()}function So(t,e,i,n,o){const{options:s}=e,a="inner"===s.borderAlign;s.borderWidth&&(a?(t.lineWidth=2*s.borderWidth,t.lineJoin="round"):(t.lineWidth=s.borderWidth,t.lineJoin="bevel"),e.fullCircles&&function(t,e,i){const{x:n,y:o,startAngle:s,pixelMargin:a,fullCircles:r}=e,l=Math.max(e.outerRadius-a,0),c=e.innerRadius+a;let h;for(i&&vo(t,e,s+_t),t.beginPath(),t.arc(n,o,c,s+_t,s,!0),h=0;h<r;++h)t.stroke();for(t.beginPath(),t.arc(n,o,l,s,s+_t),h=0;h<r;++h)t.stroke()}(t,e,a),a&&vo(t,e,o),ko(t,e,i,n,o),t.stroke())}class Po extends zi{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:o,distance:s}=Ft(n,{x:t,y:e}),{startAngle:a,endAngle:r,innerRadius:l,outerRadius:c,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),d=this.options.spacing/2;return(h>=_t||Nt(o,a,r))&&(s>=l+d&&s<=c+d)}getCenterPoint(t){const{x:e,y:i,startAngle:n,endAngle:o,innerRadius:s,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:r,spacing:l}=this.options,c=(n+o)/2,h=(s+a+l+r)/2;return{x:e+Math.cos(c)*h,y:i+Math.sin(c)*h}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const e=this,{options:i,circumference:n}=e,o=(i.offset||0)/2,s=(i.spacing||0)/2;if(e.pixelMargin="inner"===i.borderAlign?.33:0,e.fullCircles=n>_t?Math.floor(n/_t):0,0===n||e.innerRadius<0||e.outerRadius<0)return;t.save();let a=0;if(o){a=o/2;const i=(e.startAngle+e.endAngle)/2;t.translate(Math.cos(i)*a,Math.sin(i)*a),e.circumference>=bt&&(a=o)}t.fillStyle=i.backgroundColor,t.strokeStyle=i.borderColor;const r=function(t,e,i,n){const{fullCircles:o,startAngle:s,circumference:a}=e;let r=e.endAngle;if(o){ko(t,e,i,n,s+_t);for(let e=0;e<o;++e)t.fill();isNaN(a)||(r=s+a%_t,a%_t==0&&(r+=_t))}return ko(t,e,i,n,r),t.fill(),r}(t,e,a,s);So(t,e,a,s,r),t.restore()}}function Do(t,e,i=e){t.lineCap=K(i.borderCapStyle,e.borderCapStyle),t.setLineDash(K(i.borderDash,e.borderDash)),t.lineDashOffset=K(i.borderDashOffset,e.borderDashOffset),t.lineJoin=K(i.borderJoinStyle,e.borderJoinStyle),t.lineWidth=K(i.borderWidth,e.borderWidth),t.strokeStyle=K(i.borderColor,e.borderColor)}function Co(t,e,i){t.lineTo(i.x,i.y)}function Oo(t,e,i={}){const n=t.length,{start:o=0,end:s=n-1}=i,{start:a,end:r}=e,l=Math.max(o,a),c=Math.min(s,r),h=o<a&&s<a||o>r&&s>r;return{count:n,start:l,loop:e.loop,ilen:c<l&&!h?n+c-l:c-l}}function To(t,e,i,n){const{points:o,options:s}=e,{count:a,start:r,loop:l,ilen:c}=Oo(o,i,n),h=function(t){return t.stepped?Jt:t.tension||"monotone"===t.cubicInterpolationMode?te:Co}(s);let d,u,f,{move:g=!0,reverse:p}=n||{};for(d=0;d<=c;++d)u=o[(r+(p?c-d:d))%a],u.skip||(g?(t.moveTo(u.x,u.y),g=!1):h(t,f,u,p,s.stepped),f=u);return l&&(u=o[(r+(p?c:0))%a],h(t,f,u,p,s.stepped)),!!l}function Ao(t,e,i,n){const o=e.points,{count:s,start:a,ilen:r}=Oo(o,i,n),{move:l=!0,reverse:c}=n||{};let h,d,u,f,g,p,m=0,x=0;const b=t=>(a+(c?r-t:t))%s,_=()=>{f!==g&&(t.lineTo(m,g),t.lineTo(m,f),t.lineTo(m,p))};for(l&&(d=o[b(0)],t.moveTo(d.x,d.y)),h=0;h<=r;++h){if(d=o[b(h)],d.skip)continue;const e=d.x,i=d.y,n=0|e;n===u?(i<f?f=i:i>g&&(g=i),m=(x*m+e)/++x):(_(),t.lineTo(e,i),u=n,x=0,f=g=i),p=i}_()}function Lo(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return!(t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i)?Ao:To}Po.id="arc",Po.defaults={borderAlign:"center",borderColor:"#fff",borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0},Po.defaultRoutes={backgroundColor:"backgroundColor"};const Ro="function"==typeof Path2D;function Eo(t,e,i,n){Ro&&1===e.segments.length?function(t,e,i,n){let o=e._path;o||(o=e._path=new Path2D,e.path(o,i,n)&&o.closePath()),Do(t,e.options),t.stroke(o)}(t,e,i,n):function(t,e,i,n){const{segments:o,options:s}=e,a=Lo(e);for(const r of o)Do(t,s,r.style),t.beginPath(),a(t,e,r,{start:i,end:i+n-1})&&t.closePath(),t.stroke()}(t,e,i,n)}class zo extends zi{constructor(t){super(),this.animated=!0,this.options=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,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this,n=i.options;if((n.tension||"monotone"===n.cubicInterpolationMode)&&!n.stepped&&!i._pointsUpdated){const o=n.spanGaps?i._loop:i._fullLoop;pn(i._points,n,t,o,e),i._pointsUpdated=!0}}set points(t){const e=this;e._points=t,delete e._segments,delete e._path,e._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=Pn(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){const i=this,n=i.options,o=t[e],s=i.points,a=Sn(i,{property:e,start:o,end:o});if(!a.length)return;const r=[],l=function(t){return t.stepped?xn:t.tension||"monotone"===t.cubicInterpolationMode?bn:mn}(n);let c,h;for(c=0,h=a.length;c<h;++c){const{start:i,end:h}=a[c],d=s[i],u=s[h];if(d===u){r.push(d);continue}const f=l(d,u,Math.abs((o-d[e])/(u[e]-d[e])),n.stepped);f[e]=t[e],r.push(f)}return 1===r.length?r[0]:r}pathSegment(t,e,i){return Lo(this)(t,this,e,i)}path(t,e,i){const n=this,o=n.segments,s=Lo(n);let a=n._loop;e=e||0,i=i||n.points.length-e;for(const r of o)a&=s(t,n,r,{start:e,end:e+i-1});return!!a}draw(t,e,i,n){const o=this,s=o.options||{};(o.points||[]).length&&s.borderWidth&&(t.save(),Eo(t,o,i,n),t.restore(),o.animated&&(o._pointsUpdated=!1,o._path=void 0))}}function Io(t,e,i,n){const o=t.options,{[i]:s}=t.getProps([i],n);return Math.abs(e-s)<o.radius+o.hitRadius}zo.id="line",zo.defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0},zo.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"},zo.descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};class Fo extends zi{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:o,y:s}=this.getProps(["x","y"],i);return Math.pow(t-o,2)+Math.pow(e-s,2)<Math.pow(n.hitRadius+n.radius,2)}inXRange(t,e){return Io(this,t,"x",e)}inYRange(t,e){return Io(this,t,"y",e)}getCenterPoint(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}size(t){let e=(t=t||this.options||{}).radius||0;e=Math.max(e,e&&t.hoverRadius||0);return 2*(e+(e&&t.borderWidth||0))}draw(t){const e=this,i=e.options;e.skip||i.radius<.1||(t.strokeStyle=i.borderColor,t.lineWidth=i.borderWidth,t.fillStyle=i.backgroundColor,Kt(t,i,e.x,e.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function Bo(t,e){const{x:i,y:n,base:o,width:s,height:a}=t.getProps(["x","y","base","width","height"],e);let r,l,c,h,d;return t.horizontal?(d=a/2,r=Math.min(i,o),l=Math.max(i,o),c=n-d,h=n+d):(d=s/2,r=i-d,l=i+d,c=Math.min(n,o),h=Math.max(n,o)),{left:r,top:c,right:l,bottom:h}}function Vo(t){let e=t.options.borderSkipped;const i={};return e?(e=t.horizontal?Wo(e,"left","right",t.base>t.x):Wo(e,"bottom","top",t.base<t.y),i[e]=!0,i):i}function Wo(t,e,i,n){var o,s,a;return n?(a=i,t=No(t=(o=t)===(s=e)?a:o===a?s:o,i,e)):t=No(t,e,i),t}function No(t,e,i){return"start"===t?e:"end"===t?i:t}function Ho(t,e,i,n){return t?0:Math.max(Math.min(e,n),i)}function jo(t){const e=Bo(t),i=e.right-e.left,n=e.bottom-e.top,o=function(t,e,i){const n=t.options.borderWidth,o=Vo(t),s=ze(n);return{t:Ho(o.top,s.top,0,i),r:Ho(o.right,s.right,0,e),b:Ho(o.bottom,s.bottom,0,i),l:Ho(o.left,s.left,0,e)}}(t,i/2,n/2),s=function(t,e,i){const{enableBorderRadius:n}=t.getProps(["enableBorderRadius"]),o=t.options.borderRadius,s=Ie(o),a=Math.min(e,i),r=Vo(t),l=n||U(o);return{topLeft:Ho(!l||r.top||r.left,s.topLeft,0,a),topRight:Ho(!l||r.top||r.right,s.topRight,0,a),bottomLeft:Ho(!l||r.bottom||r.left,s.bottomLeft,0,a),bottomRight:Ho(!l||r.bottom||r.right,s.bottomRight,0,a)}}(t,i/2,n/2);return{outer:{x:e.left,y:e.top,w:i,h:n,radius:s},inner:{x:e.left+o.l,y:e.top+o.t,w:i-o.l-o.r,h:n-o.t-o.b,radius:{topLeft:Math.max(0,s.topLeft-Math.max(o.t,o.l)),topRight:Math.max(0,s.topRight-Math.max(o.t,o.r)),bottomLeft:Math.max(0,s.bottomLeft-Math.max(o.b,o.l)),bottomRight:Math.max(0,s.bottomRight-Math.max(o.b,o.r))}}}}function $o(t,e,i,n){const o=null===e,s=null===i,a=t&&!(o&&s)&&Bo(t,n);return a&&(o||e>=a.left&&e<=a.right)&&(s||i>=a.top&&i<=a.bottom)}function Yo(t,e){t.rect(e.x,e.y,e.w,e.h)}Fo.id="point",Fo.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},Fo.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};class Uo extends zi{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,t&&Object.assign(this,t)}draw(t){const e=this.options,{inner:i,outer:n}=jo(this),o=(s=n.radius).topLeft||s.topRight||s.bottomLeft||s.bottomRight?ne:Yo;var s;t.save(),n.w===i.w&&n.h===i.h||(t.beginPath(),o(t,n),t.clip(),o(t,i),t.fillStyle=e.borderColor,t.fill("evenodd")),t.beginPath(),o(t,i),t.fillStyle=e.backgroundColor,t.fill(),t.restore()}inRange(t,e,i){return $o(this,t,e,i)}inXRange(t,e){return $o(this,t,null,e)}inYRange(t,e){return $o(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:n,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(e+n)/2:e,y:o?i:(i+n)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}Uo.id="bar",Uo.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,enableBorderRadius:!0,pointStyle:void 0},Uo.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};var Xo=Object.freeze({__proto__:null,ArcElement:Po,LineElement:zo,PointElement:Fo,BarElement:Uo});function qo(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{value:e})}}function Ko(t){t.data.datasets.forEach((t=>{qo(t)}))}var Go={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,i)=>{if(!i.enabled)return void Ko(t);const n=t.width;t.data.datasets.forEach(((e,o)=>{const{_data:s,indexAxis:a}=e,r=t.getDatasetMeta(o),l=s||e.data;if("y"===Ve([a,t.options.indexAxis]))return;if("line"!==r.type)return;const c=t.scales[r.xAxisID];if("linear"!==c.type&&"time"!==c.type)return;if(t.options.parsing)return;let h,{start:d,count:u}=function(t,e){const i=e.length;let n,o=0;const{iScale:s}=t,{min:a,max:r,minDefined:l,maxDefined:c}=s.getUserBounds();return l&&(o=Ht(se(e,s.axis,a).lo,0,i-1)),n=c?Ht(se(e,s.axis,r).hi+1,o,i)-o:i-o,{start:o,count:n}}(r,l);if(u<=4*n)qo(e);else{switch($(s)&&(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":h=function(t,e,i,n,o){const s=o.samples||n;if(s>=i)return t.slice(e,e+i);const a=[],r=(i-2)/(s-2);let l=0;const c=e+i-1;let h,d,u,f,g,p=e;for(a[l++]=t[p],h=0;h<s-2;h++){let n,o=0,s=0;const c=Math.floor((h+1)*r)+1+e,m=Math.min(Math.floor((h+2)*r)+1,i)+e,x=m-c;for(n=c;n<m;n++)o+=t[n].x,s+=t[n].y;o/=x,s/=x;const b=Math.floor(h*r)+1+e,_=Math.floor((h+1)*r)+1+e,{x:y,y:v}=t[p];for(u=f=-1,n=b;n<_;n++)f=.5*Math.abs((y-o)*(t[n].y-v)-(y-t[n].x)*(s-v)),f>u&&(u=f,d=t[n],g=n);a[l++]=d,p=g}return a[l++]=t[c],a}(l,d,u,n,i);break;case"min-max":h=function(t,e,i,n){let o,s,a,r,l,c,h,d,u,f,g=0,p=0;const m=[],x=e+i-1,b=t[e].x,_=t[x].x-b;for(o=e;o<e+i;++o){s=t[o],a=(s.x-b)/_*n,r=s.y;const e=0|a;if(e===l)r<u?(u=r,c=o):r>f&&(f=r,h=o),g=(p*g+s.x)/++p;else{const i=o-1;if(!$(c)&&!$(h)){const e=Math.min(c,h),n=Math.max(c,h);e!==d&&e!==i&&m.push({...t[e],x:g}),n!==d&&n!==i&&m.push({...t[n],x:g})}o>0&&i!==d&&m.push(t[i]),m.push(s),l=e,p=0,u=f=r,c=h=d=o}}return m}(l,d,u,n);break;default:throw new Error(`Unsupported decimation algorithm '${i.algorithm}'`)}e._decimated=h}}))},destroy(t){Ko(t)}};function Zo(t,e,i){const n=function(t){const e=t.options,i=e.fill;let n=K(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 o=parseFloat(n);return X(o)&&Math.floor(o)===o?("-"!==n[0]&&"+"!==n[0]||(o=e+o),!(o===e||o<0||o>=i)&&o):["origin","start","end","stack"].indexOf(n)>=0&&n}class Qo{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:n,y:o,radius:s}=this;return e=e||{start:0,end:_t},t.arc(n,o,s,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:n}=this,o=t.angle;return{x:e+Math.cos(o)*n,y:i+Math.sin(o)*n,angle:o}}}function Jo(t){return(t.scale||{}).getPointPositionForValue?function(t){const{scale:e,fill:i}=t,n=e.options,o=e.getLabels().length,s=[],a=n.reverse?e.max:e.min,r=n.reverse?e.min:e.max;let l,c,h;if(h="start"===i?a:"end"===i?r:U(i)?i.value:e.getBaseValue(),n.grid.circular)return c=e.getPointPositionForValue(0,a),new Qo({x:c.x,y:c.y,radius:e.getDistanceFromCenterForValue(h)});for(l=0;l<o;++l)s.push(e.getPointPositionForValue(l,h));return s}(t):function(t){const{scale:e={},fill:i}=t;let n,o=null;return"start"===i?o=e.bottom:"end"===i?o=e.top:U(i)?o=e.getPixelForValue(i.value):e.getBasePixel&&(o=e.getBasePixel()),X(o)?(n=e.isHorizontal(),{x:n?o:null,y:n?null:o}):null}(t)}function ts(t,e,i){for(;e>t;e--){const t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function es(t){const{chart:e,scale:i,index:n,line:o}=t,s=[],a=o.segments,r=o.points,l=function(t,e){const i=[],n=t.getSortedVisibleDatasetMetas();for(let t=0;t<n.length;t++){const o=n[t];if(o.index===e)break;is(o)&&i.unshift(o.dataset)}return i}(e,n);l.push(ss({x:null,y:i.bottom},o));for(let t=0;t<a.length;t++){const e=a[t];for(let t=e.start;t<=e.end;t++)ns(s,r[t],l)}return new zo({points:s,options:{}})}const is=t=>"line"===t.type&&!t.hidden;function ns(t,e,i){const n=[];for(let o=0;o<i.length;o++){const s=i[o],{first:a,last:r,point:l}=os(s,e,"x");if(!(!l||a&&r))if(a)n.unshift(l);else if(t.push(l),!r)break}t.push(...n)}function os(t,e,i){const n=t.interpolate(e,i);if(!n)return{};const o=n[i],s=t.segments,a=t.points;let r=!1,l=!1;for(let t=0;t<s.length;t++){const e=s[t],n=a[e.start][i],c=a[e.end][i];if(o>=n&&o<=c){r=o===n,l=o===c;break}}return{first:r,last:l,point:n}}function ss(t,e){let i=[],n=!1;return Y(t)?(n=!0,i=t):i=function(t,e){const{x:i=null,y:n=null}=t||{},o=e.points,s=[];return e.segments.forEach((({start:t,end:e})=>{e=ts(t,e,o);const a=o[t],r=o[e];null!==n?(s.push({x:a.x,y:n}),s.push({x:r.x,y:n})):null!==i&&(s.push({x:i,y:a.y}),s.push({x:i,y:r.y}))})),s}(t,e),i.length?new zo({points:i,options:{tension:0},_loop:n,_fullLoop:n}):null}function as(t,e,i){let n=t[e].fill;const o=[e];let s;if(!i)return n;for(;!1!==n&&-1===o.indexOf(n);){if(!X(n))return n;if(s=t[n],!s)return!1;if(s.visible)return n;o.push(n),n=s.fill}return!1}function rs(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 ls(t,e,i,n){if(n)return;let o=e[t],s=i[t];return"angle"===t&&(o=Wt(o),s=Wt(s)),{property:t,start:o,end:s}}function cs(t,e,i,n){return t&&e?n(t[i],e[i]):t?t[i]:e?e[i]:0}function hs(t,e,i){const{top:n,bottom:o}=e.chart.chartArea,{property:s,start:a,end:r}=i||{};"x"===s&&(t.beginPath(),t.rect(a,n,r-a,o-n),t.clip())}function ds(t,e,i,n){const o=e.interpolate(i,n);o&&t.lineTo(o.x,o.y)}function us(t,e){const{line:i,target:n,property:o,color:s,scale:a}=e,r=function(t,e,i){const n=t.segments,o=t.points,s=e.points,a=[];for(const t of n){let{start:n,end:r}=t;r=ts(n,r,o);const l=ls(i,o[n],o[r],t.loop);if(!e.segments){a.push({source:t,target:l,start:o[n],end:o[r]});continue}const c=Sn(e,l);for(const e of c){const n=ls(i,s[e.start],s[e.end],e.loop),r=kn(t,o,n);for(const t of r)a.push({source:t,target:e,start:{[i]:cs(l,n,"start",Math.max)},end:{[i]:cs(l,n,"end",Math.min)}})}}return a}(i,n,o);for(const{source:e,target:l,start:c,end:h}of r){const{style:{backgroundColor:r=s}={}}=e;t.save(),t.fillStyle=r,hs(t,a,ls(o,c,h)),t.beginPath();const d=!!i.pathSegment(t,e);d?t.closePath():ds(t,n,h,o);const u=!!n.pathSegment(t,l,{move:d,reverse:!0}),f=d&&u;f||ds(t,n,c,o),t.closePath(),t.fill(f?"evenodd":"nonzero"),t.restore()}}function fs(t,e,i){const n=function(t){const{chart:e,fill:i,line:n}=t;if(X(i))return function(t,e){const i=t.getDatasetMeta(e);return i&&t.isDatasetVisible(e)?i.dataset:null}(e,i);if("stack"===i)return es(t);const o=Jo(t);return o instanceof Qo?o:ss(o,n)}(e),{line:o,scale:s,axis:a}=e,r=o.options,l=r.fill,c=r.backgroundColor,{above:h=c,below:d=c}=l||{};n&&o.points.length&&(Zt(t,i),function(t,e){const{line:i,target:n,above:o,below:s,area:a,scale:r}=e,l=i._loop?"angle":e.axis;t.save(),"x"===l&&s!==o&&(rs(t,n,a.top),us(t,{line:i,target:n,color:o,scale:r,property:l}),t.restore(),t.save(),rs(t,n,a.bottom)),us(t,{line:i,target:n,color:s,scale:r,property:l}),t.restore()}(t,{line:o,target:n,above:h,below:d,area:i,scale:s,axis:a}),Qt(t))}var gs={id:"filler",afterDatasetsUpdate(t,e,i){const n=(t.data.datasets||[]).length,o=[];let s,a,r,l;for(a=0;a<n;++a)s=t.getDatasetMeta(a),r=s.dataset,l=null,r&&r.options&&r instanceof zo&&(l={visible:t.isDatasetVisible(a),index:a,fill:Zo(r,a,n),chart:t,axis:s.controller.options.indexAxis,scale:s.vScale,line:r}),s.$filler=l,o.push(l);for(a=0;a<n;++a)l=o[a],l&&!1!==l.fill&&(l.fill=as(o,a,i.propagate))},beforeDraw(t,e,i){const n="beforeDraw"===i.drawTime,o=t.getSortedVisibleDatasetMetas(),s=t.chartArea;for(let e=o.length-1;e>=0;--e){const i=o[e].$filler;i&&(i.line.updateControlPoints(s,i.axis),n&&fs(t.ctx,i,s))}},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&&fs(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,i){const n=e.meta.$filler;n&&!1!==n.fill&&"beforeDatasetDraw"===i.drawTime&&fs(t.ctx,n,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const ps=(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 ms extends zi{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){const n=this;n.maxWidth=t,n.maxHeight=e,n._margins=i,n.setDimensions(),n.buildLabels(),n.fit()}setDimensions(){const t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=t._margins.left,t.right=t.width):(t.height=t.maxHeight,t.top=t._margins.top,t.bottom=t.height)}buildLabels(){const t=this,e=t.options.labels||{};let i=Q(e.generateLabels,[t.chart],t)||[];e.filter&&(i=i.filter((i=>e.filter(i,t.chart.data)))),e.sort&&(i=i.sort(((i,n)=>e.sort(i,n,t.chart.data)))),t.options.reverse&&i.reverse(),t.legendItems=i}fit(){const t=this,{options:e,ctx:i}=t;if(!e.display)return void(t.width=t.height=0);const n=e.labels,o=Be(n.font),s=o.size,a=t._computeTitleHeight(),{boxWidth:r,itemHeight:l}=ps(n,s);let c,h;i.font=o.string,t.isHorizontal()?(c=t.maxWidth,h=t._fitRows(a,s,r,l)+10):(h=t.maxHeight,c=t._fitCols(a,s,r,l)+10),t.width=Math.min(c,e.maxWidth||t.maxWidth),t.height=Math.min(h,e.maxHeight||t.maxHeight)}_fitRows(t,e,i,n){const o=this,{ctx:s,maxWidth:a,options:{labels:{padding:r}}}=o,l=o.legendHitBoxes=[],c=o.lineWidths=[0],h=n+r;let d=t;s.textAlign="left",s.textBaseline="middle";let u=-1,f=-h;return o.legendItems.forEach(((t,o)=>{const g=i+e/2+s.measureText(t.text).width;(0===o||c[c.length-1]+g+2*r>a)&&(d+=h,c[c.length-(o>0?0:1)]=0,f+=h,u++),l[o]={left:0,top:f,row:u,width:g,height:n},c[c.length-1]+=g+r})),d}_fitCols(t,e,i,n){const o=this,{ctx:s,maxHeight:a,options:{labels:{padding:r}}}=o,l=o.legendHitBoxes=[],c=o.columnSizes=[],h=a-t;let d=r,u=0,f=0,g=0,p=0;return o.legendItems.forEach(((t,o)=>{const a=i+e/2+s.measureText(t.text).width;o>0&&f+n+2*r>h&&(d+=u+r,c.push({width:u,height:f}),g+=u+r,p++,u=f=0),l[o]={left:g,top:f,col:p,width:a,height:n},u=Math.max(u,a),f+=n+r})),d+=u,c.push({width:u,height:f}),d}adjustHitBoxes(){const t=this;if(!t.options.display)return;const e=t._computeTitleHeight(),{legendHitBoxes:i,options:{align:n,labels:{padding:s},rtl:a}}=t;if(this.isHorizontal()){let r=0,l=o(n,t.left+s,t.right-t.lineWidths[r]);for(const a of i)r!==a.row&&(r=a.row,l=o(n,t.left+s,t.right-t.lineWidths[r])),a.top+=t.top+e+s,a.left=l,l+=a.width+s;if(a){const e=i.reduce(((t,e)=>(t[e.row]=t[e.row]||[],t[e.row].push(e),t)),{}),n=[];Object.keys(e).forEach((t=>{e[t].reverse(),n.push(...e[t])})),t.legendHitBoxes=n}}else{let a=0,r=o(n,t.top+e+s,t.bottom-t.columnSizes[a].height);for(const l of i)l.col!==a&&(a=l.col,r=o(n,t.top+e+s,t.bottom-t.columnSizes[a].height)),l.top=r,l.left+=t.left+s,r+=l.height+s}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){const t=this;if(t.options.display){const e=t.ctx;Zt(e,t),t._draw(),Qt(e)}}_draw(){const t=this,{options:e,columnSizes:i,lineWidths:n,ctx:a}=t,{align:r,labels:l}=e,c=xt.color,h=_n(e.rtl,t.left,t.width),d=Be(l.font),{color:u,padding:f}=l,g=d.size,p=g/2;let m;t.drawTitle(),a.textAlign=h.textAlign("left"),a.textBaseline="middle",a.lineWidth=.5,a.font=d.string;const{boxWidth:x,boxHeight:b,itemHeight:_}=ps(l,g),y=t.isHorizontal(),v=this._computeTitleHeight();m=y?{x:o(r,t.left+f,t.right-n[0]),y:t.top+f+v,line:0}:{x:t.left+f,y:o(r,t.top+v+f,t.bottom-i[0].height),line:0},yn(t.ctx,e.textDirection);const w=_+f;t.legendItems.forEach(((M,k)=>{a.strokeStyle=M.fontColor||u,a.fillStyle=M.fontColor||u;const S=a.measureText(M.text).width,P=h.textAlign(M.textAlign||(M.textAlign=l.textAlign)),D=x+p+S;let C=m.x,O=m.y;h.setWidth(t.width),y?k>0&&C+D+f>t.right&&(O=m.y+=w,m.line++,C=m.x=o(r,t.left+f,t.right-n[m.line])):k>0&&O+w>t.bottom&&(C=m.x=C+i[m.line].width+f,m.line++,O=m.y=o(r,t.top+v+f,t.bottom-i[m.line].height));!function(t,e,i){if(isNaN(x)||x<=0||isNaN(b)||b<0)return;a.save();const n=K(i.lineWidth,1);if(a.fillStyle=K(i.fillStyle,c),a.lineCap=K(i.lineCap,"butt"),a.lineDashOffset=K(i.lineDashOffset,0),a.lineJoin=K(i.lineJoin,"miter"),a.lineWidth=n,a.strokeStyle=K(i.strokeStyle,c),a.setLineDash(K(i.lineDash,[])),l.usePointStyle){const o={radius:x*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:n},s=h.xPlus(t,x/2);Kt(a,o,s,e+p)}else{const o=e+Math.max((g-b)/2,0),s=h.leftForLtr(t,x),r=Ie(i.borderRadius);a.beginPath(),Object.values(r).some((t=>0!==t))?ne(a,{x:s,y:o,w:x,h:b,radius:r}):a.rect(s,o,x,b),a.fill(),0!==n&&a.stroke()}a.restore()}(h.x(C),O,M),C=s(P,C+x+p,y?C+D:t.right,e.rtl),function(t,e,i){ee(a,i.text,t,e+_/2,d,{strikethrough:i.hidden,textAlign:h.textAlign(i.textAlign)})}(h.x(C),O,M),y?m.x+=D+f:m.y+=w})),vn(t.ctx,e.textDirection)}drawTitle(){const t=this,e=t.options,i=e.title,s=Be(i.font),a=Fe(i.padding);if(!i.display)return;const r=_n(e.rtl,t.left,t.width),l=t.ctx,c=i.position,h=s.size/2,d=a.top+h;let u,f=t.left,g=t.width;if(this.isHorizontal())g=Math.max(...t.lineWidths),u=t.top+d,f=o(e.align,f,t.right-g);else{const i=t.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);u=d+o(e.align,t.top,t.bottom-i-e.labels.padding-t._computeTitleHeight())}const p=o(c,f,f+g);l.textAlign=r.textAlign(n(c)),l.textBaseline="middle",l.strokeStyle=i.color,l.fillStyle=i.color,l.font=s.string,ee(l,i.text,p,u,s)}_computeTitleHeight(){const t=this.options.title,e=Be(t.font),i=Fe(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){const i=this;let n,o,s;if(t>=i.left&&t<=i.right&&e>=i.top&&e<=i.bottom)for(s=i.legendHitBoxes,n=0;n<s.length;++n)if(o=s[n],t>=o.left&&t<=o.left+o.width&&e>=o.top&&e<=o.top+o.height)return i.legendItems[n];return null}handleEvent(t){const e=this,i=e.options;if(!function(t,e){if("mousemove"===t&&(e.onHover||e.onLeave))return!0;if(e.onClick&&("click"===t||"mouseup"===t))return!0;return!1}(t.type,i))return;const n=e._getLegendItemAt(t.x,t.y);if("mousemove"===t.type){const a=e._hoveredItem,r=(s=n,null!==(o=a)&&null!==s&&o.datasetIndex===s.datasetIndex&&o.index===s.index);a&&!r&&Q(i.onLeave,[t,a,e],e),e._hoveredItem=n,n&&!r&&Q(i.onHover,[t,n,e],e)}else n&&Q(i.onClick,[t,n,e],e);var o,s}}var xs={id:"legend",_element:ms,start(t,e,i){const n=t.legend=new ms({ctx:t.ctx,options:i,chart:t});Ze.configure(t,n,i),Ze.addBox(t,n)},stop(t){Ze.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){const n=t.legend;Ze.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,o=i.chart;o.isDatasetVisible(n)?(o.hide(n),e.hidden=!0):(o.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:o,color:s}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const a=t.controller.getStyle(i?0:void 0),r=Fe(a.borderWidth);return{text:e[t.index].label,fillStyle:a.backgroundColor,fontColor:s,hidden:!t.visible,lineCap:a.borderCapStyle,lineDash:a.borderDash,lineDashOffset:a.borderDashOffset,lineJoin:a.borderJoinStyle,lineWidth:(r.width+r.height)/4,strokeStyle:a.borderColor,pointStyle:n||a.pointStyle,rotation:a.rotation,textAlign:o||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 bs extends zi{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,n=i.options;if(i.left=0,i.top=0,!n.display)return void(i.width=i.height=i.right=i.bottom=0);i.width=i.right=t,i.height=i.bottom=e;const o=Y(n.text)?n.text.length:1;i._padding=Fe(n.padding);const s=o*Be(n.font).lineHeight+i._padding.height;i.isHorizontal()?i.height=s:i.width=s}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:i,bottom:n,right:s,options:a}=this,r=a.align;let l,c,h,d=0;return this.isHorizontal()?(c=o(r,i,s),h=e+t,l=s-i):("left"===a.position?(c=i+t,h=o(r,n,e),d=-.5*bt):(c=s-t,h=o(r,e,n),d=.5*bt),l=n-e),{titleX:c,titleY:h,maxWidth:l,rotation:d}}draw(){const t=this,e=t.ctx,i=t.options;if(!i.display)return;const o=Be(i.font),s=o.lineHeight/2+t._padding.top,{titleX:a,titleY:r,maxWidth:l,rotation:c}=t._drawArgs(s);ee(e,i.text,0,0,o,{color:i.color,maxWidth:l,rotation:c,textAlign:n(i.align),textBaseline:"middle",translation:[a,r]})}}var _s={id:"title",_element:bs,start(t,e,i){!function(t,e){const i=new bs({ctx:t.ctx,options:e,chart:t});Ze.configure(t,i,e),Ze.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){const e=t.titleBlock;Ze.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){const n=t.titleBlock;Ze.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 ys=new WeakMap;var vs={id:"subtitle",start(t,e,i){const n=new bs({ctx:t.ctx,options:i,chart:t});Ze.configure(t,n,i),Ze.addBox(t,n),ys.set(t,n)},stop(t){Ze.removeBox(t,ys.get(t)),ys.delete(t)},beforeUpdate(t,e,i){const n=ys.get(t);Ze.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 ws={average(t){if(!t.length)return!1;let e,i,n=0,o=0,s=0;for(e=0,i=t.length;e<i;++e){const i=t[e].element;if(i&&i.hasValue()){const t=i.tooltipPosition();n+=t.x,o+=t.y,++s}}return{x:n/s,y:o/s}},nearest(t,e){if(!t.length)return!1;let i,n,o,s=e.x,a=e.y,r=Number.POSITIVE_INFINITY;for(i=0,n=t.length;i<n;++i){const n=t[i].element;if(n&&n.hasValue()){const t=Bt(e,n.getCenterPoint());t<r&&(r=t,o=n)}}if(o){const t=o.tooltipPosition();s=t.x,a=t.y}return{x:s,y:a}}};function Ms(t,e){return e&&(Y(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function ks(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function Ss(t,e){const{element:i,datasetIndex:n,index:o}=e,s=t.getDatasetMeta(n).controller,{label:a,value:r}=s.getLabelAndValue(o);return{chart:t,label:a,parsed:s.getParsed(o),raw:t.data.datasets[n].data[o],formattedValue:r,dataset:s.getDataset(),dataIndex:o,datasetIndex:n,element:i}}function Ps(t,e){const i=t._chart.ctx,{body:n,footer:o,title:s}=t,{boxWidth:a,boxHeight:r}=e,l=Be(e.bodyFont),c=Be(e.titleFont),h=Be(e.footerFont),d=s.length,u=o.length,f=n.length,g=Fe(e.padding);let p=g.height,m=0,x=n.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);if(x+=t.beforeBody.length+t.afterBody.length,d&&(p+=d*c.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),x){p+=f*(e.displayColors?Math.max(r,l.lineHeight):l.lineHeight)+(x-f)*l.lineHeight+(x-1)*e.bodySpacing}u&&(p+=e.footerMarginTop+u*h.lineHeight+(u-1)*e.footerSpacing);let b=0;const _=function(t){m=Math.max(m,i.measureText(t).width+b)};return i.save(),i.font=c.string,J(t.title,_),i.font=l.string,J(t.beforeBody.concat(t.afterBody),_),b=e.displayColors?a+2:0,J(n,(t=>{J(t.before,_),J(t.lines,_),J(t.after,_)})),b=0,i.font=h.string,J(t.footer,_),i.restore(),m+=g.width,{width:m,height:p}}function Ds(t,e,i,n){const{x:o,width:s}=i,{width:a,chartArea:{left:r,right:l}}=t;let c="center";return"center"===n?c=o<=(r+l)/2?"left":"right":o<=s/2?c="left":o>=a-s/2&&(c="right"),function(t,e,i,n){const{x:o,width:s}=n,a=i.caretSize+i.caretPadding;return"left"===t&&o+s+a>e.width||"right"===t&&o-s-a<0||void 0}(c,t,e,i)&&(c="center"),c}function Cs(t,e,i){const n=e.yAlign||function(t,e){const{y:i,height:n}=e;return i<n/2?"top":i>t.height-n/2?"bottom":"center"}(t,i);return{xAlign:e.xAlign||Ds(t,e,i,n),yAlign:n}}function Os(t,e,i,n){const{caretSize:o,caretPadding:s,cornerRadius:a}=t,{xAlign:r,yAlign:l}=i,c=o+s,h=a+s;let d=function(t,e){let{x:i,width:n}=t;return"right"===e?i-=n:"center"===e&&(i-=n/2),i}(e,r);const u=function(t,e,i){let{y:n,height:o}=t;return"top"===e?n+=i:n-="bottom"===e?o+i:o/2,n}(e,l,c);return"center"===l?"left"===r?d+=c:"right"===r&&(d-=c):"left"===r?d-=h:"right"===r&&(d+=h),{x:Ht(d,0,n.width-e.width),y:Ht(u,0,n.height-e.height)}}function Ts(t,e,i){const n=Fe(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-n.right:t.x+n.left}function As(t){return Ms([],ks(t))}function Ls(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}class Rs extends zi{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,e=t._cachedAnimations;if(e)return e;const i=t._chart,n=t.options.setContext(t.getContext()),o=n.enabled&&i.options.animation&&n.animations,s=new wi(t._chart,o);return o._cacheable&&(t._cachedAnimations=Object.freeze(s)),s}getContext(){const t=this;return t.$context||(t.$context=(e=t._chart.getContext(),i=t,n=t._tooltipItems,Object.assign(Object.create(e),{tooltip:i,tooltipItems:n,type:"tooltip"})));var e,i,n}getTitle(t,e){const i=this,{callbacks:n}=e,o=n.beforeTitle.apply(i,[t]),s=n.title.apply(i,[t]),a=n.afterTitle.apply(i,[t]);let r=[];return r=Ms(r,ks(o)),r=Ms(r,ks(s)),r=Ms(r,ks(a)),r}getBeforeBody(t,e){return As(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){const i=this,{callbacks:n}=e,o=[];return J(t,(t=>{const e={before:[],lines:[],after:[]},s=Ls(n,t);Ms(e.before,ks(s.beforeLabel.call(i,t))),Ms(e.lines,s.label.call(i,t)),Ms(e.after,ks(s.afterLabel.call(i,t))),o.push(e)})),o}getAfterBody(t,e){return As(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){const i=this,{callbacks:n}=e,o=n.beforeFooter.apply(i,[t]),s=n.footer.apply(i,[t]),a=n.afterFooter.apply(i,[t]);let r=[];return r=Ms(r,ks(o)),r=Ms(r,ks(s)),r=Ms(r,ks(a)),r}_createItems(t){const e=this,i=e._active,n=e._chart.data,o=[],s=[],a=[];let r,l,c=[];for(r=0,l=i.length;r<l;++r)c.push(Ss(e._chart,i[r]));return t.filter&&(c=c.filter(((e,i,o)=>t.filter(e,i,o,n)))),t.itemSort&&(c=c.sort(((e,i)=>t.itemSort(e,i,n)))),J(c,(i=>{const n=Ls(t.callbacks,i);o.push(n.labelColor.call(e,i)),s.push(n.labelPointStyle.call(e,i)),a.push(n.labelTextColor.call(e,i))})),e.labelColors=o,e.labelPointStyles=s,e.labelTextColors=a,e.dataPoints=c,c}update(t,e){const i=this,n=i.options.setContext(i.getContext()),o=i._active;let s,a=[];if(o.length){const t=ws[n.position].call(i,o,i._eventPosition);a=i._createItems(n),i.title=i.getTitle(a,n),i.beforeBody=i.getBeforeBody(a,n),i.body=i.getBody(a,n),i.afterBody=i.getAfterBody(a,n),i.footer=i.getFooter(a,n);const e=i._size=Ps(i,n),r=Object.assign({},t,e),l=Cs(i._chart,n,r),c=Os(n,r,l,i._chart);i.xAlign=l.xAlign,i.yAlign=l.yAlign,s={opacity:1,x:c.x,y:c.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==i.opacity&&(s={opacity:0});i._tooltipItems=a,i.$context=void 0,s&&i._resolveAnimations().update(i,s),t&&n.external&&n.external.call(i,{chart:i._chart,tooltip:i,replay:e})}drawCaret(t,e,i,n){const o=this.getCaretPosition(t,i,n);e.lineTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.lineTo(o.x3,o.y3)}getCaretPosition(t,e,i){const{xAlign:n,yAlign:o}=this,{cornerRadius:s,caretSize:a}=i,{x:r,y:l}=t,{width:c,height:h}=e;let d,u,f,g,p,m;return"center"===o?(p=l+h/2,"left"===n?(d=r,u=d-a,g=p+a,m=p-a):(d=r+c,u=d+a,g=p-a,m=p+a),f=d):(u="left"===n?r+s+a:"right"===n?r+c-s-a:this.caretX,"top"===o?(g=l,p=g-a,d=u-a,f=u+a):(g=l+h,p=g+a,d=u+a,f=u-a),m=g),{x1:d,x2:u,x3:f,y1:g,y2:p,y3:m}}drawTitle(t,e,i){const n=this,o=n.title,s=o.length;let a,r,l;if(s){const c=_n(i.rtl,n.x,n.width);for(t.x=Ts(n,i.titleAlign,i),e.textAlign=c.textAlign(i.titleAlign),e.textBaseline="middle",a=Be(i.titleFont),r=i.titleSpacing,e.fillStyle=i.titleColor,e.font=a.string,l=0;l<s;++l)e.fillText(o[l],c.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+r,l+1===s&&(t.y+=i.titleMarginBottom-r)}}_drawColorBox(t,e,i,n,o){const s=this,a=s.labelColors[i],r=s.labelPointStyles[i],{boxHeight:l,boxWidth:c}=o,h=Be(o.bodyFont),d=Ts(s,"left",o),u=n.x(d),f=l<h.lineHeight?(h.lineHeight-l)/2:0,g=e.y+f;if(o.usePointStyle){const e={radius:Math.min(c,l)/2,pointStyle:r.pointStyle,rotation:r.rotation,borderWidth:1},i=n.leftForLtr(u,c)+c/2,s=g+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,Kt(t,e,i,s),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,Kt(t,e,i,s)}else{t.lineWidth=a.borderWidth||1,t.strokeStyle=a.borderColor,t.setLineDash(a.borderDash||[]),t.lineDashOffset=a.borderDashOffset||0;const e=n.leftForLtr(u,c),i=n.leftForLtr(n.xPlus(u,1),c-2),s=Ie(a.borderRadius);Object.values(s).some((t=>0!==t))?(t.beginPath(),t.fillStyle=o.multiKeyBackground,ne(t,{x:e,y:g,w:c,h:l,radius:s}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),ne(t,{x:i,y:g+1,w:c-2,h:l-2,radius:s}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(e,g,c,l),t.strokeRect(e,g,c,l),t.fillStyle=a.backgroundColor,t.fillRect(i,g+1,c-2,l-2))}t.fillStyle=s.labelTextColors[i]}drawBody(t,e,i){const n=this,{body:o}=n,{bodySpacing:s,bodyAlign:a,displayColors:r,boxHeight:l,boxWidth:c}=i,h=Be(i.bodyFont);let d=h.lineHeight,u=0;const f=_n(i.rtl,n.x,n.width),g=function(i){e.fillText(i,f.x(t.x+u),t.y+d/2),t.y+=d+s},p=f.textAlign(a);let m,x,b,_,y,v,w;for(e.textAlign=a,e.textBaseline="middle",e.font=h.string,t.x=Ts(n,p,i),e.fillStyle=i.bodyColor,J(n.beforeBody,g),u=r&&"right"!==p?"center"===a?c/2+1:c+2:0,_=0,v=o.length;_<v;++_){for(m=o[_],x=n.labelTextColors[_],e.fillStyle=x,J(m.before,g),b=m.lines,r&&b.length&&(n._drawColorBox(e,t,_,f,i),d=Math.max(h.lineHeight,l)),y=0,w=b.length;y<w;++y)g(b[y]),d=h.lineHeight;J(m.after,g)}u=0,d=h.lineHeight,J(n.afterBody,g),t.y-=s}drawFooter(t,e,i){const n=this,o=n.footer,s=o.length;let a,r;if(s){const l=_n(i.rtl,n.x,n.width);for(t.x=Ts(n,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=l.textAlign(i.footerAlign),e.textBaseline="middle",a=Be(i.footerFont),e.fillStyle=i.footerColor,e.font=a.string,r=0;r<s;++r)e.fillText(o[r],l.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+i.footerSpacing}}drawBackground(t,e,i,n){const{xAlign:o,yAlign:s}=this,{x:a,y:r}=t,{width:l,height:c}=i,h=n.cornerRadius;e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,e.lineWidth=n.borderWidth,e.beginPath(),e.moveTo(a+h,r),"top"===s&&this.drawCaret(t,e,i,n),e.lineTo(a+l-h,r),e.quadraticCurveTo(a+l,r,a+l,r+h),"center"===s&&"right"===o&&this.drawCaret(t,e,i,n),e.lineTo(a+l,r+c-h),e.quadraticCurveTo(a+l,r+c,a+l-h,r+c),"bottom"===s&&this.drawCaret(t,e,i,n),e.lineTo(a+h,r+c),e.quadraticCurveTo(a,r+c,a,r+c-h),"center"===s&&"left"===o&&this.drawCaret(t,e,i,n),e.lineTo(a,r+h),e.quadraticCurveTo(a,r,a+h,r),e.closePath(),e.fill(),n.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this,i=e._chart,n=e.$animations,o=n&&n.x,s=n&&n.y;if(o||s){const n=ws[t.position].call(e,e._active,e._eventPosition);if(!n)return;const a=e._size=Ps(e,t),r=Object.assign({},n,e._size),l=Cs(i,t,r),c=Os(t,r,l,i);o._to===c.x&&s._to===c.y||(e.xAlign=l.xAlign,e.yAlign=l.yAlign,e.width=a.width,e.height=a.height,e.caretX=n.x,e.caretY=n.y,e._resolveAnimations().update(e,c))}}draw(t){const e=this,i=e.options.setContext(e.getContext());let n=e.opacity;if(!n)return;e._updateAnimationTarget(i);const o={width:e.width,height:e.height},s={x:e.x,y:e.y};n=Math.abs(n)<.001?0:n;const a=Fe(i.padding),r=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;i.enabled&&r&&(t.save(),t.globalAlpha=n,e.drawBackground(s,t,o,i),yn(t,i.textDirection),s.y+=a.top,e.drawTitle(s,t,i),e.drawBody(s,t,i),e.drawFooter(s,t,i),vn(t,i.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this,n=i._active,o=t.map((({datasetIndex:t,index:e})=>{const n=i._chart.getDatasetMeta(t);if(!n)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:n.data[e],index:e}})),s=!tt(n,o),a=i._positionChanged(o,e);(s||a)&&(i._active=o,i._eventPosition=e,i.update(!0))}handleEvent(t,e){const i=this,n=i.options,o=i._active||[];let s=!1,a=[];"mouseout"!==t.type&&(a=i._chart.getElementsAtEventForMode(t,n.mode,n,e),n.reverse&&a.reverse());const r=i._positionChanged(a,t);return s=e||!tt(a,o)||r,s&&(i._active=a,(n.enabled||n.external)&&(i._eventPosition={x:t.x,y:t.y},i.update(!0,e))),s}_positionChanged(t,e){const{caretX:i,caretY:n,options:o}=this,s=ws[o.position].call(this,t,e);return!1!==s&&(i!==s.x||n!==s.y)}}Rs.positioners=ws;var Es={id:"tooltip",_element:Rs,positioners:ws,afterInit(t,e,i){i&&(t.tooltip=new Rs({_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,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:H,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<n)return i[e.dataIndex]}return""},afterTitle:H,beforeBody:H,beforeLabel:H,label(t){if(this&&this.options&&"dataset"===this.options.mode)return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const i=t.formattedValue;return $(i)||(e+=i),e},labelColor(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:H,afterBody:H,beforeFooter:H,footer:H,afterFooter:H}},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},zs=Object.freeze({__proto__:null,Decimation:Go,Filler:gs,Legend:xs,SubTitle:vs,Title:_s,Tooltip:Es});function Is(t,e,i){const n=t.indexOf(e);if(-1===n)return((t,e,i)=>"string"==typeof e?t.push(e)-1:isNaN(e)?null:i)(t,e,i);return n!==t.lastIndexOf(e)?i:n}class Fs extends qi{constructor(t){super(t),this._startValue=void 0,this._valueRange=0}parse(t,e){if($(t))return null;const i=this.getLabels();return((t,e)=>null===t?null:Ht(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:Is(i,t,K(e,t)),i.length-1)}determineDataLimits(){const t=this,{minDefined:e,maxDefined:i}=t.getUserBounds();let{min:n,max:o}=t.getMinMax(!0);"ticks"===t.options.bounds&&(e||(n=0),i||(o=t.getLabels().length-1)),t.min=n,t.max=o}buildTicks(){const t=this,e=t.min,i=t.max,n=t.options.offset,o=[];let s=t.getLabels();s=0===e&&i===s.length-1?s:s.slice(e,i+1),t._valueRange=Math.max(s.length-(n?0:1),1),t._startValue=t.min-(n?.5:0);for(let t=e;t<=i;t++)o.push({value:t});return o}getLabelForValue(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}configure(){const t=this;super.configure(),t.isHorizontal()||(t._reversePixels=!t._reversePixels)}getPixelForValue(t){const e=this;return"number"!=typeof t&&(t=e.parse(t)),null===t?NaN:e.getPixelForDecimal((t-e._startValue)/e._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){const e=this;return Math.round(e._startValue+e.getDecimalForPixel(t)*e._valueRange)}getBasePixel(){return this.bottom}}function Bs(t,e,{horizontal:i,minRotation:n}){const o=Et(n),s=(i?Math.sin(o):Math.cos(o))||.001,a=.75*e*(""+t).length;return Math.min(e/s,a)}Fs.id="category",Fs.defaults={ticks:{callback:Fs.prototype.getLabelForValue}};class Vs extends qi{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 $(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const t=this,{beginAtZero:e}=t.options,{minDefined:i,maxDefined:n}=t.getUserBounds();let{min:o,max:s}=t;const a=t=>o=i?o:t,r=t=>s=n?s:t;if(e){const t=Dt(o),e=Dt(s);t<0&&e<0?r(0):t>0&&e>0&&a(0)}o===s&&(r(s+1),e||a(o-1)),t.min=o,t.max=s}getTickLimit(){const t=this,e=t.options.ticks;let i,{maxTicksLimit:n,stepSize:o}=e;return o?i=Math.ceil(t.max/o)-Math.floor(t.min/o)+1:(i=t.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this,e=t.options,i=e.ticks;let n=t.getTickLimit();n=Math.max(2,n);const o=function(t,e){const i=[],{bounds:n,step:o,min:s,max:a,precision:r,count:l,maxTicks:c,maxDigits:h,includeBounds:d}=t,u=o||1,f=c-1,{min:g,max:p}=e,m=!$(s),x=!$(a),b=!$(l),_=(p-g)/(h+1);let y,v,w,M,k=Ct((p-g)/f/u)*u;if(k<1e-14&&!m&&!x)return[{value:g},{value:p}];M=Math.ceil(p/k)-Math.floor(g/k),M>f&&(k=Ct(M*k/f/u)*u),$(r)||(y=Math.pow(10,r),k=Math.ceil(k*y)/y),"ticks"===n?(v=Math.floor(g/k)*k,w=Math.ceil(p/k)*k):(v=g,w=p),m&&x&&o&&Lt((a-s)/o,k/1e3)?(M=Math.round(Math.min((a-s)/k,c)),k=(a-s)/M,v=s,w=a):b?(v=m?s:v,w=x?a:w,M=l-1,k=(w-v)/M):(M=(w-v)/k,M=At(M,Math.round(M),k/1e3)?Math.round(M):Math.ceil(M));const S=Math.max(It(k),It(v));y=Math.pow(10,$(r)?S:r),v=Math.round(v*y)/y,w=Math.round(w*y)/y;let P=0;for(m&&(d&&v!==s?(i.push({value:s}),v<s&&P++,At(Math.round((v+P*k)*y)/y,s,Bs(s,_,t))&&P++):v<s&&P++);P<M;++P)i.push({value:Math.round((v+P*k)*y)/y});return x&&d&&w!==a?At(i[i.length-1].value,a,Bs(a,_,t))?i[i.length-1].value=a:i.push({value:a}):x&&w!==a||i.push({value:w}),i}({maxTicks:n,bounds:e.bounds,min:e.min,max:e.max,precision:i.precision,step:i.stepSize,count:i.count,maxDigits:t._maxDigits(),horizontal:t.isHorizontal(),minRotation:i.minRotation||0,includeBounds:!1!==i.includeBounds},t._range||t);return"ticks"===e.bounds&&Rt(o,t,"value"),e.reverse?(o.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),o}configure(){const t=this,e=t.ticks;let i=t.min,n=t.max;if(super.configure(),t.options.offset&&e.length){const t=(n-i)/Math.max(e.length-1,1)/2;i-=t,n+=t}t._startValue=i,t._endValue=n,t._valueRange=n-i}getLabelForValue(t){return Fi(t,this.chart.options.locale)}}class Ws extends Vs{determineDataLimits(){const t=this,{min:e,max:i}=t.getMinMax(!0);t.min=X(e)?e:0,t.max=X(i)?i:1,t.handleTickRangeOptions()}computeTickLimit(){const t=this,e=t.isHorizontal(),i=e?t.width:t.height,n=Et(t.options.ticks.minRotation),o=(e?Math.sin(n):Math.cos(n))||.001,s=t._resolveTickFontOptions(0);return Math.ceil(i/Math.min(40,s.lineHeight/o))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}function Ns(t){return 1===t/Math.pow(10,Math.floor(Pt(t)))}Ws.id="linear",Ws.defaults={ticks:{callback:Vi.formatters.numeric}};class Hs extends qi{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=Vs.prototype.parse.apply(this,[t,e]);if(0!==i)return X(i)&&i>0?i:null;this._zero=!0}determineDataLimits(){const t=this,{min:e,max:i}=t.getMinMax(!0);t.min=X(e)?Math.max(0,e):null,t.max=X(i)?Math.max(0,i):null,t.options.beginAtZero&&(t._zero=!0),t.handleTickRangeOptions()}handleTickRangeOptions(){const t=this,{minDefined:e,maxDefined:i}=t.getUserBounds();let n=t.min,o=t.max;const s=t=>n=e?n:t,a=t=>o=i?o:t,r=(t,e)=>Math.pow(10,Math.floor(Pt(t))+e);n===o&&(n<=0?(s(1),a(10)):(s(r(n,-1)),a(r(o,1)))),n<=0&&s(r(o,-1)),o<=0&&a(r(n,1)),t._zero&&t.min!==t._suggestedMin&&n===r(t.min,0)&&s(r(n,-1)),t.min=n,t.max=o}buildTicks(){const t=this,e=t.options,i=function(t,e){const i=Math.floor(Pt(e.max)),n=Math.ceil(e.max/Math.pow(10,i)),o=[];let s=q(t.min,Math.pow(10,Math.floor(Pt(e.min)))),a=Math.floor(Pt(s)),r=Math.floor(s/Math.pow(10,a)),l=a<0?Math.pow(10,Math.abs(a)):1;do{o.push({value:s,major:Ns(s)}),++r,10===r&&(r=1,++a,l=a>=0?1:l),s=Math.round(r*Math.pow(10,a)*l)/l}while(a<i||a===i&&r<n);const c=q(t.max,s);return o.push({value:c,major:Ns(s)}),o}({min:t._userMin,max:t._userMax},t);return"ticks"===e.bounds&&Rt(i,t,"value"),e.reverse?(i.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),i}getLabelForValue(t){return void 0===t?"0":Fi(t,this.chart.options.locale)}configure(){const t=this,e=t.min;super.configure(),t._startValue=Pt(e),t._valueRange=Pt(t.max)-Pt(e)}getPixelForValue(t){const e=this;return void 0!==t&&0!==t||(t=e.min),null===t||isNaN(t)?NaN:e.getPixelForDecimal(t===e.min?0:(Pt(t)-e._startValue)/e._valueRange)}getValueForPixel(t){const e=this,i=e.getDecimalForPixel(t);return Math.pow(10,e._startValue+i*e._valueRange)}}function js(t){const e=t.ticks;if(e.display&&t.display){const t=Fe(e.backdropPadding);return K(e.font&&e.font.size,xt.font.size)+t.height}return 0}function $s(t,e,i,n,o){return t===n||t===o?{start:e-i/2,end:e+i/2}:t<n||t>o?{start:e-i,end:e}:{start:e,end:e+i}}function Ys(t){const e={l:0,r:t.width,t:0,b:t.height-t.paddingTop},i={},n=[],o=[],s=t.getLabels().length;for(let c=0;c<s;c++){const s=t.options.pointLabels.setContext(t.getContext(c));o[c]=s.padding;const h=t.getPointPosition(c,t.drawingArea+o[c]),d=Be(s.font),u=(a=t.ctx,r=d,l=Y(l=t._pointLabels[c])?l:[l],{w:Ut(a,r.string,l),h:l.length*r.lineHeight});n[c]=u;const f=t.getIndexAngle(c),g=zt(f),p=$s(g,h.x,u.w,0,180),m=$s(g,h.y,u.h,90,270);p.start<e.l&&(e.l=p.start,i.l=f),p.end>e.r&&(e.r=p.end,i.r=f),m.start<e.t&&(e.t=m.start,i.t=f),m.end>e.b&&(e.b=m.end,i.b=f)}var a,r,l;t._setReductions(t.drawingArea,e,i),t._pointLabelItems=function(t,e,i){const n=[],o=t.getLabels().length,s=t.options,a=js(s),r=t.getDistanceFromCenterForValue(s.ticks.reverse?t.min:t.max);for(let s=0;s<o;s++){const o=0===s?a/2:0,l=t.getPointPosition(s,r+o+i[s]),c=zt(t.getIndexAngle(s)),h=e[s],d=qs(l.y,h.h,c),u=Us(c),f=Xs(l.x,h.w,u);n.push({x:l.x,y:d,textAlign:u,left:f,top:d,right:f+h.w,bottom:d+h.h})}return n}(t,n,o)}function Us(t){return 0===t||180===t?"center":t<180?"left":"right"}function Xs(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function qs(t,e,i){return 90===i||270===i?t-=e/2:(i>270||i<90)&&(t-=e),t}function Ks(t,e,i,n){const{ctx:o}=t;if(i)o.arc(t.xCenter,t.yCenter,e,0,_t);else{let i=t.getPointPosition(0,e);o.moveTo(i.x,i.y);for(let s=1;s<n;s++)i=t.getPointPosition(s,e),o.lineTo(i.x,i.y)}}function Gs(t){return Tt(t)?t:0}Hs.id="logarithmic",Hs.defaults={ticks:{callback:Vi.formatters.logarithmic,major:{enabled:!0}}};class Zs extends Vs{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this;t.width=t.maxWidth,t.height=t.maxHeight,t.paddingTop=js(t.options)/2,t.xCenter=Math.floor(t.width/2),t.yCenter=Math.floor((t.height-t.paddingTop)/2),t.drawingArea=Math.min(t.height-t.paddingTop,t.width)/2}determineDataLimits(){const t=this,{min:e,max:i}=t.getMinMax(!1);t.min=X(e)&&!isNaN(e)?e:0,t.max=X(i)&&!isNaN(i)?i:0,t.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/js(this.options))}generateTickLabels(t){const e=this;Vs.prototype.generateTickLabels.call(e,t),e._pointLabels=e.getLabels().map(((t,i)=>{const n=Q(e.options.pointLabels.callback,[t,i],e);return n||0===n?n:""}))}fit(){const t=this,e=t.options;e.display&&e.pointLabels.display?Ys(t):t.setCenterPoint(0,0,0,0)}_setReductions(t,e,i){const n=this;let o=e.l/Math.sin(i.l),s=Math.max(e.r-n.width,0)/Math.sin(i.r),a=-e.t/Math.cos(i.t),r=-Math.max(e.b-(n.height-n.paddingTop),0)/Math.cos(i.b);o=Gs(o),s=Gs(s),a=Gs(a),r=Gs(r),n.drawingArea=Math.max(t/2,Math.min(Math.floor(t-(o+s)/2),Math.floor(t-(a+r)/2))),n.setCenterPoint(o,s,a,r)}setCenterPoint(t,e,i,n){const o=this,s=o.width-e-o.drawingArea,a=t+o.drawingArea,r=i+o.drawingArea,l=o.height-o.paddingTop-n-o.drawingArea;o.xCenter=Math.floor((a+s)/2+o.left),o.yCenter=Math.floor((r+l)/2+o.top+o.paddingTop)}getIndexAngle(t){return Wt(t*(_t/this.getLabels().length)+Et(this.options.startAngle||0))}getDistanceFromCenterForValue(t){const e=this;if($(t))return NaN;const i=e.drawingArea/(e.max-e.min);return e.options.reverse?(e.max-t)*i:(t-e.min)*i}getValueForDistanceFromCenter(t){if($(t))return NaN;const e=this,i=t/(e.drawingArea/(e.max-e.min));return e.options.reverse?e.max-i:e.min+i}getPointPosition(t,e){const i=this,n=i.getIndexAngle(t)-Mt;return{x:Math.cos(n)*e+i.xCenter,y:Math.sin(n)*e+i.yCenter,angle:n}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:i,right:n,bottom:o}=this._pointLabelItems[t];return{left:e,top:i,right:n,bottom:o}}drawBackground(){const t=this,{backgroundColor:e,grid:{circular:i}}=t.options;if(e){const n=t.ctx;n.save(),n.beginPath(),Ks(t,t.getDistanceFromCenterForValue(t._endValue),i,t.getLabels().length),n.closePath(),n.fillStyle=e,n.fill(),n.restore()}}drawGrid(){const t=this,e=t.ctx,i=t.options,{angleLines:n,grid:o}=i,s=t.getLabels().length;let a,r,l;if(i.pointLabels.display&&function(t,e){const{ctx:i,options:{pointLabels:n}}=t;for(let o=e-1;o>=0;o--){const e=n.setContext(t.getContext(o)),s=Be(e.font),{x:a,y:r,textAlign:l,left:c,top:h,right:d,bottom:u}=t._pointLabelItems[o],{backdropColor:f}=e;if(!$(f)){const t=Fe(e.backdropPadding);i.fillStyle=f,i.fillRect(c-t.left,h-t.top,d-c+t.width,u-h+t.height)}ee(i,t._pointLabels[o],a,r+s.lineHeight/2,s,{color:e.color,textAlign:l,textBaseline:"middle"})}}(t,s),o.display&&t.ticks.forEach(((e,i)=>{if(0!==i){r=t.getDistanceFromCenterForValue(e.value);const n=o.setContext(t.getContext(i-1));!function(t,e,i,n){const o=t.ctx,s=e.circular,{color:a,lineWidth:r}=e;!s&&!n||!a||!r||i<0||(o.save(),o.strokeStyle=a,o.lineWidth=r,o.setLineDash(e.borderDash),o.lineDashOffset=e.borderDashOffset,o.beginPath(),Ks(t,i,s,n),o.closePath(),o.stroke(),o.restore())}(t,n,r,s)}})),n.display){for(e.save(),a=t.getLabels().length-1;a>=0;a--){const o=n.setContext(t.getContext(a)),{color:s,lineWidth:c}=o;c&&s&&(e.lineWidth=c,e.strokeStyle=s,e.setLineDash(o.borderDash),e.lineDashOffset=o.borderDashOffset,r=t.getDistanceFromCenterForValue(i.ticks.reverse?t.min:t.max),l=t.getPointPosition(a,r),e.beginPath(),e.moveTo(t.xCenter,t.yCenter),e.lineTo(l.x,l.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const t=this,e=t.ctx,i=t.options,n=i.ticks;if(!n.display)return;const o=t.getIndexAngle(0);let s,a;e.save(),e.translate(t.xCenter,t.yCenter),e.rotate(o),e.textAlign="center",e.textBaseline="middle",t.ticks.forEach(((o,r)=>{if(0===r&&!i.reverse)return;const l=n.setContext(t.getContext(r)),c=Be(l.font);if(s=t.getDistanceFromCenterForValue(t.ticks[r].value),l.showLabelBackdrop){e.font=c.string,a=e.measureText(o.label).width,e.fillStyle=l.backdropColor;const t=Fe(l.backdropPadding);e.fillRect(-a/2-t.left,-s-c.size/2-t.top,a+t.width,c.size+t.height)}ee(e,o.label,0,-s,c,{color:l.color})})),e.restore()}drawTitle(){}}Zs.id="radialLinear",Zs.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Vi.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5}},Zs.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},Zs.descriptors={angleLines:{_fallback:"grid"}};const Qs={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}},Js=Object.keys(Qs);function ta(t,e){return t-e}function ea(t,e){if($(e))return null;const i=t._adapter,{parser:n,round:o,isoWeekday:s}=t._parseOpts;let a=e;return"function"==typeof n&&(a=n(a)),X(a)||(a="string"==typeof n?i.parse(a,n):i.parse(a)),null===a?null:(o&&(a="week"!==o||!Tt(s)&&!0!==s?i.startOf(a,o):i.startOf(a,"isoWeek",s)),+a)}function ia(t,e,i,n){const o=Js.length;for(let s=Js.indexOf(t);s<o-1;++s){const t=Qs[Js[s]],o=t.steps?t.steps:Number.MAX_SAFE_INTEGER;if(t.common&&Math.ceil((i-e)/(o*t.size))<=n)return Js[s]}return Js[o-1]}function na(t,e,i){if(i){if(i.length){const{lo:n,hi:o}=oe(i,e);t[i[n]>=e?i[n]:i[o]]=!0}}else t[e]=!0}function oa(t,e,i){const n=[],o={},s=e.length;let a,r;for(a=0;a<s;++a)r=e[a],o[r]=a,n.push({value:r,major:!1});return 0!==s&&i?function(t,e,i,n){const o=t._adapter,s=+o.startOf(e[0].value,n),a=e[e.length-1].value;let r,l;for(r=s;r<=a;r=+o.add(r,1,n))l=i[r],l>=0&&(e[l].major=!0);return e}(t,n,o,i):n}class sa extends qi{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 ao._date(t.adapters.date);st(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:ea(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this,e=t.options,i=t._adapter,n=e.time.unit||"day";let{min:o,max:s,minDefined:a,maxDefined:r}=t.getUserBounds();function l(t){a||isNaN(t.min)||(o=Math.min(o,t.min)),r||isNaN(t.max)||(s=Math.max(s,t.max))}a&&r||(l(t._getLabelBounds()),"ticks"===e.bounds&&"labels"===e.ticks.source||l(t.getMinMax(!1))),o=X(o)&&!isNaN(o)?o:+i.startOf(Date.now(),n),s=X(s)&&!isNaN(s)?s:+i.endOf(Date.now(),n)+1,t.min=Math.min(o,s-1),t.max=Math.max(o+1,s)}_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,e=t.options,i=e.time,n=e.ticks,o="labels"===n.source?t.getLabelTimestamps():t._generate();"ticks"===e.bounds&&o.length&&(t.min=t._userMin||o[0],t.max=t._userMax||o[o.length-1]);const s=t.min,a=re(o,s,t.max);return t._unit=i.unit||(n.autoSkip?ia(i.minUnit,t.min,t.max,t._getLabelCapacity(s)):function(t,e,i,n,o){for(let s=Js.length-1;s>=Js.indexOf(i);s--){const i=Js[s];if(Qs[i].common&&t._adapter.diff(o,n,i)>=e-1)return i}return Js[i?Js.indexOf(i):0]}(t,a.length,i.minUnit,t.min,t.max)),t._majorUnit=n.major.enabled&&"year"!==t._unit?function(t){for(let e=Js.indexOf(t)+1,i=Js.length;e<i;++e)if(Qs[Js[e]].common)return Js[e]}(t._unit):void 0,t.initOffsets(o),e.reverse&&a.reverse(),oa(t,a,t._majorUnit)}initOffsets(t){const e=this;let i,n,o=0,s=0;e.options.offset&&t.length&&(i=e.getDecimalForValue(t[0]),o=1===t.length?1-i:(e.getDecimalForValue(t[1])-i)/2,n=e.getDecimalForValue(t[t.length-1]),s=1===t.length?n:(n-e.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;o=Ht(o,0,a),s=Ht(s,0,a),e._offsets={start:o,end:s,factor:1/(o+1+s)}}_generate(){const t=this,e=t._adapter,i=t.min,n=t.max,o=t.options,s=o.time,a=s.unit||ia(s.minUnit,i,n,t._getLabelCapacity(i)),r=K(s.stepSize,1),l="week"===a&&s.isoWeekday,c=Tt(l)||!0===l,h={};let d,u,f=i;if(c&&(f=+e.startOf(f,"isoWeek",l)),f=+e.startOf(f,c?"day":a),e.diff(n,i,a)>1e5*r)throw new Error(i+" and "+n+" are too far apart with stepSize of "+r+" "+a);const g="data"===o.ticks.source&&t.getDataTimestamps();for(d=f,u=0;d<n;d=+e.add(d,r,a),u++)na(h,d,g);return d!==n&&"ticks"!==o.bounds&&1!==u||na(h,d,g),Object.keys(h).sort(((t,e)=>t-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 o=this,s=o.options,a=s.time.displayFormats,r=o._unit,l=o._majorUnit,c=r&&a[r],h=l&&a[l],d=i[e],u=l&&h&&d&&d.major,f=o._adapter.format(t,n||(u?h:c)),g=s.ticks.callback;return g?Q(g,[f,e,i],o):f}generateTickLabels(t){let e,i,n;for(e=0,i=t.length;e<i;++e)n=t[e],n.label=this._tickFormatFunction(n.value,e,t)}getDecimalForValue(t){const e=this;return null===t?NaN:(t-e.min)/(e.max-e.min)}getPixelForValue(t){const e=this,i=e._offsets,n=e.getDecimalForValue(t);return e.getPixelForDecimal((i.start+n)*i.factor)}getValueForPixel(t){const e=this,i=e._offsets,n=e.getDecimalForPixel(t)/i.factor-i.end;return e.min+n*(e.max-e.min)}_getLabelSize(t){const e=this,i=e.options.ticks,n=e.ctx.measureText(t).width,o=Et(e.isHorizontal()?i.maxRotation:i.minRotation),s=Math.cos(o),a=Math.sin(o),r=e._resolveTickFontOptions(0).size;return{w:n*s+r*a,h:n*a+r*s}}_getLabelCapacity(t){const e=this,i=e.options.time,n=i.displayFormats,o=n[i.unit]||n.millisecond,s=e._tickFormatFunction(t,0,oa(e,[t],e._majorUnit),o),a=e._getLabelSize(s),r=Math.floor(e.isHorizontal()?e.width/a.w:e.height/a.h)-1;return r>0?r:1}getDataTimestamps(){const t=this;let e,i,n=t._cache.data||[];if(n.length)return n;const o=t.getMatchingVisibleMetas();if(t._normalized&&o.length)return t._cache.data=o[0].controller.getAllParsedValues(t);for(e=0,i=o.length;e<i;++e)n=n.concat(o[e].controller.getAllParsedValues(t));return t._cache.data=t.normalize(n)}getLabelTimestamps(){const t=this,e=t._cache.labels||[];let i,n;if(e.length)return e;const o=t.getLabels();for(i=0,n=o.length;i<n;++i)e.push(ea(t,o[i]));return t._cache.labels=t._normalized?e:t.normalize(e)}normalize(t){return de(t.sort(ta))}}function aa(t,e,i){let n,o,s,a,r=0,l=t.length-1;i?(e>=t[r].pos&&e<=t[l].pos&&({lo:r,hi:l}=se(t,"pos",e)),({pos:n,time:s}=t[r]),({pos:o,time:a}=t[l])):(e>=t[r].time&&e<=t[l].time&&({lo:r,hi:l}=se(t,"time",e)),({time:n,pos:s}=t[r]),({time:o,pos:a}=t[l]));const c=o-n;return c?s+(a-s)*(e-n)/c:s}sa.id="time",sa.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};class ra extends sa{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this,e=t._getTimestampsForTable(),i=t._table=t.buildLookupTable(e);t._minPos=aa(i,t.min),t._tableRange=aa(i,t.max)-t._minPos,super.initOffsets(e)}buildLookupTable(t){const{min:e,max:i}=this,n=[],o=[];let s,a,r,l,c;for(s=0,a=t.length;s<a;++s)l=t[s],l>=e&&l<=i&&n.push(l);if(n.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(s=0,a=n.length;s<a;++s)c=n[s+1],r=n[s-1],l=n[s],Math.round((c+r)/2)!==l&&o.push({time:l,pos:s/(a-1)});return o}_getTimestampsForTable(){const t=this;let e=t._cache.all||[];if(e.length)return e;const i=t.getDataTimestamps(),n=t.getLabelTimestamps();return e=i.length&&n.length?t.normalize(i.concat(n)):i.length?i:n,e=t._cache.all=e,e}getDecimalForValue(t){return(aa(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this,i=e._offsets,n=e.getDecimalForPixel(t)/i.factor-i.end;return aa(e._table,n*e._tableRange+e._minPos,!0)}}ra.id="timeseries",ra.defaults=sa.defaults;var la=Object.freeze({__proto__:null,CategoryScale:Fs,LinearScale:Ws,LogarithmicScale:Hs,RadialLinearScale:Zs,TimeScale:sa,TimeSeriesScale:ra});return eo.register(yo,la,Xo,zs),eo.helpers={...Tn},eo._adapters=ao,eo.Animation=yi,eo.Animations=wi,eo.animator=a,eo.controllers=Ln.controllers.items,eo.DatasetController=Ei,eo.Element=zi,eo.elements=Xo,eo.Interaction=Te,eo.layouts=Ze,eo.platforms=fi,eo.Scale=qi,eo.Ticks=Vi,Object.assign(eo,yo,la,Xo,zs,fi),eo.Chart=eo,"undefined"!=typeof window&&(window.Chart=eo),eo}));
|
includes/admin/class-wp-statistics-admin-assets.php
CHANGED
@@ -139,7 +139,7 @@ class Admin_Assets
|
|
139 |
|
140 |
// Load Chart Js Library [ Load in <head> Tag ]
|
141 |
if (Menus::in_plugin_page() || (in_array($screen_id, array('dashboard')) and !Option::get('disable_dashboard')) || (in_array($hook, array('post.php', 'edit.php', 'post-new.php')) and !Option::get('disable_editor'))) {
|
142 |
-
wp_enqueue_script(self::$prefix . '-chart.js', self::url('chartjs/chart.
|
143 |
}
|
144 |
|
145 |
// Load Jquery VMap Js Library
|
139 |
|
140 |
// Load Chart Js Library [ Load in <head> Tag ]
|
141 |
if (Menus::in_plugin_page() || (in_array($screen_id, array('dashboard')) and !Option::get('disable_dashboard')) || (in_array($hook, array('post.php', 'edit.php', 'post-new.php')) and !Option::get('disable_editor'))) {
|
142 |
+
wp_enqueue_script(self::$prefix . '-chart.js', self::url('chartjs/chart.min.js'), false, '3.4.1', false);
|
143 |
}
|
144 |
|
145 |
// Load Jquery VMap Js Library
|
includes/admin/meta-box/wp-statistics-meta-box-top-pages-chart.php
CHANGED
@@ -63,9 +63,9 @@ class top_pages_chart
|
|
63 |
|
64 |
// Set Title
|
65 |
if (end($days_time_list) == TimeZone::getCurrentDate("Y-m-d")) {
|
66 |
-
$title = sprintf(__('Top 5 Pages
|
67 |
} else {
|
68 |
-
$title = sprintf(__('Top 5 Pages
|
69 |
}
|
70 |
|
71 |
// Get List Of Top Pages
|
63 |
|
64 |
// Set Title
|
65 |
if (end($days_time_list) == TimeZone::getCurrentDate("Y-m-d")) {
|
66 |
+
$title = sprintf(__('Top 5 Trending Pages in the last %s days', 'wp-statistics'), $count_day);
|
67 |
} else {
|
68 |
+
$title = sprintf(__('Top 5 Trending Pages from %s to %s', 'wp-statistics'), $args['from'], $args['to']);
|
69 |
}
|
70 |
|
71 |
// Get List Of Top Pages
|
includes/admin/templates/pages/pages.php
CHANGED
@@ -3,10 +3,10 @@
|
|
3 |
<div class="meta-box-sortables">
|
4 |
<div class="postbox" id="<?php echo \WP_STATISTICS\Meta_Box::getMetaBoxKey('top-pages-chart'); ?>">
|
5 |
<button class="handlediv" type="button" aria-expanded="true">
|
6 |
-
<span class="screen-reader-text"><?php printf(__('Toggle panel: %s', 'wp-statistics'), __('Top 5 Pages
|
7 |
<span class="toggle-indicator" aria-hidden="true"></span>
|
8 |
</button>
|
9 |
-
<h2 class="hndle wps-d-inline-block"><span><?php _e('Top 5 Pages
|
10 |
</h2>
|
11 |
<div class="inside">
|
12 |
<!-- Do Js -->
|
3 |
<div class="meta-box-sortables">
|
4 |
<div class="postbox" id="<?php echo \WP_STATISTICS\Meta_Box::getMetaBoxKey('top-pages-chart'); ?>">
|
5 |
<button class="handlediv" type="button" aria-expanded="true">
|
6 |
+
<span class="screen-reader-text"><?php printf(__('Toggle panel: %s', 'wp-statistics'), __('Top 5 Trending Pages', 'wp-statistics')); ?></span>
|
7 |
<span class="toggle-indicator" aria-hidden="true"></span>
|
8 |
</button>
|
9 |
+
<h2 class="hndle wps-d-inline-block"><span><?php _e('Top 5 Trending Pages', 'wp-statistics'); ?></span>
|
10 |
</h2>
|
11 |
<div class="inside">
|
12 |
<!-- Do Js -->
|
includes/admin/templates/settings/externals.php
CHANGED
@@ -192,11 +192,10 @@
|
|
192 |
if (WP_STATISTICS\Option::get('schedule_referrerspam')) {
|
193 |
echo '<p class="description">' . __('Next update will be', 'wp-statistics') . ': <code>';
|
194 |
$last_update = WP_STATISTICS\Option::get('schedule_referrerspam');
|
195 |
-
if ($last_update == 0) {
|
196 |
$last_update = time();
|
197 |
}
|
198 |
$next_update = $last_update + (86400 * 7);
|
199 |
-
|
200 |
$next_schedule = wp_next_scheduled('wp_statistics_referrerspam_hook');
|
201 |
|
202 |
if ($next_schedule) {
|
192 |
if (WP_STATISTICS\Option::get('schedule_referrerspam')) {
|
193 |
echo '<p class="description">' . __('Next update will be', 'wp-statistics') . ': <code>';
|
194 |
$last_update = WP_STATISTICS\Option::get('schedule_referrerspam');
|
195 |
+
if ($last_update == 0 or !$last_update) {
|
196 |
$last_update = time();
|
197 |
}
|
198 |
$next_update = $last_update + (86400 * 7);
|
|
|
199 |
$next_schedule = wp_next_scheduled('wp_statistics_referrerspam_hook');
|
200 |
|
201 |
if ($next_schedule) {
|
includes/admin/templates/settings/notifications.php
CHANGED
@@ -104,6 +104,7 @@
|
|
104 |
?>
|
105 |
</select>
|
106 |
<p class="description"><?php _e('Select how often to receive statistical report.', 'wp-statistics'); ?></p>
|
|
|
107 |
</td>
|
108 |
</tr>
|
109 |
|
104 |
?>
|
105 |
</select>
|
106 |
<p class="description"><?php _e('Select how often to receive statistical report.', 'wp-statistics'); ?></p>
|
107 |
+
<p class="description"><?php echo sprintf(__('To set your own schedule, check out <a href="%s" target="_blank">this doc</a>.', 'wp-statistics'), 'https://wp-statistics.com/resources/schedule-statistical-reports/'); ?></p>
|
108 |
</td>
|
109 |
</tr>
|
110 |
|
includes/class-wp-statistics-historical.php
CHANGED
@@ -33,7 +33,7 @@ class Historical
|
|
33 |
# Create SQL
|
34 |
switch ($type) {
|
35 |
case 'uri':
|
36 |
-
$sql =
|
37 |
break;
|
38 |
case 'page':
|
39 |
$sql = $wpdb->prepare("SELECT `value` FROM " . DB::table('historical') . " WHERE `category` = 'uri' AND `page_id` = %d", $id);
|
33 |
# Create SQL
|
34 |
switch ($type) {
|
35 |
case 'uri':
|
36 |
+
$sql = "SELECT `value` FROM " . DB::table('historical') . " WHERE `category` = 'uri'";
|
37 |
break;
|
38 |
case 'page':
|
39 |
$sql = $wpdb->prepare("SELECT `value` FROM " . DB::table('historical') . " WHERE `category` = 'uri' AND `page_id` = %d", $id);
|
includes/class-wp-statistics-meta-box.php
CHANGED
@@ -195,7 +195,7 @@ class Meta_Box
|
|
195 |
'disable_overview' => true
|
196 |
),
|
197 |
'top-pages-chart' => array(
|
198 |
-
'name' => __('Top 5 Pages
|
199 |
'show_on_dashboard' => false,
|
200 |
'disable_overview' => true
|
201 |
),
|
195 |
'disable_overview' => true
|
196 |
),
|
197 |
'top-pages-chart' => array(
|
198 |
+
'name' => __('Top 5 Trending Pages', 'wp-statistics'),
|
199 |
'show_on_dashboard' => false,
|
200 |
'disable_overview' => true
|
201 |
),
|
includes/class-wp-statistics-widget.php
CHANGED
@@ -110,7 +110,6 @@ class WP_Statistics_Widget extends \WP_Widget
|
|
110 |
}
|
111 |
|
112 |
if ($widget_options['ser_widget']) {
|
113 |
-
|
114 |
echo '<li>';
|
115 |
echo '<label>' . __('Search Engine Referrals', 'wp-statistics') . ': </label>';
|
116 |
echo number_format_i18n(wp_statistics_searchengine($widget_options['select_se']));
|
@@ -194,8 +193,7 @@ class WP_Statistics_Widget extends \WP_Widget
|
|
194 |
*/
|
195 |
public function update($new_instance, $old_instance)
|
196 |
{
|
197 |
-
|
198 |
-
if (array_key_exists('wp_statistics_control_widget_submit', $_POST)) {
|
199 |
$keys = array(
|
200 |
'name_widget' => 'name_widget',
|
201 |
'useronline_widget' => 'useronline_widget',
|
@@ -224,8 +222,8 @@ class WP_Statistics_Widget extends \WP_Widget
|
|
224 |
);
|
225 |
|
226 |
foreach ($keys as $key => $post) {
|
227 |
-
if (array_key_exists($post, $
|
228 |
-
$widget_options[$key] = $
|
229 |
} else {
|
230 |
$widget_options[$key] = '';
|
231 |
}
|
@@ -250,58 +248,58 @@ class WP_Statistics_Widget extends \WP_Widget
|
|
250 |
?>
|
251 |
<p>
|
252 |
<label for="name_widget"><?php _e('Name', 'wp-statistics'); ?>:
|
253 |
-
<input id="name_widget" name="name_widget" type="text" value="<?php echo $widget_options['name_widget']; ?>"/>
|
254 |
</label>
|
255 |
</p>
|
256 |
|
257 |
<?php _e('Items', 'wp-statistics'); ?>:<br/>
|
258 |
<ul>
|
259 |
<li>
|
260 |
-
<input type="checkbox" id="<?php echo esc_attr($this->get_field_id('useronline_widget')); ?>" name="useronline_widget" <?php checked('on', $widget_options['useronline_widget']); ?>/>
|
261 |
<label for="<?php echo esc_attr($this->get_field_id('useronline_widget')); ?>"><?php _e('Online Users', 'wp-statistics'); ?></label>
|
262 |
</li>
|
263 |
<li>
|
264 |
-
<input type="checkbox" id="<?php echo esc_attr($this->get_field_id('tvisit_widget')); ?>" name="tvisit_widget" <?php checked('on', $widget_options['tvisit_widget']); ?>/>
|
265 |
<label for="<?php echo esc_attr($this->get_field_id('tvisit_widget')); ?>"><?php _e('Today\'s Visits', 'wp-statistics'); ?></label>
|
266 |
</li>
|
267 |
<li>
|
268 |
-
<input type="checkbox" id="<?php echo esc_attr($this->get_field_id('tvisitor_widget')); ?>" name="tvisitor_widget" <?php checked('on', $widget_options['tvisitor_widget']); ?>/>
|
269 |
<label for="<?php echo esc_attr($this->get_field_id('tvisitor_widget')); ?>"><?php _e('Today\'s Visitors', 'wp-statistics'); ?></label>
|
270 |
</li>
|
271 |
<li>
|
272 |
-
<input type="checkbox" id="<?php echo esc_attr($this->get_field_id('yvisit_widget')); ?>" name="yvisit_widget" <?php checked('on', $widget_options['yvisit_widget']); ?>/>
|
273 |
<label for="<?php echo esc_attr($this->get_field_id('yvisit_widget')); ?>"><?php _e('Yesterday\'s Visits', 'wp-statistics'); ?></label>
|
274 |
</li>
|
275 |
<li>
|
276 |
-
<input type="checkbox" id="<?php echo esc_attr($this->get_field_id('yvisitor_widget')); ?>" name="yvisitor_widget" <?php checked('on', $widget_options['yvisitor_widget']); ?>/>
|
277 |
<label for="<?php echo esc_attr($this->get_field_id('yvisitor_widget')); ?>"><?php _e('Yesterday\'s Visitors', 'wp-statistics'); ?></label>
|
278 |
</li>
|
279 |
<li>
|
280 |
-
<input type="checkbox" id="<?php echo esc_attr($this->get_field_id('wvisit_widget')); ?>" name="wvisit_widget" <?php checked('on', $widget_options['wvisit_widget']); ?>/>
|
281 |
<label for="<?php echo esc_attr($this->get_field_id('wvisit_widget')); ?>"><?php _e('Last 7 Days Visits', 'wp-statistics'); ?></label>
|
282 |
</li>
|
283 |
<li>
|
284 |
-
<input type="checkbox" id="<?php echo esc_attr($this->get_field_id('mvisit_widget')); ?>" name="mvisit_widget" <?php checked('on', $widget_options['mvisit_widget']); ?>/>
|
285 |
<label for="<?php echo esc_attr($this->get_field_id('mvisit_widget')); ?>"><?php _e('Last 30 Days Visits', 'wp-statistics'); ?></label>
|
286 |
</li>
|
287 |
<li>
|
288 |
-
<input type="checkbox" id="<?php echo esc_attr($this->get_field_id('ysvisit_widget')); ?>" name="ysvisit_widget" <?php checked('on', $widget_options['ysvisit_widget']); ?>/>
|
289 |
<label for="<?php echo esc_attr($this->get_field_id('ysvisit_widget')); ?>"><?php _e('Last 365 Days Visits', 'wp-statistics'); ?></label>
|
290 |
</li>
|
291 |
<li>
|
292 |
-
<input type="checkbox" id="<?php echo esc_attr($this->get_field_id('ttvisit_widget')); ?>" name="ttvisit_widget" <?php checked('on', $widget_options['ttvisit_widget']); ?>/>
|
293 |
<label for="<?php echo esc_attr($this->get_field_id('ttvisit_widget')); ?>"><?php _e('Total Visits', 'wp-statistics'); ?></label>
|
294 |
</li>
|
295 |
<li>
|
296 |
-
<input type="checkbox" id="<?php echo esc_attr($this->get_field_id('ttvisitor_widget')); ?>" name="ttvisitor_widget" <?php checked('on', $widget_options['ttvisitor_widget']); ?>/>
|
297 |
<label for="<?php echo esc_attr($this->get_field_id('ttvisitor_widget')); ?>"><?php _e('Total Visitors', 'wp-statistics'); ?></label>
|
298 |
</li>
|
299 |
<li>
|
300 |
-
<input type="checkbox" id="<?php echo esc_attr($this->get_field_id('tpviews_widget')); ?>" name="tpviews_widget" <?php checked('on', $widget_options['tpviews_widget']); ?>/>
|
301 |
<label for="<?php echo esc_attr($this->get_field_id('tpviews_widget')); ?>"><?php _e('Total Page Views', 'wp-statistics'); ?></label>
|
302 |
</li>
|
303 |
<li>
|
304 |
-
<input type="checkbox" id="<?php echo esc_attr($this->get_field_id('ser_widget')); ?>" class="ser_widget" name="ser_widget" <?php checked('on', $widget_options['ser_widget']); ?>/>
|
305 |
<label for="<?php echo esc_attr($this->get_field_id('ser_widget')); ?>"><?php _e('Search Engine Referrals', 'wp-statistics'); ?></label>
|
306 |
|
307 |
<p id="ser_option" style="<?php if (!$widget_options['ser_widget']) {
|
@@ -324,44 +322,44 @@ class WP_Statistics_Widget extends \WP_Widget
|
|
324 |
</p>
|
325 |
</li>
|
326 |
<li>
|
327 |
-
<input type="checkbox" id="<?php echo esc_attr($this->get_field_id('tp_widget')); ?>" name="tp_widget" <?php checked('on', $widget_options['tp_widget']); ?>/>
|
328 |
<label for="<?php echo esc_attr($this->get_field_id('tp_widget')); ?>"><?php _e('Total Posts', 'wp-statistics'); ?></label>
|
329 |
</li>
|
330 |
<li>
|
331 |
-
<input type="checkbox" id="<?php echo esc_attr($this->get_field_id('tpg_widget')); ?>" name="tpg_widget" <?php checked('on', $widget_options['tpg_widget']); ?>/>
|
332 |
<label for="<?php echo esc_attr($this->get_field_id('tpg_widget')); ?>"><?php _e('Total Pages', 'wp-statistics'); ?></label>
|
333 |
</li>
|
334 |
<li>
|
335 |
-
<input type="checkbox" id="<?php echo esc_attr($this->get_field_id('tc_widget')); ?>" name="tc_widget" <?php checked('on', $widget_options['tc_widget']); ?>/>
|
336 |
<label for="<?php echo esc_attr($this->get_field_id('tc_widget')); ?>"><?php _e('Total Comments', 'wp-statistics'); ?></label>
|
337 |
</li>
|
338 |
<li>
|
339 |
-
<input type="checkbox" id="<?php echo esc_attr($this->get_field_id('ts_widget')); ?>" name="ts_widget" <?php checked('on', $widget_options['ts_widget']); ?>/>
|
340 |
<label for="<?php echo esc_attr($this->get_field_id('ts_widget')); ?>"><?php _e('Total Spams', 'wp-statistics'); ?></label>
|
341 |
</li>
|
342 |
<li>
|
343 |
-
<input type="checkbox" id="<?php echo esc_attr($this->get_field_id('tu_widget')); ?>" name="tu_widget" <?php checked('on', $widget_options['tu_widget']); ?>/>
|
344 |
<label for="<?php echo esc_attr($this->get_field_id('tu_widget')); ?>"><?php _e('Total Users', 'wp-statistics'); ?></label>
|
345 |
</li>
|
346 |
<li>
|
347 |
-
<input type="checkbox" id="<?php echo esc_attr($this->get_field_id('ap_widget')); ?>" name="ap_widget" <?php checked('on', $widget_options['ap_widget']); ?>/>
|
348 |
<label for="<?php echo esc_attr($this->get_field_id('ap_widget')); ?>"><?php _e('Post Average', 'wp-statistics'); ?></label>
|
349 |
</li>
|
350 |
<li>
|
351 |
-
<input type="checkbox" id="<?php echo esc_attr($this->get_field_id('ac_widget')); ?>" name="ac_widget" <?php checked('on', $widget_options['ac_widget']); ?>/>
|
352 |
<label for="<?php echo esc_attr($this->get_field_id('ac_widget')); ?>"><?php _e('Comment Average', 'wp-statistics'); ?></label>
|
353 |
</li>
|
354 |
<li>
|
355 |
-
<input type="checkbox" id="<?php echo esc_attr($this->get_field_id('au_widget')); ?>" name="au_widget" <?php checked('on', $widget_options['au_widget']); ?>/>
|
356 |
<label for="<?php echo esc_attr($this->get_field_id('au_widget')); ?>"><?php _e('User Average', 'wp-statistics'); ?></label>
|
357 |
</li>
|
358 |
<li>
|
359 |
-
<input type="checkbox" id="<?php echo esc_attr($this->get_field_id('lpd_widget')); ?>" class="lpd_widget" name="lpd_widget" <?php checked('on', $widget_options['lpd_widget']); ?>/>
|
360 |
<label for="<?php echo esc_attr($this->get_field_id('lpd_widget')); ?>"><?php _e('Last Post Date', 'wp-statistics'); ?></label>
|
361 |
</li>
|
362 |
</ul>
|
363 |
|
364 |
-
<input type="hidden" id="<?php echo esc_attr($this->get_field_id('wp_statistics_control_widget_submit')); ?>" name="wp_statistics_control_widget_submit" value="1"/>
|
365 |
<?php
|
366 |
}
|
367 |
}
|
110 |
}
|
111 |
|
112 |
if ($widget_options['ser_widget']) {
|
|
|
113 |
echo '<li>';
|
114 |
echo '<label>' . __('Search Engine Referrals', 'wp-statistics') . ': </label>';
|
115 |
echo number_format_i18n(wp_statistics_searchengine($widget_options['select_se']));
|
193 |
*/
|
194 |
public function update($new_instance, $old_instance)
|
195 |
{
|
196 |
+
if (array_key_exists('wp_statistics_control_widget_submit', $new_instance)) {
|
|
|
197 |
$keys = array(
|
198 |
'name_widget' => 'name_widget',
|
199 |
'useronline_widget' => 'useronline_widget',
|
222 |
);
|
223 |
|
224 |
foreach ($keys as $key => $post) {
|
225 |
+
if (array_key_exists($post, $new_instance)) {
|
226 |
+
$widget_options[$key] = $new_instance[$post];
|
227 |
} else {
|
228 |
$widget_options[$key] = '';
|
229 |
}
|
248 |
?>
|
249 |
<p>
|
250 |
<label for="name_widget"><?php _e('Name', 'wp-statistics'); ?>:
|
251 |
+
<input id="name_widget" name="<?php echo $this->get_field_name('name_widget'); ?>" type="text" value="<?php echo $widget_options['name_widget']; ?>"/>
|
252 |
</label>
|
253 |
</p>
|
254 |
|
255 |
<?php _e('Items', 'wp-statistics'); ?>:<br/>
|
256 |
<ul>
|
257 |
<li>
|
258 |
+
<input type="checkbox" id="<?php echo esc_attr($this->get_field_id('useronline_widget')); ?>" name="<?php echo $this->get_field_name('useronline_widget'); ?>" <?php checked('on', $widget_options['useronline_widget']); ?>/>
|
259 |
<label for="<?php echo esc_attr($this->get_field_id('useronline_widget')); ?>"><?php _e('Online Users', 'wp-statistics'); ?></label>
|
260 |
</li>
|
261 |
<li>
|
262 |
+
<input type="checkbox" id="<?php echo esc_attr($this->get_field_id('tvisit_widget')); ?>" name="<?php echo $this->get_field_name('tvisit_widget'); ?>" <?php checked('on', $widget_options['tvisit_widget']); ?>/>
|
263 |
<label for="<?php echo esc_attr($this->get_field_id('tvisit_widget')); ?>"><?php _e('Today\'s Visits', 'wp-statistics'); ?></label>
|
264 |
</li>
|
265 |
<li>
|
266 |
+
<input type="checkbox" id="<?php echo esc_attr($this->get_field_id('tvisitor_widget')); ?>" name="<?php echo $this->get_field_name('tvisitor_widget'); ?>" <?php checked('on', $widget_options['tvisitor_widget']); ?>/>
|
267 |
<label for="<?php echo esc_attr($this->get_field_id('tvisitor_widget')); ?>"><?php _e('Today\'s Visitors', 'wp-statistics'); ?></label>
|
268 |
</li>
|
269 |
<li>
|
270 |
+
<input type="checkbox" id="<?php echo esc_attr($this->get_field_id('yvisit_widget')); ?>" name="<?php echo $this->get_field_name('yvisit_widget'); ?>" <?php checked('on', $widget_options['yvisit_widget']); ?>/>
|
271 |
<label for="<?php echo esc_attr($this->get_field_id('yvisit_widget')); ?>"><?php _e('Yesterday\'s Visits', 'wp-statistics'); ?></label>
|
272 |
</li>
|
273 |
<li>
|
274 |
+
<input type="checkbox" id="<?php echo esc_attr($this->get_field_id('yvisitor_widget')); ?>" name="<?php echo $this->get_field_name('yvisitor_widget'); ?>" <?php checked('on', $widget_options['yvisitor_widget']); ?>/>
|
275 |
<label for="<?php echo esc_attr($this->get_field_id('yvisitor_widget')); ?>"><?php _e('Yesterday\'s Visitors', 'wp-statistics'); ?></label>
|
276 |
</li>
|
277 |
<li>
|
278 |
+
<input type="checkbox" id="<?php echo esc_attr($this->get_field_id('wvisit_widget')); ?>" name="<?php echo $this->get_field_name('wvisit_widget'); ?>" <?php checked('on', $widget_options['wvisit_widget']); ?>/>
|
279 |
<label for="<?php echo esc_attr($this->get_field_id('wvisit_widget')); ?>"><?php _e('Last 7 Days Visits', 'wp-statistics'); ?></label>
|
280 |
</li>
|
281 |
<li>
|
282 |
+
<input type="checkbox" id="<?php echo esc_attr($this->get_field_id('mvisit_widget')); ?>" name="<?php echo $this->get_field_name('mvisit_widget'); ?>" <?php checked('on', $widget_options['mvisit_widget']); ?>/>
|
283 |
<label for="<?php echo esc_attr($this->get_field_id('mvisit_widget')); ?>"><?php _e('Last 30 Days Visits', 'wp-statistics'); ?></label>
|
284 |
</li>
|
285 |
<li>
|
286 |
+
<input type="checkbox" id="<?php echo esc_attr($this->get_field_id('ysvisit_widget')); ?>" name="<?php echo $this->get_field_name('ysvisit_widget'); ?>" <?php checked('on', $widget_options['ysvisit_widget']); ?>/>
|
287 |
<label for="<?php echo esc_attr($this->get_field_id('ysvisit_widget')); ?>"><?php _e('Last 365 Days Visits', 'wp-statistics'); ?></label>
|
288 |
</li>
|
289 |
<li>
|
290 |
+
<input type="checkbox" id="<?php echo esc_attr($this->get_field_id('ttvisit_widget')); ?>" name="<?php echo $this->get_field_name('ttvisit_widget'); ?>" <?php checked('on', $widget_options['ttvisit_widget']); ?>/>
|
291 |
<label for="<?php echo esc_attr($this->get_field_id('ttvisit_widget')); ?>"><?php _e('Total Visits', 'wp-statistics'); ?></label>
|
292 |
</li>
|
293 |
<li>
|
294 |
+
<input type="checkbox" id="<?php echo esc_attr($this->get_field_id('ttvisitor_widget')); ?>" name="<?php echo $this->get_field_name('ttvisitor_widget'); ?>" <?php checked('on', $widget_options['ttvisitor_widget']); ?>/>
|
295 |
<label for="<?php echo esc_attr($this->get_field_id('ttvisitor_widget')); ?>"><?php _e('Total Visitors', 'wp-statistics'); ?></label>
|
296 |
</li>
|
297 |
<li>
|
298 |
+
<input type="checkbox" id="<?php echo esc_attr($this->get_field_id('tpviews_widget')); ?>" name="<?php echo $this->get_field_name('tpviews_widget'); ?>" <?php checked('on', $widget_options['tpviews_widget']); ?>/>
|
299 |
<label for="<?php echo esc_attr($this->get_field_id('tpviews_widget')); ?>"><?php _e('Total Page Views', 'wp-statistics'); ?></label>
|
300 |
</li>
|
301 |
<li>
|
302 |
+
<input type="checkbox" id="<?php echo esc_attr($this->get_field_id('ser_widget')); ?>" class="ser_widget" name="<?php echo $this->get_field_name('ser_widget'); ?>" <?php checked('on', $widget_options['ser_widget']); ?>/>
|
303 |
<label for="<?php echo esc_attr($this->get_field_id('ser_widget')); ?>"><?php _e('Search Engine Referrals', 'wp-statistics'); ?></label>
|
304 |
|
305 |
<p id="ser_option" style="<?php if (!$widget_options['ser_widget']) {
|
322 |
</p>
|
323 |
</li>
|
324 |
<li>
|
325 |
+
<input type="checkbox" id="<?php echo esc_attr($this->get_field_id('tp_widget')); ?>" name="<?php echo $this->get_field_name('tp_widget'); ?>" <?php checked('on', $widget_options['tp_widget']); ?>/>
|
326 |
<label for="<?php echo esc_attr($this->get_field_id('tp_widget')); ?>"><?php _e('Total Posts', 'wp-statistics'); ?></label>
|
327 |
</li>
|
328 |
<li>
|
329 |
+
<input type="checkbox" id="<?php echo esc_attr($this->get_field_id('tpg_widget')); ?>" name="<?php echo $this->get_field_name('tpg_widget'); ?>" <?php checked('on', $widget_options['tpg_widget']); ?>/>
|
330 |
<label for="<?php echo esc_attr($this->get_field_id('tpg_widget')); ?>"><?php _e('Total Pages', 'wp-statistics'); ?></label>
|
331 |
</li>
|
332 |
<li>
|
333 |
+
<input type="checkbox" id="<?php echo esc_attr($this->get_field_id('tc_widget')); ?>" name="<?php echo $this->get_field_name('tc_widget'); ?>" <?php checked('on', $widget_options['tc_widget']); ?>/>
|
334 |
<label for="<?php echo esc_attr($this->get_field_id('tc_widget')); ?>"><?php _e('Total Comments', 'wp-statistics'); ?></label>
|
335 |
</li>
|
336 |
<li>
|
337 |
+
<input type="checkbox" id="<?php echo esc_attr($this->get_field_id('ts_widget')); ?>" name="<?php echo $this->get_field_name('ts_widget'); ?>" <?php checked('on', $widget_options['ts_widget']); ?>/>
|
338 |
<label for="<?php echo esc_attr($this->get_field_id('ts_widget')); ?>"><?php _e('Total Spams', 'wp-statistics'); ?></label>
|
339 |
</li>
|
340 |
<li>
|
341 |
+
<input type="checkbox" id="<?php echo esc_attr($this->get_field_id('tu_widget')); ?>" name="<?php echo $this->get_field_name('tu_widget'); ?>" <?php checked('on', $widget_options['tu_widget']); ?>/>
|
342 |
<label for="<?php echo esc_attr($this->get_field_id('tu_widget')); ?>"><?php _e('Total Users', 'wp-statistics'); ?></label>
|
343 |
</li>
|
344 |
<li>
|
345 |
+
<input type="checkbox" id="<?php echo esc_attr($this->get_field_id('ap_widget')); ?>" name="<?php echo $this->get_field_name('ap_widget'); ?>" <?php checked('on', $widget_options['ap_widget']); ?>/>
|
346 |
<label for="<?php echo esc_attr($this->get_field_id('ap_widget')); ?>"><?php _e('Post Average', 'wp-statistics'); ?></label>
|
347 |
</li>
|
348 |
<li>
|
349 |
+
<input type="checkbox" id="<?php echo esc_attr($this->get_field_id('ac_widget')); ?>" name="<?php echo $this->get_field_name('ac_widget'); ?>" <?php checked('on', $widget_options['ac_widget']); ?>/>
|
350 |
<label for="<?php echo esc_attr($this->get_field_id('ac_widget')); ?>"><?php _e('Comment Average', 'wp-statistics'); ?></label>
|
351 |
</li>
|
352 |
<li>
|
353 |
+
<input type="checkbox" id="<?php echo esc_attr($this->get_field_id('au_widget')); ?>" name="<?php echo $this->get_field_name('au_widget'); ?>" <?php checked('on', $widget_options['au_widget']); ?>/>
|
354 |
<label for="<?php echo esc_attr($this->get_field_id('au_widget')); ?>"><?php _e('User Average', 'wp-statistics'); ?></label>
|
355 |
</li>
|
356 |
<li>
|
357 |
+
<input type="checkbox" id="<?php echo esc_attr($this->get_field_id('lpd_widget')); ?>" class="lpd_widget" name="<?php echo $this->get_field_name('lpd_widget'); ?>" <?php checked('on', $widget_options['lpd_widget']); ?>/>
|
358 |
<label for="<?php echo esc_attr($this->get_field_id('lpd_widget')); ?>"><?php _e('Last Post Date', 'wp-statistics'); ?></label>
|
359 |
</li>
|
360 |
</ul>
|
361 |
|
362 |
+
<input type="hidden" id="<?php echo esc_attr($this->get_field_id('wp_statistics_control_widget_submit')); ?>" name="<?php echo $this->get_field_name('wp_statistics_control_widget_submit'); ?>" value="1"/>
|
363 |
<?php
|
364 |
}
|
365 |
}
|
includes/class-wp-statistics.php
CHANGED
@@ -129,6 +129,9 @@ final class WP_Statistics
|
|
129 |
// third-party Libraries
|
130 |
require_once WP_STATISTICS_DIR . 'includes/vendor/autoload.php';
|
131 |
|
|
|
|
|
|
|
132 |
// Utility classes.
|
133 |
require_once WP_STATISTICS_DIR . 'includes/class-wp-statistics-db.php';
|
134 |
require_once WP_STATISTICS_DIR . 'includes/class-wp-statistics-timezone.php';
|
@@ -223,6 +226,36 @@ final class WP_Statistics
|
|
223 |
include WP_STATISTICS_DIR . 'includes/template-functions.php';
|
224 |
}
|
225 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
226 |
/**
|
227 |
* Loads the load plugin text domain code.
|
228 |
*/
|
@@ -270,8 +303,17 @@ final class WP_Statistics
|
|
270 |
if (is_array($message)) {
|
271 |
$message = json_encode($message);
|
272 |
}
|
273 |
-
|
274 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
275 |
fclose($file);
|
276 |
}
|
277 |
|
129 |
// third-party Libraries
|
130 |
require_once WP_STATISTICS_DIR . 'includes/vendor/autoload.php';
|
131 |
|
132 |
+
// Create the plugin upload directory in advance.
|
133 |
+
$this->create_upload_directory();
|
134 |
+
|
135 |
// Utility classes.
|
136 |
require_once WP_STATISTICS_DIR . 'includes/class-wp-statistics-db.php';
|
137 |
require_once WP_STATISTICS_DIR . 'includes/class-wp-statistics-timezone.php';
|
226 |
include WP_STATISTICS_DIR . 'includes/template-functions.php';
|
227 |
}
|
228 |
|
229 |
+
private function create_upload_directory()
|
230 |
+
{
|
231 |
+
$upload_dir = wp_upload_dir();
|
232 |
+
$upload_dir_name = $upload_dir['basedir'] . '/' . WP_STATISTICS_UPLOADS_DIR;
|
233 |
+
|
234 |
+
wp_mkdir_p($upload_dir_name);
|
235 |
+
|
236 |
+
/**
|
237 |
+
* Create .htaccess to avoid public access.
|
238 |
+
*/
|
239 |
+
if (is_dir($upload_dir_name) and is_writable($upload_dir_name)) {
|
240 |
+
$htaccess_file = path_join($upload_dir_name, '.htaccess');
|
241 |
+
|
242 |
+
if (!file_exists($htaccess_file)
|
243 |
+
and $handle = @fopen($htaccess_file, 'w')) {
|
244 |
+
fwrite($handle, "Deny from all\n");
|
245 |
+
fclose($handle);
|
246 |
+
}
|
247 |
+
}
|
248 |
+
|
249 |
+
/**
|
250 |
+
* Backward compatibility
|
251 |
+
* Move the wp-statistics.log to wp-content/uploads/wp-statistics/debug.log
|
252 |
+
*/
|
253 |
+
$legacy_old_log = ABSPATH . 'wp-statistics.log';
|
254 |
+
if (file_exists($legacy_old_log)) {
|
255 |
+
rename($legacy_old_log, path_join($upload_dir_name, 'debug.log'));
|
256 |
+
}
|
257 |
+
}
|
258 |
+
|
259 |
/**
|
260 |
* Loads the load plugin text domain code.
|
261 |
*/
|
303 |
if (is_array($message)) {
|
304 |
$message = json_encode($message);
|
305 |
}
|
306 |
+
|
307 |
+
$upload_dir = wp_upload_dir();
|
308 |
+
$upload_dir_name = $upload_dir['basedir'] . '/' . WP_STATISTICS_UPLOADS_DIR;
|
309 |
+
$log_file = path_join($upload_dir_name, 'debug.log');
|
310 |
+
|
311 |
+
/**
|
312 |
+
* Write the log file in the wp-content/uploads/wp-statistics
|
313 |
+
*/
|
314 |
+
$file = fopen($log_file, "a");
|
315 |
+
|
316 |
+
fwrite($file, "\n" . date('Y-m-d h:i:s') . ": " . $message);
|
317 |
fclose($file);
|
318 |
}
|
319 |
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: mostafa.s1990, mehrshaddarzi, kashani, veronalabs, GregRoss, dedid
|
|
3 |
Donate link: https://wp-statistics.com/donate/
|
4 |
Tags: analytics, wordpress analytics, stats, statistics, visit, visitors, hits, chart, browser, today, yesterday, week, month, year, total, post, page, sidebar, google, live visit, search word, agent, google analytics, webmasters, google webmasters, geoip, location
|
5 |
Requires at least: 3.0
|
6 |
-
Tested up to: 5.
|
7 |
-
Stable tag: 13.0.
|
8 |
Requires PHP: 5.6
|
9 |
License: GPLv3
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
@@ -124,6 +124,13 @@ Before updating, make sure you disabled all your add-ons, then after that, try t
|
|
124 |
If you encounter any bug, please create an issue on [Github](https://github.com/wp-statistics/wp-statistics/issues/new) where we can act upon them more efficiently. Since [Github](https://github.com/wp-statistics/wp-statistics) is not a support forum, just bugs are welcomed, and any other request will be closed.
|
125 |
|
126 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
127 |
= 13.0.8 =
|
128 |
- Improvement getting page id & type queries for the admin page
|
129 |
- Added no-cache in the hit endpoint response to compatibility with Cloudflare HTML caching
|
3 |
Donate link: https://wp-statistics.com/donate/
|
4 |
Tags: analytics, wordpress analytics, stats, statistics, visit, visitors, hits, chart, browser, today, yesterday, week, month, year, total, post, page, sidebar, google, live visit, search word, agent, google analytics, webmasters, google webmasters, geoip, location
|
5 |
Requires at least: 3.0
|
6 |
+
Tested up to: 5.8
|
7 |
+
Stable tag: 13.0.9
|
8 |
Requires PHP: 5.6
|
9 |
License: GPLv3
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
124 |
If you encounter any bug, please create an issue on [Github](https://github.com/wp-statistics/wp-statistics/issues/new) where we can act upon them more efficiently. Since [Github](https://github.com/wp-statistics/wp-statistics) is not a support forum, just bugs are welcomed, and any other request will be closed.
|
125 |
|
126 |
== Changelog ==
|
127 |
+
= 13.0.9 =
|
128 |
+
- Compatibility with PHP v8 and WordPress v5.8
|
129 |
+
- Fixed log file path and moved out to wp-content/uploads/wp-statistics/debug.log and protected for the public access as well
|
130 |
+
- Fixed updating widget and compatibility with block-based
|
131 |
+
- Improvement Image optimisation with ImageAlpha (png8+alpha) and ImageOptim. Thanks [vicocotea](https://github.com/vicocotea)
|
132 |
+
- Updated Chart.js to v3.4.1
|
133 |
+
|
134 |
= 13.0.8 =
|
135 |
- Improvement getting page id & type queries for the admin page
|
136 |
- Added no-cache in the hit endpoint response to compatibility with Cloudflare HTML caching
|
wp-statistics.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: WP Statistics
|
4 |
* Plugin URI: https://wp-statistics.com/
|
5 |
* Description: This plugin gives you the complete information on your website's visitors.
|
6 |
-
* Version: 13.0.
|
7 |
* Author: VeronaLabs
|
8 |
* Author URI: https://veronalabs.com/
|
9 |
* Text Domain: wp-statistics
|
3 |
* Plugin Name: WP Statistics
|
4 |
* Plugin URI: https://wp-statistics.com/
|
5 |
* Description: This plugin gives you the complete information on your website's visitors.
|
6 |
+
* Version: 13.0.9
|
7 |
* Author: VeronaLabs
|
8 |
* Author URI: https://veronalabs.com/
|
9 |
* Text Domain: wp-statistics
|