OSDN Git Service

OpenClash: Update to 0.44.28
authorTianling Shen <cnsztl@immortalwrt.org>
Mon, 28 Feb 2022 12:59:04 +0000 (20:59 +0800)
committerTianling Shen <cnsztl@immortalwrt.org>
Mon, 28 Feb 2022 12:59:04 +0000 (20:59 +0800)
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
84 files changed:
applications/luci-app-openclash/Makefile
applications/luci-app-openclash/luasrc/controller/openclash.lua
applications/luci-app-openclash/luasrc/model/cbi/openclash/config-subscribe-edit.lua
applications/luci-app-openclash/luasrc/model/cbi/openclash/config.lua
applications/luci-app-openclash/luasrc/model/cbi/openclash/rule-providers-config.lua
applications/luci-app-openclash/luasrc/model/cbi/openclash/settings.lua
applications/luci-app-openclash/luasrc/view/openclash/developer.htm
applications/luci-app-openclash/luasrc/view/openclash/dlercloud.htm
applications/luci-app-openclash/luasrc/view/openclash/download_rule.htm
applications/luci-app-openclash/luasrc/view/openclash/download_stream_domains.htm
applications/luci-app-openclash/luasrc/view/openclash/flush_fakeip_cache.htm [new file with mode: 0644]
applications/luci-app-openclash/luasrc/view/openclash/myip.htm
applications/luci-app-openclash/luasrc/view/openclash/status.htm
applications/luci-app-openclash/luasrc/view/openclash/update.htm
applications/luci-app-openclash/luasrc/view/openclash/upload.htm
applications/luci-app-openclash/po/zh-cn/openclash.zh-cn.po
applications/luci-app-openclash/root/etc/config/openclash
applications/luci-app-openclash/root/etc/init.d/openclash
applications/luci-app-openclash/root/etc/openclash/custom/openclash_custom_rules.list
applications/luci-app-openclash/root/usr/share/openclash/openclash_core.sh
applications/luci-app-openclash/root/usr/share/openclash/openclash_debug.sh
applications/luci-app-openclash/root/usr/share/openclash/openclash_streaming_unlock.lua
applications/luci-app-openclash/root/usr/share/openclash/res/openclash_version
applications/luci-app-openclash/root/usr/share/openclash/res/rule_providers.list
applications/luci-app-openclash/root/usr/share/openclash/res/sub_ini.list
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/Chart.min.44f6c6c6.js [deleted file]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/Chart.min.d34448a4.js [new file with mode: 0644]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/Config.029b666f.js [deleted file]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/Config.58870520.css [moved from applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/Config.af7c0f33.css with 89% similarity]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/Config.c5d3bc7b.js [new file with mode: 0644]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/Connections.48138f3b.css [moved from applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/Connections.9de0e2a6.css with 60% similarity]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/Connections.52bc9670.js [deleted file]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/Connections.ceacb570.js [new file with mode: 0644]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/Fab.200e0680.css [deleted file]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/Fab.44f13fef.css [new file with mode: 0644]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/Fab.4dc9cb99.js [deleted file]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/Fab.5de705c1.js [new file with mode: 0644]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/Logs.01e28256.js [deleted file]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/Logs.0ac7be6b.css [new file with mode: 0644]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/Logs.8b54b7be.css [deleted file]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/Logs.ec76f608.js [new file with mode: 0644]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/Proxies.2542038b.js [new file with mode: 0644]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/Proxies.568ae8cd.css [new file with mode: 0644]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/Proxies.71af777a.js [deleted file]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/Proxies.831754de.css [deleted file]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/Rules.b2ac0faa.js [deleted file]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/Rules.bb5bcacc.js [new file with mode: 0644]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/Select.29a5a6ae.js [deleted file]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/Select.55100629.js [new file with mode: 0644]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/TextFitler.00e03ee5.css [deleted file]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/TextFitler.11aeeb98.js [new file with mode: 0644]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/TextFitler.3d9182a0.css [new file with mode: 0644]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/TextFitler.cc7f7fa3.js [deleted file]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/debounce.76599460.js [deleted file]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/debounce.cc85a806.js [new file with mode: 0644]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/index.28cb98f3.js [new file with mode: 0644]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/index.812b4086.js [new file with mode: 0644]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/index.9233837d.js [deleted file]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/index.a628dc5e.css [deleted file]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/index.dca06f82.css [new file with mode: 0644]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/index.ee5bc09a.js [deleted file]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/index.esm.023d01c8.js [new file with mode: 0644]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/index.esm.edbe839b.js [deleted file]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/index.f268908c.js [new file with mode: 0644]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/index.fe1062b5.js [deleted file]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/logs.1fac2d96.js [new file with mode: 0644]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/logs.4dcb9935.js [deleted file]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/open-sans-latin-400-normal.a42f2ec7.woff2 [new file with mode: 0644]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/open-sans-latin-400-normal.c7118061.woff [new file with mode: 0644]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/open-sans-latin-400-normal.cce57747.woff2 [deleted file]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/open-sans-latin-400-normal.d7410996.woff [deleted file]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/open-sans-latin-700-normal.463da448.woff [new file with mode: 0644]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/open-sans-latin-700-normal.a61d6725.woff2 [deleted file]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/open-sans-latin-700-normal.b1fda8d8.woff [deleted file]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/open-sans-latin-700-normal.c7357554.woff2 [new file with mode: 0644]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/useRemainingViewPortHeight.7baef998.js [deleted file]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/useRemainingViewPortHeight.c7e29e4e.js [new file with mode: 0644]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/vendor.38e754a4.js [deleted file]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/vendor.3b6f54f7.js [new file with mode: 0644]
applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/zh.247ad8fa.js
applications/luci-app-openclash/root/usr/share/openclash/yacd/index.html
applications/luci-app-openclash/root/usr/share/openclash/yacd/sw.js
applications/luci-app-openclash/root/usr/share/openclash/yml_change.sh
applications/luci-app-openclash/root/usr/share/openclash/yml_rules_change.sh

index 56b0faf..45f5fdf 100644 (file)
@@ -1,7 +1,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=luci-app-openclash
-PKG_VERSION:=0.44.25
+PKG_VERSION:=0.44.28
 PKG_RELEASE:=beta
 PKG_MAINTAINER:=vernesong <https://github.com/vernesong/OpenClash>
 
index 8a8a38b..ceb2718 100644 (file)
@@ -30,6 +30,7 @@ function index()
        entry({"admin", "services", "openclash", "opupdate"},call("action_opupdate"))
        entry({"admin", "services", "openclash", "coreupdate"},call("action_coreupdate"))
        entry({"admin", "services", "openclash", "ping"}, call("act_ping"))
+       entry({"admin", "services", "openclash", "flush_fakeip_cache"}, call("action_flush_fakeip_cache"))
        entry({"admin", "services", "openclash", "download_rule"}, call("action_download_rule"))
        entry({"admin", "services", "openclash", "download_netflix_domains"}, call("action_download_netflix_domains"))
        entry({"admin", "services", "openclash", "download_disney_domains"}, call("action_download_disney_domains"))
@@ -334,6 +335,21 @@ function download_netflix_domains()
   return state
 end
 
+function action_flush_fakeip_cache()
+       local state = 0
+       if is_running() then
+               local daip = daip()
+               local dase = dase() or ""
+               local cn_port = cn_port()
+               if not daip or not cn_port then return end
+       state = luci.sys.exec(string.format('curl -sL -m 3 -H "Content-Type: application/json" -H "Authorization: Bearer %s" -XPOST http://"%s":"%s"/cache/fakeip/flush', dase, daip, cn_port))
+  end
+  luci.http.prepare_content("application/json")
+       luci.http.write_json({
+               flush_status = state;
+       })
+end
+
 function action_restore_config()
        uci:set("openclash", "config", "enable", "0")
        uci:commit("openclash")
@@ -1051,6 +1067,7 @@ function action_refresh_log()
                                local a = string.find (line, "【")
                                local b = string.find (line, "】") + 2
                                local c = 21
+                               local d = 0
                                local v
                                local x
                                while true do
@@ -1067,16 +1084,23 @@ function action_refresh_log()
                                        x = no_trans[k]
                                        v = no_trans[k+1]
                                        if x <= 21 then
-                                               line_trans = line_trans .. string.sub(line, 0, v)
+                                               line_trans = line_trans .. luci.i18n.translate(string.sub(line, d, x - 1)) .. string.sub(line, x, v)
+                                               d = v + 1
                                        elseif v <= string.len(line) then
                                                line_trans = line_trans .. luci.i18n.translate(string.sub(line, c, x - 1)) .. string.sub(line, x, v)
                                        end
                                        c = v + 1
                                end
                                if c > string.len(line) then
-                                       line_trans = string.sub(line, 0, 20) .. line_trans
+                                       if d == 0 then
+                                               line_trans = string.sub(line, 0, 20) .. line_trans
+                                       end
                                else
-                                       line_trans = string.sub(line, 0, 20) .. line_trans .. luci.i18n.translate(string.sub(line, c, -1))
+                                       if d == 0 then
+                                               line_trans = string.sub(line, 0, 20) .. line_trans .. luci.i18n.translate(string.sub(line, c, -1))
+                                       else
+                                               line_trans = line_trans .. luci.i18n.translate(string.sub(line, c, -1))
+                                       end
                                end
                        end
                        end
index d29b273..23e6d47 100644 (file)
@@ -43,7 +43,7 @@ o.rmempty = true
 
 ---- address
 o = s:option(Value, "address", translate("Subscribe Address"))
-o.description = font_red..bold_on..translate("Not Null")..bold_off..font_off
+o.description = font_red..bold_on..translate("SS/SSR/Vmess or Other Link And Subscription Address is Supported When Online Subscription Conversion is Enabled, Please Separate Multiple Links With |")..bold_off..font_off
 o.placeholder = translate("Not Null")
 o.datatype = "or(host, string)"
 o.rmempty = false
index c13cd54..755cc96 100644 (file)
@@ -76,12 +76,12 @@ dir = "/etc/openclash/config/"
 bakck_dir="/etc/openclash/backup"
 proxy_pro_dir="/etc/openclash/proxy_provider/"
 rule_pro_dir="/etc/openclash/rule_provider/"
+core_dir="/etc/openclash/core/core/"
 backup_dir="/tmp/"
 create_bakck_dir=fs.mkdir(bakck_dir)
 create_proxy_pro_dir=fs.mkdir(proxy_pro_dir)
 create_rule_pro_dir=fs.mkdir(rule_pro_dir)
 
-
 HTTP.setfilehandler(
        function(meta, chunk, eof)
                local fp = HTTP.formvalue("file_type")
@@ -94,6 +94,9 @@ HTTP.setfilehandler(
                                if meta and chunk then fd = nixio.open(proxy_pro_dir .. meta.file, "w") end
                        elseif fp == "rule-provider" then
                                if meta and chunk then fd = nixio.open(rule_pro_dir .. meta.file, "w") end
+                       elseif fp == "clash" or fp == "clash_tun" then
+                               create_core_dir=fs.mkdir(core_dir)
+                               if meta and chunk then fd = nixio.open(core_dir .. meta.file, "w") end
                        elseif fp == "backup-file" then
                                if meta and chunk then fd = nixio.open(backup_dir .. meta.file, "w") end
                        end
@@ -129,6 +132,21 @@ HTTP.setfilehandler(
                                um.value = translate("File saved to") .. ' "/etc/openclash/proxy_provider/"'
                        elseif fp == "rule-provider" then
                                um.value = translate("File saved to") .. ' "/etc/openclash/rule_provider/"'
+                       elseif fp == "clash" or fp == "clash_tun" then
+                               if string.lower(string.sub(meta.file, -7, -1)) == ".tar.gz" then
+                                       os.execute(string.format("tar -C '/etc/openclash/core/core' -xzf %s >/dev/null 2>&1", (core_dir .. meta.file)))
+                                       fs.unlink(core_dir .. meta.file)
+                                       os.execute(string.format("mv $(echo \"/etc/openclash/core/core/$(ls /etc/openclash/core/core/)\") '/etc/openclash/core/%s' >/dev/null 2>&1", fp))
+                               elseif string.lower(string.sub(meta.file, -3, -1)) == ".gz" then
+                                       os.execute(string.format("mv %s '/etc/openclash/core/%s.gz' >/dev/null 2>&1", (core_dir .. meta.file), fp))
+                                       os.execute("gzip -fd '/etc/openclash/core/%s.gz' >/dev/null 2>&1" %fp)
+                                       fs.unlink("/etc/openclash/core/%s.gz" %fp)
+                               else
+                                       os.execute(string.format("mv $(echo \"/etc/openclash/core/core/$(ls /etc/openclash/core/core/)\") '/etc/openclash/core/%s' >/dev/null 2>&1", fp))
+                               end
+                               os.execute("chmod 4755 /etc/openclash/core/%s >/dev/null 2>&1" %fp)
+                               os.execute("rm -rf %s >/dev/null 2>&1" %core_dir)
+                               um.value = translate("File saved to") .. ' "/etc/openclash/core/"'
                        elseif fp == "backup-file" then
                                os.execute("tar -C '/etc/openclash/' -xzf %s >/dev/null 2>&1" % (backup_dir .. meta.file))
                                os.execute("mv /etc/openclash/openclash /etc/config/openclash >/dev/null 2>&1")
@@ -143,7 +161,7 @@ HTTP.setfilehandler(
 if HTTP.formvalue("upload") then
        local f = HTTP.formvalue("ulfile")
        if #f <= 0 then
-               um.value = translate("No specify upload file.")
+               um.value = translate("No Specify Upload File")
        end
 end
 
index f124be6..f111141 100644 (file)
@@ -78,6 +78,14 @@ for t,f in ipairs(fs.glob("/etc/openclash/rule_provider/*"))do
     o:value("./rule_provider/"..p[t].name)
   end
 end
+for t,f in ipairs(fs.glob("/etc/openclash/game_rules/*"))do
+       h=fs.stat(f)
+       if h then
+    p[t]={}
+    p[t].name=fs.basename(f)
+    o:value("./game_rules/"..p[t].name)
+  end
+end
 o.rmempty = false
 o:depends("type", "file")
 
index 10a8683..7ef683d 100644 (file)
@@ -169,7 +169,7 @@ o.description = translate("Set Log File Size (KB)")
 o.default=1024
 
 o = s:taboption("settings", Flag, "intranet_allowed", translate("Only intranet allowed"))
-o.description = translate("When Enabled, The Control Panel And The Connection Broker Port Will Not Be Accessible From The Public Network, Not Support IPv6 Yet")
+o.description = translate("When Enabled, The Control Panel And The Connection Broker Port Will Not Be Accessible From The Public Network")
 o.default=0
 
 o = s:taboption("settings", Value, "dns_port")
@@ -237,6 +237,9 @@ if op_mode == "fake-ip" then
 o = s:taboption("dns", Flag, "store_fakeip", font_red..bold_on..translate("Persistence Fake-IP")..bold_off..font_off)
 o.description = font_red..bold_on..translate("Cache Fake-IP DNS Resolution Records To File, Improve The Response Speed After Startup")..bold_off..font_off
 o.default=1
+
+o = s:taboption("dns", DummyValue, "flush_fakeip_cache", translate("Flush Fake-IP Cache"))
+o.template = "openclash/flush_fakeip_cache"
 end
 
 o = s:taboption("dns", Flag, "ipv6_dns", translate("IPv6 DNS Resolve"))
index e5dafc1..f189124 100644 (file)
@@ -16,7 +16,6 @@
                <span id="_haishanh"><%:Collecting data...%></span>
                <span id="_MaxMind"><%:Collecting data...%></span>
                <span id="_FQrabbit"><%:Collecting data...%></span>
-               <span id="_Fndroid"><%:Collecting data...%></span>
                <span id="_Alecthw"><%:Collecting data...%></span>
                <span id="_Tindy_X"><%:Collecting data...%></span>
                <span id="_dlercloud"><%:Collecting data...%></span>
@@ -35,7 +34,6 @@
        var MaxMind = document.getElementById('_MaxMind');
        var haishanh = document.getElementById('_haishanh');
        var FQrabbit = document.getElementById('_FQrabbit');
-       var Fndroid = document.getElementById('_Fndroid');
        var Alecthw = document.getElementById('_Alecthw');
        var Tindy_X = document.getElementById('_Tindy_X');
        var dlercloud = document.getElementById('_dlercloud');
@@ -51,7 +49,6 @@
   MaxMind.innerHTML = '<img src="https://avatars3.githubusercontent.com/u/1181834?s=460&v=4" loading="lazy" style="border-radius:50%;" title="MaxMind" alt="MaxMind" width="50px" onerror="return imgerrorfun(this,this.src)" onclick="return MaxMind_rediret()" />';
   haishanh.innerHTML = '<img src="https://avatars1.githubusercontent.com/u/1166872?s=460&v=4" loading="lazy" style="border-radius:50%;" title="haishanh" alt="haishanh" width="50px" onerror="return imgerrorfun(this,this.src)" onclick="return haishanh_rediret()" />';
   FQrabbit.innerHTML = '<img src="https://avatars1.githubusercontent.com/u/29931248?s=460&v=4" loading="lazy" style="border-radius:50%;" title="FQrabbit" alt="FQrabbit" width="50px" onerror="return imgerrorfun(this,this.src)" onclick="return FQrabbit_rediret()" />';
-  Fndroid.innerHTML = '<img src="https://avatars1.githubusercontent.com/u/16091562?s=460&v=4" loading="lazy" style="border-radius:50%;" title="Fndroid" alt="Fndroid" width="50px" onerror="return imgerrorfun(this,this.src)" onclick="return Fndroid_rediret()" />';
   Alecthw.innerHTML = '<img src="https://avatars.githubusercontent.com/u/22856212?v=4" loading="lazy" style="border-radius:50%;" title="Alecthw" alt="Alecthw" width="50px" onerror="return imgerrorfun(this,this.src)" onclick="return Alecthw_rediret()" />';
   Tindy_X.innerHTML = '<img src="https://avatars0.githubusercontent.com/u/49061470?s=460&u=22a89312bf2de411e87340e04b5f9d149f7366cc&v=4" loading="lazy" style="border-radius:50%;" title="Tindy X" alt="Tindy X" width="50px" onerror="return imgerrorfun(this,this.src)" onclick="return Tindy_X_rediret()" />';
   dlercloud.innerHTML = '<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAMAAAEcq2jCAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyNpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ4IDc5LjE2NDAzNiwgMjAxOS8wOC8xMy0wMTowNjo1NyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIDIxLjAgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjFFQjY1RjRCMjJENDExRUM5NjlEQURCQTU4RDMyNUM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjFFQjY1RjRDMjJENDExRUM5NjlEQURCQTU4RDMyNUM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6MUVCNjVGNDkyMkQ0MTFFQzk2OURBREJBNThEMzI1QzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6MUVCNjVGNEEyMkQ0MTFFQzk2OURBREJBNThEMzI1QzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5CHITsAAACx1BMVEVjY2P+/v79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" loading="lazy" style="border-radius:50%;" title="Dler Cloud" alt="Dler Cloud" width="50px" onerror="return imgerrorfun(this,this.src)" onclick="return dlercloud_rediret()" />';
     enable.style.textAlign="center";
     disable.style.textAlign="center";
     
-    function dlercloud_rediret()
-    {
-        url15='https://dlercloud.com';
-        window.open(url15);
-    };
-    function immortalwrt_rediret()
-    {
-        url16='https://github.com/immortalwrt';
-        window.open(url16);
-    };
          function Dreamacro_rediret()
     {
         url1='https://github.com/Dreamacro';
         url10='https://github.com/haishanh';
         window.open(url10);
     };
-    function Fndroid_rediret()
+    function FQrabbit_rediret()
     {
-        url11='https://github.com/Fndroid';
+        url11='https://github.com/FQrabbit';
         window.open(url11);
     };
-    function FQrabbit_rediret()
+    function Alecthw_rediret()
     {
-        url12='https://github.com/FQrabbit';
+        url12='https://github.com/alecthw';
         window.open(url12);
     };
-    function Alecthw_rediret()
+    function Tindy_X_rediret()
     {
-        url13='https://github.com/alecthw';
+        url13='https://github.com/tindy2013';
         window.open(url13);
     };
-    
-    function Tindy_X_rediret()
+    function dlercloud_rediret()
     {
-        url14='https://github.com/tindy2013';
+        url14='https://bit.ly/32mrABp';
         window.open(url14);
     };
+    function immortalwrt_rediret()
+    {
+        url15='https://github.com/immortalwrt';
+        window.open(url15);
+    };
     
     function imgerrorfun(imgobj,imgSrc){
        setTimeout(function(){
index 82a17c6..9721849 100644 (file)
 }
 
 .card .general h1 {
-  font-size: 2rem;
+  font-size: 30px;
   text-align: center;
   margin-left: -12%;
+  padding-top: 5px;
 }
 
 .card .general .dler-info {
   color: #444;
   font-size:15px;
   display: inline-block;
-  width: 40%;
+  width: 45%;
   overflow: hidden;
   vertical-align:bottom;
   white-space: nowrap;
 .card .general .dler-result {
   color: #444;
   font-size:16px;
-  transform: translateX(35%);
   white-space: nowrap;
   display: inline-block;
-  width: 40%;
+  width: 55%;
   overflow: hidden;
   text-overflow: ellipsis;
   vertical-align:bottom;
 .card .general .dler-result2 {
   color: #444;
   font-size:16px;
-  transform: translateX(10%);
   white-space: nowrap;
   display: inline-block;
-  width: 50%;
+  width: 55%;
   overflow: hidden;
   text-overflow: ellipsis;
   vertical-align:bottom;
   font-weight: bold;
   display: inline-block;
   overflow: hidden;
-  margin-top: 20px;
   -webkit-appearance:button;
 }
 
 .card .general .more {
   float: right;
   top: 85%;
-  right: 2%;
+  right: 20px;
   font-size: 15px;
   height: 15%;
   position: absolute;
     <div class="general">
       <h1 id="dler-plan" ></h1>
        <div class="dler-info">
-               <div style="width: 40%">
-            <p>
+               <div style="width: 35%">
+            <p style="margin: 10px -22% 10px 22%">
                 <span class="dler-title"><%:Plan Expiration Time%>:</span><span class="dler-result" id="dler-plantime"><%:Collecting data...%></span>
             </p>
-            <p>
+            <p style="margin: 10px -22% 10px 22%">
                 <span class="dler-title"><%:Account Balances%>:</span><span class="dler-result" id="dler-money"><%:Collecting data...%></span>
             </p>
-            <p>
+            <p style="margin: 10px -22% 10px 22%">
                 <span class="dler-title"><%:Aff Balances%>:</span><span class="dler-result" id="dler-affmoney"><%:Collecting data...%></span>
             </p>
-            <p>
+            <p style="margin: 10px -22% 10px 22%">
                 <span class="dler-title"><%:Account Integral%>:</span><span class="dler-result" id="dler-integral"><%:Collecting data...%></span>
             </p>
                </div>
-               <div style="width: 40%">
-            <p>
+               <div style="width: 35%">
+            <p style="margin: 10px -28% 10px 28%">
                 <span class="dler-title"><%:Today Used%>:</span><span class="dler-result2" id="dler-today-used"><%:Collecting data...%></span>
             </p>
-            <p>
+            <p style="margin: 10px -28% 10px 28%">
                 <span class="dler-title"><%:Plan Used%>:</span><span class="dler-result2" id="dler-used"><%:Collecting data...%></span>
             </p>
-            <p>
+            <p style="margin: 10px -28% 10px 28%">
                 <span class="dler-title"><%:Plan Unused%>:</span><span class="dler-result2" id="dler-unused"><%:Collecting data...%></span>
             </p>
-            <p>
+            <p style="margin: 10px -28% 10px 28%">
                 <span class="dler-title"><%:Plan Traffic%>:</span><span class="dler-result2" id="dler-traffic"><%:Collecting data...%></span>
             </p>
                </div>
                <div style="width: 30%; text-align:center">
-                       <p>
+                       <p style="margin: 30px 0 10px 39%">
                                <input type="button" class="btn" value="<%:Checkin%>" onclick="return dler_checkin_btn(this)"
                        </p>
                </div>
         </div>
                <div>
-                <p class="more">Powered by <a onclick="return web_dler()" href="javascript:void(0);">dlercloud.com</a></p>
+                <p class="more">Powered by <a style="text-decoration: none; color: #666" onclick="return web_dler()" href="javascript:void(0);">dlercloud.com</a></p>
                </div>
       </div>
     </div>
index 1c0844f..e128dc8 100644 (file)
                                if ( x && x.status == 200 ) {
                                        if(status.rule_download_status=="0")
                                        {
-                                               btn.value = '<%:Downloading Fail%>';
+                                               btn.value = '<%:Download Failed%>';
                                        }
                                        else if (status.rule_download_status=="1")
                                        {
-                                               btn.value = '<%:Downloading Successful%>';
+                                               btn.value = '<%:Download Successful%>';
                                        }
                                        else if (status.rule_download_status=="2")
                                        {
@@ -26,7 +26,7 @@
                                        }
                                }
                                else {
-                                       btn.value = '<%:Downloading Timeout%>';
+                                       btn.value = '<%:Download Timeout%>';
                                }
                        }
                );
index 334453b..fda2258 100644 (file)
                                if ( x && x.status == 200 ) {
                                        if(status.rule_download_status=="0")
                                        {
-                                               btn.value = '<%:Downloading Fail%>';
+                                               btn.value = '<%:Download Failed%>';
                                        }
                                        else if (status.rule_download_status=="1")
                                        {
-                                               btn.value = '<%:Downloading Successful%>';
+                                               btn.value = '<%:Download Successful%>';
                                        }
                                        else if (status.rule_download_status=="2")
                                        {
@@ -28,7 +28,7 @@
                                        }
                                }
                                else {
-                                       btn.value = '<%:Downloading Timeout%>';
+                                       btn.value = '<%:Download Timeout%>';
                                }
                        }
                );
diff --git a/applications/luci-app-openclash/luasrc/view/openclash/flush_fakeip_cache.htm b/applications/luci-app-openclash/luasrc/view/openclash/flush_fakeip_cache.htm
new file mode 100644 (file)
index 0000000..667615c
--- /dev/null
@@ -0,0 +1,37 @@
+<%+cbi/valueheader%>
+
+<script type="text/javascript">//<![CDATA[
+
+       function act_flush_fakeip_cache(btn)
+       {
+               btn.disabled = true;
+               btn.value    = '<%:Flushing...%> ';
+               XHR.get('<%=luci.dispatcher.build_url("admin", "services", "openclash","flush_fakeip_cache")%>',
+                       null,
+                       function(x,status)
+                       {
+                               if ( x && x.status == 200 ) {
+                                       if(status.flush_status == "0" || status.flush_status != "")
+                                       {
+                                               btn.value = '<%:Flush Failed%>';
+                                               
+                                       }
+                                       else
+                                       {
+                                               btn.value = '<%:Flush Successful%>';
+                                       }
+                               }
+                               else {
+                                       btn.value = '<%:Flush Timeout%>';
+                               }
+                       }
+               );
+               btn.disabled = false;
+               return false;
+       };
+       
+//]]></script>
+
+
+<input type="button" class="btn cbi-button cbi-input-reload" value="<%:Flush%>" onclick="return act_flush_fakeip_cache(this)" />
+<%+cbi/valuefooter%>
index f6e6de0..2ba386f 100644 (file)
@@ -6,17 +6,16 @@
     <meta charset="utf-8">
     <meta http-equiv="x-dns-prefetch-control" content="on">
     <link rel="dns-prefetch" href="//cdn.jsdelivr.net">
-    <link rel="dns-prefetch" href="//whois.pconline.com.cn">
+    <link rel="dns-prefetch" href="//whois.pconline.com.cn/ipJson.jsp">
+    <link rel="dns-prefetch" href="//www.taobao.com/help/getip.php">
     <link rel="dns-prefetch" href="//api-ipv4.ip.sb">
-    <link rel="dns-prefetch" href="//myip.ipip.net">
     <link rel="dns-prefetch" href="//api.ipify.org">
     <link rel="dns-prefetch" href="//api.ttt.sh">
     <link rel="dns-prefetch" href="//api.skk.moe">
     <link rel="dns-prefetch" href="//d.skk.moe">
-    <link rel="preconnect" href="https://whois.pconline.com.cn">
+    <link rel="preconnect" href="https://www.taobao.com/help/getip.php">
+    <link rel="preconnect" href="https://whois.pconline.com.cn/ipJson.jsp">
     <link rel="preconnect" href="https://api-ipv4.ip.sb">
-    <link rel="preconnect" href="https://myip.ipip.net">
-    <link rel="preconnect" href="http://myip.ipip.net">
     <link rel="preconnect" href="https://api.ipify.org">
     <link rel="preconnect" href="https://api.ttt.sh">
     <link rel="preconnect" href="https://api.skk.moe">
@@ -41,7 +40,7 @@
             color: #444;
             font-size:15px;
             display: inline-block;
-            width: 52%;
+            width: 70%;
             vertical-align:bottom;
             overflow: hidden;
             text-overflow: ellipsis;
@@ -51,7 +50,7 @@
         .ip-result {
             color: #444;
             font-size:16px;
-            margin:0px 0px 0px 30px;
+            margin:0px 0px 0px 10%;
             white-space: nowrap;  /*强制span不换行*/
             display: inline-block;  /*将span当做块级元素对待*/
             width: 29%;  /*限制宽度*/
             line-height:20px;
             white-space: nowrap;  /*强制span不换行*/
             display: inline-block;  /*将span当做块级元素对待*/
-            width: 30%;  /*限制宽度*/
+            width: 25%;  /*限制宽度*/
             overflow: hidden;  /*超出宽度部分隐藏*/
             text-overflow: ellipsis;  /*超出部分以点号代替*/
+            text-align: right;
             vertical-align:bottom;
             transform:translateY(15%);
         }
@@ -93,7 +93,7 @@
             line-height:20px;
             display: inline-block;
             vertical-align:bottom;
-            width: 48%;
+            width: 30%;
             white-space: nowrap;
             overflow: hidden;
             text-overflow: ellipsis;
             line-height:20px;
             display: inline-block;
             vertical-align:bottom;
-            width: 48%;
+            width: 30%;
             white-space: nowrap;
             overflow: hidden;
             text-overflow: ellipsis;
             text-align: left;
             transform:translateY(12%);
         }
-
-        h3 {
-            margin: 5px 0 6px;
-        }
-
-        p {
-            margin: 10px 0;
-        }
-
-        a {
-            text-decoration: none;
-            color: #666;
-        }
-
     </style>
 </head>
 <body>
 <fieldset class="cbi-section">
        <table width="100%">
      <tr><td>
-    <div style="display: flex;">
+    <div style="display: flex">
         <div style="width: 51%">
-            <h3><%:IP Address%></h3>
-            <p>
-                <span class="ip-title">IPIP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<%:Mainland%>:</span><span class="ip-result" id="ip-ipipnet"></span> <span class="ip-geo" id="ip-ipipnet-geo"></span>
+            <h3 style="margin: 10px -2% 10px 2%"><%:IP Address%></h3>
+            <p style="margin: 10px -2% 10px 2%">
+                <span class="ip-title">IP.TB&nbsp;&nbsp;&nbsp;&nbsp;<%:Mainland%>:</span><span class="ip-result" id="ip-taobao"></span> <span class="ip-geo" id="ip-taobao-geo"></span>
             </p>
-            <p>
-                <span class="ip-title">IP.PC&nbsp;&nbsp;&nbsp;&nbsp;<%:Mainland%>:</span><span class="ip-result" id="ip-pcol"></span> <span class="ip-geo" id="ip-pcol-ipip"></span>
+            <p style="margin: 10px -2% 10px 2%">
+                <span class="ip-title">IP.PC&nbsp;&nbsp;&nbsp;&nbsp;<%:Mainland%>:</span><span class="ip-result" id="ip-pcol"></span> <span class="ip-geo" id="ip-pcol-geo"></span>
             </p>
-            <p>
+            <p style="margin: 10px -2% 10px 2%">
                 <span class="ip-title">IP.SB&nbsp;&nbsp;&nbsp;&nbsp;<%:Abroad%>:</span><span class="ip-result" id="ip-ipsb"></span> <span class="ip-geo" id="ip-ipsb-geo"></span>
             </p>
-            <p>
-                <span class="ip-title">IPIFY&nbsp;&nbsp;&nbsp;&nbsp;<%:Abroad%>:</span><span class="ip-result" id="ip-ipify"></span> <span class="ip-geo" id="ip-ipify-ipip"></span>
+            <p style="margin: 10px -2% 10px 2%">
+                <span class="ip-title">IPIFY&nbsp;&nbsp;&nbsp;&nbsp;<%:Abroad%>:</span><span class="ip-result" id="ip-ipify"></span> <span class="ip-geo" id="ip-ipify-geo"></span>
             </p>
         </div>
         <div style="width: 49%">
-            <h3><%:Website Access Check%></h3>
-            <p>
+            <h3 style="margin: 10px 0 10px 5%"><%:Website Access Check%></h3>
+            <p style="margin: 10px 0 10px 5%">
                 <span class="ip-state_title"><%:Baidu Search%>:</span><span id="http-baidu"></span>
             </p>
-            <p>
+            <p style="margin: 10px 0 10px 5%">
                 <span class="ip-state_title"><%:NetEase Music%>:</span><span id="http-163"></span>
             </p>
-            <p>
+            <p style="margin: 10px 0 10px 5%">
                 <span class="ip-state_title">GitHub:</span><span id="http-github"></span>
             </p>
-            <p>
+            <p style="margin: 10px 0 10px 5%">
                 <span class="ip-state_title">YouTube:</span><span id="http-youtube"></span>
             </p>
         </div>
     </div>
     <div>
-        <p style="float: right; margin-top: 30px; font-size:15px; padding-right: 10px">Powered by <a onclick="return ip_skk()" href="javascript:void(0);">ip.skk.moe</a></p>
+        <p style="float: right; margin: 5px 10px 10px 0; font-size:15px">Powered by <a style="text-decoration: none; color: #666" onclick="return ip_skk()" href="javascript:void(0);">ip.skk.moe</a></p>
     </div>
     </td></tr>
        </table>
         const $$ = document;
         $$.getElementById('ip-pcol').innerHTML = '<%:Querying...%>';
         $$.getElementById('ip-ipify').innerHTML = '<%:Querying...%>';
-        $$.getElementById('ip-ipipnet').innerHTML = '<%:Querying...%>';
+        $$.getElementById('ip-taobao').innerHTML = '<%:Querying...%>';
         $$.getElementById('ip-ipsb').innerHTML = '<%:Querying...%>';
         let random = parseInt(Math.random() * 100000000);
         let IP = {
                         IP.parseIPIpip(resp.data.ip, 'ip-ipapi-geo');
                     })
             },
+            getSpeedIP: () => {
+                IP.get(`https://forge.speedtest.cn/api/location/info?z=${random}`, 'json')
+                    .then(resp => {
+                        $$.getElementById('ip-speedtest').innerHTML = resp.data.ip;
+                        $$.getElementById('ip-speedtest-geo').innerHTML = resp.data.country + resp.data.province + resp.data.city + (resp.data.distinct == "null" ? resp.data.distinct : '') + ' '  + (resp.data.isp == "null" ? resp.data.isp : '');
+                        //IP.parseIPIpip(resp.data.ip, 'ip-speedtest-geo');
+                    })
+            },
             getIpifyIP: () => {
                 IP.get(`https://api.ipify.org/?format=json&z=${random}`, 'json')
                 .then(resp => {
                 return resp.data.ip;
                 })
                 .then(ip => {
-                IP.parseIPIpip(ip, 'ip-ipify-ipip');
+                IP.parseIPIpip(ip, 'ip-ipify-geo');
                 })
             }
         };
         };
 
              HTTP.runcheck();
-             IP.getIpipnetIP();
              IP.getIpifyIP();
+             //IP.getSpeedIP();
              
              function getPcolIP(data){
                 let pcisp = data.addr.split(' ');
                 $$.getElementById('ip-pcol').innerHTML = data.ip;
-                $$.getElementById('ip-pcol-ipip').innerHTML = `${data.pro} ${data.city} ${data.region} ${pcisp[1]}`;
+                $$.getElementById('ip-pcol-geo').innerHTML = `${data.pro}${data.city}${data.region} ${pcisp[1]}`;
         };
 
         function getIpsbIP(data){
                 $$.getElementById('ip-ipsb').innerHTML = data.ip;
                 IP.parseIPIpip(data.ip, 'ip-ipsb-geo');
         };
+        
+        function ipCallback(data){
+                $$.getElementById('ip-taobao').innerHTML = data.ip;
+                IP.parseIPIpip(data.ip, 'ip-taobao-geo');
+        };
 
              window.onload=myip_Load();
              
                 sbipScript.src='https://api-ipv4.ip.sb/jsonip?callback=getIpsbIP';
                 sbip.appendChild(sbipScript);
                 
+                var tbip = document.getElementsByTagName('HEAD').item(0);
+                var tbipScript= document.createElement("script");
+                tbipScript.defer = "defer";
+                tbipScript.src='https://www.taobao.com/help/getip.php?callback=ipCallback';
+                tbip.appendChild(sbipScript);
+                
                 const $$ = document;
                 random = parseInt(Math.random() * 100000000);
                       HTTP.runcheck();
-                      IP.getIpipnetIP();
                       IP.getIpifyIP();
+                      //IP.getSpeedIP();
                       
            function getPcolIP(data){
                 let pcisp = data.addr.split(' ');
                 $$.getElementById('ip-pcol').innerHTML = data.ip;
-                $$.getElementById('ip-pcol-ipip').innerHTML = `${data.pro} ${data.city} ${data.region} ${pcisp[1]}`;
+                $$.getElementById('ip-pcol-geo').innerHTML = `${data.pro}${data.city}${data.region} ${pcisp[1]}`;
            };
 
                       function getIpsbIP(data){
                 $$.getElementById('ip-ipsb').innerHTML = data.ip;
                 IP.parseIPIpip(data.ip, 'ip-ipsb-geo');
                       };
+                      
+                      function ipCallback(data){
+                $$.getElementById('ip-taobao').innerHTML = data.ip;
+                IP.parseIPIpip(data.ip, 'ip-taobao-geo');
+                      };
 
                   setTimeout("myip_Load()",1000*10);
                   }
     </script>
     <script defer="defer" src="https://whois.pconline.com.cn/ipJson.jsp?callback=getPcolIP"></script>
     <script defer="defer" src="https://api-ipv4.ip.sb/jsonip?callback=getIpsbIP"></script>
+    <script defer="defer" src="https://www.taobao.com/help/getip.php?callback=ipCallback"></script>
 </html>
index 505076a..b1efe01 100644 (file)
        <table width="100%">
           <tr>
                <td colspan="4" width="100%">
-                       <p align="center">
+                       <p style="margin: 10px 0; text-align: center">
              <img id="logo" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAFLBkF0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAFEmlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDIgNzkuMTYwOTI0LCAyMDE3LzA3LzEzLTAxOjA2OjM5ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgKFdpbmRvd3MpIiB4bXA6Q3JlYXRlRGF0ZT0iMjAxOS0wNi0wOFQyMToyMDo1NiswODowMCIgeG1wOk1vZGlmeURhdGU9IjIwMTktMDYtMDhUMjE6NDA6NTcrMDg6MDAiIHhtcDpNZXRhZGF0YURhdGU9IjIwMTktMDYtMDhUMjE6NDA6NTcrMDg6MDAiIGRjOmZvcm1hdD0iaW1hZ2UvcG5nIiBwaG90b3Nob3A6Q29sb3JNb2RlPSIzIiBwaG90b3Nob3A6SUNDUHJvZmlsZT0ic1JHQiBJRUM2MTk2Ni0yLjEiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NGY5MDRjYzUtYWUxMC1mOTQz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" title="Hello, World!" alt="Openclash" width="150" onclick="return homepage()" />
         </p>
-                       <p id="_clashversion" align="center" >
+                       <p id="_clashversion" style="margin: 10px 0; text-align: center">
                           <b><%:Collecting data...%></b>
                        </p>
           </td></tr>
           <tr><td colspan="4" width="100%">
-         <p align="center">
+         <p style="margin: 10px 0; text-align: center">
             <img id="wiki" src="https://img.shields.io/badge/Tutorials--lightgrey?logo=Wikipedia&style=social" loading="lazy" alt="Wiki" width="75px" height="20px" onerror="return imgerrorfuns(this,this.src)" onclick="return wikipage()" />
             &nbsp;&nbsp;&nbsp;
             <img id="star" src="https://img.shields.io/badge/Star--lightgrey?logo=github&style=social" loading="lazy" alt="star" width="50px" height="20px" onerror="return imgerrorfuns(this,this.src)" onclick="return homepage()" />
@@ -49,7 +49,7 @@
         </p>
      </td></tr>
          <tr><td width="100%" colspan="4">
-               <p align="center" id="_clashstart">
+               <p style="margin: 10px 0; text-align: center" id="_clashstart">
                        <b><%:Tip: after started, please wait patiently until the connection is normal%></b>
                </p>
          </td></tr>
@@ -73,7 +73,7 @@
                                <label for="script">Script</label>
                        </span></td><td width="25%"><%:Control Panel Login Secret%></td><td width="25%" align="left" id="_dase"><%:Collecting data...%></td></tr>
                        <tr><td width="25%"><%:Yacd Control Panel%></td><td width="25%" align="left" id="_web"><%:Collecting data...%></td><td width="25%"><%:Dashboard Control Panel%></td><td width="25%" align="left" id="_webo"><%:Collecting data...%></td></tr>
-               <tr id="tool_label2"><td colspan="4"><p align="center">
+               <tr id="tool_label2"><td colspan="4"><p style="margin: 10px 0; text-align: center">
 <span>
 &nbsp;&nbsp;<%:Up:%>&nbsp;
        <span id="upload_">
                                </div>
                        </td>
                </tr>
-               <tr id="hid_1"><td width="100%" colspan="4"><p align="center"><b><%:Quick Operation%></b></p></td></tr>
+               <tr id="hid_1"><td width="100%" colspan="4"><p style="margin: 10px 0; text-align: center"><b><%:Quick Operation%></b></p></td></tr>
     <tr id="hid_2">
-       <td width="25%" align="center"><p align="center" id="_close_all_connection"><%:Collecting data...%></p></td>
-                       <td width="25%" align="center"><p align="center" id="_reload_firewall"><%:Collecting data...%></p></td>
-                       <td width="25%" align="center"><p align="center" id="_update_subscribe"><%:Collecting data...%></p></td>
-                       <td width="25%" align="center"><p align="center" id="_one_key_update"><%:Collecting data...%></p></td>
+       <td width="25%" align="center"><p style="margin: 10px 0; text-align: center" id="_close_all_connection"><%:Collecting data...%></p></td>
+                       <td width="25%" align="center"><p style="margin: 10px 0; text-align: center" id="_reload_firewall"><%:Collecting data...%></p></td>
+                       <td width="25%" align="center"><p style="margin: 10px 0; text-align: center" id="_update_subscribe"><%:Collecting data...%></p></td>
+                       <td width="25%" align="center"><p style="margin: 10px 0; text-align: center" id="_one_key_update"><%:Collecting data...%></p></td>
                        </tr>
                <tr id="hid_3">
-                       <td width="50%" colspan="2" align="center"><p align="center" id="_update_other_rules"><%:Collecting data...%></p></td>
-                       <td width="50%" colspan="2" align="center"><p align="center" id="_update_geoip"><%:Collecting data...%></p></td>
+                       <td width="50%" colspan="2" align="center"><p style="margin: 10px 0; text-align: center" id="_update_other_rules"><%:Collecting data...%></p></td>
+                       <td width="50%" colspan="2" align="center"><p style="margin: 10px 0; text-align: center" id="_update_geoip"><%:Collecting data...%></p></td>
                        </tr>
 </table>
 </fieldset>
 <fieldset id="state" class="cbi-section">
        <table>
                <tr><td width="100%" colspan="4">
-                       <p align="center">
+                       <p style="margin: 10px 0; text-align: center">
                                <b><%:Please ensure that all items are displayed normally before running. If you need to update, please go to the global settings page%></b>
                        </p>
                </td></tr>
index 051a550..444d1c8 100644 (file)
@@ -36,7 +36,7 @@
                        <b><%:Core path:%>/etc/openclash/core/clash</b>
                </p>
          </td></tr>
-               <tr><td width="25%">[dev] <%:Current Core%></td><td width="25%" align="left" id="CORE_CV"><%:Collecting data...%></td><td width="25%">[dev] <%:Latest Core%></td><td width="25%" align="left" id="CORE_LV"><%:Collecting data...%></td></tr>
+               <tr><td width="25%">[Dev] <%:Current Core%></td><td width="25%" align="left" id="CORE_CV"><%:Collecting data...%></td><td width="25%">[Dev] <%:Latest Core%></td><td width="25%" align="left" id="CORE_LV"><%:Collecting data...%></td></tr>
                <tr><td width="25%"><%:Update Core%></td><td width="25%" align="left" id="core_up"><%:Collecting data...%></td><td width="25%"><%:Download Latest Core%></td><td width="25%" align="left" id="ma_core_up"><%:Collecting data...%></td></tr>
                <tr><td width="100%" colspan="4">
            <p align="center">
index 8e40755..e9bfc94 100644 (file)
@@ -5,6 +5,8 @@
                <option value="config" selected="selected"><%:Config File%></option>
                <option value="proxy-provider"><%:Proxy Provider File%></option>
                <option value="rule-provider"><%:Rule Provider File%></option>
+               <option value="clash">[Dev] <%:Core File%></option>
+               <option value="clash_tun">[TUN] <%:Core File%></option>
                <option value="backup-file"><%:Backup File%></option>
        </select>
   <input class="cbi-input-file" style="width: 30%" type="file" id="ulfile" name="ulfile" />
index 98062ec..3ce0430 100644 (file)
@@ -197,8 +197,8 @@ msgstr "选择内核日志的默认输出模式"
 msgid "Only intranet allowed"
 msgstr "仅允许内网"
 
-msgid "When Enabled, The Control Panel And The Connection Broker Port Will Not Be Accessible From The Public Network, Not Support IPv6 Yet"
-msgstr "启用后将禁止从公网访问控制面板和连接代理端口, 暂不支持和IPv6代理同时启用"
+msgid "When Enabled, The Control Panel And The Connection Broker Port Will Not Be Accessible From The Public Network"
+msgstr "启用后将禁止从公网访问控制面板和连接代理端口"
 
 msgid "Redirect Local DNS Setting"
 msgstr "*本地DNS劫持"
@@ -312,6 +312,9 @@ msgstr "代理集文件"
 msgid "Rule Provider File"
 msgstr "规则集文件"
 
+msgid "Core File"
+msgstr "内核文件"
+
 msgid "Upload"
 msgstr "上传"
 
@@ -1076,6 +1079,9 @@ msgstr "配置文件编辑"
 msgid "Delete All File"
 msgstr "删除所有文件"
 
+msgid "SS/SSR/Vmess or Other Link And Subscription Address is Supported When Online Subscription Conversion is Enabled, Please Separate Multiple Links With |"
+msgstr "在线订阅转换启用时支持:SS/SSR/Vmess等节点链接和订阅链接,多个链接请用 | 分隔"
+
 msgid "Template Name"
 msgstr "订阅转换模板"
 
@@ -2144,16 +2150,16 @@ msgstr "Dler Cloud 签到失败,结果:"
 msgid "Downloading Rule..."
 msgstr "正在下载规则..."
 
-msgid "Downloading Fail"
+msgid "Download Failed"
 msgstr "下载失败"
 
-msgid "Downloading Successful"
+msgid "Download Successful"
 msgstr "下载成功"
 
 msgid "Rule No Change"
 msgstr "规则没有更新"
 
-msgid "Downloading Timeout"
+msgid "Download Timeout"
 msgstr "下载超时"
 
 msgid "Rule Project:"
@@ -2676,4 +2682,31 @@ msgid "Enable Delay Start, OpenClash Will Start After"
 msgstr "延迟启动已启用,OpenClash 将在"
 
 msgid "Secends..."
-msgstr "秒后开始启动..."
\ No newline at end of file
+msgstr "秒后开始启动..."
+
+msgid "Waiting for command to complete..."
+msgstr "等待命令执行完成..."
+
+msgid "Collecting data..."
+msgstr "正在收集数据..."
+
+msgid "Flushing..."
+msgstr "清理中..."
+
+msgid "Flush Fail"
+msgstr "清理失败"
+
+msgid "Flush Successful"
+msgstr "清理成功"
+
+msgid "Flush Timeout"
+msgstr "清理超时"
+
+msgid "Flush"
+msgstr "清理"
+
+msgid "Flush Fake-IP Cache"
+msgstr "Fake-IP 持久化缓存清理"
+
+msgid "No Specify Upload File"
+msgstr "未选择上传文件"
index b3f9cf9..7140b9e 100644 (file)
@@ -35,6 +35,8 @@ config openclash 'config'
        option operation_mode 'redir-host'
        option enable_rule_proxy '0'
        option redirect_dns '0'
+       option cachesize_dns '0'
+       option filter_aaaa_dns '0'
        option small_flash_memory '0'
        option interface_name '0'
        option common_ports '0'
index 12fd942..d34aaae 100644 (file)
@@ -70,23 +70,53 @@ del_cron()
    /etc/init.d/cron restart
 }
 
+save_dnsmasq_server() {
+       if [ -z "$1" ] || [ "$1" == "127.0.0.1#${dns_port}" ]; then
+     return
+  fi
+  
+  uci -q add_list openclash.config.dnsmasq_server="$1"
+}
+
+set_dnsmasq_server() {
+       if [ -z "$1" ] || [ "$1" == "127.0.0.1#${dns_port}" ]; then
+     return
+  fi
+  
+  uci -q add_list dhcp.@dnsmasq[0].server="$1"
+}
+
 change_dns() {
    if [ "$1" -eq 1 ]; then
+      uci -q del openclash.config.dnsmasq_server
+      config_load "dhcp"
+      config_list_foreach "$(uci show dhcp.@dnsmasq[0].server |awk -F '.' '{print $2}')" "server" save_dnsmasq_server
       uci -q del dhcp.@dnsmasq[-1].server
       uci -q add_list dhcp.@dnsmasq[0].server=127.0.0.1#"$dns_port"
+      uci -q set openclash.config.dnsmasq_noresolv="$(uci -q get dhcp.@dnsmasq[0].noresolv)"
+      uci -q set openclash.config.dnsmasq_resolvfile="$(uci -q get dhcp.@dnsmasq[0].resolvfile)"
       uci -q delete dhcp.@dnsmasq[0].resolvfile
       uci -q set dhcp.@dnsmasq[0].noresolv=1
       uci -q set openclash.config.redirect_dns=1
    else
       uci -q set openclash.config.redirect_dns=0
    fi
+   
    if [ "$2" -eq 1 ]; then
+      uci -q set openclash.config.dnsmasq_cachesize="$(uci -q get dhcp.@dnsmasq[0].cachesize)"
       uci -q set dhcp.@dnsmasq[0].cachesize=0
+      uci -q set openclash.config.cachesize_dns=1
+   else
+      uci -q set openclash.config.cachesize_dns=0
    fi
    
    if [ "$ipv6_dns" == 1 ] && [ -n "$(ip6tables -t mangle -L 2>&1 | grep -o 'Chain')" ]; then
       #dnsmasq answer ipv6
+      uci -q set openclash.config.dnsmasq_filter_aaaa="$(uci -q get dhcp.@dnsmasq[0].filter_aaaa)"
            uci -q set dhcp.@dnsmasq[0].filter_aaaa=0
+           uci -q set openclash.config.filter_aaaa_dns=1
+        else
+           uci -q set openclash.config.filter_aaaa_dns=0
         fi
         
    uci -q commit dhcp
@@ -98,41 +128,59 @@ change_dns() {
 revert_dns() {
 
    [ "$1" -eq 1 ] && {
-      uci -q del_list dhcp.@dnsmasq[0].server=127.0.0.1#"$3"
+      uci -q del dhcp.@dnsmasq[-1].server
+      [ -n "$10" ] && {
+         config_load "openclash"
+         config_list_foreach "config" "dnsmasq_server" set_dnsmasq_server
+      }
+      
+      if [ "$4" == "0" ] || [ -z "$4" ]; then
+         uci -q set dhcp.@dnsmasq[0].noresolv=0
+         if [ -n "$5" ]; then
+            uci -q set dhcp.@dnsmasq[0].resolvfile="$5"
+         elif [ -n "$3" ]; then
+            uci -q set dhcp.@dnsmasq[0].resolvfile="$3"
+         elif [ -s "/tmp/resolv.conf.d/resolv.conf.auto" ] && [ -n "$(grep "nameserver" /tmp/resolv.conf.d/resolv.conf.auto)" ]; then
+            uci -q set dhcp.@dnsmasq[0].resolvfile=/tmp/resolv.conf.d/resolv.conf.auto
+         elif [ -s "/tmp/resolv.conf.auto" ] && [ -n "$(grep "nameserver" /tmp/resolv.conf.auto)" ]; then
+            uci -q set dhcp.@dnsmasq[0].resolvfile=/tmp/resolv.conf.auto
+         else
+            rm -rf /tmp/resolv.conf.auto
+            touch /tmp/resolv.conf.auto 2>/dev/null
+            cat >> "/tmp/resolv.conf.auto" <<-EOF
+# Interface lan
+nameserver 114.114.114.114
+nameserver 119.29.29.29
+EOF
+            uci -q set dhcp.@dnsmasq[0].resolvfile=/tmp/resolv.conf.auto
+         fi
+      fi
+   }
+   
+   [ "$6" -eq 1 ] && {
+      uci -q set dhcp.@dnsmasq[0].cachesize="$7"
    }
    
-   [ "$1" -eq 1 ] && [ "$4" -eq 0 ] && {
+   [ "$8" -eq 1 ] && {
+     uci -q set dhcp.@dnsmasq[0].filter_aaaa="$9"
+   }
+       
+   [ "$1" -eq 1 ] && [ "$2" -eq 0 ] && {
       uci -q set openclash.config.redirect_dns=0
    }
-
-   [ "$(uci -q get dhcp.@dnsmasq[0].cachesize)" = "0" ] && {
-      uci -q delete dhcp.@dnsmasq[0].cachesize
+   
+   [ "$6" -eq 1 ] && [ "$2" -eq 0 ] && {
+      uci -q set openclash.config.cachesize_dns=0
    }
    
-   [ "$1" -eq 1 ] && {
-      if [ -n "$5" ]; then
-         uci -q set dhcp.@dnsmasq[0].resolvfile="$5"
-      elif [ -s "/tmp/resolv.conf.d/resolv.conf.auto" ] && [ -n "$(grep "nameserver" /tmp/resolv.conf.d/resolv.conf.auto)" ]; then
-         uci -q set dhcp.@dnsmasq[0].resolvfile=/tmp/resolv.conf.d/resolv.conf.auto
-      elif [ -s "/tmp/resolv.conf.auto" ] && [ -n "$(grep "nameserver" /tmp/resolv.conf.auto)" ]; then
-         uci -q set dhcp.@dnsmasq[0].resolvfile=/tmp/resolv.conf.auto
-      else
-         rm -rf /tmp/resolv.conf.auto
-         touch /tmp/resolv.conf.auto 2>/dev/null
-         cat >> "/tmp/resolv.conf.auto" <<-EOF
-# Interface lan
-nameserver 114.114.114.114
-nameserver 119.29.29.29
-EOF
-         uci -q set dhcp.@dnsmasq[0].resolvfile=/tmp/resolv.conf.auto
-      fi
-      uci -q set dhcp.@dnsmasq[0].noresolv=0
+   [ "$8" -eq 1 ] && [ "$2" -eq 0 ] && {
+      uci -q set openclash.config.filter_aaaa_dns=0
    }
    
    uci -q commit dhcp
    uci -q commit openclash
-   rm -rf /tmp/dnsmasq.d/dnsmasq_openclash.conf
-   rm -rf /tmp/dnsmasq.d/dnsmasq_openclash_custom_domain.conf
+   rm -rf /tmp/dnsmasq.d/dnsmasq_openclash.conf >/dev/null 2>&1
+   rm -rf /tmp/dnsmasq.d/dnsmasq_openclash_custom_domain.conf >/dev/null 2>&1
 }
 
 kill_clash()
@@ -1129,8 +1177,11 @@ check_run_quick()
 
 write_run_quick()
 {
-        if ! $quick_start; then
+   cmp -s "/etc/config/openclash" "/tmp/openclash_config.tmp"
+        if [ "$?" -ne "0" ]; then
            cp "/etc/config/openclash" "/tmp/openclash_config.tmp"
+        fi
+        if ! $quick_start; then
            : > "/tmp/openclash.change"
            for i in $check_file; do
          echo "$i $(date -r $i)" >> "/tmp/openclash.change"
@@ -1676,36 +1727,60 @@ firewall_redirect_exclude()
    if ! $e_udp && ! $e_tcp ; then
        return
    fi
+   
+   dest_port=$(echo $dest_port |sed "s/-/:/g" 2>/dev/null)
+   src_dport=$(echo $src_dport |sed "s/-/:/g" 2>/dev/null)
+   dest_ip=$(echo $dest_ip |sed "s/ /,/g" 2>/dev/null)
+   [ -n "$dest_ip" ] && dest_ip="-s ${dest_ip}"
 
    if [ -z "$en_mode_tun" ] || [ "$en_mode_tun" -eq 2 ]; then
-         iptables -t nat -I openclash_output -p tcp --sport "$src_dport" -j RETURN >/dev/null 2>&1
-         iptables -t mangle -I openclash_output -p udp --sport "$src_dport" -j RETURN >/dev/null 2>&1
-      iptables -t mangle -I openclash -p udp --dport "$src_dport" -j RETURN >/dev/null 2>&1
-   elif [ "$en_mode_tun" -eq 1 ]; then
-         iptables -t mangle -I openclash_output -p tcp --sport "$src_dport" -j RETURN >/dev/null 2>&1
-         iptables -t mangle -I openclash_output -p udp --sport "$src_dport" -j RETURN >/dev/null 2>&1
-      iptables -t mangle -I openclash -p tcp --dport "$src_dport" -j RETURN >/dev/null 2>&1
-      iptables -t mangle -I openclash -p udp --dport "$src_dport" -j RETURN >/dev/null 2>&1
       if $e_tcp ; then
-         iptables -t mangle -I openclash -p tcp -s "$dest_ip" --sport "$dest_port" -j RETURN >/dev/null 2>&1
+            iptables -t nat -I openclash_output "$dest_ip" -p tcp --sport "$dest_port" -j RETURN >/dev/null 2>&1
+            iptables -t nat -I openclash_output "$dest_ip" -p tcp --dport "$src_dport" -j RETURN >/dev/null 2>&1
+         fi
+         if $e_udp ; then
+         iptables -t mangle -I openclash_output "$dest_ip" -p udp --sport "$dest_port" -j RETURN >/dev/null 2>&1
+         iptables -t mangle -I openclash_output "$dest_ip" -p udp --dport "$src_dport" -j RETURN >/dev/null 2>&1
+         if [ -n "$dest_ip" ]; then
+            iptables -t mangle -I openclash "$dest_ip" -p udp --dport "$src_dport" -j RETURN >/dev/null 2>&1
+            iptables -t mangle -I openclash "$dest_ip" -p udp --sport "$dest_port" -j RETURN >/dev/null 2>&1
+         fi
       fi
-      if $e_udp ; then
-         iptables -t mangle -I openclash -p udp -s "$dest_ip" --sport "$dest_port" -j RETURN >/dev/null 2>&1
+   elif [ "$en_mode_tun" -eq 1 ]; then
+      if $e_tcp ; then
+            iptables -t mangle -I openclash_output -p tcp "$dest_ip" --sport "$dest_port" -j RETURN >/dev/null 2>&1
+            iptables -t mangle -I openclash_output -p tcp "$dest_ip" --dport "$src_dport" -j RETURN >/dev/null 2>&1
+            if [ -n "$dest_ip" ]; then
+               iptables -t mangle -I openclash -p tcp "$dest_ip" --dport "$src_dport" -j RETURN >/dev/null 2>&1
+               iptables -t mangle -I openclash -p tcp "$dest_ip" --sport "$dest_port" -j RETURN >/dev/null 2>&1
+            fi
+         fi
+         if $e_udp ; then
+            iptables -t mangle -I openclash_output -p udp "$dest_ip" --sport "$dest_port" -j RETURN >/dev/null 2>&1
+            iptables -t mangle -I openclash_output -p udp "$dest_ip" --dport "$src_dport" -j RETURN >/dev/null 2>&1
+            if [ -n "$dest_ip" ]; then
+            iptables -t mangle -I openclash -p udp "$dest_ip" --dport "$src_dport" -j RETURN >/dev/null 2>&1
+            iptables -t mangle -I openclash -p udp "$dest_ip" --sport "$dest_port" -j RETURN >/dev/null 2>&1
+         fi
       fi
    fi
    
    if [ "$ipv6_enable" -eq 1 ] && [ -n "$(ip6tables -t mangle -L 2>&1 | grep -o 'Chain')" ]; then
       if $e_tcp ; then
-        ip6tables -t mangle -I openclash -p tcp --dport "$src_dport" -j RETURN >/dev/null 2>&1
-         ip6tables -t mangle -I openclash -p tcp -s "$dest_ip" --sport "$dest_port" -j RETURN >/dev/null 2>&1
-         ip6tables -t mangle -I openclash_output -p tcp --sport "$src_dport" -j RETURN >/dev/null 2>&1
-         ip6tables -t mangle -I openclash_output -p tcp -s "$dest_ip" --sport "$dest_port" -j RETURN >/dev/null 2>&1
+         if [ -n "$dest_ip" ]; then
+           ip6tables -t mangle -I openclash -p tcp "$dest_ip" --dport "$src_dport" -j RETURN >/dev/null 2>&1
+            ip6tables -t mangle -I openclash -p tcp "$dest_ip" --sport "$dest_port" -j RETURN >/dev/null 2>&1
+         fi
+         ip6tables -t mangle -I openclash_output -p tcp "$dest_ip" --sport "$dest_port" -j RETURN >/dev/null 2>&1
+         ip6tables -t mangle -I openclash_output -p tcp "$dest_ip" --dport "$src_dport" -j RETURN >/dev/null 2>&1
       fi
       if $e_udp ; then
-         ip6tables -t mangle -I openclash -p udp --dport "$src_dport" -j RETURN >/dev/null 2>&1
-         ip6tables -t mangle -I openclash -p udp -s "$dest_ip" --sport "$dest_port" -j RETURN >/dev/null 2>&1
-         ip6tables -t mangle -I openclash_output -p udp -s "$dest_ip" --sport "$dest_port" -j RETURN >/dev/null 2>&1
-         ip6tables -t mangle -I openclash_output -p udp --sport "$src_dport" -j RETURN >/dev/null 2>&1
+         if [ -n "$dest_ip" ]; then
+            ip6tables -t mangle -I openclash -p udp "$dest_ip" --dport "$src_dport" -j RETURN >/dev/null 2>&1
+            ip6tables -t mangle -I openclash -p udp "$dest_ip" --sport "$dest_port" -j RETURN >/dev/null 2>&1
+         fi
+         ip6tables -t mangle -I openclash_output -p udp "$dest_ip" --sport "$dest_port" -j RETURN >/dev/null 2>&1
+         ip6tables -t mangle -I openclash_output -p udp "$dest_ip" --dport "$src_dport" -j RETURN >/dev/null 2>&1
       fi
    fi
 
@@ -1745,12 +1820,6 @@ if [ "$enable_redirect_dns" -eq 1 ] && [ -z "$(iptables -t nat -nL PREROUTING --
    iptables -t nat -I PREROUTING -p tcp --dport 53 -j REDIRECT --to-ports "$DNSPORT" -m comment --comment "OpenClash DNS Hijack"
 fi
 
-#Bypass Gateway Compatible
-if [ "$bypass_gateway_compatible" -eq 1 ]; then
-   iptables -t nat -I POSTROUTING -m addrtype ! --src-type LOCAL -m owner ! --uid-owner 65534 -m comment --comment "OpenClash Bypass Gateway Compatible" -j MASQUERADE
-   iptables -t nat -I POSTROUTING -m mark --mark "$PROXY_FWMARK" -m comment --comment "OpenClash Bypass Gateway Compatible" -j ACCEPT
-fi
-
 #lan_ac
 if [ "$operation_mode" = "redir-host" ] && [ "$en_mode" = "redir-host" ]; then
    if [ "$lan_ac_mode" = "0" ]; then
@@ -1821,6 +1890,32 @@ if [ "$common_ports" = "1" ]; then
    done
 fi
 
+#bypass gateway compatible
+if [ "$bypass_gateway_compatible" -eq 1 ]; then
+   iptables -t nat -N openclash_post
+   iptables -t nat -F openclash_post
+   if [ "$bypass_gateway_compatible" -eq 1 ]; then
+      iptables -t nat -A openclash_post -m mark --mark "$PROXY_FWMARK" -m comment --comment "OpenClash Bypass Gateway Compatible" -j ACCEPT
+      iptables -t nat -A openclash_post -m comment --comment "OpenClash Bypass Gateway Compatible" -m set --match-set localnetwork dst -j RETURN
+      iptables -t nat -A openclash_post -m addrtype ! --src-type LOCAL -m owner ! --uid-owner 65534 -m comment --comment "OpenClash Bypass Gateway Compatible" -j MASQUERADE
+   fi
+   iptables -t nat -I POSTROUTING -j openclash_post
+fi
+
+#intranet allowed
+if [ "$intranet_allowed" -eq 1 ]; then
+   wan_ints=$(iptables -nvL INPUT |grep "zone_wan_input" 2>/dev/null |awk '{for (i=1;i<=NF;i++) {if ($i ~ /eth/) {print $i}}}')
+   if [ -n "$wan_ints" ]; then
+      iptables -t filter -N openclash_wan_input
+      iptables -t filter -F openclash_wan_input
+      for wan_int in $wan_ints; do
+         iptables -t filter -I INPUT -i "$wan_int" -j openclash_wan_input
+      done
+      iptables -t filter -A openclash_wan_input -p udp -m multiport --dport "$proxy_port,$tproxy_port,$cn_port,$http_port,$socks_port,$mixed_port,$dns_port" -j REJECT >/dev/null 2>&1
+      iptables -t filter -A openclash_wan_input -p tcp -m multiport --dport "$proxy_port,$tproxy_port,$cn_port,$http_port,$socks_port,$mixed_port,$dns_port" -j REJECT >/dev/null 2>&1
+   fi
+fi
+
 if [ -z "$en_mode_tun" ] || [ "$en_mode_tun" -eq 2 ]; then
    #tcp
    iptables -t nat -N openclash
@@ -1892,11 +1987,7 @@ if [ -z "$en_mode_tun" ] || [ "$en_mode_tun" -eq 2 ]; then
       iptables -t nat -F openclash_output
       iptables -t nat -A openclash_output -m set --match-set localnetwork dst -j RETURN
       if [ "$en_mode" = "fake-ip" ]; then
-         if [ "$intranet_allowed" -eq 1 ]; then
-            iptables -t nat -A openclash_output -m owner ! --uid-owner 65534 -p tcp -d 198.18.0.0/16 -j DNAT --to-destination "$lan_ip:$proxy_port"
-         else
-            iptables -t nat -A openclash_output -m owner ! --uid-owner 65534 -p tcp -d 198.18.0.0/16 -j REDIRECT --to-ports "$proxy_port"
-         fi
+         iptables -t nat -A openclash_output -m owner ! --uid-owner 65534 -p tcp -d 198.18.0.0/16 -j REDIRECT --to-ports "$proxy_port"
       fi
       iptables -t nat -A openclash_output -m owner ! --uid-owner 65534 -m set ! --match-set common_ports dst -j RETURN >/dev/null 2>&1
       if [ "$en_mode" = "redir-host" ]; then
@@ -1905,11 +1996,7 @@ if [ -z "$en_mode_tun" ] || [ "$en_mode_tun" -eq 2 ]; then
             iptables -t nat -A openclash_output -m owner ! --uid-owner 65534 -m set --match-set china_ip_route dst -j RETURN >/dev/null 2>&1
          fi
       fi
-      if [ "$intranet_allowed" -eq 1 ]; then
-         iptables -t nat -A openclash_output -m owner ! --uid-owner 65534 -p tcp -j DNAT --to-destination "$lan_ip:$proxy_port"
-      else
-         iptables -t nat -A openclash_output -m owner ! --uid-owner 65534 -p tcp -j REDIRECT --to-ports "$proxy_port"
-      fi
+      iptables -t nat -A openclash_output -m owner ! --uid-owner 65534 -p tcp -j REDIRECT --to-ports "$proxy_port"
    else
       if [ "$en_mode" = "fake-ip" ]; then
          iptables -t nat -N openclash_output
@@ -1919,11 +2006,7 @@ if [ -z "$en_mode_tun" ] || [ "$en_mode_tun" -eq 2 ]; then
             iptables -t nat -I OUTPUT -p tcp --dport 53 -j REDIRECT --to-ports "$DNSPORT" -m comment --comment "OpenClash DNS Hijack"
          fi
          iptables -t nat -A openclash_output -m set --match-set localnetwork dst -j RETURN
-         if [ "$intranet_allowed" -eq 1 ]; then
-            iptables -t nat -A openclash_output -p tcp -d 198.18.0.0/16 -j DNAT --to-destination "$lan_ip:$proxy_port"
-         else
-            iptables -t nat -A openclash_output -p tcp -d 198.18.0.0/16 -j REDIRECT --to-ports "$proxy_port"
-         fi
+         iptables -t nat -A openclash_output -p tcp -d 198.18.0.0/16 -j REDIRECT --to-ports "$proxy_port"
          
       fi
    fi
@@ -2005,22 +2088,7 @@ if [ -n "$en_mode_tun" ]; then
       iptables -t nat -I PREROUTING -m comment --comment "OpenClash Google DNS Hijack" -p tcp --dport 53 -d 8.8.8.8 -j ACCEPT
       iptables -t nat -I PREROUTING -m comment --comment "OpenClash Google DNS Hijack" -p tcp --dport 53 -d 8.8.4.4 -j ACCEPT
    fi
-   
-   #snat routerself for tun while bindaddress enable
-   if [ "$en_mode_tun" -eq 1 ] && [ "$intranet_allowed" -eq 1 ]; then
-      if [ -z "$_koolshare" ]; then
-         iptables -t nat -N openclash_post
-         iptables -t nat -F openclash_post
-         iptables -t nat -A openclash_post -m owner ! --uid-owner 65534 -i lo -d 127.0.0.1 -j SNAT --to-source "$lan_ip"
-         iptables -t nat -I POSTROUTING -j openclash_post
-      elif [ "$en_mode" = "fake-ip" ]; then
-         iptables -t nat -N openclash_post
-         iptables -t nat -F openclash_post
-         iptables -t nat -A openclash_post -i lo -d 127.0.0.1 -j SNAT --to-source "$lan_ip"
-         iptables -t nat -I POSTROUTING -j openclash_post
-      fi
-   fi
-   
+
    #TUN FORWORD
    iptables -I FORWARD -m comment --comment "OpenClash TUN Forward" -o utun -j ACCEPT
    
@@ -2113,9 +2181,28 @@ if [ "$ipv6_enable" -eq 1 ] && [ -n "$(ip6tables -t mangle -L 2>&1 | grep -o 'Ch
            ip6tables -I INPUT -p udp --dport 443 -m comment --comment "OpenClash QUIC REJECT" -m set ! --match-set china_ip6_route dst -j REJECT >/dev/null 2>&1
    fi
    
+   #bypass gateway compatible
    if [ "$bypass_gateway_compatible" -eq 1 ]; then
-         ip6tables -t nat -I POSTROUTING -m addrtype ! --src-type LOCAL -m owner ! --uid-owner 65534 -m comment --comment "OpenClash Bypass Gateway Compatible" -j MASQUERADE
-      ip6tables -t nat -I POSTROUTING -m mark --mark "$PROXY_FWMARK" -m comment --comment "OpenClash Bypass Gateway Compatible" -j ACCEPT
+      ip6tables -t nat -N openclash_post
+      ip6tables -t nat -F openclash_post
+      ip6tables -t nat -A openclash_post -m mark --mark "$PROXY_FWMARK" -m comment --comment "OpenClash Bypass Gateway Compatible" -j ACCEPT
+      ip6tables -t nat -A openclash_post -m comment --comment "OpenClash Bypass Gateway Compatible" -m set --match-set localnetwork6 dst -j RETURN
+      ip6tables -t nat -A openclash_post -m addrtype ! --src-type LOCAL -m owner ! --uid-owner 65534 -m comment --comment "OpenClash Bypass Gateway Compatible" -j MASQUERADE
+      ip6tables -t nat -I POSTROUTING -j openclash_post
+   fi
+   
+   #intranet allowed
+   if [ "$intranet_allowed" -eq 1 ]; then
+      wan6_ints=$(ip6tables -nvL INPUT |grep "zone_wan_input" 2>/dev/null |awk '{for (i=1;i<=NF;i++) {if ($i ~ /eth/) {print $i}}}' 2>/dev/null)
+      if [ -n "$wan_ints" ]; then
+         ip6tables -t filter -N openclash_wan_input
+         ip6tables -t filter -F openclash_wan_input
+         for wan6_int in $wan6_ints; do
+            ip6tables -t filter -I INPUT -i "$wan_int" -j openclash_wan_input
+         done
+         ip6tables -t filter -A openclash_wan_input -p udp -m multiport --dport "$proxy_port,$tproxy_port,$cn_port,$http_port,$socks_port,$mixed_port,$dns_port" -j REJECT >/dev/null 2>&1
+         ip6tables -t filter -A openclash_wan_input -p tcp -m multiport --dport "$proxy_port,$tproxy_port,$cn_port,$http_port,$socks_port,$mixed_port,$dns_port" -j REJECT >/dev/null 2>&1
+      fi
    fi
 fi 2>/dev/null
 
@@ -2141,7 +2228,7 @@ revert_firewall()
    ip link set dev utun down >/dev/null 2>&1
    ip tuntap del utun mode tun >/dev/null 2>&1
    
-   for ipt in "iptables -nvL INPUT" "iptables -nvL FORWARD" "iptables -nvL POSTROUTING -t nat" "iptables -nvL OUTPUT -t nat" "iptables -nvL OUTPUT -t mangle" "iptables -nvL PREROUTING -t nat" "iptables -nvL PREROUTING -t mangle" "ip6tables -nvL PREROUTING -t mangle" "ip6tables -nvL OUTPUT -t mangle" "ip6tables -nvL PREROUTING -t nat" "ip6tables -nvL INPUT"; do
+   for ipt in "iptables -nvL INPUT" "iptables -nvL FORWARD" "iptables -nvL POSTROUTING -t nat" "iptables -nvL OUTPUT -t nat" "iptables -nvL OUTPUT -t mangle" "iptables -nvL PREROUTING -t nat" "iptables -nvL PREROUTING -t mangle" "ip6tables -nvL PREROUTING -t mangle" "ip6tables -nvL OUTPUT -t mangle" "ip6tables -nvL PREROUTING -t nat" "ip6tables -nvL INPUT" "ip6tables -nvL POSTROUTING -t nat"; do
       for comment in "openclash" "OpenClash"; do
          local lines=$($ipt |sed 1,2d |sed -n "/${comment}/=" 2>/dev/null |sort -rn)
          if [ -n "$lines" ]; then
@@ -2152,13 +2239,19 @@ revert_firewall()
       done
    done >/dev/null 2>&1
    
-   for chain in "openclash" "openclash_output" "openclash_post" "openclash_dns_hijack"; do
+   for chain in "openclash" "openclash_output" "openclash_post" "openclash_dns_hijack" "openclash_wan_input"; do
       iptables -t nat -F $chain
       iptables -t nat -X $chain
       iptables -t mangle -F $chain
       iptables -t mangle -X $chain
+      iptables -t filter -F $chain
+      iptables -t filter -X $chain
+      ip6tables -t nat -F $chain
+      ip6tables -t nat -X $chain
       ip6tables -t mangle -F $chain
       ip6tables -t mangle -X $chain
+      ip6tables -t filter -F $chain
+      ip6tables -t filter -X $chain
    done >/dev/null 2>&1
 
    ipset destroy localnetwork6 >/dev/null 2>&1
@@ -2223,7 +2316,6 @@ get_config()
    github_address_mod=$(uci -q get openclash.config.github_address_mod || echo 0)
    _koolshare=$(cat /usr/lib/os-release 2>/dev/null |grep OPENWRT_RELEASE 2>/dev/null |grep -i koolshare 2>/dev/null)
    [ -z "$dns_port" ] && dns_port=7874 && uci -q set openclash.config.dns_port=7874
-   [ "$ipv6_enable" -eq 1 ] && [ "$intranet_allowed" -eq 1 ] && intranet_allowed=0 && uci -q set openclash.config.intranet_allowed=0
    uci -q set openclash.config.restricted_mode=0 && uci -q commit openclash
 }
 
@@ -2254,8 +2346,8 @@ start()
       config_foreach yml_auth_get "authentication"
       yml_auth_custom "$CONFIG_FILE"
       yml_dns_custom "$enable_custom_dns" "$CONFIG_FILE" "$append_wan_dns" "$ipv6_dns"
-      /usr/share/openclash/yml_change.sh 2>/dev/null "$LOGTIME" "$en_mode" "$enable_custom_dns" "$da_password" "$cn_port" "$proxy_port" "$CONFIG_FILE" "$ipv6_enable" "$http_port" "$socks_port" "$lan_ip" "$log_level" "$proxy_mode" "$intranet_allowed" "$en_mode_tun" "$stack_type" "$dns_port" "$core_type" "$mixed_port" "$tproxy_port" "$ipv6_dns" "$store_fakeip" "$stream_domains_prefetch" "$dns_remote"
-      /usr/share/openclash/yml_rules_change.sh 2>/dev/null "$LOGTIME" "$rule_source" "$enable_custom_clash_rules" "$CONFIG_FILE" "$enable_rule_proxy" "$CONFIG_NAME"
+      /usr/share/openclash/yml_change.sh 2>/dev/null "$en_mode" "$da_password" "$cn_port" "$proxy_port" "$CONFIG_FILE" "$ipv6_enable" "$http_port" "$socks_port" "$log_level" "$proxy_mode" "$en_mode_tun" "$stack_type" "$dns_port" "$mixed_port" "$tproxy_port" "$ipv6_dns" "$store_fakeip" "$stream_domains_prefetch" "$dns_remote"
+      /usr/share/openclash/yml_rules_change.sh 2>/dev/null "$rule_source" "$enable_custom_clash_rules" "$CONFIG_FILE" "$enable_rule_proxy" "$CONFIG_NAME"
       yml_custom_rule_provider
       yml_game_custom
       yml_provider_path "$CONFIG_FILE" "proxy-providers" "proxy_provider" "$github_address_mod"
@@ -2335,11 +2427,16 @@ stop()
    fi
 
    LOG_OUT "Step 5: Restart Dnsmasq..."
-   dns_port=$(uci -q get openclash.config.dns_port)
    redirect_dns=$(uci -q get openclash.config.redirect_dns)
-   masq_cache=$(uci -q get openclash.config.masq_cache)
+   dnsmasq_server=$(uci -q get openclash.config.dnsmasq_server)
+   dnsmasq_noresolv=$(uci -q get openclash.config.dnsmasq_noresolv)
+   dnsmasq_resolvfile=$(uci -q get openclash.config.dnsmasq_resolvfile)
+   cachesize_dns=$(uci -q get openclash.config.cachesize_dns)
+   dnsmasq_cachesize=$(uci -q get openclash.config.dnsmasq_cachesize)
+   filter_aaaa_dns=$(uci -q get openclash.config.filter_aaaa_dns)
+   dnsmasq_filter_aaaa=$(uci -q get openclash.config.dnsmasq_filter_aaaa)
    default_resolvfile=$(uci -q get openclash.config.default_resolvfile)
-   revert_dns "$redirect_dns" "$masq_cache" "$dns_port" "$enable" "$default_resolvfile"
+   revert_dns "$redirect_dns" "$enable" "$default_resolvfile" "$dnsmasq_noresolv" "$dnsmasq_resolvfile" "$cachesize_dns" "$dnsmasq_cachesize" "$filter_aaaa_dns" "$dnsmasq_filter_aaaa" "$dnsmasq_server"
    /etc/init.d/dnsmasq restart >/dev/null 2>&1
 
    LOG_OUT "Step 6: Delete OpenClash Residue File..."
index c1b951b..8b6ace5 100644 (file)
@@ -1,5 +1,9 @@
 script:
 ##  shortcuts:
+##    Notice: The core timezone is UTC
+##    CST 20:00-24:00 = time.now().hour > 12 and time.now().hour < 16
+##    内核时区为UTC,故以下time.now()函数的取值需要根据本地时区进行转换
+##    北京时间(CST) 20:00-24:00 = time.now().hour > 12 and time.now().hour < 16
 ##    quic: network == 'udp' and dst_port == 443 and (geoip(resolve_ip(host)) != 'CN' or geoip(dst_ip) != 'CN')
 ##    time-limit: in_cidr(src_ip,'192.168.1.2/32') and time.now().hour < 20 or time.now().hour > 21
 ##    time-limit: src_ip == '192.168.1.2' and time.now().hour < 20 or time.now().hour > 21
@@ -48,7 +52,6 @@ rules:
 
 ##仅设置路由器自身直连:
 ##- SRC-IP-CIDR,192.168.1.1/32,DIRECT
-##- SRC-IP-CIDR,198.18.0.1/32,DIRECT
 
 ##DDNS
 ##- DOMAIN-SUFFIX,checkip.dyndns.org,DIRECT
index a3894a0..e3d99c4 100644 (file)
@@ -52,7 +52,7 @@ if [ "$CORE_CV" != "$CORE_LV" ] || [ -z "$CORE_CV" ]; then
    if [ "$CPU_MODEL" != 0 ]; then
       case $CORE_TYPE in
          "TUN")
-            LOG_OUT "【Tun】Core Downloading, Please Try to Download and Upload Manually If Fails"
+            LOG_OUT "【TUN】Core Downloading, Please Try to Download and Upload Manually If Fails"
             if [ "$github_address_mod" != "0" ]; then
                if [ "$github_address_mod" == "https://cdn.jsdelivr.net/" ]; then
                   curl -sL -m 5 --retry 2 https://cdn.jsdelivr.net/gh/vernesong/OpenClash@"$RELEASE_BRANCH"/core-lateset/premium/clash-"$CPU_MODEL"-"$CORE_LV".gz -o /tmp/clash_tun.gz >/dev/null 2>&1
@@ -80,32 +80,29 @@ if [ "$CORE_CV" != "$CORE_LV" ] || [ -z "$CORE_CV" ]; then
          LOG_OUT "【"$CORE_TYPE"】Core Download Successful, Start Update..."
               case $CORE_TYPE in
                "TUN")
-                    [ -s "/tmp/clash_tun.gz" ] && {
-         gzip -d /tmp/clash_tun.gz >/dev/null 2>&1
-                    rm -rf /tmp/clash_tun.gz >/dev/null 2>&1
-                          rm -rf "$tun_core_path" >/dev/null 2>&1
-                          chmod 4755 /tmp/clash_tun >/dev/null 2>&1
-                          }
+                       [ -s "/tmp/clash_tun.gz" ] && {
+            gzip -d /tmp/clash_tun.gz >/dev/null 2>&1
+                       rm -rf /tmp/clash_tun.gz >/dev/null 2>&1
+                             rm -rf "$tun_core_path" >/dev/null 2>&1
+                             chmod 4755 /tmp/clash_tun >/dev/null 2>&1
+                             }
                           ;;
                           *)
                              [ -s "/tmp/clash.tar.gz" ] && {
-            rm -rf "$dev_core_path" >/dev/null 2>&1
-            if [ "$small_flash_memory" != "1" ]; then
-               tar zxvf /tmp/clash.tar.gz -C /etc/openclash/core
-            else
-                                       tar zxvf /tmp/clash.tar.gz -C /tmp/etc/openclash/core
-            fi
+               rm -rf "$dev_core_path" >/dev/null 2>&1
+               tar zxvf /tmp/clash.tar.gz -C /tmp
                                       rm -rf /tmp/clash.tar.gz >/dev/null 2>&1
-                                      chmod 4755 "$dev_core_path" >/dev/null 2>&1
+                                      chmod 4755 /tmp/clash >/dev/null 2>&1
             }
          esac
          if [ "$?" -ne "0" ]; then
-            LOG_OUT "【"$CORE_TYPE"】Core Update Failed, Please Check The Network or Try Again Later!"
+            LOG_OUT "【"$CORE_TYPE"】Core Update Failed. Please Make Sure Enough Flash Memory Space And Try Again!"
             case $CORE_TYPE in
             "TUN")
                rm -rf /tmp/clash_tun >/dev/null 2>&1
                                    ;;
                                    *)
+                                      rm -rf /tmp/clash >/dev/null 2>&1
             esac
             sleep 3
             SLOG_CLEAN
@@ -124,6 +121,7 @@ if [ "$CORE_CV" != "$CORE_LV" ] || [ -z "$CORE_CV" ]; then
                              mv /tmp/clash_tun "$tun_core_path" >/dev/null 2>&1
                           ;;
                           *)
+            mv /tmp/clash "$dev_core_path" >/dev/null 2>&1
                           esac
          if [ "$?" -eq "0" ]; then
             LOG_OUT "【"$CORE_TYPE"】Core Update Successful!"
@@ -141,6 +139,7 @@ if [ "$CORE_CV" != "$CORE_LV" ] || [ -z "$CORE_CV" ]; then
                                       rm -rf /tmp/clash_tun >/dev/null 2>&1
                                    ;;
                                    *)
+                                      rm -rf /tmp/clash >/dev/null 2>&1
                              esac
             sleep 3
             SLOG_CLEAN
index eff891a..15899a4 100644 (file)
@@ -383,4 +383,19 @@ cat >> "$DEBUG_LOG" <<-EOF
 \`\`\`
 EOF
 
+wan_ip=$(/usr/share/openclash/openclash_get_network.lua "wanip")
+wan_ip6=$(/usr/share/openclash/openclash_get_network.lua "wanip6")
+
+if [ -n "$wan_ip" ]; then
+       for i in $wan_ip; do
+     sed -i "s/${wan_ip}/*WAN IP*/g" "$DEBUG_LOG" 2>/dev/null
+  done
+fi
+
+if [ -n "$wan_ip6" ]; then
+       for i in $wan_ip6; do
+     sed -i "s/${wan_ip6}/*WAN IP*/g" "$DEBUG_LOG" 2>/dev/null
+  done
+fi
+
 del_lock
\ No newline at end of file
index 036826d..3739508 100644 (file)
@@ -335,7 +335,7 @@ function close_connections()
                --close connections
                if #(group_cons_id) > 0 then
                        for i = 1, #(group_cons_id) do
-                               luci.sys.exec(string.format('curl -sL -m 5 --retry 2 -H "Content-Type: application/json" -H "Authorization: Bearer %s" -X DELETE http://%s:%s/connections/%s >/dev/null 2>&1', passwd, ip, port, group_cons_id[i]))
+                               luci.sys.exec(string.format('curl -sL -m 3 --retry 2 -H "Content-Type: application/json" -H "Authorization: Bearer %s" -X DELETE http://%s:%s/connections/%s >/dev/null 2>&1 &', passwd, ip, port, group_cons_id[i]))
                        end
                end
        end
index 5aef9e1..6941f74 100644 (file)
@@ -1,2 +1,2 @@
-v0.44.25-beta
-data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYQAAAAqCAMAAAHzBexdAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyNpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ4IDc5LjE2NDAzNiwgMjAxOS8wOC8xMy0wMTowNjo1NyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIDIxLjAgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjc5RDNENzAzOEQxMjExRUNBNDhEQUNEN0Y0RkFDQTU0IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjc5RDNENzA0OEQxMjExRUNBNDhEQUNEN0Y0RkFDQTU0Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NzlEM0Q3MDE4RDEyMTFFQ0E0OERBQ0Q3RjRGQUNBNTQiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NzlEM0Q3MDI4RDEyMTFFQ0E0OERBQ0Q3RjRGQUNBNTQiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz6+p3G3AAADAFBMVEVFgaM3k8hjlbEJeLh1tdmhoaEHXpGUxeG6uroFbakka5NJns4bhcEFaqPv9PdUi6rg7/c1dZpISEilpaWKioqStcojhLuxytgqjcYGZp0dcqLR0dHR5vI9PT06lcqenp6CgoIGcKze3t61tbUgdaYVapo/Pz9ubm4Jca3a2trn5+eizOXOzs7R4emRkZFFRUVLS0tycnIHVoQJZZkKdLF3d3eFhYUkeqoKaqGcnJxiYmJjnLwEU4AEYJRFmsq/v782kcasrKx4eHgJXY5Fkb2CrsZYpdLg4OBDQ0NBQUGixtrw9Pey0eMXgb6UlJTCwsIEWYkFZZtqamrIyMiiwNFXlbkGVYLFxcVAQEDAwMA0fKaDqsG2trZmrdWy1uoHXI7KysrB2efB1OAJYZPR3+gXYowJbaZlZWWDsMtgYGBHnMwYfLSkzuaiv9AYbZ2NjY2EtNAFcrBynrgHdbIEXI5zsdQJWIWvr68nicAFYpd0dHSJweKTvtY1h7Vlq9QKebkBcrNZWVlTU1NRUVFUVFRVVVULfL1SUlIFdrcKe7wHeLlWVlYGd7gOf8AOgMAEdrYDdLUEdbYDdLQDdbUSg8MSg8QShMQThMUAcrJXV1cOf78Nfr8Nfr4Mfb4Mfb0Je7sJersIeboJero6OjqqqqrV1dXU1NSrq6vC3u7w9/upqak7OzuAgIB+fn719fWBqcCBgYEGVYHB3u7q6uqEvN2DvNyEvd309PTz8/OFvt6Hv99MTEyGvt9/f3+ErMJGm8vB3e2Gv99Hm8zo6OjA1N8HVoPB3e6Xl5dkqtLC3+/g6u/W1tZEmcrC3u8EVYOFvd4UXokIaJ9Ef6Hg6vCDr8iDq8KFvd2CuttVos/B2+qixNcIV4TB1eBor9fB1+MFdLRFiK0IdrUab6AmcZ0wk8sFZ6AHWIekyuCEq8LQ5PAGXY90oLkLd7bC3OtIi7ICc7QRgsMPgMEQgcJaWlpfX19NTU1eXl5cXFxbW1tPT09QUFBYWFhdXV1OTk7///////9gmvDRAAABAHRSTlP///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8AU/cHJQAAEC5JREFUeNpi+P8FF5iOFVQzfMcJPmIHDL9//9P/DQesS4GEAkRg3rx5GvPm3Zn3b17Zv4I383bO45k3j3vePIaWln8t/4BoyWog2eIhtLqlJXOJMpDZslBg4cKFNSsT/wGphfvDtvwLW7gQiBiacYJ+7IDh/1dcoAE7AAggBkPSgmo6Axkh5REECSUFRIAp/LYCBZT4SmDo/Js3zwIIQYG0cx44oCBgNYRasnqZATCU9gLDaeGdLf8Wbtq0aeHCaHAI/QOG1T884YQrmEgNJYAAYjD8QzL4QBJg+AwCCvmfsYB0ZI4TgjkLDPp2gSk5IOYG4o9A7q5dEkDWwVkogKEbCHSA+B8QfpX9J2slK9v9z+OfhwdEDMQ9LPtPSHZ59w6hf2uAvO7uzk7jzhWddp3/Ojs7U1d0ypiAGJ2dDJ2JYIYr2z92Z6POK2xHLUB8hiYgWPzvX6Pyv39AFhADaQiEc5c1af1btapJ+d/itSDBpp6eHvGenpR/bD1be3oOAHn/QPAfCPeAeP8CeMEcPjCf4SfpYBJJACCAGHCXHbiA+XRSwH8G0pOSOYlp6TvJQOUjSQCSWh2xJdbPCmCEkVpVIKnwLoQCpk8eEM3CM+vurl2YiXUWA6iQsDKQRS4xfv9W//0PSGr9/h0DLUvUf+sDCxKIpMo8EGBJYwBR/4AlCT+IYZw676QFsHABFy3AImYnuJwBFTPA9L28GwL+yXarAZP+v25wlujubuo27f4HygRC6vrdy/08hbo1Pf51d0t1AnMCEyQP/Ou8tuBqFpS5YoUMkL5mxNUZYvHvClun8TNwNmlBAFAx36K5ejWcDawDgFxgobZap2VJMFBgGUj80cKF/PsX3gHVA8ByTsBhkwywrFu4shJI/FsYxrYFSPOHhW1Z6LsxDKQEnOO0/u1o+ncYksmcwDkPmL2AhF4miLsWnO1W/QTnPaDwI3AeUwRlKiALmOnOAKkz4DzGDxL4x9cj/o/v6T/OfzWgDIinDsIF8vpJAmTkaVUS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
\ No newline at end of file
+v0.44.28-beta
+data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYQAAAAqCAMAAAHzBexdAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyNpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ4IDc5LjE2NDAzNiwgMjAxOS8wOC8xMy0wMTowNjo1NyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIDIxLjAgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjYwRjhDQkQ0OTZDQzExRUNBMzAyRTBCNDQ3NjhDOUNGIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjYwRjhDQkQ1OTZDQzExRUNBMzAyRTBCNDQ3NjhDOUNGIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NjBGOENCRDI5NkNDMTFFQ0EzMDJFMEI0NDc2OEM5Q0YiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NjBGOENCRDM5NkNDMTFFQ0EzMDJFMEI0NDc2OEM5Q0YiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4DXkMyAAADAFBMVEUbhcJ+fn6tra1jlbEkapJJns4wk8uhoaEJeLjh7/fC3u66urqGv98jhLtFgKIFbakJca0qjcXv9Pc6lsoFaqNISEilpaWKioo1dZoHX5HR0dF2tdodcqI9PT2enp6CgoLR5vIGcKwHZp3e3t5jnL3R4eq1tbUVappUi6s/Pz9ubm6y0eOizOXa2trn5+fOzs41h7UJZZmRkZFFRUVLS0uTvtYFYJRycnJYptIKdLF3d3eFhYUJXo4HVoQEU4Akeaqjxto2kcWcnJyUxuJiYmKxyti/v794eHhXlLhFkb2Crsbg4OBDQ0MEWYpBQUFFmsoXYYwGVYLw9PfR3+jA1OCUlJTCwsKDqsEFZZtqamrIyMiiwNEXgb5nrdaStMgJaqHFxcUIYZRAQEDAwMA0fKZ1o722trYGXY+z1enKysoIbaUgdafB2edlZWWDsMtgYGCTxOBHnM2kzuYYbZ2xzdyiv9EFcrCNjY1ynrgJWIUZfLWSuc9DfqAFYpd0dHSJweJ0sdUnisJlq9QKbqgKebkHXIwBcrNZWVlTU1NRUVFUVFRVVVVSUlIFdrcLfL0Ke7wHeLlWVlYGd7gOf8ADdbUEdrYOgMAEdbYDdLQDdLUSg8MSg8QShMQThMUAcrJXV1cOf78Nfr8Nfr4Mfb4Mfb0Je7sJersIeboJero6OjqqqqrV1dXU1NSrq6vw9/upqak7OzuAgID19fWCqcDB3u4GVYGBgYHq6uqEvN2Evd2DvNzz8/P09PQEXI6Fvt5MTEzB3e1Gm8tHm8zo6Ojg6u/g6vDB3e6Xl5dkq9PW1tZVos+Fvd7A1N+EtNBEmcoFdLQIdbODr8iErMIIaJ+Dq8KDu9wUXokEVYOFvd1GibAId7YIV4TB2+o4k8fB1+OixNYoh70LernB1+QFZ6DQ5PAab6Amb5qEq8KAudnC3Otlp80IWYhmn78lfrDB1eACc7QRgsMPgMEQgcJaWlpfX19NTU1eXl5cXFxbW1tPT09QUFBYWFhdXV1OTk7///////9imXKkAAABAHRSTlP///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8AU/cHJQAAEF9JREFUeNpi+P8FF5iLFdQzfMcJPmIHDL9//zP+DQfsq4GEPERgyZIlAkuWvFvyb0nlPxvWJfuWMCxZwrpkCUNX17+uf0C0agOQ7PIR3dDVlb9KDcjsWs65fPly03U5/4DU8i2BO/4FLl8ORAydOMFU7IDh/1dcoA07AAggBnPSgmouAxkh5RMJCSV5RIDJ/3YBBZTrOmDo/FuyJH6JITiQ9i0BBxQEbIBQqzasMQGGEiMwnJa/2/Fv+ZYtW5YvDz8oAAyhf8Cw+ocnnHAFE6mhBBBADOZ/SAYfSAIMn0FAvvwzFpCLzHFHMBeAwUceMCUMxKxAPA3IFbYAiUDE4YBhIhDoA/E/IPwq+0/WRVZ24j+ffz4+EDEQ97DsP1HZtRN3i/7bCORNnNjfb9jP1e/f/6+/vz+Aq1/BEsTo7+fr/wdmeEn+c7ax7b8oaRsP4jN0AMHKf//a1f79A7KAGEhDIJy7pkPv3/r1HWr/VjKCBDsmTZrkOmlS8D/JSVcnTToA5P0DwX8gLALi/fMVAXOEgOSkSQw/SQczSAIAAcSAu+zABeznkgL+M5CelOxJTEvfSQbZH0kCkNTKhC2xfpYHI4zUmg1JhbEQShCYHkG0NAM0naIl1gUMoELCxUQWucT4/Vvr9z8gqff7dxq0LNH6bQwsSCCS2UtAQDqLD0T9A5YkGiCGYcCSf5bAEgZctCwBFcegcgZUzADT99qJEPBPdqImMOn/mwjOEhMndky0mvgPlAlEtYwnrg31E52o6/Nv4kSZfmBOYIbkgX/9N5ZdKYQybf8FAOkbtiz90fH/Lkr2G74GicMLsi5Q0Q8Euhs2wNnAOgDIBRZqG/S7VkUBBdaAxJ8uX65xcPm75eCKYAun4xYFYFm3fF3t8n/Lw5cHSu4AcjQCA3csj9kaCFICznF6/3Z3/DsMyWTu4JwHzF5AwigfxGUEZ7v1P8F5Dyj8FJzHFEGZCsgCZrpzQOockFvxLwQk8E9okus/ocf/+P+ZTgLluE6SQfFU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
\ No newline at end of file
index c8e638e..73d61eb 100644 (file)
@@ -172,7 +172,8 @@ encoreTVB(By lhie1),lhie1,classical,dler-io/Rules/master/Clash/Provider/Media/,e
 encoreTVB,ConnersHua,classical,DivineEngine/Profiles/master/Clash/RuleSet/StreamingMedia/Video/,encoreTVB.yaml
 iCloud-email,ConnersHua,classical,DivineEngine/Profiles/master/Clash/RuleSet/Extra/Apple/,Mail.yaml
 iQIYI,ConnersHua,classical,DivineEngine/Profiles/master/Clash/RuleSet/StreamingMedia/Video/,iQIYI.yaml
-iQiyi,lhie1,classical,dler-io/Rules/master/Clash/Provider/Media/,iQiyi.yaml
+IQIYI,lhie1,classical,dler-io/Rules/master/Clash/Provider/Media/,IQIYI.yaml
+IQ,lhie1,classical,dler-io/Rules/master/Clash/Provider/Media/,IQ.yaml
 myTV SUPER,lhie1,classical,dler-io/Rules/master/Clash/Provider/Media/,myTV%20SUPER.yaml,myTV SUPER.yaml
 myTV-SUPER,ConnersHua,classical,DivineEngine/Profiles/master/Clash/RuleSet/StreamingMedia/Video/,myTV-SUPER.yaml
 niconico,ConnersHua,classical,DivineEngine/Profiles/master/Clash/RuleSet/StreamingMedia/Video/,niconico.yaml
\ No newline at end of file
index f7e05a9..08e9cba 100644 (file)
@@ -2,39 +2,38 @@
 无Urltest,no_urltest.ini,https://gist.githubusercontent.com/tindy2013/1fa08640a9088ac8652dbd40c5d2715b/raw/no_urltest.ini
 带Urltest,urltest.ini,https://gist.githubusercontent.com/tindy2013/1fa08640a9088ac8652dbd40c5d2715b/raw/urltest.ini
 ConnersHua 神机规则 Pro,connershua_pro.ini,https://gist.githubusercontent.com/tindy2013/1fa08640a9088ac8652dbd40c5d2715b/raw/connershua_new.ini
-lhie1 洞主规则(使用 Clash 分组规则),lhie1_clash.ini,https://gist.githubusercontent.com/tindy2013/1fa08640a9088ac8652dbd40c5d2715b/raw/lhie1_clash.ini
-lhie1 洞主规则完整版,lhie1_dler.ini,https://gist.githubusercontent.com/tindy2013/1fa08640a9088ac8652dbd40c5d2715b/raw/lhie1_dler.ini
-ACL4SSR 规则标准版,acl4ssr_standard.ini,https://gist.githubusercontent.com/tindy2013/1fa08640a9088ac8652dbd40c5d2715b/raw/acl4ssr_standard.ini
-ACL4SSR 规则 GFWList,acl4ssr_gfwlist.ini,https://gist.githubusercontent.com/tindy2013/1fa08640a9088ac8652dbd40c5d2715b/raw/acl4ssr_gfwlist.ini
-ACL4SSR 规则 AdblockPlus,ACL4SSR_AdblockPlus.ini,https://raw.githubusercontent.com/tindy2013/subconverter/master/base/config/ACL4SSR_AdblockPlus.ini
-ACL4SSR 规则 BackCN,ACL4SSR_BackCN.ini,https://raw.githubusercontent.com/tindy2013/subconverter/master/base/config/ACL4SSR_BackCN.ini
-ACL4SSR 规则 Mini,ACL4SSR_Mini.ini,https://raw.githubusercontent.com/tindy2013/subconverter/master/base/config/ACL4SSR_Mini.ini
-ACL4SSR 规则 Mini Fallback,ACL4SSR_Mini_Fallback.ini,https://raw.githubusercontent.com/tindy2013/subconverter/master/base/config/ACL4SSR_Mini_Fallback.ini
-ACL4SSR 规则 Mini MultiMode,ACL4SSR_Mini_MultiMode.ini,https://raw.githubusercontent.com/tindy2013/subconverter/master/base/config/ACL4SSR_Mini_MultiMode.ini
-ACL4SSR 规则 Mini NoAuto,ACL4SSR_Mini_NoAuto.ini,https://raw.githubusercontent.com/tindy2013/subconverter/master/base/config/ACL4SSR_Mini_NoAuto.ini
-ACL4SSR 规则 NoApple,ACL4SSR_NoApple.ini,https://raw.githubusercontent.com/tindy2013/subconverter/master/base/config/ACL4SSR_NoApple.ini
-ACL4SSR 规则 NoAuto,ACL4SSR_NoAuto.ini,https://raw.githubusercontent.com/tindy2013/subconverter/master/base/config/ACL4SSR_NoAuto.ini
-ACL4SSR 规则 NoAuto NoApple,ACL4SSR_NoAuto_NoApple.ini,https://raw.githubusercontent.com/tindy2013/subconverter/master/base/config/ACL4SSR_NoAuto_NoApple.ini
-ACL4SSR 规则 NoAuto NoApple NoMicrosoft,ACL4SSR_NoAuto_NoApple_NoMicrosoft.ini,https://raw.githubusercontent.com/tindy2013/subconverter/master/base/config/ACL4SSR_NoAuto_NoApple_NoMicrosoft.ini
-ACL4SSR 规则 NoMicrosoft,ACL4SSR_NoMicrosoft.ini,https://raw.githubusercontent.com/tindy2013/subconverter/master/base/config/ACL4SSR_NoMicrosoft.ini
-ACL4SSR 规则 Online,ACL4SSR_Online.ini,https://raw.githubusercontent.com/tindy2013/subconverter/master/base/config/ACL4SSR_Online.ini
-ACL4SSR 规则 Online AdblockPlus,ACL4SSR_Online_AdblockPlus.ini,https://raw.githubusercontent.com/tindy2013/subconverter/master/base/config/ACL4SSR_Online_AdblockPlus.ini
-ACL4SSR 规则 Online Full,ACL4SSR_Online_Full.ini,https://raw.githubusercontent.com/tindy2013/subconverter/master/base/config/ACL4SSR_Online_Full.ini
-ACL4SSR 规则 Online Full AdblockPlus,ACL4SSR_Online_Full_AdblockPlus.ini,https://raw.githubusercontent.com/tindy2013/subconverter/master/base/config/ACL4SSR_Online_Full_AdblockPlus.ini
-ACL4SSR 规则 Online Full Google,ACL4SSR_Online_Full_Google.ini,https://raw.githubusercontent.com/tindy2013/subconverter/master/base/config/ACL4SSR_Online_Full_Google.ini
-ACL4SSR 规则 Online Full MultiMode,ACL4SSR_Online_Full_MultiMode.ini,https://raw.githubusercontent.com/tindy2013/subconverter/master/base/config/ACL4SSR_Online_Full_MultiMode.ini
-ACL4SSR 规则 Online Full Netflix,ACL4SSR_Online_Full_Netflix.ini,https://raw.githubusercontent.com/tindy2013/subconverter/master/base/config/ACL4SSR_Online_Full_Netflix.ini
-ACL4SSR 规则 Online Full NoAuto,ACL4SSR_Online_Full_NoAuto.ini,https://raw.githubusercontent.com/tindy2013/subconverter/master/base/config/ACL4SSR_Online_Full_NoAuto.ini
-ACL4SSR 规则 Online Mini,ACL4SSR_Online_Mini.ini,https://raw.githubusercontent.com/tindy2013/subconverter/master/base/config/ACL4SSR_Online_Mini.ini
-ACL4SSR 规则 Online Mini AdblockPlus,ACL4SSR_Online_Mini_AdblockPlus.ini,https://raw.githubusercontent.com/tindy2013/subconverter/master/base/config/ACL4SSR_Online_Mini_AdblockPlus.ini
-ACL4SSR 规则 Online Mini Fallback,ACL4SSR_Online_Mini_Fallback.ini,https://raw.githubusercontent.com/tindy2013/subconverter/master/base/config/ACL4SSR_Online_Mini_Fallback.ini
-ACL4SSR 规则 Online Mini MultiCountry,ACL4SSR_Online_Mini_MultiCountry.ini,https://raw.githubusercontent.com/tindy2013/subconverter/master/base/config/ACL4SSR_Online_Mini_MultiCountry.ini
-ACL4SSR 规则 Online Mini MultiMode,ACL4SSR_Online_Mini_MultiMode.ini,https://raw.githubusercontent.com/tindy2013/subconverter/master/base/config/ACL4SSR_Online_Mini_MultiMode.ini
-ACL4SSR 规则 Online Mini NoAuto,ACL4SSR_Online_Mini_NoAuto.ini,https://raw.githubusercontent.com/tindy2013/subconverter/master/base/config/ACL4SSR_Online_Mini_NoAuto.ini
-ACL4SSR 规则 Online MultiCountry,ACL4SSR_Online_MultiCountry.ini,https://raw.githubusercontent.com/tindy2013/subconverter/master/base/config/ACL4SSR_Online_MultiCountry.ini
-ACL4SSR 规则 Online NoAuto,ACL4SSR_Online_NoAuto.ini,https://raw.githubusercontent.com/tindy2013/subconverter/master/base/config/ACL4SSR_Online_NoAuto.ini
-ACL4SSR 规则 Online NoReject,ACL4SSR_Online_NoReject.ini,https://raw.githubusercontent.com/tindy2013/subconverter/master/base/config/ACL4SSR_Online_NoReject.ini
-ACL4SSR 规则 WithChinaIp,ACL4SSR_WithChinaIp.ini,https://raw.githubusercontent.com/tindy2013/subconverter/master/base/config/ACL4SSR_WithChinaIp.ini
-ACL4SSR 规则 WithChinaIp WithGFW,ACL4SSR_WithChinaIp_WithGFW.ini,https://raw.githubusercontent.com/tindy2013/subconverter/master/base/config/ACL4SSR_WithChinaIp_WithGFW.ini
-ACL4SSR 规则 WithGFW,ACL4SSR_WithGFW.ini,https://raw.githubusercontent.com/tindy2013/subconverter/master/base/config/ACL4SSR_WithGFW.ini
+lhie1 洞主规则(使用 Clash 分组规则),lhie1_clash.ini,https://gist.githubusercontent.com/vernesong/4c27ed54ab2a5fedd9c4011389ac11ed/raw/lhie1_clash.ini
+lhie1 洞主规则完整版,lhie1_dler.ini,https://gist.githubusercontent.com/vernesong/4c27ed54ab2a5fedd9c4011389ac11ed/raw/lhie1_dler.ini
+ACL4SSR 规则标准版,ACL4SSR.ini,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR.ini
+ACL4SSR 规则 AdblockPlus,ACL4SSR_AdblockPlus.ini,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_AdblockPlus.ini
+ACL4SSR 规则 BackCN,ACL4SSR_BackCN.ini,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_BackCN.ini
+ACL4SSR 规则 Mini,ACL4SSR_Mini.ini,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Mini.ini
+ACL4SSR 规则 Mini Fallback,ACL4SSR_Mini_Fallback.ini,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Mini_Fallback.ini
+ACL4SSR 规则 Mini MultiMode,ACL4SSR_Mini_MultiMode.ini,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Mini_MultiMode.ini
+ACL4SSR 规则 Mini NoAuto,ACL4SSR_Mini_NoAuto.ini,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Mini_NoAuto.ini
+ACL4SSR 规则 NoApple,ACL4SSR_NoApple.ini,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_NoApple.ini
+ACL4SSR 规则 NoAuto,ACL4SSR_NoAuto.ini,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_NoAuto.ini
+ACL4SSR 规则 NoAuto NoApple,ACL4SSR_NoAuto_NoApple.ini,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_NoAuto_NoApple.ini
+ACL4SSR 规则 NoAuto NoApple NoMicrosoft,ACL4SSR_NoAuto_NoApple_NoMicrosoft.ini,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_NoAuto_NoApple_NoMicrosoft.ini
+ACL4SSR 规则 NoMicrosoft,ACL4SSR_NoMicrosoft.ini,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_NoMicrosoft.ini
+ACL4SSR 规则 Online,ACL4SSR_Online.ini,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online.ini
+ACL4SSR 规则 Online AdblockPlus,ACL4SSR_Online_AdblockPlus.ini,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_AdblockPlus.ini
+ACL4SSR 规则 Online Full,ACL4SSR_Online_Full.ini,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_Full.ini
+ACL4SSR 规则 Online Full AdblockPlus,ACL4SSR_Online_Full_AdblockPlus.ini,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_Full_AdblockPlus.ini
+ACL4SSR 规则 Online Full Google,ACL4SSR_Online_Full_Google.ini,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_Full_Google.ini
+ACL4SSR 规则 Online Full MultiMode,ACL4SSR_Online_Full_MultiMode.ini,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_Full_MultiMode.ini
+ACL4SSR 规则 Online Full Netflix,ACL4SSR_Online_Full_Netflix.ini,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_Full_Netflix.ini
+ACL4SSR 规则 Online Full NoAuto,ACL4SSR_Online_Full_NoAuto.ini,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_Full_NoAuto.ini
+ACL4SSR 规则 Online Mini,ACL4SSR_Online_Mini.ini,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_Mini.ini
+ACL4SSR 规则 Online Mini AdblockPlus,ACL4SSR_Online_Mini_AdblockPlus.ini,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_Mini_AdblockPlus.ini
+ACL4SSR 规则 Online Mini Fallback,ACL4SSR_Online_Mini_Fallback.ini,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_Mini_Fallback.ini
+ACL4SSR 规则 Online Mini MultiCountry,ACL4SSR_Online_Mini_MultiCountry.ini,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_Mini_MultiCountry.ini
+ACL4SSR 规则 Online Mini MultiMode,ACL4SSR_Online_Mini_MultiMode.ini,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_Mini_MultiMode.ini
+ACL4SSR 规则 Online Mini NoAuto,ACL4SSR_Online_Mini_NoAuto.ini,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_Mini_NoAuto.ini
+ACL4SSR 规则 Online MultiCountry,ACL4SSR_Online_MultiCountry.ini,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_MultiCountry.ini
+ACL4SSR 规则 Online NoAuto,ACL4SSR_Online_NoAuto.ini,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_NoAuto.ini
+ACL4SSR 规则 Online NoReject,ACL4SSR_Online_NoReject.ini,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_NoReject.ini
+ACL4SSR 规则 WithChinaIp,ACL4SSR_WithChinaIp.ini,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_WithChinaIp.ini
+ACL4SSR 规则 WithChinaIp WithGFW,ACL4SSR_WithChinaIp_WithGFW.ini,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_WithChinaIp_WithGFW.ini
+ACL4SSR 规则 WithGFW,ACL4SSR_WithGFW.ini,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_WithGFW.ini
 eHpo1 规则,ehpo1_main.ini,https://gist.githubusercontent.com/tindy2013/1fa08640a9088ac8652dbd40c5d2715b/raw/ehpo1_main.ini
\ No newline at end of file
diff --git a/applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/Chart.min.44f6c6c6.js b/applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/Chart.min.44f6c6c6.js
deleted file mode 100644 (file)
index ce08d54..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-import{A as Da}from"./vendor.38e754a4.js";function Ta(Re,Gt){return Gt.forEach(function(B){B&&typeof B!="string"&&!Array.isArray(B)&&Object.keys(B).forEach(function(j){if(j!=="default"&&!(j in Re)){var z=Object.getOwnPropertyDescriptor(B,j);Object.defineProperty(Re,j,z.get?z:{enumerable:!0,get:function(){return B[j]}})}})}),Object.freeze(Re)}var Yt={exports:{}};/*!
- * Chart.js v2.9.4
- * https://www.chartjs.org
- * (c) 2020 Chart.js Contributors
- * Released under the MIT License
- */(function(Re,Gt){(function(B,j){Re.exports=j(function(){try{return require("moment")}catch{}}())})(Da,function(B){B=B&&B.hasOwnProperty("default")?B.default:B;var j={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]},z=function(e,t){return e(t={exports:{}},t.exports),t.exports}(function(e){var t={};for(var n in j)j.hasOwnProperty(n)&&(t[j[n]]=n);var i=e.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 a in i)if(i.hasOwnProperty(a)){if(!("channels"in i[a]))throw new Error("missing channels property: "+a);if(!("labels"in i[a]))throw new Error("missing channel labels property: "+a);if(i[a].labels.length!==i[a].channels)throw new Error("channel and label counts mismatch: "+a);var r=i[a].channels,o=i[a].labels;delete i[a].channels,delete i[a].labels,Object.defineProperty(i[a],"channels",{value:r}),Object.defineProperty(i[a],"labels",{value:o})}i.rgb.hsl=function(s){var l,u,d=s[0]/255,h=s[1]/255,f=s[2]/255,g=Math.min(d,h,f),p=Math.max(d,h,f),m=p-g;return p===g?l=0:d===p?l=(h-f)/m:h===p?l=2+(f-d)/m:f===p&&(l=4+(d-h)/m),(l=Math.min(60*l,360))<0&&(l+=360),u=(g+p)/2,[l,100*(p===g?0:u<=.5?m/(p+g):m/(2-p-g)),100*u]},i.rgb.hsv=function(s){var l,u,d,h,f,g=s[0]/255,p=s[1]/255,m=s[2]/255,v=Math.max(g,p,m),x=v-Math.min(g,p,m),b=function(y){return(v-y)/6/x+.5};return x===0?h=f=0:(f=x/v,l=b(g),u=b(p),d=b(m),g===v?h=d-u:p===v?h=1/3+l-d:m===v&&(h=2/3+u-l),h<0?h+=1:h>1&&(h-=1)),[360*h,100*f,100*v]},i.rgb.hwb=function(s){var l=s[0],u=s[1],d=s[2];return[i.rgb.hsl(s)[0],100*(1/255*Math.min(l,Math.min(u,d))),100*(d=1-1/255*Math.max(l,Math.max(u,d)))]},i.rgb.cmyk=function(s){var l,u=s[0]/255,d=s[1]/255,h=s[2]/255;return[100*((1-u-(l=Math.min(1-u,1-d,1-h)))/(1-l)||0),100*((1-d-l)/(1-l)||0),100*((1-h-l)/(1-l)||0),100*l]},i.rgb.keyword=function(s){var l=t[s];if(l)return l;var u,d,h,f=1/0;for(var g in j)if(j.hasOwnProperty(g)){var p=j[g],m=(d=s,h=p,Math.pow(d[0]-h[0],2)+Math.pow(d[1]-h[1],2)+Math.pow(d[2]-h[2],2));m<f&&(f=m,u=g)}return u},i.keyword.rgb=function(s){return j[s]},i.rgb.xyz=function(s){var l=s[0]/255,u=s[1]/255,d=s[2]/255;return[100*(.4124*(l=l>.04045?Math.pow((l+.055)/1.055,2.4):l/12.92)+.3576*(u=u>.04045?Math.pow((u+.055)/1.055,2.4):u/12.92)+.1805*(d=d>.04045?Math.pow((d+.055)/1.055,2.4):d/12.92)),100*(.2126*l+.7152*u+.0722*d),100*(.0193*l+.1192*u+.9505*d)]},i.rgb.lab=function(s){var l=i.rgb.xyz(s),u=l[0],d=l[1],h=l[2];return d/=100,h/=108.883,u=(u/=95.047)>.008856?Math.pow(u,1/3):7.787*u+16/116,[116*(d=d>.008856?Math.pow(d,1/3):7.787*d+16/116)-16,500*(u-d),200*(d-(h=h>.008856?Math.pow(h,1/3):7.787*h+16/116))]},i.hsl.rgb=function(s){var l,u,d,h,f,g=s[0]/360,p=s[1]/100,m=s[2]/100;if(p===0)return[f=255*m,f,f];l=2*m-(u=m<.5?m*(1+p):m+p-m*p),h=[0,0,0];for(var v=0;v<3;v++)(d=g+1/3*-(v-1))<0&&d++,d>1&&d--,f=6*d<1?l+6*(u-l)*d:2*d<1?u:3*d<2?l+(u-l)*(2/3-d)*6:l,h[v]=255*f;return h},i.hsl.hsv=function(s){var l=s[0],u=s[1]/100,d=s[2]/100,h=u,f=Math.max(d,.01);return u*=(d*=2)<=1?d:2-d,h*=f<=1?f:2-f,[l,100*(d===0?2*h/(f+h):2*u/(d+u)),100*((d+u)/2)]},i.hsv.rgb=function(s){var l=s[0]/60,u=s[1]/100,d=s[2]/100,h=Math.floor(l)%6,f=l-Math.floor(l),g=255*d*(1-u),p=255*d*(1-u*f),m=255*d*(1-u*(1-f));switch(d*=255,h){case 0:return[d,m,g];case 1:return[p,d,g];case 2:return[g,d,m];case 3:return[g,p,d];case 4:return[m,g,d];case 5:return[d,g,p]}},i.hsv.hsl=function(s){var l,u,d,h=s[0],f=s[1]/100,g=s[2]/100,p=Math.max(g,.01);return d=(2-f)*g,u=f*p,[h,100*(u=(u/=(l=(2-f)*p)<=1?l:2-l)||0),100*(d/=2)]},i.hwb.rgb=function(s){var l,u,d,h,f,g,p,m=s[0]/360,v=s[1]/100,x=s[2]/100,b=v+x;switch(b>1&&(v/=b,x/=b),d=6*m-(l=Math.floor(6*m)),(1&l)!=0&&(d=1-d),h=v+d*((u=1-x)-v),l){default:case 6:case 0:f=u,g=h,p=v;break;case 1:f=h,g=u,p=v;break;case 2:f=v,g=u,p=h;break;case 3:f=v,g=h,p=u;break;case 4:f=h,g=v,p=u;break;case 5:f=u,g=v,p=h}return[255*f,255*g,255*p]},i.cmyk.rgb=function(s){var l=s[0]/100,u=s[1]/100,d=s[2]/100,h=s[3]/100;return[255*(1-Math.min(1,l*(1-h)+h)),255*(1-Math.min(1,u*(1-h)+h)),255*(1-Math.min(1,d*(1-h)+h))]},i.xyz.rgb=function(s){var l,u,d,h=s[0]/100,f=s[1]/100,g=s[2]/100;return u=-.9689*h+1.8758*f+.0415*g,d=.0557*h+-.204*f+1.057*g,l=(l=3.2406*h+-1.5372*f+-.4986*g)>.0031308?1.055*Math.pow(l,1/2.4)-.055:12.92*l,u=u>.0031308?1.055*Math.pow(u,1/2.4)-.055:12.92*u,d=d>.0031308?1.055*Math.pow(d,1/2.4)-.055:12.92*d,[255*(l=Math.min(Math.max(0,l),1)),255*(u=Math.min(Math.max(0,u),1)),255*(d=Math.min(Math.max(0,d),1))]},i.xyz.lab=function(s){var l=s[0],u=s[1],d=s[2];return u/=100,d/=108.883,l=(l/=95.047)>.008856?Math.pow(l,1/3):7.787*l+16/116,[116*(u=u>.008856?Math.pow(u,1/3):7.787*u+16/116)-16,500*(l-u),200*(u-(d=d>.008856?Math.pow(d,1/3):7.787*d+16/116))]},i.lab.xyz=function(s){var l,u,d,h=s[0];l=s[1]/500+(u=(h+16)/116),d=u-s[2]/200;var f=Math.pow(u,3),g=Math.pow(l,3),p=Math.pow(d,3);return u=f>.008856?f:(u-16/116)/7.787,l=g>.008856?g:(l-16/116)/7.787,d=p>.008856?p:(d-16/116)/7.787,[l*=95.047,u*=100,d*=108.883]},i.lab.lch=function(s){var l,u=s[0],d=s[1],h=s[2];return(l=360*Math.atan2(h,d)/2/Math.PI)<0&&(l+=360),[u,Math.sqrt(d*d+h*h),l]},i.lch.lab=function(s){var l,u=s[0],d=s[1];return l=s[2]/360*2*Math.PI,[u,d*Math.cos(l),d*Math.sin(l)]},i.rgb.ansi16=function(s){var l=s[0],u=s[1],d=s[2],h=1 in arguments?arguments[1]:i.rgb.hsv(s)[2];if((h=Math.round(h/50))===0)return 30;var f=30+(Math.round(d/255)<<2|Math.round(u/255)<<1|Math.round(l/255));return h===2&&(f+=60),f},i.hsv.ansi16=function(s){return i.rgb.ansi16(i.hsv.rgb(s),s[2])},i.rgb.ansi256=function(s){var l=s[0],u=s[1],d=s[2];return l===u&&u===d?l<8?16:l>248?231:Math.round((l-8)/247*24)+232:16+36*Math.round(l/255*5)+6*Math.round(u/255*5)+Math.round(d/255*5)},i.ansi16.rgb=function(s){var l=s%10;if(l===0||l===7)return s>50&&(l+=3.5),[l=l/10.5*255,l,l];var u=.5*(1+~~(s>50));return[(1&l)*u*255,(l>>1&1)*u*255,(l>>2&1)*u*255]},i.ansi256.rgb=function(s){if(s>=232){var l=10*(s-232)+8;return[l,l,l]}var u;return s-=16,[Math.floor(s/36)/5*255,Math.floor((u=s%36)/6)/5*255,u%6/5*255]},i.rgb.hex=function(s){var l=(((255&Math.round(s[0]))<<16)+((255&Math.round(s[1]))<<8)+(255&Math.round(s[2]))).toString(16).toUpperCase();return"000000".substring(l.length)+l},i.hex.rgb=function(s){var l=s.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!l)return[0,0,0];var u=l[0];l[0].length===3&&(u=u.split("").map(function(h){return h+h}).join(""));var d=parseInt(u,16);return[d>>16&255,d>>8&255,255&d]},i.rgb.hcg=function(s){var l,u=s[0]/255,d=s[1]/255,h=s[2]/255,f=Math.max(Math.max(u,d),h),g=Math.min(Math.min(u,d),h),p=f-g;return l=p<=0?0:f===u?(d-h)/p%6:f===d?2+(h-u)/p:4+(u-d)/p+4,l/=6,[360*(l%=1),100*p,100*(p<1?g/(1-p):0)]},i.hsl.hcg=function(s){var l=s[1]/100,u=s[2]/100,d=1,h=0;return(d=u<.5?2*l*u:2*l*(1-u))<1&&(h=(u-.5*d)/(1-d)),[s[0],100*d,100*h]},i.hsv.hcg=function(s){var l=s[1]/100,u=s[2]/100,d=l*u,h=0;return d<1&&(h=(u-d)/(1-d)),[s[0],100*d,100*h]},i.hcg.rgb=function(s){var l=s[0]/360,u=s[1]/100,d=s[2]/100;if(u===0)return[255*d,255*d,255*d];var h,f=[0,0,0],g=l%1*6,p=g%1,m=1-p;switch(Math.floor(g)){case 0:f[0]=1,f[1]=p,f[2]=0;break;case 1:f[0]=m,f[1]=1,f[2]=0;break;case 2:f[0]=0,f[1]=1,f[2]=p;break;case 3:f[0]=0,f[1]=m,f[2]=1;break;case 4:f[0]=p,f[1]=0,f[2]=1;break;default:f[0]=1,f[1]=0,f[2]=m}return h=(1-u)*d,[255*(u*f[0]+h),255*(u*f[1]+h),255*(u*f[2]+h)]},i.hcg.hsv=function(s){var l=s[1]/100,u=l+s[2]/100*(1-l),d=0;return u>0&&(d=l/u),[s[0],100*d,100*u]},i.hcg.hsl=function(s){var l=s[1]/100,u=s[2]/100*(1-l)+.5*l,d=0;return u>0&&u<.5?d=l/(2*u):u>=.5&&u<1&&(d=l/(2*(1-u))),[s[0],100*d,100*u]},i.hcg.hwb=function(s){var l=s[1]/100,u=l+s[2]/100*(1-l);return[s[0],100*(u-l),100*(1-u)]},i.hwb.hcg=function(s){var l=s[1]/100,u=1-s[2]/100,d=u-l,h=0;return d<1&&(h=(u-d)/(1-d)),[s[0],100*d,100*h]},i.apple.rgb=function(s){return[s[0]/65535*255,s[1]/65535*255,s[2]/65535*255]},i.rgb.apple=function(s){return[s[0]/255*65535,s[1]/255*65535,s[2]/255*65535]},i.gray.rgb=function(s){return[s[0]/100*255,s[0]/100*255,s[0]/100*255]},i.gray.hsl=i.gray.hsv=function(s){return[0,0,s[0]]},i.gray.hwb=function(s){return[0,100,s[0]]},i.gray.cmyk=function(s){return[0,0,0,s[0]]},i.gray.lab=function(s){return[s[0],0,0]},i.gray.hex=function(s){var l=255&Math.round(s[0]/100*255),u=((l<<16)+(l<<8)+l).toString(16).toUpperCase();return"000000".substring(u.length)+u},i.rgb.gray=function(s){return[(s[0]+s[1]+s[2])/3/255*100]}});z.rgb,z.hsl,z.hsv,z.hwb,z.cmyk,z.xyz,z.lab,z.lch,z.hex,z.keyword,z.ansi16,z.ansi256,z.hcg,z.apple,z.gray;function ii(e){var t=function(){for(var u={},d=Object.keys(z),h=d.length,f=0;f<h;f++)u[d[f]]={distance:-1,parent:null};return u}(),n=[e];for(t[e].distance=0;n.length;)for(var i=n.pop(),a=Object.keys(z[i]),r=a.length,o=0;o<r;o++){var s=a[o],l=t[s];l.distance===-1&&(l.distance=t[i].distance+1,l.parent=i,n.unshift(s))}return t}function ai(e,t){return function(n){return t(e(n))}}function ri(e,t){for(var n=[t[e].parent,e],i=z[t[e].parent][e],a=t[e].parent;t[a].parent;)n.unshift(t[a].parent),i=ai(z[t[a].parent][a],i),a=t[a].parent;return i.conversion=n,i}var Ae={};Object.keys(z).forEach(function(e){Ae[e]={},Object.defineProperty(Ae[e],"channels",{value:z[e].channels}),Object.defineProperty(Ae[e],"labels",{value:z[e].labels});var t=function(n){for(var i=ii(n),a={},r=Object.keys(i),o=r.length,s=0;s<o;s++){var l=r[s];i[l].parent!==null&&(a[l]=ri(l,i))}return a}(e);Object.keys(t).forEach(function(n){var i=t[n];Ae[e][n]=function(a){var r=function(o){if(o==null)return o;arguments.length>1&&(o=Array.prototype.slice.call(arguments));var s=a(o);if(typeof s=="object")for(var l=s.length,u=0;u<l;u++)s[u]=Math.round(s[u]);return s};return"conversion"in a&&(r.conversion=a.conversion),r}(i),Ae[e][n].raw=function(a){var r=function(o){return o==null?o:(arguments.length>1&&(o=Array.prototype.slice.call(arguments)),a(o))};return"conversion"in a&&(r.conversion=a.conversion),r}(i)})});var oi=Ae,dt={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]},ie={getRgba:ht,getHsla:ct,getRgb:function(e){var t=ht(e);return t&&t.slice(0,3)},getHsl:function(e){var t=ct(e);return t&&t.slice(0,3)},getHwb:Xt,getAlpha:function(e){var t=ht(e);if(t||(t=ct(e))||(t=Xt(e)))return t[3]},hexString:function(e,t){return t=t!==void 0&&e.length===3?t:e[3],"#"+Xe(e[0])+Xe(e[1])+Xe(e[2])+(t>=0&&t<1?Xe(Math.round(255*t)):"")},rgbString:function(e,t){return t<1||e[3]&&e[3]<1?Kt(e,t):"rgb("+e[0]+", "+e[1]+", "+e[2]+")"},rgbaString:Kt,percentString:function(e,t){if(t<1||e[3]&&e[3]<1)return $t(e,t);var n=Math.round(e[0]/255*100),i=Math.round(e[1]/255*100),a=Math.round(e[2]/255*100);return"rgb("+n+"%, "+i+"%, "+a+"%)"},percentaString:$t,hslString:function(e,t){return t<1||e[3]&&e[3]<1?Zt(e,t):"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)"},hslaString:Zt,hwbString:function(e,t){return t===void 0&&(t=e[3]!==void 0?e[3]:1),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+(t!==void 0&&t!==1?", "+t:"")+")"},keyword:function(e){return Jt[e.slice(0,3)]}};function ht(e){if(e){var t=[0,0,0],n=1,i=e.match(/^#([a-fA-F0-9]{3,4})$/i),a="";if(i){a=(i=i[1])[3];for(var r=0;r<t.length;r++)t[r]=parseInt(i[r]+i[r],16);a&&(n=Math.round(parseInt(a+a,16)/255*100)/100)}else if(i=e.match(/^#([a-fA-F0-9]{6}([a-fA-F0-9]{2})?)$/i)){for(a=i[2],i=i[1],r=0;r<t.length;r++)t[r]=parseInt(i.slice(2*r,2*r+2),16);a&&(n=Math.round(parseInt(a,16)/255*100)/100)}else if(i=e.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(r=0;r<t.length;r++)t[r]=parseInt(i[r+1]);n=parseFloat(i[4])}else if(i=e.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(r=0;r<t.length;r++)t[r]=Math.round(2.55*parseFloat(i[r+1]));n=parseFloat(i[4])}else if(i=e.match(/(\w+)/)){if(i[1]=="transparent")return[0,0,0,0];if(!(t=dt[i[1]]))return}for(r=0;r<t.length;r++)t[r]=ae(t[r],0,255);return n=n||n==0?ae(n,0,1):1,t[3]=n,t}}function ct(e){if(e){var t=e.match(/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(t){var n=parseFloat(t[4]);return[ae(parseInt(t[1]),0,360),ae(parseFloat(t[2]),0,100),ae(parseFloat(t[3]),0,100),ae(isNaN(n)?1:n,0,1)]}}}function Xt(e){if(e){var t=e.match(/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(t){var n=parseFloat(t[4]);return[ae(parseInt(t[1]),0,360),ae(parseFloat(t[2]),0,100),ae(parseFloat(t[3]),0,100),ae(isNaN(n)?1:n,0,1)]}}}function Kt(e,t){return t===void 0&&(t=e[3]!==void 0?e[3]:1),"rgba("+e[0]+", "+e[1]+", "+e[2]+", "+t+")"}function $t(e,t){return"rgba("+Math.round(e[0]/255*100)+"%, "+Math.round(e[1]/255*100)+"%, "+Math.round(e[2]/255*100)+"%, "+(t||e[3]||1)+")"}function Zt(e,t){return t===void 0&&(t=e[3]!==void 0?e[3]:1),"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+t+")"}function ae(e,t,n){return Math.min(Math.max(t,e),n)}function Xe(e){var t=e.toString(16).toUpperCase();return t.length<2?"0"+t:t}var Jt={};for(var Qt in dt)Jt[dt[Qt]]=Qt;var Z=function(e){return e instanceof Z?e:this instanceof Z?(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(typeof e=="string"?(t=ie.getRgba(e))?this.setValues("rgb",t):(t=ie.getHsla(e))?this.setValues("hsl",t):(t=ie.getHwb(e))&&this.setValues("hwb",t):typeof e=="object"&&((t=e).r!==void 0||t.red!==void 0?this.setValues("rgb",t):t.l!==void 0||t.lightness!==void 0?this.setValues("hsl",t):t.v!==void 0||t.value!==void 0?this.setValues("hsv",t):t.w!==void 0||t.whiteness!==void 0?this.setValues("hwb",t):t.c===void 0&&t.cyan===void 0||this.setValues("cmyk",t)))):new Z(e);var t};Z.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 e=this.values;return e.alpha!==1?e.hwb.concat([e.alpha]):e.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var e=this.values;return e.rgb.concat([e.alpha])},hslaArray:function(){var e=this.values;return e.hsl.concat([e.alpha])},alpha:function(e){return e===void 0?this.values.alpha:(this.setValues("alpha",e),this)},red:function(e){return this.setChannel("rgb",0,e)},green:function(e){return this.setChannel("rgb",1,e)},blue:function(e){return this.setChannel("rgb",2,e)},hue:function(e){return e&&(e=(e%=360)<0?360+e:e),this.setChannel("hsl",0,e)},saturation:function(e){return this.setChannel("hsl",1,e)},lightness:function(e){return this.setChannel("hsl",2,e)},saturationv:function(e){return this.setChannel("hsv",1,e)},whiteness:function(e){return this.setChannel("hwb",1,e)},blackness:function(e){return this.setChannel("hwb",2,e)},value:function(e){return this.setChannel("hsv",2,e)},cyan:function(e){return this.setChannel("cmyk",0,e)},magenta:function(e){return this.setChannel("cmyk",1,e)},yellow:function(e){return this.setChannel("cmyk",2,e)},black:function(e){return this.setChannel("cmyk",3,e)},hexString:function(){return ie.hexString(this.values.rgb)},rgbString:function(){return ie.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return ie.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return ie.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return ie.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return ie.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return ie.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return ie.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var e=this.values.rgb;return e[0]<<16|e[1]<<8|e[2]},luminosity:function(){for(var e=this.values.rgb,t=[],n=0;n<e.length;n++){var i=e[n]/255;t[n]=i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4)}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast:function(e){var t=this.luminosity(),n=e.luminosity();return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)},level:function(e){var t=this.contrast(e);return t>=7.1?"AAA":t>=4.5?"AA":""},dark:function(){var e=this.values.rgb;return(299*e[0]+587*e[1]+114*e[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var e=[],t=0;t<3;t++)e[t]=255-this.values.rgb[t];return this.setValues("rgb",e),this},lighten:function(e){var t=this.values.hsl;return t[2]+=t[2]*e,this.setValues("hsl",t),this},darken:function(e){var t=this.values.hsl;return t[2]-=t[2]*e,this.setValues("hsl",t),this},saturate:function(e){var t=this.values.hsl;return t[1]+=t[1]*e,this.setValues("hsl",t),this},desaturate:function(e){var t=this.values.hsl;return t[1]-=t[1]*e,this.setValues("hsl",t),this},whiten:function(e){var t=this.values.hwb;return t[1]+=t[1]*e,this.setValues("hwb",t),this},blacken:function(e){var t=this.values.hwb;return t[2]+=t[2]*e,this.setValues("hwb",t),this},greyscale:function(){var e=this.values.rgb,t=.3*e[0]+.59*e[1]+.11*e[2];return this.setValues("rgb",[t,t,t]),this},clearer:function(e){var t=this.values.alpha;return this.setValues("alpha",t-t*e),this},opaquer:function(e){var t=this.values.alpha;return this.setValues("alpha",t+t*e),this},rotate:function(e){var t=this.values.hsl,n=(t[0]+e)%360;return t[0]=n<0?360+n:n,this.setValues("hsl",t),this},mix:function(e,t){var n=e,i=t===void 0?.5:t,a=2*i-1,r=this.alpha()-n.alpha(),o=((a*r==-1?a:(a+r)/(1+a*r))+1)/2,s=1-o;return this.rgb(o*this.red()+s*n.red(),o*this.green()+s*n.green(),o*this.blue()+s*n.blue()).alpha(this.alpha()*i+n.alpha()*(1-i))},toJSON:function(){return this.rgb()},clone:function(){var e,t,n=new Z,i=this.values,a=n.values;for(var r in i)i.hasOwnProperty(r)&&(e=i[r],(t={}.toString.call(e))==="[object Array]"?a[r]=e.slice(0):t==="[object Number]"?a[r]=e:console.error("unexpected color value:",e));return n}},Z.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},Z.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},Z.prototype.getValues=function(e){for(var t=this.values,n={},i=0;i<e.length;i++)n[e.charAt(i)]=t[e][i];return t.alpha!==1&&(n.a=t.alpha),n},Z.prototype.setValues=function(e,t){var n,i,a=this.values,r=this.spaces,o=this.maxes,s=1;if(this.valid=!0,e==="alpha")s=t;else if(t.length)a[e]=t.slice(0,e.length),s=t[e.length];else if(t[e.charAt(0)]!==void 0){for(n=0;n<e.length;n++)a[e][n]=t[e.charAt(n)];s=t.a}else if(t[r[e][0]]!==void 0){var l=r[e];for(n=0;n<e.length;n++)a[e][n]=t[l[n]];s=t.alpha}if(a.alpha=Math.max(0,Math.min(1,s===void 0?a.alpha:s)),e==="alpha")return!1;for(n=0;n<e.length;n++)i=Math.max(0,Math.min(o[e][n],a[e][n])),a[e][n]=Math.round(i);for(var u in r)u!==e&&(a[u]=oi[e][u](a[e]));return!0},Z.prototype.setSpace=function(e,t){var n=t[0];return n===void 0?this.getValues(e):(typeof n=="number"&&(n=Array.prototype.slice.call(t)),this.setValues(e,n),this)},Z.prototype.setChannel=function(e,t,n){var i=this.values[e];return n===void 0?i[t]:n===i[t]?this:(i[t]=n,this.setValues(e,i),this)},typeof window!="undefined"&&(window.Color=Z);var Ke=Z;function en(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}var tn,F={noop:function(){},uid:(tn=0,function(){return tn++}),isNullOrUndef:function(e){return e==null},isArray:function(e){if(Array.isArray&&Array.isArray(e))return!0;var t=Object.prototype.toString.call(e);return t.substr(0,7)==="[object"&&t.substr(-6)==="Array]"},isObject:function(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"},isFinite:function(e){return(typeof e=="number"||e instanceof Number)&&isFinite(e)},valueOrDefault:function(e,t){return e===void 0?t:e},valueAtIndexOrDefault:function(e,t,n){return F.valueOrDefault(F.isArray(e)?e[t]:e,n)},callback:function(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)},each:function(e,t,n,i){var a,r,o;if(F.isArray(e))if(r=e.length,i)for(a=r-1;a>=0;a--)t.call(n,e[a],a);else for(a=0;a<r;a++)t.call(n,e[a],a);else if(F.isObject(e))for(r=(o=Object.keys(e)).length,a=0;a<r;a++)t.call(n,e[o[a]],o[a])},arrayEquals:function(e,t){var n,i,a,r;if(!e||!t||e.length!==t.length)return!1;for(n=0,i=e.length;n<i;++n)if(a=e[n],r=t[n],a instanceof Array&&r instanceof Array){if(!F.arrayEquals(a,r))return!1}else if(a!==r)return!1;return!0},clone:function(e){if(F.isArray(e))return e.map(F.clone);if(F.isObject(e)){for(var t=Object.create(e),n=Object.keys(e),i=n.length,a=0;a<i;++a)t[n[a]]=F.clone(e[n[a]]);return t}return e},_merger:function(e,t,n,i){if(en(e)){var a=t[e],r=n[e];F.isObject(a)&&F.isObject(r)?F.merge(a,r,i):t[e]=F.clone(r)}},_mergerIf:function(e,t,n){if(en(e)){var i=t[e],a=n[e];F.isObject(i)&&F.isObject(a)?F.mergeIf(i,a):t.hasOwnProperty(e)||(t[e]=F.clone(a))}},merge:function(e,t,n){var i,a,r,o,s,l=F.isArray(t)?t:[t],u=l.length;if(!F.isObject(e))return e;for(i=(n=n||{}).merger||F._merger,a=0;a<u;++a)if(t=l[a],F.isObject(t))for(s=0,o=(r=Object.keys(t)).length;s<o;++s)i(r[s],e,t,n);return e},mergeIf:function(e,t){return F.merge(e,t,{merger:F._mergerIf})},extend:Object.assign||function(e){return F.merge(e,[].slice.call(arguments,1),{merger:function(t,n,i){n[t]=i[t]}})},inherits:function(e){var t=this,n=e&&e.hasOwnProperty("constructor")?e.constructor:function(){return t.apply(this,arguments)},i=function(){this.constructor=n};return i.prototype=t.prototype,n.prototype=new i,n.extend=F.inherits,e&&F.extend(n.prototype,e),n.__super__=t.prototype,n},_deprecated:function(e,t,n,i){t!==void 0&&console.warn(e+': "'+n+'" is deprecated. Please use "'+i+'" instead')}},J=F;F.callCallback=F.callback,F.indexOf=function(e,t,n){return Array.prototype.indexOf.call(e,t,n)},F.getValueOrDefault=F.valueOrDefault,F.getValueAtIndexOrDefault=F.valueAtIndexOrDefault;var ze={linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return-e*(e-2)},easeInOutQuad:function(e){return(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1)},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return(e-=1)*e*e+1},easeInOutCubic:function(e){return(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return-((e-=1)*e*e*e-1)},easeInOutQuart:function(e){return(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},easeInQuint:function(e){return e*e*e*e*e},easeOutQuint:function(e){return(e-=1)*e*e*e*e+1},easeInOutQuint:function(e){return(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},easeInSine:function(e){return 1-Math.cos(e*(Math.PI/2))},easeOutSine:function(e){return Math.sin(e*(Math.PI/2))},easeInOutSine:function(e){return-.5*(Math.cos(Math.PI*e)-1)},easeInExpo:function(e){return e===0?0:Math.pow(2,10*(e-1))},easeOutExpo:function(e){return e===1?1:1-Math.pow(2,-10*e)},easeInOutExpo:function(e){return e===0?0:e===1?1:(e/=.5)<1?.5*Math.pow(2,10*(e-1)):.5*(2-Math.pow(2,-10*--e))},easeInCirc:function(e){return e>=1?e:-(Math.sqrt(1-e*e)-1)},easeOutCirc:function(e){return Math.sqrt(1-(e-=1)*e)},easeInOutCirc:function(e){return(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},easeInElastic:function(e){var t=1.70158,n=0,i=1;return e===0?0:e===1?1:(n||(n=.3),t=n/(2*Math.PI)*Math.asin(1/i),-i*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n))},easeOutElastic:function(e){var t=1.70158,n=0,i=1;return e===0?0:e===1?1:(n||(n=.3),t=n/(2*Math.PI)*Math.asin(1/i),i*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/n)+1)},easeInOutElastic:function(e){var t=1.70158,n=0,i=1;return e===0?0:(e/=.5)==2?1:(n||(n=.45),t=n/(2*Math.PI)*Math.asin(1/i),e<1?i*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)*-.5:i*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)*.5+1)},easeInBack:function(e){var t=1.70158;return e*e*((t+1)*e-t)},easeOutBack:function(e){var t=1.70158;return(e-=1)*e*((t+1)*e+t)+1},easeInOutBack:function(e){var t=1.70158;return(e/=.5)<1?e*e*((1+(t*=1.525))*e-t)*.5:.5*((e-=2)*e*((1+(t*=1.525))*e+t)+2)},easeInBounce:function(e){return 1-ze.easeOutBounce(1-e)},easeOutBounce:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:function(e){return e<.5?.5*ze.easeInBounce(2*e):.5*ze.easeOutBounce(2*e-1)+.5}},si={effects:ze};J.easingEffects=ze;var U=Math.PI,li=U/180,ui=2*U,Q=U/2,Ne=U/4,nn=2*U/3,$e={clear:function(e){e.ctx.clearRect(0,0,e.width,e.height)},roundedRect:function(e,t,n,i,a,r){if(r){var o=Math.min(r,a/2,i/2),s=t+o,l=n+o,u=t+i-o,d=n+a-o;e.moveTo(t,l),s<u&&l<d?(e.arc(s,l,o,-U,-Q),e.arc(u,l,o,-Q,0),e.arc(u,d,o,0,Q),e.arc(s,d,o,Q,U)):s<u?(e.moveTo(s,n),e.arc(u,l,o,-Q,Q),e.arc(s,l,o,Q,U+Q)):l<d?(e.arc(s,l,o,-U,0),e.arc(s,d,o,0,U)):e.arc(s,l,o,-U,U),e.closePath(),e.moveTo(t,n)}else e.rect(t,n,i,a)},drawPoint:function(e,t,n,i,a,r){var o,s,l,u,d,h=(r||0)*li;if(t&&typeof t=="object"&&((o=t.toString())==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]"))return e.save(),e.translate(i,a),e.rotate(h),e.drawImage(t,-t.width/2,-t.height/2,t.width,t.height),void e.restore();if(!(isNaN(n)||n<=0)){switch(e.beginPath(),t){default:e.arc(i,a,n,0,ui),e.closePath();break;case"triangle":e.moveTo(i+Math.sin(h)*n,a-Math.cos(h)*n),h+=nn,e.lineTo(i+Math.sin(h)*n,a-Math.cos(h)*n),h+=nn,e.lineTo(i+Math.sin(h)*n,a-Math.cos(h)*n),e.closePath();break;case"rectRounded":u=n-(d=.516*n),s=Math.cos(h+Ne)*u,l=Math.sin(h+Ne)*u,e.arc(i-s,a-l,d,h-U,h-Q),e.arc(i+l,a-s,d,h-Q,h),e.arc(i+s,a+l,d,h,h+Q),e.arc(i-l,a+s,d,h+Q,h+U),e.closePath();break;case"rect":if(!r){u=Math.SQRT1_2*n,e.rect(i-u,a-u,2*u,2*u);break}h+=Ne;case"rectRot":s=Math.cos(h)*n,l=Math.sin(h)*n,e.moveTo(i-s,a-l),e.lineTo(i+l,a-s),e.lineTo(i+s,a+l),e.lineTo(i-l,a+s),e.closePath();break;case"crossRot":h+=Ne;case"cross":s=Math.cos(h)*n,l=Math.sin(h)*n,e.moveTo(i-s,a-l),e.lineTo(i+s,a+l),e.moveTo(i+l,a-s),e.lineTo(i-l,a+s);break;case"star":s=Math.cos(h)*n,l=Math.sin(h)*n,e.moveTo(i-s,a-l),e.lineTo(i+s,a+l),e.moveTo(i+l,a-s),e.lineTo(i-l,a+s),h+=Ne,s=Math.cos(h)*n,l=Math.sin(h)*n,e.moveTo(i-s,a-l),e.lineTo(i+s,a+l),e.moveTo(i+l,a-s),e.lineTo(i-l,a+s);break;case"line":s=Math.cos(h)*n,l=Math.sin(h)*n,e.moveTo(i-s,a-l),e.lineTo(i+s,a+l);break;case"dash":e.moveTo(i,a),e.lineTo(i+Math.cos(h)*n,a+Math.sin(h)*n)}e.fill(),e.stroke()}},_isPointInArea:function(e,t){return e.x>t.left-1e-6&&e.x<t.right+1e-6&&e.y>t.top-1e-6&&e.y<t.bottom+1e-6},clipArea:function(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()},unclipArea:function(e){e.restore()},lineTo:function(e,t,n,i){var a=n.steppedLine;if(a){if(a==="middle"){var r=(t.x+n.x)/2;e.lineTo(r,i?n.y:t.y),e.lineTo(r,i?t.y:n.y)}else a==="after"&&!i||a!=="after"&&i?e.lineTo(t.x,n.y):e.lineTo(n.x,t.y);e.lineTo(n.x,n.y)}else n.tension?e.bezierCurveTo(i?t.controlPointPreviousX:t.controlPointNextX,i?t.controlPointPreviousY:t.controlPointNextY,i?n.controlPointNextX:n.controlPointPreviousX,i?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):e.lineTo(n.x,n.y)}},di=$e;J.clear=$e.clear,J.drawRoundedRectangle=function(e){e.beginPath(),$e.roundedRect.apply($e,arguments)};var an={_set:function(e,t){return J.merge(this[e]||(this[e]={}),t)}};an._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 S=an,Ze=J.valueOrDefault,hi={toLineHeight:function(e,t){var n=(""+e).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);if(!n||n[1]==="normal")return 1.2*t;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100}return t*e},toPadding:function(e){var t,n,i,a;return J.isObject(e)?(t=+e.top||0,n=+e.right||0,i=+e.bottom||0,a=+e.left||0):t=n=i=a=+e||0,{top:t,right:n,bottom:i,left:a,height:t+i,width:a+n}},_parseFont:function(e){var t=S.global,n=Ze(e.fontSize,t.defaultFontSize),i={family:Ze(e.fontFamily,t.defaultFontFamily),lineHeight:J.options.toLineHeight(Ze(e.lineHeight,t.defaultLineHeight),n),size:n,style:Ze(e.fontStyle,t.defaultFontStyle),weight:null,string:""};return i.string=function(a){return!a||J.isNullOrUndef(a.size)||J.isNullOrUndef(a.family)?null:(a.style?a.style+" ":"")+(a.weight?a.weight+" ":"")+a.size+"px "+a.family}(i),i},resolve:function(e,t,n,i){var a,r,o,s=!0;for(a=0,r=e.length;a<r;++a)if((o=e[a])!==void 0&&(t!==void 0&&typeof o=="function"&&(o=o(t),s=!1),n!==void 0&&J.isArray(o)&&(o=o[n],s=!1),o!==void 0))return i&&!s&&(i.cacheable=!1),o}},rn={_factorize:function(e){var t,n=[],i=Math.sqrt(e);for(t=1;t<i;t++)e%t==0&&(n.push(t),n.push(e/t));return i===(0|i)&&n.push(i),n.sort(function(a,r){return a-r}).pop(),n},log10:Math.log10||function(e){var t=Math.log(e)*Math.LOG10E,n=Math.round(t);return e===Math.pow(10,n)?n:t}},ci=rn;J.log10=rn.log10;var c=J,fi=si,gi=di,pi=hi,mi=ci,vi={getRtlAdapter:function(e,t,n){return e?function(i,a){return{x:function(r){return i+i+a-r},setWidth:function(r){a=r},textAlign:function(r){return r==="center"?r:r==="right"?"left":"right"},xPlus:function(r,o){return r-o},leftForLtr:function(r,o){return r-o}}}(t,n):{x:function(i){return i},setWidth:function(i){},textAlign:function(i){return i},xPlus:function(i,a){return i+a},leftForLtr:function(i,a){return i}}},overrideTextDirection:function(e,t){var n,i;t!=="ltr"&&t!=="rtl"||(i=[(n=e.canvas.style).getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=i)},restoreTextDirection:function(e){var t=e.prevTextDirection;t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}};c.easing=fi,c.canvas=gi,c.options=pi,c.math=mi,c.rtl=vi;var ft=function(e){c.extend(this,e),this.initialize.apply(this,arguments)};c.extend(ft.prototype,{_type:void 0,initialize:function(){this.hidden=!1},pivot:function(){var e=this;return e._view||(e._view=c.extend({},e._model)),e._start={},e},transition:function(e){var t=this,n=t._model,i=t._start,a=t._view;return n&&e!==1?(a||(a=t._view={}),i||(i=t._start={}),function(r,o,s,l){var u,d,h,f,g,p,m,v,x,b=Object.keys(s);for(u=0,d=b.length;u<d;++u)if(p=s[h=b[u]],o.hasOwnProperty(h)||(o[h]=p),(f=o[h])!==p&&h[0]!=="_"){if(r.hasOwnProperty(h)||(r[h]=f),(m=typeof p)===typeof(g=r[h])){if(m==="string"){if((v=Ke(g)).valid&&(x=Ke(p)).valid){o[h]=x.mix(v,l).rgbString();continue}}else if(c.isFinite(g)&&c.isFinite(p)){o[h]=g+(p-g)*l;continue}}o[h]=p}}(i,a,n,e),t):(t._view=c.extend({},n),t._start=null,t)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return c.isNumber(this._model.x)&&c.isNumber(this._model.y)}}),ft.extend=c.inherits;var re=ft,gt=re.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),pt=gt;Object.defineProperty(gt.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(gt.prototype,"chartInstance",{get:function(){return this.chart},set:function(e){this.chart=e}}),S._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:c.noop,onComplete:c.noop}});var mt={animations:[],request:null,addAnimation:function(e,t,n,i){var a,r,o=this.animations;for(t.chart=e,t.startTime=Date.now(),t.duration=n,i||(e.animating=!0),a=0,r=o.length;a<r;++a)if(o[a].chart===e)return void(o[a]=t);o.push(t),o.length===1&&this.requestAnimationFrame()},cancelAnimation:function(e){var t=c.findIndex(this.animations,function(n){return n.chart===e});t!==-1&&(this.animations.splice(t,1),e.animating=!1)},requestAnimationFrame:function(){var e=this;e.request===null&&(e.request=c.requestAnimFrame.call(window,function(){e.request=null,e.startDigest()}))},startDigest:function(){this.advance(),this.animations.length>0&&this.requestAnimationFrame()},advance:function(){for(var e,t,n,i,a=this.animations,r=0;r<a.length;)t=(e=a[r]).chart,n=e.numSteps,i=Math.floor((Date.now()-e.startTime)/e.duration*n)+1,e.currentStep=Math.min(i,n),c.callback(e.render,[t,e],t),c.callback(e.onAnimationProgress,[e],t),e.currentStep>=n?(c.callback(e.onAnimationComplete,[e],t),t.animating=!1,a.splice(r,1)):++r}},De=c.options.resolve,on=["push","pop","shift","splice","unshift"];function sn(e,t){var n=e._chartjs;if(n){var i=n.listeners,a=i.indexOf(t);a!==-1&&i.splice(a,1),i.length>0||(on.forEach(function(r){delete e[r]}),delete e._chartjs)}}var vt=function(e,t){this.initialize(e,t)};c.extend(vt.prototype,{datasetElementType:null,dataElementType:null,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth"],_dataElementOptions:["backgroundColor","borderColor","borderWidth","pointStyle"],initialize:function(e,t){var n=this;n.chart=e,n.index=t,n.linkScales(),n.addElements(),n._type=n.getMeta().type},updateIndex:function(e){this.index=e},linkScales:function(){var e=this.getMeta(),t=this.chart,n=t.scales,i=this.getDataset(),a=t.options.scales;e.xAxisID!==null&&e.xAxisID in n&&!i.xAxisID||(e.xAxisID=i.xAxisID||a.xAxes[0].id),e.yAxisID!==null&&e.yAxisID in n&&!i.yAxisID||(e.yAxisID=i.yAxisID||a.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(e){return this.chart.scales[e]},_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&&sn(this._data,this)},createMetaDataset:function(){var e=this.datasetElementType;return e&&new e({_chart:this.chart,_datasetIndex:this.index})},createMetaData:function(e){var t=this.dataElementType;return t&&new t({_chart:this.chart,_datasetIndex:this.index,_index:e})},addElements:function(){var e,t,n=this.getMeta(),i=this.getDataset().data||[],a=n.data;for(e=0,t=i.length;e<t;++e)a[e]=a[e]||this.createMetaData(e);n.dataset=n.dataset||this.createMetaDataset()},addElementAndReset:function(e){var t=this.createMetaData(e);this.getMeta().data.splice(e,0,t),this.updateElement(t,e,!0)},buildOrUpdateElements:function(){var e,t,n=this,i=n.getDataset(),a=i.data||(i.data=[]);n._data!==a&&(n._data&&sn(n._data,n),a&&Object.isExtensible(a)&&(t=n,(e=a)._chartjs?e._chartjs.listeners.push(t):(Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),on.forEach(function(r){var o="onData"+r.charAt(0).toUpperCase()+r.slice(1),s=e[r];Object.defineProperty(e,r,{configurable:!0,enumerable:!1,value:function(){var l=Array.prototype.slice.call(arguments),u=s.apply(this,l);return c.each(e._chartjs.listeners,function(d){typeof d[o]=="function"&&d[o].apply(d,l)}),u}})}))),n._data=a),n.resyncElements()},_configure:function(){this._config=c.merge(Object.create(null),[this.chart.options.datasets[this._type],this.getDataset()],{merger:function(e,t,n){e!=="_meta"&&e!=="data"&&c._merger(e,t,n)}})},_update:function(e){this._configure(),this._cachedDataOpts=null,this.update(e)},update:c.noop,transition:function(e){for(var t=this.getMeta(),n=t.data||[],i=n.length,a=0;a<i;++a)n[a].transition(e);t.dataset&&t.dataset.transition(e)},draw:function(){var e=this.getMeta(),t=e.data||[],n=t.length,i=0;for(e.dataset&&e.dataset.draw();i<n;++i)t[i].draw()},getStyle:function(e){var t,n=this.getMeta(),i=n.dataset;return this._configure(),i&&e===void 0?t=this._resolveDatasetElementOptions(i||{}):(e=e||0,t=this._resolveDataElementOptions(n.data[e]||{},e)),t.fill!==!1&&t.fill!==null||(t.backgroundColor=t.borderColor),t},_resolveDatasetElementOptions:function(e,t){var n,i,a,r,o=this,s=o.chart,l=o._config,u=e.custom||{},d=s.options.elements[o.datasetElementType.prototype._type]||{},h=o._datasetElementOptions,f={},g={chart:s,dataset:o.getDataset(),datasetIndex:o.index,hover:t};for(n=0,i=h.length;n<i;++n)a=h[n],r=t?"hover"+a.charAt(0).toUpperCase()+a.slice(1):a,f[a]=De([u[r],l[r],d[r]],g);return f},_resolveDataElementOptions:function(e,t){var n=this,i=e&&e.custom,a=n._cachedDataOpts;if(a&&!i)return a;var r,o,s,l,u=n.chart,d=n._config,h=u.options.elements[n.dataElementType.prototype._type]||{},f=n._dataElementOptions,g={},p={chart:u,dataIndex:t,dataset:n.getDataset(),datasetIndex:n.index},m={cacheable:!i};if(i=i||{},c.isArray(f))for(o=0,s=f.length;o<s;++o)g[l=f[o]]=De([i[l],d[l],h[l]],p,t,m);else for(o=0,s=(r=Object.keys(f)).length;o<s;++o)g[l=r[o]]=De([i[l],d[f[l]],d[l],h[l]],p,t,m);return m.cacheable&&(n._cachedDataOpts=Object.freeze(g)),g},removeHoverStyle:function(e){c.merge(e._model,e.$previousStyle||{}),delete e.$previousStyle},setHoverStyle:function(e){var t=this.chart.data.datasets[e._datasetIndex],n=e._index,i=e.custom||{},a=e._model,r=c.getHoverColor;e.$previousStyle={backgroundColor:a.backgroundColor,borderColor:a.borderColor,borderWidth:a.borderWidth},a.backgroundColor=De([i.hoverBackgroundColor,t.hoverBackgroundColor,r(a.backgroundColor)],void 0,n),a.borderColor=De([i.hoverBorderColor,t.hoverBorderColor,r(a.borderColor)],void 0,n),a.borderWidth=De([i.hoverBorderWidth,t.hoverBorderWidth,a.borderWidth],void 0,n)},_removeDatasetHoverStyle:function(){var e=this.getMeta().dataset;e&&this.removeHoverStyle(e)},_setDatasetHoverStyle:function(){var e,t,n,i,a,r,o=this.getMeta().dataset,s={};if(o){for(r=o._model,a=this._resolveDatasetElementOptions(o,!0),e=0,t=(i=Object.keys(a)).length;e<t;++e)s[n=i[e]]=r[n],r[n]=a[n];o.$previousStyle=s}},resyncElements:function(){var e=this.getMeta(),t=this.getDataset().data,n=e.data.length,i=t.length;i<n?e.data.splice(i,n-i):i>n&&this.insertElements(n,i-n)},insertElements:function(e,t){for(var n=0;n<t;++n)this.addElementAndReset(e+n)},onDataPush:function(){var e=arguments.length;this.insertElements(this.getDataset().data.length-e,e)},onDataPop:function(){this.getMeta().data.pop()},onDataShift:function(){this.getMeta().data.shift()},onDataSplice:function(e,t){this.getMeta().data.splice(e,t),this.insertElements(e,arguments.length-2)},onDataUnshift:function(){this.insertElements(0,arguments.length)}}),vt.extend=c.inherits;var ee=vt,oe=2*Math.PI;function ln(e,t){var n=t.startAngle,i=t.endAngle,a=t.pixelMargin,r=a/t.outerRadius,o=t.x,s=t.y;e.beginPath(),e.arc(o,s,t.outerRadius,n-r,i+r),t.innerRadius>a?(r=a/t.innerRadius,e.arc(o,s,t.innerRadius-a,i+r,n-r,!0)):e.arc(o,s,a,i+Math.PI/2,n-Math.PI/2),e.closePath(),e.clip()}function bi(e,t,n){var i=t.borderAlign==="inner";i?(e.lineWidth=2*t.borderWidth,e.lineJoin="round"):(e.lineWidth=t.borderWidth,e.lineJoin="bevel"),n.fullCircles&&function(a,r,o,s){var l,u=o.endAngle;for(s&&(o.endAngle=o.startAngle+oe,ln(a,o),o.endAngle=u,o.endAngle===o.startAngle&&o.fullCircles&&(o.endAngle+=oe,o.fullCircles--)),a.beginPath(),a.arc(o.x,o.y,o.innerRadius,o.startAngle+oe,o.startAngle,!0),l=0;l<o.fullCircles;++l)a.stroke();for(a.beginPath(),a.arc(o.x,o.y,r.outerRadius,o.startAngle,o.startAngle+oe),l=0;l<o.fullCircles;++l)a.stroke()}(e,t,n,i),i&&ln(e,n),e.beginPath(),e.arc(n.x,n.y,t.outerRadius,n.startAngle,n.endAngle),e.arc(n.x,n.y,n.innerRadius,n.endAngle,n.startAngle,!0),e.closePath(),e.stroke()}S._set("global",{elements:{arc:{backgroundColor:S.global.defaultColor,borderColor:"#fff",borderWidth:2,borderAlign:"center"}}});var xi=re.extend({_type:"arc",inLabelRange:function(e){var t=this._view;return!!t&&Math.pow(e-t.x,2)<Math.pow(t.radius+t.hoverRadius,2)},inRange:function(e,t){var n=this._view;if(n){for(var i=c.getAngleFromPoint(n,{x:e,y:t}),a=i.angle,r=i.distance,o=n.startAngle,s=n.endAngle;s<o;)s+=oe;for(;a>s;)a-=oe;for(;a<o;)a+=oe;var l=a>=o&&a<=s,u=r>=n.innerRadius&&r<=n.outerRadius;return l&&u}return!1},getCenterPoint:function(){var e=this._view,t=(e.startAngle+e.endAngle)/2,n=(e.innerRadius+e.outerRadius)/2;return{x:e.x+Math.cos(t)*n,y:e.y+Math.sin(t)*n}},getArea:function(){var e=this._view;return Math.PI*((e.endAngle-e.startAngle)/(2*Math.PI))*(Math.pow(e.outerRadius,2)-Math.pow(e.innerRadius,2))},tooltipPosition:function(){var e=this._view,t=e.startAngle+(e.endAngle-e.startAngle)/2,n=(e.outerRadius-e.innerRadius)/2+e.innerRadius;return{x:e.x+Math.cos(t)*n,y:e.y+Math.sin(t)*n}},draw:function(){var e,t=this._chart.ctx,n=this._view,i=n.borderAlign==="inner"?.33:0,a={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/oe)};if(t.save(),t.fillStyle=n.backgroundColor,t.strokeStyle=n.borderColor,a.fullCircles){for(a.endAngle=a.startAngle+oe,t.beginPath(),t.arc(a.x,a.y,a.outerRadius,a.startAngle,a.endAngle),t.arc(a.x,a.y,a.innerRadius,a.endAngle,a.startAngle,!0),t.closePath(),e=0;e<a.fullCircles;++e)t.fill();a.endAngle=a.startAngle+n.circumference%oe}t.beginPath(),t.arc(a.x,a.y,a.outerRadius,a.startAngle,a.endAngle),t.arc(a.x,a.y,a.innerRadius,a.endAngle,a.startAngle,!0),t.closePath(),t.fill(),n.borderWidth&&bi(t,n,a),t.restore()}}),un=c.valueOrDefault,dn=S.global.defaultColor;S._set("global",{elements:{line:{tension:.4,backgroundColor:dn,borderWidth:3,borderColor:dn,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}});var yi=re.extend({_type:"line",draw:function(){var e,t,n,i=this,a=i._view,r=i._chart.ctx,o=a.spanGaps,s=i._children.slice(),l=S.global,u=l.elements.line,d=-1,h=i._loop;if(s.length){if(i._loop){for(e=0;e<s.length;++e)if(t=c.previousItem(s,e),!s[e]._view.skip&&t._view.skip){s=s.slice(e).concat(s.slice(0,e)),h=o;break}h&&s.push(s[0])}for(r.save(),r.lineCap=a.borderCapStyle||u.borderCapStyle,r.setLineDash&&r.setLineDash(a.borderDash||u.borderDash),r.lineDashOffset=un(a.borderDashOffset,u.borderDashOffset),r.lineJoin=a.borderJoinStyle||u.borderJoinStyle,r.lineWidth=un(a.borderWidth,u.borderWidth),r.strokeStyle=a.borderColor||l.defaultColor,r.beginPath(),(n=s[0]._view).skip||(r.moveTo(n.x,n.y),d=0),e=1;e<s.length;++e)n=s[e]._view,t=d===-1?c.previousItem(s,e):s[d],n.skip||(d!==e-1&&!o||d===-1?r.moveTo(n.x,n.y):c.canvas.lineTo(r,t._view,n),d=e);h&&r.closePath(),r.stroke(),r.restore()}}}),_i=c.valueOrDefault,hn=S.global.defaultColor;function cn(e){var t=this._view;return!!t&&Math.abs(e-t.x)<t.radius+t.hitRadius}S._set("global",{elements:{point:{radius:3,pointStyle:"circle",backgroundColor:hn,borderColor:hn,borderWidth:1,hitRadius:1,hoverRadius:4,hoverBorderWidth:1}}});var ki=re.extend({_type:"point",inRange:function(e,t){var n=this._view;return!!n&&Math.pow(e-n.x,2)+Math.pow(t-n.y,2)<Math.pow(n.hitRadius+n.radius,2)},inLabelRange:cn,inXRange:cn,inYRange:function(e){var t=this._view;return!!t&&Math.abs(e-t.y)<t.radius+t.hitRadius},getCenterPoint:function(){var e=this._view;return{x:e.x,y:e.y}},getArea:function(){return Math.PI*Math.pow(this._view.radius,2)},tooltipPosition:function(){var e=this._view;return{x:e.x,y:e.y,padding:e.radius+e.borderWidth}},draw:function(e){var t=this._view,n=this._chart.ctx,i=t.pointStyle,a=t.rotation,r=t.radius,o=t.x,s=t.y,l=S.global,u=l.defaultColor;t.skip||(e===void 0||c.canvas._isPointInArea(t,e))&&(n.strokeStyle=t.borderColor||u,n.lineWidth=_i(t.borderWidth,l.elements.point.borderWidth),n.fillStyle=t.backgroundColor||u,c.canvas.drawPoint(n,i,r,o,s,a))}}),fn=S.global.defaultColor;function Je(e){return e&&e.width!==void 0}function gn(e){var t,n,i,a,r;return Je(e)?(r=e.width/2,t=e.x-r,n=e.x+r,i=Math.min(e.y,e.base),a=Math.max(e.y,e.base)):(r=e.height/2,t=Math.min(e.x,e.base),n=Math.max(e.x,e.base),i=e.y-r,a=e.y+r),{left:t,top:i,right:n,bottom:a}}function pn(e,t,n){return e===t?n:e===n?t:e}function wi(e,t,n){var i,a,r,o,s=e.borderWidth,l=function(u){var d=u.borderSkipped,h={};return d&&(u.horizontal?u.base>u.x&&(d=pn(d,"left","right")):u.base<u.y&&(d=pn(d,"bottom","top")),h[d]=!0),h}(e);return c.isObject(s)?(i=+s.top||0,a=+s.right||0,r=+s.bottom||0,o=+s.left||0):i=a=r=o=+s||0,{t:l.top||i<0?0:i>n?n:i,r:l.right||a<0?0:a>t?t:a,b:l.bottom||r<0?0:r>n?n:r,l:l.left||o<0?0:o>t?t:o}}function Be(e,t,n){var i=t===null,a=n===null,r=!(!e||i&&a)&&gn(e);return r&&(i||t>=r.left&&t<=r.right)&&(a||n>=r.top&&n<=r.bottom)}S._set("global",{elements:{rectangle:{backgroundColor:fn,borderColor:fn,borderSkipped:"bottom",borderWidth:0}}});var Mi=re.extend({_type:"rectangle",draw:function(){var e=this._chart.ctx,t=this._view,n=function(r){var o=gn(r),s=o.right-o.left,l=o.bottom-o.top,u=wi(r,s/2,l/2);return{outer:{x:o.left,y:o.top,w:s,h:l},inner:{x:o.left+u.l,y:o.top+u.t,w:s-u.l-u.r,h:l-u.t-u.b}}}(t),i=n.outer,a=n.inner;e.fillStyle=t.backgroundColor,e.fillRect(i.x,i.y,i.w,i.h),i.w===a.w&&i.h===a.h||(e.save(),e.beginPath(),e.rect(i.x,i.y,i.w,i.h),e.clip(),e.fillStyle=t.borderColor,e.rect(a.x,a.y,a.w,a.h),e.fill("evenodd"),e.restore())},height:function(){var e=this._view;return e.base-e.y},inRange:function(e,t){return Be(this._view,e,t)},inLabelRange:function(e,t){var n=this._view;return Je(n)?Be(n,e,null):Be(n,null,t)},inXRange:function(e){return Be(this._view,e,null)},inYRange:function(e){return Be(this._view,null,e)},getCenterPoint:function(){var e,t,n=this._view;return Je(n)?(e=n.x,t=(n.y+n.base)/2):(e=(n.x+n.base)/2,t=n.y),{x:e,y:t}},getArea:function(){var e=this._view;return Je(e)?e.width*Math.abs(e.y-e.base):e.height*Math.abs(e.x-e.base)},tooltipPosition:function(){var e=this._view;return{x:e.x,y:e.y}}}),Y={},Si=xi,Ci=yi,Pi=ki,Ai=Mi;Y.Arc=Si,Y.Line=Ci,Y.Point=Pi,Y.Rectangle=Ai;var Ee=c._deprecated,Te=c.valueOrDefault;function Di(e,t,n){var i,a,r=n.barThickness,o=t.stackCount,s=t.pixels[e],l=c.isNullOrUndef(r)?function(u,d){var h,f,g,p,m=u._length;for(g=1,p=d.length;g<p;++g)m=Math.min(m,Math.abs(d[g]-d[g-1]));for(g=0,p=u.getTicks().length;g<p;++g)f=u.getPixelForTick(g),m=g>0?Math.min(m,Math.abs(f-h)):m,h=f;return m}(t.scale,t.pixels):-1;return c.isNullOrUndef(r)?(i=l*n.categoryPercentage,a=n.barPercentage):(i=r*o,a=1),{chunk:i/o,ratio:a,start:s-i/2}}S._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),S._set("global",{datasets:{bar:{categoryPercentage:.8,barPercentage:.9}}});var mn=ee.extend({dataElementType:Y.Rectangle,_dataElementOptions:["backgroundColor","borderColor","borderSkipped","borderWidth","barPercentage","barThickness","categoryPercentage","maxBarThickness","minBarLength"],initialize:function(){var e,t,n=this;ee.prototype.initialize.apply(n,arguments),(e=n.getMeta()).stack=n.getDataset().stack,e.bar=!0,t=n._getIndexScale().options,Ee("bar chart",t.barPercentage,"scales.[x/y]Axes.barPercentage","dataset.barPercentage"),Ee("bar chart",t.barThickness,"scales.[x/y]Axes.barThickness","dataset.barThickness"),Ee("bar chart",t.categoryPercentage,"scales.[x/y]Axes.categoryPercentage","dataset.categoryPercentage"),Ee("bar chart",n._getValueScale().options.minBarLength,"scales.[x/y]Axes.minBarLength","dataset.minBarLength"),Ee("bar chart",t.maxBarThickness,"scales.[x/y]Axes.maxBarThickness","dataset.maxBarThickness")},update:function(e){var t,n,i=this.getMeta().data;for(this._ruler=this.getRuler(),t=0,n=i.length;t<n;++t)this.updateElement(i[t],t,e)},updateElement:function(e,t,n){var i=this,a=i.getMeta(),r=i.getDataset(),o=i._resolveDataElementOptions(e,t);e._xScale=i.getScaleForId(a.xAxisID),e._yScale=i.getScaleForId(a.yAxisID),e._datasetIndex=i.index,e._index=t,e._model={backgroundColor:o.backgroundColor,borderColor:o.borderColor,borderSkipped:o.borderSkipped,borderWidth:o.borderWidth,datasetLabel:r.label,label:i.chart.data.labels[t]},c.isArray(r.data[t])&&(e._model.borderSkipped=null),i._updateElementGeometry(e,t,n,o),e.pivot()},_updateElementGeometry:function(e,t,n,i){var a=this,r=e._model,o=a._getValueScale(),s=o.getBasePixel(),l=o.isHorizontal(),u=a._ruler||a.getRuler(),d=a.calculateBarValuePixels(a.index,t,i),h=a.calculateBarIndexPixels(a.index,t,u,i);r.horizontal=l,r.base=n?s:d.base,r.x=l?n?s:d.head:h.center,r.y=l?h.center:n?s:d.head,r.height=l?h.size:void 0,r.width=l?void 0:h.size},_getStacks:function(e){var t,n,i=this._getIndexScale(),a=i._getMatchingVisibleMetas(this._type),r=i.options.stacked,o=a.length,s=[];for(t=0;t<o&&(n=a[t],(r===!1||s.indexOf(n.stack)===-1||r===void 0&&n.stack===void 0)&&s.push(n.stack),n.index!==e);++t);return s},getStackCount:function(){return this._getStacks().length},getStackIndex:function(e,t){var n=this._getStacks(e),i=t!==void 0?n.indexOf(t):-1;return i===-1?n.length-1:i},getRuler:function(){var e,t,n=this._getIndexScale(),i=[];for(e=0,t=this.getMeta().data.length;e<t;++e)i.push(n.getPixelForValue(null,e,this.index));return{pixels:i,start:n._startPixel,end:n._endPixel,stackCount:this.getStackCount(),scale:n}},calculateBarValuePixels:function(e,t,n){var i,a,r,o,s,l,u,d=this.chart,h=this._getValueScale(),f=h.isHorizontal(),g=d.data.datasets,p=h._getMatchingVisibleMetas(this._type),m=h._parseValue(g[e].data[t]),v=n.minBarLength,x=h.options.stacked,b=this.getMeta().stack,y=m.start===void 0?0:m.max>=0&&m.min>=0?m.min:m.max,_=m.start===void 0?m.end:m.max>=0&&m.min>=0?m.max-m.min:m.min-m.max,k=p.length;if(x||x===void 0&&b!==void 0)for(i=0;i<k&&(a=p[i]).index!==e;++i)a.stack===b&&(r=(u=h._parseValue(g[a.index].data[t])).start===void 0?u.end:u.min>=0&&u.max>=0?u.max:u.min,(m.min<0&&r<0||m.max>=0&&r>0)&&(y+=r));return o=h.getPixelForValue(y),l=(s=h.getPixelForValue(y+_))-o,v!==void 0&&Math.abs(l)<v&&(l=v,s=_>=0&&!f||_<0&&f?o-v:o+v),{size:l,base:o,head:s,center:s+l/2}},calculateBarIndexPixels:function(e,t,n,i){var a=i.barThickness==="flex"?function(l,u,d){var h,f=u.pixels,g=f[l],p=l>0?f[l-1]:null,m=l<f.length-1?f[l+1]:null,v=d.categoryPercentage;return p===null&&(p=g-(m===null?u.end-u.start:m-g)),m===null&&(m=g+g-p),h=g-(g-Math.min(p,m))/2*v,{chunk:Math.abs(m-p)/2*v/u.stackCount,ratio:d.barPercentage,start:h}}(t,n,i):Di(t,n,i),r=this.getStackIndex(e,this.getMeta().stack),o=a.start+a.chunk*r+a.chunk/2,s=Math.min(Te(i.maxBarThickness,1/0),a.chunk*a.ratio);return{base:o-s/2,head:o+s/2,center:o,size:s}},draw:function(){var e=this.chart,t=this._getValueScale(),n=this.getMeta().data,i=this.getDataset(),a=n.length,r=0;for(c.canvas.clipArea(e.ctx,e.chartArea);r<a;++r){var o=t._parseValue(i.data[r]);isNaN(o.min)||isNaN(o.max)||n[r].draw()}c.canvas.unclipArea(e.ctx)},_resolveDataElementOptions:function(){var e=this,t=c.extend({},ee.prototype._resolveDataElementOptions.apply(e,arguments)),n=e._getIndexScale().options,i=e._getValueScale().options;return t.barPercentage=Te(n.barPercentage,t.barPercentage),t.barThickness=Te(n.barThickness,t.barThickness),t.categoryPercentage=Te(n.categoryPercentage,t.categoryPercentage),t.maxBarThickness=Te(n.maxBarThickness,t.maxBarThickness),t.minBarLength=Te(i.minBarLength,t.minBarLength),t}}),bt=c.valueOrDefault,Ti=c.options.resolve;S._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(e,t){var n=t.datasets[e.datasetIndex].label||"",i=t.datasets[e.datasetIndex].data[e.index];return n+": ("+e.xLabel+", "+e.yLabel+", "+i.r+")"}}}});var Ii=ee.extend({dataElementType:Y.Point,_dataElementOptions:["backgroundColor","borderColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","hoverRadius","hitRadius","pointStyle","rotation"],update:function(e){var t=this,n=t.getMeta().data;c.each(n,function(i,a){t.updateElement(i,a,e)})},updateElement:function(e,t,n){var i=this,a=i.getMeta(),r=e.custom||{},o=i.getScaleForId(a.xAxisID),s=i.getScaleForId(a.yAxisID),l=i._resolveDataElementOptions(e,t),u=i.getDataset().data[t],d=i.index,h=n?o.getPixelForDecimal(.5):o.getPixelForValue(typeof u=="object"?u:NaN,t,d),f=n?s.getBasePixel():s.getPixelForValue(u,t,d);e._xScale=o,e._yScale=s,e._options=l,e._datasetIndex=d,e._index=t,e._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:r.skip||isNaN(h)||isNaN(f),x:h,y:f},e.pivot()},setHoverStyle:function(e){var t=e._model,n=e._options,i=c.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth,radius:t.radius},t.backgroundColor=bt(n.hoverBackgroundColor,i(n.backgroundColor)),t.borderColor=bt(n.hoverBorderColor,i(n.borderColor)),t.borderWidth=bt(n.hoverBorderWidth,n.borderWidth),t.radius=n.radius+n.hoverRadius},_resolveDataElementOptions:function(e,t){var n=this,i=n.chart,a=n.getDataset(),r=e.custom||{},o=a.data[t]||{},s=ee.prototype._resolveDataElementOptions.apply(n,arguments),l={chart:i,dataIndex:t,dataset:a,datasetIndex:n.index};return n._cachedDataOpts===s&&(s=c.extend({},s)),s.radius=Ti([r.radius,o.r,n._config.radius,i.options.elements.point.radius],l,t),s}}),Qe=c.valueOrDefault,xe=Math.PI,le=2*xe,ye=xe/2;S._set("doughnut",{animation:{animateRotate:!0,animateScale:!1},hover:{mode:"single"},legendCallback:function(e){var t,n,i,a=document.createElement("ul"),r=e.data,o=r.datasets,s=r.labels;if(a.setAttribute("class",e.id+"-legend"),o.length)for(t=0,n=o[0].data.length;t<n;++t)(i=a.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=o[0].backgroundColor[t],s[t]&&i.appendChild(document.createTextNode(s[t]));return a.outerHTML},legend:{labels:{generateLabels:function(e){var t=e.data;return t.labels.length&&t.datasets.length?t.labels.map(function(n,i){var a=e.getDatasetMeta(0),r=a.controller.getStyle(i);return{text:n,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,hidden:isNaN(t.datasets[0].data[i])||a.data[i].hidden,index:i}}):[]}},onClick:function(e,t){var n,i,a,r=t.index,o=this.chart;for(n=0,i=(o.data.datasets||[]).length;n<i;++n)(a=o.getDatasetMeta(n)).data[r]&&(a.data[r].hidden=!a.data[r].hidden);o.update()}},cutoutPercentage:50,rotation:-ye,circumference:le,tooltips:{callbacks:{title:function(){return""},label:function(e,t){var n=t.labels[e.index],i=": "+t.datasets[e.datasetIndex].data[e.index];return c.isArray(n)?(n=n.slice())[0]+=i:n+=i,n}}}});var vn=ee.extend({dataElementType:Y.Arc,linkScales:c.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],getRingIndex:function(e){for(var t=0,n=0;n<e;++n)this.chart.isDatasetVisible(n)&&++t;return t},update:function(e){var t,n,i,a,r=this,o=r.chart,s=o.chartArea,l=o.options,u=1,d=1,h=0,f=0,g=r.getMeta(),p=g.data,m=l.cutoutPercentage/100||0,v=l.circumference,x=r._getRingWeight(r.index);if(v<le){var b=l.rotation%le,y=(b+=b>=xe?-le:b<-xe?le:0)+v,_=Math.cos(b),k=Math.sin(b),M=Math.cos(y),C=Math.sin(y),P=b<=0&&y>=0||y>=le,w=b<=ye&&y>=ye||y>=le+ye,O=b<=-ye&&y>=-ye||y>=xe+ye,D=b===-xe||y>=xe?-1:Math.min(_,_*m,M,M*m),T=O?-1:Math.min(k,k*m,C,C*m),N=P?1:Math.max(_,_*m,M,M*m),I=w?1:Math.max(k,k*m,C,C*m);u=(N-D)/2,d=(I-T)/2,h=-(N+D)/2,f=-(I+T)/2}for(i=0,a=p.length;i<a;++i)p[i]._options=r._resolveDataElementOptions(p[i],i);for(o.borderWidth=r.getMaxBorderWidth(),t=(s.right-s.left-o.borderWidth)/u,n=(s.bottom-s.top-o.borderWidth)/d,o.outerRadius=Math.max(Math.min(t,n)/2,0),o.innerRadius=Math.max(o.outerRadius*m,0),o.radiusLength=(o.outerRadius-o.innerRadius)/(r._getVisibleDatasetWeightTotal()||1),o.offsetX=h*o.outerRadius,o.offsetY=f*o.outerRadius,g.total=r.calculateTotal(),r.outerRadius=o.outerRadius-o.radiusLength*r._getRingWeightOffset(r.index),r.innerRadius=Math.max(r.outerRadius-o.radiusLength*x,0),i=0,a=p.length;i<a;++i)r.updateElement(p[i],i,e)},updateElement:function(e,t,n){var i=this,a=i.chart,r=a.chartArea,o=a.options,s=o.animation,l=(r.left+r.right)/2,u=(r.top+r.bottom)/2,d=o.rotation,h=o.rotation,f=i.getDataset(),g=n&&s.animateRotate||e.hidden?0:i.calculateCircumference(f.data[t])*(o.circumference/le),p=n&&s.animateScale?0:i.innerRadius,m=n&&s.animateScale?0:i.outerRadius,v=e._options||{};c.extend(e,{_datasetIndex:i.index,_index:t,_model:{backgroundColor:v.backgroundColor,borderColor:v.borderColor,borderWidth:v.borderWidth,borderAlign:v.borderAlign,x:l+a.offsetX,y:u+a.offsetY,startAngle:d,endAngle:h,circumference:g,outerRadius:m,innerRadius:p,label:c.valueAtIndexOrDefault(f.label,t,a.data.labels[t])}});var x=e._model;n&&s.animateRotate||(x.startAngle=t===0?o.rotation:i.getMeta().data[t-1]._model.endAngle,x.endAngle=x.startAngle+x.circumference),e.pivot()},calculateTotal:function(){var e,t=this.getDataset(),n=this.getMeta(),i=0;return c.each(n.data,function(a,r){e=t.data[r],isNaN(e)||a.hidden||(i+=Math.abs(e))}),i},calculateCircumference:function(e){var t=this.getMeta().total;return t>0&&!isNaN(e)?le*(Math.abs(e)/t):0},getMaxBorderWidth:function(e){var t,n,i,a,r,o,s,l,u=0,d=this.chart;if(!e){for(t=0,n=d.data.datasets.length;t<n;++t)if(d.isDatasetVisible(t)){e=(i=d.getDatasetMeta(t)).data,t!==this.index&&(r=i.controller);break}}if(!e)return 0;for(t=0,n=e.length;t<n;++t)a=e[t],r?(r._configure(),o=r._resolveDataElementOptions(a,t)):o=a._options,o.borderAlign!=="inner"&&(s=o.borderWidth,u=(l=o.hoverBorderWidth)>(u=s>u?s:u)?l:u);return u},setHoverStyle:function(e){var t=e._model,n=e._options,i=c.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth},t.backgroundColor=Qe(n.hoverBackgroundColor,i(n.backgroundColor)),t.borderColor=Qe(n.hoverBorderColor,i(n.borderColor)),t.borderWidth=Qe(n.hoverBorderWidth,n.borderWidth)},_getRingWeightOffset:function(e){for(var t=0,n=0;n<e;++n)this.chart.isDatasetVisible(n)&&(t+=this._getRingWeight(n));return t},_getRingWeight:function(e){return Math.max(Qe(this.chart.data.datasets[e].weight,1),0)},_getVisibleDatasetWeightTotal:function(){return this._getRingWeightOffset(this.chart.data.datasets.length)}});S._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"}}),S._set("global",{datasets:{horizontalBar:{categoryPercentage:.8,barPercentage:.9}}});var Fi=mn.extend({_getValueScaleId:function(){return this.getMeta().xAxisID},_getIndexScaleId:function(){return this.getMeta().yAxisID}}),ue=c.valueOrDefault,Oi=c.options.resolve,xt=c.canvas._isPointInArea;function bn(e,t){var n=e&&e.options.ticks||{},i=n.reverse,a=n.min===void 0?t:0,r=n.max===void 0?t:0;return{start:i?r:a,end:i?a:r}}function Li(e,t,n){var i=n/2,a=bn(e,i),r=bn(t,i);return{top:r.end,right:a.end,bottom:r.start,left:a.start}}function Ri(e){var t,n,i,a;return c.isObject(e)?(t=e.top,n=e.right,i=e.bottom,a=e.left):t=n=i=a=e,{top:t,right:n,bottom:i,left:a}}S._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 xn=ee.extend({datasetElementType:Y.Line,dataElementType:Y.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(e){var t,n,i=this,a=i.getMeta(),r=a.dataset,o=a.data||[],s=i.chart.options,l=i._config,u=i._showLine=ue(l.showLine,s.showLines);for(i._xScale=i.getScaleForId(a.xAxisID),i._yScale=i.getScaleForId(a.yAxisID),u&&(l.tension!==void 0&&l.lineTension===void 0&&(l.lineTension=l.tension),r._scale=i._yScale,r._datasetIndex=i.index,r._children=o,r._model=i._resolveDatasetElementOptions(r),r.pivot()),t=0,n=o.length;t<n;++t)i.updateElement(o[t],t,e);for(u&&r._model.tension!==0&&i.updateBezierControlPoints(),t=0,n=o.length;t<n;++t)o[t].pivot()},updateElement:function(e,t,n){var i,a,r=this,o=r.getMeta(),s=e.custom||{},l=r.getDataset(),u=r.index,d=l.data[t],h=r._xScale,f=r._yScale,g=o.dataset._model,p=r._resolveDataElementOptions(e,t);i=h.getPixelForValue(typeof d=="object"?d:NaN,t,u),a=n?f.getBasePixel():r.calculatePointY(d,t,u),e._xScale=h,e._yScale=f,e._options=p,e._datasetIndex=u,e._index=t,e._model={x:i,y:a,skip:s.skip||isNaN(i)||isNaN(a),radius:p.radius,pointStyle:p.pointStyle,rotation:p.rotation,backgroundColor:p.backgroundColor,borderColor:p.borderColor,borderWidth:p.borderWidth,tension:ue(s.tension,g?g.tension:0),steppedLine:!!g&&g.steppedLine,hitRadius:p.hitRadius}},_resolveDatasetElementOptions:function(e){var t=this,n=t._config,i=e.custom||{},a=t.chart.options,r=a.elements.line,o=ee.prototype._resolveDatasetElementOptions.apply(t,arguments);return o.spanGaps=ue(n.spanGaps,a.spanGaps),o.tension=ue(n.lineTension,r.tension),o.steppedLine=Oi([i.steppedLine,n.steppedLine,r.stepped]),o.clip=Ri(ue(n.clip,Li(t._xScale,t._yScale,o.borderWidth))),o},calculatePointY:function(e,t,n){var i,a,r,o,s,l,u,d=this.chart,h=this._yScale,f=0,g=0;if(h.options.stacked){for(s=+h.getRightValue(e),u=(l=d._getSortedVisibleDatasetMetas()).length,i=0;i<u&&(r=l[i]).index!==n;++i)a=d.data.datasets[r.index],r.type==="line"&&r.yAxisID===h.id&&((o=+h.getRightValue(a.data[t]))<0?g+=o||0:f+=o||0);return s<0?h.getPixelForValue(g+s):h.getPixelForValue(f+s)}return h.getPixelForValue(e)},updateBezierControlPoints:function(){var e,t,n,i,a=this.chart,r=this.getMeta(),o=r.dataset._model,s=a.chartArea,l=r.data||[];function u(d,h,f){return Math.max(Math.min(d,f),h)}if(o.spanGaps&&(l=l.filter(function(d){return!d._model.skip})),o.cubicInterpolationMode==="monotone")c.splineCurveMonotone(l);else for(e=0,t=l.length;e<t;++e)n=l[e]._model,i=c.splineCurve(c.previousItem(l,e)._model,n,c.nextItem(l,e)._model,o.tension),n.controlPointPreviousX=i.previous.x,n.controlPointPreviousY=i.previous.y,n.controlPointNextX=i.next.x,n.controlPointNextY=i.next.y;if(a.options.elements.line.capBezierPoints)for(e=0,t=l.length;e<t;++e)n=l[e]._model,xt(n,s)&&(e>0&&xt(l[e-1]._model,s)&&(n.controlPointPreviousX=u(n.controlPointPreviousX,s.left,s.right),n.controlPointPreviousY=u(n.controlPointPreviousY,s.top,s.bottom)),e<l.length-1&&xt(l[e+1]._model,s)&&(n.controlPointNextX=u(n.controlPointNextX,s.left,s.right),n.controlPointNextY=u(n.controlPointNextY,s.top,s.bottom)))},draw:function(){var e,t=this.chart,n=this.getMeta(),i=n.data||[],a=t.chartArea,r=t.canvas,o=0,s=i.length;for(this._showLine&&(e=n.dataset._model.clip,c.canvas.clipArea(t.ctx,{left:e.left===!1?0:a.left-e.left,right:e.right===!1?r.width:a.right+e.right,top:e.top===!1?0:a.top-e.top,bottom:e.bottom===!1?r.height:a.bottom+e.bottom}),n.dataset.draw(),c.canvas.unclipArea(t.ctx));o<s;++o)i[o].draw(a)},setHoverStyle:function(e){var t=e._model,n=e._options,i=c.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth,radius:t.radius},t.backgroundColor=ue(n.hoverBackgroundColor,i(n.backgroundColor)),t.borderColor=ue(n.hoverBorderColor,i(n.borderColor)),t.borderWidth=ue(n.hoverBorderWidth,n.borderWidth),t.radius=ue(n.hoverRadius,n.radius)}}),zi=c.options.resolve;S._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(e){var t,n,i,a=document.createElement("ul"),r=e.data,o=r.datasets,s=r.labels;if(a.setAttribute("class",e.id+"-legend"),o.length)for(t=0,n=o[0].data.length;t<n;++t)(i=a.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=o[0].backgroundColor[t],s[t]&&i.appendChild(document.createTextNode(s[t]));return a.outerHTML},legend:{labels:{generateLabels:function(e){var t=e.data;return t.labels.length&&t.datasets.length?t.labels.map(function(n,i){var a=e.getDatasetMeta(0),r=a.controller.getStyle(i);return{text:n,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,hidden:isNaN(t.datasets[0].data[i])||a.data[i].hidden,index:i}}):[]}},onClick:function(e,t){var n,i,a,r=t.index,o=this.chart;for(n=0,i=(o.data.datasets||[]).length;n<i;++n)(a=o.getDatasetMeta(n)).data[r].hidden=!a.data[r].hidden;o.update()}},tooltips:{callbacks:{title:function(){return""},label:function(e,t){return t.labels[e.index]+": "+e.yLabel}}}});var Ni=ee.extend({dataElementType:Y.Arc,linkScales:c.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(e){var t,n,i,a=this,r=a.getDataset(),o=a.getMeta(),s=a.chart.options.startAngle||0,l=a._starts=[],u=a._angles=[],d=o.data;for(a._updateRadius(),o.count=a.countVisibleElements(),t=0,n=r.data.length;t<n;t++)l[t]=s,i=a._computeAngle(t),u[t]=i,s+=i;for(t=0,n=d.length;t<n;++t)d[t]._options=a._resolveDataElementOptions(d[t],t),a.updateElement(d[t],t,e)},_updateRadius:function(){var e=this,t=e.chart,n=t.chartArea,i=t.options,a=Math.min(n.right-n.left,n.bottom-n.top);t.outerRadius=Math.max(a/2,0),t.innerRadius=Math.max(i.cutoutPercentage?t.outerRadius/100*i.cutoutPercentage:1,0),t.radiusLength=(t.outerRadius-t.innerRadius)/t.getVisibleDatasetCount(),e.outerRadius=t.outerRadius-t.radiusLength*e.index,e.innerRadius=e.outerRadius-t.radiusLength},updateElement:function(e,t,n){var i=this,a=i.chart,r=i.getDataset(),o=a.options,s=o.animation,l=a.scale,u=a.data.labels,d=l.xCenter,h=l.yCenter,f=o.startAngle,g=e.hidden?0:l.getDistanceFromCenterForValue(r.data[t]),p=i._starts[t],m=p+(e.hidden?0:i._angles[t]),v=s.animateScale?0:l.getDistanceFromCenterForValue(r.data[t]),x=e._options||{};c.extend(e,{_datasetIndex:i.index,_index:t,_scale:l,_model:{backgroundColor:x.backgroundColor,borderColor:x.borderColor,borderWidth:x.borderWidth,borderAlign:x.borderAlign,x:d,y:h,innerRadius:0,outerRadius:n?v:g,startAngle:n&&s.animateRotate?f:p,endAngle:n&&s.animateRotate?f:m,label:c.valueAtIndexOrDefault(u,t,u[t])}}),e.pivot()},countVisibleElements:function(){var e=this.getDataset(),t=this.getMeta(),n=0;return c.each(t.data,function(i,a){isNaN(e.data[a])||i.hidden||n++}),n},setHoverStyle:function(e){var t=e._model,n=e._options,i=c.getHoverColor,a=c.valueOrDefault;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth},t.backgroundColor=a(n.hoverBackgroundColor,i(n.backgroundColor)),t.borderColor=a(n.hoverBorderColor,i(n.borderColor)),t.borderWidth=a(n.hoverBorderWidth,n.borderWidth)},_computeAngle:function(e){var t=this,n=this.getMeta().count,i=t.getDataset(),a=t.getMeta();if(isNaN(i.data[e])||a.data[e].hidden)return 0;var r={chart:t.chart,dataIndex:e,dataset:i,datasetIndex:t.index};return zi([t.chart.options.elements.arc.angle,2*Math.PI/n],r,e)}});S._set("pie",c.clone(S.doughnut)),S._set("pie",{cutoutPercentage:0});var Bi=vn,_e=c.valueOrDefault;S._set("radar",{spanGaps:!1,scale:{type:"radialLinear"},elements:{line:{fill:"start",tension:0}}});var Ei=ee.extend({datasetElementType:Y.Line,dataElementType:Y.Point,linkScales:c.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(e){var t,n,i=this,a=i.getMeta(),r=a.dataset,o=a.data||[],s=i.chart.scale,l=i._config;for(l.tension!==void 0&&l.lineTension===void 0&&(l.lineTension=l.tension),r._scale=s,r._datasetIndex=i.index,r._children=o,r._loop=!0,r._model=i._resolveDatasetElementOptions(r),r.pivot(),t=0,n=o.length;t<n;++t)i.updateElement(o[t],t,e);for(i.updateBezierControlPoints(),t=0,n=o.length;t<n;++t)o[t].pivot()},updateElement:function(e,t,n){var i=this,a=e.custom||{},r=i.getDataset(),o=i.chart.scale,s=o.getPointPositionForValue(t,r.data[t]),l=i._resolveDataElementOptions(e,t),u=i.getMeta().dataset._model,d=n?o.xCenter:s.x,h=n?o.yCenter:s.y;e._scale=o,e._options=l,e._datasetIndex=i.index,e._index=t,e._model={x:d,y:h,skip:a.skip||isNaN(d)||isNaN(h),radius:l.radius,pointStyle:l.pointStyle,rotation:l.rotation,backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,tension:_e(a.tension,u?u.tension:0),hitRadius:l.hitRadius}},_resolveDatasetElementOptions:function(){var e=this,t=e._config,n=e.chart.options,i=ee.prototype._resolveDatasetElementOptions.apply(e,arguments);return i.spanGaps=_e(t.spanGaps,n.spanGaps),i.tension=_e(t.lineTension,n.elements.line.tension),i},updateBezierControlPoints:function(){var e,t,n,i,a=this.getMeta(),r=this.chart.chartArea,o=a.data||[];function s(l,u,d){return Math.max(Math.min(l,d),u)}for(a.dataset._model.spanGaps&&(o=o.filter(function(l){return!l._model.skip})),e=0,t=o.length;e<t;++e)n=o[e]._model,i=c.splineCurve(c.previousItem(o,e,!0)._model,n,c.nextItem(o,e,!0)._model,n.tension),n.controlPointPreviousX=s(i.previous.x,r.left,r.right),n.controlPointPreviousY=s(i.previous.y,r.top,r.bottom),n.controlPointNextX=s(i.next.x,r.left,r.right),n.controlPointNextY=s(i.next.y,r.top,r.bottom)},setHoverStyle:function(e){var t=e._model,n=e._options,i=c.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth,radius:t.radius},t.backgroundColor=_e(n.hoverBackgroundColor,i(n.backgroundColor)),t.borderColor=_e(n.hoverBorderColor,i(n.borderColor)),t.borderWidth=_e(n.hoverBorderWidth,n.borderWidth),t.radius=_e(n.hoverRadius,n.radius)}});S._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(e){return"("+e.xLabel+", "+e.yLabel+")"}}}}),S._set("global",{datasets:{scatter:{showLine:!1}}});var yn={bar:mn,bubble:Ii,doughnut:vn,horizontalBar:Fi,line:xn,polarArea:Ni,pie:Bi,radar:Ei,scatter:xn};function ke(e,t){return e.native?{x:e.x,y:e.y}:c.getRelativePosition(e,t)}function We(e,t){var n,i,a,r,o,s,l=e._getSortedVisibleDatasetMetas();for(i=0,r=l.length;i<r;++i)for(a=0,o=(n=l[i].data).length;a<o;++a)(s=n[a])._view.skip||t(s)}function yt(e,t){var n=[];return We(e,function(i){i.inRange(t.x,t.y)&&n.push(i)}),n}function _t(e,t,n,i){var a=Number.POSITIVE_INFINITY,r=[];return We(e,function(o){if(!n||o.inRange(t.x,t.y)){var s=o.getCenterPoint(),l=i(t,s);l<a?(r=[o],a=l):l===a&&r.push(o)}}),r}function kt(e){var t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(i,a){var r=t?Math.abs(i.x-a.x):0,o=n?Math.abs(i.y-a.y):0;return Math.sqrt(Math.pow(r,2)+Math.pow(o,2))}}function wt(e,t,n){var i=ke(t,e);n.axis=n.axis||"x";var a=kt(n.axis),r=n.intersect?yt(e,i):_t(e,i,!1,a),o=[];return r.length?(e._getSortedVisibleDatasetMetas().forEach(function(s){var l=s.data[r[0]._index];l&&!l._view.skip&&o.push(l)}),o):[]}var Ie={modes:{single:function(e,t){var n=ke(t,e),i=[];return We(e,function(a){if(a.inRange(n.x,n.y))return i.push(a),i}),i.slice(0,1)},label:wt,index:wt,dataset:function(e,t,n){var i=ke(t,e);n.axis=n.axis||"xy";var a=kt(n.axis),r=n.intersect?yt(e,i):_t(e,i,!1,a);return r.length>0&&(r=e.getDatasetMeta(r[0]._datasetIndex).data),r},"x-axis":function(e,t){return wt(e,t,{intersect:!1})},point:function(e,t){return yt(e,ke(t,e))},nearest:function(e,t,n){var i=ke(t,e);n.axis=n.axis||"xy";var a=kt(n.axis);return _t(e,i,n.intersect,a)},x:function(e,t,n){var i=ke(t,e),a=[],r=!1;return We(e,function(o){o.inXRange(i.x)&&a.push(o),o.inRange(i.x,i.y)&&(r=!0)}),n.intersect&&!r&&(a=[]),a},y:function(e,t,n){var i=ke(t,e),a=[],r=!1;return We(e,function(o){o.inYRange(i.y)&&a.push(o),o.inRange(i.x,i.y)&&(r=!0)}),n.intersect&&!r&&(a=[]),a}}},Mt=c.extend;function Ve(e,t){return c.where(e,function(n){return n.pos===t})}function et(e,t){return e.sort(function(n,i){var a=t?i:n,r=t?n:i;return a.weight===r.weight?a.index-r.index:a.weight-r.weight})}function _n(e,t,n,i){return Math.max(e[n],t[n])+Math.max(e[i],t[i])}function Wi(e,t,n){var i,a,r=n.box,o=e.maxPadding;if(n.size&&(e[n.pos]-=n.size),n.size=n.horizontal?r.height:r.width,e[n.pos]+=n.size,r.getPadding){var s=r.getPadding();o.top=Math.max(o.top,s.top),o.left=Math.max(o.left,s.left),o.bottom=Math.max(o.bottom,s.bottom),o.right=Math.max(o.right,s.right)}if(i=t.outerWidth-_n(o,e,"left","right"),a=t.outerHeight-_n(o,e,"top","bottom"),i!==e.w||a!==e.h){e.w=i,e.h=a;var l=n.horizontal?[i,e.w]:[a,e.h];return!(l[0]===l[1]||isNaN(l[0])&&isNaN(l[1]))}}function Vi(e,t){var n=t.maxPadding;function i(a){var r={left:0,top:0,right:0,bottom:0};return a.forEach(function(o){r[o]=Math.max(t[o],n[o])}),r}return i(e?["left","right"]:["top","bottom"])}function tt(e,t,n){var i,a,r,o,s,l,u=[];for(i=0,a=e.length;i<a;++i)(o=(r=e[i]).box).update(r.width||t.w,r.height||t.h,Vi(r.horizontal,t)),Wi(t,n,r)&&(l=!0,u.length&&(s=!0)),o.fullWidth||u.push(r);return s&&tt(u,t,n)||l}function kn(e,t,n){var i,a,r,o,s=n.padding,l=t.x,u=t.y;for(i=0,a=e.length;i<a;++i)o=(r=e[i]).box,r.horizontal?(o.left=o.fullWidth?s.left:t.left,o.right=o.fullWidth?n.outerWidth-s.right:t.left+t.w,o.top=u,o.bottom=u+o.height,o.width=o.right-o.left,u=o.bottom):(o.left=l,o.right=l+o.width,o.top=t.top,o.bottom=t.top+t.h,o.height=o.bottom-o.top,l=o.right);t.x=l,t.y=u}S._set("global",{layout:{padding:{top:0,right:0,bottom:0,left:0}}});var St,te={defaults:{},addBox:function(e,t){e.boxes||(e.boxes=[]),t.fullWidth=t.fullWidth||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw:function(){t.draw.apply(t,arguments)}}]},e.boxes.push(t)},removeBox:function(e,t){var n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&e.boxes.splice(n,1)},configure:function(e,t,n){for(var i,a=["fullWidth","position","weight"],r=a.length,o=0;o<r;++o)i=a[o],n.hasOwnProperty(i)&&(t[i]=n[i])},update:function(e,t,n){if(e){var i=e.options.layout||{},a=c.options.toPadding(i.padding),r=t-a.width,o=n-a.height,s=function(f){var g=function(b){var y,_,k,M=[];for(y=0,_=(b||[]).length;y<_;++y)k=b[y],M.push({index:y,box:k,pos:k.position,horizontal:k.isHorizontal(),weight:k.weight});return M}(f),p=et(Ve(g,"left"),!0),m=et(Ve(g,"right")),v=et(Ve(g,"top"),!0),x=et(Ve(g,"bottom"));return{leftAndTop:p.concat(v),rightAndBottom:m.concat(x),chartArea:Ve(g,"chartArea"),vertical:p.concat(m),horizontal:v.concat(x)}}(e.boxes),l=s.vertical,u=s.horizontal,d=Object.freeze({outerWidth:t,outerHeight:n,padding:a,availableWidth:r,vBoxMaxWidth:r/2/l.length,hBoxMaxHeight:o/2}),h=Mt({maxPadding:Mt({},a),w:r,h:o,x:a.left,y:a.top},a);(function(f,g){var p,m,v;for(p=0,m=f.length;p<m;++p)(v=f[p]).width=v.horizontal?v.box.fullWidth&&g.availableWidth:g.vBoxMaxWidth,v.height=v.horizontal&&g.hBoxMaxHeight})(l.concat(u),d),tt(l,h,d),tt(u,h,d)&&tt(l,h,d),function(f){var g=f.maxPadding;function p(m){var v=Math.max(g[m]-f[m],0);return f[m]+=v,v}f.y+=p("top"),f.x+=p("left"),p("right"),p("bottom")}(h),kn(s.leftAndTop,h,d),h.x+=h.w,h.y+=h.h,kn(s.rightAndBottom,h,d),e.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h},c.each(s.chartArea,function(f){var g=f.box;Mt(g,e.chartArea),g.update(h.w,h.h)})}}},Hi=(St=Object.freeze({__proto__:null,default:"@keyframes chartjs-render-animation{from{opacity:.99}to{opacity:1}}.chartjs-render-monitor{animation:chartjs-render-animation 1ms}.chartjs-size-monitor,.chartjs-size-monitor-expand,.chartjs-size-monitor-shrink{position:absolute;direction:ltr;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1}.chartjs-size-monitor-expand>div{position:absolute;width:1000000px;height:1000000px;left:0;top:0}.chartjs-size-monitor-shrink>div{position:absolute;width:200%;height:200%;left:0;top:0}"}))&&St.default||St,q="$chartjs",Ct="chartjs-size-monitor",wn="chartjs-render-monitor",ji="chartjs-render-animation",Mn=["animationstart","webkitAnimationStart"],qi={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function Sn(e,t){var n=c.getStyle(e,t),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?Number(i[1]):void 0}var Cn=!!function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("e",null,t)}catch{}return e}()&&{passive:!0};function He(e,t,n){e.addEventListener(t,n,Cn)}function Pt(e,t,n){e.removeEventListener(t,n,Cn)}function At(e,t,n,i,a){return{type:e,chart:t,native:a||null,x:n!==void 0?n:null,y:i!==void 0?i:null}}function je(e){var t=document.createElement("div");return t.className=e||"",t}function Ui(e,t,n){var i,a,r,o,s=e[q]||(e[q]={}),l=s.resizer=function(u){var d=je(Ct),h=je(Ct+"-expand"),f=je(Ct+"-shrink");h.appendChild(je()),f.appendChild(je()),d.appendChild(h),d.appendChild(f),d._reset=function(){h.scrollLeft=1e6,h.scrollTop=1e6,f.scrollLeft=1e6,f.scrollTop=1e6};var g=function(){d._reset(),u()};return He(h,"scroll",g.bind(h,"expand")),He(f,"scroll",g.bind(f,"shrink")),d}((i=function(){if(s.resizer){var u=n.options.maintainAspectRatio&&e.parentNode,d=u?u.clientWidth:0;t(At("resize",n)),u&&u.clientWidth<d&&n.canvas&&t(At("resize",n))}},r=!1,o=[],function(){o=Array.prototype.slice.call(arguments),a=a||this,r||(r=!0,c.requestAnimFrame.call(window,function(){r=!1,i.apply(a,o)}))}));(function(u,d){var h=u[q]||(u[q]={}),f=h.renderProxy=function(g){g.animationName===ji&&d()};c.each(Mn,function(g){He(u,g,f)}),h.reflow=!!u.offsetParent,u.classList.add(wn)})(e,function(){if(s.resizer){var u=e.parentNode;u&&u!==l.parentNode&&u.insertBefore(l,u.firstChild),l._reset()}})}function Yi(e){var t=e[q]||{},n=t.resizer;delete t.resizer,function(i){var a=i[q]||{},r=a.renderProxy;r&&(c.each(Mn,function(o){Pt(i,o,r)}),delete a.renderProxy),i.classList.remove(wn)}(e),n&&n.parentNode&&n.parentNode.removeChild(n)}var Pn={disableCSSInjection:!1,_enabled:typeof window!="undefined"&&typeof document!="undefined",_ensureLoaded:function(e){if(!this.disableCSSInjection){var t=e.getRootNode?e.getRootNode():document;(function(n,i){var a=n[q]||(n[q]={});if(!a.containsStyles){a.containsStyles=!0,i=`/* Chart.js */
-`+i;var r=document.createElement("style");r.setAttribute("type","text/css"),r.appendChild(document.createTextNode(i)),n.appendChild(r)}})(t.host?t:document.head,Hi)}},acquireContext:function(e,t){typeof e=="string"?e=document.getElementById(e):e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas);var n=e&&e.getContext&&e.getContext("2d");return n&&n.canvas===e?(this._ensureLoaded(e),function(i,a){var r=i.style,o=i.getAttribute("height"),s=i.getAttribute("width");if(i[q]={initial:{height:o,width:s,style:{display:r.display,height:r.height,width:r.width}}},r.display=r.display||"block",s===null||s===""){var l=Sn(i,"width");l!==void 0&&(i.width=l)}if(o===null||o==="")if(i.style.height==="")i.height=i.width/(a.options.aspectRatio||2);else{var u=Sn(i,"height");l!==void 0&&(i.height=u)}}(e,t),n):null},releaseContext:function(e){var t=e.canvas;if(t[q]){var n=t[q].initial;["height","width"].forEach(function(i){var a=n[i];c.isNullOrUndef(a)?t.removeAttribute(i):t.setAttribute(i,a)}),c.each(n.style||{},function(i,a){t.style[a]=i}),t.width=t.width,delete t[q]}},addEventListener:function(e,t,n){var i=e.canvas;if(t!=="resize"){var a=n[q]||(n[q]={});He(i,t,(a.proxies||(a.proxies={}))[e.id+"_"+t]=function(r){n(function(o,s){var l=qi[o.type]||o.type,u=c.getRelativePosition(o,s);return At(l,s,u.x,u.y,o)}(r,e))})}else Ui(i,n,e)},removeEventListener:function(e,t,n){var i=e.canvas;if(t!=="resize"){var a=((n[q]||{}).proxies||{})[e.id+"_"+t];a&&Pt(i,t,a)}else Yi(i)}};c.addEvent=He,c.removeEvent=Pt;var Gi=Pn._enabled?Pn:{acquireContext:function(e){return e&&e.canvas&&(e=e.canvas),e&&e.getContext("2d")||null}},Fe=c.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},Gi);S._set("global",{plugins:{}});var R={_plugins:[],_cacheId:0,register:function(e){var t=this._plugins;[].concat(e).forEach(function(n){t.indexOf(n)===-1&&t.push(n)}),this._cacheId++},unregister:function(e){var t=this._plugins;[].concat(e).forEach(function(n){var i=t.indexOf(n);i!==-1&&t.splice(i,1)}),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(e,t,n){var i,a,r,o,s,l=this.descriptors(e),u=l.length;for(i=0;i<u;++i)if(typeof(s=(r=(a=l[i]).plugin)[t])=="function"&&((o=[e].concat(n||[])).push(a.options),s.apply(r,o)===!1))return!1;return!0},descriptors:function(e){var t=e.$plugins||(e.$plugins={});if(t.id===this._cacheId)return t.descriptors;var n=[],i=[],a=e&&e.config||{},r=a.options&&a.options.plugins||{};return this._plugins.concat(a.plugins||[]).forEach(function(o){if(n.indexOf(o)===-1){var s=o.id,l=r[s];l!==!1&&(l===!0&&(l=c.clone(S.global.plugins[s])),n.push(o),i.push({plugin:o,options:l||{}}))}}),t.descriptors=i,t.id=this._cacheId,i},_invalidate:function(e){delete e.$plugins}},qe={constructors:{},defaults:{},registerScaleType:function(e,t,n){this.constructors[e]=t,this.defaults[e]=c.clone(n)},getScaleConstructor:function(e){return this.constructors.hasOwnProperty(e)?this.constructors[e]:void 0},getScaleDefaults:function(e){return this.defaults.hasOwnProperty(e)?c.merge(Object.create(null),[S.scale,this.defaults[e]]):{}},updateScaleDefaults:function(e,t){this.defaults.hasOwnProperty(e)&&(this.defaults[e]=c.extend(this.defaults[e],t))},addScalesToLayout:function(e){c.each(e.scales,function(t){t.fullWidth=t.options.fullWidth,t.position=t.options.position,t.weight=t.options.weight,te.addBox(e,t)})}},de=c.valueOrDefault,Dt=c.rtl.getRtlAdapter;S._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:c.noop,title:function(e,t){var n="",i=t.labels,a=i?i.length:0;if(e.length>0){var r=e[0];r.label?n=r.label:r.xLabel?n=r.xLabel:a>0&&r.index<a&&(n=i[r.index])}return n},afterTitle:c.noop,beforeBody:c.noop,beforeLabel:c.noop,label:function(e,t){var n=t.datasets[e.datasetIndex].label||"";return n&&(n+=": "),c.isNullOrUndef(e.value)?n+=e.yLabel:n+=e.value,n},labelColor:function(e,t){var n=t.getDatasetMeta(e.datasetIndex).data[e.index]._view;return{borderColor:n.borderColor,backgroundColor:n.backgroundColor}},labelTextColor:function(){return this._options.bodyFontColor},afterLabel:c.noop,afterBody:c.noop,beforeFooter:c.noop,footer:c.noop,afterFooter:c.noop}}});var An={average:function(e){if(!e.length)return!1;var t,n,i=0,a=0,r=0;for(t=0,n=e.length;t<n;++t){var o=e[t];if(o&&o.hasValue()){var s=o.tooltipPosition();i+=s.x,a+=s.y,++r}}return{x:i/r,y:a/r}},nearest:function(e,t){var n,i,a,r=t.x,o=t.y,s=Number.POSITIVE_INFINITY;for(n=0,i=e.length;n<i;++n){var l=e[n];if(l&&l.hasValue()){var u=l.getCenterPoint(),d=c.distanceBetweenPoints(t,u);d<s&&(s=d,a=l)}}if(a){var h=a.tooltipPosition();r=h.x,o=h.y}return{x:r,y:o}}};function se(e,t){return t&&(c.isArray(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function he(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
-`)>-1?e.split(`
-`):e}function Dn(e){var t=S.global;return{xPadding:e.xPadding,yPadding:e.yPadding,xAlign:e.xAlign,yAlign:e.yAlign,rtl:e.rtl,textDirection:e.textDirection,bodyFontColor:e.bodyFontColor,_bodyFontFamily:de(e.bodyFontFamily,t.defaultFontFamily),_bodyFontStyle:de(e.bodyFontStyle,t.defaultFontStyle),_bodyAlign:e.bodyAlign,bodyFontSize:de(e.bodyFontSize,t.defaultFontSize),bodySpacing:e.bodySpacing,titleFontColor:e.titleFontColor,_titleFontFamily:de(e.titleFontFamily,t.defaultFontFamily),_titleFontStyle:de(e.titleFontStyle,t.defaultFontStyle),titleFontSize:de(e.titleFontSize,t.defaultFontSize),_titleAlign:e.titleAlign,titleSpacing:e.titleSpacing,titleMarginBottom:e.titleMarginBottom,footerFontColor:e.footerFontColor,_footerFontFamily:de(e.footerFontFamily,t.defaultFontFamily),_footerFontStyle:de(e.footerFontStyle,t.defaultFontStyle),footerFontSize:de(e.footerFontSize,t.defaultFontSize),_footerAlign:e.footerAlign,footerSpacing:e.footerSpacing,footerMarginTop:e.footerMarginTop,caretSize:e.caretSize,cornerRadius:e.cornerRadius,backgroundColor:e.backgroundColor,opacity:0,legendColorBackground:e.multiKeyBackground,displayColors:e.displayColors,borderColor:e.borderColor,borderWidth:e.borderWidth}}function nt(e,t){return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-e.xPadding:e.x+e.xPadding}function Tn(e){return se([],he(e))}var Xi=re.extend({initialize:function(){this._model=Dn(this._options),this._lastActive=[]},getTitle:function(){var e=this,t=e._options,n=t.callbacks,i=n.beforeTitle.apply(e,arguments),a=n.title.apply(e,arguments),r=n.afterTitle.apply(e,arguments),o=[];return o=se(o,he(i)),o=se(o,he(a)),o=se(o,he(r))},getBeforeBody:function(){return Tn(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(e,t){var n=this,i=n._options.callbacks,a=[];return c.each(e,function(r){var o={before:[],lines:[],after:[]};se(o.before,he(i.beforeLabel.call(n,r,t))),se(o.lines,i.label.call(n,r,t)),se(o.after,he(i.afterLabel.call(n,r,t))),a.push(o)}),a},getAfterBody:function(){return Tn(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var e=this,t=e._options.callbacks,n=t.beforeFooter.apply(e,arguments),i=t.footer.apply(e,arguments),a=t.afterFooter.apply(e,arguments),r=[];return r=se(r,he(n)),r=se(r,he(i)),r=se(r,he(a))},update:function(e){var t,n,i,a,r,o,s,l,u,d,h=this,f=h._options,g=h._model,p=h._model=Dn(f),m=h._active,v=h._data,x={xAlign:g.xAlign,yAlign:g.yAlign},b={x:g.x,y:g.y},y={width:g.width,height:g.height},_={x:g.caretX,y:g.caretY};if(m.length){p.opacity=1;var k=[],M=[];_=An[f.position].call(h,m,h._eventPosition);var C=[];for(t=0,n=m.length;t<n;++t)C.push((i=m[t],a=void 0,r=void 0,o=void 0,s=void 0,l=void 0,u=void 0,d=void 0,a=i._xScale,r=i._yScale||i._scale,o=i._index,s=i._datasetIndex,l=i._chart.getDatasetMeta(s).controller,u=l._getIndexScale(),d=l._getValueScale(),{xLabel:a?a.getLabelForIndex(o,s):"",yLabel:r?r.getLabelForIndex(o,s):"",label:u?""+u.getLabelForIndex(o,s):"",value:d?""+d.getLabelForIndex(o,s):"",index:o,datasetIndex:s,x:i._model.x,y:i._model.y}));f.filter&&(C=C.filter(function(P){return f.filter(P,v)})),f.itemSort&&(C=C.sort(function(P,w){return f.itemSort(P,w,v)})),c.each(C,function(P){k.push(f.callbacks.labelColor.call(h,P,h._chart)),M.push(f.callbacks.labelTextColor.call(h,P,h._chart))}),p.title=h.getTitle(C,v),p.beforeBody=h.getBeforeBody(C,v),p.body=h.getBody(C,v),p.afterBody=h.getAfterBody(C,v),p.footer=h.getFooter(C,v),p.x=_.x,p.y=_.y,p.caretPadding=f.caretPadding,p.labelColors=k,p.labelTextColors=M,p.dataPoints=C,y=function(P,w){var O=P._chart.ctx,D=2*w.yPadding,T=0,N=w.body,I=N.reduce(function(ne,H){return ne+H.before.length+H.lines.length+H.after.length},0);I+=w.beforeBody.length+w.afterBody.length;var L=w.title.length,E=w.footer.length,W=w.titleFontSize,V=w.bodyFontSize,$=w.footerFontSize;D+=L*W,D+=L?(L-1)*w.titleSpacing:0,D+=L?w.titleMarginBottom:0,D+=I*V,D+=I?(I-1)*w.bodySpacing:0,D+=E?w.footerMarginTop:0,D+=E*$,D+=E?(E-1)*w.footerSpacing:0;var fe=0,be=function(ne){T=Math.max(T,O.measureText(ne).width+fe)};return O.font=c.fontString(W,w._titleFontStyle,w._titleFontFamily),c.each(w.title,be),O.font=c.fontString(V,w._bodyFontStyle,w._bodyFontFamily),c.each(w.beforeBody.concat(w.afterBody),be),fe=w.displayColors?V+2:0,c.each(N,function(ne){c.each(ne.before,be),c.each(ne.lines,be),c.each(ne.after,be)}),fe=0,O.font=c.fontString($,w._footerFontStyle,w._footerFontFamily),c.each(w.footer,be),{width:T+=2*w.xPadding,height:D}}(this,p),b=function(P,w,O,D){var T=P.x,N=P.y,I=P.caretSize,L=P.caretPadding,E=P.cornerRadius,W=O.xAlign,V=O.yAlign,$=I+L,fe=E+L;return W==="right"?T-=w.width:W==="center"&&((T-=w.width/2)+w.width>D.width&&(T=D.width-w.width),T<0&&(T=0)),V==="top"?N+=$:N-=V==="bottom"?w.height+$:w.height/2,V==="center"?W==="left"?T+=$:W==="right"&&(T-=$):W==="left"?T-=fe:W==="right"&&(T+=fe),{x:T,y:N}}(p,y,x=function(P,w){var O,D,T,N,I,L=P._model,E=P._chart,W=P._chart.chartArea,V="center",$="center";L.y<w.height?$="top":L.y>E.height-w.height&&($="bottom");var fe=(W.left+W.right)/2,be=(W.top+W.bottom)/2;$==="center"?(O=function(H){return H<=fe},D=function(H){return H>fe}):(O=function(H){return H<=w.width/2},D=function(H){return H>=E.width-w.width/2}),T=function(H){return H+w.width+L.caretSize+L.caretPadding>E.width},N=function(H){return H-w.width-L.caretSize-L.caretPadding<0},I=function(H){return H<=be?"top":"bottom"},O(L.x)?(V="left",T(L.x)&&(V="center",$=I(L.y))):D(L.x)&&(V="right",N(L.x)&&(V="center",$=I(L.y)));var ne=P._options;return{xAlign:ne.xAlign?ne.xAlign:V,yAlign:ne.yAlign?ne.yAlign:$}}(this,y),h._chart)}else p.opacity=0;return p.xAlign=x.xAlign,p.yAlign=x.yAlign,p.x=b.x,p.y=b.y,p.width=y.width,p.height=y.height,p.caretX=_.x,p.caretY=_.y,h._model=p,e&&f.custom&&f.custom.call(h,p),h},drawCaret:function(e,t){var n=this._chart.ctx,i=this._view,a=this.getCaretPosition(e,t,i);n.lineTo(a.x1,a.y1),n.lineTo(a.x2,a.y2),n.lineTo(a.x3,a.y3)},getCaretPosition:function(e,t,n){var i,a,r,o,s,l,u=n.caretSize,d=n.cornerRadius,h=n.xAlign,f=n.yAlign,g=e.x,p=e.y,m=t.width,v=t.height;if(f==="center")s=p+v/2,h==="left"?(a=(i=g)-u,r=i,o=s+u,l=s-u):(a=(i=g+m)+u,r=i,o=s-u,l=s+u);else if(h==="left"?(i=(a=g+d+u)-u,r=a+u):h==="right"?(i=(a=g+m-d-u)-u,r=a+u):(i=(a=n.caretX)-u,r=a+u),f==="top")s=(o=p)-u,l=o;else{s=(o=p+v)+u,l=o;var x=r;r=i,i=x}return{x1:i,x2:a,x3:r,y1:o,y2:s,y3:l}},drawTitle:function(e,t,n){var i,a,r,o=t.title,s=o.length;if(s){var l=Dt(t.rtl,t.x,t.width);for(e.x=nt(t,t._titleAlign),n.textAlign=l.textAlign(t._titleAlign),n.textBaseline="middle",i=t.titleFontSize,a=t.titleSpacing,n.fillStyle=t.titleFontColor,n.font=c.fontString(i,t._titleFontStyle,t._titleFontFamily),r=0;r<s;++r)n.fillText(o[r],l.x(e.x),e.y+i/2),e.y+=i+a,r+1===s&&(e.y+=t.titleMarginBottom-a)}},drawBody:function(e,t,n){var i,a,r,o,s,l,u,d,h=t.bodyFontSize,f=t.bodySpacing,g=t._bodyAlign,p=t.body,m=t.displayColors,v=0,x=m?nt(t,"left"):0,b=Dt(t.rtl,t.x,t.width),y=function(M){n.fillText(M,b.x(e.x+v),e.y+h/2),e.y+=h+f},_=b.textAlign(g);for(n.textAlign=g,n.textBaseline="middle",n.font=c.fontString(h,t._bodyFontStyle,t._bodyFontFamily),e.x=nt(t,_),n.fillStyle=t.bodyFontColor,c.each(t.beforeBody,y),v=m&&_!=="right"?g==="center"?h/2+1:h+2:0,s=0,u=p.length;s<u;++s){for(i=p[s],a=t.labelTextColors[s],r=t.labelColors[s],n.fillStyle=a,c.each(i.before,y),l=0,d=(o=i.lines).length;l<d;++l){if(m){var k=b.x(x);n.fillStyle=t.legendColorBackground,n.fillRect(b.leftForLtr(k,h),e.y,h,h),n.lineWidth=1,n.strokeStyle=r.borderColor,n.strokeRect(b.leftForLtr(k,h),e.y,h,h),n.fillStyle=r.backgroundColor,n.fillRect(b.leftForLtr(b.xPlus(k,1),h-2),e.y+1,h-2,h-2),n.fillStyle=a}y(o[l])}c.each(i.after,y)}v=0,c.each(t.afterBody,y),e.y-=f},drawFooter:function(e,t,n){var i,a,r=t.footer,o=r.length;if(o){var s=Dt(t.rtl,t.x,t.width);for(e.x=nt(t,t._footerAlign),e.y+=t.footerMarginTop,n.textAlign=s.textAlign(t._footerAlign),n.textBaseline="middle",i=t.footerFontSize,n.fillStyle=t.footerFontColor,n.font=c.fontString(i,t._footerFontStyle,t._footerFontFamily),a=0;a<o;++a)n.fillText(r[a],s.x(e.x),e.y+i/2),e.y+=i+t.footerSpacing}},drawBackground:function(e,t,n,i){n.fillStyle=t.backgroundColor,n.strokeStyle=t.borderColor,n.lineWidth=t.borderWidth;var a=t.xAlign,r=t.yAlign,o=e.x,s=e.y,l=i.width,u=i.height,d=t.cornerRadius;n.beginPath(),n.moveTo(o+d,s),r==="top"&&this.drawCaret(e,i),n.lineTo(o+l-d,s),n.quadraticCurveTo(o+l,s,o+l,s+d),r==="center"&&a==="right"&&this.drawCaret(e,i),n.lineTo(o+l,s+u-d),n.quadraticCurveTo(o+l,s+u,o+l-d,s+u),r==="bottom"&&this.drawCaret(e,i),n.lineTo(o+d,s+u),n.quadraticCurveTo(o,s+u,o,s+u-d),r==="center"&&a==="left"&&this.drawCaret(e,i),n.lineTo(o,s+d),n.quadraticCurveTo(o,s,o+d,s),n.closePath(),n.fill(),t.borderWidth>0&&n.stroke()},draw:function(){var e=this._chart.ctx,t=this._view;if(t.opacity!==0){var n={width:t.width,height:t.height},i={x:t.x,y:t.y},a=Math.abs(t.opacity<.001)?0:t.opacity,r=t.title.length||t.beforeBody.length||t.body.length||t.afterBody.length||t.footer.length;this._options.enabled&&r&&(e.save(),e.globalAlpha=a,this.drawBackground(i,t,e,n),i.y+=t.yPadding,c.rtl.overrideTextDirection(e,t.textDirection),this.drawTitle(i,t,e),this.drawBody(i,t,e),this.drawFooter(i,t,e),c.rtl.restoreTextDirection(e,t.textDirection),e.restore())}},handleEvent:function(e){var t,n=this,i=n._options;return n._lastActive=n._lastActive||[],e.type==="mouseout"?n._active=[]:(n._active=n._chart.getElementsAtEventForMode(e,i.mode,i),i.reverse&&n._active.reverse()),(t=!c.arrayEquals(n._active,n._lastActive))&&(n._lastActive=n._active,(i.enabled||i.custom)&&(n._eventPosition={x:e.x,y:e.y},n.update(!0),n.pivot())),t}}),Ki=An,Tt=Xi;Tt.positioners=Ki;var It=c.valueOrDefault;function In(){return c.merge(Object.create(null),[].slice.call(arguments),{merger:function(e,t,n,i){if(e==="xAxes"||e==="yAxes"){var a,r,o,s=n[e].length;for(t[e]||(t[e]=[]),a=0;a<s;++a)o=n[e][a],r=It(o.type,e==="xAxes"?"category":"linear"),a>=t[e].length&&t[e].push({}),!t[e][a].type||o.type&&o.type!==t[e][a].type?c.merge(t[e][a],[qe.getScaleDefaults(r),o]):c.merge(t[e][a],o)}else c._merger(e,t,n,i)}})}function Ft(){return c.merge(Object.create(null),[].slice.call(arguments),{merger:function(e,t,n,i){var a=t[e]||Object.create(null),r=n[e];e==="scales"?t[e]=In(a,r):e==="scale"?t[e]=c.merge(a,[qe.getScaleDefaults(r.type),r]):c._merger(e,t,n,i)}})}function $i(e){var t=e.options;c.each(e.scales,function(n){te.removeBox(e,n)}),t=Ft(S.global,S[e.config.type],t),e.options=e.config.options=t,e.ensureScalesHaveIDs(),e.buildOrUpdateScales(),e.tooltip._options=t.tooltips,e.tooltip.initialize()}function Fn(e,t,n){var i,a=function(r){return r.id===i};do i=t+n++;while(c.findIndex(e,a)>=0);return i}function On(e){return e==="top"||e==="bottom"}function Ln(e,t){return function(n,i){return n[e]===i[e]?n[t]-i[t]:n[e]-i[e]}}S._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});var ge=function(e,t){return this.construct(e,t),this};c.extend(ge.prototype,{construct:function(e,t){var n=this;t=function(s){var l=(s=s||Object.create(null)).data=s.data||{};return l.datasets=l.datasets||[],l.labels=l.labels||[],s.options=Ft(S.global,S[s.type],s.options||{}),s}(t);var i=Fe.acquireContext(e,t),a=i&&i.canvas,r=a&&a.height,o=a&&a.width;n.id=c.uid(),n.ctx=i,n.canvas=a,n.config=t,n.width=o,n.height=r,n.aspectRatio=r?o/r:null,n.options=t.options,n._bufferedRender=!1,n._layers=[],n.chart=n,n.controller=n,ge.instances[n.id]=n,Object.defineProperty(n,"data",{get:function(){return n.config.data},set:function(s){n.config.data=s}}),i&&a?(n.initialize(),n.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var e=this;return R.notify(e,"beforeInit"),c.retinaScale(e,e.options.devicePixelRatio),e.bindEvents(),e.options.responsive&&e.resize(!0),e.initToolTip(),R.notify(e,"afterInit"),e},clear:function(){return c.canvas.clear(this),this},stop:function(){return mt.cancelAnimation(this),this},resize:function(e){var t=this,n=t.options,i=t.canvas,a=n.maintainAspectRatio&&t.aspectRatio||null,r=Math.max(0,Math.floor(c.getMaximumWidth(i))),o=Math.max(0,Math.floor(a?r/a:c.getMaximumHeight(i)));if((t.width!==r||t.height!==o)&&(i.width=t.width=r,i.height=t.height=o,i.style.width=r+"px",i.style.height=o+"px",c.retinaScale(t,n.devicePixelRatio),!e)){var s={width:r,height:o};R.notify(t,"resize",[s]),n.onResize&&n.onResize(t,s),t.stop(),t.update({duration:n.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var e=this.options,t=e.scales||{},n=e.scale;c.each(t.xAxes,function(i,a){i.id||(i.id=Fn(t.xAxes,"x-axis-",a))}),c.each(t.yAxes,function(i,a){i.id||(i.id=Fn(t.yAxes,"y-axis-",a))}),n&&(n.id=n.id||"scale")},buildOrUpdateScales:function(){var e=this,t=e.options,n=e.scales||{},i=[],a=Object.keys(n).reduce(function(r,o){return r[o]=!1,r},{});t.scales&&(i=i.concat((t.scales.xAxes||[]).map(function(r){return{options:r,dtype:"category",dposition:"bottom"}}),(t.scales.yAxes||[]).map(function(r){return{options:r,dtype:"linear",dposition:"left"}}))),t.scale&&i.push({options:t.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),c.each(i,function(r){var o=r.options,s=o.id,l=It(o.type,r.dtype);On(o.position)!==On(r.dposition)&&(o.position=r.dposition),a[s]=!0;var u=null;if(s in n&&n[s].type===l)(u=n[s]).options=o,u.ctx=e.ctx,u.chart=e;else{var d=qe.getScaleConstructor(l);if(!d)return;u=new d({id:s,type:l,options:o,ctx:e.ctx,chart:e}),n[u.id]=u}u.mergeTicksOptions(),r.isDefault&&(e.scale=u)}),c.each(a,function(r,o){r||delete n[o]}),e.scales=n,qe.addScalesToLayout(this)},buildOrUpdateControllers:function(){var e,t,n=this,i=[],a=n.data.datasets;for(e=0,t=a.length;e<t;e++){var r=a[e],o=n.getDatasetMeta(e),s=r.type||n.config.type;if(o.type&&o.type!==s&&(n.destroyDatasetMeta(e),o=n.getDatasetMeta(e)),o.type=s,o.order=r.order||0,o.index=e,o.controller)o.controller.updateIndex(e),o.controller.linkScales();else{var l=yn[o.type];if(l===void 0)throw new Error('"'+o.type+'" is not a chart type.');o.controller=new l(n,e),i.push(o.controller)}}return i},resetElements:function(){var e=this;c.each(e.data.datasets,function(t,n){e.getDatasetMeta(n).controller.reset()},e)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(e){var t,n,i=this;if(e&&typeof e=="object"||(e={duration:e,lazy:arguments[1]}),$i(i),R._invalidate(i),R.notify(i,"beforeUpdate")!==!1){i.tooltip._data=i.data;var a=i.buildOrUpdateControllers();for(t=0,n=i.data.datasets.length;t<n;t++)i.getDatasetMeta(t).controller.buildOrUpdateElements();i.updateLayout(),i.options.animation&&i.options.animation.duration&&c.each(a,function(r){r.reset()}),i.updateDatasets(),i.tooltip.initialize(),i.lastActive=[],R.notify(i,"afterUpdate"),i._layers.sort(Ln("z","_idx")),i._bufferedRender?i._bufferedRequest={duration:e.duration,easing:e.easing,lazy:e.lazy}:i.render(e)}},updateLayout:function(){var e=this;R.notify(e,"beforeLayout")!==!1&&(te.update(this,this.width,this.height),e._layers=[],c.each(e.boxes,function(t){t._configure&&t._configure(),e._layers.push.apply(e._layers,t._layers())},e),e._layers.forEach(function(t,n){t._idx=n}),R.notify(e,"afterScaleUpdate"),R.notify(e,"afterLayout"))},updateDatasets:function(){if(R.notify(this,"beforeDatasetsUpdate")!==!1){for(var e=0,t=this.data.datasets.length;e<t;++e)this.updateDataset(e);R.notify(this,"afterDatasetsUpdate")}},updateDataset:function(e){var t=this.getDatasetMeta(e),n={meta:t,index:e};R.notify(this,"beforeDatasetUpdate",[n])!==!1&&(t.controller._update(),R.notify(this,"afterDatasetUpdate",[n]))},render:function(e){var t=this;e&&typeof e=="object"||(e={duration:e,lazy:arguments[1]});var n=t.options.animation,i=It(e.duration,n&&n.duration),a=e.lazy;if(R.notify(t,"beforeRender")!==!1){var r=function(s){R.notify(t,"afterRender"),c.callback(n&&n.onComplete,[s],t)};if(n&&i){var o=new pt({numSteps:i/16.66,easing:e.easing||n.easing,render:function(s,l){var u=c.easing.effects[l.easing],d=l.currentStep,h=d/l.numSteps;s.draw(u(h),h,d)},onAnimationProgress:n.onProgress,onAnimationComplete:r});mt.addAnimation(t,o,i,a)}else t.draw(),r(new pt({numSteps:0,chart:t}));return t}},draw:function(e){var t,n,i=this;if(i.clear(),c.isNullOrUndef(e)&&(e=1),i.transition(e),!(i.width<=0||i.height<=0)&&R.notify(i,"beforeDraw",[e])!==!1){for(n=i._layers,t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(i.chartArea);for(i.drawDatasets(e);t<n.length;++t)n[t].draw(i.chartArea);i._drawTooltip(e),R.notify(i,"afterDraw",[e])}},transition:function(e){for(var t=0,n=(this.data.datasets||[]).length;t<n;++t)this.isDatasetVisible(t)&&this.getDatasetMeta(t).controller.transition(e);this.tooltip.transition(e)},_getSortedDatasetMetas:function(e){var t,n,i=[];for(t=0,n=(this.data.datasets||[]).length;t<n;++t)e&&!this.isDatasetVisible(t)||i.push(this.getDatasetMeta(t));return i.sort(Ln("order","index")),i},_getSortedVisibleDatasetMetas:function(){return this._getSortedDatasetMetas(!0)},drawDatasets:function(e){var t,n;if(R.notify(this,"beforeDatasetsDraw",[e])!==!1){for(n=(t=this._getSortedVisibleDatasetMetas()).length-1;n>=0;--n)this.drawDataset(t[n],e);R.notify(this,"afterDatasetsDraw",[e])}},drawDataset:function(e,t){var n={meta:e,index:e.index,easingValue:t};R.notify(this,"beforeDatasetDraw",[n])!==!1&&(e.controller.draw(t),R.notify(this,"afterDatasetDraw",[n]))},_drawTooltip:function(e){var t=this.tooltip,n={tooltip:t,easingValue:e};R.notify(this,"beforeTooltipDraw",[n])!==!1&&(t.draw(),R.notify(this,"afterTooltipDraw",[n]))},getElementAtEvent:function(e){return Ie.modes.single(this,e)},getElementsAtEvent:function(e){return Ie.modes.label(this,e,{intersect:!0})},getElementsAtXAxis:function(e){return Ie.modes["x-axis"](this,e,{intersect:!0})},getElementsAtEventForMode:function(e,t,n){var i=Ie.modes[t];return typeof i=="function"?i(this,e,n):[]},getDatasetAtEvent:function(e){return Ie.modes.dataset(this,e,{intersect:!0})},getDatasetMeta:function(e){var t=this.data.datasets[e];t._meta||(t._meta={});var n=t._meta[this.id];return n||(n=t._meta[this.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t.order||0,index:e}),n},getVisibleDatasetCount:function(){for(var e=0,t=0,n=this.data.datasets.length;t<n;++t)this.isDatasetVisible(t)&&e++;return e},isDatasetVisible:function(e){var t=this.getDatasetMeta(e);return typeof t.hidden=="boolean"?!t.hidden:!this.data.datasets[e].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroyDatasetMeta:function(e){var t=this.id,n=this.data.datasets[e],i=n._meta&&n._meta[t];i&&(i.controller.destroy(),delete n._meta[t])},destroy:function(){var e,t,n=this,i=n.canvas;for(n.stop(),e=0,t=n.data.datasets.length;e<t;++e)n.destroyDatasetMeta(e);i&&(n.unbindEvents(),c.canvas.clear(n),Fe.releaseContext(n.ctx),n.canvas=null,n.ctx=null),R.notify(n,"destroy"),delete ge.instances[n.id]},toBase64Image:function(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){var e=this;e.tooltip=new Tt({_chart:e,_chartInstance:e,_data:e.data,_options:e.options.tooltips},e)},bindEvents:function(){var e=this,t=e._listeners={},n=function(){e.eventHandler.apply(e,arguments)};c.each(e.options.events,function(i){Fe.addEventListener(e,i,n),t[i]=n}),e.options.responsive&&(n=function(){e.resize()},Fe.addEventListener(e,"resize",n),t.resize=n)},unbindEvents:function(){var e=this,t=e._listeners;t&&(delete e._listeners,c.each(t,function(n,i){Fe.removeEventListener(e,i,n)}))},updateHoverStyle:function(e,t,n){var i,a,r,o=n?"set":"remove";for(a=0,r=e.length;a<r;++a)(i=e[a])&&this.getDatasetMeta(i._datasetIndex).controller[o+"HoverStyle"](i);t==="dataset"&&this.getDatasetMeta(e[0]._datasetIndex).controller["_"+o+"DatasetHoverStyle"]()},eventHandler:function(e){var t=this,n=t.tooltip;if(R.notify(t,"beforeEvent",[e])!==!1){t._bufferedRender=!0,t._bufferedRequest=null;var i=t.handleEvent(e);n&&(i=n._start?n.handleEvent(e):i|n.handleEvent(e)),R.notify(t,"afterEvent",[e]);var a=t._bufferedRequest;return a?t.render(a):i&&!t.animating&&(t.stop(),t.render({duration:t.options.hover.animationDuration,lazy:!0})),t._bufferedRender=!1,t._bufferedRequest=null,t}},handleEvent:function(e){var t,n=this,i=n.options||{},a=i.hover;return n.lastActive=n.lastActive||[],e.type==="mouseout"?n.active=[]:n.active=n.getElementsAtEventForMode(e,a.mode,a),c.callback(i.onHover||i.hover.onHover,[e.native,n.active],n),e.type!=="mouseup"&&e.type!=="click"||i.onClick&&i.onClick.call(n,e.native,n.active),n.lastActive.length&&n.updateHoverStyle(n.lastActive,a.mode,!1),n.active.length&&a.mode&&n.updateHoverStyle(n.active,a.mode,!0),t=!c.arrayEquals(n.active,n.lastActive),n.lastActive=n.active,t}}),ge.instances={};var A=ge;ge.Controller=ge,ge.types={},c.configMerge=Ft,c.scaleMerge=In;function we(){throw new Error("This method is not implemented: either no adapter can be found or an incomplete integration was provided.")}function it(e){this.options=e||{}}c.extend(it.prototype,{formats:we,parse:we,format:we,add:we,diff:we,startOf:we,endOf:we,_create:function(e){return e}}),it.override=function(e){c.extend(it.prototype,e)};var Ot={_date:it},Ue={formatters:{values:function(e){return c.isArray(e)?e:""+e},linear:function(e,t,n){var i=n.length>3?n[2]-n[1]:n[1]-n[0];Math.abs(i)>1&&e!==Math.floor(e)&&(i=e-Math.floor(e));var a=c.log10(Math.abs(i)),r="";if(e!==0)if(Math.max(Math.abs(n[0]),Math.abs(n[n.length-1]))<1e-4){var o=c.log10(Math.abs(e)),s=Math.floor(o)-Math.floor(a);s=Math.max(Math.min(s,20),0),r=e.toExponential(s)}else{var l=-1*Math.floor(a);l=Math.max(Math.min(l,20),0),r=e.toFixed(l)}else r="0";return r},logarithmic:function(e,t,n){var i=e/Math.pow(10,Math.floor(c.log10(e)));return e===0?"0":i===1||i===2||i===5||t===0||t===n.length-1?e.toExponential():""}}},Me=c.isArray,Ye=c.isNullOrUndef,Se=c.valueOrDefault,Oe=c.valueAtIndexOrDefault;function Zi(e,t,n){var i,a=e.getTicks().length,r=Math.min(t,a-1),o=e.getPixelForTick(r),s=e._startPixel,l=e._endPixel;if(!(n&&(i=a===1?Math.max(o-s,l-o):t===0?(e.getPixelForTick(1)-o)/2:(o-e.getPixelForTick(r-1))/2,(o+=r<t?i:-i)<s-1e-6||o>l+1e-6)))return o}function Ji(e,t,n,i){var a,r,o,s,l,u,d,h,f,g,p,m,v,x=n.length,b=[],y=[],_=[],k=0,M=0;for(a=0;a<x;++a){if(s=n[a].label,l=n[a].major?t.major:t.minor,e.font=u=l.string,d=i[u]=i[u]||{data:{},gc:[]},h=l.lineHeight,f=g=0,Ye(s)||Me(s)){if(Me(s))for(r=0,o=s.length;r<o;++r)p=s[r],Ye(p)||Me(p)||(f=c.measureText(e,d.data,d.gc,f,p),g+=h)}else f=c.measureText(e,d.data,d.gc,f,s),g=h;b.push(f),y.push(g),_.push(h/2),k=Math.max(f,k),M=Math.max(g,M)}function C(P){return{width:b[P]||0,height:y[P]||0,offset:_[P]||0}}return function(P,w){c.each(P,function(O){var D,T=O.gc,N=T.length/2;if(N>w){for(D=0;D<N;++D)delete O.data[T[D]];T.splice(0,N)}})}(i,x),m=b.indexOf(k),v=y.indexOf(M),{first:C(0),last:C(x-1),widest:C(m),highest:C(v)}}function Ge(e){return e.drawTicks?e.tickMarkLength:0}function Lt(e){var t,n;return e.display?(t=c.options._parseFont(e),n=c.options.toPadding(e.padding),t.lineHeight+n.height):0}function Rn(e,t){return c.extend(c.options._parseFont({fontFamily:Se(t.fontFamily,e.fontFamily),fontSize:Se(t.fontSize,e.fontSize),fontStyle:Se(t.fontStyle,e.fontStyle),lineHeight:Se(t.lineHeight,e.lineHeight)}),{color:c.options.resolve([t.fontColor,e.fontColor,S.global.defaultFontColor])})}function Rt(e){var t=Rn(e,e.minor);return{minor:t,major:e.major.enabled?Rn(e,e.major):t}}function zt(e){var t,n,i,a=[];for(n=0,i=e.length;n<i;++n)(t=e[n])._index!==void 0&&a.push(t);return a}function at(e,t,n,i){var a,r,o,s,l=Se(n,0),u=Math.min(Se(i,e.length),e.length),d=0;for(t=Math.ceil(t),i&&(t=(a=i-n)/Math.floor(a/t)),s=l;s<0;)d++,s=Math.round(l+d*t);for(r=Math.max(l,0);r<u;r++)o=e[r],r===s?(o._index=r,d++,s=Math.round(l+d*t)):delete o.label}S._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:Ue.formatters.values,minor:{},major:{}}});var Nt=re.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 e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]},mergeTicksOptions:function(){},beforeUpdate:function(){c.callback(this.options.beforeUpdate,[this])},update:function(e,t,n){var i,a,r,o,s,l=this,u=l.options.ticks,d=u.sampleSize;if(l.beforeUpdate(),l.maxWidth=e,l.maxHeight=t,l.margins=c.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,a=l.ticks.length;i<a;++i)o.push({value:l.ticks[i],major:!1});return l._ticks=o,s=d<o.length,r=l._convertTicksToLabels(s?function(h,f){for(var g=[],p=h.length/f,m=0,v=h.length;m<v;m+=p)g.push(h[Math.floor(m)]);return g}(o,d):o),l._configure(),l.beforeCalculateTickRotation(),l.calculateTickRotation(),l.afterCalculateTickRotation(),l.beforeFit(),l.fit(),l.afterFit(),l._ticksToDraw=u.display&&(u.autoSkip||u.source==="auto")?l._autoSkip(o):o,s&&(r=l._convertTicksToLabels(l._ticksToDraw)),l.ticks=r,l.afterUpdate(),l.minSize},_configure:function(){var e,t,n=this,i=n.options.ticks.reverse;n.isHorizontal()?(e=n.left,t=n.right):(e=n.top,t=n.bottom,i=!i),n._startPixel=e,n._endPixel=t,n._reversePixels=i,n._length=t-e},afterUpdate:function(){c.callback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){c.callback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var e=this;e.isHorizontal()?(e.width=e.maxWidth,e.left=0,e.right=e.width):(e.height=e.maxHeight,e.top=0,e.bottom=e.height),e.paddingLeft=0,e.paddingTop=0,e.paddingRight=0,e.paddingBottom=0},afterSetDimensions:function(){c.callback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){c.callback(this.options.beforeDataLimits,[this])},determineDataLimits:c.noop,afterDataLimits:function(){c.callback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){c.callback(this.options.beforeBuildTicks,[this])},buildTicks:c.noop,afterBuildTicks:function(e){var t=this;return Me(e)&&e.length?c.callback(t.options.afterBuildTicks,[t,e]):(t.ticks=c.callback(t.options.afterBuildTicks,[t,t.ticks])||t.ticks,e)},beforeTickToLabelConversion:function(){c.callback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var e=this.options.ticks;this.ticks=this.ticks.map(e.userCallback||e.callback,this)},afterTickToLabelConversion:function(){c.callback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){c.callback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var e,t,n,i,a,r,o,s=this,l=s.options,u=l.ticks,d=s.getTicks().length,h=u.minRotation||0,f=u.maxRotation,g=h;!s._isVisible()||!u.display||h>=f||d<=1||!s.isHorizontal()?s.labelRotation=h:(t=(e=s._getLabelSizes()).widest.width,n=e.highest.height-e.highest.offset,i=Math.min(s.maxWidth,s.chart.width-t),t+6>(a=l.offset?s.maxWidth/d:i/(d-1))&&(a=i/(d-(l.offset?.5:1)),r=s.maxHeight-Ge(l.gridLines)-u.padding-Lt(l.scaleLabel),o=Math.sqrt(t*t+n*n),g=c.toDegrees(Math.min(Math.asin(Math.min((e.highest.height+6)/a,1)),Math.asin(Math.min(r/o,1))-Math.asin(n/o))),g=Math.max(h,Math.min(f,g))),s.labelRotation=g)},afterCalculateTickRotation:function(){c.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){c.callback(this.options.beforeFit,[this])},fit:function(){var e=this,t=e.minSize={width:0,height:0},n=e.chart,i=e.options,a=i.ticks,r=i.scaleLabel,o=i.gridLines,s=e._isVisible(),l=i.position==="bottom",u=e.isHorizontal();if(u?t.width=e.maxWidth:s&&(t.width=Ge(o)+Lt(r)),u?s&&(t.height=Ge(o)+Lt(r)):t.height=e.maxHeight,a.display&&s){var d=Rt(a),h=e._getLabelSizes(),f=h.first,g=h.last,p=h.widest,m=h.highest,v=.4*d.minor.lineHeight,x=a.padding;if(u){var b=e.labelRotation!==0,y=c.toRadians(e.labelRotation),_=Math.cos(y),k=Math.sin(y),M=k*p.width+_*(m.height-(b?m.offset:0))+(b?0:v);t.height=Math.min(e.maxHeight,t.height+M+x);var C,P,w=e.getPixelForTick(0)-e.left,O=e.right-e.getPixelForTick(e.getTicks().length-1);b?(C=l?_*f.width+k*f.offset:k*(f.height-f.offset),P=l?k*(g.height-g.offset):_*g.width+k*g.offset):(C=f.width/2,P=g.width/2),e.paddingLeft=Math.max((C-w)*e.width/(e.width-w),0)+3,e.paddingRight=Math.max((P-O)*e.width/(e.width-O),0)+3}else{var D=a.mirror?0:p.width+x+v;t.width=Math.min(e.maxWidth,t.width+D),e.paddingTop=f.height/2,e.paddingBottom=g.height/2}}e.handleMargins(),u?(e.width=e._length=n.width-e.margins.left-e.margins.right,e.height=t.height):(e.width=t.width,e.height=e._length=n.height-e.margins.top-e.margins.bottom)},handleMargins:function(){var e=this;e.margins&&(e.margins.left=Math.max(e.paddingLeft,e.margins.left),e.margins.top=Math.max(e.paddingTop,e.margins.top),e.margins.right=Math.max(e.paddingRight,e.margins.right),e.margins.bottom=Math.max(e.paddingBottom,e.margins.bottom))},afterFit:function(){c.callback(this.options.afterFit,[this])},isHorizontal:function(){var e=this.options.position;return e==="top"||e==="bottom"},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(e){if(Ye(e))return NaN;if((typeof e=="number"||e instanceof Number)&&!isFinite(e))return NaN;if(e){if(this.isHorizontal()){if(e.x!==void 0)return this.getRightValue(e.x)}else if(e.y!==void 0)return this.getRightValue(e.y)}return e},_convertTicksToLabels:function(e){var t,n,i,a=this;for(a.ticks=e.map(function(r){return r.value}),a.beforeTickToLabelConversion(),t=a.convertTicksToLabels(e)||a.ticks,a.afterTickToLabelConversion(),n=0,i=e.length;n<i;++n)e[n].label=t[n];return t},_getLabelSizes:function(){var e=this,t=e._labelSizes;return t||(e._labelSizes=t=Ji(e.ctx,Rt(e.options.ticks),e.getTicks(),e.longestTextCache),e.longestLabelWidth=t.widest.width),t},_parseValue:function(e){var t,n,i,a;return Me(e)?(t=+this.getRightValue(e[0]),n=+this.getRightValue(e[1]),i=Math.min(t,n),a=Math.max(t,n)):(t=void 0,n=e=+this.getRightValue(e),i=e,a=e),{min:i,max:a,start:t,end:n}},_getScaleLabel:function(e){var t=this._parseValue(e);return t.start!==void 0?"["+t.start+", "+t.end+"]":+this.getRightValue(e)},getLabelForIndex:c.noop,getPixelForValue:c.noop,getValueForPixel:c.noop,getPixelForTick:function(e){var t=this.options.offset,n=this._ticks.length,i=1/Math.max(n-(t?0:1),1);return e<0||e>n-1?null:this.getPixelForDecimal(e*i+(t?i/2:0))},getPixelForDecimal:function(e){return this._reversePixels&&(e=1-e),this._startPixel+e*this._length},getDecimalForPixel:function(e){var t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var e=this.min,t=this.max;return this.beginAtZero?0:e<0&&t<0?t:e>0&&t>0?e:0},_autoSkip:function(e){var t,n,i,a,r=this.options.ticks,o=this._length,s=r.maxTicksLimit||o/this._tickSize()+1,l=r.major.enabled?function(f){var g,p,m=[];for(g=0,p=f.length;g<p;g++)f[g].major&&m.push(g);return m}(e):[],u=l.length,d=l[0],h=l[u-1];if(u>s)return function(f,g,p){var m,v,x=0,b=g[0];for(p=Math.ceil(p),m=0;m<f.length;m++)v=f[m],m===b?(v._index=m,b=g[++x*p]):delete v.label}(e,l,u/s),zt(e);if(i=function(f,g,p,m){var v,x,b,y,_=function(M){var C,P,w=M.length;if(w<2)return!1;for(P=M[0],C=1;C<w;++C)if(M[C]-M[C-1]!==P)return!1;return P}(f),k=(g.length-1)/m;if(!_)return Math.max(k,1);for(b=0,y=(v=c.math._factorize(_)).length-1;b<y;b++)if((x=v[b])>k)return x;return Math.max(k,1)}(l,e,0,s),u>0){for(t=0,n=u-1;t<n;t++)at(e,i,l[t],l[t+1]);return a=u>1?(h-d)/(u-1):null,at(e,i,c.isNullOrUndef(a)?0:d-a,d),at(e,i,h,c.isNullOrUndef(a)?e.length:h+a),zt(e)}return at(e,i),zt(e)},_tickSize:function(){var e=this.options.ticks,t=c.toRadians(this.labelRotation),n=Math.abs(Math.cos(t)),i=Math.abs(Math.sin(t)),a=this._getLabelSizes(),r=e.autoSkipPadding||0,o=a?a.widest.width+r:0,s=a?a.highest.height+r:0;return this.isHorizontal()?s*n>o*i?o/n:s/i:s*i<o*n?s/n:o/i},_isVisible:function(){var e,t,n,i=this.chart,a=this.options.display;if(a!=="auto")return!!a;for(e=0,t=i.data.datasets.length;e<t;++e)if(i.isDatasetVisible(e)&&((n=i.getDatasetMeta(e)).xAxisID===this.id||n.yAxisID===this.id))return!0;return!1},_computeGridLineItems:function(e){var t,n,i,a,r,o,s,l,u,d,h,f,g,p,m,v,x,b=this,y=b.chart,_=b.options,k=_.gridLines,M=_.position,C=k.offsetGridLines,P=b.isHorizontal(),w=b._ticksToDraw,O=w.length+(C?1:0),D=Ge(k),T=[],N=k.drawBorder?Oe(k.lineWidth,0,0):0,I=N/2,L=c._alignPixel,E=function(W){return L(y,W,N)};for(M==="top"?(t=E(b.bottom),s=b.bottom-D,u=t-I,h=E(e.top)+I,g=e.bottom):M==="bottom"?(t=E(b.top),h=e.top,g=E(e.bottom)-I,s=t+I,u=b.top+D):M==="left"?(t=E(b.right),o=b.right-D,l=t-I,d=E(e.left)+I,f=e.right):(t=E(b.left),d=e.left,f=E(e.right)-I,o=t+I,l=b.left+D),n=0;n<O;++n)i=w[n]||{},Ye(i.label)&&n<w.length||(n===b.zeroLineIndex&&_.offset===C?(p=k.zeroLineWidth,m=k.zeroLineColor,v=k.zeroLineBorderDash||[],x=k.zeroLineBorderDashOffset||0):(p=Oe(k.lineWidth,n,1),m=Oe(k.color,n,"rgba(0,0,0,0.1)"),v=k.borderDash||[],x=k.borderDashOffset||0),(a=Zi(b,i._index||n,C))!==void 0&&(r=L(y,a,p),P?o=l=d=f=r:s=u=h=g=r,T.push({tx1:o,ty1:s,tx2:l,ty2:u,x1:d,y1:h,x2:f,y2:g,width:p,color:m,borderDash:v,borderDashOffset:x})));return T.ticksLength=O,T.borderValue=t,T},_computeLabelItems:function(){var e,t,n,i,a,r,o,s,l,u,d,h,f=this,g=f.options,p=g.ticks,m=g.position,v=p.mirror,x=f.isHorizontal(),b=f._ticksToDraw,y=Rt(p),_=p.padding,k=Ge(g.gridLines),M=-c.toRadians(f.labelRotation),C=[];for(m==="top"?(r=f.bottom-k-_,o=M?"left":"center"):m==="bottom"?(r=f.top+k+_,o=M?"right":"center"):m==="left"?(a=f.right-(v?0:k)-_,o=v?"left":"right"):(a=f.left+(v?0:k)+_,o=v?"right":"left"),e=0,t=b.length;e<t;++e)i=(n=b[e]).label,Ye(i)||(s=f.getPixelForTick(n._index||e)+p.labelOffset,u=(l=n.major?y.major:y.minor).lineHeight,d=Me(i)?i.length:1,x?(a=s,h=m==="top"?((M?1:.5)-d)*u:(M?0:.5)*u):(r=s,h=(1-d)*u/2),C.push({x:a,y:r,rotation:M,label:i,font:l,textOffset:h,textAlign:o}));return C},_drawGrid:function(e){var t=this,n=t.options.gridLines;if(n.display){var i,a,r,o,s,l=t.ctx,u=t.chart,d=c._alignPixel,h=n.drawBorder?Oe(n.lineWidth,0,0):0,f=t._gridLineItems||(t._gridLineItems=t._computeGridLineItems(e));for(r=0,o=f.length;r<o;++r)i=(s=f[r]).width,a=s.color,i&&a&&(l.save(),l.lineWidth=i,l.strokeStyle=a,l.setLineDash&&(l.setLineDash(s.borderDash),l.lineDashOffset=s.borderDashOffset),l.beginPath(),n.drawTicks&&(l.moveTo(s.tx1,s.ty1),l.lineTo(s.tx2,s.ty2)),n.drawOnChartArea&&(l.moveTo(s.x1,s.y1),l.lineTo(s.x2,s.y2)),l.stroke(),l.restore());if(h){var g,p,m,v,x=h,b=Oe(n.lineWidth,f.ticksLength-1,1),y=f.borderValue;t.isHorizontal()?(g=d(u,t.left,x)-x/2,p=d(u,t.right,b)+b/2,m=v=y):(m=d(u,t.top,x)-x/2,v=d(u,t.bottom,b)+b/2,g=p=y),l.lineWidth=h,l.strokeStyle=Oe(n.color,0),l.beginPath(),l.moveTo(g,m),l.lineTo(p,v),l.stroke()}}},_drawLabels:function(){var e=this;if(e.options.ticks.display){var t,n,i,a,r,o,s,l,u=e.ctx,d=e._labelItems||(e._labelItems=e._computeLabelItems());for(t=0,i=d.length;t<i;++t){if(o=(r=d[t]).font,u.save(),u.translate(r.x,r.y),u.rotate(r.rotation),u.font=o.string,u.fillStyle=o.color,u.textBaseline="middle",u.textAlign=r.textAlign,s=r.label,l=r.textOffset,Me(s))for(n=0,a=s.length;n<a;++n)u.fillText(""+s[n],0,l),l+=o.lineHeight;else u.fillText(s,0,l);u.restore()}}},_drawTitle:function(){var e=this,t=e.ctx,n=e.options,i=n.scaleLabel;if(i.display){var a,r,o=Se(i.fontColor,S.global.defaultFontColor),s=c.options._parseFont(i),l=c.options.toPadding(i.padding),u=s.lineHeight/2,d=n.position,h=0;if(e.isHorizontal())a=e.left+e.width/2,r=d==="bottom"?e.bottom-u-l.bottom:e.top+u+l.top;else{var f=d==="left";a=f?e.left+u+l.top:e.right-u-l.top,r=e.top+e.height/2,h=f?-.5*Math.PI:.5*Math.PI}t.save(),t.translate(a,r),t.rotate(h),t.textAlign="center",t.textBaseline="middle",t.fillStyle=o,t.font=s.string,t.fillText(i.labelString,0,0),t.restore()}},draw:function(e){this._isVisible()&&(this._drawGrid(e),this._drawTitle(),this._drawLabels())},_layers:function(){var e=this,t=e.options,n=t.ticks&&t.ticks.z||0,i=t.gridLines&&t.gridLines.z||0;return e._isVisible()&&n!==i&&e.draw===e._draw?[{z:i,draw:function(){e._drawGrid.apply(e,arguments),e._drawTitle.apply(e,arguments)}},{z:n,draw:function(){e._drawLabels.apply(e,arguments)}}]:[{z:n,draw:function(){e.draw.apply(e,arguments)}}]},_getMatchingVisibleMetas:function(e){var t=this,n=t.isHorizontal();return t.chart._getSortedVisibleDatasetMetas().filter(function(i){return(!e||i.type===e)&&(n?i.xAxisID===t.id:i.yAxisID===t.id)})}});Nt.prototype._draw=Nt.prototype.draw;var G=Nt,Bt=c.isNullOrUndef,zn=G.extend({determineDataLimits:function(){var e,t=this,n=t._getLabels(),i=t.options.ticks,a=i.min,r=i.max,o=0,s=n.length-1;a!==void 0&&(e=n.indexOf(a))>=0&&(o=e),r!==void 0&&(e=n.indexOf(r))>=0&&(s=e),t.minIndex=o,t.maxIndex=s,t.min=n[o],t.max=n[s]},buildTicks:function(){var e=this._getLabels(),t=this.minIndex,n=this.maxIndex;this.ticks=t===0&&n===e.length-1?e:e.slice(t,n+1)},getLabelForIndex:function(e,t){var n=this.chart;return n.getDatasetMeta(t).controller._getValueScaleId()===this.id?this.getRightValue(n.data.datasets[t].data[e]):this._getLabels()[e]},_configure:function(){var e=this,t=e.options.offset,n=e.ticks;G.prototype._configure.call(e),e.isHorizontal()||(e._reversePixels=!e._reversePixels),n&&(e._startValue=e.minIndex-(t?.5:0),e._valueRange=Math.max(n.length-(t?0:1),1))},getPixelForValue:function(e,t,n){var i,a,r,o=this;return Bt(t)||Bt(n)||(e=o.chart.data.datasets[n].data[t]),Bt(e)||(i=o.isHorizontal()?e.x:e.y),(i!==void 0||e!==void 0&&isNaN(t))&&(a=o._getLabels(),e=c.valueOrDefault(i,e),t=(r=a.indexOf(e))!==-1?r:t,isNaN(t)&&(t=e)),o.getPixelForDecimal((t-o._startValue)/o._valueRange)},getPixelForTick:function(e){var t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e],e+this.minIndex)},getValueForPixel:function(e){var t=Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange);return Math.min(Math.max(t,0),this.ticks.length-1)},getBasePixel:function(){return this.bottom}}),Qi={position:"bottom"};zn._defaults=Qi;var ea=c.noop,Ce=c.isNullOrUndef,rt=G.extend({getRightValue:function(e){return typeof e=="string"?+e:G.prototype.getRightValue.call(this,e)},handleTickRangeOptions:function(){var e=this,t=e.options.ticks;if(t.beginAtZero){var n=c.sign(e.min),i=c.sign(e.max);n<0&&i<0?e.max=0:n>0&&i>0&&(e.min=0)}var a=t.min!==void 0||t.suggestedMin!==void 0,r=t.max!==void 0||t.suggestedMax!==void 0;t.min!==void 0?e.min=t.min:t.suggestedMin!==void 0&&(e.min===null?e.min=t.suggestedMin:e.min=Math.min(e.min,t.suggestedMin)),t.max!==void 0?e.max=t.max:t.suggestedMax!==void 0&&(e.max===null?e.max=t.suggestedMax:e.max=Math.max(e.max,t.suggestedMax)),a!==r&&e.min>=e.max&&(a?e.max=e.min+1:e.min=e.max-1),e.min===e.max&&(e.max++,t.beginAtZero||e.min--)},getTickLimit:function(){var e,t=this.options.ticks,n=t.stepSize,i=t.maxTicksLimit;return n?e=Math.ceil(this.max/n)-Math.floor(this.min/n)+1:(e=this._computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:ea,buildTicks:function(){var e=this,t=e.options.ticks,n=e.getTickLimit(),i={maxTicks:n=Math.max(2,n),min:t.min,max:t.max,precision:t.precision,stepSize:c.valueOrDefault(t.fixedStepSize,t.stepSize)},a=e.ticks=function(r,o){var s,l,u,d,h=[],f=r.stepSize,g=f||1,p=r.maxTicks-1,m=r.min,v=r.max,x=r.precision,b=o.min,y=o.max,_=c.niceNum((y-b)/p/g)*g;if(_<1e-14&&Ce(m)&&Ce(v))return[b,y];(d=Math.ceil(y/_)-Math.floor(b/_))>p&&(_=c.niceNum(d*_/p/g)*g),f||Ce(x)?s=Math.pow(10,c._decimalPlaces(_)):(s=Math.pow(10,x),_=Math.ceil(_*s)/s),l=Math.floor(b/_)*_,u=Math.ceil(y/_)*_,f&&(!Ce(m)&&c.almostWhole(m/_,_/1e3)&&(l=m),!Ce(v)&&c.almostWhole(v/_,_/1e3)&&(u=v)),d=(u-l)/_,d=c.almostEquals(d,Math.round(d),_/1e3)?Math.round(d):Math.ceil(d),l=Math.round(l*s)/s,u=Math.round(u*s)/s,h.push(Ce(m)?l:m);for(var k=1;k<d;++k)h.push(Math.round((l+k*_)*s)/s);return h.push(Ce(v)?u:v),h}(i,e);e.handleDirectionalChanges(),e.max=c.max(a),e.min=c.min(a),t.reverse?(a.reverse(),e.start=e.max,e.end=e.min):(e.start=e.min,e.end=e.max)},convertTicksToLabels:function(){var e=this;e.ticksAsNumbers=e.ticks.slice(),e.zeroLineIndex=e.ticks.indexOf(0),G.prototype.convertTicksToLabels.call(e)},_configure:function(){var e,t=this,n=t.getTicks(),i=t.min,a=t.max;G.prototype._configure.call(t),t.options.offset&&n.length&&(i-=e=(a-i)/Math.max(n.length-1,1)/2,a+=e),t._startValue=i,t._endValue=a,t._valueRange=a-i}}),ta={position:"left",ticks:{callback:Ue.formatters.linear}};function na(e,t,n,i){var a,r,o=e.options,s=function(h,f,g){var p=[g.type,f===void 0&&g.stack===void 0?g.index:"",g.stack].join(".");return h[p]===void 0&&(h[p]={pos:[],neg:[]}),h[p]}(t,o.stacked,n),l=s.pos,u=s.neg,d=i.length;for(a=0;a<d;++a)r=e._parseValue(i[a]),isNaN(r.min)||isNaN(r.max)||n.data[a].hidden||(l[a]=l[a]||0,u[a]=u[a]||0,o.relativePoints?l[a]=100:r.min<0||r.max<0?u[a]+=r.min:l[a]+=r.max)}function ia(e,t,n){var i,a,r=n.length;for(i=0;i<r;++i)a=e._parseValue(n[i]),isNaN(a.min)||isNaN(a.max)||t.data[i].hidden||(e.min=Math.min(e.min,a.min),e.max=Math.max(e.max,a.max))}var Nn=rt.extend({determineDataLimits:function(){var e,t,n,i,a=this,r=a.options,o=a.chart.data.datasets,s=a._getMatchingVisibleMetas(),l=r.stacked,u={},d=s.length;if(a.min=Number.POSITIVE_INFINITY,a.max=Number.NEGATIVE_INFINITY,l===void 0)for(e=0;!l&&e<d;++e)l=(t=s[e]).stack!==void 0;for(e=0;e<d;++e)n=o[(t=s[e]).index].data,l?na(a,u,t,n):ia(a,t,n);c.each(u,function(h){i=h.pos.concat(h.neg),a.min=Math.min(a.min,c.min(i)),a.max=Math.max(a.max,c.max(i))}),a.min=c.isFinite(a.min)&&!isNaN(a.min)?a.min:0,a.max=c.isFinite(a.max)&&!isNaN(a.max)?a.max:1,a.handleTickRangeOptions()},_computeTickLimit:function(){var e;return this.isHorizontal()?Math.ceil(this.width/40):(e=c.options._parseFont(this.options.ticks),Math.ceil(this.height/e.lineHeight))},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(e,t){return this._getScaleLabel(this.chart.data.datasets[t].data[e])},getPixelForValue:function(e){return this.getPixelForDecimal((+this.getRightValue(e)-this._startValue)/this._valueRange)},getValueForPixel:function(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange},getPixelForTick:function(e){var t=this.ticksAsNumbers;return e<0||e>t.length-1?null:this.getPixelForValue(t[e])}}),aa=ta;Nn._defaults=aa;var Et=c.valueOrDefault,X=c.math.log10,ra={position:"left",ticks:{callback:Ue.formatters.logarithmic}};function ot(e,t){return c.isFinite(e)&&e>=0?e:t}var Bn=G.extend({determineDataLimits:function(){var e,t,n,i,a,r,o=this,s=o.options,l=o.chart,u=l.data.datasets,d=o.isHorizontal();function h(v){return d?v.xAxisID===o.id:v.yAxisID===o.id}o.min=Number.POSITIVE_INFINITY,o.max=Number.NEGATIVE_INFINITY,o.minNotZero=Number.POSITIVE_INFINITY;var f=s.stacked;if(f===void 0){for(e=0;e<u.length;e++)if(t=l.getDatasetMeta(e),l.isDatasetVisible(e)&&h(t)&&t.stack!==void 0){f=!0;break}}if(s.stacked||f){var g={};for(e=0;e<u.length;e++){var p=[(t=l.getDatasetMeta(e)).type,s.stacked===void 0&&t.stack===void 0?e:"",t.stack].join(".");if(l.isDatasetVisible(e)&&h(t))for(g[p]===void 0&&(g[p]=[]),a=0,r=(i=u[e].data).length;a<r;a++){var m=g[p];n=o._parseValue(i[a]),isNaN(n.min)||isNaN(n.max)||t.data[a].hidden||n.min<0||n.max<0||(m[a]=m[a]||0,m[a]+=n.max)}}c.each(g,function(v){if(v.length>0){var x=c.min(v),b=c.max(v);o.min=Math.min(o.min,x),o.max=Math.max(o.max,b)}})}else for(e=0;e<u.length;e++)if(t=l.getDatasetMeta(e),l.isDatasetVisible(e)&&h(t))for(a=0,r=(i=u[e].data).length;a<r;a++)n=o._parseValue(i[a]),isNaN(n.min)||isNaN(n.max)||t.data[a].hidden||n.min<0||n.max<0||(o.min=Math.min(n.min,o.min),o.max=Math.max(n.max,o.max),n.min!==0&&(o.minNotZero=Math.min(n.min,o.minNotZero)));o.min=c.isFinite(o.min)?o.min:null,o.max=c.isFinite(o.max)?o.max:null,o.minNotZero=c.isFinite(o.minNotZero)?o.minNotZero:null,this.handleTickRangeOptions()},handleTickRangeOptions:function(){var e=this,t=e.options.ticks;e.min=ot(t.min,e.min),e.max=ot(t.max,e.max),e.min===e.max&&(e.min!==0&&e.min!==null?(e.min=Math.pow(10,Math.floor(X(e.min))-1),e.max=Math.pow(10,Math.floor(X(e.max))+1)):(e.min=1,e.max=10)),e.min===null&&(e.min=Math.pow(10,Math.floor(X(e.max))-1)),e.max===null&&(e.max=e.min!==0?Math.pow(10,Math.floor(X(e.min))+1):10),e.minNotZero===null&&(e.min>0?e.minNotZero=e.min:e.max<1?e.minNotZero=Math.pow(10,Math.floor(X(e.max))):e.minNotZero=1)},buildTicks:function(){var e=this,t=e.options.ticks,n=!e.isHorizontal(),i={min:ot(t.min),max:ot(t.max)},a=e.ticks=function(r,o){var s,l,u=[],d=Et(r.min,Math.pow(10,Math.floor(X(o.min)))),h=Math.floor(X(o.max)),f=Math.ceil(o.max/Math.pow(10,h));d===0?(s=Math.floor(X(o.minNotZero)),l=Math.floor(o.minNotZero/Math.pow(10,s)),u.push(d),d=l*Math.pow(10,s)):(s=Math.floor(X(d)),l=Math.floor(d/Math.pow(10,s)));var g=s<0?Math.pow(10,Math.abs(s)):1;do u.push(d),++l==10&&(l=1,g=++s>=0?1:g),d=Math.round(l*Math.pow(10,s)*g)/g;while(s<h||s===h&&l<f);var p=Et(r.max,d);return u.push(p),u}(i,e);e.max=c.max(a),e.min=c.min(a),t.reverse?(n=!n,e.start=e.max,e.end=e.min):(e.start=e.min,e.end=e.max),n&&a.reverse()},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),G.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(e,t){return this._getScaleLabel(this.chart.data.datasets[t].data[e])},getPixelForTick:function(e){var t=this.tickValues;return e<0||e>t.length-1?null:this.getPixelForValue(t[e])},_getFirstTickValue:function(e){var t=Math.floor(X(e));return Math.floor(e/Math.pow(10,t))*Math.pow(10,t)},_configure:function(){var e=this,t=e.min,n=0;G.prototype._configure.call(e),t===0&&(t=e._getFirstTickValue(e.minNotZero),n=Et(e.options.ticks.fontSize,S.global.defaultFontSize)/e._length),e._startValue=X(t),e._valueOffset=n,e._valueRange=(X(e.max)-X(t))/(1-n)},getPixelForValue:function(e){var t=this,n=0;return(e=+t.getRightValue(e))>t.min&&e>0&&(n=(X(e)-t._startValue)/t._valueRange+t._valueOffset),t.getPixelForDecimal(n)},getValueForPixel:function(e){var t=this,n=t.getDecimalForPixel(e);return n===0&&t.min===0?0:Math.pow(10,t._startValue+(n-t._valueOffset)*t._valueRange)}}),oa=ra;Bn._defaults=oa;var st=c.valueOrDefault,Wt=c.valueAtIndexOrDefault,En=c.options.resolve,sa={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:Ue.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(e){return e}}};function Vt(e){var t=e.ticks;return t.display&&e.display?st(t.fontSize,S.global.defaultFontSize)+2*t.backdropPaddingY:0}function Wn(e,t,n,i,a){return e===i||e===a?{start:t-n/2,end:t+n/2}:e<i||e>a?{start:t-n,end:t}:{start:t,end:t+n}}function la(e){return e===0||e===180?"center":e<180?"left":"right"}function ua(e,t,n,i){var a,r,o=n.y+i/2;if(c.isArray(t))for(a=0,r=t.length;a<r;++a)e.fillText(t[a],n.x,o),o+=i;else e.fillText(t,n.x,o)}function da(e,t,n){e===90||e===270?n.y-=t.h/2:(e>270||e<90)&&(n.y-=t.h)}function lt(e){return c.isNumber(e)?e:0}var Vn=rt.extend({setDimensions:function(){var e=this;e.width=e.maxWidth,e.height=e.maxHeight,e.paddingTop=Vt(e.options)/2,e.xCenter=Math.floor(e.width/2),e.yCenter=Math.floor((e.height-e.paddingTop)/2),e.drawingArea=Math.min(e.height-e.paddingTop,e.width)/2},determineDataLimits:function(){var e=this,t=e.chart,n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;c.each(t.data.datasets,function(a,r){if(t.isDatasetVisible(r)){var o=t.getDatasetMeta(r);c.each(a.data,function(s,l){var u=+e.getRightValue(s);isNaN(u)||o.data[l].hidden||(n=Math.min(u,n),i=Math.max(u,i))})}}),e.min=n===Number.POSITIVE_INFINITY?0:n,e.max=i===Number.NEGATIVE_INFINITY?0:i,e.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/Vt(this.options))},convertTicksToLabels:function(){var e=this;rt.prototype.convertTicksToLabels.call(e),e.pointLabels=e.chart.data.labels.map(function(){var t=c.callback(e.options.pointLabels.callback,arguments,e);return t||t===0?t:""})},getLabelForIndex:function(e,t){return+this.getRightValue(this.chart.data.datasets[t].data[e])},fit:function(){var e=this.options;e.display&&e.pointLabels.display?function(t){var n,i,a,r=c.options._parseFont(t.options.pointLabels),o={l:0,r:t.width,t:0,b:t.height-t.paddingTop},s={};t.ctx.font=r.string,t._pointLabelSizes=[];var l,u,d,h=t.chart.data.labels.length;for(n=0;n<h;n++){a=t.getPointPosition(n,t.drawingArea+5),l=t.ctx,u=r.lineHeight,d=t.pointLabels[n],i=c.isArray(d)?{w:c.longestText(l,l.font,d),h:d.length*u}:{w:l.measureText(d).width,h:u},t._pointLabelSizes[n]=i;var f=t.getIndexAngle(n),g=c.toDegrees(f)%360,p=Wn(g,a.x,i.w,0,180),m=Wn(g,a.y,i.h,90,270);p.start<o.l&&(o.l=p.start,s.l=f),p.end>o.r&&(o.r=p.end,s.r=f),m.start<o.t&&(o.t=m.start,s.t=f),m.end>o.b&&(o.b=m.end,s.b=f)}t.setReductions(t.drawingArea,o,s)}(this):this.setCenterPoint(0,0,0,0)},setReductions:function(e,t,n){var i=this,a=t.l/Math.sin(n.l),r=Math.max(t.r-i.width,0)/Math.sin(n.r),o=-t.t/Math.cos(n.t),s=-Math.max(t.b-(i.height-i.paddingTop),0)/Math.cos(n.b);a=lt(a),r=lt(r),o=lt(o),s=lt(s),i.drawingArea=Math.min(Math.floor(e-(a+r)/2),Math.floor(e-(o+s)/2)),i.setCenterPoint(a,r,o,s)},setCenterPoint:function(e,t,n,i){var a=this,r=a.width-t-a.drawingArea,o=e+a.drawingArea,s=n+a.drawingArea,l=a.height-a.paddingTop-i-a.drawingArea;a.xCenter=Math.floor((o+r)/2+a.left),a.yCenter=Math.floor((s+l)/2+a.top+a.paddingTop)},getIndexAngle:function(e){var t=this.chart,n=(e*(360/t.data.labels.length)+((t.options||{}).startAngle||0))%360;return(n<0?n+360:n)*Math.PI*2/360},getDistanceFromCenterForValue:function(e){var t=this;if(c.isNullOrUndef(e))return NaN;var n=t.drawingArea/(t.max-t.min);return t.options.ticks.reverse?(t.max-e)*n:(e-t.min)*n},getPointPosition:function(e,t){var n=this.getIndexAngle(e)-Math.PI/2;return{x:Math.cos(n)*t+this.xCenter,y:Math.sin(n)*t+this.yCenter}},getPointPositionForValue:function(e,t){return this.getPointPosition(e,this.getDistanceFromCenterForValue(t))},getBasePosition:function(e){var t=this.min,n=this.max;return this.getPointPositionForValue(e||0,this.beginAtZero?0:t<0&&n<0?n:t>0&&n>0?t:0)},_drawGrid:function(){var e,t,n,i=this,a=i.ctx,r=i.options,o=r.gridLines,s=r.angleLines,l=st(s.lineWidth,o.lineWidth),u=st(s.color,o.color);if(r.pointLabels.display&&function(d){var h=d.ctx,f=d.options,g=f.pointLabels,p=Vt(f),m=d.getDistanceFromCenterForValue(f.ticks.reverse?d.min:d.max),v=c.options._parseFont(g);h.save(),h.font=v.string,h.textBaseline="middle";for(var x=d.chart.data.labels.length-1;x>=0;x--){var b=x===0?p/2:0,y=d.getPointPosition(x,m+b+5),_=Wt(g.fontColor,x,S.global.defaultFontColor);h.fillStyle=_;var k=d.getIndexAngle(x),M=c.toDegrees(k);h.textAlign=la(M),da(M,d._pointLabelSizes[x],y),ua(h,d.pointLabels[x],y,v.lineHeight)}h.restore()}(i),o.display&&c.each(i.ticks,function(d,h){h!==0&&(t=i.getDistanceFromCenterForValue(i.ticksAsNumbers[h]),function(f,g,p,m){var v,x=f.ctx,b=g.circular,y=f.chart.data.labels.length,_=Wt(g.color,m-1),k=Wt(g.lineWidth,m-1);if((b||y)&&_&&k){if(x.save(),x.strokeStyle=_,x.lineWidth=k,x.setLineDash&&(x.setLineDash(g.borderDash||[]),x.lineDashOffset=g.borderDashOffset||0),x.beginPath(),b)x.arc(f.xCenter,f.yCenter,p,0,2*Math.PI);else{v=f.getPointPosition(0,p),x.moveTo(v.x,v.y);for(var M=1;M<y;M++)v=f.getPointPosition(M,p),x.lineTo(v.x,v.y)}x.closePath(),x.stroke(),x.restore()}}(i,o,t,h))}),s.display&&l&&u){for(a.save(),a.lineWidth=l,a.strokeStyle=u,a.setLineDash&&(a.setLineDash(En([s.borderDash,o.borderDash,[]])),a.lineDashOffset=En([s.borderDashOffset,o.borderDashOffset,0])),e=i.chart.data.labels.length-1;e>=0;e--)t=i.getDistanceFromCenterForValue(r.ticks.reverse?i.min:i.max),n=i.getPointPosition(e,t),a.beginPath(),a.moveTo(i.xCenter,i.yCenter),a.lineTo(n.x,n.y),a.stroke();a.restore()}},_drawLabels:function(){var e=this,t=e.ctx,n=e.options.ticks;if(n.display){var i,a,r=e.getIndexAngle(0),o=c.options._parseFont(n),s=st(n.fontColor,S.global.defaultFontColor);t.save(),t.font=o.string,t.translate(e.xCenter,e.yCenter),t.rotate(r),t.textAlign="center",t.textBaseline="middle",c.each(e.ticks,function(l,u){(u!==0||n.reverse)&&(i=e.getDistanceFromCenterForValue(e.ticksAsNumbers[u]),n.showLabelBackdrop&&(a=t.measureText(l).width,t.fillStyle=n.backdropColor,t.fillRect(-a/2-n.backdropPaddingX,-i-o.size/2-n.backdropPaddingY,a+2*n.backdropPaddingX,o.size+2*n.backdropPaddingY)),t.fillStyle=s,t.fillText(l,0,-i))}),t.restore()}},_drawTitle:c.noop}),ha=sa;Vn._defaults=ha;var Ht=c._deprecated,Hn=c.options.resolve,ca=c.valueOrDefault,jn=Number.MIN_SAFE_INTEGER||-9007199254740991,jt=Number.MAX_SAFE_INTEGER||9007199254740991,ut={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}},K=Object.keys(ut);function qn(e,t){return e-t}function Un(e){return c.valueOrDefault(e.time.min,e.ticks.min)}function Yn(e){return c.valueOrDefault(e.time.max,e.ticks.max)}function Le(e,t,n,i){var a=function(d,h,f){for(var g,p,m,v=0,x=d.length-1;v>=0&&v<=x;){if(p=d[(g=v+x>>1)-1]||null,m=d[g],!p)return{lo:null,hi:m};if(m[h]<f)v=g+1;else{if(!(p[h]>f))return{lo:p,hi:m};x=g-1}}return{lo:m,hi:null}}(e,t,n),r=a.lo?a.hi?a.lo:e[e.length-2]:e[0],o=a.lo?a.hi?a.hi:e[e.length-1]:e[1],s=o[t]-r[t],l=s?(n-r[t])/s:0,u=(o[i]-r[i])*l;return r[i]+u}function qt(e,t){var n=e._adapter,i=e.options.time,a=i.parser,r=a||i.format,o=t;return typeof a=="function"&&(o=a(o)),c.isFinite(o)||(o=typeof r=="string"?n.parse(o,r):n.parse(o)),o!==null?+o:(a||typeof r!="function"||(o=r(t),c.isFinite(o)||(o=n.parse(o))),o)}function Pe(e,t){if(c.isNullOrUndef(t))return null;var n=e.options.time,i=qt(e,e.getRightValue(t));return i===null||n.round&&(i=+e._adapter.startOf(i,n.round)),i}function Gn(e,t,n,i){var a,r,o,s=K.length;for(a=K.indexOf(e);a<s-1;++a)if(o=(r=ut[K[a]]).steps?r.steps:jt,r.common&&Math.ceil((n-t)/(o*r.size))<=i)return K[a];return K[s-1]}function Xn(e,t,n){var i,a,r=[],o={},s=t.length;for(i=0;i<s;++i)o[a=t[i]]=i,r.push({value:a,major:!1});return s!==0&&n?function(l,u,d,h){var f,g,p=l._adapter,m=+p.startOf(u[0].value,h),v=u[u.length-1].value;for(f=m;f<=v;f=+p.add(f,1,h))(g=d[f])>=0&&(u[g].major=!0);return u}(e,r,o,n):r}var Kn=G.extend({initialize:function(){this.mergeTicksOptions(),G.prototype.initialize.call(this)},update:function(){var e=this,t=e.options,n=t.time||(t.time={}),i=e._adapter=new Ot._date(t.adapters.date);return Ht("time scale",n.format,"time.format","time.parser"),Ht("time scale",n.min,"time.min","ticks.min"),Ht("time scale",n.max,"time.max","ticks.max"),c.mergeIf(n.displayFormats,i.formats()),G.prototype.update.apply(e,arguments)},getRightValue:function(e){return e&&e.t!==void 0&&(e=e.t),G.prototype.getRightValue.call(this,e)},determineDataLimits:function(){var e,t,n,i,a,r,o,s=this,l=s.chart,u=s._adapter,d=s.options,h=d.time.unit||"day",f=jt,g=jn,p=[],m=[],v=[],x=s._getLabels();for(e=0,n=x.length;e<n;++e)v.push(Pe(s,x[e]));for(e=0,n=(l.data.datasets||[]).length;e<n;++e)if(l.isDatasetVisible(e))if(a=l.data.datasets[e].data,c.isObject(a[0]))for(m[e]=[],t=0,i=a.length;t<i;++t)r=Pe(s,a[t]),p.push(r),m[e][t]=r;else m[e]=v.slice(0),o||(p=p.concat(v),o=!0);else m[e]=[];v.length&&(f=Math.min(f,v[0]),g=Math.max(g,v[v.length-1])),p.length&&(p=n>1?function(b){var y,_,k,M={},C=[];for(y=0,_=b.length;y<_;++y)M[k=b[y]]||(M[k]=!0,C.push(k));return C}(p).sort(qn):p.sort(qn),f=Math.min(f,p[0]),g=Math.max(g,p[p.length-1])),f=Pe(s,Un(d))||f,g=Pe(s,Yn(d))||g,f=f===jt?+u.startOf(Date.now(),h):f,g=g===jn?+u.endOf(Date.now(),h)+1:g,s.min=Math.min(f,g),s.max=Math.max(f+1,g),s._table=[],s._timestamps={data:p,datasets:m,labels:v}},buildTicks:function(){var e,t,n,i=this,a=i.min,r=i.max,o=i.options,s=o.ticks,l=o.time,u=i._timestamps,d=[],h=i.getLabelCapacity(a),f=s.source,g=o.distribution;for(u=f==="data"||f==="auto"&&g==="series"?u.data:f==="labels"?u.labels:function(p,m,v,x){var b,y=p._adapter,_=p.options,k=_.time,M=k.unit||Gn(k.minUnit,m,v,x),C=Hn([k.stepSize,k.unitStepSize,1]),P=M==="week"&&k.isoWeekday,w=m,O=[];if(P&&(w=+y.startOf(w,"isoWeek",P)),w=+y.startOf(w,P?"day":M),y.diff(v,m,M)>1e5*C)throw m+" and "+v+" are too far apart with stepSize of "+C+" "+M;for(b=w;b<v;b=+y.add(b,C,M))O.push(b);return b!==v&&_.bounds!=="ticks"||O.push(b),O}(i,a,r,h),o.bounds==="ticks"&&u.length&&(a=u[0],r=u[u.length-1]),a=Pe(i,Un(o))||a,r=Pe(i,Yn(o))||r,e=0,t=u.length;e<t;++e)(n=u[e])>=a&&n<=r&&d.push(n);return i.min=a,i.max=r,i._unit=l.unit||(s.autoSkip?Gn(l.minUnit,i.min,i.max,h):function(p,m,v,x,b){var y,_;for(y=K.length-1;y>=K.indexOf(v);y--)if(_=K[y],ut[_].common&&p._adapter.diff(b,x,_)>=m-1)return _;return K[v?K.indexOf(v):0]}(i,d.length,l.minUnit,i.min,i.max)),i._majorUnit=s.major.enabled&&i._unit!=="year"?function(p){for(var m=K.indexOf(p)+1,v=K.length;m<v;++m)if(ut[K[m]].common)return K[m]}(i._unit):void 0,i._table=function(p,m,v,x){if(x==="linear"||!p.length)return[{time:m,pos:0},{time:v,pos:1}];var b,y,_,k,M,C=[],P=[m];for(b=0,y=p.length;b<y;++b)(k=p[b])>m&&k<v&&P.push(k);for(P.push(v),b=0,y=P.length;b<y;++b)M=P[b+1],_=P[b-1],k=P[b],_!==void 0&&M!==void 0&&Math.round((M+_)/2)===k||C.push({time:k,pos:b/(y-1)});return C}(i._timestamps.data,a,r,g),i._offsets=function(p,m,v,x,b){var y,_,k=0,M=0;return b.offset&&m.length&&(y=Le(p,"time",m[0],"pos"),k=m.length===1?1-y:(Le(p,"time",m[1],"pos")-y)/2,_=Le(p,"time",m[m.length-1],"pos"),M=m.length===1?_:(_-Le(p,"time",m[m.length-2],"pos"))/2),{start:k,end:M,factor:1/(k+1+M)}}(i._table,d,0,0,o),s.reverse&&d.reverse(),Xn(i,d,i._majorUnit)},getLabelForIndex:function(e,t){var n=this,i=n._adapter,a=n.chart.data,r=n.options.time,o=a.labels&&e<a.labels.length?a.labels[e]:"",s=a.datasets[t].data[e];return c.isObject(s)&&(o=n.getRightValue(s)),r.tooltipFormat?i.format(qt(n,o),r.tooltipFormat):typeof o=="string"?o:i.format(qt(n,o),r.displayFormats.datetime)},tickFormatFunction:function(e,t,n,i){var a=this._adapter,r=this.options,o=r.time.displayFormats,s=o[this._unit],l=this._majorUnit,u=o[l],d=n[t],h=r.ticks,f=l&&u&&d&&d.major,g=a.format(e,i||(f?u:s)),p=f?h.major:h.minor,m=Hn([p.callback,p.userCallback,h.callback,h.userCallback]);return m?m(g,t,n):g},convertTicksToLabels:function(e){var t,n,i=[];for(t=0,n=e.length;t<n;++t)i.push(this.tickFormatFunction(e[t].value,t,e));return i},getPixelForOffset:function(e){var t=this._offsets,n=Le(this._table,"time",e,"pos");return this.getPixelForDecimal((t.start+n)*t.factor)},getPixelForValue:function(e,t,n){var i=null;if(t!==void 0&&n!==void 0&&(i=this._timestamps.datasets[n][t]),i===null&&(i=Pe(this,e)),i!==null)return this.getPixelForOffset(i)},getPixelForTick:function(e){var t=this.getTicks();return e>=0&&e<t.length?this.getPixelForOffset(t[e].value):null},getValueForPixel:function(e){var t=this._offsets,n=this.getDecimalForPixel(e)/t.factor-t.end,i=Le(this._table,"pos",n,"time");return this._adapter._create(i)},_getLabelSize:function(e){var t=this.options.ticks,n=this.ctx.measureText(e).width,i=c.toRadians(this.isHorizontal()?t.maxRotation:t.minRotation),a=Math.cos(i),r=Math.sin(i),o=ca(t.fontSize,S.global.defaultFontSize);return{w:n*a+o*r,h:n*r+o*a}},getLabelWidth:function(e){return this._getLabelSize(e).w},getLabelCapacity:function(e){var t=this,n=t.options.time,i=n.displayFormats,a=i[n.unit]||i.millisecond,r=t.tickFormatFunction(e,0,Xn(t,[e],t._majorUnit),a),o=t._getLabelSize(r),s=Math.floor(t.isHorizontal()?t.width/o.w:t.height/o.h);return t.options.offset&&s--,s>0?s:1}}),fa={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}}};Kn._defaults=fa;var ga={category:zn,linear:Nn,logarithmic:Bn,radialLinear:Vn,time:Kn},pa={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"};Ot._date.override(typeof B=="function"?{_id:"moment",formats:function(){return pa},parse:function(e,t){return typeof e=="string"&&typeof t=="string"?e=B(e,t):e instanceof B||(e=B(e)),e.isValid()?e.valueOf():null},format:function(e,t){return B(e).format(t)},add:function(e,t,n){return B(e).add(t,n).valueOf()},diff:function(e,t,n){return B(e).diff(B(t),n)},startOf:function(e,t,n){return e=B(e),t==="isoWeek"?e.isoWeekday(n).valueOf():e.startOf(t).valueOf()},endOf:function(e,t){return B(e).endOf(t).valueOf()},_create:function(e){return B(e)}}:{}),S._set("global",{plugins:{filler:{propagate:!0}}});var ma={dataset:function(e){var t=e.fill,n=e.chart,i=n.getDatasetMeta(t),a=i&&n.isDatasetVisible(t)&&i.dataset._children||[],r=a.length||0;return r?function(o,s){return s<r&&a[s]._view||null}:null},boundary:function(e){var t=e.boundary,n=t?t.x:null,i=t?t.y:null;return c.isArray(t)?function(a,r){return t[r]}:function(a){return{x:n===null?a.x:n,y:i===null?a.y:i}}}};function va(e,t,n){var i,a=e._model||{},r=a.fill;if(r===void 0&&(r=!!a.backgroundColor),r===!1||r===null)return!1;if(r===!0)return"origin";if(i=parseFloat(r,10),isFinite(i)&&Math.floor(i)===i)return r[0]!=="-"&&r[0]!=="+"||(i=t+i),!(i===t||i<0||i>=n)&&i;switch(r){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return r;default:return!1}}function ba(e){return(e.el._scale||{}).getPointPositionForValue?function(t){var n,i,a,r,o,s=t.el._scale,l=s.options,u=s.chart.data.labels.length,d=t.fill,h=[];if(!u)return null;for(n=l.ticks.reverse?s.max:s.min,i=l.ticks.reverse?s.min:s.max,a=s.getPointPositionForValue(0,n),r=0;r<u;++r)o=d==="start"||d==="end"?s.getPointPositionForValue(r,d==="start"?n:i):s.getBasePosition(r),l.gridLines.circular&&(o.cx=a.x,o.cy=a.y,o.angle=s.getIndexAngle(r)-Math.PI/2),h.push(o);return h}(e):function(t){var n,i=t.el._model||{},a=t.el._scale||{},r=t.fill,o=null;if(isFinite(r))return null;if(r==="start"?o=i.scaleBottom===void 0?a.bottom:i.scaleBottom:r==="end"?o=i.scaleTop===void 0?a.top:i.scaleTop:i.scaleZero!==void 0?o=i.scaleZero:a.getBasePixel&&(o=a.getBasePixel()),o!=null){if(o.x!==void 0&&o.y!==void 0)return o;if(c.isFinite(o))return{x:(n=a.isHorizontal())?o:null,y:n?null:o}}return null}(e)}function xa(e,t,n){var i,a=e[t].fill,r=[t];if(!n)return a;for(;a!==!1&&r.indexOf(a)===-1;){if(!isFinite(a))return a;if(!(i=e[a]))return!1;if(i.visible)return a;r.push(a),a=i.fill}return!1}function ya(e){var t=e.fill,n="dataset";return t===!1?null:(isFinite(t)||(n="boundary"),ma[n](e))}function $n(e){return e&&!e.skip}function Zn(e,t,n,i,a){var r,o,s,l;if(i&&a){for(e.moveTo(t[0].x,t[0].y),r=1;r<i;++r)c.canvas.lineTo(e,t[r-1],t[r]);if(n[0].angle===void 0)for(e.lineTo(n[a-1].x,n[a-1].y),r=a-1;r>0;--r)c.canvas.lineTo(e,n[r],n[r-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)),r=a-1;r>0;--r)e.arc(o,s,l,n[r].angle,n[r-1].angle,!0)}}function _a(e,t,n,i,a,r){var o,s,l,u,d,h,f,g,p=t.length,m=i.spanGaps,v=[],x=[],b=0,y=0;for(e.beginPath(),o=0,s=p;o<s;++o)d=n(u=t[l=o%p]._view,l,i),h=$n(u),f=$n(d),r&&g===void 0&&h&&(s=p+(g=o+1)),h&&f?(b=v.push(u),y=x.push(d)):b&&y&&(m?(h&&v.push(u),f&&x.push(d)):(Zn(e,v,x,b,y),b=y=0,v=[],x=[]));Zn(e,v,x,b,y),e.closePath(),e.fillStyle=a,e.fill()}var ka={id:"filler",afterDatasetsUpdate:function(e,t){var n,i,a,r,o=(e.data.datasets||[]).length,s=t.propagate,l=[];for(i=0;i<o;++i)r=null,(a=(n=e.getDatasetMeta(i)).dataset)&&a._model&&a instanceof Y.Line&&(r={visible:e.isDatasetVisible(i),fill:va(a,i,o),chart:e,el:a}),n.$filler=r,l.push(r);for(i=0;i<o;++i)(r=l[i])&&(r.fill=xa(l,i,s),r.boundary=ba(r),r.mapper=ya(r))},beforeDatasetsDraw:function(e){var t,n,i,a,r,o,s,l=e._getSortedVisibleDatasetMetas(),u=e.ctx;for(n=l.length-1;n>=0;--n)(t=l[n].$filler)&&t.visible&&(a=(i=t.el)._view,r=i._children||[],o=t.mapper,s=a.backgroundColor||S.global.defaultColor,o&&s&&r.length&&(c.canvas.clipArea(u,e.chartArea),_a(u,r,o,a,s,i._loop),c.canvas.unclipArea(u)))}},wa=c.rtl.getRtlAdapter,pe=c.noop,me=c.valueOrDefault;function Ut(e,t){return e.usePointStyle&&e.boxWidth>t?t:e.boxWidth}S._set("global",{legend:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(e,t){var n=t.datasetIndex,i=this.chart,a=i.getDatasetMeta(n);a.hidden=a.hidden===null?!i.data.datasets[n].hidden:null,i.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(e){var t=e.data.datasets,n=e.options.legend||{},i=n.labels&&n.labels.usePointStyle;return e._getSortedDatasetMetas().map(function(a){var r=a.controller.getStyle(i?0:void 0);return{text:t[a.index].label,fillStyle:r.backgroundColor,hidden:!e.isDatasetVisible(a.index),lineCap:r.borderCapStyle,lineDash:r.borderDash,lineDashOffset:r.borderDashOffset,lineJoin:r.borderJoinStyle,lineWidth:r.borderWidth,strokeStyle:r.borderColor,pointStyle:r.pointStyle,rotation:r.rotation,datasetIndex:a.index}},this)}}},legendCallback:function(e){var t,n,i,a=document.createElement("ul"),r=e.data.datasets;for(a.setAttribute("class",e.id+"-legend"),t=0,n=r.length;t<n;t++)(i=a.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=r[t].backgroundColor,r[t].label&&i.appendChild(document.createTextNode(r[t].label));return a.outerHTML}});var Jn=re.extend({initialize:function(e){c.extend(this,e),this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1},beforeUpdate:pe,update:function(e,t,n){var i=this;return i.beforeUpdate(),i.maxWidth=e,i.maxHeight=t,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:pe,beforeSetDimensions:pe,setDimensions:function(){var e=this;e.isHorizontal()?(e.width=e.maxWidth,e.left=0,e.right=e.width):(e.height=e.maxHeight,e.top=0,e.bottom=e.height),e.paddingLeft=0,e.paddingTop=0,e.paddingRight=0,e.paddingBottom=0,e.minSize={width:0,height:0}},afterSetDimensions:pe,beforeBuildLabels:pe,buildLabels:function(){var e=this,t=e.options.labels||{},n=c.callback(t.generateLabels,[e.chart],e)||[];t.filter&&(n=n.filter(function(i){return t.filter(i,e.chart.data)})),e.options.reverse&&n.reverse(),e.legendItems=n},afterBuildLabels:pe,beforeFit:pe,fit:function(){var e=this,t=e.options,n=t.labels,i=t.display,a=e.ctx,r=c.options._parseFont(n),o=r.size,s=e.legendHitBoxes=[],l=e.minSize,u=e.isHorizontal();if(u?(l.width=e.maxWidth,l.height=i?10:0):(l.width=i?10:0,l.height=e.maxHeight),i){if(a.font=r.string,u){var d=e.lineWidths=[0],h=0;a.textAlign="left",a.textBaseline="middle",c.each(e.legendItems,function(b,y){var _=Ut(n,o)+o/2+a.measureText(b.text).width;(y===0||d[d.length-1]+_+2*n.padding>l.width)&&(h+=o+n.padding,d[d.length-(y>0?0:1)]=0),s[y]={left:0,top:0,width:_,height:o},d[d.length-1]+=_+n.padding}),l.height+=h}else{var f=n.padding,g=e.columnWidths=[],p=e.columnHeights=[],m=n.padding,v=0,x=0;c.each(e.legendItems,function(b,y){var _=Ut(n,o)+o/2+a.measureText(b.text).width;y>0&&x+o+2*f>l.height&&(m+=v+n.padding,g.push(v),p.push(x),v=0,x=0),v=Math.max(v,_),x+=o+f,s[y]={left:0,top:0,width:_,height:o}}),m+=v,g.push(v),p.push(x),l.width+=m}e.width=l.width,e.height=l.height}else e.width=l.width=e.height=l.height=0},afterFit:pe,isHorizontal:function(){return this.options.position==="top"||this.options.position==="bottom"},draw:function(){var e=this,t=e.options,n=t.labels,i=S.global,a=i.defaultColor,r=i.elements.line,o=e.height,s=e.columnHeights,l=e.width,u=e.lineWidths;if(t.display){var d,h=wa(t.rtl,e.left,e.minSize.width),f=e.ctx,g=me(n.fontColor,i.defaultFontColor),p=c.options._parseFont(n),m=p.size;f.textAlign=h.textAlign("left"),f.textBaseline="middle",f.lineWidth=.5,f.strokeStyle=g,f.fillStyle=g,f.font=p.string;var v=Ut(n,m),x=e.legendHitBoxes,b=function(k,M){switch(t.align){case"start":return n.padding;case"end":return k-M;default:return(k-M+n.padding)/2}},y=e.isHorizontal();d=y?{x:e.left+b(l,u[0]),y:e.top+n.padding,line:0}:{x:e.left+n.padding,y:e.top+b(o,s[0]),line:0},c.rtl.overrideTextDirection(e.ctx,t.textDirection);var _=m+n.padding;c.each(e.legendItems,function(k,M){var C=f.measureText(k.text).width,P=v+m/2+C,w=d.x,O=d.y;h.setWidth(e.minSize.width),y?M>0&&w+P+n.padding>e.left+e.minSize.width&&(O=d.y+=_,d.line++,w=d.x=e.left+b(l,u[d.line])):M>0&&O+_>e.top+e.minSize.height&&(w=d.x=w+e.columnWidths[d.line]+n.padding,d.line++,O=d.y=e.top+b(o,s[d.line]));var D=h.x(w);(function(T,N,I){if(!(isNaN(v)||v<=0)){f.save();var L=me(I.lineWidth,r.borderWidth);if(f.fillStyle=me(I.fillStyle,a),f.lineCap=me(I.lineCap,r.borderCapStyle),f.lineDashOffset=me(I.lineDashOffset,r.borderDashOffset),f.lineJoin=me(I.lineJoin,r.borderJoinStyle),f.lineWidth=L,f.strokeStyle=me(I.strokeStyle,a),f.setLineDash&&f.setLineDash(me(I.lineDash,r.borderDash)),n&&n.usePointStyle){var E=v*Math.SQRT2/2,W=h.xPlus(T,v/2),V=N+m/2;c.canvas.drawPoint(f,I.pointStyle,E,W,V,I.rotation)}else f.fillRect(h.leftForLtr(T,v),N,v,m),L!==0&&f.strokeRect(h.leftForLtr(T,v),N,v,m);f.restore()}})(D,O,k),x[M].left=h.leftForLtr(D,x[M].width),x[M].top=O,function(T,N,I,L){var E=m/2,W=h.xPlus(T,v+E),V=N+E;f.fillText(I.text,W,V),I.hidden&&(f.beginPath(),f.lineWidth=2,f.moveTo(W,V),f.lineTo(h.xPlus(W,L),V),f.stroke())}(D,O,k,C),y?d.x+=P+n.padding:d.y+=_}),c.rtl.restoreTextDirection(e.ctx,t.textDirection)}},_getLegendItemAt:function(e,t){var n,i,a,r=this;if(e>=r.left&&e<=r.right&&t>=r.top&&t<=r.bottom){for(a=r.legendHitBoxes,n=0;n<a.length;++n)if(e>=(i=a[n]).left&&e<=i.left+i.width&&t>=i.top&&t<=i.top+i.height)return r.legendItems[n]}return null},handleEvent:function(e){var t,n=this,i=n.options,a=e.type==="mouseup"?"click":e.type;if(a==="mousemove"){if(!i.onHover&&!i.onLeave)return}else if(a!=="click"||!i.onClick)return;t=n._getLegendItemAt(e.x,e.y),a==="click"?t&&i.onClick&&i.onClick.call(n,e.native,t):(i.onLeave&&t!==n._hoveredItem&&(n._hoveredItem&&i.onLeave.call(n,e.native,n._hoveredItem),n._hoveredItem=t),i.onHover&&t&&i.onHover.call(n,e.native,t))}});function Qn(e,t){var n=new Jn({ctx:e.ctx,options:t,chart:e});te.configure(e,n,t),te.addBox(e,n),e.legend=n}var Ma={id:"legend",_element:Jn,beforeInit:function(e){var t=e.options.legend;t&&Qn(e,t)},beforeUpdate:function(e){var t=e.options.legend,n=e.legend;t?(c.mergeIf(t,S.global.legend),n?(te.configure(e,n,t),n.options=t):Qn(e,t)):n&&(te.removeBox(e,n),delete e.legend)},afterEvent:function(e,t){var n=e.legend;n&&n.handleEvent(t)}},ce=c.noop;S._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var ei=re.extend({initialize:function(e){c.extend(this,e),this.legendHitBoxes=[]},beforeUpdate:ce,update:function(e,t,n){var i=this;return i.beforeUpdate(),i.maxWidth=e,i.maxHeight=t,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:ce,beforeSetDimensions:ce,setDimensions:function(){var e=this;e.isHorizontal()?(e.width=e.maxWidth,e.left=0,e.right=e.width):(e.height=e.maxHeight,e.top=0,e.bottom=e.height),e.paddingLeft=0,e.paddingTop=0,e.paddingRight=0,e.paddingBottom=0,e.minSize={width:0,height:0}},afterSetDimensions:ce,beforeBuildLabels:ce,buildLabels:ce,afterBuildLabels:ce,beforeFit:ce,fit:function(){var e,t=this,n=t.options,i=t.minSize={},a=t.isHorizontal();n.display?(e=(c.isArray(n.text)?n.text.length:1)*c.options._parseFont(n).lineHeight+2*n.padding,t.width=i.width=a?t.maxWidth:e,t.height=i.height=a?e:t.maxHeight):t.width=i.width=t.height=i.height=0},afterFit:ce,isHorizontal:function(){var e=this.options.position;return e==="top"||e==="bottom"},draw:function(){var e=this,t=e.ctx,n=e.options;if(n.display){var i,a,r,o=c.options._parseFont(n),s=o.lineHeight,l=s/2+n.padding,u=0,d=e.top,h=e.left,f=e.bottom,g=e.right;t.fillStyle=c.valueOrDefault(n.fontColor,S.global.defaultFontColor),t.font=o.string,e.isHorizontal()?(a=h+(g-h)/2,r=d+l,i=g-h):(a=n.position==="left"?h+l:g-l,r=d+(f-d)/2,i=f-d,u=Math.PI*(n.position==="left"?-.5:.5)),t.save(),t.translate(a,r),t.rotate(u),t.textAlign="center",t.textBaseline="middle";var p=n.text;if(c.isArray(p))for(var m=0,v=0;v<p.length;++v)t.fillText(p[v],0,m,i),m+=s;else t.fillText(p,0,0,i);t.restore()}}});function ti(e,t){var n=new ei({ctx:e.ctx,options:t,chart:e});te.configure(e,n,t),te.addBox(e,n),e.titleBlock=n}var ve={},Sa=ka,Ca=Ma,Pa={id:"title",_element:ei,beforeInit:function(e){var t=e.options.title;t&&ti(e,t)},beforeUpdate:function(e){var t=e.options.title,n=e.titleBlock;t?(c.mergeIf(t,S.global.title),n?(te.configure(e,n,t),n.options=t):ti(e,t)):n&&(te.removeBox(e,n),delete e.titleBlock)}};for(var ni in ve.filler=Sa,ve.legend=Ca,ve.title=Pa,A.helpers=c,function(){function e(i,a,r){var o;return typeof i=="string"?(o=parseInt(i,10),i.indexOf("%")!==-1&&(o=o/100*a.parentNode[r])):o=i,o}function t(i){return i!=null&&i!=="none"}function n(i,a,r){var o=document.defaultView,s=c._getParentNode(i),l=o.getComputedStyle(i)[a],u=o.getComputedStyle(s)[a],d=t(l),h=t(u),f=Number.POSITIVE_INFINITY;return d||h?Math.min(d?e(l,i,r):f,h?e(u,s,r):f):"none"}c.where=function(i,a){if(c.isArray(i)&&Array.prototype.filter)return i.filter(a);var r=[];return c.each(i,function(o){a(o)&&r.push(o)}),r},c.findIndex=Array.prototype.findIndex?function(i,a,r){return i.findIndex(a,r)}:function(i,a,r){r=r===void 0?i:r;for(var o=0,s=i.length;o<s;++o)if(a.call(r,i[o],o,i))return o;return-1},c.findNextWhere=function(i,a,r){c.isNullOrUndef(r)&&(r=-1);for(var o=r+1;o<i.length;o++){var s=i[o];if(a(s))return s}},c.findPreviousWhere=function(i,a,r){c.isNullOrUndef(r)&&(r=i.length);for(var o=r-1;o>=0;o--){var s=i[o];if(a(s))return s}},c.isNumber=function(i){return!isNaN(parseFloat(i))&&isFinite(i)},c.almostEquals=function(i,a,r){return Math.abs(i-a)<r},c.almostWhole=function(i,a){var r=Math.round(i);return r-a<=i&&r+a>=i},c.max=function(i){return i.reduce(function(a,r){return isNaN(r)?a:Math.max(a,r)},Number.NEGATIVE_INFINITY)},c.min=function(i){return i.reduce(function(a,r){return isNaN(r)?a:Math.min(a,r)},Number.POSITIVE_INFINITY)},c.sign=Math.sign?function(i){return Math.sign(i)}:function(i){return(i=+i)==0||isNaN(i)?i:i>0?1:-1},c.toRadians=function(i){return i*(Math.PI/180)},c.toDegrees=function(i){return i*(180/Math.PI)},c._decimalPlaces=function(i){if(c.isFinite(i)){for(var a=1,r=0;Math.round(i*a)/a!==i;)a*=10,r++;return r}},c.getAngleFromPoint=function(i,a){var r=a.x-i.x,o=a.y-i.y,s=Math.sqrt(r*r+o*o),l=Math.atan2(o,r);return l<-.5*Math.PI&&(l+=2*Math.PI),{angle:l,distance:s}},c.distanceBetweenPoints=function(i,a){return Math.sqrt(Math.pow(a.x-i.x,2)+Math.pow(a.y-i.y,2))},c.aliasPixel=function(i){return i%2==0?0:.5},c._alignPixel=function(i,a,r){var o=i.currentDevicePixelRatio,s=r/2;return Math.round((a-s)*o)/o+s},c.splineCurve=function(i,a,r,o){var s=i.skip?a:i,l=a,u=r.skip?a:r,d=Math.sqrt(Math.pow(l.x-s.x,2)+Math.pow(l.y-s.y,2)),h=Math.sqrt(Math.pow(u.x-l.x,2)+Math.pow(u.y-l.y,2)),f=d/(d+h),g=h/(d+h),p=o*(f=isNaN(f)?0:f),m=o*(g=isNaN(g)?0:g);return{previous:{x:l.x-p*(u.x-s.x),y:l.y-p*(u.y-s.y)},next:{x:l.x+m*(u.x-s.x),y:l.y+m*(u.y-s.y)}}},c.EPSILON=Number.EPSILON||1e-14,c.splineCurveMonotone=function(i){var a,r,o,s,l,u,d,h,f,g=(i||[]).map(function(v){return{model:v._model,deltaK:0,mK:0}}),p=g.length;for(a=0;a<p;++a)if(!(o=g[a]).model.skip){if(r=a>0?g[a-1]:null,(s=a<p-1?g[a+1]:null)&&!s.model.skip){var m=s.model.x-o.model.x;o.deltaK=m!==0?(s.model.y-o.model.y)/m:0}!r||r.model.skip?o.mK=o.deltaK:!s||s.model.skip?o.mK=r.deltaK:this.sign(r.deltaK)!==this.sign(o.deltaK)?o.mK=0:o.mK=(r.deltaK+o.deltaK)/2}for(a=0;a<p-1;++a)o=g[a],s=g[a+1],o.model.skip||s.model.skip||(c.almostEquals(o.deltaK,0,this.EPSILON)?o.mK=s.mK=0:(l=o.mK/o.deltaK,u=s.mK/o.deltaK,(h=Math.pow(l,2)+Math.pow(u,2))<=9||(d=3/Math.sqrt(h),o.mK=l*d*o.deltaK,s.mK=u*d*o.deltaK)));for(a=0;a<p;++a)(o=g[a]).model.skip||(r=a>0?g[a-1]:null,s=a<p-1?g[a+1]:null,r&&!r.model.skip&&(f=(o.model.x-r.model.x)/3,o.model.controlPointPreviousX=o.model.x-f,o.model.controlPointPreviousY=o.model.y-f*o.mK),s&&!s.model.skip&&(f=(s.model.x-o.model.x)/3,o.model.controlPointNextX=o.model.x+f,o.model.controlPointNextY=o.model.y+f*o.mK))},c.nextItem=function(i,a,r){return r?a>=i.length-1?i[0]:i[a+1]:a>=i.length-1?i[i.length-1]:i[a+1]},c.previousItem=function(i,a,r){return r?a<=0?i[i.length-1]:i[a-1]:a<=0?i[0]:i[a-1]},c.niceNum=function(i,a){var r=Math.floor(c.log10(i)),o=i/Math.pow(10,r);return(a?o<1.5?1:o<3?2:o<7?5:10:o<=1?1:o<=2?2:o<=5?5:10)*Math.pow(10,r)},c.requestAnimFrame=typeof window=="undefined"?function(i){i()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(i){return window.setTimeout(i,1e3/60)},c.getRelativePosition=function(i,a){var r,o,s=i.originalEvent||i,l=i.target||i.srcElement,u=l.getBoundingClientRect(),d=s.touches;d&&d.length>0?(r=d[0].clientX,o=d[0].clientY):(r=s.clientX,o=s.clientY);var h=parseFloat(c.getStyle(l,"padding-left")),f=parseFloat(c.getStyle(l,"padding-top")),g=parseFloat(c.getStyle(l,"padding-right")),p=parseFloat(c.getStyle(l,"padding-bottom")),m=u.right-u.left-h-g,v=u.bottom-u.top-f-p;return{x:r=Math.round((r-u.left-h)/m*l.width/a.currentDevicePixelRatio),y:o=Math.round((o-u.top-f)/v*l.height/a.currentDevicePixelRatio)}},c.getConstraintWidth=function(i){return n(i,"max-width","clientWidth")},c.getConstraintHeight=function(i){return n(i,"max-height","clientHeight")},c._calculatePadding=function(i,a,r){return(a=c.getStyle(i,a)).indexOf("%")>-1?r*parseInt(a,10)/100:parseInt(a,10)},c._getParentNode=function(i){var a=i.parentNode;return a&&a.toString()==="[object ShadowRoot]"&&(a=a.host),a},c.getMaximumWidth=function(i){var a=c._getParentNode(i);if(!a)return i.clientWidth;var r=a.clientWidth,o=r-c._calculatePadding(a,"padding-left",r)-c._calculatePadding(a,"padding-right",r),s=c.getConstraintWidth(i);return isNaN(s)?o:Math.min(o,s)},c.getMaximumHeight=function(i){var a=c._getParentNode(i);if(!a)return i.clientHeight;var r=a.clientHeight,o=r-c._calculatePadding(a,"padding-top",r)-c._calculatePadding(a,"padding-bottom",r),s=c.getConstraintHeight(i);return isNaN(s)?o:Math.min(o,s)},c.getStyle=function(i,a){return i.currentStyle?i.currentStyle[a]:document.defaultView.getComputedStyle(i,null).getPropertyValue(a)},c.retinaScale=function(i,a){var r=i.currentDevicePixelRatio=a||typeof window!="undefined"&&window.devicePixelRatio||1;if(r!==1){var o=i.canvas,s=i.height,l=i.width;o.height=s*r,o.width=l*r,i.ctx.scale(r,r),o.style.height||o.style.width||(o.style.height=s+"px",o.style.width=l+"px")}},c.fontString=function(i,a,r){return a+" "+i+"px "+r},c.longestText=function(i,a,r,o){var s=(o=o||{}).data=o.data||{},l=o.garbageCollect=o.garbageCollect||[];o.font!==a&&(s=o.data={},l=o.garbageCollect=[],o.font=a),i.font=a;var u,d,h,f,g,p=0,m=r.length;for(u=0;u<m;u++)if((f=r[u])!=null&&c.isArray(f)!==!0)p=c.measureText(i,s,l,p,f);else if(c.isArray(f))for(d=0,h=f.length;d<h;d++)(g=f[d])==null||c.isArray(g)||(p=c.measureText(i,s,l,p,g));var v=l.length/2;if(v>r.length){for(u=0;u<v;u++)delete s[l[u]];l.splice(0,v)}return p},c.measureText=function(i,a,r,o,s){var l=a[s];return l||(l=a[s]=i.measureText(s).width,r.push(s)),l>o&&(o=l),o},c.numberOfLabelLines=function(i){var a=1;return c.each(i,function(r){c.isArray(r)&&r.length>a&&(a=r.length)}),a},c.color=Ke?function(i){return i instanceof CanvasGradient&&(i=S.global.defaultColor),Ke(i)}:function(i){return console.error("Color.js not found!"),i},c.getHoverColor=function(i){return i instanceof CanvasPattern||i instanceof CanvasGradient?i:c.color(i).saturate(.5).darken(.1).rgbString()}}(),A._adapters=Ot,A.Animation=pt,A.animationService=mt,A.controllers=yn,A.DatasetController=ee,A.defaults=S,A.Element=re,A.elements=Y,A.Interaction=Ie,A.layouts=te,A.platform=Fe,A.plugins=R,A.Scale=G,A.scaleService=qe,A.Ticks=Ue,A.Tooltip=Tt,A.helpers.each(ga,function(e,t){A.scaleService.registerScaleType(t,e,e._defaults)}),ve)ve.hasOwnProperty(ni)&&A.plugins.register(ve[ni]);A.platform.initialize();var Aa=A;return typeof window!="undefined"&&(window.Chart=A),A.Chart=A,A.Legend=ve.legend._element,A.Title=ve.title._element,A.pluginService=A.plugins,A.PluginBase=A.Element.extend({}),A.canvasHelpers=A.helpers.canvas,A.layoutService=A.layouts,A.LinearScaleBase=rt,A.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],function(e){A[e]=function(t,n){return new A(t,A.helpers.merge(n||{},{type:e.charAt(0).toLowerCase()+e.slice(1)}))}}),Aa})})(Yt);var Ia=Yt.exports,Oa=Object.freeze(Ta({__proto__:null,[Symbol.toStringTag]:"Module",default:Ia},[Yt.exports]));export{Oa as C};
diff --git a/applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/Chart.min.d34448a4.js b/applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/Chart.min.d34448a4.js
new file mode 100644 (file)
index 0000000..756e922
--- /dev/null
@@ -0,0 +1,9 @@
+import{V as t,A as e}from"./vendor.3b6f54f7.js";var n,i,a={exports:{}};
+//! moment.js
+//! version : 2.29.1
+//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
+//! license : MIT
+//! momentjs.com
+function r(){return n.apply(null,arguments)}function o(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function s(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function l(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function u(t){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(t).length;var e;for(e in t)if(l(t,e))return!1;return!0}function d(t){return void 0===t}function h(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function c(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function f(t,e){var n,i=[];for(n=0;n<t.length;++n)i.push(e(t[n],n));return i}function g(t,e){for(var n in e)l(e,n)&&(t[n]=e[n]);return l(e,"toString")&&(t.toString=e.toString),l(e,"valueOf")&&(t.valueOf=e.valueOf),t}function m(t,e,n,i){return De(t,e,n,i,!0).utc()}function p(t){return null==t._pf&&(t._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),t._pf}function v(t){if(null==t._isValid){var e=p(t),n=i.call(e.parsedDateParts,(function(t){return null!=t})),a=!isNaN(t._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidEra&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&n);if(t._strict&&(a=a&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour),null!=Object.isFrozen&&Object.isFrozen(t))return a;t._isValid=a}return t._isValid}function b(t){var e=m(NaN);return null!=t?g(p(e),t):p(e).userInvalidated=!0,e}i=Array.prototype.some?Array.prototype.some:function(t){var e,n=Object(this),i=n.length>>>0;for(e=0;e<i;e++)if(e in n&&t.call(this,n[e],e,n))return!0;return!1};var y=r.momentProperties=[],x=!1;function _(t,e){var n,i,a;if(d(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),d(e._i)||(t._i=e._i),d(e._f)||(t._f=e._f),d(e._l)||(t._l=e._l),d(e._strict)||(t._strict=e._strict),d(e._tzm)||(t._tzm=e._tzm),d(e._isUTC)||(t._isUTC=e._isUTC),d(e._offset)||(t._offset=e._offset),d(e._pf)||(t._pf=p(e)),d(e._locale)||(t._locale=e._locale),y.length>0)for(n=0;n<y.length;n++)d(a=e[i=y[n]])||(t[i]=a);return t}function w(t){_(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===x&&(x=!0,r.updateOffset(this),x=!1)}function k(t){return t instanceof w||null!=t&&null!=t._isAMomentObject}function M(t){!1===r.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function S(t,e){var n=!0;return g((function(){if(null!=r.deprecationHandler&&r.deprecationHandler(null,t),n){var i,a,o,s=[];for(a=0;a<arguments.length;a++){if(i="","object"==typeof arguments[a]){for(o in i+="\n["+a+"] ",arguments[0])l(arguments[0],o)&&(i+=o+": "+arguments[0][o]+", ");i=i.slice(0,-2)}else i=arguments[a];s.push(i)}M(t+"\nArguments: "+Array.prototype.slice.call(s).join("")+"\n"+(new Error).stack),n=!1}return e.apply(this,arguments)}),e)}var D,C={};function P(t,e){null!=r.deprecationHandler&&r.deprecationHandler(t,e),C[t]||(M(e),C[t]=!0)}function T(t){return"undefined"!=typeof Function&&t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function O(t,e){var n,i=g({},t);for(n in e)l(e,n)&&(s(t[n])&&s(e[n])?(i[n]={},g(i[n],t[n]),g(i[n],e[n])):null!=e[n]?i[n]=e[n]:delete i[n]);for(n in t)l(t,n)&&!l(e,n)&&s(t[n])&&(i[n]=g({},i[n]));return i}function A(t){null!=t&&this.set(t)}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null,D=Object.keys?Object.keys:function(t){var e,n=[];for(e in t)l(t,e)&&n.push(e);return n};function F(t,e,n){var i=""+Math.abs(t),a=e-i.length;return(t>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,a)).toString().substr(1)+i}var I=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,N=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,R={},L={};function Y(t,e,n,i){var a=i;"string"==typeof i&&(a=function(){return this[i]()}),t&&(L[t]=a),e&&(L[e[0]]=function(){return F(a.apply(this,arguments),e[1],e[2])}),n&&(L[n]=function(){return this.localeData().ordinal(a.apply(this,arguments),t)})}function W(t,e){return t.isValid()?(e=z(e,t.localeData()),R[e]=R[e]||function(t){var e,n,i,a=t.match(I);for(e=0,n=a.length;e<n;e++)L[a[e]]?a[e]=L[a[e]]:a[e]=(i=a[e]).match(/\[[\s\S]/)?i.replace(/^\[|\]$/g,""):i.replace(/\\/g,"");return function(e){var i,r="";for(i=0;i<n;i++)r+=T(a[i])?a[i].call(e,t):a[i];return r}}(e),R[e](t)):t.localeData().invalidDate()}function z(t,e){var n=5;function i(t){return e.longDateFormat(t)||t}for(N.lastIndex=0;n>=0&&N.test(t);)t=t.replace(N,i),N.lastIndex=0,n-=1;return t}var E={};function V(t,e){var n=t.toLowerCase();E[n]=E[n+"s"]=E[e]=t}function H(t){return"string"==typeof t?E[t]||E[t.toLowerCase()]:void 0}function B(t){var e,n,i={};for(n in t)l(t,n)&&(e=H(n))&&(i[e]=t[n]);return i}var j={};function U(t,e){j[t]=e}function G(t){return t%4==0&&t%100!=0||t%400==0}function q(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function Z(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=q(e)),n}function $(t,e){return function(n){return null!=n?(K(this,t,n),r.updateOffset(this,e),this):X(this,t)}}function X(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function K(t,e,n){t.isValid()&&!isNaN(n)&&("FullYear"===e&&G(t.year())&&1===t.month()&&29===t.date()?(n=Z(n),t._d["set"+(t._isUTC?"UTC":"")+e](n,t.month(),kt(n,t.month()))):t._d["set"+(t._isUTC?"UTC":"")+e](n))}var J,Q=/\d/,tt=/\d\d/,et=/\d{3}/,nt=/\d{4}/,it=/[+-]?\d{6}/,at=/\d\d?/,rt=/\d\d\d\d?/,ot=/\d\d\d\d\d\d?/,st=/\d{1,3}/,lt=/\d{1,4}/,ut=/[+-]?\d{1,6}/,dt=/\d+/,ht=/[+-]?\d+/,ct=/Z|[+-]\d\d:?\d\d/gi,ft=/Z|[+-]\d\d(?::?\d\d)?/gi,gt=/[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;function mt(t,e,n){J[t]=T(e)?e:function(t,i){return t&&n?n:e}}function pt(t,e){return l(J,t)?J[t](e._strict,e._locale):new RegExp(vt(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(t,e,n,i,a){return e||n||i||a}))))}function vt(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}J={};var bt={};function yt(t,e){var n,i=e;for("string"==typeof t&&(t=[t]),h(e)&&(i=function(t,n){n[e]=Z(t)}),n=0;n<t.length;n++)bt[t[n]]=i}function xt(t,e){yt(t,(function(t,n,i,a){i._w=i._w||{},e(t,i._w,i,a)}))}function _t(t,e,n){null!=e&&l(bt,t)&&bt[t](e,n._a,n,t)}var wt;function kt(t,e){if(isNaN(t)||isNaN(e))return NaN;var n,i=(e%(n=12)+n)%n;return t+=(e-i)/12,1===i?G(t)?29:28:31-i%7%2}wt=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1},Y("M",["MM",2],"Mo",(function(){return this.month()+1})),Y("MMM",0,0,(function(t){return this.localeData().monthsShort(this,t)})),Y("MMMM",0,0,(function(t){return this.localeData().months(this,t)})),V("month","M"),U("month",8),mt("M",at),mt("MM",at,tt),mt("MMM",(function(t,e){return e.monthsShortRegex(t)})),mt("MMMM",(function(t,e){return e.monthsRegex(t)})),yt(["M","MM"],(function(t,e){e[1]=Z(t)-1})),yt(["MMM","MMMM"],(function(t,e,n,i){var a=n._locale.monthsParse(t,i,n._strict);null!=a?e[1]=a:p(n).invalidMonth=t}));var Mt="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),St="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Dt=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Ct=gt,Pt=gt;function Tt(t,e,n){var i,a,r,o=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],i=0;i<12;++i)r=m([2e3,i]),this._shortMonthsParse[i]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[i]=this.months(r,"").toLocaleLowerCase();return n?"MMM"===e?-1!==(a=wt.call(this._shortMonthsParse,o))?a:null:-1!==(a=wt.call(this._longMonthsParse,o))?a:null:"MMM"===e?-1!==(a=wt.call(this._shortMonthsParse,o))||-1!==(a=wt.call(this._longMonthsParse,o))?a:null:-1!==(a=wt.call(this._longMonthsParse,o))||-1!==(a=wt.call(this._shortMonthsParse,o))?a:null}function Ot(t,e){var n;if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=Z(e);else if(!h(e=t.localeData().monthsParse(e)))return t;return n=Math.min(t.date(),kt(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,n),t}function At(t){return null!=t?(Ot(this,t),r.updateOffset(this,!0),this):X(this,"Month")}function Ft(){function t(t,e){return e.length-t.length}var e,n,i=[],a=[],r=[];for(e=0;e<12;e++)n=m([2e3,e]),i.push(this.monthsShort(n,"")),a.push(this.months(n,"")),r.push(this.months(n,"")),r.push(this.monthsShort(n,""));for(i.sort(t),a.sort(t),r.sort(t),e=0;e<12;e++)i[e]=vt(i[e]),a[e]=vt(a[e]);for(e=0;e<24;e++)r[e]=vt(r[e]);this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+i.join("|")+")","i")}function It(t){return G(t)?366:365}Y("Y",0,0,(function(){var t=this.year();return t<=9999?F(t,4):"+"+t})),Y(0,["YY",2],0,(function(){return this.year()%100})),Y(0,["YYYY",4],0,"year"),Y(0,["YYYYY",5],0,"year"),Y(0,["YYYYYY",6,!0],0,"year"),V("year","y"),U("year",1),mt("Y",ht),mt("YY",at,tt),mt("YYYY",lt,nt),mt("YYYYY",ut,it),mt("YYYYYY",ut,it),yt(["YYYYY","YYYYYY"],0),yt("YYYY",(function(t,e){e[0]=2===t.length?r.parseTwoDigitYear(t):Z(t)})),yt("YY",(function(t,e){e[0]=r.parseTwoDigitYear(t)})),yt("Y",(function(t,e){e[0]=parseInt(t,10)})),r.parseTwoDigitYear=function(t){return Z(t)+(Z(t)>68?1900:2e3)};var Nt=$("FullYear",!0);function Rt(t,e,n,i,a,r,o){var s;return t<100&&t>=0?(s=new Date(t+400,e,n,i,a,r,o),isFinite(s.getFullYear())&&s.setFullYear(t)):s=new Date(t,e,n,i,a,r,o),s}function Lt(t){var e,n;return t<100&&t>=0?((n=Array.prototype.slice.call(arguments))[0]=t+400,e=new Date(Date.UTC.apply(null,n)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)):e=new Date(Date.UTC.apply(null,arguments)),e}function Yt(t,e,n){var i=7+e-n;return-((7+Lt(t,0,i).getUTCDay()-e)%7)+i-1}function Wt(t,e,n,i,a){var r,o,s=1+7*(e-1)+(7+n-i)%7+Yt(t,i,a);return s<=0?o=It(r=t-1)+s:s>It(t)?(r=t+1,o=s-It(t)):(r=t,o=s),{year:r,dayOfYear:o}}function zt(t,e,n){var i,a,r=Yt(t.year(),e,n),o=Math.floor((t.dayOfYear()-r-1)/7)+1;return o<1?i=o+Et(a=t.year()-1,e,n):o>Et(t.year(),e,n)?(i=o-Et(t.year(),e,n),a=t.year()+1):(a=t.year(),i=o),{week:i,year:a}}function Et(t,e,n){var i=Yt(t,e,n),a=Yt(t+1,e,n);return(It(t)-i+a)/7}Y("w",["ww",2],"wo","week"),Y("W",["WW",2],"Wo","isoWeek"),V("week","w"),V("isoWeek","W"),U("week",5),U("isoWeek",5),mt("w",at),mt("ww",at,tt),mt("W",at),mt("WW",at,tt),xt(["w","ww","W","WW"],(function(t,e,n,i){e[i.substr(0,1)]=Z(t)}));function Vt(t,e){return t.slice(e,7).concat(t.slice(0,e))}Y("d",0,"do","day"),Y("dd",0,0,(function(t){return this.localeData().weekdaysMin(this,t)})),Y("ddd",0,0,(function(t){return this.localeData().weekdaysShort(this,t)})),Y("dddd",0,0,(function(t){return this.localeData().weekdays(this,t)})),Y("e",0,0,"weekday"),Y("E",0,0,"isoWeekday"),V("day","d"),V("weekday","e"),V("isoWeekday","E"),U("day",11),U("weekday",11),U("isoWeekday",11),mt("d",at),mt("e",at),mt("E",at),mt("dd",(function(t,e){return e.weekdaysMinRegex(t)})),mt("ddd",(function(t,e){return e.weekdaysShortRegex(t)})),mt("dddd",(function(t,e){return e.weekdaysRegex(t)})),xt(["dd","ddd","dddd"],(function(t,e,n,i){var a=n._locale.weekdaysParse(t,i,n._strict);null!=a?e.d=a:p(n).invalidWeekday=t})),xt(["d","e","E"],(function(t,e,n,i){e[i]=Z(t)}));var Ht="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Bt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),jt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ut=gt,Gt=gt,qt=gt;function Zt(t,e,n){var i,a,r,o=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)r=m([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(r,"").toLocaleLowerCase();return n?"dddd"===e?-1!==(a=wt.call(this._weekdaysParse,o))?a:null:"ddd"===e?-1!==(a=wt.call(this._shortWeekdaysParse,o))?a:null:-1!==(a=wt.call(this._minWeekdaysParse,o))?a:null:"dddd"===e?-1!==(a=wt.call(this._weekdaysParse,o))||-1!==(a=wt.call(this._shortWeekdaysParse,o))||-1!==(a=wt.call(this._minWeekdaysParse,o))?a:null:"ddd"===e?-1!==(a=wt.call(this._shortWeekdaysParse,o))||-1!==(a=wt.call(this._weekdaysParse,o))||-1!==(a=wt.call(this._minWeekdaysParse,o))?a:null:-1!==(a=wt.call(this._minWeekdaysParse,o))||-1!==(a=wt.call(this._weekdaysParse,o))||-1!==(a=wt.call(this._shortWeekdaysParse,o))?a:null}function $t(){function t(t,e){return e.length-t.length}var e,n,i,a,r,o=[],s=[],l=[],u=[];for(e=0;e<7;e++)n=m([2e3,1]).day(e),i=vt(this.weekdaysMin(n,"")),a=vt(this.weekdaysShort(n,"")),r=vt(this.weekdays(n,"")),o.push(i),s.push(a),l.push(r),u.push(i),u.push(a),u.push(r);o.sort(t),s.sort(t),l.sort(t),u.sort(t),this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function Xt(){return this.hours()%12||12}function Kt(t,e){Y(t,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)}))}function Jt(t,e){return e._meridiemParse}Y("H",["HH",2],0,"hour"),Y("h",["hh",2],0,Xt),Y("k",["kk",2],0,(function(){return this.hours()||24})),Y("hmm",0,0,(function(){return""+Xt.apply(this)+F(this.minutes(),2)})),Y("hmmss",0,0,(function(){return""+Xt.apply(this)+F(this.minutes(),2)+F(this.seconds(),2)})),Y("Hmm",0,0,(function(){return""+this.hours()+F(this.minutes(),2)})),Y("Hmmss",0,0,(function(){return""+this.hours()+F(this.minutes(),2)+F(this.seconds(),2)})),Kt("a",!0),Kt("A",!1),V("hour","h"),U("hour",13),mt("a",Jt),mt("A",Jt),mt("H",at),mt("h",at),mt("k",at),mt("HH",at,tt),mt("hh",at,tt),mt("kk",at,tt),mt("hmm",rt),mt("hmmss",ot),mt("Hmm",rt),mt("Hmmss",ot),yt(["H","HH"],3),yt(["k","kk"],(function(t,e,n){var i=Z(t);e[3]=24===i?0:i})),yt(["a","A"],(function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t})),yt(["h","hh"],(function(t,e,n){e[3]=Z(t),p(n).bigHour=!0})),yt("hmm",(function(t,e,n){var i=t.length-2;e[3]=Z(t.substr(0,i)),e[4]=Z(t.substr(i)),p(n).bigHour=!0})),yt("hmmss",(function(t,e,n){var i=t.length-4,a=t.length-2;e[3]=Z(t.substr(0,i)),e[4]=Z(t.substr(i,2)),e[5]=Z(t.substr(a)),p(n).bigHour=!0})),yt("Hmm",(function(t,e,n){var i=t.length-2;e[3]=Z(t.substr(0,i)),e[4]=Z(t.substr(i))})),yt("Hmmss",(function(t,e,n){var i=t.length-4,a=t.length-2;e[3]=Z(t.substr(0,i)),e[4]=Z(t.substr(i,2)),e[5]=Z(t.substr(a))}));var Qt=$("Hours",!0);var te,ee={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{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"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{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",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Mt,monthsShort:St,week:{dow:0,doy:6},weekdays:Ht,weekdaysMin:jt,weekdaysShort:Bt,meridiemParse:/[ap]\.?m?\.?/i},ne={},ie={};function ae(t,e){var n,i=Math.min(t.length,e.length);for(n=0;n<i;n+=1)if(t[n]!==e[n])return n;return i}function re(t){return t?t.toLowerCase().replace("_","-"):t}function oe(t){var e=null;if(void 0===ne[t]&&"undefined"!=typeof module&&module&&module.exports)try{e=te._abbr,require("./locale/"+t),se(e)}catch(n){ne[t]=null}return ne[t]}function se(t,e){var n;return t&&((n=d(e)?ue(t):le(t,e))?te=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),te._abbr}function le(t,e){if(null!==e){var n,i=ee;if(e.abbr=t,null!=ne[t])P("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=ne[t]._config;else if(null!=e.parentLocale)if(null!=ne[e.parentLocale])i=ne[e.parentLocale]._config;else{if(null==(n=oe(e.parentLocale)))return ie[e.parentLocale]||(ie[e.parentLocale]=[]),ie[e.parentLocale].push({name:t,config:e}),null;i=n._config}return ne[t]=new A(O(i,e)),ie[t]&&ie[t].forEach((function(t){le(t.name,t.config)})),se(t),ne[t]}return delete ne[t],null}function ue(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return te;if(!o(t)){if(e=oe(t))return e;t=[t]}return function(t){for(var e,n,i,a,r=0;r<t.length;){for(e=(a=re(t[r]).split("-")).length,n=(n=re(t[r+1]))?n.split("-"):null;e>0;){if(i=oe(a.slice(0,e).join("-")))return i;if(n&&n.length>=e&&ae(a,n)>=e-1)break;e--}r++}return te}(t)}function de(t){var e,n=t._a;return n&&-2===p(t).overflow&&(e=n[1]<0||n[1]>11?1:n[2]<1||n[2]>kt(n[0],n[1])?2:n[3]<0||n[3]>24||24===n[3]&&(0!==n[4]||0!==n[5]||0!==n[6])?3:n[4]<0||n[4]>59?4:n[5]<0||n[5]>59?5:n[6]<0||n[6]>999?6:-1,p(t)._overflowDayOfYear&&(e<0||e>2)&&(e=2),p(t)._overflowWeeks&&-1===e&&(e=7),p(t)._overflowWeekday&&-1===e&&(e=8),p(t).overflow=e),t}var he=/^\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)?)?$/,ce=/^\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)?)?$/,fe=/Z|[+-]\d\d(?::?\d\d)?/,ge=[["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/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],me=[["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/]],pe=/^\/?Date\((-?\d+)/i,ve=/^(?:(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}))$/,be={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function ye(t){var e,n,i,a,r,o,s=t._i,l=he.exec(s)||ce.exec(s);if(l){for(p(t).iso=!0,e=0,n=ge.length;e<n;e++)if(ge[e][1].exec(l[1])){a=ge[e][0],i=!1!==ge[e][2];break}if(null==a)return void(t._isValid=!1);if(l[3]){for(e=0,n=me.length;e<n;e++)if(me[e][1].exec(l[3])){r=(l[2]||" ")+me[e][0];break}if(null==r)return void(t._isValid=!1)}if(!i&&null!=r)return void(t._isValid=!1);if(l[4]){if(!fe.exec(l[4]))return void(t._isValid=!1);o="Z"}t._f=a+(r||"")+(o||""),Me(t)}else t._isValid=!1}function xe(t){var e=parseInt(t,10);return e<=49?2e3+e:e<=999?1900+e:e}function _e(t){var e,n,i,a,r,o,s,l,u=ve.exec(t._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(u){if(n=u[4],i=u[3],a=u[2],r=u[5],o=u[6],s=u[7],l=[xe(n),St.indexOf(i),parseInt(a,10),parseInt(r,10),parseInt(o,10)],s&&l.push(parseInt(s,10)),e=l,!function(t,e,n){return!t||Bt.indexOf(t)===new Date(e[0],e[1],e[2]).getDay()||(p(n).weekdayMismatch=!0,n._isValid=!1,!1)}(u[1],e,t))return;t._a=e,t._tzm=function(t,e,n){if(t)return be[t];if(e)return 0;var i=parseInt(n,10),a=i%100;return(i-a)/100*60+a}(u[8],u[9],u[10]),t._d=Lt.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),p(t).rfc2822=!0}else t._isValid=!1}function we(t,e,n){return null!=t?t:null!=e?e:n}function ke(t){var e,n,i,a,o,s=[];if(!t._d){for(i=function(t){var e=new Date(r.now());return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}(t),t._w&&null==t._a[2]&&null==t._a[1]&&function(t){var e,n,i,a,r,o,s,l,u;null!=(e=t._w).GG||null!=e.W||null!=e.E?(r=1,o=4,n=we(e.GG,t._a[0],zt(Ce(),1,4).year),i=we(e.W,1),((a=we(e.E,1))<1||a>7)&&(l=!0)):(r=t._locale._week.dow,o=t._locale._week.doy,u=zt(Ce(),r,o),n=we(e.gg,t._a[0],u.year),i=we(e.w,u.week),null!=e.d?((a=e.d)<0||a>6)&&(l=!0):null!=e.e?(a=e.e+r,(e.e<0||e.e>6)&&(l=!0)):a=r);i<1||i>Et(n,r,o)?p(t)._overflowWeeks=!0:null!=l?p(t)._overflowWeekday=!0:(s=Wt(n,i,a,r,o),t._a[0]=s.year,t._dayOfYear=s.dayOfYear)}(t),null!=t._dayOfYear&&(o=we(t._a[0],i[0]),(t._dayOfYear>It(o)||0===t._dayOfYear)&&(p(t)._overflowDayOfYear=!0),n=Lt(o,0,t._dayOfYear),t._a[1]=n.getUTCMonth(),t._a[2]=n.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=s[e]=i[e];for(;e<7;e++)t._a[e]=s[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[3]&&0===t._a[4]&&0===t._a[5]&&0===t._a[6]&&(t._nextDay=!0,t._a[3]=0),t._d=(t._useUTC?Lt:Rt).apply(null,s),a=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[3]=24),t._w&&void 0!==t._w.d&&t._w.d!==a&&(p(t).weekdayMismatch=!0)}}function Me(t){if(t._f!==r.ISO_8601)if(t._f!==r.RFC_2822){t._a=[],p(t).empty=!0;var e,n,i,a,o,s,l=""+t._i,u=l.length,d=0;for(i=z(t._f,t._locale).match(I)||[],e=0;e<i.length;e++)a=i[e],(n=(l.match(pt(a,t))||[])[0])&&((o=l.substr(0,l.indexOf(n))).length>0&&p(t).unusedInput.push(o),l=l.slice(l.indexOf(n)+n.length),d+=n.length),L[a]?(n?p(t).empty=!1:p(t).unusedTokens.push(a),_t(a,n,t)):t._strict&&!n&&p(t).unusedTokens.push(a);p(t).charsLeftOver=u-d,l.length>0&&p(t).unusedInput.push(l),t._a[3]<=12&&!0===p(t).bigHour&&t._a[3]>0&&(p(t).bigHour=void 0),p(t).parsedDateParts=t._a.slice(0),p(t).meridiem=t._meridiem,t._a[3]=function(t,e,n){var i;if(null==n)return e;return null!=t.meridiemHour?t.meridiemHour(e,n):null!=t.isPM?((i=t.isPM(n))&&e<12&&(e+=12),i||12!==e||(e=0),e):e}(t._locale,t._a[3],t._meridiem),null!==(s=p(t).era)&&(t._a[0]=t._locale.erasConvertYear(s,t._a[0])),ke(t),de(t)}else _e(t);else ye(t)}function Se(t){var e=t._i,n=t._f;return t._locale=t._locale||ue(t._l),null===e||void 0===n&&""===e?b({nullInput:!0}):("string"==typeof e&&(t._i=e=t._locale.preparse(e)),k(e)?new w(de(e)):(c(e)?t._d=e:o(n)?function(t){var e,n,i,a,r,o,s=!1;if(0===t._f.length)return p(t).invalidFormat=!0,void(t._d=new Date(NaN));for(a=0;a<t._f.length;a++)r=0,o=!1,e=_({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[a],Me(e),v(e)&&(o=!0),r+=p(e).charsLeftOver,r+=10*p(e).unusedTokens.length,p(e).score=r,s?r<i&&(i=r,n=e):(null==i||r<i||o)&&(i=r,n=e,o&&(s=!0));g(t,n||e)}(t):n?Me(t):function(t){var e=t._i;d(e)?t._d=new Date(r.now()):c(e)?t._d=new Date(e.valueOf()):"string"==typeof e?function(t){var e=pe.exec(t._i);null===e?(ye(t),!1===t._isValid&&(delete t._isValid,_e(t),!1===t._isValid&&(delete t._isValid,t._strict?t._isValid=!1:r.createFromInputFallback(t)))):t._d=new Date(+e[1])}(t):o(e)?(t._a=f(e.slice(0),(function(t){return parseInt(t,10)})),ke(t)):s(e)?function(t){if(!t._d){var e=B(t._i),n=void 0===e.day?e.date:e.day;t._a=f([e.year,e.month,n,e.hour,e.minute,e.second,e.millisecond],(function(t){return t&&parseInt(t,10)})),ke(t)}}(t):h(e)?t._d=new Date(e):r.createFromInputFallback(t)}(t),v(t)||(t._d=null),t))}function De(t,e,n,i,a){var r,l={};return!0!==e&&!1!==e||(i=e,e=void 0),!0!==n&&!1!==n||(i=n,n=void 0),(s(t)&&u(t)||o(t)&&0===t.length)&&(t=void 0),l._isAMomentObject=!0,l._useUTC=l._isUTC=a,l._l=n,l._i=t,l._f=e,l._strict=i,(r=new w(de(Se(l))))._nextDay&&(r.add(1,"d"),r._nextDay=void 0),r}function Ce(t,e,n,i){return De(t,e,n,i,!1)}r.createFromInputFallback=S("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. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))})),r.ISO_8601=function(){},r.RFC_2822=function(){};var Pe=S("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=Ce.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:b()})),Te=S("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=Ce.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:b()}));function Oe(t,e){var n,i;if(1===e.length&&o(e[0])&&(e=e[0]),!e.length)return Ce();for(n=e[0],i=1;i<e.length;++i)e[i].isValid()&&!e[i][t](n)||(n=e[i]);return n}var Ae=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Fe(t){var e=B(t),n=e.year||0,i=e.quarter||0,a=e.month||0,r=e.week||e.isoWeek||0,o=e.day||0,s=e.hour||0,u=e.minute||0,d=e.second||0,h=e.millisecond||0;this._isValid=function(t){var e,n,i=!1;for(e in t)if(l(t,e)&&(-1===wt.call(Ae,e)||null!=t[e]&&isNaN(t[e])))return!1;for(n=0;n<Ae.length;++n)if(t[Ae[n]]){if(i)return!1;parseFloat(t[Ae[n]])!==Z(t[Ae[n]])&&(i=!0)}return!0}(e),this._milliseconds=+h+1e3*d+6e4*u+1e3*s*60*60,this._days=+o+7*r,this._months=+a+3*i+12*n,this._data={},this._locale=ue(),this._bubble()}function Ie(t){return t instanceof Fe}function Ne(t){return t<0?-1*Math.round(-1*t):Math.round(t)}function Re(t,e){Y(t,0,0,(function(){var t=this.utcOffset(),n="+";return t<0&&(t=-t,n="-"),n+F(~~(t/60),2)+e+F(~~t%60,2)}))}Re("Z",":"),Re("ZZ",""),mt("Z",ft),mt("ZZ",ft),yt(["Z","ZZ"],(function(t,e,n){n._useUTC=!0,n._tzm=Ye(ft,t)}));var Le=/([\+\-]|\d\d)/gi;function Ye(t,e){var n,i,a=(e||"").match(t);return null===a?null:0===(i=60*(n=((a[a.length-1]||[])+"").match(Le)||["-",0,0])[1]+Z(n[2]))?0:"+"===n[0]?i:-i}function We(t,e){var n,i;return e._isUTC?(n=e.clone(),i=(k(t)||c(t)?t.valueOf():Ce(t).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+i),r.updateOffset(n,!1),n):Ce(t).local()}function ze(t){return-Math.round(t._d.getTimezoneOffset())}function Ee(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}r.updateOffset=function(){};var Ve=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,He=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Be(t,e){var n,i,a,r=t,o=null;return Ie(t)?r={ms:t._milliseconds,d:t._days,M:t._months}:h(t)||!isNaN(+t)?(r={},e?r[e]=+t:r.milliseconds=+t):(o=Ve.exec(t))?(n="-"===o[1]?-1:1,r={y:0,d:Z(o[2])*n,h:Z(o[3])*n,m:Z(o[4])*n,s:Z(o[5])*n,ms:Z(Ne(1e3*o[6]))*n}):(o=He.exec(t))?(n="-"===o[1]?-1:1,r={y:je(o[2],n),M:je(o[3],n),w:je(o[4],n),d:je(o[5],n),h:je(o[6],n),m:je(o[7],n),s:je(o[8],n)}):null==r?r={}:"object"==typeof r&&("from"in r||"to"in r)&&(a=function(t,e){var n;if(!t.isValid()||!e.isValid())return{milliseconds:0,months:0};e=We(e,t),t.isBefore(e)?n=Ue(t,e):((n=Ue(e,t)).milliseconds=-n.milliseconds,n.months=-n.months);return n}(Ce(r.from),Ce(r.to)),(r={}).ms=a.milliseconds,r.M=a.months),i=new Fe(r),Ie(t)&&l(t,"_locale")&&(i._locale=t._locale),Ie(t)&&l(t,"_isValid")&&(i._isValid=t._isValid),i}function je(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function Ue(t,e){var n={};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function Ge(t,e){return function(n,i){var a;return null===i||isNaN(+i)||(P(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),a=n,n=i,i=a),qe(this,Be(n,i),t),this}}function qe(t,e,n,i){var a=e._milliseconds,o=Ne(e._days),s=Ne(e._months);t.isValid()&&(i=null==i||i,s&&Ot(t,X(t,"Month")+s*n),o&&K(t,"Date",X(t,"Date")+o*n),a&&t._d.setTime(t._d.valueOf()+a*n),i&&r.updateOffset(t,o||s))}Be.fn=Fe.prototype,Be.invalid=function(){return Be(NaN)};var Ze=Ge(1,"add"),$e=Ge(-1,"subtract");function Xe(t){return"string"==typeof t||t instanceof String}function Ke(t){return k(t)||c(t)||Xe(t)||h(t)||function(t){var e=o(t),n=!1;e&&(n=0===t.filter((function(e){return!h(e)&&Xe(t)})).length);return e&&n}(t)||function(t){var e,n,i=s(t)&&!u(t),a=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"];for(e=0;e<r.length;e+=1)n=r[e],a=a||l(t,n);return i&&a}(t)||null==t}function Je(t){var e,n=s(t)&&!u(t),i=!1,a=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(e=0;e<a.length;e+=1)i=i||l(t,a[e]);return n&&i}function Qe(t,e){if(t.date()<e.date())return-Qe(e,t);var n=12*(e.year()-t.year())+(e.month()-t.month()),i=t.clone().add(n,"months");return-(n+(e-i<0?(e-i)/(i-t.clone().add(n-1,"months")):(e-i)/(t.clone().add(n+1,"months")-i)))||0}function tn(t){var e;return void 0===t?this._locale._abbr:(null!=(e=ue(t))&&(this._locale=e),this)}r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var en=S("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(t){return void 0===t?this.localeData():this.locale(t)}));function nn(){return this._locale}function an(t,e){return(t%e+e)%e}function rn(t,e,n){return t<100&&t>=0?new Date(t+400,e,n)-126227808e5:new Date(t,e,n).valueOf()}function on(t,e,n){return t<100&&t>=0?Date.UTC(t+400,e,n)-126227808e5:Date.UTC(t,e,n)}function sn(t,e){return e.erasAbbrRegex(t)}function ln(){var t,e,n=[],i=[],a=[],r=[],o=this.eras();for(t=0,e=o.length;t<e;++t)i.push(vt(o[t].name)),n.push(vt(o[t].abbr)),a.push(vt(o[t].narrow)),r.push(vt(o[t].name)),r.push(vt(o[t].abbr)),r.push(vt(o[t].narrow));this._erasRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+i.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+a.join("|")+")","i")}function un(t,e){Y(0,[t,t.length],0,e)}function dn(t,e,n,i,a){var r;return null==t?zt(this,i,a).year:(e>(r=Et(t,i,a))&&(e=r),hn.call(this,t,e,n,i,a))}function hn(t,e,n,i,a){var r=Wt(t,e,n,i,a),o=Lt(r.year,0,r.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}Y("N",0,0,"eraAbbr"),Y("NN",0,0,"eraAbbr"),Y("NNN",0,0,"eraAbbr"),Y("NNNN",0,0,"eraName"),Y("NNNNN",0,0,"eraNarrow"),Y("y",["y",1],"yo","eraYear"),Y("y",["yy",2],0,"eraYear"),Y("y",["yyy",3],0,"eraYear"),Y("y",["yyyy",4],0,"eraYear"),mt("N",sn),mt("NN",sn),mt("NNN",sn),mt("NNNN",(function(t,e){return e.erasNameRegex(t)})),mt("NNNNN",(function(t,e){return e.erasNarrowRegex(t)})),yt(["N","NN","NNN","NNNN","NNNNN"],(function(t,e,n,i){var a=n._locale.erasParse(t,i,n._strict);a?p(n).era=a:p(n).invalidEra=t})),mt("y",dt),mt("yy",dt),mt("yyy",dt),mt("yyyy",dt),mt("yo",(function(t,e){return e._eraYearOrdinalRegex||dt})),yt(["y","yy","yyy","yyyy"],0),yt(["yo"],(function(t,e,n,i){var a;n._locale._eraYearOrdinalRegex&&(a=t.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?e[0]=n._locale.eraYearOrdinalParse(t,a):e[0]=parseInt(t,10)})),Y(0,["gg",2],0,(function(){return this.weekYear()%100})),Y(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),un("gggg","weekYear"),un("ggggg","weekYear"),un("GGGG","isoWeekYear"),un("GGGGG","isoWeekYear"),V("weekYear","gg"),V("isoWeekYear","GG"),U("weekYear",1),U("isoWeekYear",1),mt("G",ht),mt("g",ht),mt("GG",at,tt),mt("gg",at,tt),mt("GGGG",lt,nt),mt("gggg",lt,nt),mt("GGGGG",ut,it),mt("ggggg",ut,it),xt(["gggg","ggggg","GGGG","GGGGG"],(function(t,e,n,i){e[i.substr(0,2)]=Z(t)})),xt(["gg","GG"],(function(t,e,n,i){e[i]=r.parseTwoDigitYear(t)})),Y("Q",0,"Qo","quarter"),V("quarter","Q"),U("quarter",7),mt("Q",Q),yt("Q",(function(t,e){e[1]=3*(Z(t)-1)})),Y("D",["DD",2],"Do","date"),V("date","D"),U("date",9),mt("D",at),mt("DD",at,tt),mt("Do",(function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient})),yt(["D","DD"],2),yt("Do",(function(t,e){e[2]=Z(t.match(at)[0])}));var cn=$("Date",!0);Y("DDD",["DDDD",3],"DDDo","dayOfYear"),V("dayOfYear","DDD"),U("dayOfYear",4),mt("DDD",st),mt("DDDD",et),yt(["DDD","DDDD"],(function(t,e,n){n._dayOfYear=Z(t)})),Y("m",["mm",2],0,"minute"),V("minute","m"),U("minute",14),mt("m",at),mt("mm",at,tt),yt(["m","mm"],4);var fn=$("Minutes",!1);Y("s",["ss",2],0,"second"),V("second","s"),U("second",15),mt("s",at),mt("ss",at,tt),yt(["s","ss"],5);var gn,mn,pn=$("Seconds",!1);for(Y("S",0,0,(function(){return~~(this.millisecond()/100)})),Y(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),Y(0,["SSS",3],0,"millisecond"),Y(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),Y(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),Y(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),Y(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),Y(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),Y(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),V("millisecond","ms"),U("millisecond",16),mt("S",st,Q),mt("SS",st,tt),mt("SSS",st,et),gn="SSSS";gn.length<=9;gn+="S")mt(gn,dt);function vn(t,e){e[6]=Z(1e3*("0."+t))}for(gn="S";gn.length<=9;gn+="S")yt(gn,vn);mn=$("Milliseconds",!1),Y("z",0,0,"zoneAbbr"),Y("zz",0,0,"zoneName");var bn=w.prototype;function yn(t){return t}bn.add=Ze,bn.calendar=function(t,e){1===arguments.length&&(arguments[0]?Ke(arguments[0])?(t=arguments[0],e=void 0):Je(arguments[0])&&(e=arguments[0],t=void 0):(t=void 0,e=void 0));var n=t||Ce(),i=We(n,this).startOf("day"),a=r.calendarFormat(this,i)||"sameElse",o=e&&(T(e[a])?e[a].call(this,n):e[a]);return this.format(o||this.localeData().calendar(a,this,Ce(n)))},bn.clone=function(){return new w(this)},bn.diff=function(t,e,n){var i,a,r;if(!this.isValid())return NaN;if(!(i=We(t,this)).isValid())return NaN;switch(a=6e4*(i.utcOffset()-this.utcOffset()),e=H(e)){case"year":r=Qe(this,i)/12;break;case"month":r=Qe(this,i);break;case"quarter":r=Qe(this,i)/3;break;case"second":r=(this-i)/1e3;break;case"minute":r=(this-i)/6e4;break;case"hour":r=(this-i)/36e5;break;case"day":r=(this-i-a)/864e5;break;case"week":r=(this-i-a)/6048e5;break;default:r=this-i}return n?r:q(r)},bn.endOf=function(t){var e,n;if(void 0===(t=H(t))||"millisecond"===t||!this.isValid())return this;switch(n=this._isUTC?on:rn,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+=36e5-an(e+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":e=this._d.valueOf(),e+=6e4-an(e,6e4)-1;break;case"second":e=this._d.valueOf(),e+=1e3-an(e,1e3)-1}return this._d.setTime(e),r.updateOffset(this,!0),this},bn.format=function(t){t||(t=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var e=W(this,t);return this.localeData().postformat(e)},bn.from=function(t,e){return this.isValid()&&(k(t)&&t.isValid()||Ce(t).isValid())?Be({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},bn.fromNow=function(t){return this.from(Ce(),t)},bn.to=function(t,e){return this.isValid()&&(k(t)&&t.isValid()||Ce(t).isValid())?Be({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},bn.toNow=function(t){return this.to(Ce(),t)},bn.get=function(t){return T(this[t=H(t)])?this[t]():this},bn.invalidAt=function(){return p(this).overflow},bn.isAfter=function(t,e){var n=k(t)?t:Ce(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=H(e)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(e).valueOf())},bn.isBefore=function(t,e){var n=k(t)?t:Ce(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=H(e)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(e).valueOf()<n.valueOf())},bn.isBetween=function(t,e,n,i){var a=k(t)?t:Ce(t),r=k(e)?e:Ce(e);return!!(this.isValid()&&a.isValid()&&r.isValid())&&(("("===(i=i||"()")[0]?this.isAfter(a,n):!this.isBefore(a,n))&&(")"===i[1]?this.isBefore(r,n):!this.isAfter(r,n)))},bn.isSame=function(t,e){var n,i=k(t)?t:Ce(t);return!(!this.isValid()||!i.isValid())&&("millisecond"===(e=H(e)||"millisecond")?this.valueOf()===i.valueOf():(n=i.valueOf(),this.clone().startOf(e).valueOf()<=n&&n<=this.clone().endOf(e).valueOf()))},bn.isSameOrAfter=function(t,e){return this.isSame(t,e)||this.isAfter(t,e)},bn.isSameOrBefore=function(t,e){return this.isSame(t,e)||this.isBefore(t,e)},bn.isValid=function(){return v(this)},bn.lang=en,bn.locale=tn,bn.localeData=nn,bn.max=Te,bn.min=Pe,bn.parsingFlags=function(){return g({},p(this))},bn.set=function(t,e){if("object"==typeof t){var n,i=function(t){var e,n=[];for(e in t)l(t,e)&&n.push({unit:e,priority:j[e]});return n.sort((function(t,e){return t.priority-e.priority})),n}(t=B(t));for(n=0;n<i.length;n++)this[i[n].unit](t[i[n].unit])}else if(T(this[t=H(t)]))return this[t](e);return this},bn.startOf=function(t){var e,n;if(void 0===(t=H(t))||"millisecond"===t||!this.isValid())return this;switch(n=this._isUTC?on:rn,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-=an(e+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":e=this._d.valueOf(),e-=an(e,6e4);break;case"second":e=this._d.valueOf(),e-=an(e,1e3)}return this._d.setTime(e),r.updateOffset(this,!0),this},bn.subtract=$e,bn.toArray=function(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]},bn.toObject=function(){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()}},bn.toDate=function(){return new Date(this.valueOf())},bn.toISOString=function(t){if(!this.isValid())return null;var e=!0!==t,n=e?this.clone().utc():this;return n.year()<0||n.year()>9999?W(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):T(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",W(n,"Z")):W(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},bn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t,e,n,i="moment",a="";return this.isLocal()||(i=0===this.utcOffset()?"moment.utc":"moment.parseZone",a="Z"),t="["+i+'("]',e=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY","-MM-DD[T]HH:mm:ss.SSS",n=a+'[")]',this.format(t+e+"-MM-DD[T]HH:mm:ss.SSS"+n)},"undefined"!=typeof Symbol&&null!=Symbol.for&&(bn[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),bn.toJSON=function(){return this.isValid()?this.toISOString():null},bn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},bn.unix=function(){return Math.floor(this.valueOf()/1e3)},bn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},bn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},bn.eraName=function(){var t,e,n,i=this.localeData().eras();for(t=0,e=i.length;t<e;++t){if(n=this.clone().startOf("day").valueOf(),i[t].since<=n&&n<=i[t].until)return i[t].name;if(i[t].until<=n&&n<=i[t].since)return i[t].name}return""},bn.eraNarrow=function(){var t,e,n,i=this.localeData().eras();for(t=0,e=i.length;t<e;++t){if(n=this.clone().startOf("day").valueOf(),i[t].since<=n&&n<=i[t].until)return i[t].narrow;if(i[t].until<=n&&n<=i[t].since)return i[t].narrow}return""},bn.eraAbbr=function(){var t,e,n,i=this.localeData().eras();for(t=0,e=i.length;t<e;++t){if(n=this.clone().startOf("day").valueOf(),i[t].since<=n&&n<=i[t].until)return i[t].abbr;if(i[t].until<=n&&n<=i[t].since)return i[t].abbr}return""},bn.eraYear=function(){var t,e,n,i,a=this.localeData().eras();for(t=0,e=a.length;t<e;++t)if(n=a[t].since<=a[t].until?1:-1,i=this.clone().startOf("day").valueOf(),a[t].since<=i&&i<=a[t].until||a[t].until<=i&&i<=a[t].since)return(this.year()-r(a[t].since).year())*n+a[t].offset;return this.year()},bn.year=Nt,bn.isLeapYear=function(){return G(this.year())},bn.weekYear=function(t){return dn.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},bn.isoWeekYear=function(t){return dn.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)},bn.quarter=bn.quarters=function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},bn.month=At,bn.daysInMonth=function(){return kt(this.year(),this.month())},bn.week=bn.weeks=function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")},bn.isoWeek=bn.isoWeeks=function(t){var e=zt(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")},bn.weeksInYear=function(){var t=this.localeData()._week;return Et(this.year(),t.dow,t.doy)},bn.weeksInWeekYear=function(){var t=this.localeData()._week;return Et(this.weekYear(),t.dow,t.doy)},bn.isoWeeksInYear=function(){return Et(this.year(),1,4)},bn.isoWeeksInISOWeekYear=function(){return Et(this.isoWeekYear(),1,4)},bn.date=cn,bn.day=bn.days=function(t){if(!this.isValid())return null!=t?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=function(t,e){return"string"!=typeof t?t:isNaN(t)?"number"==typeof(t=e.weekdaysParse(t))?t:null:parseInt(t,10)}(t,this.localeData()),this.add(t-e,"d")):e},bn.weekday=function(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")},bn.isoWeekday=function(t){if(!this.isValid())return null!=t?this:NaN;if(null!=t){var e=function(t,e){return"string"==typeof t?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}(t,this.localeData());return this.day(this.day()%7?e:e-7)}return this.day()||7},bn.dayOfYear=function(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")},bn.hour=bn.hours=Qt,bn.minute=bn.minutes=fn,bn.second=bn.seconds=pn,bn.millisecond=bn.milliseconds=mn,bn.utcOffset=function(t,e,n){var i,a=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null!=t){if("string"==typeof t){if(null===(t=Ye(ft,t)))return this}else Math.abs(t)<16&&!n&&(t*=60);return!this._isUTC&&e&&(i=ze(this)),this._offset=t,this._isUTC=!0,null!=i&&this.add(i,"m"),a!==t&&(!e||this._changeInProgress?qe(this,Be(t-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?a:ze(this)},bn.utc=function(t){return this.utcOffset(0,t)},bn.local=function(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(ze(this),"m")),this},bn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var t=Ye(ct,this._i);null!=t?this.utcOffset(t):this.utcOffset(0,!0)}return this},bn.hasAlignedHourOffset=function(t){return!!this.isValid()&&(t=t?Ce(t).utcOffset():0,(this.utcOffset()-t)%60==0)},bn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},bn.isLocal=function(){return!!this.isValid()&&!this._isUTC},bn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},bn.isUtc=Ee,bn.isUTC=Ee,bn.zoneAbbr=function(){return this._isUTC?"UTC":""},bn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},bn.dates=S("dates accessor is deprecated. Use date instead.",cn),bn.months=S("months accessor is deprecated. Use month instead",At),bn.years=S("years accessor is deprecated. Use year instead",Nt),bn.zone=S("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()})),bn.isDSTShifted=S("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!d(this._isDSTShifted))return this._isDSTShifted;var t,e={};return _(e,this),(e=Se(e))._a?(t=e._isUTC?m(e._a):Ce(e._a),this._isDSTShifted=this.isValid()&&function(t,e,n){var i,a=Math.min(t.length,e.length),r=Math.abs(t.length-e.length),o=0;for(i=0;i<a;i++)(n&&t[i]!==e[i]||!n&&Z(t[i])!==Z(e[i]))&&o++;return o+r}(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}));var xn=A.prototype;function _n(t,e,n,i){var a=ue(),r=m().set(i,e);return a[n](r,t)}function wn(t,e,n){if(h(t)&&(e=t,t=void 0),t=t||"",null!=e)return _n(t,e,n,"month");var i,a=[];for(i=0;i<12;i++)a[i]=_n(t,i,n,"month");return a}function kn(t,e,n,i){"boolean"==typeof t?(h(e)&&(n=e,e=void 0),e=e||""):(n=e=t,t=!1,h(e)&&(n=e,e=void 0),e=e||"");var a,r=ue(),o=t?r._week.dow:0,s=[];if(null!=n)return _n(e,(n+o)%7,i,"day");for(a=0;a<7;a++)s[a]=_n(e,(a+o)%7,i,"day");return s}xn.calendar=function(t,e,n){var i=this._calendar[t]||this._calendar.sameElse;return T(i)?i.call(e,n):i},xn.longDateFormat=function(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.match(I).map((function(t){return"MMMM"===t||"MM"===t||"DD"===t||"dddd"===t?t.slice(1):t})).join(""),this._longDateFormat[t])},xn.invalidDate=function(){return this._invalidDate},xn.ordinal=function(t){return this._ordinal.replace("%d",t)},xn.preparse=yn,xn.postformat=yn,xn.relativeTime=function(t,e,n,i){var a=this._relativeTime[n];return T(a)?a(t,e,n,i):a.replace(/%d/i,t)},xn.pastFuture=function(t,e){var n=this._relativeTime[t>0?"future":"past"];return T(n)?n(e):n.replace(/%s/i,e)},xn.set=function(t){var e,n;for(n in t)l(t,n)&&(T(e=t[n])?this[n]=e:this["_"+n]=e);this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},xn.eras=function(t,e){var n,i,a,o=this._eras||ue("en")._eras;for(n=0,i=o.length;n<i;++n){switch(typeof o[n].since){case"string":a=r(o[n].since).startOf("day"),o[n].since=a.valueOf()}switch(typeof o[n].until){case"undefined":o[n].until=1/0;break;case"string":a=r(o[n].until).startOf("day").valueOf(),o[n].until=a.valueOf()}}return o},xn.erasParse=function(t,e,n){var i,a,r,o,s,l=this.eras();for(t=t.toUpperCase(),i=0,a=l.length;i<a;++i)if(r=l[i].name.toUpperCase(),o=l[i].abbr.toUpperCase(),s=l[i].narrow.toUpperCase(),n)switch(e){case"N":case"NN":case"NNN":if(o===t)return l[i];break;case"NNNN":if(r===t)return l[i];break;case"NNNNN":if(s===t)return l[i]}else if([r,o,s].indexOf(t)>=0)return l[i]},xn.erasConvertYear=function(t,e){var n=t.since<=t.until?1:-1;return void 0===e?r(t.since).year():r(t.since).year()+(e-t.offset)*n},xn.erasAbbrRegex=function(t){return l(this,"_erasAbbrRegex")||ln.call(this),t?this._erasAbbrRegex:this._erasRegex},xn.erasNameRegex=function(t){return l(this,"_erasNameRegex")||ln.call(this),t?this._erasNameRegex:this._erasRegex},xn.erasNarrowRegex=function(t){return l(this,"_erasNarrowRegex")||ln.call(this),t?this._erasNarrowRegex:this._erasRegex},xn.months=function(t,e){return t?o(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||Dt).test(e)?"format":"standalone"][t.month()]:o(this._months)?this._months:this._months.standalone},xn.monthsShort=function(t,e){return t?o(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[Dt.test(e)?"format":"standalone"][t.month()]:o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},xn.monthsParse=function(t,e,n){var i,a,r;if(this._monthsParseExact)return Tt.call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++){if(a=m([2e3,i]),n&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(a,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(a,"").replace(".","")+"$","i")),n||this._monthsParse[i]||(r="^"+this.months(a,"")+"|^"+this.monthsShort(a,""),this._monthsParse[i]=new RegExp(r.replace(".",""),"i")),n&&"MMMM"===e&&this._longMonthsParse[i].test(t))return i;if(n&&"MMM"===e&&this._shortMonthsParse[i].test(t))return i;if(!n&&this._monthsParse[i].test(t))return i}},xn.monthsRegex=function(t){return this._monthsParseExact?(l(this,"_monthsRegex")||Ft.call(this),t?this._monthsStrictRegex:this._monthsRegex):(l(this,"_monthsRegex")||(this._monthsRegex=Pt),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)},xn.monthsShortRegex=function(t){return this._monthsParseExact?(l(this,"_monthsRegex")||Ft.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(l(this,"_monthsShortRegex")||(this._monthsShortRegex=Ct),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)},xn.week=function(t){return zt(t,this._week.dow,this._week.doy).week},xn.firstDayOfYear=function(){return this._week.doy},xn.firstDayOfWeek=function(){return this._week.dow},xn.weekdays=function(t,e){var n=o(this._weekdays)?this._weekdays:this._weekdays[t&&!0!==t&&this._weekdays.isFormat.test(e)?"format":"standalone"];return!0===t?Vt(n,this._week.dow):t?n[t.day()]:n},xn.weekdaysMin=function(t){return!0===t?Vt(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin},xn.weekdaysShort=function(t){return!0===t?Vt(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort},xn.weekdaysParse=function(t,e,n){var i,a,r;if(this._weekdaysParseExact)return Zt.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(a=m([2e3,1]).day(i),n&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(a,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(a,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(a,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[i]||(r="^"+this.weekdays(a,"")+"|^"+this.weekdaysShort(a,"")+"|^"+this.weekdaysMin(a,""),this._weekdaysParse[i]=new RegExp(r.replace(".",""),"i")),n&&"dddd"===e&&this._fullWeekdaysParse[i].test(t))return i;if(n&&"ddd"===e&&this._shortWeekdaysParse[i].test(t))return i;if(n&&"dd"===e&&this._minWeekdaysParse[i].test(t))return i;if(!n&&this._weekdaysParse[i].test(t))return i}},xn.weekdaysRegex=function(t){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||$t.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(l(this,"_weekdaysRegex")||(this._weekdaysRegex=Ut),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)},xn.weekdaysShortRegex=function(t){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||$t.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(l(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Gt),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},xn.weekdaysMinRegex=function(t){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||$t.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(l(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=qt),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},xn.isPM=function(t){return"p"===(t+"").toLowerCase().charAt(0)},xn.meridiem=function(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"},se("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===Z(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),r.lang=S("moment.lang is deprecated. Use moment.locale instead.",se),r.langData=S("moment.langData is deprecated. Use moment.localeData instead.",ue);var Mn=Math.abs;function Sn(t,e,n,i){var a=Be(e,n);return t._milliseconds+=i*a._milliseconds,t._days+=i*a._days,t._months+=i*a._months,t._bubble()}function Dn(t){return t<0?Math.floor(t):Math.ceil(t)}function Cn(t){return 4800*t/146097}function Pn(t){return 146097*t/4800}function Tn(t){return function(){return this.as(t)}}var On=Tn("ms"),An=Tn("s"),Fn=Tn("m"),In=Tn("h"),Nn=Tn("d"),Rn=Tn("w"),Ln=Tn("M"),Yn=Tn("Q"),Wn=Tn("y");function zn(t){return function(){return this.isValid()?this._data[t]:NaN}}var En=zn("milliseconds"),Vn=zn("seconds"),Hn=zn("minutes"),Bn=zn("hours"),jn=zn("days"),Un=zn("months"),Gn=zn("years");var qn=Math.round,Zn={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function $n(t,e,n,i,a){return a.relativeTime(e||1,!!n,t,i)}var Xn=Math.abs;function Kn(t){return(t>0)-(t<0)||+t}function Jn(){if(!this.isValid())return this.localeData().invalidDate();var t,e,n,i,a,r,o,s,l=Xn(this._milliseconds)/1e3,u=Xn(this._days),d=Xn(this._months),h=this.asSeconds();return h?(t=q(l/60),e=q(t/60),l%=60,t%=60,n=q(d/12),d%=12,i=l?l.toFixed(3).replace(/\.?0+$/,""):"",a=h<0?"-":"",r=Kn(this._months)!==Kn(h)?"-":"",o=Kn(this._days)!==Kn(h)?"-":"",s=Kn(this._milliseconds)!==Kn(h)?"-":"",a+"P"+(n?r+n+"Y":"")+(d?r+d+"M":"")+(u?o+u+"D":"")+(e||t||l?"T":"")+(e?s+e+"H":"")+(t?s+t+"M":"")+(l?s+i+"S":"")):"P0D"}var Qn=Fe.prototype;Qn.isValid=function(){return this._isValid},Qn.abs=function(){var t=this._data;return this._milliseconds=Mn(this._milliseconds),this._days=Mn(this._days),this._months=Mn(this._months),t.milliseconds=Mn(t.milliseconds),t.seconds=Mn(t.seconds),t.minutes=Mn(t.minutes),t.hours=Mn(t.hours),t.months=Mn(t.months),t.years=Mn(t.years),this},Qn.add=function(t,e){return Sn(this,t,e,1)},Qn.subtract=function(t,e){return Sn(this,t,e,-1)},Qn.as=function(t){if(!this.isValid())return NaN;var e,n,i=this._milliseconds;if("month"===(t=H(t))||"quarter"===t||"year"===t)switch(e=this._days+i/864e5,n=this._months+Cn(e),t){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(e=this._days+Math.round(Pn(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)}},Qn.asMilliseconds=On,Qn.asSeconds=An,Qn.asMinutes=Fn,Qn.asHours=In,Qn.asDays=Nn,Qn.asWeeks=Rn,Qn.asMonths=Ln,Qn.asQuarters=Yn,Qn.asYears=Wn,Qn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*Z(this._months/12):NaN},Qn._bubble=function(){var t,e,n,i,a,r=this._milliseconds,o=this._days,s=this._months,l=this._data;return r>=0&&o>=0&&s>=0||r<=0&&o<=0&&s<=0||(r+=864e5*Dn(Pn(s)+o),o=0,s=0),l.milliseconds=r%1e3,t=q(r/1e3),l.seconds=t%60,e=q(t/60),l.minutes=e%60,n=q(e/60),l.hours=n%24,o+=q(n/24),s+=a=q(Cn(o)),o-=Dn(Pn(a)),i=q(s/12),s%=12,l.days=o,l.months=s,l.years=i,this},Qn.clone=function(){return Be(this)},Qn.get=function(t){return t=H(t),this.isValid()?this[t+"s"]():NaN},Qn.milliseconds=En,Qn.seconds=Vn,Qn.minutes=Hn,Qn.hours=Bn,Qn.days=jn,Qn.weeks=function(){return q(this.days()/7)},Qn.months=Un,Qn.years=Gn,Qn.humanize=function(t,e){if(!this.isValid())return this.localeData().invalidDate();var n,i,a=!1,r=Zn;return"object"==typeof t&&(e=t,t=!1),"boolean"==typeof t&&(a=t),"object"==typeof e&&(r=Object.assign({},Zn,e),null!=e.s&&null==e.ss&&(r.ss=e.s-1)),i=function(t,e,n,i){var a=Be(t).abs(),r=qn(a.as("s")),o=qn(a.as("m")),s=qn(a.as("h")),l=qn(a.as("d")),u=qn(a.as("M")),d=qn(a.as("w")),h=qn(a.as("y")),c=r<=n.ss&&["s",r]||r<n.s&&["ss",r]||o<=1&&["m"]||o<n.m&&["mm",o]||s<=1&&["h"]||s<n.h&&["hh",s]||l<=1&&["d"]||l<n.d&&["dd",l];return null!=n.w&&(c=c||d<=1&&["w"]||d<n.w&&["ww",d]),(c=c||u<=1&&["M"]||u<n.M&&["MM",u]||h<=1&&["y"]||["yy",h])[2]=e,c[3]=+t>0,c[4]=i,$n.apply(null,c)}(this,!a,r,n=this.localeData()),a&&(i=n.pastFuture(+this,i)),n.postformat(i)},Qn.toISOString=Jn,Qn.toString=Jn,Qn.toJSON=Jn,Qn.locale=tn,Qn.localeData=nn,Qn.toIsoString=S("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Jn),Qn.lang=en,Y("X",0,0,"unix"),Y("x",0,0,"valueOf"),mt("x",ht),mt("X",/[+-]?\d+(\.\d{1,3})?/),yt("X",(function(t,e,n){n._d=new Date(1e3*parseFloat(t))})),yt("x",(function(t,e,n){n._d=new Date(Z(t))})),
+//! moment.js
+r.version="2.29.1",n=Ce,r.fn=bn,r.min=function(){var t=[].slice.call(arguments,0);return Oe("isBefore",t)},r.max=function(){var t=[].slice.call(arguments,0);return Oe("isAfter",t)},r.now=function(){return Date.now?Date.now():+new Date},r.utc=m,r.unix=function(t){return Ce(1e3*t)},r.months=function(t,e){return wn(t,e,"months")},r.isDate=c,r.locale=se,r.invalid=b,r.duration=Be,r.isMoment=k,r.weekdays=function(t,e,n){return kn(t,e,n,"weekdays")},r.parseZone=function(){return Ce.apply(null,arguments).parseZone()},r.localeData=ue,r.isDuration=Ie,r.monthsShort=function(t,e){return wn(t,e,"monthsShort")},r.weekdaysMin=function(t,e,n){return kn(t,e,n,"weekdaysMin")},r.defineLocale=le,r.updateLocale=function(t,e){if(null!=e){var n,i,a=ee;null!=ne[t]&&null!=ne[t].parentLocale?ne[t].set(O(ne[t]._config,e)):(null!=(i=oe(t))&&(a=i._config),e=O(a,e),null==i&&(e.abbr=t),(n=new A(e)).parentLocale=ne[t],ne[t]=n),se(t)}else null!=ne[t]&&(null!=ne[t].parentLocale?(ne[t]=ne[t].parentLocale,t===se()&&se(t)):null!=ne[t]&&delete ne[t]);return ne[t]},r.locales=function(){return D(ne)},r.weekdaysShort=function(t,e,n){return kn(t,e,n,"weekdaysShort")},r.normalizeUnits=H,r.relativeTimeRounding=function(t){return void 0===t?qn:"function"==typeof t&&(qn=t,!0)},r.relativeTimeThreshold=function(t,e){return void 0!==Zn[t]&&(void 0===e?Zn[t]:(Zn[t]=e,"s"===t&&(Zn.ss=e-1),!0))},r.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"},r.prototype=bn,r.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"};var ti=t(Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:r})),ei=a.exports=function(t){t=t&&t.hasOwnProperty("default")?t.default:t;var e,n={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]},i=(function(t){var e={};for(var i in n)n.hasOwnProperty(i)&&(e[n[i]]=i);var a=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 r in a)if(a.hasOwnProperty(r)){if(!("channels"in a[r]))throw new Error("missing channels property: "+r);if(!("labels"in a[r]))throw new Error("missing channel labels property: "+r);if(a[r].labels.length!==a[r].channels)throw new Error("channel and label counts mismatch: "+r);var o=a[r].channels,s=a[r].labels;delete a[r].channels,delete a[r].labels,Object.defineProperty(a[r],"channels",{value:o}),Object.defineProperty(a[r],"labels",{value:s})}a.rgb.hsl=function(t){var e,n,i=t[0]/255,a=t[1]/255,r=t[2]/255,o=Math.min(i,a,r),s=Math.max(i,a,r),l=s-o;return s===o?e=0:i===s?e=(a-r)/l:a===s?e=2+(r-i)/l:r===s&&(e=4+(i-a)/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]},a.rgb.hsv=function(t){var e,n,i,a,r,o=t[0]/255,s=t[1]/255,l=t[2]/255,u=Math.max(o,s,l),d=u-Math.min(o,s,l),h=function(t){return(u-t)/6/d+.5};return 0===d?a=r=0:(r=d/u,e=h(o),n=h(s),i=h(l),o===u?a=i-n:s===u?a=1/3+e-i:l===u&&(a=2/3+n-e),a<0?a+=1:a>1&&(a-=1)),[360*a,100*r,100*u]},a.rgb.hwb=function(t){var e=t[0],n=t[1],i=t[2];return[a.rgb.hsl(t)[0],1/255*Math.min(e,Math.min(n,i))*100,100*(i=1-1/255*Math.max(e,Math.max(n,i)))]},a.rgb.cmyk=function(t){var e,n=t[0]/255,i=t[1]/255,a=t[2]/255;return[100*((1-n-(e=Math.min(1-n,1-i,1-a)))/(1-e)||0),100*((1-i-e)/(1-e)||0),100*((1-a-e)/(1-e)||0),100*e]},a.rgb.keyword=function(t){var i=e[t];if(i)return i;var a,r,o,s=1/0;for(var l in n)if(n.hasOwnProperty(l)){var u=(r=t,o=n[l],Math.pow(r[0]-o[0],2)+Math.pow(r[1]-o[1],2)+Math.pow(r[2]-o[2],2));u<s&&(s=u,a=l)}return a},a.keyword.rgb=function(t){return n[t]},a.rgb.xyz=function(t){var e=t[0]/255,n=t[1]/255,i=t[2]/255;return[100*(.4124*(e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(i=i>.04045?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)]},a.rgb.lab=function(t){var e=a.rgb.xyz(t),n=e[0],i=e[1],r=e[2];return i/=100,r/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116)-16,500*(n-i),200*(i-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]},a.hsl.rgb=function(t){var e,n,i,a,r,o=t[0]/360,s=t[1]/100,l=t[2]/100;if(0===s)return[r=255*l,r,r];e=2*l-(n=l<.5?l*(1+s):l+s-l*s),a=[0,0,0];for(var u=0;u<3;u++)(i=o+1/3*-(u-1))<0&&i++,i>1&&i--,r=6*i<1?e+6*(n-e)*i:2*i<1?n:3*i<2?e+(n-e)*(2/3-i)*6:e,a[u]=255*r;return a},a.hsl.hsv=function(t){var e=t[0],n=t[1]/100,i=t[2]/100,a=n,r=Math.max(i,.01);return n*=(i*=2)<=1?i:2-i,a*=r<=1?r:2-r,[e,100*(0===i?2*a/(r+a):2*n/(i+n)),(i+n)/2*100]},a.hsv.rgb=function(t){var e=t[0]/60,n=t[1]/100,i=t[2]/100,a=Math.floor(e)%6,r=e-Math.floor(e),o=255*i*(1-n),s=255*i*(1-n*r),l=255*i*(1-n*(1-r));switch(i*=255,a){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]}},a.hsv.hsl=function(t){var e,n,i,a=t[0],r=t[1]/100,o=t[2]/100,s=Math.max(o,.01);return i=(2-r)*o,n=r*s,[a,100*(n=(n/=(e=(2-r)*s)<=1?e:2-e)||0),100*(i/=2)]},a.hwb.rgb=function(t){var e,n,i,a,r,o,s,l=t[0]/360,u=t[1]/100,d=t[2]/100,h=u+d;switch(h>1&&(u/=h,d/=h),i=6*l-(e=Math.floor(6*l)),0!=(1&e)&&(i=1-i),a=u+i*((n=1-d)-u),e){default:case 6:case 0:r=n,o=a,s=u;break;case 1:r=a,o=n,s=u;break;case 2:r=u,o=n,s=a;break;case 3:r=u,o=a,s=n;break;case 4:r=a,o=u,s=n;break;case 5:r=n,o=u,s=a}return[255*r,255*o,255*s]},a.cmyk.rgb=function(t){var e=t[0]/100,n=t[1]/100,i=t[2]/100,a=t[3]/100;return[255*(1-Math.min(1,e*(1-a)+a)),255*(1-Math.min(1,n*(1-a)+a)),255*(1-Math.min(1,i*(1-a)+a))]},a.xyz.rgb=function(t){var e,n,i,a=t[0]/100,r=t[1]/100,o=t[2]/100;return n=-.9689*a+1.8758*r+.0415*o,i=.0557*a+-.204*r+1.057*o,e=(e=3.2406*a+-1.5372*r+-.4986*o)>.0031308?1.055*Math.pow(e,1/2.4)-.055:12.92*e,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:12.92*i,[255*(e=Math.min(Math.max(0,e),1)),255*(n=Math.min(Math.max(0,n),1)),255*(i=Math.min(Math.max(0,i),1))]},a.xyz.lab=function(t){var e=t[0],n=t[1],i=t[2];return n/=100,i/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(e-n),200*(n-(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116))]},a.lab.xyz=function(t){var e,n,i,a=t[0];e=t[1]/500+(n=(a+16)/116),i=n-t[2]/200;var r=Math.pow(n,3),o=Math.pow(e,3),s=Math.pow(i,3);return n=r>.008856?r:(n-16/116)/7.787,e=o>.008856?o:(e-16/116)/7.787,i=s>.008856?s:(i-16/116)/7.787,[e*=95.047,n*=100,i*=108.883]},a.lab.lch=function(t){var e,n=t[0],i=t[1],a=t[2];return(e=360*Math.atan2(a,i)/2/Math.PI)<0&&(e+=360),[n,Math.sqrt(i*i+a*a),e]},a.lch.lab=function(t){var e,n=t[0],i=t[1];return e=t[2]/360*2*Math.PI,[n,i*Math.cos(e),i*Math.sin(e)]},a.rgb.ansi16=function(t){var e=t[0],n=t[1],i=t[2],r=1 in arguments?arguments[1]:a.rgb.hsv(t)[2];if(0===(r=Math.round(r/50)))return 30;var o=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(e/255));return 2===r&&(o+=60),o},a.hsv.ansi16=function(t){return a.rgb.ansi16(a.hsv.rgb(t),t[2])},a.rgb.ansi256=function(t){var e=t[0],n=t[1],i=t[2];return e===n&&n===i?e<8?16:e>248?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)},a.ansi16.rgb=function(t){var e=t%10;if(0===e||7===e)return t>50&&(e+=3.5),[e=e/10.5*255,e,e];var n=.5*(1+~~(t>50));return[(1&e)*n*255,(e>>1&1)*n*255,(e>>2&1)*n*255]},a.ansi256.rgb=function(t){if(t>=232){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]},a.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},a.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]},a.rgb.hcg=function(t){var e,n=t[0]/255,i=t[1]/255,a=t[2]/255,r=Math.max(Math.max(n,i),a),o=Math.min(Math.min(n,i),a),s=r-o;return e=s<=0?0:r===n?(i-a)/s%6:r===i?2+(a-n)/s:4+(n-i)/s+4,e/=6,[360*(e%=1),100*s,100*(s<1?o/(1-s):0)]},a.hsl.hcg=function(t){var e=t[1]/100,n=t[2]/100,i=1,a=0;return(i=n<.5?2*e*n:2*e*(1-n))<1&&(a=(n-.5*i)/(1-i)),[t[0],100*i,100*a]},a.hsv.hcg=function(t){var e=t[1]/100,n=t[2]/100,i=e*n,a=0;return i<1&&(a=(n-i)/(1-i)),[t[0],100*i,100*a]},a.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 a,r=[0,0,0],o=e%1*6,s=o%1,l=1-s;switch(Math.floor(o)){case 0:r[0]=1,r[1]=s,r[2]=0;break;case 1:r[0]=l,r[1]=1,r[2]=0;break;case 2:r[0]=0,r[1]=1,r[2]=s;break;case 3:r[0]=0,r[1]=l,r[2]=1;break;case 4:r[0]=s,r[1]=0,r[2]=1;break;default:r[0]=1,r[1]=0,r[2]=l}return a=(1-n)*i,[255*(n*r[0]+a),255*(n*r[1]+a),255*(n*r[2]+a)]},a.hcg.hsv=function(t){var e=t[1]/100,n=e+t[2]/100*(1-e),i=0;return n>0&&(i=e/n),[t[0],100*i,100*n]},a.hcg.hsl=function(t){var e=t[1]/100,n=t[2]/100*(1-e)+.5*e,i=0;return n>0&&n<.5?i=e/(2*n):n>=.5&&n<1&&(i=e/(2*(1-n))),[t[0],100*i,100*n]},a.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)]},a.hwb.hcg=function(t){var e=t[1]/100,n=1-t[2]/100,i=n-e,a=0;return i<1&&(a=(n-i)/(1-i)),[t[0],100*i,100*a]},a.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},a.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},a.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},a.gray.hsl=a.gray.hsv=function(t){return[0,0,t[0]]},a.gray.hwb=function(t){return[0,100,t[0]]},a.gray.cmyk=function(t){return[0,0,0,t[0]]},a.gray.lab=function(t){return[t[0],0,0]},a.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},a.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}}(e={exports:{}},e.exports),e.exports);function a(t){var e=function(){for(var t={},e=Object.keys(i),n=e.length,a=0;a<n;a++)t[e[a]]={distance:-1,parent:null};return t}(),n=[t];for(e[t].distance=0;n.length;)for(var a=n.pop(),r=Object.keys(i[a]),o=r.length,s=0;s<o;s++){var l=r[s],u=e[l];-1===u.distance&&(u.distance=e[a].distance+1,u.parent=a,n.unshift(l))}return e}function r(t,e){return function(n){return e(t(n))}}function o(t,e){for(var n=[e[t].parent,t],a=i[e[t].parent][t],o=e[t].parent;e[o].parent;)n.unshift(e[o].parent),a=r(i[e[o].parent][o],a),o=e[o].parent;return a.conversion=n,a}i.rgb,i.hsl,i.hsv,i.hwb,i.cmyk,i.xyz,i.lab,i.lch,i.hex,i.keyword,i.ansi16,i.ansi256,i.hcg,i.apple,i.gray;var s={};Object.keys(i).forEach((function(t){s[t]={},Object.defineProperty(s[t],"channels",{value:i[t].channels}),Object.defineProperty(s[t],"labels",{value:i[t].labels});var e=function(t){for(var e=a(t),n={},i=Object.keys(e),r=i.length,s=0;s<r;s++){var l=i[s];null!==e[l].parent&&(n[l]=o(l,e))}return n}(t);Object.keys(e).forEach((function(n){var i,a,r=e[n];s[t][n]=(a=function(t){if(null==t)return t;arguments.length>1&&(t=Array.prototype.slice.call(arguments));var e=i(t);if("object"==typeof e)for(var n=e.length,a=0;a<n;a++)e[a]=Math.round(e[a]);return e},"conversion"in(i=r)&&(a.conversion=i.conversion),a),s[t][n].raw=function(t){var e=function(e){return null==e?e:(arguments.length>1&&(e=Array.prototype.slice.call(arguments)),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}(r)}))}));var l=s,u={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]},d={getRgba:h,getHsla:c,getRgb:function(t){var e=h(t);return e&&e.slice(0,3)},getHsl:function(t){var e=c(t);return e&&e.slice(0,3)},getHwb:f,getAlpha:function(t){var e=h(t);return e||(e=c(t))||(e=f(t))?e[3]:void 0},hexString:function(t,e){return e=void 0!==e&&3===t.length?e:t[3],"#"+b(t[0])+b(t[1])+b(t[2])+(e>=0&&e<1?b(Math.round(255*e)):"")},rgbString:function(t,e){return e<1||t[3]&&t[3]<1?g(t,e):"rgb("+t[0]+", "+t[1]+", "+t[2]+")"},rgbaString:g,percentString:function(t,e){return e<1||t[3]&&t[3]<1?m(t,e):"rgb("+Math.round(t[0]/255*100)+"%, "+Math.round(t[1]/255*100)+"%, "+Math.round(t[2]/255*100)+"%)"},percentaString:m,hslString:function(t,e){return e<1||t[3]&&t[3]<1?p(t,e):"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"},hslaString:p,hwbString:function(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+(void 0!==e&&1!==e?", "+e:"")+")"},keyword:function(t){return y[t.slice(0,3)]}};function h(t){if(t){var e=[0,0,0],n=1,i=t.match(/^#([a-fA-F0-9]{3,4})$/i),a="";if(i){a=(i=i[1])[3];for(var r=0;r<e.length;r++)e[r]=parseInt(i[r]+i[r],16);a&&(n=Math.round(parseInt(a+a,16)/255*100)/100)}else if(i=t.match(/^#([a-fA-F0-9]{6}([a-fA-F0-9]{2})?)$/i)){for(a=i[2],i=i[1],r=0;r<e.length;r++)e[r]=parseInt(i.slice(2*r,2*r+2),16);a&&(n=Math.round(parseInt(a,16)/255*100)/100)}else if(i=t.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(r=0;r<e.length;r++)e[r]=parseInt(i[r+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(r=0;r<e.length;r++)e[r]=Math.round(2.55*parseFloat(i[r+1]));n=parseFloat(i[4])}else if(i=t.match(/(\w+)/)){if("transparent"==i[1])return[0,0,0,0];if(!(e=u[i[1]]))return}for(r=0;r<e.length;r++)e[r]=v(e[r],0,255);return n=n||0==n?v(n,0,1):1,e[3]=n,e}}function c(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[v(parseInt(e[1]),0,360),v(parseFloat(e[2]),0,100),v(parseFloat(e[3]),0,100),v(isNaN(n)?1:n,0,1)]}}}function f(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[v(parseInt(e[1]),0,360),v(parseFloat(e[2]),0,100),v(parseFloat(e[3]),0,100),v(isNaN(n)?1:n,0,1)]}}}function g(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+e+")"}function m(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 p(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+e+")"}function v(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 y={};for(var x in u)y[u[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=d.getRgba(t))?this.setValues("rgb",e):(e=d.getHsla(t))?this.setValues("hsl",e):(e=d.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 d.hexString(this.values.rgb)},rgbString:function(){return d.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return d.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return d.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return d.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return d.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return d.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return d.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((i+.055)/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 e>n?(e+.05)/(n+.05):(n+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"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=t,i=void 0===e?.5:e,a=2*i-1,r=this.alpha()-n.alpha(),o=((a*r==-1?a:(a+r)/(1+a*r))+1)/2,s=1-o;return this.rgb(o*this.red()+s*n.red(),o*this.green()+s*n.green(),o*this.blue()+s*n.blue()).alpha(this.alpha()*i+n.alpha()*(1-i))},toJSON:function(){return this.rgb()},clone:function(){var t,e,n=new _,i=this.values,a=n.values;for(var r in i)i.hasOwnProperty(r)&&(t=i[r],"[object Array]"===(e={}.toString.call(t))?a[r]=t.slice(0):"[object Number]"===e?a[r]=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,a=this.values,r=this.spaces,o=this.maxes,s=1;if(this.valid=!0,"alpha"===t)s=e;else if(e.length)a[t]=e.slice(0,t.length),s=e[t.length];else if(void 0!==e[t.charAt(0)]){for(n=0;n<t.length;n++)a[t][n]=e[t.charAt(n)];s=e.a}else if(void 0!==e[r[t][0]]){var u=r[t];for(n=0;n<t.length;n++)a[t][n]=e[u[n]];s=e.alpha}if(a.alpha=Math.max(0,Math.min(1,void 0===s?a.alpha:s)),"alpha"===t)return!1;for(n=0;n<t.length;n++)i=Math.max(0,Math.min(o[t][n],a[t][n])),a[t][n]=Math.round(i);for(var d in r)d!==t&&(a[d]=l[t][d](a[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.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 a,r,o;if(S.isArray(t))if(r=t.length,i)for(a=r-1;a>=0;a--)e.call(n,t[a],a);else for(a=0;a<r;a++)e.call(n,t[a],a);else if(S.isObject(t))for(r=(o=Object.keys(t)).length,a=0;a<r;a++)e.call(n,t[o[a]],o[a])},arrayEquals:function(t,e){var n,i,a,r;if(!t||!e||t.length!==e.length)return!1;for(n=0,i=t.length;n<i;++n)if(a=t[n],r=e[n],a instanceof Array&&r instanceof Array){if(!S.arrayEquals(a,r))return!1}else if(a!==r)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,a=0;a<i;++a)e[n[a]]=S.clone(t[n[a]]);return e}return t},_merger:function(t,e,n,i){if(k(t)){var a=e[t],r=n[t];S.isObject(a)&&S.isObject(r)?S.merge(a,r,i):e[t]=S.clone(r)}},_mergerIf:function(t,e,n){if(k(t)){var i=e[t],a=n[t];S.isObject(i)&&S.isObject(a)?S.mergeIf(i,a):e.hasOwnProperty(t)||(e[t]=S.clone(a))}},merge:function(t,e,n){var i,a,r,o,s,l=S.isArray(e)?e:[e],u=l.length;if(!S.isObject(t))return t;for(i=(n=n||{}).merger||S._merger,a=0;a<u;++a)if(e=l[a],S.isObject(e))for(s=0,o=(r=Object.keys(e)).length;s<o;++s)i(r[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){var e=this,n=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},i=function(){this.constructor=n};return i.prototype=e.prototype,n.prototype=new i,n.extend=S.inherits,t&&S.extend(n.prototype,t),n.__super__=e.prototype,n},_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-=1)*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-=1)*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-=1)*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 t>=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*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=n/(2*Math.PI)*Math.asin(1/i),-i*Math.pow(2,10*(t-=1))*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=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=n/(2*Math.PI)*Math.asin(1/i),t<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+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,N=2*T/3,R={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,i,a,r){if(r){var o=Math.min(r,a/2,i/2),s=e+o,l=n+o,u=e+i-o,d=n+a-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)}else t.rect(e,n,i,a)},drawPoint:function(t,e,n,i,a,r){var o,s,l,u,d,h=(r||0)*O;if(e&&"object"==typeof e&&("[object HTMLImageElement]"===(o=e.toString())||"[object HTMLCanvasElement]"===o))return t.save(),t.translate(i,a),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,a,n,0,A),t.closePath();break;case"triangle":t.moveTo(i+Math.sin(h)*n,a-Math.cos(h)*n),h+=N,t.lineTo(i+Math.sin(h)*n,a-Math.cos(h)*n),h+=N,t.lineTo(i+Math.sin(h)*n,a-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,a-l,d,h-T,h-F),t.arc(i+l,a-s,d,h-F,h),t.arc(i+s,a+l,d,h,h+F),t.arc(i-l,a+s,d,h+F,h+T),t.closePath();break;case"rect":if(!r){u=Math.SQRT1_2*n,t.rect(i-u,a-u,2*u,2*u);break}h+=I;case"rectRot":s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,a-l),t.lineTo(i+l,a-s),t.lineTo(i+s,a+l),t.lineTo(i-l,a+s),t.closePath();break;case"crossRot":h+=I;case"cross":s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,a-l),t.lineTo(i+s,a+l),t.moveTo(i+l,a-s),t.lineTo(i-l,a+s);break;case"star":s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,a-l),t.lineTo(i+s,a+l),t.moveTo(i+l,a-s),t.lineTo(i-l,a+s),h+=I,s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,a-l),t.lineTo(i+s,a+l),t.moveTo(i+l,a-s),t.lineTo(i-l,a+s);break;case"line":s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,a-l),t.lineTo(i+s,a+l);break;case"dash":t.moveTo(i,a),t.lineTo(i+Math.cos(h)*n,a+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 a=n.steppedLine;if(a){if("middle"===a){var r=(e.x+n.x)/2;t.lineTo(r,i?n.y:e.y),t.lineTo(r,i?e.y:n.y)}else"after"===a&&!i||"after"!==a&&i?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}else 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)}},L=R;D.clear=R.clear,D.drawRoundedRectangle=function(t){t.beginPath(),R.roundedRect.apply(R,arguments)};var Y={_set:function(t,e){return D.merge(this[t]||(this[t]={}),e)}};Y._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 W=Y,z=D.valueOrDefault,E={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,a;return D.isObject(t)?(e=+t.top||0,n=+t.right||0,i=+t.bottom||0,a=+t.left||0):e=n=i=a=+t||0,{top:e,right:n,bottom:i,left:a,height:e+i,width:a+n}},_parseFont:function(t){var e,n=W.global,i=z(t.fontSize,n.defaultFontSize),a={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 a.string=!(e=a)||D.isNullOrUndef(e.size)||D.isNullOrUndef(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family,a},resolve:function(t,e,n,i){var a,r,o,s=!0;for(a=0,r=t.length;a<r;++a)if(void 0!==(o=t[a])&&(void 0!==e&&"function"==typeof o&&(o=o(e),s=!1),void 0!==n&&D.isArray(o)&&(o=o[n],s=!1),void 0!==o))return i&&!s&&(i.cacheable=!1),o}},V={_factorize:function(t){var e,n=[],i=Math.sqrt(t);for(e=1;e<i;e++)t%e==0&&(n.push(e),n.push(t/e));return i===(0|i)&&n.push(i),n.sort((function(t,e){return t-e})).pop(),n},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=V;D.log10=V.log10;var B=D,j=P,U=L,G=E,q=H,Z={getRtlAdapter:function(t,e,n){return t?(i=e,a=n,{x:function(t){return i+i+a-t},setWidth:function(t){a=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,a},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=j,B.canvas=U,B.options=G,B.math=q,B.rtl=Z;var $=function(t){B.extend(this,t),this.initialize.apply(this,arguments)};B.extend($.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,a=e._view;return n&&1!==t?(a||(a=e._view={}),i||(i=e._start={}),function(t,e,n,i){var a,r,o,s,l,u,d,h,c,f=Object.keys(n);for(a=0,r=f.length;a<r;++a)if(u=n[o=f[a]],e.hasOwnProperty(o)||(e[o]=u),(s=e[o])!==u&&"_"!==o[0]){if(t.hasOwnProperty(o)||(t[o]=s),(d=typeof u)==typeof(l=t[o]))if("string"===d){if((h=w(l)).valid&&(c=w(u)).valid){e[o]=c.mix(h,i).rgbString();continue}}else if(B.isFinite(l)&&B.isFinite(u)){e[o]=l+(u-l)*i;continue}e[o]=u}}(i,a,n,t),e):(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)}}),$.extend=B.inherits;var X=$,K=X.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),J=K;Object.defineProperty(K.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(K.prototype,"chartInstance",{get:function(){return this.chart},set:function(t){this.chart=t}}),W._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:B.noop,onComplete:B.noop}});var Q={animations:[],request:null,addAnimation:function(t,e,n,i){var a,r,o=this.animations;for(e.chart=t,e.startTime=Date.now(),e.duration=n,i||(t.animating=!0),a=0,r=o.length;a<r;++a)if(o[a].chart===t)return void(o[a]=e);o.push(e),1===o.length&&this.requestAnimationFrame()},cancelAnimation:function(t){var e=B.findIndex(this.animations,(function(e){return e.chart===t}));-1!==e&&(this.animations.splice(e,1),t.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(),this.animations.length>0&&this.requestAnimationFrame()},advance:function(){for(var t,e,n,i,a=this.animations,r=0;r<a.length;)e=(t=a[r]).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,a.splice(r,1)):++r}},tt=B.options.resolve,et=["push","pop","shift","splice","unshift"];function nt(t,e){var n=t._chartjs;if(n){var i=n.listeners,a=i.indexOf(e);-1!==a&&i.splice(a,1),i.length>0||(et.forEach((function(e){delete t[e]})),delete t._chartjs)}}var it=function(t,e){this.initialize(t,e)};B.extend(it.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(),a=e.options.scales;null!==t.xAxisID&&t.xAxisID in n&&!i.xAxisID||(t.xAxisID=i.xAxisID||a.xAxes[0].id),null!==t.yAxisID&&t.yAxisID in n&&!i.yAxisID||(t.yAxisID=i.yAxisID||a.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&&nt(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(){var t,e,n=this.getMeta(),i=this.getDataset().data||[],a=n.data;for(t=0,e=i.length;t<e;++t)a[t]=a[t]||this.createMetaData(t);n.dataset=n.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 t,e,n=this,i=n.getDataset(),a=i.data||(i.data=[]);n._data!==a&&(n._data&&nt(n._data,n),a&&Object.isExtensible(a)&&(e=n,(t=a)._chartjs?t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),et.forEach((function(e){var n="onData"+e.charAt(0).toUpperCase()+e.slice(1),i=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:function(){var e=Array.prototype.slice.call(arguments),a=i.apply(this,e);return B.each(t._chartjs.listeners,(function(t){"function"==typeof t[n]&&t[n].apply(t,e)})),a}})})))),n._data=a),n.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,a=0;a<i;++a)n[a].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(),i&&void 0===t?e=this._resolveDatasetElementOptions(i||{}):(t=t||0,e=this._resolveDataElementOptions(n.data[t]||{},t)),!1!==e.fill&&null!==e.fill||(e.backgroundColor=e.borderColor),e},_resolveDatasetElementOptions:function(t,e){var n,i,a,r,o=this,s=o.chart,l=o._config,u=t.custom||{},d=s.options.elements[o.datasetElementType.prototype._type]||{},h=o._datasetElementOptions,c={},f={chart:s,dataset:o.getDataset(),datasetIndex:o.index,hover:e};for(n=0,i=h.length;n<i;++n)a=h[n],r=e?"hover"+a.charAt(0).toUpperCase()+a.slice(1):a,c[a]=tt([u[r],l[r],d[r]],f);return c},_resolveDataElementOptions:function(t,e){var n=this,i=t&&t.custom,a=n._cachedDataOpts;if(a&&!i)return a;var r,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};if(i=i||{},B.isArray(c))for(o=0,s=c.length;o<s;++o)f[l=c[o]]=tt([i[l],d[l],h[l]],g,e,m);else for(o=0,s=(r=Object.keys(c)).length;o<s;++o)f[l=r[o]]=tt([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||{},a=t._model,r=B.getHoverColor;t.$previousStyle={backgroundColor:a.backgroundColor,borderColor:a.borderColor,borderWidth:a.borderWidth},a.backgroundColor=tt([i.hoverBackgroundColor,e.hoverBackgroundColor,r(a.backgroundColor)],void 0,n),a.borderColor=tt([i.hoverBorderColor,e.hoverBorderColor,r(a.borderColor)],void 0,n),a.borderWidth=tt([i.hoverBorderWidth,e.hoverBorderWidth,a.borderWidth],void 0,n)},_removeDatasetHoverStyle:function(){var t=this.getMeta().dataset;t&&this.removeHoverStyle(t)},_setDatasetHoverStyle:function(){var t,e,n,i,a,r,o=this.getMeta().dataset,s={};if(o){for(r=o._model,a=this._resolveDatasetElementOptions(o,!0),t=0,e=(i=Object.keys(a)).length;t<e;++t)s[n=i[t]]=r[n],r[n]=a[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):i>n&&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)}}),it.extend=B.inherits;var at=it,rt=2*Math.PI;function ot(t,e){var n=e.startAngle,i=e.endAngle,a=e.pixelMargin,r=a/e.outerRadius,o=e.x,s=e.y;t.beginPath(),t.arc(o,s,e.outerRadius,n-r,i+r),e.innerRadius>a?(r=a/e.innerRadius,t.arc(o,s,e.innerRadius-a,i+r,n-r,!0)):t.arc(o,s,a,i+Math.PI/2,n-Math.PI/2),t.closePath(),t.clip()}function st(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 a,r=n.endAngle;for(i&&(n.endAngle=n.startAngle+rt,ot(t,n),n.endAngle=r,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),a=0;a<n.fullCircles;++a)t.stroke();for(t.beginPath(),t.arc(n.x,n.y,e.outerRadius,n.startAngle,n.startAngle+rt),a=0;a<n.fullCircles;++a)t.stroke()}(t,e,n,i),i&&ot(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()}W._set("global",{elements:{arc:{backgroundColor:W.global.defaultColor,borderColor:"#fff",borderWidth:2,borderAlign:"center"}}});var lt=X.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}),a=i.angle,r=i.distance,o=n.startAngle,s=n.endAngle;s<o;)s+=rt;for(;a>s;)a-=rt;for(;a<o;)a+=rt;var l=a>=o&&a<=s,u=r>=n.innerRadius&&r<=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,a={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,a.fullCircles){for(a.endAngle=a.startAngle+rt,e.beginPath(),e.arc(a.x,a.y,a.outerRadius,a.startAngle,a.endAngle),e.arc(a.x,a.y,a.innerRadius,a.endAngle,a.startAngle,!0),e.closePath(),t=0;t<a.fullCircles;++t)e.fill();a.endAngle=a.startAngle+n.circumference%rt}e.beginPath(),e.arc(a.x,a.y,a.outerRadius,a.startAngle,a.endAngle),e.arc(a.x,a.y,a.innerRadius,a.endAngle,a.startAngle,!0),e.closePath(),e.fill(),n.borderWidth&&st(e,n,a),e.restore()}}),ut=B.valueOrDefault,dt=W.global.defaultColor;W._set("global",{elements:{line:{tension:.4,backgroundColor:dt,borderWidth:3,borderColor:dt,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}});var ht=X.extend({_type:"line",draw:function(){var t,e,n,i=this,a=i._view,r=i._chart.ctx,o=a.spanGaps,s=i._children.slice(),l=W.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(r.save(),r.lineCap=a.borderCapStyle||u.borderCapStyle,r.setLineDash&&r.setLineDash(a.borderDash||u.borderDash),r.lineDashOffset=ut(a.borderDashOffset,u.borderDashOffset),r.lineJoin=a.borderJoinStyle||u.borderJoinStyle,r.lineWidth=ut(a.borderWidth,u.borderWidth),r.strokeStyle=a.borderColor||l.defaultColor,r.beginPath(),(n=s[0]._view).skip||(r.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?r.moveTo(n.x,n.y):B.canvas.lineTo(r,e._view,n),d=t);h&&r.closePath(),r.stroke(),r.restore()}}}),ct=B.valueOrDefault,ft=W.global.defaultColor;function gt(t){var e=this._view;return!!e&&Math.abs(t-e.x)<e.radius+e.hitRadius}W._set("global",{elements:{point:{radius:3,pointStyle:"circle",backgroundColor:ft,borderColor:ft,borderWidth:1,hitRadius:1,hoverRadius:4,hoverBorderWidth:1}}});var mt=X.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:gt,inXRange:gt,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,a=e.rotation,r=e.radius,o=e.x,s=e.y,l=W.global,u=l.defaultColor;e.skip||(void 0===t||B.canvas._isPointInArea(e,t))&&(n.strokeStyle=e.borderColor||u,n.lineWidth=ct(e.borderWidth,l.elements.point.borderWidth),n.fillStyle=e.backgroundColor||u,B.canvas.drawPoint(n,i,r,o,s,a))}}),pt=W.global.defaultColor;function vt(t){return t&&void 0!==t.width}function bt(t){var e,n,i,a,r;return vt(t)?(r=t.width/2,e=t.x-r,n=t.x+r,i=Math.min(t.y,t.base),a=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,a=t.y+r),{left:e,top:i,right:n,bottom:a}}function yt(t,e,n){return t===e?n:t===n?e:t}function xt(t,e,n){var i,a,r,o,s,l,u,d=t.borderWidth,h=(l=(s=t).borderSkipped,u={},l?(s.horizontal?s.base>s.x&&(l=yt(l,"left","right")):s.base<s.y&&(l=yt(l,"bottom","top")),u[l]=!0,u):u);return B.isObject(d)?(i=+d.top||0,a=+d.right||0,r=+d.bottom||0,o=+d.left||0):i=a=r=o=+d||0,{t:h.top||i<0?0:i>n?n:i,r:h.right||a<0?0:a>e?e:a,b:h.bottom||r<0?0:r>n?n:r,l:h.left||o<0?0:o>e?e:o}}function _t(t,e,n){var i=null===e,a=null===n,r=!(!t||i&&a)&&bt(t);return r&&(i||e>=r.left&&e<=r.right)&&(a||n>=r.top&&n<=r.bottom)}W._set("global",{elements:{rectangle:{backgroundColor:pt,borderColor:pt,borderSkipped:"bottom",borderWidth:0}}});var wt=X.extend({_type:"rectangle",draw:function(){var t,e,n,i,a,r=this._chart.ctx,o=this._view,s=(e=bt(t=o),n=e.right-e.left,i=e.bottom-e.top,a=xt(t,n/2,i/2),{outer:{x:e.left,y:e.top,w:n,h:i},inner:{x:e.left+a.l,y:e.top+a.t,w:n-a.l-a.r,h:i-a.t-a.b}}),l=s.outer,u=s.inner;r.fillStyle=o.backgroundColor,r.fillRect(l.x,l.y,l.w,l.h),l.w===u.w&&l.h===u.h||(r.save(),r.beginPath(),r.rect(l.x,l.y,l.w,l.h),r.clip(),r.fillStyle=o.borderColor,r.rect(u.x,u.y,u.w,u.h),r.fill("evenodd"),r.restore())},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){return _t(this._view,t,e)},inLabelRange:function(t,e){var n=this._view;return vt(n)?_t(n,t,null):_t(n,null,e)},inXRange:function(t){return _t(this._view,t,null)},inYRange:function(t){return _t(this._view,null,t)},getCenterPoint:function(){var t,e,n=this._view;return vt(n)?(t=n.x,e=(n.y+n.base)/2):(t=(n.x+n.base)/2,e=n.y),{x:t,y:e}},getArea:function(){var t=this._view;return vt(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}}}),kt={},Mt=lt,St=ht,Dt=mt,Ct=wt;kt.Arc=Mt,kt.Line=St,kt.Point=Dt,kt.Rectangle=Ct;var Pt=B._deprecated,Tt=B.valueOrDefault;function Ot(t,e,n){var i,a,r=n.barThickness,o=e.stackCount,s=e.pixels[t],l=B.isNullOrUndef(r)?function(t,e){var n,i,a,r,o=t._length;for(a=1,r=e.length;a<r;++a)o=Math.min(o,Math.abs(e[a]-e[a-1]));for(a=0,r=t.getTicks().length;a<r;++a)i=t.getPixelForTick(a),o=a>0?Math.min(o,Math.abs(i-n)):o,n=i;return o}(e.scale,e.pixels):-1;return B.isNullOrUndef(r)?(i=l*n.categoryPercentage,a=n.barPercentage):(i=r*o,a=1),{chunk:i/o,ratio:a,start:s-i/2}}W._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),W._set("global",{datasets:{bar:{categoryPercentage:.8,barPercentage:.9}}});var At=at.extend({dataElementType:kt.Rectangle,_dataElementOptions:["backgroundColor","borderColor","borderSkipped","borderWidth","barPercentage","barThickness","categoryPercentage","maxBarThickness","minBarLength"],initialize:function(){var t,e,n=this;at.prototype.initialize.apply(n,arguments),(t=n.getMeta()).stack=n.getDataset().stack,t.bar=!0,e=n._getIndexScale().options,Pt("bar chart",e.barPercentage,"scales.[x/y]Axes.barPercentage","dataset.barPercentage"),Pt("bar chart",e.barThickness,"scales.[x/y]Axes.barThickness","dataset.barThickness"),Pt("bar chart",e.categoryPercentage,"scales.[x/y]Axes.categoryPercentage","dataset.categoryPercentage"),Pt("bar chart",n._getValueScale().options.minBarLength,"scales.[x/y]Axes.minBarLength","dataset.minBarLength"),Pt("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,a=i.getMeta(),r=i.getDataset(),o=i._resolveDataElementOptions(t,e);t._xScale=i.getScaleForId(a.xAxisID),t._yScale=i.getScaleForId(a.yAxisID),t._datasetIndex=i.index,t._index=e,t._model={backgroundColor:o.backgroundColor,borderColor:o.borderColor,borderSkipped:o.borderSkipped,borderWidth:o.borderWidth,datasetLabel:r.label,label:i.chart.data.labels[e]},B.isArray(r.data[e])&&(t._model.borderSkipped=null),i._updateElementGeometry(t,e,n,o),t.pivot()},_updateElementGeometry:function(t,e,n,i){var a=this,r=t._model,o=a._getValueScale(),s=o.getBasePixel(),l=o.isHorizontal(),u=a._ruler||a.getRuler(),d=a.calculateBarValuePixels(a.index,e,i),h=a.calculateBarIndexPixels(a.index,e,u,i);r.horizontal=l,r.base=n?s:d.base,r.x=l?n?s:d.head:h.center,r.y=l?h.center:n?s:d.head,r.height=l?h.size:void 0,r.width=l?void 0:h.size},_getStacks:function(t){var e,n,i=this._getIndexScale(),a=i._getMatchingVisibleMetas(this._type),r=i.options.stacked,o=a.length,s=[];for(e=0;e<o&&(n=a[e],(!1===r||-1===s.indexOf(n.stack)||void 0===r&&void 0===n.stack)&&s.push(n.stack),n.index!==t);++e);return s},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(){var t,e,n=this._getIndexScale(),i=[];for(t=0,e=this.getMeta().data.length;t<e;++t)i.push(n.getPixelForValue(null,t,this.index));return{pixels:i,start:n._startPixel,end:n._endPixel,stackCount:this.getStackCount(),scale:n}},calculateBarValuePixels:function(t,e,n){var i,a,r,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,b=this.getMeta().stack,y=void 0===m.start?0:m.max>=0&&m.min>=0?m.min:m.max,x=void 0===m.start?m.end:m.max>=0&&m.min>=0?m.max-m.min:m.min-m.max,_=g.length;if(v||void 0===v&&void 0!==b)for(i=0;i<_&&(a=g[i]).index!==t;++i)a.stack===b&&(r=void 0===(u=h._parseValue(f[a.index].data[e])).start?u.end:u.min>=0&&u.max>=0?u.max:u.min,(m.min<0&&r<0||m.max>=0&&r>0)&&(y+=r));return o=h.getPixelForValue(y),l=(s=h.getPixelForValue(y+x))-o,void 0!==p&&Math.abs(l)<p&&(l=p,s=x>=0&&!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 a,r,o,s,l,u,d,h,c,f="flex"===i.barThickness?(a=e,o=i,l=(r=n).pixels,u=l[a],d=a>0?l[a-1]:null,h=a<l.length-1?l[a+1]:null,c=o.categoryPercentage,null===d&&(d=u-(null===h?r.end-r.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/r.stackCount,ratio:o.barPercentage,start:s}):Ot(e,n,i),g=this.getStackIndex(t,this.getMeta().stack),m=f.start+f.chunk*g+f.chunk/2,p=Math.min(Tt(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(),a=n.length,r=0;for(B.canvas.clipArea(t.ctx,t.chartArea);r<a;++r){var o=e._parseValue(i.data[r]);isNaN(o.min)||isNaN(o.max)||n[r].draw()}B.canvas.unclipArea(t.ctx)},_resolveDataElementOptions:function(){var t=this,e=B.extend({},at.prototype._resolveDataElementOptions.apply(t,arguments)),n=t._getIndexScale().options,i=t._getValueScale().options;return e.barPercentage=Tt(n.barPercentage,e.barPercentage),e.barThickness=Tt(n.barThickness,e.barThickness),e.categoryPercentage=Tt(n.categoryPercentage,e.categoryPercentage),e.maxBarThickness=Tt(n.maxBarThickness,e.maxBarThickness),e.minBarLength=Tt(i.minBarLength,e.minBarLength),e}}),Ft=B.valueOrDefault,It=B.options.resolve;W._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 Nt=at.extend({dataElementType:kt.Point,_dataElementOptions:["backgroundColor","borderColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","hoverRadius","hitRadius","pointStyle","rotation"],update:function(t){var e=this,n=e.getMeta().data;B.each(n,(function(n,i){e.updateElement(n,i,t)}))},updateElement:function(t,e,n){var i=this,a=i.getMeta(),r=t.custom||{},o=i.getScaleForId(a.xAxisID),s=i.getScaleForId(a.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:r.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=Ft(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=Ft(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=Ft(n.hoverBorderWidth,n.borderWidth),e.radius=n.radius+n.hoverRadius},_resolveDataElementOptions:function(t,e){var n=this,i=n.chart,a=n.getDataset(),r=t.custom||{},o=a.data[e]||{},s=at.prototype._resolveDataElementOptions.apply(n,arguments),l={chart:i,dataIndex:e,dataset:a,datasetIndex:n.index};return n._cachedDataOpts===s&&(s=B.extend({},s)),s.radius=It([r.radius,o.r,n._config.radius,i.options.elements.point.radius],l,e),s}}),Rt=B.valueOrDefault,Lt=Math.PI,Yt=2*Lt,Wt=Lt/2;W._set("doughnut",{animation:{animateRotate:!0,animateScale:!1},hover:{mode:"single"},legendCallback:function(t){var e,n,i,a=document.createElement("ul"),r=t.data,o=r.datasets,s=r.labels;if(a.setAttribute("class",t.id+"-legend"),o.length)for(e=0,n=o[0].data.length;e<n;++e)(i=a.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=o[0].backgroundColor[e],s[e]&&i.appendChild(document.createTextNode(s[e]));return a.outerHTML},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,i){var a=t.getDatasetMeta(0),r=a.controller.getStyle(i);return{text:n,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,hidden:isNaN(e.datasets[0].data[i])||a.data[i].hidden,index:i}})):[]}},onClick:function(t,e){var n,i,a,r=e.index,o=this.chart;for(n=0,i=(o.data.datasets||[]).length;n<i;++n)(a=o.getDatasetMeta(n)).data[r]&&(a.data[r].hidden=!a.data[r].hidden);o.update()}},cutoutPercentage:50,rotation:-Wt,circumference:Yt,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 zt=at.extend({dataElementType:kt.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,a,r=this,o=r.chart,s=o.chartArea,l=o.options,u=1,d=1,h=0,c=0,f=r.getMeta(),g=f.data,m=l.cutoutPercentage/100||0,p=l.circumference,v=r._getRingWeight(r.index);if(p<Yt){var b=l.rotation%Yt,y=(b+=b>=Lt?-Yt:b<-Lt?Yt:0)+p,x=Math.cos(b),_=Math.sin(b),w=Math.cos(y),k=Math.sin(y),M=b<=0&&y>=0||y>=Yt,S=b<=Wt&&y>=Wt||y>=Yt+Wt,D=b<=-Wt&&y>=-Wt||y>=Lt+Wt,C=b===-Lt||y>=Lt?-1:Math.min(x,x*m,w,w*m),P=D?-1:Math.min(_,_*m,k,k*m),T=M?1:Math.max(x,x*m,w,w*m),O=S?1:Math.max(_,_*m,k,k*m);u=(T-C)/2,d=(O-P)/2,h=-(T+C)/2,c=-(O+P)/2}for(i=0,a=g.length;i<a;++i)g[i]._options=r._resolveDataElementOptions(g[i],i);for(o.borderWidth=r.getMaxBorderWidth(),e=(s.right-s.left-o.borderWidth)/u,n=(s.bottom-s.top-o.borderWidth)/d,o.outerRadius=Math.max(Math.min(e,n)/2,0),o.innerRadius=Math.max(o.outerRadius*m,0),o.radiusLength=(o.outerRadius-o.innerRadius)/(r._getVisibleDatasetWeightTotal()||1),o.offsetX=h*o.outerRadius,o.offsetY=c*o.outerRadius,f.total=r.calculateTotal(),r.outerRadius=o.outerRadius-o.radiusLength*r._getRingWeightOffset(r.index),r.innerRadius=Math.max(r.outerRadius-o.radiusLength*v,0),i=0,a=g.length;i<a;++i)r.updateElement(g[i],i,t)},updateElement:function(t,e,n){var i=this,a=i.chart,r=a.chartArea,o=a.options,s=o.animation,l=(r.left+r.right)/2,u=(r.top+r.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/Yt),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+a.offsetX,y:u+a.offsetY,startAngle:d,endAngle:h,circumference:f,outerRadius:m,innerRadius:g,label:B.valueAtIndexOrDefault(c.label,e,a.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 t,e=this.getDataset(),n=this.getMeta(),i=0;return B.each(n.data,(function(n,a){t=e.data[a],isNaN(t)||n.hidden||(i+=Math.abs(t))})),i},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?Yt*(Math.abs(t)/e):0},getMaxBorderWidth:function(t){var e,n,i,a,r,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&&(r=i.controller);break}if(!t)return 0;for(e=0,n=t.length;e<n;++e)a=t[e],r?(r._configure(),o=r._resolveDataElementOptions(a,e)):o=a._options,"inner"!==o.borderAlign&&(s=o.borderWidth,u=(l=o.hoverBorderWidth)>(u=s>u?s:u)?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=Rt(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=Rt(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=Rt(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(Rt(this.chart.data.datasets[t].weight,1),0)},_getVisibleDatasetWeightTotal:function(){return this._getRingWeightOffset(this.chart.data.datasets.length)}});W._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"}}),W._set("global",{datasets:{horizontalBar:{categoryPercentage:.8,barPercentage:.9}}});var Et=At.extend({_getValueScaleId:function(){return this.getMeta().xAxisID},_getIndexScaleId:function(){return this.getMeta().yAxisID}}),Vt=B.valueOrDefault,Ht=B.options.resolve,Bt=B.canvas._isPointInArea;function jt(t,e){var n=t&&t.options.ticks||{},i=n.reverse,a=void 0===n.min?e:0,r=void 0===n.max?e:0;return{start:i?r:a,end:i?a:r}}function Ut(t,e,n){var i=n/2,a=jt(t,i),r=jt(e,i);return{top:r.end,right:a.end,bottom:r.start,left:a.start}}function Gt(t){var e,n,i,a;return B.isObject(t)?(e=t.top,n=t.right,i=t.bottom,a=t.left):e=n=i=a=t,{top:e,right:n,bottom:i,left:a}}W._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 qt=at.extend({datasetElementType:kt.Line,dataElementType:kt.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,a=i.getMeta(),r=a.dataset,o=a.data||[],s=i.chart.options,l=i._config,u=i._showLine=Vt(l.showLine,s.showLines);for(i._xScale=i.getScaleForId(a.xAxisID),i._yScale=i.getScaleForId(a.yAxisID),u&&(void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),r._scale=i._yScale,r._datasetIndex=i.index,r._children=o,r._model=i._resolveDatasetElementOptions(r),r.pivot()),e=0,n=o.length;e<n;++e)i.updateElement(o[e],e,t);for(u&&0!==r._model.tension&&i.updateBezierControlPoints(),e=0,n=o.length;e<n;++e)o[e].pivot()},updateElement:function(t,e,n){var i,a,r=this,o=r.getMeta(),s=t.custom||{},l=r.getDataset(),u=r.index,d=l.data[e],h=r._xScale,c=r._yScale,f=o.dataset._model,g=r._resolveDataElementOptions(t,e);i=h.getPixelForValue("object"==typeof d?d:NaN,e,u),a=n?c.getBasePixel():r.calculatePointY(d,e,u),t._xScale=h,t._yScale=c,t._options=g,t._datasetIndex=u,t._index=e,t._model={x:i,y:a,skip:s.skip||isNaN(i)||isNaN(a),radius:g.radius,pointStyle:g.pointStyle,rotation:g.rotation,backgroundColor:g.backgroundColor,borderColor:g.borderColor,borderWidth:g.borderWidth,tension:Vt(s.tension,f?f.tension:0),steppedLine:!!f&&f.steppedLine,hitRadius:g.hitRadius}},_resolveDatasetElementOptions:function(t){var e=this,n=e._config,i=t.custom||{},a=e.chart.options,r=a.elements.line,o=at.prototype._resolveDatasetElementOptions.apply(e,arguments);return o.spanGaps=Vt(n.spanGaps,a.spanGaps),o.tension=Vt(n.lineTension,r.tension),o.steppedLine=Ht([i.steppedLine,n.steppedLine,r.stepped]),o.clip=Gt(Vt(n.clip,Ut(e._xScale,e._yScale,o.borderWidth))),o},calculatePointY:function(t,e,n){var i,a,r,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&&(r=l[i]).index!==n;++i)a=d.data.datasets[r.index],"line"===r.type&&r.yAxisID===h.id&&((o=+h.getRightValue(a.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,a=this.chart,r=this.getMeta(),o=r.dataset._model,s=a.chartArea,l=r.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(a.options.elements.line.capBezierPoints)for(t=0,e=l.length;t<e;++t)n=l[t]._model,Bt(n,s)&&(t>0&&Bt(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&&Bt(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||[],a=e.chartArea,r=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:a.left-t.left,right:!1===t.right?r.width:a.right+t.right,top:!1===t.top?0:a.top-t.top,bottom:!1===t.bottom?r.height:a.bottom+t.bottom}),n.dataset.draw(),B.canvas.unclipArea(e.ctx));o<s;++o)i[o].draw(a)},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=Vt(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=Vt(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=Vt(n.hoverBorderWidth,n.borderWidth),e.radius=Vt(n.hoverRadius,n.radius)}}),Zt=B.options.resolve;W._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,a=document.createElement("ul"),r=t.data,o=r.datasets,s=r.labels;if(a.setAttribute("class",t.id+"-legend"),o.length)for(e=0,n=o[0].data.length;e<n;++e)(i=a.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=o[0].backgroundColor[e],s[e]&&i.appendChild(document.createTextNode(s[e]));return a.outerHTML},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,i){var a=t.getDatasetMeta(0),r=a.controller.getStyle(i);return{text:n,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,hidden:isNaN(e.datasets[0].data[i])||a.data[i].hidden,index:i}})):[]}},onClick:function(t,e){var n,i,a,r=e.index,o=this.chart;for(n=0,i=(o.data.datasets||[]).length;n<i;++n)(a=o.getDatasetMeta(n)).data[r].hidden=!a.data[r].hidden;o.update()}},tooltips:{callbacks:{title:function(){return""},label:function(t,e){return e.labels[t.index]+": "+t.yLabel}}}});var $t=at.extend({dataElementType:kt.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,a=this,r=a.getDataset(),o=a.getMeta(),s=a.chart.options.startAngle||0,l=a._starts=[],u=a._angles=[],d=o.data;for(a._updateRadius(),o.count=a.countVisibleElements(),e=0,n=r.data.length;e<n;e++)l[e]=s,i=a._computeAngle(e),u[e]=i,s+=i;for(e=0,n=d.length;e<n;++e)d[e]._options=a._resolveDataElementOptions(d[e],e),a.updateElement(d[e],e,t)},_updateRadius:function(){var t=this,e=t.chart,n=e.chartArea,i=e.options,a=Math.min(n.right-n.left,n.bottom-n.top);e.outerRadius=Math.max(a/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,a=i.chart,r=i.getDataset(),o=a.options,s=o.animation,l=a.scale,u=a.data.labels,d=l.xCenter,h=l.yCenter,c=o.startAngle,f=t.hidden?0:l.getDistanceFromCenterForValue(r.data[e]),g=i._starts[e],m=g+(t.hidden?0:i._angles[e]),p=s.animateScale?0:l.getDistanceFromCenterForValue(r.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 t=this.getDataset(),e=this.getMeta(),n=0;return B.each(e.data,(function(e,i){isNaN(t.data[i])||e.hidden||n++})),n},setHoverStyle:function(t){var e=t._model,n=t._options,i=B.getHoverColor,a=B.valueOrDefault;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=a(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=a(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=a(n.hoverBorderWidth,n.borderWidth)},_computeAngle:function(t){var e=this,n=this.getMeta().count,i=e.getDataset(),a=e.getMeta();if(isNaN(i.data[t])||a.data[t].hidden)return 0;var r={chart:e.chart,dataIndex:t,dataset:i,datasetIndex:e.index};return Zt([e.chart.options.elements.arc.angle,2*Math.PI/n],r,t)}});W._set("pie",B.clone(W.doughnut)),W._set("pie",{cutoutPercentage:0});var Xt=zt,Kt=B.valueOrDefault;W._set("radar",{spanGaps:!1,scale:{type:"radialLinear"},elements:{line:{fill:"start",tension:0}}});var Jt=at.extend({datasetElementType:kt.Line,dataElementType:kt.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,a=i.getMeta(),r=a.dataset,o=a.data||[],s=i.chart.scale,l=i._config;for(void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),r._scale=s,r._datasetIndex=i.index,r._children=o,r._loop=!0,r._model=i._resolveDatasetElementOptions(r),r.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,a=t.custom||{},r=i.getDataset(),o=i.chart.scale,s=o.getPointPositionForValue(e,r.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:a.skip||isNaN(d)||isNaN(h),radius:l.radius,pointStyle:l.pointStyle,rotation:l.rotation,backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,tension:Kt(a.tension,u?u.tension:0),hitRadius:l.hitRadius}},_resolveDatasetElementOptions:function(){var t=this,e=t._config,n=t.chart.options,i=at.prototype._resolveDatasetElementOptions.apply(t,arguments);return i.spanGaps=Kt(e.spanGaps,n.spanGaps),i.tension=Kt(e.lineTension,n.elements.line.tension),i},updateBezierControlPoints:function(){var t,e,n,i,a=this.getMeta(),r=this.chart.chartArea,o=a.data||[];function s(t,e,n){return Math.max(Math.min(t,n),e)}for(a.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,r.left,r.right),n.controlPointPreviousY=s(i.previous.y,r.top,r.bottom),n.controlPointNextX=s(i.next.x,r.left,r.right),n.controlPointNextY=s(i.next.y,r.top,r.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=Kt(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=Kt(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=Kt(n.hoverBorderWidth,n.borderWidth),e.radius=Kt(n.hoverRadius,n.radius)}});W._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+")"}}}}),W._set("global",{datasets:{scatter:{showLine:!1}}});var Qt={bar:At,bubble:Nt,doughnut:zt,horizontalBar:Et,line:qt,polarArea:$t,pie:Xt,radar:Jt,scatter:qt};function te(t,e){return t.native?{x:t.x,y:t.y}:B.getRelativePosition(t,e)}function ee(t,e){var n,i,a,r,o,s,l=t._getSortedVisibleDatasetMetas();for(i=0,r=l.length;i<r;++i)for(a=0,o=(n=l[i].data).length;a<o;++a)(s=n[a])._view.skip||e(s)}function ne(t,e){var n=[];return ee(t,(function(t){t.inRange(e.x,e.y)&&n.push(t)})),n}function ie(t,e,n,i){var a=Number.POSITIVE_INFINITY,r=[];return ee(t,(function(t){if(!n||t.inRange(e.x,e.y)){var o=t.getCenterPoint(),s=i(e,o);s<a?(r=[t],a=s):s===a&&r.push(t)}})),r}function ae(t){var e=-1!==t.indexOf("x"),n=-1!==t.indexOf("y");return function(t,i){var a=e?Math.abs(t.x-i.x):0,r=n?Math.abs(t.y-i.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(r,2))}}function re(t,e,n){var i=te(e,t);n.axis=n.axis||"x";var a=ae(n.axis),r=n.intersect?ne(t,i):ie(t,i,!1,a),o=[];return r.length?(t._getSortedVisibleDatasetMetas().forEach((function(t){var e=t.data[r[0]._index];e&&!e._view.skip&&o.push(e)})),o):[]}var oe={modes:{single:function(t,e){var n=te(e,t),i=[];return ee(t,(function(t){if(t.inRange(n.x,n.y))return i.push(t),i})),i.slice(0,1)},label:re,index:re,dataset:function(t,e,n){var i=te(e,t);n.axis=n.axis||"xy";var a=ae(n.axis),r=n.intersect?ne(t,i):ie(t,i,!1,a);return r.length>0&&(r=t.getDatasetMeta(r[0]._datasetIndex).data),r},"x-axis":function(t,e){return re(t,e,{intersect:!1})},point:function(t,e){return ne(t,te(e,t))},nearest:function(t,e,n){var i=te(e,t);n.axis=n.axis||"xy";var a=ae(n.axis);return ie(t,i,n.intersect,a)},x:function(t,e,n){var i=te(e,t),a=[],r=!1;return ee(t,(function(t){t.inXRange(i.x)&&a.push(t),t.inRange(i.x,i.y)&&(r=!0)})),n.intersect&&!r&&(a=[]),a},y:function(t,e,n){var i=te(e,t),a=[],r=!1;return ee(t,(function(t){t.inYRange(i.y)&&a.push(t),t.inRange(i.x,i.y)&&(r=!0)})),n.intersect&&!r&&(a=[]),a}}},se=B.extend;function le(t,e){return B.where(t,(function(t){return t.pos===e}))}function ue(t,e){return t.sort((function(t,n){var i=e?n:t,a=e?t:n;return i.weight===a.weight?i.index-a.index:i.weight-a.weight}))}function de(t,e,n,i){return Math.max(t[n],e[n])+Math.max(t[i],e[i])}function he(t,e,n){var i,a,r=n.box,o=t.maxPadding;if(n.size&&(t[n.pos]-=n.size),n.size=n.horizontal?r.height:r.width,t[n.pos]+=n.size,r.getPadding){var s=r.getPadding();o.top=Math.max(o.top,s.top),o.left=Math.max(o.left,s.left),o.bottom=Math.max(o.bottom,s.bottom),o.right=Math.max(o.right,s.right)}if(i=e.outerWidth-de(o,t,"left","right"),a=e.outerHeight-de(o,t,"top","bottom"),i!==t.w||a!==t.h){t.w=i,t.h=a;var l=n.horizontal?[i,t.w]:[a,t.h];return!(l[0]===l[1]||isNaN(l[0])&&isNaN(l[1]))}}function ce(t,e){var n=e.maxPadding;function i(t){var i={left:0,top:0,right:0,bottom:0};return t.forEach((function(t){i[t]=Math.max(e[t],n[t])})),i}return i(t?["left","right"]:["top","bottom"])}function fe(t,e,n){var i,a,r,o,s,l,u=[];for(i=0,a=t.length;i<a;++i)(o=(r=t[i]).box).update(r.width||e.w,r.height||e.h,ce(r.horizontal,e)),he(e,n,r)&&(l=!0,u.length&&(s=!0)),o.fullWidth||u.push(r);return s&&fe(u,e,n)||l}function ge(t,e,n){var i,a,r,o,s=n.padding,l=e.x,u=e.y;for(i=0,a=t.length;i<a;++i)o=(r=t[i]).box,r.horizontal?(o.left=o.fullWidth?s.left:e.left,o.right=o.fullWidth?n.outerWidth-s.right:e.left+e.w,o.top=u,o.bottom=u+o.height,o.width=o.right-o.left,u=o.bottom):(o.left=l,o.right=l+o.width,o.top=e.top,o.bottom=e.top+e.h,o.height=o.bottom-o.top,l=o.right);e.x=l,e.y=u}W._set("global",{layout:{padding:{top:0,right:0,bottom:0,left:0}}});var me,pe={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,a=["fullWidth","position","weight"],r=a.length,o=0;o<r;++o)i=a[o],n.hasOwnProperty(i)&&(e[i]=n[i])},update:function(t,e,n){if(t){var i=t.options.layout||{},a=B.options.toPadding(i.padding),r=e-a.width,o=n-a.height,s=(c=t.boxes,f=function(t){var e,n,i,a=[];for(e=0,n=(t||[]).length;e<n;++e)i=t[e],a.push({index:e,box:i,pos:i.position,horizontal:i.isHorizontal(),weight:i.weight});return a}(c),g=ue(le(f,"left"),!0),m=ue(le(f,"right")),p=ue(le(f,"top"),!0),v=ue(le(f,"bottom")),{leftAndTop:g.concat(p),rightAndBottom:m.concat(v),chartArea:le(f,"chartArea"),vertical:g.concat(m),horizontal:p.concat(v)}),l=s.vertical,u=s.horizontal,d=Object.freeze({outerWidth:e,outerHeight:n,padding:a,availableWidth:r,vBoxMaxWidth:r/2/l.length,hBoxMaxHeight:o/2}),h=se({maxPadding:se({},a),w:r,h:o,x:a.left,y:a.top},a);!function(t,e){var n,i,a;for(n=0,i=t.length;n<i;++n)(a=t[n]).width=a.horizontal?a.box.fullWidth&&e.availableWidth:e.vBoxMaxWidth,a.height=a.horizontal&&e.hBoxMaxHeight}(l.concat(u),d),fe(l,h,d),fe(u,h,d)&&fe(l,h,d),function(t){var e=t.maxPadding;function n(n){var i=Math.max(e[n]-t[n],0);return t[n]+=i,i}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}(h),ge(s.leftAndTop,h,d),h.x+=h.w,h.y+=h.h,ge(s.rightAndBottom,h,d),t.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h},B.each(s.chartArea,(function(e){var n=e.box;se(n,t.chartArea),n.update(h.w,h.h)}))}var c,f,g,m,p,v}},ve=(me=Object.freeze({__proto__:null,default:"@keyframes chartjs-render-animation{from{opacity:.99}to{opacity:1}}.chartjs-render-monitor{animation:chartjs-render-animation 1ms}.chartjs-size-monitor,.chartjs-size-monitor-expand,.chartjs-size-monitor-shrink{position:absolute;direction:ltr;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1}.chartjs-size-monitor-expand>div{position:absolute;width:1000000px;height:1000000px;left:0;top:0}.chartjs-size-monitor-shrink>div{position:absolute;width:200%;height:200%;left:0;top:0}"}))&&me.default||me,be="$chartjs",ye="chartjs-size-monitor",xe="chartjs-render-monitor",_e="chartjs-render-animation",we=["animationstart","webkitAnimationStart"],ke={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function Me(t,e){var n=B.getStyle(t,e),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?Number(i[1]):void 0}var Se=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("e",null,e)}catch(n){}return t}()&&{passive:!0};function De(t,e,n){t.addEventListener(e,n,Se)}function Ce(t,e,n){t.removeEventListener(e,n,Se)}function Pe(t,e,n,i,a){return{type:t,chart:e,native:a||null,x:void 0!==n?n:null,y:void 0!==i?i:null}}function Te(t){var e=document.createElement("div");return e.className=t||"",e}function Oe(t,e,n){var i,a,r,o,s,l,u,d,h=t[be]||(t[be]={}),c=h.resizer=function(t){var e=Te(ye),n=Te(ye+"-expand"),i=Te(ye+"-shrink");n.appendChild(Te()),i.appendChild(Te()),e.appendChild(n),e.appendChild(i),e._reset=function(){n.scrollLeft=1e6,n.scrollTop=1e6,i.scrollLeft=1e6,i.scrollTop=1e6};var a=function(){e._reset(),t()};return De(n,"scroll",a.bind(n,"expand")),De(i,"scroll",a.bind(i,"shrink")),e}((i=function(){if(h.resizer){var i=n.options.maintainAspectRatio&&t.parentNode,a=i?i.clientWidth:0;e(Pe("resize",n)),i&&i.clientWidth<a&&n.canvas&&e(Pe("resize",n))}},r=!1,o=[],function(){o=Array.prototype.slice.call(arguments),a=a||this,r||(r=!0,B.requestAnimFrame.call(window,(function(){r=!1,i.apply(a,o)})))}));l=function(){if(h.resizer){var e=t.parentNode;e&&e!==c.parentNode&&e.insertBefore(c,e.firstChild),c._reset()}},u=(s=t)[be]||(s[be]={}),d=u.renderProxy=function(t){t.animationName===_e&&l()},B.each(we,(function(t){De(s,t,d)})),u.reflow=!!s.offsetParent,s.classList.add(xe)}function Ae(t){var e,n,i,a=t[be]||{},r=a.resizer;delete a.resizer,n=(e=t)[be]||{},(i=n.renderProxy)&&(B.each(we,(function(t){Ce(e,t,i)})),delete n.renderProxy),e.classList.remove(xe),r&&r.parentNode&&r.parentNode.removeChild(r)}var Fe={disableCSSInjection:!1,_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,_ensureLoaded:function(t){if(!this.disableCSSInjection){var e=t.getRootNode?t.getRootNode():document;!function(t,e){var n=t[be]||(t[be]={});if(!n.containsStyles){n.containsStyles=!0,e="/* Chart.js */\n"+e;var i=document.createElement("style");i.setAttribute("type","text/css"),i.appendChild(document.createTextNode(e)),t.appendChild(i)}}(e.host?e:document.head,ve)}},acquireContext:function(t,e){"string"==typeof t?t=document.getElementById(t):t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas);var n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(this._ensureLoaded(t),function(t,e){var n=t.style,i=t.getAttribute("height"),a=t.getAttribute("width");if(t[be]={initial:{height:i,width:a,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",null===a||""===a){var r=Me(t,"width");void 0!==r&&(t.width=r)}if(null===i||""===i)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var o=Me(t,"height");void 0!==r&&(t.height=o)}}(t,e),n):null},releaseContext:function(t){var e=t.canvas;if(e[be]){var n=e[be].initial;["height","width"].forEach((function(t){var i=n[t];B.isNullOrUndef(i)?e.removeAttribute(t):e.setAttribute(t,i)})),B.each(n.style||{},(function(t,n){e.style[n]=t})),e.width=e.width,delete e[be]}},addEventListener:function(t,e,n){var i=t.canvas;if("resize"!==e){var a=n[be]||(n[be]={});De(i,e,(a.proxies||(a.proxies={}))[t.id+"_"+e]=function(e){var i,a,r,o;n((a=t,r=ke[(i=e).type]||i.type,o=B.getRelativePosition(i,a),Pe(r,a,o.x,o.y,i)))})}else Oe(i,n,t)},removeEventListener:function(t,e,n){var i=t.canvas;if("resize"!==e){var a=((n[be]||{}).proxies||{})[t.id+"_"+e];a&&Ce(i,e,a)}else Ae(i)}};B.addEvent=De,B.removeEvent=Ce;var Ie=Fe._enabled?Fe:{acquireContext:function(t){return t&&t.canvas&&(t=t.canvas),t&&t.getContext("2d")||null}},Ne=B.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},Ie);W._set("global",{plugins:{}});var Re={_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 e=this._plugins;[].concat(t).forEach((function(t){var n=e.indexOf(t);-1!==n&&e.splice(n,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){var i,a,r,o,s,l=this.descriptors(t),u=l.length;for(i=0;i<u;++i)if("function"==typeof(s=(r=(a=l[i]).plugin)[e])&&((o=[t].concat(n||[])).push(a.options),!1===s.apply(r,o)))return!1;return!0},descriptors:function(t){var e=t.$plugins||(t.$plugins={});if(e.id===this._cacheId)return e.descriptors;var n=[],i=[],a=t&&t.config||{},r=a.options&&a.options.plugins||{};return this._plugins.concat(a.plugins||[]).forEach((function(t){if(-1===n.indexOf(t)){var e=t.id,a=r[e];!1!==a&&(!0===a&&(a=B.clone(W.global.plugins[e])),n.push(t),i.push({plugin:t,options:a||{}}))}})),e.descriptors=i,e.id=this._cacheId,i},_invalidate:function(t){delete t.$plugins}},Le={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),[W.scale,this.defaults[t]]):{}},updateScaleDefaults:function(t,e){this.defaults.hasOwnProperty(t)&&(this.defaults[t]=B.extend(this.defaults[t],e))},addScalesToLayout:function(t){B.each(t.scales,(function(e){e.fullWidth=e.options.fullWidth,e.position=e.options.position,e.weight=e.options.weight,pe.addBox(t,e)}))}},Ye=B.valueOrDefault,We=B.rtl.getRtlAdapter;W._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=e.labels,a=i?i.length:0;if(t.length>0){var r=t[0];r.label?n=r.label:r.xLabel?n=r.xLabel:a>0&&r.index<a&&(n=i[r.index])}return n},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 ze={average:function(t){if(!t.length)return!1;var e,n,i=0,a=0,r=0;for(e=0,n=t.length;e<n;++e){var o=t[e];if(o&&o.hasValue()){var s=o.tooltipPosition();i+=s.x,a+=s.y,++r}}return{x:i/r,y:a/r}},nearest:function(t,e){var n,i,a,r=e.x,o=e.y,s=Number.POSITIVE_INFINITY;for(n=0,i=t.length;n<i;++n){var l=t[n];if(l&&l.hasValue()){var u=l.getCenterPoint(),d=B.distanceBetweenPoints(e,u);d<s&&(s=d,a=l)}}if(a){var h=a.tooltipPosition();r=h.x,o=h.y}return{x:r,y:o}}};function Ee(t,e){return e&&(B.isArray(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Ve(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function He(t){var e=W.global;return{xPadding:t.xPadding,yPadding:t.yPadding,xAlign:t.xAlign,yAlign:t.yAlign,rtl:t.rtl,textDirection:t.textDirection,bodyFontColor:t.bodyFontColor,_bodyFontFamily:Ye(t.bodyFontFamily,e.defaultFontFamily),_bodyFontStyle:Ye(t.bodyFontStyle,e.defaultFontStyle),_bodyAlign:t.bodyAlign,bodyFontSize:Ye(t.bodyFontSize,e.defaultFontSize),bodySpacing:t.bodySpacing,titleFontColor:t.titleFontColor,_titleFontFamily:Ye(t.titleFontFamily,e.defaultFontFamily),_titleFontStyle:Ye(t.titleFontStyle,e.defaultFontStyle),titleFontSize:Ye(t.titleFontSize,e.defaultFontSize),_titleAlign:t.titleAlign,titleSpacing:t.titleSpacing,titleMarginBottom:t.titleMarginBottom,footerFontColor:t.footerFontColor,_footerFontFamily:Ye(t.footerFontFamily,e.defaultFontFamily),_footerFontStyle:Ye(t.footerFontStyle,e.defaultFontStyle),footerFontSize:Ye(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 Be(t,e){return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-t.xPadding:t.x+t.xPadding}function je(t){return Ee([],Ve(t))}var Ue=X.extend({initialize:function(){this._model=He(this._options),this._lastActive=[]},getTitle:function(){var t=this,e=t._options.callbacks,n=e.beforeTitle.apply(t,arguments),i=e.title.apply(t,arguments),a=e.afterTitle.apply(t,arguments),r=[];return r=Ee(r,Ve(n)),r=Ee(r,Ve(i)),Ee(r,Ve(a))},getBeforeBody:function(){return je(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(t,e){var n=this,i=n._options.callbacks,a=[];return B.each(t,(function(t){var r={before:[],lines:[],after:[]};Ee(r.before,Ve(i.beforeLabel.call(n,t,e))),Ee(r.lines,i.label.call(n,t,e)),Ee(r.after,Ve(i.afterLabel.call(n,t,e))),a.push(r)})),a},getAfterBody:function(){return je(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var t=this,e=t._options.callbacks,n=e.beforeFooter.apply(t,arguments),i=e.footer.apply(t,arguments),a=e.afterFooter.apply(t,arguments),r=[];return r=Ee(r,Ve(n)),r=Ee(r,Ve(i)),Ee(r,Ve(a))},update:function(t){var e,n,i,a,r,o,s,l,u,d,h,c,f,g,m,p,v,b,y,x,_,w,k,M=this,S=M._options,D=M._model,C=M._model=He(S),P=M._active,T=M._data,O={xAlign:D.xAlign,yAlign:D.yAlign},A={x:D.x,y:D.y},F={width:D.width,height:D.height},I={x:D.caretX,y:D.caretY};if(P.length){C.opacity=1;var N=[],R=[];I=ze[S.position].call(M,P,M._eventPosition);var L=[];for(e=0,n=P.length;e<n;++e)L.push((a=void 0,r=void 0,o=void 0,s=void 0,l=void 0,u=void 0,d=void 0,a=(i=P[e])._xScale,r=i._yScale||i._scale,o=i._index,s=i._datasetIndex,u=(l=i._chart.getDatasetMeta(s).controller)._getIndexScale(),d=l._getValueScale(),{xLabel:a?a.getLabelForIndex(o,s):"",yLabel:r?r.getLabelForIndex(o,s):"",label:u?""+u.getLabelForIndex(o,s):"",value:d?""+d.getLabelForIndex(o,s):"",index:o,datasetIndex:s,x:i._model.x,y:i._model.y}));S.filter&&(L=L.filter((function(t){return S.filter(t,T)}))),S.itemSort&&(L=L.sort((function(t,e){return S.itemSort(t,e,T)}))),B.each(L,(function(t){N.push(S.callbacks.labelColor.call(M,t,M._chart)),R.push(S.callbacks.labelTextColor.call(M,t,M._chart))})),C.title=M.getTitle(L,T),C.beforeBody=M.getBeforeBody(L,T),C.body=M.getBody(L,T),C.afterBody=M.getAfterBody(L,T),C.footer=M.getFooter(L,T),C.x=I.x,C.y=I.y,C.caretPadding=S.caretPadding,C.labelColors=N,C.labelTextColors=R,C.dataPoints=L,F=function(t,e){var n=t._chart.ctx,i=2*e.yPadding,a=0,r=e.body,o=r.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;var c=0,f=function(t){a=Math.max(a,n.measureText(t).width+c)};return n.font=B.fontString(u,e._titleFontStyle,e._titleFontFamily),B.each(e.title,f),n.font=B.fontString(d,e._bodyFontStyle,e._bodyFontFamily),B.each(e.beforeBody.concat(e.afterBody),f),c=e.displayColors?d+2:0,B.each(r,(function(t){B.each(t.before,f),B.each(t.lines,f),B.each(t.after,f)})),c=0,n.font=B.fontString(h,e._footerFontStyle,e._footerFontFamily),B.each(e.footer,f),{width:a+=2*e.xPadding,height:i}}(this,C),h=C,c=F,f=O=function(t,e){var n,i,a,r,o,s=t._model,l=t._chart,u=t._chart.chartArea,d="center",h="center";s.y<e.height?h="top":s.y>l.height-e.height&&(h="bottom");var c=(u.left+u.right)/2,f=(u.top+u.bottom)/2;"center"===h?(n=function(t){return t<=c},i=function(t){return t>c}):(n=function(t){return t<=e.width/2},i=function(t){return t>=l.width-e.width/2}),a=function(t){return t+e.width+s.caretSize+s.caretPadding>l.width},r=function(t){return t-e.width-s.caretSize-s.caretPadding<0},o=function(t){return t<=f?"top":"bottom"},n(s.x)?(d="left",a(s.x)&&(d="center",h=o(s.y))):i(s.x)&&(d="right",r(s.x)&&(d="center",h=o(s.y)));var g=t._options;return{xAlign:g.xAlign?g.xAlign:d,yAlign:g.yAlign?g.yAlign:h}}(this,F),g=M._chart,m=h.x,p=h.y,v=h.caretSize,b=h.caretPadding,y=h.cornerRadius,x=f.xAlign,_=f.yAlign,w=v+b,k=y+b,"right"===x?m-=c.width:"center"===x&&((m-=c.width/2)+c.width>g.width&&(m=g.width-c.width),m<0&&(m=0)),"top"===_?p+=w:p-="bottom"===_?c.height+w:c.height/2,"center"===_?"left"===x?m+=w:"right"===x&&(m-=w):"left"===x?m-=k:"right"===x&&(m+=k),A={x:m,y:p}}else C.opacity=0;return C.xAlign=O.xAlign,C.yAlign=O.yAlign,C.x=A.x,C.y=A.y,C.width=F.width,C.height=F.height,C.caretX=I.x,C.caretY=I.y,M._model=C,t&&S.custom&&S.custom.call(M,C),M},drawCaret:function(t,e){var n=this._chart.ctx,i=this._view,a=this.getCaretPosition(t,e,i);n.lineTo(a.x1,a.y1),n.lineTo(a.x2,a.y2),n.lineTo(a.x3,a.y3)},getCaretPosition:function(t,e,n){var i,a,r,o,s,l,u=n.caretSize,d=n.cornerRadius,h=n.xAlign,c=n.yAlign,f=t.x,g=t.y,m=e.width,p=e.height;if("center"===c)s=g+p/2,"left"===h?(a=(i=f)-u,r=i,o=s+u,l=s-u):(a=(i=f+m)+u,r=i,o=s-u,l=s+u);else if("left"===h?(i=(a=f+d+u)-u,r=a+u):"right"===h?(i=(a=f+m-d-u)-u,r=a+u):(i=(a=n.caretX)-u,r=a+u),"top"===c)s=(o=g)-u,l=o;else{s=(o=g+p)+u,l=o;var v=r;r=i,i=v}return{x1:i,x2:a,x3:r,y1:o,y2:s,y3:l}},drawTitle:function(t,e,n){var i,a,r,o=e.title,s=o.length;if(s){var l=We(e.rtl,e.x,e.width);for(t.x=Be(e,e._titleAlign),n.textAlign=l.textAlign(e._titleAlign),n.textBaseline="middle",i=e.titleFontSize,a=e.titleSpacing,n.fillStyle=e.titleFontColor,n.font=B.fontString(i,e._titleFontStyle,e._titleFontFamily),r=0;r<s;++r)n.fillText(o[r],l.x(t.x),t.y+i/2),t.y+=i+a,r+1===s&&(t.y+=e.titleMarginBottom-a)}},drawBody:function(t,e,n){var i,a,r,o,s,l,u,d,h=e.bodyFontSize,c=e.bodySpacing,f=e._bodyAlign,g=e.body,m=e.displayColors,p=0,v=m?Be(e,"left"):0,b=We(e.rtl,e.x,e.width),y=function(e){n.fillText(e,b.x(t.x+p),t.y+h/2),t.y+=h+c},x=b.textAlign(f);for(n.textAlign=f,n.textBaseline="middle",n.font=B.fontString(h,e._bodyFontStyle,e._bodyFontFamily),t.x=Be(e,x),n.fillStyle=e.bodyFontColor,B.each(e.beforeBody,y),p=m&&"right"!==x?"center"===f?h/2+1:h+2:0,s=0,u=g.length;s<u;++s){for(i=g[s],a=e.labelTextColors[s],r=e.labelColors[s],n.fillStyle=a,B.each(i.before,y),l=0,d=(o=i.lines).length;l<d;++l){if(m){var _=b.x(v);n.fillStyle=e.legendColorBackground,n.fillRect(b.leftForLtr(_,h),t.y,h,h),n.lineWidth=1,n.strokeStyle=r.borderColor,n.strokeRect(b.leftForLtr(_,h),t.y,h,h),n.fillStyle=r.backgroundColor,n.fillRect(b.leftForLtr(b.xPlus(_,1),h-2),t.y+1,h-2,h-2),n.fillStyle=a}y(o[l])}B.each(i.after,y)}p=0,B.each(e.afterBody,y),t.y-=c},drawFooter:function(t,e,n){var i,a,r=e.footer,o=r.length;if(o){var s=We(e.rtl,e.x,e.width);for(t.x=Be(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),a=0;a<o;++a)n.fillText(r[a],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 a=e.xAlign,r=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"===r&&this.drawCaret(t,i),n.lineTo(o+l-d,s),n.quadraticCurveTo(o+l,s,o+l,s+d),"center"===r&&"right"===a&&this.drawCaret(t,i),n.lineTo(o+l,s+u-d),n.quadraticCurveTo(o+l,s+u,o+l-d,s+u),"bottom"===r&&this.drawCaret(t,i),n.lineTo(o+d,s+u),n.quadraticCurveTo(o,s+u,o,s+u-d),"center"===r&&"left"===a&&this.drawCaret(t,i),n.lineTo(o,s+d),n.quadraticCurveTo(o,s,o+d,s),n.closePath(),n.fill(),e.borderWidth>0&&n.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var n={width:e.width,height:e.height},i={x:e.x,y:e.y},a=Math.abs(e.opacity<.001)?0:e.opacity,r=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&r&&(t.save(),t.globalAlpha=a,this.drawBackground(i,e,t,n),i.y+=e.yPadding,B.rtl.overrideTextDirection(t,e.textDirection),this.drawTitle(i,e,t),this.drawBody(i,e,t),this.drawFooter(i,e,t),B.rtl.restoreTextDirection(t,e.textDirection),t.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}}),Ge=ze,qe=Ue;qe.positioners=Ge;var Ze=B.valueOrDefault;function $e(){return B.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,n,i){if("xAxes"===t||"yAxes"===t){var a,r,o,s=n[t].length;for(e[t]||(e[t]=[]),a=0;a<s;++a)o=n[t][a],r=Ze(o.type,"xAxes"===t?"category":"linear"),a>=e[t].length&&e[t].push({}),!e[t][a].type||o.type&&o.type!==e[t][a].type?B.merge(e[t][a],[Le.getScaleDefaults(r),o]):B.merge(e[t][a],o)}else B._merger(t,e,n,i)}})}function Xe(){return B.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,n,i){var a=e[t]||Object.create(null),r=n[t];"scales"===t?e[t]=$e(a,r):"scale"===t?e[t]=B.merge(a,[Le.getScaleDefaults(r.type),r]):B._merger(t,e,n,i)}})}function Ke(t){var e=t.options;B.each(t.scales,(function(e){pe.removeBox(t,e)})),e=Xe(W.global,W[t.config.type],e),t.options=t.config.options=e,t.ensureScalesHaveIDs(),t.buildOrUpdateScales(),t.tooltip._options=e.tooltips,t.tooltip.initialize()}function Je(t,e,n){var i,a=function(t){return t.id===i};do{i=e+n++}while(B.findIndex(t,a)>=0);return i}function Qe(t){return"top"===t||"bottom"===t}function tn(t,e){return function(n,i){return n[t]===i[t]?n[e]-i[e]:n[t]-i[t]}}W._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});var en=function(t,e){return this.construct(t,e),this};B.extend(en.prototype,{construct:function(t,e){var n,i,a=this;(i=(n=(n=e)||Object.create(null)).data=n.data||{}).datasets=i.datasets||[],i.labels=i.labels||[],n.options=Xe(W.global,W[n.type],n.options||{}),e=n;var r=Ne.acquireContext(t,e),o=r&&r.canvas,s=o&&o.height,l=o&&o.width;a.id=B.uid(),a.ctx=r,a.canvas=o,a.config=e,a.width=l,a.height=s,a.aspectRatio=s?l/s:null,a.options=e.options,a._bufferedRender=!1,a._layers=[],a.chart=a,a.controller=a,en.instances[a.id]=a,Object.defineProperty(a,"data",{get:function(){return a.config.data},set:function(t){a.config.data=t}}),r&&o?(a.initialize(),a.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return Re.notify(t,"beforeInit"),B.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.initToolTip(),Re.notify(t,"afterInit"),t},clear:function(){return B.canvas.clear(this),this},stop:function(){return Q.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,i=e.canvas,a=n.maintainAspectRatio&&e.aspectRatio||null,r=Math.max(0,Math.floor(B.getMaximumWidth(i))),o=Math.max(0,Math.floor(a?r/a:B.getMaximumHeight(i)));if((e.width!==r||e.height!==o)&&(i.width=e.width=r,i.height=e.height=o,i.style.width=r+"px",i.style.height=o+"px",B.retinaScale(e,n.devicePixelRatio),!t)){var s={width:r,height:o};Re.notify(e,"resize",[s]),n.onResize&&n.onResize(e,s),e.stop(),e.update({duration:n.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},n=t.scale;B.each(e.xAxes,(function(t,n){t.id||(t.id=Je(e.xAxes,"x-axis-",n))})),B.each(e.yAxes,(function(t,n){t.id||(t.id=Je(e.yAxes,"y-axis-",n))})),n&&(n.id=n.id||"scale")},buildOrUpdateScales:function(){var t=this,e=t.options,n=t.scales||{},i=[],a=Object.keys(n).reduce((function(t,e){return t[e]=!1,t}),{});e.scales&&(i=i.concat((e.scales.xAxes||[]).map((function(t){return{options:t,dtype:"category",dposition:"bottom"}})),(e.scales.yAxes||[]).map((function(t){return{options:t,dtype:"linear",dposition:"left"}})))),e.scale&&i.push({options:e.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),B.each(i,(function(e){var i=e.options,r=i.id,o=Ze(i.type,e.dtype);Qe(i.position)!==Qe(e.dposition)&&(i.position=e.dposition),a[r]=!0;var s=null;if(r in n&&n[r].type===o)(s=n[r]).options=i,s.ctx=t.ctx,s.chart=t;else{var l=Le.getScaleConstructor(o);if(!l)return;s=new l({id:r,type:o,options:i,ctx:t.ctx,chart:t}),n[s.id]=s}s.mergeTicksOptions(),e.isDefault&&(t.scale=s)})),B.each(a,(function(t,e){t||delete n[e]})),t.scales=n,Le.addScalesToLayout(this)},buildOrUpdateControllers:function(){var t,e,n=this,i=[],a=n.data.datasets;for(t=0,e=a.length;t<e;t++){var r=a[t],o=n.getDatasetMeta(t),s=r.type||n.config.type;if(o.type&&o.type!==s&&(n.destroyDatasetMeta(t),o=n.getDatasetMeta(t)),o.type=s,o.order=r.order||0,o.index=t,o.controller)o.controller.updateIndex(t),o.controller.linkScales();else{var l=Qt[o.type];if(void 0===l)throw new Error('"'+o.type+'" is not a chart type.');o.controller=new l(n,t),i.push(o.controller)}}return i},resetElements:function(){var t=this;B.each(t.data.datasets,(function(e,n){t.getDatasetMeta(n).controller.reset()}),t)},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]}),Ke(i),Re._invalidate(i),!1!==Re.notify(i,"beforeUpdate")){i.tooltip._data=i.data;var a=i.buildOrUpdateControllers();for(e=0,n=i.data.datasets.length;e<n;e++)i.getDatasetMeta(e).controller.buildOrUpdateElements();i.updateLayout(),i.options.animation&&i.options.animation.duration&&B.each(a,(function(t){t.reset()})),i.updateDatasets(),i.tooltip.initialize(),i.lastActive=[],Re.notify(i,"afterUpdate"),i._layers.sort(tn("z","_idx")),i._bufferedRender?i._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:i.render(t)}},updateLayout:function(){var t=this;!1!==Re.notify(t,"beforeLayout")&&(pe.update(this,this.width,this.height),t._layers=[],B.each(t.boxes,(function(e){e._configure&&e._configure(),t._layers.push.apply(t._layers,e._layers())}),t),t._layers.forEach((function(t,e){t._idx=e})),Re.notify(t,"afterScaleUpdate"),Re.notify(t,"afterLayout"))},updateDatasets:function(){if(!1!==Re.notify(this,"beforeDatasetsUpdate")){for(var t=0,e=this.data.datasets.length;t<e;++t)this.updateDataset(t);Re.notify(this,"afterDatasetsUpdate")}},updateDataset:function(t){var e=this.getDatasetMeta(t),n={meta:e,index:t};!1!==Re.notify(this,"beforeDatasetUpdate",[n])&&(e.controller._update(),Re.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=Ze(t.duration,n&&n.duration),a=t.lazy;if(!1!==Re.notify(e,"beforeRender")){var r=function(t){Re.notify(e,"afterRender"),B.callback(n&&n.onComplete,[t],e)};if(n&&i){var o=new J({numSteps:i/16.66,easing:t.easing||n.easing,render:function(t,e){var n=B.easing.effects[e.easing],i=e.currentStep,a=i/e.numSteps;t.draw(n(a),a,i)},onAnimationProgress:n.onProgress,onAnimationComplete:r});Q.addAnimation(e,o,i,a)}else e.draw(),r(new J({numSteps:0,chart:e}));return 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!==Re.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),Re.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){var e,n,i=[];for(e=0,n=(this.data.datasets||[]).length;e<n;++e)t&&!this.isDatasetVisible(e)||i.push(this.getDatasetMeta(e));return i.sort(tn("order","index")),i},_getSortedVisibleDatasetMetas:function(){return this._getSortedDatasetMetas(!0)},drawDatasets:function(t){var e,n;if(!1!==Re.notify(this,"beforeDatasetsDraw",[t])){for(n=(e=this._getSortedVisibleDatasetMetas()).length-1;n>=0;--n)this.drawDataset(e[n],t);Re.notify(this,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var n={meta:t,index:t.index,easingValue:e};!1!==Re.notify(this,"beforeDatasetDraw",[n])&&(t.controller.draw(e),Re.notify(this,"afterDatasetDraw",[n]))},_drawTooltip:function(t){var e=this.tooltip,n={tooltip:e,easingValue:t};!1!==Re.notify(this,"beforeTooltipDraw",[n])&&(e.draw(),Re.notify(this,"afterTooltipDraw",[n]))},getElementAtEvent:function(t){return oe.modes.single(this,t)},getElementsAtEvent:function(t){return oe.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return oe.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,n){var i=oe.modes[e];return"function"==typeof i?i(this,t,n):[]},getDatasetAtEvent:function(t){return oe.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this.data.datasets[t];e._meta||(e._meta={});var n=e._meta[this.id];return n||(n=e._meta[this.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e.order||0,index:t}),n},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),Ne.releaseContext(n.ctx),n.canvas=null,n.ctx=null),Re.notify(n,"destroy"),delete en.instances[n.id]},toBase64Image:function(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){var t=this;t.tooltip=new qe({_chart:t,_chartInstance:t,_data:t.data,_options:t.options.tooltips},t)},bindEvents:function(){var t=this,e=t._listeners={},n=function(){t.eventHandler.apply(t,arguments)};B.each(t.options.events,(function(i){Ne.addEventListener(t,i,n),e[i]=n})),t.options.responsive&&(n=function(){t.resize()},Ne.addEventListener(t,"resize",n),e.resize=n)},unbindEvents:function(){var t=this,e=t._listeners;e&&(delete t._listeners,B.each(e,(function(e,n){Ne.removeEventListener(t,n,e)})))},updateHoverStyle:function(t,e,n){var i,a,r,o=n?"set":"remove";for(a=0,r=t.length;a<r;++a)(i=t[a])&&this.getDatasetMeta(i._datasetIndex).controller[o+"HoverStyle"](i);"dataset"===e&&this.getDatasetMeta(t[0]._datasetIndex).controller["_"+o+"DatasetHoverStyle"]()},eventHandler:function(t){var e=this,n=e.tooltip;if(!1!==Re.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)),Re.notify(e,"afterEvent",[t]);var a=e._bufferedRequest;return a?e.render(a):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||{},a=i.hover;return n.lastActive=n.lastActive||[],"mouseout"===t.type?n.active=[]:n.active=n.getElementsAtEventForMode(t,a.mode,a),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,a.mode,!1),n.active.length&&a.mode&&n.updateHoverStyle(n.active,a.mode,!0),e=!B.arrayEquals(n.active,n.lastActive),n.lastActive=n.active,e}}),en.instances={};var nn=en;function an(){throw new Error("This method is not implemented: either no adapter can be found or an incomplete integration was provided.")}function rn(t){this.options=t||{}}en.Controller=en,en.types={},B.configMerge=Xe,B.scaleMerge=$e,B.extend(rn.prototype,{formats:an,parse:an,format:an,add:an,diff:an,startOf:an,endOf:an,_create:function(t){return t}}),rn.override=function(t){B.extend(rn.prototype,t)};var on={_date:rn},sn={formatters:{values:function(t){return B.isArray(t)?t:""+t},linear:function(t,e,n){var i=n.length>3?n[2]-n[1]:n[1]-n[0];Math.abs(i)>1&&t!==Math.floor(t)&&(i=t-Math.floor(t));var a=B.log10(Math.abs(i)),r="";if(0!==t)if(Math.max(Math.abs(n[0]),Math.abs(n[n.length-1]))<1e-4){var o=B.log10(Math.abs(t)),s=Math.floor(o)-Math.floor(a);s=Math.max(Math.min(s,20),0),r=t.toExponential(s)}else{var l=-1*Math.floor(a);l=Math.max(Math.min(l,20),0),r=t.toFixed(l)}else r="0";return r},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():""}}},ln=B.isArray,un=B.isNullOrUndef,dn=B.valueOrDefault,hn=B.valueAtIndexOrDefault;function cn(t,e,n){var i,a=t.getTicks().length,r=Math.min(e,a-1),o=t.getPixelForTick(r),s=t._startPixel,l=t._endPixel;if(!(n&&(i=1===a?Math.max(o-s,l-o):0===e?(t.getPixelForTick(1)-o)/2:(o-t.getPixelForTick(r-1))/2,(o+=r<e?i:-i)<s-1e-6||o>l+1e-6)))return o}function fn(t,e,n,i){var a,r,o,s,l,u,d,h,c,f,g,m,p,v,b,y=n.length,x=[],_=[],w=[],k=0,M=0;for(a=0;a<y;++a){if(s=n[a].label,l=n[a].major?e.major:e.minor,t.font=u=l.string,d=i[u]=i[u]||{data:{},gc:[]},h=l.lineHeight,c=f=0,un(s)||ln(s)){if(ln(s))for(r=0,o=s.length;r<o;++r)g=s[r],un(g)||ln(g)||(c=B.measureText(t,d.data,d.gc,c,g),f+=h)}else c=B.measureText(t,d.data,d.gc,c,s),f=h;x.push(c),_.push(f),w.push(h/2),k=Math.max(c,k),M=Math.max(f,M)}function S(t){return{width:x[t]||0,height:_[t]||0,offset:w[t]||0}}return v=i,b=y,B.each(v,(function(t){var e,n=t.gc,i=n.length/2;if(i>b){for(e=0;e<i;++e)delete t.data[n[e]];n.splice(0,i)}})),m=x.indexOf(k),p=_.indexOf(M),{first:S(0),last:S(y-1),widest:S(m),highest:S(p)}}function gn(t){return t.drawTicks?t.tickMarkLength:0}function mn(t){var e,n;return t.display?(e=B.options._parseFont(t),n=B.options.toPadding(t.padding),e.lineHeight+n.height):0}function pn(t,e){return B.extend(B.options._parseFont({fontFamily:dn(e.fontFamily,t.fontFamily),fontSize:dn(e.fontSize,t.fontSize),fontStyle:dn(e.fontStyle,t.fontStyle),lineHeight:dn(e.lineHeight,t.lineHeight)}),{color:B.options.resolve([e.fontColor,t.fontColor,W.global.defaultFontColor])})}function vn(t){var e=pn(t,t.minor);return{minor:e,major:t.major.enabled?pn(t,t.major):e}}function bn(t){var e,n,i,a=[];for(n=0,i=t.length;n<i;++n)void 0!==(e=t[n])._index&&a.push(e);return a}function yn(t,e,n,i){var a,r,o,s,l=dn(n,0),u=Math.min(dn(i,t.length),t.length),d=0;for(e=Math.ceil(e),i&&(e=(a=i-n)/Math.floor(a/e)),s=l;s<0;)d++,s=Math.round(l+d*e);for(r=Math.max(l,0);r<u;r++)o=t[r],r===s?(o._index=r,d++,s=Math.round(l+d*e)):delete o.label}W._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:sn.formatters.values,minor:{},major:{}}});var xn=X.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,a,r,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,a=l.ticks.length;i<a;++i)o.push({value:l.ticks[i],major:!1});return l._ticks=o,s=d<o.length,r=l._convertTicksToLabels(s?function(t,e){for(var n=[],i=t.length/e,a=0,r=t.length;a<r;a+=i)n.push(t[Math.floor(a)]);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&&(r=l._convertTicksToLabels(l._ticksToDraw)),l.ticks=r,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 ln(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,a,r,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||h>=c||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),e+6>(a=l.offset?s.maxWidth/d:i/(d-1))&&(a=i/(d-(l.offset?.5:1)),r=s.maxHeight-gn(l.gridLines)-u.padding-mn(l.scaleLabel),o=Math.sqrt(e*e+n*n),f=B.toDegrees(Math.min(Math.asin(Math.min((t.highest.height+6)/a,1)),Math.asin(Math.min(r/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=this,e=t.minSize={width:0,height:0},n=t.chart,i=t.options,a=i.ticks,r=i.scaleLabel,o=i.gridLines,s=t._isVisible(),l="bottom"===i.position,u=t.isHorizontal();if(u?e.width=t.maxWidth:s&&(e.width=gn(o)+mn(r)),u?s&&(e.height=gn(o)+mn(r)):e.height=t.maxHeight,a.display&&s){var d=vn(a),h=t._getLabelSizes(),c=h.first,f=h.last,g=h.widest,m=h.highest,p=.4*d.minor.lineHeight,v=a.padding;if(u){var b=0!==t.labelRotation,y=B.toRadians(t.labelRotation),x=Math.cos(y),_=Math.sin(y),w=_*g.width+x*(m.height-(b?m.offset:0))+(b?0:p);e.height=Math.min(t.maxHeight,e.height+w+v);var k,M,S=t.getPixelForTick(0)-t.left,D=t.right-t.getPixelForTick(t.getTicks().length-1);b?(k=l?x*c.width+_*c.offset:_*(c.height-c.offset),M=l?_*(f.height-f.offset):x*f.width+_*f.offset):(k=c.width/2,M=f.width/2),t.paddingLeft=Math.max((k-S)*t.width/(t.width-S),0)+3,t.paddingRight=Math.max((M-D)*t.width/(t.width-D),0)+3}else{var C=a.mirror?0:g.width+v+p;e.width=Math.min(t.maxWidth,e.width+C),t.paddingTop=c.height/2,t.paddingBottom=f.height/2}}t.handleMargins(),u?(t.width=t._length=n.width-t.margins.left-t.margins.right,t.height=e.height):(t.width=e.width,t.height=t._length=n.height-t.margins.top-t.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(un(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,a=this;for(a.ticks=t.map((function(t){return t.value})),a.beforeTickToLabelConversion(),e=a.convertTicksToLabels(t)||a.ticks,a.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=fn(t.ctx,vn(t.options.ticks),t.getTicks(),t.longestTextCache),t.longestLabelWidth=e.widest.width),e},_parseValue:function(t){var e,n,i,a;return ln(t)?(e=+this.getRightValue(t[0]),n=+this.getRightValue(t[1]),i=Math.min(e,n),a=Math.max(e,n)):(e=void 0,n=t=+this.getRightValue(t),i=t,a=t),{min:i,max:a,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||t>n-1?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:t>0&&e>0?t:0},_autoSkip:function(t){var e,n,i,a,r=this.options.ticks,o=this._length,s=r.maxTicksLimit||o/this._tickSize()+1,l=r.major.enabled?function(t){var e,n,i=[];for(e=0,n=t.length;e<n;e++)t[e].major&&i.push(e);return i}(t):[],u=l.length,d=l[0],h=l[u-1];if(u>s)return function(t,e,n){var i,a,r=0,o=e[0];for(n=Math.ceil(n),i=0;i<t.length;i++)a=t[i],i===o?(a._index=i,o=e[++r*n]):delete a.label}(t,l,u/s),bn(t);if(i=function(t,e,n,i){var a,r,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=(a=B.math._factorize(l)).length-1;o<s;o++)if((r=a[o])>u)return r;return Math.max(u,1)}(l,t,0,s),u>0){for(e=0,n=u-1;e<n;e++)yn(t,i,l[e],l[e+1]);return a=u>1?(h-d)/(u-1):null,yn(t,i,B.isNullOrUndef(a)?0:d-a,d),yn(t,i,h,B.isNullOrUndef(a)?t.length:h+a),bn(t)}return yn(t,i),bn(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)),a=this._getLabelSizes(),r=t.autoSkipPadding||0,o=a?a.widest.width+r:0,s=a?a.highest.height+r:0;return this.isHorizontal()?s*n>o*i?o/n:s/i:s*i<o*n?s/n:o/i},_isVisible:function(){var t,e,n,i=this.chart,a=this.options.display;if("auto"!==a)return!!a;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){var e,n,i,a,r,o,s,l,u,d,h,c,f,g,m,p,v,b=this,y=b.chart,x=b.options,_=x.gridLines,w=x.position,k=_.offsetGridLines,M=b.isHorizontal(),S=b._ticksToDraw,D=S.length+(k?1:0),C=gn(_),P=[],T=_.drawBorder?hn(_.lineWidth,0,0):0,O=T/2,A=B._alignPixel,F=function(t){return A(y,t,T)};for("top"===w?(e=F(b.bottom),s=b.bottom-C,u=e-O,h=F(t.top)+O,f=t.bottom):"bottom"===w?(e=F(b.top),h=t.top,f=F(t.bottom)-O,s=e+O,u=b.top+C):"left"===w?(e=F(b.right),o=b.right-C,l=e-O,d=F(t.left)+O,c=t.right):(e=F(b.left),d=t.left,c=F(t.right)-O,o=e+O,l=b.left+C),n=0;n<D;++n)i=S[n]||{},un(i.label)&&n<S.length||(n===b.zeroLineIndex&&x.offset===k?(g=_.zeroLineWidth,m=_.zeroLineColor,p=_.zeroLineBorderDash||[],v=_.zeroLineBorderDashOffset||0):(g=hn(_.lineWidth,n,1),m=hn(_.color,n,"rgba(0,0,0,0.1)"),p=_.borderDash||[],v=_.borderDashOffset||0),void 0!==(a=cn(b,i._index||n,k))&&(r=A(y,a,g),M?o=l=d=c=r:s=u=h=f=r,P.push({tx1:o,ty1:s,tx2:l,ty2:u,x1:d,y1:h,x2:c,y2:f,width:g,color:m,borderDash:p,borderDashOffset:v})));return P.ticksLength=D,P.borderValue=e,P},_computeLabelItems:function(){var t,e,n,i,a,r,o,s,l,u,d,h,c=this,f=c.options,g=f.ticks,m=f.position,p=g.mirror,v=c.isHorizontal(),b=c._ticksToDraw,y=vn(g),x=g.padding,_=gn(f.gridLines),w=-B.toRadians(c.labelRotation),k=[];for("top"===m?(r=c.bottom-_-x,o=w?"left":"center"):"bottom"===m?(r=c.top+_+x,o=w?"right":"center"):"left"===m?(a=c.right-(p?0:_)-x,o=p?"left":"right"):(a=c.left+(p?0:_)+x,o=p?"right":"left"),t=0,e=b.length;t<e;++t)i=(n=b[t]).label,un(i)||(s=c.getPixelForTick(n._index||t)+g.labelOffset,u=(l=n.major?y.major:y.minor).lineHeight,d=ln(i)?i.length:1,v?(a=s,h="top"===m?((w?1:.5)-d)*u:(w?0:.5)*u):(r=s,h=(1-d)*u/2),k.push({x:a,y:r,rotation:w,label:i,font:l,textOffset:h,textAlign:o}));return k},_drawGrid:function(t){var e=this,n=e.options.gridLines;if(n.display){var i,a,r,o,s,l=e.ctx,u=e.chart,d=B._alignPixel,h=n.drawBorder?hn(n.lineWidth,0,0):0,c=e._gridLineItems||(e._gridLineItems=e._computeGridLineItems(t));for(r=0,o=c.length;r<o;++r)i=(s=c[r]).width,a=s.color,i&&a&&(l.save(),l.lineWidth=i,l.strokeStyle=a,l.setLineDash&&(l.setLineDash(s.borderDash),l.lineDashOffset=s.borderDashOffset),l.beginPath(),n.drawTicks&&(l.moveTo(s.tx1,s.ty1),l.lineTo(s.tx2,s.ty2)),n.drawOnChartArea&&(l.moveTo(s.x1,s.y1),l.lineTo(s.x2,s.y2)),l.stroke(),l.restore());if(h){var f,g,m,p,v=h,b=hn(n.lineWidth,c.ticksLength-1,1),y=c.borderValue;e.isHorizontal()?(f=d(u,e.left,v)-v/2,g=d(u,e.right,b)+b/2,m=p=y):(m=d(u,e.top,v)-v/2,p=d(u,e.bottom,b)+b/2,f=g=y),l.lineWidth=h,l.strokeStyle=hn(n.color,0),l.beginPath(),l.moveTo(f,m),l.lineTo(g,p),l.stroke()}}},_drawLabels:function(){var t=this;if(t.options.ticks.display){var e,n,i,a,r,o,s,l,u=t.ctx,d=t._labelItems||(t._labelItems=t._computeLabelItems());for(e=0,i=d.length;e<i;++e){if(o=(r=d[e]).font,u.save(),u.translate(r.x,r.y),u.rotate(r.rotation),u.font=o.string,u.fillStyle=o.color,u.textBaseline="middle",u.textAlign=r.textAlign,s=r.label,l=r.textOffset,ln(s))for(n=0,a=s.length;n<a;++n)u.fillText(""+s[n],0,l),l+=o.lineHeight;else u.fillText(s,0,l);u.restore()}}},_drawTitle:function(){var t=this,e=t.ctx,n=t.options,i=n.scaleLabel;if(i.display){var a,r,o=dn(i.fontColor,W.global.defaultFontColor),s=B.options._parseFont(i),l=B.options.toPadding(i.padding),u=s.lineHeight/2,d=n.position,h=0;if(t.isHorizontal())a=t.left+t.width/2,r="bottom"===d?t.bottom-u-l.bottom:t.top+u+l.top;else{var c="left"===d;a=c?t.left+u+l.top:t.right-u-l.top,r=t.top+t.height/2,h=c?-.5*Math.PI:.5*Math.PI}e.save(),e.translate(a,r),e.rotate(h),e.textAlign="center",e.textBaseline="middle",e.fillStyle=o,e.font=s.string,e.fillText(i.labelString,0,0),e.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(t){var e=this,n=e.isHorizontal();return e.chart._getSortedVisibleDatasetMetas().filter((function(i){return(!t||i.type===t)&&(n?i.xAxisID===e.id:i.yAxisID===e.id)}))}});xn.prototype._draw=xn.prototype.draw;var _n=xn,wn=B.isNullOrUndef,kn=_n.extend({determineDataLimits:function(){var t,e=this,n=e._getLabels(),i=e.options.ticks,a=i.min,r=i.max,o=0,s=n.length-1;void 0!==a&&(t=n.indexOf(a))>=0&&(o=t),void 0!==r&&(t=n.indexOf(r))>=0&&(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;_n.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,a,r,o=this;return wn(e)||wn(n)||(t=o.chart.data.datasets[n].data[e]),wn(t)||(i=o.isHorizontal()?t.x:t.y),(void 0!==i||void 0!==t&&isNaN(e))&&(a=o._getLabels(),t=B.valueOrDefault(i,t),e=-1!==(r=a.indexOf(t))?r: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}}),Mn={position:"bottom"};kn._defaults=Mn;var Sn=B.noop,Dn=B.isNullOrUndef,Cn=_n.extend({getRightValue:function(t){return"string"==typeof t?+t:_n.prototype.getRightValue.call(this,t)},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;if(e.beginAtZero){var n=B.sign(t.min),i=B.sign(t.max);n<0&&i<0?t.max=0:n>0&&i>0&&(t.min=0)}var a=void 0!==e.min||void 0!==e.suggestedMin,r=void 0!==e.max||void 0!==e.suggestedMax;void 0!==e.min?t.min=e.min:void 0!==e.suggestedMin&&(null===t.min?t.min=e.suggestedMin:t.min=Math.min(t.min,e.suggestedMin)),void 0!==e.max?t.max=e.max:void 0!==e.suggestedMax&&(null===t.max?t.max=e.suggestedMax:t.max=Math.max(t.max,e.suggestedMax)),a!==r&&t.min>=t.max&&(a?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.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:Sn,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)},a=t.ticks=function(t,e){var n,i,a,r,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&&Dn(d)&&Dn(h))return[f,g];(r=Math.ceil(g/m)-Math.floor(f/m))>u&&(m=B.niceNum(r*m/u/l)*l),s||Dn(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,a=Math.ceil(g/m)*m,s&&(!Dn(d)&&B.almostWhole(d/m,m/1e3)&&(i=d),!Dn(h)&&B.almostWhole(h/m,m/1e3)&&(a=h)),r=(a-i)/m,r=B.almostEquals(r,Math.round(r),m/1e3)?Math.round(r):Math.ceil(r),i=Math.round(i*n)/n,a=Math.round(a*n)/n,o.push(Dn(d)?i:d);for(var p=1;p<r;++p)o.push(Math.round((i+p*m)*n)/n);return o.push(Dn(h)?a:h),o}(i,t);t.handleDirectionalChanges(),t.max=B.max(a),t.min=B.min(a),e.reverse?(a.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),_n.prototype.convertTicksToLabels.call(t)},_configure:function(){var t,e=this,n=e.getTicks(),i=e.min,a=e.max;_n.prototype._configure.call(e),e.options.offset&&n.length&&(i-=t=(a-i)/Math.max(n.length-1,1)/2,a+=t),e._startValue=i,e._endValue=a,e._valueRange=a-i}}),Pn={position:"left",ticks:{callback:sn.formatters.linear}};function Tn(t,e,n,i){var a,r,o,s,l,u,d=t.options,h=(o=e,s=d.stacked,u=[(l=n).type,void 0===s&&void 0===l.stack?l.index:"",l.stack].join("."),void 0===o[u]&&(o[u]={pos:[],neg:[]}),o[u]),c=h.pos,f=h.neg,g=i.length;for(a=0;a<g;++a)r=t._parseValue(i[a]),isNaN(r.min)||isNaN(r.max)||n.data[a].hidden||(c[a]=c[a]||0,f[a]=f[a]||0,d.relativePoints?c[a]=100:r.min<0||r.max<0?f[a]+=r.min:c[a]+=r.max)}function On(t,e,n){var i,a,r=n.length;for(i=0;i<r;++i)a=t._parseValue(n[i]),isNaN(a.min)||isNaN(a.max)||e.data[i].hidden||(t.min=Math.min(t.min,a.min),t.max=Math.max(t.max,a.max))}var An=Cn.extend({determineDataLimits:function(){var t,e,n,i,a=this,r=a.options,o=a.chart.data.datasets,s=a._getMatchingVisibleMetas(),l=r.stacked,u={},d=s.length;if(a.min=Number.POSITIVE_INFINITY,a.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?Tn(a,u,e,n):On(a,e,n);B.each(u,(function(t){i=t.pos.concat(t.neg),a.min=Math.min(a.min,B.min(i)),a.max=Math.max(a.max,B.max(i))})),a.min=B.isFinite(a.min)&&!isNaN(a.min)?a.min:0,a.max=B.isFinite(a.max)&&!isNaN(a.max)?a.max:1,a.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])}}),Fn=Pn;An._defaults=Fn;var In=B.valueOrDefault,Nn=B.math.log10,Rn={position:"left",ticks:{callback:sn.formatters.logarithmic}};function Ln(t,e){return B.isFinite(t)&&t>=0?t:e}var Yn=_n.extend({determineDataLimits:function(){var t,e,n,i,a,r,o=this,s=o.options,l=o.chart,u=l.data.datasets,d=o.isHorizontal();function h(t){return d?t.xAxisID===o.id:t.yAxisID===o.id}o.min=Number.POSITIVE_INFINITY,o.max=Number.NEGATIVE_INFINITY,o.minNotZero=Number.POSITIVE_INFINITY;var c=s.stacked;if(void 0===c)for(t=0;t<u.length;t++)if(e=l.getDatasetMeta(t),l.isDatasetVisible(t)&&h(e)&&void 0!==e.stack){c=!0;break}if(s.stacked||c){var f={};for(t=0;t<u.length;t++){var g=[(e=l.getDatasetMeta(t)).type,void 0===s.stacked&&void 0===e.stack?t:"",e.stack].join(".");if(l.isDatasetVisible(t)&&h(e))for(void 0===f[g]&&(f[g]=[]),a=0,r=(i=u[t].data).length;a<r;a++){var m=f[g];n=o._parseValue(i[a]),isNaN(n.min)||isNaN(n.max)||e.data[a].hidden||n.min<0||n.max<0||(m[a]=m[a]||0,m[a]+=n.max)}}B.each(f,(function(t){if(t.length>0){var e=B.min(t),n=B.max(t);o.min=Math.min(o.min,e),o.max=Math.max(o.max,n)}}))}else for(t=0;t<u.length;t++)if(e=l.getDatasetMeta(t),l.isDatasetVisible(t)&&h(e))for(a=0,r=(i=u[t].data).length;a<r;a++)n=o._parseValue(i[a]),isNaN(n.min)||isNaN(n.max)||e.data[a].hidden||n.min<0||n.max<0||(o.min=Math.min(n.min,o.min),o.max=Math.max(n.max,o.max),0!==n.min&&(o.minNotZero=Math.min(n.min,o.minNotZero)));o.min=B.isFinite(o.min)?o.min:null,o.max=B.isFinite(o.max)?o.max:null,o.minNotZero=B.isFinite(o.minNotZero)?o.minNotZero:null,this.handleTickRangeOptions()},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;t.min=Ln(e.min,t.min),t.max=Ln(e.max,t.max),t.min===t.max&&(0!==t.min&&null!==t.min?(t.min=Math.pow(10,Math.floor(Nn(t.min))-1),t.max=Math.pow(10,Math.floor(Nn(t.max))+1)):(t.min=1,t.max=10)),null===t.min&&(t.min=Math.pow(10,Math.floor(Nn(t.max))-1)),null===t.max&&(t.max=0!==t.min?Math.pow(10,Math.floor(Nn(t.min))+1):10),null===t.minNotZero&&(t.min>0?t.minNotZero=t.min:t.max<1?t.minNotZero=Math.pow(10,Math.floor(Nn(t.max))):t.minNotZero=1)},buildTicks:function(){var t=this,e=t.options.ticks,n=!t.isHorizontal(),i={min:Ln(e.min),max:Ln(e.max)},a=t.ticks=function(t,e){var n,i,a=[],r=In(t.min,Math.pow(10,Math.floor(Nn(e.min)))),o=Math.floor(Nn(e.max)),s=Math.ceil(e.max/Math.pow(10,o));0===r?(n=Math.floor(Nn(e.minNotZero)),i=Math.floor(e.minNotZero/Math.pow(10,n)),a.push(r),r=i*Math.pow(10,n)):(n=Math.floor(Nn(r)),i=Math.floor(r/Math.pow(10,n)));var l=n<0?Math.pow(10,Math.abs(n)):1;do{a.push(r),10==++i&&(i=1,l=++n>=0?1:l),r=Math.round(i*Math.pow(10,n)*l)/l}while(n<o||n===o&&i<s);var u=In(t.max,r);return a.push(u),a}(i,t);t.max=B.max(a),t.min=B.min(a),e.reverse?(n=!n,t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),n&&a.reverse()},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),_n.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(Nn(t));return Math.floor(t/Math.pow(10,e))*Math.pow(10,e)},_configure:function(){var t=this,e=t.min,n=0;_n.prototype._configure.call(t),0===e&&(e=t._getFirstTickValue(t.minNotZero),n=In(t.options.ticks.fontSize,W.global.defaultFontSize)/t._length),t._startValue=Nn(e),t._valueOffset=n,t._valueRange=(Nn(t.max)-Nn(e))/(1-n)},getPixelForValue:function(t){var e=this,n=0;return(t=+e.getRightValue(t))>e.min&&t>0&&(n=(Nn(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)}}),Wn=Rn;Yn._defaults=Wn;var zn=B.valueOrDefault,En=B.valueAtIndexOrDefault,Vn=B.options.resolve,Hn={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:sn.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(t){return t}}};function Bn(t){var e=t.ticks;return e.display&&t.display?zn(e.fontSize,W.global.defaultFontSize)+2*e.backdropPaddingY:0}function jn(t,e,n,i,a){return t===i||t===a?{start:e-n/2,end:e+n/2}:t<i||t>a?{start:e-n,end:e}:{start:e,end:e+n}}function Un(t){return 0===t||180===t?"center":t<180?"left":"right"}function Gn(t,e,n,i){var a,r,o=n.y+i/2;if(B.isArray(e))for(a=0,r=e.length;a<r;++a)t.fillText(e[a],n.x,o),o+=i;else t.fillText(e,n.x,o)}function qn(t,e,n){90===t||270===t?n.y-=e.h/2:(t>270||t<90)&&(n.y-=e.h)}function Zn(t){return B.isNumber(t)?t:0}var $n=Cn.extend({setDimensions:function(){var t=this;t.width=t.maxWidth,t.height=t.maxHeight,t.paddingTop=Bn(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 t=this,e=t.chart,n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;B.each(e.data.datasets,(function(a,r){if(e.isDatasetVisible(r)){var o=e.getDatasetMeta(r);B.each(a.data,(function(e,a){var r=+t.getRightValue(e);isNaN(r)||o.data[a].hidden||(n=Math.min(r,n),i=Math.max(r,i))}))}})),t.min=n===Number.POSITIVE_INFINITY?0:n,t.max=i===Number.NEGATIVE_INFINITY?0:i,t.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/Bn(this.options))},convertTicksToLabels:function(){var t=this;Cn.prototype.convertTicksToLabels.call(t),t.pointLabels=t.chart.data.labels.map((function(){var e=B.callback(t.options.pointLabels.callback,arguments,t);return e||0===e?e:""}))},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?function(t){var e,n,i,a=B.options._parseFont(t.options.pointLabels),r={l:0,r:t.width,t:0,b:t.height-t.paddingTop},o={};t.ctx.font=a.string,t._pointLabelSizes=[];var s,l,u,d=t.chart.data.labels.length;for(e=0;e<d;e++){i=t.getPointPosition(e,t.drawingArea+5),s=t.ctx,l=a.lineHeight,u=t.pointLabels[e],n=B.isArray(u)?{w:B.longestText(s,s.font,u),h:u.length*l}:{w:s.measureText(u).width,h:l},t._pointLabelSizes[e]=n;var h=t.getIndexAngle(e),c=B.toDegrees(h)%360,f=jn(c,i.x,n.w,0,180),g=jn(c,i.y,n.h,90,270);f.start<r.l&&(r.l=f.start,o.l=h),f.end>r.r&&(r.r=f.end,o.r=h),g.start<r.t&&(r.t=g.start,o.t=h),g.end>r.b&&(r.b=g.end,o.b=h)}t.setReductions(t.drawingArea,r,o)}(this):this.setCenterPoint(0,0,0,0)},setReductions:function(t,e,n){var i=this,a=e.l/Math.sin(n.l),r=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);a=Zn(a),r=Zn(r),o=Zn(o),s=Zn(s),i.drawingArea=Math.min(Math.floor(t-(a+r)/2),Math.floor(t-(o+s)/2)),i.setCenterPoint(a,r,o,s)},setCenterPoint:function(t,e,n,i){var a=this,r=a.width-e-a.drawingArea,o=t+a.drawingArea,s=n+a.drawingArea,l=a.height-a.paddingTop-i-a.drawingArea;a.xCenter=Math.floor((o+r)/2+a.left),a.yCenter=Math.floor((s+l)/2+a.top+a.paddingTop)},getIndexAngle:function(t){var e=this.chart,n=(t*(360/e.data.labels.length)+((e.options||{}).startAngle||0))%360;return(n<0?n+360: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:e>0&&n>0?e:0)},_drawGrid:function(){var t,e,n,i=this,a=i.ctx,r=i.options,o=r.gridLines,s=r.angleLines,l=zn(s.lineWidth,o.lineWidth),u=zn(s.color,o.color);if(r.pointLabels.display&&function(t){var e=t.ctx,n=t.options,i=n.pointLabels,a=Bn(n),r=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=t.chart.data.labels.length-1;s>=0;s--){var l=0===s?a/2:0,u=t.getPointPosition(s,r+l+5),d=En(i.fontColor,s,W.global.defaultFontColor);e.fillStyle=d;var h=t.getIndexAngle(s),c=B.toDegrees(h);e.textAlign=Un(c),qn(c,t._pointLabelSizes[s],u),Gn(e,t.pointLabels[s],u,o.lineHeight)}e.restore()}(i),o.display&&B.each(i.ticks,(function(t,n){0!==n&&(e=i.getDistanceFromCenterForValue(i.ticksAsNumbers[n]),function(t,e,n,i){var a,r=t.ctx,o=e.circular,s=t.chart.data.labels.length,l=En(e.color,i-1),u=En(e.lineWidth,i-1);if((o||s)&&l&&u){if(r.save(),r.strokeStyle=l,r.lineWidth=u,r.setLineDash&&(r.setLineDash(e.borderDash||[]),r.lineDashOffset=e.borderDashOffset||0),r.beginPath(),o)r.arc(t.xCenter,t.yCenter,n,0,2*Math.PI);else{a=t.getPointPosition(0,n),r.moveTo(a.x,a.y);for(var d=1;d<s;d++)a=t.getPointPosition(d,n),r.lineTo(a.x,a.y)}r.closePath(),r.stroke(),r.restore()}}(i,o,e,n))})),s.display&&l&&u){for(a.save(),a.lineWidth=l,a.strokeStyle=u,a.setLineDash&&(a.setLineDash(Vn([s.borderDash,o.borderDash,[]])),a.lineDashOffset=Vn([s.borderDashOffset,o.borderDashOffset,0])),t=i.chart.data.labels.length-1;t>=0;t--)e=i.getDistanceFromCenterForValue(r.ticks.reverse?i.min:i.max),n=i.getPointPosition(t,e),a.beginPath(),a.moveTo(i.xCenter,i.yCenter),a.lineTo(n.x,n.y),a.stroke();a.restore()}},_drawLabels:function(){var t=this,e=t.ctx,n=t.options.ticks;if(n.display){var i,a,r=t.getIndexAngle(0),o=B.options._parseFont(n),s=zn(n.fontColor,W.global.defaultFontColor);e.save(),e.font=o.string,e.translate(t.xCenter,t.yCenter),e.rotate(r),e.textAlign="center",e.textBaseline="middle",B.each(t.ticks,(function(r,l){(0!==l||n.reverse)&&(i=t.getDistanceFromCenterForValue(t.ticksAsNumbers[l]),n.showLabelBackdrop&&(a=e.measureText(r).width,e.fillStyle=n.backdropColor,e.fillRect(-a/2-n.backdropPaddingX,-i-o.size/2-n.backdropPaddingY,a+2*n.backdropPaddingX,o.size+2*n.backdropPaddingY)),e.fillStyle=s,e.fillText(r,0,-i))})),e.restore()}},_drawTitle:B.noop}),Xn=Hn;$n._defaults=Xn;var Kn=B._deprecated,Jn=B.options.resolve,Qn=B.valueOrDefault,ti=Number.MIN_SAFE_INTEGER||-9007199254740991,ei=Number.MAX_SAFE_INTEGER||9007199254740991,ni={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}},ii=Object.keys(ni);function ai(t,e){return t-e}function ri(t){return B.valueOrDefault(t.time.min,t.ticks.min)}function oi(t){return B.valueOrDefault(t.time.max,t.ticks.max)}function si(t,e,n,i){var a=function(t,e,n){for(var i,a,r,o=0,s=t.length-1;o>=0&&o<=s;){if(a=t[(i=o+s>>1)-1]||null,r=t[i],!a)return{lo:null,hi:r};if(r[e]<n)o=i+1;else{if(!(a[e]>n))return{lo:a,hi:r};s=i-1}}return{lo:r,hi:null}}(t,e,n),r=a.lo?a.hi?a.lo:t[t.length-2]:t[0],o=a.lo?a.hi?a.hi:t[t.length-1]:t[1],s=o[e]-r[e],l=s?(n-r[e])/s:0,u=(o[i]-r[i])*l;return r[i]+u}function li(t,e){var n=t._adapter,i=t.options.time,a=i.parser,r=a||i.format,o=e;return"function"==typeof a&&(o=a(o)),B.isFinite(o)||(o="string"==typeof r?n.parse(o,r):n.parse(o)),null!==o?+o:(a||"function"!=typeof r||(o=r(e),B.isFinite(o)||(o=n.parse(o))),o)}function ui(t,e){if(B.isNullOrUndef(e))return null;var n=t.options.time,i=li(t,t.getRightValue(e));return null===i||n.round&&(i=+t._adapter.startOf(i,n.round)),i}function di(t,e,n,i){var a,r,o,s=ii.length;for(a=ii.indexOf(t);a<s-1;++a)if(o=(r=ni[ii[a]]).steps?r.steps:ei,r.common&&Math.ceil((n-e)/(o*r.size))<=i)return ii[a];return ii[s-1]}function hi(t,e,n){var i,a,r=[],o={},s=e.length;for(i=0;i<s;++i)o[a=e[i]]=i,r.push({value:a,major:!1});return 0!==s&&n?function(t,e,n,i){var a,r,o=t._adapter,s=+o.startOf(e[0].value,i),l=e[e.length-1].value;for(a=s;a<=l;a=+o.add(a,1,i))(r=n[a])>=0&&(e[r].major=!0);return e}(t,r,o,n):r}var ci=_n.extend({initialize:function(){this.mergeTicksOptions(),_n.prototype.initialize.call(this)},update:function(){var t=this,e=t.options,n=e.time||(e.time={}),i=t._adapter=new on._date(e.adapters.date);return Kn("time scale",n.format,"time.format","time.parser"),Kn("time scale",n.min,"time.min","ticks.min"),Kn("time scale",n.max,"time.max","ticks.max"),B.mergeIf(n.displayFormats,i.formats()),_n.prototype.update.apply(t,arguments)},getRightValue:function(t){return t&&void 0!==t.t&&(t=t.t),_n.prototype.getRightValue.call(this,t)},determineDataLimits:function(){var t,e,n,i,a,r,o,s=this,l=s.chart,u=s._adapter,d=s.options,h=d.time.unit||"day",c=ei,f=ti,g=[],m=[],p=[],v=s._getLabels();for(t=0,n=v.length;t<n;++t)p.push(ui(s,v[t]));for(t=0,n=(l.data.datasets||[]).length;t<n;++t)if(l.isDatasetVisible(t))if(a=l.data.datasets[t].data,B.isObject(a[0]))for(m[t]=[],e=0,i=a.length;e<i;++e)r=ui(s,a[e]),g.push(r),m[t][e]=r;else m[t]=p.slice(0),o||(g=g.concat(p),o=!0);else m[t]=[];p.length&&(c=Math.min(c,p[0]),f=Math.max(f,p[p.length-1])),g.length&&(g=n>1?function(t){var e,n,i,a={},r=[];for(e=0,n=t.length;e<n;++e)a[i=t[e]]||(a[i]=!0,r.push(i));return r}(g).sort(ai):g.sort(ai),c=Math.min(c,g[0]),f=Math.max(f,g[g.length-1])),c=ui(s,ri(d))||c,f=ui(s,oi(d))||f,c=c===ei?+u.startOf(Date.now(),h):c,f=f===ti?+u.endOf(Date.now(),h)+1:f,s.min=Math.min(c,f),s.max=Math.max(c+1,f),s._table=[],s._timestamps={data:g,datasets:m,labels:p}},buildTicks:function(){var t,e,n,i,a,r,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),b=f.source,y=c.distribution;for(m="data"===b||"auto"===b&&"series"===y?m.data:"labels"===b?m.labels:function(t,e,n,i){var a,r=t._adapter,o=t.options,s=o.time,l=s.unit||di(s.minUnit,e,n,i),u=Jn([s.stepSize,s.unitStepSize,1]),d="week"===l&&s.isoWeekday,h=e,c=[];if(d&&(h=+r.startOf(h,"isoWeek",d)),h=+r.startOf(h,d?"day":l),r.diff(n,e,l)>1e5*u)throw e+" and "+n+" are too far apart with stepSize of "+u+" "+l;for(a=h;a<n;a=+r.add(a,u,l))c.push(a);return a!==n&&"ticks"!==o.bounds||c.push(a),c}(u,d,h,v),"ticks"===c.bounds&&m.length&&(d=m[0],h=m[m.length-1]),d=ui(u,ri(c))||d,h=ui(u,oi(c))||h,t=0,e=m.length;t<e;++t)(n=m[t])>=d&&n<=h&&p.push(n);return u.min=d,u.max=h,u._unit=g.unit||(f.autoSkip?di(g.minUnit,u.min,u.max,v):function(t,e,n,i,a){var r,o;for(r=ii.length-1;r>=ii.indexOf(n);r--)if(o=ii[r],ni[o].common&&t._adapter.diff(a,i,o)>=e-1)return o;return ii[n?ii.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=ii.indexOf(t)+1,n=ii.length;e<n;++e)if(ni[ii[e]].common)return ii[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}];var a,r,o,s,l,u=[],d=[e];for(a=0,r=t.length;a<r;++a)(s=t[a])>e&&s<n&&d.push(s);for(d.push(n),a=0,r=d.length;a<r;++a)l=d[a+1],o=d[a-1],s=d[a],void 0!==o&&void 0!==l&&Math.round((l+o)/2)===s||u.push({time:s,pos:a/(r-1)});return u}(u._timestamps.data,d,h,y),u._offsets=(i=u._table,a=p,s=0,l=0,c.offset&&a.length&&(r=si(i,"time",a[0],"pos"),s=1===a.length?1-r:(si(i,"time",a[1],"pos")-r)/2,o=si(i,"time",a[a.length-1],"pos"),l=1===a.length?o:(o-si(i,"time",a[a.length-2],"pos"))/2),{start:s,end:l,factor:1/(s+1+l)}),f.reverse&&p.reverse(),hi(u,p,u._majorUnit)},getLabelForIndex:function(t,e){var n=this,i=n._adapter,a=n.chart.data,r=n.options.time,o=a.labels&&t<a.labels.length?a.labels[t]:"",s=a.datasets[e].data[t];return B.isObject(s)&&(o=n.getRightValue(s)),r.tooltipFormat?i.format(li(n,o),r.tooltipFormat):"string"==typeof o?o:i.format(li(n,o),r.displayFormats.datetime)},tickFormatFunction:function(t,e,n,i){var a=this._adapter,r=this.options,o=r.time.displayFormats,s=o[this._unit],l=this._majorUnit,u=o[l],d=n[e],h=r.ticks,c=l&&u&&d&&d.major,f=a.format(t,i||(c?u:s)),g=c?h.major:h.minor,m=Jn([g.callback,g.userCallback,h.callback,h.userCallback]);return m?m(f,e,n):f},convertTicksToLabels:function(t){var e,n,i=[];for(e=0,n=t.length;e<n;++e)i.push(this.tickFormatFunction(t[e].value,e,t));return i},getPixelForOffset:function(t){var e=this._offsets,n=si(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=ui(this,t)),null!==i)return this.getPixelForOffset(i)},getPixelForTick:function(t){var e=this.getTicks();return t>=0&&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=si(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),a=Math.cos(i),r=Math.sin(i),o=Qn(e.fontSize,W.global.defaultFontSize);return{w:n*a+o*r,h:n*r+o*a}},getLabelWidth:function(t){return this._getLabelSize(t).w},getLabelCapacity:function(t){var e=this,n=e.options.time,i=n.displayFormats,a=i[n.unit]||i.millisecond,r=e.tickFormatFunction(t,0,hi(e,[t],e._majorUnit),a),o=e._getLabelSize(r),s=Math.floor(e.isHorizontal()?e.width/o.w:e.height/o.h);return e.options.offset&&s--,s>0?s:1}}),fi={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}}};ci._defaults=fi;var gi={category:kn,linear:An,logarithmic:Yn,radialLinear:$n,time:ci},mi={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"};on._date.override("function"==typeof t?{_id:"moment",formats:function(){return mi},parse:function(e,n){return"string"==typeof e&&"string"==typeof n?e=t(e,n):e instanceof t||(e=t(e)),e.isValid()?e.valueOf():null},format:function(e,n){return t(e).format(n)},add:function(e,n,i){return t(e).add(n,i).valueOf()},diff:function(e,n,i){return t(e).diff(t(n),i)},startOf:function(e,n,i){return e=t(e),"isoWeek"===n?e.isoWeekday(i).valueOf():e.startOf(n).valueOf()},endOf:function(e,n){return t(e).endOf(n).valueOf()},_create:function(e){return t(e)}}:{}),W._set("global",{plugins:{filler:{propagate:!0}}});var pi={dataset:function(t){var e=t.fill,n=t.chart,i=n.getDatasetMeta(e),a=i&&n.isDatasetVisible(e)&&i.dataset._children||[],r=a.length||0;return r?function(t,e){return e<r&&a[e]._view||null}:null},boundary:function(t){var e=t.boundary,n=e?e.x:null,i=e?e.y:null;return B.isArray(e)?function(t,n){return e[n]}:function(t){return{x:null===n?t.x:n,y:null===i?t.y:i}}}};function vi(t,e,n){var i,a=t._model||{},r=a.fill;if(void 0===r&&(r=!!a.backgroundColor),!1===r||null===r)return!1;if(!0===r)return"origin";if(i=parseFloat(r,10),isFinite(i)&&Math.floor(i)===i)return"-"!==r[0]&&"+"!==r[0]||(i=e+i),!(i===e||i<0||i>=n)&&i;switch(r){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return r;default:return!1}}function bi(t){return(t.el._scale||{}).getPointPositionForValue?function(t){var e,n,i,a,r,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),a=0;a<l;++a)r="start"===u||"end"===u?o.getPointPositionForValue(a,"start"===u?e:n):o.getBasePosition(a),s.gridLines.circular&&(r.cx=i.x,r.cy=i.y,r.angle=o.getIndexAngle(a)-Math.PI/2),d.push(r);return d}(t):function(t){var e,n=t.el._model||{},i=t.el._scale||{},a=t.fill,r=null;if(isFinite(a))return null;if("start"===a?r=void 0===n.scaleBottom?i.bottom:n.scaleBottom:"end"===a?r=void 0===n.scaleTop?i.top:n.scaleTop:void 0!==n.scaleZero?r=n.scaleZero:i.getBasePixel&&(r=i.getBasePixel()),null!=r){if(void 0!==r.x&&void 0!==r.y)return r;if(B.isFinite(r))return{x:(e=i.isHorizontal())?r:null,y:e?null:r}}return null}(t)}function yi(t,e,n){var i,a=t[e].fill,r=[e];if(!n)return a;for(;!1!==a&&-1===r.indexOf(a);){if(!isFinite(a))return a;if(!(i=t[a]))return!1;if(i.visible)return a;r.push(a),a=i.fill}return!1}function xi(t){var e=t.fill,n="dataset";return!1===e?null:(isFinite(e)||(n="boundary"),pi[n](t))}function _i(t){return t&&!t.skip}function wi(t,e,n,i,a){var r,o,s,l;if(i&&a){for(t.moveTo(e[0].x,e[0].y),r=1;r<i;++r)B.canvas.lineTo(t,e[r-1],e[r]);if(void 0===n[0].angle)for(t.lineTo(n[a-1].x,n[a-1].y),r=a-1;r>0;--r)B.canvas.lineTo(t,n[r],n[r-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)),r=a-1;r>0;--r)t.arc(o,s,l,n[r].angle,n[r-1].angle,!0)}}function ki(t,e,n,i,a,r){var o,s,l,u,d,h,c,f,g=e.length,m=i.spanGaps,p=[],v=[],b=0,y=0;for(t.beginPath(),o=0,s=g;o<s;++o)d=n(u=e[l=o%g]._view,l,i),h=_i(u),c=_i(d),r&&void 0===f&&h&&(s=g+(f=o+1)),h&&c?(b=p.push(u),y=v.push(d)):b&&y&&(m?(h&&p.push(u),c&&v.push(d)):(wi(t,p,v,b,y),b=y=0,p=[],v=[]));wi(t,p,v,b,y),t.closePath(),t.fillStyle=a,t.fill()}var Mi={id:"filler",afterDatasetsUpdate:function(t,e){var n,i,a,r,o=(t.data.datasets||[]).length,s=e.propagate,l=[];for(i=0;i<o;++i)r=null,(a=(n=t.getDatasetMeta(i)).dataset)&&a._model&&a instanceof kt.Line&&(r={visible:t.isDatasetVisible(i),fill:vi(a,i,o),chart:t,el:a}),n.$filler=r,l.push(r);for(i=0;i<o;++i)(r=l[i])&&(r.fill=yi(l,i,s),r.boundary=bi(r),r.mapper=xi(r))},beforeDatasetsDraw:function(t){var e,n,i,a,r,o,s,l=t._getSortedVisibleDatasetMetas(),u=t.ctx;for(n=l.length-1;n>=0;--n)(e=l[n].$filler)&&e.visible&&(a=(i=e.el)._view,r=i._children||[],o=e.mapper,s=a.backgroundColor||W.global.defaultColor,o&&s&&r.length&&(B.canvas.clipArea(u,t.chartArea),ki(u,r,o,a,s,i._loop),B.canvas.unclipArea(u)))}},Si=B.rtl.getRtlAdapter,Di=B.noop,Ci=B.valueOrDefault;function Pi(t,e){return t.usePointStyle&&t.boxWidth>e?e:t.boxWidth}W._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,a=i.getDatasetMeta(n);a.hidden=null===a.hidden?!i.data.datasets[n].hidden:null,i.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(t){var e=t.data.datasets,n=t.options.legend||{},i=n.labels&&n.labels.usePointStyle;return t._getSortedDatasetMetas().map((function(n){var a=n.controller.getStyle(i?0:void 0);return{text:e[n.index].label,fillStyle:a.backgroundColor,hidden:!t.isDatasetVisible(n.index),lineCap:a.borderCapStyle,lineDash:a.borderDash,lineDashOffset:a.borderDashOffset,lineJoin:a.borderJoinStyle,lineWidth:a.borderWidth,strokeStyle:a.borderColor,pointStyle:a.pointStyle,rotation:a.rotation,datasetIndex:n.index}}),this)}}},legendCallback:function(t){var e,n,i,a=document.createElement("ul"),r=t.data.datasets;for(a.setAttribute("class",t.id+"-legend"),e=0,n=r.length;e<n;e++)(i=a.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=r[e].backgroundColor,r[e].label&&i.appendChild(document.createTextNode(r[e].label));return a.outerHTML}});var Ti=X.extend({initialize:function(t){B.extend(this,t),this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1},beforeUpdate:Di,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:Di,beforeSetDimensions:Di,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:Di,beforeBuildLabels:Di,buildLabels:function(){var t=this,e=t.options.labels||{},n=B.callback(e.generateLabels,[t.chart],t)||[];e.filter&&(n=n.filter((function(n){return e.filter(n,t.chart.data)}))),t.options.reverse&&n.reverse(),t.legendItems=n},afterBuildLabels:Di,beforeFit:Di,fit:function(){var t=this,e=t.options,n=e.labels,i=e.display,a=t.ctx,r=B.options._parseFont(n),o=r.size,s=t.legendHitBoxes=[],l=t.minSize,u=t.isHorizontal();if(u?(l.width=t.maxWidth,l.height=i?10:0):(l.width=i?10:0,l.height=t.maxHeight),i){if(a.font=r.string,u){var d=t.lineWidths=[0],h=0;a.textAlign="left",a.textBaseline="middle",B.each(t.legendItems,(function(t,e){var i=Pi(n,o)+o/2+a.measureText(t.text).width;(0===e||d[d.length-1]+i+2*n.padding>l.width)&&(h+=o+n.padding,d[d.length-(e>0?0:1)]=0),s[e]={left:0,top:0,width:i,height:o},d[d.length-1]+=i+n.padding})),l.height+=h}else{var c=n.padding,f=t.columnWidths=[],g=t.columnHeights=[],m=n.padding,p=0,v=0;B.each(t.legendItems,(function(t,e){var i=Pi(n,o)+o/2+a.measureText(t.text).width;e>0&&v+o+2*c>l.height&&(m+=p+n.padding,f.push(p),g.push(v),p=0,v=0),p=Math.max(p,i),v+=o+c,s[e]={left:0,top:0,width:i,height:o}})),m+=p,f.push(p),g.push(v),l.width+=m}t.width=l.width,t.height=l.height}else t.width=l.width=t.height=l.height=0},afterFit:Di,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,e=t.options,n=e.labels,i=W.global,a=i.defaultColor,r=i.elements.line,o=t.height,s=t.columnHeights,l=t.width,u=t.lineWidths;if(e.display){var d,h=Si(e.rtl,t.left,t.minSize.width),c=t.ctx,f=Ci(n.fontColor,i.defaultFontColor),g=B.options._parseFont(n),m=g.size;c.textAlign=h.textAlign("left"),c.textBaseline="middle",c.lineWidth=.5,c.strokeStyle=f,c.fillStyle=f,c.font=g.string;var p=Pi(n,m),v=t.legendHitBoxes,b=function(t,i){switch(e.align){case"start":return n.padding;case"end":return t-i;default:return(t-i+n.padding)/2}},y=t.isHorizontal();d=y?{x:t.left+b(l,u[0]),y:t.top+n.padding,line:0}:{x:t.left+n.padding,y:t.top+b(o,s[0]),line:0},B.rtl.overrideTextDirection(t.ctx,e.textDirection);var x=m+n.padding;B.each(t.legendItems,(function(e,i){var f=c.measureText(e.text).width,g=p+m/2+f,_=d.x,w=d.y;h.setWidth(t.minSize.width),y?i>0&&_+g+n.padding>t.left+t.minSize.width&&(w=d.y+=x,d.line++,_=d.x=t.left+b(l,u[d.line])):i>0&&w+x>t.top+t.minSize.height&&(_=d.x=_+t.columnWidths[d.line]+n.padding,d.line++,w=d.y=t.top+b(o,s[d.line]));var k,M,S,D,C,P,T,O=h.x(_);!function(t,e,i){if(!(isNaN(p)||p<=0)){c.save();var o=Ci(i.lineWidth,r.borderWidth);if(c.fillStyle=Ci(i.fillStyle,a),c.lineCap=Ci(i.lineCap,r.borderCapStyle),c.lineDashOffset=Ci(i.lineDashOffset,r.borderDashOffset),c.lineJoin=Ci(i.lineJoin,r.borderJoinStyle),c.lineWidth=o,c.strokeStyle=Ci(i.strokeStyle,a),c.setLineDash&&c.setLineDash(Ci(i.lineDash,r.borderDash)),n&&n.usePointStyle){var s=p*Math.SQRT2/2,l=h.xPlus(t,p/2),u=e+m/2;B.canvas.drawPoint(c,i.pointStyle,s,l,u,i.rotation)}else c.fillRect(h.leftForLtr(t,p),e,p,m),0!==o&&c.strokeRect(h.leftForLtr(t,p),e,p,m);c.restore()}}(O,w,e),v[i].left=h.leftForLtr(O,v[i].width),v[i].top=w,k=O,M=w,S=e,D=f,C=m/2,P=h.xPlus(k,p+C),T=M+C,c.fillText(S.text,P,T),S.hidden&&(c.beginPath(),c.lineWidth=2,c.moveTo(P,T),c.lineTo(h.xPlus(P,D),T),c.stroke()),y?d.x+=g+n.padding:d.y+=x})),B.rtl.restoreTextDirection(t.ctx,e.textDirection)}},_getLegendItemAt:function(t,e){var n,i,a,r=this;if(t>=r.left&&t<=r.right&&e>=r.top&&e<=r.bottom)for(a=r.legendHitBoxes,n=0;n<a.length;++n)if(t>=(i=a[n]).left&&t<=i.left+i.width&&e>=i.top&&e<=i.top+i.height)return r.legendItems[n];return null},handleEvent:function(t){var e,n=this,i=n.options,a="mouseup"===t.type?"click":t.type;if("mousemove"===a){if(!i.onHover&&!i.onLeave)return}else{if("click"!==a)return;if(!i.onClick)return}e=n._getLegendItemAt(t.x,t.y),"click"===a?e&&i.onClick&&i.onClick.call(n,t.native,e):(i.onLeave&&e!==n._hoveredItem&&(n._hoveredItem&&i.onLeave.call(n,t.native,n._hoveredItem),n._hoveredItem=e),i.onHover&&e&&i.onHover.call(n,t.native,e))}});function Oi(t,e){var n=new Ti({ctx:t.ctx,options:e,chart:t});pe.configure(t,n,e),pe.addBox(t,n),t.legend=n}var Ai={id:"legend",_element:Ti,beforeInit:function(t){var e=t.options.legend;e&&Oi(t,e)},beforeUpdate:function(t){var e=t.options.legend,n=t.legend;e?(B.mergeIf(e,W.global.legend),n?(pe.configure(t,n,e),n.options=e):Oi(t,e)):n&&(pe.removeBox(t,n),delete t.legend)},afterEvent:function(t,e){var n=t.legend;n&&n.handleEvent(e)}},Fi=B.noop;W._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var Ii=X.extend({initialize:function(t){B.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:Fi,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:Fi,beforeSetDimensions:Fi,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:Fi,beforeBuildLabels:Fi,buildLabels:Fi,afterBuildLabels:Fi,beforeFit:Fi,fit:function(){var t,e=this,n=e.options,i=e.minSize={},a=e.isHorizontal();n.display?(t=(B.isArray(n.text)?n.text.length:1)*B.options._parseFont(n).lineHeight+2*n.padding,e.width=i.width=a?e.maxWidth:t,e.height=i.height=a?t:e.maxHeight):e.width=i.width=e.height=i.height=0},afterFit:Fi,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,n=t.options;if(n.display){var i,a,r,o=B.options._parseFont(n),s=o.lineHeight,l=s/2+n.padding,u=0,d=t.top,h=t.left,c=t.bottom,f=t.right;e.fillStyle=B.valueOrDefault(n.fontColor,W.global.defaultFontColor),e.font=o.string,t.isHorizontal()?(a=h+(f-h)/2,r=d+l,i=f-h):(a="left"===n.position?h+l:f-l,r=d+(c-d)/2,i=c-d,u=Math.PI*("left"===n.position?-.5:.5)),e.save(),e.translate(a,r),e.rotate(u),e.textAlign="center",e.textBaseline="middle";var g=n.text;if(B.isArray(g))for(var m=0,p=0;p<g.length;++p)e.fillText(g[p],0,m,i),m+=s;else e.fillText(g,0,0,i);e.restore()}}});function Ni(t,e){var n=new Ii({ctx:t.ctx,options:e,chart:t});pe.configure(t,n,e),pe.addBox(t,n),t.titleBlock=n}var Ri={},Li=Mi,Yi=Ai,Wi={id:"title",_element:Ii,beforeInit:function(t){var e=t.options.title;e&&Ni(t,e)},beforeUpdate:function(t){var e=t.options.title,n=t.titleBlock;e?(B.mergeIf(e,W.global.title),n?(pe.configure(t,n,e),n.options=e):Ni(t,e)):n&&(pe.removeBox(t,n),delete t.titleBlock)}};for(var zi in Ri.filler=Li,Ri.legend=Yi,Ri.title=Wi,nn.helpers=B,function(){function t(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 e(t){return null!=t&&"none"!==t}function n(n,i,a){var r=document.defaultView,o=B._getParentNode(n),s=r.getComputedStyle(n)[i],l=r.getComputedStyle(o)[i],u=e(s),d=e(l),h=Number.POSITIVE_INFINITY;return u||d?Math.min(u?t(s,n,a):h,d?t(l,o,a):h):"none"}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,a=t.length;i<a;++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 a=t[i];if(e(a))return a}},B.findPreviousWhere=function(t,e,n){B.isNullOrUndef(n)&&(n=t.length);for(var i=n-1;i>=0;i--){var a=t[i];if(e(a))return a}},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&&n+e>=t},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:t>0?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,a=Math.sqrt(n*n+i*i),r=Math.atan2(i,n);return r<-.5*Math.PI&&(r+=2*Math.PI),{angle:r,distance:a}},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,a=n/2;return Math.round((e-a)*i)/i+a},B.splineCurve=function(t,e,n,i){var a=t.skip?e:t,r=e,o=n.skip?e:n,s=Math.sqrt(Math.pow(r.x-a.x,2)+Math.pow(r.y-a.y,2)),l=Math.sqrt(Math.pow(o.x-r.x,2)+Math.pow(o.y-r.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:r.x-h*(o.x-a.x),y:r.y-h*(o.y-a.y)},next:{x:r.x+c*(o.x-a.x),y:r.y+c*(o.y-a.y)}}},B.EPSILON=Number.EPSILON||1e-14,B.splineCurveMonotone=function(t){var e,n,i,a,r,o,s,l,u,d=(t||[]).map((function(t){return{model:t._model,deltaK:0,mK:0}})),h=d.length;for(e=0;e<h;++e)if(!(i=d[e]).model.skip){if(n=e>0?d[e-1]:null,(a=e<h-1?d[e+1]:null)&&!a.model.skip){var c=a.model.x-i.model.x;i.deltaK=0!==c?(a.model.y-i.model.y)/c:0}!n||n.model.skip?i.mK=i.deltaK:!a||a.model.skip?i.mK=n.deltaK:this.sign(n.deltaK)!==this.sign(i.deltaK)?i.mK=0:i.mK=(n.deltaK+i.deltaK)/2}for(e=0;e<h-1;++e)i=d[e],a=d[e+1],i.model.skip||a.model.skip||(B.almostEquals(i.deltaK,0,this.EPSILON)?i.mK=a.mK=0:(r=i.mK/i.deltaK,o=a.mK/i.deltaK,(l=Math.pow(r,2)+Math.pow(o,2))<=9||(s=3/Math.sqrt(l),i.mK=r*s*i.deltaK,a.mK=o*s*i.deltaK)));for(e=0;e<h;++e)(i=d[e]).model.skip||(n=e>0?d[e-1]:null,a=e<h-1?d[e+1]:null,n&&!n.model.skip&&(u=(i.model.x-n.model.x)/3,i.model.controlPointPreviousX=i.model.x-u,i.model.controlPointPreviousY=i.model.y-u*i.mK),a&&!a.model.skip&&(u=(a.model.x-i.model.x)/3,i.model.controlPointNextX=i.model.x+u,i.model.controlPointNextY=i.model.y+u*i.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);return(e?i<1.5?1:i<3?2:i<7?5:10:i<=1?1:i<=2?2:i<=5?5:10)*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,i,a=t.originalEvent||t,r=t.target||t.srcElement,o=r.getBoundingClientRect(),s=a.touches;s&&s.length>0?(n=s[0].clientX,i=s[0].clientY):(n=a.clientX,i=a.clientY);var l=parseFloat(B.getStyle(r,"padding-left")),u=parseFloat(B.getStyle(r,"padding-top")),d=parseFloat(B.getStyle(r,"padding-right")),h=parseFloat(B.getStyle(r,"padding-bottom")),c=o.right-o.left-l-d,f=o.bottom-o.top-u-h;return{x:n=Math.round((n-o.left-l)/c*r.width/e.currentDevicePixelRatio),y:i=Math.round((i-o.top-u)/f*r.height/e.currentDevicePixelRatio)}},B.getConstraintWidth=function(t){return n(t,"max-width","clientWidth")},B.getConstraintHeight=function(t){return n(t,"max-height","clientHeight")},B._calculatePadding=function(t,e,n){return(e=B.getStyle(t,e)).indexOf("%")>-1?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),a=B.getConstraintWidth(t);return isNaN(a)?i:Math.min(i,a)},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),a=B.getConstraintHeight(t);return isNaN(a)?i:Math.min(i,a)},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=t.currentDevicePixelRatio=e||"undefined"!=typeof window&&window.devicePixelRatio||1;if(1!==n){var i=t.canvas,a=t.height,r=t.width;i.height=a*n,i.width=r*n,t.ctx.scale(n,n),i.style.height||i.style.width||(i.style.height=a+"px",i.style.width=r+"px")}},B.fontString=function(t,e,n){return e+" "+t+"px "+n},B.longestText=function(t,e,n,i){var a=(i=i||{}).data=i.data||{},r=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(a=i.data={},r=i.garbageCollect=[],i.font=e),t.font=e;var o,s,l,u,d,h=0,c=n.length;for(o=0;o<c;o++)if(null!=(u=n[o])&&!0!==B.isArray(u))h=B.measureText(t,a,r,h,u);else if(B.isArray(u))for(s=0,l=u.length;s<l;s++)null==(d=u[s])||B.isArray(d)||(h=B.measureText(t,a,r,h,d));var f=r.length/2;if(f>n.length){for(o=0;o<f;o++)delete a[r[o]];r.splice(0,f)}return h},B.measureText=function(t,e,n,i,a){var r=e[a];return r||(r=e[a]=t.measureText(a).width,n.push(a)),r>i&&(i=r),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=W.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()}}(),nn._adapters=on,nn.Animation=J,nn.animationService=Q,nn.controllers=Qt,nn.DatasetController=at,nn.defaults=W,nn.Element=X,nn.elements=kt,nn.Interaction=oe,nn.layouts=pe,nn.platform=Ne,nn.plugins=Re,nn.Scale=_n,nn.scaleService=Le,nn.Ticks=sn,nn.Tooltip=qe,nn.helpers.each(gi,(function(t,e){nn.scaleService.registerScaleType(e,t,t._defaults)})),Ri)Ri.hasOwnProperty(zi)&&nn.plugins.register(Ri[zi]);nn.platform.initialize();var Ei=nn;return"undefined"!=typeof window&&(window.Chart=nn),nn.Chart=nn,nn.Legend=Ri.legend._element,nn.Title=Ri.title._element,nn.pluginService=nn.plugins,nn.PluginBase=nn.Element.extend({}),nn.canvasHelpers=nn.helpers.canvas,nn.layoutService=nn.layouts,nn.LinearScaleBase=Cn,nn.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],(function(t){nn[t]=function(e,n){return new nn(e,nn.helpers.merge(n||{},{type:t.charAt(0).toLowerCase()+t.slice(1)}))}})),Ei}(function(){try{return ti}catch(t){}}()),ni=Object.freeze(Object.assign(Object.create(null),a.exports,{[Symbol.toStringTag]:"Module",default:ei}));export{ni as C};
diff --git a/applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/Config.029b666f.js b/applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/Config.029b666f.js
deleted file mode 100644 (file)
index 83a9d08..0000000
+++ /dev/null
@@ -1 +0,0 @@
-var J=Object.defineProperty,q=Object.defineProperties;var F=Object.getOwnPropertyDescriptors;var C=Object.getOwnPropertySymbols;var P=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable;var R=(e,a,l)=>a in e?J(e,a,{enumerable:!0,configurable:!0,writable:!0,value:l}):e[a]=l,u=(e,a)=>{for(var l in a||(a={}))P.call(a,l)&&R(e,l,a[l]);if(C)for(var l of C(a))O.call(a,l)&&R(e,l,a[l]);return e},E=(e,a)=>q(e,F(a));var j=(e,a)=>{var l={};for(var s in e)P.call(e,s)&&a.indexOf(s)<0&&(l[s]=e[s]);if(e!=null&&C)for(var s of C(e))a.indexOf(s)<0&&O.call(e,s)&&(l[s]=e[s]);return l};import{R as m,g as K,r as t,k as W,J as Q,j as X}from"./vendor.38e754a4.js";import{r as Y}from"./logs.4dcb9935.js";import{S}from"./Select.29a5a6ae.js";import{s as A,b as Z,d as T,e as $,u as ee,c as M,h as te,g as B,i as ae,o as ne,j as k,k as le,C as se,l as re,B as oe,n as ce,q as ie}from"./index.ee5bc09a.js";const{useState:pe,useRef:ue,useEffect:me,useCallback:de}=m;function ge(e){return m.createElement("input",u({className:A.input},e))}function xe(l){var s=l,{value:e}=s,a=j(s,["value"]);const[i,r]=pe(e),d=ue(e);me(()=>{d.current!==e&&r(e),d.current=e},[e]);const g=de(b=>r(b.target.value),[r]);return m.createElement("input",u({className:A.input,value:i,onChange:g},a))}const fe="_root_1tdl3_1",Ee="_section_1tdl3_2",he="_wrapSwitch_1tdl3_26",ve="_sep_1tdl3_32",Ce="_label_1tdl3_45";var c={root:fe,section:Ee,wrapSwitch:he,sep:ve,label:Ce};const be="_fieldset_1ghjp_1",ye="_input_1ghjp_9",Se="_cnt_1ghjp_9";var _={fieldset:be,input:ye,cnt:Se};function ke({OptionComponent:e,optionPropsList:a,selectedIndex:l,onChange:s}){const i=K("visually-hidden",_.input),r=d=>{s(d.target.value)};return m.createElement("fieldset",{className:_.fieldset},a.map((d,g)=>m.createElement("label",{key:g},m.createElement("input",{type:"radio",checked:l===g,name:"selection",value:g,"aria-labelledby":"traffic chart type "+g,onChange:r,className:i}),m.createElement("div",{className:_.cnt},m.createElement(e,u({},d))))))}const _e={legend:{display:!1},scales:{xAxes:[{display:!1}],yAxes:[{display:!1}]}},D=[23e3,35e3,46e3,33e3,9e4,68e3,23e3,45e3],we=[184e3,183e3,196e3,182e3,19e4,186e3,182e3,189e3],Ie=D;function Ne({id:e}){const a=Z.read(),l=t.exports.useMemo(()=>({labels:Ie,datasets:[E(u(u({},T),$[e].up),{data:D}),E(u(u({},T),$[e].down),{data:we})]}),[e]),s="chart-"+e;return ee(a,s,l,null,_e),m.createElement("div",{style:{width:100,padding:5}},m.createElement("canvas",{id:s}))}const{useEffect:U,useState:Le,useCallback:x,useRef:Pe,useMemo:Oe}=X,Re=[{id:0},{id:1},{id:2},{id:3}],je=[["debug","Debug"],["warning","Warning"],["info","Info"],["error","Error"],["silent","Silent"]],Ae=[{key:"port",label:"HTTP Proxy Port"},{key:"socks-port",label:"SOCKS5 Proxy Port"},{key:"mixed-port",label:"Mixed Port"},{key:"redir-port",label:"Redir Port"}],Te=[["zh","\u4E2D\u6587"],["en","English"]],$e=[["Global","Global"],["Rule","Rule"],["Direct","Direct"]],Me=e=>({configs:te(e),apiConfig:B(e)}),Be=e=>({selectedChartStyleIndex:ce(e),latencyTestUrl:ie(e),apiConfig:B(e)}),De=M(Be)(Ve);var Fe=M(Me)(Ue);function Ue({dispatch:e,configs:a,apiConfig:l}){return U(()=>{e(ae(l))},[e,l]),t.exports.createElement(De,{configs:a})}function Ve({dispatch:e,configs:a,selectedChartStyleIndex:l,latencyTestUrl:s,apiConfig:i}){const[r,d]=Le(a),g=Pe(a);U(()=>{g.current!==a&&d(a),g.current=a},[a]);const b=x(()=>{e(ne("apiConfig"))},[e]),f=x((n,o)=>{d(E(u({},r),{[n]:o}))},[r]),V=x(n=>{const o="allow-lan",p=n;f(o,p),e(k(i,{"allow-lan":p}))},[i,e,f]),h=x(({name:n,value:o})=>{switch(n){case"mode":case"log-level":f(n,o),e(k(i,{[n]:o})),n==="log-level"&&Y(E(u({},i),{logLevel:o}));break;case"redir-port":case"socks-port":case"mixed-port":case"port":if(o!==""){const p=parseInt(o,10);if(p<0||p>65535)return}f(n,o);break;default:return}},[i,e,f]),z=x(n=>h(n.target),[h]),{selectChartStyleIndex:G,updateAppConfig:w}=le(),I=x(n=>{const o=n.target,{name:p,value:L}=o;switch(p){case"port":case"socks-port":case"mixed-port":case"redir-port":{const y=parseInt(L,10);if(y<0||y>65535)return;e(k(i,{[p]:y}));break}case"latencyTestUrl":{w(p,L);break}default:throw new Error(`unknown input name ${p}`)}},[i,e,w]),H=Oe(()=>{const n=r.mode;return typeof n=="string"&&n[0].toUpperCase()+n.slice(1)},[r.mode]),{t:v,i18n:N}=W();return t.exports.createElement("div",null,t.exports.createElement(se,{title:v("Config")}),t.exports.createElement("div",{className:c.root},Ae.map(n=>r[n.key]!==void 0?t.exports.createElement("div",{key:n.key},t.exports.createElement("div",{className:c.label},n.label),t.exports.createElement(ge,{name:n.key,value:r[n.key],onChange:z,onBlur:I})):null),t.exports.createElement("div",null,t.exports.createElement("div",{className:c.label},"Mode"),t.exports.createElement(S,{options:$e,selected:H,onChange:n=>h({name:"mode",value:n.target.value})})),t.exports.createElement("div",null,t.exports.createElement("div",{className:c.label},"Log Level"),t.exports.createElement(S,{options:je,selected:r["log-level"],onChange:n=>h({name:"log-level",value:n.target.value})})),t.exports.createElement("div",null,t.exports.createElement("div",{className:c.label},"Allow LAN"),t.exports.createElement("div",{className:c.wrapSwitch},t.exports.createElement(re,{name:"allow-lan",checked:r["allow-lan"],onChange:V})))),t.exports.createElement("div",{className:c.sep},t.exports.createElement("div",null)),t.exports.createElement("div",{className:c.section},t.exports.createElement("div",null,t.exports.createElement("div",{className:c.label},v("latency_test_url")),t.exports.createElement(xe,{name:"latencyTestUrl",type:"text",value:s,onBlur:I})),t.exports.createElement("div",null,t.exports.createElement("div",{className:c.label},v("lang")),t.exports.createElement("div",null,t.exports.createElement(S,{options:Te,selected:N.language,onChange:n=>N.changeLanguage(n.target.value)}))),t.exports.createElement("div",null,t.exports.createElement("div",{className:c.label},v("chart_style")),t.exports.createElement(ke,{OptionComponent:Ne,optionPropsList:Re,selectedIndex:l,onChange:G})),t.exports.createElement("div",null,t.exports.createElement("div",{className:c.label},"Action"),t.exports.createElement(oe,{start:t.exports.createElement(Q,{size:16}),label:"Switch backend",onClick:b}))))}export{Fe as default};
@@ -1 +1 @@
-._root_1tdl3_1,._section_1tdl3_2{display:grid;grid-template-columns:repeat(auto-fill,minmax(345px,1fr));max-width:900px;gap:5px}@media screen and (min-width: 30em){._root_1tdl3_1,._section_1tdl3_2{gap:15px}}._root_1tdl3_1,._section_1tdl3_2{padding:6px 15px 10px}@media screen and (min-width: 30em){._root_1tdl3_1,._section_1tdl3_2{padding:10px 40px 15px}}._wrapSwitch_1tdl3_26{height:40px;display:flex;align-items:center}._sep_1tdl3_32{max-width:900px;padding:0 15px}@media screen and (min-width: 30em){._sep_1tdl3_32{padding:0 40px}}._sep_1tdl3_32>div{border-top:1px dashed #373737}._label_1tdl3_45{padding:11px 0}._fieldset_1ghjp_1{margin:0;padding:0;border:0;display:flex;flex-wrap:wrap}._input_1ghjp_9+._cnt_1ghjp_9{border:1px solid transparent;border-radius:8px;cursor:pointer;margin-right:5px;margin-bottom:5px}._input_1ghjp_9:focus+._cnt_1ghjp_9,._input_1ghjp_9:checked+._cnt_1ghjp_9{border-color:#387cec}
+._root_1tdl3_1,._section_1tdl3_2{display:grid;grid-template-columns:repeat(auto-fill,minmax(345px,1fr));max-width:900px;gap:5px}@media screen and (min-width: 30em){._root_1tdl3_1,._section_1tdl3_2{gap:15px}}._root_1tdl3_1,._section_1tdl3_2{padding:6px 15px 10px}@media screen and (min-width: 30em){._root_1tdl3_1,._section_1tdl3_2{padding:10px 40px 15px}}._wrapSwitch_1tdl3_26{height:40px;display:flex;align-items:center}._sep_1tdl3_32{max-width:900px;padding:0 15px}@media screen and (min-width: 30em){._sep_1tdl3_32{padding:0 40px}}._sep_1tdl3_32>div{border-top:1px dashed #373737}._label_1tdl3_45{padding:11px 0}._fieldset_1ghjp_1{margin:0;padding:0;border:0;display:flex;flex-wrap:wrap}._input_1ghjp_9+._cnt_1ghjp_9{border:1px solid transparent;border-radius:8px;cursor:pointer;margin-right:5px;margin-bottom:5px}._input_1ghjp_9:focus+._cnt_1ghjp_9{border-color:#387cec}._input_1ghjp_9:checked+._cnt_1ghjp_9{border-color:#387cec}
diff --git a/applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/Config.c5d3bc7b.js b/applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/Config.c5d3bc7b.js
new file mode 100644 (file)
index 0000000..1bd4c7e
--- /dev/null
@@ -0,0 +1 @@
+var e=Object.defineProperty,t=Object.defineProperties,a=Object.getOwnPropertyDescriptors,r=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable,s=(t,a,r)=>a in t?e(t,a,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[a]=r,o=(e,t)=>{for(var a in t||(t={}))l.call(t,a)&&s(e,a,t[a]);if(r)for(var a of r(t))n.call(t,a)&&s(e,a,t[a]);return e},c=(e,r)=>t(e,a(r));import{R as i,g as p,r as d,k as m,L as u,j as v}from"./vendor.3b6f54f7.js";import{r as f}from"./logs.1fac2d96.js";import{S as g}from"./Select.55100629.js";import{s as x,b as E,d as y,e as b,u as h,c as C,h as _,o as k,i as w,j as N,C as j,k as O,B as P,l as S,g as I,n as L,q as A}from"./index.812b4086.js";const{useState:R,useRef:T,useEffect:U,useCallback:D}=i;function M(e){return i.createElement("input",o({className:x.input},e))}function B(e){var t=e,{value:a}=t,s=((e,t)=>{var a={};for(var s in e)l.call(e,s)&&t.indexOf(s)<0&&(a[s]=e[s]);if(null!=e&&r)for(var s of r(e))t.indexOf(s)<0&&n.call(e,s)&&(a[s]=e[s]);return a})(t,["value"]);const[c,p]=R(a),d=T(a);U((()=>{d.current!==a&&p(a),d.current=a}),[a]);const m=D((e=>p(e.target.value)),[p]);return i.createElement("input",o({className:x.input,value:c,onChange:m},s))}var z="_root_1tdl3_1",G="_section_1tdl3_2",q="_wrapSwitch_1tdl3_26",H="_sep_1tdl3_32",K="_label_1tdl3_45";var W="_fieldset_1ghjp_1",$="_input_1ghjp_9",F="_cnt_1ghjp_9";function J({OptionComponent:e,optionPropsList:t,selectedIndex:a,onChange:r}){const l=p("visually-hidden",$),n=e=>{r(e.target.value)};return i.createElement("fieldset",{className:W},t.map(((t,r)=>i.createElement("label",{key:r},i.createElement("input",{type:"radio",checked:a===r,name:"selection",value:r,"aria-labelledby":"traffic chart type "+r,onChange:n,className:l}),i.createElement("div",{className:F},i.createElement(e,o({},t)))))))}const Q={legend:{display:!1},scales:{xAxes:[{display:!1}],yAxes:[{display:!1}]}},V=[23e3,35e3,46e3,33e3,9e4,68e3,23e3,45e3],X=[184e3,183e3,196e3,182e3,19e4,186e3,182e3,189e3],Y=V;function Z({id:e}){const t=E.read(),a=d.exports.useMemo((()=>({labels:Y,datasets:[c(o(o({},y),b[e].up),{data:V}),c(o(o({},y),b[e].down),{data:X})]})),[e]),r="chart-"+e;return h(t,r,a,null,Q),i.createElement("div",{style:{width:100,padding:5}},i.createElement("canvas",{id:r}))}const{useEffect:ee,useState:te,useCallback:ae,useRef:re,useMemo:le}=v,ne=[{id:0},{id:1},{id:2},{id:3}],se=[["debug","Debug"],["warning","Warning"],["info","Info"],["error","Error"],["silent","Silent"]],oe=[{key:"port",label:"HTTP Proxy Port"},{key:"socks-port",label:"SOCKS5 Proxy Port"},{key:"mixed-port",label:"Mixed Port"},{key:"redir-port",label:"Redir Port"}],ce=[["zh","中文"],["en","English"]],ie=[["Global","Global"],["Rule","Rule"],["Direct","Direct"]],pe=C((e=>({selectedChartStyleIndex:L(e),latencyTestUrl:A(e),apiConfig:I(e)})))((function({dispatch:e,configs:t,selectedChartStyleIndex:a,latencyTestUrl:r,apiConfig:l}){const[n,s]=te(t),i=re(t);ee((()=>{i.current!==t&&s(t),i.current=t}),[t]);const p=ae((()=>{e(k("apiConfig"))}),[e]),v=ae(((e,t)=>{s(c(o({},n),{[e]:t}))}),[n]),x=ae((t=>{const a=t;v("allow-lan",a),e(w(l,{"allow-lan":a}))}),[l,e,v]),E=ae((({name:t,value:a})=>{switch(t){case"mode":case"log-level":v(t,a),e(w(l,{[t]:a})),"log-level"===t&&f(c(o({},l),{logLevel:a}));break;case"redir-port":case"socks-port":case"mixed-port":case"port":if(""!==a){const e=parseInt(a,10);if(e<0||e>65535)return}v(t,a);break;default:return}}),[l,e,v]),y=ae((e=>E(e.target)),[E]),{selectChartStyleIndex:b,updateAppConfig:h}=N(),C=ae((t=>{const a=t.target,{name:r,value:n}=a;switch(r){case"port":case"socks-port":case"mixed-port":case"redir-port":{const t=parseInt(n,10);if(t<0||t>65535)return;e(w(l,{[r]:t}));break}case"latencyTestUrl":h(r,n);break;default:throw new Error(`unknown input name ${r}`)}}),[l,e,h]),_=le((()=>{const e=n.mode;return"string"==typeof e&&e[0].toUpperCase()+e.slice(1)}),[n.mode]),{t:S,i18n:I}=m();return d.exports.createElement("div",null,d.exports.createElement(j,{title:S("Config")}),d.exports.createElement("div",{className:z},oe.map((e=>void 0!==n[e.key]?d.exports.createElement("div",{key:e.key},d.exports.createElement("div",{className:K},e.label),d.exports.createElement(M,{name:e.key,value:n[e.key],onChange:y,onBlur:C})):null)),d.exports.createElement("div",null,d.exports.createElement("div",{className:K},"Mode"),d.exports.createElement(g,{options:ie,selected:_,onChange:e=>E({name:"mode",value:e.target.value})})),d.exports.createElement("div",null,d.exports.createElement("div",{className:K},"Log Level"),d.exports.createElement(g,{options:se,selected:n["log-level"],onChange:e=>E({name:"log-level",value:e.target.value})})),d.exports.createElement("div",null,d.exports.createElement("div",{className:K},"Allow LAN"),d.exports.createElement("div",{className:q},d.exports.createElement(O,{name:"allow-lan",checked:n["allow-lan"],onChange:x})))),d.exports.createElement("div",{className:H},d.exports.createElement("div",null)),d.exports.createElement("div",{className:G},d.exports.createElement("div",null,d.exports.createElement("div",{className:K},S("latency_test_url")),d.exports.createElement(B,{name:"latencyTestUrl",type:"text",value:r,onBlur:C})),d.exports.createElement("div",null,d.exports.createElement("div",{className:K},S("lang")),d.exports.createElement("div",null,d.exports.createElement(g,{options:ce,selected:I.language,onChange:e=>I.changeLanguage(e.target.value)}))),d.exports.createElement("div",null,d.exports.createElement("div",{className:K},S("chart_style")),d.exports.createElement(J,{OptionComponent:Z,optionPropsList:ne,selectedIndex:a,onChange:b})),d.exports.createElement("div",null,d.exports.createElement("div",{className:K},"Action"),d.exports.createElement(P,{start:d.exports.createElement(u,{size:16}),label:"Switch backend",onClick:p}))))}));var de=C((e=>({configs:S(e),apiConfig:I(e)})))((function({dispatch:e,configs:t,apiConfig:a}){return ee((()=>{e(_(a))}),[e,a]),d.exports.createElement(pe,{configs:t})}));export default de;
@@ -1 +1 @@
-.react-tabs{-webkit-tap-highlight-color:transparent}.react-tabs__tab-list{margin:0 0 10px;padding:0 30px}.react-tabs__tab{display:inline-flex;align-items:center;border:1px solid transparent;border-radius:5px;bottom:-1px;position:relative;list-style:none;padding:6px 10px;cursor:pointer;font-size:1.2em;opacity:.5}.react-tabs__tab--selected{opacity:1}.react-tabs__tab--disabled{color:GrayText;cursor:default}.react-tabs__tab:focus{border-color:#0188fe;outline:none}.react-tabs__tab:focus:after{content:"";position:absolute}.react-tabs__tab-panel{display:none}.react-tabs__tab-panel--selected{display:block}._placeHolder_12xws_1{height:100%;display:flex;align-items:center;justify-content:center;color:var(--color-background);opacity:.1}._connQty_12xws_10{font-family:var(--font-normal);font-size:.75em;margin-left:3px;padding:2px 7px;display:inline-flex;justify-content:center;align-items:center;background-color:var(--bg-near-transparent);border-radius:30px}._inputWrapper_12xws_22{margin:0 30px;width:100%;max-width:350px;justify-self:flex-end}._input_12xws_22{-webkit-appearance:none;background-color:var(--color-input-bg);background-image:none;border-radius:18px;border:1px solid var(--color-input-border);box-sizing:border-box;color:#c1c1c1;display:inline-block;font-size:inherit;height:36px;outline:none;padding:0 15px;transition:border-color .2s cubic-bezier(.645,.045,.355,1);width:100%}._tr_198pq_1{display:grid;grid-template-columns:repeat(11,minmax(-webkit-max-content,auto));grid-template-columns:repeat(11,minmax(max-content,auto))}._th_198pq_7{padding:8px 10px;height:50px;background:var(--color-background);position:-webkit-sticky;position:sticky;top:0;font-size:.8em;text-align:center;-webkit-user-select:none;user-select:none;display:flex;align-items:center;justify-content:space-between}._th_198pq_7:hover{color:var(--color-text-highlight)}._td_198pq_24{padding:8px 13px;font-size:.9em;font-family:var(--font-normal)}._td_198pq_24._odd_198pq_30{background:var(--color-row-odd)}._du_198pq_35{text-align:right}._sortIconContainer_198pq_39{display:inline-flex;margin-left:10px;width:16px;height:16px}._rotate180_198pq_46{transform:rotate(180deg)}._overlay_148w6_1{background-color:#0009}._cnt_148w6_5{background-color:var(--bg-modal);color:var(--color-text);max-width:300px;line-height:1.4;transform:translate(-50%,-50%) scale(1.2);opacity:.6;transition:all .3s ease}._afterOpen_148w6_15{opacity:1;transform:translate(-50%,-50%) scale(1)}._btngrp_148w6_20{display:flex;align-items:center;justify-content:center;margin-top:30px}
+.react-tabs{-webkit-tap-highlight-color:transparent}.react-tabs__tab-list{margin:0 0 10px;padding:0 30px}.react-tabs__tab{display:inline-flex;align-items:center;border:1px solid transparent;border-radius:5px;bottom:-1px;position:relative;list-style:none;padding:6px 10px;cursor:pointer;font-size:1.2em;opacity:.5}.react-tabs__tab--selected{opacity:1}.react-tabs__tab--disabled{color:GrayText;cursor:default}.react-tabs__tab:focus{border-color:#0188fe;outline:none}.react-tabs__tab:focus:after{content:"";position:absolute}.react-tabs__tab-panel{display:none}.react-tabs__tab-panel--selected{display:block}._placeHolder_12xws_1{height:100%;display:flex;align-items:center;justify-content:center;color:var(--color-background);opacity:.1}._connQty_12xws_10{font-family:var(--font-normal);font-size:.75em;margin-left:3px;padding:2px 7px;display:inline-flex;justify-content:center;align-items:center;background-color:var(--bg-near-transparent);border-radius:30px}._inputWrapper_12xws_22{margin:0 30px;width:100%;max-width:350px;justify-self:flex-end}._input_12xws_22{-webkit-appearance:none;background-color:var(--color-input-bg);background-image:none;border-radius:18px;border:1px solid var(--color-input-border);box-sizing:border-box;color:#c1c1c1;display:inline-block;font-size:inherit;height:36px;outline:none;padding:0 15px;transition:border-color .2s cubic-bezier(.645,.045,.355,1);width:100%}._tr_198pq_1{display:grid;grid-template-columns:repeat(11,minmax(-webkit-max-content,auto));grid-template-columns:repeat(11,minmax(max-content,auto))}._th_198pq_7{padding:8px 10px;height:50px;background:var(--color-background);position:sticky;top:0;font-size:.8em;text-align:center;-webkit-user-select:none;user-select:none;display:flex;align-items:center;justify-content:space-between}._th_198pq_7:hover{color:var(--color-text-highlight)}._td_198pq_24{padding:8px 13px;font-size:.9em;font-family:var(--font-normal)}._td_198pq_24._odd_198pq_30{background:var(--color-row-odd)}._du_198pq_35{text-align:right}._sortIconContainer_198pq_39{display:inline-flex;margin-left:10px;width:16px;height:16px}._rotate180_198pq_46{-webkit-transform:rotate(180deg);transform:rotate(180deg)}._overlay_148w6_1{background-color:#0009}._cnt_148w6_5{background-color:var(--bg-modal);color:var(--color-text);max-width:300px;line-height:1.4;-webkit-transform:translate(-50%,-50%) scale(1.2);transform:translate(-50%,-50%) scale(1.2);opacity:.6;transition:all .3s ease}._afterOpen_148w6_15{opacity:1;-webkit-transform:translate(-50%,-50%) scale(1);transform:translate(-50%,-50%) scale(1)}._btngrp_148w6_20{display:flex;align-items:center;justify-content:center;margin-top:30px}
diff --git a/applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/Connections.52bc9670.js b/applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/Connections.52bc9670.js
deleted file mode 100644 (file)
index 86c3939..0000000
+++ /dev/null
@@ -1 +0,0 @@
-var po=Object.defineProperty,go=Object.defineProperties;var vo=Object.getOwnPropertyDescriptors;var bn=Object.getOwnPropertySymbols;var mo=Object.prototype.hasOwnProperty,ho=Object.prototype.propertyIsEnumerable;var wn=(d,p,l)=>p in d?po(d,p,{enumerable:!0,configurable:!0,writable:!0,value:l}):d[p]=l,xe=(d,p)=>{for(var l in p||(p={}))mo.call(p,l)&&wn(d,l,p[l]);if(bn)for(var l of bn(p))ho.call(p,l)&&wn(d,l,p[l]);return d},Te=(d,p)=>go(d,vo(p));import{r as fe,R as _,g as Ce,A as yo,C as bo,M as wo,k as Ro,P as Co,D as So,I as Po}from"./vendor.38e754a4.js";import{p as Rn,m as Cn,B as Sn,c as xo,a as Eo,f as Io,C as Bo,S as To,g as Fo}from"./index.ee5bc09a.js";import{u as _o}from"./useRemainingViewPortHeight.7baef998.js";import{f as Oo}from"./index.9233837d.js";import{F as Ao,p as Go,A as No}from"./Fab.4dc9cb99.js";function at(d){return function(p){return!!p.type&&p.type.tabsRole===d}}var De=at("Tab"),it=at("TabList"),$e=at("TabPanel");function st(){return st=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var l=arguments[p];for(var s in l)Object.prototype.hasOwnProperty.call(l,s)&&(d[s]=l[s])}return d},st.apply(this,arguments)}function ko(d){return De(d)||it(d)||$e(d)}function ut(d,p){return fe.exports.Children.map(d,function(l){return l===null?null:ko(l)?p(l):l.props&&l.props.children&&typeof l.props.children=="object"?fe.exports.cloneElement(l,st({},l.props,{children:ut(l.props.children,p)})):l})}function lt(d,p){return fe.exports.Children.forEach(d,function(l){l!==null&&(De(l)||$e(l)?p(l):l.props&&l.props.children&&typeof l.props.children=="object"&&(it(l)&&p(l),lt(l.props.children,p)))})}var Ho=0;function Pn(){return"react-tabs-"+Ho++}function xn(d){var p=0;return lt(d,function(l){De(l)&&p++}),p}function jo(d){var p=0;return lt(d,function(l){$e(l)&&p++}),p}var Wo=["children","className","disabledTabClassName","domRef","focus","forceRenderTabPanel","onSelect","selectedIndex","selectedTabClassName","selectedTabPanelClassName","environment","disableUpDownKeys"];function ct(){return ct=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var l=arguments[p];for(var s in l)Object.prototype.hasOwnProperty.call(l,s)&&(d[s]=l[s])}return d},ct.apply(this,arguments)}function zo(d,p){if(d==null)return{};var l={},s=Object.keys(d),v,y;for(y=0;y<s.length;y++)v=s[y],!(p.indexOf(v)>=0)&&(l[v]=d[v]);return l}function Mo(d,p){d.prototype=Object.create(p.prototype),d.prototype.constructor=d,dt(d,p)}function dt(d,p){return dt=Object.setPrototypeOf||function(s,v){return s.__proto__=v,s},dt(d,p)}function En(d){return d&&"getAttribute"in d}function In(d){return En(d)&&d.getAttribute("data-rttab")}function Se(d){return En(d)&&d.getAttribute("aria-disabled")==="true"}var Ve;function Lo(d){var p=d||(typeof window!="undefined"?window:void 0);try{Ve=!!(typeof p!="undefined"&&p.document&&p.document.activeElement)}catch{Ve=!1}}var ft=function(d){Mo(p,d);function p(){for(var s,v=arguments.length,y=new Array(v),u=0;u<v;u++)y[u]=arguments[u];return s=d.call.apply(d,[this].concat(y))||this,s.tabNodes=[],s.handleKeyDown=function(B){var M=s.props,c=M.direction,X=M.disableUpDownKeys;if(s.isTabFromContainer(B.target)){var q=s.props.selectedIndex,Q=!1,ee=!1;(B.keyCode===32||B.keyCode===13)&&(Q=!0,ee=!1,s.handleClick(B)),B.keyCode===37||!X&&B.keyCode===38?(c==="rtl"?q=s.getNextTab(q):q=s.getPrevTab(q),Q=!0,ee=!0):B.keyCode===39||!X&&B.keyCode===40?(c==="rtl"?q=s.getPrevTab(q):q=s.getNextTab(q),Q=!0,ee=!0):B.keyCode===35?(q=s.getLastTab(),Q=!0,ee=!0):B.keyCode===36&&(q=s.getFirstTab(),Q=!0,ee=!0),Q&&B.preventDefault(),ee&&s.setSelected(q,B)}},s.handleClick=function(B){var M=B.target;do if(s.isTabFromContainer(M)){if(Se(M))return;var c=[].slice.call(M.parentNode.children).filter(In).indexOf(M);s.setSelected(c,B);return}while((M=M.parentNode)!=null)},s}var l=p.prototype;return l.setSelected=function(v,y){if(!(v<0||v>=this.getTabsCount())){var u=this.props,B=u.onSelect,M=u.selectedIndex;B(v,M,y)}},l.getNextTab=function(v){for(var y=this.getTabsCount(),u=v+1;u<y;u++)if(!Se(this.getTab(u)))return u;for(var B=0;B<v;B++)if(!Se(this.getTab(B)))return B;return v},l.getPrevTab=function(v){for(var y=v;y--;)if(!Se(this.getTab(y)))return y;for(y=this.getTabsCount();y-- >v;)if(!Se(this.getTab(y)))return y;return v},l.getFirstTab=function(){for(var v=this.getTabsCount(),y=0;y<v;y++)if(!Se(this.getTab(y)))return y;return null},l.getLastTab=function(){for(var v=this.getTabsCount();v--;)if(!Se(this.getTab(v)))return v;return null},l.getTabsCount=function(){var v=this.props.children;return xn(v)},l.getPanelsCount=function(){var v=this.props.children;return jo(v)},l.getTab=function(v){return this.tabNodes["tabs-"+v]},l.getChildren=function(){var v=this,y=0,u=this.props,B=u.children,M=u.disabledTabClassName,c=u.focus,X=u.forceRenderTabPanel,q=u.selectedIndex,Q=u.selectedTabClassName,ee=u.selectedTabPanelClassName,V=u.environment;this.tabIds=this.tabIds||[],this.panelIds=this.panelIds||[];for(var J=this.tabIds.length-this.getTabsCount();J++<0;)this.tabIds.push(Pn()),this.panelIds.push(Pn());return ut(B,function(ne){var oe=ne;if(it(ne)){var Z=0,W=!1;Ve==null&&Lo(V),Ve&&(W=_.Children.toArray(ne.props.children).filter(De).some(function(re,ce){var pe=V||(typeof window!="undefined"?window:void 0);return pe&&pe.document.activeElement===v.getTab(ce)})),oe=fe.exports.cloneElement(ne,{children:ut(ne.props.children,function(re){var ce="tabs-"+Z,pe=q===Z,ye={tabRef:function(Re){v.tabNodes[ce]=Re},id:v.tabIds[Z],panelId:v.panelIds[Z],selected:pe,focus:pe&&(c||W)};return Q&&(ye.selectedClassName=Q),M&&(ye.disabledClassName=M),Z++,fe.exports.cloneElement(re,ye)})})}else if($e(ne)){var me={id:v.panelIds[y],tabId:v.tabIds[y],selected:q===y};X&&(me.forceRender=X),ee&&(me.selectedClassName=ee),y++,oe=fe.exports.cloneElement(ne,me)}return oe})},l.isTabFromContainer=function(v){if(!In(v))return!1;var y=v.parentElement;do{if(y===this.node)return!0;if(y.getAttribute("data-rttabs"))break;y=y.parentElement}while(y);return!1},l.render=function(){var v=this,y=this.props;y.children;var u=y.className;y.disabledTabClassName;var B=y.domRef;y.focus,y.forceRenderTabPanel,y.onSelect,y.selectedIndex,y.selectedTabClassName,y.selectedTabPanelClassName,y.environment,y.disableUpDownKeys;var M=zo(y,Wo);return _.createElement("div",ct({},M,{className:Ce(u),onClick:this.handleClick,onKeyDown:this.handleKeyDown,ref:function(X){v.node=X,B&&B(X)},"data-rttabs":!0}),this.getChildren())},p}(fe.exports.Component);ft.defaultProps={className:"react-tabs",focus:!1};ft.propTypes={};var Do=["children","defaultIndex","defaultFocus"];function $o(d,p){if(d==null)return{};var l={},s=Object.keys(d),v,y;for(y=0;y<s.length;y++)v=s[y],!(p.indexOf(v)>=0)&&(l[v]=d[v]);return l}function Vo(d,p){d.prototype=Object.create(p.prototype),d.prototype.constructor=d,pt(d,p)}function pt(d,p){return pt=Object.setPrototypeOf||function(s,v){return s.__proto__=v,s},pt(d,p)}var Ko=0,gt=1,Ke=function(d){Vo(p,d);function p(s){var v;return v=d.call(this,s)||this,v.handleSelected=function(y,u,B){var M=v.props.onSelect,c=v.state.mode;if(!(typeof M=="function"&&M(y,u,B)===!1)){var X={focus:B.type==="keydown"};c===gt&&(X.selectedIndex=y),v.setState(X)}},v.state=p.copyPropsToState(v.props,{},s.defaultFocus),v}p.getDerivedStateFromProps=function(v,y){return p.copyPropsToState(v,y)},p.getModeFromProps=function(v){return v.selectedIndex===null?gt:Ko},p.copyPropsToState=function(v,y,u){u===void 0&&(u=!1);var B={focus:u,mode:p.getModeFromProps(v)};if(B.mode===gt){var M=Math.max(0,xn(v.children)-1),c=null;y.selectedIndex!=null?c=Math.min(y.selectedIndex,M):c=v.defaultIndex||0,B.selectedIndex=c}return B};var l=p.prototype;return l.render=function(){var v=this.props,y=v.children;v.defaultIndex,v.defaultFocus;var u=$o(v,Do),B=this.state,M=B.focus,c=B.selectedIndex;return u.focus=M,u.onSelect=this.handleSelected,c!=null&&(u.selectedIndex=c),_.createElement(ft,u,y)},p}(fe.exports.Component);Ke.defaultProps={defaultFocus:!1,forceRenderTabPanel:!1,selectedIndex:null,defaultIndex:null,environment:null,disableUpDownKeys:!1};Ke.propTypes={};Ke.tabsRole="Tabs";var Uo=["children","className"];function vt(){return vt=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var l=arguments[p];for(var s in l)Object.prototype.hasOwnProperty.call(l,s)&&(d[s]=l[s])}return d},vt.apply(this,arguments)}function qo(d,p){if(d==null)return{};var l={},s=Object.keys(d),v,y;for(y=0;y<s.length;y++)v=s[y],!(p.indexOf(v)>=0)&&(l[v]=d[v]);return l}function Xo(d,p){d.prototype=Object.create(p.prototype),d.prototype.constructor=d,mt(d,p)}function mt(d,p){return mt=Object.setPrototypeOf||function(s,v){return s.__proto__=v,s},mt(d,p)}var Ue=function(d){Xo(p,d);function p(){return d.apply(this,arguments)||this}var l=p.prototype;return l.render=function(){var v=this.props,y=v.children,u=v.className,B=qo(v,Uo);return _.createElement("ul",vt({},B,{className:Ce(u),role:"tablist"}),y)},p}(fe.exports.Component);Ue.defaultProps={className:"react-tabs__tab-list"};Ue.propTypes={};Ue.tabsRole="TabList";var Qo=["children","className","disabled","disabledClassName","focus","id","panelId","selected","selectedClassName","tabIndex","tabRef"];function ht(){return ht=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var l=arguments[p];for(var s in l)Object.prototype.hasOwnProperty.call(l,s)&&(d[s]=l[s])}return d},ht.apply(this,arguments)}function Jo(d,p){if(d==null)return{};var l={},s=Object.keys(d),v,y;for(y=0;y<s.length;y++)v=s[y],!(p.indexOf(v)>=0)&&(l[v]=d[v]);return l}function Yo(d,p){d.prototype=Object.create(p.prototype),d.prototype.constructor=d,yt(d,p)}function yt(d,p){return yt=Object.setPrototypeOf||function(s,v){return s.__proto__=v,s},yt(d,p)}var bt="react-tabs__tab",Fe=function(d){Yo(p,d);function p(){return d.apply(this,arguments)||this}var l=p.prototype;return l.componentDidMount=function(){this.checkFocus()},l.componentDidUpdate=function(){this.checkFocus()},l.checkFocus=function(){var v=this.props,y=v.selected,u=v.focus;y&&u&&this.node.focus()},l.render=function(){var v,y=this,u=this.props,B=u.children,M=u.className,c=u.disabled,X=u.disabledClassName;u.focus;var q=u.id,Q=u.panelId,ee=u.selected,V=u.selectedClassName,J=u.tabIndex,ne=u.tabRef,oe=Jo(u,Qo);return _.createElement("li",ht({},oe,{className:Ce(M,(v={},v[V]=ee,v[X]=c,v)),ref:function(W){y.node=W,ne&&ne(W)},role:"tab",id:q,"aria-selected":ee?"true":"false","aria-disabled":c?"true":"false","aria-controls":Q,tabIndex:J||(ee?"0":null),"data-rttab":!0}),B)},p}(fe.exports.Component);Fe.defaultProps={className:bt,disabledClassName:bt+"--disabled",focus:!1,id:null,panelId:null,selected:!1,selectedClassName:bt+"--selected"};Fe.propTypes={};Fe.tabsRole="Tab";var Zo=["children","className","forceRender","id","selected","selectedClassName","tabId"];function wt(){return wt=Object.assign||function(d){for(var p=1;p<arguments.length;p++){var l=arguments[p];for(var s in l)Object.prototype.hasOwnProperty.call(l,s)&&(d[s]=l[s])}return d},wt.apply(this,arguments)}function ea(d,p){if(d==null)return{};var l={},s=Object.keys(d),v,y;for(y=0;y<s.length;y++)v=s[y],!(p.indexOf(v)>=0)&&(l[v]=d[v]);return l}function ta(d,p){d.prototype=Object.create(p.prototype),d.prototype.constructor=d,Rt(d,p)}function Rt(d,p){return Rt=Object.setPrototypeOf||function(s,v){return s.__proto__=v,s},Rt(d,p)}var Bn="react-tabs__tab-panel",_e=function(d){ta(p,d);function p(){return d.apply(this,arguments)||this}var l=p.prototype;return l.render=function(){var v,y=this.props,u=y.children,B=y.className,M=y.forceRender,c=y.id,X=y.selected,q=y.selectedClassName,Q=y.tabId,ee=ea(y,Zo);return _.createElement("div",wt({},ee,{className:Ce(B,(v={},v[q]=X,v)),role:"tabpanel",id:c,"aria-labelledby":Q}),M||X?u:null)},p}(fe.exports.Component);_e.defaultProps={className:Bn,forceRender:!1,selectedClassName:Bn+"--selected"};_e.propTypes={};_e.tabsRole="TabPanel";const na="_placeHolder_12xws_1",ra="_connQty_12xws_10",oa="_inputWrapper_12xws_22",aa="_input_12xws_22";var Oe={placeHolder:na,connQty:ra,inputWrapper:oa,input:aa},Ct={exports:{}},St={exports:{}};(function(d,p){(function(l,s){s(p,fe.exports)})(yo,function(l,s){function v(e,t,n,r,a,o,i){try{var f=e[o](i),g=f.value}catch(m){return void n(m)}f.done?t(g):Promise.resolve(g).then(r,a)}function y(e){return function(){var t=this,n=arguments;return new Promise(function(r,a){var o=e.apply(t,n);function i(g){v(o,r,a,i,f,"next",g)}function f(g){v(o,r,a,i,f,"throw",g)}i(void 0)})}}function u(){return(u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function B(e,t){if(e==null)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}function M(e){var t=function(n,r){if(typeof n!="object"||n===null)return n;var a=n[Symbol.toPrimitive];if(a!==void 0){var o=a.call(n,r||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(n)}(e,"string");return typeof t=="symbol"?t:String(t)}s=s&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s;var c={init:"init"},X=function(e){var t=e.value;return t===void 0?"":t},q=function(){return s.createElement(s.Fragment,null,"\xA0")},Q={Cell:X,width:150,minWidth:0,maxWidth:Number.MAX_SAFE_INTEGER};function ee(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce(function(r,a){var o=a.style,i=a.className;return r=u({},r,{},B(a,["style","className"])),o&&(r.style=r.style?u({},r.style||{},{},o||{}):o),i&&(r.className=r.className?r.className+" "+i:i),r.className===""&&delete r.className,r},{})}var V=function(e,t){return t===void 0&&(t={}),function(n){return n===void 0&&(n={}),[].concat(e,[n]).reduce(function(r,a){return function o(i,f,g){return typeof f=="function"?o({},f(i,g)):Array.isArray(f)?ee.apply(void 0,[i].concat(f)):ee(i,f)}(r,a,u({},t,{userProps:n}))},{})}},J=function(e,t,n,r){return n===void 0&&(n={}),e.reduce(function(a,o){return o(a,n)},t)},ne=function(e,t,n){return n===void 0&&(n={}),e.forEach(function(r){r(t,n)})};function oe(e,t,n,r){e.findIndex(function(a){return a.pluginName===n}),t.forEach(function(a){e.findIndex(function(o){return o.pluginName===a})})}function Z(e,t){return typeof e=="function"?e(t):e}function W(e){var t=s.useRef();return t.current=e,s.useCallback(function(){return t.current},[])}var me=typeof document!="undefined"?s.useLayoutEffect:s.useEffect;function re(e,t){var n=s.useRef(!1);me(function(){n.current&&e(),n.current=!0},t)}function ce(e,t,n){return n===void 0&&(n={}),function(r,a){a===void 0&&(a={});var o=typeof r=="string"?t[r]:r;if(o===void 0)throw console.info(t),new Error("Renderer Error \u261D\uFE0F");return pe(o,u({},e,{column:t},n,{},a))}}function pe(e,t){return function(r){return typeof r=="function"&&(a=Object.getPrototypeOf(r)).prototype&&a.prototype.isReactComponent;var a}(n=e)||typeof n=="function"||function(r){return typeof r=="object"&&typeof r.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(r.$$typeof.description)}(n)?s.createElement(e,t):e;var n}function ye(e,t,n){return n===void 0&&(n=0),e.map(function(r){return Re(r=u({},r,{parent:t,depth:n})),r.columns&&(r.columns=ye(r.columns,r,n+1)),r})}function ge(e){return Et(e,"columns")}function Re(e){var t=e.id,n=e.accessor,r=e.Header;if(typeof n=="string"){t=t||n;var a=n.split(".");n=function(o){return function(i,f,g){if(!f)return i;var m,C=typeof f=="function"?f:JSON.stringify(f),w=ke.get(C)||function(){var R=function(h){return function b(P,S){if(S===void 0&&(S=[]),Array.isArray(P))for(var I=0;I<P.length;I+=1)b(P[I],S);else S.push(P);return S}(h).map(function(b){return String(b).replace(".","_")}).join(".").replace(An,".").replace(Gn,"").split(".")}(f);return ke.set(C,R),R}();try{m=w.reduce(function(R,h){return R[h]},i)}catch{}return m!==void 0?m:g}(o,a)}}if(!t&&typeof r=="string"&&r&&(t=r),!t&&e.columns)throw console.error(e),new Error('A column ID (or unique "Header" value) is required!');if(!t)throw console.error(e),new Error("A column ID (or string accessor) is required!");return Object.assign(e,{id:t,accessor:n}),e}function he(e,t){if(!t)throw new Error;return Object.assign(e,u({Header:q,Footer:q},Q,{},t,{},e)),Object.assign(e,{originalWidth:e.width}),e}function Pt(e,t,n){n===void 0&&(n=function(){return{}});for(var r=[],a=e,o=0,i=function(){return o++},f=function(){var g={headers:[]},m=[],C=a.some(function(w){return w.parent});a.forEach(function(w){var R,h=[].concat(m).reverse()[0];C&&(w.parent?R=u({},w.parent,{originalId:w.parent.id,id:w.parent.id+"_"+i(),headers:[w]},n(w)):R=he(u({originalId:w.id+"_placeholder",id:w.id+"_placeholder_"+i(),placeholderOf:w,headers:[w]},n(w)),t),h&&h.originalId===R.originalId?h.headers.push(w):m.push(R)),g.headers.push(w)}),r.push(g),a=m};a.length;)f();return r.reverse()}var ke=new Map;function ve(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0;r<t.length;r+=1)if(t[r]!==void 0)return t[r]}function xt(e){if(typeof e=="function")return e}function Et(e,t){var n=[];return function r(a){a.forEach(function(o){o[t]?r(o[t]):n.push(o)})}(e),n}function It(e,t){var n=t.manualExpandedKey,r=t.expanded,a=t.expandSubRows,o=a===void 0||a,i=[];return e.forEach(function(f){return function g(m,C){C===void 0&&(C=!0),m.isExpanded=m.original&&m.original[n]||r[m.id],m.canExpand=m.subRows&&!!m.subRows.length,C&&i.push(m),m.subRows&&m.subRows.length&&m.isExpanded&&m.subRows.forEach(function(w){return g(w,o)})}(f)}),i}function Ee(e,t,n){return xt(e)||t[e]||n[e]||n.text}function Xe(e,t,n){return e?e(t,n):t===void 0}function He(){throw new Error("React-Table: You have not called prepareRow(row) one or more rows you are attempting to render.")}var Qe=null,An=/\[/g,Gn=/\]/g,Nn=function(e){return u({role:"table"},e)},kn=function(e){return u({role:"rowgroup"},e)},Hn=function(e,t){var n=t.column;return u({key:"header_"+n.id,colSpan:n.totalVisibleHeaderCount,role:"columnheader"},e)},jn=function(e,t){var n=t.column;return u({key:"footer_"+n.id,colSpan:n.totalVisibleHeaderCount},e)},Wn=function(e,t){return u({key:"headerGroup_"+t.index,role:"row"},e)},zn=function(e,t){return u({key:"footerGroup_"+t.index},e)},Mn=function(e,t){return u({key:"row_"+t.row.id,role:"row"},e)},Ln=function(e,t){var n=t.cell;return u({key:"cell_"+n.row.id+"_"+n.column.id,role:"cell"},e)};function Dn(){return{useOptions:[],stateReducers:[],useControlledState:[],columns:[],columnsDeps:[],allColumns:[],allColumnsDeps:[],accessValue:[],materializedColumns:[],materializedColumnsDeps:[],useInstanceAfterData:[],visibleColumns:[],visibleColumnsDeps:[],headerGroups:[],headerGroupsDeps:[],useInstanceBeforeDimensions:[],useInstance:[],prepareRow:[],getTableProps:[Nn],getTableBodyProps:[kn],getHeaderGroupProps:[Wn],getFooterGroupProps:[zn],getHeaderProps:[Hn],getFooterProps:[jn],getRowProps:[Mn],getCellProps:[Ln],useFinalInstance:[]}}c.resetHiddenColumns="resetHiddenColumns",c.toggleHideColumn="toggleHideColumn",c.setHiddenColumns="setHiddenColumns",c.toggleHideAllColumns="toggleHideAllColumns";var Bt=function(e){e.getToggleHiddenProps=[$n],e.getToggleHideAllColumnsProps=[Vn],e.stateReducers.push(Kn),e.useInstanceBeforeDimensions.push(Un),e.headerGroupsDeps.push(function(t,n){var r=n.instance;return[].concat(t,[r.state.hiddenColumns])}),e.useInstance.push(qn)};Bt.pluginName="useColumnVisibility";var $n=function(e,t){var n=t.column;return[e,{onChange:function(r){n.toggleHidden(!r.target.checked)},style:{cursor:"pointer"},checked:n.isVisible,title:"Toggle Column Visible"}]},Vn=function(e,t){var n=t.instance;return[e,{onChange:function(r){n.toggleHideAllColumns(!r.target.checked)},style:{cursor:"pointer"},checked:!n.allColumnsHidden&&!n.state.hiddenColumns.length,title:"Toggle All Columns Hidden",indeterminate:!n.allColumnsHidden&&n.state.hiddenColumns.length}]};function Kn(e,t,n,r){if(t.type===c.init)return u({hiddenColumns:[]},e);if(t.type===c.resetHiddenColumns)return u({},e,{hiddenColumns:r.initialState.hiddenColumns||[]});if(t.type===c.toggleHideColumn){var a=(t.value!==void 0?t.value:!e.hiddenColumns.includes(t.columnId))?[].concat(e.hiddenColumns,[t.columnId]):e.hiddenColumns.filter(function(o){return o!==t.columnId});return u({},e,{hiddenColumns:a})}return t.type===c.setHiddenColumns?u({},e,{hiddenColumns:Z(t.value,e.hiddenColumns)}):t.type===c.toggleHideAllColumns?u({},e,{hiddenColumns:(t.value!==void 0?t.value:!e.hiddenColumns.length)?r.allColumns.map(function(o){return o.id}):[]}):void 0}function Un(e){var t=e.headers,n=e.state.hiddenColumns;s.useRef(!1).current;var r=0;t.forEach(function(a){return r+=function o(i,f){i.isVisible=f&&!n.includes(i.id);var g=0;return i.headers&&i.headers.length?i.headers.forEach(function(m){return g+=o(m,i.isVisible)}):g=i.isVisible?1:0,i.totalVisibleHeaderCount=g,g}(a,!0)})}function qn(e){var t=e.columns,n=e.flatHeaders,r=e.dispatch,a=e.allColumns,o=e.getHooks,i=e.state.hiddenColumns,f=e.autoResetHiddenColumns,g=f===void 0||f,m=W(e),C=a.length===i.length,w=s.useCallback(function(S,I){return r({type:c.toggleHideColumn,columnId:S,value:I})},[r]),R=s.useCallback(function(S){return r({type:c.setHiddenColumns,value:S})},[r]),h=s.useCallback(function(S){return r({type:c.toggleHideAllColumns,value:S})},[r]),b=V(o().getToggleHideAllColumnsProps,{instance:m()});n.forEach(function(S){S.toggleHidden=function(I){r({type:c.toggleHideColumn,columnId:S.id,value:I})},S.getToggleHiddenProps=V(o().getToggleHiddenProps,{instance:m(),column:S})});var P=W(g);re(function(){P()&&r({type:c.resetHiddenColumns})},[r,t]),Object.assign(e,{allColumnsHidden:C,toggleHideColumn:w,setHiddenColumns:R,toggleHideAllColumns:h,getToggleHideAllColumnsProps:b})}var Xn={},Qn={},Jn=function(e,t,n){return e},Yn=function(e,t){return e.subRows||[]},Zn=function(e,t,n){return""+(n?[n.id,t].join("."):t)},er=function(e){return e};function Tt(e){var t=e.initialState,n=t===void 0?Xn:t,r=e.defaultColumn,a=r===void 0?Qn:r,o=e.getSubRows,i=o===void 0?Yn:o,f=e.getRowId,g=f===void 0?Zn:f,m=e.stateReducer,C=m===void 0?Jn:m,w=e.useControlledState,R=w===void 0?er:w;return u({},B(e,["initialState","defaultColumn","getSubRows","getRowId","stateReducer","useControlledState"]),{initialState:n,defaultColumn:a,getSubRows:i,getRowId:g,stateReducer:C,useControlledState:R})}function Ft(e,t){t===void 0&&(t=0);var n=0,r=0,a=0,o=0;return e.forEach(function(i){var f=i.headers;if(i.totalLeft=t,f&&f.length){var g=Ft(f,t),m=g[0],C=g[1],w=g[2],R=g[3];i.totalMinWidth=m,i.totalWidth=C,i.totalMaxWidth=w,i.totalFlexWidth=R}else i.totalMinWidth=i.minWidth,i.totalWidth=Math.min(Math.max(i.minWidth,i.width),i.maxWidth),i.totalMaxWidth=i.maxWidth,i.totalFlexWidth=i.canResize?i.totalWidth:0;i.isVisible&&(t+=i.totalWidth,n+=i.totalMinWidth,r+=i.totalWidth,a+=i.totalMaxWidth,o+=i.totalFlexWidth)}),[n,r,a,o]}function tr(e){var t=e.data,n=e.rows,r=e.flatRows,a=e.rowsById,o=e.column,i=e.getRowId,f=e.getSubRows,g=e.accessValueHooks,m=e.getInstance;t.forEach(function(C,w){return function R(h,b,P,S,I){P===void 0&&(P=0);var H=h,k=i(h,b,S),x=a[k];if(x)x.subRows&&x.originalSubRows.forEach(function(A,G){return R(A,G,P+1,x)});else if((x={id:k,original:H,index:b,depth:P,cells:[{}]}).cells.map=He,x.cells.filter=He,x.cells.forEach=He,x.cells[0].getCellProps=He,x.values={},I.push(x),r.push(x),a[k]=x,x.originalSubRows=f(h,b),x.originalSubRows){var K=[];x.originalSubRows.forEach(function(A,G){return R(A,G,P+1,x,K)}),x.subRows=K}o.accessor&&(x.values[o.id]=o.accessor(h,b,x,I,t)),x.values[o.id]=J(g,x.values[o.id],{row:x,column:o,instance:m()})}(C,w,0,void 0,n)})}c.resetExpanded="resetExpanded",c.toggleRowExpanded="toggleRowExpanded",c.toggleAllRowsExpanded="toggleAllRowsExpanded";var _t=function(e){e.getToggleAllRowsExpandedProps=[nr],e.getToggleRowExpandedProps=[rr],e.stateReducers.push(or),e.useInstance.push(ar),e.prepareRow.push(ir)};_t.pluginName="useExpanded";var nr=function(e,t){var n=t.instance;return[e,{onClick:function(r){n.toggleAllRowsExpanded()},style:{cursor:"pointer"},title:"Toggle All Rows Expanded"}]},rr=function(e,t){var n=t.row;return[e,{onClick:function(){n.toggleRowExpanded()},style:{cursor:"pointer"},title:"Toggle Row Expanded"}]};function or(e,t,n,r){if(t.type===c.init)return u({expanded:{}},e);if(t.type===c.resetExpanded)return u({},e,{expanded:r.initialState.expanded||{}});if(t.type===c.toggleAllRowsExpanded){var a=t.value,o=r.isAllRowsExpanded,i=r.rowsById;if(a!==void 0?a:!o){var f={};return Object.keys(i).forEach(function(b){f[b]=!0}),u({},e,{expanded:f})}return u({},e,{expanded:{}})}if(t.type===c.toggleRowExpanded){var g,m=t.id,C=t.value,w=e.expanded[m],R=C!==void 0?C:!w;if(!w&&R)return u({},e,{expanded:u({},e.expanded,(g={},g[m]=!0,g))});if(w&&!R){var h=e.expanded;return h[m],u({},e,{expanded:B(h,[m].map(M))})}return e}}function ar(e){var t=e.data,n=e.rows,r=e.rowsById,a=e.manualExpandedKey,o=a===void 0?"expanded":a,i=e.paginateExpandedRows,f=i===void 0||i,g=e.expandSubRows,m=g===void 0||g,C=e.autoResetExpanded,w=C===void 0||C,R=e.getHooks,h=e.plugins,b=e.state.expanded,P=e.dispatch;oe(h,["useSortBy","useGroupBy","usePivotColumns","useGlobalFilter"],"useExpanded");var S=W(w),I=Boolean(Object.keys(r).length&&Object.keys(b).length);I&&Object.keys(r).some(function(j){return!b[j]})&&(I=!1),re(function(){S()&&P({type:c.resetExpanded})},[P,t]);var H=s.useCallback(function(j,T){P({type:c.toggleRowExpanded,id:j,value:T})},[P]),k=s.useCallback(function(j){return P({type:c.toggleAllRowsExpanded,value:j})},[P]),x=s.useMemo(function(){return f?It(n,{manualExpandedKey:o,expanded:b,expandSubRows:m}):n},[f,n,o,b,m]),K=s.useMemo(function(){return function(j){var T=0;return Object.keys(j).forEach(function(O){var $=O.split(".");T=Math.max(T,$.length)}),T}(b)},[b]),A=W(e),G=V(R().getToggleAllRowsExpandedProps,{instance:A()});Object.assign(e,{preExpandedRows:n,expandedRows:x,rows:x,expandedDepth:K,isAllRowsExpanded:I,toggleRowExpanded:H,toggleAllRowsExpanded:k,getToggleAllRowsExpandedProps:G})}function ir(e,t){var n=t.instance.getHooks,r=t.instance;e.toggleRowExpanded=function(a){return r.toggleRowExpanded(e.id,a)},e.getToggleRowExpandedProps=V(n().getToggleRowExpandedProps,{instance:r,row:e})}var Ot=function(e,t,n){return e=e.filter(function(r){return t.some(function(a){var o=r.values[a];return String(o).toLowerCase().includes(String(n).toLowerCase())})})};Ot.autoRemove=function(e){return!e};var At=function(e,t,n){return e.filter(function(r){return t.some(function(a){var o=r.values[a];return o===void 0||String(o).toLowerCase()===String(n).toLowerCase()})})};At.autoRemove=function(e){return!e};var Gt=function(e,t,n){return e.filter(function(r){return t.some(function(a){var o=r.values[a];return o===void 0||String(o)===String(n)})})};Gt.autoRemove=function(e){return!e};var Nt=function(e,t,n){return e.filter(function(r){return t.some(function(a){return r.values[a].includes(n)})})};Nt.autoRemove=function(e){return!e||!e.length};var kt=function(e,t,n){return e.filter(function(r){return t.some(function(a){var o=r.values[a];return o&&o.length&&n.every(function(i){return o.includes(i)})})})};kt.autoRemove=function(e){return!e||!e.length};var Ht=function(e,t,n){return e.filter(function(r){return t.some(function(a){var o=r.values[a];return o&&o.length&&n.some(function(i){return o.includes(i)})})})};Ht.autoRemove=function(e){return!e||!e.length};var jt=function(e,t,n){return e.filter(function(r){return t.some(function(a){var o=r.values[a];return n.includes(o)})})};jt.autoRemove=function(e){return!e||!e.length};var Wt=function(e,t,n){return e.filter(function(r){return t.some(function(a){return r.values[a]===n})})};Wt.autoRemove=function(e){return e===void 0};var zt=function(e,t,n){return e.filter(function(r){return t.some(function(a){return r.values[a]==n})})};zt.autoRemove=function(e){return e==null};var Mt=function(e,t,n){var r=n||[],a=r[0],o=r[1];if((a=typeof a=="number"?a:-1/0)>(o=typeof o=="number"?o:1/0)){var i=a;a=o,o=i}return e.filter(function(f){return t.some(function(g){var m=f.values[g];return m>=a&&m<=o})})};Mt.autoRemove=function(e){return!e||typeof e[0]!="number"&&typeof e[1]!="number"};var Ie=Object.freeze({__proto__:null,text:Ot,exactText:At,exactTextCase:Gt,includes:Nt,includesAll:kt,includesSome:Ht,includesValue:jt,exact:Wt,equals:zt,between:Mt});c.resetFilters="resetFilters",c.setFilter="setFilter",c.setAllFilters="setAllFilters";var Lt=function(e){e.stateReducers.push(sr),e.useInstance.push(ur)};function sr(e,t,n,r){if(t.type===c.init)return u({filters:[]},e);if(t.type===c.resetFilters)return u({},e,{filters:r.initialState.filters||[]});if(t.type===c.setFilter){var a=t.columnId,o=t.filterValue,i=r.allColumns,f=r.filterTypes,g=i.find(function(P){return P.id===a});if(!g)throw new Error("React-Table: Could not find a column with id: "+a);var m=Ee(g.filter,f||{},Ie),C=e.filters.find(function(P){return P.id===a}),w=Z(o,C&&C.value);return Xe(m.autoRemove,w,g)?u({},e,{filters:e.filters.filter(function(P){return P.id!==a})}):u({},e,C?{filters:e.filters.map(function(P){return P.id===a?{id:a,value:w}:P})}:{filters:[].concat(e.filters,[{id:a,value:w}])})}if(t.type===c.setAllFilters){var R=t.filters,h=r.allColumns,b=r.filterTypes;return u({},e,{filters:Z(R,e.filters).filter(function(P){var S=h.find(function(I){return I.id===P.id});return!Xe(Ee(S.filter,b||{},Ie).autoRemove,P.value,S)})})}}function ur(e){var t=e.data,n=e.rows,r=e.flatRows,a=e.rowsById,o=e.allColumns,i=e.filterTypes,f=e.manualFilters,g=e.defaultCanFilter,m=g!==void 0&&g,C=e.disableFilters,w=e.state.filters,R=e.dispatch,h=e.autoResetFilters,b=h===void 0||h,P=s.useCallback(function(A,G){R({type:c.setFilter,columnId:A,filterValue:G})},[R]),S=s.useCallback(function(A){R({type:c.setAllFilters,filters:A})},[R]);o.forEach(function(A){var G=A.id,j=A.accessor,T=A.defaultCanFilter,O=A.disableFilters;A.canFilter=j?ve(O!==!0&&void 0,C!==!0&&void 0,!0):ve(T,m,!1),A.setFilter=function(N){return P(A.id,N)};var $=w.find(function(N){return N.id===G});A.filterValue=$&&$.value});var I=s.useMemo(function(){if(f||!w.length)return[n,r,a];var A=[],G={};return[function j(T,O){O===void 0&&(O=0);var $=T;return($=w.reduce(function(N,D){var L=D.id,U=D.value,E=o.find(function(te){return te.id===L});if(!E)return N;O===0&&(E.preFilteredRows=N);var z=Ee(E.filter,i||{},Ie);return z?(E.filteredRows=z(N,[L],U),E.filteredRows):(console.warn("Could not find a valid 'column.filter' for column with the ID: "+E.id+"."),N)},T)).forEach(function(N){A.push(N),G[N.id]=N,N.subRows&&(N.subRows=N.subRows&&N.subRows.length>0?j(N.subRows,O+1):N.subRows)}),$}(n),A,G]},[f,w,n,r,a,o,i]),H=I[0],k=I[1],x=I[2];s.useMemo(function(){o.filter(function(A){return!w.find(function(G){return G.id===A.id})}).forEach(function(A){A.preFilteredRows=H,A.filteredRows=H})},[H,w,o]);var K=W(b);re(function(){K()&&R({type:c.resetFilters})},[R,f?null:t]),Object.assign(e,{preFilteredRows:n,preFilteredFlatRows:r,preFilteredRowsById:a,filteredRows:H,filteredFlatRows:k,filteredRowsById:x,rows:H,flatRows:k,rowsById:x,setFilter:P,setAllFilters:S})}Lt.pluginName="useFilters",c.resetGlobalFilter="resetGlobalFilter",c.setGlobalFilter="setGlobalFilter";var Dt=function(e){e.stateReducers.push(lr),e.useInstance.push(cr)};function lr(e,t,n,r){if(t.type===c.resetGlobalFilter)return u({},e,{globalFilter:r.initialState.globalFilter||void 0});if(t.type===c.setGlobalFilter){var a=t.filterValue,o=r.userFilterTypes,i=Ee(r.globalFilter,o||{},Ie),f=Z(a,e.globalFilter);return Xe(i.autoRemove,f)?(e.globalFilter,B(e,["globalFilter"])):u({},e,{globalFilter:f})}}function cr(e){var t=e.data,n=e.rows,r=e.flatRows,a=e.rowsById,o=e.allColumns,i=e.filterTypes,f=e.globalFilter,g=e.manualGlobalFilter,m=e.state.globalFilter,C=e.dispatch,w=e.autoResetGlobalFilter,R=w===void 0||w,h=e.disableGlobalFilter,b=s.useCallback(function(x){C({type:c.setGlobalFilter,filterValue:x})},[C]),P=s.useMemo(function(){if(g||m===void 0)return[n,r,a];var x=[],K={},A=Ee(f,i||{},Ie);if(!A)return console.warn("Could not find a valid 'globalFilter' option."),n;o.forEach(function(j){var T=j.disableGlobalFilter;j.canFilter=ve(T!==!0&&void 0,h!==!0&&void 0,!0)});var G=o.filter(function(j){return j.canFilter===!0});return[function j(T){return(T=A(T,G.map(function(O){return O.id}),m)).forEach(function(O){x.push(O),K[O.id]=O,O.subRows=O.subRows&&O.subRows.length?j(O.subRows):O.subRows}),T}(n),x,K]},[g,m,f,i,o,n,r,a,h]),S=P[0],I=P[1],H=P[2],k=W(R);re(function(){k()&&C({type:c.resetGlobalFilter})},[C,g?null:t]),Object.assign(e,{preGlobalFilteredRows:n,preGlobalFilteredFlatRows:r,preGlobalFilteredRowsById:a,globalFilteredRows:S,globalFilteredFlatRows:I,globalFilteredRowsById:H,rows:S,flatRows:I,rowsById:H,setGlobalFilter:b,disableGlobalFilter:h})}function $t(e,t){return t.reduce(function(n,r){return n+(typeof r=="number"?r:0)},0)}Dt.pluginName="useGlobalFilter";var Vt=Object.freeze({__proto__:null,sum:$t,min:function(e){var t=e[0]||0;return e.forEach(function(n){typeof n=="number"&&(t=Math.min(t,n))}),t},max:function(e){var t=e[0]||0;return e.forEach(function(n){typeof n=="number"&&(t=Math.max(t,n))}),t},minMax:function(e){var t=e[0]||0,n=e[0]||0;return e.forEach(function(r){typeof r=="number"&&(t=Math.min(t,r),n=Math.max(n,r))}),t+".."+n},average:function(e){return $t(0,e)/e.length},median:function(e){if(!e.length)return null;var t=Math.floor(e.length/2),n=[].concat(e).sort(function(r,a){return r-a});return e.length%2!=0?n[t]:(n[t-1]+n[t])/2},unique:function(e){return Array.from(new Set(e).values())},uniqueCount:function(e){return new Set(e).size},count:function(e){return e.length}}),dr=[],fr={};c.resetGroupBy="resetGroupBy",c.setGroupBy="setGroupBy",c.toggleGroupBy="toggleGroupBy";var Kt=function(e){e.getGroupByToggleProps=[pr],e.stateReducers.push(gr),e.visibleColumnsDeps.push(function(t,n){var r=n.instance;return[].concat(t,[r.state.groupBy])}),e.visibleColumns.push(vr),e.useInstance.push(hr),e.prepareRow.push(yr)};Kt.pluginName="useGroupBy";var pr=function(e,t){var n=t.header;return[e,{onClick:n.canGroupBy?function(r){r.persist(),n.toggleGroupBy()}:void 0,style:{cursor:n.canGroupBy?"pointer":void 0},title:"Toggle GroupBy"}]};function gr(e,t,n,r){if(t.type===c.init)return u({groupBy:[]},e);if(t.type===c.resetGroupBy)return u({},e,{groupBy:r.initialState.groupBy||[]});if(t.type===c.setGroupBy)return u({},e,{groupBy:t.value});if(t.type===c.toggleGroupBy){var a=t.columnId,o=t.value,i=o!==void 0?o:!e.groupBy.includes(a);return u({},e,i?{groupBy:[].concat(e.groupBy,[a])}:{groupBy:e.groupBy.filter(function(f){return f!==a})})}}function vr(e,t){var n=t.instance.state.groupBy,r=n.map(function(o){return e.find(function(i){return i.id===o})}).filter(Boolean),a=e.filter(function(o){return!n.includes(o.id)});return(e=[].concat(r,a)).forEach(function(o){o.isGrouped=n.includes(o.id),o.groupedIndex=n.indexOf(o.id)}),e}var mr={};function hr(e){var t=e.data,n=e.rows,r=e.flatRows,a=e.rowsById,o=e.allColumns,i=e.flatHeaders,f=e.groupByFn,g=f===void 0?Ut:f,m=e.manualGroupBy,C=e.aggregations,w=C===void 0?mr:C,R=e.plugins,h=e.state.groupBy,b=e.dispatch,P=e.autoResetGroupBy,S=P===void 0||P,I=e.disableGroupBy,H=e.defaultCanGroupBy,k=e.getHooks;oe(R,["useColumnOrder","useFilters"],"useGroupBy");var x=W(e);o.forEach(function(E){var z=E.accessor,te=E.defaultGroupBy,ue=E.disableGroupBy;E.canGroupBy=z?ve(E.canGroupBy,ue!==!0&&void 0,I!==!0&&void 0,!0):ve(E.canGroupBy,te,H,!1),E.canGroupBy&&(E.toggleGroupBy=function(){return e.toggleGroupBy(E.id)}),E.Aggregated=E.Aggregated||E.Cell});var K=s.useCallback(function(E,z){b({type:c.toggleGroupBy,columnId:E,value:z})},[b]),A=s.useCallback(function(E){b({type:c.setGroupBy,value:E})},[b]);i.forEach(function(E){E.getGroupByToggleProps=V(k().getGroupByToggleProps,{instance:x(),header:E})});var G=s.useMemo(function(){if(m||!h.length)return[n,r,a,dr,fr,r,a];var E=h.filter(function(se){return o.find(function(be){return be.id===se})}),z=[],te={},ue=[],F={},Y=[],ae={},le=function se(be,we,fn){if(we===void 0&&(we=0),we===E.length)return be;var nt=E[we],ao=g(be,nt);return Object.entries(ao).map(function(pn,io){var gn=pn[0],We=pn[1],ze=nt+":"+gn,vn=se(We,we+1,ze=fn?fn+">"+ze:ze),mn=we?Et(We,"leafRows"):We,so=function(de,rt,lo){var Me={};return o.forEach(function(ie){if(E.includes(ie.id))Me[ie.id]=rt[0]?rt[0].values[ie.id]:null;else{var hn=typeof ie.aggregate=="function"?ie.aggregate:w[ie.aggregate]||Vt[ie.aggregate];if(hn){var co=rt.map(function(Le){return Le.values[ie.id]}),fo=de.map(function(Le){var ot=Le.values[ie.id];if(!lo&&ie.aggregateValue){var yn=typeof ie.aggregateValue=="function"?ie.aggregateValue:w[ie.aggregateValue]||Vt[ie.aggregateValue];if(!yn)throw console.info({column:ie}),new Error("React Table: Invalid column.aggregateValue option for column listed above");ot=yn(ot,Le,ie)}return ot});Me[ie.id]=hn(fo,co)}else{if(ie.aggregate)throw console.info({column:ie}),new Error("React Table: Invalid column.aggregate option for column listed above");Me[ie.id]=null}}}),Me}(mn,We,we),uo={id:ze,isGrouped:!0,groupByID:nt,groupByVal:gn,values:so,subRows:vn,leafRows:mn,depth:we,index:io};return vn.forEach(function(de){z.push(de),te[de.id]=de,de.isGrouped?(ue.push(de),F[de.id]=de):(Y.push(de),ae[de.id]=de)}),uo})}(n);return le.forEach(function(se){z.push(se),te[se.id]=se,se.isGrouped?(ue.push(se),F[se.id]=se):(Y.push(se),ae[se.id]=se)}),[le,z,te,ue,F,Y,ae]},[m,h,n,r,a,o,w,g]),j=G[0],T=G[1],O=G[2],$=G[3],N=G[4],D=G[5],L=G[6],U=W(S);re(function(){U()&&b({type:c.resetGroupBy})},[b,m?null:t]),Object.assign(e,{preGroupedRows:n,preGroupedFlatRow:r,preGroupedRowsById:a,groupedRows:j,groupedFlatRows:T,groupedRowsById:O,onlyGroupedFlatRows:$,onlyGroupedRowsById:N,nonGroupedFlatRows:D,nonGroupedRowsById:L,rows:j,flatRows:T,rowsById:O,toggleGroupBy:K,setGroupBy:A})}function yr(e){e.allCells.forEach(function(t){var n;t.isGrouped=t.column.isGrouped&&t.column.id===e.groupByID,t.isPlaceholder=!t.isGrouped&&t.column.isGrouped,t.isAggregated=!t.isGrouped&&!t.isPlaceholder&&((n=e.subRows)==null?void 0:n.length)})}function Ut(e,t){return e.reduce(function(n,r,a){var o=""+r.values[t];return n[o]=Array.isArray(n[o])?n[o]:[],n[o].push(r),n},{})}var qt=/([0-9]+)/gm;function Je(e,t){return e===t?0:e>t?1:-1}function Be(e,t,n){return[e.values[n],t.values[n]]}function Xt(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}var br=Object.freeze({__proto__:null,alphanumeric:function(e,t,n){var r=Be(e,t,n),a=r[0],o=r[1];for(a=Xt(a),o=Xt(o),a=a.split(qt).filter(Boolean),o=o.split(qt).filter(Boolean);a.length&&o.length;){var i=a.shift(),f=o.shift(),g=parseInt(i,10),m=parseInt(f,10),C=[g,m].sort();if(isNaN(C[0])){if(i>f)return 1;if(f>i)return-1}else{if(isNaN(C[1]))return isNaN(g)?-1:1;if(g>m)return 1;if(m>g)return-1}}return a.length-o.length},datetime:function(e,t,n){var r=Be(e,t,n),a=r[0],o=r[1];return Je(a=a.getTime(),o=o.getTime())},basic:function(e,t,n){var r=Be(e,t,n);return Je(r[0],r[1])},string:function(e,t,n){var r=Be(e,t,n),a=r[0],o=r[1];for(a=a.split("").filter(Boolean),o=o.split("").filter(Boolean);a.length&&o.length;){var i=a.shift(),f=o.shift(),g=i.toLowerCase(),m=f.toLowerCase();if(g>m)return 1;if(m>g)return-1;if(i>f)return 1;if(f>i)return-1}return a.length-o.length},number:function(e,t,n){var r=Be(e,t,n),a=r[0],o=r[1],i=/[^0-9.]/gi;return Je(a=Number(String(a).replace(i,"")),o=Number(String(o).replace(i,"")))}});c.resetSortBy="resetSortBy",c.setSortBy="setSortBy",c.toggleSortBy="toggleSortBy",c.clearSortBy="clearSortBy",Q.sortType="alphanumeric",Q.sortDescFirst=!1;var Qt=function(e){e.getSortByToggleProps=[wr],e.stateReducers.push(Rr),e.useInstance.push(Cr)};Qt.pluginName="useSortBy";var wr=function(e,t){var n=t.instance,r=t.column,a=n.isMultiSortEvent,o=a===void 0?function(i){return i.shiftKey}:a;return[e,{onClick:r.canSort?function(i){i.persist(),r.toggleSortBy(void 0,!n.disableMultiSort&&o(i))}:void 0,style:{cursor:r.canSort?"pointer":void 0},title:r.canSort?"Toggle SortBy":void 0}]};function Rr(e,t,n,r){if(t.type===c.init)return u({sortBy:[]},e);if(t.type===c.resetSortBy)return u({},e,{sortBy:r.initialState.sortBy||[]});if(t.type===c.clearSortBy)return u({},e,{sortBy:e.sortBy.filter(function(x){return x.id!==t.columnId})});if(t.type===c.setSortBy)return u({},e,{sortBy:t.sortBy});if(t.type===c.toggleSortBy){var a,o=t.columnId,i=t.desc,f=t.multi,g=r.allColumns,m=r.disableMultiSort,C=r.disableSortRemove,w=r.disableMultiRemove,R=r.maxMultiSortColCount,h=R===void 0?Number.MAX_SAFE_INTEGER:R,b=e.sortBy,P=g.find(function(x){return x.id===o}).sortDescFirst,S=b.find(function(x){return x.id===o}),I=b.findIndex(function(x){return x.id===o}),H=i!=null,k=[];return(a=!m&&f?S?"toggle":"add":I!==b.length-1||b.length!==1?"replace":S?"toggle":"replace")!=="toggle"||C||H||f&&w||!(S&&S.desc&&!P||!S.desc&&P)||(a="remove"),a==="replace"?k=[{id:o,desc:H?i:P}]:a==="add"?(k=[].concat(b,[{id:o,desc:H?i:P}])).splice(0,k.length-h):a==="toggle"?k=b.map(function(x){return x.id===o?u({},x,{desc:H?i:!S.desc}):x}):a==="remove"&&(k=b.filter(function(x){return x.id!==o})),u({},e,{sortBy:k})}}function Cr(e){var t=e.data,n=e.rows,r=e.flatRows,a=e.allColumns,o=e.orderByFn,i=o===void 0?Jt:o,f=e.sortTypes,g=e.manualSortBy,m=e.defaultCanSort,C=e.disableSortBy,w=e.flatHeaders,R=e.state.sortBy,h=e.dispatch,b=e.plugins,P=e.getHooks,S=e.autoResetSortBy,I=S===void 0||S;oe(b,["useFilters","useGlobalFilter","useGroupBy","usePivotColumns"],"useSortBy");var H=s.useCallback(function(T){h({type:c.setSortBy,sortBy:T})},[h]),k=s.useCallback(function(T,O,$){h({type:c.toggleSortBy,columnId:T,desc:O,multi:$})},[h]),x=W(e);w.forEach(function(T){var O=T.accessor,$=T.canSort,N=T.disableSortBy,D=T.id,L=O?ve(N!==!0&&void 0,C!==!0&&void 0,!0):ve(m,$,!1);T.canSort=L,T.canSort&&(T.toggleSortBy=function(E,z){return k(T.id,E,z)},T.clearSortBy=function(){h({type:c.clearSortBy,columnId:T.id})}),T.getSortByToggleProps=V(P().getSortByToggleProps,{instance:x(),column:T});var U=R.find(function(E){return E.id===D});T.isSorted=!!U,T.sortedIndex=R.findIndex(function(E){return E.id===D}),T.isSortedDesc=T.isSorted?U.desc:void 0});var K=s.useMemo(function(){if(g||!R.length)return[n,r];var T=[],O=R.filter(function($){return a.find(function(N){return N.id===$.id})});return[function $(N){var D=i(N,O.map(function(L){var U=a.find(function(te){return te.id===L.id});if(!U)throw new Error("React-Table: Could not find a column with id: "+L.id+" while sorting");var E=U.sortType,z=xt(E)||(f||{})[E]||br[E];if(!z)throw new Error("React-Table: Could not find a valid sortType of '"+E+"' for column '"+L.id+"'.");return function(te,ue){return z(te,ue,L.id,L.desc)}}),O.map(function(L){var U=a.find(function(E){return E.id===L.id});return U&&U.sortInverted?L.desc:!L.desc}));return D.forEach(function(L){T.push(L),L.subRows&&L.subRows.length!==0&&(L.subRows=$(L.subRows))}),D}(n),T]},[g,R,n,r,a,i,f]),A=K[0],G=K[1],j=W(I);re(function(){j()&&h({type:c.resetSortBy})},[g?null:t]),Object.assign(e,{preSortedRows:n,preSortedFlatRows:r,sortedRows:A,sortedFlatRows:G,rows:A,flatRows:G,setSortBy:H,toggleSortBy:k})}function Jt(e,t,n){return[].concat(e).sort(function(r,a){for(var o=0;o<t.length;o+=1){var i=t[o],f=n[o]===!1||n[o]==="desc",g=i(r,a);if(g!==0)return f?-g:g}return n[0]?r.index-a.index:a.index-r.index})}c.resetPage="resetPage",c.gotoPage="gotoPage",c.setPageSize="setPageSize";var Yt=function(e){e.stateReducers.push(Sr),e.useInstance.push(Pr)};function Sr(e,t,n,r){if(t.type===c.init)return u({pageSize:10,pageIndex:0},e);if(t.type===c.resetPage)return u({},e,{pageIndex:r.initialState.pageIndex||0});if(t.type===c.gotoPage){var a=r.pageCount,o=r.page,i=Z(t.pageIndex,e.pageIndex),f=!1;return i>e.pageIndex?f=a===-1?o.length>=e.pageSize:i<a:i<e.pageIndex&&(f=i>-1),f?u({},e,{pageIndex:i}):e}if(t.type===c.setPageSize){var g=t.pageSize,m=e.pageSize*e.pageIndex;return u({},e,{pageIndex:Math.floor(m/g),pageSize:g})}}function Pr(e){var t=e.rows,n=e.autoResetPage,r=n===void 0||n,a=e.manualExpandedKey,o=a===void 0?"expanded":a,i=e.plugins,f=e.pageCount,g=e.paginateExpandedRows,m=g===void 0||g,C=e.expandSubRows,w=C===void 0||C,R=e.state,h=R.pageSize,b=R.pageIndex,P=R.expanded,S=R.globalFilter,I=R.filters,H=R.groupBy,k=R.sortBy,x=e.dispatch,K=e.data,A=e.manualPagination;oe(i,["useGlobalFilter","useFilters","useGroupBy","useSortBy","useExpanded"],"usePagination");var G=W(r);re(function(){G()&&x({type:c.resetPage})},[x,A?null:K,S,I,H,k]);var j=A?f:Math.ceil(t.length/h),T=s.useMemo(function(){return j>0?[].concat(new Array(j)).fill(null).map(function(z,te){return te}):[]},[j]),O=s.useMemo(function(){var z;if(A)z=t;else{var te=h*b,ue=te+h;z=t.slice(te,ue)}return m?z:It(z,{manualExpandedKey:o,expanded:P,expandSubRows:w})},[w,P,o,A,b,h,m,t]),$=b>0,N=j===-1?O.length>=h:b<j-1,D=s.useCallback(function(z){x({type:c.gotoPage,pageIndex:z})},[x]),L=s.useCallback(function(){return D(function(z){return z-1})},[D]),U=s.useCallback(function(){return D(function(z){return z+1})},[D]),E=s.useCallback(function(z){x({type:c.setPageSize,pageSize:z})},[x]);Object.assign(e,{pageOptions:T,pageCount:j,page:O,canPreviousPage:$,canNextPage:N,gotoPage:D,previousPage:L,nextPage:U,setPageSize:E})}Yt.pluginName="usePagination",c.resetPivot="resetPivot",c.togglePivot="togglePivot";var Zt=function(e){e.getPivotToggleProps=[xr],e.stateReducers.push(Er),e.useInstanceAfterData.push(Ir),e.allColumns.push(Br),e.accessValue.push(Tr),e.materializedColumns.push(Fr),e.materializedColumnsDeps.push(_r),e.visibleColumns.push(Or),e.visibleColumnsDeps.push(Ar),e.useInstance.push(Gr),e.prepareRow.push(Nr)};Zt.pluginName="usePivotColumns";var en=[],xr=function(e,t){var n=t.header;return[e,{onClick:n.canPivot?function(r){r.persist(),n.togglePivot()}:void 0,style:{cursor:n.canPivot?"pointer":void 0},title:"Toggle Pivot"}]};function Er(e,t,n,r){if(t.type===c.init)return u({pivotColumns:en},e);if(t.type===c.resetPivot)return u({},e,{pivotColumns:r.initialState.pivotColumns||en});if(t.type===c.togglePivot){var a=t.columnId,o=t.value,i=o!==void 0?o:!e.pivotColumns.includes(a);return u({},e,i?{pivotColumns:[].concat(e.pivotColumns,[a])}:{pivotColumns:e.pivotColumns.filter(function(f){return f!==a})})}}function Ir(e){e.allColumns.forEach(function(t){t.isPivotSource=e.state.pivotColumns.includes(t.id)})}function Br(e,t){var n=t.instance;return e.forEach(function(r){r.isPivotSource=n.state.pivotColumns.includes(r.id),r.uniqueValues=new Set}),e}function Tr(e,t){var n=t.column;return n.uniqueValues&&e!==void 0&&n.uniqueValues.add(e),e}function Fr(e,t){var n=t.instance,r=n.allColumns,a=n.state;if(!a.pivotColumns.length||!a.groupBy||!a.groupBy.length)return e;var o=a.pivotColumns.map(function(g){return r.find(function(m){return m.id===g})}).filter(Boolean),i=r.filter(function(g){return!g.isPivotSource&&!a.groupBy.includes(g.id)&&!a.pivotColumns.includes(g.id)}),f=ge(function g(m,C,w){m===void 0&&(m=0),w===void 0&&(w=[]);var R=o[m];return R?Array.from(R.uniqueValues).sort().map(function(h){var b=u({},R,{Header:R.PivotHeader||typeof R.header=="string"?R.Header+": "+h:h,isPivotGroup:!0,parent:C,depth:m,id:C?C.id+"."+R.id+"."+h:R.id+"."+h,pivotValue:h});return b.columns=g(m+1,b,[].concat(w,[function(P){return P.values[R.id]===h}])),b}):i.map(function(h){return u({},h,{canPivot:!1,isPivoted:!0,parent:C,depth:m,id:""+(C?C.id+"."+h.id:h.id),accessor:function(b,P,S){if(w.every(function(I){return I(S)}))return S.values[h.id]}})})}());return[].concat(e,f)}function _r(e,t){var n=t.instance.state,r=n.pivotColumns,a=n.groupBy;return[].concat(e,[r,a])}function Or(e,t){var n=t.instance.state;return e=e.filter(function(r){return!r.isPivotSource}),n.pivotColumns.length&&n.groupBy&&n.groupBy.length&&(e=e.filter(function(r){return r.isGrouped||r.isPivoted})),e}function Ar(e,t){var n=t.instance;return[].concat(e,[n.state.pivotColumns,n.state.groupBy])}function Gr(e){var t=e.columns,n=e.allColumns,r=e.flatHeaders,a=e.getHooks,o=e.plugins,i=e.dispatch,f=e.autoResetPivot,g=f===void 0||f,m=e.manaulPivot,C=e.disablePivot,w=e.defaultCanPivot;oe(o,["useGroupBy"],"usePivotColumns");var R=W(e);n.forEach(function(b){var P=b.accessor,S=b.defaultPivot,I=b.disablePivot;b.canPivot=P?ve(b.canPivot,I!==!0&&void 0,C!==!0&&void 0,!0):ve(b.canPivot,S,w,!1),b.canPivot&&(b.togglePivot=function(){return e.togglePivot(b.id)}),b.Aggregated=b.Aggregated||b.Cell}),r.forEach(function(b){b.getPivotToggleProps=V(a().getPivotToggleProps,{instance:R(),header:b})});var h=W(g);re(function(){h()&&i({type:c.resetPivot})},[i,m?null:t]),Object.assign(e,{togglePivot:function(b,P){i({type:c.togglePivot,columnId:b,value:P})}})}function Nr(e){e.allCells.forEach(function(t){t.isPivoted=t.column.isPivoted})}c.resetSelectedRows="resetSelectedRows",c.toggleAllRowsSelected="toggleAllRowsSelected",c.toggleRowSelected="toggleRowSelected",c.toggleAllPageRowsSelected="toggleAllPageRowsSelected";var tn=function(e){e.getToggleRowSelectedProps=[kr],e.getToggleAllRowsSelectedProps=[Hr],e.getToggleAllPageRowsSelectedProps=[jr],e.stateReducers.push(Wr),e.useInstance.push(zr),e.prepareRow.push(Mr)};tn.pluginName="useRowSelect";var kr=function(e,t){var n=t.instance,r=t.row,a=n.manualRowSelectedKey,o=a===void 0?"isSelected":a;return[e,{onChange:function(i){r.toggleRowSelected(i.target.checked)},style:{cursor:"pointer"},checked:!(!r.original||!r.original[o])||r.isSelected,title:"Toggle Row Selected",indeterminate:r.isSomeSelected}]},Hr=function(e,t){var n=t.instance;return[e,{onChange:function(r){n.toggleAllRowsSelected(r.target.checked)},style:{cursor:"pointer"},checked:n.isAllRowsSelected,title:"Toggle All Rows Selected",indeterminate:Boolean(!n.isAllRowsSelected&&Object.keys(n.state.selectedRowIds).length)}]},jr=function(e,t){var n=t.instance;return[e,{onChange:function(r){n.toggleAllPageRowsSelected(r.target.checked)},style:{cursor:"pointer"},checked:n.isAllPageRowsSelected,title:"Toggle All Current Page Rows Selected",indeterminate:Boolean(!n.isAllPageRowsSelected&&n.page.some(function(r){var a=r.id;return n.state.selectedRowIds[a]}))}]};function Wr(e,t,n,r){if(t.type===c.init)return u({selectedRowIds:{}},e);if(t.type===c.resetSelectedRows)return u({},e,{selectedRowIds:r.initialState.selectedRowIds||{}});if(t.type===c.toggleAllRowsSelected){var a=t.value,o=r.isAllRowsSelected,i=r.rowsById,f=r.nonGroupedRowsById,g=f===void 0?i:f,m=a!==void 0?a:!o,C=Object.assign({},e.selectedRowIds);return m?Object.keys(g).forEach(function(D){C[D]=!0}):Object.keys(g).forEach(function(D){delete C[D]}),u({},e,{selectedRowIds:C})}if(t.type===c.toggleRowSelected){var w=t.id,R=t.value,h=r.rowsById,b=r.selectSubRows,P=b===void 0||b,S=r.getSubRows,I=e.selectedRowIds[w],H=R!==void 0?R:!I;if(I===H)return e;var k=u({},e.selectedRowIds);return function D(L){var U=h[L];if(U.isGrouped||(H?k[L]=!0:delete k[L]),P&&S(U))return S(U).forEach(function(E){return D(E.id)})}(w),u({},e,{selectedRowIds:k})}if(t.type===c.toggleAllPageRowsSelected){var x=t.value,K=r.page,A=r.rowsById,G=r.selectSubRows,j=G===void 0||G,T=r.isAllPageRowsSelected,O=r.getSubRows,$=x!==void 0?x:!T,N=u({},e.selectedRowIds);return K.forEach(function(D){return function L(U){var E=A[U];if(E.isGrouped||($?N[U]=!0:delete N[U]),j&&O(E))return O(E).forEach(function(z){return L(z.id)})}(D.id)}),u({},e,{selectedRowIds:N})}return e}function zr(e){var t=e.data,n=e.rows,r=e.getHooks,a=e.plugins,o=e.rowsById,i=e.nonGroupedRowsById,f=i===void 0?o:i,g=e.autoResetSelectedRows,m=g===void 0||g,C=e.state.selectedRowIds,w=e.selectSubRows,R=w===void 0||w,h=e.dispatch,b=e.page,P=e.getSubRows;oe(a,["useFilters","useGroupBy","useSortBy","useExpanded","usePagination"],"useRowSelect");var S=s.useMemo(function(){var O=[];return n.forEach(function($){var N=R?function D(L,U,E){if(U[L.id])return!0;var z=E(L);if(z&&z.length){var te=!0,ue=!1;return z.forEach(function(F){ue&&!te||(D(F,U,E)?ue=!0:te=!1)}),!!te||!!ue&&null}return!1}($,C,P):!!C[$.id];$.isSelected=!!N,$.isSomeSelected=N===null,N&&O.push($)}),O},[n,R,C,P]),I=Boolean(Object.keys(f).length&&Object.keys(C).length),H=I;I&&Object.keys(f).some(function(O){return!C[O]})&&(I=!1),I||b&&b.length&&b.some(function(O){var $=O.id;return!C[$]})&&(H=!1);var k=W(m);re(function(){k()&&h({type:c.resetSelectedRows})},[h,t]);var x=s.useCallback(function(O){return h({type:c.toggleAllRowsSelected,value:O})},[h]),K=s.useCallback(function(O){return h({type:c.toggleAllPageRowsSelected,value:O})},[h]),A=s.useCallback(function(O,$){return h({type:c.toggleRowSelected,id:O,value:$})},[h]),G=W(e),j=V(r().getToggleAllRowsSelectedProps,{instance:G()}),T=V(r().getToggleAllPageRowsSelectedProps,{instance:G()});Object.assign(e,{selectedFlatRows:S,isAllRowsSelected:I,isAllPageRowsSelected:H,toggleRowSelected:A,toggleAllRowsSelected:x,getToggleAllRowsSelectedProps:j,getToggleAllPageRowsSelectedProps:T,toggleAllPageRowsSelected:K})}function Mr(e,t){var n=t.instance;e.toggleRowSelected=function(r){return n.toggleRowSelected(e.id,r)},e.getToggleRowSelectedProps=V(n.getHooks().getToggleRowSelectedProps,{instance:n,row:e})}var nn=function(e){return{}},rn=function(e){return{}};c.setRowState="setRowState",c.setCellState="setCellState",c.resetRowState="resetRowState";var on=function(e){e.stateReducers.push(Lr),e.useInstance.push(Dr),e.prepareRow.push($r)};function Lr(e,t,n,r){var a=r.initialRowStateAccessor,o=a===void 0?nn:a,i=r.initialCellStateAccessor,f=i===void 0?rn:i,g=r.rowsById;if(t.type===c.init)return u({rowState:{}},e);if(t.type===c.resetRowState)return u({},e,{rowState:r.initialState.rowState||{}});if(t.type===c.setRowState){var m,C=t.rowId,w=t.value,R=e.rowState[C]!==void 0?e.rowState[C]:o(g[C]);return u({},e,{rowState:u({},e.rowState,(m={},m[C]=Z(w,R),m))})}if(t.type===c.setCellState){var h,b,P,S,I,H=t.rowId,k=t.columnId,x=t.value,K=e.rowState[H]!==void 0?e.rowState[H]:o(g[H]),A=(K==null||(h=K.cellState)==null?void 0:h[k])!==void 0?K.cellState[k]:f((b=g[H])==null||(P=b.cells)==null?void 0:P.find(function(G){return G.column.id===k}));return u({},e,{rowState:u({},e.rowState,(I={},I[H]=u({},K,{cellState:u({},K.cellState||{},(S={},S[k]=Z(x,A),S))}),I))})}}function Dr(e){var t=e.autoResetRowState,n=t===void 0||t,r=e.data,a=e.dispatch,o=s.useCallback(function(g,m){return a({type:c.setRowState,rowId:g,value:m})},[a]),i=s.useCallback(function(g,m,C){return a({type:c.setCellState,rowId:g,columnId:m,value:C})},[a]),f=W(n);re(function(){f()&&a({type:c.resetRowState})},[r]),Object.assign(e,{setRowState:o,setCellState:i})}function $r(e,t){var n=t.instance,r=n.initialRowStateAccessor,a=r===void 0?nn:r,o=n.initialCellStateAccessor,i=o===void 0?rn:o,f=n.state.rowState;e&&(e.state=f[e.id]!==void 0?f[e.id]:a(e),e.setState=function(g){return n.setRowState(e.id,g)},e.cells.forEach(function(g){e.state.cellState||(e.state.cellState={}),g.state=e.state.cellState[g.column.id]!==void 0?e.state.cellState[g.column.id]:i(g),g.setState=function(m){return n.setCellState(e.id,g.column.id,m)}}))}on.pluginName="useRowState",c.resetColumnOrder="resetColumnOrder",c.setColumnOrder="setColumnOrder";var an=function(e){e.stateReducers.push(Vr),e.visibleColumnsDeps.push(function(t,n){var r=n.instance;return[].concat(t,[r.state.columnOrder])}),e.visibleColumns.push(Kr),e.useInstance.push(Ur)};function Vr(e,t,n,r){return t.type===c.init?u({columnOrder:[]},e):t.type===c.resetColumnOrder?u({},e,{columnOrder:r.initialState.columnOrder||[]}):t.type===c.setColumnOrder?u({},e,{columnOrder:Z(t.columnOrder,e.columnOrder)}):void 0}function Kr(e,t){var n=t.instance.state.columnOrder;if(!n||!n.length)return e;for(var r=[].concat(n),a=[].concat(e),o=[],i=function(){var f=r.shift(),g=a.findIndex(function(m){return m.id===f});g>-1&&o.push(a.splice(g,1)[0])};a.length&&r.length;)i();return[].concat(o,a)}function Ur(e){var t=e.dispatch;e.setColumnOrder=s.useCallback(function(n){return t({type:c.setColumnOrder,columnOrder:n})},[t])}an.pluginName="useColumnOrder",Q.canResize=!0,c.columnStartResizing="columnStartResizing",c.columnResizing="columnResizing",c.columnDoneResizing="columnDoneResizing",c.resetResize="resetResize";var sn=function(e){e.getResizerProps=[qr],e.getHeaderProps.push({style:{position:"relative"}}),e.stateReducers.push(Xr),e.useInstance.push(Jr),e.useInstanceBeforeDimensions.push(Qr)},qr=function(e,t){var n=t.instance,r=t.header,a=n.dispatch,o=function(i,f){var g=!1;if(i.type==="touchstart"){if(i.touches&&i.touches.length>1)return;g=!0}var m=function(S){var I=[];return function H(k){k.columns&&k.columns.length&&k.columns.map(H),I.push(k)}(S),I}(f).map(function(S){return[S.id,S.totalWidth]}),C=g?Math.round(i.touches[0].clientX):i.clientX,w=function(S){a({type:c.columnResizing,clientX:S})},R=function(){return a({type:c.columnDoneResizing})},h={mouse:{moveEvent:"mousemove",moveHandler:function(S){return w(S.clientX)},upEvent:"mouseup",upHandler:function(S){document.removeEventListener("mousemove",h.mouse.moveHandler),document.removeEventListener("mouseup",h.mouse.upHandler),R()}},touch:{moveEvent:"touchmove",moveHandler:function(S){return S.cancelable&&(S.preventDefault(),S.stopPropagation()),w(S.touches[0].clientX),!1},upEvent:"touchend",upHandler:function(S){document.removeEventListener(h.touch.moveEvent,h.touch.moveHandler),document.removeEventListener(h.touch.upEvent,h.touch.moveHandler),R()}}},b=g?h.touch:h.mouse,P=!!function(){if(typeof Qe=="boolean")return Qe;var S=!1;try{var I={get passive(){return S=!0,!1}};window.addEventListener("test",null,I),window.removeEventListener("test",null,I)}catch{S=!1}return Qe=S}()&&{passive:!1};document.addEventListener(b.moveEvent,b.moveHandler,P),document.addEventListener(b.upEvent,b.upHandler,P),a({type:c.columnStartResizing,columnId:f.id,columnWidth:f.totalWidth,headerIdWidths:m,clientX:C})};return[e,{onMouseDown:function(i){return i.persist()||o(i,r)},onTouchStart:function(i){return i.persist()||o(i,r)},style:{cursor:"col-resize"},draggable:!1,role:"separator"}]};function Xr(e,t){if(t.type===c.init)return u({columnResizing:{columnWidths:{}}},e);if(t.type===c.resetResize)return u({},e,{columnResizing:{columnWidths:{}}});if(t.type===c.columnStartResizing){var n=t.clientX,r=t.columnId,a=t.columnWidth,o=t.headerIdWidths;return u({},e,{columnResizing:u({},e.columnResizing,{startX:n,headerIdWidths:o,columnWidth:a,isResizingColumn:r})})}if(t.type===c.columnResizing){var i=t.clientX,f=e.columnResizing,g=f.startX,m=f.columnWidth,C=f.headerIdWidths,w=(i-g)/m,R={};return(C===void 0?[]:C).forEach(function(h){var b=h[0],P=h[1];R[b]=Math.max(P+P*w,0)}),u({},e,{columnResizing:u({},e.columnResizing,{columnWidths:u({},e.columnResizing.columnWidths,{},R)})})}return t.type===c.columnDoneResizing?u({},e,{columnResizing:u({},e.columnResizing,{startX:null,isResizingColumn:null})}):void 0}sn.pluginName="useResizeColumns";var Qr=function(e){var t=e.flatHeaders,n=e.disableResizing,r=e.getHooks,a=e.state.columnResizing,o=W(e);t.forEach(function(i){var f=ve(i.disableResizing!==!0&&void 0,n!==!0&&void 0,!0);i.canResize=f,i.width=a.columnWidths[i.id]||i.originalWidth||i.width,i.isResizing=a.isResizingColumn===i.id,f&&(i.getResizerProps=V(r().getResizerProps,{instance:o(),header:i}))})};function Jr(e){var t=e.plugins,n=e.dispatch,r=e.autoResetResize,a=r===void 0||r,o=e.columns;oe(t,["useAbsoluteLayout"],"useResizeColumns");var i=W(a);re(function(){i()&&n({type:c.resetResize})},[o]);var f=s.useCallback(function(){return n({type:c.resetResize})},[n]);Object.assign(e,{resetResizing:f})}var Ye={position:"absolute",top:0},un=function(e){e.getTableBodyProps.push(je),e.getRowProps.push(je),e.getHeaderGroupProps.push(je),e.getFooterGroupProps.push(je),e.getHeaderProps.push(function(t,n){var r=n.column;return[t,{style:u({},Ye,{left:r.totalLeft+"px",width:r.totalWidth+"px"})}]}),e.getCellProps.push(function(t,n){var r=n.cell;return[t,{style:u({},Ye,{left:r.column.totalLeft+"px",width:r.column.totalWidth+"px"})}]}),e.getFooterProps.push(function(t,n){var r=n.column;return[t,{style:u({},Ye,{left:r.totalLeft+"px",width:r.totalWidth+"px"})}]})};un.pluginName="useAbsoluteLayout";var je=function(e,t){return[e,{style:{position:"relative",width:t.instance.totalColumnsWidth+"px"}}]},Ze={display:"inline-block",boxSizing:"border-box"},et=function(e,t){return[e,{style:{display:"flex",width:t.instance.totalColumnsWidth+"px"}}]},ln=function(e){e.getRowProps.push(et),e.getHeaderGroupProps.push(et),e.getFooterGroupProps.push(et),e.getHeaderProps.push(function(t,n){var r=n.column;return[t,{style:u({},Ze,{width:r.totalWidth+"px"})}]}),e.getCellProps.push(function(t,n){var r=n.cell;return[t,{style:u({},Ze,{width:r.column.totalWidth+"px"})}]}),e.getFooterProps.push(function(t,n){var r=n.column;return[t,{style:u({},Ze,{width:r.totalWidth+"px"})}]})};function cn(e){e.getTableProps.push(Yr),e.getRowProps.push(tt),e.getHeaderGroupProps.push(tt),e.getFooterGroupProps.push(tt),e.getHeaderProps.push(Zr),e.getCellProps.push(eo),e.getFooterProps.push(to)}ln.pluginName="useBlockLayout",cn.pluginName="useFlexLayout";var Yr=function(e,t){return[e,{style:{minWidth:t.instance.totalColumnsMinWidth+"px"}}]},tt=function(e,t){return[e,{style:{display:"flex",flex:"1 0 auto",minWidth:t.instance.totalColumnsMinWidth+"px"}}]},Zr=function(e,t){var n=t.column;return[e,{style:{boxSizing:"border-box",flex:n.totalFlexWidth?n.totalFlexWidth+" 0 auto":void 0,minWidth:n.totalMinWidth+"px",width:n.totalWidth+"px"}}]},eo=function(e,t){var n=t.cell;return[e,{style:{boxSizing:"border-box",flex:n.column.totalFlexWidth+" 0 auto",minWidth:n.column.totalMinWidth+"px",width:n.column.totalWidth+"px"}}]},to=function(e,t){var n=t.column;return[e,{style:{boxSizing:"border-box",flex:n.totalFlexWidth?n.totalFlexWidth+" 0 auto":void 0,minWidth:n.totalMinWidth+"px",width:n.totalWidth+"px"}}]};function dn(e){e.stateReducers.push(oo),e.getTableProps.push(no),e.getHeaderProps.push(ro)}dn.pluginName="useGridLayout";var no=function(e,t){return[e,{style:{display:"grid",gridTemplateColumns:t.instance.state.gridLayout.columnWidths.map(function(n){return n}).join(" ")}}]},ro=function(e,t){return[e,{id:"header-cell-"+t.column.id,style:{position:"sticky"}}]};function oo(e,t,n,r){if(t.type==="init")return u({gridLayout:{columnWidths:r.columns.map(function(){return"auto"})}},e);if(t.type==="columnStartResizing"){var a=t.columnId,o=r.visibleColumns.findIndex(function(h){return h.id===a}),i=function(h){var b,P=(b=document.getElementById("header-cell-"+h))==null?void 0:b.offsetWidth;if(P!==void 0)return P}(a);return i!==void 0?u({},e,{gridLayout:u({},e.gridLayout,{columnId:a,columnIndex:o,startingWidth:i})}):e}if(t.type==="columnResizing"){var f=e.gridLayout,g=f.columnIndex,m=f.startingWidth,C=f.columnWidths,w=m-(e.columnResizing.startX-t.clientX),R=[].concat(C);return R[g]=w+"px",u({},e,{gridLayout:u({},e.gridLayout,{columnWidths:R})})}}l._UNSTABLE_usePivotColumns=Zt,l.actions=c,l.defaultColumn=Q,l.defaultGroupByFn=Ut,l.defaultOrderByFn=Jt,l.defaultRenderer=X,l.emptyRenderer=q,l.ensurePluginOrder=oe,l.flexRender=pe,l.functionalUpdate=Z,l.loopHooks=ne,l.makePropGetter=V,l.makeRenderer=ce,l.reduceHooks=J,l.safeUseLayoutEffect=me,l.useAbsoluteLayout=un,l.useAsyncDebounce=function(e,t){t===void 0&&(t=0);var n=s.useRef({}),r=W(e),a=W(t);return s.useCallback(function(){var o=y(regeneratorRuntime.mark(function i(){var f,g,m,C=arguments;return regeneratorRuntime.wrap(function(w){for(;;)switch(w.prev=w.next){case 0:for(f=C.length,g=new Array(f),m=0;m<f;m++)g[m]=C[m];return n.current.promise||(n.current.promise=new Promise(function(R,h){n.current.resolve=R,n.current.reject=h})),n.current.timeout&&clearTimeout(n.current.timeout),n.current.timeout=setTimeout(y(regeneratorRuntime.mark(function R(){return regeneratorRuntime.wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return delete n.current.timeout,h.prev=1,h.t0=n.current,h.next=5,r().apply(void 0,g);case 5:h.t1=h.sent,h.t0.resolve.call(h.t0,h.t1),h.next=12;break;case 9:h.prev=9,h.t2=h.catch(1),n.current.reject(h.t2);case 12:return h.prev=12,delete n.current.promise,h.finish(12);case 15:case"end":return h.stop()}},R,null,[[1,9,12,15]])})),a()),w.abrupt("return",n.current.promise);case 5:case"end":return w.stop()}},i)}));return function(){return o.apply(this,arguments)}}(),[r,a])},l.useBlockLayout=ln,l.useColumnOrder=an,l.useExpanded=_t,l.useFilters=Lt,l.useFlexLayout=cn,l.useGetLatest=W,l.useGlobalFilter=Dt,l.useGridLayout=dn,l.useGroupBy=Kt,l.useMountedLayoutEffect=re,l.usePagination=Yt,l.useResizeColumns=sn,l.useRowSelect=tn,l.useRowState=on,l.useSortBy=Qt,l.useTable=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];e=Tt(e),n=[Bt].concat(n);var a=s.useRef({}),o=W(a.current);Object.assign(o(),u({},e,{plugins:n,hooks:Dn()})),n.filter(Boolean).forEach(function(F){F(o().hooks)});var i=W(o().hooks);o().getHooks=i,delete o().hooks,Object.assign(o(),J(i().useOptions,Tt(e)));var f=o(),g=f.data,m=f.columns,C=f.initialState,w=f.defaultColumn,R=f.getSubRows,h=f.getRowId,b=f.stateReducer,P=f.useControlledState,S=W(b),I=s.useCallback(function(F,Y){if(!Y.type)throw console.info({action:Y}),new Error("Unknown Action \u{1F446}");return[].concat(i().stateReducers,Array.isArray(S())?S():[S()]).reduce(function(ae,le){return le(ae,Y,F,o())||ae},F)},[i,S,o]),H=s.useReducer(I,void 0,function(){return I(C,{type:c.init})}),k=H[0],x=H[1],K=J([].concat(i().useControlledState,[P]),k,{instance:o()});Object.assign(o(),{state:K,dispatch:x});var A=s.useMemo(function(){return ye(J(i().columns,m,{instance:o()}))},[i,o,m].concat(J(i().columnsDeps,[],{instance:o()})));o().columns=A;var G=s.useMemo(function(){return J(i().allColumns,ge(A),{instance:o()}).map(Re)},[A,i,o].concat(J(i().allColumnsDeps,[],{instance:o()})));o().allColumns=G;var j=s.useMemo(function(){for(var F=[],Y=[],ae={},le=[].concat(G);le.length;){var se=le.shift();tr({data:g,rows:F,flatRows:Y,rowsById:ae,column:se,getRowId:h,getSubRows:R,accessValueHooks:i().accessValue,getInstance:o})}return[F,Y,ae]},[G,g,h,R,i,o]),T=j[0],O=j[1],$=j[2];Object.assign(o(),{rows:T,initialRows:[].concat(T),flatRows:O,rowsById:$}),ne(i().useInstanceAfterData,o());var N=s.useMemo(function(){return J(i().visibleColumns,G,{instance:o()}).map(function(F){return he(F,w)})},[i,G,o,w].concat(J(i().visibleColumnsDeps,[],{instance:o()})));G=s.useMemo(function(){var F=[].concat(N);return G.forEach(function(Y){F.find(function(ae){return ae.id===Y.id})||F.push(Y)}),F},[G,N]),o().allColumns=G;var D=s.useMemo(function(){return J(i().headerGroups,Pt(N,w),o())},[i,N,w,o].concat(J(i().headerGroupsDeps,[],{instance:o()})));o().headerGroups=D;var L=s.useMemo(function(){return D.length?D[0].headers:[]},[D]);o().headers=L,o().flatHeaders=D.reduce(function(F,Y){return[].concat(F,Y.headers)},[]),ne(i().useInstanceBeforeDimensions,o());var U=N.filter(function(F){return F.isVisible}).map(function(F){return F.id}).sort().join("_");N=s.useMemo(function(){return N.filter(function(F){return F.isVisible})},[N,U]),o().visibleColumns=N;var E=Ft(L),z=E[0],te=E[1],ue=E[2];return o().totalColumnsMinWidth=z,o().totalColumnsWidth=te,o().totalColumnsMaxWidth=ue,ne(i().useInstance,o()),[].concat(o().flatHeaders,o().allColumns).forEach(function(F){F.render=ce(o(),F),F.getHeaderProps=V(i().getHeaderProps,{instance:o(),column:F}),F.getFooterProps=V(i().getFooterProps,{instance:o(),column:F})}),o().headerGroups=s.useMemo(function(){return D.filter(function(F,Y){return F.headers=F.headers.filter(function(ae){return ae.headers?function le(se){return se.filter(function(be){return be.headers?le(be.headers):be.isVisible}).length}(ae.headers):ae.isVisible}),!!F.headers.length&&(F.getHeaderGroupProps=V(i().getHeaderGroupProps,{instance:o(),headerGroup:F,index:Y}),F.getFooterGroupProps=V(i().getFooterGroupProps,{instance:o(),headerGroup:F,index:Y}),!0)})},[D,o,i]),o().footerGroups=[].concat(o().headerGroups).reverse(),o().prepareRow=s.useCallback(function(F){F.getRowProps=V(i().getRowProps,{instance:o(),row:F}),F.allCells=G.map(function(Y){var ae=F.values[Y.id],le={column:Y,row:F,value:ae};return le.getCellProps=V(i().getCellProps,{instance:o(),cell:le}),le.render=ce(o(),Y,{row:F,cell:le,value:ae}),le}),F.cells=N.map(function(Y){return F.allCells.find(function(ae){return ae.column.id===Y.id})}),ne(i().prepareRow,F,{instance:o()})},[i,o,G,N]),o().getTableProps=V(i().getTableProps,{instance:o()}),o().getTableBodyProps=V(i().getTableBodyProps,{instance:o()}),ne(i().useFinalInstance,o()),o()},Object.defineProperty(l,"__esModule",{value:!0})})})(St,St.exports);Ct.exports=St.exports;const ia="_tr_198pq_1",sa="_th_198pq_7",ua="_td_198pq_24",la="_odd_198pq_30",ca="_du_198pq_35",da="_sortIconContainer_198pq_39",fa="_rotate180_198pq_46";var Pe={tr:ia,th:sa,td:ua,odd:la,du:ca,sortIconContainer:da,rotate180:fa};const Ae=!0,pa=[{accessor:"id",show:!1},{Header:"Host",accessor:"host"},{Header:"DL",accessor:"download",sortDescFirst:Ae},{Header:"UL",accessor:"upload",sortDescFirst:Ae},{Header:"DL Speed",accessor:"downloadSpeedCurr",sortDescFirst:Ae},{Header:"UL Speed",accessor:"uploadSpeedCurr",sortDescFirst:Ae},{Header:"Chains",accessor:"chains"},{Header:"Rule",accessor:"rule"},{Header:"Time",accessor:"start",sortDescFirst:Ae},{Header:"Source",accessor:"source"},{Header:"Destination IP",accessor:"destinationIP"},{Header:"Type",accessor:"type"}];function ga(d){switch(d.column.id){case"start":return Oo(d.value,0);case"download":case"upload":return Rn(d.value);case"downloadSpeedCurr":case"uploadSpeedCurr":return Rn(d.value)+"/s";default:return d.value}}const va={id:"id",desc:!0},ma={sortBy:[va],hiddenColumns:["id"]};function ha({data:d}){const{getTableProps:p,headerGroups:l,rows:s,prepareRow:v}=Ct.exports.useTable({columns:pa,data:d,initialState:ma,autoResetSortBy:!1},Ct.exports.useSortBy);return _.createElement("div",xe({},p()),l.map(y=>_.createElement("div",Te(xe({},y.getHeaderGroupProps()),{className:Pe.tr}),y.headers.map(u=>_.createElement("div",Te(xe({},u.getHeaderProps(u.getSortByToggleProps())),{className:Pe.th}),_.createElement("span",null,u.render("Header")),_.createElement("span",{className:Pe.sortIconContainer},u.isSorted?_.createElement("span",{className:u.isSortedDesc?"":Pe.rotate180},_.createElement(bo,{size:16})):null))),s.map((u,B)=>(v(u),u.cells.map((M,c)=>_.createElement("div",Te(xe({},M.getCellProps()),{className:Ce(Pe.td,B%2==0?Pe.odd:!1,c>=1&&c<=4?Pe.du:!1)}),ga(M))))))))}const ya="_overlay_148w6_1",ba="_cnt_148w6_5",wa="_afterOpen_148w6_15",Ra="_btngrp_148w6_20";var qe={overlay:ya,cnt:ba,afterOpen:wa,btngrp:Ra};const{useRef:Ca,useCallback:Sa,useMemo:Pa}=_;function xa({isOpen:d,onRequestClose:p,primaryButtonOnTap:l}){const s=Ca(null),v=Sa(()=>{s.current.focus()},[]),y=Pa(()=>({base:Ce(Cn.content,qe.cnt),afterOpen:qe.afterOpen,beforeClose:""}),[]);return _.createElement(wo,{isOpen:d,onRequestClose:p,onAfterOpen:v,className:y,overlayClassName:Ce(Cn.overlay,qe.overlay)},_.createElement("p",null,"Are you sure you want to close all connections?"),_.createElement("div",{className:qe.btngrp},_.createElement(Sn,{onClick:l,ref:s},"I'm sure"),_.createElement("div",{style:{width:20}}),_.createElement(Sn,{onClick:p},"No")))}const{useEffect:Ea,useState:Ge,useRef:Ia,useCallback:Ne}=_,Tn=30;function Ba(d){const p={};for(let l=0;l<d.length;l++){const s=d[l];p[s.id]=s}return p}function Ta(d,p){return d.toLowerCase().includes(p.toLowerCase())}function Fn(d,p){return p?d.filter(l=>[l.host,l.sourceIP,l.sourcePort,l.destinationIP,l.chains,l.rule,l.type,l.network].some(s=>Ta(s,p))):d}function Fa(d,p,l){const{id:s,metadata:v,upload:y,download:u,start:B,chains:M,rule:c}=d,{host:X,destinationPort:q,destinationIP:Q,network:ee,type:V,sourceIP:J,sourcePort:ne}=v;let oe=X;oe===""&&(oe=Q);const Z=p[s];return Te(xe({id:s,upload:y,download:u,start:l-new Date(B).valueOf(),chains:M.reverse().join(" / "),rule:c},v),{host:`${oe}:${q}`,type:`${V}(${ee})`,source:`${J}:${ne}`,downloadSpeedCurr:u-(Z?Z.download:0),uploadSpeedCurr:y-(Z?Z.upload:0)})}function _n(d){return d.length>0?_.createElement(ha,{data:d}):_.createElement("div",{className:Oe.placeHolder},_.createElement(To,{width:200,height:200,c1:"var(--color-text)"}))}function On({qty:d}){return d<100?""+d:"99+"}function _a({apiConfig:d}){const[p,l]=_o(),[s,v]=Ge([]),[y,u]=Ge([]),[B,M]=Ge(""),c=Fn(s,B),X=Fn(y,B),[q,Q]=Ge(!1),ee=Ne(()=>Q(!0),[]),V=Ne(()=>Q(!1),[]),[J,ne]=Ge(!1),oe=Ne(()=>{ne(ce=>!ce)},[]),Z=Ne(()=>{Eo(d),V()},[d,V]),W=Ia(s),me=Ne(({connections:ce})=>{const pe=Ba(W.current),ye=Date.now(),ge=ce.map(he=>Fa(he,pe,ye)),Re=[];for(const he of W.current)ge.findIndex(ke=>ke.id===he.id)<0&&Re.push(he);u(he=>[...Re,...he].slice(0,101)),ge&&(ge.length!==0||W.current.length!==0)&&!J?(W.current=ge,v(ge)):W.current=ge},[v,J]);Ea(()=>Io(d,me),[d,me]);const{t:re}=Ro();return _.createElement("div",null,_.createElement(Bo,{title:re("Connections")}),_.createElement(Ke,null,_.createElement("div",{style:{display:"flex",flexWrap:"wrap",justifyContent:"space-between"}},_.createElement(Ue,null,_.createElement(Fe,null,_.createElement("span",null,re("Active")),_.createElement("span",{className:Oe.connQty},_.createElement(On,{qty:c.length}))),_.createElement(Fe,null,_.createElement("span",null,re("Closed")),_.createElement("span",{className:Oe.connQty},_.createElement(On,{qty:X.length})))),_.createElement("div",{className:Oe.inputWrapper},_.createElement("input",{type:"text",name:"filter",autoComplete:"off",className:Oe.input,placeholder:"Filter",onChange:ce=>M(ce.target.value)}))),_.createElement("div",{ref:p,style:{padding:30,paddingBottom:Tn,paddingTop:0}},_.createElement("div",{style:{height:l-Tn,overflow:"auto"}},_.createElement(_e,null,_.createElement(_.Fragment,null,_n(c)),_.createElement(Ao,{icon:J?_.createElement(Co,{size:16}):_.createElement(So,{size:16}),mainButtonStyles:J?{background:"#e74c3c"}:{},style:Go,text:re(J?"Resume Refresh":"Pause Refresh"),onClick:oe},_.createElement(No,{text:"Close All Connections",onClick:ee},_.createElement(Po,{size:10})))),_.createElement(_e,null,_n(X)))),_.createElement(xa,{isOpen:q,primaryButtonOnTap:Z,onRequestClose:V})))}const Oa=d=>({apiConfig:Fo(d)});var Wa=xo(Oa)(_a);export{Wa as default};
diff --git a/applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/Connections.ceacb570.js b/applications/luci-app-openclash/root/usr/share/openclash/yacd/assets/Connections.ceacb570.js
new file mode 100644 (file)
index 0000000..1cd630b
--- /dev/null
@@ -0,0 +1 @@
+var e=Object.defineProperty,t=Object.defineProperties,n=Object.getOwnPropertyDescriptors,r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,u=(t,n,r)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,a=(e,t)=>{for(var n in t||(t={}))o.call(t,n)&&u(e,n,t[n]);if(r)for(var n of r(t))i.call(t,n)&&u(e,n,t[n]);return e},s=(e,r)=>t(e,n(r));import{r as l,R as c,g as d,A as f,C as p,M as g,k as v,P as m,D as h,X as y}from"./vendor.3b6f54f7.js";import{p as b,m as w,B as R,c as C,a&nbs