All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] [yocto-autobuilder-helper] M10: Metrics view: CVEs per branch section and M11: Unify metrics views
@ 2024-04-18  9:49 Ninette Adhikari
  2024-04-18  9:49 ` [PATCH 1/2] cve-report: Reformat txt recipe list per branch Ninette Adhikari
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Ninette Adhikari @ 2024-04-18  9:49 UTC (permalink / raw)
  To: yocto-patches; +Cc: engineering, hulkoba

From: hulkoba <jacoba@neighbourhood.ie>

This work is done according to "Milestone 10: Metrics view: CVEs per branch section and 
Milestone 11: Unify metrics views" as stated in the Scope of Work with
Sovereign Tech Fund (STF) (https://www.sovereigntechfund.de/).

This patch affects the repository: https://git.yoctoproject.org/yocto-autobuilder-helper

This change does:
- Don't create chartdata-lastyear.json files because they are not needed anymore
- Change format for generated cve-per-branch-report so it can be interpreted by the metrics view:

```
...
CVE counts by recipes:

linux-yocto: 134
  https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-1999-0524
  https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-1999-0656
...
}
```

Ninette Adhikari (1):
  cve-report: Reformat txt recipe list per branch

hulkoba (1):
  generate-chartdata: do not create lastyear json files

 scripts/cve-generate-chartdata          | 16 +-----------
 scripts/cve-report.py                   | 34 +++++++++++++------------
 scripts/patchmetrics-generate-chartdata |  8 +-----
 scripts/run-cvecheck                    |  1 -
 4 files changed, 20 insertions(+), 39 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/2] cve-report: Reformat txt recipe list per branch
  2024-04-18  9:49 [PATCH 0/2] [yocto-autobuilder-helper] M10: Metrics view: CVEs per branch section and M11: Unify metrics views Ninette Adhikari
@ 2024-04-18  9:49 ` Ninette Adhikari
  2024-04-18  9:49 ` [PATCH 2/2] generate-chartdata: do not create lastyear json files Ninette Adhikari
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Ninette Adhikari @ 2024-04-18  9:49 UTC (permalink / raw)
  To: yocto-patches; +Cc: engineering, Ninette Adhikari

From: Ninette Adhikari <13760198+ninetteadhikari@users.noreply.github.com>

Yocto gathers the amount of CVEs per branch at the top of their metrics view.
However, the presentation of this information is not descriptive enough and it’s spread across several files.
This change adds collapsible, nested lists to show all cve information.

Show current CVE count per release,
parse txt files with CVE lists to group them by project and display their total CVE count.
Inline this data on the matrics-page in details elements so there’s no need to navigate away.

The current output includes the count of cve's and the cve-urls. No data is lost here, it looks like:

CVE counts by recipes:

linux-yocto: 134
  https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-1999-0524
  https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-1999-0656
  ...

bluez5: 2
  https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2022-3563
  https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2022-3637
...
---
 scripts/cve-report.py | 34 ++++++++++++++++++----------------
 1 file changed, 18 insertions(+), 16 deletions(-)

diff --git a/scripts/cve-report.py b/scripts/cve-report.py
index 203ea6d..38f3069 100755
--- a/scripts/cve-report.py
+++ b/scripts/cve-report.py
@@ -12,7 +12,6 @@ with open(jsonfile) as f:
     cvedata = json.load(f)
 
 cves = dict()
-recipe_counts = {}
 
 for recipe in cvedata['package']:
     if recipe['name'] in ignored_recipes:
@@ -24,21 +23,24 @@ for recipe in cvedata['package']:
             if i["id"] in cves:
                 cves[i["id"]] += ":" + recipe['name']
             else:
-                 cves[i["id"]] = recipe['name']
+                cves[i["id"]] = recipe['name']
 
-print("Found %d unpatched CVEs" % len(cves))
-for cve in sorted(cves.keys()):
-    print("%s: %s https://web.nvd.nist.gov/view/vuln/detail?vulnId=%s *" % (cve, cves[cve], cve))
+recipe_counts = {}
 
-for cve in cves:
-    recipename = cves[cve]
-    if recipename in recipe_counts:
-        recipe_counts[recipename] += 1
+for cve, name in cves.items():
+    if name not in recipe_counts:
+        recipe_counts[name] = {'count': 1, 'cves': [f"https://web.nvd.nist.gov/view/vuln/detail?vulnId={cve}"]}
     else:
-        recipe_counts[recipename] = 1
-
-
-print("\n")
-print("Summary of CVE counts by recipes:\n")
-for recipe, count in sorted(recipe_counts.items(), key=lambda x: x[1], reverse=True):
-    print("  %s: %s" % (recipe, count))
+        recipe_counts[name]['count'] += 1
+        recipe_counts[name]['cves'].append(f"https://web.nvd.nist.gov/view/vuln/detail?vulnId={cve}")
+
+formatted_data = {}
+for name, info in sorted(recipe_counts.items(), key=lambda x:x[1]['count'], reverse= True):
+    formatted_data[f"{name}: {info['count']}"] = info['cves']
+
+print("CVE counts by recipes:")
+for name, cves in formatted_data.items():
+    print("")
+    print(name)
+    for cve in cves:
+        print(f"  {cve}")
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/2] generate-chartdata: do not create lastyear json files
  2024-04-18  9:49 [PATCH 0/2] [yocto-autobuilder-helper] M10: Metrics view: CVEs per branch section and M11: Unify metrics views Ninette Adhikari
  2024-04-18  9:49 ` [PATCH 1/2] cve-report: Reformat txt recipe list per branch Ninette Adhikari
@ 2024-04-18  9:49 ` Ninette Adhikari
  2024-04-18  9:49 ` [PATCH 0/4] [yocto-metrics] M10: Metrics view: CVEs per branch section and M11: Unify metrics views Ninette Adhikari
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Ninette Adhikari @ 2024-04-18  9:49 UTC (permalink / raw)
  To: yocto-patches; +Cc: engineering, hulkoba

From: hulkoba <jacoba@neighbourhood.ie>

the two html files, index.html and index-full.html,
got merged so we only need the json file with the complete set of data.
---
 scripts/cve-generate-chartdata          | 16 +---------------
 scripts/patchmetrics-generate-chartdata |  8 +-------
 scripts/run-cvecheck                    |  1 -
 3 files changed, 2 insertions(+), 23 deletions(-)

diff --git a/scripts/cve-generate-chartdata b/scripts/cve-generate-chartdata
index dbbbe82..e187f8b 100755
--- a/scripts/cve-generate-chartdata
+++ b/scripts/cve-generate-chartdata
@@ -6,7 +6,7 @@ import subprocess
 import tempfile
 from datetime import datetime, date, timedelta
 
-args = argparse.ArgumentParser(description="Generate CVE count data files")
+args = argparse.ArgumentParser(description="Generate CVE count data file")
 args.add_argument("-j", "--json", help="JSON data file to use")
 args.add_argument("-r", "--resultsdir", help="results directory to parse")
 args = args.parse_args()
@@ -18,16 +18,12 @@ except FileNotFoundError:
     # if the file does not exist, start with an empty database.
     counts = {}
 
-lastyear = {}
-
 #
 # Write CVE counts by day
 #
 def round_to_day(val):
     return int((datetime.fromtimestamp(int(val)).date() - date(1970, 1, 1)).total_seconds())
 
-a_year_ago = (datetime.now() - timedelta(days=365) - datetime(1970, 1, 1)).total_seconds()
-
 for branch in os.listdir(args.resultsdir):
     branchdir = os.path.join(args.resultsdir, branch)
     for f in os.listdir(branchdir):
@@ -51,15 +47,5 @@ for branch in os.listdir(args.resultsdir):
             print("Adding count %s for branch %s from file %s (ts %s)" % (count, branch, cvereport, rounded_ts))
             counts[rounded_ts][branch] = str(count)
 
-for c in counts:
-    if int(c) > a_year_ago:
-        lastyear[c] = counts[c]
-
 with open(args.json, "w") as f:
     json.dump(counts, f, sort_keys=True, indent="\t")
-
-with open(args.json.replace(".json", "-lastyear.json") , "w") as f:
-    json.dump(lastyear, f, sort_keys=True, indent="\t")
-
-
-
diff --git a/scripts/patchmetrics-generate-chartdata b/scripts/patchmetrics-generate-chartdata
index 2c85fb1..1b83270 100755
--- a/scripts/patchmetrics-generate-chartdata
+++ b/scripts/patchmetrics-generate-chartdata
@@ -6,7 +6,7 @@ import subprocess
 import tempfile
 from datetime import datetime, date, timedelta
 
-args = argparse.ArgumentParser(description="Generate Patch Metric Chart data files")
+args = argparse.ArgumentParser(description="Generate Patch Metric Chart data file")
 args.add_argument("-j", "--json", help="JSON data file to use")
 args.add_argument("-o", "--outputdir", help="output directory")
 args = args.parse_args()
@@ -30,10 +30,7 @@ json.dump(latest, open(args.outputdir + "/patch-status-pie.json", "w"), sort_key
 def round_to_day(val):
     return int((datetime.fromtimestamp(int(val)).date() - date(1970, 1, 1)).total_seconds())
 
-a_year_ago = (datetime.now() - timedelta(days=365) - datetime(1970, 1, 1)).total_seconds()
-
 newdata = []
-lastyeardata = []
 databydate = {}
 for i in data:
     rounded = round_to_day(i['date'])
@@ -47,8 +44,5 @@ for i in databydate:
         if todel in databydate[i]:
             del databydate[i][todel]
     newdata.append(databydate[i])
-    if int(databydate[i]['date']) > a_year_ago:
-        lastyeardata.append(databydate[i])
 
 json.dump(newdata, open(args.outputdir + "/patch-status-byday.json", "w"), sort_keys=True, indent="\t")
-json.dump(lastyeardata, open(args.outputdir + "/patch-status-byday-lastyear.json", "w"), sort_keys=True, indent="\t")
diff --git a/scripts/run-cvecheck b/scripts/run-cvecheck
index 373f57c..d22dc82 100755
--- a/scripts/run-cvecheck
+++ b/scripts/run-cvecheck
@@ -105,5 +105,4 @@ if [ "$BRANCH" = "master" ]; then
     fi
 
     cp $METRICSDIR/cve-count-byday.json $RESULTSDIR
-    cp $METRICSDIR/cve-count-byday-lastyear.json $RESULTSDIR
 fi
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 0/4] [yocto-metrics] M10: Metrics view: CVEs per branch section and M11: Unify metrics views
  2024-04-18  9:49 [PATCH 0/2] [yocto-autobuilder-helper] M10: Metrics view: CVEs per branch section and M11: Unify metrics views Ninette Adhikari
  2024-04-18  9:49 ` [PATCH 1/2] cve-report: Reformat txt recipe list per branch Ninette Adhikari
  2024-04-18  9:49 ` [PATCH 2/2] generate-chartdata: do not create lastyear json files Ninette Adhikari
@ 2024-04-18  9:49 ` Ninette Adhikari
  2024-04-18  9:49 ` [PATCH 1/4] patch-status: merge index- and index-full.html Ninette Adhikari
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Ninette Adhikari @ 2024-04-18  9:49 UTC (permalink / raw)
  To: yocto-patches; +Cc: engineering, hulkoba

From: hulkoba <jacoba@neighbourhood.ie>

This work is done according to "Milestone 10: Metrics view: CVEs per branch section and 
Milestone 11: Unify metrics views" as stated in the Scope of Work with
Sovereign Tech Fund (STF) (https://www.sovereigntechfund.de/).

This patch affects the repository: https://git.yoctoproject.org/yocto-metrics/

Yocto currently maintains two views to display metrics: a multi-year and a single-year view.
Unifying them facilitates a more seamless user experience, and improves the maintenance of the website.
Yocto gathers the amount of CVEs per branch at the top of their metrics view.
However, the presentation of this information is not descriptive enough and it’s spread across several files.
This change adds collapsible, nested lists to show all cve information.

Technical details:
- Remove index-full.hmtl and only load the complete set of data
- Use pico.css to improve UX
- Use echarts and add a separate controls section (zoom) for this purpose and remove interactivity from the old charts themselves
- Load releases.csv only once
- Show current CVE count per release, parse txt files with CVE lists to group them by project and display their total CVE count.
  Inline this data on the page in details elements so there’s no need to navigate away.
- Handle dark mode

Note that there will be another patch for the autobuilder-helper project where we update the data that is used.

Please also note that there will be another milestone for improving the charts.
It will improve performance, add descriptions and improve developer documentation.

Screenshots for Light theme
https://github.com/neighbourhoodie/yocto-autobuilder-helper/assets/4191287/f6d3013e-d192-4400-945c-9a2dfc8acb26
https://github.com/neighbourhoodie/yocto-autobuilder-helper/assets/4191287/4f90648f-f8df-4e25-8d6e-1fc16fa37223
https://github.com/neighbourhoodie/yocto-autobuilder-helper/assets/4191287/260d06a5-3048-482c-b005-ab96882d24c7

Screenshots for Dark theme
https://github.com/neighbourhoodie/yocto-autobuilder-helper/assets/4191287/a098e337-11c3-4188-811b-9652b8e40c13
https://github.com/neighbourhoodie/yocto-autobuilder-helper/assets/4191287/fd8797da-509e-445f-9d7b-5801b595fff9
https://github.com/neighbourhoodie/yocto-autobuilder-helper/assets/4191287/512334fd-5220-44dc-9dd2-550593fe8437

hulkoba (4):
  patch-status: merge index- and index-full.html
  patch-status/index.html: use pico.css
  patch-status/index.html: use echarts to display all charts
  index.html: show summary in a collapsible list

 patch-status/index-full.html                  | 266 ------
 patch-status/index.html                       | 754 ++++++++++++------
 patch-status/resources/echarts.min.js         |   1 +
 .../resources/pico.fluid.classless.min.css    |   4 +
 4 files changed, 495 insertions(+), 530 deletions(-)
 delete mode 100644 patch-status/index-full.html
 create mode 100644 patch-status/resources/echarts.min.js
 create mode 100644 patch-status/resources/pico.fluid.classless.min.css

-- 
2.34.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/4] patch-status: merge index- and index-full.html
  2024-04-18  9:49 [PATCH 0/2] [yocto-autobuilder-helper] M10: Metrics view: CVEs per branch section and M11: Unify metrics views Ninette Adhikari
                   ` (2 preceding siblings ...)
  2024-04-18  9:49 ` [PATCH 0/4] [yocto-metrics] M10: Metrics view: CVEs per branch section and M11: Unify metrics views Ninette Adhikari
@ 2024-04-18  9:49 ` Ninette Adhikari
  2024-04-18  9:49 ` [PATCH 2/4] patch-status/index.html: use pico.css Ninette Adhikari
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Ninette Adhikari @ 2024-04-18  9:49 UTC (permalink / raw)
  To: yocto-patches; +Cc: engineering, hulkoba

From: hulkoba <jacoba@neighbourhood.ie>

Yocto currently maintains two views to display metrics: a multi-year and a single-year view.
Unifying them facilitates a more seamless user experience, and improves the maintenance of the website.

This commit removes the index-full.html
---
 patch-status/index-full.html | 266 -----------------------------------
 patch-status/index.html      | 217 ++++++++++++++++++++++++++--
 2 files changed, 206 insertions(+), 277 deletions(-)
 delete mode 100644 patch-status/index-full.html

diff --git a/patch-status/index-full.html b/patch-status/index-full.html
deleted file mode 100644
index 8c410be5..00000000
--- a/patch-status/index-full.html
+++ /dev/null
@@ -1,266 +0,0 @@
-<html>
-<!--
-SPDX-License-Identifier: MIT
--->
-    <head>
-        <script src="https://d3js.org/d3.v5.min.js"></script>
-        <script src="https://cdnjs.cloudflare.com/ajax/libs/c3/0.6.0/c3.min.js"></script>
-        <link href="https://cdnjs.cloudflare.com/ajax/libs/c3/0.6.0/c3.min.css" rel="stylesheet">
-        <style>
-            .c3-line {
-                stroke-width: 2px;
-            }
-        </style>
-    </head>
-    <body>
-        <h1>Current CVE status for OE-Core/Poky</h1>
-        <ul>
-        <li><a href="cve-status-master.txt">master</a></li>
-        <li><a href="cve-status-nanbield.txt">nanbield</a></li>
-        <li><a href="cve-status-kirkstone.txt">kirkstone</a></li>
-        <li><a href="cve-status-dunfell.txt">dunfell</a></li>
-        </ul>
-
-        <h1>CVE Trends for OE-Core/Poky</h1>
-        <div id="cve_chart"></div>
-
-        <h1>Current Patch Status Pie</h1>
-        <div id="status_pie_chart"></div>
-
-        <h1>Patch Upstream-Status Counts (OE-Core meta directory)</h1>
-        <div id="upstream_status_chart"></div>
-
-        <h1>Patch Tag Error Counts (OE-Core meta directory)</h1>
-        <div id="malformed_chart"></div>
-
-        <h1>Recipe Count (OE-Core meta directory)</h1>
-        <div id="recipe_count_chart"></div>
-
-        <h2>Raw Data</h2>
-        <ul>
-        <li><a href="patch-status.json">patch-status.json</a></li>
-        <li><a href="patch-status-pie.json">patch-status-pie.json</a></li>
-        <li><a href="patch-status-byday.json">patch-status-byday.json</a></li>
-        <li><a href="cve-count-byday.json">cve-count-byday.json</a></li>
-        <li><a href="releases.csv">releases.csv</a></li>
-        </ul>
-
-        <script type="text/javascript">
-            var valid_status = ['pending', 'backport', 'inappropriate', 'accepted', 'submitted', 'denied'];
-            var label_names = {
-                pending: "Pending",
-                backport: "Backport",
-                inappropriate: "Inappropriate",
-                accepted: "Accepted",
-                submitted: "Submitted",
-                denied: "Denied",
-                total: "Total",
-                'malformed-sob': "Malformed Signed-off-by",
-                'malformed-upstream-status': "Malformed Upstream-Status"
-            };
-
-            d3.json("patch-status-pie.json").then(function(data) {
-                var chart = c3.generate({
-                    bindto: '#status_pie_chart',
-                    data: {
-                        json: [data],
-                        keys: {
-                            value: valid_status
-                        },
-                        type: "pie",
-                        names: label_names
-                    },
-                    pie: {
-                        label: {
-                            format: function (value, ratio, id) {
-                                return d3.format('.0%')(ratio);
-                            }
-                        }
-                    }
-                });
-            });
-
-            d3.dsv(",", "releases.csv", function(d) {
-                return {
-                    value: new Date(d.Date),
-                    text: d.Name
-                };
-            }).then(function(release_lines) {
-                d3.json("cve-count-byday.json").then(function(cve_data) {
-                    cve_data2 = []
-                    for (var key in cve_data) {
-                        cve_data[key].date = key
-                        cve_data2.push(cve_data[key])
-                    }
-
-                    var chart = c3.generate({
-                        bindto: '#cve_chart',
-                        data: {
-                            json: cve_data2,
-                            xFormat: "%s",
-                            keys: {
-                                x: "date",
-                                value: ['master', 'nanbield', 'mickledore', 'langdale', 'kirkstone', 'honister', 'hardknott', 'gatesgarth', 'dunfell']
-                            },
-                            type: "line",
-                            names: label_names
-                        },
-                        axis: {
-                            x: {
-                                type: 'timeseries',
-                                tick: {
-                                    format: '%Y-%m-%d'
-                                },
-                                localtime: false
-                            },
-                            y: {
-                                min: 0,
-                                padding: {bottom:0}
-                            }
-                        },
-                        grid: {
-                            x: {
-                                lines: release_lines
-                            },
-                            y: {
-                                show: true
-                            }
-                        },
-                        zoom: {
-                            enabled: true
-                        },
-                        line: {
-                            connectNull: true
-                        },
-                        point: {
-                            show: false
-                        }
-                    });
-
-                });
-
-            });
-
-            d3.dsv(",", "releases.csv", function(d) {
-                return {
-                    value: new Date(d.Date),
-                    text: d.Name
-                };
-            }).then(function(release_lines) {
-                d3.json("patch-status-byday.json").then(function(status_data) {
-                    var chart = c3.generate({
-                        bindto: '#upstream_status_chart',
-                        data: {
-                            json: status_data,
-                            xFormat: "%s",
-                            keys: {
-                                x: "date",
-                                value: valid_status.concat(['total'])
-                            },
-                            type: "area",
-                            groups: [valid_status, ['total']],
-                            names: label_names
-                        },
-                        axis: {
-                            x: {
-                                type: 'timeseries',
-                                tick: {
-                                    format: '%Y-%m-%d'
-                                },
-                                localtime: false
-                            }
-                        },
-                        grid: {
-                            x: {
-                                lines: release_lines
-                            },
-                            y: {
-                                show: true
-                            }
-                        },
-                        zoom: {
-                            enabled: true
-                        },
-                        point: {
-                            show: false
-                        }
-                    });
-
-                    var chart = c3.generate({
-                        bindto: '#malformed_chart',
-                        data: {
-                            json: status_data,
-                            xFormat: "%s",
-                            keys: {
-                                x: "date",
-                                value: ['total', 'malformed-upstream-status', 'malformed-sob']
-                            },
-                            type: "area",
-                            names: label_names
-                        },
-                        axis: {
-                            x: {
-                                type: 'timeseries',
-                                tick: {
-                                    format: '%Y-%m-%d'
-                                },
-                                localtime: false
-                            }
-                        },
-                        grid: {
-                            x: {
-                                lines: release_lines
-                            },
-                            y: {
-                                show: true
-                            }
-                        },
-                        zoom: {
-                            enabled: true
-                        },
-                        point: {
-                            show: false
-                        }
-                    });
-                    var chart = c3.generate({
-                        bindto: '#recipe_count_chart',
-                        data: {
-                            json: status_data,
-                            xFormat: "%s",
-                            keys: {
-                                x: "date",
-                                value: ['recipe_count']
-                            },
-                            type: "area",
-                            names: label_names
-                        },
-                        axis: {
-                            x: {
-                                type: 'timeseries',
-                                tick: {
-                                    format: '%Y-%m-%d'
-                                },
-                                localtime: false
-                            }
-                        },
-                        grid: {
-                            x: {
-                                lines: release_lines
-                            },
-                            y: {
-                                show: true
-                            }
-                        },
-                        zoom: {
-                            enabled: true
-                        },
-                        point: {
-                            show: false
-                        }
-                    });
-
-                });
-            });
-        </script>
-    </body>
-</html>
diff --git a/patch-status/index.html b/patch-status/index.html
index f88e5cb5..b54beccd 100644
--- a/patch-status/index.html
+++ b/patch-status/index.html
@@ -23,28 +23,39 @@ SPDX-License-Identifier: MIT
 
         <p><a href="index-full.html">Multi year data</a></p>
 
-        <h1>CVE Trends for OE-Core/Poky</h1>
+        <h2>CVE Trends for OE-Core/Poky</h2>
         <div id="cve_chart"></div>
+        <h3>CVE Trends for OE-Core/Poky of the last year</h3>
+        <div id="cve_chart_lastyear"></div>
 
-        <h1>Current Patch Status Pie</h1>
+        <h2>Current Patch Status Pie</h2>
         <div id="status_pie_chart"></div>
 
-        <h1>Patch Upstream-Status Counts (OE-Core meta directory)</h1>
+        <h2>Patch Upstream-Status Counts (OE-Core meta directory)</h2>
         <div id="upstream_status_chart"></div>
+        <h3>Patch Upstream-Status Counts (OE-Core meta directory) from the last year</h3>
+        <div id="upstream_status_chart_lastyear"></div>
 
-        <h1>Patch Tag Error Counts (OE-Core meta directory)</h1>
+        <h2>Patch Tag Error Counts (OE-Core meta directory)</h2>
         <div id="malformed_chart"></div>
+        <h3>Patch Tag Error Counts (OE-Core meta directory) from the last year</h3>
+        <div id="malformed_chart_lastyear"></div>
 
-        <h1>Recipe Count (OE-Core meta directory)</h1>
+        <h2>Recipe Count (OE-Core meta directory)</h2>
         <div id="recipe_count_chart"></div>
+        <h3>Recipe Count (OE-Core meta directory) from the last year</h3>
+        <div id="recipe_count_chart_lastyear"></div>
 
-        <h2>Raw Data</h2>
+        <h3>Raw Data</h3>
         <ul>
-        <li><a href="patch-status.json">patch-status.json</a></li>
-        <li><a href="patch-status-pie.json">patch-status-pie.json</a></li>
-        <li><a href="patch-status-byday-lastyear.json">patch-status-byday.json</a></li>
-        <li><a href="cve-count-byday-lastyear.json">cve-count-byday.json</a></li>
-        <li><a href="releases.csv">releases.csv</a></li>
+            <li><a href="../patch-status.json">patch-status.json</a></li>
+            <li><a href="patch-status-pie.json">patch-status-pie.json</a></li>
+
+            <li><a href="patch-status-byday.json">patch-status-byday.json</a></li>
+            <li><a href="patch-status-byday-lastyear.json">patch-status-byday-lastyear.json</a></li>
+            <li><a href="../cve-count-byday.json">cve-count-byday.json</a></li>
+            <li><a href="../cve-count-byday-lastyear.json">cve-count-byday-lastyear.json</a></li>
+            <li><a href="releases.csv">releases.csv</a></li>
         </ul>
 
         <script type="text/javascript">
@@ -82,6 +93,7 @@ SPDX-License-Identifier: MIT
                 });
             });
 
+            // #cve_chart
             d3.dsv(",", "releases.csv", function(d) {
                 return {
                     value: new Date(d.Date),
@@ -141,6 +153,68 @@ SPDX-License-Identifier: MIT
 
                 });
 
+            });
+            // #cve_chart lastyear
+            d3.dsv(",", "releases.csv", function(d) {
+                return {
+                    value: new Date(d.Date),
+                    text: d.Name
+                };
+            }).then(function(release_lines) {
+                d3.json("../cve-count-byday_lastyear.json")
+                .then(function(cve_data) {
+                    cve_data2 = []
+                    for (var key in cve_data) {
+                        cve_data[key].date = key
+                        cve_data2.push(cve_data[key])
+                    }
+
+                    var chart = bb.generate({
+                        bindto: '#cve_chart_lastyear',
+                        data: {
+                            json: cve_data2,
+                            xFormat: "%s",
+                            keys: {
+                                x: "date",
+                                value: ['master', 'nanbield', 'mickledore', 'langdale', 'kirkstone', 'honister', 'hardknott', 'gatesgarth', 'dunfell']
+                            },
+                            type: "line",
+                            names: label_names
+                        },
+                        axis: {
+                            x: {
+                                type: 'timeseries',
+                                tick: {
+                                    format: '%Y-%m-%d'
+                                },
+                                localtime: false
+                            },
+                            y: {
+                                min: 0,
+                                padding: {bottom:0}
+                            }
+                        },
+                        grid: {
+                            x: {
+                                lines: release_lines
+                            },
+                            y: {
+                                show: true
+                            }
+                        },
+                        zoom: {
+                            enabled: true
+                        },
+                        line: {
+                            connectNull: true
+                        },
+                        point: {
+                            show: false
+                        }
+                    });
+
+                });
+
             });
 
             d3.dsv(",", "releases.csv", function(d) {
@@ -263,6 +337,127 @@ SPDX-License-Identifier: MIT
 
                 });
             });
+
+            d3.dsv(",", "releases.csv", function(d) {
+                return {
+                    value: new Date(d.Date),
+                    text: d.Name
+                };
+            }).then(function(release_lines) {
+                d3.json("patch-status-byday_lastyear.json").then(function(status_data) {
+                    var chart = bb.generate({
+                        bindto: '#upstream_status_chart_lastyear',
+                        data: {
+                            json: status_data,
+                            xFormat: "%s",
+                            keys: {
+                                x: "date",
+                                value: valid_status.concat(['total'])
+                            },
+                            type: "area",
+                            groups: [valid_status, ['total']],
+                            names: label_names
+                        },
+                        axis: {
+                            x: {
+                                type: 'timeseries',
+                                tick: {
+                                    format: '%Y-%m-%d'
+                                },
+                                localtime: false
+                            }
+                        },
+                        grid: {
+                            x: {
+                                lines: release_lines
+                            },
+                            y: {
+                                show: true
+                            }
+                        },
+                        zoom: {
+                            enabled: true
+                        },
+                        point: {
+                            show: false
+                        }
+                    });
+
+                    var chart = bb.generate({
+                        bindto: '#malformed_chart_last',
+                        data: {
+                            json: status_data,
+                            xFormat: "%s",
+                            keys: {
+                                x: "date",
+                                value: ['total', 'malformed-upstream-status', 'malformed-sob']
+                            },
+                            type: "area",
+                            names: label_names
+                        },
+                        axis: {
+                            x: {
+                                type: 'timeseries',
+                                tick: {
+                                    format: '%Y-%m-%d'
+                                },
+                                localtime: false
+                            }
+                        },
+                        grid: {
+                            x: {
+                                lines: release_lines
+                            },
+                            y: {
+                                show: true
+                            }
+                        },
+                        zoom: {
+                            enabled: true
+                        },
+                        point: {
+                            show: false
+                        }
+                    });
+                    var chart = bb.generate({
+                        bindto: '#recipe_count_chart_lastyear',
+                        data: {
+                            json: status_data,
+                            xFormat: "%s",
+                            keys: {
+                                x: "date",
+                                value: ['recipe_count']
+                            },
+                            type: "area",
+                            names: label_names
+                        },
+                        axis: {
+                            x: {
+                                type: 'timeseries',
+                                tick: {
+                                    format: '%Y-%m-%d'
+                                },
+                                localtime: false
+                            }
+                        },
+                        grid: {
+                            x: {
+                                lines: release_lines
+                            },
+                            y: {
+                                show: true
+                            }
+                        },
+                        zoom: {
+                            enabled: true
+                        },
+                        point: {
+                            show: false
+                        }
+                    });
+
+                });
+            });
         </script>
     </body>
 </html>
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/4] patch-status/index.html: use pico.css
  2024-04-18  9:49 [PATCH 0/2] [yocto-autobuilder-helper] M10: Metrics view: CVEs per branch section and M11: Unify metrics views Ninette Adhikari
                   ` (3 preceding siblings ...)
  2024-04-18  9:49 ` [PATCH 1/4] patch-status: merge index- and index-full.html Ninette Adhikari
@ 2024-04-18  9:49 ` Ninette Adhikari
  2024-04-18  9:49 ` [PATCH 3/4] patch-status/index.html: use echarts to display all charts Ninette Adhikari
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Ninette Adhikari @ 2024-04-18  9:49 UTC (permalink / raw)
  To: yocto-patches; +Cc: engineering, hulkoba

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=y, Size: 72044 bytes --]

From: hulkoba <jacoba@neighbourhood.ie>

to unify and improve UX
To improve the performance we download the pico.css file instead of fetching it on load.
---
 patch-status/index.html                             | 5 +++--
 patch-status/resources/pico.fluid.classless.min.css | 4 ++++
 2 files changed, 7 insertions(+), 2 deletions(-)
 create mode 100644 patch-status/resources/pico.fluid.classless.min.css

diff --git a/patch-status/index.html b/patch-status/index.html
index b54beccd..514e916f 100644
--- a/patch-status/index.html
+++ b/patch-status/index.html
@@ -6,6 +6,7 @@ SPDX-License-Identifier: MIT
         <script src="https://d3js.org/d3.v5.min.js"></script>
         <script src="https://cdnjs.cloudflare.com/ajax/libs/c3/0.6.0/c3.min.js"></script>
         <link href="https://cdnjs.cloudflare.com/ajax/libs/c3/0.6.0/c3.min.css" rel="stylesheet">
+        <link rel="stylesheet" href="pico.fluid.classless.min.css">
         <style>
             .c3-line {
                 stroke-width: 2px;
@@ -13,6 +14,7 @@ SPDX-License-Identifier: MIT
         </style>
     </head>
     <body>
+      <main>
         <h1>Current CVE status for OE-Core/Poky</h1>
         <ul>
         <li><a href="cve-status-master.txt">master</a></li>
@@ -21,7 +23,6 @@ SPDX-License-Identifier: MIT
         <li><a href="cve-status-dunfell.txt">dunfell</a></li>
         </ul>
 
-        <p><a href="index-full.html">Multi year data</a></p>
 
         <h2>CVE Trends for OE-Core/Poky</h2>
         <div id="cve_chart"></div>
@@ -57,7 +58,7 @@ SPDX-License-Identifier: MIT
             <li><a href="../cve-count-byday-lastyear.json">cve-count-byday-lastyear.json</a></li>
             <li><a href="releases.csv">releases.csv</a></li>
         </ul>
-
+      </main>
         <script type="text/javascript">
             var valid_status = ['pending', 'backport', 'inappropriate', 'accepted', 'submitted', 'denied'];
             var label_names = {
diff --git a/patch-status/resources/pico.fluid.classless.min.css b/patch-status/resources/pico.fluid.classless.min.css
new file mode 100644
index 00000000..143be8af
--- /dev/null
+++ b/patch-status/resources/pico.fluid.classless.min.css
@@ -0,0 +1,4 @@
+@charset "UTF-8";/*!
+ * Pico CSS ✨ v2.0.6 (https://picocss.com)
+ * Copyright 2019-2024 - Licensed under MIT
+ */:root{--pico-font-family-emoji:"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--pico-font-family-sans-serif:system-ui,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,Helvetica,Arial,"Helvetica Neue",sans-serif,var(--pico-font-family-emoji);--pico-font-family-monospace:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace,var(--pico-font-family-emoji);--pico-font-family:var(--pico-font-family-sans-serif);--pico-line-height:1.5;--pico-font-weight:400;--pico-font-size:100%;--pico-text-underline-offset:0.1rem;--pico-border-radius:0.25rem;--pico-border-width:0.0625rem;--pico-outline-width:0.125rem;--pico-transition:0.2s ease-in-out;--pico-spacing:1rem;--pico-typography-spacing-vertical:1rem;--pico-block-spacing-vertical:var(--pico-spacing);--pico-block-spacing-horizontal:var(--pico-spacing);--pico-form-element-spacing-vertical:0.75rem;--pico-form-element-spacing-horizontal:1rem;--pico-group-box-shadow:0 0 0 rgba(0, 0, 0, 0);--pico-group-box-shadow-focus-with-button:0 0 0 var(--pico-outline-width) var(--pico-primary-focus);--pico-group-box-shadow-focus-with-input:0 0 0 0.0625rem var(--pico-form-element-border-color);--pico-modal-overlay-backdrop-filter:blur(0.375rem);--pico-nav-element-spacing-vertical:1rem;--pico-nav-element-spacing-horizontal:0.5rem;--pico-nav-link-spacing-vertical:0.5rem;--pico-nav-link-spacing-horizontal:0.5rem;--pico-nav-breadcrumb-divider:">";--pico-icon-checkbox:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(255, 255, 255)' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");--pico-icon-minus:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(255, 255, 255)' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'%3E%3C/line%3E%3C/svg%3E");--pico-icon-chevron:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(136, 145, 164)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");--pico-icon-date:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(136, 145, 164)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");--pico-icon-time:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(136, 145, 164)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cpolyline points='12 6 12 12 16 14'%3E%3C/polyline%3E%3C/svg%3E");--pico-icon-search:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(136, 145, 164)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");--pico-icon-close:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(136, 145, 164)' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E");--pico-icon-loading:url("data:image/svg+xml,%3Csvg fill='none' height='24' width='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E g %7B animation: rotate 2s linear infinite; transform-origin: center center; %7D circle %7B stroke-dasharray: 75,100; stroke-dashoffset: -5; animation: dash 1.5s ease-in-out infinite; stroke-linecap: round; %7D @keyframes rotate %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D @keyframes dash %7B 0%25 %7B stroke-dasharray: 1,100; stroke-dashoffset: 0; %7D 50%25 %7B stroke-dasharray: 44.5,100; stroke-dashoffset: -17.5; %7D 100%25 %7B stroke-dasharray: 44.5,100; stroke-dashoffset: -62; %7D %7D %3C/style%3E%3Cg%3E%3Ccircle cx='12' cy='12' r='10' fill='none' stroke='rgb(136, 145, 164)' stroke-width='4' /%3E%3C/g%3E%3C/svg%3E")}@media (min-width:576px){:root{--pico-font-size:106.25%}}@media (min-width:768px){:root{--pico-font-size:112.5%}}@media (min-width:1024px){:root{--pico-font-size:118.75%}}@media (min-width:1280px){:root{--pico-font-size:125%}}@media (min-width:1536px){:root{--pico-font-size:131.25%}}a{--pico-text-decoration:underline}small{--pico-font-size:0.875em}h1,h2,h3,h4,h5,h6{--pico-font-weight:700}h1{--pico-font-size:2rem;--pico-line-height:1.125;--pico-typography-spacing-top:3rem}h2{--pico-font-size:1.75rem;--pico-line-height:1.15;--pico-typography-spacing-top:2.625rem}h3{--pico-font-size:1.5rem;--pico-line-height:1.175;--pico-typography-spacing-top:2.25rem}h4{--pico-font-size:1.25rem;--pico-line-height:1.2;--pico-typography-spacing-top:1.874rem}h5{--pico-font-size:1.125rem;--pico-line-height:1.225;--pico-typography-spacing-top:1.6875rem}h6{--pico-font-size:1rem;--pico-line-height:1.25;--pico-typography-spacing-top:1.5rem}tfoot td,tfoot th,thead td,thead th{--pico-font-weight:600;--pico-border-width:0.1875rem}code,kbd,pre,samp{--pico-font-family:var(--pico-font-family-monospace)}kbd{--pico-font-weight:bolder}:where(select,textarea),input:not([type=submit],[type=button],[type=reset],[type=checkbox],[type=radio],[type=file]){--pico-outline-width:0.0625rem}[type=search]{--pico-border-radius:5rem}[type=checkbox],[type=radio]{--pico-border-width:0.125rem}[type=checkbox][role=switch]{--pico-border-width:0.1875rem}[role=search]{--pico-border-radius:5rem}[role=group] [role=button],[role=group] [type=button],[role=group] [type=submit],[role=group] button,[role=search] [role=button],[role=search] [type=button],[role=search] [type=submit],[role=search] button{--pico-form-element-spacing-horizontal:2rem}details summary[role=button]::after{filter:brightness(0) invert(1)}[aria-busy=true]:not(input,select,textarea):is(button,[type=submit],[type=button],[type=reset],[role=button])::before{filter:brightness(0) invert(1)}:root:not([data-theme=dark]),[data-theme=light]{--pico-background-color:#fff;--pico-color:#373c44;--pico-text-selection-color:rgba(2, 154, 232, 0.25);--pico-muted-color:#646b79;--pico-muted-border-color:#e7eaf0;--pico-primary:#0172ad;--pico-primary-background:#0172ad;--pico-primary-border:var(--pico-primary-background);--pico-primary-underline:rgba(1, 114, 173, 0.5);--pico-primary-hover:#015887;--pico-primary-hover-background:#02659a;--pico-primary-hover-border:var(--pico-primary-hover-background);--pico-primary-hover-underline:var(--pico-primary-hover);--pico-primary-focus:rgba(2, 154, 232, 0.5);--pico-primary-inverse:#fff;--pico-secondary:#5d6b89;--pico-secondary-background:#525f7a;--pico-secondary-border:var(--pico-secondary-background);--pico-secondary-underline:rgba(93, 107, 137, 0.5);--pico-secondary-hover:#48536b;--pico-secondary-hover-background:#48536b;--pico-secondary-hover-border:var(--pico-secondary-hover-background);--pico-secondary-hover-underline:var(--pico-secondary-hover);--pico-secondary-focus:rgba(93, 107, 137, 0.25);--pico-secondary-inverse:#fff;--pico-contrast:#181c25;--pico-contrast-background:#181c25;--pico-contrast-border:var(--pico-contrast-background);--pico-contrast-underline:rgba(24, 28, 37, 0.5);--pico-contrast-hover:#000;--pico-contrast-hover-background:#000;--pico-contrast-hover-border:var(--pico-contrast-hover-background);--pico-contrast-hover-underline:var(--pico-secondary-hover);--pico-contrast-focus:rgba(93, 107, 137, 0.25);--pico-contrast-inverse:#fff;--pico-box-shadow:0.0145rem 0.029rem 0.174rem rgba(129, 145, 181, 0.01698),0.0335rem 0.067rem 0.402rem rgba(129, 145, 181, 0.024),0.0625rem 0.125rem 0.75rem rgba(129, 145, 181, 0.03),0.1125rem 0.225rem 1.35rem rgba(129, 145, 181, 0.036),0.2085rem 0.417rem 2.502rem rgba(129, 145, 181, 0.04302),0.5rem 1rem 6rem rgba(129, 145, 181, 0.06),0 0 0 0.0625rem rgba(129, 145, 181, 0.015);--pico-h1-color:#2d3138;--pico-h2-color:#373c44;--pico-h3-color:#424751;--pico-h4-color:#4d535e;--pico-h5-color:#5c6370;--pico-h6-color:#646b79;--pico-mark-background-color:#fde7c0;--pico-mark-color:#0f1114;--pico-ins-color:#1d6a54;--pico-del-color:#883935;--pico-blockquote-border-color:var(--pico-muted-border-color);--pico-blockquote-footer-color:var(--pico-muted-color);--pico-button-box-shadow:0 0 0 rgba(0, 0, 0, 0);--pico-button-hover-box-shadow:0 0 0 rgba(0, 0, 0, 0);--pico-table-border-color:var(--pico-muted-border-color);--pico-table-row-stripped-background-color:rgba(111, 120, 135, 0.0375);--pico-code-background-color:#f3f5f7;--pico-code-color:#646b79;--pico-code-kbd-background-color:var(--pico-color);--pico-code-kbd-color:var(--pico-background-color);--pico-form-element-background-color:#fbfcfc;--pico-form-element-selected-background-color:#dfe3eb;--pico-form-element-border-color:#cfd5e2;--pico-form-element-color:#23262c;--pico-form-element-placeholder-color:var(--pico-muted-color);--pico-form-element-active-background-color:#fff;--pico-form-element-active-border-color:var(--pico-primary-border);--pico-form-element-focus-color:var(--pico-primary-border);--pico-form-element-disabled-opacity:0.5;--pico-form-element-invalid-border-color:#b86a6b;--pico-form-element-invalid-active-border-color:#c84f48;--pico-form-element-invalid-focus-color:var(--pico-form-element-invalid-active-border-color);--pico-form-element-valid-border-color:#4c9b8a;--pico-form-element-valid-active-border-color:#279977;--pico-form-element-valid-focus-color:var(--pico-form-element-valid-active-border-color);--pico-switch-background-color:#bfc7d9;--pico-switch-checked-background-color:var(--pico-primary-background);--pico-switch-color:#fff;--pico-switch-thumb-box-shadow:0 0 0 rgba(0, 0, 0, 0);--pico-range-border-color:#dfe3eb;--pico-range-active-border-color:#bfc7d9;--pico-range-thumb-border-color:var(--pico-background-color);--pico-range-thumb-color:var(--pico-secondary-background);--pico-range-thumb-active-color:var(--pico-primary-background);--pico-accordion-border-color:var(--pico-muted-border-color);--pico-accordion-active-summary-color:var(--pico-primary-hover);--pico-accordion-close-summary-color:var(--pico-color);--pico-accordion-open-summary-color:var(--pico-muted-color);--pico-card-background-color:var(--pico-background-color);--pico-card-border-color:var(--pico-muted-border-color);--pico-card-box-shadow:var(--pico-box-shadow);--pico-card-sectioning-background-color:#fbfcfc;--pico-loading-spinner-opacity:0.5;--pico-modal-overlay-background-color:rgba(232, 234, 237, 0.75);--pico-progress-background-color:#dfe3eb;--pico-progress-color:var(--pico-primary-background);--pico-tooltip-background-color:var(--pico-contrast-background);--pico-tooltip-color:var(--pico-contrast-inverse);--pico-icon-valid:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(76, 155, 138)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");--pico-icon-invalid:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(200, 79, 72)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='8' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'%3E%3C/line%3E%3C/svg%3E");color-scheme:light}:root:not([data-theme=dark]) input:is([type=submit],[type=button],[type=reset],[type=checkbox],[type=radio],[type=file]),[data-theme=light] input:is([type=submit],[type=button],[type=reset],[type=checkbox],[type=radio],[type=file]){--pico-form-element-focus-color:var(--pico-primary-focus)}@media only screen and (prefers-color-scheme:dark){:root:not([data-theme]){--pico-background-color:#13171f;--pico-color:#c2c7d0;--pico-text-selection-color:rgba(1, 170, 255, 0.1875);--pico-muted-color:#7b8495;--pico-muted-border-color:#202632;--pico-primary:#01aaff;--pico-primary-background:#0172ad;--pico-primary-border:var(--pico-primary-background);--pico-primary-underline:rgba(1, 170, 255, 0.5);--pico-primary-hover:#79c0ff;--pico-primary-hover-background:#017fc0;--pico-primary-hover-border:var(--pico-primary-hover-background);--pico-primary-hover-underline:var(--pico-primary-hover);--pico-primary-focus:rgba(1, 170, 255, 0.375);--pico-primary-inverse:#fff;--pico-secondary:#969eaf;--pico-secondary-background:#525f7a;--pico-secondary-border:var(--pico-secondary-background);--pico-secondary-underline:rgba(150, 158, 175, 0.5);--pico-secondary-hover:#b3b9c5;--pico-secondary-hover-background:#5d6b89;--pico-secondary-hover-border:var(--pico-secondary-hover-background);--pico-secondary-hover-underline:var(--pico-secondary-hover);--pico-secondary-focus:rgba(144, 158, 190, 0.25);--pico-secondary-inverse:#fff;--pico-contrast:#dfe3eb;--pico-contrast-background:#eff1f4;--pico-contrast-border:var(--pico-contrast-background);--pico-contrast-underline:rgba(223, 227, 235, 0.5);--pico-contrast-hover:#fff;--pico-contrast-hover-background:#fff;--pico-contrast-hover-border:var(--pico-contrast-hover-background);--pico-contrast-hover-underline:var(--pico-contrast-hover);--pico-contrast-focus:rgba(207, 213, 226, 0.25);--pico-contrast-inverse:#000;--pico-box-shadow:0.0145rem 0.029rem 0.174rem rgba(7, 9, 12, 0.01698),0.0335rem 0.067rem 0.402rem rgba(7, 9, 12, 0.024),0.0625rem 0.125rem 0.75rem rgba(7, 9, 12, 0.03),0.1125rem 0.225rem 1.35rem rgba(7, 9, 12, 0.036),0.2085rem 0.417rem 2.502rem rgba(7, 9, 12, 0.04302),0.5rem 1rem 6rem rgba(7, 9, 12, 0.06),0 0 0 0.0625rem rgba(7, 9, 12, 0.015);--pico-h1-color:#f0f1f3;--pico-h2-color:#e0e3e7;--pico-h3-color:#c2c7d0;--pico-h4-color:#b3b9c5;--pico-h5-color:#a4acba;--pico-h6-color:#8891a4;--pico-mark-background-color:#014063;--pico-mark-color:#fff;--pico-ins-color:#62af9a;--pico-del-color:#ce7e7b;--pico-blockquote-border-color:var(--pico-muted-border-color);--pico-blockquote-footer-color:var(--pico-muted-color);--pico-button-box-shadow:0 0 0 rgba(0, 0, 0, 0);--pico-button-hover-box-shadow:0 0 0 rgba(0, 0, 0, 0);--pico-table-border-color:var(--pico-muted-border-color);--pico-table-row-stripped-background-color:rgba(111, 120, 135, 0.0375);--pico-code-background-color:#1a1f28;--pico-code-color:#8891a4;--pico-code-kbd-background-color:var(--pico-color);--pico-code-kbd-color:var(--pico-background-color);--pico-form-element-background-color:#1c212c;--pico-form-element-selected-background-color:#2a3140;--pico-form-element-border-color:#2a3140;--pico-form-element-color:#e0e3e7;--pico-form-element-placeholder-color:#8891a4;--pico-form-element-active-background-color:#1a1f28;--pico-form-element-active-border-color:var(--pico-primary-border);--pico-form-element-focus-color:var(--pico-primary-border);--pico-form-element-disabled-opacity:0.5;--pico-form-element-invalid-border-color:#964a50;--pico-form-element-invalid-active-border-color:#b7403b;--pico-form-element-invalid-focus-color:var(--pico-form-element-invalid-active-border-color);--pico-form-element-valid-border-color:#2a7b6f;--pico-form-element-valid-active-border-color:#16896a;--pico-form-element-valid-focus-color:var(--pico-form-element-valid-active-border-color);--pico-switch-background-color:#333c4e;--pico-switch-checked-background-color:var(--pico-primary-background);--pico-switch-color:#fff;--pico-switch-thumb-box-shadow:0 0 0 rgba(0, 0, 0, 0);--pico-range-border-color:#202632;--pico-range-active-border-color:#2a3140;--pico-range-thumb-border-color:var(--pico-background-color);--pico-range-thumb-color:var(--pico-secondary-background);--pico-range-thumb-active-color:var(--pico-primary-background);--pico-accordion-border-color:var(--pico-muted-border-color);--pico-accordion-active-summary-color:var(--pico-primary-hover);--pico-accordion-close-summary-color:var(--pico-color);--pico-accordion-open-summary-color:var(--pico-muted-color);--pico-card-background-color:#181c25;--pico-card-border-color:var(--pico-card-background-color);--pico-card-box-shadow:var(--pico-box-shadow);--pico-card-sectioning-background-color:#1a1f28;--pico-loading-spinner-opacity:0.5;--pico-modal-overlay-background-color:rgba(8, 9, 10, 0.75);--pico-progress-background-color:#202632;--pico-progress-color:var(--pico-primary-background);--pico-tooltip-background-color:var(--pico-contrast-background);--pico-tooltip-color:var(--pico-contrast-inverse);--pico-icon-valid:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(42, 123, 111)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");--pico-icon-invalid:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(150, 74, 80)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='8' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'%3E%3C/line%3E%3C/svg%3E");color-scheme:dark}:root:not([data-theme]) input:is([type=submit],[type=button],[type=reset],[type=checkbox],[type=radio],[type=file]){--pico-form-element-focus-color:var(--pico-primary-focus)}}[data-theme=dark]{--pico-background-color:#13171f;--pico-color:#c2c7d0;--pico-text-selection-color:rgba(1, 170, 255, 0.1875);--pico-muted-color:#7b8495;--pico-muted-border-color:#202632;--pico-primary:#01aaff;--pico-primary-background:#0172ad;--pico-primary-border:var(--pico-primary-background);--pico-primary-underline:rgba(1, 170, 255, 0.5);--pico-primary-hover:#79c0ff;--pico-primary-hover-background:#017fc0;--pico-primary-hover-border:var(--pico-primary-hover-background);--pico-primary-hover-underline:var(--pico-primary-hover);--pico-primary-focus:rgba(1, 170, 255, 0.375);--pico-primary-inverse:#fff;--pico-secondary:#969eaf;--pico-secondary-background:#525f7a;--pico-secondary-border:var(--pico-secondary-background);--pico-secondary-underline:rgba(150, 158, 175, 0.5);--pico-secondary-hover:#b3b9c5;--pico-secondary-hover-background:#5d6b89;--pico-secondary-hover-border:var(--pico-secondary-hover-background);--pico-secondary-hover-underline:var(--pico-secondary-hover);--pico-secondary-focus:rgba(144, 158, 190, 0.25);--pico-secondary-inverse:#fff;--pico-contrast:#dfe3eb;--pico-contrast-background:#eff1f4;--pico-contrast-border:var(--pico-contrast-background);--pico-contrast-underline:rgba(223, 227, 235, 0.5);--pico-contrast-hover:#fff;--pico-contrast-hover-background:#fff;--pico-contrast-hover-border:var(--pico-contrast-hover-background);--pico-contrast-hover-underline:var(--pico-contrast-hover);--pico-contrast-focus:rgba(207, 213, 226, 0.25);--pico-contrast-inverse:#000;--pico-box-shadow:0.0145rem 0.029rem 0.174rem rgba(7, 9, 12, 0.01698),0.0335rem 0.067rem 0.402rem rgba(7, 9, 12, 0.024),0.0625rem 0.125rem 0.75rem rgba(7, 9, 12, 0.03),0.1125rem 0.225rem 1.35rem rgba(7, 9, 12, 0.036),0.2085rem 0.417rem 2.502rem rgba(7, 9, 12, 0.04302),0.5rem 1rem 6rem rgba(7, 9, 12, 0.06),0 0 0 0.0625rem rgba(7, 9, 12, 0.015);--pico-h1-color:#f0f1f3;--pico-h2-color:#e0e3e7;--pico-h3-color:#c2c7d0;--pico-h4-color:#b3b9c5;--pico-h5-color:#a4acba;--pico-h6-color:#8891a4;--pico-mark-background-color:#014063;--pico-mark-color:#fff;--pico-ins-color:#62af9a;--pico-del-color:#ce7e7b;--pico-blockquote-border-color:var(--pico-muted-border-color);--pico-blockquote-footer-color:var(--pico-muted-color);--pico-button-box-shadow:0 0 0 rgba(0, 0, 0, 0);--pico-button-hover-box-shadow:0 0 0 rgba(0, 0, 0, 0);--pico-table-border-color:var(--pico-muted-border-color);--pico-table-row-stripped-background-color:rgba(111, 120, 135, 0.0375);--pico-code-background-color:#1a1f28;--pico-code-color:#8891a4;--pico-code-kbd-background-color:var(--pico-color);--pico-code-kbd-color:var(--pico-background-color);--pico-form-element-background-color:#1c212c;--pico-form-element-selected-background-color:#2a3140;--pico-form-element-border-color:#2a3140;--pico-form-element-color:#e0e3e7;--pico-form-element-placeholder-color:#8891a4;--pico-form-element-active-background-color:#1a1f28;--pico-form-element-active-border-color:var(--pico-primary-border);--pico-form-element-focus-color:var(--pico-primary-border);--pico-form-element-disabled-opacity:0.5;--pico-form-element-invalid-border-color:#964a50;--pico-form-element-invalid-active-border-color:#b7403b;--pico-form-element-invalid-focus-color:var(--pico-form-element-invalid-active-border-color);--pico-form-element-valid-border-color:#2a7b6f;--pico-form-element-valid-active-border-color:#16896a;--pico-form-element-valid-focus-color:var(--pico-form-element-valid-active-border-color);--pico-switch-background-color:#333c4e;--pico-switch-checked-background-color:var(--pico-primary-background);--pico-switch-color:#fff;--pico-switch-thumb-box-shadow:0 0 0 rgba(0, 0, 0, 0);--pico-range-border-color:#202632;--pico-range-active-border-color:#2a3140;--pico-range-thumb-border-color:var(--pico-background-color);--pico-range-thumb-color:var(--pico-secondary-background);--pico-range-thumb-active-color:var(--pico-primary-background);--pico-accordion-border-color:var(--pico-muted-border-color);--pico-accordion-active-summary-color:var(--pico-primary-hover);--pico-accordion-close-summary-color:var(--pico-color);--pico-accordion-open-summary-color:var(--pico-muted-color);--pico-card-background-color:#181c25;--pico-card-border-color:var(--pico-card-background-color);--pico-card-box-shadow:var(--pico-box-shadow);--pico-card-sectioning-background-color:#1a1f28;--pico-loading-spinner-opacity:0.5;--pico-modal-overlay-background-color:rgba(8, 9, 10, 0.75);--pico-progress-background-color:#202632;--pico-progress-color:var(--pico-primary-background);--pico-tooltip-background-color:var(--pico-contrast-background);--pico-tooltip-color:var(--pico-contrast-inverse);--pico-icon-valid:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(42, 123, 111)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");--pico-icon-invalid:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(150, 74, 80)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='8' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'%3E%3C/line%3E%3C/svg%3E");color-scheme:dark}[data-theme=dark] input:is([type=submit],[type=button],[type=reset],[type=checkbox],[type=radio],[type=file]){--pico-form-element-focus-color:var(--pico-primary-focus)}[type=checkbox],[type=radio],[type=range],progress{accent-color:var(--pico-primary)}*,::after,::before{box-sizing:border-box;background-repeat:no-repeat}::after,::before{text-decoration:inherit;vertical-align:inherit}:where(:root){-webkit-tap-highlight-color:transparent;-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%;background-color:var(--pico-background-color);color:var(--pico-color);font-weight:var(--pico-font-weight);font-size:var(--pico-font-size);line-height:var(--pico-line-height);font-family:var(--pico-font-family);text-underline-offset:var(--pico-text-underline-offset);text-rendering:optimizeLegibility;overflow-wrap:break-word;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{width:100%;margin:0}main{display:block}body>footer,body>header,body>main{width:100%;margin-right:auto;margin-left:auto;padding:var(--pico-block-spacing-vertical) var(--pico-block-spacing-horizontal)}section{margin-bottom:var(--pico-block-spacing-vertical)}b,strong{font-weight:bolder}sub,sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}address,blockquote,dl,ol,p,pre,table,ul{margin-top:0;margin-bottom:var(--pico-typography-spacing-vertical);color:var(--pico-color);font-style:normal;font-weight:var(--pico-font-weight)}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:var(--pico-typography-spacing-vertical);color:var(--pico-color);font-weight:var(--pico-font-weight);font-size:var(--pico-font-size);line-height:var(--pico-line-height);font-family:var(--pico-font-family)}h1{--pico-color:var(--pico-h1-color)}h2{--pico-color:var(--pico-h2-color)}h3{--pico-color:var(--pico-h3-color)}h4{--pico-color:var(--pico-h4-color)}h5{--pico-color:var(--pico-h5-color)}h6{--pico-color:var(--pico-h6-color)}:where(article,address,blockquote,dl,figure,form,ol,p,pre,table,ul)~:is(h1,h2,h3,h4,h5,h6){margin-top:var(--pico-typography-spacing-top)}p{margin-bottom:var(--pico-typography-spacing-vertical)}hgroup{margin-bottom:var(--pico-typography-spacing-vertical)}hgroup>*{margin-top:0;margin-bottom:0}hgroup>:not(:first-child):last-child{--pico-color:var(--pico-muted-color);--pico-font-weight:unset;font-size:1rem}:where(ol,ul) li{margin-bottom:calc(var(--pico-typography-spacing-vertical) * .25)}:where(dl,ol,ul) :where(dl,ol,ul){margin:0;margin-top:calc(var(--pico-typography-spacing-vertical) * .25)}ul li{list-style:square}mark{padding:.125rem .25rem;background-color:var(--pico-mark-background-color);color:var(--pico-mark-color);vertical-align:baseline}blockquote{display:block;margin:var(--pico-typography-spacing-vertical) 0;padding:var(--pico-spacing);border-right:none;border-left:.25rem solid var(--pico-blockquote-border-color);border-inline-start:0.25rem solid var(--pico-blockquote-border-color);border-inline-end:none}blockquote footer{margin-top:calc(var(--pico-typography-spacing-vertical) * .5);color:var(--pico-blockquote-footer-color)}abbr[title]{border-bottom:1px dotted;text-decoration:none;cursor:help}ins{color:var(--pico-ins-color);text-decoration:none}del{color:var(--pico-del-color)}::-moz-selection{background-color:var(--pico-text-selection-color)}::selection{background-color:var(--pico-text-selection-color)}:where(a:not([role=button])),[role=link]{--pico-color:var(--pico-primary);--pico-background-color:transparent;--pico-underline:var(--pico-primary-underline);outline:0;background-color:var(--pico-background-color);color:var(--pico-color);-webkit-text-decoration:var(--pico-text-decoration);text-decoration:var(--pico-text-decoration);text-decoration-color:var(--pico-underline);text-underline-offset:0.125em;transition:background-color var(--pico-transition),color var(--pico-transition),box-shadow var(--pico-transition),-webkit-text-decoration var(--pico-transition);transition:background-color var(--pico-transition),color var(--pico-transition),text-decoration var(--pico-transition),box-shadow var(--pico-transition);transition:background-color var(--pico-transition),color var(--pico-transition),text-decoration var(--pico-transition),box-shadow var(--pico-transition),-webkit-text-decoration var(--pico-transition)}:where(a:not([role=button])):is([aria-current]:not([aria-current=false]),:hover,:active,:focus),[role=link]:is([aria-current]:not([aria-current=false]),:hover,:active,:focus){--pico-color:var(--pico-primary-hover);--pico-underline:var(--pico-primary-hover-underline);--pico-text-decoration:underline}:where(a:not([role=button])):focus-visible,[role=link]:focus-visible{box-shadow:0 0 0 var(--pico-outline-width) var(--pico-primary-focus)}a[role=button]{display:inline-block}button{margin:0;overflow:visible;font-family:inherit;text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[role=button],[type=button],[type=file]::file-selector-button,[type=reset],[type=submit],button{--pico-background-color:var(--pico-primary-background);--pico-border-color:var(--pico-primary-border);--pico-color:var(--pico-primary-inverse);--pico-box-shadow:var(--pico-button-box-shadow, 0 0 0 rgba(0, 0, 0, 0));padding:var(--pico-form-element-spacing-vertical) var(--pico-form-element-spacing-horizontal);border:var(--pico-border-width) solid var(--pico-border-color);border-radius:var(--pico-border-radius);outline:0;background-color:var(--pico-background-color);box-shadow:var(--pico-box-shadow);color:var(--pico-color);font-weight:var(--pico-font-weight);font-size:1rem;line-height:var(--pico-line-height);text-align:center;text-decoration:none;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;transition:background-color var(--pico-transition),border-color var(--pico-transition),color var(--pico-transition),box-shadow var(--pico-transition)}[role=button]:is(:hover,:active,:focus),[role=button]:is([aria-current]:not([aria-current=false])),[type=button]:is(:hover,:active,:focus),[type=button]:is([aria-current]:not([aria-current=false])),[type=file]::file-selector-button:is(:hover,:active,:focus),[type=file]::file-selector-button:is([aria-current]:not([aria-current=false])),[type=reset]:is(:hover,:active,:focus),[type=reset]:is([aria-current]:not([aria-current=false])),[type=submit]:is(:hover,:active,:focus),[type=submit]:is([aria-current]:not([aria-current=false])),button:is(:hover,:active,:focus),button:is([aria-current]:not([aria-current=false])){--pico-background-color:var(--pico-primary-hover-background);--pico-border-color:var(--pico-primary-hover-border);--pico-box-shadow:var(--pico-button-hover-box-shadow, 0 0 0 rgba(0, 0, 0, 0));--pico-color:var(--pico-primary-inverse)}[role=button]:focus,[role=button]:is([aria-current]:not([aria-current=false])):focus,[type=button]:focus,[type=button]:is([aria-current]:not([aria-current=false])):focus,[type=file]::file-selector-button:focus,[type=file]::file-selector-button:is([aria-current]:not([aria-current=false])):focus,[type=reset]:focus,[type=reset]:is([aria-current]:not([aria-current=false])):focus,[type=submit]:focus,[type=submit]:is([aria-current]:not([aria-current=false])):focus,button:focus,button:is([aria-current]:not([aria-current=false])):focus{--pico-box-shadow:var(--pico-button-hover-box-shadow, 0 0 0 rgba(0, 0, 0, 0)),0 0 0 var(--pico-outline-width) var(--pico-primary-focus)}[type=button],[type=reset],[type=submit]{margin-bottom:var(--pico-spacing)}[type=file]::file-selector-button,[type=reset]{--pico-background-color:var(--pico-secondary-background);--pico-border-color:var(--pico-secondary-border);--pico-color:var(--pico-secondary-inverse);cursor:pointer}[type=file]::file-selector-button:is([aria-current]:not([aria-current=false]),:hover,:active,:focus),[type=reset]:is([aria-current]:not([aria-current=false]),:hover,:active,:focus){--pico-background-color:var(--pico-secondary-hover-background);--pico-border-color:var(--pico-secondary-hover-border);--pico-color:var(--pico-secondary-inverse)}[type=file]::file-selector-button:focus,[type=reset]:focus{--pico-box-shadow:var(--pico-button-hover-box-shadow, 0 0 0 rgba(0, 0, 0, 0)),0 0 0 var(--pico-outline-width) var(--pico-secondary-focus)}:where(button,[type=submit],[type=reset],[type=button],[role=button])[disabled],:where(fieldset[disabled]) :is(button,[type=submit],[type=button],[type=reset],[role=button]){opacity:.5;pointer-events:none}:where(table){width:100%;border-collapse:collapse;border-spacing:0;text-indent:0}td,th{padding:calc(var(--pico-spacing)/ 2) var(--pico-spacing);border-bottom:var(--pico-border-width) solid var(--pico-table-border-color);background-color:var(--pico-background-color);color:var(--pico-color);font-weight:var(--pico-font-weight);text-align:left;text-align:start}tfoot td,tfoot th{border-top:var(--pico-border-width) solid var(--pico-table-border-color);border-bottom:0}table.striped tbody tr:nth-child(odd) td,table.striped tbody tr:nth-child(odd) th{background-color:var(--pico-table-row-stripped-background-color)}:where(audio,canvas,iframe,img,svg,video){vertical-align:middle}audio,video{display:inline-block}audio:not([controls]){display:none;height:0}:where(iframe){border-style:none}img{max-width:100%;height:auto;border-style:none}:where(svg:not([fill])){fill:currentColor}svg:not(:root){overflow:hidden}code,kbd,pre,samp{font-size:.875em;font-family:var(--pico-font-family)}pre code{font-size:inherit;font-family:inherit}pre{-ms-overflow-style:scrollbar;overflow:auto}code,kbd,pre{border-radius:var(--pico-border-radius);background:var(--pico-code-background-color);color:var(--pico-code-color);font-weight:var(--pico-font-weight);line-height:initial}code,kbd{display:inline-block;padding:.375rem}pre{display:block;margin-bottom:var(--pico-spacing);overflow-x:auto}pre>code{display:block;padding:var(--pico-spacing);background:0 0;line-height:var(--pico-line-height)}kbd{background-color:var(--pico-code-kbd-background-color);color:var(--pico-code-kbd-color);vertical-align:baseline}figure{display:block;margin:0;padding:0}figure figcaption{padding:calc(var(--pico-spacing) * .5) 0;color:var(--pico-muted-color)}hr{height:0;margin:var(--pico-typography-spacing-vertical) 0;border:0;border-top:1px solid var(--pico-muted-border-color);color:inherit}[hidden],template{display:none!important}canvas{display:inline-block}input,optgroup,select,textarea{margin:0;font-size:1rem;line-height:var(--pico-line-height);font-family:inherit;letter-spacing:inherit}input{overflow:visible}select{text-transform:none}legend{max-width:100%;padding:0;color:inherit;white-space:normal}textarea{overflow:auto}[type=checkbox],[type=radio]{padding:0}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}::-moz-focus-inner{padding:0;border-style:none}:-moz-focusring{outline:0}:-moz-ui-invalid{box-shadow:none}::-ms-expand{display:none}[type=file],[type=range]{padding:0;border-width:0}input:not([type=checkbox],[type=radio],[type=range]){height:calc(1rem * var(--pico-line-height) + var(--pico-form-element-spacing-vertical) * 2 + var(--pico-border-width) * 2)}fieldset{width:100%;margin:0;margin-bottom:var(--pico-spacing);padding:0;border:0}fieldset legend,label{display:block;margin-bottom:calc(var(--pico-spacing) * .375);color:var(--pico-color);font-weight:var(--pico-form-label-font-weight,var(--pico-font-weight))}fieldset legend{margin-bottom:calc(var(--pico-spacing) * .5)}button[type=submit],input:not([type=checkbox],[type=radio]),select,textarea{width:100%}input:not([type=checkbox],[type=radio],[type=range],[type=file]),select,textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:var(--pico-form-element-spacing-vertical) var(--pico-form-element-spacing-horizontal)}input,select,textarea{--pico-background-color:var(--pico-form-element-background-color);--pico-border-color:var(--pico-form-element-border-color);--pico-color:var(--pico-form-element-color);--pico-box-shadow:none;border:var(--pico-border-width) solid var(--pico-border-color);border-radius:var(--pico-border-radius);outline:0;background-color:var(--pico-background-color);box-shadow:var(--pico-box-shadow);color:var(--pico-color);font-weight:var(--pico-font-weight);transition:background-color var(--pico-transition),border-color var(--pico-transition),color var(--pico-transition),box-shadow var(--pico-transition)}:where(select,textarea):not([readonly]):is(:active,:focus),input:not([type=submit],[type=button],[type=reset],[type=checkbox],[type=radio],[readonly]):is(:active,:focus){--pico-background-color:var(--pico-form-element-active-background-color)}:where(select,textarea):not([readonly]):is(:active,:focus),input:not([type=submit],[type=button],[type=reset],[role=switch],[readonly]):is(:active,:focus){--pico-border-color:var(--pico-form-element-active-border-color)}:where(select,textarea):not([readonly]):focus,input:not([type=submit],[type=button],[type=reset],[type=range],[type=file],[readonly]):focus{--pico-box-shadow:0 0 0 var(--pico-outline-width) var(--pico-form-element-focus-color)}:where(fieldset[disabled]) :is(input:not([type=submit],[type=button],[type=reset]),select,textarea),input:not([type=submit],[type=button],[type=reset])[disabled],label[aria-disabled=true],select[disabled],textarea[disabled]{opacity:var(--pico-form-element-disabled-opacity);pointer-events:none}label[aria-disabled=true] input[disabled]{opacity:1}:where(input,select,textarea):not([type=checkbox],[type=radio],[type=date],[type=datetime-local],[type=month],[type=time],[type=week],[type=range])[aria-invalid]{padding-right:calc(var(--pico-form-element-spacing-horizontal) + 1.5rem)!important;padding-left:var(--pico-form-element-spacing-horizontal);padding-inline-start:var(--pico-form-element-spacing-horizontal)!important;padding-inline-end:calc(var(--pico-form-element-spacing-horizontal) + 1.5rem)!important;background-position:center right .75rem;background-size:1rem auto;background-repeat:no-repeat}:where(input,select,textarea):not([type=checkbox],[type=radio],[type=date],[type=datetime-local],[type=month],[type=time],[type=week],[type=range])[aria-invalid=false]:not(select){background-image:var(--pico-icon-valid)}:where(input,select,textarea):not([type=checkbox],[type=radio],[type=date],[type=datetime-local],[type=month],[type=time],[type=week],[type=range])[aria-invalid=true]:not(select){background-image:var(--pico-icon-invalid)}:where(input,select,textarea)[aria-invalid=false]{--pico-border-color:var(--pico-form-element-valid-border-color)}:where(input,select,textarea)[aria-invalid=false]:is(:active,:focus){--pico-border-color:var(--pico-form-element-valid-active-border-color)!important}:where(input,select,textarea)[aria-invalid=false]:is(:active,:focus):not([type=checkbox],[type=radio]){--pico-box-shadow:0 0 0 var(--pico-outline-width) var(--pico-form-element-valid-focus-color)!important}:where(input,select,textarea)[aria-invalid=true]{--pico-border-color:var(--pico-form-element-invalid-border-color)}:where(input,select,textarea)[aria-invalid=true]:is(:active,:focus){--pico-border-color:var(--pico-form-element-invalid-active-border-color)!important}:where(input,select,textarea)[aria-invalid=true]:is(:active,:focus):not([type=checkbox],[type=radio]){--pico-box-shadow:0 0 0 var(--pico-outline-width) var(--pico-form-element-invalid-focus-color)!important}[dir=rtl] :where(input,select,textarea):not([type=checkbox],[type=radio]):is([aria-invalid],[aria-invalid=true],[aria-invalid=false]){background-position:center left .75rem}input::-webkit-input-placeholder,input::placeholder,select:invalid,textarea::-webkit-input-placeholder,textarea::placeholder{color:var(--pico-form-element-placeholder-color);opacity:1}input:not([type=checkbox],[type=radio]),select,textarea{margin-bottom:var(--pico-spacing)}select::-ms-expand{border:0;background-color:transparent}select:not([multiple],[size]){padding-right:calc(var(--pico-form-element-spacing-horizontal) + 1.5rem);padding-left:var(--pico-form-element-spacing-horizontal);padding-inline-start:var(--pico-form-element-spacing-horizontal);padding-inline-end:calc(var(--pico-form-element-spacing-horizontal) + 1.5rem);background-image:var(--pico-icon-chevron);background-position:center right .75rem;background-size:1rem auto;background-repeat:no-repeat}select[multiple] option:checked{background:var(--pico-form-element-selected-background-color);color:var(--pico-form-element-color)}[dir=rtl] select:not([multiple],[size]){background-position:center left .75rem}textarea{display:block;resize:vertical}textarea[aria-invalid]{--pico-icon-height:calc(1rem * var(--pico-line-height) + var(--pico-form-element-spacing-vertical) * 2 + var(--pico-border-width) * 2);background-position:top right .75rem!important;background-size:1rem var(--pico-icon-height)!important}:where(input,select,textarea,fieldset)+small{display:block;width:100%;margin-top:calc(var(--pico-spacing) * -.75);margin-bottom:var(--pico-spacing);color:var(--pico-muted-color)}:where(input,select,textarea,fieldset)[aria-invalid=false]+small{color:var(--pico-ins-color)}:where(input,select,textarea,fieldset)[aria-invalid=true]+small{color:var(--pico-del-color)}label>:where(input,select,textarea){margin-top:calc(var(--pico-spacing) * .25)}label:has([type=checkbox],[type=radio]){width:-moz-fit-content;width:fit-content;cursor:pointer}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:1.25em;height:1.25em;margin-top:-.125em;margin-inline-end:.5em;border-width:var(--pico-border-width);vertical-align:middle;cursor:pointer}[type=checkbox]::-ms-check,[type=radio]::-ms-check{display:none}[type=checkbox]:checked,[type=checkbox]:checked:active,[type=checkbox]:checked:focus,[type=radio]:checked,[type=radio]:checked:active,[type=radio]:checked:focus{--pico-background-color:var(--pico-primary-background);--pico-border-color:var(--pico-primary-border);background-image:var(--pico-icon-checkbox);background-position:center;background-size:.75em auto;background-repeat:no-repeat}[type=checkbox]~label,[type=radio]~label{display:inline-block;margin-bottom:0;cursor:pointer}[type=checkbox]~label:not(:last-of-type),[type=radio]~label:not(:last-of-type){margin-inline-end:1em}[type=checkbox]:indeterminate{--pico-background-color:var(--pico-primary-background);--pico-border-color:var(--pico-primary-border);background-image:var(--pico-icon-minus);background-position:center;background-size:.75em auto;background-repeat:no-repeat}[type=radio]{border-radius:50%}[type=radio]:checked,[type=radio]:checked:active,[type=radio]:checked:focus{--pico-background-color:var(--pico-primary-inverse);border-width:.35em;background-image:none}[type=checkbox][role=switch]{--pico-background-color:var(--pico-switch-background-color);--pico-color:var(--pico-switch-color);width:2.25em;height:1.25em;border:var(--pico-border-width) solid var(--pico-border-color);border-radius:1.25em;background-color:var(--pico-background-color);line-height:1.25em}[type=checkbox][role=switch]:not([aria-invalid]){--pico-border-color:var(--pico-switch-background-color)}[type=checkbox][role=switch]:before{display:block;aspect-ratio:1;height:100%;border-radius:50%;background-color:var(--pico-color);box-shadow:var(--pico-switch-thumb-box-shadow);content:"";transition:margin .1s ease-in-out}[type=checkbox][role=switch]:focus{--pico-background-color:var(--pico-switch-background-color);--pico-border-color:var(--pico-switch-background-color)}[type=checkbox][role=switch]:checked{--pico-background-color:var(--pico-switch-checked-background-color);--pico-border-color:var(--pico-switch-checked-background-color);background-image:none}[type=checkbox][role=switch]:checked::before{margin-inline-start:calc(2.25em - 1.25em)}[type=checkbox][role=switch][disabled]{--pico-background-color:var(--pico-border-color)}[type=checkbox][aria-invalid=false]:checked,[type=checkbox][aria-invalid=false]:checked:active,[type=checkbox][aria-invalid=false]:checked:focus,[type=checkbox][role=switch][aria-invalid=false]:checked,[type=checkbox][role=switch][aria-invalid=false]:checked:active,[type=checkbox][role=switch][aria-invalid=false]:checked:focus{--pico-background-color:var(--pico-form-element-valid-border-color)}[type=checkbox]:checked:active[aria-invalid=true],[type=checkbox]:checked:focus[aria-invalid=true],[type=checkbox]:checked[aria-invalid=true],[type=checkbox][role=switch]:checked:active[aria-invalid=true],[type=checkbox][role=switch]:checked:focus[aria-invalid=true],[type=checkbox][role=switch]:checked[aria-invalid=true]{--pico-background-color:var(--pico-form-element-invalid-border-color)}[type=checkbox][aria-invalid=false]:checked,[type=checkbox][aria-invalid=false]:checked:active,[type=checkbox][aria-invalid=false]:checked:focus,[type=checkbox][role=switch][aria-invalid=false]:checked,[type=checkbox][role=switch][aria-invalid=false]:checked:active,[type=checkbox][role=switch][aria-invalid=false]:checked:focus,[type=radio][aria-invalid=false]:checked,[type=radio][aria-invalid=false]:checked:active,[type=radio][aria-invalid=false]:checked:focus{--pico-border-color:var(--pico-form-element-valid-border-color)}[type=checkbox]:checked:active[aria-invalid=true],[type=checkbox]:checked:focus[aria-invalid=true],[type=checkbox]:checked[aria-invalid=true],[type=checkbox][role=switch]:checked:active[aria-invalid=true],[type=checkbox][role=switch]:checked:focus[aria-invalid=true],[type=checkbox][role=switch]:checked[aria-invalid=true],[type=radio]:checked:active[aria-invalid=true],[type=radio]:checked:focus[aria-invalid=true],[type=radio]:checked[aria-invalid=true]{--pico-border-color:var(--pico-form-element-invalid-border-color)}[type=color]::-webkit-color-swatch-wrapper{padding:0}[type=color]::-moz-focus-inner{padding:0}[type=color]::-webkit-color-swatch{border:0;border-radius:calc(var(--pico-border-radius) * .5)}[type=color]::-moz-color-swatch{border:0;border-radius:calc(var(--pico-border-radius) * .5)}input:not([type=checkbox],[type=radio],[type=range],[type=file]):is([type=date],[type=datetime-local],[type=month],[type=time],[type=week]){--pico-icon-position:0.75rem;--pico-icon-width:1rem;padding-right:calc(var(--pico-icon-width) + var(--pico-icon-position));background-image:var(--pico-icon-date);background-position:center right var(--pico-icon-position);background-size:var(--pico-icon-width) auto;background-repeat:no-repeat}input:not([type=checkbox],[type=radio],[type=range],[type=file])[type=time]{background-image:var(--pico-icon-time)}[type=date]::-webkit-calendar-picker-indicator,[type=datetime-local]::-webkit-calendar-picker-indicator,[type=month]::-webkit-calendar-picker-indicator,[type=time]::-webkit-calendar-picker-indicator,[type=week]::-webkit-calendar-picker-indicator{width:var(--pico-icon-width);margin-right:calc(var(--pico-icon-width) * -1);margin-left:var(--pico-icon-position);opacity:0}@-moz-document url-prefix(){[type=date],[type=datetime-local],[type=month],[type=time],[type=week]{padding-right:var(--pico-form-element-spacing-horizontal)!important;background-image:none!important}}[dir=rtl] :is([type=date],[type=datetime-local],[type=month],[type=time],[type=week]){text-align:right}[type=file]{--pico-color:var(--pico-muted-color);margin-left:calc(var(--pico-outline-width) * -1);padding:calc(var(--pico-form-element-spacing-vertical) * .5) 0;padding-left:var(--pico-outline-width);border:0;border-radius:0;background:0 0}[type=file]::file-selector-button{margin-right:calc(var(--pico-spacing)/ 2);padding:calc(var(--pico-form-element-spacing-vertical) * .5) var(--pico-form-element-spacing-horizontal)}[type=file]:is(:hover,:active,:focus)::file-selector-button{--pico-background-color:var(--pico-secondary-hover-background);--pico-border-color:var(--pico-secondary-hover-border)}[type=file]:focus::file-selector-button{--pico-box-shadow:var(--pico-button-hover-box-shadow, 0 0 0 rgba(0, 0, 0, 0)),0 0 0 var(--pico-outline-width) var(--pico-secondary-focus)}[type=range]{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;height:1.25rem;background:0 0}[type=range]::-webkit-slider-runnable-track{width:100%;height:.375rem;border-radius:var(--pico-border-radius);background-color:var(--pico-range-border-color);-webkit-transition:background-color var(--pico-transition),box-shadow var(--pico-transition);transition:background-color var(--pico-transition),box-shadow var(--pico-transition)}[type=range]::-moz-range-track{width:100%;height:.375rem;border-radius:var(--pico-border-radius);background-color:var(--pico-range-border-color);-moz-transition:background-color var(--pico-transition),box-shadow var(--pico-transition);transition:background-color var(--pico-transition),box-shadow var(--pico-transition)}[type=range]::-ms-track{width:100%;height:.375rem;border-radius:var(--pico-border-radius);background-color:var(--pico-range-border-color);-ms-transition:background-color var(--pico-transition),box-shadow var(--pico-transition);transition:background-color var(--pico-transition),box-shadow var(--pico-transition)}[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:1.25rem;height:1.25rem;margin-top:-.4375rem;border:2px solid var(--pico-range-thumb-border-color);border-radius:50%;background-color:var(--pico-range-thumb-color);cursor:pointer;-webkit-transition:background-color var(--pico-transition),transform var(--pico-transition);transition:background-color var(--pico-transition),transform var(--pico-transition)}[type=range]::-moz-range-thumb{-webkit-appearance:none;width:1.25rem;height:1.25rem;margin-top:-.4375rem;border:2px solid var(--pico-range-thumb-border-color);border-radius:50%;background-color:var(--pico-range-thumb-color);cursor:pointer;-moz-transition:background-color var(--pico-transition),transform var(--pico-transition);transition:background-color var(--pico-transition),transform var(--pico-transition)}[type=range]::-ms-thumb{-webkit-appearance:none;width:1.25rem;height:1.25rem;margin-top:-.4375rem;border:2px solid var(--pico-range-thumb-border-color);border-radius:50%;background-color:var(--pico-range-thumb-color);cursor:pointer;-ms-transition:background-color var(--pico-transition),transform var(--pico-transition);transition:background-color var(--pico-transition),transform var(--pico-transition)}[type=range]:active,[type=range]:focus-within{--pico-range-border-color:var(--pico-range-active-border-color);--pico-range-thumb-color:var(--pico-range-thumb-active-color)}[type=range]:active::-webkit-slider-thumb{transform:scale(1.25)}[type=range]:active::-moz-range-thumb{transform:scale(1.25)}[type=range]:active::-ms-thumb{transform:scale(1.25)}input:not([type=checkbox],[type=radio],[type=range],[type=file])[type=search]{padding-inline-start:calc(var(--pico-form-element-spacing-horizontal) + 1.75rem);background-image:var(--pico-icon-search);background-position:center left calc(var(--pico-form-element-spacing-horizontal) + .125rem);background-size:1rem auto;background-repeat:no-repeat}input:not([type=checkbox],[type=radio],[type=range],[type=file])[type=search][aria-invalid]{padding-inline-start:calc(var(--pico-form-element-spacing-horizontal) + 1.75rem)!important;background-position:center left 1.125rem,center right .75rem}input:not([type=checkbox],[type=radio],[type=range],[type=file])[type=search][aria-invalid=false]{background-image:var(--pico-icon-search),var(--pico-icon-valid)}input:not([type=checkbox],[type=radio],[type=range],[type=file])[type=search][aria-invalid=true]{background-image:var(--pico-icon-search),var(--pico-icon-invalid)}[dir=rtl] :where(input):not([type=checkbox],[type=radio],[type=range],[type=file])[type=search]{background-position:center right 1.125rem}[dir=rtl] :where(input):not([type=checkbox],[type=radio],[type=range],[type=file])[type=search][aria-invalid]{background-position:center right 1.125rem,center left .75rem}details{display:block;margin-bottom:var(--pico-spacing)}details summary{line-height:1rem;list-style-type:none;cursor:pointer;transition:color var(--pico-transition)}details summary:not([role]){color:var(--pico-accordion-close-summary-color)}details summary::-webkit-details-marker{display:none}details summary::marker{display:none}details summary::-moz-list-bullet{list-style-type:none}details summary::after{display:block;width:1rem;height:1rem;margin-inline-start:calc(var(--pico-spacing,1rem) * .5);float:right;transform:rotate(-90deg);background-image:var(--pico-icon-chevron);background-position:right center;background-size:1rem auto;background-repeat:no-repeat;content:"";transition:transform var(--pico-transition)}details summary:focus{outline:0}details summary:focus:not([role]){color:var(--pico-accordion-active-summary-color)}details summary:focus-visible:not([role]){outline:var(--pico-outline-width) solid var(--pico-primary-focus);outline-offset:calc(var(--pico-spacing,1rem) * 0.5);color:var(--pico-primary)}details summary[role=button]{width:100%;text-align:left}details summary[role=button]::after{height:calc(1rem * var(--pico-line-height,1.5))}details[open]>summary{margin-bottom:var(--pico-spacing)}details[open]>summary:not([role]):not(:focus){color:var(--pico-accordion-open-summary-color)}details[open]>summary::after{transform:rotate(0)}[dir=rtl] details summary{text-align:right}[dir=rtl] details summary::after{float:left;background-position:left center}article{margin-bottom:var(--pico-block-spacing-vertical);padding:var(--pico-block-spacing-vertical) var(--pico-block-spacing-horizontal);border-radius:var(--pico-border-radius);background:var(--pico-card-background-color);box-shadow:var(--pico-card-box-shadow)}article>footer,article>header{margin-right:calc(var(--pico-block-spacing-horizontal) * -1);margin-left:calc(var(--pico-block-spacing-horizontal) * -1);padding:calc(var(--pico-block-spacing-vertical) * .66) var(--pico-block-spacing-horizontal);background-color:var(--pico-card-sectioning-background-color)}article>header{margin-top:calc(var(--pico-block-spacing-vertical) * -1);margin-bottom:var(--pico-block-spacing-vertical);border-bottom:var(--pico-border-width) solid var(--pico-card-border-color);border-top-right-radius:var(--pico-border-radius);border-top-left-radius:var(--pico-border-radius)}article>footer{margin-top:var(--pico-block-spacing-vertical);margin-bottom:calc(var(--pico-block-spacing-vertical) * -1);border-top:var(--pico-border-width) solid var(--pico-card-border-color);border-bottom-right-radius:var(--pico-border-radius);border-bottom-left-radius:var(--pico-border-radius)}[role=group],[role=search]{display:inline-flex;position:relative;width:100%;margin-bottom:var(--pico-spacing);border-radius:var(--pico-border-radius);box-shadow:var(--pico-group-box-shadow,0 0 0 transparent);vertical-align:middle;transition:box-shadow var(--pico-transition)}[role=group] input:not([type=checkbox],[type=radio]),[role=group] select,[role=group]>*,[role=search] input:not([type=checkbox],[type=radio]),[role=search] select,[role=search]>*{position:relative;flex:1 1 auto;margin-bottom:0}[role=group] input:not([type=checkbox],[type=radio]):not(:first-child),[role=group] select:not(:first-child),[role=group]>:not(:first-child),[role=search] input:not([type=checkbox],[type=radio]):not(:first-child),[role=search] select:not(:first-child),[role=search]>:not(:first-child){margin-left:0;border-top-left-radius:0;border-bottom-left-radius:0}[role=group] input:not([type=checkbox],[type=radio]):not(:last-child),[role=group] select:not(:last-child),[role=group]>:not(:last-child),[role=search] input:not([type=checkbox],[type=radio]):not(:last-child),[role=search] select:not(:last-child),[role=search]>:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}[role=group] input:not([type=checkbox],[type=radio]):focus,[role=group] select:focus,[role=group]>:focus,[role=search] input:not([type=checkbox],[type=radio]):focus,[role=search] select:focus,[role=search]>:focus{z-index:2}[role=group] [role=button]:not(:first-child),[role=group] [type=button]:not(:first-child),[role=group] [type=reset]:not(:first-child),[role=group] [type=submit]:not(:first-child),[role=group] button:not(:first-child),[role=group] input:not([type=checkbox],[type=radio]):not(:first-child),[role=group] select:not(:first-child),[role=search] [role=button]:not(:first-child),[role=search] [type=button]:not(:first-child),[role=search] [type=reset]:not(:first-child),[role=search] [type=submit]:not(:first-child),[role=search] button:not(:first-child),[role=search] input:not([type=checkbox],[type=radio]):not(:first-child),[role=search] select:not(:first-child){margin-left:calc(var(--pico-border-width) * -1)}[role=group] [role=button],[role=group] [type=button],[role=group] [type=reset],[role=group] [type=submit],[role=group] button,[role=search] [role=button],[role=search] [type=button],[role=search] [type=reset],[role=search] [type=submit],[role=search] button{width:auto}@supports selector(:has(*)){[role=group]:has(button:focus,[type=submit]:focus,[type=button]:focus,[role=button]:focus),[role=search]:has(button:focus,[type=submit]:focus,[type=button]:focus,[role=button]:focus){--pico-group-box-shadow:var(--pico-group-box-shadow-focus-with-button)}[role=group]:has(button:focus,[type=submit]:focus,[type=button]:focus,[role=button]:focus) input:not([type=checkbox],[type=radio]),[role=group]:has(button:focus,[type=submit]:focus,[type=button]:focus,[role=button]:focus) select,[role=search]:has(button:focus,[type=submit]:focus,[type=button]:focus,[role=button]:focus) input:not([type=checkbox],[type=radio]),[role=search]:has(button:focus,[type=submit]:focus,[type=button]:focus,[role=button]:focus) select{border-color:transparent}[role=group]:has(input:not([type=submit],[type=button]):focus,select:focus),[role=search]:has(input:not([type=submit],[type=button]):focus,select:focus){--pico-group-box-shadow:var(--pico-group-box-shadow-focus-with-input)}[role=group]:has(input:not([type=submit],[type=button]):focus,select:focus) [role=button],[role=group]:has(input:not([type=submit],[type=button]):focus,select:focus) [type=button],[role=group]:has(input:not([type=submit],[type=button]):focus,select:focus) [type=submit],[role=group]:has(input:not([type=submit],[type=button]):focus,select:focus) button,[role=search]:has(input:not([type=submit],[type=button]):focus,select:focus) [role=button],[role=search]:has(input:not([type=submit],[type=button]):focus,select:focus) [type=button],[role=search]:has(input:not([type=submit],[type=button]):focus,select:focus) [type=submit],[role=search]:has(input:not([type=submit],[type=button]):focus,select:focus) button{--pico-button-box-shadow:0 0 0 var(--pico-border-width) var(--pico-primary-border);--pico-button-hover-box-shadow:0 0 0 var(--pico-border-width) var(--pico-primary-hover-border)}[role=group] [role=button]:focus,[role=group] [type=button]:focus,[role=group] [type=reset]:focus,[role=group] [type=submit]:focus,[role=group] button:focus,[role=search] [role=button]:focus,[role=search] [type=button]:focus,[role=search] [type=reset]:focus,[role=search] [type=submit]:focus,[role=search] button:focus{box-shadow:none}}[role=search]>:first-child{border-top-left-radius:5rem;border-bottom-left-radius:5rem}[role=search]>:last-child{border-top-right-radius:5rem;border-bottom-right-radius:5rem}[aria-busy=true]:not(input,select,textarea,html){white-space:nowrap}[aria-busy=true]:not(input,select,textarea,html)::before{display:inline-block;width:1em;height:1em;background-image:var(--pico-icon-loading);background-size:1em auto;background-repeat:no-repeat;content:"";vertical-align:-.125em}[aria-busy=true]:not(input,select,textarea,html):not(:empty)::before{margin-inline-end:calc(var(--pico-spacing) * .5)}[aria-busy=true]:not(input,select,textarea,html):empty{text-align:center}[role=button][aria-busy=true],[type=button][aria-busy=true],[type=reset][aria-busy=true],[type=submit][aria-busy=true],a[aria-busy=true],button[aria-busy=true]{pointer-events:none}:root{--pico-scrollbar-width:0px}dialog{display:flex;z-index:999;position:fixed;top:0;right:0;bottom:0;left:0;align-items:center;justify-content:center;width:inherit;min-width:100%;height:inherit;min-height:100%;padding:0;border:0;-webkit-backdrop-filter:var(--pico-modal-overlay-backdrop-filter);backdrop-filter:var(--pico-modal-overlay-backdrop-filter);background-color:var(--pico-modal-overlay-background-color);color:var(--pico-color)}dialog article{width:100%;max-height:calc(100vh - var(--pico-spacing) * 2);margin:var(--pico-spacing);overflow:auto}@media (min-width:576px){dialog article{max-width:510px}}@media (min-width:768px){dialog article{max-width:700px}}dialog article>header>*{margin-bottom:0}dialog article>header :is(a,button)[rel=prev]{margin:0;margin-left:var(--pico-spacing);padding:0;float:right}dialog article>footer{text-align:right}dialog article>footer [role=button],dialog article>footer button{margin-bottom:0}dialog article>footer [role=button]:not(:first-of-type),dialog article>footer button:not(:first-of-type){margin-left:calc(var(--pico-spacing) * .5)}dialog article :is(a,button)[rel=prev]{display:block;width:1rem;height:1rem;margin-top:calc(var(--pico-spacing) * -1);margin-bottom:var(--pico-spacing);margin-left:auto;border:none;background-image:var(--pico-icon-close);background-position:center;background-size:auto 1rem;background-repeat:no-repeat;background-color:transparent;opacity:.5;transition:opacity var(--pico-transition)}dialog article :is(a,button)[rel=prev]:is([aria-current]:not([aria-current=false]),:hover,:active,:focus){opacity:1}dialog:not([open]),dialog[open=false]{display:none}:where(nav li)::before{float:left;content:"​"}nav,nav ul{display:flex}nav{justify-content:space-between;overflow:visible}nav ol,nav ul{align-items:center;margin-bottom:0;padding:0;list-style:none}nav ol:first-of-type,nav ul:first-of-type{margin-left:calc(var(--pico-nav-element-spacing-horizontal) * -1)}nav ol:last-of-type,nav ul:last-of-type{margin-right:calc(var(--pico-nav-element-spacing-horizontal) * -1)}nav li{display:inline-block;margin:0;padding:var(--pico-nav-element-spacing-vertical) var(--pico-nav-element-spacing-horizontal)}nav li :where(a,[role=link]){display:inline-block;margin:calc(var(--pico-nav-link-spacing-vertical) * -1) calc(var(--pico-nav-link-spacing-horizontal) * -1);padding:var(--pico-nav-link-spacing-vertical) var(--pico-nav-link-spacing-horizontal);border-radius:var(--pico-border-radius)}nav li :where(a,[role=link]):not(:hover){text-decoration:none}nav li [role=button],nav li [type=button],nav li button,nav li input:not([type=checkbox],[type=radio],[type=range],[type=file]),nav li select{height:auto;margin-right:inherit;margin-bottom:0;margin-left:inherit;padding:calc(var(--pico-nav-link-spacing-vertical) - var(--pico-border-width) * 2) var(--pico-nav-link-spacing-horizontal)}nav[aria-label=breadcrumb]{align-items:center;justify-content:start}nav[aria-label=breadcrumb] ul li:not(:first-child){margin-inline-start:var(--pico-nav-link-spacing-horizontal)}nav[aria-label=breadcrumb] ul li a{margin:calc(var(--pico-nav-link-spacing-vertical) * -1) 0;margin-inline-start:calc(var(--pico-nav-link-spacing-horizontal) * -1)}nav[aria-label=breadcrumb] ul li:not(:last-child)::after{display:inline-block;position:absolute;width:calc(var(--pico-nav-link-spacing-horizontal) * 4);margin:0 calc(var(--pico-nav-link-spacing-horizontal) * -1);content:var(--pico-nav-breadcrumb-divider);color:var(--pico-muted-color);text-align:center;text-decoration:none;white-space:nowrap}nav[aria-label=breadcrumb] a[aria-current]:not([aria-current=false]){background-color:transparent;color:inherit;text-decoration:none;pointer-events:none}aside li,aside nav,aside ol,aside ul{display:block}aside li{padding:calc(var(--pico-nav-element-spacing-vertical) * .5) var(--pico-nav-element-spacing-horizontal)}aside li a{display:block}aside li [role=button]{margin:inherit}[dir=rtl] nav[aria-label=breadcrumb] ul li:not(:last-child) ::after{content:"\\"}progress{display:inline-block;vertical-align:baseline}progress{-webkit-appearance:none;-moz-appearance:none;display:inline-block;appearance:none;width:100%;height:.5rem;margin-bottom:calc(var(--pico-spacing) * .5);overflow:hidden;border:0;border-radius:var(--pico-border-radius);background-color:var(--pico-progress-background-color);color:var(--pico-progress-color)}progress::-webkit-progress-bar{border-radius:var(--pico-border-radius);background:0 0}progress[value]::-webkit-progress-value{background-color:var(--pico-progress-color);-webkit-transition:inline-size var(--pico-transition);transition:inline-size var(--pico-transition)}progress::-moz-progress-bar{background-color:var(--pico-progress-color)}@media (prefers-reduced-motion:no-preference){progress:indeterminate{background:var(--pico-progress-background-color) linear-gradient(to right,var(--pico-progress-color) 30%,var(--pico-progress-background-color) 30%) top left/150% 150% no-repeat;animation:progress-indeterminate 1s linear infinite}progress:indeterminate[value]::-webkit-progress-value{background-color:transparent}progress:indeterminate::-moz-progress-bar{background-color:transparent}}@media (prefers-reduced-motion:no-preference){[dir=rtl] progress:indeterminate{animation-direction:reverse}}@keyframes progress-indeterminate{0%{background-position:200% 0}100%{background-position:-200% 0}}[data-tooltip]{position:relative}[data-tooltip]:not(a,button,input){border-bottom:1px dotted;text-decoration:none;cursor:help}[data-tooltip]::after,[data-tooltip]::before,[data-tooltip][data-placement=top]::after,[data-tooltip][data-placement=top]::before{display:block;z-index:99;position:absolute;bottom:100%;left:50%;padding:.25rem .5rem;overflow:hidden;transform:translate(-50%,-.25rem);border-radius:var(--pico-border-radius);background:var(--pico-tooltip-background-color);content:attr(data-tooltip);color:var(--pico-tooltip-color);font-style:normal;font-weight:var(--pico-font-weight);font-size:.875rem;text-decoration:none;text-overflow:ellipsis;white-space:nowrap;opacity:0;pointer-events:none}[data-tooltip]::after,[data-tooltip][data-placement=top]::after{padding:0;transform:translate(-50%,0);border-top:.3rem solid;border-right:.3rem solid transparent;border-left:.3rem solid transparent;border-radius:0;background-color:transparent;content:"";color:var(--pico-tooltip-background-color)}[data-tooltip][data-placement=bottom]::after,[data-tooltip][data-placement=bottom]::before{top:100%;bottom:auto;transform:translate(-50%,.25rem)}[data-tooltip][data-placement=bottom]:after{transform:translate(-50%,-.3rem);border:.3rem solid transparent;border-bottom:.3rem solid}[data-tooltip][data-placement=left]::after,[data-tooltip][data-placement=left]::before{top:50%;right:100%;bottom:auto;left:auto;transform:translate(-.25rem,-50%)}[data-tooltip][data-placement=left]:after{transform:translate(.3rem,-50%);border:.3rem solid transparent;border-left:.3rem solid}[data-tooltip][data-placement=right]::after,[data-tooltip][data-placement=right]::before{top:50%;right:auto;bottom:auto;left:100%;transform:translate(.25rem,-50%)}[data-tooltip][data-placement=right]:after{transform:translate(-.3rem,-50%);border:.3rem solid transparent;border-right:.3rem solid}[data-tooltip]:focus::after,[data-tooltip]:focus::before,[data-tooltip]:hover::after,[data-tooltip]:hover::before{opacity:1}@media (hover:hover) and (pointer:fine){[data-tooltip]:focus::after,[data-tooltip]:focus::before,[data-tooltip]:hover::after,[data-tooltip]:hover::before{--pico-tooltip-slide-to:translate(-50%, -0.25rem);transform:translate(-50%,.75rem);animation-duration:.2s;animation-fill-mode:forwards;animation-name:tooltip-slide;opacity:0}[data-tooltip]:focus::after,[data-tooltip]:hover::after{--pico-tooltip-caret-slide-to:translate(-50%, 0rem);transform:translate(-50%,-.25rem);animation-name:tooltip-caret-slide}[data-tooltip][data-placement=bottom]:focus::after,[data-tooltip][data-placement=bottom]:focus::before,[data-tooltip][data-placement=bottom]:hover::after,[data-tooltip][data-placement=bottom]:hover::before{--pico-tooltip-slide-to:translate(-50%, 0.25rem);transform:translate(-50%,-.75rem);animation-name:tooltip-slide}[data-tooltip][data-placement=bottom]:focus::after,[data-tooltip][data-placement=bottom]:hover::after{--pico-tooltip-caret-slide-to:translate(-50%, -0.3rem);transform:translate(-50%,-.5rem);animation-name:tooltip-caret-slide}[data-tooltip][data-placement=left]:focus::after,[data-tooltip][data-placement=left]:focus::before,[data-tooltip][data-placement=left]:hover::after,[data-tooltip][data-placement=left]:hover::before{--pico-tooltip-slide-to:translate(-0.25rem, -50%);transform:translate(.75rem,-50%);animation-name:tooltip-slide}[data-tooltip][data-placement=left]:focus::after,[data-tooltip][data-placement=left]:hover::after{--pico-tooltip-caret-slide-to:translate(0.3rem, -50%);transform:translate(.05rem,-50%);animation-name:tooltip-caret-slide}[data-tooltip][data-placement=right]:focus::after,[data-tooltip][data-placement=right]:focus::before,[data-tooltip][data-placement=right]:hover::after,[data-tooltip][data-placement=right]:hover::before{--pico-tooltip-slide-to:translate(0.25rem, -50%);transform:translate(-.75rem,-50%);animation-name:tooltip-slide}[data-tooltip][data-placement=right]:focus::after,[data-tooltip][data-placement=right]:hover::after{--pico-tooltip-caret-slide-to:translate(-0.3rem, -50%);transform:translate(-.05rem,-50%);animation-name:tooltip-caret-slide}}@keyframes tooltip-slide{to{transform:var(--pico-tooltip-slide-to);opacity:1}}@keyframes tooltip-caret-slide{50%{opacity:0}to{transform:var(--pico-tooltip-caret-slide-to);opacity:1}}[aria-controls]{cursor:pointer}[aria-disabled=true],[disabled]{cursor:not-allowed}[aria-hidden=false][hidden]{display:initial}[aria-hidden=false][hidden]:not(:focus){clip:rect(0,0,0,0);position:absolute}[tabindex],a,area,button,input,label,select,summary,textarea{-ms-touch-action:manipulation}[dir=rtl]{direction:rtl}@media (prefers-reduced-motion:reduce){:not([aria-busy=true]),:not([aria-busy=true])::after,:not([aria-busy=true])::before{background-attachment:initial!important;animation-duration:1ms!important;animation-delay:-1ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-delay:0s!important;transition-duration:0s!important}}
\ No newline at end of file
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 3/4] patch-status/index.html: use echarts to display all charts
  2024-04-18  9:49 [PATCH 0/2] [yocto-autobuilder-helper] M10: Metrics view: CVEs per branch section and M11: Unify metrics views Ninette Adhikari
                   ` (4 preceding siblings ...)
  2024-04-18  9:49 ` [PATCH 2/4] patch-status/index.html: use pico.css Ninette Adhikari
@ 2024-04-18  9:49 ` Ninette Adhikari
  2024-04-18  9:49 ` [PATCH 4/4] index.html: show summary in a collapsible list Ninette Adhikari
  2024-04-26 10:09 ` [yocto-patches] [PATCH 0/2] [yocto-autobuilder-helper] M10: Metrics view: CVEs per branch section and M11: Unify metrics views Richard Purdie
  7 siblings, 0 replies; 9+ messages in thread
From: Ninette Adhikari @ 2024-04-18  9:49 UTC (permalink / raw)
  To: yocto-patches; +Cc: engineering, hulkoba

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=y, Size: 586032 bytes --]

From: hulkoba <jacoba@neighbourhood.ie>

Now we use echarts and add a separate controls section (zoom)
for this purpose and remove interactivity from the old charts themselves
With this change we only need to load one, the complete, set of data. The zoom option makes it easy to filter tha charts by date-ranges.

We also load releases.csv only once

Note that there will be another patch for the autobuilder-helper project where we update the data that is used.
Means that the jsonfiles with data for only the last year don't get created anymore.
---
 patch-status/index.html               | 798 ++++++++++++--------------
 patch-status/resources/echarts.min.js |   1 +
 2 files changed, 361 insertions(+), 438 deletions(-)
 create mode 100644 patch-status/resources/echarts.min.js

diff --git a/patch-status/index.html b/patch-status/index.html
index 514e916f..a38e6644 100644
--- a/patch-status/index.html
+++ b/patch-status/index.html
@@ -1,464 +1,386 @@
-<html>
+<!DOCTYPE html>
 <!--
 SPDX-License-Identifier: MIT
 -->
-    <head>
-        <script src="https://d3js.org/d3.v5.min.js"></script>
-        <script src="https://cdnjs.cloudflare.com/ajax/libs/c3/0.6.0/c3.min.js"></script>
-        <link href="https://cdnjs.cloudflare.com/ajax/libs/c3/0.6.0/c3.min.css" rel="stylesheet">
-        <link rel="stylesheet" href="pico.fluid.classless.min.css">
-        <style>
-            .c3-line {
-                stroke-width: 2px;
+
+<head>
+  <script src="resources/echarts.min.js"></script>
+  <link rel="stylesheet" href="resources/pico.fluid.classless.min.css">
+  <style>
+    h3 {
+      margin-left: 60px;
+      padding-top: 20px;
+    }
+    ul {
+      margin-left: 60px;
+    }
+  </style>
+</head>
+
+<body>
+  <main>
+    <h3>Current CVE status for OE-Core/Poky</h3>
+    <ul>
+      <li><a href="cve-status-master.txt">master</a></li>
+      <li><a href="cve-status-nanbield.txt">nanbield</a></li>
+      <li><a href="cve-status-kirkstone.txt">kirkstone</a></li>
+      <li><a href="cve-status-dunfell.txt">dunfell</a></li>
+    </ul>
+
+    <!-- Prepare a DOM with a defined width and height for ECharts -->
+    <section>
+      <h3>CVE Trends for OE-Core/Poky</h3>
+      <div id='cve_chart' style='height:400px;'></div>
+    </section>
+    <section>
+      <h3>Current Patch Status Pie</h3>
+      <div id='pie_chart' style='height:300px; width: 600px;'></div>
+    </section>
+
+    <section>
+      <h3>Patch Upstream-Status Counts (OE-Core meta directory)</h3>
+      <div id="upstream_status_chart" style="height:400px;"></div>
+    </section>
+
+    <section>
+      <h3>Patch Tag Error Counts (OE-Core meta directory)</h3>
+      <div id="malformed_chart" style="height:400px;"></div>
+    </section>
+
+    <section>
+      <h3>Recipe Count (OE-Core meta directory)</h3>
+      <div id="recipe_chart" style="height:400px;"></div>
+    </section>
+
+    <h3>Raw Data</h3>
+    <ul>
+      <li><a href="patch-status-pie.json">patch-status-pie.json</a></li>
+      <li><a href="patch-status-byday.json">patch-status-byday.json</a></li>
+      <li><a href="../cve-count-byday.json">cve-count-byday.json</a></li>
+      <li><a href="releases.csv">releases.csv</a></li>
+    </ul>
+  </main>
+  <!-- get the data -->
+  <script type="text/javascript">
+    const status_names = {
+      pending: 'Pending',
+      backport: 'Backport',
+      inappropriate: 'Inappropriate',
+      accepted: 'Accepted',
+      submitted: 'Submitted',
+      denied: 'Denied',
+      total: 'Total',
+      sob: 'Malformed Signed-off-by',
+      upstream_status: 'Malformed Upstream-Status'
+    };
+    const branches = ['master', 'nanbield', 'mickledore', 'langdale', 'kirkstone', 'honister', 'hardknott', 'gatesgarth', 'dunfell']
+
+    const general_options = {
+      tooltip: {
+        order: 'valueDesc',
+        trigger: 'axis'
+      },
+      legend: {},
+      xAxis : { type: 'time' },
+      yAxis: { type: 'value' },
+      dataZoom: [
+        {
+          type: 'slider',
+          xAxisIndex: 0,
+          filterMode: 'none'
+        },
+        {
+          type: 'slider',
+          yAxisIndex: 0,
+          filterMode: 'none'
+        }
+      ]
+    }
+
+    fetch('releases.csv')
+      .then(response => response.text())
+      .then(data => {
+        const release_lines = []
+        const lines = data.split("\n")
+        // skip the header
+        for (let i = 1; i < lines.length; i++) {
+          const line = lines[i].split(",");
+          if(line.length) {
+            const cve = {
+              name: line[0],
+              xAxis: new Date(line[1])
+            }
+            release_lines.push(cve)
+          }
+        }
+        const releases = {
+          type: 'line',
+          datasetId: 'releases',
+          markLine: {
+            lineStyle: { color: '#aaa' },
+            symbol: ['none', 'none'],
+            label: {
+              formatter: '{b}',
+              color: '#777'
+            },
+            data: release_lines
+          },
+        }
+        return releases
+      }).then((releases) => {
+        fetch('../cve-count-byday.json')
+          .then(response => response.json())
+          .then(data => {
+            const cve_data = []
+            cve_data.push(['Date', 'Branch', 'Branchvalue']);
+            for (var key in data) {
+              const dateObj = new Date(key * 1000);
+              for (let branchVal in data[key]) {
+                let entry = [dateObj, branchVal, parseInt(data[key][branchVal])]
+                cve_data.push(entry)
+              }
             }
-        </style>
-    </head>
-    <body>
-      <main>
-        <h1>Current CVE status for OE-Core/Poky</h1>
-        <ul>
-        <li><a href="cve-status-master.txt">master</a></li>
-        <li><a href="cve-status-nanbield.txt">nanbield</a></li>
-        <li><a href="cve-status-kirkstone.txt">kirkstone</a></li>
-        <li><a href="cve-status-dunfell.txt">dunfell</a></li>
-        </ul>
+            generateCVEChart({ cve_data, releases });
+            return releases;
+          }).then((releases) => {
+        fetch('patch-status-byday.json')
+          .then(response => response.json())
+          .then(data => {
+            // We have to sort the data by date
+            data.sort(function(x, y){
+              return x.date - y.date;
+            })
 
+            const patch_data = data.map(status => {
+              return {
+                date: new Date(status.date * 1000),
+                total: status.total,
+                pending: status.pending || 0,
+                backport: status.backport || 0,
+                inappropriate: status.inappropriate || 0,
+                accepted: status.accepted || 0,
+                submitted: status.submitted || 0,
+                denied: status.denied || 0
+              }
+            })
 
-        <h2>CVE Trends for OE-Core/Poky</h2>
-        <div id="cve_chart"></div>
-        <h3>CVE Trends for OE-Core/Poky of the last year</h3>
-        <div id="cve_chart_lastyear"></div>
+            const malformed_data = data.map(status => {
+              return {
+                date: new Date(status.date * 1000),
+                total: status.total,
+                upstream_status: status['malformed-upstream-status'] || 0,
+                sob: status['malformed-sob'] || 0
+              }
+            })
 
-        <h2>Current Patch Status Pie</h2>
-        <div id="status_pie_chart"></div>
+            const recipe_data = data.map(status => {
+              return {
+                date: new Date(status.date * 1000),
+                recipe_count: status.recipe_count
+              }
+            })
 
-        <h2>Patch Upstream-Status Counts (OE-Core meta directory)</h2>
-        <div id="upstream_status_chart"></div>
-        <h3>Patch Upstream-Status Counts (OE-Core meta directory) from the last year</h3>
-        <div id="upstream_status_chart_lastyear"></div>
+            generateMalformedChart({ malformed_data, releases });
+            generateUpstreamChart({ patch_data, releases });
+            generateRecipeChart({ recipe_data, releases });
+          });
+        });
+      });
+  </script>
 
-        <h2>Patch Tag Error Counts (OE-Core meta directory)</h2>
-        <div id="malformed_chart"></div>
-        <h3>Patch Tag Error Counts (OE-Core meta directory) from the last year</h3>
-        <div id="malformed_chart_lastyear"></div>
+  <!-- cve_chart -->
+  <script type="text/javascript">
+  if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
+    // dark mode
+    var cveChart = echarts.init(document.getElementById('cve_chart'), 'dark');
+  } else {
+    var cveChart = echarts.init(document.getElementById('cve_chart'));
+  }
 
-        <h2>Recipe Count (OE-Core meta directory)</h2>
-        <div id="recipe_count_chart"></div>
-        <h3>Recipe Count (OE-Core meta directory) from the last year</h3>
-        <div id="recipe_count_chart_lastyear"></div>
+  const cveSeries = []
+  const datasetWithFilters = []
+  function generateCVEChart({ cve_data, releases }) {
+    branches.forEach(branch => {
+      datasetWithFilters.push({
+        id: branch,
+        fromDatasetId: 'dataset_raw',
+        transform: {
+          type: 'filter',
+          config: {
+            dimension: 'Branch', '=': branch,
+          }
+        }
+      });
+      cveSeries.push({
+        type: 'line',
+        showSymbol: false,
+        datasetId: branch,
+        name: branch,
+        encode: {
+          x: 'Date',
+          y: 'Branchvalue'
+        }
+      });
+    });
+    const cveOption = {
+      legend: { right: 'auto' },
+      ...general_options,
+      dataset: [
+        {
+          id: 'dataset_raw',
+          source: cve_data
+        },
+        ...datasetWithFilters
+      ],
+      series: [
+        releases,
+        ...cveSeries,
+      ]
+    };
 
-        <h3>Raw Data</h3>
-        <ul>
-            <li><a href="../patch-status.json">patch-status.json</a></li>
-            <li><a href="patch-status-pie.json">patch-status-pie.json</a></li>
+    cveChart.setOption(cveOption);
+  }
+  </script>
 
-            <li><a href="patch-status-byday.json">patch-status-byday.json</a></li>
-            <li><a href="patch-status-byday-lastyear.json">patch-status-byday-lastyear.json</a></li>
-            <li><a href="../cve-count-byday.json">cve-count-byday.json</a></li>
-            <li><a href="../cve-count-byday-lastyear.json">cve-count-byday-lastyear.json</a></li>
-            <li><a href="releases.csv">releases.csv</a></li>
-        </ul>
-      </main>
-        <script type="text/javascript">
-            var valid_status = ['pending', 'backport', 'inappropriate', 'accepted', 'submitted', 'denied'];
-            var label_names = {
-                pending: "Pending",
-                backport: "Backport",
-                inappropriate: "Inappropriate",
-                accepted: "Accepted",
-                submitted: "Submitted",
-                denied: "Denied",
-                total: "Total",
-                'malformed-sob': "Malformed Signed-off-by",
-                'malformed-upstream-status': "Malformed Upstream-Status"
-            };
+  <!-- pie chart -->
+  <script>
+    // dark mode
+    if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
+      var pieChart = echarts.init(document.getElementById('pie_chart'), 'dark');
+    } else {
+      var pieChart = echarts.init(document.getElementById('pie_chart'));
+    }
 
-            d3.json("patch-status-pie.json").then(function(data) {
-                var chart = c3.generate({
-                    bindto: '#status_pie_chart',
-                    data: {
-                        json: [data],
-                        keys: {
-                            value: valid_status
-                        },
-                        type: "pie",
-                        names: label_names
-                    },
-                    pie: {
-                        label: {
-                            format: function (value, ratio, id) {
-                                return d3.format('.0%')(ratio);
-                            }
-                        }
-                    }
-                });
-            });
+    fetch('patch-status-pie.json')
+      .then(response => response.json())
+      .then(data => {
+        const formatted = [
+          { "value": data.pending || 0, "name": "Pending" },
+          { "value": data.backport || 0, "name": "Backport" },
+          { "value": data.inappropriate || 0, "name": "Inappropriate" },
+          { "value": data.accepted || 0, "name": "Accepted" },
+          { "value": data.submitted || 0, "name": "Submitted" },
+          { "value": data.denied || 0, "name": "Denied" }
+        ]
+        generatePieChart(formatted)
+      });
 
-            // #cve_chart
-            d3.dsv(",", "releases.csv", function(d) {
-                return {
-                    value: new Date(d.Date),
-                    text: d.Name
-                };
-            }).then(function(release_lines) {
-                d3.json("cve-count-byday-lastyear.json").then(function(cve_data) {
-                    cve_data2 = []
-                    for (var key in cve_data) {
-                        cve_data[key].date = key
-                        cve_data2.push(cve_data[key])
-                    }
+    function generatePieChart(data) {
+      const pieOption = {
+        tooltip: { trigger: 'item' },
+        series: [{
+          type: 'pie',
+          radius: '50%',
+          data: data,
+          label: { formatter: '{b} {d}%' },
+        }],
+        emphasis: {
+          itemStyle: {
+            shadowBlur: 10,
+            shadowOffsetX: 0,
+            shadowColor: 'rgba(0, 0, 0, 0.5)'
+          }
+        }
+      };
+      pieChart.setOption(pieOption);
+    }
+  </script>
 
-                    var chart = c3.generate({
-                        bindto: '#cve_chart',
-                        data: {
-                            json: cve_data2,
-                            xFormat: "%s",
-                            keys: {
-                                x: "date",
-                                value: ['master', 'nanbield', 'mickledore', 'langdale', 'kirkstone', 'honister', 'hardknott', 'gatesgarth', 'dunfell']
-                            },
-                            type: "line",
-                            names: label_names
-                        },
-                        axis: {
-                            x: {
-                                type: 'timeseries',
-                                tick: {
-                                    format: '%Y-%m-%d'
-                                },
-                                localtime: false
-                            },
-                            y: {
-                                min: 0,
-                                padding: {bottom:0}
-                            }
-                        },
-                        grid: {
-                            x: {
-                                lines: release_lines
-                            },
-                            y: {
-                                show: true
-                            }
-                        },
-                        zoom: {
-                            enabled: true
-                        },
-                        line: {
-                            connectNull: true
-                        },
-                        point: {
-                            show: false
-                        }
-                    });
+  <!-- patch status -->
+  <script type="text/javascript">
+    // dark mode
+    if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
+      var upstreamStatusChart = echarts.init(document.getElementById('upstream_status_chart'), 'dark');
+    } else {
+      var upstreamStatusChart = echarts.init(document.getElementById('upstream_status_chart'));
+    }
 
-                });
+    function generateUpstreamChart({ patch_data, releases }) {
+      releases.markLine.label.position = 'insideEndTop';
+      const keys = Object.keys(patch_data[0]);
+      const upstreamSeries = keys
+        .filter(status => status !== 'date')
+        .map(status => ({
+          type: 'line',
+          showSymbol: false,
+          areaStyle: {},
+          name: status_names[status],
+          encode: { x: 'Date', y: status }
+        }));
 
-            });
-            // #cve_chart lastyear
-            d3.dsv(",", "releases.csv", function(d) {
-                return {
-                    value: new Date(d.Date),
-                    text: d.Name
-                };
-            }).then(function(release_lines) {
-                d3.json("../cve-count-byday_lastyear.json")
-                .then(function(cve_data) {
-                    cve_data2 = []
-                    for (var key in cve_data) {
-                        cve_data[key].date = key
-                        cve_data2.push(cve_data[key])
-                    }
+      const upstreamOption = {
+        ...general_options,
+        dataset: { source: patch_data },
+        series: [
+          releases,
+          ...upstreamSeries
+        ]
+      };
 
-                    var chart = bb.generate({
-                        bindto: '#cve_chart_lastyear',
-                        data: {
-                            json: cve_data2,
-                            xFormat: "%s",
-                            keys: {
-                                x: "date",
-                                value: ['master', 'nanbield', 'mickledore', 'langdale', 'kirkstone', 'honister', 'hardknott', 'gatesgarth', 'dunfell']
-                            },
-                            type: "line",
-                            names: label_names
-                        },
-                        axis: {
-                            x: {
-                                type: 'timeseries',
-                                tick: {
-                                    format: '%Y-%m-%d'
-                                },
-                                localtime: false
-                            },
-                            y: {
-                                min: 0,
-                                padding: {bottom:0}
-                            }
-                        },
-                        grid: {
-                            x: {
-                                lines: release_lines
-                            },
-                            y: {
-                                show: true
-                            }
-                        },
-                        zoom: {
-                            enabled: true
-                        },
-                        line: {
-                            connectNull: true
-                        },
-                        point: {
-                            show: false
-                        }
-                    });
+      upstreamStatusChart.setOption(upstreamOption);
+    }
+  </script>
 
-                });
+  <!-- malformed upstream -->
+  <script type="text/javascript">
+    if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
+      var malformedChart = echarts.init(document.getElementById('malformed_chart'), 'dark');
+    } else {
+      var malformedChart = echarts.init(document.getElementById('malformed_chart'));
+    }
 
-            });
+    function generateMalformedChart({ malformed_data, releases }) {
+      releases.markLine.label.position = 'insideEndTop';
+      const keys = Object.keys(malformed_data[0]);
+      const malformedSeries = keys
+        .filter(status => status !== 'date')
+        .map(status => ({
+          type: 'line',
+          showSymbol: false,
+          areaStyle: {},
+          name: status_names[status],
+          encode: { x: 'Date', y: status }
+        }));
 
-            d3.dsv(",", "releases.csv", function(d) {
-                return {
-                    value: new Date(d.Date),
-                    text: d.Name
-                };
-            }).then(function(release_lines) {
-                d3.json("patch-status-byday-lastyear.json").then(function(status_data) {
-                    var chart = c3.generate({
-                        bindto: '#upstream_status_chart',
-                        data: {
-                            json: status_data,
-                            xFormat: "%s",
-                            keys: {
-                                x: "date",
-                                value: valid_status.concat(['total'])
-                            },
-                            type: "area",
-                            groups: [valid_status, ['total']],
-                            names: label_names
-                        },
-                        axis: {
-                            x: {
-                                type: 'timeseries',
-                                tick: {
-                                    format: '%Y-%m-%d'
-                                },
-                                localtime: false
-                            }
-                        },
-                        grid: {
-                            x: {
-                                lines: release_lines
-                            },
-                            y: {
-                                show: true
-                            }
-                        },
-                        zoom: {
-                            enabled: true
-                        },
-                        point: {
-                            show: false
-                        }
-                    });
+      const malformedOption = {
+        ...general_options,
+        legend: {},
+        dataset: { source: malformed_data },
+        series: [
+          releases,
+          ...malformedSeries
+        ]
+      };
 
-                    var chart = c3.generate({
-                        bindto: '#malformed_chart',
-                        data: {
-                            json: status_data,
-                            xFormat: "%s",
-                            keys: {
-                                x: "date",
-                                value: ['total', 'malformed-upstream-status', 'malformed-sob']
-                            },
-                            type: "area",
-                            names: label_names
-                        },
-                        axis: {
-                            x: {
-                                type: 'timeseries',
-                                tick: {
-                                    format: '%Y-%m-%d'
-                                },
-                                localtime: false
-                            }
-                        },
-                        grid: {
-                            x: {
-                                lines: release_lines
-                            },
-                            y: {
-                                show: true
-                            }
-                        },
-                        zoom: {
-                            enabled: true
-                        },
-                        point: {
-                            show: false
-                        }
-                    });
-                    var chart = c3.generate({
-                        bindto: '#recipe_count_chart',
-                        data: {
-                            json: status_data,
-                            xFormat: "%s",
-                            keys: {
-                                x: "date",
-                                value: ['recipe_count']
-                            },
-                            type: "area",
-                            names: label_names
-                        },
-                        axis: {
-                            x: {
-                                type: 'timeseries',
-                                tick: {
-                                    format: '%Y-%m-%d'
-                                },
-                                localtime: false
-                            }
-                        },
-                        grid: {
-                            x: {
-                                lines: release_lines
-                            },
-                            y: {
-                                show: true
-                            }
-                        },
-                        zoom: {
-                            enabled: true
-                        },
-                        point: {
-                            show: false
-                        }
-                    });
+      malformedChart.setOption(malformedOption);
+    }
+  </script>
 
-                });
-            });
+  <!-- recipe count -->
+  <script type="text/javascript">
+    if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
+      var recipeChart = echarts.init(document.getElementById('recipe_chart'), 'dark');
+    } else {
+      var recipeChart = echarts.init(document.getElementById('recipe_chart'));
+    }
 
-            d3.dsv(",", "releases.csv", function(d) {
-                return {
-                    value: new Date(d.Date),
-                    text: d.Name
-                };
-            }).then(function(release_lines) {
-                d3.json("patch-status-byday_lastyear.json").then(function(status_data) {
-                    var chart = bb.generate({
-                        bindto: '#upstream_status_chart_lastyear',
-                        data: {
-                            json: status_data,
-                            xFormat: "%s",
-                            keys: {
-                                x: "date",
-                                value: valid_status.concat(['total'])
-                            },
-                            type: "area",
-                            groups: [valid_status, ['total']],
-                            names: label_names
-                        },
-                        axis: {
-                            x: {
-                                type: 'timeseries',
-                                tick: {
-                                    format: '%Y-%m-%d'
-                                },
-                                localtime: false
-                            }
-                        },
-                        grid: {
-                            x: {
-                                lines: release_lines
-                            },
-                            y: {
-                                show: true
-                            }
-                        },
-                        zoom: {
-                            enabled: true
-                        },
-                        point: {
-                            show: false
-                        }
-                    });
+    function generateRecipeChart({ recipe_data, releases }) {
+      releases.markLine.label.position = 'insideEndTop';
 
-                    var chart = bb.generate({
-                        bindto: '#malformed_chart_last',
-                        data: {
-                            json: status_data,
-                            xFormat: "%s",
-                            keys: {
-                                x: "date",
-                                value: ['total', 'malformed-upstream-status', 'malformed-sob']
-                            },
-                            type: "area",
-                            names: label_names
-                        },
-                        axis: {
-                            x: {
-                                type: 'timeseries',
-                                tick: {
-                                    format: '%Y-%m-%d'
-                                },
-                                localtime: false
-                            }
-                        },
-                        grid: {
-                            x: {
-                                lines: release_lines
-                            },
-                            y: {
-                                show: true
-                            }
-                        },
-                        zoom: {
-                            enabled: true
-                        },
-                        point: {
-                            show: false
-                        }
-                    });
-                    var chart = bb.generate({
-                        bindto: '#recipe_count_chart_lastyear',
-                        data: {
-                            json: status_data,
-                            xFormat: "%s",
-                            keys: {
-                                x: "date",
-                                value: ['recipe_count']
-                            },
-                            type: "area",
-                            names: label_names
-                        },
-                        axis: {
-                            x: {
-                                type: 'timeseries',
-                                tick: {
-                                    format: '%Y-%m-%d'
-                                },
-                                localtime: false
-                            }
-                        },
-                        grid: {
-                            x: {
-                                lines: release_lines
-                            },
-                            y: {
-                                show: true
-                            }
-                        },
-                        zoom: {
-                            enabled: true
-                        },
-                        point: {
-                            show: false
-                        }
-                    });
+      const recipeOption = {
+        ...general_options,
+        dataset: { source: recipe_data },
+        series: [
+          releases,
+          {
+            type: 'line',
+            showSymbol: false,
+            name: 'Recipe Count',
+            areaStyle: {},
+          }
+        ]
+      };
 
-                });
-            });
-        </script>
-    </body>
-</html>
+      recipeChart.setOption(recipeOption);
+    }
+  </script>
diff --git a/patch-status/resources/echarts.min.js b/patch-status/resources/echarts.min.js
new file mode 100644
index 00000000..89a9a813
--- /dev/null
+++ b/patch-status/resources/echarts.min.js
@@ -0,0 +1 @@
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).echarts={})}(this,function(t){"use strict";var v=function(t,e){return(v=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}))(t,e)};function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}v(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function _(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}var b=new function(){this.browser=new _,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow="undefined"!=typeof window};"object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?(b.wxa=!0,b.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?b.worker=!0:"undefined"==typeof navigator||0===navigator.userAgent.indexOf("Node.js")?(b.node=!0,b.svgSupported=!0):(J=navigator.userAgent,ie=(Ft=b).browser,ot=J.match(/Firefox\/([\d.]+)/),Y=J.match(/MSIE\s([\d.]+)/)||J.match(/Trident\/.+?rv:(([\d.]+))/),Q=J.match(/Edge?\/([\d.]+)/),J=/micromessenger/i.test(J),ot&&(ie.firefox=!0,ie.version=ot[1]),Y&&(ie.ie=!0,ie.version=Y[1]),Q&&(ie.edge=!0,ie.version=Q[1],ie.newEdge=18<+Q[1].split(".")[0]),J&&(ie.weChat=!0),Ft.svgSupported="undefined"!=typeof SVGRect,Ft.touchEventsSupported="ontouchstart"in window&&!ie.ie&&!ie.edge,Ft.pointerEventsSupported="onpointerdown"in window&&(ie.edge||ie.ie&&11<=+ie.version),Ft.domSupported="undefined"!=typeof document,ot=document.documentElement.style,Ft.transform3dSupported=(ie.ie&&"transition"in ot||ie.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in ot)&&!("OTransition"in ot),Ft.transformSupported=Ft.transform3dSupported||ie.ie&&9<=+ie.version);var j="12px sans-serif";var x,w,T=function(t){var e={};if("undefined"!=typeof JSON)for(var n=0;n<t.length;n++){var i=String.fromCharCode(n+32),o=(t.charCodeAt(n)-20)/100;e[i]=o}return e}("007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N"),X={createCanvas:function(){return"undefined"!=typeof document&&document.createElement("canvas")},measureText:function(t,e){if(x||(n=X.createCanvas(),x=n&&n.getContext("2d")),x)return w!==e&&(w=x.font=e||j),x.measureText(t);t=t||"";var n=/(\d+)px/.exec(e=e||j),i=n&&+n[1]||12,o=0;if(0<=e.indexOf("mono"))o=i*t.length;else for(var r=0;r<t.length;r++){var a=T[t[r]];o+=null==a?i:a*i}return{width:o}},loadImage:function(t,e,n){var i=new Image;return i.onload=e,i.onerror=n,i.src=t,i}};function I(t){for(var e in X)t[e]&&(X[e]=t[e])}var A=lt(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(t,e){return t["[object "+e+"]"]=!0,t},{}),L=lt(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(t,e){return t["[object "+e+"Array]"]=!0,t},{}),U=Object.prototype.toString,Y=Array.prototype,Z=Y.forEach,q=Y.filter,K=Y.slice,$=Y.map,Q=function(){}.constructor,J=Q?Q.prototype:null,tt="__proto__",et=2311;function nt(){return et++}function it(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];"undefined"!=typeof console&&console.error.apply(console,t)}function y(t){if(null==t||"object"!=typeof t)return t;var e=t,n=U.call(t);if("[object Array]"===n){if(!Ct(t))for(var e=[],i=0,o=t.length;i<o;i++)e[i]=y(t[i])}else if(L[n]){if(!Ct(t)){var r=t.constructor;if(r.from)e=r.from(t);else for(e=new r(t.length),i=0,o=t.length;i<o;i++)e[i]=t[i]}}else if(!A[n]&&!Ct(t)&&!ft(t))for(var a in e={},t)t.hasOwnProperty(a)&&a!==tt&&(e[a]=y(t[a]));return e}function d(t,e,n){if(!O(e)||!O(t))return n?y(e):t;for(var i in e){var o,r;e.hasOwnProperty(i)&&i!==tt&&(o=t[i],!O(r=e[i])||!O(o)||V(r)||V(o)||ft(r)||ft(o)||pt(r)||pt(o)||Ct(r)||Ct(o)?!n&&i in t||(t[i]=y(e[i])):d(o,r,n))}return t}function P(t,e){if(Object.assign)Object.assign(t,e);else for(var n in e)e.hasOwnProperty(n)&&n!==tt&&(t[n]=e[n]);return t}function B(t,e,n){for(var i=ht(e),o=0;o<i.length;o++){var r=i[o];(n?null!=e[r]:null==t[r])&&(t[r]=e[r])}return t}var ot=X.createCanvas;function C(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var n=0,i=t.length;n<i;n++)if(t[n]===e)return n}return-1}function rt(t,e){var n,i=t.prototype;function o(){}for(n in o.prototype=e.prototype,t.prototype=new o,i)i.hasOwnProperty(n)&&(t.prototype[n]=i[n]);(t.prototype.constructor=t).superClass=e}function at(t,e,n){if(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,Object.getOwnPropertyNames)for(var i=Object.getOwnPropertyNames(e),o=0;o<i.length;o++){var r=i[o];"constructor"!==r&&(n?null!=e[r]:null==t[r])&&(t[r]=e[r])}else B(t,e,n)}function st(t){return!!t&&"string"!=typeof t&&"number"==typeof t.length}function E(t,e,n){if(t&&e)if(t.forEach&&t.forEach===Z)t.forEach(e,n);else if(t.length===+t.length)for(var i=0,o=t.length;i<o;i++)e.call(n,t[i],i,t);else for(var r in t)t.hasOwnProperty(r)&&e.call(n,t[r],r,t)}function F(t,e,n){if(!t)return[];if(!e)return wt(t);if(t.map&&t.map===$)return t.map(e,n);for(var i=[],o=0,r=t.length;o<r;o++)i.push(e.call(n,t[o],o,t));return i}function lt(t,e,n,i){if(t&&e){for(var o=0,r=t.length;o<r;o++)n=e.call(i,n,t[o],o,t);return n}}function ut(t,e,n){if(!t)return[];if(!e)return wt(t);if(t.filter&&t.filter===q)return t.filter(e,n);for(var i=[],o=0,r=t.length;o<r;o++)e.call(n,t[o],o,t)&&i.push(t[o]);return i}function ht(t){if(!t)return[];if(Object.keys)return Object.keys(t);var e,n=[];for(e in t)t.hasOwnProperty(e)&&n.push(e);return n}var S=J&&D(J.bind)?J.call.bind(J.bind):function(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return function(){return t.apply(e,n.concat(K.call(arguments)))}};function M(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return function(){return t.apply(this,e.concat(K.call(arguments)))}}function V(t){return Array.isArray?Array.isArray(t):"[object Array]"===U.call(t)}function D(t){return"function"==typeof t}function H(t){return"string"==typeof t}function ct(t){return"[object String]"===U.call(t)}function W(t){return"number"==typeof t}function O(t){var e=typeof t;return"function"==e||!!t&&"object"==e}function pt(t){return!!A[U.call(t)]}function dt(t){return!!L[U.call(t)]}function ft(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function gt(t){return null!=t.colorStops}function yt(t){return null!=t.image}function mt(t){return"[object RegExp]"===U.call(t)}function vt(t){return t!=t}function _t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=0,i=t.length;n<i;n++)if(null!=t[n])return t[n]}function R(t,e){return null!=t?t:e}function xt(t,e,n){return null!=t?t:null!=e?e:n}function wt(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return K.apply(t,e)}function bt(t){var e;return"number"==typeof t?[t,t,t,t]:2===(e=t.length)?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t}function St(t,e){if(!t)throw new Error(e)}function Mt(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var Tt="__ec_primitive__";function It(t){t[Tt]=!0}function Ct(t){return t[Tt]}At.prototype.delete=function(t){var e=this.has(t);return e&&delete this.data[t],e},At.prototype.has=function(t){return this.data.hasOwnProperty(t)},At.prototype.get=function(t){return this.data[t]},At.prototype.set=function(t,e){return this.data[t]=e,this},At.prototype.keys=function(){return ht(this.data)},At.prototype.forEach=function(t){var e,n=this.data;for(e in n)n.hasOwnProperty(e)&&t(n[e],e)};var Dt=At,kt="function"==typeof Map;function At(){this.data={}}Pt.prototype.hasKey=function(t){return this.data.has(t)},Pt.prototype.get=function(t){return this.data.get(t)},Pt.prototype.set=function(t,e){return this.data.set(t,e),e},Pt.prototype.each=function(n,i){this.data.forEach(function(t,e){n.call(i,t,e)})},Pt.prototype.keys=function(){var t=this.data.keys();return kt?Array.from(t):t},Pt.prototype.removeKey=function(t){this.data.delete(t)};var Lt=Pt;function Pt(t){var n=V(t),i=(this.data=new(kt?Map:Dt),this);function e(t,e){n?i.set(t,e):i.set(e,t)}t instanceof Pt?t.each(e):t&&E(t,e)}function N(t){return new Lt(t)}function Ot(t,e){for(var n=new t.constructor(t.length+e.length),i=0;i<t.length;i++)n[i]=t[i];for(var o=t.length,i=0;i<e.length;i++)n[i+o]=e[i];return n}function Rt(t,e){var n,t=Object.create?Object.create(t):((n=function(){}).prototype=t,new n);return e&&P(t,e),t}function Nt(t){t=t.style;t.webkitUserSelect="none",t.userSelect="none",t.webkitTapHighlightColor="rgba(0,0,0,0)",t["-webkit-touch-callout"]="none"}function Et(t,e){return t.hasOwnProperty(e)}function zt(){}var Bt=180/Math.PI,Ft=Object.freeze({__proto__:null,HashMap:Lt,RADIAN_TO_DEGREE:Bt,assert:St,bind:S,clone:y,concatArray:Ot,createCanvas:ot,createHashMap:N,createObject:Rt,curry:M,defaults:B,disableUserSelect:Nt,each:E,eqNaN:vt,extend:P,filter:ut,find:function(t,e,n){if(t&&e)for(var i=0,o=t.length;i<o;i++)if(e.call(n,t[i],i,t))return t[i]},guid:nt,hasOwn:Et,indexOf:C,inherits:rt,isArray:V,isArrayLike:st,isBuiltInObject:pt,isDom:ft,isFunction:D,isGradientObject:gt,isImagePatternObject:yt,isNumber:W,isObject:O,isPrimitive:Ct,isRegExp:mt,isString:H,isStringSafe:ct,isTypedArray:dt,keys:ht,logError:it,map:F,merge:d,mergeAll:function(t,e){for(var n=t[0],i=1,o=t.length;i<o;i++)n=d(n,t[i],e);return n},mixin:at,noop:zt,normalizeCssArray:bt,reduce:lt,retrieve:_t,retrieve2:R,retrieve3:xt,setAsPrimitive:It,slice:wt,trim:Mt});function Vt(t,e){return[t=null==t?0:t,e=null==e?0:e]}function Ht(t){return[t[0],t[1]]}function Wt(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function Gt(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function Xt(t){return Math.sqrt(Ut(t))}function Ut(t){return t[0]*t[0]+t[1]*t[1]}function Yt(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function Zt(t,e){var n=Xt(e);return 0===n?(t[0]=0,t[1]=0):(t[0]=e[0]/n,t[1]=e[1]/n),t}function qt(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var jt=qt;function Kt(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var $t=Kt;function Qt(t,e,n,i){return t[0]=e[0]+i*(n[0]-e[0]),t[1]=e[1]+i*(n[1]-e[1]),t}function Jt(t,e,n){var i=e[0],e=e[1];return t[0]=n[0]*i+n[2]*e+n[4],t[1]=n[1]*i+n[3]*e+n[5],t}function te(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function ee(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}function ne(t,e){this.target=t,this.topTarget=e&&e.topTarget}var ie=Object.freeze({__proto__:null,add:Wt,applyTransform:Jt,clone:Ht,copy:function(t,e){return t[0]=e[0],t[1]=e[1],t},create:Vt,dist:jt,distSquare:$t,distance:qt,distanceSquare:Kt,div:function(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t},dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},len:Xt,lenSquare:Ut,length:Xt,lengthSquare:Ut,lerp:Qt,max:ee,min:te,mul:function(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t},negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},normalize:Zt,scale:Yt,scaleAndAdd:function(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t},set:function(t,e,n){return t[0]=e,t[1]=n,t},sub:Gt}),oe=(re.prototype._dragStart=function(t){for(var e=t.target;e&&!e.draggable;)e=e.parent||e.__hostTarget;e&&((this._draggingTarget=e).dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.handler.dispatchToElement(new ne(e,t),"dragstart",t.event))},re.prototype._drag=function(t){var e,n,i,o,r=this._draggingTarget;r&&(e=t.offsetX,n=t.offsetY,i=e-this._x,o=n-this._y,this._x=e,this._y=n,r.drift(i,o,t),this.handler.dispatchToElement(new ne(r,t),"drag",t.event),i=this.handler.findHover(e,n,r).target,o=this._dropTarget,r!==(this._dropTarget=i))&&(o&&i!==o&&this.handler.dispatchToElement(new ne(o,t),"dragleave",t.event),i)&&i!==o&&this.handler.dispatchToElement(new ne(i,t),"dragenter",t.event)},re.prototype._dragEnd=function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.handler.dispatchToElement(new ne(e,t),"dragend",t.event),this._dropTarget&&this.handler.dispatchToElement(new ne(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null},re);function re(t){(this.handler=t).on("mousedown",this._dragStart,this),t.on("mousemove",this._drag,this),t.on("mouseup",this._dragEnd,this)}se.prototype.on=function(t,e,n,i){this._$handlers||(this._$handlers={});var o=this._$handlers;if("function"==typeof e&&(i=n,n=e,e=null),n&&t){var r=this._$eventProcessor;null!=e&&r&&r.normalizeQuery&&(e=r.normalizeQuery(e)),o[t]||(o[t]=[]);for(var a=0;a<o[t].length;a++)if(o[t][a].h===n)return this;r={h:n,query:e,ctx:i||this,callAtLast:n.zrEventfulCallAtLast},e=o[t].length-1,i=o[t][e];i&&i.callAtLast?o[t].splice(e,0,r):o[t].push(r)}return this},se.prototype.isSilent=function(t){var e=this._$handlers;return!e||!e[t]||!e[t].length},se.prototype.off=function(t,e){var n=this._$handlers;if(n)if(t)if(e){if(n[t]){for(var i=[],o=0,r=n[t].length;o<r;o++)n[t][o].h!==e&&i.push(n[t][o]);n[t]=i}n[t]&&0===n[t].length&&delete n[t]}else delete n[t];else this._$handlers={};return this},se.prototype.trigger=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(this._$handlers){var i=this._$handlers[t],o=this._$eventProcessor;if(i)for(var r=e.length,a=i.length,s=0;s<a;s++){var l=i[s];if(!o||!o.filter||null==l.query||o.filter(t,l.query))switch(r){case 0:l.h.call(l.ctx);break;case 1:l.h.call(l.ctx,e[0]);break;case 2:l.h.call(l.ctx,e[0],e[1]);break;default:l.h.apply(l.ctx,e)}}o&&o.afterTrigger&&o.afterTrigger(t)}return this},se.prototype.triggerWithContext=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(this._$handlers){var i=this._$handlers[t],o=this._$eventProcessor;if(i)for(var r=e.length,a=e[r-1],s=i.length,l=0;l<s;l++){var u=i[l];if(!o||!o.filter||null==u.query||o.filter(t,u.query))switch(r){case 0:u.h.call(a);break;case 1:u.h.call(a,e[0]);break;case 2:u.h.call(a,e[0],e[1]);break;default:u.h.apply(a,e.slice(1,r-1))}}o&&o.afterTrigger&&o.afterTrigger(t)}return this};var ae=se;function se(t){t&&(this._$eventProcessor=t)}var le=Math.log(2);function ue(t,e,n,i,o,r){var a,s=i+"-"+o,l=t.length;if(r.hasOwnProperty(s))return r[s];if(1===e)return a=Math.round(Math.log((1<<l)-1&~o)/le),t[n][a];for(var u=i|1<<n,h=n+1;i&1<<h;)h++;for(var c=0,p=0,d=0;p<l;p++){var f=1<<p;f&o||(c+=(d%2?-1:1)*t[n][p]*ue(t,e-1,h,u,o|f,r),d++)}return r[s]=c}function he(t,e){var n=[[t[0],t[1],1,0,0,0,-e[0]*t[0],-e[0]*t[1]],[0,0,0,t[0],t[1],1,-e[1]*t[0],-e[1]*t[1]],[t[2],t[3],1,0,0,0,-e[2]*t[2],-e[2]*t[3]],[0,0,0,t[2],t[3],1,-e[3]*t[2],-e[3]*t[3]],[t[4],t[5],1,0,0,0,-e[4]*t[4],-e[4]*t[5]],[0,0,0,t[4],t[5],1,-e[5]*t[4],-e[5]*t[5]],[t[6],t[7],1,0,0,0,-e[6]*t[6],-e[6]*t[7]],[0,0,0,t[6],t[7],1,-e[7]*t[6],-e[7]*t[7]]],i={},o=ue(n,8,0,0,0,i);if(0!==o){for(var r=[],a=0;a<8;a++)for(var s=0;s<8;s++)null==r[s]&&(r[s]=0),r[s]+=((a+s)%2?-1:1)*ue(n,7,0===a?1:0,1<<a,1<<s,i)/o*e[a];return function(t,e,n){var i=e*r[6]+n*r[7]+1;t[0]=(e*r[0]+n*r[1]+r[2])/i,t[1]=(e*r[3]+n*r[4]+r[5])/i}}}var ce="___zrEVENTSAVED",pe=[];function de(t,e,n,i,o){if(e.getBoundingClientRect&&b.domSupported&&!fe(e)){var r=e[ce]||(e[ce]={}),e=function(t,e,n){for(var i=n?"invTrans":"trans",o=e[i],r=e.srcCoords,a=[],s=[],l=!0,u=0;u<4;u++){var h=t[u].getBoundingClientRect(),c=2*u,p=h.left,h=h.top;a.push(p,h),l=l&&r&&p===r[c]&&h===r[1+c],s.push(t[u].offsetLeft,t[u].offsetTop)}return l&&o?o:(e.srcCoords=a,e[i]=n?he(s,a):he(a,s))}(function(t,e){var n=e.markers;if(!n){n=e.markers=[];for(var i=["left","right"],o=["top","bottom"],r=0;r<4;r++){var a=document.createElement("div"),s=r%2,l=(r>>1)%2;a.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[s]+":0",o[l]+":0",i[1-s]+":auto",o[1-l]+":auto",""].join("!important;"),t.appendChild(a),n.push(a)}}return n}(e,r),r,o);if(e)return e(t,n,i),!0}return!1}function fe(t){return"CANVAS"===t.nodeName.toUpperCase()}var ge=/([&<>"'])/g,ye={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function me(t){return null==t?"":(t+"").replace(ge,function(t,e){return ye[e]})}var ve=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,_e=[],xe=b.browser.firefox&&+b.browser.version.split(".")[0]<39;function we(t,e,n,i){return n=n||{},i?be(t,e,n):xe&&null!=e.layerX&&e.layerX!==e.offsetX?(n.zrX=e.layerX,n.zrY=e.layerY):null!=e.offsetX?(n.zrX=e.offsetX,n.zrY=e.offsetY):be(t,e,n),n}function be(t,e,n){if(b.domSupported&&t.getBoundingClientRect){var i,o=e.clientX,e=e.clientY;if(fe(t))return i=t.getBoundingClientRect(),n.zrX=o-i.left,n.zrY=e-i.top;if(de(_e,t,o,e))return n.zrX=_e[0],n.zrY=_e[1]}n.zrX=n.zrY=0}function Se(t){return t||window.event}function Me(t,e,n){var i;return null==(e=Se(e)).zrX&&((i=e.type)&&0<=i.indexOf("touch")?(i=("touchend"!==i?e.targetTouches:e.changedTouches)[0])&&we(t,i,e,n):(we(t,e,e,n),t=(t=(i=e).wheelDelta)||(n=i.deltaX,i=i.deltaY,null==n||null==i?t:3*(0!==i?Math.abs(i):Math.abs(n))*(0<i||!(i<0)&&0<n?-1:1)),e.zrDelta=t?t/120:-(e.detail||0)/3),i=e.button,null==e.which&&void 0!==i&&ve.test(e.type))&&(e.which=1&i?1:2&i?3:4&i?2:0),e}var Te=function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0};function Ie(t){return 2===t.which||3===t.which}De.prototype.recognize=function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},De.prototype.clear=function(){return this._track.length=0,this},De.prototype._doTrack=function(t,e,n){var i=t.touches;if(i){for(var o={points:[],touches:[],target:e,event:t},r=0,a=i.length;r<a;r++){var s=i[r],l=we(n,s,{});o.points.push([l.zrX,l.zrY]),o.touches.push(s)}this._track.push(o)}},De.prototype._recognize=function(t){for(var e in Ae)if(Ae.hasOwnProperty(e)){e=Ae[e](this._track,t);if(e)return e}};var Ce=De;function De(){this._track=[]}function ke(t){var e=t[1][0]-t[0][0],t=t[1][1]-t[0][1];return Math.sqrt(e*e+t*t)}var Ae={pinch:function(t,e){var n=t.length;if(n){var i=(t[n-1]||{}).points,n=(t[n-2]||{}).points||i;if(n&&1<n.length&&i&&1<i.length)return n=ke(i)/ke(n),isFinite(n)||(n=1),e.pinchScale=n,n=[(i[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2],e.pinchX=n[0],e.pinchY=n[1],{type:"pinch",target:t[0].target,event:e}}}};function Le(){return[1,0,0,1,0,0]}function Pe(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function Oe(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function Re(t,e,n){var i=e[0]*n[0]+e[2]*n[1],o=e[1]*n[0]+e[3]*n[1],r=e[0]*n[2]+e[2]*n[3],a=e[1]*n[2]+e[3]*n[3],s=e[0]*n[4]+e[2]*n[5]+e[4],n=e[1]*n[4]+e[3]*n[5]+e[5];return t[0]=i,t[1]=o,t[2]=r,t[3]=a,t[4]=s,t[5]=n,t}function Ne(t,e,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+n[0],t[5]=e[5]+n[1],t}function Ee(t,e,n,i){void 0===i&&(i=[0,0]);var o=e[0],r=e[2],a=e[4],s=e[1],l=e[3],e=e[5],u=Math.sin(n),n=Math.cos(n);return t[0]=o*n+s*u,t[1]=-o*u+s*n,t[2]=r*n+l*u,t[3]=-r*u+n*l,t[4]=n*(a-i[0])+u*(e-i[1])+i[0],t[5]=n*(e-i[1])-u*(a-i[0])+i[1],t}function ze(t,e,n){var i=n[0],n=n[1];return t[0]=e[0]*i,t[1]=e[1]*n,t[2]=e[2]*i,t[3]=e[3]*n,t[4]=e[4]*i,t[5]=e[5]*n,t}function Be(t,e){var n=e[0],i=e[2],o=e[4],r=e[1],a=e[3],e=e[5],s=n*a-r*i;return s?(t[0]=a*(s=1/s),t[1]=-r*s,t[2]=-i*s,t[3]=n*s,t[4]=(i*e-a*o)*s,t[5]=(r*o-n*e)*s,t):null}var Fe=Object.freeze({__proto__:null,clone:function(t){var e=Le();return Oe(e,t),e},copy:Oe,create:Le,identity:Pe,invert:Be,mul:Re,rotate:Ee,scale:ze,translate:Ne}),z=(Ve.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},Ve.prototype.clone=function(){return new Ve(this.x,this.y)},Ve.prototype.set=function(t,e){return this.x=t,this.y=e,this},Ve.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},Ve.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},Ve.prototype.scale=function(t){this.x*=t,this.y*=t},Ve.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},Ve.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},Ve.prototype.dot=function(t){return this.x*t.x+this.y*t.y},Ve.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},Ve.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},Ve.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},Ve.prototype.distance=function(t){var e=this.x-t.x,t=this.y-t.y;return Math.sqrt(e*e+t*t)},Ve.prototype.distanceSquare=function(t){var e=this.x-t.x,t=this.y-t.y;return e*e+t*t},Ve.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},Ve.prototype.transform=function(t){var e,n;if(t)return e=this.x,n=this.y,this.x=t[0]*e+t[2]*n+t[4],this.y=t[1]*e+t[3]*n+t[5],this},Ve.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},Ve.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},Ve.set=function(t,e,n){t.x=e,t.y=n},Ve.copy=function(t,e){t.x=e.x,t.y=e.y},Ve.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},Ve.lenSquare=function(t){return t.x*t.x+t.y*t.y},Ve.dot=function(t,e){return t.x*e.x+t.y*e.y},Ve.add=function(t,e,n){t.x=e.x+n.x,t.y=e.y+n.y},Ve.sub=function(t,e,n){t.x=e.x-n.x,t.y=e.y-n.y},Ve.scale=function(t,e,n){t.x=e.x*n,t.y=e.y*n},Ve.scaleAndAdd=function(t,e,n,i){t.x=e.x+n.x*i,t.y=e.y+n.y*i},Ve.lerp=function(t,e,n,i){var o=1-i;t.x=o*e.x+i*n.x,t.y=o*e.y+i*n.y},Ve);function Ve(t,e){this.x=t||0,this.y=e||0}var He=Math.min,We=Math.max,Ge=new z,Xe=new z,Ue=new z,Ye=new z,Ze=new z,qe=new z,G=(je.prototype.union=function(t){var e=He(t.x,this.x),n=He(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=We(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=We(t.y+t.height,this.y+this.height)-n:this.height=t.height,this.x=e,this.y=n},je.prototype.applyTransform=function(t){je.applyTransform(this,this,t)},je.prototype.calculateTransform=function(t){var e=t.width/this.width,n=t.height/this.height,i=Le();return Ne(i,i,[-this.x,-this.y]),ze(i,i,[e,n]),Ne(i,i,[t.x,t.y]),i},je.prototype.intersect=function(t,e){if(!t)return!1;t instanceof je||(t=je.create(t));var n,i,o,r,a,s,l,u,h=this,c=h.x,p=h.x+h.width,d=h.y,h=h.y+h.height,f=t.x,g=t.x+t.width,y=t.y,t=t.y+t.height,m=!(p<f||g<c||h<y||t<d);return e&&(n=1/0,i=0,o=Math.abs(p-f),r=Math.abs(g-c),a=Math.abs(h-y),s=Math.abs(t-d),l=Math.min(o,r),u=Math.min(a,s),p<f||g<c?i<l&&(i=l,o<r?z.set(qe,-o,0):z.set(qe,r,0)):l<n&&(n=l,o<r?z.set(Ze,o,0):z.set(Ze,-r,0)),h<y||t<d?i<u&&(i=u,a<s?z.set(qe,0,-a):z.set(qe,0,s)):l<n&&(n=l,a<s?z.set(Ze,0,a):z.set(Ze,0,-s))),e&&z.copy(e,m?Ze:qe),m},je.prototype.contain=function(t,e){var n=this;return t>=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},je.prototype.clone=function(){return new je(this.x,this.y,this.width,this.height)},je.prototype.copy=function(t){je.copy(this,t)},je.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},je.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},je.prototype.isZero=function(){return 0===this.width||0===this.height},je.create=function(t){return new je(t.x,t.y,t.width,t.height)},je.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},je.applyTransform=function(t,e,n){var i,o,r,a;n?n[1]<1e-5&&-1e-5<n[1]&&n[2]<1e-5&&-1e-5<n[2]?(i=n[0],o=n[3],r=n[4],a=n[5],t.x=e.x*i+r,t.y=e.y*o+a,t.width=e.width*i,t.height=e.height*o,t.width<0&&(t.x+=t.width,t.width=-t.width),t.height<0&&(t.y+=t.height,t.height=-t.height)):(Ge.x=Ue.x=e.x,Ge.y=Ye.y=e.y,Xe.x=Ye.x=e.x+e.width,Xe.y=Ue.y=e.y+e.height,Ge.transform(n),Ye.transform(n),Xe.transform(n),Ue.transform(n),t.x=He(Ge.x,Xe.x,Ue.x,Ye.x),t.y=He(Ge.y,Xe.y,Ue.y,Ye.y),r=We(Ge.x,Xe.x,Ue.x,Ye.x),a=We(Ge.y,Xe.y,Ue.y,Ye.y),t.width=r-t.x,t.height=a-t.y):t!==e&&je.copy(t,e)},je);function je(t,e,n,i){n<0&&(t+=n,n=-n),i<0&&(e+=i,i=-i),this.x=t,this.y=e,this.width=n,this.height=i}var Ke="silent";function $e(){Te(this.event)}function Qe(t,e){this.x=t,this.y=e}u(sn,tn=ae),sn.prototype.dispose=function(){},sn.prototype.setCursor=function(){};var Je,tn,en=sn,nn=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],on=new G(0,0,0,0),rn=(u(an,Je=ae),an.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(E(nn,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},an.prototype.mousemove=function(t){var e=t.zrX,n=t.zrY,i=un(this,e,n),o=this._hovered,r=o.target,i=(r&&!r.__zr&&(r=(o=this.findHover(o.x,o.y)).target),this._hovered=i?new Qe(e,n):this.findHover(e,n)),e=i.target,n=this.proxy;n.setCursor&&n.setCursor(e?e.cursor:"default"),r&&e!==r&&this.dispatchToElement(o,"mouseout",t),this.dispatchToElement(i,"mousemove",t),e&&e!==r&&this.dispatchToElement(i,"mouseover",t)},an.prototype.mouseout=function(t){var e=t.zrEventControl;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&this.trigger("globalout",{type:"globalout",event:t})},an.prototype.resize=function(){this._hovered=new Qe(0,0)},an.prototype.dispatch=function(t,e){t=this[t];t&&t.call(this,e)},an.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},an.prototype.setCursorStyle=function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},an.prototype.dispatchToElement=function(t,e,n){var i=(t=t||{}).target;if(!i||!i.silent){for(var o="on"+e,r={type:e,event:n,target:(t=t).target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:$e};i&&(i[o]&&(r.cancelBubble=!!i[o].call(i,r)),i.trigger(e,r),i=i.__hostTarget||i.parent,!r.cancelBubble););r.cancelBubble||(this.trigger(e,r),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(t){"function"==typeof t[o]&&t[o].call(t,r),t.trigger&&t.trigger(e,r)}))}},an.prototype.findHover=function(t,e,n){var i=this.storage.getDisplayList(),o=new Qe(t,e);if(ln(i,o,t,e,n),this._pointerSize&&!o.target){for(var r=[],a=this._pointerSize,s=a/2,l=new G(t-s,e-s,a,a),u=i.length-1;0<=u;u--){var h=i[u];h===n||h.ignore||h.ignoreCoarsePointer||h.parent&&h.parent.ignoreCoarsePointer||(on.copy(h.getBoundingRect()),h.transform&&on.applyTransform(h.transform),on.intersect(l)&&r.push(h))}if(r.length)for(var c=Math.PI/12,p=2*Math.PI,d=0;d<s;d+=4)for(var f=0;f<p;f+=c)if(ln(r,o,t+d*Math.cos(f),e+d*Math.sin(f),n),o.target)return o}return o},an.prototype.processGesture=function(t,e){this._gestureMgr||(this._gestureMgr=new Ce);var n=this._gestureMgr,i=("start"===e&&n.clear(),n.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom));"end"===e&&n.clear(),i&&(e=i.type,t.gestureEvent=e,(n=new Qe).target=i.target,this.dispatchToElement(n,e,i.event))},an);function an(t,e,n,i,o){var r=Je.call(this)||this;return r._hovered=new Qe(0,0),r.storage=t,r.painter=e,r.painterRoot=i,r._pointerSize=o,n=n||new en,r.proxy=null,r.setHandlerProxy(n),r._draggingMgr=new oe(r),r}function sn(){var t=null!==tn&&tn.apply(this,arguments)||this;return t.handler=null,t}function ln(t,e,n,i,o){for(var r=t.length-1;0<=r;r--){var a=t[r],s=void 0;if(a!==o&&!a.ignore&&(s=function(t,e,n){if(t[t.rectHover?"rectContain":"contain"](e,n)){for(var i=t,o=void 0,r=!1;i;){if(!(r=i.ignoreClip?!0:r)){var a=i.getClipPath();if(a&&!a.contain(e,n))return!1}i.silent&&(o=!0);i=i.__hostTarget||i.parent}return!o||Ke}return!1}(a,n,i))&&(e.topTarget||(e.topTarget=a),s!==Ke)){e.target=a;break}}}function un(t,e,n){t=t.painter;return e<0||e>t.getWidth()||n<0||n>t.getHeight()}E(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(a){rn.prototype[a]=function(t){var e,n,i=t.zrX,o=t.zrY,r=un(this,i,o);if("mouseup"===a&&r||(n=(e=this.findHover(i,o)).target),"mousedown"===a)this._downEl=n,this._downPoint=[t.zrX,t.zrY],this._upEl=n;else if("mouseup"===a)this._upEl=n;else if("click"===a){if(this._downEl!==this._upEl||!this._downPoint||4<jt(this._downPoint,[t.zrX,t.zrY]))return;this._downPoint=null}this.dispatchToElement(e,a,t)}});var hn=32,cn=7;function pn(t,e,n,i){var o=e+1;if(o===n)return 1;if(i(t[o++],t[e])<0){for(;o<n&&i(t[o],t[o-1])<0;)o++;var r=t,a=e,s=o;for(s--;a<s;){var l=r[a];r[a++]=r[s],r[s--]=l}}else for(;o<n&&0<=i(t[o],t[o-1]);)o++;return o-e}function dn(t,e,n,i,o){for(i===e&&i++;i<n;i++){for(var r,a=t[i],s=e,l=i;s<l;)o(a,t[r=s+l>>>1])<0?l=r:s=1+r;var u=i-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;0<u;)t[s+u]=t[s+u-1],u--}t[s]=a}}function fn(t,e,n,i,o,r){var a=0,s=0,l=1;if(0<r(t,e[n+o])){for(s=i-o;l<s&&0<r(t,e[n+o+l]);)(l=1+((a=l)<<1))<=0&&(l=s);s<l&&(l=s),a+=o,l+=o}else{for(s=o+1;l<s&&r(t,e[n+o-l])<=0;)(l=1+((a=l)<<1))<=0&&(l=s);i=a,a=o-(l=s<l?s:l),l=o-i}for(a++;a<l;){var u=a+(l-a>>>1);0<r(t,e[n+u])?a=u+1:l=u}return l}function gn(t,e,n,i,o,r){var a=0,s=0,l=1;if(r(t,e[n+o])<0){for(s=o+1;l<s&&r(t,e[n+o-l])<0;)(l=1+((a=l)<<1))<=0&&(l=s);var u=a,a=o-(l=s<l?s:l),l=o-u}else{for(s=i-o;l<s&&0<=r(t,e[n+o+l]);)(l=1+((a=l)<<1))<=0&&(l=s);s<l&&(l=s),a+=o,l+=o}for(a++;a<l;){var h=a+(l-a>>>1);r(t,e[n+h])<0?l=h:a=h+1}return l}function yn(t,e,n,i){var f,g,r,a,y,s,m,o=(i=i||t.length)-(n=n||0);if(!(o<2)){var l=0;if(o<hn)dn(t,n,i,n+(l=pn(t,n,i,e)),e);else{f=t,g=e,y=cn,s=0,m=[],r=[],a=[];var u,h={mergeRuns:function(){for(;1<s;){var t=s-2;if(1<=t&&a[t-1]<=a[t]+a[t+1]||2<=t&&a[t-2]<=a[t]+a[t-1])a[t-1]<a[t+1]&&t--;else if(a[t]>a[t+1])break;p(t)}},forceMergeRuns:function(){for(;1<s;){var t=s-2;0<t&&a[t-1]<a[t+1]&&t--,p(t)}},pushRun:function(t,e){r[s]=t,a[s]=e,s+=1}},c=function(t){for(var e=0;hn<=t;)e|=1&t,t>>=1;return t+e}(o);do{}while((l=pn(t,n,i,e))<c&&(dn(t,n,n+(u=c<(u=o)?c:o),n+l,e),l=u),h.pushRun(n,l),h.mergeRuns(),n+=l,0!==(o-=l));h.forceMergeRuns()}}function p(t){var e=r[t],n=a[t],i=r[t+1],o=a[t+1],t=(a[t]=n+o,t===s-3&&(r[t+1]=r[t+2],a[t+1]=a[t+2]),s--,gn(f[i],f,e,n,0,g));e+=t,0!=(n-=t)&&0!==(o=fn(f[e+n-1],f,i,o,o-1,g))&&(n<=o?function(t,e,n,i){for(var o=0,o=0;o<e;o++)m[o]=f[t+o];var r=0,a=n,s=t;if(f[s++]=f[a++],0==--i)for(o=0;o<e;o++)f[s+o]=m[r+o];else{if(1===e){for(o=0;o<i;o++)f[s+o]=f[a+o];return f[s+i]=m[r]}for(var l,u,h,c=y;;){u=l=0,h=!1;do{if(g(f[a],m[r])<0){if(f[s++]=f[a++],u++,(l=0)==--i){h=!0;break}}else if(f[s++]=m[r++],l++,u=0,1==--e){h=!0;break}}while((l|u)<c);if(h)break;do{if(0!==(l=gn(f[a],m,r,e,0,g))){for(o=0;o<l;o++)f[s+o]=m[r+o];if(s+=l,r+=l,(e-=l)<=1){h=!0;break}}if(f[s++]=f[a++],0==--i){h=!0;break}if(0!==(u=fn(m[r],f,a,i,0,g))){for(o=0;o<u;o++)f[s+o]=f[a+o];if(s+=u,a+=u,0==(i-=u)){h=!0;break}}if(f[s++]=m[r++],1==--e){h=!0;break}}while(c--,cn<=l||cn<=u);if(h)break;c<0&&(c=0),c+=2}if((y=c)<1&&(y=1),1===e){for(o=0;o<i;o++)f[s+o]=f[a+o];f[s+i]=m[r]}else{if(0===e)throw new Error;for(o=0;o<e;o++)f[s+o]=m[r+o]}}}:function(t,e,n,i){for(var o=0,o=0;o<i;o++)m[o]=f[n+o];var r=t+e-1,a=i-1,s=n+i-1,l=0,u=0;if(f[s--]=f[r--],0==--e)for(l=s-(i-1),o=0;o<i;o++)f[l+o]=m[o];else{if(1===i){for(u=1+(s-=e),l=1+(r-=e),o=e-1;0<=o;o--)f[u+o]=f[l+o];return f[s]=m[a]}for(var h=y;;){var c=0,p=0,d=!1;do{if(g(m[a],f[r])<0){if(f[s--]=f[r--],c++,(p=0)==--e){d=!0;break}}else if(f[s--]=m[a--],p++,c=0,1==--i){d=!0;break}}while((c|p)<h);if(d)break;do{if(0!=(c=e-gn(m[a],f,t,e,e-1,g))){for(e-=c,u=1+(s-=c),l=1+(r-=c),o=c-1;0<=o;o--)f[u+o]=f[l+o];if(0===e){d=!0;break}}if(f[s--]=m[a--],1==--i){d=!0;break}if(0!=(p=i-fn(f[r],m,0,i,i-1,g))){for(i-=p,u=1+(s-=p),l=1+(a-=p),o=0;o<p;o++)f[u+o]=m[l+o];if(i<=1){d=!0;break}}if(f[s--]=f[r--],0==--e){d=!0;break}}while(h--,cn<=c||cn<=p);if(d)break;h<0&&(h=0),h+=2}if((y=h)<1&&(y=1),1===i){for(u=1+(s-=e),l=1+(r-=e),o=e-1;0<=o;o--)f[u+o]=f[l+o];f[s]=m[a]}else{if(0===i)throw new Error;for(l=s-(i-1),o=0;o<i;o++)f[l+o]=m[o]}}})(e,n,i,o)}}var mn=1,vn=4,_n=!1;function xn(){_n||(_n=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function wn(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}Sn.prototype.traverse=function(t,e){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(t,e)},Sn.prototype.getDisplayList=function(t,e){e=e||!1;var n=this._displayList;return!t&&n.length||this.updateDisplayList(e),n},Sn.prototype.updateDisplayList=function(t){this._displayListLen=0;for(var e=this._roots,n=this._displayList,i=0,o=e.length;i<o;i++)this._updateAndAddDisplayable(e[i],null,t);n.length=this._displayListLen,yn(n,wn)},Sn.prototype._updateAndAddDisplayable=function(t,e,n){if(!t.ignore||n){t.beforeUpdate(),t.update(),t.afterUpdate();var i=t.getClipPath();if(t.ignoreClip)e=null;else if(i){e=e?e.slice():[];for(var o=i,r=t;o;)o.parent=r,o.updateTransform(),e.push(o),o=(r=o).getClipPath()}if(t.childrenRef){for(var a=t.childrenRef(),s=0;s<a.length;s++){var l=a[s];t.__dirty&&(l.__dirty|=mn),this._updateAndAddDisplayable(l,e,n)}t.__dirty=0}else{i=t;e&&e.length?i.__clipPaths=e:i.__clipPaths&&0<i.__clipPaths.length&&(i.__clipPaths=[]),isNaN(i.z)&&(xn(),i.z=0),isNaN(i.z2)&&(xn(),i.z2=0),isNaN(i.zlevel)&&(xn(),i.zlevel=0),this._displayList[this._displayListLen++]=i}i=t.getDecalElement&&t.getDecalElement(),i=(i&&this._updateAndAddDisplayable(i,e,n),t.getTextGuideLine()),i=(i&&this._updateAndAddDisplayable(i,e,n),t.getTextContent());i&&this._updateAndAddDisplayable(i,e,n)}},Sn.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},Sn.prototype.delRoot=function(t){if(t instanceof Array)for(var e=0,n=t.length;e<n;e++)this.delRoot(t[e]);else{var i=C(this._roots,t);0<=i&&this._roots.splice(i,1)}},Sn.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},Sn.prototype.getRoots=function(){return this._roots},Sn.prototype.dispose=function(){this._displayList=null,this._roots=null};var bn=Sn;function Sn(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=wn}var Mn=b.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)},Tn={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,n=.1;return 0===t?0:1===t?1:(e=!n||n<1?(n=1,.1):.4*Math.asin(1/n)/(2*Math.PI),-n*Math.pow(2,10*--t)*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(e=!n||n<1?(n=1,.1):.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(e=!n||n<1?(n=1,.1):.4*Math.asin(1/n)/(2*Math.PI),(t*=2)<1?n*Math.pow(2,10*--t)*Math.sin((t-e)*(2*Math.PI)/.4)*-.5:n*Math.pow(2,-10*--t)*Math.sin((t-e)*(2*Math.PI)/.4)*.5+1)},backIn:function(t){return t*t*(2.70158*t-1.70158)},backOut:function(t){return--t*t*(2.70158*t+1.70158)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((1+e)*t-e)*.5:.5*((t-=2)*t*((1+e)*t+e)+2)},bounceIn:function(t){return 1-Tn.bounceOut(1-t)},bounceOut: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},bounceInOut:function(t){return t<.5?.5*Tn.bounceIn(2*t):.5*Tn.bounceOut(2*t-1)+.5}},In=Math.pow,Cn=Math.sqrt,Dn=1e-8,kn=Cn(3),An=1/3,Ln=Vt(),Pn=Vt(),On=Vt();function Rn(t){return-Dn<t&&t<Dn}function Nn(t){return Dn<t||t<-Dn}function En(t,e,n,i,o){var r=1-o;return r*r*(r*t+3*o*e)+o*o*(o*i+3*r*n)}function zn(t,e,n,i,o){var r=1-o;return 3*(((e-t)*r+2*(n-e)*o)*r+(i-n)*o*o)}function Bn(t,e,n,i,o,r){var a,s,i=i+3*(e-n)-t,n=3*(n-2*e+t),e=3*(e-t),t=t-o,o=n*n-3*i*e,l=n*e-9*i*t,t=e*e-3*n*t,u=0;return Rn(o)&&Rn(l)?Rn(n)?r[0]=0:0<=(s=-e/n)&&s<=1&&(r[u++]=s):Rn(e=l*l-4*o*t)?(a=-(t=l/o)/2,0<=(s=-n/i+t)&&s<=1&&(r[u++]=s),0<=a&&a<=1&&(r[u++]=a)):0<e?(e=o*n+1.5*i*(-l-(t=Cn(e))),0<=(s=(-n-((t=(t=o*n+1.5*i*(-l+t))<0?-In(-t,An):In(t,An))+(e=e<0?-In(-e,An):In(e,An))))/(3*i))&&s<=1&&(r[u++]=s)):(t=(2*o*n-3*i*l)/(2*Cn(o*o*o)),e=Math.acos(t)/3,s=(-n-2*(l=Cn(o))*(t=Math.cos(e)))/(3*i),a=(-n+l*(t+kn*Math.sin(e)))/(3*i),o=(-n+l*(t-kn*Math.sin(e)))/(3*i),0<=s&&s<=1&&(r[u++]=s),0<=a&&a<=1&&(r[u++]=a),0<=o&&o<=1&&(r[u++]=o)),u}function Fn(t,e,n,i,o){var r,a=6*n-12*e+6*t,i=9*e+3*i-3*t-9*n,n=3*e-3*t,e=0;return Rn(i)?Nn(a)&&0<=(r=-n/a)&&r<=1&&(o[e++]=r):Rn(t=a*a-4*i*n)?o[0]=-a/(2*i):0<t&&(t=(-a-(n=Cn(t)))/(2*i),0<=(r=(-a+n)/(2*i))&&r<=1&&(o[e++]=r),0<=t)&&t<=1&&(o[e++]=t),e}function Vn(t,e,n,i,o,r){var a=(e-t)*o+t,e=(n-e)*o+e,n=(i-n)*o+n,s=(e-a)*o+a,e=(n-e)*o+e,o=(e-s)*o+s;r[0]=t,r[1]=a,r[2]=s,r[3]=o,r[4]=o,r[5]=e,r[6]=n,r[7]=i}function Hn(t,e,n,i,o,r,a,s,l,u,h){var c,p,d,f,g=.005,y=1/0;Ln[0]=l,Ln[1]=u;for(var m=0;m<1;m+=.05)Pn[0]=En(t,n,o,a,m),Pn[1]=En(e,i,r,s,m),(d=$t(Ln,Pn))<y&&(c=m,y=d);for(var y=1/0,v=0;v<32&&!(g<1e-4);v++)p=c+g,Pn[0]=En(t,n,o,a,f=c-g),Pn[1]=En(e,i,r,s,f),d=$t(Pn,Ln),0<=f&&d<y?(c=f,y=d):(On[0]=En(t,n,o,a,p),On[1]=En(e,i,r,s,p),f=$t(On,Ln),p<=1&&f<y?(c=p,y=f):g*=.5);return h&&(h[0]=En(t,n,o,a,c),h[1]=En(e,i,r,s,c)),Cn(y)}function Wn(t,e,n,i){var o=1-i;return o*(o*t+2*i*e)+i*i*n}function Gn(t,e,n,i){return 2*((1-i)*(e-t)+i*(n-e))}function Xn(t,e,n){n=t+n-2*e;return 0==n?.5:(t-e)/n}function Un(t,e,n,i,o){var r=(e-t)*i+t,e=(n-e)*i+e,i=(e-r)*i+r;o[0]=t,o[1]=r,o[2]=i,o[3]=i,o[4]=e,o[5]=n}function Yn(t,e,n,i,o,r,a,s,l){var u,h=.005,c=1/0;Ln[0]=a,Ln[1]=s;for(var p=0;p<1;p+=.05)Pn[0]=Wn(t,n,o,p),Pn[1]=Wn(e,i,r,p),(y=$t(Ln,Pn))<c&&(u=p,c=y);for(var c=1/0,d=0;d<32&&!(h<1e-4);d++){var f=u-h,g=u+h,y=(Pn[0]=Wn(t,n,o,f),Pn[1]=Wn(e,i,r,f),$t(Pn,Ln));0<=f&&y<c?(u=f,c=y):(On[0]=Wn(t,n,o,g),On[1]=Wn(e,i,r,g),f=$t(On,Ln),g<=1&&f<c?(u=g,c=f):h*=.5)}return l&&(l[0]=Wn(t,n,o,u),l[1]=Wn(e,i,r,u)),Cn(c)}var Zn=/cubic-bezier\(([0-9,\.e ]+)\)/;function qn(t){t=t&&Zn.exec(t);if(t){var e,t=t[1].split(","),n=+Mt(t[0]),i=+Mt(t[1]),o=+Mt(t[2]),r=+Mt(t[3]);if(!isNaN(n+i+o+r))return e=[],function(t){return t<=0?0:1<=t?1:Bn(0,n,o,1,t,e)&&En(0,i,r,1,e[0])}}}Kn.prototype.step=function(t,e){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),!this._paused){var n=this._life,i=t-this._startTime-this._pausedTime,o=i/n,r=(o<0&&(o=0),o=Math.min(o,1),this.easingFunc),r=r?r(o):o;if(this.onframe(r),1===o){if(!this.loop)return!0;this._startTime=t-i%n,this._pausedTime=0,this.onrestart()}return!1}this._pausedTime+=e},Kn.prototype.pause=function(){this._paused=!0},Kn.prototype.resume=function(){this._paused=!1},Kn.prototype.setEasing=function(t){this.easing=t,this.easingFunc=D(t)?t:Tn[t]||qn(t)};var jn=Kn;function Kn(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||zt,this.ondestroy=t.ondestroy||zt,this.onrestart=t.onrestart||zt,t.easing&&this.setEasing(t.easing)}function $n(t){this.value=t}Jn.prototype.insert=function(t){t=new $n(t);return this.insertEntry(t),t},Jn.prototype.insertEntry=function(t){this.head?((this.tail.next=t).prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},Jn.prototype.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._len--},Jn.prototype.len=function(){return this._len},Jn.prototype.clear=function(){this.head=this.tail=null,this._len=0};var Qn=Jn;function Jn(){this._len=0}ei.prototype.put=function(t,e){var n,i,o=this._list,r=this._map,a=null;return null==r[t]&&(i=o.len(),n=this._lastRemovedEntry,i>=this._maxSize&&0<i&&(i=o.head,o.remove(i),delete r[i.key],a=i.value,this._lastRemovedEntry=i),n?n.value=e:n=new $n(e),n.key=t,o.insertEntry(n),r[t]=n),a},ei.prototype.get=function(t){var t=this._map[t],e=this._list;if(null!=t)return t!==e.tail&&(e.remove(t),e.insertEntry(t)),t.value},ei.prototype.clear=function(){this._list.clear(),this._map={}},ei.prototype.len=function(){return this._list.len()};var ti=ei;function ei(t){this._list=new Qn,this._maxSize=10,this._map={},this._maxSize=t}var ni={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function ii(t){return(t=Math.round(t))<0?0:255<t?255:t}function oi(t){return t<0?0:1<t?1:t}function ri(t){return t.length&&"%"===t.charAt(t.length-1)?ii(parseFloat(t)/100*255):ii(parseInt(t,10))}function ai(t){return t.length&&"%"===t.charAt(t.length-1)?oi(parseFloat(t)/100):oi(parseFloat(t))}function si(t,e,n){return n<0?n+=1:1<n&&--n,6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function li(t,e,n){return t+(e-t)*n}function ui(t,e,n,i,o){return t[0]=e,t[1]=n,t[2]=i,t[3]=o,t}function hi(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var ci=new ti(20),pi=null;function di(t,e){pi&&hi(pi,e),pi=ci.put(t,pi||e.slice())}function fi(t,e){if(t){e=e||[];var n=ci.get(t);if(n)return hi(e,n);n=(t+="").replace(/ /g,"").toLowerCase();if(n in ni)return hi(e,ni[n]),di(t,e),e;var i=n.length;if("#"===n.charAt(0))return 4===i||5===i?0<=(o=parseInt(n.slice(1,4),16))&&o<=4095?(ui(e,(3840&o)>>4|(3840&o)>>8,240&o|(240&o)>>4,15&o|(15&o)<<4,5===i?parseInt(n.slice(4),16)/15:1),di(t,e),e):void ui(e,0,0,0,1):7===i||9===i?0<=(o=parseInt(n.slice(1,7),16))&&o<=16777215?(ui(e,(16711680&o)>>16,(65280&o)>>8,255&o,9===i?parseInt(n.slice(7),16)/255:1),di(t,e),e):void ui(e,0,0,0,1):void 0;var o=n.indexOf("("),r=n.indexOf(")");if(-1!==o&&r+1===i){var i=n.substr(0,o),a=n.substr(o+1,r-(o+1)).split(","),s=1;switch(i){case"rgba":if(4!==a.length)return 3===a.length?ui(e,+a[0],+a[1],+a[2],1):ui(e,0,0,0,1);s=ai(a.pop());case"rgb":return 3<=a.length?(ui(e,ri(a[0]),ri(a[1]),ri(a[2]),3===a.length?s:ai(a[3])),di(t,e),e):void ui(e,0,0,0,1);case"hsla":return 4!==a.length?void ui(e,0,0,0,1):(a[3]=ai(a[3]),gi(a,e),di(t,e),e);case"hsl":return 3!==a.length?void ui(e,0,0,0,1):(gi(a,e),di(t,e),e);default:return}}ui(e,0,0,0,1)}}function gi(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=ai(t[1]),o=ai(t[2]),i=o<=.5?o*(i+1):o+i-o*i,o=2*o-i;return ui(e=e||[],ii(255*si(o,i,n+1/3)),ii(255*si(o,i,n)),ii(255*si(o,i,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function yi(t,e){var n=fi(t);if(n){for(var i=0;i<3;i++)n[i]=e<0?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,255<n[i]?n[i]=255:n[i]<0&&(n[i]=0);return xi(n,4===n.length?"rgba":"rgb")}}function mi(t,e,n){var i,o,r;if(e&&e.length&&0<=t&&t<=1)return n=n||[],t=t*(e.length-1),i=Math.floor(t),r=Math.ceil(t),o=e[i],e=e[r],n[0]=ii(li(o[0],e[0],r=t-i)),n[1]=ii(li(o[1],e[1],r)),n[2]=ii(li(o[2],e[2],r)),n[3]=oi(li(o[3],e[3],r)),n}var vi=mi;function _i(t,e,n){var i,o,r,a;if(e&&e.length&&0<=t&&t<=1)return t=t*(e.length-1),i=Math.floor(t),o=Math.ceil(t),a=fi(e[i]),e=fi(e[o]),a=xi([ii(li(a[0],e[0],r=t-i)),ii(li(a[1],e[1],r)),ii(li(a[2],e[2],r)),oi(li(a[3],e[3],r))],"rgba"),n?{color:a,leftIndex:i,rightIndex:o,value:t}:a}var e=_i;function xi(t,e){var n;if(t&&t.length)return n=t[0]+","+t[1]+","+t[2],"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(n+=","+t[3]),e+"("+n+")"}function wi(t,e){t=fi(t);return t?(.299*t[0]+.587*t[1]+.114*t[2])*t[3]/255+(1-t[3])*e:0}var bi=new ti(100);function Si(t){var e;return H(t)?((e=bi.get(t))||(e=yi(t,-.1),bi.put(t,e)),e):gt(t)?((e=P({},t)).colorStops=F(t.colorStops,function(t){return{offset:t.offset,color:yi(t.color,-.1)}}),e):t}vi=Object.freeze({__proto__:null,fastLerp:mi,fastMapToColor:vi,lerp:_i,lift:yi,liftColor:Si,lum:wi,mapToColor:e,modifyAlpha:function(t,e){if((t=fi(t))&&null!=e)return t[3]=oi(e),xi(t,"rgba")},modifyHSL:function(t,e,n,i){var o=fi(t);if(t)return o=function(t){var e,n,i,o,r,a,s,l,u,h;if(t)return h=t[0]/255,n=t[1]/255,i=t[2]/255,s=Math.min(h,n,i),r=((o=Math.max(h,n,i))+s)/2,0==(u=o-s)?a=e=0:(a=r<.5?u/(o+s):u/(2-o-s),s=((o-h)/6+u/2)/u,l=((o-n)/6+u/2)/u,u=((o-i)/6+u/2)/u,h===o?e=u-l:n===o?e=1/3+s-u:i===o&&(e=2/3+l-s),e<0&&(e+=1),1<e&&--e),h=[360*e,a,r],null!=t[3]&&h.push(t[3]),h}(o),null!=e&&(o[0]=(t=e,(t=Math.round(t))<0?0:360<t?360:t)),null!=n&&(o[1]=ai(n)),null!=i&&(o[2]=ai(i)),xi(gi(o),"rgba")},parse:fi,random:function(){return xi([Math.round(255*Math.random()),Math.round(255*Math.random()),Math.round(255*Math.random())],"rgb")},stringify:xi,toHex:function(t){if(t=fi(t))return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)}});b.hasGlobalWindow&&D(window.btoa);var Mi=Array.prototype.slice;function Ti(t,e,n){return(e-t)*n+t}function Ii(t,e,n,i){for(var o=e.length,r=0;r<o;r++)t[r]=Ti(e[r],n[r],i);return t}function Ci(t,e,n,i){for(var o=e.length,r=0;r<o;r++)t[r]=e[r]+n[r]*i;return t}function Di(t,e,n,i){for(var o=e.length,r=o&&e[0].length,a=0;a<o;a++){t[a]||(t[a]=[]);for(var s=0;s<r;s++)t[a][s]=e[a][s]+n[a][s]*i}return t}function ki(t){if(st(t)){var e=t.length;if(st(t[0])){for(var n=[],i=0;i<e;i++)n.push(Mi.call(t[i]));return n}return Mi.call(t)}return t}function Ai(t){return t[0]=Math.floor(t[0])||0,t[1]=Math.floor(t[1])||0,t[2]=Math.floor(t[2])||0,t[3]=null==t[3]?1:t[3],"rgba("+t.join(",")+")"}function Li(t){return 4===t||5===t}function Pi(t){return 1===t||2===t}var Oi=[0,0,0,0],Ri=(zi.prototype.isFinished=function(){return this._finished},zi.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},zi.prototype.needsAnimate=function(){return 1<=this.keyframes.length},zi.prototype.getAdditiveTrack=function(){return this._additiveTrack},zi.prototype.addKeyframe=function(t,e,n){this._needsSort=!0;var i,o=this.keyframes,r=o.length,a=!1,s=6,l=e,u=(st(e)?(1==(s=i=st((i=e)&&i[0])?2:1)&&!W(e[0])||2==i&&!W(e[0][0]))&&(a=!0):W(e)&&!vt(e)?s=0:H(e)?isNaN(+e)?(i=fi(e))&&(l=i,s=3):s=0:gt(e)&&((u=P({},l)).colorStops=F(e.colorStops,function(t){return{offset:t.offset,color:fi(t.color)}}),"linear"===e.type?s=4:"radial"===e.type&&(s=5),l=u),0===r?this.valType=s:s===this.valType&&6!==s||(a=!0),this.discrete=this.discrete||a,{time:t,value:l,rawValue:e,percent:0});return n&&(u.easing=n,u.easingFunc=D(n)?n:Tn[n]||qn(n)),o.push(u),u},zi.prototype.prepare=function(t,e){var n=this.keyframes;this._needsSort&&n.sort(function(t,e){return t.time-e.time});for(var i=this.valType,o=n.length,r=n[o-1],a=this.discrete,s=Pi(i),l=Li(i),u=0;u<o;u++){var h=n[u],c=h.value,p=r.value;if(h.percent=h.time/t,!a)if(s&&u!==o-1){h=void 0;d=void 0;f=void 0;g=void 0;y=void 0;m=void 0;v=void 0;_=void 0;x=void 0;h=c;var d=p;var f=i;var g=h,y=d;if(g.push&&y.push){var h=g.length,m=y.length;if(h!==m)if(m<h)g.length=m;else for(var v=h;v<m;v++)g.push(1===f?y[v]:Mi.call(y[v]));for(var _=g[0]&&g[0].length,v=0;v<g.length;v++)if(1===f)isNaN(g[v])&&(g[v]=y[v]);else for(var x=0;x<_;x++)isNaN(g[v][x])&&(g[v][x]=y[v][x])}}else if(l){d=void 0;h=void 0;w=void 0;b=void 0;S=void 0;M=void 0;T=void 0;d=c.colorStops;h=p.colorStops;for(var w=d.length,b=h.length,S=b<w?h:d,h=Math.min(w,b),M=S[h-1]||{color:[0,0,0,0],offset:0},T=h;T<Math.max(w,b);T++)S.push({offset:M.offset,color:M.color.slice()})}}if(!a&&5!==i&&e&&this.needsAnimate()&&e.needsAnimate()&&i===e.valType&&!e._finished){this._additiveTrack=e;for(var I=n[0].value,u=0;u<o;u++)0===i?n[u].additiveValue=n[u].value-I:3===i?n[u].additiveValue=Ci([],n[u].value,I,-1):Pi(i)&&(n[u].additiveValue=(1===i?Ci:Di)([],n[u].value,I,-1))}},zi.prototype.step=function(t,e){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n,i,o,r,a,s=null!=this._additiveTrack,l=s?"additiveValue":"value",u=this.valType,h=this.keyframes,c=h.length,p=this.propName,d=3===u,f=this._lastFr,g=Math.min;if(1===c)i=o=h[0];else{if(e<0)n=0;else if(e<this._lastFrP){for(n=g(f+1,c-1);0<=n&&!(h[n].percent<=e);n--);n=g(n,c-2)}else{for(n=f;n<c&&!(h[n].percent>e);n++);n=g(n-1,c-2)}o=h[n+1],i=h[n]}i&&o&&(this._lastFr=n,this._lastFrP=e,f=o.percent-i.percent,r=0==f?1:g((e-i.percent)/f,1),o.easingFunc&&(r=o.easingFunc(r)),g=s?this._additiveValue:d?Oi:t[p],(Pi(u)||d)&&(g=g||(this._additiveValue=[])),this.discrete?t[p]=(r<1?i:o).rawValue:Pi(u)?(1===u?Ii:function(t,e,n,i){for(var o=e.length,r=o&&e[0].length,a=0;a<o;a++){t[a]||(t[a]=[]);for(var s=0;s<r;s++)t[a][s]=Ti(e[a][s],n[a][s],i)}})(g,i[l],o[l],r):Li(u)?(f=i[l],a=o[l],t[p]={type:(u=4===u)?"linear":"radial",x:Ti(f.x,a.x,r),y:Ti(f.y,a.y,r),colorStops:F(f.colorStops,function(t,e){e=a.colorStops[e];return{offset:Ti(t.offset,e.offset,r),color:Ai(Ii([],t.color,e.color,r))}}),global:a.global},u?(t[p].x2=Ti(f.x2,a.x2,r),t[p].y2=Ti(f.y2,a.y2,r)):t[p].r=Ti(f.r,a.r,r)):d?(Ii(g,i[l],o[l],r),s||(t[p]=Ai(g))):(u=Ti(i[l],o[l],r),s?this._additiveValue=u:t[p]=u),s)&&this._addToTarget(t)}},zi.prototype._addToTarget=function(t){var e=this.valType,n=this.propName,i=this._additiveValue;0===e?t[n]=t[n]+i:3===e?(fi(t[n],Oi),Ci(Oi,Oi,i,1),t[n]=Ai(Oi)):1===e?Ci(t[n],t[n],i,1):2===e&&Di(t[n],t[n],i,1)},zi),Ni=(Ei.prototype.getMaxTime=function(){return this._maxTime},Ei.prototype.getDelay=function(){return this._delay},Ei.prototype.getLoop=function(){return this._loop},Ei.prototype.getTarget=function(){return this._target},Ei.prototype.changeTarget=function(t){this._target=t},Ei.prototype.when=function(t,e,n){return this.whenWithKeys(t,e,ht(e),n)},Ei.prototype.whenWithKeys=function(t,e,n,i){for(var o=this._tracks,r=0;r<n.length;r++){var a=n[r];if(!(l=o[a])){var s,l=o[a]=new Ri(a),u=void 0,h=this._getAdditiveTrack(a);if(h?(u=(s=(s=h.keyframes)[s.length-1])&&s.value,3===h.valType&&(u=u&&Ai(u))):u=this._target[a],null==u)continue;0<t&&l.addKeyframe(0,ki(u),i),this._trackKeys.push(a)}l.addKeyframe(t,ki(e[a]),i)}return this._maxTime=Math.max(this._maxTime,t),this},Ei.prototype.pause=function(){this._clip.pause(),this._paused=!0},Ei.prototype.resume=function(){this._clip.resume(),this._paused=!1},Ei.prototype.isPaused=function(){return!!this._paused},Ei.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},Ei.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var e=t.length,n=0;n<e;n++)t[n].call(this)},Ei.prototype._abortedCallback=function(){this._setTracksFinished();var t=this.animation,e=this._abortedCbs;if(t&&t.removeClip(this._clip),this._clip=null,e)for(var n=0;n<e.length;n++)e[n].call(this)},Ei.prototype._setTracksFinished=function(){for(var t=this._tracks,e=this._trackKeys,n=0;n<e.length;n++)t[e[n]].setFinished()},Ei.prototype._getAdditiveTrack=function(t){var e,n=this._additiveAnimators;if(n)for(var i=0;i<n.length;i++){var o=n[i].getTrack(t);o&&(e=o)}return e},Ei.prototype.start=function(t){if(!(0<this._started)){this._started=1;for(var e,r=this,a=[],n=this._maxTime||0,i=0;i<this._trackKeys.length;i++){var o=this._trackKeys[i],s=this._tracks[o],o=this._getAdditiveTrack(o),l=s.keyframes,u=l.length;s.prepare(n,o),s.needsAnimate()&&(!this._allowDiscrete&&s.discrete?((o=l[u-1])&&(r._target[s.propName]=o.rawValue),s.setFinished()):a.push(s))}return a.length||this._force?(e=new jn({life:n,loop:this._loop,delay:this._delay||0,onframe:function(t){r._started=2;var e=r._additiveAnimators;if(e){for(var n=!1,i=0;i<e.length;i++)if(e[i]._clip){n=!0;break}n||(r._additiveAnimators=null)}for(i=0;i<a.length;i++)a[i].step(r._target,t);var o=r._onframeCbs;if(o)for(i=0;i<o.length;i++)o[i](r._target,t)},ondestroy:function(){r._doneCallback()}}),this._clip=e,this.animation&&this.animation.addClip(e),t&&e.setEasing(t)):this._doneCallback(),this}},Ei.prototype.stop=function(t){var e;this._clip&&(e=this._clip,t&&e.onframe(1),this._abortedCallback())},Ei.prototype.delay=function(t){return this._delay=t,this},Ei.prototype.during=function(t){return t&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(t)),this},Ei.prototype.done=function(t){return t&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(t)),this},Ei.prototype.aborted=function(t){return t&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(t)),this},Ei.prototype.getClip=function(){return this._clip},Ei.prototype.getTrack=function(t){return this._tracks[t]},Ei.prototype.getTracks=function(){var e=this;return F(this._trackKeys,function(t){return e._tracks[t]})},Ei.prototype.stopTracks=function(t,e){if(!t.length||!this._clip)return!0;for(var n=this._tracks,i=this._trackKeys,o=0;o<t.length;o++){var r=n[t[o]];r&&!r.isFinished()&&(e?r.step(this._target,1):1===this._started&&r.step(this._target,0),r.setFinished())}for(var a=!0,o=0;o<i.length;o++)if(!n[i[o]].isFinished()){a=!1;break}return a&&this._abortedCallback(),a},Ei.prototype.saveTo=function(t,e,n){if(t){e=e||this._trackKeys;for(var i=0;i<e.length;i++){var o=e[i],r=this._tracks[o];r&&!r.isFinished()&&(r=(r=r.keyframes)[n?0:r.length-1])&&(t[o]=ki(r.rawValue))}}},Ei.prototype.__changeFinalValue=function(t,e){e=e||ht(t);for(var n=0;n<e.length;n++){var i,o=e[n],r=this._tracks[o];r&&1<(i=r.keyframes).length&&(i=i.pop(),r.addKeyframe(i.time,t[o]),r.prepare(this._maxTime,r.getAdditiveTrack()))}},Ei);function Ei(t,e,n,i){this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,(this._loop=e)&&i?it("Can' use additive animation on looped animation."):(this._additiveAnimators=i,this._allowDiscrete=n)}function zi(t){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=t}function Bi(){return(new Date).getTime()}u(Hi,Fi=ae),Hi.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?((this._tail.next=t).prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},Hi.prototype.addAnimator=function(t){t.animation=this;t=t.getClip();t&&this.addClip(t)},Hi.prototype.removeClip=function(t){var e,n;t.animation&&(e=t.prev,n=t.next,e?e.next=n:this._head=n,n?n.prev=e:this._tail=e,t.next=t.prev=t.animation=null)},Hi.prototype.removeAnimator=function(t){var e=t.getClip();e&&this.removeClip(e),t.animation=null},Hi.prototype.update=function(t){for(var e=Bi()-this._pausedTime,n=e-this._time,i=this._head;i;)var o=i.next,i=(i.step(e,n)&&(i.ondestroy(),this.removeClip(i)),o);this._time=e,t||(this.trigger("frame",n),this.stage.update&&this.stage.update())},Hi.prototype._startLoop=function(){var e=this;this._running=!0,Mn(function t(){e._running&&(Mn(t),!e._paused)&&e.update()})},Hi.prototype.start=function(){this._running||(this._time=Bi(),this._pausedTime=0,this._startLoop())},Hi.prototype.stop=function(){this._running=!1},Hi.prototype.pause=function(){this._paused||(this._pauseStart=Bi(),this._paused=!0)},Hi.prototype.resume=function(){this._paused&&(this._pausedTime+=Bi()-this._pauseStart,this._paused=!1)},Hi.prototype.clear=function(){for(var t=this._head;t;){var e=t.next;t.prev=t.next=t.animation=null,t=e}this._head=this._tail=null},Hi.prototype.isFinished=function(){return null==this._head},Hi.prototype.animate=function(t,e){e=e||{},this.start();t=new Ni(t,e.loop);return this.addAnimator(t),t};var Fi,Vi=Hi;function Hi(t){var e=Fi.call(this)||this;return e._running=!1,e._time=0,e._pausedTime=0,e._pauseStart=0,e._paused=!1,e.stage=(t=t||{}).stage||{},e}var Wi,Gi=b.domSupported,Xi=(Wi={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:e=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:F(e,function(t){var e=t.replace("mouse","pointer");return Wi.hasOwnProperty(e)?e:t})}),Ui=["mousemove","mouseup"],Yi=["pointermove","pointerup"],Zi=!1;function qi(t){t=t.pointerType;return"pen"===t||"touch"===t}function ji(t){t&&(t.zrByTouch=!0)}function Ki(t,e){for(var n=e,i=!1;n&&9!==n.nodeType&&!(i=n.domBelongToZr||n!==e&&n===t.painterRoot);)n=n.parentNode;return i}var $i=function(t,e){this.stopPropagation=zt,this.stopImmediatePropagation=zt,this.preventDefault=zt,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY},Qi={mousedown:function(t){t=Me(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=Me(this.dom,t);var e=this.__mayPointerCapture;!e||t.zrX===e[0]&&t.zrY===e[1]||this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=Me(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){Ki(this,(t=Me(this.dom,t)).toElement||t.relatedTarget)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){Zi=!0,t=Me(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){Zi||(t=Me(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){ji(t=Me(this.dom,t)),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),Qi.mousemove.call(this,t),Qi.mousedown.call(this,t)},touchmove:function(t){ji(t=Me(this.dom,t)),this.handler.processGesture(t,"change"),Qi.mousemove.call(this,t)},touchend:function(t){ji(t=Me(this.dom,t)),this.handler.processGesture(t,"end"),Qi.mouseup.call(this,t),+new Date-+this.__lastTouchMoment<300&&Qi.click.call(this,t)},pointerdown:function(t){Qi.mousedown.call(this,t)},pointermove:function(t){qi(t)||Qi.mousemove.call(this,t)},pointerup:function(t){Qi.mouseup.call(this,t)},pointerout:function(t){qi(t)||Qi.mouseout.call(this,t)}},Ji=(E(["click","dblclick","contextmenu"],function(e){Qi[e]=function(t){t=Me(this.dom,t),this.trigger(e,t)}}),{pointermove:function(t){qi(t)||Ji.mousemove.call(this,t)},pointerup:function(t){Ji.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}});function to(i,o){var r=o.domHandlers;b.pointerEventsSupported?E(Xi.pointer,function(e){no(o,e,function(t){r[e].call(i,t)})}):(b.touchEventsSupported&&E(Xi.touch,function(n){no(o,n,function(t){var e;r[n].call(i,t),(e=o).touching=!0,null!=e.touchTimer&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)})}),E(Xi.mouse,function(e){no(o,e,function(t){t=Se(t),o.touching||r[e].call(i,t)})}))}function eo(i,o){function t(n){no(o,n,function(t){var e;t=Se(t),Ki(i,t.target)||(e=t,t=Me(i.dom,new $i(i,e),!0),o.domHandlers[n].call(i,t))},{capture:!0})}b.pointerEventsSupported?E(Yi,t):b.touchEventsSupported||E(Ui,t)}function no(t,e,n,i){t.mounted[e]=n,t.listenerOpts[e]=i,t.domTarget.addEventListener(e,n,i)}function io(t){var e,n,i,o,r,a=t.mounted;for(e in a)a.hasOwnProperty(e)&&(n=t.domTarget,i=e,o=a[e],r=t.listenerOpts[e],n.removeEventListener(i,o,r));t.mounted={}}function oo(t,e){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=e}u(so,ro=ae),so.prototype.dispose=function(){io(this._localHandlerScope),Gi&&io(this._globalHandlerScope)},so.prototype.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},so.prototype.__togglePointerCapture=function(t){var e;this.__mayPointerCapture=null,Gi&&+this.__pointerCapturing^+t&&(this.__pointerCapturing=t,e=this._globalHandlerScope,t?eo(this,e):io(e))};var ro,ao=so;function so(t,e){var n=ro.call(this)||this;return n.__pointerCapturing=!1,n.dom=t,n.painterRoot=e,n._localHandlerScope=new oo(t,Qi),Gi&&(n._globalHandlerScope=new oo(document,Ji)),to(n,n._localHandlerScope),n}var e=1,lo=e=b.hasGlobalWindow?Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1):e,uo="#333",ho="#ccc",co=Pe;function po(t){return 5e-5<t||t<-5e-5}var fo=[],go=[],yo=Le(),mo=Math.abs,vo=(_o.prototype.getLocalTransform=function(t){return _o.getLocalTransform(this,t)},_o.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},_o.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},_o.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},_o.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},_o.prototype.needLocalTransform=function(){return po(this.rotation)||po(this.x)||po(this.y)||po(this.scaleX-1)||po(this.scaleY-1)||po(this.skewX)||po(this.skewY)},_o.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,e=this.needLocalTransform(),n=this.transform;e||t?(n=n||Le(),e?this.getLocalTransform(n):co(n),t&&(e?Re(n,t,n):Oe(n,t)),this.transform=n,this._resolveGlobalScaleRatio(n)):n&&(co(n),this.invTransform=null)},_o.prototype._resolveGlobalScaleRatio=function(t){var e,n,i=this.globalScaleRatio;null!=i&&1!==i&&(this.getGlobalScale(fo),n=((fo[1]-(n=fo[1]<0?-1:1))*i+n)/fo[1]||0,t[0]*=i=((fo[0]-(e=fo[0]<0?-1:1))*i+e)/fo[0]||0,t[1]*=i,t[2]*=n,t[3]*=n),this.invTransform=this.invTransform||Le(),Be(this.invTransform,t)},_o.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},_o.prototype.setLocalTransform=function(t){var e,n,i,o;t&&(o=t[0]*t[0]+t[1]*t[1],i=t[2]*t[2]+t[3]*t[3],e=Math.atan2(t[1],t[0]),n=Math.PI/2+e-Math.atan2(t[3],t[2]),i=Math.sqrt(i)*Math.cos(n),o=Math.sqrt(o),this.skewX=n,this.skewY=0,this.rotation=-e,this.x=+t[4],this.y=+t[5],this.scaleX=o,this.scaleY=i,this.originX=0,this.originY=0)},_o.prototype.decomposeTransform=function(){var t,e,n;this.transform&&(e=this.parent,t=this.transform,e&&e.transform&&(e.invTransform=e.invTransform||Le(),Re(go,e.invTransform,t),t=go),e=this.originX,n=this.originY,(e||n)&&(yo[4]=e,yo[5]=n,Re(go,t,yo),go[4]-=e,go[5]-=n,t=go),this.setLocalTransform(t))},_o.prototype.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1])):(t[0]=1,t[1]=1),t},_o.prototype.transformCoordToLocal=function(t,e){t=[t,e],e=this.invTransform;return e&&Jt(t,t,e),t},_o.prototype.transformCoordToGlobal=function(t,e){t=[t,e],e=this.transform;return e&&Jt(t,t,e),t},_o.prototype.getLineScale=function(){var t=this.transform;return t&&1e-10<mo(t[0]-1)&&1e-10<mo(t[3]-1)?Math.sqrt(mo(t[0]*t[3]-t[2]*t[1])):1},_o.prototype.copyTransform=function(t){for(var e=this,n=t,i=0;i<xo.length;i++){var o=xo[i];e[o]=n[o]}},_o.getLocalTransform=function(t,e){e=e||[];var n=t.originX||0,i=t.originY||0,o=t.scaleX,r=t.scaleY,a=t.anchorX,s=t.anchorY,l=t.rotation||0,u=t.x,h=t.y,c=t.skewX?Math.tan(t.skewX):0,t=t.skewY?Math.tan(-t.skewY):0;return n||i||a||s?(e[4]=-(a=n+a)*o-c*(s=i+s)*r,e[5]=-s*r-t*a*o):e[4]=e[5]=0,e[0]=o,e[3]=r,e[1]=t*o,e[2]=c*r,l&&Ee(e,e,l),e[4]+=n+u,e[5]+=i+h,e},_o.initDefaultProps=((e=_o.prototype).scaleX=e.scaleY=e.globalScaleRatio=1,void(e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0)),_o);function _o(){}var xo=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];var wo={};function bo(t,e){var n=wo[e=e||j],i=(n=n||(wo[e]=new ti(500))).get(t);return null==i&&(i=X.measureText(t,e).width,n.put(t,i)),i}function So(t,e,n,i){t=bo(t,e),e=Co(e),n=To(0,t,n),i=Io(0,e,i);return new G(n,i,t,e)}function Mo(t,e,n,i){var o=((t||"")+"").split("\n");if(1===o.length)return So(o[0],e,n,i);for(var r=new G(0,0,0,0),a=0;a<o.length;a++){var s=So(o[a],e,n,i);0===a?r.copy(s):r.union(s)}return r}function To(t,e,n){return"right"===n?t-=e:"center"===n&&(t-=e/2),t}function Io(t,e,n){return"middle"===n?t-=e/2:"bottom"===n&&(t-=e),t}function Co(t){return bo("国",t)}function Do(t,e){return"string"==typeof t?0<=t.lastIndexOf("%")?parseFloat(t)/100*e:parseFloat(t):t}function ko(t,e,n){var i=e.position||"inside",o=null!=e.distance?e.distance:5,r=n.height,a=n.width,s=r/2,l=n.x,u=n.y,h="left",c="top";if(i instanceof Array)l+=Do(i[0],n.width),u+=Do(i[1],n.height),c=h=null;else switch(i){case"left":l-=o,u+=s,h="right",c="middle";break;case"right":l+=o+a,u+=s,c="middle";break;case"top":l+=a/2,u-=o,h="center",c="bottom";break;case"bottom":l+=a/2,u+=r+o,h="center";break;case"inside":l+=a/2,u+=s,h="center",c="middle";break;case"insideLeft":l+=o,u+=s,c="middle";break;case"insideRight":l+=a-o,u+=s,h="right",c="middle";break;case"insideTop":l+=a/2,u+=o,h="center";break;case"insideBottom":l+=a/2,u+=r-o,h="center",c="bottom";break;case"insideTopLeft":l+=o,u+=o;break;case"insideTopRight":l+=a-o,u+=o,h="right";break;case"insideBottomLeft":l+=o,u+=r-o,c="bottom";break;case"insideBottomRight":l+=a-o,u+=r-o,h="right",c="bottom"}return(t=t||{}).x=l,t.y=u,t.align=h,t.verticalAlign=c,t}var Ao,Lo="__zr_normal__",Po=xo.concat(["ignore"]),Oo=lt(xo,function(t,e){return t[e]=!0,t},{ignore:!1}),Ro={},No=new G(0,0,0,0),e=(n.prototype._init=function(t){this.attr(t)},n.prototype.drift=function(t,e,n){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;(i=i||(this.transform=[1,0,0,1,0,0]))[4]+=t,i[5]+=e,this.decomposeTransform(),this.markRedraw()},n.prototype.beforeUpdate=function(){},n.prototype.afterUpdate=function(){},n.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},n.prototype.updateInnerText=function(t){var e,n,i,o,r,a,s,l,u,h,c=this._textContent;!c||c.ignore&&!t||(this.textConfig||(this.textConfig={}),l=(t=this.textConfig).local,i=n=void 0,o=!1,(e=c.innerTransformable).parent=l?this:null,h=!1,e.copyTransform(c),null!=t.position&&(u=No,t.layoutRect?u.copy(t.layoutRect):u.copy(this.getBoundingRect()),l||u.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(Ro,t,u):ko(Ro,t,u),e.x=Ro.x,e.y=Ro.y,n=Ro.align,i=Ro.verticalAlign,r=t.origin)&&null!=t.rotation&&(s=a=void 0,s="center"===r?(a=.5*u.width,.5*u.height):(a=Do(r[0],u.width),Do(r[1],u.height)),h=!0,e.originX=-e.x+a+(l?0:u.x),e.originY=-e.y+s+(l?0:u.y)),null!=t.rotation&&(e.rotation=t.rotation),(r=t.offset)&&(e.x+=r[0],e.y+=r[1],h||(e.originX=-r[0],e.originY=-r[1])),a=null==t.inside?"string"==typeof t.position&&0<=t.position.indexOf("inside"):t.inside,s=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),h=u=l=void 0,a&&this.canBeInsideText()?(l=t.insideFill,u=t.insideStroke,null!=l&&"auto"!==l||(l=this.getInsideTextFill()),null!=u&&"auto"!==u||(u=this.getInsideTextStroke(l),h=!0)):(l=t.outsideFill,u=t.outsideStroke,null!=l&&"auto"!==l||(l=this.getOutsideFill()),null!=u&&"auto"!==u||(u=this.getOutsideStroke(l),h=!0)),(l=l||"#000")===s.fill&&u===s.stroke&&h===s.autoStroke&&n===s.align&&i===s.verticalAlign||(o=!0,s.fill=l,s.stroke=u,s.autoStroke=h,s.align=n,s.verticalAlign=i,c.setDefaultTextStyle(s)),c.__dirty|=mn,o&&c.dirtyStyle(!0))},n.prototype.canBeInsideText=function(){return!0},n.prototype.getInsideTextFill=function(){return"#fff"},n.prototype.getInsideTextStroke=function(t){return"#000"},n.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?ho:uo},n.prototype.getOutsideStroke=function(t){for(var e=this.__zr&&this.__zr.getBackgroundColor(),n="string"==typeof e&&fi(e),i=(n=n||[255,255,255,1])[3],o=this.__zr.isDarkMode(),r=0;r<3;r++)n[r]=n[r]*i+(o?0:255)*(1-i);return n[3]=1,xi(n,"rgba")},n.prototype.traverse=function(t,e){},n.prototype.attrKV=function(t,e){"textConfig"===t?this.setTextConfig(e):"textContent"===t?this.setTextContent(e):"clipPath"===t?this.setClipPath(e):"extra"===t?(this.extra=this.extra||{},P(this.extra,e)):this[t]=e},n.prototype.hide=function(){this.ignore=!0,this.markRedraw()},n.prototype.show=function(){this.ignore=!1,this.markRedraw()},n.prototype.attr=function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(O(t))for(var n=ht(t),i=0;i<n.length;i++){var o=n[i];this.attrKV(o,t[o])}return this.markRedraw(),this},n.prototype.saveCurrentToNormalState=function(t){this._innerSaveToNormal(t);for(var e=this._normalState,n=0;n<this.animators.length;n++){var i=this.animators[n],o=i.__fromStateTransition;i.getLoop()||o&&o!==Lo||(o=(o=i.targetName)?e[o]:e,i.saveTo(o))}},n.prototype._innerSaveToNormal=function(t){var e=(e=this._normalState)||(this._normalState={});t.textConfig&&!e.textConfig&&(e.textConfig=this.textConfig),this._savePrimaryToNormal(t,e,Po)},n.prototype._savePrimaryToNormal=function(t,e,n){for(var i=0;i<n.length;i++){var o=n[i];null==t[o]||o in e||(e[o]=this[o])}},n.prototype.hasState=function(){return 0<this.currentStates.length},n.prototype.getState=function(t){return this.states[t]},n.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},n.prototype.clearStates=function(t){this.useState(Lo,!1,t)},n.prototype.useState=function(t,e,n,i){var o=t===Lo;if(this.hasState()||!o){var r,a=this.currentStates,s=this.stateTransition;if(!(0<=C(a,t))||!e&&1!==a.length){if((r=(r=this.stateProxy&&!o?this.stateProxy(t):r)||this.states&&this.states[t])||o)return o||this.saveCurrentToNormalState(r),(a=!!(r&&r.hoverLayer||i))&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,r,this._normalState,e,!n&&!this.__inHover&&s&&0<s.duration,s),i=this._textContent,s=this._textGuide,i&&i.useState(t,e,n,a),s&&s.useState(t,e,n,a),o?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!a&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~mn),r;it("State "+t+" not exists.")}}},n.prototype.useStates=function(t,e,n){if(t.length){var i=[],o=this.currentStates,r=t.length,a=r===o.length;if(a)for(var s=0;s<r;s++)if(t[s]!==o[s]){a=!1;break}if(!a){for(s=0;s<r;s++){var l=t[s],u=void 0;(u=(u=this.stateProxy?this.stateProxy(l,t):u)||this.states[l])&&i.push(u)}var h=i[r-1],h=!!(h&&h.hoverLayer||n),n=(h&&this._toggleHoverLayerFlag(!0),this._mergeStates(i)),c=this.stateTransition,n=(this.saveCurrentToNormalState(n),this._applyStateObj(t.join(","),n,this._normalState,!1,!e&&!this.__inHover&&c&&0<c.duration,c),this._textContent),c=this._textGuide;n&&n.useStates(t,e,h),c&&c.useStates(t,e,h),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!h&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~mn)}}else this.clearStates()},n.prototype.isSilent=function(){for(var t=this.silent,e=this.parent;!t&&e;){if(e.silent){t=!0;break}e=e.parent}return t},n.prototype._updateAnimationTargets=function(){for(var t=0;t<this.animators.length;t++){var e=this.animators[t];e.targetName&&e.changeTarget(this[e.targetName])}},n.prototype.removeState=function(t){var e,t=C(this.currentStates,t);0<=t&&((e=this.currentStates.slice()).splice(t,1),this.useStates(e))},n.prototype.replaceState=function(t,e,n){var i=this.currentStates.slice(),t=C(i,t),o=0<=C(i,e);0<=t?o?i.splice(t,1):i[t]=e:n&&!o&&i.push(e),this.useStates(i)},n.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},n.prototype._mergeStates=function(t){for(var e,n={},i=0;i<t.length;i++){var o=t[i];P(n,o),o.textConfig&&P(e=e||{},o.textConfig)}return e&&(n.textConfig=e),n},n.prototype._applyStateObj=function(t,e,n,i,o,r){var a=!(e&&i);e&&e.textConfig?(this.textConfig=P({},(i?this:n).textConfig),P(this.textConfig,e.textConfig)):a&&n.textConfig&&(this.textConfig=n.textConfig);for(var s={},l=!1,u=0;u<Po.length;u++){var h=Po[u],c=o&&Oo[h];e&&null!=e[h]?c?(l=!0,s[h]=e[h]):this[h]=e[h]:a&&null!=n[h]&&(c?(l=!0,s[h]=n[h]):this[h]=n[h])}if(!o)for(u=0;u<this.animators.length;u++){var p=this.animators[u],d=p.targetName;p.getLoop()||p.__changeFinalValue(d?(e||n)[d]:e||n)}l&&this._transitionState(t,s,r)},n.prototype._attachComponent=function(t){var e;t.__zr&&!t.__hostTarget||t!==this&&((e=this.__zr)&&t.addSelfToZr(e),t.__zr=e,t.__hostTarget=this)},n.prototype._detachComponent=function(t){t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__hostTarget=null},n.prototype.getClipPath=function(){return this._clipPath},n.prototype.setClipPath=function(t){this._clipPath&&this._clipPath!==t&&this.removeClipPath(),this._attachComponent(t),this._clipPath=t,this.markRedraw()},n.prototype.removeClipPath=function(){var t=this._clipPath;t&&(this._detachComponent(t),this._clipPath=null,this.markRedraw())},n.prototype.getTextContent=function(){return this._textContent},n.prototype.setTextContent=function(t){var e=this._textContent;e!==t&&(e&&e!==t&&this.removeTextContent(),t.innerTransformable=new vo,this._attachComponent(t),this._textContent=t,this.markRedraw())},n.prototype.setTextConfig=function(t){this.textConfig||(this.textConfig={}),P(this.textConfig,t),this.markRedraw()},n.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},n.prototype.removeTextContent=function(){var t=this._textContent;t&&(t.innerTransformable=null,this._detachComponent(t),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},n.prototype.getTextGuideLine=function(){return this._textGuide},n.prototype.setTextGuideLine=function(t){this._textGuide&&this._textGuide!==t&&this.removeTextGuideLine(),this._attachComponent(t),this._textGuide=t,this.markRedraw()},n.prototype.removeTextGuideLine=function(){var t=this._textGuide;t&&(this._detachComponent(t),this._textGuide=null,this.markRedraw())},n.prototype.markRedraw=function(){this.__dirty|=mn;var t=this.__zr;t&&(this.__inHover?t.refreshHover():t.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},n.prototype.dirty=function(){this.markRedraw()},n.prototype._toggleHoverLayerFlag=function(t){this.__inHover=t;var e=this._textContent,n=this._textGuide;e&&(e.__inHover=t),n&&(n.__inHover=t)},n.prototype.addSelfToZr=function(t){if(this.__zr!==t){this.__zr=t;var e=this.animators;if(e)for(var n=0;n<e.length;n++)t.animation.addAnimator(e[n]);this._clipPath&&this._clipPath.addSelfToZr(t),this._textContent&&this._textContent.addSelfToZr(t),this._textGuide&&this._textGuide.addSelfToZr(t)}},n.prototype.removeSelfFromZr=function(t){if(this.__zr){this.__zr=null;var e=this.animators;if(e)for(var n=0;n<e.length;n++)t.animation.removeAnimator(e[n]);this._clipPath&&this._clipPath.removeSelfFromZr(t),this._textContent&&this._textContent.removeSelfFromZr(t),this._textGuide&&this._textGuide.removeSelfFromZr(t)}},n.prototype.animate=function(t,e,n){var i=t?this[t]:this,i=new Ni(i,e,n);return t&&(i.targetName=t),this.addAnimator(i,t),i},n.prototype.addAnimator=function(n,t){var e=this.__zr,i=this;n.during(function(){i.updateDuringAnimation(t)}).done(function(){var t=i.animators,e=C(t,n);0<=e&&t.splice(e,1)}),this.animators.push(n),e&&e.animation.addAnimator(n),e&&e.wakeUp()},n.prototype.updateDuringAnimation=function(t){this.markRedraw()},n.prototype.stopAnimation=function(t,e){for(var n=this.animators,i=n.length,o=[],r=0;r<i;r++){var a=n[r];t&&t!==a.scope?o.push(a):a.stop(e)}return this.animators=o,this},n.prototype.animateTo=function(t,e,n){zo(this,t,e,n)},n.prototype.animateFrom=function(t,e,n){zo(this,t,e,n,!0)},n.prototype._transitionState=function(t,e,n,i){for(var o=zo(this,e,n,i),r=0;r<o.length;r++)o[r].__fromStateTransition=t},n.prototype.getBoundingRect=function(){return null},n.prototype.getPaintRect=function(){return null},n.initDefaultProps=((Ao=n.prototype).type="element",Ao.name="",Ao.ignore=Ao.silent=Ao.isGroup=Ao.draggable=Ao.dragging=Ao.ignoreClip=Ao.__inHover=!1,Ao.__dirty=mn,void(Object.defineProperty&&(Eo("position","_legacyPos","x","y"),Eo("scale","_legacyScale","scaleX","scaleY"),Eo("origin","_legacyOrigin","originX","originY")))),n);function n(t){this.id=et++,this.animators=[],this.currentStates=[],this.states={},this._init(t)}function Eo(t,e,n,i){function o(e,t){Object.defineProperty(t,0,{get:function(){return e[n]},set:function(t){e[n]=t}}),Object.defineProperty(t,1,{get:function(){return e[i]},set:function(t){e[i]=t}})}Object.defineProperty(Ao,t,{get:function(){return this[e]||o(this,this[e]=[]),this[e]},set:function(t){this[n]=t[0],this[i]=t[1],this[e]=t,o(this,t)}})}function zo(t,e,n,i,o){function r(){u=!0,--l<=0&&(u?h&&h():c&&c())}function a(){--l<=0&&(u?h&&h():c&&c())}var s=[],l=(!function t(e,n,i,o,r,a,s,l){for(var u=ht(o),h=r.duration,c=r.delay,p=r.additive,d=r.setToFinal,f=!O(a),g=e.animators,y=[],m=0;m<u.length;m++){var v=u[m],_=o[v];null!=_&&null!=i[v]&&(f||a[v])?!O(_)||st(_)||gt(_)?y.push(v):n?l||(i[v]=_,e.updateDuringAnimation(n)):t(e,v,i[v],_,r,a&&a[v],s,l):l||(i[v]=_,e.updateDuringAnimation(n),y.push(v))}var x=y.length;if(!p&&x)for(var w=0;w<g.length;w++){var b;(S=g[w]).targetName===n&&S.stopTracks(y)&&(b=C(g,S),g.splice(b,1))}if(r.force||(x=(y=ut(y,function(t){return!Vo(o[t],i[t])})).length),0<x||r.force&&!s.length){var S,M=void 0,T=void 0,I=void 0;if(l)for(T={},d&&(M={}),w=0;w<x;w++)T[v=y[w]]=i[v],d?M[v]=o[v]:i[v]=o[v];else if(d)for(I={},w=0;w<x;w++)I[v=y[w]]=ki(i[v]),Fo(i,o,v);(S=new Ni(i,!1,!1,p?ut(g,function(t){return t.targetName===n}):null)).targetName=n,r.scope&&(S.scope=r.scope),d&&M&&S.whenWithKeys(0,M,y),I&&S.whenWithKeys(0,I,y),S.whenWithKeys(null==h?500:h,l?T:o,y).delay(c||0),e.addAnimator(S,n),s.push(S)}}(t,"",t,e,n=n||{},i,s,o),s.length),u=!1,h=n.done,c=n.aborted;l||h&&h(),0<s.length&&n.during&&s[0].during(function(t,e){n.during(e)});for(var p=0;p<s.length;p++){var d=s[p];d.done(r),d.aborted(a),n.force&&d.duration(n.duration),d.start(n.easing)}return s}function Bo(t,e,n){for(var i=0;i<n;i++)t[i]=e[i]}function Fo(t,e,n){if(st(e[n]))if(st(t[n])||(t[n]=[]),dt(e[n])){var i=e[n].length;t[n].length!==i&&(t[n]=new e[n].constructor(i),Bo(t[n],e[n],i))}else{var o=e[n],r=t[n],a=o.length;if(st(o[0]))for(var s=o[0].length,l=0;l<a;l++)r[l]?Bo(r[l],o[l],s):r[l]=Array.prototype.slice.call(o[l]);else Bo(r,o,a);r.length=o.length}else t[n]=e[n]}function Vo(t,e){return t===e||st(t)&&st(e)&&function(t,e){var n=t.length;if(n!==e.length)return!1;for(var i=0;i<n;i++)if(t[i]!==e[i])return!1;return!0}(t,e)}at(e,ae),at(e,vo);u(Go,Ho=e),Go.prototype.childrenRef=function(){return this._children},Go.prototype.children=function(){return this._children.slice()},Go.prototype.childAt=function(t){return this._children[t]},Go.prototype.childOfName=function(t){for(var e=this._children,n=0;n<e.length;n++)if(e[n].name===t)return e[n]},Go.prototype.childCount=function(){return this._children.length},Go.prototype.add=function(t){return t&&t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),this},Go.prototype.addBefore=function(t,e){var n;return t&&t!==this&&t.parent!==this&&e&&e.parent===this&&0<=(e=(n=this._children).indexOf(e))&&(n.splice(e,0,t),this._doAdd(t)),this},Go.prototype.replace=function(t,e){t=C(this._children,t);return 0<=t&&this.replaceAt(e,t),this},Go.prototype.replaceAt=function(t,e){var n=this._children,i=n[e];return t&&t!==this&&t.parent!==this&&t!==i&&(n[e]=t,i.parent=null,(n=this.__zr)&&i.removeSelfFromZr(n),this._doAdd(t)),this},Go.prototype._doAdd=function(t){t.parent&&t.parent.remove(t);var e=(t.parent=this).__zr;e&&e!==t.__zr&&t.addSelfToZr(e),e&&e.refresh()},Go.prototype.remove=function(t){var e=this.__zr,n=this._children,i=C(n,t);return i<0||(n.splice(i,1),t.parent=null,e&&t.removeSelfFromZr(e),e&&e.refresh()),this},Go.prototype.removeAll=function(){for(var t=this._children,e=this.__zr,n=0;n<t.length;n++){var i=t[n];e&&i.removeSelfFromZr(e),i.parent=null}return t.length=0,this},Go.prototype.eachChild=function(t,e){for(var n=this._children,i=0;i<n.length;i++){var o=n[i];t.call(e,o,i)}return this},Go.prototype.traverse=function(t,e){for(var n=0;n<this._children.length;n++){var i=this._children[n],o=t.call(e,i);i.isGroup&&!o&&i.traverse(t,e)}return this},Go.prototype.addSelfToZr=function(t){Ho.prototype.addSelfToZr.call(this,t);for(var e=0;e<this._children.length;e++)this._children[e].addSelfToZr(t)},Go.prototype.removeSelfFromZr=function(t){Ho.prototype.removeSelfFromZr.call(this,t);for(var e=0;e<this._children.length;e++)this._children[e].removeSelfFromZr(t)},Go.prototype.getBoundingRect=function(t){for(var e=new G(0,0,0,0),n=t||this._children,i=[],o=null,r=0;r<n.length;r++){var a,s=n[r];s.ignore||s.invisible||(a=s.getBoundingRect(),(s=s.getLocalTransform(i))?(G.applyTransform(e,a,s),(o=o||e.clone()).union(e)):(o=o||a.clone()).union(a))}return o||e};var Ho,Wo=Go;function Go(t){var e=Ho.call(this)||this;return e.isGroup=!0,e._children=[],e.attr(t),e}Wo.prototype.type="group";var Xo={},Uo={};qo.prototype.add=function(t){!this._disposed&&t&&(this.storage.addRoot(t),t.addSelfToZr(this),this.refresh())},qo.prototype.remove=function(t){!this._disposed&&t&&(this.storage.delRoot(t),t.removeSelfFromZr(this),this.refresh())},qo.prototype.configLayer=function(t,e){this._disposed||(this.painter.configLayer&&this.painter.configLayer(t,e),this.refresh())},qo.prototype.setBackgroundColor=function(t){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this.refresh(),this._backgroundColor=t,this._darkMode=function(t){if(t){if("string"==typeof t)return wi(t,1)<.4;if(t.colorStops){for(var e=t.colorStops,n=0,i=e.length,o=0;o<i;o++)n+=wi(e[o].color,1);return(n/=i)<.4}}return!1}(t))},qo.prototype.getBackgroundColor=function(){return this._backgroundColor},qo.prototype.setDarkMode=function(t){this._darkMode=t},qo.prototype.isDarkMode=function(){return this._darkMode},qo.prototype.refreshImmediately=function(t){this._disposed||(t||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},qo.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},qo.prototype.flush=function(){this._disposed||this._flush(!1)},qo.prototype._flush=function(t){var e,n=Bi(),t=(this._needsRefresh&&(e=!0,this.refreshImmediately(t)),this._needsRefreshHover&&(e=!0,this.refreshHoverImmediately()),Bi());e?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:t-n})):0<this._sleepAfterStill&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill)&&this.animation.stop()},qo.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},qo.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},qo.prototype.refreshHover=function(){this._needsRefreshHover=!0},qo.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover())},qo.prototype.resize=function(t){this._disposed||(this.painter.resize((t=t||{}).width,t.height),this.handler.resize())},qo.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},qo.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},qo.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},qo.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},qo.prototype.findHover=function(t,e){if(!this._disposed)return this.handler.findHover(t,e)},qo.prototype.on=function(t,e,n){return this._disposed||this.handler.on(t,e,n),this},qo.prototype.off=function(t,e){this._disposed||this.handler.off(t,e)},qo.prototype.trigger=function(t,e){this._disposed||this.handler.trigger(t,e)},qo.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),e=0;e<t.length;e++)t[e]instanceof Wo&&t[e].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},qo.prototype.dispose=function(){var t;this._disposed||(this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,t=this.id,delete Uo[t])};var Yo,Zo=qo;function qo(t,e,n){var i=this,o=(this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n=n||{},this.dom=e,this.id=t,new bn),r=n.renderer||"canvas",r=(Xo[r]||(r=ht(Xo)[0]),n.useDirtyRect=null!=n.useDirtyRect&&n.useDirtyRect,new Xo[r](e,o,n,t)),e=n.ssr||r.ssrOnly;this.storage=o,this.painter=r;var a,t=b.node||b.worker||e?null:new ao(r.getViewportRoot(),r.root),s=n.useCoarsePointer;(null==s||"auto"===s?b.touchEventsSupported:s)&&(a=R(n.pointerSize,44)),this.handler=new rn(o,r,t,r.root,a),this.animation=new Vi({stage:{update:e?null:function(){return i._flush(!0)}}}),e||this.animation.start()}function jo(t,e){t=new Zo(et++,t,e);return Uo[t.id]=t}function Ko(t,e){Xo[t]=e}function $o(t){Yo=t}var Qo=Object.freeze({__proto__:null,dispose:function(t){t.dispose()},disposeAll:function(){for(var t in Uo)Uo.hasOwnProperty(t)&&Uo[t].dispose();Uo={}},getElementSSRData:function(t){if("function"==typeof Yo)return Yo(t)},getInstance:function(t){return Uo[t]},init:jo,registerPainter:Ko,registerSSRDataGetter:$o,version:"5.5.0"}),Jo=20;function tr(t,e,n,i){var o=e[0],e=e[1],r=n[0],n=n[1],a=e-o,s=n-r;if(0==a)return 0==s?r:(r+n)/2;if(i)if(0<a){if(t<=o)return r;if(e<=t)return n}else{if(o<=t)return r;if(t<=e)return n}else{if(t===o)return r;if(t===e)return n}return(t-o)/a*s+r}function er(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return H(t)?t.replace(/^\s+|\s+$/g,"").match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t}function nr(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),Jo),t=(+t).toFixed(e),n?t:+t}function ir(t){return t.sort(function(t,e){return t-e}),t}function or(t){if(t=+t,isNaN(t))return 0;if(1e-14<t)for(var e=1,n=0;n<15;n++,e*=10)if(Math.round(t*e)/e===t)return n;return rr(t)}function rr(t){var t=t.toString().toLowerCase(),e=t.indexOf("e"),n=0<e?+t.slice(e+1):0,e=0<e?e:t.length,t=t.indexOf(".");return Math.max(0,(t<0?0:e-1-t)-n)}function ar(t,e){var n=Math.log,i=Math.LN10,t=Math.floor(n(t[1]-t[0])/i),n=Math.round(n(Math.abs(e[1]-e[0]))/i),e=Math.min(Math.max(-t+n,0),20);return isFinite(e)?e:20}function sr(t,e){var n=lt(t,function(t,e){return t+(isNaN(e)?0:e)},0);if(0===n)return[];for(var i=Math.pow(10,e),e=F(t,function(t){return(isNaN(t)?0:t)/n*i*100}),o=100*i,r=F(e,function(t){return Math.floor(t)}),a=lt(r,function(t,e){return t+e},0),s=F(e,function(t,e){return t-r[e]});a<o;){for(var l=Number.NEGATIVE_INFINITY,u=null,h=0,c=s.length;h<c;++h)s[h]>l&&(l=s[h],u=h);++r[u],s[u]=0,++a}return F(r,function(t){return t/i})}function lr(t){var e=2*Math.PI;return(t%e+e)%e}function ur(t){return-1e-4<t&&t<1e-4}var hr=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function cr(t){var e,n;return t instanceof Date?t:H(t)?(e=hr.exec(t))?e[8]?(n=+e[4]||0,"Z"!==e[8].toUpperCase()&&(n-=+e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,n,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0))):new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0):new Date(NaN):null==t?new Date(NaN):new Date(Math.round(t))}function pr(t){return Math.pow(10,dr(t))}function dr(t){var e;return 0===t?0:(e=Math.floor(Math.log(t)/Math.LN10),10<=t/Math.pow(10,e)&&e++,e)}function fr(t,e){var n=dr(t),i=Math.pow(10,n),o=t/i;return t=(e?o<1.5?1:o<2.5?2:o<4?3:o<7?5:10:o<1?1:o<2?2:o<3?3:o<5?5:10)*i,-20<=n?+t.toFixed(n<0?-n:0):t}function gr(t){var e=parseFloat(t);return e==t&&(0!==e||!H(t)||t.indexOf("x")<=0)?e:NaN}function yr(t){return!isNaN(gr(t))}function mr(){return Math.round(9*Math.random())}function vr(t,e){return null==t?e:null==e?t:t*e/function t(e,n){return 0===n?e:t(n,e%n)}(t,e)}function f(t){throw new Error(t)}function _r(t,e,n){return(e-t)*n+t}var xr="series\0",wr="\0_ec_\0";function br(t){return t instanceof Array?t:null==t?[]:[t]}function Sr(t,e,n){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var i=0,o=n.length;i<o;i++){var r=n[i];!t.emphasis[e].hasOwnProperty(r)&&t[e].hasOwnProperty(r)&&(t.emphasis[e][r]=t[e][r])}}}var Mr=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"];function Tr(t){return!O(t)||V(t)||t instanceof Date?t:t.value}function Ir(t,n,e){var a,i,o,r,s,l,u,h,c,p,d="normalMerge"===e,f="replaceMerge"===e,g="replaceAll"===e,y=(t=t||[],n=(n||[]).slice(),N()),e=(E(n,function(t,e){O(t)||(n[e]=null)}),function(t,e,n){var i=[];if("replaceAll"!==n)for(var o=0;o<t.length;o++){var r=t[o];r&&null!=r.id&&e.set(r.id,o),i.push({existing:"replaceMerge"===n||Lr(r)?null:r,newOption:null,keyInfo:null,brandNew:null})}return i}(t,y,e));return(d||f)&&(u=e,h=t,c=y,E(p=n,function(t,e){var n,i,o;t&&null!=t.id&&(n=Dr(t.id),null!=(i=c.get(n)))&&(St(!(o=u[i]).newOption,'Duplicated option on id "'+n+'".'),o.newOption=t,o.existing=h[i],p[e]=null)})),d&&(s=e,E(l=n,function(t,e){if(t&&null!=t.name)for(var n=0;n<s.length;n++){var i=s[n].existing;if(!s[n].newOption&&i&&(null==i.id||null==t.id)&&!Lr(t)&&!Lr(i)&&Cr("name",i,t))return s[n].newOption=t,void(l[e]=null)}})),d||f?(o=e,r=f,E(n,function(t){if(t){for(var e,n=0;(e=o[n])&&(e.newOption||Lr(e.existing)||e.existing&&null!=t.id&&!Cr("id",t,e.existing));)n++;e?(e.newOption=t,e.brandNew=r):o.push({newOption:t,brandNew:r,existing:null,keyInfo:null}),n++}})):g&&(i=e,E(n,function(t){i.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})})),t=e,a=N(),E(t,function(t){var e=t.existing;e&&a.set(e.id,t)}),E(t,function(t){var e=t.newOption;St(!e||null==e.id||!a.get(e.id)||a.get(e.id)===t,"id duplicates: "+(e&&e.id)),e&&null!=e.id&&a.set(e.id,t),t.keyInfo||(t.keyInfo={})}),E(t,function(t,e){var n=t.existing,i=t.newOption,o=t.keyInfo;if(O(i)){if(o.name=null!=i.name?Dr(i.name):n?n.name:xr+e,n)o.id=Dr(n.id);else if(null!=i.id)o.id=Dr(i.id);else for(var r=0;o.id="\0"+o.name+"\0"+r++,a.get(o.id););a.set(o.id,t)}}),e}function Cr(t,e,n){e=kr(e[t],null),n=kr(n[t],null);return null!=e&&null!=n&&e===n}function Dr(t){return kr(t,"")}function kr(t,e){return null==t?e:H(t)?t:W(t)||ct(t)?t+"":e}function Ar(t){t=t.name;return!(!t||!t.indexOf(xr))}function Lr(t){return t&&null!=t.id&&0===Dr(t.id).indexOf(wr)}function Pr(t,o,r){E(t,function(t){var e,n,i=t.newOption;O(i)&&(t.keyInfo.mainType=o,t.keyInfo.subType=(e=o,i=i,t=t.existing,n=r,i.type||(t?t.subType:n.determineSubType(e,i))))})}function Or(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?V(t.dataIndex)?F(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex):null!=t.name?V(t.name)?F(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name):void 0}function Rr(){var e="__ec_inner_"+Nr++;return function(t){return t[e]||(t[e]={})}}var Nr=mr();function Er(n,t,i){var t=zr(t,i),e=t.mainTypeSpecified,o=t.queryOptionMap,r=t.others,a=i?i.defaultMainType:null;return!e&&a&&o.set(a,{}),o.each(function(t,e){t=Vr(n,e,t,{useDefault:a===e,enableAll:!i||null==i.enableAll||i.enableAll,enableNone:!i||null==i.enableNone||i.enableNone});r[e+"Models"]=t.models,r[e+"Model"]=t.models[0]}),r}function zr(t,o){var e=H(t)?((e={})[t+"Index"]=0,e):t,r=N(),a={},s=!1;return E(e,function(t,e){var n,i;"dataIndex"!==e&&"dataIndexInside"!==e?(n=(i=e.match(/^(\w+)(Index|Id|Name)$/)||[])[1],i=(i[2]||"").toLowerCase(),!n||!i||o&&o.includeMainTypes&&C(o.includeMainTypes,n)<0||(s=s||!!n,(r.get(n)||r.set(n,{}))[i]=t)):a[e]=t}),{mainTypeSpecified:s,queryOptionMap:r,others:a}}var Br={useDefault:!0,enableAll:!1,enableNone:!1},Fr={useDefault:!1,enableAll:!0,enableNone:!0};function Vr(t,e,n,i){i=i||Br;var o=n.index,r=n.id,n=n.name,a={models:null,specified:null!=o||null!=r||null!=n};return a.specified?"none"===o||!1===o?(St(i.enableNone,'`"none"` or `false` is not a valid value on index option.'),a.models=[]):("all"===o&&(St(i.enableAll,'`"all"` is not a valid value on index option.'),o=r=n=null),a.models=t.queryComponents({mainType:e,index:o,id:r,name:n})):(o=void 0,a.models=i.useDefault&&(o=t.getComponent(e))?[o]:[]),a}function Hr(t,e,n){t.setAttribute?t.setAttribute(e,n):t[e]=n}function Wr(t,e,n,i,o){var r=null==e||"auto"===e;if(null==i)return i;if(W(i))return nr(p=_r(n||0,i,o),r?Math.max(or(n||0),or(i)):e);if(H(i))return o<1?n:i;for(var a=[],s=n,l=i,u=Math.max(s?s.length:0,l.length),h=0;h<u;++h){var c,p,d=t.getDimensionInfo(h);d&&"ordinal"===d.type?a[h]=(o<1&&s?s:l)[h]:(p=_r(d=s&&s[h]?s[h]:0,c=l[h],o),a[h]=nr(p,r?Math.max(or(d),or(c)):e))}return a}var Gr=".",Xr="___EC__COMPONENT__CONTAINER___",Ur="___EC__EXTENDED_CLASS___";function Yr(t){var e={main:"",sub:""};return t&&(t=t.split(Gr),e.main=t[0]||"",e.sub=t[1]||""),e}function Zr(t){(t.$constructor=t).extend=function(t){var e,n,i,o=this;return D(i=o)&&/^class\s/.test(Function.prototype.toString.call(i))?(u(r,n=o),e=r):rt(e=function(){(t.$constructor||o).apply(this,arguments)},this),P(e.prototype,t),e[Ur]=!0,e.extend=this.extend,e.superCall=Kr,e.superApply=$r,e.superClass=o,e;function r(){return n.apply(this,arguments)||this}}}function qr(t,e){t.extend=e.extend}var jr=Math.round(10*Math.random());function Kr(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return this.superClass.prototype[e].apply(t,n)}function $r(t,e,n){return this.superClass.prototype[e].apply(t,n)}function Qr(t){var o={};t.registerClass=function(t){var e,n=t.type||t.prototype.type;return n&&(St(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e=n),'componentType "'+e+'" illegal'),(e=Yr(t.prototype.type=n)).sub?e.sub!==Xr&&((n=o[e.main])&&n[Xr]||((n=o[e.main]={})[Xr]=!0),n[e.sub]=t):o[e.main]=t),t},t.getClass=function(t,e,n){var i=o[t];if(i&&i[Xr]&&(i=e?i[e]:null),n&&!i)throw new Error(e?"Component "+t+"."+(e||"")+" is used but not imported.":t+".type should be specified.");return i},t.getClassesByMainType=function(t){var t=Yr(t),n=[],t=o[t.main];return t&&t[Xr]?E(t,function(t,e){e!==Xr&&n.push(t)}):n.push(t),n},t.hasClass=function(t){t=Yr(t);return!!o[t.main]},t.getAllClassMainTypes=function(){var n=[];return E(o,function(t,e){n.push(e)}),n},t.hasSubTypes=function(t){t=Yr(t),t=o[t.main];return t&&t[Xr]}}function Jr(a,s){for(var t=0;t<a.length;t++)a[t][1]||(a[t][1]=a[t][0]);return s=s||!1,function(t,e,n){for(var i={},o=0;o<a.length;o++){var r=a[o][1];e&&0<=C(e,r)||n&&C(n,r)<0||null!=(r=t.getShallow(r,s))&&(i[a[o][0]]=r)}return i}}var ta=Jr([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),ea=(na.prototype.getAreaStyle=function(t,e){return ta(this,t,e)},na);function na(){}var ia=new ti(50);function oa(t,e,n,i,o){return t?"string"==typeof t?(e&&e.__zrImageSrc===t||!n||(n={hostEl:n,cb:i,cbPayload:o},(i=ia.get(t))?aa(e=i.image)||i.pending.push(n):((e=X.loadImage(t,ra,ra)).__zrImageSrc=t,ia.put(t,e.__cachedImgObj={image:e,pending:[n]}))),e):t:e}function ra(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<t.pending.length;e++){var n=t.pending[e],i=n.cb;i&&i(this,n.cbPayload),n.hostEl.dirty()}t.pending.length=0}function aa(t){return t&&t.width&&t.height}var sa=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function la(t,e,n,i,o){if(!e)return"";var r=(t+"").split("\n");o=ua(e,n,i,o);for(var a=0,s=r.length;a<s;a++)r[a]=ha(r[a],o);return r.join("\n")}function ua(t,e,n,i){var o=P({},i=i||{}),r=(o.font=e,n=R(n,"..."),o.maxIterations=R(i.maxIterations,2),o.minChar=R(i.minChar,0)),a=(o.cnCharWidth=bo("国",e),o.ascCharWidth=bo("a",e));o.placeholder=R(i.placeholder,"");for(var s=t=Math.max(0,t-1),l=0;l<r&&a<=s;l++)s-=a;i=bo(n,e);return s<i&&(n="",i=0),s=t-i,o.ellipsis=n,o.ellipsisWidth=i,o.contentWidth=s,o.containerWidth=t,o}function ha(t,e){var n=e.containerWidth,i=e.font,o=e.contentWidth;if(!n)return"";var r=bo(t,i);if(!(r<=n)){for(var a=0;;a++){if(r<=o||a>=e.maxIterations){t+=e.ellipsis;break}var s=0===a?function(t,e,n,i){for(var o=0,r=0,a=t.length;r<a&&o<e;r++){var s=t.charCodeAt(r);o+=0<=s&&s<=127?n:i}return r}(t,o,e.ascCharWidth,e.cnCharWidth):0<r?Math.floor(t.length*o/r):0,r=bo(t=t.substr(0,s),i)}""===t&&(t=e.placeholder)}return t}function ca(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[]}var pa=function(){},da=function(t){this.tokens=[],t&&(this.tokens=t)};function fa(t,e){var n=new ca;if(null!=t&&(t+=""),t){for(var i,o=e.width,r=e.height,a=e.overflow,s="break"!==a&&"breakAll"!==a||null==o?null:{width:o,accumWidth:0,breakAll:"breakAll"===a},l=sa.lastIndex=0;null!=(i=sa.exec(t));){var u=i.index;l<u&&ga(n,t.substring(l,u),e,s),ga(n,i[2],e,s,i[1]),l=sa.lastIndex}l<t.length&&ga(n,t.substring(l,t.length),e,s);var h,c=[],p=0,d=0,f=e.padding,g="truncate"===a,y="truncate"===e.lineOverflow;t:for(var m=0;m<n.lines.length;m++){for(var v=n.lines[m],_=0,x=0,w=0;w<v.tokens.length;w++){var b=(k=v.tokens[w]).styleName&&e.rich[k.styleName]||{},S=k.textPadding=b.padding,M=S?S[1]+S[3]:0,T=k.font=b.font||e.font,I=(k.contentHeight=Co(T),R(b.height,k.contentHeight));if(k.innerHeight=I,S&&(I+=S[0]+S[2]),k.height=I,k.lineHeight=xt(b.lineHeight,e.lineHeight,I),k.align=b&&b.align||e.align,k.verticalAlign=b&&b.verticalAlign||"middle",y&&null!=r&&p+k.lineHeight>r){0<w?(v.tokens=v.tokens.slice(0,w),L(v,x,_),n.lines=n.lines.slice(0,m+1)):n.lines=n.lines.slice(0,m);break t}var C,S=b.width,D=null==S||"auto"===S;"string"==typeof S&&"%"===S.charAt(S.length-1)?(k.percentWidth=S,c.push(k),k.contentWidth=bo(k.text,T)):(D&&(S=(S=b.backgroundColor)&&S.image)&&(C=void 0,aa(S="string"==typeof(h=S)?(C=ia.get(h))&&C.image:h))&&(k.width=Math.max(k.width,S.width*I/S.height)),null!=(C=g&&null!=o?o-x:null)&&C<k.width?!D||C<M?(k.text="",k.width=k.contentWidth=0):(k.text=la(k.text,C-M,T,e.ellipsis,{minChar:e.truncateMinChar}),k.width=k.contentWidth=bo(k.text,T)):k.contentWidth=bo(k.text,T)),k.width+=M,x+=k.width,b&&(_=Math.max(_,k.lineHeight))}L(v,x,_)}for(n.outerWidth=n.width=R(o,d),n.outerHeight=n.height=R(r,p),n.contentHeight=p,n.contentWidth=d,f&&(n.outerWidth+=f[1]+f[3],n.outerHeight+=f[0]+f[2]),m=0;m<c.length;m++){var k,A=(k=c[m]).percentWidth;k.width=parseInt(A,10)/100*n.width}}return n;function L(t,e,n){t.width=e,t.lineHeight=n,p+=n,d=Math.max(d,e)}}function ga(t,e,n,i,o){var r,a,s=""===e,l=o&&n.rich[o]||{},u=t.lines,h=l.font||n.font,c=!1;i?(n=(t=l.padding)?t[1]+t[3]:0,null!=l.width&&"auto"!==l.width?(t=Do(l.width,i.width)+n,0<u.length&&t+i.accumWidth>i.width&&(r=e.split("\n"),c=!0),i.accumWidth=t):(t=ma(e,h,i.width,i.breakAll,i.accumWidth),i.accumWidth=t.accumWidth+n,a=t.linesWidths,r=t.lines)):r=e.split("\n");for(var p=0;p<r.length;p++){var d,f,g=r[p],y=new pa;y.styleName=o,y.text=g,y.isLineHolder=!g&&!s,"number"==typeof l.width?y.width=l.width:y.width=a?a[p]:bo(g,h),p||c?u.push(new da([y])):1===(f=(d=(u[u.length-1]||(u[0]=new da)).tokens).length)&&d[0].isLineHolder?d[0]=y:!g&&f&&!s||d.push(y)}}var ya=lt(",&?/;] ".split(""),function(t,e){return t[e]=!0,t},{});function ma(t,e,n,i,o){for(var r,a=[],s=[],l="",u="",h=0,c=0,p=0;p<t.length;p++){var d,f,g=t.charAt(p);"\n"!==g?(d=bo(g,e),f=!(i||(f=void 0,!(32<=(f=(f=r=g).charCodeAt(0))&&f<=591||880<=f&&f<=4351||4608<=f&&f<=5119||7680<=f&&f<=8303))||ya[r]),(a.length?n<c+d:n<o+c+d)?c?(l||u)&&(c=f?(l||(l=u,u="",c=h=0),a.push(l),s.push(c-h),u+=g,l="",h+=d):(u&&(l+=u,u="",h=0),a.push(l),s.push(c),l=g,d)):f?(a.push(u),s.push(h),u=g,h=d):(a.push(g),s.push(d)):(c+=d,f?(u+=g,h+=d):(u&&(l+=u,u="",h=0),l+=g))):(u&&(l+=u,c+=h),a.push(l),s.push(c),u=l="",c=h=0)}return a.length||l||(l=t,u="",h=0),u&&(l+=u),l&&(a.push(l),s.push(c)),1===a.length&&(c+=o),{accumWidth:c,lines:a,linesWidths:s}}var va,_a="__zr_style_"+Math.round(10*Math.random()),xa={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},wa={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}},ba=(xa[_a]=!0,["z","z2","invisible"]),Sa=["invisible"],e=(u(i,va=e),i.prototype._init=function(t){for(var e=ht(t),n=0;n<e.length;n++){var i=e[n];"style"===i?this.useStyle(t[i]):va.prototype.attrKV.call(this,i,t[i])}this.style||this.useStyle({})},i.prototype.beforeBrush=function(){},i.prototype.afterBrush=function(){},i.prototype.innerBeforeBrush=function(){},i.prototype.innerAfterBrush=function(){},i.prototype.shouldBePainted=function(t,e,n,i){var o,r=this.transform;if(this.ignore||this.invisible||0===this.style.opacity||this.culling&&(o=this,t=t,e=e,Ma.copy(o.getBoundingRect()),o.transform&&Ma.applyTransform(o.transform),Ta.width=t,Ta.height=e,!Ma.intersect(Ta))||r&&!r[0]&&!r[3])return!1;if(n&&this.__clipPaths)for(var a=0;a<this.__clipPaths.length;++a)if(this.__clipPaths[a].isZeroArea())return!1;if(i&&this.parent)for(var s=this.parent;s;){if(s.ignore)return!1;s=s.parent}return!0},i.prototype.contain=function(t,e){return this.rectContain(t,e)},i.prototype.traverse=function(t,e){t.call(e,this)},i.prototype.rectContain=function(t,e){t=this.transformCoordToLocal(t,e);return this.getBoundingRect().contain(t[0],t[1])},i.prototype.getPaintRect=function(){var t,e,n,i,o,r=this._paintRect;return this._paintRect&&!this.__dirty||(o=this.transform,t=this.getBoundingRect(),e=(i=this.style).shadowBlur||0,n=i.shadowOffsetX||0,i=i.shadowOffsetY||0,r=this._paintRect||(this._paintRect=new G(0,0,0,0)),o?G.applyTransform(r,t,o):r.copy(t),(e||n||i)&&(r.width+=2*e+Math.abs(n),r.height+=2*e+Math.abs(i),r.x=Math.min(r.x,r.x+n-e),r.y=Math.min(r.y,r.y+i-e)),o=this.dirtyRectTolerance,r.isZero())||(r.x=Math.floor(r.x-o),r.y=Math.floor(r.y-o),r.width=Math.ceil(r.width+1+2*o),r.height=Math.ceil(r.height+1+2*o)),r},i.prototype.setPrevPaintRect=function(t){t?(this._prevPaintRect=this._prevPaintRect||new G(0,0,0,0),this._prevPaintRect.copy(t)):this._prevPaintRect=null},i.prototype.getPrevPaintRect=function(){return this._prevPaintRect},i.prototype.animateStyle=function(t){return this.animate("style",t)},i.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():this.markRedraw()},i.prototype.attrKV=function(t,e){"style"!==t?va.prototype.attrKV.call(this,t,e):this.style?this.setStyle(e):this.useStyle(e)},i.prototype.setStyle=function(t,e){return"string"==typeof t?this.style[t]=e:P(this.style,t),this.dirtyStyle(),this},i.prototype.dirtyStyle=function(t){t||this.markRedraw(),this.__dirty|=2,this._rect&&(this._rect=null)},i.prototype.dirty=function(){this.dirtyStyle()},i.prototype.styleChanged=function(){return!!(2&this.__dirty)},i.prototype.styleUpdated=function(){this.__dirty&=-3},i.prototype.createStyle=function(t){return Rt(xa,t)},i.prototype.useStyle=function(t){t[_a]||(t=this.createStyle(t)),this.__inHover?this.__hoverStyle=t:this.style=t,this.dirtyStyle()},i.prototype.isStyleObject=function(t){return t[_a]},i.prototype._innerSaveToNormal=function(t){va.prototype._innerSaveToNormal.call(this,t);var e=this._normalState;t.style&&!e.style&&(e.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(t,e,ba)},i.prototype._applyStateObj=function(t,e,n,i,o,r){va.prototype._applyStateObj.call(this,t,e,n,i,o,r);var a,s=!(e&&i);if(e&&e.style?o?i?a=e.style:(a=this._mergeStyle(this.createStyle(),n.style),this._mergeStyle(a,e.style)):(a=this._mergeStyle(this.createStyle(),(i?this:n).style),this._mergeStyle(a,e.style)):s&&(a=n.style),a)if(o){var l=this.style;if(this.style=this.createStyle(s?{}:l),s)for(var u=ht(l),h=0;h<u.length;h++)(p=u[h])in a&&(a[p]=a[p],this.style[p]=l[p]);for(var c=ht(a),h=0;h<c.length;h++){var p=c[h];this.style[p]=this.style[p]}this._transitionState(t,{style:a},r,this.getAnimationStyleProps())}else this.useStyle(a);var d=this.__inHover?Sa:ba;for(h=0;h<d.length;h++)p=d[h],e&&null!=e[p]?this[p]=e[p]:s&&null!=n[p]&&(this[p]=n[p])},i.prototype._mergeStates=function(t){for(var e,n=va.prototype._mergeStates.call(this,t),i=0;i<t.length;i++){var o=t[i];o.style&&this._mergeStyle(e=e||{},o.style)}return e&&(n.style=e),n},i.prototype._mergeStyle=function(t,e){return P(t,e),t},i.prototype.getAnimationStyleProps=function(){return wa},i.initDefaultProps=((e=i.prototype).type="displayable",e.invisible=!1,e.z=0,e.z2=0,e.zlevel=0,e.culling=!1,e.cursor="pointer",e.rectHover=!1,e.incremental=!1,e._rect=null,e.dirtyRectTolerance=0,void(e.__dirty=2|mn)),i),Ma=new G(0,0,0,0),Ta=new G(0,0,0,0);function i(t){return va.call(this,t)||this}var Ia=Math.min,Ca=Math.max,Da=Math.sin,ka=Math.cos,Aa=2*Math.PI,La=Vt(),Pa=Vt(),Oa=Vt();function Ra(t,e,n,i,o,r){o[0]=Ia(t,n),o[1]=Ia(e,i),r[0]=Ca(t,n),r[1]=Ca(e,i)}var Na=[],Ea=[];var za={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Ba=[],Fa=[],Va=[],Ha=[],Wa=[],Ga=[],Xa=Math.min,Ua=Math.max,Ya=Math.cos,Za=Math.sin,qa=Math.abs,ja=Math.PI,Ka=2*ja,$a="undefined"!=typeof Float32Array,Qa=[];function Ja(t){return Math.round(t/ja*1e8)/1e8%2*ja}function ts(t,e){var n=Ja(t[0]),i=(n<0&&(n+=Ka),n-t[0]),o=t[1];o+=i,!e&&Ka<=o-n?o=n+Ka:e&&Ka<=n-o?o=n-Ka:!e&&o<n?o=n+(Ka-Ja(n-o)):e&&n<o&&(o=n-(Ka-Ja(o-n))),t[0]=n,t[1]=o}o.prototype.increaseVersion=function(){this._version++},o.prototype.getVersion=function(){return this._version},o.prototype.setScale=function(t,e,n){0<(n=n||0)&&(this._ux=qa(n/lo/t)||0,this._uy=qa(n/lo/e)||0)},o.prototype.setDPR=function(t){this.dpr=t},o.prototype.setContext=function(t){this._ctx=t},o.prototype.getContext=function(){return this._ctx},o.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},o.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},o.prototype.moveTo=function(t,e){return this._drawPendingPt(),this.addData(za.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},o.prototype.lineTo=function(t,e){var n=qa(t-this._xi),i=qa(e-this._yi),o=n>this._ux||i>this._uy;return this.addData(za.L,t,e),this._ctx&&o&&this._ctx.lineTo(t,e),o?(this._xi=t,this._yi=e,this._pendingPtDist=0):(o=n*n+i*i)>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=o),this},o.prototype.bezierCurveTo=function(t,e,n,i,o,r){return this._drawPendingPt(),this.addData(za.C,t,e,n,i,o,r),this._ctx&&this._ctx.bezierCurveTo(t,e,n,i,o,r),this._xi=o,this._yi=r,this},o.prototype.quadraticCurveTo=function(t,e,n,i){return this._drawPendingPt(),this.addData(za.Q,t,e,n,i),this._ctx&&this._ctx.quadraticCurveTo(t,e,n,i),this._xi=n,this._yi=i,this},o.prototype.arc=function(t,e,n,i,o,r){this._drawPendingPt(),Qa[0]=i,Qa[1]=o,ts(Qa,r);var a=(o=Qa[1])-(i=Qa[0]);return this.addData(za.A,t,e,n,n,i,a,0,r?0:1),this._ctx&&this._ctx.arc(t,e,n,i,o,r),this._xi=Ya(o)*n+t,this._yi=Za(o)*n+e,this},o.prototype.arcTo=function(t,e,n,i,o){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,e,n,i,o),this},o.prototype.rect=function(t,e,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,e,n,i),this.addData(za.R,t,e,n,i),this},o.prototype.closePath=function(){this._drawPendingPt(),this.addData(za.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&t.closePath(),this._xi=e,this._yi=n,this},o.prototype.fill=function(t){t&&t.fill(),this.toStatic()},o.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},o.prototype.len=function(){return this._len},o.prototype.setData=function(t){var e=t.length;this.data&&this.data.length===e||!$a||(this.data=new Float32Array(e));for(var n=0;n<e;n++)this.data[n]=t[n];this._len=e},o.prototype.appendPath=function(t){for(var e=(t=t instanceof Array?t:[t]).length,n=0,i=this._len,o=0;o<e;o++)n+=t[o].len();for($a&&this.data instanceof Float32Array&&(this.data=new Float32Array(i+n)),o=0;o<e;o++)for(var r=t[o].data,a=0;a<r.length;a++)this.data[i++]=r[a];this._len=i},o.prototype.addData=function(t,e,n,i,o,r,a,s,l){if(this._saveData){var u=this.data;this._len+arguments.length>u.length&&(this._expandData(),u=this.data);for(var h=0;h<arguments.length;h++)u[this._len++]=arguments[h]}},o.prototype._drawPendingPt=function(){0<this._pendingPtDist&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},o.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e<this._len;e++)t[e]=this.data[e];this.data=t}},o.prototype.toStatic=function(){var t;this._saveData&&(this._drawPendingPt(),(t=this.data)instanceof Array)&&(t.length=this._len,$a)&&11<this._len&&(this.data=new Float32Array(t))},o.prototype.getBoundingRect=function(){Va[0]=Va[1]=Wa[0]=Wa[1]=Number.MAX_VALUE,Ha[0]=Ha[1]=Ga[0]=Ga[1]=-Number.MAX_VALUE;for(var t,e,n,i=this.data,o=0,r=0,a=0,s=0,l=0;l<this._len;){var u=i[l++],h=1===l;switch(h&&(a=o=i[l],s=r=i[l+1]),u){case za.M:o=a=i[l++],r=s=i[l++],Wa[0]=a,Wa[1]=s,Ga[0]=a,Ga[1]=s;break;case za.L:Ra(o,r,i[l],i[l+1],Wa,Ga),o=i[l++],r=i[l++];break;case za.C:I=T=M=S=b=w=x=_=v=m=y=g=f=d=p=c=void 0;var c=o,p=r,d=i[l++],f=i[l++],g=i[l++],y=i[l++],m=i[l],v=i[l+1],_=Wa,x=Ga,w=Fn,b=En,S=w(c,d,g,m,Na);_[0]=1/0,_[1]=1/0,x[0]=-1/0,x[1]=-1/0;for(var M=0;M<S;M++){var T=b(c,d,g,m,Na[M]);_[0]=Ia(T,_[0]),x[0]=Ca(T,x[0])}for(S=w(p,f,y,v,Ea),M=0;M<S;M++){var I=b(p,f,y,v,Ea[M]);_[1]=Ia(I,_[1]),x[1]=Ca(I,x[1])}_[0]=Ia(c,_[0]),x[0]=Ca(c,x[0]),_[0]=Ia(m,_[0]),x[0]=Ca(m,x[0]),_[1]=Ia(p,_[1]),x[1]=Ca(p,x[1]),_[1]=Ia(v,_[1]),x[1]=Ca(v,x[1]),o=i[l++],r=i[l++];break;case za.Q:w=o,t=r,P=i[l++],D=i[l++],L=i[l],e=i[l+1],A=Wa,O=Ga,n=k=n=C=void 0,C=Wn,n=Ca(Ia((k=Xn)(w,P,L),1),0),k=Ca(Ia(k(t,D,e),1),0),P=C(w,P,L,n),n=C(t,D,e,k),A[0]=Ia(w,L,P),A[1]=Ia(t,e,n),O[0]=Ca(w,L,P),O[1]=Ca(t,e,n),o=i[l++],r=i[l++];break;case za.A:var C=i[l++],D=i[l++],k=i[l++],A=i[l++],L=i[l++],P=i[l++]+L,O=(l+=1,!i[l++]);h&&(a=Ya(L)*k+C,s=Za(L)*A+D),function(t,e,n,i,o,r,a,s,l){var u=te,h=ee,c=Math.abs(o-r);if(c%Aa<1e-4&&1e-4<c)return s[0]=t-n,s[1]=e-i,l[0]=t+n,l[1]=e+i;La[0]=ka(o)*n+t,La[1]=Da(o)*i+e,Pa[0]=ka(r)*n+t,Pa[1]=Da(r)*i+e,u(s,La,Pa),h(l,La,Pa),(o%=Aa)<0&&(o+=Aa),(r%=Aa)<0&&(r+=Aa),r<o&&!a?r+=Aa:o<r&&a&&(o+=Aa),a&&(c=r,r=o,o=c);for(var p=0;p<r;p+=Math.PI/2)o<p&&(Oa[0]=ka(p)*n+t,Oa[1]=Da(p)*i+e,u(s,Oa,s),h(l,Oa,l))}(C,D,k,A,L,P,O,Wa,Ga),o=Ya(P)*k+C,r=Za(P)*A+D;break;case za.R:Ra(a=o=i[l++],s=r=i[l++],a+i[l++],s+i[l++],Wa,Ga);break;case za.Z:o=a,r=s}te(Va,Va,Wa),ee(Ha,Ha,Ga)}return 0===l&&(Va[0]=Va[1]=Ha[0]=Ha[1]=0),new G(Va[0],Va[1],Ha[0]-Va[0],Ha[1]-Va[1])},o.prototype._calculateLength=function(){var t=this.data,e=this._len,n=this._ux,i=this._uy,o=0,r=0,a=0,s=0;this._pathSegLen||(this._pathSegLen=[]);for(var l=this._pathSegLen,u=0,h=0,c=0;c<e;){var p=t[c++],d=1===c,f=(d&&(a=o=t[c],s=r=t[c+1]),-1);switch(p){case za.M:o=a=t[c++],r=s=t[c++];break;case za.L:var g=t[c++],y=(_=t[c++])-r;(qa(C=g-o)>n||qa(y)>i||c===e-1)&&(f=Math.sqrt(C*C+y*y),o=g,r=_);break;case za.C:var m=t[c++],v=t[c++],_=(g=t[c++],t[c++]),x=t[c++],w=t[c++],f=function(t,e,n,i,o,r,a,s,l){for(var u=t,h=e,c=0,p=1/l,d=1;d<=l;d++){var f=d*p,g=En(t,n,o,a,f),f=En(e,i,r,s,f),y=g-u,m=f-h;c+=Math.sqrt(y*y+m*m),u=g,h=f}return c}(o,r,m,v,g,_,x,w,10),o=x,r=w;break;case za.Q:f=function(t,e,n,i,o,r,a){for(var s=t,l=e,u=0,h=1/a,c=1;c<=a;c++){var p=c*h,d=Wn(t,n,o,p),p=Wn(e,i,r,p),f=d-s,g=p-l;u+=Math.sqrt(f*f+g*g),s=d,l=p}return u}(o,r,m=t[c++],v=t[c++],g=t[c++],_=t[c++],10),o=g,r=_;break;case za.A:var x=t[c++],w=t[c++],b=t[c++],S=t[c++],M=t[c++],T=t[c++],I=T+M;c+=1,d&&(a=Ya(M)*b+x,s=Za(M)*S+w),f=Ua(b,S)*Xa(Ka,Math.abs(T)),o=Ya(I)*b+x,r=Za(I)*S+w;break;case za.R:a=o=t[c++],s=r=t[c++],f=2*t[c++]+2*t[c++];break;case za.Z:var C=a-o,y=s-r;f=Math.sqrt(C*C+y*y),o=a,r=s}0<=f&&(u+=l[h++]=f)}return this._pathLen=u},o.prototype.rebuildPath=function(t,e){var n,i,o,r,a,s,l,u,h=this.data,E=this._ux,z=this._uy,B=this._len,c=e<1,p=0,d=0,f=0;if(!c||(this._pathSegLen||this._calculateLength(),a=this._pathSegLen,s=e*this._pathLen))t:for(var g=0;g<B;){var y,m=h[g++],F=1===g;switch(F&&(n=o=h[g],i=r=h[g+1]),m!==za.L&&0<f&&(t.lineTo(l,u),f=0),m){case za.M:n=o=h[g++],i=r=h[g++],t.moveTo(o,r);break;case za.L:var v=h[g++],_=h[g++],x=qa(v-o),w=qa(_-r);if(E<x||z<w){if(c){if(p+(y=a[d++])>s){var b=(s-p)/y;t.lineTo(o*(1-b)+v*b,r*(1-b)+_*b);break t}p+=y}t.lineTo(v,_),o=v,r=_,f=0}else{x=x*x+w*w;f<x&&(l=v,u=_,f=x)}break;case za.C:var S=h[g++],M=h[g++],T=h[g++],I=h[g++],w=h[g++],x=h[g++];if(c){if(p+(y=a[d++])>s){Vn(o,S,T,w,b=(s-p)/y,Ba),Vn(r,M,I,x,b,Fa),t.bezierCurveTo(Ba[1],Fa[1],Ba[2],Fa[2],Ba[3],Fa[3]);break t}p+=y}t.bezierCurveTo(S,M,T,I,w,x),o=w,r=x;break;case za.Q:if(S=h[g++],M=h[g++],T=h[g++],I=h[g++],c){if(p+(y=a[d++])>s){Un(o,S,T,b=(s-p)/y,Ba),Un(r,M,I,b,Fa),t.quadraticCurveTo(Ba[1],Fa[1],Ba[2],Fa[2]);break t}p+=y}t.quadraticCurveTo(S,M,T,I),o=T,r=I;break;case za.A:var C=h[g++],D=h[g++],k=h[g++],A=h[g++],L=h[g++],P=h[g++],O=h[g++],V=!h[g++],H=A<k?k:A,R=.001<qa(k-A),N=L+P,W=!1;if(c&&(p+(y=a[d++])>s&&(N=L+P*(s-p)/y,W=!0),p+=y),R&&t.ellipse?t.ellipse(C,D,k,A,O,L,N,V):t.arc(C,D,H,L,N,V),W)break t;F&&(n=Ya(L)*k+C,i=Za(L)*A+D),o=Ya(N)*k+C,r=Za(N)*A+D;break;case za.R:n=o=h[g],i=r=h[g+1],v=h[g++],_=h[g++];P=h[g++],R=h[g++];if(c){if(p+(y=a[d++])>s){O=s-p;t.moveTo(v,_),t.lineTo(v+Xa(O,P),_),0<(O-=P)&&t.lineTo(v+P,_+Xa(O,R)),0<(O-=R)&&t.lineTo(v+Ua(P-O,0),_+R),0<(O-=P)&&t.lineTo(v,_+Ua(R-O,0));break t}p+=y}t.rect(v,_,P,R);break;case za.Z:if(c){if(p+(y=a[d++])>s){t.lineTo(o*(1-(b=(s-p)/y))+n*b,r*(1-b)+i*b);break t}p+=y}t.closePath(),o=n,r=i}}},o.prototype.clone=function(){var t=new o,e=this.data;return t.data=e.slice?e.slice():Array.prototype.slice.call(e),t._len=this._len,t},o.CMD=za,o.initDefaultProps=((mu=o.prototype)._saveData=!0,mu._ux=0,mu._uy=0,mu._pendingPtDist=0,void(mu._version=0));var es=o;function o(t){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,t&&(this._saveData=!1),this._saveData&&(this.data=[])}function ns(t,e,n,i,o,r,a){var s;if(0!==o)return s=0,!(e+(o=o)<a&&i+o<a||a<e-o&&a<i-o||t+o<r&&n+o<r||r<t-o&&r<n-o)&&(t===n?Math.abs(r-t)<=o/2:(r=(s=(e-i)/(t-n))*r-a+(t*i-n*e)/(t-n))*r/(s*s+1)<=o/2*o/2)}var is=2*Math.PI;function os(t){return(t%=is)<0&&(t+=is),t}var rs=2*Math.PI;function as(t,e,n,i,o,r){return e<r&&i<r||r<e&&r<i||i===e?0:(n=(r=(r-e)/(i-e))*(n-t)+t)===o?1/0:o<n?1!=r&&0!=r?i<e?1:-1:i<e?.5:-.5:0}var ss=es.CMD,ls=2*Math.PI,us=1e-4;var hs=[-1,-1,-1],cs=[-1,-1];function ps(t,e,n,i,o,r,a,s,l,u){if(e<u&&i<u&&r<u&&s<u||u<e&&u<i&&u<r&&u<s)return 0;var h=Bn(e,i,r,s,u,hs);if(0===h)return 0;for(var c,p=0,d=-1,f=void 0,g=void 0,y=0;y<h;y++){var m=hs[y],v=0===m||1===m?.5:1;En(t,n,o,a,m)<l||(d<0&&(d=Fn(e,i,r,s,cs),cs[1]<cs[0]&&1<d&&(c=void 0,c=cs[0],cs[0]=cs[1],cs[1]=c),f=En(e,i,r,s,cs[0]),1<d)&&(g=En(e,i,r,s,cs[1])),2===d?m<cs[0]?p+=f<e?v:-v:m<cs[1]?p+=g<f?v:-v:p+=s<g?v:-v:m<cs[0]?p+=f<e?v:-v:p+=s<f?v:-v)}return p}function ds(t,e,n,i,o,r,a,s){if(e<s&&i<s&&r<s||s<e&&s<i&&s<r)return 0;c=hs,h=(l=e)-2*(u=i)+(h=r),u=2*(u-l),l-=s=s,s=0,Rn(h)?Nn(u)&&0<=(p=-l/u)&&p<=1&&(c[s++]=p):Rn(l=u*u-4*h*l)?0<=(p=-u/(2*h))&&p<=1&&(c[s++]=p):0<l&&(d=(-u-(l=Cn(l)))/(2*h),0<=(p=(-u+l)/(2*h))&&p<=1&&(c[s++]=p),0<=d)&&d<=1&&(c[s++]=d);var l,u,h,c,p,d,f=s;if(0===f)return 0;var g=Xn(e,i,r);if(0<=g&&g<=1){for(var y=0,m=Wn(e,i,r,g),v=0;v<f;v++){var _=0===hs[v]||1===hs[v]?.5:1;Wn(t,n,o,hs[v])<a||(hs[v]<g?y+=m<e?_:-_:y+=r<m?_:-_)}return y}return _=0===hs[0]||1===hs[0]?.5:1,Wn(t,n,o,hs[0])<a?0:r<e?_:-_}function fs(t,e,n,i,o){for(var r,a=t.data,s=t.len(),l=0,u=0,h=0,c=0,p=0,d=0;d<s;){var f=a[d++],g=1===d;switch(f===ss.M&&1<d&&(n||(l+=as(u,h,c,p,i,o))),g&&(c=u=a[d],p=h=a[d+1]),f){case ss.M:u=c=a[d++],h=p=a[d++];break;case ss.L:if(n){if(ns(u,h,a[d],a[d+1],e,i,o))return!0}else l+=as(u,h,a[d],a[d+1],i,o)||0;u=a[d++],h=a[d++];break;case ss.C:if(n){if(function(t,e,n,i,o,r,a,s,l,u,h){if(0!==l)return!(e+(l=l)<h&&i+l<h&&r+l<h&&s+l<h||h<e-l&&h<i-l&&h<r-l&&h<s-l||t+l<u&&n+l<u&&o+l<u&&a+l<u||u<t-l&&u<n-l&&u<o-l&&u<a-l)&&Hn(t,e,n,i,o,r,a,s,u,h,null)<=l/2}(u,h,a[d++],a[d++],a[d++],a[d++],a[d],a[d+1],e,i,o))return!0}else l+=ps(u,h,a[d++],a[d++],a[d++],a[d++],a[d],a[d+1],i,o)||0;u=a[d++],h=a[d++];break;case ss.Q:if(n){if(function(t,e,n,i,o,r,a,s,l){if(0!==a)return!(e+(a=a)<l&&i+a<l&&r+a<l||l<e-a&&l<i-a&&l<r-a||t+a<s&&n+a<s&&o+a<s||s<t-a&&s<n-a&&s<o-a)&&Yn(t,e,n,i,o,r,s,l,null)<=a/2}(u,h,a[d++],a[d++],a[d],a[d+1],e,i,o))return!0}else l+=ds(u,h,a[d++],a[d++],a[d],a[d+1],i,o)||0;u=a[d++],h=a[d++];break;case ss.A:var y=a[d++],m=a[d++],v=a[d++],_=a[d++],x=a[d++],w=a[d++],b=(d+=1,!!(1-a[d++])),S=Math.cos(x)*v+y,M=Math.sin(x)*_+m,T=(g?(c=S,p=M):l+=as(u,h,S,M,i,o),(i-y)*_/v+y);if(n){if(function(t,e,n,i,o,r,a,s,l){if(0!==a)return a=a,s-=t,l-=e,!(n<(t=Math.sqrt(s*s+l*l))-a||t+a<n)&&(Math.abs(i-o)%rs<1e-4||((o=r?(e=i,i=os(o),os(e)):(i=os(i),os(o)))<i&&(o+=rs),(t=Math.atan2(l,s))<0&&(t+=rs),i<=t&&t<=o)||i<=t+rs&&t+rs<=o)}(y,m,_,x,x+w,b,e,T,o))return!0}else l+=function(t,e,n,i,o,r,a,s){if((s-=e)>n||s<-n)return 0;var e=Math.sqrt(n*n-s*s);if(hs[0]=-e,hs[1]=e,(n=Math.abs(i-o))<1e-4)return 0;if(ls-1e-4<=n)return o=ls,h=r?1:-1,a>=hs[i=0]+t&&a<=hs[1]+t?h:0;o<i&&(e=i,i=o,o=e),i<0&&(i+=ls,o+=ls);for(var l=0,u=0;u<2;u++){var h,c=hs[u];a<c+t&&(h=r?1:-1,i<=(c=(c=Math.atan2(s,c))<0?ls+c:c)&&c<=o||i<=c+ls&&c+ls<=o)&&(l+=h=c>Math.PI/2&&c<1.5*Math.PI?-h:h)}return l}(y,m,_,x,x+w,b,T,o);u=Math.cos(x+w)*v+y,h=Math.sin(x+w)*_+m;break;case ss.R:if(c=u=a[d++],p=h=a[d++],S=c+a[d++],M=p+a[d++],n){if(ns(c,p,S,p,e,i,o)||ns(S,p,S,M,e,i,o)||ns(S,M,c,M,e,i,o)||ns(c,M,c,p,e,i,o))return!0}else l=(l+=as(S,p,S,M,i,o))+as(c,M,c,p,i,o);break;case ss.Z:if(n){if(ns(u,h,c,p,e,i,o))return!0}else l+=as(u,h,c,p,i,o);u=c,h=p}}return n||(t=h,r=p,Math.abs(t-r)<us)||(l+=as(u,h,c,p,i,o)||0),0!==l}var gs,ys=B({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},xa),ms={style:B({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},wa.style)},vs=xo.concat(["invisible","culling","z","z2","zlevel","parent"]),_s=(u(a,gs=e),a.prototype.update=function(){var e=this,t=(gs.prototype.update.call(this),this.style);if(t.decal){var n,i=this._decalEl=this._decalEl||new a,o=(i.buildPath===a.prototype.buildPath&&(i.buildPath=function(t){e.buildPath(t,e.shape)}),i.silent=!0,i.style);for(n in t)o[n]!==t[n]&&(o[n]=t[n]);o.fill=t.fill?t.decal:null,o.decal=null,o.shadowColor=null,t.strokeFirst&&(o.stroke=null);for(var r=0;r<vs.length;++r)i[vs[r]]=this[vs[r]];i.__dirty|=mn}else this._decalEl&&(this._decalEl=null)},a.prototype.getDecalElement=function(){return this._decalEl},a.prototype._init=function(t){var e=ht(t),n=(this.shape=this.getDefaultShape(),this.getDefaultStyle());n&&this.useStyle(n);for(var i=0;i<e.length;i++){var o=e[i],r=t[o];"style"===o?this.style?P(this.style,r):this.useStyle(r):"shape"===o?P(this.shape,r):gs.prototype.attrKV.call(this,o,r)}this.style||this.useStyle({})},a.prototype.getDefaultStyle=function(){return null},a.prototype.getDefaultShape=function(){return{}},a.prototype.canBeInsideText=function(){return this.hasFill()},a.prototype.getInsideTextFill=function(){var t,e=this.style.fill;if("none"!==e){if(H(e))return.5<(t=wi(e,0))?uo:.2<t?"#eee":ho;if(e)return ho}return uo},a.prototype.getInsideTextStroke=function(t){var e=this.style.fill;if(H(e)){var n=this.__zr;if(!(!n||!n.isDarkMode())==wi(t,0)<.4)return e}},a.prototype.buildPath=function(t,e,n){},a.prototype.pathUpdated=function(){this.__dirty&=~vn},a.prototype.getUpdatedPathProxy=function(t){return this.path||this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,t),this.path},a.prototype.createPathProxy=function(){this.path=new es(!1)},a.prototype.hasStroke=function(){var t=this.style,e=t.stroke;return!(null==e||"none"===e||!(0<t.lineWidth))},a.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},a.prototype.getBoundingRect=function(){var t,e,n=this._rect,i=this.style,o=!n;return o&&(t=!1,this.path||(t=!0,this.createPathProxy()),e=this.path,(t||this.__dirty&vn)&&(e.beginPath(),this.buildPath(e,this.shape,!1),this.pathUpdated()),n=e.getBoundingRect()),this._rect=n,this.hasStroke()&&this.path&&0<this.path.len()?(t=this._rectStroke||(this._rectStroke=n.clone()),(this.__dirty||o)&&(t.copy(n),e=i.strokeNoScale?this.getLineScale():1,o=i.lineWidth,this.hasFill()||(i=this.strokeContainThreshold,o=Math.max(o,null==i?4:i)),1e-10<e)&&(t.width+=o/e,t.height+=o/e,t.x-=o/e/2,t.y-=o/e/2),t):n},a.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect(),o=this.style;if(t=n[0],e=n[1],i.contain(t,e)){n=this.path;if(this.hasStroke()){i=o.lineWidth,o=o.strokeNoScale?this.getLineScale():1;if(1e-10<o&&(this.hasFill()||(i=Math.max(i,this.strokeContainThreshold)),fs(n,i/o,!0,t,e)))return!0}if(this.hasFill())return fs(n,0,!1,t,e)}return!1},a.prototype.dirtyShape=function(){this.__dirty|=vn,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},a.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},a.prototype.animateShape=function(t){return this.animate("shape",t)},a.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():"shape"===t?this.dirtyShape():this.markRedraw()},a.prototype.attrKV=function(t,e){"shape"===t?this.setShape(e):gs.prototype.attrKV.call(this,t,e)},a.prototype.setShape=function(t,e){var n=(n=this.shape)||(this.shape={});return"string"==typeof t?n[t]=e:P(n,t),this.dirtyShape(),this},a.prototype.shapeChanged=function(){return!!(this.__dirty&vn)},a.prototype.createStyle=function(t){return Rt(ys,t)},a.prototype._innerSaveToNormal=function(t){gs.prototype._innerSaveToNormal.call(this,t);var e=this._normalState;t.shape&&!e.shape&&(e.shape=P({},this.shape))},a.prototype._applyStateObj=function(t,e,n,i,o,r){gs.prototype._applyStateObj.call(this,t,e,n,i,o,r);var a,s=!(e&&i);if(e&&e.shape?o?i?a=e.shape:(a=P({},n.shape),P(a,e.shape)):(a=P({},(i?this:n).shape),P(a,e.shape)):s&&(a=n.shape),a)if(o){this.shape=P({},this.shape);for(var l={},u=ht(a),h=0;h<u.length;h++){var c=u[h];"object"==typeof a[c]?this.shape[c]=a[c]:l[c]=a[c]}this._transitionState(t,{shape:l},r)}else this.shape=a,this.dirtyShape()},a.prototype._mergeStates=function(t){for(var e,n=gs.prototype._mergeStates.call(this,t),i=0;i<t.length;i++){var o=t[i];o.shape&&this._mergeStyle(e=e||{},o.shape)}return e&&(n.shape=e),n},a.prototype.getAnimationStyleProps=function(){return ms},a.prototype.isZeroArea=function(){return!1},a.extend=function(n){u(o,i=a),o.prototype.getDefaultStyle=function(){return y(n.style)},o.prototype.getDefaultShape=function(){return y(n.shape)};var i,t,e=o;function o(t){var e=i.call(this,t)||this;return n.init&&n.init.call(e,t),e}for(t in n)"function"==typeof n[t]&&(e.prototype[t]=n[t]);return e},a.initDefaultProps=((mu=a.prototype).type="path",mu.strokeContainThreshold=5,mu.segmentIgnoreThreshold=0,mu.subPixelOptimize=!1,mu.autoBatch=!1,void(mu.__dirty=2|mn|vn)),a);function a(t){return gs.call(this,t)||this}var xs,ws=B({strokeFirst:!0,font:j,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},ys),bs=(u(Ss,xs=e),Ss.prototype.hasStroke=function(){var t=this.style,e=t.stroke;return null!=e&&"none"!==e&&0<t.lineWidth},Ss.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},Ss.prototype.createStyle=function(t){return Rt(ws,t)},Ss.prototype.setBoundingRect=function(t){this._rect=t},Ss.prototype.getBoundingRect=function(){var t,e=this.style;return this._rect||(null!=(t=e.text)?t+="":t="",(t=Mo(t,e.font,e.textAlign,e.textBaseline)).x+=e.x||0,t.y+=e.y||0,this.hasStroke()&&(e=e.lineWidth,t.x-=e/2,t.y-=e/2,t.width+=e,t.height+=e),this._rect=t),this._rect},Ss.initDefaultProps=void(Ss.prototype.dirtyRectTolerance=10),Ss);function Ss(){return null!==xs&&xs.apply(this,arguments)||this}bs.prototype.type="tspan";var Ms=B({x:0,y:0},xa),Ts={style:B({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},wa.style)};u(Ds,Is=e),Ds.prototype.createStyle=function(t){return Rt(Ms,t)},Ds.prototype._getSize=function(t){var e,n=this.style,i=n[t];return null!=i?i:(i=(i=n.image)&&"string"!=typeof i&&i.width&&i.height?n.image:this.__image)?null==(e=n[n="width"===t?"height":"width"])?i[t]:i[t]/i[n]*e:0},Ds.prototype.getWidth=function(){return this._getSize("width")},Ds.prototype.getHeight=function(){return this._getSize("height")},Ds.prototype.getAnimationStyleProps=function(){return Ts},Ds.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new G(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect};var Is,Cs=Ds;function Ds(){return null!==Is&&Is.apply(this,arguments)||this}Cs.prototype.type="image";var ks=Math.round;function As(t,e,n){var i,o,r;if(e)return i=e.x1,o=e.x2,r=e.y1,e=e.y2,t.x1=i,t.x2=o,t.y1=r,t.y2=e,(n=n&&n.lineWidth)&&(ks(2*i)===ks(2*o)&&(t.x1=t.x2=Ps(i,n,!0)),ks(2*r)===ks(2*e))&&(t.y1=t.y2=Ps(r,n,!0)),t}function Ls(t,e,n){var i,o,r;if(e)return i=e.x,o=e.y,r=e.width,e=e.height,t.x=i,t.y=o,t.width=r,t.height=e,(n=n&&n.lineWidth)&&(t.x=Ps(i,n,!0),t.y=Ps(o,n,!0),t.width=Math.max(Ps(i+r,n,!1)-t.x,0===r?0:1),t.height=Math.max(Ps(o+e,n,!1)-t.y,0===e?0:1)),t}function Ps(t,e,n){var i;return e?((i=ks(2*t))+ks(e))%2==0?i/2:(i+(n?1:-1))/2:t}function Os(){this.x=0,this.y=0,this.width=0,this.height=0}var Rs,Ns={},Es=(u(zs,Rs=_s),zs.prototype.getDefaultShape=function(){return new Os},zs.prototype.buildPath=function(t,e){var n,i,o,r,a,s,l,u,h,c,p,d,f,g;this.subPixelOptimize?(n=(a=Ls(Ns,e,this.style)).x,i=a.y,o=a.width,r=a.height,a.r=e.r,e=a):(n=e.x,i=e.y,o=e.width,r=e.height),e.r?(a=t,p=(e=e).x,d=e.y,f=e.width,g=e.height,e=e.r,f<0&&(p+=f,f=-f),g<0&&(d+=g,g=-g),"number"==typeof e?s=l=u=h=e:e instanceof Array?1===e.length?s=l=u=h=e[0]:2===e.length?(s=u=e[0],l=h=e[1]):3===e.length?(s=e[0],l=h=e[1],u=e[2]):(s=e[0],l=e[1],u=e[2],h=e[3]):s=l=u=h=0,f<s+l&&(s*=f/(c=s+l),l*=f/c),f<u+h&&(u*=f/(c=u+h),h*=f/c),g<l+u&&(l*=g/(c=l+u),u*=g/c),g<s+h&&(s*=g/(c=s+h),h*=g/c),a.moveTo(p+s,d),a.lineTo(p+f-l,d),0!==l&&a.arc(p+f-l,d+l,l,-Math.PI/2,0),a.lineTo(p+f,d+g-u),0!==u&&a.arc(p+f-u,d+g-u,u,0,Math.PI/2),a.lineTo(p+h,d+g),0!==h&&a.arc(p+h,d+g-h,h,Math.PI/2,Math.PI),a.lineTo(p,d+s),0!==s&&a.arc(p+s,d+s,s,Math.PI,1.5*Math.PI)):t.rect(n,i,o,r)},zs.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},zs);function zs(t){return Rs.call(this,t)||this}Es.prototype.type="rect";var Bs,Fs={fill:"#000"},Vs={style:B({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},wa.style)},Hs=(u(Us,Bs=e),Us.prototype.childrenRef=function(){return this._children},Us.prototype.update=function(){Bs.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t<this._children.length;t++){var e=this._children[t];e.zlevel=this.zlevel,e.z=this.z,e.z2=this.z2,e.culling=this.culling,e.cursor=this.cursor,e.invisible=this.invisible}},Us.prototype.updateTransform=function(){var t=this.innerTransformable;t?(t.updateTransform(),t.transform&&(this.transform=t.transform)):Bs.prototype.updateTransform.call(this)},Us.prototype.getLocalTransform=function(t){var e=this.innerTransformable;return e?e.getLocalTransform(t):Bs.prototype.getLocalTransform.call(this,t)},Us.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),Bs.prototype.getComputedTransform.call(this)},Us.prototype._updateSubTexts=function(){var t;this._childCursor=0,Zs(t=this.style),E(t.rich,Zs),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},Us.prototype.addSelfToZr=function(t){Bs.prototype.addSelfToZr.call(this,t);for(var e=0;e<this._children.length;e++)this._children[e].__zr=t},Us.prototype.removeSelfFromZr=function(t){Bs.prototype.removeSelfFromZr.call(this,t);for(var e=0;e<this._children.length;e++)this._children[e].__zr=null},Us.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var t=new G(0,0,0,0),e=this._children,n=[],i=null,o=0;o<e.length;o++){var r=e[o],a=r.getBoundingRect(),r=r.getLocalTransform(n);r?(t.copy(a),t.applyTransform(r),(i=i||t.clone()).union(t)):(i=i||a.clone()).union(a)}this._rect=i||t}return this._rect},Us.prototype.setDefaultTextStyle=function(t){this._defaultStyle=t||Fs},Us.prototype.setTextContent=function(t){},Us.prototype._mergeStyle=function(t,e){var n,i;return e&&(n=e.rich,i=t.rich||n&&{},P(t,e),n&&i?(this._mergeRich(i,n),t.rich=i):i&&(t.rich=i)),t},Us.prototype._mergeRich=function(t,e){for(var n=ht(e),i=0;i<n.length;i++){var o=n[i];t[o]=t[o]||{},P(t[o],e[o])}},Us.prototype.getAnimationStyleProps=function(){return Vs},Us.prototype._getOrCreateChild=function(t){var e=this._children[this._childCursor];return e&&e instanceof t||(e=new t),(this._children[this._childCursor++]=e).__zr=this.__zr,e.parent=this,e},Us.prototype._updatePlainTexts=function(){var t,e=this.style,n=e.font||j,i=e.padding,o=function(t,e){null!=t&&(t+="");var n,i=e.overflow,o=e.padding,r=e.font,a="truncate"===i,s=Co(r),l=R(e.lineHeight,s),u=!!e.backgroundColor,h="truncate"===e.lineOverflow,c=e.width,i=(n=null==c||"break"!==i&&"breakAll"!==i?t?t.split("\n"):[]:t?ma(t,e.font,c,"breakAll"===i,0).lines:[]).length*l,p=R(e.height,i);if(p<i&&h&&(h=Math.floor(p/l),n=n.slice(0,h)),t&&a&&null!=c)for(var d=ua(c,r,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),f=0;f<n.length;f++)n[f]=ha(n[f],d);for(var h=p,g=0,f=0;f<n.length;f++)g=Math.max(bo(n[f],r),g);return null==c&&(c=g),t=g,o&&(h+=o[0]+o[2],t+=o[1]+o[3],c+=o[1]+o[3]),{lines:n,height:p,outerWidth:t=u?c:t,outerHeight:h,lineHeight:l,calculatedLineHeight:s,contentWidth:g,contentHeight:i,width:c}}($s(e),e),r=Qs(e),a=!!e.backgroundColor,s=o.outerHeight,l=o.outerWidth,u=o.contentWidth,h=o.lines,c=o.lineHeight,p=this._defaultStyle,d=e.x||0,f=e.y||0,g=e.align||p.align||"left",y=e.verticalAlign||p.verticalAlign||"top",m=d,v=Io(f,o.contentHeight,y);(r||i)&&(t=To(d,l,g),f=Io(f,s,y),r)&&this._renderBackground(e,e,t,f,l,s),v+=c/2,i&&(m=Ks(d,g,i),"top"===y?v+=i[0]:"bottom"===y&&(v-=i[2]));for(var _=0,r=!1,x=(js(("fill"in e?e:(r=!0,p)).fill)),w=(qs("stroke"in e?e.stroke:a||p.autoStroke&&!r?null:(_=2,p.stroke))),b=0<e.textShadowBlur,S=null!=e.width&&("truncate"===e.overflow||"break"===e.overflow||"breakAll"===e.overflow),M=o.calculatedLineHeight,T=0;T<h.length;T++){var I=this._getOrCreateChild(bs),C=I.createStyle();I.useStyle(C),C.text=h[T],C.x=m,C.y=v,g&&(C.textAlign=g),C.textBaseline="middle",C.opacity=e.opacity,C.strokeFirst=!0,b&&(C.shadowBlur=e.textShadowBlur||0,C.shadowColor=e.textShadowColor||"transparent",C.shadowOffsetX=e.textShadowOffsetX||0,C.shadowOffsetY=e.textShadowOffsetY||0),C.stroke=w,C.fill=x,w&&(C.lineWidth=e.lineWidth||_,C.lineDash=e.lineDash,C.lineDashOffset=e.lineDashOffset||0),C.font=n,Ys(C,e),v+=c,S&&I.setBoundingRect(new G(To(C.x,e.width,C.textAlign),Io(C.y,M,C.textBaseline),u,M))}},Us.prototype._updateRichTexts=function(){var t=this.style,e=fa($s(t),t),n=e.width,i=e.outerWidth,o=e.outerHeight,r=t.padding,a=t.x||0,s=t.y||0,l=this._defaultStyle,u=t.align||l.align,l=t.verticalAlign||l.verticalAlign,a=To(a,i,u),u=Io(s,o,l),h=a,c=u,p=(r&&(h+=r[3],c+=r[0]),h+n);Qs(t)&&this._renderBackground(t,t,a,u,i,o);for(var d=!!t.backgroundColor,f=0;f<e.lines.length;f++){for(var g=e.lines[f],y=g.tokens,m=y.length,v=g.lineHeight,_=g.width,x=0,w=h,b=p,S=m-1,M=void 0;x<m&&(!(M=y[x]).align||"left"===M.align);)this._placeToken(M,t,v,c,w,"left",d),_-=M.width,w+=M.width,x++;for(;0<=S&&"right"===(M=y[S]).align;)this._placeToken(M,t,v,c,b,"right",d),_-=M.width,b-=M.width,S--;for(w+=(n-(w-h)-(p-b)-_)/2;x<=S;)M=y[x],this._placeToken(M,t,v,c,w+M.width/2,"center",d),w+=M.width,x++;c+=v}},Us.prototype._placeToken=function(t,e,n,i,o,r,a){var s=e.rich[t.styleName]||{},l=(s.text=t.text,t.verticalAlign),u=i+n/2,l=("top"===l?u=i+t.height/2:"bottom"===l&&(u=i+n-t.height/2),!t.isLineHolder&&Qs(s)&&this._renderBackground(s,e,"right"===r?o-t.width:"center"===r?o-t.width/2:o,u-t.height/2,t.width,t.height),!!s.backgroundColor),i=t.textPadding,n=(i&&(o=Ks(o,r,i),u-=t.height/2-i[0]-t.innerHeight/2),this._getOrCreateChild(bs)),i=n.createStyle(),h=(n.useStyle(i),this._defaultStyle),c=!1,p=0,d=js(("fill"in s?s:"fill"in e?e:(c=!0,h)).fill),l=qs("stroke"in s?s.stroke:"stroke"in e?e.stroke:l||a||h.autoStroke&&!c?null:(p=2,h.stroke)),a=0<s.textShadowBlur||0<e.textShadowBlur,c=(i.text=t.text,i.x=o,i.y=u,a&&(i.shadowBlur=s.textShadowBlur||e.textShadowBlur||0,i.shadowColor=s.textShadowColor||e.textShadowColor||"transparent",i.shadowOffsetX=s.textShadowOffsetX||e.textShadowOffsetX||0,i.shadowOffsetY=s.textShadowOffsetY||e.textShadowOffsetY||0),i.textAlign=r,i.textBaseline="middle",i.font=t.font||j,i.opacity=xt(s.opacity,e.opacity,1),Ys(i,s),l&&(i.lineWidth=xt(s.lineWidth,e.lineWidth,p),i.lineDash=R(s.lineDash,e.lineDash),i.lineDashOffset=e.lineDashOffset||0,i.stroke=l),d&&(i.fill=d),t.contentWidth),h=t.contentHeight;n.setBoundingRect(new G(To(i.x,c,i.textAlign),Io(i.y,h,i.textBaseline),c,h))},Us.prototype._renderBackground=function(t,e,n,i,o,r){var a,s,l,u,h=t.backgroundColor,c=t.borderWidth,p=t.borderColor,d=h&&h.image,f=h&&!d,g=t.borderRadius,y=this,g=((f||t.lineHeight||c&&p)&&((a=this._getOrCreateChild(Es)).useStyle(a.createStyle()),a.style.fill=null,(u=a.shape).x=n,u.y=i,u.width=o,u.height=r,u.r=g,a.dirtyShape()),f?((l=a.style).fill=h||null,l.fillOpacity=R(t.fillOpacity,1)):d&&((s=this._getOrCreateChild(Cs)).onload=function(){y.dirtyStyle()},(u=s.style).image=h.image,u.x=n,u.y=i,u.width=o,u.height=r),c&&p&&((l=a.style).lineWidth=c,l.stroke=p,l.strokeOpacity=R(t.strokeOpacity,1),l.lineDash=t.borderDash,l.lineDashOffset=t.borderDashOffset||0,a.strokeContainThreshold=0,a.hasFill())&&a.hasStroke()&&(l.strokeFirst=!0,l.lineWidth*=2),(a||s).style);g.shadowBlur=t.shadowBlur||0,g.shadowColor=t.shadowColor||"transparent",g.shadowOffsetX=t.shadowOffsetX||0,g.shadowOffsetY=t.shadowOffsetY||0,g.opacity=xt(t.opacity,e.opacity,1)},Us.makeFont=function(t){var e,n="";return(n=null!=(e=t).fontSize||e.fontFamily||e.fontWeight?[t.fontStyle,t.fontWeight,"string"!=typeof(e=t.fontSize)||-1===e.indexOf("px")&&-1===e.indexOf("rem")&&-1===e.indexOf("em")?isNaN(+e)?"12px":e+"px":e,t.fontFamily||"sans-serif"].join(" "):n)&&Mt(n)||t.textFont||t.font},Us),Ws={left:!0,right:1,center:1},Gs={top:1,bottom:1,middle:1},Xs=["fontStyle","fontWeight","fontSize","fontFamily"];function Us(t){var e=Bs.call(this)||this;return e.type="text",e._children=[],e._defaultStyle=Fs,e.attr(t),e}function Ys(t,e){for(var n=0;n<Xs.length;n++){var i=Xs[n],o=e[i];null!=o&&(t[i]=o)}}function Zs(t){var e;t&&(t.font=Hs.makeFont(t),e=t.align,t.align=null==(e="middle"===e?"center":e)||Ws[e]?e:"left",e=t.verticalAlign,t.verticalAlign=null==(e="center"===e?"middle":e)||Gs[e]?e:"top",t.padding)&&(t.padding=bt(t.padding))}function qs(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function js(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function Ks(t,e,n){return"right"===e?t-n[1]:"center"===e?t+n[3]/2-n[1]/2:t+n[3]}function $s(t){t=t.text;return null!=t&&(t+=""),t}function Qs(t){return!!(t.backgroundColor||t.lineHeight||t.borderWidth&&t.borderColor)}var k=Rr(),Js=1,tl={},el=Rr(),nl=Rr(),il=0,ol=1,rl=2,al=["emphasis","blur","select"],sl=["normal","emphasis","blur","select"],ll="highlight",ul="downplay",hl="select",cl="unselect",pl="toggleSelect";function dl(t){return null!=t&&"none"!==t}function fl(t,e,n){t.onHoverStateChange&&(t.hoverState||0)!==n&&t.onHoverStateChange(e),t.hoverState=n}function gl(t){fl(t,"emphasis",rl)}function yl(t){t.hoverState===rl&&fl(t,"normal",il)}function ml(t){fl(t,"blur",ol)}function vl(t){t.hoverState===ol&&fl(t,"normal",il)}function _l(t){t.selected=!0}function xl(t){t.selected=!1}function wl(t,e,n){e(t,n)}function bl(t,e,n){wl(t,e,n),t.isGroup&&t.traverse(function(t){wl(t,e,n)})}function Sl(t,e){switch(e){case"emphasis":t.hoverState=rl;break;case"normal":t.hoverState=il;break;case"blur":t.hoverState=ol;break;case"select":t.selected=!0}}function Ml(t,e,n){var i=0<=C(t.currentStates,e),o=t.style.opacity,t=i?null:function(t,e,n,i){for(var o=t.style,r={},a=0;a<e.length;a++){var s=e[a],l=o[s];r[s]=null==l?i&&i[s]:l}for(a=0;a<t.animators.length;a++){var u=t.animators[a];u.__fromStateTransition&&u.__fromStateTransition.indexOf(n)<0&&"style"===u.targetName&&u.saveTo(r,e)}return r}(t,["opacity"],e,{opacity:1}),e=(n=n||{}).style||{};return null==e.opacity&&(n=P({},n),e=P({opacity:i?o:.1*t.opacity},e),n.style=e),n}function Tl(t,e){var n,i,o,r,a,s=this.states[t];if(this.style){if("emphasis"===t)return n=this,i=s,e=(e=e)&&0<=C(e,"select"),a=!1,n instanceof _s&&(o=el(n),r=e&&o.selectFill||o.normalFill,e=e&&o.selectStroke||o.normalStroke,dl(r)||dl(e))&&("inherit"===(o=(i=i||{}).style||{}).fill?(a=!0,i=P({},i),(o=P({},o)).fill=r):!dl(o.fill)&&dl(r)?(a=!0,i=P({},i),(o=P({},o)).fill=Si(r)):!dl(o.stroke)&&dl(e)&&(a||(i=P({},i),o=P({},o)),o.stroke=Si(e)),i.style=o),i&&null==i.z2&&(a||(i=P({},i)),r=n.z2EmphasisLift,i.z2=n.z2+(null!=r?r:10)),i;if("blur"===t)return Ml(this,t,s);if("select"===t)return e=this,(o=s)&&null==o.z2&&(o=P({},o),a=e.z2SelectLift,o.z2=e.z2+(null!=a?a:9)),o}return s}function Il(t){t.stateProxy=Tl;var e=t.getTextContent(),t=t.getTextGuideLine();e&&(e.stateProxy=Tl),t&&(t.stateProxy=Tl)}function Cl(t,e){Nl(t,e)||t.__highByOuter||bl(t,gl)}function Dl(t,e){Nl(t,e)||t.__highByOuter||bl(t,yl)}function kl(t,e){t.__highByOuter|=1<<(e||0),bl(t,gl)}function Al(t,e){(t.__highByOuter&=~(1<<(e||0)))||bl(t,yl)}function Ll(t){bl(t,ml)}function Pl(t){bl(t,vl)}function Ol(t){bl(t,_l)}function Rl(t){bl(t,xl)}function Nl(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function El(o){var e=o.getModel(),r=[],a=[];e.eachComponent(function(t,e){var n=nl(e),t="series"===t,i=t?o.getViewOfSeriesModel(e):o.getViewOfComponentModel(e);t||a.push(i),n.isBlured&&(i.group.traverse(function(t){vl(t)}),t)&&r.push(e),n.isBlured=!1}),E(a,function(t){t&&t.toggleBlurSeries&&t.toggleBlurSeries(r,!1,e)})}function zl(t,r,a,s){var l,u,h,n=s.getModel();function c(t,e){for(var n=0;n<e.length;n++){var i=t.getItemGraphicEl(e[n]);i&&Pl(i)}}a=a||"coordinateSystem",null!=t&&r&&"none"!==r&&(l=n.getSeriesByIndex(t),(u=l.coordinateSystem)&&u.master&&(u=u.master),h=[],n.eachSeries(function(t){var e=l===t,n=t.coordinateSystem;if(n&&n.master&&(n=n.master),!("series"===a&&!e||"coordinateSystem"===a&&!(n&&u?n===u:e)||"series"===r&&e)){if(s.getViewOfSeriesModel(t).group.traverse(function(t){t.__highByOuter&&e&&"self"===r||ml(t)}),st(r))c(t.getData(),r);else if(O(r))for(var i=ht(r),o=0;o<i.length;o++)c(t.getData(i[o]),r[i[o]]);h.push(t),nl(t).isBlured=!0}}),n.eachComponent(function(t,e){"series"!==t&&(t=s.getViewOfComponentModel(e))&&t.toggleBlurSeries&&t.toggleBlurSeries(h,!0,n)}))}function Bl(t,e,n){null!=t&&null!=e&&(t=n.getModel().getComponent(t,e))&&(nl(t).isBlured=!0,e=n.getViewOfComponentModel(t))&&e.focusBlurEnabled&&e.group.traverse(function(t){ml(t)})}function Fl(t,e,n,i){var o={focusSelf:!1,dispatchers:null};if(null==t||"series"===t||null==e||null==n)return o;t=i.getModel().getComponent(t,e);if(!t)return o;e=i.getViewOfComponentModel(t);if(!e||!e.findHighDownDispatchers)return o;for(var r,a=e.findHighDownDispatchers(n),s=0;s<a.length;s++)if("self"===k(a[s]).focus){r=!0;break}return{focusSelf:r,dispatchers:a}}function Vl(i){E(i.getAllData(),function(t){var e=t.data,n=t.type;e.eachItemGraphicEl(function(t,e){(i.isSelected(e,n)?Ol:Rl)(t)})})}function Hl(t,e,n){Yl(t,!0),bl(t,Il);t=k(t),null!=e?(t.focus=e,t.blurScope=n):t.focus&&(t.focus=null)}function Wl(t,e,n,i){i?Yl(t,!1):Hl(t,e,n)}var Gl=["emphasis","blur","select"],Xl={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Ul(t,e,n,i){n=n||"itemStyle";for(var o=0;o<Gl.length;o++){var r=Gl[o],a=e.getModel([r,n]);t.ensureState(r).style=i?i(a):a[Xl[n]]()}}function Yl(t,e){var e=!1===e,n=t;t.highDownSilentOnTouch&&(n.__highDownSilentOnTouch=t.highDownSilentOnTouch),e&&!n.__highDownDispatcher||(n.__highByOuter=n.__highByOuter||0,n.__highDownDispatcher=!e)}function Zl(t){return!(!t||!t.__highDownDispatcher)}function ql(t){t=t.type;return t===hl||t===cl||t===pl}function jl(t){t=t.type;return t===ll||t===ul}var Kl=es.CMD,$l=[[],[],[]],Ql=Math.sqrt,Jl=Math.atan2;var tu=Math.sqrt,eu=Math.sin,nu=Math.cos,iu=Math.PI;function ou(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function ru(t,e){return(t[0]*e[0]+t[1]*e[1])/(ou(t)*ou(e))}function au(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(ru(t,e))}function su(t,e,n,i,o,r,a,s,l,u,h){var l=l*(iu/180),c=nu(l)*(t-n)/2+eu(l)*(e-i)/2,p=-1*eu(l)*(t-n)/2+nu(l)*(e-i)/2,d=c*c/(a*a)+p*p/(s*s),d=(1<d&&(a*=tu(d),s*=tu(d)),(o===r?-1:1)*tu((a*a*(s*s)-a*a*(p*p)-s*s*(c*c))/(a*a*(p*p)+s*s*(c*c)))||0),o=d*a*p/s,d=d*-s*c/a,t=(t+n)/2+nu(l)*o-eu(l)*d,n=(e+i)/2+eu(l)*o+nu(l)*d,e=au([1,0],[(c-o)/a,(p-d)/s]),i=[(c-o)/a,(p-d)/s],c=[(-1*c-o)/a,(-1*p-d)/s],o=au(i,c);ru(i,c)<=-1&&(o=iu),(o=1<=ru(i,c)?0:o)<0&&(p=Math.round(o/iu*1e6)/1e6,o=2*iu+p%2*iu),h.addData(u,t,n,a,s,e,o,l,r)}var lu=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,uu=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;u(pu,hu=_s),pu.prototype.applyTransform=function(t){};var hu,cu=pu;function pu(){return null!==hu&&hu.apply(this,arguments)||this}function du(t){return null!=t.setData}function fu(t,e){var S=function(t){var e=new es;if(t){var n,i=0,o=0,r=i,a=o,s=es.CMD,l=t.match(lu);if(l){for(var u=0;u<l.length;u++){for(var h=l[u],c=h.charAt(0),p=void 0,d=h.match(uu)||[],f=d.length,g=0;g<f;g++)d[g]=parseFloat(d[g]);for(var y=0;y<f;){var m=void 0,v=void 0,_=void 0,x=void 0,w=void 0,b=void 0,S=void 0,M=i,T=o,I=void 0,C=void 0;switch(c){case"l":i+=d[y++],o+=d[y++],p=s.L,e.addData(p,i,o);break;case"L":i=d[y++],o=d[y++],p=s.L,e.addData(p,i,o);break;case"m":i+=d[y++],o+=d[y++],p=s.M,e.addData(p,i,o),r=i,a=o,c="l";break;case"M":i=d[y++],o=d[y++],p=s.M,e.addData(p,i,o),r=i,a=o,c="L";break;case"h":i+=d[y++],p=s.L,e.addData(p,i,o);break;case"H":i=d[y++],p=s.L,e.addData(p,i,o);break;case"v":o+=d[y++],p=s.L,e.addData(p,i,o);break;case"V":o=d[y++],p=s.L,e.addData(p,i,o);break;case"C":p=s.C,e.addData(p,d[y++],d[y++],d[y++],d[y++],d[y++],d[y++]),i=d[y-2],o=d[y-1];break;case"c":p=s.C,e.addData(p,d[y++]+i,d[y++]+o,d[y++]+i,d[y++]+o,d[y++]+i,d[y++]+o),i+=d[y-2],o+=d[y-1];break;case"S":m=i,v=o,I=e.len(),C=e.data,n===s.C&&(m+=i-C[I-4],v+=o-C[I-3]),p=s.C,M=d[y++],T=d[y++],i=d[y++],o=d[y++],e.addData(p,m,v,M,T,i,o);break;case"s":m=i,v=o,I=e.len(),C=e.data,n===s.C&&(m+=i-C[I-4],v+=o-C[I-3]),p=s.C,M=i+d[y++],T=o+d[y++],i+=d[y++],o+=d[y++],e.addData(p,m,v,M,T,i,o);break;case"Q":M=d[y++],T=d[y++],i=d[y++],o=d[y++],p=s.Q,e.addData(p,M,T,i,o);break;case"q":M=d[y++]+i,T=d[y++]+o,i+=d[y++],o+=d[y++],p=s.Q,e.addData(p,M,T,i,o);break;case"T":m=i,v=o,I=e.len(),C=e.data,n===s.Q&&(m+=i-C[I-4],v+=o-C[I-3]),i=d[y++],o=d[y++],p=s.Q,e.addData(p,m,v,i,o);break;case"t":m=i,v=o,I=e.len(),C=e.data,n===s.Q&&(m+=i-C[I-4],v+=o-C[I-3]),i+=d[y++],o+=d[y++],p=s.Q,e.addData(p,m,v,i,o);break;case"A":_=d[y++],x=d[y++],w=d[y++],b=d[y++],S=d[y++],su(M=i,T=o,i=d[y++],o=d[y++],b,S,_,x,w,p=s.A,e);break;case"a":_=d[y++],x=d[y++],w=d[y++],b=d[y++],S=d[y++],su(M=i,T=o,i+=d[y++],o+=d[y++],b,S,_,x,w,p=s.A,e)}}"z"!==c&&"Z"!==c||(p=s.Z,e.addData(p),i=r,o=a),n=p}e.toStatic()}}return e}(t),t=P({},e);return t.buildPath=function(t){var e;du(t)?(t.setData(S.data),(e=t.getContext())&&t.rebuildPath(e,1)):S.rebuildPath(e=t,1)},t.applyTransform=function(t){var e=S,n=t;if(n){for(var i,o,r,a,s=e.data,l=e.len(),u=Kl.M,h=Kl.C,c=Kl.L,p=Kl.R,d=Kl.A,f=Kl.Q,g=0,y=0;g<l;){switch(i=s[g++],y=g,o=0,i){case u:case c:o=1;break;case h:o=3;break;case f:o=2;break;case d:var m=n[4],v=n[5],_=Ql(n[0]*n[0]+n[1]*n[1]),x=Ql(n[2]*n[2]+n[3]*n[3]),w=Jl(-n[1]/x,n[0]/_);s[g]*=_,s[g++]+=m,s[g]*=x,s[g++]+=v,s[g++]*=_,s[g++]*=x,s[g++]+=w,s[g++]+=w,y=g+=2;break;case p:a[0]=s[g++],a[1]=s[g++],Jt(a,a,n),s[y++]=a[0],s[y++]=a[1],a[0]+=s[g++],a[1]+=s[g++],Jt(a,a,n),s[y++]=a[0],s[y++]=a[1]}for(r=0;r<o;r++){var b=$l[r];b[0]=s[g++],b[1]=s[g++],Jt(b,b,n),s[y++]=b[0],s[y++]=b[1]}}e.increaseVersion()}this.dirtyShape()},t}function gu(){this.cx=0,this.cy=0,this.r=0}u(vu,yu=_s),vu.prototype.getDefaultShape=function(){return new gu},vu.prototype.buildPath=function(t,e){t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI)};var yu,mu=vu;function vu(t){return yu.call(this,t)||this}mu.prototype.type="circle";function _u(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}u(bu,xu=_s),bu.prototype.getDefaultShape=function(){return new _u},bu.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,o=e.rx,e=e.ry,r=.5522848*o,a=.5522848*e;t.moveTo(n-o,i),t.bezierCurveTo(n-o,i-a,n-r,i-e,n,i-e),t.bezierCurveTo(n+r,i-e,n+o,i-a,n+o,i),t.bezierCurveTo(n+o,i+a,n+r,i+e,n,i+e),t.bezierCurveTo(n-r,i+e,n-o,i+a,n-o,i),t.closePath()};var xu,wu=bu;function bu(t){return xu.call(this,t)||this}wu.prototype.type="ellipse";var Su=Math.PI,Mu=2*Su,Tu=Math.sin,Iu=Math.cos,Cu=Math.acos,Du=Math.atan2,ku=Math.abs,Au=Math.sqrt,Lu=Math.max,Pu=Math.min,Ou=1e-4;function Ru(t,e,n,i,o,r,a){var s=t-n,l=e-i,a=(a?r:-r)/Au(s*s+l*l),l=a*l,a=-a*s,s=t+l,t=e+a,e=n+l,n=i+a,i=(s+e)/2,u=(t+n)/2,h=e-s,c=n-t,p=h*h+c*c,r=o-r,s=s*n-e*t,n=(c<0?-1:1)*Au(Lu(0,r*r*p-s*s)),e=(s*c-h*n)/p,t=(-s*h-c*n)/p,d=(s*c+h*n)/p,s=(-s*h+c*n)/p,h=e-i,c=t-u,n=d-i,p=s-u;return n*n+p*p<h*h+c*c&&(e=d,t=s),{cx:e,cy:t,x0:-l,y0:-a,x1:e*(o/r-1),y1:t*(o/r-1)}}function Nu(t,e){var n,i,o,r,a,s,l,u,h,c,p,d,f,g,y,m,v,_,x,w,b,S,M,T,I,C,D,k,A,L,P=Lu(e.r,0),O=Lu(e.r0||0,0),R=0<P;(R||0<O)&&(R||(P=O,O=0),P<O&&(R=P,P=O,O=R),R=e.startAngle,n=e.endAngle,isNaN(R)||isNaN(n)||(i=e.cx,o=e.cy,r=!!e.clockwise,w=ku(n-R),Ou<(a=Mu<w&&w%Mu)&&(w=a),Ou<P?Mu-Ou<w?(t.moveTo(i+P*Iu(R),o+P*Tu(R)),t.arc(i,o,P,R,n,!r),Ou<O&&(t.moveTo(i+O*Iu(n),o+O*Tu(n)),t.arc(i,o,O,n,R,r))):(g=f=d=p=S=b=c=h=C=I=T=M=u=l=s=a=void 0,y=P*Iu(R),m=P*Tu(R),v=O*Iu(n),_=O*Tu(n),(x=Ou<w)&&((e=e.cornerRadius)&&(a=(e=function(t){if(V(t)){var e=t.length;if(!e)return t;e=1===e?[t[0],t[0],0,0]:2===e?[t[0],t[0],t[1],t[1]]:3===e?t.concat(t[2]):t}else e=[t,t,t,t];return e}(e))[0],s=e[1],l=e[2],u=e[3]),e=ku(P-O)/2,M=Pu(e,l),T=Pu(e,u),I=Pu(e,a),C=Pu(e,s),b=h=Lu(M,T),S=c=Lu(I,C),Ou<h||Ou<c)&&(p=P*Iu(n),d=P*Tu(n),f=O*Iu(R),g=O*Tu(R),w<Su)&&((e=function(t,e,n,i,o,r,a,s){var l=(s=s-r)*(n=n-t)-(a=a-o)*(i=i-e);if(!(l*l<Ou))return[t+(l=(a*(e-r)-s*(t-o))/l)*n,e+l*i]}(y,m,f,g,p,d,v,_))&&(M=y-e[0],T=m-e[1],I=p-e[0],C=d-e[1],w=1/Tu(Cu((M*I+T*C)/(Au(M*M+T*T)*Au(I*I+C*C)))/2),M=Au(e[0]*e[0]+e[1]*e[1]),b=Pu(h,(P-M)/(1+w)),S=Pu(c,(O-M)/(w-1)))),x?Ou<b?(D=Pu(l,b),k=Pu(u,b),A=Ru(f,g,y,m,P,D,r),L=Ru(p,d,v,_,P,k,r),t.moveTo(i+A.cx+A.x0,o+A.cy+A.y0),b<h&&D===k?t.arc(i+A.cx,o+A.cy,b,Du(A.y0,A.x0),Du(L.y0,L.x0),!r):(0<D&&t.arc(i+A.cx,o+A.cy,D,Du(A.y0,A.x0),Du(A.y1,A.x1),!r),t.arc(i,o,P,Du(A.cy+A.y1,A.cx+A.x1),Du(L.cy+L.y1,L.cx+L.x1),!r),0<k&&t.arc(i+L.cx,o+L.cy,k,Du(L.y1,L.x1),Du(L.y0,L.x0),!r))):(t.moveTo(i+y,o+m),t.arc(i,o,P,R,n,!r)):t.moveTo(i+y,o+m),Ou<O&&x?Ou<S?(D=Pu(a,S),A=Ru(v,_,p,d,O,-(k=Pu(s,S)),r),L=Ru(y,m,f,g,O,-D,r),t.lineTo(i+A.cx+A.x0,o+A.cy+A.y0),S<c&&D===k?t.arc(i+A.cx,o+A.cy,S,Du(A.y0,A.x0),Du(L.y0,L.x0),!r):(0<k&&t.arc(i+A.cx,o+A.cy,k,Du(A.y0,A.x0),Du(A.y1,A.x1),!r),t.arc(i,o,O,Du(A.cy+A.y1,A.cx+A.x1),Du(L.cy+L.y1,L.cx+L.x1),r),0<D&&t.arc(i+L.cx,o+L.cy,D,Du(L.y1,L.x1),Du(L.y0,L.x0),!r))):(t.lineTo(i+v,o+_),t.arc(i,o,O,n,R,r)):t.lineTo(i+v,o+_)):t.moveTo(i,o),t.closePath()))}function Eu(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0,this.cornerRadius=0}u(Fu,zu=_s),Fu.prototype.getDefaultShape=function(){return new Eu},Fu.prototype.buildPath=function(t,e){Nu(t,e)},Fu.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0};var zu,Bu=Fu;function Fu(t){return zu.call(this,t)||this}Bu.prototype.type="sector";function Vu(){this.cx=0,this.cy=0,this.r=0,this.r0=0}u(Gu,Hu=_s),Gu.prototype.getDefaultShape=function(){return new Vu},Gu.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,o=2*Math.PI;t.moveTo(n+e.r,i),t.arc(n,i,e.r,0,o,!1),t.moveTo(n+e.r0,i),t.arc(n,i,e.r0,0,o,!0)};var Hu,Wu=Gu;function Gu(t){return Hu.call(this,t)||this}function Xu(t,e,n){var i=e.smooth,o=e.points;if(o&&2<=o.length){if(i){var r=function(t,e,n,i){var o,r,a=[],s=[],l=[],u=[];if(i){for(var h=[1/0,1/0],c=[-1/0,-1/0],p=0,d=t.length;p<d;p++)te(h,h,t[p]),ee(c,c,t[p]);te(h,h,i[0]),ee(c,c,i[1])}for(p=0,d=t.length;p<d;p++){var f=t[p];if(n)o=t[p?p-1:d-1],r=t[(p+1)%d];else{if(0===p||p===d-1){a.push(Ht(t[p]));continue}o=t[p-1],r=t[p+1]}Gt(s,r,o),Yt(s,s,e);var g=qt(f,o),y=qt(f,r),m=g+y,m=(0!==m&&(g/=m,y/=m),Yt(l,s,-g),Yt(u,s,y),Wt([],f,l)),g=Wt([],f,u);i&&(ee(m,m,h),te(m,m,c),ee(g,g,h),te(g,g,c)),a.push(m),a.push(g)}return n&&a.push(a.shift()),a}(o,i,n,e.smoothConstraint);t.moveTo(o[0][0],o[0][1]);for(var a=o.length,s=0;s<(n?a:a-1);s++){var l=r[2*s],u=r[2*s+1],h=o[(s+1)%a];t.bezierCurveTo(l[0],l[1],u[0],u[1],h[0],h[1])}}else{t.moveTo(o[0][0],o[0][1]);for(var s=1,c=o.length;s<c;s++)t.lineTo(o[s][0],o[s][1])}n&&t.closePath()}}Wu.prototype.type="ring";function Uu(){this.points=null,this.smooth=0,this.smoothConstraint=null}u(qu,Yu=_s),qu.prototype.getDefaultShape=function(){return new Uu},qu.prototype.buildPath=function(t,e){Xu(t,e,!0)};var Yu,Zu=qu;function qu(t){return Yu.call(this,t)||this}Zu.prototype.type="polygon";function ju(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}u(Qu,Ku=_s),Qu.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},Qu.prototype.getDefaultShape=function(){return new ju},Qu.prototype.buildPath=function(t,e){Xu(t,e,!1)};var Ku,$u=Qu;function Qu(t){return Ku.call(this,t)||this}$u.prototype.type="polyline";function Ju(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}var th,eh={},nh=(u(ih,th=_s),ih.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},ih.prototype.getDefaultShape=function(){return new Ju},ih.prototype.buildPath=function(t,e){r=(this.subPixelOptimize?(n=(r=As(eh,e,this.style)).x1,i=r.y1,o=r.x2,r):(n=e.x1,i=e.y1,o=e.x2,e)).y2;var n,i,o,r,e=e.percent;0!==e&&(t.moveTo(n,i),e<1&&(o=n*(1-e)+o*e,r=i*(1-e)+r*e),t.lineTo(o,r))},ih.prototype.pointAt=function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]},ih);function ih(t){return th.call(this,t)||this}nh.prototype.type="line";function oh(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1}var rh=[];function ah(t,e,n){var i=t.cpx2,o=t.cpy2;return null!=i||null!=o?[(n?zn:En)(t.x1,t.cpx1,t.cpx2,t.x2,e),(n?zn:En)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(n?Gn:Wn)(t.x1,t.cpx1,t.x2,e),(n?Gn:Wn)(t.y1,t.cpy1,t.y2,e)]}u(uh,sh=_s),uh.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},uh.prototype.getDefaultShape=function(){return new oh},uh.prototype.buildPath=function(t,e){var n=e.x1,i=e.y1,o=e.x2,r=e.y2,a=e.cpx1,s=e.cpy1,l=e.cpx2,u=e.cpy2,e=e.percent;0!==e&&(t.moveTo(n,i),null==l||null==u?(e<1&&(Un(n,a,o,e,rh),a=rh[1],o=rh[2],Un(i,s,r,e,rh),s=rh[1],r=rh[2]),t.quadraticCurveTo(a,s,o,r)):(e<1&&(Vn(n,a,l,o,e,rh),a=rh[1],l=rh[2],o=rh[3],Vn(i,s,u,r,e,rh),s=rh[1],u=rh[2],r=rh[3]),t.bezierCurveTo(a,s,l,u,o,r)))},uh.prototype.pointAt=function(t){return ah(this.shape,t,!1)},uh.prototype.tangentAt=function(t){t=ah(this.shape,t,!0);return Zt(t,t)};var sh,lh=uh;function uh(t){return sh.call(this,t)||this}lh.prototype.type="bezier-curve";function hh(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0}u(dh,ch=_s),dh.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},dh.prototype.getDefaultShape=function(){return new hh},dh.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,o=Math.max(e.r,0),r=e.startAngle,a=e.endAngle,e=e.clockwise,s=Math.cos(r),l=Math.sin(r);t.moveTo(s*o+n,l*o+i),t.arc(n,i,o,r,a,!e)};var ch,ph=dh;function dh(t){return ch.call(this,t)||this}ph.prototype.type="arc";u(yh,fh=_s),yh.prototype._updatePathDirty=function(){for(var t=this.shape.paths,e=this.shapeChanged(),n=0;n<t.length;n++)e=e||t[n].shapeChanged();e&&this.dirtyShape()},yh.prototype.beforeBrush=function(){this._updatePathDirty();for(var t=this.shape.paths||[],e=this.getGlobalScale(),n=0;n<t.length;n++)t[n].path||t[n].createPathProxy(),t[n].path.setScale(e[0],e[1],t[n].segmentIgnoreThreshold)},yh.prototype.buildPath=function(t,e){for(var n=e.paths||[],i=0;i<n.length;i++)n[i].buildPath(t,n[i].shape,!0)},yh.prototype.afterBrush=function(){for(var t=this.shape.paths||[],e=0;e<t.length;e++)t[e].pathUpdated()},yh.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),_s.prototype.getBoundingRect.call(this)};var fh,gh=yh;function yh(){var t=null!==fh&&fh.apply(this,arguments)||this;return t.type="compound",t}vh.prototype.addColorStop=function(t,e){this.colorStops.push({offset:t,color:e})};var mh=vh;function vh(t){this.colorStops=t||[]}u(wh,_h=mh);var _h,xh=wh;function wh(t,e,n,i,o,r){o=_h.call(this,o)||this;return o.x=null==t?0:t,o.y=null==e?0:e,o.x2=null==n?1:n,o.y2=null==i?0:i,o.type="linear",o.global=r||!1,o}u(Sh,bh=mh);var bh,mh=Sh;function Sh(t,e,n,i,o){i=bh.call(this,i)||this;return i.x=null==t?.5:t,i.y=null==e?.5:e,i.r=null==n?.5:n,i.type="radial",i.global=o||!1,i}var Mh=[0,0],Th=[0,0],Ih=new z,Ch=new z,Dh=(kh.prototype.fromBoundingRect=function(t,e){var n=this._corners,i=this._axes,o=t.x,r=t.y,a=o+t.width,t=r+t.height;if(n[0].set(o,r),n[1].set(a,r),n[2].set(a,t),n[3].set(o,t),e)for(var s=0;s<4;s++)n[s].transform(e);for(z.sub(i[0],n[1],n[0]),z.sub(i[1],n[3],n[0]),i[0].normalize(),i[1].normalize(),s=0;s<2;s++)this._origin[s]=i[s].dot(n[0])},kh.prototype.intersect=function(t,e){var n=!0,i=!e;return Ih.set(1/0,1/0),Ch.set(0,0),!this._intersectCheckOneSide(this,t,Ih,Ch,i,1)&&(n=!1,i)||!this._intersectCheckOneSide(t,this,Ih,Ch,i,-1)&&(n=!1,i)||i||z.copy(e,n?Ih:Ch),n},kh.prototype._intersectCheckOneSide=function(t,e,n,i,o,r){for(var a=!0,s=0;s<2;s++){var l=this._axes[s];if(this._getProjMinMaxOnAxis(s,t._corners,Mh),this._getProjMinMaxOnAxis(s,e._corners,Th),Mh[1]<Th[0]||Th[1]<Mh[0]){if(a=!1,o)return a;var u=Math.abs(Th[0]-Mh[1]),h=Math.abs(Mh[0]-Th[1]);Math.min(u,h)>i.len()&&(u<h?z.scale(i,l,-u*r):z.scale(i,l,h*r))}else n&&(u=Math.abs(Th[0]-Mh[1]),h=Math.abs(Mh[0]-Th[1]),Math.min(u,h)<n.len())&&(u<h?z.scale(n,l,u*r):z.scale(n,l,-h*r))}return a},kh.prototype._getProjMinMaxOnAxis=function(t,e,n){for(var i=this._axes[t],o=this._origin,r=e[0].dot(i)+o[t],a=r,s=r,l=1;l<e.length;l++)var u=e[l].dot(i)+o[t],a=Math.min(u,a),s=Math.max(u,s);n[0]=a,n[1]=s},kh);function kh(t,e){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new z;for(n=0;n<2;n++)this._axes[n]=new z;t&&this.fromBoundingRect(t,e)}var Ah,Lh=[],e=(u(Ph,Ah=e),Ph.prototype.traverse=function(t,e){t.call(e,this)},Ph.prototype.useStyle=function(){this.style={}},Ph.prototype.getCursor=function(){return this._cursor},Ph.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},Ph.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},Ph.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},Ph.prototype.addDisplayable=function(t,e){(e?this._temporaryDisplayables:this._displayables).push(t),this.markRedraw()},Ph.prototype.addDisplayables=function(t,e){e=e||!1;for(var n=0;n<t.length;n++)this.addDisplayable(t[n],e)},Ph.prototype.getDisplayables=function(){return this._displayables},Ph.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},Ph.prototype.eachPendingDisplayable=function(t){for(var e=this._cursor;e<this._displayables.length;e++)t&&t(this._displayables[e]);for(e=0;e<this._temporaryDisplayables.length;e++)t&&t(this._temporaryDisplayables[e])},Ph.prototype.update=function(){this.updateTransform();for(var t,e=this._cursor;e<this._displayables.length;e++)(t=this._displayables[e]).parent=this,t.update(),t.parent=null;for(e=0;e<this._temporaryDisplayables.length;e++)(t=this._temporaryDisplayables[e]).parent=this,t.update(),t.parent=null},Ph.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new G(1/0,1/0,-1/0,-1/0),e=0;e<this._displayables.length;e++){var n=this._displayables[e],i=n.getBoundingRect().clone();n.needLocalTransform()&&i.applyTransform(n.getLocalTransform(Lh)),t.union(i)}this._rect=t}return this._rect},Ph.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e);if(this.getBoundingRect().contain(n[0],n[1]))for(var i=0;i<this._displayables.length;i++)if(this._displayables[i].contain(t,e))return!0;return!1},Ph);function Ph(){var t=null!==Ah&&Ah.apply(this,arguments)||this;return t.notClear=!0,t.incremental=!0,t._displayables=[],t._temporaryDisplayables=[],t._cursor=0,t}var Oh=Rr();function Rh(t,e,n,i,o,r,a){var s,l,u,h,c,p,d=!1,f=(D(o)?(a=r,r=o,o=null):O(o)&&(r=o.cb,a=o.during,d=o.isFrom,l=o.removeOpt,o=o.dataIndex),"leave"===t),g=(f||e.stopAnimation("leave"),p=t,s=o,l=f?l||{}:null,i=(g=i)&&i.getAnimationDelayParams?i.getAnimationDelayParams(e,o):null,g&&g.ecModel&&(u=(u=g.ecModel.getUpdatePayload())&&u.animation),p="update"===p,g&&g.isAnimationEnabled()?(c=h=o=void 0,c=l?(o=R(l.duration,200),h=R(l.easing,"cubicOut"),0):(o=g.getShallow(p?"animationDurationUpdate":"animationDuration"),h=g.getShallow(p?"animationEasingUpdate":"animationEasing"),g.getShallow(p?"animationDelayUpdate":"animationDelay")),D(c=u&&(null!=u.duration&&(o=u.duration),null!=u.easing&&(h=u.easing),null!=u.delay)?u.delay:c)&&(c=c(s,i)),{duration:(o=D(o)?o(s):o)||0,delay:c,easing:h}):null);g&&0<g.duration?(p={duration:g.duration,delay:g.delay||0,easing:g.easing,done:r,force:!!r||!!a,setToFinal:!f,scope:t,during:a},d?e.animateFrom(n,p):e.animateTo(n,p)):(e.stopAnimation(),d||e.attr(n),a&&a(1),r&&r())}function Nh(t,e,n,i,o,r){Rh("update",t,e,n,i,o,r)}function Eh(t,e,n,i,o,r){Rh("enter",t,e,n,i,o,r)}function zh(t){if(!t.__zr)return!0;for(var e=0;e<t.animators.length;e++)if("leave"===t.animators[e].scope)return!0;return!1}function Bh(t,e,n,i,o,r){zh(t)||Rh("leave",t,e,n,i,o,r)}function Fh(t,e,n,i){t.removeTextContent(),t.removeTextGuideLine(),Bh(t,{style:{opacity:0}},e,n,i)}function Vh(t,e,n){function i(){t.parent&&t.parent.remove(t)}t.isGroup?t.traverse(function(t){t.isGroup||Fh(t,e,n,i)}):Fh(t,e,n,i)}function Hh(t){Oh(t).oldStyle=t.style}var Wh=Math.max,Gh=Math.min,Xh={};function Uh(t){return _s.extend(t)}var Yh=function(t,e){var n,i=fu(t,e);return u(o,n=cu),o;function o(t){t=n.call(this,t)||this;return t.applyTransform=i.applyTransform,t.buildPath=i.buildPath,t}};function Zh(t,e){return Yh(t,e)}function qh(t,e){Xh[t]=e}function jh(t){if(Xh.hasOwnProperty(t))return Xh[t]}function Kh(t,e,n,i){t=new cu(fu(t,e));return n&&("center"===i&&(n=Qh(n,t.getBoundingRect())),tc(t,n)),t}function $h(t,e,n){var i=new Cs({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(t){"center"===n&&(t={width:t.width,height:t.height},i.setStyle(Qh(e,t)))}});return i}function Qh(t,e){var e=e.width/e.height,n=t.height*e,e=n<=t.width?t.height:(n=t.width)/e;return{x:t.x+t.width/2-n/2,y:t.y+t.height/2-e/2,width:n,height:e}}function Jh(t,e){for(var n=[],i=t.length,o=0;o<i;o++){var r=t[o];n.push(r.getUpdatedPathProxy(!0))}return(e=new _s(e)).createPathProxy(),e.buildPath=function(t){var e;du(t)&&(t.appendPath(n),e=t.getContext())&&t.rebuildPath(e,1)},e}function tc(t,e){t.applyTransform&&(e=t.getBoundingRect().calculateTransform(e),t.applyTransform(e))}function ec(t,e){return As(t,t,{lineWidth:e}),t}var nc=Ps;function ic(t,e){for(var n=Pe([]);t&&t!==e;)Re(n,t.getLocalTransform(),n),t=t.parent;return n}function oc(t,e,n){return e&&!st(e)&&(e=vo.getLocalTransform(e)),Jt([],t,e=n?Be([],e):e)}function rc(t,e,n){var i=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),o=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),i=oc(["left"===t?-i:"right"===t?i:0,"top"===t?-o:"bottom"===t?o:0],e,n);return Math.abs(i[0])>Math.abs(i[1])?0<i[0]?"right":"left":0<i[1]?"bottom":"top"}function ac(t){return!t.isGroup}function sc(t,e,i){var n,o;function r(t){var e={x:t.x,y:t.y,rotation:t.rotation};return null!=t.shape&&(e.shape=P({},t.shape)),e}t&&e&&(n={},t.traverse(function(t){ac(t)&&t.anid&&(n[t.anid]=t)}),o=n,e.traverse(function(t){var e,n;ac(t)&&t.anid&&(e=o[t.anid])&&(n=r(t),t.attr(r(e)),Nh(t,n,i,k(t).dataIndex))}))}function lc(t,n){return F(t,function(t){var e=t[0],e=Wh(e,n.x),t=(e=Gh(e,n.x+n.width),t[1]),t=Wh(t,n.y);return[e,Gh(t,n.y+n.height)]})}function uc(t,e){var n=Wh(t.x,e.x),i=Gh(t.x+t.width,e.x+e.width),o=Wh(t.y,e.y),t=Gh(t.y+t.height,e.y+e.height);if(n<=i&&o<=t)return{x:n,y:o,width:i-n,height:t-o}}function hc(t,e,n){var e=P({rectHover:!0},e),i=e.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(i.image=t.slice(8),B(i,n),new Cs(e)):Kh(t.replace("path://",""),e,n,"center")}function cc(t,e,n,i,o,r,a,s){var l,n=n-t,i=i-e,a=a-o,s=s-r,u=a*i-n*s;return!((l=u)<=1e-6&&-1e-6<=l||(o=((l=t-o)*i-n*(t=e-r))/u)<0||1<o||(i=(l*s-a*t)/u)<0||1<i)}function pc(t){var e=t.itemTooltipOption,n=t.componentModel,i=t.itemName,e=H(e)?{formatter:e}:e,o=n.mainType,n=n.componentIndex,r={componentType:o,name:i,$vars:["name"]},a=(r[o+"Index"]=n,t.formatterParamsExtra),t=(a&&E(ht(a),function(t){Et(r,t)||(r[t]=a[t],r.$vars.push(t))}),k(t.el));t.componentMainType=o,t.componentIndex=n,t.tooltipConfig={name:i,option:B({content:i,formatterParams:r},e)}}function dc(t,e){var n;(n=t.isGroup?e(t):n)||t.traverse(e)}function fc(t,e){if(t)if(V(t))for(var n=0;n<t.length;n++)dc(t[n],e);else dc(t,e)}qh("circle",mu),qh("ellipse",wu),qh("sector",Bu),qh("ring",Wu),qh("polygon",Zu),qh("polyline",$u),qh("rect",Es),qh("line",nh),qh("bezierCurve",lh),qh("arc",ph);var gc=Object.freeze({__proto__:null,Arc:ph,BezierCurve:lh,BoundingRect:G,Circle:mu,CompoundPath:gh,Ellipse:wu,Group:Wo,Image:Cs,IncrementalDisplayable:e,Line:nh,LinearGradient:xh,OrientedBoundingRect:Dh,Path:_s,Point:z,Polygon:Zu,Polyline:$u,RadialGradient:mh,Rect:Es,Ring:Wu,Sector:Bu,Text:Hs,applyTransform:oc,clipPointsByRect:lc,clipRectByRect:uc,createIcon:hc,extendPath:Zh,extendShape:Uh,getShapeClass:jh,getTransform:ic,groupTransition:sc,initProps:Eh,isElementRemoved:zh,lineLineIntersect:cc,linePolygonIntersect:function(t,e,n,i,o){for(var r=0,a=o[o.length-1];r<o.length;r++){var s=o[r];if(cc(t,e,n,i,s[0],s[1],a[0],a[1]))return!0;a=s}},makeImage:$h,makePath:Kh,mergePath:Jh,registerShape:qh,removeElement:Bh,removeElementWithFadeOut:Vh,resizePath:tc,setTooltipConfig:pc,subPixelOptimize:nc,subPixelOptimizeLine:ec,subPixelOptimizeRect:function(t){return Ls(t.shape,t.shape,t.style),t},transformDirection:rc,traverseElements:fc,updateProps:Nh}),yc={};function mc(t,e){for(var n=0;n<al.length;n++){var i=al[n],o=e[i],i=t.ensureState(i);i.style=i.style||{},i.style.text=o}var r=t.currentStates.slice();t.clearStates(!0),t.setStyle({text:e.normal}),t.useStates(r,!0)}function vc(t,e,n){for(var i,o=t.labelFetcher,r=t.labelDataIndex,a=t.labelDimIndex,s=e.normal,l={normal:i=null==(i=o?o.getFormattedLabel(r,"normal",null,a,s&&s.get("formatter"),null!=n?{interpolatedValue:n}:null):i)?D(t.defaultText)?t.defaultText(r,t,n):t.defaultText:i},u=0;u<al.length;u++){var h=al[u],c=e[h];l[h]=R(o?o.getFormattedLabel(r,h,null,a,c&&c.get("formatter")):null,i)}return l}function _c(t,e,n,i){n=n||yc;for(var o=t instanceof Hs,r=!1,a=0;a<sl.length;a++)if((p=e[sl[a]])&&p.getShallow("show")){r=!0;break}var s=o?t:t.getTextContent();if(r){o||(s||(s=new Hs,t.setTextContent(s)),t.stateProxy&&(s.stateProxy=t.stateProxy));var l=vc(n,e),u=e.normal,h=!!u.getShallow("show"),c=wc(u,i&&i.normal,n,!1,!o);for(c.text=l.normal,o||t.setTextConfig(bc(u,n,!1)),a=0;a<al.length;a++){var p,d,f,g=al[a];(p=e[g])&&(d=s.ensureState(g),(f=!!R(p.getShallow("show"),h))!=h&&(d.ignore=!f),d.style=wc(p,i&&i[g],n,!0,!o),d.style.text=l[g],o||(t.ensureState(g).textConfig=bc(p,n,!0)))}s.silent=!!u.getShallow("silent"),null!=s.style.x&&(c.x=s.style.x),null!=s.style.y&&(c.y=s.style.y),s.ignore=!h,s.useStyle(c),s.dirty(),n.enableTextSetter&&(Cc(s).setLabelText=function(t){t=vc(n,e,t);mc(s,t)})}else s&&(s.ignore=!0);t.dirty()}function xc(t,e){for(var n={normal:t.getModel(e=e||"label")},i=0;i<al.length;i++){var o=al[i];n[o]=t.getModel([o,e])}return n}function wc(t,e,n,i,o){var r,a={},s=a,l=t,u=n,h=i,c=o;u=u||yc;var p,t=l.ecModel,d=t&&t.option.textStyle,f=function(t){for(var e;t&&t!==t.ecModel;){var n=(t.option||yc).rich;if(n){e=e||{};for(var i=ht(n),o=0;o<i.length;o++)e[i[o]]=1}t=t.parentModel}return e}(l);if(f)for(var g in p={},f)f.hasOwnProperty(g)&&(r=l.getModel(["rich",g]),Ic(p[g]={},r,d,u,h,c,!1,!0));return p&&(s.rich=p),(t=l.get("overflow"))&&(s.overflow=t),null!=(t=l.get("minMargin"))&&(s.margin=t),Ic(s,l,d,u,h,c,!0,!1),e&&P(a,e),a}function bc(t,e,n){e=e||{};var i={},o=t.getShallow("rotate"),r=R(t.getShallow("distance"),n?null:5),a=t.getShallow("offset");return null!=(n="outside"===(n=t.getShallow("position")||(n?null:"inside"))?e.defaultOutsidePosition||"top":n)&&(i.position=n),null!=a&&(i.offset=a),null!=o&&(o*=Math.PI/180,i.rotation=o),null!=r&&(i.distance=r),i.outsideFill="inherit"===t.get("color")?e.inheritColor||null:"auto",i}var Sc=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],Mc=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],Tc=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function Ic(t,e,n,i,o,r,a,s){n=!o&&n||yc;var l=i&&i.inheritColor,u=e.getShallow("color"),h=e.getShallow("textBorderColor"),c=R(e.getShallow("opacity"),n.opacity),u=("inherit"!==u&&"auto"!==u||(u=l||null),"inherit"!==h&&"auto"!==h||(h=l||null),r||(u=u||n.color,h=h||n.textBorderColor),null!=u&&(t.fill=u),null!=h&&(t.stroke=h),R(e.getShallow("textBorderWidth"),n.textBorderWidth)),h=(null!=u&&(t.lineWidth=u),R(e.getShallow("textBorderType"),n.textBorderType)),u=(null!=h&&(t.lineDash=h),R(e.getShallow("textBorderDashOffset"),n.textBorderDashOffset));null!=u&&(t.lineDashOffset=u),null!=(c=o||null!=c||s?c:i&&i.defaultOpacity)&&(t.opacity=c),o||r||null==t.fill&&i.inheritColor&&(t.fill=i.inheritColor);for(var p=0;p<Sc.length;p++){var d=Sc[p];null!=(f=R(e.getShallow(d),n[d]))&&(t[d]=f)}for(p=0;p<Mc.length;p++)d=Mc[p],null!=(f=e.getShallow(d))&&(t[d]=f);if(null==t.verticalAlign&&null!=(h=e.getShallow("baseline"))&&(t.verticalAlign=h),!a||!i.disableBox){for(p=0;p<Tc.length;p++){var f,d=Tc[p];null!=(f=e.getShallow(d))&&(t[d]=f)}u=e.getShallow("borderType");null!=u&&(t.borderDash=u),"auto"!==t.backgroundColor&&"inherit"!==t.backgroundColor||!l||(t.backgroundColor=l),"auto"!==t.borderColor&&"inherit"!==t.borderColor||!l||(t.borderColor=l)}}var Cc=Rr();var Dc=["textStyle","color"],kc=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],Ac=new Hs,nc=(Lc.prototype.getTextColor=function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(Dc):null)},Lc.prototype.getFont=function(){return t={fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},e=(e=this.ecModel)&&e.getModel("textStyle"),Mt([t.fontStyle||e&&e.getShallow("fontStyle")||"",t.fontWeight||e&&e.getShallow("fontWeight")||"",(t.fontSize||e&&e.getShallow("fontSize")||12)+"px",t.fontFamily||e&&e.getShallow("fontFamily")||"sans-serif"].join(" "));var t,e},Lc.prototype.getTextRect=function(t){for(var e={text:t,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},n=0;n<kc.length;n++)e[kc[n]]=this.getShallow(kc[n]);return Ac.useStyle(e),Ac.update(),Ac.getBoundingRect()},Lc);function Lc(){}var Pc=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],Oc=Jr(Pc),Rc=(Nc.prototype.getLineStyle=function(t){return Oc(this,t)},Nc);function Nc(){}var Ec=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],zc=Jr(Ec),Bc=(Fc.prototype.getItemStyle=function(t,e){return zc(this,t,e)},Fc);function Fc(){}Wc.prototype.init=function(t,e,n){for(var i=3;i<arguments.length;i++)i-3,0},Wc.prototype.mergeOption=function(t,e){d(this.option,t,!0)},Wc.prototype.get=function(t,e){return null==t?this.option:this._doGet(this.parsePath(t),!e&&this.parentModel)},Wc.prototype.getShallow=function(t,e){var n=this.option,n=null==n?n:n[t];return null!=n||e||(e=this.parentModel)&&(n=e.getShallow(t)),n},Wc.prototype.getModel=function(t,e){var n=null!=t,t=n?this.parsePath(t):null;return new Wc(n?this._doGet(t):this.option,e=e||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(t)),this.ecModel)},Wc.prototype.isEmpty=function(){return null==this.option},Wc.prototype.restoreData=function(){},Wc.prototype.clone=function(){return new this.constructor(y(this.option))},Wc.prototype.parsePath=function(t){return"string"==typeof t?t.split("."):t},Wc.prototype.resolveParentPath=function(t){return t},Wc.prototype.isAnimationEnabled=function(){if(!b.node&&this.option)return null!=this.option.animation?!!this.option.animation:this.parentModel?this.parentModel.isAnimationEnabled():void 0},Wc.prototype._doGet=function(t,e){var n=this.option;if(t){for(var i=0;i<t.length&&(!t[i]||null!=(n=n&&"object"==typeof n?n[t[i]]:null));i++);null==n&&e&&(n=e._doGet(this.resolveParentPath(t),e.parentModel))}return n};var Vc,Hc=Wc;function Wc(t,e,n){this.parentModel=e,this.ecModel=n,this.option=t}Zr(Hc),op=Hc,Vc=["__\0is_clz",jr++].join("_"),op.prototype[Vc]=!0,op.isInstance=function(t){return!(!t||!t[Vc])},at(Hc,Rc),at(Hc,Bc),at(Hc,ea),at(Hc,nc);var Gc=Math.round(10*Math.random());function Xc(t){return[t||"",Gc++].join("_")}function Uc(t,e){return d(d({},t,!0),e,!0)}var Yc="ZH",Zc="EN",qc=Zc,jc={},Kc={},$c=b.domSupported&&-1<(document.documentElement.lang||navigator.language||navigator.browserLanguage||qc).toUpperCase().indexOf(Yc)?Yc:qc;function Qc(t,e){t=t.toUpperCase(),Kc[t]=new Hc(e),jc[t]=e}Qc(Zc,{time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}}),Qc(Yc,{time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}});var Jc=1e3,tp=60*Jc,ep=60*tp,np=24*ep,jr=365*np,ip={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},op="{yyyy}-{MM}-{dd}",rp={year:"{yyyy}",month:"{yyyy}-{MM}",day:op,hour:op+" "+ip.hour,minute:op+" "+ip.minute,second:op+" "+ip.second,millisecond:ip.none},ap=["year","month","day","hour","minute","second","millisecond"],sp=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function lp(t,e){return"0000".substr(0,e-(t+="").length)+t}function up(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function hp(t,e,n,i){var t=cr(t),o=t[dp(n)](),r=t[fp(n)]()+1,a=Math.floor((r-1)/3)+1,s=t[gp(n)](),l=t["get"+(n?"UTC":"")+"Day"](),u=t[yp(n)](),h=(u-1)%12+1,c=t[mp(n)](),p=t[vp(n)](),t=t[_p(n)](),n=(i instanceof Hc?i:Kc[i||$c]||Kc[qc]).getModel("time"),i=n.get("month"),d=n.get("monthAbbr"),f=n.get("dayOfWeek"),n=n.get("dayOfWeekAbbr");return(e||"").replace(/{yyyy}/g,o+"").replace(/{yy}/g,lp(o%100+"",2)).replace(/{Q}/g,a+"").replace(/{MMMM}/g,i[r-1]).replace(/{MMM}/g,d[r-1]).replace(/{MM}/g,lp(r,2)).replace(/{M}/g,r+"").replace(/{dd}/g,lp(s,2)).replace(/{d}/g,s+"").replace(/{eeee}/g,f[l]).replace(/{ee}/g,n[l]).replace(/{e}/g,l+"").replace(/{HH}/g,lp(u,2)).replace(/{H}/g,u+"").replace(/{hh}/g,lp(h+"",2)).replace(/{h}/g,h+"").replace(/{mm}/g,lp(c,2)).replace(/{m}/g,c+"").replace(/{ss}/g,lp(p,2)).replace(/{s}/g,p+"").replace(/{SSS}/g,lp(t,3)).replace(/{S}/g,t+"")}function cp(t,e){var t=cr(t),n=t[fp(e)]()+1,i=t[gp(e)](),o=t[yp(e)](),r=t[mp(e)](),a=t[vp(e)](),t=0===t[_p(e)](),e=t&&0===a,a=e&&0===r,r=a&&0===o,o=r&&1===i;return o&&1===n?"year":o?"month":r?"day":a?"hour":e?"minute":t?"second":"millisecond"}function pp(t,e,n){var i=W(t)?cr(t):t;switch(e=e||cp(t,n)){case"year":return i[dp(n)]();case"half-year":return 6<=i[fp(n)]()?1:0;case"quarter":return Math.floor((i[fp(n)]()+1)/4);case"month":return i[fp(n)]();case"day":return i[gp(n)]();case"half-day":return i[yp(n)]()/24;case"hour":return i[yp(n)]();case"minute":return i[mp(n)]();case"second":return i[vp(n)]();case"millisecond":return i[_p(n)]()}}function dp(t){return t?"getUTCFullYear":"getFullYear"}function fp(t){return t?"getUTCMonth":"getMonth"}function gp(t){return t?"getUTCDate":"getDate"}function yp(t){return t?"getUTCHours":"getHours"}function mp(t){return t?"getUTCMinutes":"getMinutes"}function vp(t){return t?"getUTCSeconds":"getSeconds"}function _p(t){return t?"getUTCMilliseconds":"getMilliseconds"}function xp(t){return t?"setUTCMonth":"setMonth"}function wp(t){return t?"setUTCDate":"setDate"}function bp(t){return t?"setUTCHours":"setHours"}function Sp(t){return t?"setUTCMinutes":"setMinutes"}function Mp(t){return t?"setUTCSeconds":"setSeconds"}function Tp(t){return t?"setUTCMilliseconds":"setMilliseconds"}function Ip(t){var e;return yr(t)?(e=(t+"").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(1<e.length?"."+e[1]:""):H(t)?t:"-"}function Cp(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()}),t=e?t&&t.charAt(0).toUpperCase()+t.slice(1):t}var Dp=bt;function kp(t,e,n){function i(t){return t&&Mt(t)?t:"-"}function o(t){return null!=t&&!isNaN(t)&&isFinite(t)}var r="time"===e,a=t instanceof Date;if(r||a){var r=r?cr(t):t;if(!isNaN(+r))return hp(r,"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}",n);if(a)return"-"}return"ordinal"===e?ct(t)?i(t):W(t)&&o(t)?t+"":"-":o(r=gr(t))?Ip(r):ct(t)?i(t):"boolean"==typeof t?t+"":"-"}function Ap(t,e){return"{"+t+(null==e?"":e)+"}"}var Lp=["a","b","c","d","e","f","g"];function Pp(t,e,n){var i=(e=V(e)?e:[e]).length;if(!i)return"";for(var o=e[0].$vars||[],r=0;r<o.length;r++){var a=Lp[r];t=t.replace(Ap(a),Ap(a,0))}for(var s=0;s<i;s++)for(var l=0;l<o.length;l++){var u=e[s][o[l]];t=t.replace(Ap(Lp[l],s),n?me(u):u)}return t}function Op(t,e){var t=H(t)?{color:t,extraCssText:e}:t||{},n=t.color,i=t.type,o=(e=t.extraCssText,t.renderMode||"html");return n?"html"===o?"subItem"===i?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+me(n)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+me(n)+";"+(e||"")+'"></span>':{renderMode:o,content:"{"+(t.markerId||"markerX")+"|}  ",style:"subItem"===i?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}:""}function Rp(t,e){return e=e||"transparent",H(t)?t:O(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}var Np=E,Ep=["left","right","top","bottom","width","height"],zp=[["width","left","right"],["height","top","bottom"]];function Bp(a,s,l,u,h){var c=0,p=0,d=(null==u&&(u=1/0),null==h&&(h=1/0),0);s.eachChild(function(t,e){var n,i,o,r=t.getBoundingRect(),e=s.childAt(e+1),e=e&&e.getBoundingRect();d="horizontal"===a?(o=r.width+(e?-e.x+r.x:0),(n=c+o)>u||t.newline?(c=0,n=o,p+=d+l,r.height):Math.max(d,r.height)):(o=r.height+(e?-e.y+r.y:0),(i=p+o)>h||t.newline?(c+=d+l,p=0,i=o,r.width):Math.max(d,r.width)),t.newline||(t.x=c,t.y=p,t.markRedraw(),"horizontal"===a?c=n+l:p=i+l)})}var Fp=Bp;function Vp(t,e,n){n=Dp(n||0);var i=e.width,o=e.height,r=er(t.left,i),a=er(t.top,o),e=er(t.right,i),s=er(t.bottom,o),l=er(t.width,i),u=er(t.height,o),h=n[2]+n[0],c=n[1]+n[3],p=t.aspect;switch(isNaN(l)&&(l=i-e-c-r),isNaN(u)&&(u=o-s-h-a),null!=p&&(isNaN(l)&&isNaN(u)&&(i/o<p?l=.8*i:u=.8*o),isNaN(l)&&(l=p*u),isNaN(u))&&(u=l/p),isNaN(r)&&(r=i-e-l-c),isNaN(a)&&(a=o-s-u-h),t.left||t.right){case"center":r=i/2-l/2-n[3];break;case"right":r=i-l-c}switch(t.top||t.bottom){case"middle":case"center":a=o/2-u/2-n[0];break;case"bottom":a=o-u-h}r=r||0,a=a||0,isNaN(l)&&(l=i-c-r-(e||0)),isNaN(u)&&(u=o-h-a-(s||0));p=new G(r+n[3],a+n[0],l,u);return p.margin=n,p}function Hp(t){t=t.layoutMode||t.constructor.layoutMode;return O(t)?t:t?{type:t}:null}function Wp(l,u,t){var h=t&&t.ignoreSize,t=(V(h)||(h=[h,h]),n(zp[0],0)),e=n(zp[1],1);function n(t,e){var n={},i=0,o={},r=0;if(Np(t,function(t){o[t]=l[t]}),Np(t,function(t){c(u,t)&&(n[t]=o[t]=u[t]),p(n,t)&&i++,p(o,t)&&r++}),h[e])p(u,t[1])?o[t[2]]=null:p(u,t[2])&&(o[t[1]]=null);else if(2!==r&&i){if(!(2<=i))for(var a=0;a<t.length;a++){var s=t[a];if(!c(n,s)&&c(l,s)){n[s]=l[s];break}}return n}return o}function c(t,e){return t.hasOwnProperty(e)}function p(t,e){return null!=t[e]&&"auto"!==t[e]}function i(t,e,n){Np(t,function(t){e[t]=n[t]})}i(zp[0],l,t),i(zp[1],l,e)}function Gp(t){return e={},(n=t)&&e&&Np(Ep,function(t){n.hasOwnProperty(t)&&(e[t]=n[t])}),e;var e,n}M(Bp,"vertical"),M(Bp,"horizontal");var Xp,Up,Yp,Zp,qp=Rr(),g=(u(jp,Xp=Hc),jp.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n)},jp.prototype.mergeDefaultAndTheme=function(t,e){var n=Hp(this),i=n?Gp(t):{};d(t,e.getTheme().get(this.mainType)),d(t,this.getDefaultOption()),n&&Wp(t,i,n)},jp.prototype.mergeOption=function(t,e){d(this.option,t,!0);var n=Hp(this);n&&Wp(this.option,t,n)},jp.prototype.optionUpdated=function(t,e){},jp.prototype.getDefaultOption=function(){var t=this.constructor;if(!(e=t)||!e[Ur])return t.defaultOption;var e=qp(this);if(!e.defaultOption){for(var n=[],i=t;i;){var o=i.prototype.defaultOption;o&&n.push(o),i=i.superClass}for(var r={},a=n.length-1;0<=a;a--)r=d(r,n[a],!0);e.defaultOption=r}return e.defaultOption},jp.prototype.getReferringComponents=function(t,e){var n=t+"Id";return Vr(this.ecModel,t,{index:this.get(t+"Index",!0),id:this.get(n,!0)},e)},jp.prototype.getBoxLayoutParams=function(){return{left:this.get("left"),top:this.get("top"),right:this.get("right"),bottom:this.get("bottom"),width:this.get("width"),height:this.get("height")}},jp.prototype.getZLevelKey=function(){return""},jp.prototype.setZLevel=function(t){this.option.zlevel=t},jp.protoInitialize=((Rc=jp.prototype).type="component",Rc.id="",Rc.name="",Rc.mainType="",Rc.subType="",void(Rc.componentIndex=0)),jp);function jp(t,e,n){t=Xp.call(this,t,e,n)||this;return t.uid=Xc("ec_cpt_model"),t}function Kp(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}qr(g,Hc),Qr(g),Zp={},(Yp=g).registerSubTypeDefaulter=function(t,e){t=Yr(t);Zp[t.main]=e},Yp.determineSubType=function(t,e){var n,i=e.type;return i||(n=Yr(t).main,Yp.hasSubTypes(t)&&Zp[n]&&(i=Zp[n](e))),i},Up=function(t){var e=[];return E(g.getClassesByMainType(t),function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])}),e=F(e,function(t){return Yr(t).main}),"dataset"!==t&&C(e,"dataset")<=0&&e.unshift("dataset"),e},g.topologicalTravel=function(t,e,n,i){if(t.length){c={},p=[],E(h=e,function(n){var e,i,o=Kp(c,n),t=(t=o.originalDeps=Up(n),e=h,i=[],E(t,function(t){0<=C(e,t)&&i.push(t)}),i);o.entryCount=t.length,0===o.entryCount&&p.push(n),E(t,function(t){C(o.predecessor,t)<0&&o.predecessor.push(t);var e=Kp(c,t);C(e.successor,t)<0&&e.successor.push(n)})});var e={graph:c,noEntryList:p},o=e.graph,r=e.noEntryList,a={};for(E(t,function(t){a[t]=!0});r.length;){var s=r.pop(),l=o[s],u=!!a[s];u&&(n.call(i,s,l.originalDeps.slice()),delete a[s]),E(l.successor,u?f:d)}E(a,function(){throw new Error("")})}var h,c,p;function d(t){o[t].entryCount--,0===o[t].entryCount&&r.push(t)}function f(t){a[t]=!0,d(t)}};var Bc="",ea=("undefined"!=typeof navigator&&(Bc=navigator.platform||""),"rgba(0, 0, 0, 0.2)"),$p={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:ea,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:ea,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:ea,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:ea,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:ea,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:ea,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:Bc.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},Qp=N(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),Jp="original",td="arrayRows",ed="objectRows",nd="keyedColumns",id="typedArray",od="unknown",rd="column",ad="row",sd={Must:1,Might:2,Not:3},ld=Rr();function ud(n,t,e){var o,i,r,a,s,l={},u=cd(t);return u&&n&&(r=[],a=[],t=t.ecModel,t=ld(t).datasetMap,u=u.uid+"_"+e.seriesLayoutBy,E(n=n.slice(),function(t,e){t=O(t)?t:n[e]={name:t};"ordinal"===t.type&&null==o&&(o=e,i=c(t)),l[t.name]=[]}),s=t.get(u)||t.set(u,{categoryWayDim:i,valueWayDim:0}),E(n,function(t,e){var n,i=t.name,t=c(t);null==o?(n=s.valueWayDim,h(l[i],n,t),h(a,n,t),s.valueWayDim+=t):o===e?(h(l[i],0,t),h(r,0,t)):(n=s.categoryWayDim,h(l[i],n,t),h(a,n,t),s.categoryWayDim+=t)}),r.length&&(l.itemName=r),a.length)&&(l.seriesName=a),l;function h(t,e,n){for(var i=0;i<n;i++)t.push(e+i)}function c(t){t=t.dimsDef;return t?t.length:1}}function hd(t,l,u){var h,c,p,e={};return cd(t)&&(c=l.sourceFormat,p=l.dimensionsDefine,c!==ed&&c!==nd||E(p,function(t,e){"name"===(O(t)?t.name:t)&&(h=e)}),t=function(){for(var t={},e={},n=[],i=0,o=Math.min(5,u);i<o;i++){var r=dd(l.data,c,l.seriesLayoutBy,p,l.startIndex,i),a=(n.push(r),r===sd.Not);if(a&&null==t.v&&i!==h&&(t.v=i),null!=t.n&&t.n!==t.v&&(a||n[t.n]!==sd.Not)||(t.n=i),s(t)&&n[t.n]!==sd.Not)return t;a||(r===sd.Might&&null==e.v&&i!==h&&(e.v=i),null!=e.n&&e.n!==e.v)||(e.n=i)}function s(t){return null!=t.v&&null!=t.n}return s(t)?t:s(e)?e:null}())&&(e.value=[t.v],t=null!=h?h:t.n,e.itemName=[t],e.seriesName=[t]),e}function cd(t){if(!t.get("data",!0))return Vr(t.ecModel,"dataset",{index:t.get("datasetIndex",!0),id:t.get("datasetId",!0)},Br).models[0]}function pd(t,e){return dd(t.data,t.sourceFormat,t.seriesLayoutBy,t.dimensionsDefine,t.startIndex,e)}function dd(t,e,n,i,o,r){var a,s,l;if(!dt(t)){if(i&&(O(i=i[r])?(s=i.name,l=i.type):H(i)&&(s=i)),null!=l)return"ordinal"===l?sd.Must:sd.Not;if(e===td){var u=t;if(n===ad){for(var h=u[r],c=0;c<(h||[]).length&&c<5;c++)if(null!=(a=m(h[o+c])))return a}else for(c=0;c<u.length&&c<5;c++){var p=u[o+c];if(p&&null!=(a=m(p[r])))return a}}else if(e===ed){var d=t;if(!s)return sd.Not;for(c=0;c<d.length&&c<5;c++)if((g=d[c])&&null!=(a=m(g[s])))return a}else if(e===nd){if(!s)return sd.Not;if(!(h=t[s])||dt(h))return sd.Not;for(c=0;c<h.length&&c<5;c++)if(null!=(a=m(h[c])))return a}else if(e===Jp)for(var f=t,c=0;c<f.length&&c<5;c++){var g=f[c],y=Tr(g);if(!V(y))return sd.Not;if(null!=(a=m(y[r])))return a}}return sd.Not;function m(t){var e=H(t);return null!=t&&isFinite(t)&&""!==t?e?sd.Might:sd.Not:e&&"-"!==t?sd.Must:void 0}}var fd=N();var gd=Rr(),yd=(Rr(),md.prototype.getColorFromPalette=function(t,e,n){var i=br(this.get("color",!0)),o=this.get("colorLayer",!0),r=this,a=gd;return a=a(e=e||r),r=a.paletteIdx||0,(e=a.paletteNameMap=a.paletteNameMap||{}).hasOwnProperty(t)?e[t]:(o=(o=null!=n&&o?function(t,e){for(var n=t.length,i=0;i<n;i++)if(t[i].length>e)return t[i];return t[n-1]}(o,n):i)||i)&&o.length?(n=o[r],t&&(e[t]=n),a.paletteIdx=(r+1)%o.length,n):void 0},md.prototype.clearColorPalette=function(){var t,e;(e=gd)(t=this).paletteIdx=0,e(t).paletteNameMap={}},md);function md(){}var vd,_d,xd,wd,bd="\0_ec_inner",Sd=(u(r,wd=Hc),r.prototype.init=function(t,e,n,i,o,r){i=i||{},this.option=null,this._theme=new Hc(i),this._locale=new Hc(o),this._optionManager=r},r.prototype.setOption=function(t,e,n){e=Id(e);this._optionManager.setOption(t,n,e),this._resetOption(null,e)},r.prototype.resetOption=function(t,e){return this._resetOption(t,Id(e))},r.prototype._resetOption=function(t,e){var n,i=!1,o=this._optionManager;return t&&"recreate"!==t||(n=o.mountOption("recreate"===t),this.option&&"recreate"!==t?(this.restoreData(),this._mergeOption(n,e)):xd(this,n),i=!0),"timeline"!==t&&"media"!==t||this.restoreData(),t&&"recreate"!==t&&"timeline"!==t||(n=o.getTimelineOption(this))&&(i=!0,this._mergeOption(n,e)),t&&"recreate"!==t&&"media"!==t||(n=o.getMediaOption(this)).length&&E(n,function(t){i=!0,this._mergeOption(t,e)},this),i},r.prototype.mergeOption=function(t){this._mergeOption(t,null)},r.prototype._mergeOption=function(i,t){var o=this.option,h=this._componentsMap,c=this._componentsCount,n=[],r=N(),p=t&&t.replaceMergeMainTypeMap;ld(this).datasetMap=N(),E(i,function(t,e){null!=t&&(g.hasClass(e)?e&&(n.push(e),r.set(e,!0)):o[e]=null==o[e]?y(t):d(o[e],t,!0))}),p&&p.each(function(t,e){g.hasClass(e)&&!r.get(e)&&(n.push(e),r.set(e,!0))}),g.topologicalTravel(n,g.getAllClassMainTypes(),function(r){t=this,n=br(i[e=r]);var t=(e=(e=fd.get(e))&&e(t))?n.concat(e):n,e=h.get(r),n=Ir(e,t,e?p&&p.get(r)?"replaceMerge":"normalMerge":"replaceAll");Pr(n,r,g),o[r]=null,h.set(r,null),c.set(r,0);var a,s=[],l=[],u=0;E(n,function(t,e){var n=t.existing,i=t.newOption;if(i){var o=g.getClass(r,t.keyInfo.subType,!("series"===r));if(!o)return;if("tooltip"===r){if(a)return;a=!0}n&&n.constructor===o?(n.name=t.keyInfo.name,n.mergeOption(i,this),n.optionUpdated(i,!1)):(e=P({componentIndex:e},t.keyInfo),P(n=new o(i,this,this,e),e),t.brandNew&&(n.__requireNewView=!0),n.init(i,this,this),n.optionUpdated(null,!0))}else n&&(n.mergeOption({},this),n.optionUpdated({},!1));n?(s.push(n.option),l.push(n),u++):(s.push(void 0),l.push(void 0))},this),o[r]=s,h.set(r,l),c.set(r,u),"series"===r&&vd(this)},this),this._seriesIndices||vd(this)},r.prototype.getOption=function(){var a=y(this.option);return E(a,function(t,e){if(g.hasClass(e)){for(var n=br(t),i=n.length,o=!1,r=i-1;0<=r;r--)n[r]&&!Lr(n[r])?o=!0:(n[r]=null,o||i--);n.length=i,a[e]=n}}),delete a[bd],a},r.prototype.getTheme=function(){return this._theme},r.prototype.getLocaleModel=function(){return this._locale},r.prototype.setUpdatePayload=function(t){this._payload=t},r.prototype.getUpdatePayload=function(){return this._payload},r.prototype.getComponent=function(t,e){var n=this._componentsMap.get(t);if(n){t=n[e||0];if(t)return t;if(null==e)for(var i=0;i<n.length;i++)if(n[i])return n[i]}},r.prototype.queryComponents=function(t){var e,n,i,o,r,a=t.mainType;return a&&(n=t.index,i=t.id,o=t.name,r=this._componentsMap.get(a))&&r.length?(null!=n?(e=[],E(br(n),function(t){r[t]&&e.push(r[t])})):e=null!=i?Md("id",i,r):null!=o?Md("name",o,r):ut(r,function(t){return!!t}),Td(e,t)):[]},r.prototype.findComponents=function(t){var e,n=t.query,i=t.mainType,o=(o=i+"Index",r=i+"Id",e=i+"Name",!n||null==n[o]&&null==n[r]&&null==n[e]?null:{mainType:i,index:n[o],id:n[r],name:n[e]}),r=Td(o?this.queryComponents(o):ut(this._componentsMap.get(i),function(t){return!!t}),t);return t.filter?ut(r,t.filter):r},r.prototype.eachComponent=function(t,e,n){var i=this._componentsMap;if(D(t)){var o=e,r=t;i.each(function(t,e){for(var n=0;t&&n<t.length;n++){var i=t[n];i&&r.call(o,e,i,i.componentIndex)}})}else for(var a=H(t)?i.get(t):O(t)?this.findComponents(t):null,s=0;a&&s<a.length;s++){var l=a[s];l&&e.call(n,l,l.componentIndex)}},r.prototype.getSeriesByName=function(t){var e=kr(t,null);return ut(this._componentsMap.get("series"),function(t){return!!t&&null!=e&&t.name===e})},r.prototype.getSeriesByIndex=function(t){return this._componentsMap.get("series")[t]},r.prototype.getSeriesByType=function(e){return ut(this._componentsMap.get("series"),function(t){return!!t&&t.subType===e})},r.prototype.getSeries=function(){return ut(this._componentsMap.get("series"),function(t){return!!t})},r.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},r.prototype.eachSeries=function(n,i){_d(this),E(this._seriesIndices,function(t){var e=this._componentsMap.get("series")[t];n.call(i,e,t)},this)},r.prototype.eachRawSeries=function(e,n){E(this._componentsMap.get("series"),function(t){t&&e.call(n,t,t.componentIndex)})},r.prototype.eachSeriesByType=function(n,i,o){_d(this),E(this._seriesIndices,function(t){var e=this._componentsMap.get("series")[t];e.subType===n&&i.call(o,e,t)},this)},r.prototype.eachRawSeriesByType=function(t,e,n){return E(this.getSeriesByType(t),e,n)},r.prototype.isSeriesFiltered=function(t){return _d(this),null==this._seriesIndicesMap.get(t.componentIndex)},r.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},r.prototype.filterSeries=function(n,i){_d(this);var o=[];E(this._seriesIndices,function(t){var e=this._componentsMap.get("series")[t];n.call(i,e,t)&&o.push(t)},this),this._seriesIndices=o,this._seriesIndicesMap=N(o)},r.prototype.restoreData=function(n){vd(this);var t=this._componentsMap,i=[];t.each(function(t,e){g.hasClass(e)&&i.push(e)}),g.topologicalTravel(i,g.getAllClassMainTypes(),function(e){E(t.get(e),function(t){!t||"series"===e&&function(t,e){{var n,i;if(e)return n=e.seriesIndex,i=e.seriesId,e=e.seriesName,null!=n&&t.componentIndex!==n||null!=i&&t.id!==i||null!=e&&t.name!==e}}(t,n)||t.restoreData()})})},r.internalField=(vd=function(t){var e=t._seriesIndices=[];E(t._componentsMap.get("series"),function(t){t&&e.push(t.componentIndex)}),t._seriesIndicesMap=N(e)},_d=function(t){},void(xd=function(t,e){t.option={},t.option[bd]=1,t._componentsMap=N({series:[]}),t._componentsCount=N();var n,i,o=e.aria;O(o)&&null==o.enabled&&(o.enabled=!0),n=e,o=t._theme.option,i=n.color&&!n.colorLayer,E(o,function(t,e){"colorLayer"===e&&i||g.hasClass(e)||("object"==typeof t?n[e]=n[e]?d(n[e],t,!1):y(t):null==n[e]&&(n[e]=t))}),d(e,$p,!1),t._mergeOption(e,null)})),r);function r(){return null!==wd&&wd.apply(this,arguments)||this}function Md(e,t,n){var i,o;return V(t)?(i=N(),E(t,function(t){null!=t&&null!=kr(t,null)&&i.set(t,!0)}),ut(n,function(t){return t&&i.get(t[e])})):(o=kr(t,null),ut(n,function(t){return t&&null!=o&&t[e]===o}))}function Td(t,e){return e.hasOwnProperty("subType")?ut(t,function(t){return t&&t.subType===e.subType}):t}function Id(t){var e=N();return t&&E(br(t.replaceMerge),function(t){e.set(t,!0)}),{replaceMergeMainTypeMap:e}}at(Sd,yd);function Cd(e){E(Dd,function(t){this[t]=S(e[t],e)},this)}var Dd=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],kd={},Ad=(Ld.prototype.create=function(n,i){var o=[];E(kd,function(t,e){t=t.create(n,i);o=o.concat(t||[])}),this._coordinateSystems=o},Ld.prototype.update=function(e,n){E(this._coordinateSystems,function(t){t.update&&t.update(e,n)})},Ld.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},Ld.register=function(t,e){kd[t]=e},Ld.get=function(t){return kd[t]},Ld);function Ld(){this._coordinateSystems=[]}var Pd=/^(min|max)?(.+)$/,Od=(Rd.prototype.setOption=function(t,e,n){t&&(E(br(t.series),function(t){t&&t.data&&dt(t.data)&&It(t.data)}),E(br(t.dataset),function(t){t&&t.source&&dt(t.source)&&It(t.source)})),t=y(t);var i,o,r,a,s,l,u,h,c,p,d=this._optionBackup,t=(i=e,o=!d,s=[],t=(e=t).baseOption,l=e.timeline,u=e.options,h=e.media,c=!!e.media,p=!!(u||l||t&&t.timeline),t?(a=t).timeline||(a.timeline=l):((p||c)&&(e.options=e.media=null),a=e),c&&V(h)&&E(h,function(t){t&&t.option&&(t.query?s.push(t):r=r||t)}),f(a),E(u,f),E(s,function(t){return f(t.option)}),{baseOption:a,timelineOptions:u||[],mediaDefault:r,mediaList:s});function f(e){E(i,function(t){t(e,o)})}this._newBaseOption=t.baseOption,d?(t.timelineOptions.length&&(d.timelineOptions=t.timelineOptions),t.mediaList.length&&(d.mediaList=t.mediaList),t.mediaDefault&&(d.mediaDefault=t.mediaDefault)):this._optionBackup=t},Rd.prototype.mountOption=function(t){var e=this._optionBackup;return this._timelineOptions=e.timelineOptions,this._mediaList=e.mediaList,this._mediaDefault=e.mediaDefault,this._currentMediaIndices=[],y(t?e.baseOption:this._newBaseOption)},Rd.prototype.getTimelineOption=function(t){var e,n=this._timelineOptions;return e=n.length&&(t=t.getComponent("timeline"))?y(n[t.getCurrentIndex()]):e},Rd.prototype.getMediaOption=function(t){var e,n,i=this._api.getWidth(),o=this._api.getHeight(),r=this._mediaList,a=this._mediaDefault,s=[],l=[];if(r.length||a){for(var u=0,h=r.length;u<h;u++)!function(t,e,n){var i={width:e,height:n,aspectratio:e/n},o=!0;return E(t,function(t,e){var n,e=e.match(Pd);e&&e[1]&&e[2]&&(n=e[1],e=e[2].toLowerCase(),e=i[e],t=t,("min"===(n=n)?t<=e:"max"===n?e<=t:e===t)||(o=!1))}),o}(r[u].query,i,o)||s.push(u);(s=!s.length&&a?[-1]:s).length&&(e=s,n=this._currentMediaIndices,e.join(",")!==n.join(","))&&(l=F(s,function(t){return y((-1===t?a:r[t]).option)})),this._currentMediaIndices=s}return l},Rd);function Rd(t){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=t}var Nd=E,Ed=O,zd=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Bd(t){var e=t&&t.itemStyle;if(e)for(var n=0,i=zd.length;n<i;n++){var o=zd[n],r=e.normal,a=e.emphasis;r&&r[o]&&(t[o]=t[o]||{},t[o].normal?d(t[o].normal,r[o]):t[o].normal=r[o],r[o]=null),a&&a[o]&&(t[o]=t[o]||{},t[o].emphasis?d(t[o].emphasis,a[o]):t[o].emphasis=a[o],a[o]=null)}}function Fd(t,e,n){var i,o;t&&t[e]&&(t[e].normal||t[e].emphasis)&&(i=t[e].normal,o=t[e].emphasis,i&&(n?(t[e].normal=t[e].emphasis=null,B(t[e],i)):t[e]=i),o)&&(t.emphasis=t.emphasis||{},(t.emphasis[e]=o).focus&&(t.emphasis.focus=o.focus),o.blurScope)&&(t.emphasis.blurScope=o.blurScope)}function Vd(t){Fd(t,"itemStyle"),Fd(t,"lineStyle"),Fd(t,"areaStyle"),Fd(t,"label"),Fd(t,"labelLine"),Fd(t,"upperLabel"),Fd(t,"edgeLabel")}function Hd(t,e){var n=Ed(t)&&t[e],i=Ed(n)&&n.textStyle;if(i)for(var o=0,r=Mr.length;o<r;o++){var a=Mr[o];i.hasOwnProperty(a)&&(n[a]=i[a])}}function Wd(t){t&&(Vd(t),Hd(t,"label"),t.emphasis)&&Hd(t.emphasis,"label")}function Gd(t){return V(t)?t:t?[t]:[]}function Xd(t){return(V(t)?t[0]:t)||{}}function Ud(e,t){Nd(Gd(e.series),function(t){if(Ed(t))if(Ed(t)){Bd(t),Vd(t),Hd(t,"label"),Hd(t,"upperLabel"),Hd(t,"edgeLabel"),t.emphasis&&(Hd(t.emphasis,"label"),Hd(t.emphasis,"upperLabel"),Hd(t.emphasis,"edgeLabel"));var e=t.markPoint,n=(e&&(Bd(e),Wd(e)),t.markLine),i=(n&&(Bd(n),Wd(n)),t.markArea),o=(i&&Wd(i),t.data);if("graph"===t.type){var o=o||t.nodes,r=t.links||t.edges;if(r&&!dt(r))for(var a=0;a<r.length;a++)Wd(r[a]);E(t.categories,function(t){Vd(t)})}if(o&&!dt(o))for(a=0;a<o.length;a++)Wd(o[a]);if((e=t.markPoint)&&e.data)for(var s=e.data,a=0;a<s.length;a++)Wd(s[a]);if((n=t.markLine)&&n.data){var l=n.data;for(a=0;a<l.length;a++)V(l[a])?(Wd(l[a][0]),Wd(l[a][1])):Wd(l[a])}"gauge"===t.type?(Hd(t,"axisLabel"),Hd(t,"title"),Hd(t,"detail")):"treemap"===t.type?(Fd(t.breadcrumb,"itemStyle"),E(t.levels,function(t){Vd(t)})):"tree"===t.type&&Vd(t.leaves)}});var n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),Nd(n,function(t){Nd(Gd(e[t]),function(t){t&&(Hd(t,"axisLabel"),Hd(t.axisPointer,"label"))})}),Nd(Gd(e.parallel),function(t){t=t&&t.parallelAxisDefault;Hd(t,"axisLabel"),Hd(t&&t.axisPointer,"label")}),Nd(Gd(e.calendar),function(t){Fd(t,"itemStyle"),Hd(t,"dayLabel"),Hd(t,"monthLabel"),Hd(t,"yearLabel")}),Nd(Gd(e.radar),function(t){Hd(t,"name"),t.name&&null==t.axisName&&(t.axisName=t.name,delete t.name),null!=t.nameGap&&null==t.axisNameGap&&(t.axisNameGap=t.nameGap,delete t.nameGap)}),Nd(Gd(e.geo),function(t){Ed(t)&&(Wd(t),Nd(Gd(t.regions),function(t){Wd(t)}))}),Nd(Gd(e.timeline),function(t){Wd(t),Fd(t,"label"),Fd(t,"itemStyle"),Fd(t,"controlStyle",!0);t=t.data;V(t)&&E(t,function(t){O(t)&&(Fd(t,"label"),Fd(t,"itemStyle"))})}),Nd(Gd(e.toolbox),function(t){Fd(t,"iconStyle"),Nd(t.feature,function(t){Fd(t,"iconStyle")})}),Hd(Xd(e.axisPointer),"label"),Hd(Xd(e.tooltip).axisPointer,"label")}function Yd(e){e&&E(Zd,function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])})}var Zd=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],qd=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],jd=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function Kd(t){var e=t&&t.itemStyle;if(e)for(var n=0;n<jd.length;n++){var i=jd[n][1],o=jd[n][0];null!=e[i]&&(e[o]=e[i])}}function $d(t){t&&"edge"===t.alignTo&&null!=t.margin&&null==t.edgeDistance&&(t.edgeDistance=t.margin)}function Qd(t){t&&t.downplay&&!t.blur&&(t.blur=t.downplay)}function Jd(e,t){Ud(e,t),e.series=br(e.series),E(e.series,function(t){if(O(t)){var e,n=t.type;if("line"===n)null!=t.clipOverflow&&(t.clip=t.clipOverflow);else if("pie"===n||"gauge"===n){if(null!=t.clockWise&&(t.clockwise=t.clockWise),$d(t.label),(e=t.data)&&!dt(e))for(var i=0;i<e.length;i++)$d(e[i]);null!=t.hoverOffset&&(t.emphasis=t.emphasis||{},t.emphasis.scaleSize=null)&&(t.emphasis.scaleSize=t.hoverOffset)}else if("gauge"===n){var o=function(t,e){for(var n=e.split(","),i=t,o=0;o<n.length&&null!=(i=i&&i[n[o]]);o++);return i}(t,"pointer.color");if(null!=o){var r=t;var a="itemStyle.color";var s=void 0;for(var l,u=a.split(","),h=r,c=0;c<u.length-1;c++)null==h[l=u[c]]&&(h[l]={}),h=h[l];!s&&null!=h[u[c]]||(h[u[c]]=o)}}else if("bar"===n){if(Kd(t),Kd(t.backgroundStyle),Kd(t.emphasis),(e=t.data)&&!dt(e))for(i=0;i<e.length;i++)"object"==typeof e[i]&&(Kd(e[i]),Kd(e[i]&&e[i].emphasis))}else"sunburst"===n?((a=t.highlightPolicy)&&(t.emphasis=t.emphasis||{},t.emphasis.focus||(t.emphasis.focus=a)),Qd(t),function t(e,n){if(e)for(var i=0;i<e.length;i++)n(e[i]),e[i]&&t(e[i].children,n)}(t.data,Qd)):"graph"===n||"sankey"===n?(r=t)&&null!=r.focusNodeAdjacency&&(r.emphasis=r.emphasis||{},null==r.emphasis.focus)&&(r.emphasis.focus="adjacency"):"map"===n&&(t.mapType&&!t.map&&(t.map=t.mapType),t.mapLocation)&&B(t,t.mapLocation);null!=t.hoverAnimation&&(t.emphasis=t.emphasis||{},t.emphasis)&&null==t.emphasis.scale&&(t.emphasis.scale=t.hoverAnimation),Yd(t)}}),e.dataRange&&(e.visualMap=e.dataRange),E(qd,function(t){t=e[t];t&&E(t=V(t)?t:[t],function(t){Yd(t)})})}function tf(_){E(_,function(p,d){var f=[],g=[NaN,NaN],t=[p.stackResultDimension,p.stackedOverDimension],y=p.data,m=p.isStackedByIndex,v=p.seriesModel.get("stackStrategy")||"samesign";y.modify(t,function(t,e,n){var i,o,r=y.get(p.stackedDimension,n);if(isNaN(r))return g;m?o=y.getRawIndex(n):i=y.get(p.stackedByDimension,n);for(var a,s,l,u=NaN,h=d-1;0<=h;h--){var c=_[h];if(0<=(o=m?o:c.data.rawIndexOf(c.stackedByDimension,i))){c=c.data.getByRawIndex(c.stackResultDimension,o);if("all"===v||"positive"===v&&0<c||"negative"===v&&c<0||"samesign"===v&&0<=r&&0<c||"samesign"===v&&r<=0&&c<0){a=r,s=c,l=void 0,l=Math.max(or(a),or(s)),a+=s,r=Jo<l?a:nr(a,l),u=c;break}}}return f[0]=r,f[1]=u,f})})}var ef,nf,of=function(t){this.data=t.data||(t.sourceFormat===nd?{}:[]),this.sourceFormat=t.sourceFormat||od,this.seriesLayoutBy=t.seriesLayoutBy||rd,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var e=this.dimensionsDefine=t.dimensionsDefine;if(e)for(var n=0;n<e.length;n++){var i=e[n];null==i.type&&pd(this,n)===sd.Must&&(i.type="ordinal")}};function rf(t){return t instanceof of}function af(t,e,n){n=n||lf(t);var i=e.seriesLayoutBy,o=function(t,e,n,i,o){var r,a;if(!t)return{dimensionsDefine:uf(o),startIndex:a,dimensionsDetectedCount:r};{var s;e===td?(s=t,"auto"===i||null==i?hf(function(t){null!=t&&"-"!==t&&(H(t)?null==a&&(a=1):a=0)},n,s,10):a=W(i)?i:i?1:0,o||1!==a||(o=[],hf(function(t,e){o[e]=null!=t?t+"":""},n,s,1/0)),r=o?o.length:n===ad?s.length:s[0]?s[0].length:null):e===ed?o=o||function(t){for(var e,n=0;n<t.length&&!(e=t[n++]););if(e)return ht(e)}(t):e===nd?o||(o=[],E(t,function(t,e){o.push(e)})):e===Jp&&(i=Tr(t[0]),r=V(i)&&i.length||1)}return{startIndex:a,dimensionsDefine:uf(o),dimensionsDetectedCount:r}}(t,n,i,e.sourceHeader,e.dimensions);return new of({data:t,sourceFormat:n,seriesLayoutBy:i,dimensionsDefine:o.dimensionsDefine,startIndex:o.startIndex,dimensionsDetectedCount:o.dimensionsDetectedCount,metaRawOption:y(e)})}function sf(t){return new of({data:t,sourceFormat:dt(t)?id:Jp})}function lf(t){var e=od;if(dt(t))e=id;else if(V(t)){0===t.length&&(e=td);for(var n=0,i=t.length;n<i;n++){var o=t[n];if(null!=o){if(V(o)||dt(o)){e=td;break}if(O(o)){e=ed;break}}}}else if(O(t))for(var r in t)if(Et(t,r)&&st(t[r])){e=nd;break}return e}function uf(t){var i;if(t)return i=N(),F(t,function(t,e){var n,t={name:(t=O(t)?t:{name:t}).name,displayName:t.displayName,type:t.type};return null!=t.name&&(t.name+="",null==t.displayName&&(t.displayName=t.name),(n=i.get(t.name))?t.name+="-"+n.count++:i.set(t.name,{count:1})),t})}function hf(t,e,n,i){if(e===ad)for(var o=0;o<n.length&&o<i;o++)t(n[o]?n[o][0]:null,o);else for(var r=n[0]||[],o=0;o<r.length&&o<i;o++)t(r[o],o)}function cf(t){t=t.sourceFormat;return t===ed||t===nd}yf.prototype.getSource=function(){return this._source},yf.prototype.count=function(){return 0},yf.prototype.getItem=function(t,e){},yf.prototype.appendData=function(t){},yf.prototype.clean=function(){},yf.protoInitialize=((nc=yf.prototype).pure=!1,void(nc.persistent=!0)),yf.internalField=(nf=function(t,e,n){var i,o=n.sourceFormat,r=n.seriesLayoutBy,a=n.startIndex,n=n.dimensionsDefine;P(t,ef[Cf(o,r)]),o===id?(t.getItem=pf,t.count=ff,t.fillStorage=df):(i=xf(o,r),t.getItem=S(i,null,e,a,n),i=Sf(o,r),t.count=S(i,null,e,a,n))},pf=function(t,e){t-=this._offset,e=e||[];for(var n=this._data,i=this._dimSize,o=i*t,r=0;r<i;r++)e[r]=n[o+r];return e},df=function(t,e,n,i){for(var o=this._data,r=this._dimSize,a=0;a<r;a++){for(var s=i[a],l=null==s[0]?1/0:s[0],u=null==s[1]?-1/0:s[1],h=e-t,c=n[a],p=0;p<h;p++){var d=o[p*r+a];(c[t+p]=d)<l&&(l=d),u<d&&(u=d)}s[0]=l,s[1]=u}},ff=function(){return this._data?this._data.length/this._dimSize:0},(nc={})[td+"_"+rd]={pure:!0,appendData:mf},nc[td+"_"+ad]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},nc[ed]={pure:!0,appendData:mf},nc[nd]={pure:!0,appendData:function(t){var o=this._data;E(t,function(t,e){for(var n=o[e]||(o[e]=[]),i=0;i<(t||[]).length;i++)n.push(t[i])})}},nc[Jp]={appendData:mf},nc[id]={persistent:!1,pure:!0,appendData:function(t){this._data=t},clean:function(){this._offset+=this.count(),this._data=null}},void(ef=nc));var pf,df,ff,gf=yf;function yf(t,e){var t=rf(t)?t:sf(t),n=(this._source=t,this._data=t.data);t.sourceFormat===id&&(this._offset=0,this._dimSize=e,this._data=n),nf(this,n,t)}function mf(t){for(var e=0;e<t.length;e++)this._data.push(t[e])}function vf(t,e,n,i){return t[i]}(op={})[td+"_"+rd]=function(t,e,n,i){return t[i+e]},op[td+"_"+ad]=function(t,e,n,i,o){i+=e;for(var r=o||[],a=t,s=0;s<a.length;s++){var l=a[s];r[s]=l?l[i]:null}return r},op[ed]=vf,op[nd]=function(t,e,n,i,o){for(var r=o||[],a=0;a<n.length;a++){var s=t[n[a].name];r[a]=s?s[i]:null}return r},op[Jp]=vf;var _f=op;function xf(t,e){return _f[Cf(t,e)]}function wf(t,e,n){return t.length}(Rc={})[td+"_"+rd]=function(t,e,n){return Math.max(0,t.length-e)},Rc[td+"_"+ad]=function(t,e,n){t=t[0];return t?Math.max(0,t.length-e):0},Rc[ed]=wf,Rc[nd]=function(t,e,n){t=t[n[0].name];return t?t.length:0},Rc[Jp]=wf;var bf=Rc;function Sf(t,e){return bf[Cf(t,e)]}function Mf(t,e,n){return t[e]}(ea={})[td]=Mf,ea[ed]=function(t,e,n){return t[n]},ea[nd]=Mf,ea[Jp]=function(t,e,n){t=Tr(t);return t instanceof Array?t[e]:t},ea[id]=Mf;var Tf=ea;function If(t){return Tf[t]}function Cf(t,e){return t===td?t+"_"+e:t}function Df(t,e,n){if(t){var i,o,e=t.getRawDataItem(e);if(null!=e)return i=(o=t.getStore()).getSource().sourceFormat,null!=n?(t=t.getDimensionIndex(n),n=o.getDimensionProperty(t),If(i)(e,t,n)):(o=e,i===Jp?Tr(e):o)}}var kf=/\{@(.+?)\}/g,Bc=(Af.prototype.getDataParams=function(t,e){var n=this.getData(e),i=this.getRawValue(t,e),o=n.getRawIndex(t),r=n.getName(t),a=n.getRawDataItem(t),s=n.getItemVisual(t,"style"),t=s&&s[n.getItemVisual(t,"drawType")||"fill"],s=s&&s.stroke,l=this.mainType,u="series"===l,n=n.userOutput&&n.userOutput.get();return{componentType:l,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:u?this.subType:null,seriesIndex:this.seriesIndex,seriesId:u?this.id:null,seriesName:u?this.name:null,name:r,dataIndex:o,data:a,dataType:e,value:i,color:t,borderColor:s,dimensionNames:n?n.fullDimensions:null,encode:n?n.encode:null,$vars:["seriesName","name","value"]}},Af.prototype.getFormattedLabel=function(i,t,e,n,o,r){t=t||"normal";var a=this.getData(e),e=this.getDataParams(i,e);return r&&(e.value=r.interpolatedValue),null!=n&&V(e.value)&&(e.value=e.value[n]),D(o=o||a.getItemModel(i).get("normal"===t?["label","formatter"]:[t,"label","formatter"]))?(e.status=t,e.dimensionIndex=n,o(e)):H(o)?Pp(o,e).replace(kf,function(t,e){var n=e.length,n=("["===e.charAt(0)&&"]"===e.charAt(n-1)&&(e=+e.slice(1,n-1)),Df(a,i,e));return null!=(n=r&&V(r.interpolatedValue)&&0<=(e=a.getDimensionIndex(e))?r.interpolatedValue[e]:n)?n+"":""}):void 0},Af.prototype.getRawValue=function(t,e){return Df(this.getData(e),t)},Af.prototype.formatTooltip=function(t,e,n){},Af);function Af(){}function Lf(t){var e,n;return O(t)?t.type&&(n=t):e=t,{text:e,frag:n}}function Pf(t){return new Of(t)}Rf.prototype.perform=function(t){var e,n=this._upstream,i=t&&t.skip;this._dirty&&n&&((r=this.context).data=r.outputData=n.context.outputData),this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!i&&(e=this._plan(this.context));var o,r=u(this._modBy),a=this._modDataCount||0,s=u(t&&t.modBy),l=t&&t.modDataCount||0;function u(t){return t=1<=t?t:1}r===s&&a===l||(e="reset"),!this._dirty&&"reset"!==e||(this._dirty=!1,o=this._doReset(i)),this._modBy=s,this._modDataCount=l;r=t&&t.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var h=this._dueIndex,c=Math.min(null!=r?this._dueIndex+r:1/0,this._dueEnd);if(!i&&(o||h<c)){var p=this._progress;if(V(p))for(var d=0;d<p.length;d++)this._doProgress(p[d],h,c,s,l);else this._doProgress(p,h,c,s,l)}this._dueIndex=c;a=null!=this._settedOutputEnd?this._settedOutputEnd:c;this._outputDueEnd=a}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()},Rf.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},Rf.prototype._doProgress=function(t,e,n,i,o){Hf.reset(e,n,i,o),this._callingProgress=t,this._callingProgress({start:e,end:n,count:n-e,next:Hf.next},this.context)},Rf.prototype._doReset=function(t){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null,!t&&this._reset&&((e=this._reset(this.context))&&e.progress&&(n=e.forceFirstProgress,e=e.progress),V(e))&&!e.length&&(e=null),this._progress=e,this._modBy=this._modDataCount=null;var e,n,t=this._downstream;return t&&t.dirty(),n},Rf.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},Rf.prototype.pipe=function(t){this._downstream===t&&!this._dirty||((this._downstream=t)._upstream=this,t.dirty())},Rf.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},Rf.prototype.getUpstream=function(){return this._upstream},Rf.prototype.getDownstream=function(){return this._downstream},Rf.prototype.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t};var Of=Rf;function Rf(t){this._reset=(t=t||{}).reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}var Nf,Ef,zf,Bf,Ff,Vf,Hf=Vf={reset:function(t,e,n,i){Ef=t,Nf=e,zf=n,Bf=i,Ff=Math.ceil(Bf/zf),Vf.next=1<zf&&0<Bf?Gf:Wf}};function Wf(){return Ef<Nf?Ef++:null}function Gf(){var t=Ef%Ff*zf+Math.ceil(Ef/Ff),t=Nf<=Ef?null:t<Bf?t:Ef;return Ef++,t}function Xf(t,e){e=e&&e.type;return"ordinal"===e?t:null==(t="time"!==e||W(t)||null==t||"-"===t?t:+cr(t))||""===t?NaN:+t}var Uf=N({number:function(t){return parseFloat(t)},time:function(t){return+cr(t)},trim:function(t){return H(t)?Mt(t):t}});function Yf(t){return Uf.get(t)}var Zf={lt:function(t,e){return t<e},lte:function(t,e){return t<=e},gt:function(t,e){return e<t},gte:function(t,e){return e<=t}},qf=($f.prototype.evaluate=function(t){return W(t)?this._opFn(t,this._rvalFloat):this._opFn(gr(t),this._rvalFloat)},$f),jf=(Kf.prototype.evaluate=function(t,e){var n=W(t)?t:gr(t),i=W(e)?e:gr(e),o=isNaN(n),r=isNaN(i);return o&&(n=this._incomparable),r&&(i=this._incomparable),o&&r&&(o=H(t),r=H(e),o&&(n=r?t:0),r)&&(i=o?e:0),n<i?this._resultLT:i<n?-this._resultLT:0},Kf);function Kf(t,e){t="desc"===t;this._resultLT=t?1:-1,this._incomparable="min"===(e=null==e?t?"min":"max":e)?-1/0:1/0}function $f(t,e){W(e)||f(""),this._opFn=Zf[t],this._rvalFloat=gr(e)}Jf.prototype.evaluate=function(t){var e,n=t===this._rval;return n||(e=typeof t)===this._rvalTypeof||"number"!=e&&"number"!==this._rvalTypeof||(n=gr(t)===this._rvalFloat),this._isEQ?n:!n};var Qf=Jf;function Jf(t,e){this._rval=e,this._isEQ=t,this._rvalTypeof=typeof e,this._rvalFloat=gr(e)}eg.prototype.getRawData=function(){throw new Error("not supported")},eg.prototype.getRawDataItem=function(t){throw new Error("not supported")},eg.prototype.cloneRawData=function(){},eg.prototype.getDimensionInfo=function(t){},eg.prototype.cloneAllDimensionInfo=function(){},eg.prototype.count=function(){},eg.prototype.retrieveValue=function(t,e){},eg.prototype.retrieveValueFromItem=function(t,e){},eg.prototype.convertValue=Xf;var tg=eg;function eg(){}function ng(t){return lg(t.sourceFormat)||f(""),t.data}function ig(t){var e=t.sourceFormat,n=t.data;if(lg(e)||f(""),e===td){for(var i=[],o=0,r=n.length;o<r;o++)i.push(n[o].slice());return i}if(e===ed){for(i=[],o=0,r=n.length;o<r;o++)i.push(P({},n[o]));return i}}function og(t,e,n){if(null!=n)return W(n)||!isNaN(n)&&!Et(e,n)?t[n]:Et(e,n)?e[n]:void 0}function rg(t){return y(t)}var ag=N();function sg(t,e){var n=br(t),t=n.length;t||f("");for(var i=0,o=t;i<o;i++)e=function(t,i){i.length||f(""),O(t)||f("");var e=t.type,d=ag.get(e),e=(d||f(""),F(i,function(t){var e=t,t=d,n=new tg,i=e.data,o=n.sourceFormat=e.sourceFormat,r=e.startIndex,a=(e.seriesLayoutBy!==rd&&f(""),[]),s={};if(h=e.dimensionsDefine)E(h,function(t,e){var n=t.name,e={index:e,name:n,displayName:t.displayName};a.push(e),null!=n&&(Et(s,n)&&f(""),s[n]=e)});else for(var l=0;l<e.dimensionsDetectedCount;l++)a.push({index:l});var u=xf(o,rd),h=(t.__isBuiltIn&&(n.getRawDataItem=function(t){return u(i,r,a,t)},n.getRawData=S(ng,null,e)),n.cloneRawData=S(ig,null,e),Sf(o,rd)),c=(n.count=S(h,null,i,r,a),If(o)),p=(n.retrieveValue=function(t,e){t=u(i,r,a,t);return p(t,e)},n.retrieveValueFromItem=function(t,e){var n;return null!=t&&(n=a[e])?c(t,e,n.name):void 0});return n.getDimensionInfo=S(og,null,a,s),n.cloneAllDimensionInfo=S(rg,null,a),n}));return F(br(d.transform({upstream:e[0],upstreamList:e,config:y(t.config)})),function(t,e){O(t)||f(""),t.data||f(""),lg(lf(t.data))||f("");var n=i[0],e=n&&0===e&&!t.dimensions?((e=n.startIndex)&&(t.data=n.data.slice(0,e).concat(t.data)),{seriesLayoutBy:rd,sourceHeader:e,dimensions:n.metaRawOption.dimensions}):{seriesLayoutBy:rd,sourceHeader:0,dimensions:t.dimensions};return af(t.data,e,null)})}(n[i],e),i!==o-1&&(e.length=Math.max(e.length,1));return e}function lg(t){return t===td||t===ed}var ug,nc="undefined",hg=typeof Uint32Array==nc?Array:Uint32Array,cg=typeof Uint16Array==nc?Array:Uint16Array,pg=typeof Int32Array==nc?Array:Int32Array,op=typeof Float64Array==nc?Array:Float64Array,dg={float:op,int:pg,ordinal:Array,number:Array,time:op};function fg(t){return 65535<t?hg:cg}function gg(){return[1/0,-1/0]}function yg(t,e,n,i,o){n=dg[n||"float"];if(o){var r=t[e],a=r&&r.length;if(a!==i){for(var s=new n(i),l=0;l<a;l++)s[l]=r[l];t[e]=s}}else t[e]=new n(i)}l.prototype.initData=function(t,e,n){this._provider=t,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var i=t.getSource(),o=this.defaultDimValueGetter=ug[i.sourceFormat];this._dimValueGetter=n||o,this._rawExtent=[],cf(i),this._dimensions=F(e,function(t){return{type:t.type,property:t.property}}),this._initDataFromProvider(0,t.count())},l.prototype.getProvider=function(){return this._provider},l.prototype.getSource=function(){return this._provider.getSource()},l.prototype.ensureCalculationDimension=function(t,e){var n=this._calcDimNameToIdx,i=this._dimensions,o=n.get(t);if(null!=o){if(i[o].type===e)return o}else o=i.length;return i[o]={type:e},n.set(t,o),this._chunks[o]=new dg[e||"float"](this._rawCount),this._rawExtent[o]=gg(),o},l.prototype.collectOrdinalMeta=function(t,e){var n=this._chunks[t],i=this._dimensions[t],o=this._rawExtent,r=i.ordinalOffset||0,a=n.length;0===r&&(o[t]=gg());for(var s=o[t],l=r;l<a;l++){var u=n[l]=e.parseAndCollect(n[l]);isNaN(u)||(s[0]=Math.min(u,s[0]),s[1]=Math.max(u,s[1]))}i.ordinalMeta=e,i.ordinalOffset=a,i.type="ordinal"},l.prototype.getOrdinalMeta=function(t){return this._dimensions[t].ordinalMeta},l.prototype.getDimensionProperty=function(t){t=this._dimensions[t];return t&&t.property},l.prototype.appendData=function(t){var e=this._provider,n=this.count(),t=(e.appendData(t),e.count());return e.persistent||(t+=n),n<t&&this._initDataFromProvider(n,t,!0),[n,t]},l.prototype.appendValues=function(t,e){for(var n=this._chunks,i=this._dimensions,o=i.length,r=this._rawExtent,a=this.count(),s=a+Math.max(t.length,e||0),l=0;l<o;l++)yg(n,l,(d=i[l]).type,s,!0);for(var u=[],h=a;h<s;h++)for(var c=h-a,p=0;p<o;p++){var d=i[p],f=ug.arrayRows.call(this,t[c]||u,d.property,c,p),g=(n[p][h]=f,r[p]);f<g[0]&&(g[0]=f),f>g[1]&&(g[1]=f)}return{start:a,end:this._rawCount=this._count=s}},l.prototype._initDataFromProvider=function(t,e,n){for(var i=this._provider,o=this._chunks,r=this._dimensions,a=r.length,s=this._rawExtent,l=F(r,function(t){return t.property}),u=0;u<a;u++){var h=r[u];s[u]||(s[u]=gg()),yg(o,u,h.type,e,n)}if(i.fillStorage)i.fillStorage(t,e,o,s);else for(var c=[],p=t;p<e;p++)for(var c=i.getItem(p,c),d=0;d<a;d++){var f=o[d],g=this._dimValueGetter(c,l[d],p,d),f=(f[p]=g,s[d]);g<f[0]&&(f[0]=g),g>f[1]&&(f[1]=g)}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=e,this._extent=[]},l.prototype.count=function(){return this._count},l.prototype.get=function(t,e){return 0<=e&&e<this._count&&(t=this._chunks[t])?t[this.getRawIndex(e)]:NaN},l.prototype.getValues=function(t,e){var n=[],i=[];if(null==e){e=t,t=[];for(var o=0;o<this._dimensions.length;o++)i.push(o)}else i=t;for(var o=0,r=i.length;o<r;o++)n.push(this.get(i[o],e));return n},l.prototype.getByRawIndex=function(t,e){return 0<=e&&e<this._rawCount&&(t=this._chunks[t])?t[e]:NaN},l.prototype.getSum=function(t){var e=0;if(this._chunks[t])for(var n=0,i=this.count();n<i;n++){var o=this.get(t,n);isNaN(o)||(e+=o)}return e},l.prototype.getMedian=function(t){var e=[],t=(this.each([t],function(t){isNaN(t)||e.push(t)}),e.sort(function(t,e){return t-e})),n=this.count();return 0===n?0:n%2==1?t[(n-1)/2]:(t[n/2]+t[n/2-1])/2},l.prototype.indexOfRawIndex=function(t){if(!(t>=this._rawCount||t<0)){if(!this._indices)return t;var e=this._indices,n=e[t];if(null!=n&&n<this._count&&n===t)return t;for(var i=0,o=this._count-1;i<=o;){var r=(i+o)/2|0;if(e[r]<t)i=1+r;else{if(!(e[r]>t))return r;o=r-1}}}return-1},l.prototype.indicesOfNearest=function(t,e,n){var i=this._chunks[t],o=[];if(i){null==n&&(n=1/0);for(var r=1/0,a=-1,s=0,l=0,u=this.count();l<u;l++){var h=e-i[this.getRawIndex(l)],c=Math.abs(h);c<=n&&((c<r||c===r&&0<=h&&a<0)&&(r=c,a=h,s=0),h===a)&&(o[s++]=l)}o.length=s}return o},l.prototype.getIndices=function(){var t=this._indices;if(t){var e=t.constructor,n=this._count;if(e===Array)for(var i=new e(n),o=0;o<n;o++)i[o]=t[o];else i=new e(t.buffer,0,n)}else for(i=new(e=fg(this._rawCount))(this.count()),o=0;o<i.length;o++)i[o]=o;return i},l.prototype.filter=function(t,e){if(!this._count)return this;for(var n=this.clone(),i=n.count(),o=new(fg(n._rawCount))(i),r=[],a=t.length,s=0,l=t[0],u=n._chunks,h=0;h<i;h++){var c=void 0,p=n.getRawIndex(h);if(0===a)c=e(h);else if(1===a)c=e(u[l][p],h);else{for(var d=0;d<a;d++)r[d]=u[t[d]][p];r[d]=h,c=e.apply(null,r)}c&&(o[s++]=p)}return s<i&&(n._indices=o),n._count=s,n._extent=[],n._updateGetRawIdx(),n},l.prototype.selectRange=function(t){var e=this.clone(),n=e._count;if(!n)return this;var i=ht(t),o=i.length;if(!o)return this;var r=e.count(),a=new(fg(e._rawCount))(r),s=0,l=i[0],u=t[l][0],h=t[l][1],c=e._chunks,l=!1;if(!e._indices){var p=0;if(1===o){for(var d=c[i[0]],f=0;f<n;f++)((v=d[f])>=u&&v<=h||isNaN(v))&&(a[s++]=p),p++;l=!0}else if(2===o){for(var d=c[i[0]],g=c[i[1]],y=t[i[1]][0],m=t[i[1]][1],f=0;f<n;f++){var v=d[f],_=g[f];(u<=v&&v<=h||isNaN(v))&&(y<=_&&_<=m||isNaN(_))&&(a[s++]=p),p++}l=!0}}if(!l)if(1===o)for(f=0;f<r;f++){var x=e.getRawIndex(f);((v=c[i[0]][x])>=u&&v<=h||isNaN(v))&&(a[s++]=x)}else for(f=0;f<r;f++){for(var w=!0,b=(x=e.getRawIndex(f),0);b<o;b++){var S=i[b];((v=c[S][x])<t[S][0]||v>t[S][1])&&(w=!1)}w&&(a[s++]=e.getRawIndex(f))}return s<r&&(e._indices=a),e._count=s,e._extent=[],e._updateGetRawIdx(),e},l.prototype.map=function(t,e){var n=this.clone(t);return this._updateDims(n,t,e),n},l.prototype.modify=function(t,e){this._updateDims(this,t,e)},l.prototype._updateDims=function(t,e,n){for(var i=t._chunks,o=[],r=e.length,a=t.count(),s=[],l=t._rawExtent,u=0;u<e.length;u++)l[e[u]]=gg();for(var h=0;h<a;h++){for(var c=t.getRawIndex(h),p=0;p<r;p++)s[p]=i[e[p]][c];s[r]=h;var d=n&&n.apply(null,s);if(null!=d)for("object"!=typeof d&&(o[0]=d,d=o),u=0;u<d.length;u++){var f=e[u],g=d[u],y=l[f],f=i[f];f&&(f[c]=g),g<y[0]&&(y[0]=g),g>y[1]&&(y[1]=g)}}},l.prototype.lttbDownSample=function(t,e){var n,i=this.clone([t],!0),o=i._chunks[t],r=this.count(),a=0,s=Math.floor(1/e),l=this.getRawIndex(0),u=new(fg(this._rawCount))(Math.min(2*(Math.ceil(r/s)+2),r));u[a++]=l;for(var h=1;h<r-1;h+=s){for(var c=Math.min(h+s,r-1),p=Math.min(h+2*s,r),d=(p+c)/2,f=0,g=c;g<p;g++){var y=o[M=this.getRawIndex(g)];isNaN(y)||(f+=y)}f/=p-c;for(var c=h,m=Math.min(h+s,r),v=h-1,_=o[l],x=-1,w=c,b=-1,S=0,g=c;g<m;g++){var M,y=o[M=this.getRawIndex(g)];isNaN(y)?(S++,b<0&&(b=M)):(n=Math.abs((v-d)*(y-_)-(v-g)*(f-_)))>x&&(x=n,w=M)}0<S&&S<m-c&&(u[a++]=Math.min(b,w),w=Math.max(b,w)),l=u[a++]=w}return u[a++]=this.getRawIndex(r-1),i._count=a,i._indices=u,i.getRawIndex=this._getRawIdx,i},l.prototype.downSample=function(t,e,n,i){for(var o=this.clone([t],!0),r=o._chunks,a=[],s=Math.floor(1/e),l=r[t],u=this.count(),h=o._rawExtent[t]=gg(),c=new(fg(this._rawCount))(Math.ceil(u/s)),p=0,d=0;d<u;d+=s){u-d<s&&(a.length=s=u-d);for(var f=0;f<s;f++){var g=this.getRawIndex(d+f);a[f]=l[g]}var y=n(a),m=this.getRawIndex(Math.min(d+i(a,y)||0,u-1));(l[m]=y)<h[0]&&(h[0]=y),y>h[1]&&(h[1]=y),c[p++]=m}return o._count=p,o._indices=c,o._updateGetRawIdx(),o},l.prototype.each=function(t,e){if(this._count)for(var n=t.length,i=this._chunks,o=0,r=this.count();o<r;o++){var a=this.getRawIndex(o);switch(n){case 0:e(o);break;case 1:e(i[t[0]][a],o);break;case 2:e(i[t[0]][a],i[t[1]][a],o);break;default:for(var s=0,l=[];s<n;s++)l[s]=i[t[s]][a];l[s]=o,e.apply(null,l)}}},l.prototype.getDataExtent=function(t){var e=this._chunks[t],n=gg();if(!e)return n;var i,o=this.count();if(!this._indices)return this._rawExtent[t].slice();if(i=this._extent[t])return i.slice();for(var r=(i=n)[0],a=i[1],s=0;s<o;s++){var l=e[this.getRawIndex(s)];l<r&&(r=l),a<l&&(a=l)}return this._extent[t]=i=[r,a]},l.prototype.getRawDataItem=function(t){var e=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(e);for(var n=[],i=this._chunks,o=0;o<i.length;o++)n.push(i[o][e]);return n},l.prototype.clone=function(t,e){var n,i,o=new l,r=this._chunks,a=t&&lt(t,function(t,e){return t[e]=!0,t},{});if(a)for(var s=0;s<r.length;s++)o._chunks[s]=a[s]?(n=r[s],i=void 0,(i=n.constructor)===Array?n.slice():new i(n)):r[s];else o._chunks=r;return this._copyCommonProps(o),e||(o._indices=this._cloneIndices()),o._updateGetRawIdx(),o},l.prototype._copyCommonProps=function(t){t._count=this._count,t._rawCount=this._rawCount,t._provider=this._provider,t._dimensions=this._dimensions,t._extent=y(this._extent),t._rawExtent=y(this._rawExtent)},l.prototype._cloneIndices=function(){if(this._indices){var t=this._indices.constructor,e=void 0;if(t===Array)for(var n=this._indices.length,e=new t(n),i=0;i<n;i++)e[i]=this._indices[i];else e=new t(this._indices);return e}return null},l.prototype._getRawIdxIdentity=function(t){return t},l.prototype._getRawIdx=function(t){return t<this._count&&0<=t?this._indices[t]:-1},l.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},l.internalField=void(ug={arrayRows:vg,objectRows:function(t,e,n,i){return Xf(t[e],this._dimensions[i])},keyedColumns:vg,original:function(t,e,n,i){t=t&&(null==t.value?t:t.value);return Xf(t instanceof Array?t[i]:t,this._dimensions[i])},typedArray:function(t,e,n,i){return t[i]}});var mg=l;function l(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=N()}function vg(t,e,n,i){return Xf(t[i],this._dimensions[i])}xg.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},xg.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,this._versionSignBase++,9e10<this._versionSignBase&&(this._versionSignBase=0)},xg.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},xg.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},xg.prototype._createSource=function(){this._setLocalSource([],[]);var t,e,n,i,o,r,a,s=this._sourceHost,l=this._getUpstreamSourceManagers(),u=!!l.length;bg(s)?(i=s,o=t=r=void 0,e=u?((e=l[0]).prepareSource(),r=(o=e.getSource()).data,t=o.sourceFormat,[e._getVersionSign()]):(t=dt(r=i.get("data",!0))?id:Jp,[]),i=this._getSourceMetaRawOption()||{},o=o&&o.metaRawOption||{},a=R(i.seriesLayoutBy,o.seriesLayoutBy)||null,n=R(i.sourceHeader,o.sourceHeader),i=R(i.dimensions,o.dimensions),o=a!==o.seriesLayoutBy||!!n!=!!o.sourceHeader||i?[af(r,{seriesLayoutBy:a,sourceHeader:n,dimensions:i},t)]:[]):(r=s,e=u?(o=(a=this._applyTransform(l)).sourceList,a.upstreamSignList):(o=[af(r.get("source",!0),this._getSourceMetaRawOption(),null)],[])),this._setLocalSource(o,e)},xg.prototype._applyTransform=function(t){var e,n=this._sourceHost,i=n.get("transform",!0),o=n.get("fromTransformResult",!0),r=(null!=o&&1!==t.length&&Sg(""),[]),a=[];return E(t,function(t){t.prepareSource();var e=t.getSource(o||0);null==o||e||Sg(""),r.push(e),a.push(t._getVersionSign())}),i?e=sg(i,r,n.componentIndex):null!=o&&(e=[new of({data:(t=r[0]).data,sourceFormat:t.sourceFormat,seriesLayoutBy:t.seriesLayoutBy,dimensionsDefine:y(t.dimensionsDefine),startIndex:t.startIndex,dimensionsDetectedCount:t.dimensionsDetectedCount})]),{sourceList:e,upstreamSignList:a}},xg.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),e=0;e<t.length;e++){var n=t[e];if(n._isDirty()||this._upstreamSignList[e]!==n._getVersionSign())return!0}},xg.prototype.getSource=function(t){var e=this._sourceList[t=t||0];return e||(e=this._getUpstreamSourceManagers())[0]&&e[0].getSource(t)},xg.prototype.getSharedDataStore=function(t){var e=t.makeStoreSchema();return this._innerGetDataStore(e.dimensions,t.source,e.hash)},xg.prototype._innerGetDataStore=function(t,e,n){var i,o=this._storeList,r=o[0],o=(r=r||(o[0]={}))[n];return o||(i=this._getUpstreamSourceManagers()[0],bg(this._sourceHost)&&i?o=i._innerGetDataStore(t,e,n):(o=new mg).initData(new gf(e,t.length),t),r[n]=o),o},xg.prototype._getUpstreamSourceManagers=function(){var t,e=this._sourceHost;return bg(e)?(t=cd(e))?[t.getSourceManager()]:[]:F((t=e).get("transform",!0)||t.get("fromTransformResult",!0)?Vr(t.ecModel,"dataset",{index:t.get("fromDatasetIndex",!0),id:t.get("fromDatasetId",!0)},Br).models:[],function(t){return t.getSourceManager()})},xg.prototype._getSourceMetaRawOption=function(){var t,e,n,i=this._sourceHost;return bg(i)?(t=i.get("seriesLayoutBy",!0),e=i.get("sourceHeader",!0),n=i.get("dimensions",!0)):this._getUpstreamSourceManagers().length||(t=(i=i).get("seriesLayoutBy",!0),e=i.get("sourceHeader",!0),n=i.get("dimensions",!0)),{seriesLayoutBy:t,sourceHeader:e,dimensions:n}};var _g=xg;function xg(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}function wg(t){t.option.transform&&It(t.option.transform)}function bg(t){return"series"===t.mainType}function Sg(t){throw new Error(t)}var Mg="line-height:1";function Tg(t,e){var n=t.color||"#6e7079",i=t.fontSize||12,o=t.fontWeight||"400",r=t.color||"#464646",a=t.fontSize||14,t=t.fontWeight||"900";return"html"===e?{nameStyle:"font-size:"+me(i+"")+"px;color:"+me(n)+";font-weight:"+me(o+""),valueStyle:"font-size:"+me(a+"")+"px;color:"+me(r)+";font-weight:"+me(t+"")}:{nameStyle:{fontSize:i,fill:n,fontWeight:o},valueStyle:{fontSize:a,fill:r,fontWeight:t}}}var Ig=[0,10,20,30],Cg=["","\n","\n\n","\n\n\n"];function Dg(t,e){return e.type=t,e}function kg(t){return"section"===t.type}function Ag(t){return kg(t)?Lg:Pg}function Lg(i,o,t,r){var n,e=o.noHeader,a=(l=function n(t){var i,e,o;return kg(t)?(i=0,e=t.blocks.length,o=1<e||0<e&&!t.noHeader,E(t.blocks,function(t){var e=n(t);i<=e&&(i=e+ +(o&&(!e||kg(t)&&!t.noHeader)))}),i):0}(o),{html:Ig[l],richText:Cg[l]}),s=[],l=o.blocks||[],u=(St(!l||V(l)),l=l||[],i.orderMode),h=(o.sortBlocks&&u&&(l=l.slice(),Et(h={valueAsc:"asc",valueDesc:"desc"},u)?(n=new jf(h[u],null),l.sort(function(t,e){return n.evaluate(t.sortParam,e.sortParam)})):"seriesDesc"===u&&l.reverse()),E(l,function(t,e){var n=o.valueFormatter,n=Ag(t)(n?P(P({},i),{valueFormatter:n}):i,t,0<e?a.html:0,r);null!=n&&s.push(n)}),"richText"===i.renderMode?s.join(a.richText):Rg(s.join(""),e?t:a.html));return e?h:(u=kp(o.header,"ordinal",i.useUTC),l=Tg(r,i.renderMode).nameStyle,"richText"===i.renderMode?Ng(i,u,l)+a.richText+h:Rg('<div style="'+l+";"+Mg+';">'+me(u)+"</div>"+h,t))}function Pg(t,e,n,i){var o,r,a,s,l=t.renderMode,u=e.noName,h=e.noValue,c=!e.markerType,p=e.name,d=t.useUTC,f=e.valueFormatter||t.valueFormatter||function(t){return F(t=V(t)?t:[t],function(t,e){return kp(t,V(r)?r[e]:r,d)})};if(!u||!h)return o=c?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",l),p=u?"":kp(p,"ordinal",d),r=e.valueType,f=h?[]:f(e.value,e.dataIndex),e=!c||!u,a=!c&&u,i=Tg(i,l),s=i.nameStyle,i=i.valueStyle,"richText"===l?(c?"":o)+(u?"":Ng(t,p,s))+(h?"":function(t,e,n,i,o){o=[o],i=i?10:20;return n&&o.push({padding:[0,0,0,i],align:"right"}),t.markupStyleCreator.wrapRichTextStyle(V(e)?e.join("  "):e,o)}(t,f,e,a,i)):Rg((c?"":o)+(u?"":'<span style="'+s+";"+(!c?"margin-left:2px":"")+'">'+me(p)+"</span>")+(h?"":function(t,e,n,i){e=e?"float:right;margin-left:"+(n?"10px":"20px"):"";return t=V(t)?t:[t],'<span style="'+e+";"+i+'">'+F(t,me).join("&nbsp;&nbsp;")+"</span>"}(f,e,a,i)),n)}function Og(t,e,n,i,o,r){if(t)return Ag(t)({useUTC:o,renderMode:n,orderMode:i,markupStyleCreator:e,valueFormatter:t.valueFormatter},t,0,r)}function Rg(t,e){return'<div style="margin: '+e+"px 0 0;"+Mg+';">'+t+'<div style="clear:both"></div></div>'}function Ng(t,e,n){return t.markupStyleCreator.wrapRichTextStyle(e,n)}function Eg(t,e){t=t.get("padding");return null!=t?t:"richText"===e?[8,10]:10}Bg.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},Bg.prototype.makeTooltipMarker=function(t,e,n){var i="richText"===n?this._generateStyleName():null,e=Op({color:e,type:t,renderMode:n,markerId:i});return H(e)?e:(this.richTextStyles[i]=e.style,e.content)},Bg.prototype.wrapRichTextStyle=function(t,e){var n={},e=(V(e)?E(e,function(t){return P(n,t)}):P(n,e),this._generateStyleName());return this.richTextStyles[e]=n,"{"+e+"|"+t+"}"};var zg=Bg;function Bg(){this.richTextStyles={},this._nextStyleNameId=mr()}function Fg(t){var e,n,i,o,r,a,s,l,u,h,c,p=t.series,d=t.dataIndex,t=t.multipleSeries,f=p.getData(),g=f.mapDimensionsAll("defaultedTooltip"),y=g.length,m=p.getRawValue(d),v=V(m),_=(_=d,Rp((w=p).getData().getItemVisual(_,"style")[w.visualDrawType]));function x(t,e){e=s.getDimensionInfo(e);e&&!1!==e.otherDims.tooltip&&(l?c.push(Dg("nameValue",{markerType:"subItem",markerColor:a,name:e.displayName,value:t,valueType:e.type})):(u.push(t),h.push(e.type)))}1<y||v&&!y?(w=m,o=d,r=g,a=_,s=p.getData(),l=lt(w,function(t,e,n){n=s.getDimensionInfo(n);return t||n&&!1!==n.tooltip&&null!=n.displayName},!1),u=[],h=[],c=[],r.length?E(r,function(t){x(Df(s,o,t),t)}):E(w,x),e=(r={inlineValues:u,inlineValueTypes:h,blocks:c}).inlineValueTypes,n=r.blocks,i=(r=r.inlineValues)[0]):y?(w=f.getDimensionInfo(g[0]),i=r=Df(f,d,g[0]),e=w.type):i=r=v?m[0]:m;var y=Ar(p),g=y&&p.name||"",w=f.getName(d),v=t?g:w;return Dg("section",{header:g,noHeader:t||!y,sortParam:i,blocks:[Dg("nameValue",{markerType:"item",markerColor:_,name:v,noName:!Mt(v),value:r,valueType:e,dataIndex:d})].concat(n||[])})}var Vg=Rr();function Hg(t,e){return t.getName(e)||t.getId(e)}u(s,Wg=g),s.prototype.init=function(t,e,n){this.seriesIndex=this.componentIndex,this.dataTask=Pf({count:Ug,reset:Yg}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n),(Vg(this).sourceManager=new _g(this)).prepareSource();t=this.getInitialData(t,n);qg(t,this),this.dataTask.context.data=t,Vg(this).dataBeforeProcessed=t,Xg(this),this._initSelectedMapFromData(t)},s.prototype.mergeDefaultAndTheme=function(t,e){var n=Hp(this),i=n?Gp(t):{},o=this.subType;g.hasClass(o),d(t,e.getTheme().get(this.subType)),d(t,this.getDefaultOption()),Sr(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&Wp(t,i,n)},s.prototype.mergeOption=function(t,e){t=d(this.option,t,!0),this.fillDataTextStyle(t.data);var n=Hp(this),n=(n&&Wp(this.option,t,n),Vg(this).sourceManager),n=(n.dirty(),n.prepareSource(),this.getInitialData(t,e));qg(n,this),this.dataTask.dirty(),this.dataTask.context.data=n,Vg(this).dataBeforeProcessed=n,Xg(this),this._initSelectedMapFromData(n)},s.prototype.fillDataTextStyle=function(t){if(t&&!dt(t))for(var e=["show"],n=0;n<t.length;n++)t[n]&&t[n].label&&Sr(t[n],"label",e)},s.prototype.getInitialData=function(t,e){},s.prototype.appendData=function(t){this.getRawData().appendData(t.data)},s.prototype.getData=function(t){var e=Kg(this);return e?(e=e.context.data,null==t?e:e.getLinkedData(t)):Vg(this).data},s.prototype.getAllData=function(){var t=this.getData();return t&&t.getLinkedDataAll?t.getLinkedDataAll():[{data:t}]},s.prototype.setData=function(t){var e,n=Kg(this);n&&((e=n.context).outputData=t,n!==this.dataTask)&&(e.data=t),Vg(this).data=t},s.prototype.getEncode=function(){var t=this.get("encode",!0);if(t)return N(t)},s.prototype.getSourceManager=function(){return Vg(this).sourceManager},s.prototype.getSource=function(){return this.getSourceManager().getSource()},s.prototype.getRawData=function(){return Vg(this).dataBeforeProcessed},s.prototype.getColorBy=function(){return this.get("colorBy")||"series"},s.prototype.isColorBySeries=function(){return"series"===this.getColorBy()},s.prototype.getBaseAxis=function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},s.prototype.formatTooltip=function(t,e,n){return Fg({series:this,dataIndex:t,multipleSeries:e})},s.prototype.isAnimationEnabled=function(){var t=this.ecModel;return!!(!b.node||t&&t.ssr)&&!!(t=(t=this.getShallow("animation"))&&this.getData().count()>this.getShallow("animationThreshold")?!1:t)},s.prototype.restoreData=function(){this.dataTask.dirty()},s.prototype.getColorFromPalette=function(t,e,n){var i=this.ecModel;return yd.prototype.getColorFromPalette.call(this,t,e,n)||i.getColorFromPalette(t,e,n)},s.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},s.prototype.getProgressive=function(){return this.get("progressive")},s.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},s.prototype.select=function(t,e){this._innerSelect(this.getData(e),t)},s.prototype.unselect=function(t,e){var n=this.option.selectedMap;if(n){var i=this.option.selectedMode,o=this.getData(e);if("series"===i||"all"===n)this.option.selectedMap={},this._selectedDataIndicesMap={};else for(var r=0;r<t.length;r++){var a=Hg(o,t[r]);n[a]=!1,this._selectedDataIndicesMap[a]=-1}}},s.prototype.toggleSelect=function(t,e){for(var n=[],i=0;i<t.length;i++)n[0]=t[i],this.isSelected(t[i],e)?this.unselect(n,e):this.select(n,e)},s.prototype.getSelectedDataIndices=function(){if("all"===this.option.selectedMap)return[].slice.call(this.getData().getIndices());for(var t=this._selectedDataIndicesMap,e=ht(t),n=[],i=0;i<e.length;i++){var o=t[e[i]];0<=o&&n.push(o)}return n},s.prototype.isSelected=function(t,e){var n=this.option.selectedMap;return!!n&&(e=this.getData(e),"all"===n||n[Hg(e,t)])&&!e.getItemModel(t).get(["select","disabled"])},s.prototype.isUniversalTransitionEnabled=function(){var t;return!!this.__universalTransitionEnabled||!!(t=this.option.universalTransition)&&(!0===t||t&&t.enabled)},s.prototype._innerSelect=function(t,e){var n,i=this.option,o=i.selectedMode,r=e.length;if(o&&r)if("series"===o)i.selectedMap="all";else if("multiple"===o){O(i.selectedMap)||(i.selectedMap={});for(var a=i.selectedMap,s=0;s<r;s++){var l=e[s];a[n=Hg(t,l)]=!0,this._selectedDataIndicesMap[n]=t.getRawIndex(l)}}else"single"!==o&&!0!==o||(n=Hg(t,o=e[r-1]),i.selectedMap=((i={})[n]=!0,i),this._selectedDataIndicesMap=((i={})[n]=t.getRawIndex(o),i))},s.prototype._initSelectedMapFromData=function(n){var i;this.option.selectedMap||(i=[],n.hasItemOption&&n.each(function(t){var e=n.getRawDataItem(t);e&&e.selected&&i.push(t)}),0<i.length&&this._innerSelect(n,i))},s.registerClass=function(t){return g.registerClass(t)},s.protoInitialize=((Rc=s.prototype).type="series.__base__",Rc.seriesIndex=0,Rc.ignoreStyleOnData=!1,Rc.hasSymbolVisual=!1,Rc.defaultSymbol="circle",Rc.visualStyleAccessPath="itemStyle",void(Rc.visualDrawType="fill"));var Wg,Gg=s;function s(){var t=null!==Wg&&Wg.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}function Xg(t){var e,n,i=t.name;Ar(t)||(t.name=(t=(e=(t=t).getRawData()).mapDimensionsAll("seriesName"),n=[],E(t,function(t){t=e.getDimensionInfo(t);t.displayName&&n.push(t.displayName)}),n.join(" ")||i))}function Ug(t){return t.model.getRawData().count()}function Yg(t){t=t.model;return t.setData(t.getRawData().cloneShallow()),Zg}function Zg(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function qg(e,n){E(Ot(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(t){e.wrapMethod(t,M(jg,n))})}function jg(t,e){t=Kg(t);return t&&t.setOutputEnd((e||this).count()),e}function Kg(t){var e,n=(t.ecModel||{}).scheduler,n=n&&n.getPipeline(t.uid);if(n)return(n=n.currentTask)&&(e=n.agentStubMap)?e.get(t.uid):n}at(Gg,Bc),at(Gg,yd),qr(Gg,g);Qg.prototype.init=function(t,e){},Qg.prototype.render=function(t,e,n,i){},Qg.prototype.dispose=function(t,e){},Qg.prototype.updateView=function(t,e,n,i){},Qg.prototype.updateLayout=function(t,e,n,i){},Qg.prototype.updateVisual=function(t,e,n,i){},Qg.prototype.toggleBlurSeries=function(t,e,n){},Qg.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)};var $g=Qg;function Qg(){this.group=new Wo,this.uid=Xc("viewComponent")}function Jg(){var r=Rr();return function(t){var e=r(t),t=t.pipelineContext,n=!!e.large,i=!!e.progressiveRender,o=e.large=!(!t||!t.large),e=e.progressiveRender=!(!t||!t.progressiveRender);return!(n==o&&i==e)&&"reset"}}Zr($g),Qr($g);var ty=Rr(),ey=Jg(),ny=(iy.prototype.init=function(t,e){},iy.prototype.render=function(t,e,n,i){},iy.prototype.highlight=function(t,e,n,i){t=t.getData(i&&i.dataType);t&&ry(t,i,"emphasis")},iy.prototype.downplay=function(t,e,n,i){t=t.getData(i&&i.dataType);t&&ry(t,i,"normal")},iy.prototype.remove=function(t,e){this.group.removeAll()},iy.prototype.dispose=function(t,e){},iy.prototype.updateView=function(t,e,n,i){this.render(t,e,n,i)},iy.prototype.updateLayout=function(t,e,n,i){this.render(t,e,n,i)},iy.prototype.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},iy.prototype.eachRendered=function(t){fc(this.group,t)},iy.markUpdateMethod=function(t,e){ty(t).updateMethod=e},iy.protoInitialize=void(iy.prototype.type="chart"),iy);function iy(){this.group=new Wo,this.uid=Xc("viewChart"),this.renderTask=Pf({plan:ay,reset:sy}),this.renderTask.context={view:this}}function oy(t,e,n){t&&Zl(t)&&("emphasis"===e?kl:Al)(t,n)}function ry(e,t,n){var i,o=Or(e,t),r=t&&null!=t.highlightKey?(t=t.highlightKey,i=null==(i=tl[t])&&Js<=32?tl[t]=Js++:i):null;null!=o?E(br(o),function(t){oy(e.getItemGraphicEl(t),n,r)}):e.eachItemGraphicEl(function(t){oy(t,n,r)})}function ay(t){return ey(t.model)}function sy(t){var e=t.model,n=t.ecModel,i=t.api,o=t.payload,r=e.pipelineContext.progressiveRender,t=t.view,a=o&&ty(o).updateMethod,r=r?"incrementalPrepareRender":a&&t[a]?a:"render";return"render"!==r&&t[r](e,n,i,o),ly[r]}Zr(ny),Qr(ny);var ly={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},uy="\0__throttleOriginMethod",hy="\0__throttleRate",cy="\0__throttleType";function py(t,o,r){var a,s,l,u,h,c=0,p=0,d=null;function f(){p=(new Date).getTime(),d=null,t.apply(l,u||[])}o=o||0;function e(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];a=(new Date).getTime(),l=this,u=t;var n=h||o,i=h||r;h=null,s=a-(i?c:p)-n,clearTimeout(d),i?d=setTimeout(f,n):0<=s?f():d=setTimeout(f,-s),c=a}return e.clear=function(){d&&(clearTimeout(d),d=null)},e.debounceNextCall=function(t){h=t},e}function dy(t,e,n,i){var o=t[e];if(o){var r=o[uy]||o,a=o[cy];if(o[hy]!==n||a!==i){if(null==n||!i)return t[e]=r;(o=t[e]=py(r,n,"debounce"===i))[uy]=r,o[cy]=i,o[hy]=n}}}function fy(t,e){var n=t[e];n&&n[uy]&&(n.clear&&n.clear(),t[e]=n[uy])}var gy=Rr(),yy={itemStyle:Jr(Ec,!0),lineStyle:Jr(Pc,!0)},my={lineStyle:"stroke",itemStyle:"fill"};function vy(t,e){return t.visualStyleMapper||yy[e]||(console.warn("Unknown style type '"+e+"'."),yy.itemStyle)}function _y(t,e){return t.visualDrawType||my[e]||(console.warn("Unknown style type '"+e+"'."),"fill")}var ea={createOnAllSeries:!0,performRawSeries:!0,reset:function(o,t){var e=o.getData(),n=o.visualStyleAccessPath||"itemStyle",i=o.getModel(n),r=vy(o,n)(i),i=i.getShallow("decal"),a=(i&&(e.setVisual("decal",i),i.dirty=!0),_y(o,n)),i=r[a],s=D(i)?i:null,n="auto"===r.fill||"auto"===r.stroke;if(r[a]&&!s&&!n||(i=o.getColorFromPalette(o.name,null,t.getSeriesCount()),r[a]||(r[a]=i,e.setVisual("colorFromPalette",!0)),r.fill="auto"===r.fill||D(r.fill)?i:r.fill,r.stroke="auto"===r.stroke||D(r.stroke)?i:r.stroke),e.setVisual("style",r),e.setVisual("drawType",a),!t.isSeriesFiltered(o)&&s)return e.setVisual("colorFromPalette",!1),{dataEach:function(t,e){var n=o.getDataParams(e),i=P({},r);i[a]=s(n),t.setItemVisual(e,"style",i)}}}},xy=new Hc,nc={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var i,o,r;if(!t.ignoreStyleOnData&&!e.isSeriesFiltered(t))return e=t.getData(),i=t.visualStyleAccessPath||"itemStyle",o=vy(t,i),r=e.getVisual("drawType"),{dataEach:e.hasItemOption?function(t,e){var n=t.getRawDataItem(e);n&&n[i]&&(xy.option=n[i],n=o(xy),P(t.ensureUniqueItemVisual(e,"style"),n),xy.option.decal&&(t.setItemVisual(e,"decal",xy.option.decal),xy.option.decal.dirty=!0),r in n)&&t.setItemVisual(e,"colorFromPalette",!1)}:null}}},op={performRawSeries:!0,overallReset:function(e){var i=N();e.eachSeries(function(t){var e,n=t.getColorBy();t.isColorBySeries()||(n=t.type+"-"+n,(e=i.get(n))||i.set(n,e={}),gy(t).scope=e)}),e.eachSeries(function(i){var o,r,a,s,t,l;i.isColorBySeries()||e.isSeriesFiltered(i)||(o=i.getRawData(),r={},a=i.getData(),s=gy(i).scope,t=i.visualStyleAccessPath||"itemStyle",l=_y(i,t),a.each(function(t){var e=a.getRawIndex(t);r[e]=t}),o.each(function(t){var e,n=r[t];a.getItemVisual(n,"colorFromPalette")&&(n=a.ensureUniqueItemVisual(n,"style"),t=o.getName(t)||t+"",e=o.count(),n[l]=i.getColorFromPalette(t,s,e))}))})}},wy=Math.PI;Sy.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(t){t=t.overallTask;t&&t.dirty()})},Sy.prototype.getPerformArgs=function(t,e){var n,i;if(t.__pipeline)return i=(n=this._pipelineMap.get(t.__pipeline.id)).context,{step:e=!e&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex?n.step:null,modBy:null!=(t=i&&i.modDataCount)?Math.ceil(t/e):null,modDataCount:t}},Sy.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},Sy.prototype.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData().count(),e=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,o=t.get("large")&&i>=t.get("largeThreshold"),i="mod"===t.get("progressiveChunkMode")?i:null;t.pipelineContext=n.context={progressiveRender:e,modDataCount:i,large:o}},Sy.prototype.restorePipelines=function(t){var i=this,o=i._pipelineMap=N();t.eachSeries(function(t){var e=t.getProgressive(),n=t.uid;o.set(n,{id:n,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:e&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(e||700),count:0}),i._pipe(t,t.dataTask)})},Sy.prototype.prepareStageTasks=function(){var n=this._stageTaskMap,i=this.api.getModel(),o=this.api;E(this._allHandlers,function(t){var e=n.get(t.uid)||n.set(t.uid,{});St(!(t.reset&&t.overallReset),""),t.reset&&this._createSeriesStageTask(t,e,i,o),t.overallReset&&this._createOverallStageTask(t,e,i,o)},this)},Sy.prototype.prepareView=function(t,e,n,i){var o=t.renderTask,r=o.context;r.model=e,r.ecModel=n,r.api=i,o.__block=!t.incrementalPrepareRender,this._pipe(e,o)},Sy.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},Sy.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},Sy.prototype._performStageTasks=function(t,s,l,u){u=u||{};var h=!1,c=this;function p(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}E(t,function(i,t){var e,n,o,r,a;u.visualType&&u.visualType!==i.visualType||(e=(n=c._stageTaskMap.get(i.uid)).seriesTaskMap,(n=n.overallTask)?((r=n.agentStubMap).each(function(t){p(u,t)&&(t.dirty(),o=!0)}),o&&n.dirty(),c.updatePayload(n,l),a=c.getPerformArgs(n,u.block),r.each(function(t){t.perform(a)}),n.perform(a)&&(h=!0)):e&&e.each(function(t,e){p(u,t)&&t.dirty();var n=c.getPerformArgs(t,u.block);n.skip=!i.performRawSeries&&s.isSeriesFiltered(t.context.model),c.updatePayload(t,l),t.perform(n)&&(h=!0)}))}),this.unfinished=h||this.unfinished},Sy.prototype.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e=t.dataTask.perform()||e}),this.unfinished=e||this.unfinished},Sy.prototype.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}}while(e=e.getUpstream())})},Sy.prototype.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},Sy.prototype._createSeriesStageTask=function(n,t,i,o){var r=this,a=t.seriesTaskMap,s=t.seriesTaskMap=N(),t=n.seriesType,e=n.getTargetSeries;function l(t){var e=t.uid,e=s.set(e,a&&a.get(e)||Pf({plan:Dy,reset:ky,count:Py}));e.context={model:t,ecModel:i,api:o,useClearVisual:n.isVisual&&!n.isLayout,plan:n.plan,reset:n.reset,scheduler:r},r._pipe(t,e)}n.createOnAllSeries?i.eachRawSeries(l):t?i.eachRawSeriesByType(t,l):e&&e(i,o).each(l)},Sy.prototype._createOverallStageTask=function(t,e,n,i){var o=this,r=e.overallTask=e.overallTask||Pf({reset:My}),a=(r.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:o},r.agentStubMap),s=r.agentStubMap=N(),e=t.seriesType,l=t.getTargetSeries,u=!0,h=!1;function c(t){var e=t.uid,e=s.set(e,a&&a.get(e)||(h=!0,Pf({reset:Ty,onDirty:Cy})));e.context={model:t,overallProgress:u},e.agent=r,e.__block=u,o._pipe(t,e)}St(!t.createOnAllSeries,""),e?n.eachRawSeriesByType(e,c):l?l(n,i).each(c):(u=!1,E(n.getSeries(),c)),h&&r.dirty()},Sy.prototype._pipe=function(t,e){t=t.uid,t=this._pipelineMap.get(t);t.head||(t.head=e),t.tail&&t.tail.pipe(e),(t.tail=e).__idxInPipeline=t.count++,e.__pipeline=t},Sy.wrapStageHandler=function(t,e){return(t=D(t)?{overallReset:t,seriesType:function(t){Oy=null;try{t(Ry,Ny)}catch(t){}return Oy}(t)}:t).uid=Xc("stageHandler"),e&&(t.visualType=e),t};var by=Sy;function Sy(t,e,n,i){this._stageTaskMap=N(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}function My(t){t.overallReset(t.ecModel,t.api,t.payload)}function Ty(t){return t.overallProgress&&Iy}function Iy(){this.agent.dirty(),this.getDownstream().dirty()}function Cy(){this.agent&&this.agent.dirty()}function Dy(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function ky(t){t.useClearVisual&&t.data.clearAllVisual();t=t.resetDefines=br(t.reset(t.model,t.ecModel,t.api,t.payload));return 1<t.length?F(t,function(t,e){return Ly(e)}):Ay}var Ay=Ly(0);function Ly(r){return function(t,e){var n=e.data,i=e.resetDefines[r];if(i&&i.dataEach)for(var o=t.start;o<t.end;o++)i.dataEach(n,o);else i&&i.progress&&i.progress(t,n)}}function Py(t){return t.data.count()}var Oy,Ry={},Ny={};function Ey(t,e){for(var n in e.prototype)t[n]=zt}Ey(Ry,Sd),Ey(Ny,Cd),Ry.eachSeriesByType=Ry.eachRawSeriesByType=function(t){Oy=t},Ry.eachComponent=function(t){"series"===t.mainType&&t.subType&&(Oy=t.subType)};function zy(){return{axisLine:{lineStyle:{color:By}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}}var Rc=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],Ec={color:Rc,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],Rc]},By="#B9B8CE",Pc="#100C2A",Rc=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],Pc={darkMode:!0,color:Rc,backgroundColor:Pc,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:By}},textStyle:{color:By},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:By}},dataZoom:{borderColor:"#71708A",textStyle:{color:By},brushStyle:{color:"rgba(135,163,206,0.3)"},handleStyle:{color:"#353450",borderColor:"#C5CBE3"},moveHandleStyle:{color:"#B0B6C3",opacity:.3},fillerColor:"rgba(135,163,206,0.2)",emphasis:{handleStyle:{borderColor:"#91B7F2",color:"#4D587D"},moveHandleStyle:{color:"#636D9A",opacity:.7}},dataBackground:{lineStyle:{color:"#71708A",width:1},areaStyle:{color:"#71708A"}},selectedDataBackground:{lineStyle:{color:"#87A3CE"},areaStyle:{color:"#87A3CE"}}},visualMap:{textStyle:{color:By}},timeline:{lineStyle:{color:By},label:{color:By},controlStyle:{color:By,borderColor:By}},calendar:{itemStyle:{color:Pc},dayLabel:{color:By},monthLabel:{color:By},yearLabel:{color:By}},timeAxis:zy(),logAxis:zy(),valueAxis:zy(),categoryAxis:zy(),line:{symbol:"circle"},graph:{color:Rc},gauge:{title:{color:By},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:By},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}},Fy=(Pc.categoryAxis.splitLine.show=!1,Vy.prototype.normalizeQuery=function(t){var e,a,s,l={},u={},h={};return H(t)?(e=Yr(t),l.mainType=e.main||null,l.subType=e.sub||null):(a=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1},E(t,function(t,e){for(var n=!1,i=0;i<a.length;i++){var o=a[i],r=e.lastIndexOf(o);0<r&&r===e.length-o.length&&"data"!==(r=e.slice(0,r))&&(l.mainType=r,l[o.toLowerCase()]=t,n=!0)}s.hasOwnProperty(e)&&(u[e]=t,n=!0),n||(h[e]=t)})),{cptQuery:l,dataQuery:u,otherQuery:h}},Vy.prototype.filter=function(t,e){var n,i,o,r,a,s=this.eventInfo;return!s||(n=s.targetEl,i=s.packedEvent,o=s.model,s=s.view,!o)||!s||(r=e.cptQuery,a=e.dataQuery,l(r,o,"mainType")&&l(r,o,"subType")&&l(r,o,"index","componentIndex")&&l(r,o,"name")&&l(r,o,"id")&&l(a,i,"name")&&l(a,i,"dataIndex")&&l(a,i,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,n,i)));function l(t,e,n,i){return null==t[n]||e[i||n]===t[n]}},Vy.prototype.afterTrigger=function(){this.eventInfo=null},Vy);function Vy(){}var Hy=["symbol","symbolSize","symbolRotate","symbolOffset"],Wy=Hy.concat(["symbolKeepAspect"]),Rc={createOnAllSeries:!0,performRawSeries:!0,reset:function(a,t){var e=a.getData();if(a.legendIcon&&e.setVisual("legendIcon",a.legendIcon),a.hasSymbolVisual){for(var s,n={},l={},i=!1,o=0;o<Hy.length;o++){var r=Hy[o],u=a.get(r);D(u)?(i=!0,l[r]=u):n[r]=u}if(n.symbol=n.symbol||a.defaultSymbol,e.setVisual(P({legendIcon:a.legendIcon||n.symbol,symbolKeepAspect:a.get("symbolKeepAspect")},n)),!t.isSeriesFiltered(a))return s=ht(l),{dataEach:i?function(t,e){for(var n=a.getRawValue(e),i=a.getDataParams(e),o=0;o<s.length;o++){var r=s[o];t.setItemVisual(e,r,l[r](n,i))}}:null}}}},Gy={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(t.hasSymbolVisual&&!e.isSeriesFiltered(t))return{dataEach:t.getData().hasItemOption?function(t,e){for(var n=t.getItemModel(e),i=0;i<Wy.length;i++){var o=Wy[i],r=n.getShallow(o,!0);null!=r&&t.setItemVisual(e,o,r)}}:null}}};function Xy(t,e){switch(e){case"color":return t.getVisual("style")[t.getVisual("drawType")];case"opacity":return t.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getVisual(e)}}function Uy(r,t){E([[r+"ToggleSelect","toggleSelect"],[r+"Select","select"],[r+"UnSelect","unselect"]],function(o){t(o[0],function(t,e,n){var i;t=P({},t),n.dispatchAction(P(t,{type:o[1],seriesIndex:(n=t,i=[],e.eachComponent({mainType:"series",subType:r,query:n},function(t){i.push(t.seriesIndex)}),i)}))})})}function Yy(t,e,s,n,l){var u=t+e;s.isSilent(u)||n.eachComponent({mainType:"series",subType:"pie"},function(t){for(var e,n,i=t.seriesIndex,o=t.option.selectedMap,r=l.selected,a=0;a<r.length;a++)r[a].seriesIndex===i&&(n=Or(e=t.getData(),l.fromActionPayload),s.trigger(u,{type:u,seriesId:t.id,name:V(n)?e.getName(n[0]):e.getName(n),selected:H(o)?o:P({},o)}))})}function Zy(t,e,n){for(var i;t&&(!e(t)||(i=t,!n));)t=t.__hostTarget||t.parent;return i}var qy=Math.round(9*Math.random()),jy="function"==typeof Object.defineProperty,Ky=($y.prototype.get=function(t){return this._guard(t)[this._id]},$y.prototype.set=function(t,e){t=this._guard(t);return jy?Object.defineProperty(t,this._id,{value:e,enumerable:!1,configurable:!0}):t[this._id]=e,this},$y.prototype.delete=function(t){return!!this.has(t)&&(delete this._guard(t)[this._id],!0)},$y.prototype.has=function(t){return!!this._guard(t)[this._id]},$y.prototype._guard=function(t){if(t!==Object(t))throw TypeError("Value of WeakMap is not a non-null object.");return t},$y);function $y(){this._id="__ec_inner_"+qy++}var Qy=_s.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,i=e.cy,o=e.width/2,e=e.height/2;t.moveTo(n,i-e),t.lineTo(n+o,i+e),t.lineTo(n-o,i+e),t.closePath()}}),Jy=_s.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,i=e.cy,o=e.width/2,e=e.height/2;t.moveTo(n,i-e),t.lineTo(n+o,i),t.lineTo(n,i+e),t.lineTo(n-o,i),t.closePath()}}),tm=_s.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.x,i=e.y,o=e.width/5*3,e=Math.max(o,e.height),o=o/2,r=o*o/(e-o),e=i-e+o+r,a=Math.asin(r/o),s=Math.cos(a)*o,l=Math.sin(a),u=Math.cos(a),h=.6*o,c=.7*o;t.moveTo(n-s,e+r),t.arc(n,e,o,Math.PI-a,2*Math.PI+a),t.bezierCurveTo(n+s-l*h,e+r+u*h,n,i-c,n,i),t.bezierCurveTo(n,i-c,n-s+l*h,e+r+u*h,n-s,e+r),t.closePath()}}),em=_s.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.height,i=e.width,o=e.x,e=e.y,i=i/3*2;t.moveTo(o,e),t.lineTo(o+i,e+n),t.lineTo(o,e+n/4*3),t.lineTo(o-i,e+n),t.lineTo(o,e),t.closePath()}}),nm={line:function(t,e,n,i,o){o.x1=t,o.y1=e+i/2,o.x2=t+n,o.y2=e+i/2},rect:function(t,e,n,i,o){o.x=t,o.y=e,o.width=n,o.height=i},roundRect:function(t,e,n,i,o){o.x=t,o.y=e,o.width=n,o.height=i,o.r=Math.min(n,i)/4},square:function(t,e,n,i,o){n=Math.min(n,i);o.x=t,o.y=e,o.width=n,o.height=n},circle:function(t,e,n,i,o){o.cx=t+n/2,o.cy=e+i/2,o.r=Math.min(n,i)/2},diamond:function(t,e,n,i,o){o.cx=t+n/2,o.cy=e+i/2,o.width=n,o.height=i},pin:function(t,e,n,i,o){o.x=t+n/2,o.y=e+i/2,o.width=n,o.height=i},arrow:function(t,e,n,i,o){o.x=t+n/2,o.y=e+i/2,o.width=n,o.height=i},triangle:function(t,e,n,i,o){o.cx=t+n/2,o.cy=e+i/2,o.width=n,o.height=i}},im={},om=(E({line:nh,rect:Es,roundRect:Es,square:Es,circle:mu,diamond:Jy,pin:tm,arrow:em,triangle:Qy},function(t,e){im[e]=new t}),_s.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,e,n){var t=ko(t,e,n),i=this.shape;return i&&"pin"===i.symbolType&&"inside"===e.position&&(t.y=n.y+.4*n.height),t},buildPath:function(t,e,n){var i,o=e.symbolType;"none"!==o&&(i=(i=im[o])||im[o="rect"],nm[o](e.x,e.y,e.width,e.height,i.shape),i.buildPath(t,i.shape,n))}}));function rm(t,e){var n;"image"!==this.type&&(n=this.style,this.__isEmptyBrush?(n.stroke=t,n.fill=e||"#fff",n.lineWidth=2):"line"===this.shape.symbolType?n.stroke=t:n.fill=t,this.markRedraw())}function am(t,e,n,i,o,r,a){var s=0===t.indexOf("empty");return(a=0===(t=s?t.substr(5,1).toLowerCase()+t.substr(6):t).indexOf("image://")?$h(t.slice(8),new G(e,n,i,o),a?"center":"cover"):0===t.indexOf("path://")?Kh(t.slice(7),{},new G(e,n,i,o),a?"center":"cover"):new om({shape:{symbolType:t,x:e,y:n,width:i,height:o}})).__isEmptyBrush=s,a.setColor=rm,r&&a.setColor(r),a}function sm(t){return[(t=V(t)?t:[+t,+t])[0]||0,t[1]||0]}function lm(t,e){if(null!=t)return[er((t=V(t)?t:[t,t])[0],e[0])||0,er(R(t[1],t[0]),e[1])||0]}function um(t){return isFinite(t)}function hm(t,e,n){for(var i,o,r,a,s,l,u,h,c,p="radial"===e.type?(i=t,o=e,a=(r=n).width,s=r.height,l=Math.min(a,s),u=null==o.x?.5:o.x,h=null==o.y?.5:o.y,c=null==o.r?.5:o.r,o.global||(u=u*a+r.x,h=h*s+r.y,c*=l),u=um(u)?u:.5,h=um(h)?h:.5,c=0<=c&&um(c)?c:.5,i.createRadialGradient(u,h,0,u,h,c)):(o=t,a=n,r=null==(s=e).x?0:s.x,l=null==s.x2?1:s.x2,i=null==s.y?0:s.y,u=null==s.y2?0:s.y2,s.global||(r=r*a.width+a.x,l=l*a.width+a.x,i=i*a.height+a.y,u=u*a.height+a.y),r=um(r)?r:0,l=um(l)?l:1,i=um(i)?i:0,u=um(u)?u:0,o.createLinearGradient(r,i,l,u)),d=e.colorStops,f=0;f<d.length;f++)p.addColorStop(d[f].offset,d[f].color);return p}function cm(t){return parseInt(t,10)}function pm(t,e,n){var i=["width","height"][e],o=["clientWidth","clientHeight"][e],r=["paddingLeft","paddingTop"][e],e=["paddingRight","paddingBottom"][e];return null!=n[i]&&"auto"!==n[i]?parseFloat(n[i]):(n=document.defaultView.getComputedStyle(t),(t[o]||cm(n[i])||cm(t.style[i]))-(cm(n[r])||0)-(cm(n[e])||0)|0)}function dm(t){var e,n=t.style,i=n.lineDash&&0<n.lineWidth&&(o=n.lineDash,i=n.lineWidth,o&&"solid"!==o&&0<i?"dashed"===o?[4*i,2*i]:"dotted"===o?[i]:W(o)?[o]:V(o)?o:null:null),o=n.lineDashOffset;return i&&(e=n.strokeNoScale&&t.getLineScale?t.getLineScale():1)&&1!==e&&(i=F(i,function(t){return t/e}),o/=e),[i,o]}var fm=new es(!0);function gm(t){var e=t.stroke;return!(null==e||"none"===e||!(0<t.lineWidth))}function ym(t){return"string"==typeof t&&"none"!==t}function mm(t){t=t.fill;return null!=t&&"none"!==t}function vm(t,e){var n;null!=e.fillOpacity&&1!==e.fillOpacity?(n=t.globalAlpha,t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=n):t.fill()}function _m(t,e){var n;null!=e.strokeOpacity&&1!==e.strokeOpacity?(n=t.globalAlpha,t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=n):t.stroke()}function xm(t,e,n){var n=oa(e.image,e.__image,n);if(aa(n))return t=t.createPattern(n,e.repeat||"repeat"),"function"==typeof DOMMatrix&&t&&t.setTransform&&((n=new DOMMatrix).translateSelf(e.x||0,e.y||0),n.rotateSelf(0,0,(e.rotation||0)*Bt),n.scaleSelf(e.scaleX||1,e.scaleY||1),t.setTransform(n)),t}var wm=["shadowBlur","shadowOffsetX","shadowOffsetY"],bm=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function Sm(t,e,n,i,o){var r,a=!1;if(!i&&e===(n=n||{}))return!1;!i&&e.opacity===n.opacity||(Am(t,o),a=!0,r=Math.max(Math.min(e.opacity,1),0),t.globalAlpha=isNaN(r)?xa.opacity:r),!i&&e.blend===n.blend||(a||(Am(t,o),a=!0),t.globalCompositeOperation=e.blend||xa.blend);for(var s=0;s<wm.length;s++){var l=wm[s];!i&&e[l]===n[l]||(a||(Am(t,o),a=!0),t[l]=t.dpr*(e[l]||0))}return!i&&e.shadowColor===n.shadowColor||(a||(Am(t,o),a=!0),t.shadowColor=e.shadowColor||xa.shadowColor),a}function Mm(t,e,n,i,o){var r=Lm(e,o.inHover),a=i?null:n&&Lm(n,o.inHover)||{};if(r!==a){var s=Sm(t,r,a,i,o);(i||r.fill!==a.fill)&&(s||(Am(t,o),s=!0),ym(r.fill))&&(t.fillStyle=r.fill),(i||r.stroke!==a.stroke)&&(s||(Am(t,o),s=!0),ym(r.stroke))&&(t.strokeStyle=r.stroke),!i&&r.opacity===a.opacity||(s||(Am(t,o),s=!0),t.globalAlpha=null==r.opacity?1:r.opacity),e.hasStroke()&&(n=r.lineWidth/(r.strokeNoScale&&e.getLineScale?e.getLineScale():1),t.lineWidth!==n)&&(s||(Am(t,o),s=!0),t.lineWidth=n);for(var l=0;l<bm.length;l++){var u=bm[l],h=u[0];!i&&r[h]===a[h]||(s||(Am(t,o),s=!0),t[h]=r[h]||u[1])}}}function Tm(t,e){var e=e.transform,n=t.dpr||1;e?t.setTransform(n*e[0],n*e[1],n*e[2],n*e[3],n*e[4],n*e[5]):t.setTransform(n,0,0,n,0,0)}var Im=1,Cm=2,Dm=3,km=4;function Am(t,e){e.batchFill&&t.fill(),e.batchStroke&&t.stroke(),e.batchFill="",e.batchStroke=""}function Lm(t,e){return e&&t.__hoverStyle||t.style}function Pm(t,e){Om(t,e,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function Om(t,e,n,E){var i=e.transform;if(!e.shouldBePainted(n.viewWidth,n.viewHeight,!1,!1))return e.__dirty&=~mn,e.__isRendered=!1;var o,r,a,s,l,u,h,c,p,d,f,g,y,m,v,_,x,w,b,S,M,T,I,C=e.__clipPaths,D=n.prevElClipPaths,k=!1,A=!1;if(!D||function(t,e){if(t!==e&&(t||e)){if(!t||!e||t.length!==e.length)return 1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return 1}}(C,D)){if(D&&D.length&&(Am(t,n),t.restore(),A=k=!0,n.prevElClipPaths=null,n.allClipped=!1,n.prevEl=null),C&&C.length){Am(t,n),t.save();var z=C,B=t;D=n;for(var F=!1,V=0;V<z.length;V++){var H=z[V],F=F||H.isZeroArea();Tm(B,H),B.beginPath(),H.buildPath(B,H.shape),B.clip()}D.allClipped=F,k=!0}n.prevElClipPaths=C}if(n.allClipped)e.__isRendered=!1;else{e.beforeBrush&&e.beforeBrush(),e.innerBeforeBrush();var D=n.prevEl,L=(D||(A=k=!0),e instanceof _s&&e.autoBatch&&(C=e.style,L=mm(C),I=gm(C),!(C.lineDash||!(+L^+I)||L&&"string"!=typeof C.fill||I&&"string"!=typeof C.stroke||C.strokePercent<1||C.strokeOpacity<1||C.fillOpacity<1))),k=(k||(I=i,C=D.transform,I&&C?I[0]!==C[0]||I[1]!==C[1]||I[2]!==C[2]||I[3]!==C[3]||I[4]!==C[4]||I[5]!==C[5]:I||C)?(Am(t,n),Tm(t,e)):L||Am(t,n),Lm(e,n.inHover));if(e instanceof _s)n.lastDrawType!==Im&&(A=!0,n.lastDrawType=Im),Mm(t,e,D,A,n),L&&(n.batchFill||n.batchStroke)||t.beginPath(),i=t,C=e,O=L,y=gm(a=k),m=mm(a),v=a.strokePercent,_=v<1,x=!C.path,C.silent&&!_||!x||C.createPathProxy(),w=C.path||fm,b=C.__dirty,O||(s=a.fill,T=a.stroke,l=m&&!!s.colorStops,u=y&&!!T.colorStops,h=m&&!!s.image,c=y&&!!T.image,M=g=f=d=p=void 0,(l||u)&&(M=C.getBoundingRect()),l&&(p=b?hm(i,s,M):C.__canvasFillGradient,C.__canvasFillGradient=p),u&&(d=b?hm(i,T,M):C.__canvasStrokeGradient,C.__canvasStrokeGradient=d),h&&(f=b||!C.__canvasFillPattern?xm(i,s,C):C.__canvasFillPattern,C.__canvasFillPattern=f),c&&(g=b||!C.__canvasStrokePattern?xm(i,T,C):C.__canvasStrokePattern,C.__canvasStrokePattern=f),l?i.fillStyle=p:h&&(f?i.fillStyle=f:m=!1),u?i.strokeStyle=d:c&&(g?i.strokeStyle=g:y=!1)),M=C.getGlobalScale(),w.setScale(M[0],M[1],C.segmentIgnoreThreshold),i.setLineDash&&a.lineDash&&(S=(s=dm(C))[0],P=s[1]),T=!0,(x||b&vn)&&(w.setDPR(i.dpr),_?w.setContext(null):(w.setContext(i),T=!1),w.reset(),C.buildPath(w,C.shape,O),w.toStatic(),C.pathUpdated()),T&&w.rebuildPath(i,_?v:1),S&&(i.setLineDash(S),i.lineDashOffset=P),O||(a.strokeFirst?(y&&_m(i,a),m&&vm(i,a)):(m&&vm(i,a),y&&_m(i,a))),S&&i.setLineDash([]),L&&(n.batchFill=k.fill||"",n.batchStroke=k.stroke||"");else if(e instanceof bs)n.lastDrawType!==Dm&&(A=!0,n.lastDrawType=Dm),Mm(t,e,D,A,n),l=t,p=e,null!=(f=(h=k).text)&&(f+=""),f&&(l.font=h.font||j,l.textAlign=h.textAlign,l.textBaseline=h.textBaseline,d=u=void 0,l.setLineDash&&h.lineDash&&(u=(p=dm(p))[0],d=p[1]),u&&(l.setLineDash(u),l.lineDashOffset=d),h.strokeFirst?(gm(h)&&l.strokeText(f,h.x,h.y),mm(h)&&l.fillText(f,h.x,h.y)):(mm(h)&&l.fillText(f,h.x,h.y),gm(h)&&l.strokeText(f,h.x,h.y)),u)&&l.setLineDash([]);else if(e instanceof Cs)n.lastDrawType!==Cm&&(A=!0,n.lastDrawType=Cm),c=D,g=A,Sm(t,Lm(e,(M=n).inHover),c&&Lm(c,M.inHover),g,M),s=t,x=k,(C=(b=e).__image=oa(x.image,b.__image,b,b.onload))&&aa(C)&&(T=x.x||0,w=x.y||0,_=b.getWidth(),b=b.getHeight(),v=C.width/C.height,null==_&&null!=b?_=b*v:null==b&&null!=_?b=_/v:null==_&&null==b&&(_=C.width,b=C.height),x.sWidth&&x.sHeight?(o=x.sx||0,r=x.sy||0,s.drawImage(C,o,r,x.sWidth,x.sHeight,T,w,_,b)):x.sx&&x.sy?(v=_-(o=x.sx),x=b-(r=x.sy),s.drawImage(C,o,r,v,x,T,w,_,b)):s.drawImage(C,T,w,_,b));else if(e.getTemporalDisplayables){n.lastDrawType!==km&&(A=!0,n.lastDrawType=km);{var W=t;var P=e;var O=n;var G=P.getDisplayables(),X=P.getTemporalDisplayables();W.save();var R,U,Y={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:O.viewWidth,viewHeight:O.viewHeight,inHover:O.inHover};for(R=P.getCursor(),U=G.length;R<U;R++)(N=G[R]).beforeBrush&&N.beforeBrush(),N.innerBeforeBrush(),Om(W,N,Y,R===U-1),N.innerAfterBrush(),N.afterBrush&&N.afterBrush(),Y.prevEl=N;for(var N,Z=0,q=X.length;Z<q;Z++)(N=X[Z]).beforeBrush&&N.beforeBrush(),N.innerBeforeBrush(),Om(W,N,Y,Z===q-1),N.innerAfterBrush(),N.afterBrush&&N.afterBrush(),Y.prevEl=N;P.clearTemporalDisplayables(),P.notClear=!0,W.restore()}}L&&E&&Am(t,n),e.innerAfterBrush(),e.afterBrush&&e.afterBrush(),(n.prevEl=e).__dirty=0,e.__isRendered=!0}}var Rm=new Ky,Nm=new ti(100),Em=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function zm(t,e){if("none"===t)return null;var n=e.getDevicePixelRatio(),i=e.getZr(),o="svg"===i.painter.type,e=(t.dirty&&Rm.delete(t),Rm.get(t));if(e)return e;for(var r,a=B(t,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512}),e=("none"===a.backgroundColor&&(a.backgroundColor=null),{repeat:"repeat"}),s=e,l=[n],u=!0,h=0;h<Em.length;++h){var c=a[Em[h]];if(null!=c&&!V(c)&&!H(c)&&!W(c)&&"boolean"!=typeof c){u=!1;break}l.push(c)}u&&(r=l.join(",")+(o?"-svg":""),v=Nm.get(r))&&(o?s.svgElement=v:s.image=v);var p,d=function t(e){if(!e||0===e.length)return[[0,0]];if(W(e))return[[r=Math.ceil(e),r]];for(var n=!0,i=0;i<e.length;++i)if(!W(e[i])){n=!1;break}if(n)return t([e]);var o=[];for(i=0;i<e.length;++i){var r;W(e[i])?(r=Math.ceil(e[i]),o.push([r,r])):(r=F(e[i],function(t){return Math.ceil(t)})).length%2==1?o.push(r.concat(r)):o.push(r)}return o}(a.dashArrayX),f=function(t){if(!t||"object"==typeof t&&0===t.length)return[0,0];if(W(t))return[e=Math.ceil(t),e];var e=F(t,function(t){return Math.ceil(t)});return t.length%2?e.concat(e):e}(a.dashArrayY),g=function t(e){if(!e||0===e.length)return[["rect"]];if(H(e))return[[e]];for(var n=!0,i=0;i<e.length;++i)if(!H(e[i])){n=!1;break}if(n)return t([e]);var o=[];for(i=0;i<e.length;++i)H(e[i])?o.push([e[i]]):o.push(e[i]);return o}(a.symbol),y=F(d,Bm),m=Bm(f),v=!o&&X.createCanvas(),_=o&&{tag:"g",attrs:{},key:"dcl",children:[]},x=function(){for(var t=1,e=0,n=y.length;e<n;++e)t=vr(t,y[e]);for(var i=1,e=0,n=g.length;e<n;++e)i=vr(i,g[e].length);t*=i;var o=m*y.length*g.length;return{width:Math.max(1,Math.min(t,a.maxTileWidth)),height:Math.max(1,Math.min(o,a.maxTileHeight))}}();v&&(v.width=x.width*n,v.height=x.height*n,p=v.getContext("2d")),p&&(p.clearRect(0,0,v.width,v.height),a.backgroundColor)&&(p.fillStyle=a.backgroundColor,p.fillRect(0,0,v.width,v.height));for(var w=0,b=0;b<f.length;++b)w+=f[b];if(!(w<=0))for(var S,M=-m,T=0,I=0,C=0;M<x.height;){if(T%2==0){for(var D=I/2%g.length,k=0,A=0,L=0;k<2*x.width;){for(var P,O,R,E,N,z=0,b=0;b<d[C].length;++b)z+=d[C][b];if(z<=0)break;A%2==0&&(O=.5*(1-a.symbolSize),P=k+d[C][A]*O,O=M+f[T]*O,R=d[C][A]*a.symbolSize,E=f[T]*a.symbolSize,N=L/2%g[D].length,P=P,N=g[D][N],S=void 0,N=am(N,P*(S=o?1:n),O*S,R*S,E*S,a.color,a.symbolKeepAspect),o?(P=i.painter.renderOneToVNode(N))&&_.children.push(P):Pm(p,N)),k+=d[C][A],++L,++A===d[C].length&&(A=0)}++C===d.length&&(C=0)}M+=f[T],++I,++T===f.length&&(T=0)}return u&&Nm.put(r,v||_),s.image=v,s.svgElement=_,s.svgWidth=x.width,s.svgHeight=x.height,e.rotation=a.rotation,e.scaleX=e.scaleY=o?1:1/n,Rm.set(t,e),t.dirty=!1,e}function Bm(t){for(var e=0,n=0;n<t.length;++n)e+=t[n];return t.length%2==1?2*e:e}var Fm=new ae,Vm={};var Jy={PROCESSOR:{FILTER:1e3,SERIES_FILTER:800,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,PROGRESSIVE_LAYOUT:1100,GLOBAL:2e3,CHART:3e3,POST_CHART_LAYOUT:4600,COMPONENT:4e3,BRUSH:5e3,CHART_ITEM:4500,ARIA:6e3,DECAL:7e3}},Hm="__flagInMainProcess",Wm="__pendingUpdate",Gm="__needsUpdateStatus",Xm=/^[a-zA-Z0-9_]+$/,Um="__connectUpdateStatus";function Ym(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(!this.isDisposed())return qm(this,n,t);this.id}}function Zm(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return qm(this,n,t)}}function qm(t,e,n){return n[0]=n[0]&&n[0].toLowerCase(),ae.prototype[e].apply(t,n)}u(g0,d0=ae);var jm,Km,$m,Qm,Jm,t0,e0,n0,i0,o0,r0,a0,s0,l0,u0,h0,c0,p0,d0,f0=g0,tm=f0.prototype;function g0(){return null!==d0&&d0.apply(this,arguments)||this}tm.on=Zm("on"),tm.off=Zm("off");u(h,y0=ae),h.prototype._onframe=function(){if(!this._disposed){p0(this);var t=this._scheduler;if(this[Wm]){var e=this[Wm].silent;this[Hm]=!0;try{jm(this),Qm.update.call(this,null,this[Wm].updateParams)}catch(t){throw this[Hm]=!1,this[Wm]=null,t}this._zr.flush(),this[Hm]=!1,this[Wm]=null,n0.call(this,e),i0.call(this,e)}else if(t.unfinished){var n=1,i=this._model,o=this._api;t.unfinished=!1;do{var r=+new Date}while(t.performSeriesTasks(i),t.performDataProcessorTasks(i),t0(this,i),t.performVisualTasks(i),l0(this,this._model,o,"remain",{}),0<(n-=+new Date-r)&&t.unfinished);t.unfinished||this._zr.flush()}}},h.prototype.getDom=function(){return this._dom},h.prototype.getId=function(){return this.id},h.prototype.getZr=function(){return this._zr},h.prototype.isSSR=function(){return this._ssr},h.prototype.setOption=function(t,e,n){if(!this[Hm])if(this._disposed)this.id;else{O(e)&&(n=e.lazyUpdate,i=e.silent,o=e.replaceMerge,r=e.transition,e=e.notMerge),this[Hm]=!0,this._model&&!e||(e=new Od(this._api),a=this._theme,(s=this._model=new Sd).scheduler=this._scheduler,s.ssr=this._ssr,s.init(null,null,null,a,this._locale,e)),this._model.setOption(t,{replaceMerge:o},C0);var i,o,r,a,s={seriesTransition:r,optionChanged:!0};if(n)this[Wm]={silent:i,updateParams:s},this[Hm]=!1,this.getZr().wakeUp();else{try{jm(this),Qm.update.call(this,null,s)}catch(t){throw this[Wm]=null,this[Hm]=!1,t}this._ssr||this._zr.flush(),this[Wm]=null,this[Hm]=!1,n0.call(this,i),i0.call(this,i)}}},h.prototype.setTheme=function(){},h.prototype.getModel=function(){return this._model},h.prototype.getOption=function(){return this._model&&this._model.getOption()},h.prototype.getWidth=function(){return this._zr.getWidth()},h.prototype.getHeight=function(){return this._zr.getHeight()},h.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||b.hasGlobalWindow&&window.devicePixelRatio||1},h.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},h.prototype.renderToCanvas=function(t){return this._zr.painter.getRenderedCanvas({backgroundColor:(t=t||{}).backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},h.prototype.renderToSVGString=function(t){return this._zr.painter.renderToString({useViewBox:(t=t||{}).useViewBox})},h.prototype.getSvgDataURL=function(){var t;if(b.svgSupported)return E((t=this._zr).storage.getDisplayList(),function(t){t.stopAnimation(null,!0)}),t.painter.toDataURL()},h.prototype.getDataURL=function(t){var e,n,i,o;if(!this._disposed)return o=(t=t||{}).excludeComponents,e=this._model,n=[],i=this,E(o,function(t){e.eachComponent({mainType:t},function(t){t=i._componentsMap[t.__viewId];t.group.ignore||(n.push(t),t.group.ignore=!0)})}),o="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png")),E(n,function(t){t.group.ignore=!1}),o;this.id},h.prototype.getConnectedDataURL=function(i){var o,r,a,s,l,u,h,c,p,e,t,n,d,f,g;if(!this._disposed)return o="svg"===i.type,r=this.group,a=Math.min,s=Math.max,P0[r]?(u=l=1/0,c=h=-1/0,p=[],e=i&&i.pixelRatio||this.getDevicePixelRatio(),E(L0,function(t,e){var n;t.group===r&&(n=o?t.getZr().painter.getSvgDom().innerHTML:t.renderToCanvas(y(i)),t=t.getDom().getBoundingClientRect(),l=a(t.left,l),u=a(t.top,u),h=s(t.right,h),c=s(t.bottom,c),p.push({dom:n,left:t.left,top:t.top}))}),t=(h*=e)-(l*=e),n=(c*=e)-(u*=e),d=X.createCanvas(),(f=jo(d,{renderer:o?"svg":"canvas"})).resize({width:t,height:n}),o?(g="",E(p,function(t){var e=t.left-l,n=t.top-u;g+='<g transform="translate('+e+","+n+')">'+t.dom+"</g>"}),f.painter.getSvgRoot().innerHTML=g,i.connectedBackgroundColor&&f.painter.setBackgroundColor(i.connectedBackgroundColor),f.refreshImmediately(),f.painter.toDataURL()):(i.connectedBackgroundColor&&f.add(new Es({shape:{x:0,y:0,width:t,height:n},style:{fill:i.connectedBackgroundColor}})),E(p,function(t){t=new Cs({style:{x:t.left*e-l,y:t.top*e-u,image:t.dom}});f.add(t)}),f.refreshImmediately(),d.toDataURL("image/"+(i&&i.type||"png")))):this.getDataURL(i);this.id},h.prototype.convertToPixel=function(t,e){return Jm(this,"convertToPixel",t,e)},h.prototype.convertFromPixel=function(t,e){return Jm(this,"convertFromPixel",t,e)},h.prototype.containPixel=function(t,i){var o;if(!this._disposed)return E(Er(this._model,t),function(t,n){0<=n.indexOf("Models")&&E(t,function(t){var e=t.coordinateSystem;e&&e.containPoint?o=o||!!e.containPoint(i):"seriesModels"===n&&(e=this._chartsMap[t.__viewId])&&e.containPoint&&(o=o||e.containPoint(i,t))},this)},this),!!o;this.id},h.prototype.getVisual=function(t,e){var t=Er(this._model,t,{defaultMainType:"series"}),n=t.seriesModel.getData(),t=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?n.indexOfRawIndex(t.dataIndex):null;if(null==t)return Xy(n,e);var i=n,o=t,r=e;switch(r){case"color":return i.getItemVisual(o,"style")[i.getVisual("drawType")];case"opacity":return i.getItemVisual(o,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return i.getItemVisual(o,r)}},h.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},h.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},h.prototype._initEvents=function(){var t,n,i,s=this;E(S0,function(a){function t(t){var n,e,i,o=s.getModel(),r=t.target;"globalout"===a?n={}:r&&Zy(r,function(t){var e,t=k(t);return t&&null!=t.dataIndex?(e=t.dataModel||o.getSeriesByIndex(t.seriesIndex),n=e&&e.getDataParams(t.dataIndex,t.dataType,r)||{},1):t.eventData&&(n=P({},t.eventData),1)},!0),n&&(e=n.componentType,i=n.componentIndex,"markLine"!==e&&"markPoint"!==e&&"markArea"!==e||(e="series",i=n.seriesIndex),i=(e=e&&null!=i&&o.getComponent(e,i))&&s["series"===e.mainType?"_chartsMap":"_componentsMap"][e.__viewId],n.event=t,n.type=a,s._$eventProcessor.eventInfo={targetEl:r,packedEvent:n,model:e,view:i},s.trigger(a,n))}t.zrEventfulCallAtLast=!0,s._zr.on(a,t,s)}),E(T0,function(t,e){s._messageCenter.on(e,function(t){this.trigger(e,t)},s)}),E(["selectchanged"],function(e){s._messageCenter.on(e,function(t){this.trigger(e,t)},s)}),t=this._messageCenter,i=(n=this)._api,t.on("selectchanged",function(t){var e=i.getModel();t.isFromClick?(Yy("map","selectchanged",n,e,t),Yy("pie","selectchanged",n,e,t)):"select"===t.fromAction?(Yy("map","selected",n,e,t),Yy("pie","selected",n,e,t)):"unselect"===t.fromAction&&(Yy("map","unselected",n,e,t),Yy("pie","unselected",n,e,t))})},h.prototype.isDisposed=function(){return this._disposed},h.prototype.clear=function(){this._disposed?this.id:this.setOption({series:[]},!0)},h.prototype.dispose=function(){var t,e,n;this._disposed?this.id:(this._disposed=!0,this.getDom()&&Hr(this.getDom(),N0,""),e=(t=this)._api,n=t._model,E(t._componentsViews,function(t){t.dispose(n,e)}),E(t._chartsViews,function(t){t.dispose(n,e)}),t._zr.dispose(),t._dom=t._model=t._chartsMap=t._componentsMap=t._chartsViews=t._componentsViews=t._scheduler=t._api=t._zr=t._throttledZrFlush=t._theme=t._coordSysMgr=t._messageCenter=null,delete L0[t.id])},h.prototype.resize=function(t){if(!this[Hm])if(this._disposed)this.id;else{this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var e=e.resetOption("media"),n=t&&t.silent;this[Wm]&&(null==n&&(n=this[Wm].silent),e=!0,this[Wm]=null),this[Hm]=!0;try{e&&jm(this),Qm.update.call(this,{type:"resize",animation:P({duration:0},t&&t.animation)})}catch(t){throw this[Hm]=!1,t}this[Hm]=!1,n0.call(this,n),i0.call(this,n)}}},h.prototype.showLoading=function(t,e){this._disposed?this.id:(O(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),A0[t]&&(t=A0[t](this._api,e),e=this._zr,this._loadingFX=t,e.add(t)))},h.prototype.hideLoading=function(){this._disposed?this.id:(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},h.prototype.makeActionFromEvent=function(t){var e=P({},t);return e.type=T0[t.type],e},h.prototype.dispatchAction=function(t,e){var n;this._disposed?this.id:(O(e)||(e={silent:!!e}),M0[t.type]&&this._model&&(this[Hm]?this._pendingActions.push(t):(n=e.silent,e0.call(this,t,n),(t=e.flush)?this._zr.flush():!1!==t&&b.browser.weChat&&this._throttledZrFlush(),n0.call(this,n),i0.call(this,n))))},h.prototype.updateLabelLayout=function(){Fm.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},h.prototype.appendData=function(t){var e;this._disposed?this.id:(e=t.seriesIndex,this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp())},h.internalField=(jm=function(t){var e=t._scheduler;e.restorePipelines(t._model),e.prepareStageTasks(),Km(t,!0),Km(t,!1),e.plan()},Km=function(t,o){for(var r=t._model,a=t._scheduler,s=o?t._componentsViews:t._chartsViews,l=o?t._componentsMap:t._chartsMap,u=t._zr,h=t._api,e=0;e<s.length;e++)s[e].__alive=!1;function n(t){var e,n=t.__requireNewView,i=(t.__requireNewView=!1,"_ec_"+t.id+"_"+t.type),n=!n&&l[i];n||(e=Yr(t.type),(n=new(o?$g.getClass(e.main,e.sub):ny.getClass(e.sub))).init(r,h),l[i]=n,s.push(n),u.add(n.group)),t.__viewId=n.__id=i,n.__alive=!0,n.__model=t,n.group.__ecComponentInfo={mainType:t.mainType,index:t.componentIndex},o||a.prepareView(n,t,r,h)}for(o?r.eachComponent(function(t,e){"series"!==t&&n(e)}):r.eachSeries(n),e=0;e<s.length;){var i=s[e];i.__alive?e++:(o||i.renderTask.dispose(),u.remove(i.group),i.dispose(r,h),s.splice(e,1),l[i.__id]===i&&delete l[i.__id],i.__id=i.group.__ecComponentInfo=null)}},$m=function(p,e,d,n,t){var i,f,o=p._model;function r(t){t&&t.__alive&&t[e]&&t[e](t.__model,o,p._api,d)}o.setUpdatePayload(d),n?((i={})[n+"Id"]=d[n+"Id"],i[n+"Index"]=d[n+"Index"],i[n+"Name"]=d[n+"Name"],i={mainType:n,query:i},t&&(i.subType=t),null!=(t=d.excludeSeriesId)&&(f=N(),E(br(t),function(t){t=kr(t,null);null!=t&&f.set(t,!0)})),o&&o.eachComponent(i,function(t){if(!f||null==f.get(t.id))if(jl(d))if(t instanceof Gg){if(d.type===ll&&!d.notBlur&&!t.get(["emphasis","disabled"])){var e=t,n=d,i=p._api,o=e.seriesIndex,r=e.getData(n.dataType);if(r){var n=(V(n=Or(r,n))?n[0]:n)||0,a=r.getItemGraphicEl(n);if(!a)for(var s=r.count(),l=0;!a&&l<s;)a=r.getItemGraphicEl(l++);a?zl(o,(n=k(a)).focus,n.blurScope,i):(n=e.get(["emphasis","focus"]),e=e.get(["emphasis","blurScope"]),null!=n&&zl(o,n,e,i))}}}else n=(o=Fl(t.mainType,t.componentIndex,d.name,p._api)).focusSelf,e=o.dispatchers,d.type===ll&&n&&!d.notBlur&&Bl(t.mainType,t.componentIndex,p._api),e&&E(e,function(t){(d.type===ll?kl:Al)(t)});else ql(d)&&t instanceof Gg&&(i=t,u=d,p._api,ql(u)&&(h=u.dataType,V(c=Or(i.getData(h),u))||(c=[c]),i[u.type===pl?"toggleSelect":u.type===hl?"select":"unselect"](c,h)),Vl(t),c0(p));var u,h,c},p),o&&o.eachComponent(i,function(t){f&&null!=f.get(t.id)||r(p["series"===n?"_chartsMap":"_componentsMap"][t.__viewId])},p)):E([].concat(p._componentsViews).concat(p._chartsViews),r)},Qm={prepareAndUpdate:function(t){jm(this),Qm.update.call(this,t,{optionChanged:null!=t.newOption})},update:function(t,e){var n=this._model,i=this._api,o=this._zr,r=this._coordSysMgr,a=this._scheduler;n&&(n.setUpdatePayload(t),a.restoreData(n,t),a.performSeriesTasks(n),r.create(n,i),a.performDataProcessorTasks(n,t),t0(this,n),r.update(n,i),v0(n),a.performVisualTasks(n,t),a0(this,n,i,t,e),r=n.get("backgroundColor")||"transparent",a=n.get("darkMode"),o.setBackgroundColor(r),null!=a&&"auto"!==a&&o.setDarkMode(a),Fm.trigger("afterupdate",n,i))},updateTransform:function(n){var i,o,r=this,a=this._model,s=this._api;a&&(a.setUpdatePayload(n),i=[],a.eachComponent(function(t,e){"series"!==t&&(t=r.getViewOfComponentModel(e))&&t.__alive&&(!t.updateTransform||(e=t.updateTransform(e,a,s,n))&&e.update)&&i.push(t)}),o=N(),a.eachSeries(function(t){var e=r._chartsMap[t.__viewId];(!e.updateTransform||(e=e.updateTransform(t,a,s,n))&&e.update)&&o.set(t.uid,1)}),v0(a),this._scheduler.performVisualTasks(a,n,{setDirty:!0,dirtyMap:o}),l0(this,a,s,n,{},o),Fm.trigger("afterupdate",a,s))},updateView:function(t){var e=this._model;e&&(e.setUpdatePayload(t),ny.markUpdateMethod(t,"updateView"),v0(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),a0(this,e,this._api,t,{}),Fm.trigger("afterupdate",e,this._api))},updateVisual:function(n){var i=this,o=this._model;o&&(o.setUpdatePayload(n),o.eachSeries(function(t){t.getData().clearAllVisual()}),ny.markUpdateMethod(n,"updateVisual"),v0(o),this._scheduler.performVisualTasks(o,n,{visualType:"visual",setDirty:!0}),o.eachComponent(function(t,e){"series"!==t&&(t=i.getViewOfComponentModel(e))&&t.__alive&&t.updateVisual(e,o,i._api,n)}),o.eachSeries(function(t){i._chartsMap[t.__viewId].updateVisual(t,o,i._api,n)}),Fm.trigger("afterupdate",o,this._api))},updateLayout:function(t){Qm.update.call(this,t)}},Jm=function(t,e,n,i){if(t._disposed)t.id;else for(var o=t._model,r=t._coordSysMgr.getCoordinateSystems(),a=Er(o,n),s=0;s<r.length;s++){var l=r[s];if(l[e]&&null!=(l=l[e](o,a,i)))return l}},t0=function(t,e){var n=t._chartsMap,i=t._scheduler;e.eachSeries(function(t){i.updateStreamModes(t,n[t.__viewId])})},e0=function(i,t){var o=this,e=this.getModel(),n=i.type,r=i.escapeConnect,a=M0[n],s=a.actionInfo,l=(s.update||"update").split(":"),u=l.pop(),h=null!=l[0]&&Yr(l[0]),l=(this[Hm]=!0,[i]),c=!1;i.batch&&(c=!0,l=F(i.batch,function(t){return(t=B(P({},t),i)).batch=null,t}));var p=[],d=ql(i),f=jl(i);if(f&&El(this._api),E(l,function(t){var e,n;(y=(y=a.action(t,o._model,o._api))||P({},t)).type=s.event||y.type,p.push(y),f?(e=(n=zr(i)).queryOptionMap,n=n.mainTypeSpecified?e.keys()[0]:"series",$m(o,u,t,n),c0(o)):d?($m(o,u,t,"series"),c0(o)):h&&$m(o,u,t,h.main,h.sub)}),"none"!==u&&!f&&!d&&!h)try{this[Wm]?(jm(this),Qm.update.call(this,i),this[Wm]=null):Qm[u].call(this,i)}catch(i){throw this[Hm]=!1,i}var g,y=c?{type:s.event||n,escapeConnect:r,batch:p}:p[0];this[Hm]=!1,t||((l=this._messageCenter).trigger(y.type,y),d&&(c={type:"selectchanged",escapeConnect:r,selected:(g=[],e.eachSeries(function(n){E(n.getAllData(),function(t){t.data;var t=t.type,e=n.getSelectedDataIndices();0<e.length&&(e={dataIndex:e,seriesIndex:n.seriesIndex},null!=t&&(e.dataType=t),g.push(e))})}),g),isFromClick:i.isFromClick||!1,fromAction:i.type,fromActionPayload:i},l.trigger(c.type,c)))},n0=function(t){for(var e=this._pendingActions;e.length;){var n=e.shift();e0.call(this,n,t)}},i0=function(t){t||this.trigger("updated")},o0=function(e,n){e.on("rendered",function(t){n.trigger("rendered",t),!e.animation.isFinished()||n[Wm]||n._scheduler.unfinished||n._pendingActions.length||n.trigger("finished")})},r0=function(t,a){t.on("mouseover",function(t){var e,n,i,o,r=Zy(t.target,Zl);r&&(r=r,e=t,t=a._api,n=k(r),i=(o=Fl(n.componentMainType,n.componentIndex,n.componentHighDownName,t)).dispatchers,o=o.focusSelf,i?(o&&Bl(n.componentMainType,n.componentIndex,t),E(i,function(t){return Cl(t,e)})):(zl(n.seriesIndex,n.focus,n.blurScope,t),"self"===n.focus&&Bl(n.componentMainType,n.componentIndex,t),Cl(r,e)),c0(a))}).on("mouseout",function(t){var e,n,i=Zy(t.target,Zl);i&&(i=i,e=t,El(t=a._api),(n=Fl((n=k(i)).componentMainType,n.componentIndex,n.componentHighDownName,t).dispatchers)?E(n,function(t){return Dl(t,e)}):Dl(i,e),c0(a))}).on("click",function(t){var e,t=Zy(t.target,function(t){return null!=k(t).dataIndex},!0);t&&(e=t.selected?"unselect":"select",t=k(t),a._api.dispatchAction({type:e,dataType:t.dataType,dataIndexInside:t.dataIndex,seriesIndex:t.seriesIndex,isFromClick:!0}))})},a0=function(t,e,n,i,o){var r,a,s,l,u,h,c;u=[],c=!(h=[]),(r=e).eachComponent(function(t,e){var n=e.get("zlevel")||0,i=e.get("z")||0,o=e.getZLevelKey();c=c||!!o,("series"===t?h:u).push({zlevel:n,z:i,idx:e.componentIndex,type:t,key:o})}),c&&(yn(l=u.concat(h),function(t,e){return t.zlevel===e.zlevel?t.z-e.z:t.zlevel-e.zlevel}),E(l,function(t){var e=r.getComponent(t.type,t.idx),n=t.zlevel,t=t.key;null!=a&&(n=Math.max(a,n)),t?(n===a&&t!==s&&n++,s=t):s&&(n===a&&n++,s=""),a=n,e.setZLevel(n)})),s0(t,e,n,i,o),E(t._chartsViews,function(t){t.__alive=!1}),l0(t,e,n,i,o),E(t._chartsViews,function(t){t.__alive||t.remove(e,n)})},s0=function(t,n,i,o,e,r){E(r||t._componentsViews,function(t){var e=t.__model;w0(0,t),t.render(e,n,i,o),x0(e,t),b0(e,t)})},l0=function(o,t,e,r,n,a){var i,s,l,u,h=o._scheduler,c=(n=P(n||{},{updatedSeries:t.getSeries()}),Fm.trigger("series:beforeupdate",t,e,n),!1);t.eachSeries(function(t){var e,n=o._chartsMap[t.__viewId],i=(n.__alive=!0,n.renderTask);h.updatePayload(i,r),w0(0,n),a&&a.get(t.uid)&&i.dirty(),i.perform(h.getPerformArgs(i))&&(c=!0),n.group.silent=!!t.get("silent"),i=n,e=t.get("blendMode")||null,i.eachRendered(function(t){t.isGroup||(t.style.blend=e)}),Vl(t)}),h.unfinished=c||h.unfinished,Fm.trigger("series:layoutlabels",t,e,n),Fm.trigger("series:transition",t,e,n),t.eachSeries(function(t){var e=o._chartsMap[t.__viewId];x0(t,e),b0(t,e)}),s=t,l=(i=o)._zr.storage,u=0,l.traverse(function(t){t.isGroup||u++}),u>s.get("hoverLayerThreshold")&&!b.node&&!b.worker&&s.eachSeries(function(t){t.preventUsingHoverLayer||(t=i._chartsMap[t.__viewId]).__alive&&t.eachRendered(function(t){t.states.emphasis&&(t.states.emphasis.hoverLayer=!0)})}),Fm.trigger("series:afterupdate",t,e,n)},c0=function(t){t[Gm]=!0,t.getZr().wakeUp()},p0=function(t){t[Gm]&&(t.getZr().storage.traverse(function(t){zh(t)||_0(t)}),t[Gm]=!1)},u0=function(n){return u(t,e=Cd),t.prototype.getCoordinateSystems=function(){return n._coordSysMgr.getCoordinateSystems()},t.prototype.getComponentByElement=function(t){for(;t;){var e=t.__ecComponentInfo;if(null!=e)return n._model.getComponent(e.mainType,e.index);t=t.parent}},t.prototype.enterEmphasis=function(t,e){kl(t,e),c0(n)},t.prototype.leaveEmphasis=function(t,e){Al(t,e),c0(n)},t.prototype.enterBlur=function(t){Ll(t),c0(n)},t.prototype.leaveBlur=function(t){Pl(t),c0(n)},t.prototype.enterSelect=function(t){Ol(t),c0(n)},t.prototype.leaveSelect=function(t){Rl(t),c0(n)},t.prototype.getModel=function(){return n.getModel()},t.prototype.getViewOfComponentModel=function(t){return n.getViewOfComponentModel(t)},t.prototype.getViewOfSeriesModel=function(t){return n.getViewOfSeriesModel(t)},new t(n);function t(){return null!==e&&e.apply(this,arguments)||this}var e},void(h0=function(i){function o(t,e){for(var n=0;n<t.length;n++)t[n][Um]=e}E(T0,function(t,e){i._messageCenter.on(e,function(t){var e,n;!P0[i.group]||0===i[Um]||t&&t.escapeConnect||(e=i.makeActionFromEvent(t),n=[],E(L0,function(t){t!==i&&t.group===i.group&&n.push(t)}),o(n,0),E(n,function(t){1!==t[Um]&&t.dispatchAction(e)}),o(n,2))})})}));var y0,m0=h,em=m0.prototype;function h(t,e,n){var i=y0.call(this,new Fy)||this,t=(i._chartsViews=[],i._chartsMap={},i._componentsViews=[],i._componentsMap={},i._pendingActions=[],n=n||{},H(e)&&(e=k0[e]),i._dom=t,n.ssr&&$o(function(t){var e,t=k(t),n=t.dataIndex;if(null!=n)return(e=N()).set("series_index",t.seriesIndex),e.set("data_index",n),t.ssrType&&e.set("ssr_type",t.ssrType),e}),i._zr=jo(t,{renderer:n.renderer||"canvas",devicePixelRatio:n.devicePixelRatio,width:n.width,height:n.height,ssr:n.ssr,useDirtyRect:R(n.useDirtyRect,!1),useCoarsePointer:R(n.useCoarsePointer,"auto"),pointerSize:n.pointerSize})),n=(i._ssr=n.ssr,i._throttledZrFlush=py(S(t.flush,t),17),(e=y(e))&&Jd(e,!0),i._theme=e,i._locale=H(e=n.locale||$c)?(n=jc[e.toUpperCase()]||{},e===Yc||e===Zc?y(n):d(y(n),y(jc[qc]),!1)):d(y(e),y(jc[qc]),!1),i._coordSysMgr=new Ad,i._api=u0(i));function o(t,e){return t.__prio-e.__prio}return yn(D0,o),yn(I0,o),i._scheduler=new by(i,n,I0,D0),i._messageCenter=new f0,i._initEvents(),i.resize=S(i.resize,i),t.animation.on("frame",i._onframe,i),o0(t,i),r0(t,i),It(i),i}function v0(t){t.clearColorPalette(),t.eachSeries(function(t){t.clearColorPalette()})}function _0(t){for(var e=[],n=t.currentStates,i=0;i<n.length;i++){var o=n[i];"emphasis"!==o&&"blur"!==o&&"select"!==o&&e.push(o)}t.selected&&t.states.select&&e.push("select"),t.hoverState===rl&&t.states.emphasis?e.push("emphasis"):t.hoverState===ol&&t.states.blur&&e.push("blur"),t.useStates(e)}function x0(t,e){var n,i;t.preventAutoZ||(n=t.get("z")||0,i=t.get("zlevel")||0,e.eachRendered(function(t){return function t(e,n,i,o){var r=e.getTextContent(),a=e.getTextGuideLine();if(e.isGroup)for(var s=e.childrenRef(),l=0;l<s.length;l++)o=Math.max(t(s[l],n,i,o),o);else e.z=n,e.zlevel=i,o=Math.max(e.z2,o);r&&(r.z=n,r.zlevel=i,isFinite(o))&&(r.z2=o+2),a&&(r=e.textGuideLineConfig,a.z=n,a.zlevel=i,isFinite(o))&&(a.z2=o+(r&&r.showAbove?1:-1));return o}(t,n,i,-1/0),!0}))}function w0(t,e){e.eachRendered(function(t){var e,n;zh(t)||(e=t.getTextContent(),n=t.getTextGuideLine(),t.stateTransition&&(t.stateTransition=null),e&&e.stateTransition&&(e.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),t.hasState()?(t.prevStates=t.currentStates,t.clearStates()):t.prevStates&&(t.prevStates=null))})}function b0(t,e){var n=t.getModel("stateAnimation"),o=t.isAnimationEnabled(),t=n.get("duration"),r=0<t?{duration:t,delay:n.get("delay"),easing:n.get("easing")}:null;e.eachRendered(function(t){var e,n,i;t.states&&t.states.emphasis&&(zh(t)||(t instanceof _s&&((i=el(n=t)).normalFill=n.style.fill,i.normalStroke=n.style.stroke,n=n.states.select||{},i.selectFill=n.style&&n.style.fill||null,i.selectStroke=n.style&&n.style.stroke||null),t.__dirty&&(i=t.prevStates)&&t.useStates(i),o&&(t.stateTransition=r,n=t.getTextContent(),e=t.getTextGuideLine(),n&&(n.stateTransition=r),e)&&(e.stateTransition=r),t.__dirty&&_0(t)))})}em.on=Ym("on"),em.off=Ym("off"),em.one=function(i,o,t){var r=this;this.on.call(this,i,function t(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];o&&o.apply&&o.apply(this,e),r.off(i,t)},t)};var S0=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];var M0={},T0={},I0=[],C0=[],D0=[],k0={},A0={},L0={},P0={},O0=+new Date,R0=+new Date,N0="_echarts_instance_";function E0(t){P0[t]=!1}Qy=E0;function z0(t){return L0[e=N0,(t=t).getAttribute?t.getAttribute(e):t[e]];var e}function B0(t,e){k0[t]=e}function F0(t){C(C0,t)<0&&C0.push(t)}function V0(t,e){j0(I0,t,e,2e3)}function H0(t){G0("afterinit",t)}function W0(t){G0("afterupdate",t)}function G0(t,e){Fm.on(t,e)}function X0(t,e,n){D(e)&&(n=e,e="");var i=O(t)?t.type:[t,t={event:e}][0];t.event=(t.event||i).toLowerCase(),e=t.event,T0[e]||(St(Xm.test(i)&&Xm.test(e)),M0[i]||(M0[i]={action:n,actionInfo:t}),T0[e]=i)}function U0(t,e){Ad.register(t,e)}function Y0(t,e){j0(D0,t,e,1e3,"layout")}function Z0(t,e){j0(D0,t,e,3e3,"visual")}var q0=[];function j0(t,e,n,i,o){(D(e)||O(e))&&(n=e,e=i),0<=C(q0,n)||(q0.push(n),(i=by.wrapStageHandler(n,o)).__prio=e,i.__raw=n,t.push(i))}function K0(t,e){A0[t]=e}function $0(t,e,n){var i=Vm.registerMap;i&&i(t,e,n)}function Q0(t){var e=(t=y(t)).type,n=(e||f(""),e.split(":")),i=(2!==n.length&&f(""),!1);"echarts"===n[0]&&(e=n[1],i=!0),t.__isBuiltIn=i,ag.set(e,t)}Z0(2e3,ea),Z0(4500,nc),Z0(4500,op),Z0(2e3,Rc),Z0(4500,Gy),Z0(7e3,function(e,i){e.eachRawSeries(function(t){var n;!e.isSeriesFiltered(t)&&((n=t.getData()).hasItemVisual()&&n.each(function(t){var e=n.getItemVisual(t,"decal");e&&(n.ensureUniqueItemVisual(t,"style").decal=zm(e,i))}),t=n.getVisual("decal"))&&(n.getVisual("style").decal=zm(t,i))})}),F0(Jd),V0(900,function(t){var i=N();t.eachSeries(function(t){var e,n=t.get("stack");n&&(n=i.get(n)||i.set(n,[]),(t={stackResultDimension:(e=t.getData()).getCalculationInfo("stackResultDimension"),stackedOverDimension:e.getCalculationInfo("stackedOverDimension"),stackedDimension:e.getCalculationInfo("stackedDimension"),stackedByDimension:e.getCalculationInfo("stackedByDimension"),isStackedByIndex:e.getCalculationInfo("isStackedByIndex"),data:e,seriesModel:t}).stackedDimension)&&(t.isStackedByIndex||t.stackedByDimension)&&(n.length&&e.setCalculationInfo("stackedOnSeries",n[n.length-1].seriesModel),n.push(t))}),i.each(tf)}),K0("default",function(i,o){B(o=o||{},{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var t=new Wo,r=new Es({style:{fill:o.maskColor},zlevel:o.zlevel,z:1e4});t.add(r);var a,s=new Hs({style:{text:o.text,fill:o.textColor,fontSize:o.fontSize,fontWeight:o.fontWeight,fontStyle:o.fontStyle,fontFamily:o.fontFamily},zlevel:o.zlevel,z:10001}),l=new Es({style:{fill:"none"},textContent:s,textConfig:{position:"right",distance:10},zlevel:o.zlevel,z:10001});return t.add(l),o.showSpinner&&((a=new ph({shape:{startAngle:-wy/2,endAngle:-wy/2+.1,r:o.spinnerRadius},style:{stroke:o.color,lineCap:"round",lineWidth:o.lineWidth},zlevel:o.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*wy/2}).start("circularInOut"),a.animateShape(!0).when(1e3,{startAngle:3*wy/2}).delay(300).start("circularInOut"),t.add(a)),t.resize=function(){var t=s.getBoundingRect().width,e=o.showSpinner?o.spinnerRadius:0,t=(i.getWidth()-2*e-(o.showSpinner&&t?10:0)-t)/2-(o.showSpinner&&t?0:5+t/2)+(o.showSpinner?0:t/2)+(t?0:e),n=i.getHeight()/2;o.showSpinner&&a.setShape({cx:t,cy:n}),l.setShape({x:t-e,y:n-e,width:2*e,height:2*e}),r.setShape({x:0,y:0,width:i.getWidth(),height:i.getHeight()})},t.resize(),t}),X0({type:ll,event:ll,update:ll},zt),X0({type:ul,event:ul,update:ul},zt),X0({type:hl,event:hl,update:hl},zt),X0({type:cl,event:cl,update:cl},zt),X0({type:pl,event:pl,update:pl},zt),B0("light",Ec),B0("dark",Pc);function J0(t){return null==t?0:t.length||1}function tv(t){return t}nv.prototype.add=function(t){return this._add=t,this},nv.prototype.update=function(t){return this._update=t,this},nv.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},nv.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},nv.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},nv.prototype.remove=function(t){return this._remove=t,this},nv.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},nv.prototype._executeOneToOne=function(){var t=this._old,e=this._new,n={},i=new Array(t.length),o=new Array(e.length);this._initIndexMap(t,null,i,"_oldKeyGetter"),this._initIndexMap(e,n,o,"_newKeyGetter");for(var r=0;r<t.length;r++){var a,s=i[r],l=n[s],u=J0(l);1<u?(a=l.shift(),1===l.length&&(n[s]=l[0]),this._update&&this._update(a,r)):1===u?(n[s]=null,this._update&&this._update(l,r)):this._remove&&this._remove(r)}this._performRestAdd(o,n)},nv.prototype._executeMultiple=function(){var t=this._old,e=this._new,n={},i={},o=[],r=[];this._initIndexMap(t,n,o,"_oldKeyGetter"),this._initIndexMap(e,i,r,"_newKeyGetter");for(var a=0;a<o.length;a++){var s=o[a],l=n[s],u=i[s],h=J0(l),c=J0(u);if(1<h&&1===c)this._updateManyToOne&&this._updateManyToOne(u,l),i[s]=null;else if(1===h&&1<c)this._updateOneToMany&&this._updateOneToMany(u,l),i[s]=null;else if(1===h&&1===c)this._update&&this._update(u,l),i[s]=null;else if(1<h&&1<c)this._updateManyToMany&&this._updateManyToMany(u,l),i[s]=null;else if(1<h)for(var p=0;p<h;p++)this._remove&&this._remove(l[p]);else this._remove&&this._remove(l)}this._performRestAdd(r,i)},nv.prototype._performRestAdd=function(t,e){for(var n=0;n<t.length;n++){var i=t[n],o=e[i],r=J0(o);if(1<r)for(var a=0;a<r;a++)this._add&&this._add(o[a]);else 1===r&&this._add&&this._add(o);e[i]=null}},nv.prototype._initIndexMap=function(t,e,n,i){for(var o=this._diffModeMultiple,r=0;r<t.length;r++){var a,s,l="_ec_"+this[i](t[r],r);o||(n[r]=l),e&&(0===(s=J0(a=e[l]))?(e[l]=r,o&&n.push(l)):1===s?e[l]=[a,r]:a.push(r))}};var ev=nv;function nv(t,e,n,i,o,r){this._old=t,this._new=e,this._oldKeyGetter=n||tv,this._newKeyGetter=i||tv,this.context=o,this._diffModeMultiple="multiple"===r}ov.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},ov.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames};var iv=ov;function ov(t,e){this._encode=t,this._schema=e}function rv(r,t){var e={},a=e.encode={},s=N(),l=[],u=[],h={},i=(E(r.dimensions,function(t){var e,n,i=r.getDimensionInfo(t),o=i.coordDim;o&&(e=i.coordDimIndex,av(a,o)[e]=t,i.isExtraCoord||(s.set(o,1),"ordinal"!==(n=i.type)&&"time"!==n&&(l[0]=t),av(h,o)[e]=r.getDimensionIndex(i.name)),i.defaultTooltip)&&u.push(t),Qp.each(function(t,e){var n=av(a,e),e=i.otherDims[e];null!=e&&!1!==e&&(n[e]=i.name)})}),[]),o={},n=(s.each(function(t,e){var n=a[e];o[e]=n[0],i=i.concat(n)}),e.dataDimsOnCoord=i,e.dataDimIndicesOnCoord=F(i,function(t){return r.getDimensionInfo(t).storeDimIndex}),e.encodeFirstDimNotExtra=o,a.label),n=(n&&n.length&&(l=n.slice()),a.tooltip);return n&&n.length?u=n.slice():u.length||(u=l.slice()),a.defaultedLabel=l,a.defaultedTooltip=u,e.userOutput=new iv(h,t),e}function av(t,e){return t.hasOwnProperty(e)||(t[e]=[]),t[e]}var sv=function(t){this.otherDims={},null!=t&&P(this,t)},lv=Rr(),uv={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},hv=(cv.prototype.isDimensionOmitted=function(){return this._dimOmitted},cv.prototype._updateDimOmitted=function(t){!(this._dimOmitted=t)||this._dimNameMap||(this._dimNameMap=fv(this.source))},cv.prototype.getSourceDimensionIndex=function(t){return R(this._dimNameMap.get(t),-1)},cv.prototype.getSourceDimension=function(t){var e=this.source.dimensionsDefine;if(e)return e[t]},cv.prototype.makeStoreSchema=function(){for(var t=this._fullDimCount,e=cf(this.source),n=!(30<t),i="",o=[],r=0,a=0;r<t;r++){var s,l=void 0,u=void 0,h=void 0,c=this.dimensions[a];c&&c.storeDimIndex===r?(l=e?c.name:null,u=c.type,h=c.ordinalMeta,a++):(s=this.getSourceDimension(r))&&(l=e?s.name:null,u=s.type),o.push({property:l,type:u,ordinalMeta:h}),!e||null==l||c&&c.isCalculationCoord||(i+=n?l.replace(/\`/g,"`1").replace(/\$/g,"`2"):l),i=i+"$"+(uv[u]||"f"),h&&(i+=h.uid),i+="$"}var p=this.source;return{dimensions:o,hash:[p.seriesLayoutBy,p.startIndex,i].join("$$")}},cv.prototype.makeOutputDimensionNames=function(){for(var t=[],e=0,n=0;e<this._fullDimCount;e++){var i=void 0,o=this.dimensions[n];o&&o.storeDimIndex===e?(o.isCalculationCoord||(i=o.name),n++):(o=this.getSourceDimension(e))&&(i=o.name),t.push(i)}return t},cv.prototype.appendCalculationDimension=function(t){this.dimensions.push(t),t.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},cv);function cv(t){this.dimensions=t.dimensions,this._dimOmitted=t.dimensionOmitted,this.source=t.source,this._fullDimCount=t.fullDimensionCount,this._updateDimOmitted(t.dimensionOmitted)}function pv(t){return t instanceof hv}function dv(t){for(var e=N(),n=0;n<(t||[]).length;n++){var i=t[n],i=O(i)?i.name:i;null!=i&&null==e.get(i)&&e.set(i,n)}return e}function fv(t){var e=lv(t);return e.dimNameMap||(e.dimNameMap=dv(t.dimensionsDefine))}var gv,yv,mv,vv,_v,xv,wv,bv=O,Sv=F,Mv="undefined"==typeof Int32Array?Array:Int32Array,Tv=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],Iv=["_approximateExtent"],Cv=(c.prototype.getDimension=function(t){var e;return null==(e=this._recognizeDimIndex(t))?t:(e=t,this._dimOmitted?null!=(t=this._dimIdxToName.get(e))?t:(t=this._schema.getSourceDimension(e))?t.name:void 0:this.dimensions[e])},c.prototype.getDimensionIndex=function(t){var e=this._recognizeDimIndex(t);return null!=e?e:null==t?-1:(e=this._getDimInfo(t))?e.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(t):-1},c.prototype._recognizeDimIndex=function(t){if(W(t)||null!=t&&!isNaN(t)&&!this._getDimInfo(t)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(t)<0))return+t},c.prototype._getStoreDimIndex=function(t){return this.getDimensionIndex(t)},c.prototype.getDimensionInfo=function(t){return this._getDimInfo(this.getDimension(t))},c.prototype._initGetDimensionInfo=function(t){var e=this._dimInfos;this._getDimInfo=t?function(t){return e.hasOwnProperty(t)?e[t]:void 0}:function(t){return e[t]}},c.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},c.prototype.mapDimension=function(t,e){var n=this._dimSummary;return null==e?n.encodeFirstDimNotExtra[t]:(n=n.encode[t])?n[e]:null},c.prototype.mapDimensionsAll=function(t){return(this._dimSummary.encode[t]||[]).slice()},c.prototype.getStore=function(){return this._store},c.prototype.initData=function(t,e,n){var i,o,r=this;(i=t instanceof mg?t:i)||(o=this.dimensions,t=rf(t)||st(t)?new gf(t,o.length):t,i=new mg,o=Sv(o,function(t){return{type:r._dimInfos[t].type,property:t}}),i.initData(t,o,n)),this._store=i,this._nameList=(e||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,i.count()),this._dimSummary=rv(this,this._schema),this.userOutput=this._dimSummary.userOutput},c.prototype.appendData=function(t){t=this._store.appendData(t);this._doInit(t[0],t[1])},c.prototype.appendValues=function(t,e){var t=this._store.appendValues(t,e.length),n=t.start,i=t.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),e)for(var r=n;r<i;r++)this._nameList[r]=e[r-n],o&&wv(this,r)},c.prototype._updateOrdinalMeta=function(){for(var t=this._store,e=this.dimensions,n=0;n<e.length;n++){var i=this._dimInfos[e[n]];i.ordinalMeta&&t.collectOrdinalMeta(i.storeDimIndex,i.ordinalMeta)}},c.prototype._shouldMakeIdFromName=function(){var t=this._store.getProvider();return null==this._idDimIdx&&t.getSource().sourceFormat!==id&&!t.fillStorage},c.prototype._doInit=function(t,e){if(!(e<=t)){var n=this._store.getProvider(),i=(this._updateOrdinalMeta(),this._nameList),o=this._idList;if(n.getSource().sourceFormat===Jp&&!n.pure)for(var r=[],a=t;a<e;a++){var s=n.getItem(a,r);this.hasItemOption||!O(l=s)||l instanceof Array||(this.hasItemOption=!0),s&&(l=s.name,null==i[a]&&null!=l&&(i[a]=kr(l,null)),s=s.id,null==o[a])&&null!=s&&(o[a]=kr(s,null))}if(this._shouldMakeIdFromName())for(a=t;a<e;a++)wv(this,a);gv(this)}var l},c.prototype.getApproximateExtent=function(t){return this._approximateExtent[t]||this._store.getDataExtent(this._getStoreDimIndex(t))},c.prototype.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},c.prototype.getCalculationInfo=function(t){return this._calculationInfo[t]},c.prototype.setCalculationInfo=function(t,e){bv(t)?P(this._calculationInfo,t):this._calculationInfo[t]=e},c.prototype.getName=function(t){var t=this.getRawIndex(t),e=this._nameList[t];return e=null==(e=null==e&&null!=this._nameDimIdx?mv(this,this._nameDimIdx,t):e)?"":e},c.prototype._getCategory=function(t,e){e=this._store.get(t,e),t=this._store.getOrdinalMeta(t);return t?t.categories[e]:e},c.prototype.getId=function(t){return yv(this,this.getRawIndex(t))},c.prototype.count=function(){return this._store.count()},c.prototype.get=function(t,e){var n=this._store,t=this._dimInfos[t];if(t)return n.get(t.storeDimIndex,e)},c.prototype.getByRawIndex=function(t,e){var n=this._store,t=this._dimInfos[t];if(t)return n.getByRawIndex(t.storeDimIndex,e)},c.prototype.getIndices=function(){return this._store.getIndices()},c.prototype.getDataExtent=function(t){return this._store.getDataExtent(this._getStoreDimIndex(t))},c.prototype.getSum=function(t){return this._store.getSum(this._getStoreDimIndex(t))},c.prototype.getMedian=function(t){return this._store.getMedian(this._getStoreDimIndex(t))},c.prototype.getValues=function(t,e){var n=this,i=this._store;return V(t)?i.getValues(Sv(t,function(t){return n._getStoreDimIndex(t)}),e):i.getValues(t)},c.prototype.hasValue=function(t){for(var e=this._dimSummary.dataDimIndicesOnCoord,n=0,i=e.length;n<i;n++)if(isNaN(this._store.get(e[n],t)))return!1;return!0},c.prototype.indexOfName=function(t){for(var e=0,n=this._store.count();e<n;e++)if(this.getName(e)===t)return e;return-1},c.prototype.getRawIndex=function(t){return this._store.getRawIndex(t)},c.prototype.indexOfRawIndex=function(t){return this._store.indexOfRawIndex(t)},c.prototype.rawIndexOf=function(t,e){t=(t&&this._invertedIndicesMap[t])[e];return null==t||isNaN(t)?-1:t},c.prototype.indicesOfNearest=function(t,e,n){return this._store.indicesOfNearest(this._getStoreDimIndex(t),e,n)},c.prototype.each=function(t,e,n){D(t)&&(n=e,e=t,t=[]);n=n||this,t=Sv(vv(t),this._getStoreDimIndex,this);this._store.each(t,n?S(e,n):e)},c.prototype.filterSelf=function(t,e,n){D(t)&&(n=e,e=t,t=[]);n=n||this,t=Sv(vv(t),this._getStoreDimIndex,this);return this._store=this._store.filter(t,n?S(e,n):e),this},c.prototype.selectRange=function(n){var i=this,o={};return E(ht(n),function(t){var e=i._getStoreDimIndex(t);o[e]=n[t]}),this._store=this._store.selectRange(o),this},c.prototype.mapArray=function(t,e,n){D(t)&&(n=e,e=t,t=[]);var i=[];return this.each(t,function(){i.push(e&&e.apply(this,arguments))},n=n||this),i},c.prototype.map=function(t,e,n,i){n=n||i||this,i=Sv(vv(t),this._getStoreDimIndex,this),t=xv(this);return t._store=this._store.map(i,n?S(e,n):e),t},c.prototype.modify=function(t,e,n,i){n=n||i||this,i=Sv(vv(t),this._getStoreDimIndex,this);this._store.modify(i,n?S(e,n):e)},c.prototype.downSample=function(t,e,n,i){var o=xv(this);return o._store=this._store.downSample(this._getStoreDimIndex(t),e,n,i),o},c.prototype.lttbDownSample=function(t,e){var n=xv(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(t),e),n},c.prototype.getRawDataItem=function(t){return this._store.getRawDataItem(t)},c.prototype.getItemModel=function(t){var e=this.hostModel,t=this.getRawDataItem(t);return new Hc(t,e,e&&e.ecModel)},c.prototype.diff=function(e){var n=this;return new ev(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(t){return yv(e,t)},function(t){return yv(n,t)})},c.prototype.getVisual=function(t){var e=this._visual;return e&&e[t]},c.prototype.setVisual=function(t,e){this._visual=this._visual||{},bv(t)?P(this._visual,t):this._visual[t]=e},c.prototype.getItemVisual=function(t,e){t=this._itemVisuals[t],t=t&&t[e];return null==t?this.getVisual(e):t},c.prototype.hasItemVisual=function(){return 0<this._itemVisuals.length},c.prototype.ensureUniqueItemVisual=function(t,e){var n=this._itemVisuals,i=n[t],n=(i=i||(n[t]={}))[e];return null==n&&(V(n=this.getVisual(e))?n=n.slice():bv(n)&&(n=P({},n)),i[e]=n),n},c.prototype.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{};this._itemVisuals[t]=i,bv(e)?P(i,e):i[e]=n},c.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},c.prototype.setLayout=function(t,e){bv(t)?P(this._layout,t):this._layout[t]=e},c.prototype.getLayout=function(t){return this._layout[t]},c.prototype.getItemLayout=function(t){return this._itemLayouts[t]},c.prototype.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?P(this._itemLayouts[t]||{},e):e},c.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},c.prototype.setItemGraphicEl=function(t,e){var n,i,o,r,a=this.hostModel&&this.hostModel.seriesIndex;n=a,i=this.dataType,o=t,(a=e)&&((r=k(a)).dataIndex=o,r.dataType=i,r.seriesIndex=n,r.ssrType="chart","group"===a.type)&&a.traverse(function(t){t=k(t);t.seriesIndex=n,t.dataIndex=o,t.dataType=i,t.ssrType="chart"}),this._graphicEls[t]=e},c.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},c.prototype.eachItemGraphicEl=function(n,i){E(this._graphicEls,function(t,e){t&&n&&n.call(i,t,e)})},c.prototype.cloneShallow=function(t){return t=t||new c(this._schema||Sv(this.dimensions,this._getDimInfo,this),this.hostModel),_v(t,this),t._store=this._store,t},c.prototype.wrapMethod=function(t,e){var n=this[t];D(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=n.apply(this,arguments);return e.apply(this,[t].concat(wt(arguments)))})},c.internalField=(gv=function(a){var s=a._invertedIndicesMap;E(s,function(t,e){var n=a._dimInfos[e],i=n.ordinalMeta,o=a._store;if(i){t=s[e]=new Mv(i.categories.length);for(var r=0;r<t.length;r++)t[r]=-1;for(r=0;r<o.count();r++)t[o.get(n.storeDimIndex,r)]=r}})},mv=function(t,e,n){return kr(t._getCategory(e,n),null)},yv=function(t,e){var n=t._idList[e];return n=null==(n=null==n&&null!=t._idDimIdx?mv(t,t._idDimIdx,e):n)?"e\0\0"+e:n},vv=function(t){return t=V(t)?t:null!=t?[t]:[]},xv=function(t){var e=new c(t._schema||Sv(t.dimensions,t._getDimInfo,t),t.hostModel);return _v(e,t),e},_v=function(e,n){E(Tv.concat(n.__wrappedMethods||[]),function(t){n.hasOwnProperty(t)&&(e[t]=n[t])}),e.__wrappedMethods=n.__wrappedMethods,E(Iv,function(t){e[t]=y(n[t])}),e._calculationInfo=P({},n._calculationInfo)},void(wv=function(t,e){var n=t._nameList,i=t._idList,o=t._nameDimIdx,r=t._idDimIdx,a=n[e],s=i[e];null==a&&null!=o&&(n[e]=a=mv(t,o,e)),null==s&&null!=r&&(i[e]=s=mv(t,r,e)),null==s&&null!=a&&(s=a,1<(o=(n=t._nameRepeatCount)[a]=(n[a]||0)+1)&&(s+="__ec__"+o),i[e]=s)})),c);function c(t,e){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"];var n=!(this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"]);pv(t)?(o=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(n=!0,o=t);for(var i,o=o||["x","y"],r={},a=[],s={},l=!1,u={},h=0;h<o.length;h++){var c=o[h],c=H(c)?new sv({name:c}):c instanceof sv?c:new sv(c),p=c.name,d=(c.type=c.type||"float",c.coordDim||(c.coordDim=p,c.coordDimIndex=0),c.otherDims=c.otherDims||{});a.push(p),null!=u[p]&&(l=!0),(r[p]=c).createInvertedIndices&&(s[p]=[]),0===d.itemName&&(this._nameDimIdx=h),0===d.itemId&&(this._idDimIdx=h),n&&(c.storeDimIndex=h)}this.dimensions=a,this._dimInfos=r,this._initGetDimensionInfo(l),this.hostModel=e,this._invertedIndicesMap=s,this._dimOmitted&&(i=this._dimIdxToName=N(),E(a,function(t){i.set(r[t].storeDimIndex,t)}))}function Dv(t,e){rf(t)||(t=sf(t));for(var n,i,o=(e=e||{}).coordDimensions||[],r=e.dimensionsDefine||t.dimensionsDefine||[],a=N(),s=[],l=(u=t,n=o,p=e.dimensionsCount,i=Math.max(u.dimensionsDetectedCount||1,n.length,r.length,p||0),E(n,function(t){O(t)&&(t=t.dimsDef)&&(i=Math.max(i,t.length))}),i),u=e.canOmitUnusedDimensions&&30<l,h=r===t.dimensionsDefine,c=h?fv(t):dv(r),p=e.encodeDefine,d=N(p=!p&&e.encodeDefaulter?e.encodeDefaulter(t,l):p),f=new pg(l),g=0;g<f.length;g++)f[g]=-1;function y(t){var e,n,i,o=f[t];return o<0?(e=O(e=r[t])?e:{name:e},n=new sv,null!=(i=e.name)&&null!=c.get(i)&&(n.name=n.displayName=i),null!=e.type&&(n.type=e.type),null!=e.displayName&&(n.displayName=e.displayName),f[t]=s.length,n.storeDimIndex=t,s.push(n),n):s[o]}if(!u)for(g=0;g<l;g++)y(g);d.each(function(t,n){var i,t=br(t).slice();1===t.length&&!H(t[0])&&t[0]<0?d.set(n,!1):(i=d.set(n,[]),E(t,function(t,e){t=H(t)?c.get(t):t;null!=t&&t<l&&v(y(i[e]=t),n,e)}))});var m=0;function v(t,e,n){null!=Qp.get(e)?t.otherDims[e]=n:(t.coordDim=e,t.coordDimIndex=n,a.set(e,!0))}E(o,function(t){H(t)?(r=t,o={}):(r=(o=t).name,t=o.ordinalMeta,o.ordinalMeta=null,(o=P({},o)).ordinalMeta=t,n=o.dimsDef,i=o.otherDims,o.name=o.coordDim=o.coordDimIndex=o.dimsDef=o.otherDims=null);var n,i,o,r,e=d.get(r);if(!1!==e){if(!(e=br(e)).length)for(var a=0;a<(n&&n.length||1);a++){for(;m<l&&null!=y(m).coordDim;)m++;m<l&&e.push(m++)}E(e,function(t,e){t=y(t);h&&null!=o.type&&(t.type=o.type),v(B(t,o),r,e),null==t.name&&n&&(O(e=n[e])||(e={name:e}),t.name=t.displayName=e.name,t.defaultTooltip=e.defaultTooltip),i&&B(t.otherDims,i)})}});var _=e.generateCoord,x=null!=(w=e.generateCoordCount),w=_?w||1:0,b=_||"value";function S(t){null==t.name&&(t.name=t.coordDim)}if(u)E(s,function(t){S(t)}),s.sort(function(t,e){return t.storeDimIndex-e.storeDimIndex});else for(var M=0;M<l;M++){var T=y(M);null==T.coordDim&&(T.coordDim=function(t,e,n){if(n||e.hasKey(t)){for(var i=0;e.hasKey(t+i);)i++;t+=i}return e.set(t,!0),t}(b,a,x),T.coordDimIndex=0,(!_||w<=0)&&(T.isExtraCoord=!0),w--),S(T),null!=T.type||pd(t,M)!==sd.Must&&(!T.isExtraCoord||null==T.otherDims.itemName&&null==T.otherDims.seriesName)||(T.type="ordinal")}for(var I=s,C=N(),D=0;D<I.length;D++){var k=I[D],A=k.name,L=C.get(A)||0;0<L&&(k.name=A+(L-1)),L++,C.set(A,L)}return new hv({source:t,dimensions:s,fullDimensionCount:l,dimensionOmitted:u})}function kv(t){this.coordSysDims=[],this.axisMap=N(),this.categoryAxisMap=N(),this.coordSysName=t}var Av={cartesian2d:function(t,e,n,i){var o=t.getReferringComponents("xAxis",Br).models[0],t=t.getReferringComponents("yAxis",Br).models[0];e.coordSysDims=["x","y"],n.set("x",o),n.set("y",t),Lv(o)&&(i.set("x",o),e.firstCategoryDimIndex=0),Lv(t)&&(i.set("y",t),null==e.firstCategoryDimIndex)&&(e.firstCategoryDimIndex=1)},singleAxis:function(t,e,n,i){t=t.getReferringComponents("singleAxis",Br).models[0];e.coordSysDims=["single"],n.set("single",t),Lv(t)&&(i.set("single",t),e.firstCategoryDimIndex=0)},polar:function(t,e,n,i){var t=t.getReferringComponents("polar",Br).models[0],o=t.findAxisModel("radiusAxis"),t=t.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],n.set("radius",o),n.set("angle",t),Lv(o)&&(i.set("radius",o),e.firstCategoryDimIndex=0),Lv(t)&&(i.set("angle",t),null==e.firstCategoryDimIndex)&&(e.firstCategoryDimIndex=1)},geo:function(t,e,n,i){e.coordSysDims=["lng","lat"]},parallel:function(t,i,o,r){var a=t.ecModel,t=a.getComponent("parallel",t.get("parallelIndex")),s=i.coordSysDims=t.dimensions.slice();E(t.parallelAxisIndex,function(t,e){var t=a.getComponent("parallelAxis",t),n=s[e];o.set(n,t),Lv(t)&&(r.set(n,t),null==i.firstCategoryDimIndex)&&(i.firstCategoryDimIndex=e)})}};function Lv(t){return"category"===t.get("type")}function Pv(t,e,n){var i,o,r,a=(n=n||{}).byIndex,s=n.stackedCoordDimension;pv(e.schema)?(o=e.schema,i=o.dimensions,r=e.store):i=e;var l,u,h,c,p,d,f=!(!t||!t.get("stack"));return E(i,function(t,e){H(t)&&(i[e]=t={name:t}),f&&!t.isExtraCoord&&(a||l||!t.ordinalMeta||(l=t),u||"ordinal"===t.type||"time"===t.type||s&&s!==t.coordDim||(u=t))}),!u||a||l||(a=!0),u&&(h="__\0ecstackresult_"+t.id,c="__\0ecstackedover_"+t.id,l&&(l.createInvertedIndices=!0),p=u.coordDim,n=u.type,d=0,E(i,function(t){t.coordDim===p&&d++}),e={name:h,coordDim:p,coordDimIndex:d,type:n,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},t={name:c,coordDim:c,coordDimIndex:d+1,type:n,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1},o?(r&&(e.storeDimIndex=r.ensureCalculationDimension(c,n),t.storeDimIndex=r.ensureCalculationDimension(h,n)),o.appendCalculationDimension(e),o.appendCalculationDimension(t)):(i.push(e),i.push(t))),{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:a,stackedOverDimension:c,stackResultDimension:h}}function Ov(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function Rv(t,e){return Ov(t,e)?t.getCalculationInfo("stackResultDimension"):e}function Nv(t,e,n){n=n||{};var i,o,r,a,s,l,u=e.getSourceManager(),h=!1,t=(t?(h=!0,i=sf(t)):h=(i=u.getSource()).sourceFormat===Jp,function(t){var e=t.get("coordinateSystem"),n=new kv(e);if(e=Av[e])return e(t,n,n.axisMap,n.categoryAxisMap),n}(e)),c=(l=t,c=(c=e).get("coordinateSystem"),c=Ad.get(c),p=(p=l&&l.coordSysDims?F(l.coordSysDims,function(t){var e={name:t},t=l.axisMap.get(t);return t&&(t=t.get("type"),e.type="category"===(t=t)?"ordinal":"time"===t?"time":"float"),e}):p)||c&&(c.getDimensionsInfo?c.getDimensionsInfo():c.dimensions.slice())||["x","y"]),p=n.useEncodeDefaulter,p=D(p)?p:p?M(ud,c,e):null,c={coordDimensions:c,generateCoord:n.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:p,canOmitUnusedDimensions:!h},p=Dv(i,c),d=(c=p.dimensions,o=n.createInvertedIndices,(r=t)&&E(c,function(t,e){var n=t.coordDim,n=r.categoryAxisMap.get(n);n&&(null==a&&(a=e),t.ordinalMeta=n.getOrdinalMeta(),o)&&(t.createInvertedIndices=!0),null!=t.otherDims.itemName&&(s=!0)}),s||null==a||(c[a].otherDims.itemName=0),a),n=h?null:u.getSharedDataStore(p),t=Pv(e,{schema:p,store:n}),c=new Cv(p,e),p=(c.setCalculationInfo(t),null==d||(u=i).sourceFormat!==Jp||V(Tr(function(t){for(var e=0;e<t.length&&null==t[e];)e++;return t[e]}(u.data||[])))?null:function(t,e,n,i){return i===d?n:this.defaultDimValueGetter(t,e,n,i)});return c.hasItemOption=!1,c.initData(h?i:n,null,p),c}zv.prototype.getSetting=function(t){return this._setting[t]},zv.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},zv.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},zv.prototype.getExtent=function(){return this._extent.slice()},zv.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},zv.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},zv.prototype.isBlank=function(){return this._isBlank},zv.prototype.setBlank=function(t){this._isBlank=t};var Ev=zv;function zv(t){this._setting=t||{},this._extent=[1/0,-1/0]}Qr(Ev);var Bv=0,Fv=(Vv.createByAxisModel=function(t){var t=t.option,e=t.data,e=e&&F(e,Hv);return new Vv({categories:e,needCollect:!e,deduplication:!1!==t.dedplication})},Vv.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},Vv.prototype.parseAndCollect=function(t){var e,n,i=this._needCollect;return H(t)||i?(i&&!this._deduplication?(e=this.categories.length,this.categories[e]=t):null==(e=(n=this._getOrCreateMap()).get(t))&&(i?(e=this.categories.length,this.categories[e]=t,n.set(t,e)):e=NaN),e):t},Vv.prototype._getOrCreateMap=function(){return this._map||(this._map=N(this.categories))},Vv);function Vv(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++Bv}function Hv(t){return O(t)&&null!=t.value?t.value:t+""}function Wv(t){return"interval"===t.type||"log"===t.type}function Gv(t,e,n,i){var o={},r=t[1]-t[0],r=o.interval=fr(r/e,!0),e=(null!=n&&r<n&&(r=o.interval=n),null!=i&&i<r&&(r=o.interval=i),o.intervalPrecision=Uv(r));return n=o.niceTickExtent=[nr(Math.ceil(t[0]/r)*r,e),nr(Math.floor(t[1]/r)*r,e)],i=t,isFinite(n[0])||(n[0]=i[0]),isFinite(n[1])||(n[1]=i[1]),Yv(n,0,i),Yv(n,1,i),n[0]>n[1]&&(n[0]=n[1]),o}function Xv(t){var e=Math.pow(10,dr(t)),t=t/e;return t?2===t?t=3:3===t?t=5:t*=2:t=1,nr(t*e)}function Uv(t){return or(t)+2}function Yv(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function Zv(t,e){return t>=e[0]&&t<=e[1]}function qv(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function jv(t,e){return t*(e[1]-e[0])+e[0]}u(Qv,Kv=Ev),Qv.prototype.parse=function(t){return null==t?NaN:H(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},Qv.prototype.contain=function(t){return Zv(t=this.parse(t),this._extent)&&null!=this._ordinalMeta.categories[t]},Qv.prototype.normalize=function(t){return qv(t=this._getTickNumber(this.parse(t)),this._extent)},Qv.prototype.scale=function(t){return t=Math.round(jv(t,this._extent)),this.getRawOrdinalNumber(t)},Qv.prototype.getTicks=function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push({value:n}),n++;return t},Qv.prototype.getMinorTicks=function(t){},Qv.prototype.setSortInfo=function(t){if(null!=t){for(var e=t.ordinalNumbers,n=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],o=0,r=this._ordinalMeta.categories.length,a=Math.min(r,e.length);o<a;++o){var s=e[o];i[n[o]=s]=o}for(var l=0;o<r;++o){for(;null!=i[l];)l++;n.push(l),i[l]=o}}else this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null},Qv.prototype._getTickNumber=function(t){var e=this._ticksByOrdinalNumber;return e&&0<=t&&t<e.length?e[t]:t},Qv.prototype.getRawOrdinalNumber=function(t){var e=this._ordinalNumbersByTick;return e&&0<=t&&t<e.length?e[t]:t},Qv.prototype.getLabel=function(t){if(!this.isBlank())return t=this.getRawOrdinalNumber(t.value),null==(t=this._ordinalMeta.categories[t])?"":t+""},Qv.prototype.count=function(){return this._extent[1]-this._extent[0]+1},Qv.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},Qv.prototype.isInExtentRange=function(t){return t=this._getTickNumber(t),this._extent[0]<=t&&this._extent[1]>=t},Qv.prototype.getOrdinalMeta=function(){return this._ordinalMeta},Qv.prototype.calcNiceTicks=function(){},Qv.prototype.calcNiceExtent=function(){},Qv.type="ordinal";var Kv,$v=Qv;function Qv(t){var t=Kv.call(this,t)||this,e=(t.type="ordinal",t.getSetting("ordinalMeta"));return V(e=e||new Fv({}))&&(e=new Fv({categories:F(e,function(t){return O(t)?t.value:t})})),t._ordinalMeta=e,t._extent=t.getSetting("extent")||[0,e.categories.length-1],t}Ev.registerClass($v);var Jv,t_=nr,e_=(u(n_,Jv=Ev),n_.prototype.parse=function(t){return t},n_.prototype.contain=function(t){return Zv(t,this._extent)},n_.prototype.normalize=function(t){return qv(t,this._extent)},n_.prototype.scale=function(t){return jv(t,this._extent)},n_.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},n_.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]),this.setExtent(e[0],e[1])},n_.prototype.getInterval=function(){return this._interval},n_.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=Uv(t)},n_.prototype.getTicks=function(t){var e=this._interval,n=this._extent,i=this._niceExtent,o=this._intervalPrecision,r=[];if(e){n[0]<i[0]&&r.push(t?{value:t_(i[0]-e,o)}:{value:n[0]});for(var a=i[0];a<=i[1]&&(r.push({value:a}),(a=t_(a+e,o))!==r[r.length-1].value);)if(1e4<r.length)return[];var s=r.length?r[r.length-1].value:i[1];n[1]>s&&r.push(t?{value:t_(s+e,o)}:{value:n[1]})}return r},n_.prototype.getMinorTicks=function(t){for(var e=this.getTicks(!0),n=[],i=this.getExtent(),o=1;o<e.length;o++){for(var r=e[o],a=e[o-1],s=0,l=[],u=(r.value-a.value)/t;s<t-1;){var h=t_(a.value+(s+1)*u);h>i[0]&&h<i[1]&&l.push(h),s++}n.push(l)}return n},n_.prototype.getLabel=function(t,e){return null==t?"":(null==(e=e&&e.precision)?e=or(t.value)||0:"auto"===e&&(e=this._intervalPrecision),Ip(t_(t.value,e,!0)))},n_.prototype.calcNiceTicks=function(t,e,n){t=t||5;var i=this._extent,o=i[1]-i[0];isFinite(o)&&(o<0&&i.reverse(),o=Gv(i,t,e,n),this._intervalPrecision=o.intervalPrecision,this._interval=o.interval,this._niceExtent=o.niceTickExtent)},n_.prototype.calcNiceExtent=function(t){var e=this._extent,n=(e[0]===e[1]&&(0!==e[0]?(n=Math.abs(e[0]),t.fixMax||(e[1]+=n/2),e[0]-=n/2):e[1]=1),e[1]-e[0]),n=(isFinite(n)||(e[0]=0,e[1]=1),this.calcNiceTicks(t.splitNumber,t.minInterval,t.maxInterval),this._interval);t.fixMin||(e[0]=t_(Math.floor(e[0]/n)*n)),t.fixMax||(e[1]=t_(Math.ceil(e[1]/n)*n))},n_.prototype.setNiceExtent=function(t,e){this._niceExtent=[t,e]},n_.type="interval",n_);function n_(){var t=null!==Jv&&Jv.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}Ev.registerClass(e_);var i_="undefined"!=typeof Float32Array,o_=i_?Float32Array:Array;function r_(t){return V(t)?i_?new Float32Array(t):t:new o_(t)}function a_(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function s_(t){return t.dim+t.index}function l_(t,e){var n=[];return e.eachSeriesByType(t,function(t){var e;(e=t).coordinateSystem&&"cartesian2d"===e.coordinateSystem.type&&n.push(t)}),n}function u_(t){var a,d,u=function(t){var e,l={},n=(E(t,function(t){var e=t.coordinateSystem.getBaseAxis();if("time"===e.type||"value"===e.type)for(var t=t.getData(),n=e.dim+"_"+e.index,i=t.getDimensionIndex(t.mapDimension(e.dim)),o=t.getStore(),r=0,a=o.count();r<a;++r){var s=o.get(i,r);l[n]?l[n].push(s):l[n]=[s]}}),{});for(e in l)if(l.hasOwnProperty(e)){var i=l[e];if(i){i.sort(function(t,e){return t-e});for(var o=null,r=1;r<i.length;++r){var a=i[r]-i[r-1];0<a&&(o=null===o?a:Math.min(o,a))}n[e]=o}}return n}(t),h=[];return E(t,function(t){var e,n,i=t.coordinateSystem.getBaseAxis(),o=i.getExtent(),r=(e="category"===i.type?i.getBandWidth():"value"===i.type||"time"===i.type?(e=i.dim+"_"+i.index,e=u[e],r=Math.abs(o[1]-o[0]),n=i.scale.getExtent(),n=Math.abs(n[1]-n[0]),e?r/n*e:r):(n=t.getData(),Math.abs(o[1]-o[0])/n.count()),er(t.get("barWidth"),e)),o=er(t.get("barMaxWidth"),e),a=er(t.get("barMinWidth")||((n=t).pipelineContext&&n.pipelineContext.large?.5:1),e),s=t.get("barGap"),l=t.get("barCategoryGap");h.push({bandWidth:e,barWidth:r,barMaxWidth:o,barMinWidth:a,barGap:s,barCategoryGap:l,axisKey:s_(i),stackId:a_(t)})}),a={},E(h,function(t,e){var n=t.axisKey,i=t.bandWidth,i=a[n]||{bandWidth:i,remainedWidth:i,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},o=i.stacks,n=(a[n]=i,t.stackId),r=(o[n]||i.autoWidthCount++,o[n]=o[n]||{width:0,maxWidth:0},t.barWidth),r=(r&&!o[n].width&&(o[n].width=r,r=Math.min(i.remainedWidth,r),i.remainedWidth-=r),t.barMaxWidth),r=(r&&(o[n].maxWidth=r),t.barMinWidth),o=(r&&(o[n].minWidth=r),t.barGap),n=(null!=o&&(i.gap=o),t.barCategoryGap);null!=n&&(i.categoryGap=n)}),d={},E(a,function(t,n){d[n]={};var e=t.stacks,i=t.bandWidth,o=t.categoryGap,r=(null==o&&(r=ht(e).length,o=Math.max(35-4*r,15)+"%"),er(o,i)),a=er(t.gap,1),s=t.remainedWidth,l=t.autoWidthCount,u=(s-r)/(l+(l-1)*a),u=Math.max(u,0);E(e,function(t){var e,n=t.maxWidth,i=t.minWidth;t.width?(e=t.width,n&&(e=Math.min(e,n)),i&&(e=Math.max(e,i)),t.width=e,s-=e+a*e,l--):(e=u,n&&n<e&&(e=Math.min(n,s)),(e=i&&e<i?i:e)!==u&&(t.width=e,s-=e+a*e,l--))}),u=(s-r)/(l+(l-1)*a),u=Math.max(u,0);var h,c=0,p=(E(e,function(t,e){t.width||(t.width=u),c+=(h=t).width*(1+a)}),h&&(c-=h.width*a),-c/2);E(e,function(t,e){d[n][e]=d[n][e]||{bandWidth:i,offset:p,width:t.width},p+=t.width*(1+a)})}),d}u(d_,h_=e_),d_.prototype.getLabel=function(t){var e=this.getSetting("useUTC");return hp(t.value,rp[function(t){switch(t){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}(up(this._minLevelUnit))]||rp.second,e,this.getSetting("locale"))},d_.prototype.getFormattedLabel=function(t,e,n){var i=this.getSetting("useUTC"),o=this.getSetting("locale"),r=null;if(H(n))r=n;else if(D(n))r=n(t.value,e,{level:t.level});else{var a=P({},ip);if(0<t.level)for(var s=0;s<ap.length;++s)a[ap[s]]="{primary|"+a[ap[s]]+"}";var l=n?!1===n.inherit?n:B(n,a):a,u=cp(t.value,i);if(l[u])r=l[u];else if(l.inherit){for(s=sp.indexOf(u)-1;0<=s;--s)if(l[u]){r=l[u];break}r=r||a.none}V(r)&&(e=null==t.level?0:0<=t.level?t.level:r.length+t.level,r=r[e=Math.min(e,r.length-1)])}return hp(new Date(t.value),r,i,o)},d_.prototype.getTicks=function(){var t=this._interval,e=this._extent,n=[];return t&&(n.push({value:e[0],level:0}),t=this.getSetting("useUTC"),t=function(t,b,S,M){var e=sp,n=0;function i(t,e,n){var i,o,r=[],a=!e.length;if(!function(t,e,n,i){function o(t){return pp(c,t,i)===pp(p,t,i)}function r(){return o("year")}function a(){return r()&&o("month")}function s(){return a()&&o("day")}function l(){return s()&&o("hour")}function u(){return l()&&o("minute")}function h(){return u()&&o("second")}var c=cr(e),p=cr(n);switch(t){case"year":return r();case"month":return a();case"day":return s();case"hour":return l();case"minute":return u();case"second":return h();case"millisecond":return h()&&o("millisecond")}}(up(t),M[0],M[1],S)){a&&(e=[{value:function(t,e,n){var i=new Date(t);switch(up(e)){case"year":case"month":i[xp(n)](0);case"day":i[wp(n)](1);case"hour":i[bp(n)](0);case"minute":i[Sp(n)](0);case"second":i[Mp(n)](0),i[Tp(n)](0)}return i.getTime()}(new Date(M[0]),t,S)},{value:M[1]}]);for(var s=0;s<e.length-1;s++){var l=e[s].value,u=e[s+1].value;if(l!==u){var h=void 0,c=void 0,p=void 0;switch(t){case"year":h=Math.max(1,Math.round(b/np/365)),c=dp(S),p=S?"setUTCFullYear":"setFullYear";break;case"half-year":case"quarter":case"month":o=b,h=6<(o/=30*np)?6:3<o?3:2<o?2:1,c=fp(S),p=xp(S);break;case"week":case"half-week":case"day":o=b,h=16<(o/=np)?16:7.5<o?7:3.5<o?4:1.5<o?2:1,c=gp(S),p=wp(S);break;case"half-day":case"quarter-day":case"hour":i=b,h=12<(i/=ep)?12:6<i?6:3.5<i?4:2<i?2:1,c=yp(S),p=bp(S);break;case"minute":h=f_(b,!0),c=mp(S),p=Sp(S);break;case"second":h=f_(b,!1),c=vp(S),p=Mp(S);break;case"millisecond":h=fr(b,!0),c=_p(S),p=Tp(S)}w=x=_=v=m=y=g=f=d=void 0;for(var d=h,f=l,g=u,y=c,m=p,v=r,_=new Date(f),x=f,w=_[y]();x<g&&x<=M[1];)v.push({value:x}),_[m](w+=d),x=_.getTime();v.push({value:x,notAdd:!0}),"year"===t&&1<n.length&&0===s&&n.unshift({value:n[0].value-h})}}for(s=0;s<r.length;s++)n.push(r[s])}}for(var o=[],r=[],a=0,s=0,l=0;l<e.length&&n++<1e4;++l){var u=up(e[l]);if(function(t){return t===up(t)}(e[l])&&(i(e[l],o[o.length-1]||[],r),u!==(e[l+1]?up(e[l+1]):null))){if(r.length){s=a,r.sort(function(t,e){return t.value-e.value});for(var h=[],c=0;c<r.length;++c){var p=r[c].value;0!==c&&r[c-1].value===p||(h.push(r[c]),p>=M[0]&&p<=M[1]&&a++)}u=(M[1]-M[0])/b;if(1.5*u<a&&u/1.5<s)break;if(o.push(h),u<a||t===e[l])break}r=[]}}var d=ut(F(o,function(t){return ut(t,function(t){return t.value>=M[0]&&t.value<=M[1]&&!t.notAdd})}),function(t){return 0<t.length}),f=[],g=d.length-1;for(l=0;l<d.length;++l)for(var y=d[l],m=0;m<y.length;++m)f.push({value:y[m].value,level:g-l});f.sort(function(t,e){return t.value-e.value});var v=[];for(l=0;l<f.length;++l)0!==l&&f[l].value===f[l-1].value||v.push(f[l]);return v}(this._minLevelUnit,this._approxInterval,t,e),(n=n.concat(t)).push({value:e[1],level:0})),n},d_.prototype.calcNiceExtent=function(t){var e,n=this._extent;n[0]===n[1]&&(n[0]-=np,n[1]+=np),n[1]===-1/0&&n[0]===1/0&&(e=new Date,n[1]=+new Date(e.getFullYear(),e.getMonth(),e.getDate()),n[0]=n[1]-np),this.calcNiceTicks(t.splitNumber,t.minInterval,t.maxInterval)},d_.prototype.calcNiceTicks=function(t,e,n){var i=this._extent,i=i[1]-i[0],i=(this._approxInterval=i/(t=t||10),null!=e&&this._approxInterval<e&&(this._approxInterval=e),null!=n&&this._approxInterval>n&&(this._approxInterval=n),p_.length),t=Math.min(function(t,e,n,i){for(;n<i;){var o=n+i>>>1;t[o][1]<e?n=1+o:i=o}return n}(p_,this._approxInterval,0,i),i-1);this._interval=p_[t][1],this._minLevelUnit=p_[Math.max(t-1,0)][0]},d_.prototype.parse=function(t){return W(t)?t:+cr(t)},d_.prototype.contain=function(t){return Zv(this.parse(t),this._extent)},d_.prototype.normalize=function(t){return qv(this.parse(t),this._extent)},d_.prototype.scale=function(t){return jv(t,this._extent)},d_.type="time";var h_,c_=d_,p_=[["second",Jc],["minute",tp],["hour",ep],["quarter-day",6*ep],["half-day",12*ep],["day",1.2*np],["half-week",3.5*np],["week",7*np],["month",31*np],["quarter",95*np],["half-year",jr/2],["year",jr]];function d_(t){t=h_.call(this,t)||this;return t.type="time",t}function f_(t,e){return 30<(t/=e?tp:Jc)?30:20<t?20:15<t?15:10<t?10:5<t?5:2<t?2:1}Ev.registerClass(c_);var g_,y_=Ev.prototype,m_=e_.prototype,v_=nr,__=Math.floor,x_=Math.ceil,w_=Math.pow,b_=Math.log,S_=(u(M_,g_=Ev),M_.prototype.getTicks=function(t){var e=this._originalScale,n=this._extent,i=e.getExtent();return F(m_.getTicks.call(this,t),function(t){var t=t.value,e=nr(w_(this.base,t)),e=t===n[0]&&this._fixMin?T_(e,i[0]):e;return{value:t===n[1]&&this._fixMax?T_(e,i[1]):e}},this)},M_.prototype.setExtent=function(t,e){var n=b_(this.base);t=b_(Math.max(0,t))/n,e=b_(Math.max(0,e))/n,m_.setExtent.call(this,t,e)},M_.prototype.getExtent=function(){var t=this.base,e=y_.getExtent.call(this),t=(e[0]=w_(t,e[0]),e[1]=w_(t,e[1]),this._originalScale.getExtent());return this._fixMin&&(e[0]=T_(e[0],t[0])),this._fixMax&&(e[1]=T_(e[1],t[1])),e},M_.prototype.unionExtent=function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=b_(t[0])/b_(e),t[1]=b_(t[1])/b_(e),y_.unionExtent.call(this,t)},M_.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},M_.prototype.calcNiceTicks=function(t){t=t||10;var e=this._extent,n=e[1]-e[0];if(!(n==1/0||n<=0)){var i=pr(n);for(t/n*i<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&0<Math.abs(i);)i*=10;t=[nr(x_(e[0]/i)*i),nr(__(e[1]/i)*i)];this._interval=i,this._niceExtent=t}},M_.prototype.calcNiceExtent=function(t){m_.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},M_.prototype.parse=function(t){return t},M_.prototype.contain=function(t){return Zv(t=b_(t)/b_(this.base),this._extent)},M_.prototype.normalize=function(t){return qv(t=b_(t)/b_(this.base),this._extent)},M_.prototype.scale=function(t){return t=jv(t,this._extent),w_(this.base,t)},M_.type="log",M_),Ky=S_.prototype;function M_(){var t=null!==g_&&g_.apply(this,arguments)||this;return t.type="log",t.base=10,t._originalScale=new e_,t._interval=0,t}function T_(t,e){return v_(t,or(e))}Ky.getMinorTicks=m_.getMinorTicks,Ky.getLabel=m_.getLabel,Ev.registerClass(S_);C_.prototype._prepareParams=function(t,e,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var i=this._isOrdinal="ordinal"===t.type,o=(this._needCrossZero="interval"===t.type&&e.getNeedCrossZero&&e.getNeedCrossZero(),this._modelMinRaw=e.get("min",!0)),o=(D(o)?this._modelMinNum=L_(t,o({min:n[0],max:n[1]})):"dataMin"!==o&&(this._modelMinNum=L_(t,o)),this._modelMaxRaw=e.get("max",!0));D(o)?this._modelMaxNum=L_(t,o({min:n[0],max:n[1]})):"dataMax"!==o&&(this._modelMaxNum=L_(t,o)),i?this._axisDataLen=e.getCategories().length:"boolean"==typeof(t=V(n=e.get("boundaryGap"))?n:[n||0,n||0])[0]||"boolean"==typeof t[1]?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[Do(t[0],1),Do(t[1],1)]},C_.prototype.calculate=function(){var t=this._isOrdinal,e=this._dataMin,n=this._dataMax,i=this._axisDataLen,o=this._boundaryGapInner,r=t?null:n-e||Math.abs(e),a="dataMin"===this._modelMinRaw?e:this._modelMinNum,s="dataMax"===this._modelMaxRaw?n:this._modelMaxNum,l=null!=a,u=null!=s,e=(null==a&&(a=t?i?0:NaN:e-o[0]*r),null==s&&(s=t?i?i-1:NaN:n+o[1]*r),null!=a&&isFinite(a)||(a=NaN),null!=s&&isFinite(s)||(s=NaN),vt(a)||vt(s)||t&&!i),n=(this._needCrossZero&&(a=0<a&&0<s&&!l?0:a)<0&&s<0&&!u&&(s=0),this._determinedMin),o=this._determinedMax;return null!=n&&(a=n,l=!0),null!=o&&(s=o,u=!0),{min:a,max:s,minFixed:l,maxFixed:u,isBlank:e}},C_.prototype.modifyDataMinMax=function(t,e){this[k_[t]]=e},C_.prototype.setDeterminedMinMax=function(t,e){this[D_[t]]=e},C_.prototype.freeze=function(){this.frozen=!0};var I_=C_;function C_(t,e,n){this._prepareParams(t,e,n)}var D_={min:"_determinedMin",max:"_determinedMax"},k_={min:"_dataMin",max:"_dataMax"};function A_(t,e,n){return t.rawExtentInfo||(e=new I_(t,e,n),t.rawExtentInfo=e)}function L_(t,e){return null==e?null:vt(e)?NaN:t.parse(e)}function P_(t,e){var n,i,o,r,a,s,l=t.type,u=A_(t,e,t.getExtent()).calculate(),t=(t.setBlank(u.isBlank),u.min),h=u.max,c=e.ecModel;return c&&"time"===l&&(l=l_("bar",c),n=!1,E(l,function(t){n=n||t.getBaseAxis()===e.axis}),n)&&(c=u_(l),l=t,i=h,c=c,s=(s=(o=e).axis.getExtent())[1]-s[0],t=(c=void 0===(c=function(t,e,n){if(t&&e)return null!=(t=t[s_(e)])&&null!=n?t[a_(n)]:t}(c,o.axis))?{min:l,max:i}:(r=1/0,E(c,function(t){r=Math.min(t.offset,r)}),a=-1/0,E(c,function(t){a=Math.max(t.offset+t.width,a)}),r=Math.abs(r),a=Math.abs(a),{min:l-=r/(o=r+a)*(s=(c=i-l)/(1-(r+a)/s)-c),max:i+=a/o*s})).min,h=c.max),{extent:[t,h],fixMin:u.minFixed,fixMax:u.maxFixed}}function O_(t,e){var n=P_(t,e),i=n.extent,o=e.get("splitNumber"),r=(t instanceof S_&&(t.base=e.get("logBase")),t.type),a=e.get("interval"),r="interval"===r||"time"===r;t.setExtent(i[0],i[1]),t.calcNiceExtent({splitNumber:o,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:r?e.get("minInterval"):null,maxInterval:r?e.get("maxInterval"):null}),null!=a&&t.setInterval&&t.setInterval(a)}function R_(t,e){if(e=e||t.get("type"))switch(e){case"category":return new $v({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new c_({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(Ev.getClass(e)||e_)}}function N_(n){var i,o,e,t=n.getLabelModel().get("formatter"),r="category"===n.type?n.scale.getExtent()[0]:null;return"time"===n.scale.type?(o=t,function(t,e){return n.scale.getFormattedLabel(t,e,o)}):H(t)?(e=t,function(t){t=n.scale.getLabel(t);return e.replace("{value}",null!=t?t:"")}):D(t)?(i=t,function(t,e){return null!=r&&(e=t.value-r),i(E_(n,t),e,null!=t.level?{level:t.level}:null)}):function(t){return n.scale.getLabel(t)}}function E_(t,e){return"category"===t.type?t.scale.getLabel(e):e.value}function z_(t){var e,n,i,o=t.model,r=t.scale;if(o.get(["axisLabel","show"])&&!r.isBlank()){var a,s,l=r.getExtent(),u=r instanceof $v?r.count():(a=r.getTicks()).length,h=t.getLabelModel(),c=N_(t),p=1;40<u&&(p=Math.ceil(u/40));for(var d=0;d<u;d+=p){var f=c(a?a[d]:{value:l[0]+d},d),g=(f=h.getTextRect(f),e=h.get("rotate")||0,n=i=g=n=void 0,e=e*Math.PI/180,n=f.width,g=f.height,i=n*Math.abs(Math.cos(e))+Math.abs(g*Math.sin(e)),n=n*Math.abs(Math.sin(e))+Math.abs(g*Math.cos(e)),new G(f.x,f.y,i,n));s?s.union(g):s=g}return s}}function B_(t){t=t.get("interval");return null==t?"auto":t}function F_(t){return"category"===t.type&&0===B_(t.getLabelModel())}function V_(e,t){var n={};return E(e.mapDimensionsAll(t),function(t){n[Rv(e,t)]=!0}),ht(n)}W_.prototype.getNeedCrossZero=function(){return!this.option.scale},W_.prototype.getCoordSysModel=function(){};var H_=W_;function W_(){}var tm=Object.freeze({__proto__:null,createDimensions:function(t,e){return Dv(t,e).dimensions},createList:function(t){return Nv(null,t)},createScale:function(t,e){var n=e;return(e=R_(n=e instanceof Hc?n:new Hc(e))).setExtent(t[0],t[1]),O_(e,n),e},createSymbol:am,createTextStyle:function(t,e){return wc(t,null,null,"normal"!==(e=e||{}).state)},dataStack:{isDimensionStacked:Ov,enableDataStack:Pv,getStackedDimension:Rv},enableHoverEmphasis:Hl,getECData:k,getLayoutRect:Vp,mixinAxisModelCommonMethods:function(t){at(t,H_)}}),G_=[],X_={registerPreprocessor:F0,registerProcessor:V0,registerPostInit:H0,registerPostUpdate:W0,registerUpdateLifecycle:G0,registerAction:X0,registerCoordinateSystem:U0,registerLayout:Y0,registerVisual:Z0,registerTransform:Q0,registerLoading:K0,registerMap:$0,registerImpl:function(t,e){Vm[t]=e},PRIORITY:Jy,ComponentModel:g,ComponentView:$g,SeriesModel:Gg,ChartView:ny,registerComponentModel:function(t){g.registerClass(t)},registerComponentView:function(t){$g.registerClass(t)},registerSeriesModel:function(t){Gg.registerClass(t)},registerChartView:function(t){ny.registerClass(t)},registerSubTypeDefaulter:function(t,e){g.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){Ko(t,e)}};function U_(t){V(t)?E(t,function(t){U_(t)}):0<=C(G_,t)||(G_.push(t),(t=D(t)?{install:t}:t).install(X_))}var Y_=1e-8;function Z_(t,e){return Math.abs(t-e)<Y_}function q_(t,e,n){var i=0,o=t[0];if(o){for(var r=1;r<t.length;r++){var a=t[r];i+=as(o[0],o[1],a[0],a[1],e,n),o=a}var s=t[0];return Z_(o[0],s[0])&&Z_(o[1],s[1])||(i+=as(o[0],o[1],s[0],s[1],e,n)),0!==i}}var j_=[];function K_(t,e){for(var n=0;n<t.length;n++)Jt(t[n],t[n],e)}function $_(t,e,n,i){for(var o=0;o<t.length;o++){var r=t[o];(r=i?i.project(r):r)&&isFinite(r[0])&&isFinite(r[1])&&(te(e,e,r),ee(n,n,r))}}Q_.prototype.setCenter=function(t){this._center=t},Q_.prototype.getCenter=function(){return this._center||(this._center=this.calcCenter())};em=Q_;function Q_(t){this.name=t}function J_(t,e){this.type="polygon",this.exterior=t,this.interiors=e}function t1(t){this.type="linestring",this.points=t}u(o1,e1=em),o1.prototype.calcCenter=function(){for(var t,e,n=this.geometries,i=0,o=0;o<n.length;o++){var r=n[o],a=r.exterior,a=a&&a.length;i<a&&(t=r,i=a)}if(t){for(var s=t.exterior,l=0,u=0,h=0,c=s.length,p=s[c-1][0],d=s[c-1][1],f=0;f<c;f++){var g=s[f][0],y=s[f][1],m=p*y-g*d;l+=m,u+=(p+g)*m,h+=(d+y)*m,p=g,d=y}return l?[u/l/3,h/l/3,l]:[s[0][0]||0,s[0][1]||0]}return[(e=this.getBoundingRect()).x+e.width/2,e.y+e.height/2]},o1.prototype.getBoundingRect=function(e){var n,i,t=this._rect;return t&&!e||(n=[1/0,1/0],i=[-1/0,-1/0],E(this.geometries,function(t){"polygon"===t.type?$_(t.exterior,n,i,e):E(t.points,function(t){$_(t,n,i,e)})}),isFinite(n[0])&&isFinite(n[1])&&isFinite(i[0])&&isFinite(i[1])||(n[0]=n[1]=i[0]=i[1]=0),t=new G(n[0],n[1],i[0]-n[0],i[1]-n[1]),e)||(this._rect=t),t},o1.prototype.contain=function(t){var e=this.getBoundingRect(),n=this.geometries;if(e.contain(t[0],t[1]))t:for(var i=0,o=n.length;i<o;i++){var r=n[i];if("polygon"===r.type){var a=r.exterior,s=r.interiors;if(q_(a,t[0],t[1])){for(var l=0;l<(s?s.length:0);l++)if(q_(s[l],t[0],t[1]))continue t;return!0}}}return!1},o1.prototype.transformTo=function(t,e,n,i){var o=this.getBoundingRect(),r=o.width/o.height;n?i=i||n/r:n=r*i;for(var r=new G(t,e,n,i),a=o.calculateTransform(r),s=this.geometries,l=0;l<s.length;l++){var u=s[l];"polygon"===u.type?(K_(u.exterior,a),E(u.interiors,function(t){K_(t,a)})):E(u.points,function(t){K_(t,a)})}(o=this._rect).copy(r),this._center=[o.x+o.width/2,o.y+o.height/2]},o1.prototype.cloneShallow=function(t){t=new o1(t=null==t?this.name:t,this.geometries,this._center);return t._rect=this._rect,t.transformTo=null,t};var e1,n1,i1=o1;function o1(t,e,n){t=e1.call(this,t)||this;return t.type="geoJSON",t.geometries=e,t._center=n&&[n[0],n[1]],t}function r1(t,e){t=n1.call(this,t)||this;return t.type="geoSVG",t._elOnlyForCalculate=e,t}function a1(t,e,n){for(var i=0;i<t.length;i++)t[i]=s1(t[i],e[i],n)}function s1(t,e,n){for(var i=[],o=e[0],r=e[1],a=0;a<t.length;a+=2){var s=(s=t.charCodeAt(a)-64)>>1^-(1&s),l=(l=t.charCodeAt(a+1)-64)>>1^-(1&l),o=s+=o,r=l+=r;i.push([s/n,l/n])}return i}function l1(t,r){return F(ut((t=(e=t).UTF8Encoding?(null==(o=(n=e).UTF8Scale)&&(o=1024),E(n.features,function(t){var e=t.geometry,n=e.encodeOffsets,i=e.coordinates;if(n)switch(e.type){case"LineString":e.coordinates=s1(i,n,o);break;case"Polygon":case"MultiLineString":a1(i,n,o);break;case"MultiPolygon":E(i,function(t,e){return a1(t,n[e],o)})}}),n.UTF8Encoding=!1,n):e).features,function(t){return t.geometry&&t.properties&&0<t.geometry.coordinates.length}),function(t){var e=t.properties,n=t.geometry,i=[];switch(n.type){case"Polygon":var o=n.coordinates;i.push(new J_(o[0],o.slice(1)));break;case"MultiPolygon":E(n.coordinates,function(t){t[0]&&i.push(new J_(t[0],t.slice(1)))});break;case"LineString":i.push(new t1([n.coordinates]));break;case"MultiLineString":i.push(new t1(n.coordinates))}t=new i1(e[r||"name"],i,e.cp);return t.properties=e,t});var e,n,o}u(r1,n1=em),r1.prototype.calcCenter=function(){for(var t=this._elOnlyForCalculate,e=t.getBoundingRect(),e=[e.x+e.width/2,e.y+e.height/2],n=Pe(j_),i=t;i&&!i.isGeoSVGGraphicRoot;)Re(n,i.getLocalTransform(),n),i=i.parent;return Be(n,n),Jt(e,e,n),e};var ea=Object.freeze({__proto__:null,MAX_SAFE_INTEGER:9007199254740991,asc:ir,getPercentWithPrecision:function(t,e,n){return t[e]&&sr(t,n)[e]||0},getPixelPrecision:ar,getPrecision:or,getPrecisionSafe:rr,isNumeric:yr,isRadianAroundZero:ur,linearMap:tr,nice:fr,numericToNumber:gr,parseDate:cr,quantile:function(t,e){var e=(t.length-1)*e+1,n=Math.floor(e),i=+t[n-1];return(e=e-n)?i+e*(t[n]-i):i},quantity:pr,quantityExponent:dr,reformIntervals:function(t){t.sort(function(t,e){return function t(e,n,i){return e.interval[i]<n.interval[i]||e.interval[i]===n.interval[i]&&(e.close[i]-n.close[i]==(i?-1:1)||!i&&t(e,n,1))}(t,e,0)?-1:1});for(var e=-1/0,n=1,i=0;i<t.length;){for(var o=t[i].interval,r=t[i].close,a=0;a<2;a++)o[a]<=e&&(o[a]=e,r[a]=a?1:1-n),e=o[a],n=r[a];o[0]===o[1]&&r[0]*r[1]!=1?t.splice(i,1):i++}return t},remRadian:lr,round:nr}),nc=Object.freeze({__proto__:null,format:hp,parse:cr}),op=Object.freeze({__proto__:null,Arc:ph,BezierCurve:lh,BoundingRect:G,Circle:mu,CompoundPath:gh,Ellipse:wu,Group:Wo,Image:Cs,IncrementalDisplayable:e,Line:nh,LinearGradient:xh,Polygon:Zu,Polyline:$u,RadialGradient:mh,Rect:Es,Ring:Wu,Sector:Bu,Text:Hs,clipPointsByRect:lc,clipRectByRect:uc,createIcon:hc,extendPath:Zh,extendShape:Uh,getShapeClass:jh,getTransform:ic,initProps:Eh,makeImage:$h,makePath:Kh,mergePath:Jh,registerShape:qh,resizePath:tc,updateProps:Nh}),Rc=Object.freeze({__proto__:null,addCommas:Ip,capitalFirst:function(t){return t&&t.charAt(0).toUpperCase()+t.substr(1)},encodeHTML:me,formatTime:function(t,e,n){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var i=(e=cr(e))[(n=n?"getUTC":"get")+"FullYear"](),o=e[n+"Month"]()+1,r=e[n+"Date"](),a=e[n+"Hours"](),s=e[n+"Minutes"](),l=e[n+"Seconds"](),e=e[n+"Milliseconds"]();return t.replace("MM",lp(o,2)).replace("M",o).replace("yyyy",i).replace("yy",lp(i%100+"",2)).replace("dd",lp(r,2)).replace("d",r).replace("hh",lp(a,2)).replace("h",a).replace("mm",lp(s,2)).replace("m",s).replace("ss",lp(l,2)).replace("s",l).replace("SSS",lp(e,3))},formatTpl:Pp,getTextRect:function(t,e,n,i,o,r,a,s){return new Hs({style:{text:t,font:e,align:n,verticalAlign:i,padding:o,rich:r,overflow:a?"truncate":null,lineHeight:s}}).getBoundingRect()},getTooltipMarker:Op,normalizeCssArray:Dp,toCamelCase:Cp,truncateText:la}),Gy=Object.freeze({__proto__:null,bind:S,clone:y,curry:M,defaults:B,each:E,extend:P,filter:ut,indexOf:C,inherits:rt,isArray:V,isFunction:D,isObject:O,isString:H,map:F,merge:d,reduce:lt}),u1=Rr();function h1(t){return"category"===t.type?(o=(e=t).getLabelModel(),r=p1(e,o),!o.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:r.labelCategoryInterval}:r):(o=(n=t).scale.getTicks(),i=N_(n),{labels:F(o,function(t,e){return{level:t.level,formattedLabel:i(t,e),rawLabel:n.scale.getLabel(t),tickValue:t.value}})});var n,i,e,o,r}function c1(t,e){var n,i,o,r,a,s;return"category"===t.type?(e=e,r=d1(n=t,"ticks"),a=B_(e),(s=f1(r,a))||(e.get("show")&&!n.scale.isBlank()||(i=[]),i=D(a)?m1(n,a,!0):"auto"===a?(s=p1(n,n.getLabelModel()),o=s.labelCategoryInterval,F(s.labels,function(t){return t.tickValue})):y1(n,o=a,!0),g1(r,a,{ticks:i,tickCategoryInterval:o}))):{ticks:F(t.scale.getTicks(),function(t){return t.value})}}function p1(t,e){var n,i=d1(t,"labels"),e=B_(e);return f1(i,e)||g1(i,e,{labels:D(e)?m1(t,e):y1(t,n="auto"===e?null!=(t=u1(i=t).autoInterval)?t:u1(i).autoInterval=i.calculateCategoryInterval():e),labelCategoryInterval:n})}function d1(t,e){return u1(t)[e]||(u1(t)[e]=[])}function f1(t,e){for(var n=0;n<t.length;n++)if(t[n].key===e)return t[n].value}function g1(t,e,n){return t.push({key:e,value:n}),n}function y1(t,e,n){var i=N_(t),o=t.scale,r=o.getExtent(),a=t.getLabelModel(),s=[],l=Math.max((e||0)+1,1),e=r[0],u=o.count(),u=(0!==e&&1<l&&2<u/l&&(e=Math.round(Math.ceil(e/l)*l)),F_(t)),t=a.get("showMinLabel")||u,a=a.get("showMaxLabel")||u;t&&e!==r[0]&&c(r[0]);for(var h=e;h<=r[1];h+=l)c(h);function c(t){var e={value:t};s.push(n?t:{formattedLabel:i(e),rawLabel:o.getLabel(e),tickValue:t})}return a&&h-l!==r[1]&&c(r[1]),s}function m1(t,i,o){var r=t.scale,a=N_(t),s=[];return E(r.getTicks(),function(t){var e=r.getLabel(t),n=t.value;i(t.value,e)&&s.push(o?n:{formattedLabel:a(t),rawLabel:e,tickValue:n})}),s}var v1=[0,1],Ec=(_1.prototype.contain=function(t){var e=this._extent,n=Math.min(e[0],e[1]),e=Math.max(e[0],e[1]);return n<=t&&t<=e},_1.prototype.containData=function(t){return this.scale.contain(t)},_1.prototype.getExtent=function(){return this._extent.slice()},_1.prototype.getPixelPrecision=function(t){return ar(t||this.scale.getExtent(),this._extent)},_1.prototype.setExtent=function(t,e){var n=this._extent;n[0]=t,n[1]=e},_1.prototype.dataToCoord=function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&"ordinal"===i.type&&x1(n=n.slice(),i.count()),tr(t,v1,n,e)},_1.prototype.coordToData=function(t,e){var n=this._extent,i=this.scale,i=(this.onBand&&"ordinal"===i.type&&x1(n=n.slice(),i.count()),tr(t,n,v1,e));return this.scale.scale(i)},_1.prototype.pointToData=function(t,e){},_1.prototype.getTicksCoords=function(t){var e,n,i,o,r=(t=t||{}).tickModel||this.getTickModel(),a=F(c1(this,r).ticks,function(t){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(t):t),tickValue:t}},this),s=this,l=a,r=r.get("alignWithLabel"),t=t.clamp,u=l.length;function h(t,e){return t=nr(t),e=nr(e),o?e<t:t<e}return s.onBand&&!r&&u&&(r=s.getExtent(),1===u?(l[0].coord=r[0],e=l[1]={coord:r[1]}):(n=l[u-1].tickValue-l[0].tickValue,i=(l[u-1].coord-l[0].coord)/n,E(l,function(t){t.coord-=i/2}),n=1+s.scale.getExtent()[1]-l[u-1].tickValue,e={coord:l[u-1].coord+i*n},l.push(e)),o=r[0]>r[1],h(l[0].coord,r[0])&&(t?l[0].coord=r[0]:l.shift()),t&&h(r[0],l[0].coord)&&l.unshift({coord:r[0]}),h(r[1],e.coord)&&(t?e.coord=r[1]:l.pop()),t)&&h(e.coord,r[1])&&l.push({coord:r[1]}),a},_1.prototype.getMinorTicksCoords=function(){var t;return"ordinal"===this.scale.type?[]:(t=this.model.getModel("minorTick").get("splitNumber"),F(this.scale.getMinorTicks(t=0<t&&t<100?t:5),function(t){return F(t,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this)},this))},_1.prototype.getViewLabels=function(){return h1(this).labels},_1.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},_1.prototype.getTickModel=function(){return this.model.getModel("axisTick")},_1.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),e=e[1]-e[0]+(this.onBand?1:0),t=(0===e&&(e=1),Math.abs(t[1]-t[0]));return Math.abs(t)/e},_1.prototype.calculateCategoryInterval=function(){o=(n=d=this).getLabelModel();var t={axisRotate:n.getRotate?n.getRotate():n.isHorizontal&&!n.isHorizontal()?90:0,labelRotate:o.get("rotate")||0,font:o.getFont()},e=N_(d),n=(t.axisRotate-t.labelRotate)/180*Math.PI,i=(o=d.scale).getExtent(),o=o.count();if(i[1]-i[0]<1)return 0;var r=1;40<o&&(r=Math.max(1,Math.floor(o/40)));for(var a=i[0],s=d.dataToCoord(a+1)-d.dataToCoord(a),l=Math.abs(s*Math.cos(n)),s=Math.abs(s*Math.sin(n)),u=0,h=0;a<=i[1];a+=r)var c=1.3*(p=Mo(e({value:a}),t.font,"center","top")).width,p=1.3*p.height,u=Math.max(u,c,7),h=Math.max(h,p,7);var n=u/l,l=h/s,s=(isNaN(n)&&(n=1/0),isNaN(l)&&(l=1/0),Math.max(0,Math.floor(Math.min(n,l)))),n=u1(d.model),l=d.getExtent(),d=n.lastAutoInterval,f=n.lastTickCount;return null!=d&&null!=f&&Math.abs(d-s)<=1&&Math.abs(f-o)<=1&&s<d&&n.axisExtent0===l[0]&&n.axisExtent1===l[1]?s=d:(n.lastTickCount=o,n.lastAutoInterval=s,n.axisExtent0=l[0],n.axisExtent1=l[1]),s},_1);function _1(t,e,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=n||[0,0]}function x1(t,e){e=(t[1]-t[0])/e/2;t[0]+=e,t[1]-=e}var w1=2*Math.PI,b1=es.CMD,S1=["top","right","bottom","left"];function M1(t,e,n,i,o,r,a,s){var l=o-t,u=r-e,n=n-t,i=i-e,h=Math.sqrt(n*n+i*i),l=(l*(n/=h)+u*(i/=h))/h,u=(s&&(l=Math.min(Math.max(l,0),1)),a[0]=t+(l*=h)*n),s=a[1]=e+l*i;return Math.sqrt((u-o)*(u-o)+(s-r)*(s-r))}function T1(t,e,n,i,o,r,a){n<0&&(t+=n,n=-n),i<0&&(e+=i,i=-i);n=t+n,i=e+i,t=a[0]=Math.min(Math.max(o,t),n),n=a[1]=Math.min(Math.max(r,e),i);return Math.sqrt((t-o)*(t-o)+(n-r)*(n-r))}var I1=[];function C1(t,e,n){for(var i,o,r,a,s,l,u,h,c,p=0,d=0,f=0,g=0,y=1/0,m=e.data,v=t.x,_=t.y,x=0;x<m.length;){var w=m[x++],b=(1===x&&(f=p=m[x],g=d=m[x+1]),y);switch(w){case b1.M:p=f=m[x++],d=g=m[x++];break;case b1.L:b=M1(p,d,m[x],m[x+1],v,_,I1,!0),p=m[x++],d=m[x++];break;case b1.C:b=Hn(p,d,m[x++],m[x++],m[x++],m[x++],m[x],m[x+1],v,_,I1),p=m[x++],d=m[x++];break;case b1.Q:b=Yn(p,d,m[x++],m[x++],m[x],m[x+1],v,_,I1),p=m[x++],d=m[x++];break;case b1.A:var S=m[x++],M=m[x++],T=m[x++],I=m[x++],C=m[x++],D=m[x++],k=(x+=1,!!(1-m[x++])),A=Math.cos(C)*T+S,L=Math.sin(C)*I+M;x<=1&&(f=A,g=L),L=(A=C)+D,k=k,a=(v-(i=S))*(r=I)/T+S,s=_,l=I1,c=h=u=void 0,a-=i,s-=o=M,u=Math.sqrt(a*a+s*s),h=(a/=u)*r+i,c=(s/=u)*r+o,b=Math.abs(A-L)%w1<1e-4||((L=k?(k=A,A=os(L),os(k)):(A=os(A),os(L)))<A&&(L+=w1),(k=Math.atan2(s,a))<0&&(k+=w1),A<=k&&k<=L)||A<=k+w1&&k+w1<=L?(l[0]=h,l[1]=c,u-r):(c=((k=r*Math.cos(A)+i)-a)*(k-a)+((h=r*Math.sin(A)+o)-s)*(h-s))<(i=((u=r*Math.cos(L)+i)-a)*(u-a)+((A=r*Math.sin(L)+o)-s)*(A-s))?(l[0]=k,l[1]=h,Math.sqrt(c)):(l[0]=u,l[1]=A,Math.sqrt(i)),p=Math.cos(C+D)*T+S,d=Math.sin(C+D)*I+M;break;case b1.R:b=T1(f=p=m[x++],g=d=m[x++],m[x++],m[x++],v,_,I1);break;case b1.Z:b=M1(p,d,f,g,v,_,I1,!0),p=f,d=g}b<y&&(y=b,n.set(I1[0],I1[1]))}return y}var D1=new z,k1=new z,A1=new z,L1=new z,P1=new z;function O1(t,e){if(t){var n=t.getTextGuideLine(),i=t.getTextContent();if(i&&n){var o=t.textGuideLineConfig||{},r=[[0,0],[0,0],[0,0]],a=o.candidates||S1,s=i.getBoundingRect().clone(),l=(s.applyTransform(i.getComputedTransform()),1/0),u=o.anchor,h=t.getComputedTransform(),c=h&&Be([],h),p=e.get("length2")||0;u&&A1.copy(u);for(var d=0;d<a.length;d++){x=_=v=m=y=g=f=void 0;var f=a[d],g=0,y=s,m=D1,v=L1,_=y.width,x=y.height;switch(f){case"top":m.set(y.x+_/2,y.y-g),v.set(0,-1);break;case"bottom":m.set(y.x+_/2,y.y+x+g),v.set(0,1);break;case"left":m.set(y.x-g,y.y+x/2),v.set(-1,0);break;case"right":m.set(y.x+_+g,y.y+x/2),v.set(1,0)}z.scaleAndAdd(k1,D1,L1,p),k1.transform(c);f=t.getBoundingRect(),f=u?u.distance(k1):t instanceof _s?C1(k1,t.path,A1):(b=A1,w=T1((w=f).x,f.y,f.width,f.height,k1.x,k1.y,I1),b.set(I1[0],I1[1]),w);f<l&&(l=f,k1.transform(h),A1.transform(h),A1.toArray(r[0]),k1.toArray(r[1]),D1.toArray(r[2]))}E1(r,e.get("minTurnAngle")),n.setShape({points:r})}}var w,b}var R1=[],N1=new z;function E1(t,e){var n,i;e<=180&&0<e&&(e=e/180*Math.PI,D1.fromArray(t[0]),k1.fromArray(t[1]),A1.fromArray(t[2]),z.sub(L1,D1,k1),z.sub(P1,A1,k1),i=L1.len(),n=P1.len(),i<.001||n<.001||(L1.scale(1/i),P1.scale(1/n),i=L1.dot(P1),Math.cos(e)<i&&(n=M1(k1.x,k1.y,A1.x,A1.y,D1.x,D1.y,R1,!1),N1.fromArray(R1),N1.scaleAndAdd(P1,n/Math.tan(Math.PI-e)),i=A1.x!==k1.x?(N1.x-k1.x)/(A1.x-k1.x):(N1.y-k1.y)/(A1.y-k1.y),isNaN(i)||(i<0?z.copy(N1,k1):1<i&&z.copy(N1,A1),N1.toArray(t[1])))))}function z1(t,e,n,i){var o="normal"===n,n=o?t:t.ensureState(n),e=(n.ignore=e,i.get("smooth")),e=(e&&!0===e&&(e=.3),n.shape=n.shape||{},0<e&&(n.shape.smooth=e),i.getModel("lineStyle").getLineStyle());o?t.useStyle(e):n.style=e}function B1(t,e){var n=e.smooth,i=e.points;if(i)if(t.moveTo(i[0][0],i[0][1]),0<n&&3<=i.length){var e=jt(i[0],i[1]),o=jt(i[1],i[2]);e&&o?(n=Math.min(e,o)*n,e=Qt([],i[1],i[0],n/e),n=Qt([],i[1],i[2],n/o),o=Qt([],e,n,.5),t.bezierCurveTo(e[0],e[1],e[0],e[1],o[0],o[1]),t.bezierCurveTo(n[0],n[1],n[0],n[1],i[2][0],i[2][1])):(t.lineTo(i[1][0],i[1][1]),t.lineTo(i[2][0],i[2][1]))}else for(var r=1;r<i.length;r++)t.lineTo(i[r][0],i[r][1])}function F1(t,e,n){var i=t.getTextGuideLine(),o=t.getTextContent();if(o){for(var r=e.normal,a=r.get("show"),s=o.ignore,l=0;l<sl.length;l++){var u,h=sl[l],c=e[h],p="normal"===h;c&&(u=c.get("show"),(p?s:R(o.states[h]&&o.states[h].ignore,s))||!R(u,a)?((u=p?i:i&&i.states[h])&&(u.ignore=!0),i&&z1(i,!0,h,c)):(i||(i=new $u,t.setTextGuideLine(i),p||!s&&a||z1(i,!0,"normal",e.normal),t.stateProxy&&(i.stateProxy=t.stateProxy)),z1(i,!1,h,c)))}i&&(B(i.style,n),i.style.fill=null,n=r.get("showAbove"),(t.textGuideLineConfig=t.textGuideLineConfig||{}).showAbove=n||!1,i.buildPath=B1)}else i&&t.removeTextGuideLine()}function V1(t,e){for(var n={normal:t.getModel(e=e||"labelLine")},i=0;i<al.length;i++){var o=al[i];n[o]=t.getModel([o,e])}return n}function H1(t){for(var e=[],n=0;n<t.length;n++){var i,o,r,a,s,l,u=t[n];u.defaultAttr.ignore||(o=(i=u.label).getComputedTransform(),r=i.getBoundingRect(),a=!o||o[1]<1e-5&&o[2]<1e-5,l=i.style.margin||0,(s=r.clone()).applyTransform(o),s.x-=l/2,s.y-=l/2,s.width+=l,s.height+=l,l=a?new Dh(r,o):null,e.push({label:i,labelLine:u.labelLine,rect:s,localRect:r,obb:l,priority:u.priority,defaultAttr:u.defaultAttr,layoutOption:u.computedLayoutOption,axisAligned:a,transform:o}))}return e}function W1(s,l,u,t,e,n){var h=s.length;if(!(h<2)){s.sort(function(t,e){return t.rect[l]-e.rect[l]});for(var i,o=0,r=!1,a=[],c=0,p=0;p<h;p++){var d=s[p],f=d.rect,d=((i=f[l]-o)<0&&(f[l]-=i,d.label[l]-=i,r=!0),Math.max(-i,0));a.push(d),c+=d,o=f[l]+f[u]}0<c&&n&&w(-c/h,0,h);var g,y,m=s[0],v=s[h-1];return _(),g<0&&b(-g,.8),y<0&&b(y,.8),_(),x(g,y,1),x(y,g,-1),_(),g<0&&S(-g),y<0&&S(y),r}function _(){g=m.rect[l]-t,y=e-v.rect[l]-v.rect[u]}function x(t,e,n){t<0&&(0<(e=Math.min(e,-t))?(w(e*n,0,h),(e=e+t)<0&&b(-e*n,1)):b(-t*n,1))}function w(t,e,n){0!==t&&(r=!0);for(var i=e;i<n;i++){var o=s[i];o.rect[l]+=t,o.label[l]+=t}}function b(t,e){for(var n=[],i=0,o=1;o<h;o++){var r=s[o-1].rect,r=Math.max(s[o].rect[l]-r[l]-r[u],0);n.push(r),i+=r}if(i){var a=Math.min(Math.abs(t)/i,e);if(0<t)for(o=0;o<h-1;o++)w(n[o]*a,0,o+1);else for(o=h-1;0<o;o--)w(-n[o-1]*a,o,h)}}function S(t){var e=t<0?-1:1;t=Math.abs(t);for(var n=Math.ceil(t/(h-1)),i=0;i<h-1;i++)if(0<e?w(n,0,i+1):w(-n,h-i-1,h),(t-=n)<=0)return}}function G1(t,e,n,i){return W1(t,"y","height",e,n,i)}function X1(t){var e=[],n=(t.sort(function(t,e){return e.priority-t.priority}),new G(0,0,0,0));function i(t){var e;t.ignore||null==(e=t.ensureState("emphasis")).ignore&&(e.ignore=!1),t.ignore=!0}for(var o=0;o<t.length;o++){var r=t[o],a=r.axisAligned,s=r.localRect,l=r.transform,u=r.label,h=r.labelLine;n.copy(r.rect),n.width-=.1,n.height-=.1,n.x+=.05,n.y+=.05;for(var c=r.obb,p=!1,d=0;d<e.length;d++){var f=e[d];if(n.intersect(f.rect)){if(a&&f.axisAligned){p=!0;break}if(f.obb||(f.obb=new Dh(f.localRect,f.transform)),(c=c||new Dh(s,l)).intersect(f.obb)){p=!0;break}}}p?(i(u),h&&i(h)):(u.attr("ignore",r.defaultAttr.ignore),h&&h.attr("ignore",r.defaultAttr.labelGuideIgnore),e.push(r))}}function U1(t,e){var n=t.label,e=e&&e.getTextGuideLine();return{dataIndex:t.dataIndex,dataType:t.dataType,seriesIndex:t.seriesModel.seriesIndex,text:t.label.style.text,rect:t.hostRect,labelRect:t.rect,align:n.style.align,verticalAlign:n.style.verticalAlign,labelLinePoints:function(t){if(t){for(var e=[],n=0;n<t.length;n++)e.push(t[n].slice());return e}}(e&&e.shape.points)}}var Y1=["align","verticalAlign","width","height","fontSize"],Z1=new vo,q1=Rr(),j1=Rr();function K1(t,e,n){for(var i=0;i<n.length;i++){var o=n[i];null!=e[o]&&(t[o]=e[o])}}var $1=["x","y","rotation"],Q1=(J1.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},J1.prototype._addLabel=function(t,e,n,i,o){var r=i.style,a=i.__hostTarget.textConfig||{},s=i.getComputedTransform(),l=i.getBoundingRect().plain();G.applyTransform(l,l,s),s?Z1.setLocalTransform(s):(Z1.x=Z1.y=Z1.rotation=Z1.originX=Z1.originY=0,Z1.scaleX=Z1.scaleY=1),Z1.rotation=os(Z1.rotation);var u,s=i.__hostTarget,h=(s&&(u=s.getBoundingRect().plain(),h=s.getComputedTransform(),G.applyTransform(u,u,h)),u&&s.getTextGuideLine());this._labelList.push({label:i,labelLine:h,seriesModel:n,dataIndex:t,dataType:e,layoutOption:o,computedLayoutOption:null,rect:l,hostRect:u,priority:u?u.width*u.height:0,defaultAttr:{ignore:i.ignore,labelGuideIgnore:h&&h.ignore,x:Z1.x,y:Z1.y,scaleX:Z1.scaleX,scaleY:Z1.scaleY,rotation:Z1.rotation,style:{x:r.x,y:r.y,align:r.align,verticalAlign:r.verticalAlign,width:r.width,height:r.height,fontSize:r.fontSize},cursor:i.cursor,attachedPos:a.position,attachedRot:a.rotation}})},J1.prototype.addLabelsOfSeries=function(t){var n=this,i=(this._chartViewList.push(t),t.__model),o=i.get("labelLayout");(D(o)||ht(o).length)&&t.group.traverse(function(t){if(t.ignore)return!0;var e=t.getTextContent(),t=k(t);e&&!e.disableLabelLayout&&n._addLabel(t.dataIndex,t.dataType,i,e,o)})},J1.prototype.updateLayoutConfig=function(t){var e=t.getWidth(),n=t.getHeight();for(var i=0;i<this._labelList.length;i++){var o=this._labelList[i],r=o.label,a=r.__hostTarget,s=o.defaultAttr,l=void 0,l=(D(o.layoutOption)?o.layoutOption(U1(o,a)):o.layoutOption)||{},u=(o.computedLayoutOption=l,Math.PI/180),h=(a&&a.setTextConfig({local:!1,position:null!=l.x||null!=l.y?null:s.attachedPos,rotation:null!=l.rotate?l.rotate*u:s.attachedRot,offset:[l.dx||0,l.dy||0]}),!1);null!=l.x?(r.x=er(l.x,e),r.setStyle("x",0),h=!0):(r.x=s.x,r.setStyle("x",s.style.x)),null!=l.y?(r.y=er(l.y,n),r.setStyle("y",0),h=!0):(r.y=s.y,r.setStyle("y",s.style.y)),l.labelLinePoints&&(c=a.getTextGuideLine())&&(c.setShape({points:l.labelLinePoints}),h=!1),q1(r).needsUpdateLabelLine=h,r.rotation=null!=l.rotate?l.rotate*u:s.rotation,r.scaleX=s.scaleX,r.scaleY=s.scaleY;for(var c,p=0;p<Y1.length;p++){var d=Y1[p];r.setStyle(d,(null!=l[d]?l:s.style)[d])}l.draggable?(r.draggable=!0,r.cursor="move",a&&(c=o.seriesModel,null!=o.dataIndex&&(c=o.seriesModel.getData(o.dataType).getItemModel(o.dataIndex)),r.on("drag",function(t,e){return function(){O1(t,e)}}(a,c.getModel("labelLine"))))):(r.off("drag"),r.cursor=s.cursor)}},J1.prototype.layout=function(t){var e,n=t.getWidth(),t=t.getHeight(),i=H1(this._labelList),o=ut(i,function(t){return"shiftX"===t.layoutOption.moveOverlap}),r=ut(i,function(t){return"shiftY"===t.layoutOption.moveOverlap});W1(o,"x","width",0,n,e),G1(r,0,t),X1(ut(i,function(t){return t.layoutOption.hideOverlap}))},J1.prototype.processLabelsOverall=function(){var a=this;E(this._chartViewList,function(t){var i=t.__model,o=t.ignoreLabelLineUpdate,r=i.isAnimationEnabled();t.group.traverse(function(t){if(t.ignore&&!t.forceLabelAnimation)return!0;var e=!o,n=t.getTextContent();(e=!e&&n?q1(n).needsUpdateLabelLine:e)&&a._updateLabelLine(t,i),r&&a._animateLabels(t,i)})})},J1.prototype._updateLabelLine=function(t,e){var n=t.getTextContent(),i=k(t),o=i.dataIndex;n&&null!=o&&(e=(n=e.getData(i.dataType)).getItemModel(o),i={},(o=n.getItemVisual(o,"style"))&&(n=n.getVisual("drawType"),i.stroke=o[n]),o=e.getModel("labelLine"),F1(t,V1(e),i),O1(t,o))},J1.prototype._animateLabels=function(t,e){var n,i,o,r,a,s,l,u,h,c,p,d,f,g=t.getTextContent(),y=t.getTextGuideLine();!g||!t.forceLabelAnimation&&(g.ignore||g.invisible||t.disableLabelAnimation||zh(t))||(d=(f=q1(g)).oldLayout,n=(i=k(t)).dataIndex,s={x:g.x,y:g.y,rotation:g.rotation},i=e.getData(i.dataType),d?(g.attr(d),(t=t.prevStates)&&(0<=C(t,"select")&&g.attr(f.oldLayoutSelect),0<=C(t,"emphasis"))&&g.attr(f.oldLayoutEmphasis),Nh(g,s,e,n)):(g.attr(s),Cc(g).valueAnimation||(t=R(g.style.opacity,1),g.style.opacity=0,Eh(g,{style:{opacity:t}},e,n))),f.oldLayout=s,g.states.select&&(K1(t=f.oldLayoutSelect={},s,$1),K1(t,g.states.select,$1)),g.states.emphasis&&(K1(t=f.oldLayoutEmphasis={},s,$1),K1(t,g.states.emphasis,$1)),r=n,a=i,l=s=e,(p=Cc(o=g)).valueAnimation&&p.prevValue!==p.value&&(u=p.defaultInterpolatedText,h=R(p.interpolatedValue,p.prevValue),c=p.value,o.percent=0,(null==p.prevValue?Eh:Nh)(o,{percent:1},s,r,null,function(t){var e=Wr(a,p.precision,h,c,t),t=(p.interpolatedValue=1===t?null:e,vc({labelDataIndex:r,labelFetcher:l,defaultText:u?u(e):e+""},p.statesModels,e));mc(o,t)}))),!y||y.ignore||y.invisible||(d=(f=j1(y)).oldLayout,t={points:y.shape.points},d?(y.attr({shape:d}),Nh(y,{shape:t},e)):(y.setShape(t),y.style.strokePercent=0,Eh(y,{style:{strokePercent:1}},e)),f.oldLayout=t)},J1);function J1(){this._labelList=[],this._chartViewList=[]}var tx=Rr();function ex(t){t.registerUpdateLifecycle("series:beforeupdate",function(t,e,n){(tx(e).labelManager||(tx(e).labelManager=new Q1)).clearLabels()}),t.registerUpdateLifecycle("series:layoutlabels",function(t,e,n){var i=tx(e).labelManager;n.updatedSeries.forEach(function(t){i.addLabelsOfSeries(e.getViewOfSeriesModel(t))}),i.updateLayoutConfig(e),i.layout(e),i.processLabelsOverall()})}function nx(t,e,n){var i=X.createCanvas(),o=e.getWidth(),e=e.getHeight(),r=i.style;return r&&(r.position="absolute",r.left="0",r.top="0",r.width=o+"px",r.height=e+"px",i.setAttribute("data-zr-dom-id",t)),i.width=o*n,i.height=e*n,i}U_(ex);u(rx,ix=ae),rx.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},rx.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},rx.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},rx.prototype.setUnpainted=function(){this.__firstTimePaint=!0},rx.prototype.createBackBuffer=function(){var t=this.dpr;this.domBack=nx("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!==t&&this.ctxBack.scale(t,t)},rx.prototype.createRepaintRects=function(t,e,n,i){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o,l=[],u=this.maxRepaintRectCount,h=!1,c=new G(0,0,0,0);function r(t){if(t.isFinite()&&!t.isZero())if(0===l.length)(e=new G(0,0,0,0)).copy(t),l.push(e);else{for(var e,n=!1,i=1/0,o=0,r=0;r<l.length;++r){var a=l[r];if(a.intersect(t)){var s=new G(0,0,0,0);s.copy(a),s.union(t),l[r]=s,n=!0;break}h&&(c.copy(t),c.union(a),s=t.width*t.height,a=a.width*a.height,(a=c.width*c.height-s-a)<i)&&(i=a,o=r)}h&&(l[o].union(t),n=!0),n||((e=new G(0,0,0,0)).copy(t),l.push(e)),h=h||l.length>=u}}for(var a,s=this.__startIndex;s<this.__endIndex;++s)(p=t[s])&&(f=p.shouldBePainted(n,i,!0,!0),(d=p.__isRendered&&(p.__dirty&mn||!f)?p.getPrevPaintRect():null)&&r(d),a=f&&(p.__dirty&mn||!p.__isRendered)?p.getPaintRect():null)&&r(a);for(s=this.__prevStartIndex;s<this.__prevEndIndex;++s){var p,d,f=(p=e[s])&&p.shouldBePainted(n,i,!0,!0);!p||f&&p.__zr||!p.__isRendered||(d=p.getPrevPaintRect())&&r(d)}do{for(o=!1,s=0;s<l.length;)if(l[s].isZero())l.splice(s,1);else{for(var g=s+1;g<l.length;)l[s].intersect(l[g])?(o=!0,l[s].union(l[g]),l.splice(g,1)):g++;s++}}while(o);return this._paintRects=l},rx.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},rx.prototype.resize=function(t,e){var n=this.dpr,i=this.dom,o=i.style,r=this.domBack;o&&(o.width=t+"px",o.height=e+"px"),i.width=t*n,i.height=e*n,r&&(r.width=t*n,r.height=e*n,1!==n)&&this.ctxBack.scale(n,n)},rx.prototype.clear=function(t,r,e){var n=this.dom,a=this.ctx,i=n.width,o=n.height,s=(r=r||this.clearColor,this.motionBlur&&!t),l=this.lastFrameAlpha,u=this.dpr,h=this,c=(s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(n,0,0,i/u,o/u)),this.domBack);function p(t,e,n,i){var o;a.clearRect(t,e,n,i),r&&"transparent"!==r&&(o=void 0,gt(r)?(o=(r.global||r.__width===n&&r.__height===i)&&r.__canvasGradient||hm(a,r,{x:0,y:0,width:n,height:i}),r.__canvasGradient=o,r.__width=n,r.__height=i):yt(r)&&(r.scaleX=r.scaleX||u,r.scaleY=r.scaleY||u,o=xm(a,r,{dirty:function(){h.setUnpainted(),h.painter.refresh()}})),a.save(),a.fillStyle=o||r,a.fillRect(t,e,n,i),a.restore()),s&&(a.save(),a.globalAlpha=l,a.drawImage(c,t,e,n,i),a.restore())}!e||s?p(0,0,i,o):e.length&&E(e,function(t){p(t.x*u,t.y*u,t.width*u,t.height*u)})};var ix,ox=rx;function rx(t,e,n){var i,o=ix.call(this)||this,t=(o.motionBlur=!1,o.lastFrameAlpha=.7,o.dpr=1,o.virtual=!1,o.config={},o.incremental=!1,o.zlevel=0,o.maxRepaintRectCount=5,o.__dirty=!0,o.__firstTimePaint=!0,o.__used=!1,o.__drawIndex=0,o.__startIndex=0,o.__endIndex=0,o.__prevStartIndex=null,o.__prevEndIndex=null,n=n||lo,"string"==typeof t?i=nx(t,e,n):O(t)&&(t=(i=t).id),o.id=t,(o.dom=i).style);return t&&(Nt(i),i.onselectstart=function(){return!1},t.padding="0",t.margin="0",t.borderWidth="0"),o.painter=e,o.dpr=n,o}var ax=314159;p.prototype.getType=function(){return"canvas"},p.prototype.isSingleCanvas=function(){return this._singleCanvas},p.prototype.getViewportRoot=function(){return this._domRoot},p.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},p.prototype.refresh=function(t){var e=this.storage.getDisplayList(!0),n=this._prevDisplayList,i=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,n,t,this._redrawId);for(var o=0;o<i.length;o++){var r,a=i[o],a=this._layers[a];!a.__builtin__&&a.refresh&&(r=0===o?this._backgroundColor:null,a.refresh(r))}return this._opts.useDirtyRect&&(this._prevDisplayList=e.slice()),this},p.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},p.prototype._paintHoverList=function(t){var e=t.length,n=this._hoverlayer;if(n&&n.clear(),e){for(var i,o={inHover:!0,viewWidth:this._width,viewHeight:this._height},r=0;r<e;r++){var a=t[r];a.__inHover&&(n=n||(this._hoverlayer=this.getLayer(1e5)),i||(i=n.ctx).save(),Om(i,a,o,r===e-1))}i&&i.restore()}},p.prototype.getHoverLayer=function(){return this.getLayer(1e5)},p.prototype.paintOne=function(t,e){Pm(t,e)},p.prototype._paintList=function(t,e,n,i){var o,r,a;this._redrawId===i&&(n=n||!1,this._updateLayerStatus(t),o=(r=this._doPaintList(t,e,n)).finished,r=r.needsRefreshHover,this._needsManuallyCompositing&&this._compositeManually(),r&&this._paintHoverList(t),o?this.eachLayer(function(t){t.afterBrush&&t.afterBrush()}):(a=this,Mn(function(){a._paintList(t,e,n,i)})))},p.prototype._compositeManually=function(){var e=this.getLayer(ax).ctx,n=this._domRoot.width,i=this._domRoot.height;e.clearRect(0,0,n,i),this.eachBuiltinLayer(function(t){t.virtual&&e.drawImage(t.dom,0,0,n,i)})},p.prototype._doPaintList=function(d,f,g){for(var y=this,m=[],v=this._opts.useDirtyRect,t=0;t<this._zlevelList.length;t++){var e=this._zlevelList[t],e=this._layers[e];e.__builtin__&&e!==this._hoverlayer&&(e.__dirty||g)&&m.push(e)}for(var _=!0,x=!1,w=this,n=0;n<m.length;n++)!function(t){function e(t){var e={inHover:!1,allClipped:!1,prevEl:null,viewWidth:y._width,viewHeight:y._height};for(i=s;i<o.__endIndex;i++){var n=d[i];if(n.__inHover&&(x=!0),y._doPaintEl(n,o,v,t,e,i===o.__endIndex-1),l&&15<Date.now()-u)break}e.prevElClipPaths&&r.restore()}var i,n,o=m[t],r=o.ctx,a=v&&o.createRepaintRects(d,f,w._width,w._height),s=g?o.__startIndex:o.__drawIndex,l=!g&&o.incremental&&Date.now,u=l&&Date.now(),t=o.zlevel===w._zlevelList[0]?w._backgroundColor:null;o.__startIndex!==o.__endIndex&&(s!==o.__startIndex||(n=d[s]).incremental&&n.notClear&&!g)||o.clear(!1,t,a),-1===s&&(console.error("For some unknown reason. drawIndex is -1"),s=o.__startIndex);if(a)if(0===a.length)i=o.__endIndex;else for(var h=w.dpr,c=0;c<a.length;++c){var p=a[c];r.save(),r.beginPath(),r.rect(p.x*h,p.y*h,p.width*h,p.height*h),r.clip(),e(p),r.restore()}else r.save(),e(),r.restore();o.__drawIndex=i,o.__drawIndex<o.__endIndex&&(_=!1)}(n);return b.wxa&&E(this._layers,function(t){t&&t.ctx&&t.ctx.draw&&t.ctx.draw()}),{finished:_,needsRefreshHover:x}},p.prototype._doPaintEl=function(t,e,n,i,o,r){e=e.ctx;n?(n=t.getPaintRect(),(!i||n&&n.intersect(i))&&(Om(e,t,o,r),t.setPrevPaintRect(n))):Om(e,t,o,r)},p.prototype.getLayer=function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=ax);var n=this._layers[t];return n||((n=new ox("zr_"+t,this,this.dpr)).zlevel=t,n.__builtin__=!0,this._layerConfig[t]?d(n,this._layerConfig[t],!0):this._layerConfig[t-.01]&&d(n,this._layerConfig[t-.01],!0),e&&(n.virtual=e),this.insertLayer(t,n),n.initContext()),n},p.prototype.insertLayer=function(t,e){var n,i=this._layers,o=this._zlevelList,r=o.length,a=this._domRoot,s=null,l=-1;if(!i[t]&&(n=e)&&(n.__builtin__||"function"==typeof n.resize&&"function"==typeof n.refresh)){if(0<r&&t>o[0]){for(l=0;l<r-1&&!(o[l]<t&&o[l+1]>t);l++);s=i[o[l]]}o.splice(l+1,0,t),(i[t]=e).virtual||(s?(n=s.dom).nextSibling?a.insertBefore(e.dom,n.nextSibling):a.appendChild(e.dom):a.firstChild?a.insertBefore(e.dom,a.firstChild):a.appendChild(e.dom)),e.painter||(e.painter=this)}},p.prototype.eachLayer=function(t,e){for(var n=this._zlevelList,i=0;i<n.length;i++){var o=n[i];t.call(e,this._layers[o],o)}},p.prototype.eachBuiltinLayer=function(t,e){for(var n=this._zlevelList,i=0;i<n.length;i++){var o=n[i],r=this._layers[o];r.__builtin__&&t.call(e,r,o)}},p.prototype.eachOtherLayer=function(t,e){for(var n=this._zlevelList,i=0;i<n.length;i++){var o=n[i],r=this._layers[o];r.__builtin__||t.call(e,r,o)}},p.prototype.getLayers=function(){return this._layers},p.prototype._updateLayerStatus=function(t){function e(t){o&&(o.__endIndex!==t&&(o.__dirty=!0),o.__endIndex=t)}if(this.eachBuiltinLayer(function(t,e){t.__dirty=t.__used=!1}),this._singleCanvas)for(var n=1;n<t.length;n++)if((s=t[n]).zlevel!==t[n-1].zlevel||s.incremental){this._needsManuallyCompositing=!0;break}for(var i,o=null,r=0,a=0;a<t.length;a++){var s,l=(s=t[a]).zlevel,u=void 0;i!==l&&(i=l,r=0),s.incremental?((u=this.getLayer(l+.001,this._needsManuallyCompositing)).incremental=!0,r=1):u=this.getLayer(l+(0<r?.01:0),this._needsManuallyCompositing),u.__builtin__||it("ZLevel "+l+" has been used by unkown layer "+u.id),u!==o&&(u.__used=!0,u.__startIndex!==a&&(u.__dirty=!0),u.__startIndex=a,u.incremental?u.__drawIndex=-1:u.__drawIndex=a,e(a),o=u),s.__dirty&mn&&!s.__inHover&&(u.__dirty=!0,u.incremental)&&u.__drawIndex<0&&(u.__drawIndex=a)}e(a),this.eachBuiltinLayer(function(t,e){!t.__used&&0<t.getElementCount()&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)})},p.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},p.prototype._clearLayer=function(t){t.clear()},p.prototype.setBackgroundColor=function(t){this._backgroundColor=t,E(this._layers,function(t){t.setUnpainted()})},p.prototype.configLayer=function(t,e){if(e){var n=this._layerConfig;n[t]?d(n[t],e,!0):n[t]=e;for(var i=0;i<this._zlevelList.length;i++){var o=this._zlevelList[i];o!==t&&o!==t+.01||d(this._layers[o],n[t],!0)}}},p.prototype.delLayer=function(t){var e=this._layers,n=this._zlevelList,i=e[t];i&&(i.dom.parentNode.removeChild(i.dom),delete e[t],n.splice(C(n,t),1))},p.prototype.resize=function(t,e){if(this._domRoot.style){var n=this._domRoot,i=(n.style.display="none",this._opts),o=this.root;if(null!=t&&(i.width=t),null!=e&&(i.height=e),t=pm(o,0,i),e=pm(o,1,i),n.style.display="",this._width!==t||e!==this._height){for(var r in n.style.width=t+"px",n.style.height=e+"px",this._layers)this._layers.hasOwnProperty(r)&&this._layers[r].resize(t,e);this.refresh(!0)}this._width=t,this._height=e}else{if(null==t||null==e)return;this._width=t,this._height=e,this.getLayer(ax).resize(t,e)}return this},p.prototype.clearLayer=function(t){t=this._layers[t];t&&t.clear()},p.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},p.prototype.getRenderedCanvas=function(t){if(this._singleCanvas&&!this._compositeManually)return this._layers[ax].dom;var e=new ox("image",this,(t=t||{}).pixelRatio||this.dpr),n=(e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor),e.ctx);if(t.pixelRatio<=this.dpr){this.refresh();var i=e.dom.width,o=e.dom.height;this.eachLayer(function(t){t.__builtin__?n.drawImage(t.dom,0,0,i,o):t.renderToCanvas&&(n.save(),t.renderToCanvas(n),n.restore())})}else for(var r={inHover:!1,viewWidth:this._width,viewHeight:this._height},a=this.storage.getDisplayList(!0),s=0,l=a.length;s<l;s++){var u=a[s];Om(n,u,r,s===l-1)}return e.dom},p.prototype.getWidth=function(){return this._width},p.prototype.getHeight=function(){return this._height};var sx=p;function p(t,e,n,i){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var o,r,a=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase(),e=(this._opts=n=P({},n||{}),this.dpr=n.devicePixelRatio||lo,this._singleCanvas=a,(this.root=t).style&&(Nt(t),t.innerHTML=""),this.storage=e,this._zlevelList),s=(this._prevDisplayList=[],this._layers);a?(o=(a=t).width,r=a.height,null!=n.width&&(o=n.width),null!=n.height&&(r=n.height),this.dpr=n.devicePixelRatio||1,a.width=o*this.dpr,a.height=r*this.dpr,this._width=o,this._height=r,(o=new ox(a,this,this.dpr)).__builtin__=!0,o.initContext(),(s[ax]=o).zlevel=ax,e.push(ax),this._domRoot=t):(this._width=pm(t,0,n),this._height=pm(t,1,n),o=this._domRoot=(r=this._width,a=this._height,(s=document.createElement("div")).style.cssText=["position:relative","width:"+r+"px","height:"+a+"px","padding:0","margin:0","border-width:0"].join(";")+";",s),t.appendChild(o))}u(hx,lx=g),hx.prototype.init=function(t,e,n){lx.prototype.init.call(this,t,e,n),this._sourceManager=new _g(this),wg(this)},hx.prototype.mergeOption=function(t,e){lx.prototype.mergeOption.call(this,t,e),wg(this)},hx.prototype.optionUpdated=function(){this._sourceManager.dirty()},hx.prototype.getSourceManager=function(){return this._sourceManager},hx.type="dataset",hx.defaultOption={seriesLayoutBy:rd};var lx,ux=hx;function hx(){var t=null!==lx&&lx.apply(this,arguments)||this;return t.type="dataset",t}u(dx,cx=$g),dx.type="dataset";var cx,px=dx;function dx(){var t=null!==cx&&cx.apply(this,arguments)||this;return t.type="dataset",t}function fx(t){t.registerComponentModel(ux),t.registerComponentView(px)}U_([function(t){t.registerPainter("canvas",sx)},fx]),U_(ex);u(mx,gx=Gg),mx.prototype.getInitialData=function(t){return Nv(null,this,{useEncodeDefaulter:!0})},mx.prototype.getLegendIcon=function(t){var e=new Wo,n=am("line",0,t.itemHeight/2,t.itemWidth,0,t.lineStyle.stroke,!1),n=(e.add(n),n.setStyle(t.lineStyle),this.getData().getVisual("symbol")),i=this.getData().getVisual("symbolRotate"),n="none"===n?"circle":n,o=.8*t.itemHeight,o=am(n,(t.itemWidth-o)/2,(t.itemHeight-o)/2,o,o,t.itemStyle.fill),i=(e.add(o),o.setStyle(t.itemStyle),"inherit"===t.iconRotate?i:t.iconRotate||0);return o.rotation=i*Math.PI/180,o.setOrigin([t.itemWidth/2,t.itemHeight/2]),-1<n.indexOf("empty")&&(o.style.stroke=o.style.fill,o.style.fill="#fff",o.style.lineWidth=2),e},mx.type="series.line",mx.dependencies=["grid","polar"],mx.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1};var gx,yx=mx;function mx(){var t=null!==gx&&gx.apply(this,arguments)||this;return t.type=mx.type,t.hasSymbolVisual=!0,t}function vx(t,e){var n,i=t.mapDimensionsAll("defaultedLabel"),o=i.length;if(1===o)return null!=(n=Df(t,e,i[0]))?n+"":null;if(o){for(var r=[],a=0;a<i.length;a++)r.push(Df(t,e,i[a]));return r.join(" ")}}u(bx,_x=Wo),bx.prototype._createSymbol=function(t,e,n,i,o){this.removeAll();o=am(t,-1,-1,2,2,null,o);o.attr({z2:100,culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),o.drift=Sx,this._symbolType=t,this.add(o)},bx.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},bx.prototype.getSymbolType=function(){return this._symbolType},bx.prototype.getSymbolPath=function(){return this.childAt(0)},bx.prototype.highlight=function(){kl(this.childAt(0))},bx.prototype.downplay=function(){Al(this.childAt(0))},bx.prototype.setZ=function(t,e){var n=this.childAt(0);n.zlevel=t,n.z=e},bx.prototype.setDraggable=function(t,e){var n=this.childAt(0);n.draggable=t,n.cursor=!e&&t?"move":n.cursor},bx.prototype.updateData=function(t,e,n,i){this.silent=!1;var o,r,a,s=t.getItemVisual(e,"symbol")||"circle",l=t.hostModel,u=bx.getSymbolSize(t,e),h=s!==this._symbolType,c=i&&i.disableAnimation;h?(o=t.getItemVisual(e,"symbolKeepAspect"),this._createSymbol(s,t,e,u,o)):((a=this.childAt(0)).silent=!1,r={scaleX:u[0]/2,scaleY:u[1]/2},c?a.attr(r):Nh(a,r,l,e),Hh(a)),this._updateCommon(t,e,u,n,i),h&&(a=this.childAt(0),c||(r={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:a.style.opacity}},a.scaleX=a.scaleY=0,a.style.opacity=0,Eh(a,r,l,e))),c&&this.childAt(0).stopAnimation("leave")},bx.prototype._updateCommon=function(e,t,n,i,o){var r,a,s,l,u,h,c,p,d=this.childAt(0),f=e.hostModel,g=(i&&(r=i.emphasisItemStyle,s=i.blurItemStyle,a=i.selectItemStyle,l=i.focus,u=i.blurScope,c=i.labelStatesModels,p=i.hoverScale,y=i.cursorStyle,h=i.emphasisDisabled),i&&!e.hasItemOption||(r=(g=(i=i&&i.itemModel?i.itemModel:e.getItemModel(t)).getModel("emphasis")).getModel("itemStyle").getItemStyle(),a=i.getModel(["select","itemStyle"]).getItemStyle(),s=i.getModel(["blur","itemStyle"]).getItemStyle(),l=g.get("focus"),u=g.get("blurScope"),h=g.get("disabled"),c=xc(i),p=g.getShallow("scale"),y=i.getShallow("cursor")),e.getItemVisual(t,"symbolRotate")),i=(d.attr("rotation",(g||0)*Math.PI/180||0),lm(e.getItemVisual(t,"symbolOffset"),n)),g=(i&&(d.x=i[0],d.y=i[1]),y&&d.attr("cursor",y),e.getItemVisual(t,"style")),i=g.fill,y=(d instanceof Cs?(y=d.style,d.useStyle(P({image:y.image,x:y.x,y:y.y,width:y.width,height:y.height},g))):(d.__isEmptyBrush?d.useStyle(P({},g)):d.useStyle(g),d.style.decal=null,d.setColor(i,o&&o.symbolInnerColor),d.style.strokeNoScale=!0),e.getItemVisual(t,"liftZ")),m=this._z2,v=(null!=y?null==m&&(this._z2=d.z2,d.z2+=y):null!=m&&(d.z2=m,this._z2=null),o&&o.useNameLabel),y=(_c(d,c,{labelFetcher:f,labelDataIndex:t,defaultText:function(t){return v?e.getName(t):vx(e,t)},inheritColor:i,defaultOpacity:g.opacity}),this._sizeX=n[0]/2,this._sizeY=n[1]/2,d.ensureState("emphasis")),m=(y.style=r,d.ensureState("select").style=a,d.ensureState("blur").style=s,null==p||!0===p?Math.max(1.1,3/this._sizeY):isFinite(p)&&0<p?+p:1);y.scaleX=this._sizeX*m,y.scaleY=this._sizeY*m,this.setSymbolScale(1),Wl(this,l,u,h)},bx.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},bx.prototype.fadeOut=function(t,e,n){var i=this.childAt(0),o=k(this).dataIndex,r=n&&n.animation;this.silent=i.silent=!0,n&&n.fadeLabel?(n=i.getTextContent())&&Bh(n,{style:{opacity:0}},e,{dataIndex:o,removeOpt:r,cb:function(){i.removeTextContent()}}):i.removeTextContent(),Bh(i,{style:{opacity:0},scaleX:0,scaleY:0},e,{dataIndex:o,cb:t,removeOpt:r})},bx.getSymbolSize=function(t,e){return sm(t.getItemVisual(e,"symbolSize"))};var _x,xx=bx;function bx(t,e,n,i){var o=_x.call(this)||this;return o.updateData(t,e,n,i),o}function Sx(t,e){this.parent.drift(t,e)}function Mx(t,e,n,i){return e&&!isNaN(e[0])&&!isNaN(e[1])&&(!i.isIgnore||!i.isIgnore(n))&&(!i.clipShape||i.clipShape.contain(e[0],e[1]))&&"none"!==t.getItemVisual(n,"symbol")}function Tx(t){return(t=null==t||O(t)?t:{isIgnore:t})||{}}function Ix(t){var t=t.hostModel,e=t.getModel("emphasis");return{emphasisItemStyle:e.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:e.get("focus"),blurScope:e.get("blurScope"),emphasisDisabled:e.get("disabled"),hoverScale:e.get("scale"),labelStatesModels:xc(t),cursorStyle:t.get("cursor")}}Dx.prototype.updateData=function(r,a){this._progressiveEls=null,a=Tx(a);var s=this.group,l=r.hostModel,u=this._data,h=this._SymbolCtor,c=a.disableAnimation,p=Ix(r),d={disableAnimation:c},f=a.getSymbolPoint||function(t){return r.getItemLayout(t)};u||s.removeAll(),r.diff(u).add(function(t){var e,n=f(t);Mx(r,n,t,a)&&((e=new h(r,t,p,d)).setPosition(n),r.setItemGraphicEl(t,e),s.add(e))}).update(function(t,e){var n,i,e=u.getItemGraphicEl(e),o=f(t);Mx(r,o,t,a)?(n=r.getItemVisual(t,"symbol")||"circle",i=e&&e.getSymbolType&&e.getSymbolType(),!e||i&&i!==n?(s.remove(e),(e=new h(r,t,p,d)).setPosition(o)):(e.updateData(r,t,p,d),i={x:o[0],y:o[1]},c?e.attr(i):Nh(e,i,l)),s.add(e),r.setItemGraphicEl(t,e)):s.remove(e)}).remove(function(t){var e=u.getItemGraphicEl(t);e&&e.fadeOut(function(){s.remove(e)},l)}).execute(),this._getSymbolPoint=f,this._data=r},Dx.prototype.updateLayout=function(){var n=this,t=this._data;t&&t.eachItemGraphicEl(function(t,e){e=n._getSymbolPoint(e);t.setPosition(e),t.markRedraw()})},Dx.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=Ix(t),this._data=null,this.group.removeAll()},Dx.prototype.incrementalUpdate=function(t,e,n){function i(t){t.isGroup||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[],n=Tx(n);for(var o=t.start;o<t.end;o++){var r,a=e.getItemLayout(o);Mx(e,a,o,n)&&((r=new this._SymbolCtor(e,o,this._seriesScope)).traverse(i),r.setPosition(a),this.group.add(r),e.setItemGraphicEl(o,r),this._progressiveEls.push(r))}},Dx.prototype.eachRendered=function(t){fc(this._progressiveEls||this.group,t)},Dx.prototype.remove=function(t){var e=this.group,n=this._data;n&&t?n.eachItemGraphicEl(function(t){t.fadeOut(function(){e.remove(t)},n.hostModel)}):e.removeAll()};var Cx=Dx;function Dx(t){this.group=new Wo,this._SymbolCtor=t||xx}function kx(t,e,n){var i=t.getBaseAxis(),o=t.getOtherAxis(i),n=(n=n,a=0,r=(r=o).scale.getExtent(),"start"===n?a=r[0]:"end"===n?a=r[1]:W(n)&&!isNaN(n)?a=n:0<r[0]?a=r[0]:r[1]<0&&(a=r[1]),a),r=i.dim,a=o.dim,i=e.mapDimension(a),o=e.mapDimension(r),s="x"===a||"radius"===a?1:0,t=F(t.dimensions,function(t){return e.mapDimension(t)}),l=!1,u=e.getCalculationInfo("stackResultDimension");return Ov(e,t[0])&&(l=!0,t[0]=u),Ov(e,t[1])&&(l=!0,t[1]=u),{dataDimsForPoint:t,valueStart:n,valueAxisDim:a,baseAxisDim:r,stacked:!!l,valueDim:i,baseDim:o,baseDataOffset:s,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function Ax(t,e,n,i){var o=NaN,r=(t.stacked&&(o=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(o)&&(o=t.valueStart),t.baseDataOffset),a=[];return a[r]=n.get(t.baseDim,i),a[1-r]=o,e.dataToPoint(a)}var Lx=Math.min,Px=Math.max;function Ox(t,e){return isNaN(t)||isNaN(e)}function Rx(t,e,n,i,o,r,a,s,l){for(var u,h,c,p,d=n,f=0;f<i;f++){var g=e[2*d],y=e[2*d+1];if(o<=d||d<0)break;if(Ox(g,y)){if(l){d+=r;continue}break}if(d===n)t[0<r?"moveTo":"lineTo"](g,y),c=g,p=y;else{var m=g-u,v=y-h;if(m*m+v*v<.5){d+=r;continue}if(0<a){for(var _=d+r,x=e[2*_],w=e[2*_+1];x===g&&w===y&&f<i;)f++,d+=r,x=e[2*(_+=r)],w=e[2*_+1],g=e[2*d],y=e[2*d+1];var b=f+1;if(l)for(;Ox(x,w)&&b<i;)b++,x=e[2*(_+=r)],w=e[2*_+1];var S,M,T,I,C,D,k,A,L,m=0,v=0,P=void 0,O=void 0;i<=b||Ox(x,w)?(k=g,A=y):(m=x-u,v=w-h,S=g-u,M=x-g,T=y-h,I=w-y,D=C=void 0,O="x"===s?(k=g-(L=0<m?1:-1)*(C=Math.abs(S))*a,A=y,P=g+L*(D=Math.abs(M))*a,y):"y"===s?(k=g,A=y-(L=0<v?1:-1)*(C=Math.abs(T))*a,P=g,y+L*(D=Math.abs(I))*a):(C=Math.sqrt(S*S+T*T),k=g-m*a*(1-(S=(D=Math.sqrt(M*M+I*I))/(D+C))),A=y-v*a*(1-S),O=y+v*a*S,P=Lx(P=g+m*a*S,Px(x,g)),O=Lx(O,Px(w,y)),P=Px(P,Lx(x,g)),A=y-(v=(O=Px(O,Lx(w,y)))-y)*C/D,k=Lx(k=g-(m=P-g)*C/D,Px(u,g)),A=Lx(A,Px(h,y)),P=g+(m=g-(k=Px(k,Lx(u,g))))*D/C,y+(v=y-(A=Px(A,Lx(h,y))))*D/C)),t.bezierCurveTo(c,p,k,A,g,y),c=P,p=O}else t.lineTo(g,y)}u=g,h=y,d+=r}return f}function Nx(){this.smooth=0,this.smoothConstraint=!0}u(Bx,Ex=_s),Bx.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},Bx.prototype.getDefaultShape=function(){return new Nx},Bx.prototype.buildPath=function(t,e){var n=e.points,i=0,o=n.length/2;if(e.connectNulls){for(;0<o&&Ox(n[2*o-2],n[2*o-1]);o--);for(;i<o&&Ox(n[2*i],n[2*i+1]);i++);}for(;i<o;)i+=Rx(t,n,i,o,o,1,e.smooth,e.smoothMonotone,e.connectNulls)+1},Bx.prototype.getPointOn=function(t,e){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var n,i,o=this.path.data,r=es.CMD,a="x"===e,s=[],l=0;l<o.length;){var u,h=void 0,c=void 0;switch(o[l++]){case r.M:n=o[l++],i=o[l++];break;case r.L:var p,h=o[l++],c=o[l++];if((u=a?(t-n)/(h-n):(t-i)/(c-i))<=1&&0<=u)return p=a?(c-i)*u+i:(h-n)*u+n,a?[t,p]:[p,t];n=h,i=c;break;case r.C:h=o[l++],c=o[l++];var d=o[l++],f=o[l++],g=o[l++],y=o[l++],m=a?Bn(n,h,d,g,t,s):Bn(i,c,f,y,t,s);if(0<m)for(var v=0;v<m;v++){var _=s[v];if(_<=1&&0<=_)return p=a?En(i,c,f,y,_):En(n,h,d,g,_),a?[t,p]:[p,t]}n=g,i=y}}};var Ex,zx=Bx;function Bx(t){t=Ex.call(this,t)||this;return t.type="ec-polyline",t}u(Xx,Vx=Nx);var Fx,Vx,Hx=Xx,Wx=(u(Gx,Fx=_s),Gx.prototype.getDefaultShape=function(){return new Hx},Gx.prototype.buildPath=function(t,e){var n=e.points,i=e.stackedOnPoints,o=0,r=n.length/2,a=e.smoothMonotone;if(e.connectNulls){for(;0<r&&Ox(n[2*r-2],n[2*r-1]);r--);for(;o<r&&Ox(n[2*o],n[2*o+1]);o++);}for(;o<r;){var s=Rx(t,n,o,r,r,1,e.smooth,a,e.connectNulls);Rx(t,i,o+s-1,s,r,-1,e.stackedOnSmooth,a,e.connectNulls),o+=s+1,t.closePath()}},Gx);function Gx(t){t=Fx.call(this,t)||this;return t.type="ec-polygon",t}function Xx(){return null!==Vx&&Vx.apply(this,arguments)||this}function Ux(t,e){return t.type===e}function Yx(t,e){if(t.length===e.length){for(var n=0;n<t.length;n++)if(t[n]!==e[n])return;return 1}}function Zx(t){for(var e=1/0,n=1/0,i=-1/0,o=-1/0,r=0;r<t.length;){var a=t[r++],s=t[r++];isNaN(a)||(e=Math.min(a,e),i=Math.max(a,i)),isNaN(s)||(n=Math.min(s,n),o=Math.max(s,o))}return[[e,n],[i,o]]}function qx(t,e){var t=Zx(t),n=t[0],t=t[1],e=Zx(e),i=e[0],e=e[1];return Math.max(Math.abs(n[0]-i[0]),Math.abs(n[1]-i[1]),Math.abs(t[0]-e[0]),Math.abs(t[1]-e[1]))}function jx(t){return W(t)?t:t?.5:0}function Kx(t,e,n,i){var e=e.getBaseAxis(),o="x"===e.dim||"radius"===e.dim?0:1,r=[],a=0,s=[],l=[],u=[],h=[];if(i){for(a=0;a<t.length;a+=2)isNaN(t[a])||isNaN(t[a+1])||h.push(t[a],t[a+1]);t=h}for(a=0;a<t.length-2;a+=2)switch(u[0]=t[a+2],u[1]=t[a+3],l[0]=t[a],l[1]=t[a+1],r.push(l[0],l[1]),n){case"end":s[o]=u[o],s[1-o]=l[1-o],r.push(s[0],s[1]);break;case"middle":var c=[];s[o]=c[o]=(l[o]+u[o])/2,s[1-o]=l[1-o],c[1-o]=u[1-o],r.push(s[0],s[1]),r.push(c[0],c[1]);break;default:s[o]=l[o],s[1-o]=u[1-o],r.push(s[0],s[1])}return r.push(t[a++],t[a++]),r}function $x(t,e,n){var i=t.getVisual("visualMeta");if(i&&i.length&&t.count()&&"cartesian2d"===e.type){for(var o,r,a=i.length-1;0<=a;a--){var s=t.getDimensionInfo(i[a].dimension);if("x"===(o=s&&s.coordDim)||"y"===o){r=i[a];break}}if(r){var l=e.getAxis(o),e=F(r.stops,function(t){return{coord:l.toGlobalCoord(l.dataToCoord(t.value)),color:t.color}}),u=e.length,h=r.outerColors.slice(),n=(u&&e[0].coord>e[u-1].coord&&(e.reverse(),h.reverse()),function(t,e){var n,i,o=[],r=t.length;function a(t,e,n){var i=t.coord;return{coord:n,color:_i((n-i)/(e.coord-i),[t.color,e.color])}}for(var s=0;s<r;s++){var l=t[s],u=l.coord;if(u<0)n=l;else{if(e<u){i?o.push(a(i,l,e)):n&&o.push(a(n,l,0),a(n,l,e));break}n&&(o.push(a(n,l,0)),n=null),o.push(l),i=l}}return o}(e,"x"===o?n.getWidth():n.getHeight())),c=n.length;if(!c&&u)return e[0].coord<0?h[1]||e[u-1].color:h[0]||e[0].color;var p=n[0].coord-10,u=n[c-1].coord+10,d=u-p;if(d<.001)return"transparent";E(n,function(t){t.offset=(t.coord-p)/d}),n.push({offset:c?n[c-1].offset:.5,color:h[1]||"transparent"}),n.unshift({offset:c?n[0].offset:.5,color:h[0]||"transparent"});e=new xh(0,0,0,0,n,!0);return e[o]=p,e[o+"2"]=u,e}}}function Qx(t,e,n){var t=t.get("showAllSymbol"),i="auto"===t;if(!t||i){var o,r,a=n.getAxesByScale("ordinal")[0];if(a&&(!i||!function(t,e){var n=t.getExtent(),i=Math.abs(n[1]-n[0])/t.scale.count();isNaN(i)&&(i=0);for(var o=e.count(),r=Math.max(1,Math.round(o/5)),a=0;a<o;a+=r)if(1.5*xx.getSymbolSize(e,a)[t.isHorizontal()?1:0]>i)return;return 1}(a,e)))return o=e.mapDimension(a.dim),r={},E(a.getViewLabels(),function(t){t=a.scale.getRawOrdinalNumber(t.tickValue);r[t]=1}),function(t){return!r.hasOwnProperty(e.get(o,t))}}}function Jx(t){for(var e,n,i=t.length/2;0<i&&(e=t[2*i-2],n=t[2*i-1],isNaN(e)||isNaN(n));i--);return i-1}function tw(t,e){return[t[2*e],t[2*e+1]]}function ew(t){if(t.get(["endLabel","show"]))return 1;for(var e=0;e<al.length;e++)if(t.get([al[e],"endLabel","show"]))return 1}function nw(n,i,e,t){var o,r,a,s,l,u,h,c,p,d,f,g,y,m,v,_,x;return Ux(i,"cartesian2d")?(o=t.getModel("endLabel"),r=o.get("valueAnimation"),a=t.getData(),s={lastFrameIndex:0},l=ew(t)?function(t,e){n._endLabelOnDuring(t,e,a,s,r,o,i)}:null,x=i.getBaseAxis().isHorizontal(),h=e,m=t,v=function(){var t=n._endLabel;t&&e&&null!=s.originalX&&t.attr({x:s.originalX,y:s.originalY})},c=l,y=(g=(u=i).getArea()).x,f=g.y,p=g.width,g=g.height,_=m.get(["lineStyle","width"])||2,y-=_/2,f-=_/2,p+=_,g+=_,p=Math.ceil(p),y!==Math.floor(y)&&(y=Math.floor(y),p++),d=new Es({shape:{x:y,y:f,width:p,height:g}}),h&&(h=(_=u.getBaseAxis()).isHorizontal(),u=_.inverse,h?(u&&(d.shape.x+=p),d.shape.width=0):(u||(d.shape.y+=g),d.shape.height=0),_=D(c)?function(t){c(t,d)}:null,Eh(d,{shape:{width:p,height:g,x:y,y:f}},m,null,v,_)),h=d,t.get("clip",!0)||(u=h.shape,p=Math.max(u.width,u.height),x?(u.y-=p,u.height+=2*p):(u.x-=p,u.width+=2*p)),l&&l(1,h),h):(g=e,y=t,m=(f=i).getArea(),v=nr(m.r0,1),_=nr(m.r,1),x=new Bu({shape:{cx:nr(f.cx,1),cy:nr(f.cy,1),r0:v,r:_,startAngle:m.startAngle,endAngle:m.endAngle,clockwise:m.clockwise}}),g&&("angle"===f.getBaseAxis().dim?x.shape.endAngle=m.startAngle:x.shape.r=v,Eh(x,{shape:{endAngle:m.endAngle,r:_}},y)),x)}u(rw,iw=ny),rw.prototype.init=function(){var t=new Wo,e=new Cx;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},rw.prototype.render=function(t,e,n){var i=this,o=t.coordinateSystem,r=this.group,a=t.getData(),s=t.getModel("lineStyle"),l=t.getModel("areaStyle"),u=a.getLayout("points")||[],h="polar"===o.type,c=this._coordSys,p=this._symbolDraw,d=this._polyline,f=this._polygon,g=this._lineGroup,e=!e.ssr&&t.get("animation"),y=!l.isEmpty(),m=l.get("origin"),v=kx(o,a,m),v=y&&function(t,e,n){if(!n.valueDim)return[];for(var i=e.count(),o=r_(2*i),r=0;r<i;r++){var a=Ax(n,t,e,r);o[2*r]=a[0],o[2*r+1]=a[1]}return o}(o,a,v),_=t.get("showSymbol"),x=t.get("connectNulls"),w=_&&!h&&Qx(t,a,o),b=this._data;b&&b.eachItemGraphicEl(function(t,e){t.__temp&&(r.remove(t),b.setItemGraphicEl(e,null))}),_||p.remove(),r.add(g);function S(t){i._changePolyState(t)}var M,T=!h&&t.get("step"),I=(o&&o.getArea&&t.get("clip",!0)&&(null!=(M=o.getArea()).width?(M.x-=.1,M.y-=.1,M.width+=.2,M.height+=.2):M.r0&&(M.r0-=.5,M.r+=.5)),this._clipShapeForSymbol=M,$x(a,o,n)||a.getVisual("style")[a.getVisual("drawType")]),c=(d&&c.type===o.type&&T===this._step?(y&&!f?f=this._newPolygon(u,v):f&&!y&&(g.remove(f),f=this._polygon=null),h||this._initOrUpdateEndLabel(t,o,Rp(I)),(c=g.getClipPath())?Eh(c,{shape:nw(this,o,!1,t).shape},t):g.setClipPath(nw(this,o,!0,t)),_&&p.updateData(a,{isIgnore:w,clipShape:M,disableAnimation:!0,getSymbolPoint:function(t){return[u[2*t],u[2*t+1]]}}),Yx(this._stackedOnPoints,v)&&Yx(this._points,u)||(e?this._doUpdateAnimation(a,v,o,n,T,m,x):(T&&(u=Kx(u,o,T,x),v=v&&Kx(v,o,T,x)),d.setShape({points:u}),f&&f.setShape({points:u,stackedOnPoints:v})))):(_&&p.updateData(a,{isIgnore:w,clipShape:M,disableAnimation:!0,getSymbolPoint:function(t){return[u[2*t],u[2*t+1]]}}),e&&this._initSymbolLabelAnimation(a,o,M),T&&(u=Kx(u,o,T,x),v=v&&Kx(v,o,T,x)),d=this._newPolyline(u),y?f=this._newPolygon(u,v):f&&(g.remove(f),f=this._polygon=null),h||this._initOrUpdateEndLabel(t,o,Rp(I)),g.setClipPath(nw(this,o,!0,t))),t.getModel("emphasis")),n=c.get("focus"),_=c.get("blurScope"),p=c.get("disabled"),w=(d.useStyle(B(s.getLineStyle(),{fill:"none",stroke:I,lineJoin:"bevel"})),Ul(d,t,"lineStyle"),0<d.style.lineWidth&&"bolder"===t.get(["emphasis","lineStyle","width"])&&(d.getState("emphasis").style.lineWidth=+d.style.lineWidth+1),k(d).seriesIndex=t.seriesIndex,Wl(d,n,_,p),jx(t.get("smooth"))),e=t.get("smoothMonotone");d.setShape({smooth:w,smoothMonotone:e,connectNulls:x}),f&&(M=a.getCalculationInfo("stackedOnSeries"),y=0,f.useStyle(B(l.getAreaStyle(),{fill:I,opacity:.7,lineJoin:"bevel",decal:a.getVisual("style").decal})),M&&(y=jx(M.get("smooth"))),f.setShape({smooth:w,stackedOnSmooth:y,smoothMonotone:e,connectNulls:x}),Ul(f,t,"areaStyle"),k(f).seriesIndex=t.seriesIndex,Wl(f,n,_,p));a.eachItemGraphicEl(function(t){t&&(t.onHoverStateChange=S)}),this._polyline.onHoverStateChange=S,this._data=a,this._coordSys=o,this._stackedOnPoints=v,this._points=u,this._step=T,this._valueOrigin=m,t.get("triggerLineEvent")&&(this.packEventData(t,d),f)&&this.packEventData(t,f)},rw.prototype.packEventData=function(t,e){k(e).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},rw.prototype.highlight=function(t,e,n,i){var o=t.getData(),r=Or(o,i);if(this._changePolyState("emphasis"),!(r instanceof Array)&&null!=r&&0<=r){var a=o.getLayout("points"),s=o.getItemGraphicEl(r);if(!s){var l=a[2*r],a=a[2*r+1];if(isNaN(l)||isNaN(a))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l,a))return;var u=t.get("zlevel")||0,h=t.get("z")||0,l=((s=new xx(o,r)).x=l,s.y=a,s.setZ(u,h),s.getSymbolPath().getTextContent());l&&(l.zlevel=u,l.z=h,l.z2=this._polyline.z2+1),s.__temp=!0,o.setItemGraphicEl(r,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else ny.prototype.highlight.call(this,t,e,n,i)},rw.prototype.downplay=function(t,e,n,i){var o,r=t.getData(),a=Or(r,i);this._changePolyState("normal"),null!=a&&0<=a?(o=r.getItemGraphicEl(a))&&(o.__temp?(r.setItemGraphicEl(a,null),this.group.remove(o)):o.downplay()):ny.prototype.downplay.call(this,t,e,n,i)},rw.prototype._changePolyState=function(t){var e=this._polygon;Sl(this._polyline,t),e&&Sl(e,t)},rw.prototype._newPolyline=function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new zx({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(e),this._polyline=e},rw.prototype._newPolygon=function(t,e){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new Wx({shape:{points:t,stackedOnPoints:e},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n},rw.prototype._initSymbolLabelAnimation=function(t,l,u){var h,c,e=l.getBaseAxis(),p=e.inverse,e=("cartesian2d"===l.type?(h=e.isHorizontal(),c=!1):"polar"===l.type&&(h="angle"===e.dim,c=!0),t.hostModel),d=e.get("animationDuration"),f=(D(d)&&(d=d(null)),e.get("animationDelay")||0),g=D(f)?f(null):f;t.eachItemGraphicEl(function(t,e){var n,i,o,r,a,s=t;s&&(r=[t.x,t.y],a=i=n=void 0,u&&(a=c?(o=u,r=l.pointToCoord(r),h?(n=o.startAngle,i=o.endAngle,-r[1]/180*Math.PI):(n=o.r0,i=o.r,r[0])):h?(n=u.x,i=u.x+u.width,t.x):(n=u.y+u.height,i=u.y,t.y)),o=i===n?0:(a-n)/(i-n),p&&(o=1-o),r=D(f)?f(e):d*o+g,a=(t=s.getSymbolPath()).getTextContent(),s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:r}),a&&a.animateFrom({style:{opacity:0}},{duration:300,delay:r}),t.disableLabelAnimation=!0)})},rw.prototype._initOrUpdateEndLabel=function(t,e,n){var u,i,o,r=t.getModel("endLabel");ew(t)?(u=t.getData(),i=this._polyline,(o=u.getLayout("points"))?(this._endLabel||((this._endLabel=new Hs({z2:200})).ignoreClip=!0,i.setTextContent(this._endLabel),i.disableLabelAnimation=!0),0<=(o=Jx(o))&&(_c(i,xc(t,"endLabel"),{inheritColor:n,labelFetcher:t,labelDataIndex:o,defaultText:function(t,e,n){if(null==n)return vx(u,t);var i=u,o=n,r=i.mapDimensionsAll("defaultedLabel");if(!V(o))return o+"";for(var a=[],s=0;s<r.length;s++){var l=i.getDimensionIndex(r[s]);0<=l&&a.push(o[l])}return a.join(" ")},enableTextSetter:!0},(n=r,o=(t=(t=e).getBaseAxis()).isHorizontal(),t=t.inverse,r=o?t?"right":"left":"center",o=o?"middle":t?"top":"bottom",{normal:{align:n.get("align")||r,verticalAlign:n.get("verticalAlign")||o}})),i.textConfig.position=null)):(i.removeTextContent(),this._endLabel=null)):this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},rw.prototype._endLabelOnDuring=function(t,e,n,i,o,r,a){var s,l,u,h,c,p,d,f,g,y,m=this._endLabel,v=this._polyline;m&&(t<1&&null==i.originalX&&(i.originalX=m.x,i.originalY=m.y),s=n.getLayout("points"),g=(l=n.hostModel).get("connectNulls"),u=r.get("precision"),r=r.get("distance")||0,c=(a=a.getBaseAxis()).isHorizontal(),a=a.inverse,e=e.shape,h=(c?r:0)*(a?-1:1),r=(c?0:-r)*(a?-1:1),d=void 0,1<=(f=(p=(c=function(t,e,n){for(var i,o,r=t.length/2,a="x"===n?0:1,s=0,l=-1,u=0;u<r;u++)if(o=t[2*u+a],!isNaN(o)&&!isNaN(t[2*u+1-a])){if(0!==u){if(i<=e&&e<=o||e<=i&&o<=e){l=u;break}s=u}i=o}return{range:[s,l],t:(e-i)/(o-i)}}(s,a=a?c?e.x:e.y+e.height:c?e.x+e.width:e.y,e=c?"x":"y")).range)[1]-p[0])?(1<f&&!g?(y=tw(s,p[0]),m.attr({x:y[0]+h,y:y[1]+r}),o&&(d=l.getRawValue(p[0]))):((y=v.getPointOn(a,e))&&m.attr({x:y[0]+h,y:y[1]+r}),f=l.getRawValue(p[0]),g=l.getRawValue(p[1]),o&&(d=Wr(n,u,f,g,c.t))),i.lastFrameIndex=p[0]):(y=tw(s,v=1===t||0<i.lastFrameIndex?p[0]:0),o&&(d=l.getRawValue(v)),m.attr({x:y[0]+h,y:y[1]+r})),o)&&"function"==typeof(a=Cc(m)).setLabelText&&a.setLabelText(d)},rw.prototype._doUpdateAnimation=function(t,e,n,i,o,r,a){var s=this._polyline,l=this._polygon,u=t.hostModel,e=function(t,e,n,i,o,r){a=[],e.diff(t).add(function(t){a.push({cmd:"+",idx:t})}).update(function(t,e){a.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){a.push({cmd:"-",idx:t})}).execute();for(var a,s=a,l=[],u=[],h=[],c=[],p=[],d=[],f=[],g=kx(o,e,r),y=t.getLayout("points")||[],m=e.getLayout("points")||[],v=0;v<s.length;v++){var _=s[v],x=!0,w=void 0;switch(_.cmd){case"=":var b=2*_.idx,w=2*_.idx1,S=y[b],M=y[1+b],T=m[w],I=m[w+1];(isNaN(S)||isNaN(M))&&(S=T,M=I),l.push(S,M),u.push(T,I),h.push(n[b],n[1+b]),c.push(i[w],i[w+1]),f.push(e.getRawIndex(_.idx1));break;case"+":S=_.idx,M=g.dataDimsForPoint,T=o.dataToPoint([e.get(M[0],S),e.get(M[1],S)]),I=(w=2*S,l.push(T[0],T[1]),u.push(m[w],m[w+1]),Ax(g,o,e,S));h.push(I[0],I[1]),c.push(i[w],i[w+1]),f.push(e.getRawIndex(S));break;case"-":x=!1}x&&(p.push(_),d.push(d.length))}d.sort(function(t,e){return f[t]-f[e]});for(var C=r_(r=l.length),D=r_(r),k=r_(r),A=r_(r),L=[],v=0;v<d.length;v++){var P=d[v],O=2*v,R=2*P;C[O]=l[R],C[1+O]=l[1+R],D[O]=u[R],D[1+O]=u[1+R],k[O]=h[R],k[1+O]=h[1+R],A[O]=c[R],A[1+O]=c[1+R],L[v]=p[P]}return{current:C,next:D,stackedOnCurrent:k,stackedOnNext:A,status:L}}(this._data,t,this._stackedOnPoints,e,this._coordSys,this._valueOrigin),h=e.current,c=e.stackedOnCurrent,p=e.next,d=e.stackedOnNext;if(o&&(h=Kx(e.current,n,o,a),c=Kx(e.stackedOnCurrent,n,o,a),p=Kx(e.next,n,o,a),d=Kx(e.stackedOnNext,n,o,a)),3e3<qx(h,p)||l&&3e3<qx(c,d))s.stopAnimation(),s.setShape({points:p}),l&&(l.stopAnimation(),l.setShape({points:p,stackedOnPoints:d}));else{s.shape.__points=e.current,s.shape.points=h;n={shape:{points:p}};e.current!==h&&(n.shape.__points=e.next),s.stopAnimation(),Nh(s,n,u),l&&(l.setShape({points:h,stackedOnPoints:c}),l.stopAnimation(),Nh(l,{shape:{stackedOnPoints:d}},u),s.shape.points!==l.shape.points)&&(l.shape.points=s.shape.points);for(var f,g=[],y=e.status,m=0;m<y.length;m++)"="===y[m].cmd&&(f=t.getItemGraphicEl(y[m].idx1))&&g.push({el:f,ptIdx:m});s.animators&&s.animators.length&&s.animators[0].during(function(){l&&l.dirtyShape();for(var t=s.shape.__points,e=0;e<g.length;e++){var n=g[e].el,i=2*g[e].ptIdx;n.x=t[i],n.y=t[1+i],n.markRedraw()}})}},rw.prototype.remove=function(t){var n=this.group,i=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),i&&i.eachItemGraphicEl(function(t,e){t.__temp&&(n.remove(t),i.setItemGraphicEl(e,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},rw.type="line";var iw,ow=rw;function rw(){return null!==iw&&iw.apply(this,arguments)||this}var aw={average:function(t){for(var e=0,n=0,i=0;i<t.length;i++)isNaN(t[i])||(e+=t[i],n++);return 0===n?NaN:e/n},sum:function(t){for(var e=0,n=0;n<t.length;n++)e+=t[n]||0;return e},max:function(t){for(var e=-1/0,n=0;n<t.length;n++)t[n]>e&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;n<t.length;n++)t[n]<e&&(e=t[n]);return isFinite(e)?e:NaN},minmax:function(t){for(var e=-1/0,n=-1/0,i=0;i<t.length;i++){var o=t[i],r=Math.abs(o);e<r&&(e=r,n=o)}return isFinite(n)?n:NaN},nearest:function(t){return t[0]}},sw=function(t){return Math.round(t.length/2)};U_(function(t){var i;t.registerChartView(ow),t.registerSeriesModel(yx),t.registerLayout((i=!0,{seriesType:"line",plan:Jg(),reset:function(t){var h,e,c,p,d,n=t.getData(),f=t.coordinateSystem,t=t.pipelineContext,g=i||t.large;if(f)return t=F(f.dimensions,function(t){return n.mapDimension(t)}).slice(0,2),h=t.length,e=n.getCalculationInfo("stackResultDimension"),Ov(n,t[0])&&(t[0]=e),Ov(n,t[1])&&(t[1]=e),c=n.getStore(),p=n.getDimensionIndex(t[0]),d=n.getDimensionIndex(t[1]),h&&{progress:function(t,e){for(var n=t.end-t.start,i=g&&r_(n*h),o=[],r=[],a=t.start,s=0;a<t.end;a++){var l,u=void 0;u=1===h?(l=c.get(p,a),f.dataToPoint(l,null,r)):(o[0]=c.get(p,a),o[1]=c.get(d,a),f.dataToPoint(o,null,r)),g?(i[s++]=u[0],i[s++]=u[1]):e.setItemLayout(a,u.slice())}g&&e.setLayout("points",i)}}}})),t.registerVisual({seriesType:"line",reset:function(t){var e=t.getData(),t=t.getModel("lineStyle").getLineStyle();t&&!t.stroke&&(t.stroke=e.getVisual("style").fill),e.setVisual("legendLineStyle",t)}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,{seriesType:"line",reset:function(t,e,n){var i,o=t.getData(),r=t.get("sampling"),a=t.coordinateSystem,s=o.count();10<s&&"cartesian2d"===a.type&&r&&(i=a.getBaseAxis(),a=a.getOtherAxis(i),i=i.getExtent(),n=n.getDevicePixelRatio(),i=Math.abs(i[1]-i[0])*(n||1),n=Math.round(s/i),isFinite(n))&&1<n&&("lttb"===r&&t.setData(o.lttbDownSample(o.mapDimension(a.dim),1/n)),s=void 0,H(r)?s=aw[r]:D(r)&&(s=r),s)&&t.setData(o.downSample(o.mapDimension(a.dim),1/n,s,sw))}})});var lw=2*Math.PI,uw=Math.PI/180;function hw(t,e){return Vp(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function cw(t,e){var n=hw(t,e),i=t.get("center"),o=t.get("radius");V(o)||(o=[0,o]);var r,a=er(n.width,e.getWidth()),e=er(n.height,e.getHeight()),s=Math.min(a,e),l=er(o[0],s/2),o=er(o[1],s/2),s=t.coordinateSystem;return s=s?(r=(t=s.dataToPoint(i))[0]||0,t[1]||0):(r=er((i=V(i)?i:[i,i])[0],a)+n.x,er(i[1],e)+n.y),{cx:r,cy:s,r0:l,r:o}}function pw(t,e,I){e.eachSeriesByType(t,function(t){var o,a=t.getData(),e=a.mapDimension("value"),n=hw(t,I),i=cw(t,I),s=i.cx,l=i.cy,u=i.r,h=i.r0,r=-t.get("startAngle")*uw,i=t.get("endAngle"),c=t.get("padAngle")*uw,i="auto"===i?r-lw:-i*uw,p=t.get("minAngle")*uw+c,d=0,f=(a.each(e,function(t){isNaN(t)||d++}),a.getSum(e)),g=Math.PI/(f||d)*2,y=t.get("clockwise"),m=t.get("roseType"),v=t.get("stillShowZeroSum"),_=a.getDataExtent(e),x=(_[0]=0,y?1:-1),t=[r,i],w=x*c/2,b=(ts(t,!y),r=t[0],Math.abs(t[1]-r)),S=b,M=0,T=r;a.setLayout({viewRect:n,r:u}),a.each(e,function(t,e){var n,i,o,r;isNaN(t)?a.setItemLayout(e,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:y,cx:s,cy:l,r0:h,r:m?NaN:u}):((n="area"!==m?0===f&&v?g:t*g:b/d)<p?S-=n=p:M+=t,i=T+x*n,r=o=0,r=n<c?o=T+x*n/2:(o=T+w,i-w),a.setItemLayout(e,{angle:n,startAngle:o,endAngle:r,clockwise:y,cx:s,cy:l,r0:h,r:m?tr(t,_,[h,u]):u}),T=i)}),S<lw&&d&&(S<=.001?(o=b/d,a.each(e,function(t,e){var n,i;isNaN(t)||(i=t=0,i=((n=a.getItemLayout(e)).angle=o)<c?t=r+x*(e+.5)*o:(t=r+x*e*o+w,r+x*(e+1)*o-w),n.startAngle=t,n.endAngle=i)})):(g=S/M,T=r,a.each(e,function(t,e){var n,i;isNaN(t)||(i=n=0,i=(t=(e=a.getItemLayout(e)).angle===p?p:t*g)<c?n=T+x*t/2:(n=T+w,T+x*t-w),e.startAngle=n,e.endAngle=i,T+=x*t)})))})}var dw=Math.PI/180;function fw(t,s,l,u,h,e,n,i,o,r){if(!(t.length<2)){for(var a,c=t.length,p=0;p<c;p++)"outer"===t[p].position&&"labelLine"===t[p].labelAlignTo&&(a=t[p].label.x-r,t[p].linePoints[1][0]+=a,t[p].label.x=r);if(G1(t,o,o+n)){for(var d,f,g,y,m,v=t,_={list:[],maxY:0},x={list:[],maxY:0},w=0;w<v.length;w++)"none"===v[w].labelAlignTo&&(f=(d=v[w]).label.y>l?x:_,(g=Math.abs(d.label.y-l))>=f.maxY&&(m=d.label.x-s-d.len2*h,y=u+d.len,m=Math.abs(m)<y?Math.sqrt(g*g/(1-m*m/y/y)):y,f.rB=m,f.maxY=g),f.list.push(d));b(_),b(x)}}function b(t){for(var e=t.rB,n=e*e,i=0;i<t.list.length;i++){var o=t.list[i],r=Math.abs(o.label.y-l),a=u+o.len,a=a*a,r=Math.sqrt((1-Math.abs(r*r/n))*a),a=s+(r+o.len2)*h,r=a-o.label.x;gw(o,o.targetTextWidth-r*h,!0),o.label.x=a}}}function gw(t,e,n){var i,o,r,a,s,l,u;void 0===n&&(n=!1),null==t.labelStyleWidth&&(s=(i=t.label).style,o=t.rect,l=s.backgroundColor,u=(u=s.padding)?u[1]+u[3]:0,s=s.overflow,e<(r=o.width+(l?0:u))||n)&&(a=o.height,s&&s.match("break")?(i.setStyle("backgroundColor",null),i.setStyle("width",e-u),s=i.getBoundingRect(),i.setStyle("width",Math.ceil(s.width)),i.setStyle("backgroundColor",l)):(s=e-u,l=!(e<r)&&(!n||s>t.unconstrainedWidth)?null:s,i.setStyle("width",l)),u=i.getBoundingRect(),o.width=u.width,e=(i.style.margin||0)+2.1,o.height=u.height+e,o.y-=(o.height-a)/2)}function yw(t){return"center"===t.position}function mw(t){var S,M,T=t.getData(),I=[],C=!1,D=(t.get("minShowLabelAngle")||0)*dw,e=T.getLayout("viewRect"),k=T.getLayout("r"),A=e.width,L=e.x,n=e.y,e=e.height;function P(t){t.ignore=!0}if(T.each(function(t){var e,n,i,o,r,a,s,l,u,h,c,p=T.getItemGraphicEl(t),d=p.shape,f=p.getTextContent(),g=p.getTextGuideLine(),t=T.getItemModel(t),y=t.getModel("label"),m=y.get("position")||t.get(["emphasis","label","position"]),v=y.get("distanceToLabelLine"),_=y.get("alignTo"),x=er(y.get("edgeDistance"),A),w=y.get("bleedMargin"),t=t.getModel("labelLine"),b=er(t.get("length"),A);e=er(t.get("length2"),A),Math.abs(d.endAngle-d.startAngle)<D?(E(f.states,P),f.ignore=!0,g&&(E(g.states,P),g.ignore=!0)):function(t){if(!t.ignore)return 1;for(var e in t.states)if(!1===t.states[e].ignore)return 1}(f)&&(c=(d.startAngle+d.endAngle)/2,n=Math.cos(c),i=Math.sin(c),S=d.cx,M=d.cy,o="inside"===m||"inner"===m,l="center"===m?(r=d.cx,a=d.cy,"center"):(r=(l=(o?(d.r+d.r0)/2*n:d.r*n)+S)+3*n,a=(u=(o?(d.r+d.r0)/2*i:d.r*i)+M)+3*i,o||(s=l+n*(b+k-d.r),d=u+i*(b+k-d.r),h=s+(n<0?-1:1)*e,r="edge"===_?n<0?L+x:L+A-x:h+(n<0?-v:v),s=[[l,u],[s,a=d],[h,d]]),o?"center":"edge"===_?0<n?"right":"left":0<n?"left":"right"),u=Math.PI,h=0,W(d=y.get("rotate"))?h=d*(u/180):"center"===m?h=0:"radial"===d||!0===d?h=n<0?-c+u:-c:"tangential"===d&&"outside"!==m&&"outer"!==m&&((y=Math.atan2(n,i))<0&&(y=2*u+y),h=(y=0<i?u+y:y)-u),C=!!h,f.x=r,f.y=a,f.rotation=h,f.setStyle({verticalAlign:"middle"}),o?(f.setStyle({align:l}),(c=f.states.select)&&(c.x+=f.x,c.y+=f.y)):((d=f.getBoundingRect().clone()).applyTransform(f.getComputedTransform()),y=(f.style.margin||0)+2.1,d.y-=y/2,d.height+=y,I.push({label:f,labelLine:g,position:m,len:b,len2:e,minTurnAngle:t.get("minTurnAngle"),maxSurfaceAngle:t.get("maxSurfaceAngle"),surfaceNormal:new z(n,i),linePoints:s,textAlign:l,labelDistance:v,labelAlignTo:_,edgeDistance:x,bleedMargin:w,rect:d,unconstrainedWidth:d.width,labelStyleWidth:f.style.width})),p.setTextConfig({inside:o}))}),!C&&t.get("avoidLabelOverlap")){for(var i=I,o=S,r=(t=M,k),a=A,s=L,l,u,h,c,p,d,f=[],g=[],y=Number.MAX_VALUE,m=-Number.MAX_VALUE,v=0;v<i.length;v++){var _=i[v].label;yw(i[v])||(_.x<o?(y=Math.min(y,_.x),f):(m=Math.max(m,_.x),g)).push(i[v])}for(v=0;v<i.length;v++)!yw(u=i[v])&&u.linePoints&&null==u.labelStyleWidth&&(_=u.label,h=u.linePoints,l=void 0,l="edge"===u.labelAlignTo?_.x<o?h[2][0]-u.labelDistance-s-u.edgeDistance:s+a-u.edgeDistance-h[2][0]-u.labelDistance:"labelLine"===u.labelAlignTo?_.x<o?y-s-u.bleedMargin:s+a-m-u.bleedMargin:_.x<o?_.x-s-u.bleedMargin:s+a-_.x-u.bleedMargin,u.targetTextWidth=l,gw(u,l));for(fw(g,o,t,r,1,0,e,0,n,m),fw(f,o,t,r,-1,0,e,0,n,y),v=0;v<i.length;v++)!yw(u=i[v])&&u.linePoints&&(_=u.label,h=u.linePoints,c="edge"===u.labelAlignTo,p=(p=_.style.padding)?p[1]+p[3]:0,p=_.style.backgroundColor?0:p,p=u.rect.width+p,d=h[1][0]-h[2][0],c?_.x<o?h[2][0]=s+u.edgeDistance+p+u.labelDistance:h[2][0]=s+a-u.edgeDistance-p-u.labelDistance:(_.x<o?h[2][0]=_.x+u.labelDistance:h[2][0]=_.x-u.labelDistance,h[1][0]=h[2][0]+d),h[1][1]=h[2][1]=_.y)}for(var x=0;x<I.length;x++){var w,b=I[x],O=b.label,R=b.labelLine,N=isNaN(O.x)||isNaN(O.y);O&&(O.setStyle({align:b.textAlign}),N&&(E(O.states,P),O.ignore=!0),w=O.states.select)&&(w.x+=O.x,w.y+=O.y),R&&(w=b.linePoints,N||!w?(E(R.states,P),R.ignore=!0):(E1(w,b.minTurnAngle),function(t,e,n){if(n<=180&&0<n){n=n/180*Math.PI,D1.fromArray(t[0]),k1.fromArray(t[1]),A1.fromArray(t[2]),z.sub(L1,k1,D1),z.sub(P1,A1,k1);var i=L1.len(),o=P1.len();if(!(i<.001||o<.001)&&(L1.scale(1/i),P1.scale(1/o),L1.dot(e)<Math.cos(n))){i=M1(k1.x,k1.y,A1.x,A1.y,D1.x,D1.y,R1,!1),o=(N1.fromArray(R1),Math.PI/2),e=o+Math.acos(P1.dot(e))-n;if(o<=e)z.copy(N1,A1);else{N1.scaleAndAdd(P1,i/Math.tan(Math.PI/2-e));n=A1.x!==k1.x?(N1.x-k1.x)/(A1.x-k1.x):(N1.y-k1.y)/(A1.y-k1.y);if(isNaN(n))return;n<0?z.copy(N1,k1):1<n&&z.copy(N1,A1)}N1.toArray(t[1])}}}(w,b.surfaceNormal,b.maxSurfaceAngle),R.setShape({points:w}),O.__hostTarget.textGuideLineConfig={anchor:new z(w[0][0],w[0][1])}))}}function vw(t,e,n){t=t.get("borderRadius");if(null==t)return n?{cornerRadius:0}:null;V(t)||(t=[t,t,t,t]);var i=Math.abs(e.r||0-e.r0||0);return{cornerRadius:F(t,function(t){return Do(t,i)})}}u(Mw,xw=Bu),Mw.prototype.updateData=function(t,e,n,i){var o=this,r=t.hostModel,a=t.getItemModel(e),s=a.getModel("emphasis"),l=t.getItemLayout(e),u=P(vw(a.getModel("itemStyle"),l,!0),l);isNaN(u.startAngle)?o.setShape(u):(i?(o.setShape(u),i=r.getShallow("animationType"),r.ecModel.ssr?(Eh(o,{scaleX:0,scaleY:0},r,{dataIndex:e,isFrom:!0}),o.originX=u.cx,o.originY=u.cy):"scale"===i?(o.shape.r=l.r0,Eh(o,{shape:{r:l.r}},r,e)):null!=n?(o.setShape({startAngle:n,endAngle:n}),Eh(o,{shape:{startAngle:l.startAngle,endAngle:l.endAngle}},r,e)):(o.shape.endAngle=l.startAngle,Nh(o,{shape:{endAngle:l.endAngle}},r,e))):(Hh(o),Nh(o,{shape:u},r,e)),o.useStyle(t.getItemVisual(e,"style")),Ul(o,a),i=(l.startAngle+l.endAngle)/2,n=r.get("selectedOffset"),u=Math.cos(i)*n,i=Math.sin(i)*n,(n=a.getShallow("cursor"))&&o.attr("cursor",n),this._updateLabel(r,t,e),o.ensureState("emphasis").shape=P({r:l.r+(s.get("scale")&&s.get("scaleSize")||0)},vw(s.getModel("itemStyle"),l)),P(o.ensureState("select"),{x:u,y:i,shape:vw(a.getModel(["select","itemStyle"]),l)}),P(o.ensureState("blur"),{shape:vw(a.getModel(["blur","itemStyle"]),l)}),n=o.getTextGuideLine(),r=o.getTextContent(),n&&P(n.ensureState("select"),{x:u,y:i}),P(r.ensureState("select"),{x:u,y:i}),Wl(this,s.get("focus"),s.get("blurScope"),s.get("disabled")))},Mw.prototype._updateLabel=function(t,e,n){var i=e.getItemModel(n),o=i.getModel("labelLine"),r=e.getItemVisual(n,"style"),a=r&&r.fill,r=r&&r.opacity,e=(_c(this,xc(i),{labelFetcher:e.hostModel,labelDataIndex:n,inheritColor:a,defaultOpacity:r,defaultText:t.getFormattedLabel(n,"normal")||e.getName(n)}),this.getTextContent()),n=(this.setTextConfig({position:null,rotation:null}),e.attr({z2:10}),t.get(["label","position"]));"outside"!==n&&"outer"!==n?this.removeTextGuideLine():(this.getTextGuideLine()||(e=new $u,this.setTextGuideLine(e)),F1(this,V1(i),{stroke:a,opacity:xt(o.get(["lineStyle","opacity"]),r,1)}))};var _w,xw,ww=Mw,bw=(u(Sw,_w=ny),Sw.prototype.render=function(e,t,n,i){var o,r=e.getData(),a=this._data,s=this.group;if(!a&&0<r.count()){for(var l=r.getItemLayout(0),u=1;isNaN(l&&l.startAngle)&&u<r.count();++u)l=r.getItemLayout(u);l&&(o=l.startAngle)}this._emptyCircleSector&&s.remove(this._emptyCircleSector),0===r.count()&&e.get("showEmptyCircle")&&((n=new Bu({shape:cw(e,n)})).useStyle(e.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=n,s.add(n)),r.diff(a).add(function(t){var e=new ww(r,t,o);r.setItemGraphicEl(t,e),s.add(e)}).update(function(t,e){e=a.getItemGraphicEl(e);e.updateData(r,t,o),e.off("click"),s.add(e),r.setItemGraphicEl(t,e)}).remove(function(t){Vh(a.getItemGraphicEl(t),e,t)}).execute(),mw(e),"expansion"!==e.get("animationTypeUpdate")&&(this._data=r)},Sw.prototype.dispose=function(){},Sw.prototype.containPoint=function(t,e){var n,e=e.getData().getItemLayout(0);if(e)return n=t[0]-e.cx,t=t[1]-e.cy,(n=Math.sqrt(n*n+t*t))<=e.r&&n>=e.r0},Sw.type="pie",Sw);function Sw(){var t=null!==_w&&_w.apply(this,arguments)||this;return t.ignoreLabelLineUpdate=!0,t}function Mw(t,e,n){var i=xw.call(this)||this,o=(i.z2=2,new Hs);return i.setTextContent(o),i.updateData(t,e,n,!0),i}Iw.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},Iw.prototype.containName=function(t){return 0<=this._getRawData().indexOfName(t)},Iw.prototype.indexOfName=function(t){return this._getDataWithEncodedVisual().indexOfName(t)},Iw.prototype.getItemVisual=function(t,e){return this._getDataWithEncodedVisual().getItemVisual(t,e)};var Tw=Iw;function Iw(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}var Cw,Dw=Rr(),kw=(u(Aw,Cw=Gg),Aw.prototype.init=function(t){Cw.prototype.init.apply(this,arguments),this.legendVisualProvider=new Tw(S(this.getData,this),S(this.getRawData,this)),this._defaultLabelLine(t)},Aw.prototype.mergeOption=function(){Cw.prototype.mergeOption.apply(this,arguments)},Aw.prototype.getInitialData=function(){return e=V(e={coordDimensions:["value"],encodeDefaulter:M(hd,t=this)})?{coordDimensions:e}:P({encodeDefine:t.getEncode()},e),i=t.getSource(),e=Dv(i,e).dimensions,(e=new Cv(e,t)).initData(i,n),e;var t,e,n,i},Aw.prototype.getDataParams=function(t){var e,n=this.getData(),i=Dw(n),o=i.seats,i=(o||(e=[],n.each(n.mapDimension("value"),function(t){e.push(t)}),o=i.seats=sr(e,n.hostModel.get("percentPrecision"))),Cw.prototype.getDataParams.call(this,t));return i.percent=o[t]||0,i.$vars.push("percent"),i},Aw.prototype._defaultLabelLine=function(t){Sr(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},Aw.type="series.pie",Aw.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},Aw);function Aw(){return null!==Cw&&Cw.apply(this,arguments)||this}U_(function(t){t.registerChartView(bw),t.registerSeriesModel(kw),Uy("pie",t.registerAction),t.registerLayout(M(pw,"pie")),t.registerProcessor({seriesType:"pie",reset:function(t,e){var i,o=e.findComponents({mainType:"legend"});o&&o.length&&(i=t.getData()).filterSelf(function(t){for(var e=i.getName(t),n=0;n<o.length;n++)if(!o[n].isSelected(e))return!1;return!0})}}),t.registerProcessor({seriesType:"pie",reset:function(t,e){var n=t.getData();n.filterSelf(function(t){var e=n.mapDimension("value"),e=n.get(e,t);return!(W(e)&&!isNaN(e)&&e<0)})}})});u(Ow,Lw=g),Ow.type="grid",Ow.dependencies=["xAxis","yAxis"],Ow.layoutMode="box",Ow.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"};var Lw,Pw=Ow;function Ow(){return null!==Lw&&Lw.apply(this,arguments)||this}u(Ew,Rw=g),Ew.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Br).models[0]},Ew.type="cartesian2dAxis";var Rw,Nw=Ew;function Ew(){return null!==Rw&&Rw.apply(this,arguments)||this}at(Nw,H_);var Pc={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},jr=d({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},Pc),Ky=d({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},Pc),zw={category:jr,value:Ky,time:d({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},Ky),log:B({logBase:10},Ky)},Bw={value:1,category:1,time:1,log:1};function Fw(r,a,s,l){E(Bw,function(t,o){var e,n=d(d({},zw[o],!0),l,!0),n=(u(i,e=s),i.prototype.mergeDefaultAndTheme=function(t,e){var n=Hp(this),i=n?Gp(t):{};d(t,e.getTheme().get(o+"Axis")),d(t,this.getDefaultOption()),t.type=Vw(t),n&&Wp(t,i,n)},i.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=Fv.createByAxisModel(this))},i.prototype.getCategories=function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},i.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},i.type=a+"Axis."+o,i.defaultOption=n,i);function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a+"Axis."+o,t}r.registerComponentModel(n)}),r.registerSubTypeDefaulter(a+"Axis",Vw)}function Vw(t){return t.type||(t.data?"category":"value")}function Hw(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}Hw.prototype.getAxis=function(t){return this._axes[t]},Hw.prototype.getAxes=function(){return F(this._dimList,function(t){return this._axes[t]},this)},Hw.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),ut(this.getAxes(),function(t){return t.scale.type===e})},Hw.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)};var Ww=["x","y"];function Gw(t){return"interval"===t.type||"time"===t.type}u(Yw,Xw=Hw),Yw.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t,e,n,i,o=this.getAxis("x").scale,r=this.getAxis("y").scale;Gw(o)&&Gw(r)&&(o=o.getExtent(),r=r.getExtent(),i=this.dataToPoint([o[0],r[0]]),e=this.dataToPoint([o[1],r[1]]),t=o[1]-o[0],n=r[1]-r[0],t)&&n&&(t=(e[0]-i[0])/t,e=(e[1]-i[1])/n,n=i[0]-o[0]*t,o=i[1]-r[0]*e,i=this._transform=[t,0,0,e,n,o],this._invTransform=Be([],i))},Yw.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},Yw.prototype.containPoint=function(t){var e=this.getAxis("x"),n=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&n.contain(n.toLocalCoord(t[1]))},Yw.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},Yw.prototype.containZone=function(t,e){var t=this.dataToPoint(t),e=this.dataToPoint(e),n=this.getArea(),e=new G(t[0],t[1],e[0]-t[0],e[1]-t[1]);return n.intersect(e)},Yw.prototype.dataToPoint=function(t,e,n){n=n||[];var i,o=t[0],r=t[1];return this._transform&&null!=o&&isFinite(o)&&null!=r&&isFinite(r)?Jt(n,t,this._transform):(t=this.getAxis("x"),i=this.getAxis("y"),n[0]=t.toGlobalCoord(t.dataToCoord(o,e)),n[1]=i.toGlobalCoord(i.dataToCoord(r,e)),n)},Yw.prototype.clampData=function(t,e){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,o=n.getExtent(),r=i.getExtent(),n=n.parse(t[0]),i=i.parse(t[1]);return(e=e||[])[0]=Math.min(Math.max(Math.min(o[0],o[1]),n),Math.max(o[0],o[1])),e[1]=Math.min(Math.max(Math.min(r[0],r[1]),i),Math.max(r[0],r[1])),e},Yw.prototype.pointToData=function(t,e){var n,i,o=[];return this._invTransform?Jt(o,t,this._invTransform):(n=this.getAxis("x"),i=this.getAxis("y"),o[0]=n.coordToData(n.toLocalCoord(t[0]),e),o[1]=i.coordToData(i.toLocalCoord(t[1]),e),o)},Yw.prototype.getOtherAxis=function(t){return this.getAxis("x"===t.dim?"y":"x")},Yw.prototype.getArea=function(t){t=t||0;var e=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),i=Math.min(e[0],e[1])-t,o=Math.min(n[0],n[1])-t,e=Math.max(e[0],e[1])-i+t,n=Math.max(n[0],n[1])-o+t;return new G(i,o,e,n)};var Xw,Uw=Yw;function Yw(){var t=null!==Xw&&Xw.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=Ww,t}u(jw,Zw=Ec),jw.prototype.isHorizontal=function(){var t=this.position;return"top"===t||"bottom"===t},jw.prototype.getGlobalExtent=function(t){var e=this.getExtent();return e[0]=this.toGlobalCoord(e[0]),e[1]=this.toGlobalCoord(e[1]),t&&e[0]>e[1]&&e.reverse(),e},jw.prototype.pointToData=function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},jw.prototype.setCategorySortInfo=function(t){if("category"!==this.type)return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)};var Zw,qw=jw;function jw(t,e,n,i,o){t=Zw.call(this,t,e,n)||this;return t.index=0,t.type=i||"value",t.position=o||"bottom",t}function Kw(t,e,n){n=n||{};var t=t.coordinateSystem,i=e.axis,o={},r=i.getAxesOnZeroOf()[0],a=i.position,s=r?"onZero":a,i=i.dim,t=t.getRect(),t=[t.x,t.x+t.width,t.y,t.y+t.height],l={left:0,right:1,top:0,bottom:1,onZero:2},u=e.get("offset")||0,u="x"===i?[t[2]-u,t[3]+u]:[t[0]-u,t[1]+u],h=(r&&(h=r.toGlobalCoord(r.dataToCoord(0)),u[l.onZero]=Math.max(Math.min(h,u[1]),u[0])),o.position=["y"===i?u[l[s]]:t[0],"x"===i?u[l[s]]:t[3]],o.rotation=Math.PI/2*("x"===i?0:1),o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,left:-1,right:1}[a],o.labelOffset=r?u[l[a]]-u[l.onZero]:0,e.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),_t(n.labelInside,e.get(["axisLabel","inside"]))&&(o.labelDirection=-o.labelDirection),e.get(["axisLabel","rotate"]));return o.labelRotate="top"===s?-h:h,o.z2=1,o}function $w(t){return"cartesian2d"===t.get("coordinateSystem")}function Qw(i){var o={xAxisModel:null,yAxisModel:null};return E(o,function(t,e){var n=e.replace(/Model$/,""),n=i.getReferringComponents(n,Br).models[0];o[e]=n}),o}var Jw=Math.log;eb.prototype.getRect=function(){return this._rect},eb.prototype.update=function(t,e){var n=this._axesMap;function i(t){var d,e=ht(t),n=e.length;if(n){for(var i=[],o=n-1;0<=o;o--){var r=t[+e[o]],a=r.model,s=r.scale;Wv(s)&&a.get("alignTicks")&&null==a.get("interval")?i.push(r):(O_(s,a),Wv(s)&&(d=r))}i.length&&(d||O_((d=i.pop()).scale,d.model),E(i,function(t){var e=t.scale,t=t.model,n=d.scale,i=e_.prototype,o=i.getTicks.call(n),r=i.getTicks.call(n,!0),a=o.length-1,n=i.getInterval.call(n),s=(t=P_(e,t)).extent,l=t.fixMin,t=t.fixMax,u=("log"===e.type&&(u=Jw(e.base),s=[Jw(s[0])/u,Jw(s[1])/u]),e.setExtent(s[0],s[1]),e.calcNiceExtent({splitNumber:a,fixMin:l,fixMax:t}),i.getExtent.call(e)),h=(l&&(s[0]=u[0]),t&&(s[1]=u[1]),i.getInterval.call(e)),c=s[0],p=s[1];if(l&&t)h=(p-c)/a;else if(l)for(p=s[0]+h*a;p<s[1]&&isFinite(p)&&isFinite(s[1]);)h=Xv(h),p=s[0]+h*a;else if(t)for(c=s[1]-h*a;c>s[0]&&isFinite(c)&&isFinite(s[0]);)h=Xv(h),c=s[1]-h*a;else{u=(h=e.getTicks().length-1>a?Xv(h):h)*a;(c=nr((p=Math.ceil(s[1]/h)*h)-u))<0&&0<=s[0]?(c=0,p=nr(u)):0<p&&s[1]<=0&&(p=0,c=-nr(u))}l=(o[0].value-r[0].value)/n,t=(o[a].value-r[a].value)/n,i.setExtent.call(e,c+h*l,p+h*t),i.setInterval.call(e,h),(l||t)&&i.setNiceExtent.call(e,c+h,p-h)}))}}this._updateScale(t,this.model),i(n.x),i(n.y);var o={};E(n.x,function(t){ib(n,"y",t,o)}),E(n.y,function(t){ib(n,"x",t,o)}),this.resize(this.model,e)},eb.prototype.resize=function(t,e,n){var i=t.getBoxLayoutParams(),n=!n&&t.get("containLabel"),a=Vp(i,{width:e.getWidth(),height:e.getHeight()}),o=(this._rect=a,this._axesList);function r(){E(o,function(t){var e,n,i=t.isHorizontal(),o=i?[0,a.width]:[0,a.height],r=t.inverse?1:0;t.setExtent(o[r],o[1-r]),o=t,e=i?a.x:a.y,r=o.getExtent(),n=r[0]+r[1],o.toGlobalCoord="x"===o.dim?function(t){return t+e}:function(t){return n-t+e},o.toLocalCoord="x"===o.dim?function(t){return t-e}:function(t){return n-t+e}})}r(),n&&(E(o,function(t){var e,n,i;t.model.get(["axisLabel","inside"])||(e=z_(t))&&(n=t.isHorizontal()?"height":"width",i=t.model.get(["axisLabel","margin"]),a[n]-=e[n]+i,"top"===t.position?a.y+=e.height+i:"left"===t.position&&(a.x+=e.width+i))}),r()),E(this._coordsList,function(t){t.calcAffineTransform()})},eb.prototype.getAxis=function(t,e){t=this._axesMap[t];if(null!=t)return t[e||0]},eb.prototype.getAxes=function(){return this._axesList.slice()},eb.prototype.getCartesian=function(t,e){if(null!=t&&null!=e)return this._coordsMap["x"+t+"y"+e];O(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var n=0,i=this._coordsList;n<i.length;n++)if(i[n].getAxis("x").index===t||i[n].getAxis("y").index===e)return i[n]},eb.prototype.getCartesians=function(){return this._coordsList.slice()},eb.prototype.convertToPixel=function(t,e,n){e=this._findConvertTarget(e);return e.cartesian?e.cartesian.dataToPoint(n):e.axis?e.axis.toGlobalCoord(e.axis.dataToCoord(n)):null},eb.prototype.convertFromPixel=function(t,e,n){e=this._findConvertTarget(e);return e.cartesian?e.cartesian.pointToData(n):e.axis?e.axis.coordToData(e.axis.toLocalCoord(n)):null},eb.prototype._findConvertTarget=function(t){var e,n,i=t.seriesModel,o=t.xAxisModel||i&&i.getReferringComponents("xAxis",Br).models[0],r=t.yAxisModel||i&&i.getReferringComponents("yAxis",Br).models[0],t=t.gridModel,a=this._coordsList;return i?C(a,e=i.coordinateSystem)<0&&(e=null):o&&r?e=this.getCartesian(o.componentIndex,r.componentIndex):o?n=this.getAxis("x",o.componentIndex):r?n=this.getAxis("y",r.componentIndex):t&&t.coordinateSystem===this&&(e=this._coordsList[0]),{cartesian:e,axis:n}},eb.prototype.containPoint=function(t){var e=this._coordsList[0];if(e)return e.containPoint(t)},eb.prototype._initCartesian=function(r,t,e){var a=this,s=this,l={left:!1,right:!1,top:!1,bottom:!1},u={x:{},y:{}},h={x:0,y:0};function n(o){return function(t,e){var n,i;nb(t,r)&&(n=t.get("position"),"x"===o?"top"!==n&&"bottom"!==n&&(n=l.bottom?"top":"bottom"):"left"!==n&&"right"!==n&&(n=l.left?"right":"left"),l[n]=!0,i="category"===(n=new qw(o,R_(t),[0,0],t.get("type"),n)).type,n.onBand=i&&t.get("boundaryGap"),n.inverse=t.get("inverse"),(t.axis=n).model=t,n.grid=s,n.index=e,s._axesList.push(n),u[o][e]=n,h[o]++)}}t.eachComponent("xAxis",n("x"),this),t.eachComponent("yAxis",n("y"),this),h.x&&h.y?E((this._axesMap=u).x,function(i,o){E(u.y,function(t,e){var e="x"+o+"y"+e,n=new Uw(e);n.master=a,n.model=r,a._coordsMap[e]=n,a._coordsList.push(n),n.addAxis(i),n.addAxis(t)})}):(this._axesMap={},this._axesList=[])},eb.prototype._updateScale=function(t,i){function o(e,n){E(V_(e,n.dim),function(t){n.scale.unionExtentFromData(e,t)})}E(this._axesList,function(t){var e;t.scale.setExtent(1/0,-1/0),"category"===t.type&&(e=t.model.get("categorySortInfo"),t.scale.setSortInfo(e))}),t.eachSeries(function(t){var e,n;$w(t)&&(n=(e=Qw(t)).xAxisModel,e=e.yAxisModel,nb(n,i))&&nb(e,i)&&(n=this.getCartesian(n.componentIndex,e.componentIndex),e=t.getData(),t=n.getAxis("x"),n=n.getAxis("y"),o(e,t),o(e,n))},this)},eb.prototype.getTooltipAxes=function(n){var i=[],o=[];return E(this.getCartesians(),function(t){var e=null!=n&&"auto"!==n?t.getAxis(n):t.getBaseAxis(),t=t.getOtherAxis(e);C(i,e)<0&&i.push(e),C(o,t)<0&&o.push(t)}),{baseAxes:i,otherAxes:o}},eb.create=function(i,o){var r=[];return i.eachComponent("grid",function(t,e){var n=new eb(t,i,o);n.name="grid_"+e,n.resize(t,o,!0),t.coordinateSystem=n,r.push(n)}),i.eachSeries(function(t){var e,n,i;$w(t)&&(e=(n=Qw(t)).xAxisModel,n=n.yAxisModel,i=e.getCoordSysModel().coordinateSystem,t.coordinateSystem=i.getCartesian(e.componentIndex,n.componentIndex))}),r},eb.dimensions=Ww;var tb=eb;function eb(t,e,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=Ww,this._initCartesian(t,e,n),this.model=t}function nb(t,e){return t.getCoordSysModel()===e}function ib(t,e,n,i){n.getAxesOnZeroOf=function(){return o?[o]:[]};var o,r=t[e],t=n.model,e=t.get(["axisLine","onZero"]),n=t.get(["axisLine","onZeroAxisIndex"]);if(e){if(null!=n)ob(r[n])&&(o=r[n]);else for(var a in r)if(r.hasOwnProperty(a)&&ob(r[a])&&!i[s(r[a])]){o=r[a];break}o&&(i[s(o)]=!0)}function s(t){return t.dim+"_"+t.index}}function ob(t){return t&&"category"!==t.type&&"time"!==t.type&&(e=(t=(t=t).scale.getExtent())[0],t=t[1],!(0<e&&0<t||e<0&&t<0));var e}var rb=Math.PI,ab=(lb.prototype.hasBuilder=function(t){return!!sb[t]},lb.prototype.add=function(t){sb[t](this.opt,this.axisModel,this.group,this._transformGroup)},lb.prototype.getGroup=function(){return this.group},lb.innerTextLayout=function(t,e,n){var i,e=lr(e-t),t=ur(e)?(i=0<n?"top":"bottom","center"):ur(e-rb)?(i=0<n?"bottom":"top","center"):(i="middle",0<e&&e<rb?0<n?"right":"left":0<n?"left":"right");return{rotation:e,textAlign:t,textVerticalAlign:i}},lb.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},lb.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},lb),sb={axisLine:function(i,t,o,e){var r,a,s,l,u,h,c,n=t.get(["axisLine","show"]);(n="auto"===n&&i.handleAutoShown?i.handleAutoShown("axisLine"):n)&&(n=t.axis.getExtent(),e=e.transform,r=[n[0],0],a=[n[1],0],s=a[0]<r[0],e&&(Jt(r,r,e),Jt(a,a,e)),l=P({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),ec((n=new nh({shape:{x1:r[0],y1:r[1],x2:a[0],y2:a[1]},style:l,strokeContainThreshold:i.strokeContainThreshold||5,silent:!0,z2:1})).shape,n.style.lineWidth),n.anid="line",o.add(n),null!=(u=t.get(["axisLine","symbol"])))&&(e=t.get(["axisLine","symbolSize"]),H(u)&&(u=[u,u]),(H(e)||W(e))&&(e=[e,e]),n=lm(t.get(["axisLine","symbolOffset"])||0,e),h=e[0],c=e[1],E([{rotate:i.rotation+Math.PI/2,offset:n[0],r:0},{rotate:i.rotation-Math.PI/2,offset:n[1],r:Math.sqrt((r[0]-a[0])*(r[0]-a[0])+(r[1]-a[1])*(r[1]-a[1]))}],function(t,e){var n;"none"!==u[e]&&null!=u[e]&&(e=am(u[e],-h/2,-c/2,h,c,l.stroke,!0),n=t.r+t.offset,e.attr({rotation:t.rotate,x:(t=s?a:r)[0]+n*Math.cos(i.rotation),y:t[1]-n*Math.sin(i.rotation),silent:!0,z2:11}),o.add(e))}))},axisTickLabel:function(t,e,n,i){var o,r,a,s=function(t,e,n,i){var o=n.axis,r=n.getModel("axisTick"),a=r.get("show");if((a="auto"===a&&i.handleAutoShown?i.handleAutoShown("axisTick"):a)&&!o.scale.isBlank()){for(var a=r.getModel("lineStyle"),i=i.tickDirection*r.get("length"),s=pb(o.getTicksCoords(),e.transform,i,B(a.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),l=0;l<s.length;l++)t.add(s[l]);return s}}(n,i,e,t),l=function(f,g,y,m){var v=y.axis;{var _,x,w,t,b,S,M,T,I;if(_t(m.axisLabelShow,y.get(["axisLabel","show"]))&&!v.scale.isBlank())return _=y.getModel("axisLabel"),x=_.get("margin"),w=v.getViewLabels(),t=(_t(m.labelRotate,_.get("rotate"))||0)*rb/180,b=ab.innerTextLayout(m.rotation,t,m.labelDirection),S=y.getCategories&&y.getCategories(!0),M=[],T=ab.isLabelSilent(y),I=y.get("triggerEvent"),E(w,function(t,e){var n="ordinal"===v.scale.type?v.scale.getRawOrdinalNumber(t.tickValue):t.tickValue,i=t.formattedLabel,o=t.rawLabel,r=_,a=(r=S&&S[n]&&O(a=S[n])&&a.textStyle?new Hc(a.textStyle,_,y.ecModel):r).getTextColor()||y.get(["axisLine","lineStyle","color"]),s=v.dataToCoord(n),l=r.getShallow("align",!0)||b.textAlign,u=R(r.getShallow("alignMinLabel",!0),l),h=R(r.getShallow("alignMaxLabel",!0),l),c=r.getShallow("verticalAlign",!0)||r.getShallow("baseline",!0)||b.textVerticalAlign,p=R(r.getShallow("verticalAlignMinLabel",!0),c),d=R(r.getShallow("verticalAlignMaxLabel",!0),c),s=new Hs({x:s,y:m.labelOffset+m.labelDirection*x,rotation:b.rotation,silent:T,z2:10+(t.level||0),style:wc(r,{text:i,align:0===e?u:e===w.length-1?h:l,verticalAlign:0===e?p:e===w.length-1?d:c,fill:D(a)?a("category"===v.type?o:"value"===v.type?n+"":n,e):a})});s.anid="label_"+n,I&&((t=ab.makeAxisEventDataBase(y)).targetType="axisLabel",t.value=o,t.tickIndex=e,"category"===v.type&&(t.dataIndex=n),k(s).eventData=t),g.add(s),s.updateTransform(),M.push(s),f.add(s),s.decomposeTransform()}),M}}(n,i,e,t),u=e,h=l,c=(F_(u.axis)||(d=u.get(["axisLabel","showMinLabel"]),u=u.get(["axisLabel","showMaxLabel"]),s=s||[],y=(h=h||[])[0],f=h[1],o=h[h.length-1],h=h[h.length-2],r=s[0],g=s[1],a=s[s.length-1],s=s[s.length-2],!1===d?(ub(y),ub(r)):hb(y,f)&&(d?(ub(f),ub(g)):(ub(y),ub(r))),!1===u?(ub(o),ub(a)):hb(h,o)&&(u?(ub(h),ub(s)):(ub(o),ub(a)))),n),p=i,d=e,f=t.tickDirection,g=d.axis,y=d.getModel("minorTick");if(y.get("show")&&!g.scale.isBlank()){var m=g.getMinorTicksCoords();if(m.length)for(var g=y.getModel("lineStyle"),v=f*y.get("length"),_=B(g.getLineStyle(),B(d.getModel("axisTick").getLineStyle(),{stroke:d.get(["axisLine","lineStyle","color"])})),x=0;x<m.length;x++)for(var w=pb(m[x],p.transform,v,_,"minorticks_"+x),b=0;b<w.length;b++)c.add(w[b])}e.get(["axisLabel","hideOverlap"])&&X1(H1(F(l,function(t){return{label:t,priority:t.z2,defaultAttr:{ignore:t.ignore}}})))},axisName:function(t,e,n,i){var o,r,a,s,l,u,h,c,p=_t(t.axisName,e.get("name"));p&&(l=e.get("nameLocation"),s=t.nameDirection,r=e.getModel("nameTextStyle"),u=e.get("nameGap")||0,a=(h=e.axis.getExtent())[0]>h[1]?-1:1,a=["start"===l?h[0]-a*u:"end"===l?h[1]+a*u:(h[0]+h[1])/2,cb(l)?t.labelOffset+s*u:0],null!=(u=e.get("nameRotate"))&&(u=u*rb/180),cb(l)?o=ab.innerTextLayout(t.rotation,null!=u?u:t.rotation,s):(s=t.rotation,l=l,h=h,u=lr((u=u||0)-s),s=h[0]>h[1],h="start"===l&&!s||"start"!==l&&s,l=ur(u-rb/2)?(c=h?"bottom":"top","center"):ur(u-1.5*rb)?(c=h?"top":"bottom","center"):(c="middle",u<1.5*rb&&rb/2<u?h?"left":"right":h?"right":"left"),o={rotation:u,textAlign:l,textVerticalAlign:c},null==(c=t.axisNameAvailableWidth)||(c=Math.abs(c/Math.sin(o.rotation)),isFinite(c))||(c=null)),s=r.getFont(),u=(h=e.get("nameTruncate",!0)||{}).ellipsis,l=_t(t.nameTruncateMaxWidth,h.maxWidth,c),pc({el:t=new Hs({x:a[0],y:a[1],rotation:o.rotation,silent:ab.isLabelSilent(e),style:wc(r,{text:p,font:s,overflow:"truncate",width:l,ellipsis:u,fill:r.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:r.get("align")||o.textAlign,verticalAlign:r.get("verticalAlign")||o.textVerticalAlign}),z2:1}),componentModel:e,itemName:p}),t.__fullText=p,t.anid="name",e.get("triggerEvent")&&((h=ab.makeAxisEventDataBase(e)).targetType="axisName",h.name=p,k(t).eventData=h),i.add(t),t.updateTransform(),n.add(t),t.decomposeTransform())}};function lb(t,e){this.group=new Wo,this.opt=e,this.axisModel=t,B(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});t=new Wo({x:e.position[0],y:e.position[1],rotation:e.rotation});t.updateTransform(),this._transformGroup=t}function ub(t){t&&(t.ignore=!0)}function hb(t,e){var n,i=t&&t.getBoundingRect().clone(),o=e&&e.getBoundingRect().clone();if(i&&o)return Ee(n=Pe([]),n,-t.rotation),i.applyTransform(Re([],n,t.getLocalTransform())),o.applyTransform(Re([],n,e.getLocalTransform())),i.intersect(o)}function cb(t){return"middle"===t||"center"===t}function pb(t,e,n,i,o){for(var r=[],a=[],s=[],l=0;l<t.length;l++){var u=t[l].coord,u=(a[0]=u,s[a[1]=0]=u,s[1]=n,e&&(Jt(a,a,e),Jt(s,s,e)),new nh({shape:{x1:a[0],y1:a[1],x2:s[0],y2:s[1]},style:i,z2:2,autoBatch:!0,silent:!0}));ec(u.shape,u.style.lineWidth),u.anid=o+"_"+t[l].tickValue,r.push(u)}return r}function db(t,e){var o,h,c,r,p,d,f,n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return h=n,e=e,r=(c=t).getComponent("tooltip"),p=c.getComponent("axisPointer"),d=p.get("link",!0)||[],f=[],E(e.getCoordinateSystems(),function(s){var l,u,t,e,n;function i(t,e,n){var i,o,r=n.model.getModel("axisPointer",p),a=r.get("show");a&&("auto"!==a||t||yb(r))&&(null==e&&(e=r.get("triggerTooltip")),a=(r=t?function(t,e,n,i,o,r){var a=e.getModel("axisPointer"),s={},e=(E(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(t){s[t]=y(a.get(t))}),s.snap="category"!==t.type&&!!r,"cross"===a.get("type")&&(s.type="line"),s.label||(s.label={}));null==e.show&&(e.show=!1),"cross"===o&&(o=a.get(["label","show"]),e.show=null==o||o,r||(o=s.lineStyle=a.get("crossStyle"))&&B(e,o.textStyle));return t.model.getModel("axisPointer",new Hc(s,n,i))}(n,u,p,c,t,e):r).get("snap"),t=r.get("triggerEmphasis"),i=mb(n.model),o=e||a||"category"===n.type,e=h.axesInfo[i]={key:i,axis:n,coordSys:s,axisPointerModel:r,triggerTooltip:e,triggerEmphasis:t,involveSeries:o,snap:a,useHandle:yb(r),seriesModels:[],linkGroup:null},l[i]=e,h.seriesInvolved=h.seriesInvolved||o,null!=(t=function(t,e){for(var n=e.model,i=e.dim,o=0;o<t.length;o++){var r=t[o]||{};if(fb(r[i+"AxisId"],n.id)||fb(r[i+"AxisIndex"],n.componentIndex)||fb(r[i+"AxisName"],n.name))return o}}(d,n)))&&((a=f[t]||(f[t]={axesInfo:{}})).axesInfo[i]=e,a.mapper=d[t].mapper,e.linkGroup=a)}s.axisPointerEnabled&&(t=mb(s.model),l=h.coordSysAxesInfo[t]={},u=(h.coordSysMap[t]=s).model.getModel("tooltip",r),E(s.getAxes(),M(i,!1,null)),s.getTooltipAxes)&&r&&u.get("show")&&(t="axis"===u.get("trigger"),e="cross"===u.get(["axisPointer","type"]),n=s.getTooltipAxes(u.get(["axisPointer","axis"])),(t||e)&&E(n.baseAxes,M(i,!e||"cross",t)),e)&&E(n.otherAxes,M(i,"cross",!1))}),n.seriesInvolved&&(o=n,t.eachSeries(function(n){var i=n.coordinateSystem,t=n.get(["tooltip","trigger"],!0),e=n.get(["tooltip","show"],!0);i&&"none"!==t&&!1!==t&&"item"!==t&&!1!==e&&!1!==n.get(["axisPointer","show"],!0)&&E(o.coordSysAxesInfo[mb(i.model)],function(t){var e=t.axis;i.getAxis(e.dim)===e&&(t.seriesModels.push(n),null==t.seriesDataCount&&(t.seriesDataCount=0),t.seriesDataCount+=n.getData().count())})})),n}function fb(t,e){return"all"===t||V(t)&&0<=C(t,e)||t===e}function gb(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[mb(t)]}function yb(t){return!!t.get(["handle","show"])}function mb(t){return t.type+"||"+t.id}var vb,_b={},xb=(u(wb,vb=$g),wb.prototype.render=function(t,e,n,i){var o,r,a,s,l,u;this.axisPointerClass&&(o=gb(o=t))&&(l=o.axisPointerModel,r=o.axis.scale,a=l.option,u=l.get("status"),null!=(s=l.get("value"))&&(s=r.parse(s)),l=yb(l),null==u&&(a.status=l?"show":"hide"),(u=r.getExtent().slice())[0]>u[1]&&u.reverse(),(s=null==s||s>u[1]?u[1]:s)<u[0]&&(s=u[0]),a.value=s,l)&&(a.status=o.axis.scale.isBlank()?"hide":"show"),vb.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(t,n,!0)},wb.prototype.updateAxisPointer=function(t,e,n,i){this._doUpdateAxisPointerClass(t,n,!1)},wb.prototype.remove=function(t,e){var n=this._axisPointer;n&&n.remove(e)},wb.prototype.dispose=function(t,e){this._disposeAxisPointer(e),vb.prototype.dispose.apply(this,arguments)},wb.prototype._doUpdateAxisPointerClass=function(t,e,n){var i,o=wb.getAxisPointerClass(this.axisPointerClass);o&&((i=(i=gb(i=t))&&i.axisPointerModel)?(this._axisPointer||(this._axisPointer=new o)).render(t,i,e,n):this._disposeAxisPointer(e))},wb.prototype._disposeAxisPointer=function(t){this._axisPointer&&this._axisPointer.dispose(t),this._axisPointer=null},wb.registerAxisPointerClass=function(t,e){_b[t]=e},wb.getAxisPointerClass=function(t){return t&&_b[t]},wb.type="axis",wb);function wb(){var t=null!==vb&&vb.apply(this,arguments)||this;return t.type=wb.type,t}var bb=Rr();var Sb,Mb,Tb=["axisLine","axisTickLabel","axisName"],Ib=["splitArea","splitLine","minorSplitLine"],em=(u(Ab,Mb=xb),Ab.prototype.render=function(i,t,e,n){this.group.removeAll();var o,r,a=this._axisGroup;this._axisGroup=new Wo,this.group.add(this._axisGroup),i.get("show")&&(r=Kw(o=i.getCoordSysModel(),i),r=new ab(i,P({handleAutoShown:function(t){for(var e=o.coordinateSystem.getCartesians(),n=0;n<e.length;n++)if(Wv(e[n].getOtherAxis(i.axis).scale))return!0;return!1}},r)),E(Tb,r.add,r),this._axisGroup.add(r.getGroup()),E(Ib,function(t){i.get([t,"show"])&&Cb[t](this,this._axisGroup,i,o)},this),n&&"changeAxisOrder"===n.type&&n.isInitSort||sc(a,this._axisGroup,i),Mb.prototype.render.call(this,i,t,e,n))},Ab.prototype.remove=function(){bb(this).splitAreaColors=null},Ab.type="cartesianAxis",Ab),Cb={splitLine:function(t,e,n,i){var o=n.axis;if(!o.scale.isBlank())for(var n=n.getModel("splitLine"),r=n.getModel("lineStyle"),a=V(a=r.get("color"))?a:[a],s=i.coordinateSystem.getRect(),l=o.isHorizontal(),u=0,h=o.getTicksCoords({tickModel:n}),c=[],p=[],d=r.getLineStyle(),f=0;f<h.length;f++){var g=o.toGlobalCoord(h[f].coord),g=(l?(c[0]=g,c[1]=s.y,p[0]=g,p[1]=s.y+s.height):(c[0]=s.x,c[1]=g,p[0]=s.x+s.width,p[1]=g),u++%a.length),y=h[f].tickValue,y=new nh({anid:null!=y?"line_"+h[f].tickValue:null,autoBatch:!0,shape:{x1:c[0],y1:c[1],x2:p[0],y2:p[1]},style:B({stroke:a[g]},d),silent:!0});ec(y.shape,d.lineWidth),e.add(y)}},minorSplitLine:function(t,e,n,i){var o=n.axis,n=n.getModel("minorSplitLine").getModel("lineStyle"),r=i.coordinateSystem.getRect(),a=o.isHorizontal(),s=o.getMinorTicksCoords();if(s.length)for(var l=[],u=[],h=n.getLineStyle(),c=0;c<s.length;c++)for(var p=0;p<s[c].length;p++){var d=o.toGlobalCoord(s[c][p].coord),d=(a?(l[0]=d,l[1]=r.y,u[0]=d,u[1]=r.y+r.height):(l[0]=r.x,l[1]=d,u[0]=r.x+r.width,u[1]=d),new nh({anid:"minor_line_"+s[c][p].tickValue,autoBatch:!0,shape:{x1:l[0],y1:l[1],x2:u[0],y2:u[1]},style:h,silent:!0}));ec(d.shape,h.lineWidth),e.add(d)}},splitArea:function(t,e,n,i){var o=e,e=i,r=(i=n).axis;if(!r.scale.isBlank()){var i=i.getModel("splitArea"),n=i.getModel("areaStyle"),a=n.get("color"),s=e.coordinateSystem.getRect(),l=r.getTicksCoords({tickModel:i,clamp:!0});if(l.length){var u=a.length,h=bb(t).splitAreaColors,c=N(),p=0;if(h)for(var d=0;d<l.length;d++){var f=h.get(l[d].tickValue);if(null!=f){p=(f+(u-1)*d)%u;break}}for(var g=r.toGlobalCoord(l[0].coord),y=n.getAreaStyle(),a=V(a)?a:[a],d=1;d<l.length;d++){var m=r.toGlobalCoord(l[d].coord),v=void 0,_=void 0,x=void 0,w=void 0,g=r.isHorizontal()?(v=g,_=s.y,w=s.height,v+(x=m-v)):(v=s.x,_=g,x=s.width,_+(w=m-_)),m=l[d-1].tickValue;null!=m&&c.set(m,p),o.add(new Es({anid:null!=m?"area_"+m:null,shape:{x:v,y:_,width:x,height:w},style:B({fill:a[p]},y),autoBatch:!0,silent:!0})),p=(p+1)%u}bb(t).splitAreaColors=c}}}},Db=(u(kb,Sb=em),kb.type="xAxis",kb);function kb(){var t=null!==Sb&&Sb.apply(this,arguments)||this;return t.type=kb.type,t}function Ab(){var t=null!==Mb&&Mb.apply(this,arguments)||this;return t.type=Ab.type,t.axisPointerClass="CartesianAxisPointer",t}u(Ob,Lb=em),Ob.type="yAxis";var Lb,Pb=Ob;function Ob(){var t=null!==Lb&&Lb.apply(this,arguments)||this;return t.type=Db.type,t}u(zb,Rb=$g),zb.prototype.render=function(t,e){this.group.removeAll(),t.get("show")&&this.group.add(new Es({shape:t.coordinateSystem.getRect(),style:B({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))},zb.type="grid";var Rb,Nb=zb,Eb={offset:0};function zb(){var t=null!==Rb&&Rb.apply(this,arguments)||this;return t.type="grid",t}U_(function(t){t.registerComponentView(Nb),t.registerComponentModel(Pw),t.registerCoordinateSystem("cartesian2d",tb),Fw(t,"x",Nw,Eb),Fw(t,"y",Nw,Eb),t.registerComponentView(Db),t.registerComponentView(Pb),t.registerPreprocessor(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})})});u(Vb,Bb=g),Vb.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n),t.selected=t.selected||{},this._updateSelector(t)},Vb.prototype.mergeOption=function(t,e){Bb.prototype.mergeOption.call(this,t,e),this._updateSelector(t)},Vb.prototype._updateSelector=function(t){var n=t.selector,i=this.ecModel;V(n=!0===n?t.selector=["all","inverse"]:n)&&E(n,function(t,e){H(t)&&(t={type:t}),n[e]=d(t,(e=i,"all"===(t=t.type)?{type:"all",title:e.getLocaleModel().get(["legend","selector","all"])}:"inverse"===t?{type:"inverse",title:e.getLocaleModel().get(["legend","selector","inverse"])}:void 0))})},Vb.prototype.optionUpdated=function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,n=0;n<t.length;n++){var i=t[n].get("name");if(this.isSelected(i)){this.select(i),e=!0;break}}e||this.select(t[0].get("name"))}},Vb.prototype._updateData=function(i){var o=[],r=[],t=(i.eachRawSeries(function(t){var e,n=t.name;r.push(n),t.legendVisualProvider&&(n=t.legendVisualProvider.getAllNames(),i.isSeriesFiltered(t)||(r=r.concat(n)),n.length)?o=o.concat(n):e=!0,e&&Ar(t)&&o.push(t.name)}),this._availableNames=r,this.get("data")||o),e=N(),t=F(t,function(t){return(H(t)||W(t))&&(t={name:t}),e.get(t.name)?null:(e.set(t.name,!0),new Hc(t,this,this.ecModel))},this);this._data=ut(t,function(t){return!!t})},Vb.prototype.getData=function(){return this._data},Vb.prototype.select=function(t){var e=this.option.selected;"single"===this.get("selectedMode")&&E(this._data,function(t){e[t.get("name")]=!1}),e[t]=!0},Vb.prototype.unSelect=function(t){"single"!==this.get("selectedMode")&&(this.option.selected[t]=!1)},Vb.prototype.toggleSelected=function(t){var e=this.option.selected;e.hasOwnProperty(t)||(e[t]=!0),this[e[t]?"unSelect":"select"](t)},Vb.prototype.allSelect=function(){var t=this._data,e=this.option.selected;E(t,function(t){e[t.get("name",!0)]=!0})},Vb.prototype.inverseSelect=function(){var t=this._data,e=this.option.selected;E(t,function(t){t=t.get("name",!0);e.hasOwnProperty(t)||(e[t]=!0),e[t]=!e[t]})},Vb.prototype.isSelected=function(t){var e=this.option.selected;return!(e.hasOwnProperty(t)&&!e[t])&&0<=C(this._availableNames,t)},Vb.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},Vb.type="legend.plain",Vb.dependencies=["series"],Vb.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}};var Bb,Fb=Vb;function Vb(){var t=null!==Bb&&Bb.apply(this,arguments)||this;return t.type=Vb.type,t.layoutMode={type:"box",ignoreSize:!0},t}var Hb,Wb=M,Gb=E,Xb=Wo,Ub=(u(Yb,Hb=$g),Yb.prototype.init=function(){this.group.add(this._contentGroup=new Xb),this.group.add(this._selectorGroup=new Xb),this._isFirstRender=!0},Yb.prototype.getContentGroup=function(){return this._contentGroup},Yb.prototype.getSelectorGroup=function(){return this._selectorGroup},Yb.prototype.render=function(t,e,n){var i,o,r,a,s,l=this._isFirstRender;this._isFirstRender=!1,this.resetInner(),t.get("show",!0)&&(o=t.get("align"),i=t.get("orient"),o&&"auto"!==o||(o="right"===t.get("left")&&"vertical"===i?"right":"left"),a=t.get("selector",!0),s=t.get("selectorPosition",!0),this.renderInner(o,t,e,n,a,i,s=!a||s&&"auto"!==s?s:"horizontal"===i?"end":"start"),r=Vp(e=t.getBoxLayoutParams(),i={width:n.getWidth(),height:n.getHeight()},n=t.get("padding")),r=Vp(B({width:(o=this.layoutInner(t,o,r,l,a,s)).width,height:o.height},e),i,n),this.group.x=r.x-o.x,this.group.y=r.y-o.y,this.group.markRedraw(),this.group.add(this._backgroundEl=(l=o,s=Dp((a=t).get("padding")),(e=a.getItemStyle(["color","opacity"])).fill=a.get("backgroundColor"),new Es({shape:{x:l.x-s[3],y:l.y-s[0],width:l.width+s[1]+s[3],height:l.height+s[0]+s[2],r:a.get("borderRadius")},style:e,silent:!0,z2:-1}))))},Yb.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},Yb.prototype.renderInner=function(s,l,u,h,t,e,n){var c=this.getContentGroup(),p=N(),d=l.get("selectedMode"),f=[];u.eachRawSeries(function(t){t.get("legendHoverLink")||f.push(t.id)}),Gb(l.getData(),function(o,r){var e,t,n,i,a=o.get("name");this.newlineDisabled||""!==a&&"\n"!==a?(e=u.getSeriesByName(a)[0],p.get(a)||(e?(i=(n=e.getData()).getVisual("legendLineStyle")||{},t=n.getVisual("legendIcon"),n=n.getVisual("style"),(i=this._createItem(e,a,r,o,l,s,i,n,t,d,h)).on("click",Wb(Zb,a,null,h,f)).on("mouseover",Wb(jb,e.name,null,h,f)).on("mouseout",Wb(Kb,e.name,null,h,f)),u.ssr&&i.eachChild(function(t){t=k(t);t.seriesIndex=e.seriesIndex,t.dataIndex=r,t.ssrType="legend"}),p.set(a,!0)):u.eachRawSeries(function(e){var t,n,i;!p.get(a)&&e.legendVisualProvider&&(n=e.legendVisualProvider).containName(a)&&(i=n.indexOfName(a),t=n.getItemVisual(i,"style"),n=n.getItemVisual(i,"legendIcon"),(i=fi(t.fill))&&0===i[3]&&(i[3]=.2,t=P(P({},t),{fill:xi(i,"rgba")})),(i=this._createItem(e,a,r,o,l,s,{},t,n,d,h)).on("click",Wb(Zb,null,a,h,f)).on("mouseover",Wb(jb,null,a,h,f)).on("mouseout",Wb(Kb,null,a,h,f)),u.ssr&&i.eachChild(function(t){t=k(t);t.seriesIndex=e.seriesIndex,t.dataIndex=r,t.ssrType="legend"}),p.set(a,!0))},this))):((n=new Xb).newline=!0,c.add(n))},this),t&&this._createSelector(t,l,h,e,n)},Yb.prototype._createSelector=function(t,i,o,e,n){var r=this.getSelectorGroup();Gb(t,function(t){var e=t.type,n=new Hs({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){o.dispatchAction({type:"all"===e?"legendAllSelect":"legendInverseSelect"})}});r.add(n),_c(n,{normal:i.getModel("selectorLabel"),emphasis:i.getModel(["emphasis","selectorLabel"])},{defaultText:t.title}),Hl(n)})},Yb.prototype._createItem=function(t,e,n,i,o,r,a,s,l,u,h){var c=t.visualDrawType,p=o.get("itemWidth"),d=o.get("itemHeight"),f=o.isSelected(e),g=i.get("symbolRotate"),y=i.get("symbolKeepAspect"),m=i.get("icon"),a=function(t,e,n,i,o,r,a){function s(n,i){"auto"===n.lineWidth&&(n.lineWidth=0<i.lineWidth?2:0),Gb(n,function(t,e){"inherit"===n[e]&&(n[e]=i[e])})}var l=e.getModel("itemStyle"),u=l.getItemStyle(),t=0===t.lastIndexOf("empty",0)?"fill":"stroke",l=l.getShallow("decal"),l=(u.decal=l&&"inherit"!==l?zm(l,a):i.decal,"inherit"===u.fill&&(u.fill=i[o]),"inherit"===u.stroke&&(u.stroke=i[t]),"inherit"===u.opacity&&(u.opacity=("fill"===o?i:n).opacity),s(u,i),e.getModel("lineStyle")),a=l.getLineStyle();s(a,n),"auto"===u.fill&&(u.fill=i.fill),"auto"===u.stroke&&(u.stroke=i.fill),"auto"===a.stroke&&(a.stroke=i.fill),r||(o=e.get("inactiveBorderWidth"),n=u[t],u.lineWidth="auto"===o?0<i.lineWidth&&n?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),a.stroke=l.get("inactiveColor"),a.lineWidth=l.get("inactiveWidth"));return{itemStyle:u,lineStyle:a}}(l=m||l||"roundRect",i,a,s,c,f,h),s=new Xb,c=i.getModel("textStyle"),m=(!D(t.getLegendIcon)||m&&"inherit"!==m?(h="inherit"===m&&t.getData().getVisual("symbol")?"inherit"===g?t.getData().getVisual("symbolRotate"):g:0,s.add((m={itemWidth:p,itemHeight:d,icon:l,iconRotate:h,itemStyle:a.itemStyle,lineStyle:a.lineStyle,symbolKeepAspect:y},h=m.icon||"roundRect",(v=am(h,0,0,m.itemWidth,m.itemHeight,m.itemStyle.fill,m.symbolKeepAspect)).setStyle(m.itemStyle),v.rotation=(m.iconRotate||0)*Math.PI/180,v.setOrigin([m.itemWidth/2,m.itemHeight/2]),-1<h.indexOf("empty")&&(v.style.stroke=v.style.fill,v.style.fill="#fff",v.style.lineWidth=2),v))):s.add(t.getLegendIcon({itemWidth:p,itemHeight:d,icon:l,iconRotate:g,itemStyle:a.itemStyle,lineStyle:a.lineStyle,symbolKeepAspect:y})),"left"===r?p+5:-5),h=r,v=o.get("formatter"),t=e,l=(H(v)&&v?t=v.replace("{name}",null!=e?e:""):D(v)&&(t=v(e)),f?c.getTextColor():i.get("inactiveColor")),g=(s.add(new Hs({style:wc(c,{text:t,x:m,y:d/2,fill:l,align:h,verticalAlign:"middle"},{inheritColor:l})})),new Es({shape:s.getBoundingRect(),style:{fill:"transparent"}})),a=i.getModel("tooltip");return a.get("show")&&pc({el:g,componentModel:o,itemName:e,itemTooltipOption:a.option}),s.add(g),s.eachChild(function(t){t.silent=!0}),g.silent=!u,this.getContentGroup().add(s),Hl(s),s.__legendDataIndex=n,s},Yb.prototype.layoutInner=function(t,e,n,i,o,r){var a,s,l,u,h,c=this.getContentGroup(),p=this.getSelectorGroup(),n=(Fp(t.get("orient"),c,t.get("itemGap"),n.width,n.height),c.getBoundingRect()),d=[-n.x,-n.y];return p.markRedraw(),c.markRedraw(),o?(Fp("horizontal",p,t.get("selectorItemGap",!0)),a=[-(o=p.getBoundingRect()).x,-o.y],s=t.get("selectorButtonGap",!0),l=0===(t=t.getOrient().index)?"width":"height",u=0===t?"height":"width",h=0===t?"y":"x","end"===r?a[t]+=n[l]+s:d[t]+=o[l]+s,a[1-t]+=n[u]/2-o[u]/2,p.x=a[0],p.y=a[1],c.x=d[0],c.y=d[1],(r={x:0,y:0})[l]=n[l]+s+o[l],r[u]=Math.max(n[u],o[u]),r[h]=Math.min(0,o[h]+a[1-t]),r):(c.x=d[0],c.y=d[1],this.group.getBoundingRect())},Yb.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},Yb.type="legend.plain",Yb);function Yb(){var t=null!==Hb&&Hb.apply(this,arguments)||this;return t.type=Yb.type,t.newlineDisabled=!1,t}function Zb(t,e,n,i){Kb(t,e,n,i),n.dispatchAction({type:"legendToggleSelect",name:null!=t?t:e}),jb(t,e,n,i)}function qb(t){for(var e,n=t.getZr().storage.getDisplayList(),i=0,o=n.length;i<o&&!(e=n[i].states.emphasis);)i++;return e&&e.hoverLayer}function jb(t,e,n,i){qb(n)||n.dispatchAction({type:"highlight",seriesName:t,name:e,excludeSeriesId:i})}function Kb(t,e,n,i){qb(n)||n.dispatchAction({type:"downplay",seriesName:t,name:e,excludeSeriesId:i})}function $b(t){var n=t.findComponents({mainType:"legend"});n&&n.length&&t.filterSeries(function(t){for(var e=0;e<n.length;e++)if(!n[e].isSelected(t.name))return!1;return!0})}function Qb(t,e,n){var i,o={},r="toggleSelected"===t;return n.eachComponent("legend",function(n){r&&null!=i?n[i?"select":"unSelect"](e.name):"allSelect"===t||"inverseSelect"===t?n[t]():(n[t](e.name),i=n.isSelected(e.name)),E(n.getData(),function(t){var e,t=t.get("name");"\n"!==t&&""!==t&&(e=n.isSelected(t),o.hasOwnProperty(t)?o[t]=o[t]&&e:o[t]=e)})}),"allSelect"===t||"inverseSelect"===t?{selected:o}:{name:e.name,selected:o}}function Jb(t){t.registerComponentModel(Fb),t.registerComponentView(Ub),t.registerProcessor(t.PRIORITY.PROCESSOR.SERIES_FILTER,$b),t.registerSubTypeDefaulter("legend",function(){return"plain"}),(t=t).registerAction("legendToggleSelect","legendselectchanged",M(Qb,"toggleSelected")),t.registerAction("legendAllSelect","legendselectall",M(Qb,"allSelect")),t.registerAction("legendInverseSelect","legendinverseselect",M(Qb,"inverseSelect")),t.registerAction("legendSelect","legendselected",M(Qb,"select")),t.registerAction("legendUnSelect","legendunselected",M(Qb,"unSelect"))}u(nS,tS=Fb),nS.prototype.setScrollDataIndex=function(t){this.option.scrollDataIndex=t},nS.prototype.init=function(t,e,n){var i=Gp(t);tS.prototype.init.call(this,t,e,n),iS(this,t,i)},nS.prototype.mergeOption=function(t,e){tS.prototype.mergeOption.call(this,t,e),iS(this,this.option,t)},nS.type="legend.scroll",nS.defaultOption=Uc(Fb.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800});var tS,eS=nS;function nS(){var t=null!==tS&&tS.apply(this,arguments)||this;return t.type=nS.type,t}function iS(t,e,n){var i=[1,1];i[t.getOrient().index]=0,Wp(e,n,{type:"box",ignoreSize:!!i})}var oS,rS=Wo,aS=["width","height"],sS=["x","y"],lS=(u(uS,oS=Ub),uS.prototype.init=function(){oS.prototype.init.call(this),this.group.add(this._containerGroup=new rS),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new rS)},uS.prototype.resetInner=function(){oS.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},uS.prototype.renderInner=function(t,i,e,o,n,r,a){var s=this,l=(oS.prototype.renderInner.call(this,t,i,e,o,n,r,a),this._controllerGroup),t=i.get("pageIconSize",!0),u=V(t)?t:[t,t],e=(h("pagePrev",0),i.getModel("pageTextStyle"));function h(t,e){var n=t+"DataIndex",e=hc(i.get("pageIcons",!0)[i.getOrient().name][e],{onclick:S(s._pageGo,s,n,i,o)},{x:-u[0]/2,y:-u[1]/2,width:u[0],height:u[1]});e.name=t,l.add(e)}l.add(new Hs({name:"pageText",style:{text:"xx/xx",fill:e.getTextColor(),font:e.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),h("pageNext",1)},uS.prototype.layoutInner=function(t,e,n,i,o,r){var a=this.getSelectorGroup(),s=t.getOrient().index,l=aS[s],u=sS[s],h=aS[1-s],c=sS[1-s],p=(o&&Fp("horizontal",a,t.get("selectorItemGap",!0)),t.get("selectorButtonGap",!0)),d=a.getBoundingRect(),f=[-d.x,-d.y],g=y(n),n=(o&&(g[l]=n[l]-d[l]-p),this._layoutContentAndController(t,i,g,s,l,h,c,u));return o&&("end"===r?f[s]+=n[l]+p:(t=d[l]+p,f[s]-=t,n[u]-=t),n[l]+=d[l]+p,f[1-s]+=n[c]+n[h]/2-d[h]/2,n[h]=Math.max(n[h],d[h]),n[c]=Math.min(n[c],d[c]+f[1-s]),a.x=f[0],a.y=f[1],a.markRedraw()),n},uS.prototype._layoutContentAndController=function(t,e,n,i,o,r,a,s){var l=this.getContentGroup(),u=this._containerGroup,h=this._controllerGroup,c=(Fp(t.get("orient"),l,t.get("itemGap"),i?n.width:null,i?null:n.height),Fp("horizontal",h,t.get("pageButtonItemGap",!0)),l.getBoundingRect()),p=h.getBoundingRect(),d=this._showController=c[o]>n[o],f=[-c.x,-c.y],e=(e||(f[i]=l[s]),[0,0]),s=[-p.x,-p.y],g=R(t.get("pageButtonGap",!0),t.get("itemGap",!0)),f=(d&&("end"===t.get("pageButtonPosition",!0)?s[i]+=n[o]-p[o]:e[i]+=p[o]+g),s[1-i]+=c[r]/2-p[r]/2,l.setPosition(f),u.setPosition(e),h.setPosition(s),{x:0,y:0}),c=(f[o]=(d?n:c)[o],f[r]=Math.max(c[r],p[r]),f[a]=Math.min(0,p[a]+s[1-i]),u.__rectSize=n[o],d?((e={x:0,y:0})[o]=Math.max(n[o]-p[o]-g,0),e[r]=f[r],u.setClipPath(new Es({shape:e})),u.__rectSize=e[o]):h.eachChild(function(t){t.attr({invisible:!0,silent:!0})}),this._getPageInfo(t));return null!=c.pageIndex&&Nh(l,{x:c.contentPosition[0],y:c.contentPosition[1]},d?t:null),this._updatePageInfoView(t,c),f},uS.prototype._pageGo=function(t,e,n){t=this._getPageInfo(e)[t];null!=t&&n.dispatchAction({type:"legendScroll",scrollDataIndex:t,legendId:e.id})},uS.prototype._updatePageInfoView=function(n,i){var o=this._controllerGroup,t=(E(["pagePrev","pageNext"],function(t){var e=null!=i[t+"DataIndex"],t=o.childOfName(t);t&&(t.setStyle("fill",e?n.get("pageIconColor",!0):n.get("pageIconInactiveColor",!0)),t.cursor=e?"pointer":"default")}),o.childOfName("pageText")),e=n.get("pageFormatter"),r=i.pageIndex,r=null!=r?r+1:0,a=i.pageCount;t&&e&&t.setStyle("text",H(e)?e.replace("{current}",null==r?"":r+"").replace("{total}",null==a?"":a+""):e({current:r,total:a}))},uS.prototype._getPageInfo=function(t){var e=t.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,t=t.getOrient().index,o=aS[t],r=sS[t],e=this._findTargetItemIndex(e),a=n.children(),s=a[e],l=a.length,u=l?1:0,h={contentPosition:[n.x,n.y],pageCount:u,pageIndex:u-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(s){n=g(s);h.contentPosition[t]=-n.s;for(var c=e+1,p=n,d=n,f=null;c<=l;++c)(!(f=g(a[c]))&&d.e>p.s+i||f&&!y(f,p.s))&&(p=d.i>p.i?d:f)&&(null==h.pageNextDataIndex&&(h.pageNextDataIndex=p.i),++h.pageCount),d=f;for(c=e-1,d=p=n,f=null;-1<=c;--c)(f=g(a[c]))&&y(d,f.s)||!(p.i<d.i)||(d=p,null==h.pagePrevDataIndex&&(h.pagePrevDataIndex=p.i),++h.pageCount,++h.pageIndex),p=f}return h;function g(t){var e,n;if(t)return{s:n=(e=t.getBoundingRect())[r]+t[r],e:n+e[o],i:t.__legendDataIndex}}function y(t,e){return t.e>=e&&t.s<=e+i}},uS.prototype._findTargetItemIndex=function(n){return this._showController?(this.getContentGroup().eachChild(function(t,e){t=t.__legendDataIndex;null==o&&null!=t&&(o=e),t===n&&(i=e)}),null!=i?i:o):0;var i,o},uS.type="legend.scroll",uS);function uS(){var t=null!==oS&&oS.apply(this,arguments)||this;return t.type=uS.type,t.newlineDisabled=!0,t._currentIndex=0,t}U_(function(t){U_(Jb),t.registerComponentModel(eS),t.registerComponentView(lS),t.registerAction("legendScroll","legendscroll",function(t,e){var n=t.scrollDataIndex;null!=n&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(n)})})});var hS=Rr(),cS=y,pS=S;function dS(){this._dragging=!1,this.animationThreshold=15}function fS(t,e,n,i){!function n(i,t){{var o;if(O(i)&&O(t))return o=!0,E(t,function(t,e){o=o&&n(i[e],t)}),!!o}return i===t}(hS(n).lastProp,i)&&(hS(n).lastProp=i,e?Nh(n,i,t):(n.stopAnimation(),n.attr(i)))}function gS(t,e){t[e.get(["label","show"])?"show":"hide"]()}function yS(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function mS(t,e,n){var i=e.get("z"),o=e.get("zlevel");t&&t.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=o&&(t.zlevel=o),t.silent=n)})}function vS(t,e,n,i,o){var r=_S(n.get("value"),e.axis,e.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),n=n.getModel("label"),a=Dp(n.get("padding")||0),s=n.getFont(),l=Mo(r,s),u=o.position,h=l.width+a[1]+a[3],l=l.height+a[0]+a[2],c=o.align,c=("right"===c&&(u[0]-=h),"center"===c&&(u[0]-=h/2),o.verticalAlign),i=("bottom"===c&&(u[1]-=l),"middle"===c&&(u[1]-=l/2),o=u,c=h,h=l,i=(l=i).getWidth(),l=l.getHeight(),o[0]=Math.min(o[0]+c,i)-c,o[1]=Math.min(o[1]+h,l)-h,o[0]=Math.max(o[0],0),o[1]=Math.max(o[1],0),n.get("backgroundColor"));i&&"auto"!==i||(i=e.get(["axisLine","lineStyle","color"])),t.label={x:u[0],y:u[1],style:wc(n,{text:r,font:s,fill:n.getTextColor(),padding:a,backgroundColor:i}),z2:10}}function _S(t,e,n,i,o){t=e.scale.parse(t);var r,a=e.scale.getLabel({value:t},{precision:o.precision}),o=o.formatter;return o&&(r={value:E_(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]},E(i,function(t){var e=n.getSeriesByIndex(t.seriesIndex),t=t.dataIndexInside,e=e&&e.getDataParams(t);e&&r.seriesData.push(e)}),H(o)?a=o.replace("{value}",a):D(o)&&(a=o(r))),a}function xS(t,e,n){var i=Le();return Ee(i,i,n.rotation),Ne(i,i,n.position),oc([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}dS.prototype.render=function(t,e,n,i){var o,r,a=e.get("value"),s=e.get("status");this._axisModel=t,this._axisPointerModel=e,this._api=n,!i&&this._lastValue===a&&this._lastStatus===s||(this._lastValue=a,this._lastStatus=s,i=this._group,o=this._handle,s&&"hide"!==s?(i&&i.show(),o&&o.show(),this.makeElOption(s={},a,t,e,n),(r=s.graphicKey)!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=r,r=this._moveAnimation=this.determineAnimation(t,e),i?(r=M(fS,e,r),this.updatePointerEl(i,s,r),this.updateLabelEl(i,s,r,e)):(i=this._group=new Wo,this.createPointerEl(i,s,t,e),this.createLabelEl(i,s,t,e),n.getZr().add(i)),mS(i,e,!0),this._renderHandle(a)):(i&&i.hide(),o&&o.hide()))},dS.prototype.remove=function(t){this.clear(t)},dS.prototype.dispose=function(t){this.clear(t)},dS.prototype.determineAnimation=function(t,e){var n,i=e.get("animation"),o=t.axis,r="category"===o.type,e=e.get("snap");return!(!e&&!r)&&("auto"===i||null==i?(n=this.animationThreshold,r&&o.getBandWidth()>n||!!e&&(r=gb(t).seriesDataCount,e=o.getExtent(),Math.abs(e[0]-e[1])/r>n)):!0===i)},dS.prototype.makeElOption=function(t,e,n,i,o){},dS.prototype.createPointerEl=function(t,e,n,i){var o=e.pointer;o&&(o=hS(t).pointerEl=new gc[o.type](cS(e.pointer)),t.add(o))},dS.prototype.createLabelEl=function(t,e,n,i){e.label&&(e=hS(t).labelEl=new Hs(cS(e.label)),t.add(e),gS(e,i))},dS.prototype.updatePointerEl=function(t,e,n){t=hS(t).pointerEl;t&&e.pointer&&(t.setStyle(e.pointer.style),n(t,{shape:e.pointer.shape}))},dS.prototype.updateLabelEl=function(t,e,n,i){t=hS(t).labelEl;t&&(t.setStyle(e.label.style),n(t,{x:e.label.x,y:e.label.y}),gS(t,i))},dS.prototype._renderHandle=function(t){var e,n,i,o,r,a;!this._dragging&&this.updateHandleTransform&&(n=this._axisPointerModel,i=this._api.getZr(),o=this._handle,r=n.getModel("handle"),a=n.get("status"),r.get("show")&&a&&"hide"!==a?(this._handle||(e=!0,o=this._handle=hc(r.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){Te(t.event)},onmousedown:pS(this._onHandleDragMove,this,0,0),drift:pS(this._onHandleDragMove,this),ondragend:pS(this._onHandleDragEnd,this)}),i.add(o)),mS(o,n,!1),o.setStyle(r.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"])),V(a=r.get("size"))||(a=[a,a]),o.scaleX=a[0]/2,o.scaleY=a[1]/2,dy(this,"_doDispatchAxisPointer",r.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)):(o&&i.remove(o),this._handle=null))},dS.prototype._moveHandleToValue=function(t,e){fS(this._axisPointerModel,!e&&this._moveAnimation,this._handle,yS(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},dS.prototype._onHandleDragMove=function(t,e){var n=this._handle;n&&(this._dragging=!0,t=this.updateHandleTransform(yS(n),[t,e],this._axisModel,this._axisPointerModel),this._payloadInfo=t,n.stopAnimation(),n.attr(yS(t)),hS(n).lastProp=null,this._doDispatchAxisPointer())},dS.prototype._doDispatchAxisPointer=function(){var t,e;this._handle&&(t=this._payloadInfo,e=this._axisModel,this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]}))},dS.prototype._onHandleDragEnd=function(){var t;this._dragging=!1,this._handle&&(t=this._axisPointerModel.get("value"),this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"}))},dS.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var t=t.getZr(),e=this._group,n=this._handle;t&&e&&(this._lastGraphicKey=null,e&&t.remove(e),n&&t.remove(n),this._group=null,this._handle=null,this._payloadInfo=null),fy(this,"_doDispatchAxisPointer")},dS.prototype.doClear=function(){},dS.prototype.buildLabel=function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}};u(SS,wS=dS),SS.prototype.makeElOption=function(t,e,n,i,o){var r,a,s=n.axis,l=s.grid,u=i.get("type"),h=MS(l,s).getOtherAxis(s).getGlobalExtent(),c=s.toGlobalCoord(s.dataToCoord(e,!0)),p=(u&&"none"!==u&&(r=(a=i).get("type"),a=a.getModel(r+"Style"),"line"===r?(p=a.getLineStyle()).fill=null:"shadow"===r&&((p=a.getAreaStyle()).stroke=null),r=p,(a=TS[u](s,c,h)).style=r,t.graphicKey=a.type,t.pointer=a),Kw(l.model,n));u=e,s=t,c=p,h=n,r=i,a=o,l=ab.innerTextLayout(c.rotation,0,c.labelDirection),c.labelMargin=r.get(["label","margin"]),vS(s,h,r,a,{position:xS(h.axis,u,c),align:l.textAlign,verticalAlign:l.textVerticalAlign})},SS.prototype.getHandleTransform=function(t,e,n){var i=Kw(e.axis.grid.model,e,{labelInside:!1}),n=(i.labelMargin=n.get(["handle","margin"]),xS(e.axis,t,i));return{x:n[0],y:n[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},SS.prototype.updateHandleTransform=function(t,e,n,i){var n=n.axis,o=n.grid,r=n.getGlobalExtent(!0),o=MS(o,n).getOtherAxis(n).getGlobalExtent(),n="x"===n.dim?0:1,a=[t.x,t.y],e=(a[n]+=e[n],a[n]=Math.min(r[1],a[n]),a[n]=Math.max(r[0],a[n]),(o[1]+o[0])/2),r=[e,e];return r[n]=a[n],{x:a[0],y:a[1],rotation:t.rotation,cursorPoint:r,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][n]}};var wS,bS=SS;function SS(){return null!==wS&&wS.apply(this,arguments)||this}function MS(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}var TS={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:(i=[e,n[0]],e=[e,n[1]],n=IS(t),{x1:i[n=n||0],y1:i[1-n],x2:e[n],y2:e[1-n]})};var i},shadow:function(t,e,n){var i=Math.max(1,t.getBandWidth()),o=n[1]-n[0];return{type:"Rect",shape:(e=[e-i/2,n[0]],n=[i,o],i=IS(t),{x:e[i=i||0],y:e[1-i],width:n[i],height:n[1-i]})}}};function IS(t){return"x"===t.dim?0:1}u(kS,CS=g),kS.type="axisPointer",kS.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}};var CS,DS=kS;function kS(){var t=null!==CS&&CS.apply(this,arguments)||this;return t.type=kS.type,t}var AS=Rr(),LS=E;function PS(t,e,n){var i,c,p;function o(t,h){c.on(t,function(e){n=p;var n,i,t,o,r,a,s,l={dispatchAction:u,pendings:i={showTip:[],hideTip:[]}};function u(t){var e=i[t.type];e?e.push(t):(t.dispatchAction=u,n.dispatchAction(t))}LS(AS(c).records,function(t){t&&h(t,e,l.dispatchAction)}),o=p,a=(t=l.pendings).showTip.length,s=t.hideTip.length,a?r=t.showTip[a-1]:s&&(r=t.hideTip[s-1]),r&&(r.dispatchAction=null,o.dispatchAction(r))})}b.node||(i=e.getZr(),AS(i).records||(AS(i).records={}),p=e,AS(c=i).initialized||(AS(c).initialized=!0,o("click",M(RS,"click")),o("mousemove",M(RS,"mousemove")),o("globalout",OS)),(AS(i).records[t]||(AS(i).records[t]={})).handler=n)}function OS(t,e,n){t.handler("leave",null,n)}function RS(t,e,n,i){e.handler(t,n,i)}function NS(t,e){b.node||(e=e.getZr(),(AS(e).records||{})[t]&&(AS(e).records[t]=null))}u(BS,ES=$g),BS.prototype.render=function(t,e,n){var e=e.getComponent("tooltip"),i=t.get("triggerOn")||e&&e.get("triggerOn")||"mousemove|click";PS("axisPointer",n,function(t,e,n){"none"!==i&&("leave"===t||0<=i.indexOf(t))&&n({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})})},BS.prototype.remove=function(t,e){NS("axisPointer",e)},BS.prototype.dispose=function(t,e){NS("axisPointer",e)},BS.type="axisPointer";var ES,zS=BS;function BS(){var t=null!==ES&&ES.apply(this,arguments)||this;return t.type=BS.type,t}function FS(t,e){var n,i,o,r,a=[],s=t.seriesIndex;return null==s||!(e=e.getSeriesByIndex(s))||null==(s=Or(n=e.getData(),t))||s<0||V(s)?{point:[]}:(i=n.getItemGraphicEl(s),o=e.coordinateSystem,e.getTooltipPosition?a=e.getTooltipPosition(s)||[]:o&&o.dataToPoint?a=t.isStacked?(e=o.getBaseAxis(),t=o.getOtherAxis(e).dim,e=e.dim,t="x"===t||"radius"===t?1:0,e=n.mapDimension(e),(r=[])[t]=n.get(e,s),r[1-t]=n.get(n.getCalculationInfo("stackResultDimension"),s),o.dataToPoint(r)||[]):o.dataToPoint(n.getValues(F(o.dimensions,function(t){return n.mapDimension(t)}),s))||[]:i&&((e=i.getBoundingRect().clone()).applyTransform(i.transform),a=[e.x+e.width/2,e.y+e.height/2]),{point:a,el:i})}var VS=Rr();function HS(t,e,n){var r,a,i,s,l,o,u,h,c,p,d,f,g,y,m=t.currTrigger,v=[t.x,t.y],_=t,x=t.dispatchAction||S(n.dispatchAction,n),w=e.getComponent("axisPointer").coordSysAxesInfo;if(w)return YS(v)&&(v=FS({seriesIndex:_.seriesIndex,dataIndex:_.dataIndex},e).point),r=YS(v),a=_.axesInfo,i=w.axesInfo,s="leave"===m||YS(v),l={},e={list:[],map:{}},u={showPointer:M(GS,o={}),showTooltip:M(XS,e)},E(w.coordSysMap,function(t,e){var o=r||t.containPoint(v);E(w.coordSysAxesInfo[e],function(t,e){var n=t.axis,i=function(t,e){for(var n=0;n<(t||[]).length;n++){var i=t[n];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}(a,t);s||!o||a&&!i||null!=(i=null!=(i=i&&i.value)||r?i:n.pointToData(v))&&WS(t,i,u,!1,l)})}),h={},E(i,function(n,t){var i=n.linkGroup;i&&!o[t]&&E(i.axesInfo,function(t,e){var e=o[e];t!==n&&e&&(e=e.value,i.mapper&&(e=n.axis.scale.parse(i.mapper(e,US(t),US(n)))),h[n.key]=e)})}),E(h,function(t,e){WS(i[e],t,u,!0,l)}),g=o,_=i,y=l.axesInfo=[],E(_,function(t,e){var n=t.axisPointerModel.option,e=g[e];e?(t.useHandle||(n.status="show"),n.value=e.value,n.seriesDataIndices=(e.payloadBatch||[]).slice()):t.useHandle||(n.status="hide"),"show"===n.status&&y.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:n.value})}),m=e,_=t,e=x,!YS(t=v)&&m.list.length?(x=((m.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{},e({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:_.tooltipOption,position:_.position,dataIndexInside:x.dataIndexInside,dataIndex:x.dataIndex,seriesIndex:x.seriesIndex,dataByCoordSys:m.list})):e({type:"hideTip"}),t=i,x=(_=n).getZr(),m="axisPointerLastHighlights",c=VS(x)[m]||{},p=VS(x)[m]={},E(t,function(t,e){var n=t.axisPointerModel.option;"show"===n.status&&t.triggerEmphasis&&E(n.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;p[e]=t})}),d=[],f=[],E(c,function(t,e){p[e]||f.push(t)}),E(p,function(t,e){c[e]||d.push(t)}),f.length&&_.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:f}),d.length&&_.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:d}),l}function WS(t,e,n,i,o){var r,a,s,l,u,h,c,p,d,f,g=t.axis;!g.scale.isBlank()&&g.containData(e)&&(t.involveSeries?(l=e,u=t.axis,h=u.dim,c=l,p=[],d=Number.MAX_VALUE,f=-1,E(t.seriesModels,function(e,t){var n,i=e.getData().mapDimensionsAll(h);if(e.getAxisTooltipData)var o=e.getAxisTooltipData(i,l,u),r=o.dataIndices,o=o.nestestValue;else{if(!(r=e.getData().indicesOfNearest(i[0],l,"category"===u.type?.5:null)).length)return;o=e.getData().get(i[0],r[0])}null!=o&&isFinite(o)&&(i=l-o,(n=Math.abs(i))<=d)&&((n<d||0<=i&&f<0)&&(d=n,f=i,c=o,p.length=0),E(r,function(t){p.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})}))}),s=(r={payloadBatch:p,snapToValue:c}).snapToValue,(a=r.payloadBatch)[0]&&null==o.seriesIndex&&P(o,a[0]),!i&&t.snap&&g.containData(s)&&null!=s&&(e=s),n.showPointer(t,e,a),n.showTooltip(t,r,s)):n.showPointer(t,e))}function GS(t,e,n,i){t[e.key]={value:n,payloadBatch:i}}function XS(t,e,n,i){var o,r,n=n.payloadBatch,a=e.axis,s=a.model,l=e.axisPointerModel;e.triggerTooltip&&n.length&&(o=mb(e=e.coordSys.model),(r=t.map[o])||(r=t.map[o]={coordSysId:e.id,coordSysIndex:e.componentIndex,coordSysType:e.type,coordSysMainType:e.mainType,dataByAxis:[]},t.list.push(r)),r.dataByAxis.push({axisDim:a.dim,axisIndex:s.componentIndex,axisType:s.type,axisId:s.id,value:i,valueLabelOpt:{precision:l.get(["label","precision"]),formatter:l.get(["label","formatter"])},seriesDataIndices:n.slice()}))}function US(t){var e=t.axis.model,n={},t=n.axisDim=t.axis.dim;return n.axisIndex=n[t+"AxisIndex"]=e.componentIndex,n.axisName=n[t+"AxisName"]=e.name,n.axisId=n[t+"AxisId"]=e.id,n}function YS(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function ZS(t){xb.registerAxisPointerClass("CartesianAxisPointer",bS),t.registerComponentModel(DS),t.registerComponentView(zS),t.registerPreprocessor(function(t){var e;t&&(t.axisPointer&&0!==t.axisPointer.length||(t.axisPointer={}),e=t.axisPointer.link)&&!V(e)&&(t.axisPointer.link=[e])}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=db(t,e)}),t.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},HS)}u(KS,qS=g),KS.type="tooltip",KS.dependencies=["axisPointer"],KS.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}};var qS,jS=KS;function KS(){var t=null!==qS&&qS.apply(this,arguments)||this;return t.type=KS.type,t}function $S(t){var e=t.get("confine");return null!=e?e:"richText"===t.get("renderMode")}function QS(t){if(b.domSupported)for(var e=document.documentElement.style,n=0,i=t.length;n<i;n++)if(t[n]in e)return t[n]}var JS=QS(["transform","webkitTransform","OTransform","MozTransform","msTransform"]);function tM(t,e){if(!t)return e;e=Cp(e,!0);var n=t.indexOf(e);return(t=-1===n?e:"-"+t.slice(0,n)+"-"+e).toLowerCase()}var eM=tM(QS(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),"transition"),nM=tM(JS,"transform"),iM="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(b.transform3dSupported?"will-change:transform;":"");function oM(t,e,n){var i,t=t.toFixed(0)+"px",e=e.toFixed(0)+"px";return b.transformSupported?(i="translate"+((i=b.transform3dSupported)?"3d":"")+"("+t+","+e+(i?",0":"")+")",n?"top:0;left:0;"+nM+":"+i+";":[["top",0],["left",0],[JS,i]]):n?"top:"+e+";left:"+t+";":[["top",e],["left",t]]}function rM(i,t,e){var n,o,r=[],a=i.get("transitionDuration"),s=i.get("backgroundColor"),l=i.get("shadowBlur"),u=i.get("shadowColor"),h=i.get("shadowOffsetX"),c=i.get("shadowOffsetY"),p=i.getModel("textStyle"),d=Eg(i,"html");return r.push("box-shadow:"+(h+"px "+c+"px "+l+"px "+u)),t&&a&&r.push((u="opacity"+(l=" "+(h=a)/2+"s "+(c="cubic-bezier(0.23,1,0.32,1)"))+",visibility"+l,e||(l=" "+h+"s "+c,u+=b.transformSupported?","+nM+l:",left"+l+",top"+l),eM+":"+u)),s&&r.push("background-color:"+s),E(["width","color","radius"],function(t){var e="border-"+t,n=Cp(e),n=i.get(n);null!=n&&r.push(e+":"+n+("color"===t?"":"px"))}),r.push((o=[],t=(n=p).get("fontSize"),(a=n.getTextColor())&&o.push("color:"+a),o.push("font:"+n.getFont()),t&&o.push("line-height:"+Math.round(3*t/2)+"px"),a=n.get("textShadowColor"),t=n.get("textShadowBlur")||0,e=n.get("textShadowOffsetX")||0,h=n.get("textShadowOffsetY")||0,a&&t&&o.push("text-shadow:"+e+"px "+h+"px "+t+"px "+a),E(["decoration","align"],function(t){var e=n.get(t);e&&o.push("text-"+t+":"+e)}),o.join(";"))),null!=d&&r.push("padding:"+Dp(d).join("px ")+"px"),r.join(";")+";"}function aM(t,e,n,i,o){var r,a,s=e&&e.painter;n?(r=s&&s.getViewportRoot())&&(a=t,n=n,de(pe,r,i,o,!0))&&de(a,n,pe[0],pe[1]):(t[0]=i,t[1]=o,(r=s&&s.getViewportRootOffset())&&(t[0]+=r.offsetLeft,t[1]+=r.offsetTop)),t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}lM.prototype.update=function(t){this._container||(i=this._api.getDom(),n="position",n=(e=(e=i).currentStyle||document.defaultView&&document.defaultView.getComputedStyle(e))?n?e[n]:e:null,"absolute"!==(e=i.style).position&&"absolute"!==n&&(e.position="relative"));var e,n,i=t.get("alwaysShowContent");i&&this._moveIfResized(),this._alwaysShowContent=i,this.el.className=t.get("className")||""},lM.prototype.show=function(t,e){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,i=n.style,o=this._styleCoord;n.innerHTML?i.cssText=iM+rM(t,!this._firstShow,this._longHide)+oM(o[0],o[1],!0)+"border-color:"+Rp(e)+";"+(t.get("extraCssText")||"")+";pointer-events:"+(this._enterable?"auto":"none"):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},lM.prototype.setContent=function(t,e,n,i,o){var r,a,s,l,u,h=this.el;if(null!=t){var c="";if(H(o)&&"item"===n.get("trigger")&&!$S(n)&&(n=n,i=i,c=H(o=o)&&"inside"!==o?(r=n.get("backgroundColor"),n=n.get("borderWidth"),i=Rp(i),o="left"===(o=o)?"right":"right"===o?"left":"top"===o?"bottom":"top",p=Math.max(1.5*Math.round(n),6),a="",s=nM+":",-1<C(["left","right"],o)?(a+="top:50%",s+="translateY(-50%) rotate("+(u="left"==o?-225:-45)+"deg)"):(a+="left:50%",s+="translateX(-50%) rotate("+(u="top"==o?225:45)+"deg)"),u=u*Math.PI/180,u=(l=p+n)*Math.abs(Math.cos(u))+l*Math.abs(Math.sin(u)),i=i+" solid "+n+"px;",'<div style="'+["position:absolute;width:"+p+"px;height:"+p+"px;z-index:-1;",(a+=";"+o+":-"+Math.round(100*((u-Math.SQRT2*n)/2+Math.SQRT2*n-(u-l)/2))/100+"px")+";"+s+";","border-bottom:"+i,"border-right:"+i,"background-color:"+r+";"].join("")+'"></div>'):""),H(t))h.innerHTML=t+c;else if(t){h.innerHTML="",V(t)||(t=[t]);for(var p,d=0;d<t.length;d++)ft(t[d])&&t[d].parentNode!==h&&h.appendChild(t[d]);c&&h.childNodes.length&&((p=document.createElement("div")).innerHTML=c,h.appendChild(p))}}else h.innerHTML=""},lM.prototype.setEnterable=function(t){this._enterable=t},lM.prototype.getSize=function(){var t=this.el;return[t.offsetWidth,t.offsetHeight]},lM.prototype.moveTo=function(t,e){var n,i=this._styleCoord;aM(i,this._zr,this._container,t,e),null!=i[0]&&null!=i[1]&&(n=this.el.style,E(oM(i[0],i[1]),function(t){n[t[0]]=t[1]}))},lM.prototype._moveIfResized=function(){var t=this._styleCoord[2],e=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),e*this._zr.getHeight())},lM.prototype.hide=function(){var t=this,e=this.el.style;e.visibility="hidden",e.opacity="0",b.transform3dSupported&&(e.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return t._longHide=!0},500)},lM.prototype.hideLater=function(t){!this._show||this._inContent&&this._enterable||this._alwaysShowContent||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(S(this.hide,this),t)):this.hide())},lM.prototype.isShow=function(){return this._show},lM.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var t=this.el.parentNode;t&&t.removeChild(this.el),this.el=this._container=null};var sM=lM;function lM(t,e){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,b.wxa)return null;var n=document.createElement("div"),i=(n.domBelongToZr=!0,this.el=n,this._zr=t.getZr()),e=e.appendTo,e=e&&(H(e)?document.querySelector(e):ft(e)?e:D(e)&&e(t.getDom())),o=(aM(this._styleCoord,i,e,t.getWidth()/2,t.getHeight()/2),(e||t.getDom()).appendChild(n),this._api=t,this._container=e,this);n.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},n.onmousemove=function(t){var e;t=t||window.event,o._enterable||(e=i.handler,Me(i.painter.getViewportRoot(),t,!0),e.dispatch("mousemove",t))},n.onmouseleave=function(){o._inContent=!1,o._enterable&&o._show&&o.hideLater(o._hideDelay)}}hM.prototype.update=function(t){t=t.get("alwaysShowContent");t&&this._moveIfResized(),this._alwaysShowContent=t},hM.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},hM.prototype.setContent=function(t,e,n,i,o){var r=this,a=(O(t)&&f(""),this.el&&this._zr.remove(this.el),n.getModel("textStyle")),s=(this.el=new Hs({style:{rich:e.richTextStyles,text:t,lineHeight:22,borderWidth:1,borderColor:i,textShadowColor:a.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:Eg(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),E(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(t){r.el.style[t]=n.get(t)}),E(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(t){r.el.style[t]=a.get(t)||0}),this._zr.add(this.el),this);this.el.on("mouseover",function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0}),this.el.on("mouseout",function(){s._enterable&&s._show&&s.hideLater(s._hideDelay),s._inContent=!1})},hM.prototype.setEnterable=function(t){this._enterable=t},hM.prototype.getSize=function(){var t=this.el,e=this.el.getBoundingRect(),t=pM(t.style);return[e.width+t.left+t.right,e.height+t.top+t.bottom]},hM.prototype.moveTo=function(t,e){var n,i,o=this.el;o&&(dM(i=this._styleCoord,this._zr,t,e),t=i[0],e=i[1],n=cM((i=o.style).borderWidth||0),i=pM(i),o.x=t+n+i.left,o.y=e+n+i.top,o.markRedraw())},hM.prototype._moveIfResized=function(){var t=this._styleCoord[2],e=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),e*this._zr.getHeight())},hM.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},hM.prototype.hideLater=function(t){!this._show||this._inContent&&this._enterable||this._alwaysShowContent||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(S(this.hide,this),t)):this.hide())},hM.prototype.isShow=function(){return this._show},hM.prototype.dispose=function(){this._zr.remove(this.el)};var uM=hM;function hM(t){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=t.getZr(),dM(this._styleCoord,this._zr,t.getWidth()/2,t.getHeight()/2)}function cM(t){return Math.max(0,t)}function pM(t){var e=cM(t.shadowBlur||0),n=cM(t.shadowOffsetX||0),t=cM(t.shadowOffsetY||0);return{left:cM(e-n),right:cM(e+n),top:cM(e-t),bottom:cM(e+t)}}function dM(t,e,n,i){t[0]=n,t[1]=i,t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}var fM,gM=new Es({shape:{x:-1,y:-1,width:2,height:2}}),yM=(u(mM,fM=$g),mM.prototype.init=function(t,e){var n;!b.node&&e.getDom()&&(t=t.getComponent("tooltip"),n=this._renderMode="auto"===(n=t.get("renderMode"))?b.domSupported?"html":"richText":n||"html",this._tooltipContent="richText"===n?new uM(e):new sM(e,{appendTo:t.get("appendToBody",!0)?"body":t.get("appendTo",!0)}))},mM.prototype.render=function(t,e,n){!b.node&&n.getDom()&&(this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=n,(e=this._tooltipContent).update(t),e.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow(),"richText"!==this._renderMode&&t.get("transitionDuration")?dy(this,"_updatePosition",50,"fixRate"):fy(this,"_updatePosition"))},mM.prototype._initGlobalListener=function(){var i=this._tooltipModel.get("triggerOn");PS("itemTooltip",this._api,S(function(t,e,n){"none"!==i&&(0<=i.indexOf(t)?this._tryShow(e,n):"leave"===t&&this._hide(n))},this))},mM.prototype._keepShow=function(){var t,e=this._tooltipModel,n=this._ecModel,i=this._api,o=e.get("triggerOn");null!=this._lastX&&null!=this._lastY&&"none"!==o&&"click"!==o&&(t=this,clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){i.isDisposed()||t.manuallyShowTip(e,n,i,{x:t._lastX,y:t._lastY,dataByCoordSys:t._lastDataByCoordSys})}))},mM.prototype.manuallyShowTip=function(t,e,n,i){var o,r,a,s;i.from!==this.uid&&!b.node&&n.getDom()&&(o=_M(i,n),this._ticket="",s=i.dataByCoordSys,(r=function(n,t,e){var i=zr(n).queryOptionMap,o=i.keys()[0];if(o&&"series"!==o){var r,t=Vr(t,o,i.get(o),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(t)return e.getViewOfComponentModel(t).group.traverse(function(t){var e=k(t).tooltipConfig;if(e&&e.name===n.name)return r=t,!0}),r?{componentMainType:o,componentIndex:t.componentIndex,el:r}:void 0}}(i,e,n))?((a=r.el.getBoundingRect().clone()).applyTransform(r.el.transform),this._tryShow({offsetX:a.x+a.width/2,offsetY:a.y+a.height/2,target:r.el,position:i.position,positionDefault:"bottom"},o)):i.tooltip&&null!=i.x&&null!=i.y?((a=gM).x=i.x,a.y=i.y,a.update(),k(a).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:a},o)):s?this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:s,tooltipOption:i.tooltipOption},o):null!=i.seriesIndex?this._manuallyAxisShowTip(t,e,n,i)||(a=(r=FS(i,e)).point[0],s=r.point[1],null!=a&&null!=s&&this._tryShow({offsetX:a,offsetY:s,target:r.el,position:i.position,positionDefault:"bottom"},o)):null!=i.x&&null!=i.y&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},o)))},mM.prototype.manuallyHideTip=function(t,e,n,i){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(_M(i,n))},mM.prototype._manuallyAxisShowTip=function(t,e,n,i){var o=i.seriesIndex,r=i.dataIndex,a=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=o&&null!=r&&null!=a){a=e.getSeriesByIndex(o);if(a&&"axis"===vM([a.getData().getItemModel(r),a,(a.coordinateSystem||{}).model],this._tooltipModel).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:r,position:i.position}),!0}},mM.prototype._tryShow=function(t,e){var n,i,o,r=t.target;this._tooltipModel&&(this._lastX=t.offsetX,this._lastY=t.offsetY,(n=t.dataByCoordSys)&&n.length?this._showAxisTooltip(n,t):r?"legend"!==k(r).ssrType&&(Zy(r,function(t){return null!=k(t).dataIndex?(i=t,1):null!=k(t).tooltipConfig&&(o=t,1)},!(this._lastDataByCoordSys=null)),i?this._showSeriesItemTooltip(t,i,e):o?this._showComponentItemTooltip(t,o,e):this._hide(e)):(this._lastDataByCoordSys=null,this._hide(e)))},mM.prototype._showOrMove=function(t,e){t=t.get("showDelay");e=S(e,this),clearTimeout(this._showTimout),0<t?this._showTimout=setTimeout(e,t):e()},mM.prototype._showAxisTooltip=function(t,e){var u=this._ecModel,h=this._tooltipModel,n=[e.offsetX,e.offsetY],i=vM([e.tooltipOption],h),c=this._renderMode,p=[],d=Dg("section",{blocks:[],noHeader:!0}),f=[],g=new zg,o=(E(t,function(t){E(t.dataByAxis,function(o){var r,a,s=u.getComponent(o.axisDim+"Axis",o.axisIndex),l=o.value;s&&null!=l&&(r=_S(l,s.axis,u,o.seriesDataIndices,o.valueLabelOpt),a=Dg("section",{header:r,noHeader:!Mt(r),sortBlocks:!0,blocks:[]}),d.blocks.push(a),E(o.seriesDataIndices,function(t){var e,n=u.getSeriesByIndex(t.seriesIndex),t=t.dataIndexInside,i=n.getDataParams(t);i.dataIndex<0||(i.axisDim=o.axisDim,i.axisIndex=o.axisIndex,i.axisType=o.axisType,i.axisId=o.axisId,i.axisValue=E_(s.axis,{value:l}),i.axisValueLabel=r,i.marker=g.makeTooltipMarker("item",Rp(i.color),c),(e=(t=Lf(n.formatTooltip(t,!0,null))).frag)&&(n=vM([n],h).get("valueFormatter"),a.blocks.push(n?P({valueFormatter:n},e):e)),t.text&&f.push(t.text),p.push(i))}))})}),d.blocks.reverse(),f.reverse(),e.position),e=i.get("order"),e=Og(d,g,c,e,u.get("useUTC"),i.get("textStyle")),e=(e&&f.unshift(e),"richText"===c?"\n\n":"<br/>"),r=f.join(e);this._showOrMove(i,function(){this._updateContentNotChangedOnAxis(t,p)?this._updatePosition(i,o,n[0],n[1],this._tooltipContent,p):this._showTooltipContent(i,r,p,Math.random()+"",n[0],n[1],o,null,g)})},mM.prototype._showSeriesItemTooltip=function(t,e,n){var i,o,r,a,s,l=this._ecModel,e=k(e),u=e.seriesIndex,h=l.getSeriesByIndex(u),c=e.dataModel||h,p=e.dataIndex,e=e.dataType,d=c.getData(e),f=this._renderMode,g=t.positionDefault,y=vM([d.getItemModel(p),c,h&&(h.coordinateSystem||{}).model],this._tooltipModel,g?{position:g}:null),h=y.get("trigger");null!=h&&"item"!==h||(i=c.getDataParams(p,e),o=new zg,i.marker=o.makeTooltipMarker("item",Rp(i.color),f),g=Lf(c.formatTooltip(p,!1,e)),h=y.get("order"),e=y.get("valueFormatter"),r=g.frag,a=r?Og(e?P({valueFormatter:e},r):r,o,f,h,l.get("useUTC"),y.get("textStyle")):g.text,s="item_"+c.name+"_"+p,this._showOrMove(y,function(){this._showTooltipContent(y,a,i,s,t.offsetX,t.offsetY,t.position,t.target,o)}),n({type:"showTip",dataIndexInside:p,dataIndex:d.getRawIndex(p),seriesIndex:u,from:this.uid}))},mM.prototype._showComponentItemTooltip=function(e,n,t){var i=k(n),o=i.tooltipConfig.option||{},r=[o=H(o)?{content:o,formatter:o}:o],i=this._ecModel.getComponent(i.componentMainType,i.componentIndex),i=(i&&r.push(i),r.push({formatter:o.content}),e.positionDefault),a=vM(r,this._tooltipModel,i?{position:i}:null),s=a.get("content"),l=Math.random()+"",u=new zg;this._showOrMove(a,function(){var t=y(a.get("formatterParams")||{});this._showTooltipContent(a,s,t,l,e.offsetX,e.offsetY,e.position,n,u)}),t({type:"showTip",from:this.uid})},mM.prototype._showTooltipContent=function(n,t,i,e,o,r,a,s,l){var u,h,c,p,d;this._ticket="",n.get("showContent")&&n.get("show")&&((u=this._tooltipContent).setEnterable(n.get("enterable")),h=n.get("formatter"),a=a||n.get("position"),t=t,c=this._getNearestPoint([o,r],i,n.get("trigger"),n.get("borderColor")).color,h&&(t=H(h)?(p=n.ecModel.get("useUTC"),t=h,Pp(t=(d=V(i)?i[0]:i)&&d.axisType&&0<=d.axisType.indexOf("time")?hp(d.axisValue,t,p):t,i,!0)):D(h)?(d=S(function(t,e){t===this._ticket&&(u.setContent(e,l,n,c,a),this._updatePosition(n,a,o,r,u,i,s))},this),this._ticket=e,h(i,e,d)):h),u.setContent(t,l,n,c,a),u.show(n,c),this._updatePosition(n,a,o,r,u,i,s))},mM.prototype._getNearestPoint=function(t,e,n,i){return"axis"===n||V(e)?{color:i||("html"===this._renderMode?"#fff":"none")}:V(e)?void 0:{color:i||e.color||e.borderColor}},mM.prototype._updatePosition=function(t,e,n,i,o,r,a){var s,l,u,h,c=this._api.getWidth(),p=this._api.getHeight(),d=(e=e||t.get("position"),o.getSize()),f=t.get("align"),g=t.get("verticalAlign"),y=a&&a.getBoundingRect().clone();a&&y.applyTransform(a.transform),V(e=D(e)?e([n,i],r,o.el,y,{viewSize:[c,p],contentSize:d.slice()}):e)?(n=er(e[0],c),i=er(e[1],p)):O(e)?((r=e).width=d[0],r.height=d[1],n=(r=Vp(r,{width:c,height:p})).x,i=r.y,g=f=null):i=(n=(s=H(e)&&a?function(t,e,n,i){var o=n[0],r=n[1],a=Math.ceil(Math.SQRT2*i)+8,s=0,l=0,u=e.width,h=e.height;switch(t){case"inside":s=e.x+u/2-o/2,l=e.y+h/2-r/2;break;case"top":s=e.x+u/2-o/2,l=e.y-r-a;break;case"bottom":s=e.x+u/2-o/2,l=e.y+h+a;break;case"left":s=e.x-o-a,l=e.y+h/2-r/2;break;case"right":s=e.x+u+a,l=e.y+h/2-r/2}return[s,l]}(e,y,d,t.get("borderWidth")):(r=n,a=i,e=c,y=p,l=f?null:20,u=g?null:20,h=(h=o).getSize(),s=h[0],h=h[1],null!=l&&(e<r+s+l+2?r-=s+l:r+=l),null!=u&&(y<a+h+u?a-=h+u:a+=u),[r,a]))[0],s[1]),f&&(n-=xM(f)?d[0]/2:"right"===f?d[0]:0),g&&(i-=xM(g)?d[1]/2:"bottom"===g?d[1]:0),$S(t)&&(e=n,l=i,y=c,h=p,u=(u=o).getSize(),r=u[0],u=u[1],e=Math.min(e+r,y)-r,l=Math.min(l+u,h)-u,n=(s=[e=Math.max(e,0),l=Math.max(l,0)])[0],i=s[1]),o.moveTo(n,i)},mM.prototype._updateContentNotChangedOnAxis=function(n,r){var t=this._lastDataByCoordSys,a=this._cbParamsList,s=!!t&&t.length===n.length;return s&&E(t,function(t,e){var t=t.dataByAxis||[],o=(n[e]||{}).dataByAxis||[];(s=s&&t.length===o.length)&&E(t,function(t,e){var e=o[e]||{},n=t.seriesDataIndices||[],i=e.seriesDataIndices||[];(s=s&&t.value===e.value&&t.axisType===e.axisType&&t.axisId===e.axisId&&n.length===i.length)&&E(n,function(t,e){e=i[e];s=s&&t.seriesIndex===e.seriesIndex&&t.dataIndex===e.dataIndex}),a&&E(t.seriesDataIndices,function(t){var t=t.seriesIndex,e=r[t],t=a[t];e&&t&&t.data!==e.data&&(s=!1)})})}),this._lastDataByCoordSys=n,this._cbParamsList=r,!!s},mM.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},mM.prototype.dispose=function(t,e){!b.node&&e.getDom()&&(fy(this,"_updatePosition"),this._tooltipContent.dispose(),NS("itemTooltip",e))},mM.type="tooltip",mM);function mM(){var t=null!==fM&&fM.apply(this,arguments)||this;return t.type=mM.type,t}function vM(t,e,n){for(var i=e.ecModel,o=n?(o=new Hc(n,i,i),new Hc(e.option,o,i)):e,r=t.length-1;0<=r;r--){var a=t[r];a&&(a=H(a=a instanceof Hc?a.get("tooltip",!0):a)?{formatter:a}:a)&&(o=new Hc(a,o,i))}return o}function _M(t,e){return t.dispatchAction||S(e.dispatchAction,e)}function xM(t){return"center"===t||"middle"===t}function wM(t){Sr(t,"label",["show"])}U_(function(t){U_(ZS),t.registerComponentModel(jS),t.registerComponentView(yM),t.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},zt),t.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},zt)});var bM,SM=Rr(),MM=(u(TM,bM=g),TM.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n),this._mergeOption(t,n,!1,!0)},TM.prototype.isAnimationEnabled=function(){var t;return!b.node&&(t=this.__hostSeries,this.getShallow("animation"))&&t&&t.isAnimationEnabled()},TM.prototype.mergeOption=function(t,e){this._mergeOption(t,e,!1,!1)},TM.prototype._mergeOption=function(t,i,e,o){var r=this.mainType;e||i.eachSeries(function(t){var e=t.get(this.mainType,!0),n=SM(t)[r];e&&e.data?(n?n._mergeOption(e,i,!0):(o&&wM(e),E(e.data,function(t){t instanceof Array?(wM(t[0]),wM(t[1])):wM(t)}),P(n=this.createMarkerModelFromSeries(e,this,i),{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),n.__hostSeries=t),SM(t)[r]=n):SM(t)[r]=null},this)},TM.prototype.formatTooltip=function(t,e,n){var i=this.getData(),o=this.getRawValue(t),i=i.getName(t);return Dg("section",{header:this.name,blocks:[Dg("nameValue",{name:i,value:o,noName:!i,noValue:null==o})]})},TM.prototype.getData=function(){return this._data},TM.prototype.setData=function(t){this._data=t},TM.getMarkerModelFromSeries=function(t,e){return SM(t)[e]},TM.type="marker",TM.dependencies=["series","grid","polar","geo"],TM);function TM(){var t=null!==bM&&bM.apply(this,arguments)||this;return t.type=TM.type,t.createdBySelf=!1,t}at(MM,Bc.prototype);u(DM,IM=MM),DM.prototype.createMarkerModelFromSeries=function(t,e,n){return new DM(t,e,n)},DM.type="markLine",DM.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"};var IM,CM=DM;function DM(){var t=null!==IM&&IM.apply(this,arguments)||this;return t.type=DM.type,t}function kM(t,e,n,i,o,r){var a=[],s=Ov(e,i)?e.getCalculationInfo("stackResultDimension"):i,t=RM(e,s,t),t=e.indicesOfNearest(s,t)[0],o=(a[o]=e.get(n,t),a[r]=e.get(s,t),e.get(i,t)),n=or(e.get(i,t));return 0<=(n=Math.min(n,20))&&(a[r]=+a[r].toFixed(n)),[a,o]}var AM={min:M(kM,"min"),max:M(kM,"max"),average:M(kM,"average"),median:M(kM,"median")};function LM(t,e){if(e){var n=t.getData(),i=t.coordinateSystem,o=i&&i.dimensions;if(s=e,(isNaN(parseFloat(s.x))||isNaN(parseFloat(s.y)))&&!V(e.coord)&&V(o)&&(s=PM(e,n,i,t),(e=y(e)).type&&AM[e.type]&&s.baseAxis&&s.valueAxis?(i=C(o,s.baseAxis.dim),t=C(o,s.valueAxis.dim),s=AM[e.type](n,s.baseDataDim,s.valueDataDim,i,t),e.coord=s[0],e.value=s[1]):e.coord=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis]),null!=e.coord&&V(o))for(var r=e.coord,a=0;a<2;a++)AM[r[a]]&&(r[a]=RM(n,n.mapDimension(o[a]),r[a]));else e.coord=[];return e}var s}function PM(t,e,n,i){var o={};return null!=t.valueIndex||null!=t.valueDim?(o.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,o.valueAxis=n.getAxis(function(t,e){t=t.getData().getDimensionInfo(e);return t&&t.coordDim}(i,o.valueDataDim)),o.baseAxis=n.getOtherAxis(o.valueAxis),o.baseDataDim=e.mapDimension(o.baseAxis.dim)):(o.baseAxis=i.getBaseAxis(),o.valueAxis=n.getOtherAxis(o.baseAxis),o.baseDataDim=e.mapDimension(o.baseAxis.dim),o.valueDataDim=e.mapDimension(o.valueAxis.dim)),o}function OM(t,e){return!(t&&t.containData&&e.coord&&(n=e,isNaN(parseFloat(n.x)))&&isNaN(parseFloat(n.y)))||t.containData(e.coord);var n}function RM(t,e,n){var i,o;return"average"===n?(o=i=0,t.each(e,function(t,e){isNaN(t)||(i+=t,o++)}),i/o):"median"===n?t.getMedian(e):t.getDataExtent(e)["max"===n?1:0]}function NM(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}var EM,zM=nh.prototype,BM=lh.prototype;function FM(){return null!==EM&&EM.apply(this,arguments)||this}function VM(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}u(FM,EM=NM);u(GM,HM=_s),GM.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},GM.prototype.getDefaultShape=function(){return new NM},GM.prototype.buildPath=function(t,e){(VM(e)?zM:BM).buildPath.call(this,t,e)},GM.prototype.pointAt=function(t){return(VM(this.shape)?zM:BM).pointAt.call(this,t)},GM.prototype.tangentAt=function(t){var e=this.shape,e=VM(e)?[e.x2-e.x1,e.y2-e.y1]:BM.tangentAt.call(this,t);return Zt(e,e)};var HM,WM=GM;function GM(t){t=HM.call(this,t)||this;return t.type="ec-line",t}var XM=["fromSymbol","toSymbol"];function UM(t){return"_"+t+"Type"}function YM(t,e,n){var i,o,r,a=e.getItemVisual(n,t);return a&&"none"!==a?(i=e.getItemVisual(n,t+"Size"),o=e.getItemVisual(n,t+"Rotate"),r=e.getItemVisual(n,t+"Offset"),e=e.getItemVisual(n,t+"KeepAspect"),a+(n=sm(i))+lm(r||0,n)+(o||"")+(e||"")):a}function ZM(t,e,n){var i,o,r,a=e.getItemVisual(n,t);if(a&&"none"!==a)return r=e.getItemVisual(n,t+"Size"),i=e.getItemVisual(n,t+"Rotate"),o=e.getItemVisual(n,t+"Offset"),e=e.getItemVisual(n,t+"KeepAspect"),o=lm(o||0,n=sm(r)),(r=am(a,-n[0]/2+o[0],-n[1]/2+o[1],n[0],n[1],null,e)).__specifiedRotation=null==i||isNaN(i)?void 0:+i*Math.PI/180||0,r.name=t,r}function qM(t,e){t.x1=e[0][0],t.y1=e[0][1],t.x2=e[1][0],t.y2=e[1][1],t.percent=1;e=e[2];e?(t.cpx1=e[0],t.cpy1=e[1]):(t.cpx1=NaN,t.cpy1=NaN)}u($M,jM=Wo),$M.prototype._createLine=function(n,i,t){var e,o=n.hostModel,r=(r=n.getItemLayout(i),qM((e=new WM({name:"line",subPixelOptimize:!0})).shape,r),e);r.shape.percent=0,Eh(r,{shape:{percent:1}},o,i),this.add(r),E(XM,function(t){var e=ZM(t,n,i);this.add(e),this[UM(t)]=YM(t,n,i)},this),this._updateCommonStl(n,i,t)},$M.prototype.updateData=function(i,o,t){var e=i.hostModel,n=this.childOfName("line"),r=i.getItemLayout(o),a={shape:{}};qM(a.shape,r),Nh(n,a,e,o),E(XM,function(t){var e=YM(t,i,o),n=UM(t);this[n]!==e&&(this.remove(this.childOfName(t)),t=ZM(t,i,o),this.add(t)),this[n]=e},this),this._updateCommonStl(i,o,t)},$M.prototype.getLinePath=function(){return this.childAt(0)},$M.prototype._updateCommonStl=function(n,t,e){var i=n.hostModel,r=this.childOfName("line"),o=e&&e.emphasisLineStyle,a=e&&e.blurLineStyle,s=e&&e.selectLineStyle,l=e&&e.labelStatesModels,u=e&&e.emphasisDisabled,h=e&&e.focus,c=e&&e.blurScope,p=(e&&!n.hasItemOption||(o=(f=(e=n.getItemModel(t)).getModel("emphasis")).getModel("lineStyle").getLineStyle(),a=e.getModel(["blur","lineStyle"]).getLineStyle(),s=e.getModel(["select","lineStyle"]).getLineStyle(),u=f.get("disabled"),h=f.get("focus"),c=f.get("blurScope"),l=xc(e)),n.getItemVisual(t,"style")),d=p.stroke,f=(r.useStyle(p),r.style.fill=null,r.style.strokeNoScale=!0,r.ensureState("emphasis").style=o,r.ensureState("blur").style=a,r.ensureState("select").style=s,E(XM,function(t){var e=this.childOfName(t);if(e){e.setColor(d),e.style.opacity=p.opacity;for(var n=0;n<al.length;n++){var i=al[n],o=r.getState(i);o&&(o=o.style||{},i=(i=e.ensureState(i)).style||(i.style={}),null!=o.stroke&&(i[e.__isEmptyBrush?"stroke":"fill"]=o.stroke),null!=o.opacity)&&(i.opacity=o.opacity)}e.markRedraw()}},this),i.getRawValue(t)),e=(_c(this,l,{labelDataIndex:t,labelFetcher:{getFormattedLabel:function(t,e){return i.getFormattedLabel(t,e,n.dataType)}},inheritColor:d||"#000",defaultOpacity:p.opacity,defaultText:(null==f?n.getName(t):isFinite(f)?nr(f):f)+""}),this.getTextContent());e&&(o=l.normal,e.__align=e.style.align,e.__verticalAlign=e.style.verticalAlign,e.__position=o.get("position")||"middle",V(a=o.get("distance"))||(a=[a,a]),e.__labelDistance=a),this.setTextConfig({position:null,local:!0,inside:!1}),Wl(this,h,c,u)},$M.prototype.highlight=function(){kl(this)},$M.prototype.downplay=function(){Al(this)},$M.prototype.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},$M.prototype.setLinePoints=function(t){var e=this.childOfName("line");qM(e.shape,t),e.dirty()},$M.prototype.beforeUpdate=function(){var t=this.childOfName("fromSymbol"),e=this.childOfName("toSymbol"),n=this.getTextContent();if(t||e||n&&!n.ignore){for(var i=1,o=this.parent;o;)o.scaleX&&(i/=o.scaleX),o=o.parent;var r=this.childOfName("line");if(this.__dirty||r.__dirty){var a=r.shape.percent,s=r.pointAt(0),l=r.pointAt(a),u=Gt([],l,s);if(Zt(u,u),t&&(t.setPosition(s),v(t,0),t.scaleX=t.scaleY=i*a,t.markRedraw()),e&&(e.setPosition(l),v(e,1),e.scaleX=e.scaleY=i*a,e.markRedraw()),n&&!n.ignore){n.x=n.y=0;var h=void(n.originX=n.originY=0),c=void 0,t=n.__labelDistance,p=t[0]*i,d=t[1]*i,e=a/2,f=r.tangentAt(e),t=[f[1],-f[0]],g=r.pointAt(e),y=(0<t[1]&&(t[0]=-t[0],t[1]=-t[1]),f[0]<0?-1:1),m=("start"!==n.__position&&"end"!==n.__position&&(a=-Math.atan2(f[1],f[0]),l[0]<s[0]&&(a=Math.PI+a),n.rotation=a),void 0);switch(n.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":m=-d,c="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":m=d,c="top";break;default:m=0,c="middle"}switch(n.__position){case"end":n.x=u[0]*p+l[0],n.y=u[1]*d+l[1],h=.8<u[0]?"left":u[0]<-.8?"right":"center",c=.8<u[1]?"top":u[1]<-.8?"bottom":"middle";break;case"start":n.x=-u[0]*p+s[0],n.y=-u[1]*d+s[1],h=.8<u[0]?"right":u[0]<-.8?"left":"center",c=.8<u[1]?"bottom":u[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":n.x=p*y+s[0],n.y=s[1]+m,h=f[0]<0?"right":"left",n.originX=-p*y,n.originY=-m;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":n.x=g[0],n.y=g[1]+m,h="center",n.originY=-m;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":n.x=-p*y+l[0],n.y=l[1]+m,h=0<=f[0]?"right":"left",n.originX=p*y,n.originY=-m}n.scaleX=n.scaleY=i,n.setStyle({verticalAlign:n.__verticalAlign||c,align:n.__align||h})}}}function v(t,e){var n,i=t.__specifiedRotation;null==i?(n=r.tangentAt(e),t.attr("rotation",(1===e?-1:1)*Math.PI/2-Math.atan2(n[1],n[0]))):t.attr("rotation",i)}};var jM,KM=$M;function $M(t,e,n){var i=jM.call(this)||this;return i._createLine(t,e,n),i}JM.prototype.updateData=function(n){var i=this,e=(this._progressiveEls=null,this.group),o=this._lineData,r=(this._lineData=n,o||e.removeAll(),tT(n));n.diff(o).add(function(t){i._doAdd(n,t,r)}).update(function(t,e){i._doUpdate(o,n,e,t,r)}).remove(function(t){e.remove(o.getItemGraphicEl(t))}).execute()},JM.prototype.updateLayout=function(){var n=this._lineData;n&&n.eachItemGraphicEl(function(t,e){t.updateLayout(n,e)},this)},JM.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=tT(t),this._lineData=null,this.group.removeAll()},JM.prototype.incrementalUpdate=function(t,e){function n(t){var e;t.isGroup||(e=t).animators&&0<e.animators.length||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[];for(var i,o=t.start;o<t.end;o++)nT(e.getItemLayout(o))&&((i=new this._LineCtor(e,o,this._seriesScope)).traverse(n),this.group.add(i),e.setItemGraphicEl(o,i),this._progressiveEls.push(i))},JM.prototype.remove=function(){this.group.removeAll()},JM.prototype.eachRendered=function(t){fc(this._progressiveEls||this.group,t)},JM.prototype._doAdd=function(t,e,n){nT(t.getItemLayout(e))&&(n=new this._LineCtor(t,e,n),t.setItemGraphicEl(e,n),this.group.add(n))},JM.prototype._doUpdate=function(t,e,n,i,o){t=t.getItemGraphicEl(n);nT(e.getItemLayout(i))?(t?t.updateData(e,i,o):t=new this._LineCtor(e,i,o),e.setItemGraphicEl(i,t),this.group.add(t)):this.group.remove(t)};var QM=JM;function JM(t){this.group=new Wo,this._LineCtor=t||KM}function tT(t){var t=t.hostModel,e=t.getModel("emphasis");return{lineStyle:t.getModel("lineStyle").getLineStyle(),emphasisLineStyle:e.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:t.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:t.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:e.get("disabled"),blurScope:e.get("blurScope"),focus:e.get("focus"),labelStatesModels:xc(t)}}function eT(t){return isNaN(t[0])||isNaN(t[1])}function nT(t){return t&&!eT(t[0])&&!eT(t[1])}var iT,oT=Rr(),mu=(u(rT,iT=$g),rT.prototype.init=function(){this.markerGroupMap=N()},rT.prototype.render=function(t,n,i){var o=this,e=this.markerGroupMap;e.each(function(t){oT(t).keep=!1}),n.eachSeries(function(t){var e=MM.getMarkerModelFromSeries(t,o.type);e&&o.renderSeries(t,e,n,i)}),e.each(function(t){oT(t).keep||o.group.remove(t.group)})},rT.prototype.markKeep=function(t){oT(t).keep=!0},rT.prototype.toggleBlurSeries=function(t,e){var n=this;E(t,function(t){t=MM.getMarkerModelFromSeries(t,n.type);t&&t.getData().eachItemGraphicEl(function(t){t&&(e?Ll:Pl)(t)})})},rT.type="marker",rT);function rT(){var t=null!==iT&&iT.apply(this,arguments)||this;return t.type=rT.type,t}function aT(t,e,n,i){var o,r,a,s,l=t.getData();return(e=[LM(t,(n=V(i)?i:"min"===(o=i.type)||"max"===o||"average"===o||"median"===o||null!=i.xAxis||null!=i.yAxis?(r=s=void 0,r=null!=i.yAxis||null!=i.xAxis?(s=e.getAxis(null!=i.yAxis?"y":"x"),_t(i.yAxis,i.xAxis)):(s=(e=PM(i,l,e,t)).valueAxis,RM(l,Rv(l,e.valueDataDim),o)),e=1-(l="x"===s.dim?0:1),s={coord:[]},(a=y(i)).type=null,a.coord=[],a.coord[e]=-1/0,s.coord[e]=1/0,0<=(e=n.get("precision"))&&W(r)&&(r=+r.toFixed(Math.min(e,20))),a.coord[l]=s.coord[l]=r,[a,s,{type:o,valueIndex:i.valueIndex,value:r}]):[])[0]),LM(t,n[1]),P({},n[2])])[2].type=e[2].type||null,d(e[2],e[0]),d(e[2],e[1]),e}var sT=Rr();function lT(t){return!isNaN(t)&&!isFinite(t)}function uT(t,e,n,i){var o=1-t,r=i.dimensions[t];return lT(e[o])&&lT(n[o])&&e[t]===n[t]&&i.getAxis(r).containData(e[t])}function hT(t,e){if("cartesian2d"===t.type){var n=e[0].coord,i=e[1].coord;if(n&&i&&(uT(1,n,i,t)||uT(0,n,i,t)))return!0}return OM(t,e[0])&&OM(t,e[1])}function cT(t,e,n,i,o){var r,a,s=i.coordinateSystem,l=t.getItemModel(e),u=er(l.get("x"),o.getWidth()),l=er(l.get("y"),o.getHeight());isNaN(u)||isNaN(l)?(r=i.getMarkerPosition?i.getMarkerPosition(t.getValues(t.dimensions,e)):(a=s.dimensions,o=t.get(a[0],e),i=t.get(a[1],e),s.dataToPoint([o,i])),Ux(s,"cartesian2d")&&(o=s.getAxis("x"),i=s.getAxis("y"),a=s.dimensions,lT(t.get(a[0],e))?r[0]=o.toGlobalCoord(o.getExtent()[n?0:1]):lT(t.get(a[1],e))&&(r[1]=i.toGlobalCoord(i.getExtent()[n?0:1]))),isNaN(u)||(r[0]=u),isNaN(l)||(r[1]=l)):r=[u,l],t.setItemLayout(e,r)}u(fT,pT=mu),fT.prototype.updateTransform=function(t,e,r){e.eachSeries(function(e){var n,i,o,t=MM.getMarkerModelFromSeries(e,"markLine");t&&(n=t.getData(),i=sT(t).from,o=sT(t).to,i.each(function(t){cT(i,t,!0,e,r),cT(o,t,!1,e,r)}),n.each(function(t){n.setItemLayout(t,[i.getItemLayout(t),o.getItemLayout(t)])}),this.markerGroupMap.get(e.id).updateLayout())},this)},fT.prototype.renderSeries=function(r,e,t,a){var n,i,o,s,l=r.coordinateSystem,u=r.id,h=r.getData(),c=this.markerGroupMap,c=c.get(u)||c.set(u,new QM),p=(this.group.add(c.group),n=r,u=e,p=(l=l)?F(l&&l.dimensions,function(t){return P(P({},n.getData().getDimensionInfo(n.getData().mapDimension(t))||{}),{name:t,ordinalMeta:null})}):[{name:"value",type:"float"}],i=new Cv(p,u),o=new Cv(p,u),s=new Cv([],u),u=F(u.get("data"),M(aT,n,l,u)),l&&(u=ut(u,M(hT,l))),l=function(t,o){return t?function(t,e,n,i){return Xf(i<2?t.coord&&t.coord[i]:t.value,o[i])}:function(t,e,n,i){return Xf(t.value,o[i])}}(!!l,p),i.initData(F(u,function(t){return t[0]}),null,l),o.initData(F(u,function(t){return t[1]}),null,l),s.initData(F(u,function(t){return t[2]})),s.hasItemOption=!0,{from:i,to:o,line:s}),d=p.from,f=p.to,g=p.line,y=(sT(e).from=d,sT(e).to=f,e.setData(g),e.get("symbol")),m=e.get("symbolSize"),v=e.get("symbolRotate"),_=e.get("symbolOffset");function x(t,e,n){var i=t.getItemModel(e),o=(cT(t,e,n,r,a),i.getModel("itemStyle").getItemStyle());null==o.fill&&(o.fill=Xy(h,"color")),t.setItemVisual(e,{symbolKeepAspect:i.get("symbolKeepAspect"),symbolOffset:R(i.get("symbolOffset",!0),_[n?0:1]),symbolRotate:R(i.get("symbolRotate",!0),v[n?0:1]),symbolSize:R(i.get("symbolSize"),m[n?0:1]),symbol:R(i.get("symbol",!0),y[n?0:1]),style:o})}V(y)||(y=[y,y]),V(m)||(m=[m,m]),V(v)||(v=[v,v]),V(_)||(_=[_,_]),p.from.each(function(t){x(d,t,!0),x(f,t,!1)}),g.each(function(t){var e=g.getItemModel(t).getModel("lineStyle").getLineStyle();g.setItemLayout(t,[d.getItemLayout(t),f.getItemLayout(t)]),null==e.stroke&&(e.stroke=d.getItemVisual(t,"style").fill),g.setItemVisual(t,{fromSymbolKeepAspect:d.getItemVisual(t,"symbolKeepAspect"),fromSymbolOffset:d.getItemVisual(t,"symbolOffset"),fromSymbolRotate:d.getItemVisual(t,"symbolRotate"),fromSymbolSize:d.getItemVisual(t,"symbolSize"),fromSymbol:d.getItemVisual(t,"symbol"),toSymbolKeepAspect:f.getItemVisual(t,"symbolKeepAspect"),toSymbolOffset:f.getItemVisual(t,"symbolOffset"),toSymbolRotate:f.getItemVisual(t,"symbolRotate"),toSymbolSize:f.getItemVisual(t,"symbolSize"),toSymbol:f.getItemVisual(t,"symbol"),style:e})}),c.updateData(g),p.line.eachItemGraphicEl(function(t){k(t).dataModel=e,t.traverse(function(t){k(t).dataModel=e})}),this.markKeep(c),c.group.silent=e.get("silent")||r.get("silent")},fT.type="markLine";var pT,dT=fT;function fT(){var t=null!==pT&&pT.apply(this,arguments)||this;return t.type=fT.type,t}U_(function(t){t.registerComponentModel(CM),t.registerComponentView(dT),t.registerPreprocessor(function(t){!function(t,e){if(t)for(var n=V(t)?t:[t],i=0;i<n.length;i++)if(n[i]&&n[i][e])return 1}(t.series,"markLine")||(t.markLine=t.markLine||{})})});var gT=["x","y","radius","angle","single"],yT=["cartesian2d","polar","singleAxis"];function mT(t){return t+"Axis"}function vT(t,e){var i,o=N(),n=[],r=N();for(t.eachComponent({mainType:"dataZoom",query:e},function(t){r.get(t.uid)||s(t)});i=!1,t.eachComponent("dataZoom",a),i;);function a(t){var n;!r.get(t.uid)&&(n=!1,t.eachTargetAxis(function(t,e){t=o.get(t);t&&t[e]&&(n=!0)}),n)&&(s(t),i=!0)}function s(t){r.set(t.uid,!0),n.push(t),t.eachTargetAxis(function(t,e){(o.get(t)||o.set(t,[]))[e]=!0})}return n}function _T(t){var o=t.ecModel,r={infoList:[],infoMap:N()};return t.eachTargetAxis(function(t,e){var n,i,t=o.getComponent(mT(t),e);t&&(e=t.getCoordSysModel())&&(n=e.uid,(i=r.infoMap.get(n))||(r.infoList.push(i={model:e,axisModels:[]}),r.infoMap.set(n,i)),i.axisModels.push(t))}),r}ST.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)};var xT,wT=ST,gh=(u(bT,xT=g),bT.prototype.init=function(t,e,n){var i=MT(t);this.settledOption=i,this.mergeDefaultAndTheme(t,n),this._doInit(i)},bT.prototype.mergeOption=function(t){var e=MT(t);d(this.option,t,!0),d(this.settledOption,e,!0),this._doInit(e)},bT.prototype._doInit=function(t){var n=this.option,i=(this._setDefaultThrottle(t),this._updateRangeUse(t),this.settledOption);E([["start","startValue"],["end","endValue"]],function(t,e){"value"===this._rangePropMode[e]&&(n[t[0]]=i[t[0]]=null)},this),this._resetTarget()},bT.prototype._resetTarget=function(){var t=this.get("orient",!0),e=this._targetAxisInfoMap=N();this._fillSpecifiedTargetAxis(e)?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(e,this._orient)),this._noTarget=!0,e.each(function(t){t.indexList.length&&(this._noTarget=!1)},this)},bT.prototype._fillSpecifiedTargetAxis=function(i){var o=!1;return E(gT,function(t){var e,n=this.getReferringComponents(mT(t),Fr);n.specified&&(o=!0,e=new wT,E(n.models,function(t){e.add(t.componentIndex)}),i.set(t,e))},this),o},bT.prototype._fillAutoTargetAxisByOrient=function(r,e){var t,i=this.ecModel,a=!0;function n(t,e){var n,i,o=t[0];o&&((n=new wT).add(o.componentIndex),r.set(e,n),a=!1,"x"!==e&&"y"!==e||(i=o.getReferringComponents("grid",Br).models[0])&&E(t,function(t){o.componentIndex!==t.componentIndex&&i===t.getReferringComponents("grid",Br).models[0]&&n.add(t.componentIndex)}))}a&&n(i.findComponents({mainType:(t="vertical"===e?"y":"x")+"Axis"}),t),a&&n(i.findComponents({mainType:"singleAxis",filter:function(t){return t.get("orient",!0)===e}}),"single"),a&&E(gT,function(t){var e,n;a&&(e=i.findComponents({mainType:mT(t),filter:function(t){return"category"===t.get("type",!0)}}))[0]&&((n=new wT).add(e[0].componentIndex),r.set(t,n),a=!1)},this)},bT.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis(function(t){e=e||t},this),"y"===e?"vertical":"horizontal"},bT.prototype._setDefaultThrottle=function(t){t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle&&(t=this.ecModel.option,this.option.throttle=t.animation&&0<t.animationDurationUpdate?100:20)},bT.prototype._updateRangeUse=function(i){var o=this._rangePropMode,r=this.get("rangeMode");E([["start","startValue"],["end","endValue"]],function(t,e){var n=null!=i[t[0]],t=null!=i[t[1]];n&&!t?o[e]="percent":!n&&t?o[e]="value":r?o[e]=r[e]:n&&(o[e]="percent")})},bT.prototype.noTarget=function(){return this._noTarget},bT.prototype.getFirstTargetAxisModel=function(){var n;return this.eachTargetAxis(function(t,e){null==n&&(n=this.ecModel.getComponent(mT(t),e))},this),n},bT.prototype.eachTargetAxis=function(n,i){this._targetAxisInfoMap.each(function(t,e){E(t.indexList,function(t){n.call(i,e,t)})})},bT.prototype.getAxisProxy=function(t,e){t=this.getAxisModel(t,e);if(t)return t.__dzAxisProxy},bT.prototype.getAxisModel=function(t,e){var n=this._targetAxisInfoMap.get(t);if(n&&n.indexMap[e])return this.ecModel.getComponent(mT(t),e)},bT.prototype.setRawRange=function(e){var n=this.option,i=this.settledOption;E([["start","startValue"],["end","endValue"]],function(t){null==e[t[0]]&&null==e[t[1]]||(n[t[0]]=i[t[0]]=e[t[0]],n[t[1]]=i[t[1]]=e[t[1]])},this),this._updateRangeUse(e)},bT.prototype.setCalculatedRange=function(e){var n=this.option;E(["start","startValue","end","endValue"],function(t){n[t]=e[t]})},bT.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},bT.prototype.getValueRange=function(t,e){return null!=t||null!=e?this.getAxisProxy(t,e).getDataValueWindow():(t=this.findRepresentativeAxisProxy())?t.getDataValueWindow():void 0},bT.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var e,n=this._targetAxisInfoMap.keys(),i=0;i<n.length;i++)for(var o=n[i],r=this._targetAxisInfoMap.get(o),a=0;a<r.indexList.length;a++){var s=this.getAxisProxy(o,r.indexList[a]);if(s.hostedBy(this))return s;e=e||s}return e},bT.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},bT.prototype.getOrient=function(){return this._orient},bT.type="dataZoom",bT.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],bT.defaultOption={z:4,filterMode:"filter",start:0,end:100},bT);function bT(){var t=null!==xT&&xT.apply(this,arguments)||this;return t.type=bT.type,t._autoThrottle=!0,t._noTarget=!0,t._rangePropMode=["percent","percent"],t}function ST(){this.indexList=[],this.indexMap=[]}function MT(e){var n={};return E(["start","end","startValue","endValue","throttle"],function(t){e.hasOwnProperty(t)&&(n[t]=e[t])}),n}u(CT,TT=gh),CT.type="dataZoom.inside",CT.defaultOption=Uc(gh.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0});var TT,IT=CT;function CT(){var t=null!==TT&&TT.apply(this,arguments)||this;return t.type=CT.type,t}u(kT,DT=$g),kT.prototype.render=function(t,e,n,i){this.dataZoomModel=t,this.ecModel=e,this.api=n},kT.type="dataZoom";var DT,wu=kT;function kT(){var t=null!==DT&&DT.apply(this,arguments)||this;return t.type=kT.type,t}function AT(t,e,n,i,o,r){t=t||0;var a=n[1]-n[0],a=(null!=o&&(o=PT(o,[0,a])),null!=r&&(r=Math.max(r,null!=o?o:0)),"all"===i&&(s=PT(s=Math.abs(e[1]-e[0]),[0,a]),o=r=PT(s,[o,r]),i=0),e[0]=PT(e[0],n),e[1]=PT(e[1],n),LT(e,i));e[i]+=t;var s=o||0,t=n.slice();a.sign<0?t[0]+=s:t[1]-=s,e[i]=PT(e[i],t),n=LT(e,i),null!=o&&(n.sign!==a.sign||n.span<o)&&(e[1-i]=e[i]+a.sign*o),n=LT(e,i),null!=r&&n.span>r&&(e[1-i]=e[i]+n.sign*r)}function LT(t,e){t=t[e]-t[1-e];return{span:Math.abs(t),sign:0<t||!(t<0)&&e?-1:1}}function PT(t,e){return Math.min(null!=e[1]?e[1]:1/0,Math.max(null!=e[0]?e[0]:-1/0,t))}var OT="\0_ec_interaction_mutex";function RT(t,e){return((t=t)[OT]||(t[OT]={}))[e]}X0({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},zt);u(zT,NT=ae),zT.prototype.isDragging=function(){return this._dragging},zT.prototype.isPinching=function(){return this._pinching},zT.prototype.setPointerChecker=function(t){this.pointerChecker=t},zT.prototype.dispose=function(){this.disable()},zT.prototype._mousedownHandler=function(t){if(!Ie(t)){for(var e=t.target;e;){if(e.draggable)return;e=e.__hostTarget||e.parent}var n=t.offsetX,i=t.offsetY;this.pointerChecker&&this.pointerChecker(t,n,i)&&(this._x=n,this._y=i,this._dragging=!0)}},zT.prototype._mousemoveHandler=function(t){var e,n,i,o,r,a;this._dragging&&VT("moveOnMouseMove",t,this._opt)&&"pinch"!==t.gestureEvent&&!RT(this._zr,"globalPan")&&(e=t.offsetX,n=t.offsetY,r=e-(i=this._x),a=n-(o=this._y),this._x=e,this._y=n,this._opt.preventDefaultMouseMove&&Te(t.event),FT(this,"pan","moveOnMouseMove",t,{dx:r,dy:a,oldX:i,oldY:o,newX:e,newY:n,isAvailableBehavior:null}))},zT.prototype._mouseupHandler=function(t){Ie(t)||(this._dragging=!1)},zT.prototype._mousewheelHandler=function(t){var e=VT("zoomOnMouseWheel",t,this._opt),n=VT("moveOnMouseWheel",t,this._opt),i=t.wheelDelta,o=Math.abs(i),r=t.offsetX,a=t.offsetY;0!==i&&(e||n)&&(e&&(e=3<o?1.4:1<o?1.2:1.1,BT(this,"zoom","zoomOnMouseWheel",t,{scale:0<i?e:1/e,originX:r,originY:a,isAvailableBehavior:null})),n)&&BT(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:(0<i?1:-1)*(3<(o=Math.abs(i))?.4:1<o?.15:.05),originX:r,originY:a,isAvailableBehavior:null})},zT.prototype._pinchHandler=function(t){RT(this._zr,"globalPan")||BT(this,"zoom",null,t,{scale:1<t.pinchScale?1.1:1/1.1,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})};var NT,ET=zT;function zT(n){var t=NT.call(this)||this,i=(t._zr=n,S(t._mousedownHandler,t)),o=S(t._mousemoveHandler,t),r=S(t._mouseupHandler,t),a=S(t._mousewheelHandler,t),s=S(t._pinchHandler,t);return t.enable=function(t,e){this.disable(),this._opt=B(y(e)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),!0!==(t=null==t?!0:t)&&"move"!==t&&"pan"!==t||(n.on("mousedown",i),n.on("mousemove",o),n.on("mouseup",r)),!0!==t&&"scale"!==t&&"zoom"!==t||(n.on("mousewheel",a),n.on("pinch",s))},t.disable=function(){n.off("mousedown",i),n.off("mousemove",o),n.off("mouseup",r),n.off("mousewheel",a),n.off("pinch",s)},t}function BT(t,e,n,i,o){t.pointerChecker&&t.pointerChecker(i,o.originX,o.originY)&&(Te(i.event),FT(t,e,n,i,o))}function FT(t,e,n,i,o){o.isAvailableBehavior=S(VT,null,n,i),t.trigger(e,o)}function VT(t,e,n){n=n[t];return!t||n&&(!H(n)||e.event[n+"Key"])}var HT=Rr();function WT(t,e){e&&(t.removeKey(e.model.uid),t=e.controller)&&t.dispose()}function GT(t,e){t.isDisposed()||t.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function XT(t,e,n,i){return t.coordinateSystem.containPoint([n,i])}function UT(t){t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,function(t,a){var e=HT(a),l=e.coordSysRecordMap||(e.coordSysRecordMap=N());l.each(function(t){t.dataZoomInfoMap=null}),t.eachComponent({mainType:"dataZoom",subType:"inside"},function(o){E(_T(o).infoList,function(t){var r,e,n=t.model.uid,i=l.get(n)||l.set(n,(n=a,i=t.model,r={model:i,containsPoint:M(XT,i),dispatchAction:M(GT,n),dataZoomInfoMap:null,controller:null},e=r.controller=new ET(n.getZr()),E(["pan","zoom","scrollMove"],function(o){e.on(o,function(n){var i=[];r.dataZoomInfoMap.each(function(t){var e;n.isAvailableBehavior(t.model.option)&&(e=(e=(t.getRange||{})[o])&&e(t.dzReferCoordSysInfo,r.model.mainType,r.controller,n),!t.model.get("disabled",!0))&&e&&i.push({dataZoomId:t.model.id,start:e[0],end:e[1]})}),i.length&&r.dispatchAction(i)})}),r));(i.dataZoomInfoMap||(i.dataZoomInfoMap=N())).set(o.uid,{dzReferCoordSysInfo:t,model:o,getRange:null})})}),l.each(function(t){var e,n,i,o,r,a=t.controller,s=t.dataZoomInfoMap;(e=s&&null!=(n=s.keys()[0])?s.get(n):e)?(o={type_true:2,type_move:1,type_false:0,type_undefined:-1},r=!0,s.each(function(t){var t=t.model,e=!t.get("disabled",!0)&&(!t.get("zoomLock",!0)||"move");o["type_"+i]<o["type_"+e]&&(i=e),r=r&&t.get("preventDefaultMouseMove",!0)}),n={controlType:i,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!r}},a.enable(n.controlType,n.opt),a.setPointerChecker(t.containsPoint),dy(t,"dispatchAction",e.model.get("throttle",!0),"fixRate")):WT(l,t)})})}u(jT,YT=wu),jT.prototype.render=function(t,e,n){var i,o;YT.prototype.render.apply(this,arguments),t.noTarget()?this._clear():(this.range=t.getPercentRange(),n=n,i=t,o={pan:S(qT.pan,this),zoom:S(qT.zoom,this),scrollMove:S(qT.scrollMove,this)},HT(n).coordSysRecordMap.each(function(t){t=t.dataZoomInfoMap.get(i.uid);t&&(t.getRange=o)}))},jT.prototype.dispose=function(){this._clear(),YT.prototype.dispose.apply(this,arguments)},jT.prototype._clear=function(){for(var t=this.api,e=this.dataZoomModel,n=HT(t).coordSysRecordMap,i=n.keys(),o=0;o<i.length;o++){var r,a=i[o],a=n.get(a),s=a.dataZoomInfoMap;s&&(r=e.uid,s.get(r))&&(s.removeKey(r),s.keys().length||WT(n,a))}this.range=null},jT.type="dataZoom.inside";var YT,ZT=jT,qT={zoom:function(t,e,n,i){var o=this.range,r=o.slice(),a=t.axisModels[0];if(a)return a=(0<(e=$T[e](null,[i.originX,i.originY],a,n,t)).signal?e.pixelStart+e.pixelLength-e.pixel:e.pixel-e.pixelStart)/e.pixelLength*(r[1]-r[0])+r[0],n=Math.max(1/i.scale,0),r[0]=(r[0]-a)*n+a,r[1]=(r[1]-a)*n+a,AT(0,r,[0,100],0,(t=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan()).minSpan,t.maxSpan),this.range=r,o[0]!==r[0]||o[1]!==r[1]?r:void 0},pan:KT(function(t,e,n,i,o,r){i=$T[i]([r.oldX,r.oldY],[r.newX,r.newY],e,o,n);return i.signal*(t[1]-t[0])*i.pixel/i.pixelLength}),scrollMove:KT(function(t,e,n,i,o,r){return $T[i]([0,0],[r.scrollDelta,r.scrollDelta],e,o,n).signal*(t[1]-t[0])*r.scrollDelta})};function jT(){var t=null!==YT&&YT.apply(this,arguments)||this;return t.type="dataZoom.inside",t}function KT(s){return function(t,e,n,i){var o=this.range,r=o.slice(),a=t.axisModels[0];if(a)return AT(s(r,a,t,e,n,i),r,[0,100],"all"),this.range=r,o[0]!==r[0]||o[1]!==r[1]?r:void 0}}var $T={grid:function(t,e,n,i,o){var n=n.axis,r={},o=o.model.coordinateSystem.getRect();return t=t||[0,0],"x"===n.dim?(r.pixel=e[0]-t[0],r.pixelLength=o.width,r.pixelStart=o.x,r.signal=n.inverse?1:-1):(r.pixel=e[1]-t[1],r.pixelLength=o.height,r.pixelStart=o.y,r.signal=n.inverse?-1:1),r},polar:function(t,e,n,i,o){var r=n.axis,a={},o=o.model.coordinateSystem,s=o.getRadiusAxis().getExtent(),l=o.getAngleAxis().getExtent();return t=t?o.pointToCoord(t):[0,0],e=o.pointToCoord(e),"radiusAxis"===n.mainType?(a.pixel=e[0]-t[0],a.pixelLength=s[1]-s[0],a.pixelStart=s[0],a.signal=r.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=r.inverse?-1:1),a},singleAxis:function(t,e,n,i,o){var n=n.axis,o=o.model.coordinateSystem.getRect(),r={};return t=t||[0,0],"horizontal"===n.orient?(r.pixel=e[0]-t[0],r.pixelLength=o.width,r.pixelStart=o.x,r.signal=n.inverse?1:-1):(r.pixel=e[1]-t[1],r.pixelLength=o.height,r.pixelStart=o.y,r.signal=n.inverse?-1:1),r}},QT=E,JT=ir,t2=(e2.prototype.hostedBy=function(t){return this._dataZoomModel===t},e2.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},e2.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},e2.prototype.getTargetSeriesModels=function(){var n=[];return this.ecModel.eachSeries(function(t){var e;e=(e=t).get("coordinateSystem"),0<=C(yT,e)&&(e=mT(this._dimName),e=t.getReferringComponents(e,Br).models[0])&&this._axisIndex===e.componentIndex&&n.push(t)},this),n},e2.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},e2.prototype.getMinMaxSpan=function(){return y(this._minMaxSpan)},e2.prototype.calculateDataWindow=function(i){var o,r=this._dataExtent,s=this.getAxisModel().axis.scale,a=this._dataZoomModel.getRangePropMode(),l=[0,100],u=[],h=[],c=(QT(["start","end"],function(t,e){var n=i[t],t=i[t+"Value"];"percent"===a[e]?t=s.parse(tr(n=null==n?l[e]:n,l,r)):(o=!0,n=tr(t=null==t?r[e]:s.parse(t),r,l)),h[e]=null==t||isNaN(t)?r[e]:t,u[e]=null==n||isNaN(n)?l[e]:n}),JT(h),JT(u),this._minMaxSpan);function t(t,e,n,i,o){var r=o?"Span":"ValueSpan";AT(0,t,n,"all",c["min"+r],c["max"+r]);for(var a=0;a<2;a++)e[a]=tr(t[a],n,i,!0),o&&(e[a]=s.parse(e[a]))}return o?t(h,u,r,l,!1):t(u,h,l,r,!0),{valueWindow:h,percentWindow:u}},e2.prototype.reset=function(t){var e,i,n,o;t===this._dataZoomModel&&(n=this.getTargetSeriesModels(),this._dataExtent=(i=(e=this)._dimName,o=[1/0,-1/0],QT(n=n,function(t){var e,n;e=o,n=t.getData(),t=i,n&&E(V_(n,t),function(t){t=n.getApproximateExtent(t);t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])})}),[(e=A_((n=e.getAxisModel()).axis.scale,n,o).calculate()).min,e.max]),this._updateMinMaxSpan(),n=this.calculateDataWindow(t.settledOption),this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel())},e2.prototype.filterData=function(t,e){var o,n,r,c;t===this._dataZoomModel&&(o=this._dimName,n=this.getTargetSeriesModels(),r=t.get("filterMode"),c=this._valueWindow,"none"!==r)&&QT(n,function(n){var l,u,i=n.getData(),h=i.mapDimensionsAll(o);h.length&&("weakFilter"===r?(l=i.getStore(),u=F(h,function(t){return i.getDimensionIndex(t)},i),i.filterSelf(function(t){for(var e,n,i,o=0;o<h.length;o++){var r=l.get(u[o],t),a=!isNaN(r),s=r<c[0],r=r>c[1];if(a&&!s&&!r)return!0;a&&(i=!0),s&&(e=!0),r&&(n=!0)}return i&&e&&n})):QT(h,function(t){var e;"empty"===r?n.setData(i=i.map(t,function(t){return t>=c[0]&&t<=c[1]?t:NaN})):((e={})[t]=c,i.selectRange(e))}),QT(h,function(t){i.setApproximateExtent(c,t)}))})},e2.prototype._updateMinMaxSpan=function(){var i=this._minMaxSpan={},o=this._dataZoomModel,r=this._dataExtent;QT(["min","max"],function(t){var e=o.get(t+"Span"),n=o.get(t+"ValueSpan");null!=(n=null!=n?this.getAxisModel().axis.scale.parse(n):n)?e=tr(r[0]+n,r,[0,100],!0):null!=e&&(n=tr(e,[0,100],r,!0)-r[0]),i[t+"Span"]=e,i[t+"ValueSpan"]=n},this)},e2.prototype._setAxisModel=function(){var t,e=this.getAxisModel(),n=this._percentWindow,i=this._valueWindow;n&&(t=ar(i,[0,500]),t=Math.min(t,20),e=e.axis.scale.rawExtentInfo,0!==n[0]&&e.setDeterminedMinMax("min",+i[0].toFixed(t)),100!==n[1]&&e.setDeterminedMinMax("max",+i[1].toFixed(t)),e.freeze())},e2);function e2(t,e,n,i){this._dimName=t,this._axisIndex=e,this.ecModel=i,this._dataZoomModel=n}var n2={getTargetSeries:function(r){function t(o){r.eachComponent("dataZoom",function(i){i.eachTargetAxis(function(t,e){var n=r.getComponent(mT(t),e);o(t,e,n,i)})})}t(function(t,e,n,i){n.__dzAxisProxy=null});var o=[],e=(t(function(t,e,n,i){n.__dzAxisProxy||(n.__dzAxisProxy=new t2(t,e,i,r),o.push(n.__dzAxisProxy))}),N());return E(o,function(t){E(t.getTargetSeriesModels(),function(t){e.set(t.uid,t)})}),e},overallReset:function(t,i){t.eachComponent("dataZoom",function(n){n.eachTargetAxis(function(t,e){n.getAxisProxy(t,e).reset(n)}),n.eachTargetAxis(function(t,e){n.getAxisProxy(t,e).filterData(n,i)})}),t.eachComponent("dataZoom",function(t){var e,n=t.findRepresentativeAxisProxy();n&&(e=n.getDataPercentWindow(),n=n.getDataValueWindow(),t.setCalculatedRange({start:e[0],end:e[1],startValue:n[0],endValue:n[1]}))})}};var i2=!1;function o2(t){i2||(i2=!0,t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,n2),t.registerAction("dataZoom",function(e,t){E(vT(t,e),function(t){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})}),t.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function r2(t){o2(t),t.registerComponentModel(IT),t.registerComponentView(ZT),UT(t)}u(l2,a2=gh),l2.type="dataZoom.slider",l2.layoutMode="box",l2.defaultOption=Uc(gh.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}});var a2,s2=l2;function l2(){var t=null!==a2&&a2.apply(this,arguments)||this;return t.type=l2.type,t}var u2,h2=Es,c2="horizontal",p2="vertical",d2=["line","bar","candlestick","scatter"],f2={easing:"cubicOut",duration:100,delay:0},g2=(u(m,u2=wu),m.prototype.init=function(t,e){this.api=e,this._onBrush=S(this._onBrush,this),this._onBrushEnd=S(this._onBrushEnd,this)},m.prototype.render=function(t,e,n,i){u2.prototype.render.apply(this,arguments),dy(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),!1!==t.get("show")?t.noTarget()?(this._clear(),this.group.removeAll()):(i&&"dataZoom"===i.type&&i.from===this.uid||this._buildView(),this._updateView()):this.group.removeAll()},m.prototype.dispose=function(){this._clear(),u2.prototype.dispose.apply(this,arguments)},m.prototype._clear=function(){fy(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},m.prototype._buildView=function(){var t=this.group,e=(t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval(),this._displayables.sliderGroup=new Wo);this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},m.prototype._resetLocation=function(){var t=this.dataZoomModel,e=this.api,n=t.get("brushSelect")?7:0,i=this._findCoordRect(),e={width:e.getWidth(),height:e.getHeight()},o=this._orient===c2?{right:e.width-i.x-i.width,top:e.height-30-7-n,width:i.width,height:30}:{right:7,top:i.y,width:30,height:i.height},r=Gp(t.option),n=(E(["right","top","width","height"],function(t){"ph"===r[t]&&(r[t]=o[t])}),Vp(r,e));this._location={x:n.x,y:n.y},this._size=[n.width,n.height],this._orient===p2&&this._size.reverse()},m.prototype._positionGroup=function(){var t=this.group,e=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),i=i&&i.get("inverse"),o=this._displayables.sliderGroup,r=(this._dataShadowInfo||{}).otherAxisInverse,n=(o.attr(n!==c2||i?n===c2&&i?{scaleY:r?1:-1,scaleX:-1}:n!==p2||i?{scaleY:r?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:r?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:r?1:-1,scaleX:1}),t.getBoundingRect([o]));t.x=e.x-n.x,t.y=e.y-n.y,t.markRedraw()},m.prototype._getViewExtent=function(){return[0,this._size[0]]},m.prototype._renderBackground=function(){var t=this.dataZoomModel,e=this._size,n=this._displayables.sliderGroup,i=t.get("brushSelect"),t=(n.add(new h2({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40})),new h2({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:S(this._onClickPanel,this)})),e=this.api.getZr();i?(t.on("mousedown",this._onBrushStart,this),t.cursor="crosshair",e.on("mousemove",this._onBrush),e.on("mouseup",this._onBrushEnd)):(e.off("mousemove",this._onBrush),e.off("mouseup",this._onBrushEnd)),n.add(t)},m.prototype._renderDataShadow=function(){var t,e,n=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],n){var i=this._size,o=this._shadowSize||[],r=n.series,a=r.getRawData(),s=r.getShadowDim&&r.getShadowDim(),s=s&&a.getDimensionInfo(s)?r.getShadowDim():n.otherDim;if(null!=s){var l,u,h,c,p,d,f,g,y=this._shadowPolygonPts,m=this._shadowPolylinePts;a===this._shadowData&&s===this._shadowDim&&i[0]===o[0]&&i[1]===o[1]||(r=.3*((l=a.getDataExtent(s))[1]-l[0]),l=[l[0]-r,l[1]+r],h=[0,i[1]],n=[0,i[0]],c=[[i[0],0],[0,0]],p=[],d=n[1]/(a.count()-1),f=0,g=Math.round(a.count()/i[0]),a.each([s],function(t,e){var n;0<g&&e%g?f+=d:(t=(n=null==t||isNaN(t)||""===t)?0:tr(t,l,h,!0),n&&!u&&e?(c.push([c[c.length-1][0],0]),p.push([p[p.length-1][0],0])):!n&&u&&(c.push([f,0]),p.push([f,0])),c.push([f,t]),p.push([f,t]),f+=d,u=n)}),y=this._shadowPolygonPts=c,m=this._shadowPolylinePts=p),this._shadowData=a,this._shadowDim=s,this._shadowSize=[i[0],i[1]];for(var v=this.dataZoomModel,_=0;_<3;_++){t=1===_,x=e=void 0,t=v.getModel(t?"selectedDataBackground":"dataBackground"),e=new Wo,x=new Zu({shape:{points:y},segmentIgnoreThreshold:1,style:t.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),t=new $u({shape:{points:m},segmentIgnoreThreshold:1,style:t.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19}),e.add(x),e.add(t);var x=e;this._displayables.sliderGroup.add(x),this._displayables.dataShadowSegs.push(x)}}}},m.prototype._prepareDataShadowInfo=function(){var s,l,t=this.dataZoomModel,u=t.get("showDataShadow");if(!1!==u)return l=this.ecModel,t.eachTargetAxis(function(r,a){E(t.getAxisProxy(r,a).getTargetSeriesModels(),function(t){var e,n,i,o;s||!0!==u&&C(d2,t.get("type"))<0||(n=l.getComponent(mT(r),a).axis,o=t.coordinateSystem,null!=(i={x:"y",y:"x",radius:"angle",angle:"radius"}[r])&&o.getOtherAxis&&(e=o.getOtherAxis(n).inverse),i=t.getData().mapDimension(i),s={thisAxis:n,series:t,thisDim:r,otherDim:i,otherAxisInverse:e})},this)},this),s},m.prototype._renderHandle=function(){var t,e,o=this.group,n=this._displayables,r=n.handles=[null,null],a=n.handleLabels=[null,null],s=this._displayables.sliderGroup,i=this._size,l=this.dataZoomModel,u=this.api,h=l.get("borderRadius")||0,c=l.get("brushSelect"),p=n.filler=new h2({silent:c,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}}),h=(s.add(p),s.add(new h2({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:i[0],height:i[1],r:h},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),E([0,1],function(t){var e=l.get("handleIcon"),e=am(e=!im[e]&&e.indexOf("path://")<0&&e.indexOf("image://")<0?"path://"+e:e,-1,0,2,2,null,!0),n=(e.attr({cursor:y2(this._orient),draggable:!0,drift:S(this._onDragMove,this,t),ondragend:S(this._onDragEnd,this),onmouseover:S(this._showDataInfo,this,!0),onmouseout:S(this._showDataInfo,this,!1),z2:5}),e.getBoundingRect()),i=l.get("handleSize"),i=(this._handleHeight=er(i,this._size[1]),this._handleWidth=n.width/n.height*this._handleHeight,e.setStyle(l.getModel("handleStyle").getItemStyle()),e.style.strokeNoScale=!0,e.rectHover=!0,e.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),Hl(e),l.get("handleColor")),n=(null!=i&&(e.style.fill=i),s.add(r[t]=e),l.getModel("textStyle"));o.add(a[t]=new Hs({silent:!0,invisible:!0,style:wc(n,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:n.getTextColor(),font:n.getFont()}),z2:10}))},this),p);c&&(p=er(l.get("moveHandleSize"),i[1]),t=n.moveHandle=new Es({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:i[1]-.5,height:p}}),c=.8*p,(c=n.moveHandleIcon=am(l.get("moveHandleIcon"),-c/2,-c/2,c,c,"#fff",!0)).silent=!0,c.y=i[1]+p/2-.5,t.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle(),e=Math.min(i[1]/2,Math.max(p,10)),(h=n.moveZone=new Es({invisible:!0,shape:{y:i[1]-e,height:p+e}})).on("mouseover",function(){u.enterEmphasis(t)}).on("mouseout",function(){u.leaveEmphasis(t)}),s.add(t),s.add(c),s.add(h)),h.attr({draggable:!0,cursor:y2(this._orient),drift:S(this._onDragMove,this,"all"),ondragstart:S(this._showDataInfo,this,!0),ondragend:S(this._onDragEnd,this),onmouseover:S(this._showDataInfo,this,!0),onmouseout:S(this._showDataInfo,this,!1)})},m.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[tr(t[0],[0,100],e,!0),tr(t[1],[0,100],e,!0)]},m.prototype._updateInterval=function(t,e){var n=this.dataZoomModel,i=this._handleEnds,o=this._getViewExtent(),r=n.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100],e=(AT(e,i,o,n.get("zoomLock")?"all":t,null!=r.minSpan?tr(r.minSpan,a,o,!0):null,null!=r.maxSpan?tr(r.maxSpan,a,o,!0):null),this._range),n=this._range=ir([tr(i[0],o,a,!0),tr(i[1],o,a,!0)]);return!e||e[0]!==n[0]||e[1]!==n[1]},m.prototype._updateView=function(t){var i=this._displayables,o=this._handleEnds,e=ir(o.slice()),r=this._size,n=(E([0,1],function(t){var e=i.handles[t],n=this._handleHeight;e.attr({scaleX:n/2,scaleY:n/2,x:o[t]+(t?-1:1),y:r[1]/2-n/2})},this),i.filler.setShape({x:e[0],y:0,width:e[1]-e[0],height:r[1]}),{x:e[0],width:e[1]-e[0]});i.moveHandle&&(i.moveHandle.setShape(n),i.moveZone.setShape(n),i.moveZone.getBoundingRect(),i.moveHandleIcon)&&i.moveHandleIcon.attr("x",n.x+n.width/2);for(var a=i.dataShadowSegs,s=[0,e[0],e[1],r[0]],l=0;l<a.length;l++){var u=a[l],h=u.getClipPath();h||(h=new Es,u.setClipPath(h)),h.setShape({x:s[l],y:0,width:s[l+1]-s[l],height:r[1]})}this._updateDataInfo(t)},m.prototype._updateDataInfo=function(t){var e,n,i=this.dataZoomModel,o=this._displayables,r=o.handleLabels,a=this._orient,s=["",""],l=(i.get("showDetail")&&(i=i.findRepresentativeAxisProxy())&&(e=i.getAxisModel().axis,n=this._range,t=t?i.calculateDataWindow({start:n[0],end:n[1]}).valueWindow:i.getDataValueWindow(),s=[this._formatLabel(t[0],e),this._formatLabel(t[1],e)]),ir(this._handleEnds.slice()));function u(t){var e=ic(o.handles[t].parent,this.group),n=rc(0===t?"right":"left",e),i=this._handleWidth/2+5,i=oc([l[t]+(0===t?-i:i),this._size[1]/2],e);r[t].setStyle({x:i[0],y:i[1],verticalAlign:a===c2?"middle":n,align:a===c2?n:"center",text:s[t]})}u.call(this,0),u.call(this,1)},m.prototype._formatLabel=function(t,e){var n=this.dataZoomModel,i=n.get("labelFormatter"),n=n.get("labelPrecision"),e=(null!=n&&"auto"!==n||(n=e.getPixelPrecision()),null==t||isNaN(t)?"":"category"===e.type||"time"===e.type?e.scale.getLabel({value:Math.round(t)}):t.toFixed(Math.min(n,20)));return D(i)?i(t,e):H(i)?i.replace("{value}",e):e},m.prototype._showDataInfo=function(t){t=this._dragging||t;var e=this._displayables,n=e.handleLabels;n[0].attr("invisible",!t),n[1].attr("invisible",!t),e.moveHandle&&this.api[t?"enterEmphasis":"leaveEmphasis"](e.moveHandle,1)},m.prototype._onDragMove=function(t,e,n,i){this._dragging=!0,Te(i.event);i=oc([e,n],this._displayables.sliderGroup.getLocalTransform(),!0),e=this._updateInterval(t,i[0]),n=this.dataZoomModel.get("realtime");this._updateView(!n),e&&n&&this._dispatchZoomAction(!0)},m.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1),this.dataZoomModel.get("realtime")||this._dispatchZoomAction(!1)},m.prototype._onClickPanel=function(t){var e=this._size,t=this._displayables.sliderGroup.transformCoordToLocal(t.offsetX,t.offsetY);t[0]<0||t[0]>e[0]||t[1]<0||t[1]>e[1]||(e=((e=this._handleEnds)[0]+e[1])/2,t=this._updateInterval("all",t[0]-e),this._updateView(),t&&this._dispatchZoomAction(!1))},m.prototype._onBrushStart=function(t){var e=t.offsetX,t=t.offsetY;this._brushStart=new z(e,t),this._brushing=!0,this._brushStartTime=+new Date},m.prototype._onBrushEnd=function(t){var e,n,i;this._brushing&&(e=this._displayables.brushRect,this._brushing=!1,e)&&(e.attr("ignore",!0),e=e.shape,+new Date-this._brushStartTime<200&&Math.abs(e.width)<5||(n=this._getViewExtent(),this._range=ir([tr(e.x,n,i=[0,100],!0),tr(e.x+e.width,n,i,!0)]),this._handleEnds=[e.x,e.x+e.width],this._updateView(),this._dispatchZoomAction(!1)))},m.prototype._onBrush=function(t){this._brushing&&(Te(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},m.prototype._updateBrushRect=function(t,e){var n=this._displayables,i=this.dataZoomModel,o=n.brushRect,i=(o||(o=n.brushRect=new h2({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(o)),o.attr("ignore",!1),this._brushStart),n=this._displayables.sliderGroup,t=n.transformCoordToLocal(t,e),e=n.transformCoordToLocal(i.x,i.y),n=this._size;t[0]=Math.max(Math.min(n[0],t[0]),0),o.setShape({x:e[0],y:0,width:t[0]-e[0],height:n[1]})},m.prototype._dispatchZoomAction=function(t){var e=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?f2:null,start:e[0],end:e[1]})},m.prototype._findCoordRect=function(){var t,e,n=_T(this.dataZoomModel).infoList;return t=(t=!t&&n.length?(n=n[0].model.coordinateSystem).getRect&&n.getRect():t)?t:{x:.2*(n=this.api.getWidth()),y:.2*(e=this.api.getHeight()),width:.6*n,height:.6*e}},m.type="dataZoom.slider",m);function m(){var t=null!==u2&&u2.apply(this,arguments)||this;return t.type=m.type,t._displayables={},t}function y2(t){return"vertical"===t?"ns-resize":"ew-resize"}function m2(t){t.registerComponentModel(s2),t.registerComponentView(g2),o2(t)}U_(function(t){U_(r2),U_(m2)}),U_(fx);var v2={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},_2=(A2.prototype.evaluate=function(t){var e=typeof t;return H(e)?this._condVal.test(t):!!W(e)&&this._condVal.test(t+"")},A2),x2=(k2.prototype.evaluate=function(){return this.value},k2),w2=(D2.prototype.evaluate=function(){for(var t=this.children,e=0;e<t.length;e++)if(!t[e].evaluate())return!1;return!0},D2),b2=(C2.prototype.evaluate=function(){for(var t=this.children,e=0;e<t.length;e++)if(t[e].evaluate())return!0;return!1},C2),S2=(I2.prototype.evaluate=function(){return!this.child.evaluate()},I2),M2=(T2.prototype.evaluate=function(){for(var t=!!this.valueParser,e=(0,this.getValue)(this.valueGetterParam),n=t?this.valueParser(e):null,i=0;i<this.subCondList.length;i++)if(!this.subCondList[i].evaluate(t?n:e))return!1;return!0},T2);function T2(){}function I2(){}function C2(){}function D2(){}function k2(){}function A2(t){null==(this._condVal=H(t)?new RegExp(t):mt(t)?t:null)&&f("")}function L2(t,e){var n;if(!0===t||!1===t)return(n=new x2).value=t,n;{if(O2(t)||f(""),t.and)return P2("and",t,e);if(t.or)return P2("or",t,e);if(t.not)n=e,O2(r=(r=t).not)||f(""),(l=new S2).child=L2(r,n),l.child||f("");else{for(var i=t,o=e,r=o.prepareGetValue(i),a=[],s=ht(i),l=i.parser,u=l?Yf(l):null,h=0;h<s.length;h++){var c,p=s[h];"parser"===p||o.valueGetterAttrMap.get(p)||(c=Et(v2,p)?v2[p]:p,p=i[p],p=u?u(p):p,(c=function(t,e){return"eq"===t||"ne"===t?new Qf("eq"===t,e):Et(Zf,t)?new qf(t,e):null}(c,p)||"reg"===c&&new _2(p))||f(""),a.push(c))}a.length||f(""),(l=new M2).valueGetterParam=r,l.valueParser=u,l.getValue=o.getValue,l.subCondList=a}return l}}function P2(t,e,n){e=e[t],V(e)||f(""),e.length||f(""),t=new("and"===t?w2:b2);return t.children=F(e,function(t){return L2(t,n)}),t.children.length||f(""),t}function O2(t){return O(t)&&!st(t)}N2.prototype.evaluate=function(){return this._cond.evaluate()};var R2=N2;function N2(t,e){this._cond=L2(t,e)}var E2={type:"echarts:filter",transform:function(t){for(var e,n,i=t.upstream,o=(t=t.config,n={valueGetterAttrMap:N({dimension:!0}),prepareGetValue:function(t){var e=t.dimension,t=(Et(t,"dimension")||f(""),i.getDimensionInfo(e));return t||f(""),{dimIdx:t.index}},getValue:function(t){return i.retrieveValueFromItem(e,t.dimIdx)}},new R2(t,n)),r=[],a=0,s=i.count();a<s;a++)e=i.getRawDataItem(a),o.evaluate()&&r.push(e);return{data:r}}},z2={type:"echarts:sort",transform:function(t){var a=t.upstream,t=t.config,t=br(t),s=(t.length||f(""),[]),t=(E(t,function(t){var e=t.dimension,n=t.order,i=t.parser,t=t.incomparable,e=(null==e&&f(""),"asc"!==n&&"desc"!==n&&f(""),t&&"min"!==t&&"max"!==t&&f(""),"asc"!==n&&"desc"!==n&&f(""),a.getDimensionInfo(e)),o=(e||f(""),i?Yf(i):null);i&&!o&&f(""),s.push({dimIdx:e.index,parser:o,comparator:new jf(n,t)})}),a.sourceFormat);t!==td&&t!==ed&&f("");for(var e=[],n=0,i=a.count();n<i;n++)e.push(a.getRawDataItem(n));return e.sort(function(t,e){for(var n=0;n<s.length;n++){var i=s[n],o=a.retrieveValueFromItem(t,i.dimIdx),r=a.retrieveValueFromItem(e,i.dimIdx),i=(i.parser&&(o=i.parser(o),r=i.parser(r)),i.comparator.evaluate(o,r));if(0!==i)return i}return 0}),{data:e}}};U_(function(t){t.registerTransform(E2),t.registerTransform(z2)}),t.Axis=Ec,t.ChartView=ny,t.ComponentModel=g,t.ComponentView=$g,t.List=Cv,t.Model=Hc,t.PRIORITY=Jy,t.SeriesModel=Gg,t.color=vi,t.connect=function(e){var t;return V(e)&&(t=e,e=null,E(t,function(t){null!=t.group&&(e=t.group)}),e=e||"g_"+R0++,E(t,function(t){t.group=e})),P0[e]=!0,e},t.dataTool={},t.dependencies={zrender:"5.5.0"},t.disConnect=Qy,t.disconnect=E0,t.dispose=function(t){H(t)?t=L0[t]:t instanceof m0||(t=z0(t)),t instanceof m0&&!t.isDisposed()&&t.dispose()},t.env=b,t.extendChartView=function(t){return t=ny.extend(t),ny.registerClass(t),t},t.extendComponentModel=function(t){return t=g.extend(t),g.registerClass(t),t},t.extendComponentView=function(t){return t=$g.extend(t),$g.registerClass(t),t},t.extendSeriesModel=function(t){return t=Gg.extend(t),Gg.registerClass(t),t},t.format=Rc,t.getCoordinateSystemDimensions=function(t){if(t=Ad.get(t))return t.getDimensionsInfo?t.getDimensionsInfo():t.dimensions.slice()},t.getInstanceByDom=z0,t.getInstanceById=function(t){return L0[t]},t.getMap=function(t){var e=Vm.getMap;return e&&e(t)},t.graphic=op,t.helper=tm,t.init=function(t,e,n){var i=!(n&&n.ssr);if(i){var o=z0(t);if(o)return o}return(o=new m0(t,e,n)).id="ec_"+O0++,L0[o.id]=o,i&&Hr(t,N0,o.id),h0(o),Fm.trigger("afterinit",o),o},t.innerDrawElementOnCanvas=Pm,t.matrix=Fe,t.number=ea,t.parseGeoJSON=l1,t.parseGeoJson=l1,t.registerAction=X0,t.registerCoordinateSystem=U0,t.registerLayout=Y0,t.registerLoading=K0,t.registerLocale=Qc,t.registerMap=$0,t.registerPostInit=H0,t.registerPostUpdate=W0,t.registerPreprocessor=F0,t.registerProcessor=V0,t.registerTheme=B0,t.registerTransform=Q0,t.registerUpdateLifecycle=G0,t.registerVisual=Z0,t.setCanvasCreator=function(t){I({createCanvas:t})},t.setPlatformAPI=I,t.throttle=py,t.time=nc,t.use=U_,t.util=Gy,t.vector=ie,t.version="5.5.0",t.zrUtil=Ft,t.zrender=Qo});
\ No newline at end of file
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 4/4] index.html: show summary in a collapsible list
  2024-04-18  9:49 [PATCH 0/2] [yocto-autobuilder-helper] M10: Metrics view: CVEs per branch section and M11: Unify metrics views Ninette Adhikari
                   ` (5 preceding siblings ...)
  2024-04-18  9:49 ` [PATCH 3/4] patch-status/index.html: use echarts to display all charts Ninette Adhikari
@ 2024-04-18  9:49 ` Ninette Adhikari
  2024-04-26 10:09 ` [yocto-patches] [PATCH 0/2] [yocto-autobuilder-helper] M10: Metrics view: CVEs per branch section and M11: Unify metrics views Richard Purdie
  7 siblings, 0 replies; 9+ messages in thread
From: Ninette Adhikari @ 2024-04-18  9:49 UTC (permalink / raw)
  To: yocto-patches; +Cc: engineering, hulkoba

From: hulkoba <jacoba@neighbourhood.ie>

Yocto gathers the amount of CVEs per branch at the top of their metrics view.
However, the presentation of this information is not descriptive enough and it’s spread across several files.
This change adds collapsible, nested lists to show all cve information.

This commit shows current CVE count per release,
parse txt files with CVE lists to group them by project and display their total CVE count.

Inline this data on the page in details elements so there’s no need to navigate away.

Also, there will be another patch for the autobuilder-helper project where we update the data that is used.
It changes the format of the txt file so the metrics can handle it easily.
---
 patch-status/index.html | 120 ++++++++++++++++++++++++++++++++++++++--
 1 file changed, 114 insertions(+), 6 deletions(-)

diff --git a/patch-status/index.html b/patch-status/index.html
index a38e6644..3ebff90e 100644
--- a/patch-status/index.html
+++ b/patch-status/index.html
@@ -13,6 +13,39 @@ SPDX-License-Identifier: MIT
     }
     ul {
       margin-left: 60px;
+      font-size: 0.9em;
+    }
+    details {
+      margin-bottom: 0;
+    }
+    details > ul {
+      margin-left: 0;
+      padding-left: 14px;
+    }
+    details > ul > li {
+      list-style-type: none;
+      font-size: 0.8em;
+    }
+    .cve-status {
+      display: flex;
+      margin: 0 60px;
+      align-items: stretch;
+    }
+    .cve-status > details {
+      flex: 1;
+    }
+    details > summary {
+      padding: 13px 14px;
+    }
+    details > summary:hover {
+      filter: invert(50%);
+    }
+    details[open] > summary {
+      margin-bottom: 6px;
+    }
+    summary.sub {
+      font-size: 0.8em;
+      padding: 6px 18px;
     }
   </style>
 </head>
@@ -20,12 +53,25 @@ SPDX-License-Identifier: MIT
 <body>
   <main>
     <h3>Current CVE status for OE-Core/Poky</h3>
-    <ul>
-      <li><a href="cve-status-master.txt">master</a></li>
-      <li><a href="cve-status-nanbield.txt">nanbield</a></li>
-      <li><a href="cve-status-kirkstone.txt">kirkstone</a></li>
-      <li><a href="cve-status-dunfell.txt">dunfell</a></li>
-    </ul>
+    <div class="cve-status">
+      <details>
+        <summary>master</summary>
+        <div id="cve_status_master"></div>
+      </details>
+
+      <details>
+        <summary>nanbield</summary>
+        <div id="cve_status_nanbield"></div>
+      </details>
+      <details>
+        <summary>kirkstone</summary>
+        <div id="cve_status_kirkstone"></div>
+      </details>
+      <details>
+        <summary>dunfell</summary>
+        <div id="cve_status_dunfell"></div>
+      </details>
+    </div>
 
     <!-- Prepare a DOM with a defined width and height for ECharts -->
     <section>
@@ -60,6 +106,68 @@ SPDX-License-Identifier: MIT
       <li><a href="releases.csv">releases.csv</a></li>
     </ul>
   </main>
+
+  <script type="text/javascript">
+    fetch('cve-status-master.txt')
+   .then(response => response.text())
+   .then(data => {
+      createCVEList('cve_status_master', data);
+   })
+
+   fetch('cve-status-nanbield.txt')
+   .then(response => response.text())
+   .then(data => {
+       createCVEList('cve_status_nanbield', data);
+   })
+
+   fetch('cve-status-kirkstone.txt')
+   .then(response => response.text())
+   .then(data => {
+       createCVEList('cve_status_kirkstone', data);
+   })
+
+   fetch('cve-status-dunfell.txt')
+   .then(response => response.text())
+   .then(data => {
+       createCVEList('cve_status_dunfell', data);
+   })
+
+    function parseTxtFile(data) {
+      const cveData = {}
+      const txtCVEs = data.split(/\n\s*\n/)
+      // skip the header
+      for (let i = 1; i < txtCVEs.length; i++) {
+        const urls = txtCVEs[i].split("\n");
+        packageName = urls[0]
+
+        cveData[packageName] = []
+        for (let i = 1; i < urls.length; i++) {
+          cveData[packageName].push(urls[i].toString().trim());
+        }
+      }
+      return cveData
+    }
+
+    function createCVEList(listid, data) {
+      const nestedDetails = document.getElementById(listid);
+      const cveData = parseTxtFile(data)
+      let html = "";
+      for (let [name, cves] of Object.entries(cveData)) {
+        html += '<details>';
+        html += `<summary class="sub">${name} CVEs</summary>`;
+        html += "<ul>";
+        for (const cve of cves) {
+          html += '<li>'
+          html += `<a href="${cve}" target="_blank">${cve}</a>`
+          html += '</li>';
+        }
+        html += "</ul>";
+        html += "</details>";
+        nestedDetails.innerHTML = html;
+    };
+   }
+  </script>
+
   <!-- get the data -->
   <script type="text/javascript">
     const status_names = {
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [yocto-patches] [PATCH 0/2] [yocto-autobuilder-helper] M10: Metrics view: CVEs per branch section and M11: Unify metrics views
  2024-04-18  9:49 [PATCH 0/2] [yocto-autobuilder-helper] M10: Metrics view: CVEs per branch section and M11: Unify metrics views Ninette Adhikari
                   ` (6 preceding siblings ...)
  2024-04-18  9:49 ` [PATCH 4/4] index.html: show summary in a collapsible list Ninette Adhikari
@ 2024-04-26 10:09 ` Richard Purdie
  7 siblings, 0 replies; 9+ messages in thread
From: Richard Purdie @ 2024-04-26 10:09 UTC (permalink / raw)
  To: yocto-patches; +Cc: engineering, hulkoba, Ninette Adhikari

On Thu, 2024-04-18 at 11:49 +0200, Ninette Adhikari via lists.yoctoproject.org wrote:
> This work is done according to "Milestone 10: Metrics view: CVEs per
> branch section and Milestone 11: Unify metrics views" as stated in
> the Scope of Work with Sovereign Tech Fund (STF)
> (https://www.sovereigntechfund.de/).
> 
> This patch affects the repository:
> https://git.yoctoproject.org/yocto-autobuilder-helper
> 
> This change does:
> - Don't create chartdata-lastyear.json files because they are not
> needed anymore
> - Change format for generated cve-per-branch-report so it can be
> interpreted by the metrics view:

Sorry for the delay on these, I had a number of challenges. The mailing
list patches didn't want to apply properly so I ended up pulling them
from the git repository. I have merged them and made them live.

The "../" path in the code didn't work in our environment so I removed
that bit to fix chart display.

There was also an issue with the addition of extra files in a sub
directory when then broke the copy commands so I fixed that to be
recursive.

The data still doesn't look quite right since I've applied the master
branch change but the other branches don't have it so the CVE text
files aren't in the new format which is breaking the non-master branch
listings.

Overall, it is nice to see the improved chart display though, thanks!

We just need to fix the other branches, not sure if you can help there
or I need to look at it?

Cheers,

Richard


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-04-26 10:09 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-18  9:49 [PATCH 0/2] [yocto-autobuilder-helper] M10: Metrics view: CVEs per branch section and M11: Unify metrics views Ninette Adhikari
2024-04-18  9:49 ` [PATCH 1/2] cve-report: Reformat txt recipe list per branch Ninette Adhikari
2024-04-18  9:49 ` [PATCH 2/2] generate-chartdata: do not create lastyear json files Ninette Adhikari
2024-04-18  9:49 ` [PATCH 0/4] [yocto-metrics] M10: Metrics view: CVEs per branch section and M11: Unify metrics views Ninette Adhikari
2024-04-18  9:49 ` [PATCH 1/4] patch-status: merge index- and index-full.html Ninette Adhikari
2024-04-18  9:49 ` [PATCH 2/4] patch-status/index.html: use pico.css Ninette Adhikari
2024-04-18  9:49 ` [PATCH 3/4] patch-status/index.html: use echarts to display all charts Ninette Adhikari
2024-04-18  9:49 ` [PATCH 4/4] index.html: show summary in a collapsible list Ninette Adhikari
2024-04-26 10:09 ` [yocto-patches] [PATCH 0/2] [yocto-autobuilder-helper] M10: Metrics view: CVEs per branch section and M11: Unify metrics views Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.