<!DOCTYPE html>
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  
  <meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport">
  <title>P1640R0: Error size benchmarking</title>
<style data-fill-with="stylesheet">/******************************************************************************
 *                   Style sheet for the W3C specifications                   *
 *
 * Special classes handled by this style sheet include:
 *
 * Indices
 *   - .toc for the Table of Contents (<ol class="toc">)
 *     + <span class="secno"> for the section numbers
 *   - #toc for the Table of Contents (<nav id="toc">)
 *   - ul.index for Indices (<a href="#ref">term</a><span>, in §N.M</span>)
 *   - table.index for Index Tables (e.g. for properties or elements)
 *
 * Structural Markup
 *   - table.data for general data tables
 *     -> use 'scope' attribute, <colgroup>, <thead>, and <tbody> for best results !
 *     -> use <table class='complex data'> for extra-complex tables
 *     -> use <td class='long'> for paragraph-length cell content
 *     -> use <td class='pre'> when manual line breaks/indentation would help readability
 *   - dl.switch for switch statements
 *   - ol.algorithm for algorithms (helps to visualize nesting)
 *   - .figure and .caption (HTML4) and figure and figcaption (HTML5)
 *     -> .sidefigure for right-floated figures
 *   - ins/del
 *
 * Code
 *   - pre and code
 *
 * Special Sections
 *   - .note       for informative notes             (div, p, span, aside, details)
 *   - .example    for informative examples          (div, p, pre, span)
 *   - .issue      for issues                        (div, p, span)
 *   - .assertion  for assertions                    (div, p, span)
 *   - .advisement for loud normative statements     (div, p, strong)
 *   - .annoying-warning for spec obsoletion notices (div, aside, details)
 *
 * Definition Boxes
 *   - pre.def   for WebIDL definitions
 *   - table.def for tables that define other entities (e.g. CSS properties)
 *   - dl.def    for definition lists that define other entitles (e.g. HTML elements)
 *
 * Numbering
 *   - .secno for section numbers in .toc and headings (<span class='secno'>3.2</span>)
 *   - .marker for source-inserted example/figure/issue numbers (<span class='marker'>Issue 4</span>)
 *   - ::before styled for CSS-generated issue/example/figure numbers:
 *     -> Documents wishing to use this only need to add
 *        figcaption::before,
 *        .caption::before { content: "Figure "  counter(figure) " ";  }
 *        .example::before { content: "Example " counter(example) " "; }
 *        .issue::before   { content: "Issue "   counter(issue) " ";   }
 *
 * Header Stuff (ignore, just don't conflict with these classes)
 *   - .head for the header
 *   - .copyright for the copyright
 *
 * Miscellaneous
 *   - .overlarge for things that should be as wide as possible, even if
 *     that overflows the body text area. This can be used on an item or
 *     on its container, depending on the effect desired.
 *     Note that this styling basically doesn't help at all when printing,
 *     since A4 paper isn't much wider than the max-width here.
 *     It's better to design things to fit into a narrower measure if possible.
 *   - js-added ToC jump links (see fixup.js)
 *
 ******************************************************************************/

/******************************************************************************/
/*                                   Body                                     */
/******************************************************************************/

	body {
		counter-reset: example figure issue;

		/* Layout */
		max-width: 50em;               /* limit line length to 50em for readability   */
		margin: 0 auto;                /* center text within page                     */
		padding: 1.6em 1.5em 2em 50px; /* assume 16px font size for downlevel clients */
		padding: 1.6em 1.5em 2em calc(26px + 1.5em); /* leave space for status flag     */

		/* Typography */
		line-height: 1.5;
		font-family: sans-serif;
		widows: 2;
		orphans: 2;
		word-wrap: break-word;
		overflow-wrap: break-word;
		hyphens: auto;

		/* Colors */
		color: black;
		background: white top left fixed no-repeat;
		background-size: 25px auto;
	}


/******************************************************************************/
/*                         Front Matter & Navigation                          */
/******************************************************************************/

/** Header ********************************************************************/

	div.head { margin-bottom: 1em }
	div.head hr { border-style: solid; }

	div.head h1 {
		font-weight: bold;
		margin: 0 0 .1em;
		font-size: 220%;
	}

	div.head h2 { margin-bottom: 1.5em;}

/** W3C Logo ******************************************************************/

	.head .logo {
		float: right;
		margin: 0.4rem 0 0.2rem .4rem;
	}

	.head img[src*="logos/W3C"] {
		display: block;
		border: solid #1a5e9a;
		border-width: .65rem .7rem .6rem;
		border-radius: .4rem;
		background: #1a5e9a;
		color: white;
		font-weight: bold;
	}

	.head a:hover > img[src*="logos/W3C"],
	.head a:focus > img[src*="logos/W3C"] {
		opacity: .8;
	}

	.head a:active > img[src*="logos/W3C"] {
		background: #c00;
		border-color: #c00;
	}

	/* see also additional rules in Link Styling section */

/** Copyright *****************************************************************/

	p.copyright,
	p.copyright small { font-size: small }

/** Back to Top / ToC Toggle **************************************************/

	@media print {
		#toc-nav {
			display: none;
		}
	}
	@media not print {
		#toc-nav {
			position: fixed;
			z-index: 2;
			bottom: 0; left: 0;
			margin: 0;
			min-width: 1.33em;
			border-top-right-radius: 2rem;
			box-shadow: 0 0 2px;
			font-size: 1.5em;
			color: black;
		}
		#toc-nav > a {
			display: block;
			white-space: nowrap;

			height: 1.33em;
			padding: .1em 0.3em;
			margin: 0;

			background: white;
			box-shadow: 0 0 2px;
			border: none;
			border-top-right-radius: 1.33em;
			background: white;
		}
		#toc-nav > #toc-jump {
			padding-bottom: 2em;
			margin-bottom: -1.9em;
		}

		#toc-nav > a:hover,
		#toc-nav > a:focus {
			background: #f8f8f8;
		}
		#toc-nav > a:not(:hover):not(:focus) {
			color: #707070;
		}

		/* statusbar gets in the way on keyboard focus; remove once browsers fix */
		#toc-nav > a[href="#toc"]:not(:hover):focus:last-child {
			padding-bottom: 1.5rem;
		}

		#toc-nav:not(:hover) > a:not(:focus) > span + span {
			/* Ideally this uses :focus-within on #toc-nav */
			display: none;
		}
		#toc-nav > a > span + span {
			padding-right: 0.2em;
		}

		#toc-toggle-inline {
			vertical-align: 0.05em;
			font-size: 80%;
			color: gray;
			color: hsla(203,20%,40%,.7);
			border-style: none;
			background: transparent;
			position: relative;
		}
		#toc-toggle-inline:hover:not(:active),
		#toc-toggle-inline:focus:not(:active) {
			text-shadow: 1px 1px silver;
			top: -1px;
			left: -1px;
		}

		#toc-nav :active {
			color: #C00;
		}
	}

/** ToC Sidebar ***************************************************************/

	/* Floating sidebar */
	@media screen {
		body.toc-sidebar #toc {
			position: fixed;
			top: 0; bottom: 0;
			left: 0;
			width: 23.5em;
			max-width: 80%;
			max-width: calc(100% - 2em - 26px);
			overflow: auto;
			padding: 0 1em;
			padding-left: 42px;
			padding-left: calc(1em + 26px);
			background: inherit;
			background-color: #f7f8f9;
			z-index: 1;
			box-shadow: -.1em 0 .25em rgba(0,0,0,.1) inset;
		}
		body.toc-sidebar #toc h2 {
			margin-top: .8rem;
			font-variant: small-caps;
			font-variant: all-small-caps;
			text-transform: lowercase;
			font-weight: bold;
			color: gray;
			color: hsla(203,20%,40%,.7);
		}
		body.toc-sidebar #toc-jump:not(:focus) {
			width: 0;
			height: 0;
			padding: 0;
			position: absolute;
			overflow: hidden;
		}
	}
	/* Hide main scroller when only the ToC is visible anyway */
	@media screen and (max-width: 28em) {
		body.toc-sidebar {
			overflow: hidden;
		}
	}

	/* Sidebar with its own space */
	@media screen and (min-width: 78em) {
		body:not(.toc-inline) #toc {
			position: fixed;
			top: 0; bottom: 0;
			left: 0;
			width: 23.5em;
			overflow: auto;
			padding: 0 1em;
			padding-left: 42px;
			padding-left: calc(1em + 26px);
			background: inherit;
			background-color: #f7f8f9;
			z-index: 1;
			box-shadow: -.1em 0 .25em rgba(0,0,0,.1) inset;
		}
		body:not(.toc-inline) #toc h2 {
			margin-top: .8rem;
			font-variant: small-caps;
			font-variant: all-small-caps;
			text-transform: lowercase;
			font-weight: bold;
			color: gray;
			color: hsla(203,20%,40%,.7);
		}

		body:not(.toc-inline) {
			padding-left: 29em;
		}
		/* See also Overflow section at the bottom */

		body:not(.toc-inline) #toc-jump:not(:focus) {
			width: 0;
			height: 0;
			padding: 0;
			position: absolute;
			overflow: hidden;
		}
	}
	@media screen and (min-width: 90em) {
		body:not(.toc-inline) {
			margin: 0 4em;
		}
	}

/******************************************************************************/
/*                                Sectioning                                  */
/******************************************************************************/

/** Headings ******************************************************************/

	h1, h2, h3, h4, h5, h6, dt {
		page-break-after: avoid;
		page-break-inside: avoid;
		font: 100% sans-serif;   /* Reset all font styling to clear out UA styles */
		font-family: inherit;    /* Inherit the font family. */
		line-height: 1.2;        /* Keep wrapped headings compact */
		hyphens: manual;         /* Hyphenated headings look weird */
	}

	h2, h3, h4, h5, h6 {
		margin-top: 3rem;
	}

	h1, h2, h3 {
		color: #005A9C;
		background: transparent;
	}

	h1 { font-size: 170%; }
	h2 { font-size: 140%; }
	h3 { font-size: 120%; }
	h4 { font-weight: bold; }
	h5 { font-style: italic; }
	h6 { font-variant: small-caps; }
	dt { font-weight: bold; }

/** Subheadings ***************************************************************/

	h1 + h2,
	#subtitle {
		/* #subtitle is a subtitle in an H2 under the H1 */
		margin-top: 0;
	}
	h2 + h3,
	h3 + h4,
	h4 + h5,
	h5 + h6 {
		margin-top: 1.2em; /* = 1 x line-height */
	}

/** Section divider ***********************************************************/

	:not(.head) > hr {
		font-size: 1.5em;
		text-align: center;
		margin: 1em auto;
		height: auto;
		border: transparent solid 0;
		background: transparent;
	}
	:not(.head) > hr::before {
		content: "\2727\2003\2003\2727\2003\2003\2727";
	}

/******************************************************************************/
/*                            Paragraphs and Lists                            */
/******************************************************************************/

	p {
		margin: 1em 0;
	}

	dd > p:first-child,
	li > p:first-child {
		margin-top: 0;
	}

	ul, ol {
		margin-left: 0;
		padding-left: 2em;
	}

	li {
		margin: 0.25em 0 0.5em;
		padding: 0;
	}

	dl dd {
		margin: 0 0 .5em 2em;
	}

	.head dd + dd { /* compact for header */
		margin-top: -.5em;
	}

	/* Style for algorithms */
	ol.algorithm ol:not(.algorithm),
	.algorithm > ol ol:not(.algorithm) {
	 border-left: 0.5em solid #DEF;
	}

	/* Put nice boxes around each algorithm. */
	[data-algorithm]:not(.heading) {
	  padding: .5em;
	  border: thin solid #ddd; border-radius: .5em;
	  margin: .5em calc(-0.5em - 1px);
	}
	[data-algorithm]:not(.heading) > :first-child {
	  margin-top: 0;
	}
	[data-algorithm]:not(.heading) > :last-child {
	  margin-bottom: 0;
	}

	/* Style for switch/case <dl>s */
	dl.switch > dd > ol.only,
	dl.switch > dd > .only > ol {
	 margin-left: 0;
	}
	dl.switch > dd > ol.algorithm,
	dl.switch > dd > .algorithm > ol {
	 margin-left: -2em;
	}
	dl.switch {
	 padding-left: 2em;
	}
	dl.switch > dt {
	 text-indent: -1.5em;
	 margin-top: 1em;
	}
	dl.switch > dt + dt {
	 margin-top: 0;
	}
	dl.switch > dt::before {
	 content: '\21AA';
	 padding: 0 0.5em 0 0;
	 display: inline-block;
	 width: 1em;
	 text-align: right;
	 line-height: 0.5em;
	}

/** Terminology Markup ********************************************************/


/******************************************************************************/
/*                                 Inline Markup                              */
/******************************************************************************/

/** Terminology Markup ********************************************************/
	dfn   { /* Defining instance */
		font-weight: bolder;
	}
	a > i { /* Instance of term */
		font-style: normal;
	}
	dt dfn code, code.idl {
		font-size: medium;
	}
	dfn var {
		font-style: normal;
	}

/** Change Marking ************************************************************/

	del { color: red;  text-decoration: line-through; }
	ins { color: #080; text-decoration: underline;    }

/** Miscellaneous improvements to inline formatting ***************************/

	sup {
		vertical-align: super;
		font-size: 80%
	}

/******************************************************************************/
/*                                    Code                                    */
/******************************************************************************/

/** General monospace/pre rules ***********************************************/

	pre, code, samp {
		font-family: Menlo, Consolas, "DejaVu Sans Mono", Monaco, monospace;
		font-size: .9em;
		page-break-inside: avoid;
		hyphens: none;
		text-transform: none;
	}
	pre code,
	code code {
		font-size: 100%;
	}

	pre {
		margin-top: 1em;
		margin-bottom: 1em;
		overflow: auto;
	}

/** Inline Code fragments *****************************************************/

  /* Do something nice. */

/******************************************************************************/
/*                                    Links                                   */
/******************************************************************************/

/** General Hyperlinks ********************************************************/

	/* We hyperlink a lot, so make it less intrusive */
	a[href] {
		color: #034575;
		text-decoration: none;
		border-bottom: 1px solid #707070;
		/* Need a bit of extending for it to look okay */
		padding: 0 1px 0;
		margin: 0 -1px 0;
	}
	a:visited {
		border-bottom-color: #BBB;
	}

	/* Use distinguishing colors when user is interacting with the link */
	a[href]:focus,
	a[href]:hover {
		background: #f8f8f8;
		background: rgba(75%, 75%, 75%, .25);
		border-bottom-width: 3px;
		margin-bottom: -2px;
	}
	a[href]:active {
		color: #C00;
		border-color: #C00;
	}

	/* Backout above styling for W3C logo */
	.head .logo,
	.head .logo a {
		border: none;
		text-decoration: none;
		background: transparent;
	}

/******************************************************************************/
/*                                    Images                                  */
/******************************************************************************/

	img {
		border-style: none;
	}

	/* For autogen numbers, add
	   .caption::before, figcaption::before { content: "Figure " counter(figure) ". "; }
	*/

	figure, .figure, .sidefigure {
		page-break-inside: avoid;
		text-align: center;
		margin: 2.5em 0;
	}
	.figure img,    .sidefigure img,    figure img,
	.figure object, .sidefigure object, figure object {
		max-width: 100%;
		margin: auto;
	}
	.figure pre, .sidefigure pre, figure pre {
		text-align: left;
		display: table;
		margin: 1em auto;
	}
	.figure table, figure table {
		margin: auto;
	}
	@media screen and (min-width: 20em) {
		.sidefigure {
			float: right;
			width: 50%;
			margin: 0 0 0.5em 0.5em
		}
	}
	.caption, figcaption, caption {
		font-style: italic;
		font-size: 90%;
	}
	.caption::before, figcaption::before, figcaption > .marker {
		font-weight: bold;
	}
	.caption, figcaption {
		counter-increment: figure;
	}

	/* DL list is indented 2em, but figure inside it is not */
	dd > .figure, dd > figure { margin-left: -2em }

/******************************************************************************/
/*                             Colored Boxes                                  */
/******************************************************************************/

	.issue, .note, .example, .assertion, .advisement, blockquote {
		padding: .5em;
		border: .5em;
		border-left-style: solid;
		page-break-inside: avoid;
	}
	span.issue, span.note {
		padding: .1em .5em .15em;
		border-right-style: solid;
	}

	.issue,
	.note,
	.example,
	.advisement,
	.assertion,
	blockquote {
		margin: 1em auto;
	}
	.note  > p:first-child,
	.issue > p:first-child,
	blockquote > :first-child {
		margin-top: 0;
	}
	blockquote > :last-child {
		margin-bottom: 0;
	}

/** Blockquotes ***************************************************************/

	blockquote {
		border-color: silver;
	}

/** Open issue ****************************************************************/

	.issue {
		border-color: #E05252;
		background: #FBE9E9;
		counter-increment: issue;
		overflow: auto;
	}
	.issue::before, .issue > .marker {
		text-transform: uppercase;
		color: #AE1E1E;
		padding-right: 1em;
		text-transform: uppercase;
	}
	/* Add .issue::before { content: "Issue " counter(issue) " "; } for autogen numbers,
	   or use class="marker" to mark up the issue number in source. */

/** Example *******************************************************************/

	.example {
		border-color: #E0CB52;
		background: #FCFAEE;
		counter-increment: example;
		overflow: auto;
		clear: both;
	}
	.example::before, .example > .marker {
		text-transform: uppercase;
		color: #827017;
		min-width: 7.5em;
		display: block;
	}
	/* Add .example::before { content: "Example " counter(example) " "; } for autogen numbers,
	   or use class="marker" to mark up the example number in source. */

/** Non-normative Note ********************************************************/

	.note {
		border-color: #52E052;
		background: #E9FBE9;
		overflow: auto;
	}

	.note::before, .note > .marker,
	details.note > summary::before,
	details.note > summary > .marker {
		text-transform: uppercase;
		display: block;
		color: hsl(120, 70%, 30%);
	}
	/* Add .note::before { content: "Note"; } for autogen label,
	   or use class="marker" to mark up the label in source. */

	details.note > summary {
		display: block;
		color: hsl(120, 70%, 30%);
	}
	details.note[open] > summary {
		border-bottom: 1px silver solid;
	}

/** Assertion Box *************************************************************/
	/*  for assertions in algorithms */

	.assertion {
		border-color: #AAA;
		background: #EEE;
	}

/** Advisement Box ************************************************************/
	/*  for attention-grabbing normative statements */

	.advisement {
		border-color: orange;
		border-style: none solid;
		background: #FFEECC;
	}
	strong.advisement {
		display: block;
		text-align: center;
	}
	.advisement > .marker {
		color: #B35F00;
	}

/** Spec Obsoletion Notice ****************************************************/
	/* obnoxious obsoletion notice for older/abandoned specs. */

	details {
		display: block;
	}
	summary {
		font-weight: bolder;
	}

	.annoying-warning:not(details),
	details.annoying-warning:not([open]) > summary,
	details.annoying-warning[open] {
		background: #fdd;
		color: red;
		font-weight: bold;
		padding: .75em 1em;
		border: thick red;
		border-style: solid;
		border-radius: 1em;
	}
	.annoying-warning :last-child {
		margin-bottom: 0;
	}

@media not print {
	details.annoying-warning[open] {
		position: fixed;
		left: 1em;
		right: 1em;
		bottom: 1em;
		z-index: 1000;
	}
}

	details.annoying-warning:not([open]) > summary {
		text-align: center;
	}

/** Entity Definition Boxes ***************************************************/

	.def {
		padding: .5em 1em;
		background: #DEF;
		margin: 1.2em 0;
		border-left: 0.5em solid #8CCBF2;
	}

/******************************************************************************/
/*                                    Tables                                  */
/******************************************************************************/

	th, td {
		text-align: left;
		text-align: start;
	}

/** Property/Descriptor Definition Tables *************************************/

	table.def {
		/* inherits .def box styling, see above */
		width: 100%;
		border-spacing: 0;
	}

	table.def td,
	table.def th {
		padding: 0.5em;
		vertical-align: baseline;
		border-bottom: 1px solid #bbd7e9;
	}

	table.def > tbody > tr:last-child th,
	table.def > tbody > tr:last-child td {
		border-bottom: 0;
	}

	table.def th {
		font-style: italic;
		font-weight: normal;
		padding-left: 1em;
		width: 3em;
	}

	/* For when values are extra-complex and need formatting for readability */
	table td.pre {
		white-space: pre-wrap;
	}

	/* A footnote at the bottom of a def table */
	table.def           td.footnote {
		padding-top: 0.6em;
	}
	table.def           td.footnote::before {
		content: " ";
		display: block;
		height: 0.6em;
		width: 4em;
		border-top: thin solid;
	}

/** Data tables (and properly marked-up index tables) *************************/
	/*
		 <table class="data"> highlights structural relationships in a table
		 when correct markup is used (e.g. thead/tbody, th vs. td, scope attribute)

		 Use class="complex data" for particularly complicated tables --
		 (This will draw more lines: busier, but clearer.)

		 Use class="long" on table cells with paragraph-like contents
		 (This will adjust text alignment accordingly.)
		 Alternately use class="longlastcol" on tables, to have the last column assume "long".
	*/

	table {
		word-wrap: normal;
		overflow-wrap: normal;
		hyphens: manual;
	}

	table.data,
	table.index {
		margin: 1em auto;
		border-collapse: collapse;
		border: hidden;
		width: 100%;
	}
	table.data caption,
	table.index caption {
		max-width: 50em;
		margin: 0 auto 1em;
	}

	table.data td,  table.data th,
	table.index td, table.index th {
		padding: 0.5em 1em;
		border-width: 1px;
		border-color: silver;
		border-top-style: solid;
	}

	table.data thead td:empty {
		padding: 0;
		border: 0;
	}

	table.data  thead,
	table.index thead,
	table.data  tbody,
	table.index tbody {
		border-bottom: 2px solid;
	}

	table.data colgroup,
	table.index colgroup {
		border-left: 2px solid;
	}

	table.data  tbody th:first-child,
	table.index tbody th:first-child  {
		border-right: 2px solid;
		border-top: 1px solid silver;
		padding-right: 1em;
	}

	table.data th[colspan],
	table.data td[colspan] {
		text-align: center;
	}

	table.complex.data th,
	table.complex.data td {
		border: 1px solid silver;
		text-align: center;
	}

	table.data.longlastcol td:last-child,
	table.data td.long {
	 vertical-align: baseline;
	 text-align: left;
	}

	table.data img {
		vertical-align: middle;
	}


/*
Alternate table alignment rules

	table.data,
	table.index {
		text-align: center;
	}

	table.data  thead th[scope="row"],
	table.index thead th[scope="row"] {
		text-align: right;
	}

	table.data  tbody th:first-child,
	table.index tbody th:first-child  {
		text-align: right;
	}

Possible extra rowspan handling

	table.data  tbody th[rowspan]:not([rowspan='1']),
	table.index tbody th[rowspan]:not([rowspan='1']),
	table.data  tbody td[rowspan]:not([rowspan='1']),
	table.index tbody td[rowspan]:not([rowspan='1']) {
		border-left: 1px solid silver;
	}

	table.data  tbody th[rowspan]:first-child,
	table.index tbody th[rowspan]:first-child,
	table.data  tbody td[rowspan]:first-child,
	table.index tbody td[rowspan]:first-child{
		border-left: 0;
		border-right: 1px solid silver;
	}
*/

/******************************************************************************/
/*                                  Indices                                   */
/******************************************************************************/


/** Table of Contents *********************************************************/

	.toc a {
		/* More spacing; use padding to make it part of the click target. */
		padding-top: 0.1rem;
		/* Larger, more consistently-sized click target */
		display: block;
		/* Reverse color scheme */
		color: black;
		border-color: #3980B5;
		border-bottom-width: 3px !important;
		margin-bottom: 0px !important;
	}
	.toc a:visited {
		border-color: #054572;
	}
	.toc a:not(:focus):not(:hover) {
		/* Allow colors to cascade through from link styling */
		border-bottom-color: transparent;
	}

	.toc, .toc ol, .toc ul, .toc li {
		list-style: none; /* Numbers must be inlined into source */
		/* because generated content isn't search/selectable and markers can't do multilevel yet */
		margin:  0;
		padding: 0;
		line-height: 1.1rem; /* consistent spacing */
	}

	/* ToC not indented until third level, but font style & margins show hierarchy */
	.toc > li             { font-weight: bold;   }
	.toc > li li          { font-weight: normal; }
	.toc > li li li       { font-size:   95%;    }
	.toc > li li li li    { font-size:   90%;    }
	.toc > li li li li .secno { font-size: 85%; }
	.toc > li li li li li { font-size:   85%;    }
	.toc > li li li li li .secno { font-size: 100%; }

	/* @supports not (display:grid) { */
		.toc > li             { margin: 1.5rem 0;    }
		.toc > li li          { margin: 0.3rem 0;    }
		.toc > li li li       { margin-left: 2rem;   }

		/* Section numbers in a column of their own */
		.toc .secno {
			float: left;
			width: 4rem;
			white-space: nowrap;
		}

		.toc li {
			clear: both;
		}

		:not(li) > .toc              { margin-left:  5rem; }
		.toc .secno                  { margin-left: -5rem; }
		.toc > li li li .secno       { margin-left: -7rem; }
		.toc > li li li li .secno    { margin-left: -9rem; }
		.toc > li li li li li .secno { margin-left: -11rem; }

		/* Tighten up indentation in narrow ToCs */
		@media (max-width: 30em) {
			:not(li) > .toc              { margin-left:  4rem; }
			.toc .secno                  { margin-left: -4rem; }
			.toc > li li li              { margin-left:  1rem; }
			.toc > li li li .secno       { margin-left: -5rem; }
			.toc > li li li li .secno    { margin-left: -6rem; }
			.toc > li li li li li .secno { margin-left: -7rem; }
		}
	/* } */

	@supports (display:grid) {
		/* Use #toc over .toc to override non-@supports rules. */
		#toc {
			display: grid;
			align-content: start;
			grid-template-columns: auto 1fr;
			grid-column-gap: 1rem;
			column-gap: 1rem;
			grid-row-gap: .6rem;
			row-gap: .6rem;
		}
		#toc h2 {
			grid-column: 1 / -1;
			margin-bottom: 0;
		}
		#toc ol,
		#toc li,
		#toc a {
			display: contents;
			/* Switch <a> to subgrid when supported */
		}
		#toc span {
			margin: 0;
		}
		#toc > .toc > li > a > span {
			/* The spans of the top-level list,
			   comprising the first items of each top-level section. */
			margin-top: 1.1rem;
		}
		#toc#toc .secno { /* Ugh, need more specificity to override base.css */
			grid-column: 1;
			width: auto;
			margin-left: 0;
		}
		#toc .content {
			grid-column: 2;
			width: auto;
			margin-right: 1rem;
		}
		#toc .content:hover {
			background: rgba(75%, 75%, 75%, .25);
			border-bottom: 3px solid #054572;
			margin-bottom: -3px;
		}
		#toc li li li .content {
			margin-left: 1rem;
		}
		#toc li li li li .content {
			margin-left: 2rem;
		}
	}


/** Index *********************************************************************/

	/* Index Lists: Layout */
	ul.index       { margin-left: 0; columns: 15em; text-indent: 1em hanging; }
	ul.index li    { margin-left: 0; list-style: none; break-inside: avoid; }
	ul.index li li { margin-left: 1em }
	ul.index dl    { margin-top: 0; }
	ul.index dt    { margin: .2em 0 .2em 20px;}
	ul.index dd    { margin: .2em 0 .2em 40px;}
	/* Index Lists: Typography */
	ul.index ul,
	ul.index dl { font-size: smaller; }
	@media not print {
		ul.index li span {
			white-space: nowrap;
			color: transparent; }
		ul.index li a:hover + span,
		ul.index li a:focus + span {
			color: #707070;
		}
	}

/** Index Tables *****************************************************/
	/* See also the data table styling section, which this effectively subclasses */

	table.index {
		font-size: small;
		border-collapse: collapse;
		border-spacing: 0;
		text-align: left;
		margin: 1em 0;
	}

	table.index td,
	table.index th {
		padding: 0.4em;
	}

	table.index tr:hover td:not([rowspan]),
	table.index tr:hover th:not([rowspan]) {
		background: #f7f8f9;
	}

	/* The link in the first column in the property table (formerly a TD) */
	table.index th:first-child a {
		font-weight: bold;
	}

/******************************************************************************/
/*                                    Print                                   */
/******************************************************************************/

	@media print {
		/* Pages have their own margins. */
		html {
			margin: 0;
		}
		/* Serif for print. */
		body {
			font-family: serif;
		}
	}
	@page {
		margin: 1.5cm 1.1cm;
	}

/******************************************************************************/
/*                                    Legacy                                  */
/******************************************************************************/

	/* This rule is inherited from past style sheets. No idea what it's for. */
	.hide { display: none }



/******************************************************************************/
/*                             Overflow Control                               */
/******************************************************************************/

	.figure .caption, .sidefigure .caption, figcaption {
		/* in case figure is overlarge, limit caption to 50em */
		max-width: 50rem;
		margin-left: auto;
		margin-right: auto;
	}
	.overlarge > table {
		/* limit preferred width of table */
		max-width: 50em;
		margin-left: auto;
		margin-right: auto;
	}

	@media (min-width: 55em) {
		.overlarge {
			margin-left: calc(13px + 26.5rem - 50vw);
			margin-right: calc(13px + 26.5rem - 50vw);
			max-width: none;
		}
	}
	@media screen and (min-width: 78em) {
		body:not(.toc-inline) .overlarge {
			/* 30.5em body padding 50em content area */
			margin-left: calc(40em - 50vw) !important;
			margin-right: calc(40em - 50vw) !important;
		}
	}
	@media screen and (min-width: 90em) {
		body:not(.toc-inline) .overlarge {
			/* 4em html margin 30.5em body padding 50em content area */
			margin-left: 0 !important;
			margin-right: calc(84.5em - 100vw) !important;
		}
	}

	@media not print {
		.overlarge {
			overflow-x: auto;
			/* See Lea Verou's explanation background-attachment:
			 * http://lea.verou.me/2012/04/background-attachment-local/
			 *
			background: top left  / 4em 100% linear-gradient(to right,  #ffffff, rgba(255, 255, 255, 0)) local,
			            top right / 4em 100% linear-gradient(to left, #ffffff, rgba(255, 255, 255, 0)) local,
			            top left  / 1em 100% linear-gradient(to right,  #c3c3c5, rgba(195, 195, 197, 0)) scroll,
			            top right / 1em 100% linear-gradient(to left, #c3c3c5, rgba(195, 195, 197, 0)) scroll,
			            white;
			background-repeat: no-repeat;
			*/
		}
	}
</style>
<style type="text/css">
    table, th, td {
      border: 1px solid black;
      border-collapse: collapse;
      vertical-align: top;
    }
    th, td {
      border-left: none;
      border-right: none;
      padding: 0px 10px;
    }
    th {
      text-align: center;
    }
  </style>
  <meta content="Bikeshed version e036b293b2a1c6b3630bc094922f64bed031a220" name="generator">
  <link href="https://wg21.link/P1640R0" rel="canonical">
  <link href="https://isocpp.org/favicon.ico" rel="icon">
<style>
blockquote.book {
  display: block;
  border-width: 2px 0;
  border-style: solid;
  border-color: #eee;
  padding: 1.5em 5em 0.5em 5em;
  margin: 1.5em 0;
  position: relative;
  text-align: justify;
}
blockquote.book:before {
  content: '\201C';
  position: absolute;
  top: 0em;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  width: 3rem;
  height: 2rem;
  font: 6em/1.08em 'PT Sans', sans-serif;
  color: #666;
  text-align: center;
}
blockquote.book:after {
  content: '\201D';
  position: absolute;
  bottom: -0.25em;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  width: 3rem;
  height: 2rem;
  font: 6em/1.08em 'PT Sans', sans-serif;
  color: #666;
  text-align: center;
}
cite {
  display: block;
  text-align: right;
  color: #e74c3c;
  margin: 0 -5em 1em 0;
}
</style>
<style>/* style-md-lists */

/* This is a weird hack for me not yet following the commonmark spec
   regarding paragraph and lists. */
[data-md] > :first-child {
    margin-top: 0;
}
[data-md] > :last-child {
    margin-bottom: 0;
}</style>
<style>/* style-counters */

body {
    counter-reset: example figure issue;
}
.issue {
    counter-increment: issue;
}
.issue:not(.no-marker)::before {
    content: "Issue " counter(issue);
}

.example {
    counter-increment: example;
}
.example:not(.no-marker)::before {
    content: "Example " counter(example);
}
.invalid.example:not(.no-marker)::before,
.illegal.example:not(.no-marker)::before {
    content: "Invalid Example" counter(example);
}

figcaption {
    counter-increment: figure;
}
figcaption:not(.no-marker)::before {
    content: "Figure " counter(figure) " ";
}</style>
<style>/* style-syntax-highlighting */

.highlight:not(.idl) { background: hsl(24, 20%, 95%); }
code.highlight { padding: .1em; border-radius: .3em; }
pre.highlight, pre > code.highlight { display: block; padding: 1em; margin: .5em 0; overflow: auto; border-radius: 0; }
c-[a] { color: #990055 } /* Keyword.Declaration */
c-[b] { color: #990055 } /* Keyword.Type */
c-[c] { color: #708090 } /* Comment */
c-[d] { color: #708090 } /* Comment.Multiline */
c-[e] { color: #0077aa } /* Name.Attribute */
c-[f] { color: #669900 } /* Name.Tag */
c-[g] { color: #222222 } /* Name.Variable */
c-[k] { color: #990055 } /* Keyword */
c-[l] { color: #000000 } /* Literal */
c-[m] { color: #000000 } /* Literal.Number */
c-[n] { color: #0077aa } /* Name */
c-[o] { color: #999999 } /* Operator */
c-[p] { color: #999999 } /* Punctuation */
c-[s] { color: #a67f59 } /* Literal.String */
c-[t] { color: #a67f59 } /* Literal.String.Single */
c-[u] { color: #a67f59 } /* Literal.String.Double */
c-[cp] { color: #708090 } /* Comment.Preproc */
c-[c1] { color: #708090 } /* Comment.Single */
c-[cs] { color: #708090 } /* Comment.Special */
c-[kc] { color: #990055 } /* Keyword.Constant */
c-[kn] { color: #990055 } /* Keyword.Namespace */
c-[kp] { color: #990055 } /* Keyword.Pseudo */
c-[kr] { color: #990055 } /* Keyword.Reserved */
c-[ld] { color: #000000 } /* Literal.Date */
c-[nc] { color: #0077aa } /* Name.Class */
c-[no] { color: #0077aa } /* Name.Constant */
c-[nd] { color: #0077aa } /* Name.Decorator */
c-[ni] { color: #0077aa } /* Name.Entity */
c-[ne] { color: #0077aa } /* Name.Exception */
c-[nf] { color: #0077aa } /* Name.Function */
c-[nl] { color: #0077aa } /* Name.Label */
c-[nn] { color: #0077aa } /* Name.Namespace */
c-[py] { color: #0077aa } /* Name.Property */
c-[ow] { color: #999999 } /* Operator.Word */
c-[mb] { color: #000000 } /* Literal.Number.Bin */
c-[mf] { color: #000000 } /* Literal.Number.Float */
c-[mh] { color: #000000 } /* Literal.Number.Hex */
c-[mi] { color: #000000 } /* Literal.Number.Integer */
c-[mo] { color: #000000 } /* Literal.Number.Oct */
c-[sb] { color: #a67f59 } /* Literal.String.Backtick */
c-[sc] { color: #a67f59 } /* Literal.String.Char */
c-[sd] { color: #a67f59 } /* Literal.String.Doc */
c-[se] { color: #a67f59 } /* Literal.String.Escape */
c-[sh] { color: #a67f59 } /* Literal.String.Heredoc */
c-[si] { color: #a67f59 } /* Literal.String.Interpol */
c-[sx] { color: #a67f59 } /* Literal.String.Other */
c-[sr] { color: #a67f59 } /* Literal.String.Regex */
c-[ss] { color: #a67f59 } /* Literal.String.Symbol */
c-[vc] { color: #0077aa } /* Name.Variable.Class */
c-[vg] { color: #0077aa } /* Name.Variable.Global */
c-[vi] { color: #0077aa } /* Name.Variable.Instance */
c-[il] { color: #000000 } /* Literal.Number.Integer.Long */
</style>
<style>/* style-selflinks */

.heading, .issue, .note, .example, li, dt {
    position: relative;
}
a.self-link {
    position: absolute;
    top: 0;
    left: calc(-1 * (3.5rem - 26px));
    width: calc(3.5rem - 26px);
    height: 2em;
    text-align: center;
    border: none;
    transition: opacity .2s;
    opacity: .5;
}
a.self-link:hover {
    opacity: 1;
}
.heading > a.self-link {
    font-size: 83%;
}
li > a.self-link {
    left: calc(-1 * (3.5rem - 26px) - 2em);
}
dfn > a.self-link {
    top: auto;
    left: auto;
    opacity: 0;
    width: 1.5em;
    height: 1.5em;
    background: gray;
    color: white;
    font-style: normal;
    transition: opacity .2s, background-color .2s, color .2s;
}
dfn:hover > a.self-link {
    opacity: 1;
}
dfn > a.self-link:hover {
    color: black;
}

a.self-link::before            { content: "¶"; }
.heading > a.self-link::before { content: "§"; }
dfn > a.self-link::before      { content: "#"; }</style>
<style>/* style-autolinks */

.css.css, .property.property, .descriptor.descriptor {
    color: #005a9c;
    font-size: inherit;
    font-family: inherit;
}
.css::before, .property::before, .descriptor::before {
    content: "‘";
}
.css::after, .property::after, .descriptor::after {
    content: "’";
}
.property, .descriptor {
    /* Don't wrap property and descriptor names */
    white-space: nowrap;
}
.type { /* CSS value <type> */
    font-style: italic;
}
pre .property::before, pre .property::after {
    content: "";
}
[data-link-type="property"]::before,
[data-link-type="propdesc"]::before,
[data-link-type="descriptor"]::before,
[data-link-type="value"]::before,
[data-link-type="function"]::before,
[data-link-type="at-rule"]::before,
[data-link-type="selector"]::before,
[data-link-type="maybe"]::before {
    content: "‘";
}
[data-link-type="property"]::after,
[data-link-type="propdesc"]::after,
[data-link-type="descriptor"]::after,
[data-link-type="value"]::after,
[data-link-type="function"]::after,
[data-link-type="at-rule"]::after,
[data-link-type="selector"]::after,
[data-link-type="maybe"]::after {
    content: "’";
}

[data-link-type].production::before,
[data-link-type].production::after,
.prod [data-link-type]::before,
.prod [data-link-type]::after {
    content: "";
}

[data-link-type=element],
[data-link-type=element-attr] {
    font-family: Menlo, Consolas, "DejaVu Sans Mono", monospace;
    font-size: .9em;
}
[data-link-type=element]::before { content: "<" }
[data-link-type=element]::after  { content: ">" }

[data-link-type=biblio] {
    white-space: pre;
}</style>
 </head><body class="h-entry toc-sidebar"><p id="toc-nav"><a id="toc-jump" href="#toc"><span aria-hidden="true">↑</span> <span>Jump to Table of Contents</span></a><a id="toc-toggle" href="#toc"><span aria-hidden="true">←</span> <span>Collapse Sidebar</span></a></p>
  <div class="head">
   <p data-fill-with="logo"></p>
   <h1 class="p-name no-ref" id="title">P1640R0<br>Error size benchmarking</h1>
   <h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Published Proposal, <time class="dt-updated" datetime="2019-06-02">2019-06-02</time></span></h2>
   <div data-fill-with="spec-metadata">
    <dl>
     <dt>This version:
     </dt><dd><a class="u-url" href="https://wg21.link/P1640R0">https://wg21.link/P1640R0</a>
     </dd><dt>Author:
     </dt><dd>
      </dd><dd class="editor p-author h-card vcard"><a class="p-name fn u-email email" href="mailto:ben.craig@gmail.com">Ben Craig</a> (<span class="p-org org">National Instruments</span>)
     </dd><dt>Audience:
     </dt><dd>WG21
     </dd><dt>Project:
     </dt><dd>ISO/IEC JTC1/SC22/WG21 14882: Programming Language — C++
     </dd><dt>Source:
     </dt><dd><a href="https://github.com/ben-craig/error_bench/blob/master/bench_blog.bs">github.com/ben-craig/error_bench/blob/master/bench_blog.bs</a>
    </dd></dl>
   </div>
   <div data-fill-with="warning"></div>
   <hr title="Separator for header">
  </div>
  <div class="p-summary" data-fill-with="abstract">
   <h2 class="no-num no-toc no-ref heading settled" id="abstract"><span class="content">Abstract</span></h2>
   <p>The author measures size costs of error handling approaches.  Exceptions are big, <code class="highlight"><c- n="">std</c-><c- o="">::</c-><c- n="">abort</c-></code> and integer error codes are small, <code class="highlight"><c- n="">expected</c-></code> is somewhere in between.</p>
  </div>
  <nav data-fill-with="table-of-contents" id="toc">
   <h2 class="no-num no-toc no-ref" id="contents">Table of Contents</h2>
   <ol class="toc" role="directory">
    <li><a href="#intro"><span class="secno">1</span> <span class="content">Introduction</span></a>
    </li><li><a href="#exception_impl"><span class="secno">2</span> <span class="content">Exception implementation</span></a>
    </li><li><a href="#methodology"><span class="secno">3</span> <span class="content">Measuring methodology</span></a>
    </li><li><a href="#starter_case"><span class="secno">4</span> <span class="content">Starter test cases</span></a>
    </li><li>
     <a href="#measurements"><span class="secno">5</span> <span class="content">Measurements</span></a>
     <ol class="toc">
      <li><a href="#neutral1"><span class="secno">5.1</span> <span class="content">Initial error neutral size cost</span></a>
      </li><li><a href="#neutral2"><span class="secno">5.2</span> <span class="content">Incremental error neutral size cost</span></a>
      </li><li><a href="#error1"><span class="secno">5.3</span> <span class="content">Initial size cost of signaling an error</span></a>
      </li><li><a href="#error2"><span class="secno">5.4</span> <span class="content">Incremental size cost of signaling an error</span></a>
      </li><li><a href="#handle1"><span class="secno">5.5</span> <span class="content">Initial size cost for handling an error</span></a>
      </li><li><a href="#handle2"><span class="secno">5.6</span> <span class="content">Incremental size cost for handling an error</span></a>
     </li></ol>
    </li><li><a href="#conclusion"><span class="secno">6</span> <span class="content">Conclusion</span></a>
    </li><li><a href="#ack"><span class="secno">7</span> <span class="content">Acknowledgments</span></a>
    </li><li><a href="#speed"><span class="secno"></span> <span class="content">Appendix A: Why no speed measurements?</span></a>
    </li><li>
     <a href="#build_flags"><span class="secno"></span> <span class="content">Appendix B: The build flags</span></a>
     <ol class="toc">
      <li><a href="#msvc"><span class="secno"></span> <span class="content">MSVC</span></a>
      </li><li><a href="#clang_x64"><span class="secno"></span> <span class="content">Clang x64</span></a>
      </li><li><a href="#gcc_x64"><span class="secno"></span> <span class="content">GCC x64</span></a>
     </li></ol>
    </li><li>
     <a href="#code"><span class="secno"></span> <span class="content">Appendix C: The code</span></a>
     <ol class="toc">
      <li><a href="#code_support"><span class="secno"></span> <span class="content">Common support code</span></a>
      </li><li><a href="#code_neutral1"><span class="secno"></span> <span class="content">Initial error neutral functions</span></a>
      </li><li><a href="#code_neutral2"><span class="secno"></span> <span class="content">Incremental error neutral functions</span></a>
      </li><li><a href="#code_error1"><span class="secno"></span> <span class="content">Initial signaling of an error</span></a>
      </li><li><a href="#code_error2"><span class="secno"></span> <span class="content">Incremental signaling of an error</span></a>
      </li><li><a href="#code_catch1"><span class="secno"></span> <span class="content">Initial handling of an error</span></a>
      </li><li><a href="#code_catch2"><span class="secno"></span> <span class="content">Incremental handling of an error</span></a>
     </li></ol>
    </li><li>
     <a href="#linear_graphs"><span class="secno"></span> <span class="content">Appendix D: Linear graphs</span></a>
     <ol class="toc">
      <li><a href="#linearneutral1"><span class="secno"></span> <span class="content">Initial error neutral cost, linear</span></a>
      </li><li><a href="#linearerror1"><span class="secno"></span> <span class="content">Initial cost of signaling an error, linear</span></a>
     </li></ol>
    </li><li>
     <a href="#references"><span class="secno"></span> <span class="content">References</span></a>
     <ol class="toc">
      <li><a href="#informative"><span class="secno"></span> <span class="content">Informative References</span></a>
     </li></ol>
   </li></ol>
  </nav>
  <main>
<script type="text/javascript">
var data_CmpTerm = [
  {
    type: 'bar',
    name: 'throw_exception',
    stack: 'throw_exception',
    itemStyle: {color: '#1b9e77'},
    data: [382891,102620,19990,6140]
  },
  {
    type: 'bar',
    name: 'throw_struct',
    stack: 'throw_struct',
    itemStyle: {color: '#d95f02'},
    data: [382891,102620,19990,6140]
  },
  {
    type: 'bar',
    name: 'throw_val',
    stack: 'throw_val',
    itemStyle: {color: '#7570b3'},
    data: [382891,102620,19990,6140]
  },
  {
    type: 'bar',
    name: 'stripped.outcome_std_error',
    stack: 'outcome_std_error',
    itemStyle: {color: '#e7298a'},
    data: [156,165,10646,6992]
  },
  {
    type: 'bar',
    name: 'outcome_std_error',
    stack: 'outcome_std_error',
    itemStyle: {color: '#F27DB9'},
    data: [57556,42905,18230,6992]
  },
  {
    type: 'bar',
    name: 'stripped.outcome_struct',
    stack: 'outcome_struct',
    itemStyle: {color: '#66a61e'},
    data: [88,104,10567,6948]
  },
  {
    type: 'bar',
    name: 'outcome_struct',
    stack: 'outcome_struct',
    itemStyle: {color: '#A6DE66'},
    data: [57480,42844,18135,6948]
  },
  {
    type: 'bar',
    name: 'stripped.outcome_val',
    stack: 'outcome_val',
    itemStyle: {color: '#e6ab02'},
    data: [59,65,10553,6936]
  },
  {
    type: 'bar',
    name: 'outcome_val',
    stack: 'outcome_val',
    itemStyle: {color: '#FFD45B'},
    data: [57451,42797,18121,6936]
  },
  {
    type: 'bar',
    name: 'stripped.tls_error_struct',
    stack: 'tls_error_struct',
    itemStyle: {color: '#a6761d'},
    data: [29,29,481,510]
  },
  {
    type: 'bar',
    name: 'tls_error_struct',
    stack: 'tls_error_struct',
    itemStyle: {color: '#E6B965'},
    data: [57405,42761,6885,510]
  },
  {
    type: 'bar',
    name: 'stripped.tls_error_val',
    stack: 'tls_error_val',
    itemStyle: {color: '#666666'},
    data: [28,28,214,215]
  },
  {
    type: 'bar',
    name: 'tls_error_val',
    stack: 'tls_error_val',
    itemStyle: {color: '#C4C3C3'},
    data: [57404,42760,6574,215]
  },
  {
    type: 'bar',
    name: 'stripped.expected_struct',
    stack: 'expected_struct',
    itemStyle: {color: '#1b9e77'},
    data: [52,29,61,63]
  },
  {
    type: 'bar',
    name: 'expected_struct',
    stack: 'expected_struct',
    itemStyle: {color: '#5EC2A4'},
    data: [57436,42769,6421,63]
  },
  {
    type: 'bar',
    name: 'stripped.expected_val',
    stack: 'expected_val',
    itemStyle: {color: '#d95f02'},
    data: [41,51,59,61]
  },
  {
    type: 'bar',
    name: 'expected_val',
    stack: 'expected_val',
    itemStyle: {color: '#FF9F55'},
    data: [57425,42783,6419,61]
  },
  {
    type: 'bar',
    name: 'stripped.ref_struct',
    stack: 'ref_struct',
    itemStyle: {color: '#7570b3'},
    data: [34,34,27,36]
  },
  {
    type: 'bar',
    name: 'ref_struct',
    stack: 'ref_struct',
    itemStyle: {color: '#CFCDEA'},
    data: [57418,42774,6387,36]
  },
  {
    type: 'bar',
    name: 'stripped.return_struct',
    stack: 'return_struct',
    itemStyle: {color: '#e7298a'},
    data: [30,27,58,29]
  },
  {
    type: 'bar',
    name: 'return_struct',
    stack: 'return_struct',
    itemStyle: {color: '#F27DB9'},
    data: [57422,42759,6434,29]
  },
  {
    type: 'bar',
    name: 'stripped.ref_val',
    stack: 'ref_val',
    itemStyle: {color: '#66a61e'},
    data: [29,26,21,31]
  },
  {
    type: 'bar',
    name: 'ref_val',
    stack: 'ref_val',
    itemStyle: {color: '#A6DE66'},
    data: [57413,42766,6381,31]
  },
  {
    type: 'bar',
    name: 'stripped.return_val',
    stack: 'return_val',
    itemStyle: {color: '#e6ab02'},
    data: [20,14,13,9]
  },
  {
    type: 'bar',
    name: 'return_val',
    stack: 'return_val',
    itemStyle: {color: '#FFD45B'},
    data: [57404,42746,6373,9]
  },
  {
    type: 'bar',
    name: 'noexcept_abort',
    stack: 'noexcept_abort',
    itemStyle: {color: '#a6761d'},
    data: [57376,42732,6360,0]
  },
  {
    type: 'bar',
    name: 'abort',
    stack: 'abort',
    itemStyle: {color: '#C4C3C3'},
    barCategoryGap: '10%',
    data: [57376,42732,6360,0]
  }
];

var data_Cost2ndNeutral = [
  {
    type: 'bar',
    name: 'throw_exception',
    stack: 'throw_exception',
    itemStyle: {color: '#1b9e77'},
    data: [140,124,85,105]
  },
  {
    type: 'bar',
    name: 'throw_struct',
    stack: 'throw_struct',
    itemStyle: {color: '#d95f02'},
    data: [140,124,85,105]
  },
  {
    type: 'bar',
    name: 'throw_val',
    stack: 'throw_val',
    itemStyle: {color: '#7570b3'},
    data: [140,124,85,105]
  },
  {
    type: 'bar',
    name: 'stripped.outcome_std_error',
    stack: 'outcome_std_error',
    itemStyle: {color: '#e7298a'},
    data: [190,175,225,173]
  },
  {
    type: 'bar',
    name: 'outcome_std_error',
    stack: 'outcome_std_error',
    itemStyle: {color: '#F27DB9'},
    data: [278,271,253,173]
  },
  {
    type: 'bar',
    name: 'stripped.outcome_struct',
    stack: 'outcome_struct',
    itemStyle: {color: '#66a61e'},
    data: [126,149,145,133]
  },
  {
    type: 'bar',
    name: 'outcome_struct',
    stack: 'outcome_struct',
    itemStyle: {color: '#A6DE66'},
    data: [214,213,165,133]
  },
  {
    type: 'bar',
    name: 'stripped.outcome_val',
    stack: 'outcome_val',
    itemStyle: {color: '#e6ab02'},
    data: [104,110,130,119]
  },
  {
    type: 'bar',
    name: 'outcome_val',
    stack: 'outcome_val',
    itemStyle: {color: '#FFD45B'},
    data: [192,166,158,119]
  },
  {
    type: 'bar',
    name: 'stripped.tls_error_struct',
    stack: 'tls_error_struct',
    itemStyle: {color: '#a6761d'},
    data: [77,77,80,75]
  },
  {
    type: 'bar',
    name: 'tls_error_struct',
    stack: 'tls_error_struct',
    itemStyle: {color: '#E6B965'},
    data: [149,133,92,75]
  },
  {
    type: 'bar',
    name: 'stripped.tls_error_val',
    stack: 'tls_error_val',
    itemStyle: {color: '#666666'},
    data: [76,76,79,75]
  },
  {
    type: 'bar',
    name: 'tls_error_val',
    stack: 'tls_error_val',
    itemStyle: {color: '#C4C3C3'},
    data: [148,132,91,75]
  },
  {
    type: 'bar',
    name: 'stripped.expected_struct',
    stack: 'expected_struct',
    itemStyle: {color: '#1b9e77'},
    data: [81,74,115,106]
  },
  {
    type: 'bar',
    name: 'expected_struct',
    stack: 'expected_struct',
    itemStyle: {color: '#5EC2A4'},
    data: [161,138,127,106]
  },
  {
    type: 'bar',
    name: 'stripped.expected_val',
    stack: 'expected_val',
    itemStyle: {color: '#d95f02'},
    data: [76,96,113,104]
  },
  {
    type: 'bar',
    name: 'expected_val',
    stack: 'expected_val',
    itemStyle: {color: '#FF9F55'},
    data: [156,152,141,104]
  },
  {
    type: 'bar',
    name: 'stripped.ref_struct',
    stack: 'ref_struct',
    itemStyle: {color: '#7570b3'},
    data: [62,63,72,66]
  },
  {
    type: 'bar',
    name: 'ref_struct',
    stack: 'ref_struct',
    itemStyle: {color: '#CFCDEA'},
    data: [150,127,84,66]
  },
  {
    type: 'bar',
    name: 'stripped.return_struct',
    stack: 'return_struct',
    itemStyle: {color: '#e7298a'},
    data: [75,75,113,71]
  },
  {
    type: 'bar',
    name: 'return_struct',
    stack: 'return_struct',
    itemStyle: {color: '#F27DB9'},
    data: [163,131,141,71]
  },
  {
    type: 'bar',
    name: 'stripped.ref_val',
    stack: 'ref_val',
    itemStyle: {color: '#66a61e'},
    data: [67,64,71,66]
  },
  {
    type: 'bar',
    name: 'ref_val',
    stack: 'ref_val',
    itemStyle: {color: '#A6DE66'},
    data: [155,128,83,66]
  },
  {
    type: 'bar',
    name: 'stripped.return_val',
    stack: 'return_val',
    itemStyle: {color: '#e6ab02'},
    data: [55,62,68,63]
  },
  {
    type: 'bar',
    name: 'return_val',
    stack: 'return_val',
    itemStyle: {color: '#FFD45B'},
    data: [135,118,80,63]
  },
  {
    type: 'bar',
    name: 'noexcept_abort',
    stack: 'noexcept_abort',
    itemStyle: {color: '#a6761d'},
    data: [120,104,61,49]
  },
  {
    type: 'bar',
    name: 'stripped.abort',
    stack: 'abort',
    itemStyle: {color: '#666666'},
    data: [48,48,49,49]
  },
  {
    type: 'bar',
    name: 'abort',
    stack: 'abort',
    itemStyle: {color: '#C4C3C3'},
    barCategoryGap: '10%',
    data: [120,104,61,49]
  }
];

var data_Cost1stError = [
  {
    type: 'bar',
    name: 'throw_exception',
    stack: 'throw_exception',
    itemStyle: {color: '#1b9e77'},
    data: [256,2933,827,633]
  },
  {
    type: 'bar',
    name: 'throw_struct',
    stack: 'throw_struct',
    itemStyle: {color: '#d95f02'},
    data: [139,2746,226,161]
  },
  {
    type: 'bar',
    name: 'throw_val',
    stack: 'throw_val',
    itemStyle: {color: '#7570b3'},
    data: [310,3080,178,103]
  },
  {
    type: 'bar',
    name: 'stripped.outcome_std_error',
    stack: 'outcome_std_error',
    itemStyle: {color: '#e7298a'},
    data: [2844,2907,4392,3241]
  },
  {
    type: 'bar',
    name: 'outcome_std_error',
    stack: 'outcome_std_error',
    itemStyle: {color: '#F27DB9'},
    data: [3100,3099,4404,3241]
  },
  {
    type: 'bar',
    name: 'stripped.outcome_struct',
    stack: 'outcome_struct',
    itemStyle: {color: '#66a61e'},
    data: [49,36,61,34]
  },
  {
    type: 'bar',
    name: 'outcome_struct',
    stack: 'outcome_struct',
    itemStyle: {color: '#A6DE66'},
    data: [49,36,81,34]
  },
  {
    type: 'bar',
    name: 'stripped.outcome_val',
    stack: 'outcome_val',
    itemStyle: {color: '#e6ab02'},
    data: [23,29,27,27]
  },
  {
    type: 'bar',
    name: 'outcome_val',
    stack: 'outcome_val',
    itemStyle: {color: '#FFD45B'},
    data: [23,29,27,27]
  },
  {
    type: 'bar',
    name: 'stripped.tls_error_struct',
    stack: 'tls_error_struct',
    itemStyle: {color: '#a6761d'},
    data: [46,38,61,64]
  },
  {
    type: 'bar',
    name: 'tls_error_struct',
    stack: 'tls_error_struct',
    itemStyle: {color: '#E6B965'},
    data: [46,38,61,64]
  },
  {
    type: 'bar',
    name: 'stripped.tls_error_val',
    stack: 'tls_error_val',
    itemStyle: {color: '#666666'},
    data: [24,24,44,38]
  },
  {
    type: 'bar',
    name: 'tls_error_val',
    stack: 'tls_error_val',
    itemStyle: {color: '#C4C3C3'},
    data: [24,24,44,38]
  },
  {
    type: 'bar',
    name: 'stripped.expected_struct',
    stack: 'expected_struct',
    itemStyle: {color: '#1b9e77'},
    data: [47,32,73,31]
  },
  {
    type: 'bar',
    name: 'expected_struct',
    stack: 'expected_struct',
    itemStyle: {color: '#5EC2A4'},
    data: [47,32,93,31]
  },
  {
    type: 'bar',
    name: 'stripped.expected_val',
    stack: 'expected_val',
    itemStyle: {color: '#d95f02'},
    data: [17,45,24,24]
  },
  {
    type: 'bar',
    name: 'expected_val',
    stack: 'expected_val',
    itemStyle: {color: '#FF9F55'},
    data: [17,45,24,24]
  },
  {
    type: 'bar',
    name: 'stripped.ref_struct',
    stack: 'ref_struct',
    itemStyle: {color: '#7570b3'},
    data: [40,27,50,30]
  },
  {
    type: 'bar',
    name: 'ref_struct',
    stack: 'ref_struct',
    itemStyle: {color: '#CFCDEA'},
    data: [40,27,50,30]
  },
  {
    type: 'bar',
    name: 'stripped.return_struct',
    stack: 'return_struct',
    itemStyle: {color: '#e7298a'},
    data: [26,26,51,23]
  },
  {
    type: 'bar',
    name: 'return_struct',
    stack: 'return_struct',
    itemStyle: {color: '#F27DB9'},
    data: [26,26,51,23]
  },
  {
    type: 'bar',
    name: 'stripped.ref_val',
    stack: 'ref_val',
    itemStyle: {color: '#66a61e'},
    data: [18,18,19,23]
  },
  {
    type: 'bar',
    name: 'ref_val',
    stack: 'ref_val',
    itemStyle: {color: '#A6DE66'},
    data: [18,18,19,23]
  },
  {
    type: 'bar',
    name: 'stripped.return_val',
    stack: 'return_val',
    itemStyle: {color: '#e6ab02'},
    data: [13,13,13,16]
  },
  {
    type: 'bar',
    name: 'return_val',
    stack: 'return_val',
    itemStyle: {color: '#FFD45B'},
    data: [13,13,13,16]
  },
  {
    type: 'bar',
    name: 'noexcept_abort',
    stack: 'noexcept_abort',
    itemStyle: {color: '#a6761d'},
    data: [18,21,13647,6100]
  },
  {
    type: 'bar',
    name: 'stripped.abort',
    stack: 'abort',
    itemStyle: {color: '#666666'},
    data: [18,21,21,17]
  },
  {
    type: 'bar',
    name: 'abort',
    stack: 'abort',
    itemStyle: {color: '#C4C3C3'},
    barCategoryGap: '10%',
    data: [18,21,33,17]
  }
];

var data_Cost2ndError = [
  {
    type: 'bar',
    name: 'throw_exception',
    stack: 'throw_exception',
    itemStyle: {color: '#1b9e77'},
    data: [66,60,68,41]
  },
  {
    type: 'bar',
    name: 'throw_struct',
    stack: 'throw_struct',
    itemStyle: {color: '#d95f02'},
    data: [77,58,77,52]
  },
  {
    type: 'bar',
    name: 'throw_val',
    stack: 'throw_val',
    itemStyle: {color: '#7570b3'},
    data: [55,49,61,35]
  },
  {
    type: 'bar',
    name: 'stripped.outcome_std_error',
    stack: 'outcome_std_error',
    itemStyle: {color: '#e7298a'},
    data: [38,38,44,36]
  },
  {
    type: 'bar',
    name: 'outcome_std_error',
    stack: 'outcome_std_error',
    itemStyle: {color: '#F27DB9'},
    data: [38,38,44,36]
  },
  {
    type: 'bar',
    name: 'stripped.outcome_struct',
    stack: 'outcome_struct',
    itemStyle: {color: '#66a61e'},
    data: [53,38,69,36]
  },
  {
    type: 'bar',
    name: 'outcome_struct',
    stack: 'outcome_struct',
    itemStyle: {color: '#A6DE66'},
    data: [53,38,81,36]
  },
  {
    type: 'bar',
    name: 'stripped.outcome_val',
    stack: 'outcome_val',
    itemStyle: {color: '#e6ab02'},
    data: [30,31,35,29]
  },
  {
    type: 'bar',
    name: 'outcome_val',
    stack: 'outcome_val',
    itemStyle: {color: '#FFD45B'},
    data: [30,31,35,29]
  },
  {
    type: 'bar',
    name: 'stripped.tls_error_struct',
    stack: 'tls_error_struct',
    itemStyle: {color: '#a6761d'},
    data: [49,41,65,47]
  },
  {
    type: 'bar',
    name: 'tls_error_struct',
    stack: 'tls_error_struct',
    itemStyle: {color: '#E6B965'},
    data: [49,41,65,47]
  },
  {
    type: 'bar',
    name: 'stripped.tls_error_val',
    stack: 'tls_error_val',
    itemStyle: {color: '#666666'},
    data: [27,27,48,37]
  },
  {
    type: 'bar',
    name: 'tls_error_val',
    stack: 'tls_error_val',
    itemStyle: {color: '#C4C3C3'},
    data: [27,27,48,37]
  },
  {
    type: 'bar',
    name: 'stripped.expected_struct',
    stack: 'expected_struct',
    itemStyle: {color: '#1b9e77'},
    data: [49,34,65,30]
  },
  {
    type: 'bar',
    name: 'expected_struct',
    stack: 'expected_struct',
    itemStyle: {color: '#5EC2A4'},
    data: [49,34,77,30]
  },
  {
    type: 'bar',
    name: 'stripped.expected_val',
    stack: 'expected_val',
    itemStyle: {color: '#d95f02'},
    data: [28,47,32,23]
  },
  {
    type: 'bar',
    name: 'expected_val',
    stack: 'expected_val',
    itemStyle: {color: '#FF9F55'},
    data: [28,47,32,23]
  },
  {
    type: 'bar',
    name: 'stripped.ref_struct',
    stack: 'ref_struct',
    itemStyle: {color: '#7570b3'},
    data: [43,30,42,30]
  },
  {
    type: 'bar',
    name: 'ref_struct',
    stack: 'ref_struct',
    itemStyle: {color: '#CFCDEA'},
    data: [43,30,42,30]
  },
  {
    type: 'bar',
    name: 'stripped.return_struct',
    stack: 'return_struct',
    itemStyle: {color: '#e7298a'},
    data: [25,25,43,22]
  },
  {
    type: 'bar',
    name: 'return_struct',
    stack: 'return_struct',
    itemStyle: {color: '#F27DB9'},
    data: [25,25,43,22]
  },
  {
    type: 'bar',
    name: 'stripped.ref_val',
    stack: 'ref_val',
    itemStyle: {color: '#66a61e'},
    data: [21,21,27,22]
  },
  {
    type: 'bar',
    name: 'ref_val',
    stack: 'ref_val',
    itemStyle: {color: '#A6DE66'},
    data: [21,21,27,22]
  },
  {
    type: 'bar',
    name: 'stripped.return_val',
    stack: 'return_val',
    itemStyle: {color: '#e6ab02'},
    data: [19,19,22,15]
  },
  {
    type: 'bar',
    name: 'return_val',
    stack: 'return_val',
    itemStyle: {color: '#FFD45B'},
    data: [19,19,22,15]
  },
  {
    type: 'bar',
    name: 'noexcept_abort',
    stack: 'noexcept_abort',
    itemStyle: {color: '#a6761d'},
    data: [20,23,60,56]
  },
  {
    type: 'bar',
    name: 'stripped.abort',
    stack: 'abort',
    itemStyle: {color: '#666666'},
    data: [20,23,24,15]
  },
  {
    type: 'bar',
    name: 'abort',
    stack: 'abort',
    itemStyle: {color: '#C4C3C3'},
    barCategoryGap: '10%',
    data: [20,23,36,15]
  }
];

var data_Cost1stCatch = [
  {
    type: 'bar',
    name: 'throw_exception',
    stack: 'throw_exception',
    itemStyle: {color: '#1b9e77'},
    data: [53,63,77,126]
  },
  {
    type: 'bar',
    name: 'throw_struct',
    stack: 'throw_struct',
    itemStyle: {color: '#d95f02'},
    data: [53,63,85,134]
  },
  {
    type: 'bar',
    name: 'throw_val',
    stack: 'throw_val',
    itemStyle: {color: '#7570b3'},
    data: [53,63,77,134]
  },
  {
    type: 'bar',
    name: 'stripped.outcome_std_error',
    stack: 'outcome_std_error',
    itemStyle: {color: '#e7298a'},
    data: [23,20,37,26]
  },
  {
    type: 'bar',
    name: 'outcome_std_error',
    stack: 'outcome_std_error',
    itemStyle: {color: '#F27DB9'},
    data: [31,20,37,26]
  },
  {
    type: 'bar',
    name: 'stripped.outcome_struct',
    stack: 'outcome_struct',
    itemStyle: {color: '#66a61e'},
    data: [25,17,16,19]
  },
  {
    type: 'bar',
    name: 'outcome_struct',
    stack: 'outcome_struct',
    itemStyle: {color: '#A6DE66'},
    data: [33,17,16,19]
  },
  {
    type: 'bar',
    name: 'stripped.outcome_val',
    stack: 'outcome_val',
    itemStyle: {color: '#e6ab02'},
    data: [17,22,16,19]
  },
  {
    type: 'bar',
    name: 'outcome_val',
    stack: 'outcome_val',
    itemStyle: {color: '#FFD45B'},
    data: [17,22,16,19]
  },
  {
    type: 'bar',
    name: 'stripped.tls_error_struct',
    stack: 'tls_error_struct',
    itemStyle: {color: '#a6761d'},
    data: [61,68,48,42]
  },
  {
    type: 'bar',
    name: 'tls_error_struct',
    stack: 'tls_error_struct',
    itemStyle: {color: '#E6B965'},
    data: [69,76,48,42]
  },
  {
    type: 'bar',
    name: 'stripped.tls_error_val',
    stack: 'tls_error_val',
    itemStyle: {color: '#666666'},
    data: [54,57,43,36]
  },
  {
    type: 'bar',
    name: 'tls_error_val',
    stack: 'tls_error_val',
    itemStyle: {color: '#C4C3C3'},
    data: [62,65,43,36]
  },
  {
    type: 'bar',
    name: 'stripped.expected_struct',
    stack: 'expected_struct',
    itemStyle: {color: '#1b9e77'},
    data: [25,17,13,19]
  },
  {
    type: 'bar',
    name: 'expected_struct',
    stack: 'expected_struct',
    itemStyle: {color: '#5EC2A4'},
    data: [33,17,13,19]
  },
  {
    type: 'bar',
    name: 'stripped.expected_val',
    stack: 'expected_val',
    itemStyle: {color: '#d95f02'},
    data: [18,22,13,19]
  },
  {
    type: 'bar',
    name: 'expected_val',
    stack: 'expected_val',
    itemStyle: {color: '#FF9F55'},
    data: [18,22,13,19]
  },
  {
    type: 'bar',
    name: 'stripped.ref_struct',
    stack: 'ref_struct',
    itemStyle: {color: '#7570b3'},
    data: [23,34,25,18]
  },
  {
    type: 'bar',
    name: 'ref_struct',
    stack: 'ref_struct',
    itemStyle: {color: '#CFCDEA'},
    data: [23,34,25,18]
  },
  {
    type: 'bar',
    name: 'stripped.return_struct',
    stack: 'return_struct',
    itemStyle: {color: '#e7298a'},
    data: [15,15,21,18]
  },
  {
    type: 'bar',
    name: 'return_struct',
    stack: 'return_struct',
    itemStyle: {color: '#F27DB9'},
    data: [15,15,21,18]
  },
  {
    type: 'bar',
    name: 'stripped.ref_val',
    stack: 'ref_val',
    itemStyle: {color: '#66a61e'},
    data: [13,25,19,16]
  },
  {
    type: 'bar',
    name: 'ref_val',
    stack: 'ref_val',
    itemStyle: {color: '#A6DE66'},
    data: [21,25,19,16]
  },
  {
    type: 'bar',
    name: 'stripped.return_val',
    stack: 'return_val',
    itemStyle: {color: '#e6ab02'},
    data: [14,14,19,18]
  },
  {
    type: 'bar',
    name: 'return_val',
    stack: 'return_val',
    itemStyle: {color: '#FFD45B'},
    data: [14,14,19,18]
  }
];

var data_Cost2ndCatch = [
  {
    type: 'bar',
    name: 'throw_exception',
    stack: 'throw_exception',
    itemStyle: {color: '#1b9e77'},
    data: [29,34,25,64]
  },
  {
    type: 'bar',
    name: 'throw_struct',
    stack: 'throw_struct',
    itemStyle: {color: '#d95f02'},
    data: [29,34,17,64]
  },
  {
    type: 'bar',
    name: 'throw_val',
    stack: 'throw_val',
    itemStyle: {color: '#7570b3'},
    data: [29,34,25,64]
  },
  {
    type: 'bar',
    name: 'stripped.outcome_std_error',
    stack: 'outcome_std_error',
    itemStyle: {color: '#e7298a'},
    data: [19,21,19,20]
  },
  {
    type: 'bar',
    name: 'outcome_std_error',
    stack: 'outcome_std_error',
    itemStyle: {color: '#F27DB9'},
    data: [19,21,19,20]
  },
  {
    type: 'bar',
    name: 'stripped.outcome_struct',
    stack: 'outcome_struct',
    itemStyle: {color: '#66a61e'},
    data: [26,17,16,15]
  },
  {
    type: 'bar',
    name: 'outcome_struct',
    stack: 'outcome_struct',
    itemStyle: {color: '#A6DE66'},
    data: [34,17,16,15]
  },
  {
    type: 'bar',
    name: 'stripped.outcome_val',
    stack: 'outcome_val',
    itemStyle: {color: '#e6ab02'},
    data: [40,22,16,15]
  },
  {
    type: 'bar',
    name: 'outcome_val',
    stack: 'outcome_val',
    itemStyle: {color: '#FFD45B'},
    data: [56,22,16,15]
  },
  {
    type: 'bar',
    name: 'stripped.tls_error_struct',
    stack: 'tls_error_struct',
    itemStyle: {color: '#a6761d'},
    data: [58,64,60,35]
  },
  {
    type: 'bar',
    name: 'tls_error_struct',
    stack: 'tls_error_struct',
    itemStyle: {color: '#E6B965'},
    data: [58,64,68,35]
  },
  {
    type: 'bar',
    name: 'stripped.tls_error_val',
    stack: 'tls_error_val',
    itemStyle: {color: '#666666'},
    data: [49,53,37,29]
  },
  {
    type: 'bar',
    name: 'tls_error_val',
    stack: 'tls_error_val',
    itemStyle: {color: '#C4C3C3'},
    data: [49,53,37,29]
  },
  {
    type: 'bar',
    name: 'stripped.expected_struct',
    stack: 'expected_struct',
    itemStyle: {color: '#1b9e77'},
    data: [26,17,13,17]
  },
  {
    type: 'bar',
    name: 'expected_struct',
    stack: 'expected_struct',
    itemStyle: {color: '#5EC2A4'},
    data: [34,17,13,17]
  },
  {
    type: 'bar',
    name: 'stripped.expected_val',
    stack: 'expected_val',
    itemStyle: {color: '#d95f02'},
    data: [24,22,13,17]
  },
  {
    type: 'bar',
    name: 'expected_val',
    stack: 'expected_val',
    itemStyle: {color: '#FF9F55'},
    data: [32,22,13,17]
  },
  {
    type: 'bar',
    name: 'stripped.ref_struct',
    stack: 'ref_struct',
    itemStyle: {color: '#7570b3'},
    data: [36,17,17,13]
  },
  {
    type: 'bar',
    name: 'ref_struct',
    stack: 'ref_struct',
    itemStyle: {color: '#CFCDEA'},
    data: [44,17,17,13]
  },
  {
    type: 'bar',
    name: 'stripped.return_struct',
    stack: 'return_struct',
    itemStyle: {color: '#e7298a'},
    data: [21,15,25,16]
  },
  {
    type: 'bar',
    name: 'return_struct',
    stack: 'return_struct',
    itemStyle: {color: '#F27DB9'},
    data: [29,15,25,16]
  },
  {
    type: 'bar',
    name: 'stripped.ref_val',
    stack: 'ref_val',
    itemStyle: {color: '#66a61e'},
    data: [32,17,14,13]
  },
  {
    type: 'bar',
    name: 'ref_val',
    stack: 'ref_val',
    itemStyle: {color: '#A6DE66'},
    data: [40,17,14,13]
  },
  {
    type: 'bar',
    name: 'stripped.return_val',
    stack: 'return_val',
    itemStyle: {color: '#e6ab02'},
    data: [20,14,16,16]
  },
  {
    type: 'bar',
    name: 'return_val',
    stack: 'return_val',
    itemStyle: {color: '#FFD45B'},
    data: [28,14,16,16]
  }
];

</script>
<script type="text/javascript">
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,function(t){"use strict";var e=2311,i=function(){return e++},n="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:"undefined"==typeof navigator?{browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:function(t){var e={},i=t.match(/Firefox\/([\d.]+)/),n=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),r=t.match(/Edge\/([\d.]+)/),a=/micromessenger/i.test(t);i&&(e.firefox=!0,e.version=i[1]);n&&(e.ie=!0,e.version=n[1]);r&&(e.edge=!0,e.version=r[1]);a&&(e.weChat=!0);return{browser:e,os:{},node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!e.ie&&!e.edge,pointerEventsSupported:"onpointerdown"in window&&(e.edge||e.ie&&e.version>=11),domSupported:"undefined"!=typeof document}}(navigator.userAgent);var r={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},a={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},o=Object.prototype.toString,s=Array.prototype,l=s.forEach,h=s.filter,u=s.slice,c=s.map,d=s.reduce,f={};function p(t,e){"createCanvas"===t&&(_=null),f[t]=e}function g(t){if(null==t||"object"!=typeof t)return t;var e=t,i=o.call(t);if("[object Array]"===i){if(!$(t)){e=[];for(var n=0,s=t.length;n<s;n++)e[n]=g(t[n])}}else if(a[i]){if(!$(t)){var l=t.constructor;if(t.constructor.from)e=l.from(t);else{e=new l(t.length);for(n=0,s=t.length;n<s;n++)e[n]=g(t[n])}}}else if(!r[i]&&!$(t)&&!F(t))for(var h in e={},t)t.hasOwnProperty(h)&&(e[h]=g(t[h]));return e}function v(t,e,i){if(!E(e)||!E(t))return i?g(e):t;for(var n in e)if(e.hasOwnProperty(n)){var r=t[n],a=e[n];!E(a)||!E(r)||O(a)||O(r)||F(a)||F(r)||R(a)||R(r)||$(a)||$(r)?!i&&n in t||(t[n]=g(e[n])):v(r,a,i)}return t}function m(t,e){for(var i=t[0],n=1,r=t.length;n<r;n++)i=v(i,t[n],e);return i}function y(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function x(t,e,i){for(var n in e)e.hasOwnProperty(n)&&(i?null!=e[n]:null==t[n])&&(t[n]=e[n]);return t}var _,w=function(){return f.createCanvas()};function b(){return _||(_=w().getContext("2d")),_}function M(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var i=0,n=t.length;i<n;i++)if(t[i]===e)return i}return-1}function S(t,e){var i=t.prototype;function n(){}for(var r in n.prototype=e.prototype,t.prototype=new n,i)t.prototype[r]=i[r];t.prototype.constructor=t,t.superClass=e}function I(t,e,i){x(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,i)}function T(t){if(t)return"string"!=typeof t&&"number"==typeof t.length}function C(t,e,i){if(t&&e)if(t.forEach&&t.forEach===l)t.forEach(e,i);else if(t.length===+t.length)for(var n=0,r=t.length;n<r;n++)e.call(i,t[n],n,t);else for(var a in t)t.hasOwnProperty(a)&&e.call(i,t[a],a,t)}function D(t,e,i){if(t&&e){if(t.map&&t.map===c)return t.map(e,i);for(var n=[],r=0,a=t.length;r<a;r++)n.push(e.call(i,t[r],r,t));return n}}function A(t,e,i,n){if(t&&e){if(t.reduce&&t.reduce===d)return t.reduce(e,i,n);for(var r=0,a=t.length;r<a;r++)i=e.call(n,i,t[r],r,t);return i}}function k(t,e,i){if(t&&e){if(t.filter&&t.filter===h)return t.filter(e,i);for(var n=[],r=0,a=t.length;r<a;r++)e.call(i,t[r],r,t)&&n.push(t[r]);return n}}function P(t,e){var i=u.call(arguments,2);return function(){return t.apply(e,i.concat(u.call(arguments)))}}function L(t){var e=u.call(arguments,1);return function(){return t.apply(this,e.concat(u.call(arguments)))}}function O(t){return"[object Array]"===o.call(t)}function z(t){return"function"==typeof t}function B(t){return"[object String]"===o.call(t)}function E(t){var e=typeof t;return"function"===e||!!t&&"object"===e}function R(t){return!!r[o.call(t)]}function N(t){return!!a[o.call(t)]}function F(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function W(t){return t!=t}function V(t){for(var e=0,i=arguments.length;e<i;e++)if(null!=arguments[e])return arguments[e]}function H(t,e){return null!=t?t:e}function G(t,e,i){return null!=t?t:null!=e?e:i}function Z(){return Function.call.apply(u,arguments)}function X(t){if("number"==typeof t)return[t,t,t,t];var e=t.length;return 2===e?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t}function Y(t,e){if(!t)throw new Error(e)}function j(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}f.createCanvas=function(){return document.createElement("canvas")};var q="__ec_primitive__";function U(t){t[q]=!0}function $(t){return t[q]}function K(t){var e=O(t);this.data={};var i=this;function n(t,n){e?i.set(t,n):i.set(n,t)}t instanceof K?t.each(n):t&&C(t,n)}function Q(t){return new K(t)}function J(){}K.prototype={constructor:K,get:function(t){return this.data.hasOwnProperty(t)?this.data[t]:null},set:function(t,e){return this.data[t]=e},each:function(t,e){for(var i in void 0!==e&&(t=P(t,e)),this.data)this.data.hasOwnProperty(i)&&t(this.data[i],i)},removeKey:function(t){delete this.data[t]}};var tt=(Object.freeze||Object)({$override:p,clone:g,merge:v,mergeAll:m,extend:y,defaults:x,createCanvas:w,getContext:b,indexOf:M,inherits:S,mixin:I,isArrayLike:T,each:C,map:D,reduce:A,filter:k,find:function(t,e,i){if(t&&e)for(var n=0,r=t.length;n<r;n++)if(e.call(i,t[n],n,t))return t[n]},bind:P,curry:L,isArray:O,isFunction:z,isString:B,isObject:E,isBuiltInObject:R,isTypedArray:N,isDom:F,eqNaN:W,retrieve:V,retrieve2:H,retrieve3:G,slice:Z,normalizeCssArray:X,assert:Y,trim:j,setAsPrimitive:U,isPrimitive:$,createHashMap:Q,concatArray:function(t,e){for(var i=new t.constructor(t.length+e.length),n=0;n<t.length;n++)i[n]=t[n];var r=t.length;for(n=0;n<e.length;n++)i[n+r]=e[n];return i},noop:J}),et="undefined"==typeof Float32Array?Array:Float32Array;function it(t,e){var i=new et(2);return null==t&&(t=0),null==e&&(e=0),i[0]=t,i[1]=e,i}function nt(t){var e=new et(2);return e[0]=t[0],e[1]=t[1],e}function rt(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t}function at(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t}function ot(t){return Math.sqrt(lt(t))}var st=ot;function lt(t){return t[0]*t[0]+t[1]*t[1]}var ht=lt;function ut(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t}function ct(t,e){var i=ot(e);return 0===i?(t[0]=0,t[1]=0):(t[0]=e[0]/i,t[1]=e[1]/i),t}function dt(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var ft=dt;function pt(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var gt=pt;function vt(t,e,i){var n=e[0],r=e[1];return t[0]=i[0]*n+i[2]*r+i[4],t[1]=i[1]*n+i[3]*r+i[5],t}function mt(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t}function yt(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t}var xt=(Object.freeze||Object)({create:it,copy:function(t,e){return t[0]=e[0],t[1]=e[1],t},clone:nt,set:function(t,e,i){return t[0]=e,t[1]=i,t},add:rt,scaleAndAdd:function(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,t},sub:at,len:ot,length:st,lenSquare:lt,lengthSquare:ht,mul:function(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t},div:function(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t},dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},scale:ut,normalize:ct,distance:dt,dist:ft,distanceSquare:pt,distSquare:gt,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},lerp:function(t,e,i,n){return t[0]=e[0]+n*(i[0]-e[0]),t[1]=e[1]+n*(i[1]-e[1]),t},applyTransform:vt,min:mt,max:yt});function _t(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this),this.on("globalout",this._dragEnd,this)}function wt(t,e){return{target:t,topTarget:e&&e.topTarget}}_t.prototype={constructor:_t,_dragStart:function(t){var e=t.target;e&&e.draggable&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.dispatchToElement(wt(e,t),"dragstart",t.event))},_drag:function(t){var e=this._draggingTarget;if(e){var i=t.offsetX,n=t.offsetY,r=i-this._x,a=n-this._y;this._x=i,this._y=n,e.drift(r,a,t),this.dispatchToElement(wt(e,t),"drag",t.event);var o=this.findHover(i,n,e).target,s=this._dropTarget;this._dropTarget=o,e!==o&&(s&&o!==s&&this.dispatchToElement(wt(s,t),"dragleave",t.event),o&&o!==s&&this.dispatchToElement(wt(o,t),"dragenter",t.event))}},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.dispatchToElement(wt(e,t),"dragend",t.event),this._dropTarget&&this.dispatchToElement(wt(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null}};var bt=Array.prototype.slice,Mt=function(t){this._$handlers={},this._$eventProcessor=t};function St(t,e,i,n,r,a){var o=t._$handlers;if("function"==typeof i&&(r=n,n=i,i=null),!n||!e)return t;i=function(t,e){var i=t._$eventProcessor;return null!=e&&i&&i.normalizeQuery&&(e=i.normalizeQuery(e)),e}(t,i),o[e]||(o[e]=[]);for(var s=0;s<o[e].length;s++)if(o[e][s].h===n)return t;var l={h:n,one:a,query:i,ctx:r||t,callAtLast:n.zrEventfulCallAtLast},h=o[e].length-1,u=o[e][h];return u&&u.callAtLast?o[e].splice(h,0,l):o[e].push(l),t}Mt.prototype={constructor:Mt,one:function(t,e,i,n){return St(this,t,e,i,n,!0)},on:function(t,e,i,n){return St(this,t,e,i,n,!1)},isSilent:function(t){var e=this._$handlers;return!e[t]||!e[t].length},off:function(t,e){var i=this._$handlers;if(!t)return this._$handlers={},this;if(e){if(i[t]){for(var n=[],r=0,a=i[t].length;r<a;r++)i[t][r].h!==e&&n.push(i[t][r]);i[t]=n}i[t]&&0===i[t].length&&delete i[t]}else delete i[t];return this},trigger:function(t){var e=this._$handlers[t],i=this._$eventProcessor;if(e){var n=arguments,r=n.length;r>3&&(n=bt.call(n,1));for(var a=e.length,o=0;o<a;){var s=e[o];if(i&&i.filter&&null!=s.query&&!i.filter(t,s.query))o++;else{switch(r){case 1:s.h.call(s.ctx);break;case 2:s.h.call(s.ctx,n[1]);break;case 3:s.h.call(s.ctx,n[1],n[2]);break;default:s.h.apply(s.ctx,n)}s.one?(e.splice(o,1),a--):o++}}}return i&&i.afterTrigger&&i.afterTrigger(t),this},triggerWithContext:function(t){var e=this._$handlers[t],i=this._$eventProcessor;if(e){var n=arguments,r=n.length;r>4&&(n=bt.call(n,1,n.length-1));for(var a=n[n.length-1],o=e.length,s=0;s<o;){var l=e[s];if(i&&i.filter&&null!=l.query&&!i.filter(t,l.query))s++;else{switch(r){case 1:l.h.call(a);break;case 2:l.h.call(a,n[1]);break;case 3:l.h.call(a,n[1],n[2]);break;default:l.h.apply(a,n)}l.one?(e.splice(s,1),o--):s++}}}return i&&i.afterTrigger&&i.afterTrigger(t),this}};var It="undefined"!=typeof window&&!!window.addEventListener,Tt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/;function Ct(t,e,i,r){return i=i||{},r||!n.canvasSupported?Dt(t,e,i):n.browser.firefox&&null!=e.layerX&&e.layerX!==e.offsetX?(i.zrX=e.layerX,i.zrY=e.layerY):null!=e.offsetX?(i.zrX=e.offsetX,i.zrY=e.offsetY):Dt(t,e,i),i}function Dt(t,e,i){var n=function(t){return t.getBoundingClientRect?t.getBoundingClientRect():{left:0,top:0}}(t);i.zrX=e.clientX-n.left,i.zrY=e.clientY-n.top}function At(t,e,i){if(null!=(e=e||window.event).zrX)return e;var n=e.type;if(n&&n.indexOf("touch")>=0){var r="touchend"!==n?e.targetTouches[0]:e.changedTouches[0];r&&Ct(t,r,e,i)}else Ct(t,e,e,i),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var a=e.button;return null==e.which&&void 0!==a&&Tt.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function kt(t,e,i){It?t.removeEventListener(e,i):t.detachEvent("on"+e,i)}var Pt=It?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0};function Lt(t){return 2===t.which||3===t.which}var Ot=function(){this._track=[]};function zt(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return Math.sqrt(e*e+i*i)}Ot.prototype={constructor:Ot,recognize:function(t,e,i){return this._doTrack(t,e,i),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,i){var n=t.touches;if(n){for(var r={points:[],touches:[],target:e,event:t},a=0,o=n.length;a<o;a++){var s=n[a],l=Ct(i,s,{});r.points.push([l.zrX,l.zrY]),r.touches.push(s)}this._track.push(r)}},_recognize:function(t){for(var e in Bt)if(Bt.hasOwnProperty(e)){var i=Bt[e](this._track,t);if(i)return i}}};var Bt={pinch:function(t,e){var i=t.length;if(i){var n,r=(t[i-1]||{}).points,a=(t[i-2]||{}).points||r;if(a&&a.length>1&&r&&r.length>1){var o=zt(r)/zt(a);!isFinite(o)&&(o=1),e.pinchScale=o;var s=[((n=r)[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2];return e.pinchX=s[0],e.pinchY=s[1],{type:"pinch",target:t[0].target,event:e}}}}},Et="silent";function Rt(t){Pt(this.event)}function Nt(){}Nt.prototype.dispose=function(){};var Ft=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Wt=function(t,e,i,n){Mt.call(this),this.storage=t,this.painter=e,this.painterRoot=n,i=i||new Nt,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,_t.call(this),this.setHandlerProxy(i)};function Vt(t,e,i){if(t[t.rectHover?"rectContain":"contain"](e,i)){for(var n,r=t;r;){if(r.clipPath&&!r.clipPath.contain(e,i))return!1;r.silent&&(n=!0),r=r.parent}return!n||Et}return!1}Wt.prototype={constructor:Wt,setHandlerProxy:function(t){this.proxy&&this.proxy.dispose(),t&&(C(Ft,function(e){t.on&&t.on(e,this[e],this)},this),t.handler=this),this.proxy=t},mousemove:function(t){var e=t.zrX,i=t.zrY,n=this._hovered,r=n.target;r&&!r.__zr&&(r=(n=this.findHover(n.x,n.y)).target);var a=this._hovered=this.findHover(e,i),o=a.target,s=this.proxy;s.setCursor&&s.setCursor(o?o.cursor:"default"),r&&o!==r&&this.dispatchToElement(n,"mouseout",t),this.dispatchToElement(a,"mousemove",t),o&&o!==r&&this.dispatchToElement(a,"mouseover",t)},mouseout:function(t){this.dispatchToElement(this._hovered,"mouseout",t);var e,i=t.toElement||t.relatedTarget;do{i=i&&i.parentNode}while(i&&9!==i.nodeType&&!(e=i===this.painterRoot));!e&&this.trigger("globalout",{event:t})},resize:function(t){this._hovered={}},dispatch:function(t,e){var i=this[t];i&&i.call(this,e)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},dispatchToElement:function(t,e,i){var n=(t=t||{}).target;if(!n||!n.silent){for(var r="on"+e,a=function(t,e,i){return{type:t,event:i,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:i.zrX,offsetY:i.zrY,gestureEvent:i.gestureEvent,pinchX:i.pinchX,pinchY:i.pinchY,pinchScale:i.pinchScale,wheelDelta:i.zrDelta,zrByTouch:i.zrByTouch,which:i.which,stop:Rt}}(e,t,i);n&&(n[r]&&(a.cancelBubble=n[r].call(n,a)),n.trigger(e,a),n=n.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(e,a),this.painter&&this.painter.eachOtherLayer(function(t){"function"==typeof t[r]&&t[r].call(t,a),t.trigger&&t.trigger(e,a)}))}},findHover:function(t,e,i){for(var n=this.storage.getDisplayList(),r={x:t,y:e},a=n.length-1;a>=0;a--){var o;if(n[a]!==i&&!n[a].ignore&&(o=Vt(n[a],t,e))&&(!r.topTarget&&(r.topTarget=n[a]),o!==Et)){r.target=n[a];break}}return r},processGesture:function(t,e){this._gestureMgr||(this._gestureMgr=new Ot);var i=this._gestureMgr;"start"===e&&i.clear();var n=i.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&i.clear(),n){var r=n.type;t.gestureEvent=r,this.dispatchToElement({target:n.target},r,n.event)}}},C(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){Wt.prototype[t]=function(e){var i=this.findHover(e.zrX,e.zrY),n=i.target;if("mousedown"===t)this._downEl=n,this._downPoint=[e.zrX,e.zrY],this._upEl=n;else if("mouseup"===t)this._upEl=n;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||ft(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,t,e)}}),I(Wt,Mt),I(Wt,_t);var Ht="undefined"==typeof Float32Array?Array:Float32Array;function Gt(){var t=new Ht(6);return Zt(t),t}function Zt(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function Xt(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 Yt(t,e,i){var n=e[0]*i[0]+e[2]*i[1],r=e[1]*i[0]+e[3]*i[1],a=e[0]*i[2]+e[2]*i[3],o=e[1]*i[2]+e[3]*i[3],s=e[0]*i[4]+e[2]*i[5]+e[4],l=e[1]*i[4]+e[3]*i[5]+e[5];return t[0]=n,t[1]=r,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t}function jt(t,e,i){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+i[0],t[5]=e[5]+i[1],t}function qt(t,e,i){var n=e[0],r=e[2],a=e[4],o=e[1],s=e[3],l=e[5],h=Math.sin(i),u=Math.cos(i);return t[0]=n*u+o*h,t[1]=-n*h+o*u,t[2]=r*u+s*h,t[3]=-r*h+u*s,t[4]=u*a+h*l,t[5]=u*l-h*a,t}function Ut(t,e,i){var n=i[0],r=i[1];return t[0]=e[0]*n,t[1]=e[1]*r,t[2]=e[2]*n,t[3]=e[3]*r,t[4]=e[4]*n,t[5]=e[5]*r,t}function $t(t,e){var i=e[0],n=e[2],r=e[4],a=e[1],o=e[3],s=e[5],l=i*o-a*n;return l?(l=1/l,t[0]=o*l,t[1]=-a*l,t[2]=-n*l,t[3]=i*l,t[4]=(n*s-o*r)*l,t[5]=(a*r-i*s)*l,t):null}var Kt=(Object.freeze||Object)({create:Gt,identity:Zt,copy:Xt,mul:Yt,translate:jt,rotate:qt,scale:Ut,invert:$t,clone:function(t){var e=Gt();return Xt(e,t),e}}),Qt=Zt,Jt=5e-5;function te(t){return t>Jt||t<-Jt}var ee=function(t){(t=t||{}).position||(this.position=[0,0]),null==t.rotation&&(this.rotation=0),t.scale||(this.scale=[1,1]),this.origin=this.origin||null},ie=ee.prototype;ie.transform=null,ie.needLocalTransform=function(){return te(this.rotation)||te(this.position[0])||te(this.position[1])||te(this.scale[0]-1)||te(this.scale[1]-1)};var ne=[];ie.updateTransform=function(){var t=this.parent,e=t&&t.transform,i=this.needLocalTransform(),n=this.transform;if(i||e){n=n||Gt(),i?this.getLocalTransform(n):Qt(n),e&&(i?Yt(n,t.transform,n):Xt(n,t.transform)),this.transform=n;var r=this.globalScaleRatio;if(null!=r&&1!==r){this.getGlobalScale(ne);var a=ne[0]<0?-1:1,o=ne[1]<0?-1:1,s=((ne[0]-a)*r+a)/ne[0]||0,l=((ne[1]-o)*r+o)/ne[1]||0;n[0]*=s,n[1]*=s,n[2]*=l,n[3]*=l}this.invTransform=this.invTransform||Gt(),$t(this.invTransform,n)}else n&&Qt(n)},ie.getLocalTransform=function(t){return ee.getLocalTransform(this,t)},ie.setTransform=function(t){var e=this.transform,i=t.dpr||1;e?t.setTransform(i*e[0],i*e[1],i*e[2],i*e[3],i*e[4],i*e[5]):t.setTransform(i,0,0,i,0,0)},ie.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var re=[],ae=Gt();ie.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],i=t[2]*t[2]+t[3]*t[3],n=this.position,r=this.scale;te(e-1)&&(e=Math.sqrt(e)),te(i-1)&&(i=Math.sqrt(i)),t[0]<0&&(e=-e),t[3]<0&&(i=-i),n[0]=t[4],n[1]=t[5],r[0]=e,r[1]=i,this.rotation=Math.atan2(-t[1]/i,t[0]/e)}},ie.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(Yt(re,t.invTransform,e),e=re);var i=this.origin;i&&(i[0]||i[1])&&(ae[4]=i[0],ae[5]=i[1],Yt(re,e,ae),re[4]-=i[0],re[5]-=i[1],e=re),this.setLocalTransform(e)}},ie.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):(t[0]=1,t[1]=1,t)},ie.transformCoordToLocal=function(t,e){var i=[t,e],n=this.invTransform;return n&&vt(i,i,n),i},ie.transformCoordToGlobal=function(t,e){var i=[t,e],n=this.transform;return n&&vt(i,i,n),i},ee.getLocalTransform=function(t,e){Qt(e=e||[]);var i=t.origin,n=t.scale||[1,1],r=t.rotation||0,a=t.position||[0,0];return i&&(e[4]-=i[0],e[5]-=i[1]),Ut(e,e,n),r&&qt(e,e,r),i&&(e[4]+=i[0],e[5]+=i[1]),e[4]+=a[0],e[5]+=a[1],e};var oe={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,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),-i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),(t*=2)<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-oe.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*oe.bounceIn(2*t):.5*oe.bounceOut(2*t-1)+.5}};function se(t){this._target=t.target,this._life=t.life||1e3,this._delay=t.delay||0,this._initialized=!1,this.loop=null!=t.loop&&t.loop,this.gap=t.gap||0,this.easing=t.easing||"Linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart,this._pausedTime=0,this._paused=!1}se.prototype={constructor:se,step:function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),this._paused)this._pausedTime+=e;else{var i=(t-this._startTime-this._pausedTime)/this._life;if(!(i<0)){i=Math.min(i,1);var n=this.easing,r="string"==typeof n?oe[n]:n,a="function"==typeof r?r(i):i;return this.fire("frame",a),1===i?this.loop?(this.restart(t),"restart"):(this._needsRemove=!0,"destroy"):null}}},restart:function(t){var e=(t-this._startTime-this._pausedTime)%this._life;this._startTime=t-e+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(t,e){this[t="on"+t]&&this[t](this._target,e)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var le=function(){this.head=null,this.tail=null,this._len=0},he=le.prototype;he.insert=function(t){var e=new ue(t);return this.insertEntry(e),e},he.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},he.remove=function(t){var e=t.prev,i=t.next;e?e.next=i:this.head=i,i?i.prev=e:this.tail=e,t.next=t.prev=null,this._len--},he.len=function(){return this._len},he.clear=function(){this.head=this.tail=null,this._len=0};var ue=function(t){this.value=t,this.next,this.prev},ce=function(t){this._list=new le,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},de=ce.prototype;de.put=function(t,e){var i=this._list,n=this._map,r=null;if(null==n[t]){var a=i.len(),o=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=i.head;i.remove(s),delete n[s.key],r=s.value,this._lastRemovedEntry=s}o?o.value=e:o=new ue(e),o.key=t,i.insertEntry(o),n[t]=o}return r},de.get=function(t){var e=this._map[t],i=this._list;if(null!=e)return e!==i.tail&&(i.remove(e),i.insertEntry(e)),e.value},de.clear=function(){this._list.clear(),this._map={}};var fe={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 pe(t){return(t=Math.round(t))<0?0:t>255?255:t}function ge(t){return t<0?0:t>1?1:t}function ve(t){return t.length&&"%"===t.charAt(t.length-1)?pe(parseFloat(t)/100*255):pe(parseInt(t,10))}function me(t){return t.length&&"%"===t.charAt(t.length-1)?ge(parseFloat(t)/100):ge(parseFloat(t))}function ye(t,e,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}function xe(t,e,i){return t+(e-t)*i}function _e(t,e,i,n,r){return t[0]=e,t[1]=i,t[2]=n,t[3]=r,t}function we(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var be=new ce(20),Me=null;function Se(t,e){Me&&we(Me,e),Me=be.put(t,Me||e.slice())}function Ie(t,e){if(t){e=e||[];var i=be.get(t);if(i)return we(e,i);var n,r=(t+="").replace(/ /g,"").toLowerCase();if(r in fe)return we(e,fe[r]),Se(t,e),e;if("#"===r.charAt(0))return 4===r.length?(n=parseInt(r.substr(1),16))>=0&&n<=4095?(_e(e,(3840&n)>>4|(3840&n)>>8,240&n|(240&n)>>4,15&n|(15&n)<<4,1),Se(t,e),e):void _e(e,0,0,0,1):7===r.length?(n=parseInt(r.substr(1),16))>=0&&n<=16777215?(_e(e,(16711680&n)>>16,(65280&n)>>8,255&n,1),Se(t,e),e):void _e(e,0,0,0,1):void 0;var a=r.indexOf("("),o=r.indexOf(")");if(-1!==a&&o+1===r.length){var s=r.substr(0,a),l=r.substr(a+1,o-(a+1)).split(","),h=1;switch(s){case"rgba":if(4!==l.length)return void _e(e,0,0,0,1);h=me(l.pop());case"rgb":return 3!==l.length?void _e(e,0,0,0,1):(_e(e,ve(l[0]),ve(l[1]),ve(l[2]),h),Se(t,e),e);case"hsla":return 4!==l.length?void _e(e,0,0,0,1):(l[3]=me(l[3]),Te(l,e),Se(t,e),e);case"hsl":return 3!==l.length?void _e(e,0,0,0,1):(Te(l,e),Se(t,e),e);default:return}}_e(e,0,0,0,1)}}function Te(t,e){var i=(parseFloat(t[0])%360+360)%360/360,n=me(t[1]),r=me(t[2]),a=r<=.5?r*(n+1):r+n-r*n,o=2*r-a;return _e(e=e||[],pe(255*ye(o,a,i+1/3)),pe(255*ye(o,a,i)),pe(255*ye(o,a,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function Ce(t,e){var i=Ie(t);if(i){for(var n=0;n<3;n++)i[n]=e<0?i[n]*(1-e)|0:(255-i[n])*e+i[n]|0,i[n]>255?i[n]=255:t[n]<0&&(i[n]=0);return Oe(i,4===i.length?"rgba":"rgb")}}function De(t){var e=Ie(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function Ae(t,e,i){if(e&&e.length&&t>=0&&t<=1){i=i||[];var n=t*(e.length-1),r=Math.floor(n),a=Math.ceil(n),o=e[r],s=e[a],l=n-r;return i[0]=pe(xe(o[0],s[0],l)),i[1]=pe(xe(o[1],s[1],l)),i[2]=pe(xe(o[2],s[2],l)),i[3]=ge(xe(o[3],s[3],l)),i}}var ke=Ae;function Pe(t,e,i){if(e&&e.length&&t>=0&&t<=1){var n=t*(e.length-1),r=Math.floor(n),a=Math.ceil(n),o=Ie(e[r]),s=Ie(e[a]),l=n-r,h=Oe([pe(xe(o[0],s[0],l)),pe(xe(o[1],s[1],l)),pe(xe(o[2],s[2],l)),ge(xe(o[3],s[3],l))],"rgba");return i?{color:h,leftIndex:r,rightIndex:a,value:n}:h}}var Le=Pe;function Oe(t,e){if(t&&t.length){var i=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(i+=","+t[3]),e+"("+i+")"}}var ze=(Object.freeze||Object)({parse:Ie,lift:Ce,toHex:De,fastLerp:Ae,fastMapToColor:ke,lerp:Pe,mapToColor:Le,modifyHSL:function(t,e,i,n){if(t=Ie(t))return t=function(t){if(t){var e,i,n=t[0]/255,r=t[1]/255,a=t[2]/255,o=Math.min(n,r,a),s=Math.max(n,r,a),l=s-o,h=(s+o)/2;if(0===l)e=0,i=0;else{i=h<.5?l/(s+o):l/(2-s-o);var u=((s-n)/6+l/2)/l,c=((s-r)/6+l/2)/l,d=((s-a)/6+l/2)/l;n===s?e=d-c:r===s?e=1/3+u-d:a===s&&(e=2/3+c-u),e<0&&(e+=1),e>1&&(e-=1)}var f=[360*e,i,h];return null!=t[3]&&f.push(t[3]),f}}(t),null!=e&&(t[0]=(r=e,(r=Math.round(r))<0?0:r>360?360:r)),null!=i&&(t[1]=me(i)),null!=n&&(t[2]=me(n)),Oe(Te(t),"rgba");var r},modifyAlpha:function(t,e){if((t=Ie(t))&&null!=e)return t[3]=ge(e),Oe(t,"rgba")},stringify:Oe}),Be=Array.prototype.slice;function Ee(t,e){return t[e]}function Re(t,e,i){t[e]=i}function Ne(t,e,i){return(e-t)*i+t}function Fe(t,e,i){return i>.5?e:t}function We(t,e,i,n,r){var a=t.length;if(1===r)for(var o=0;o<a;o++)n[o]=Ne(t[o],e[o],i);else{var s=a&&t[0].length;for(o=0;o<a;o++)for(var l=0;l<s;l++)n[o][l]=Ne(t[o][l],e[o][l],i)}}function Ve(t,e,i){var n=t.length,r=e.length;if(n!==r)if(n>r)t.length=r;else for(var a=n;a<r;a++)t.push(1===i?e[a]:Be.call(e[a]));var o=t[0]&&t[0].length;for(a=0;a<t.length;a++)if(1===i)isNaN(t[a])&&(t[a]=e[a]);else for(var s=0;s<o;s++)isNaN(t[a][s])&&(t[a][s]=e[a][s])}function He(t,e,i){if(t===e)return!0;var n=t.length;if(n!==e.length)return!1;if(1===i){for(var r=0;r<n;r++)if(t[r]!==e[r])return!1}else{var a=t[0].length;for(r=0;r<n;r++)for(var o=0;o<a;o++)if(t[r][o]!==e[r][o])return!1}return!0}function Ge(t,e,i,n,r,a,o,s,l){var h=t.length;if(1===l)for(var u=0;u<h;u++)s[u]=Ze(t[u],e[u],i[u],n[u],r,a,o);else{var c=t[0].length;for(u=0;u<h;u++)for(var d=0;d<c;d++)s[u][d]=Ze(t[u][d],e[u][d],i[u][d],n[u][d],r,a,o)}}function Ze(t,e,i,n,r,a,o){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*o+(-3*(e-i)-2*s-l)*a+s*r+e}function Xe(t){if(T(t)){var e=t.length;if(T(t[0])){for(var i=[],n=0;n<e;n++)i.push(Be.call(t[n]));return i}return Be.call(t)}return t}function Ye(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}function je(t,e,i,n,r,a){var o=t._getter,s=t._setter,l="spline"===e,h=n.length;if(h){var u,c=T(n[0].value),d=!1,f=!1,p=c?function(t){var e=t[t.length-1].value;return T(e&&e[0])?2:1}(n):0;n.sort(function(t,e){return t.time-e.time}),u=n[h-1].time;for(var g=[],v=[],m=n[0].value,y=!0,x=0;x<h;x++){g.push(n[x].time/u);var _=n[x].value;if(c&&He(_,m,p)||!c&&_===m||(y=!1),m=_,"string"==typeof _){var w=Ie(_);w?(_=w,d=!0):f=!0}v.push(_)}if(a||!y){var b=v[h-1];for(x=0;x<h-1;x++)c?Ve(v[x],b,p):!isNaN(v[x])||isNaN(b)||f||d||(v[x]=b);c&&Ve(o(t._target,r),b,p);var M,S,I,C,D,A=0,k=0;if(d)var P=[0,0,0,0];var L=new se({target:t._target,life:u,loop:t._loop,delay:t._delay,onframe:function(t,e){var i;if(e<0)i=0;else if(e<k){for(i=Math.min(A+1,h-1);i>=0&&!(g[i]<=e);i--);i=Math.min(i,h-2)}else{for(i=A;i<h&&!(g[i]>e);i++);i=Math.min(i-1,h-2)}A=i,k=e;var n=g[i+1]-g[i];if(0!==n)if(M=(e-g[i])/n,l)if(I=v[i],S=v[0===i?i:i-1],C=v[i>h-2?h-1:i+1],D=v[i>h-3?h-1:i+2],c)Ge(S,I,C,D,M,M*M,M*M*M,o(t,r),p);else{if(d)a=Ge(S,I,C,D,M,M*M,M*M*M,P,1),a=Ye(P);else{if(f)return Fe(I,C,M);a=Ze(S,I,C,D,M,M*M,M*M*M)}s(t,r,a)}else if(c)We(v[i],v[i+1],M,o(t,r),p);else{var a;if(d)We(v[i],v[i+1],M,P,1),a=Ye(P);else{if(f)return Fe(v[i],v[i+1],M);a=Ne(v[i],v[i+1],M)}s(t,r,a)}},ondestroy:i});return e&&"spline"!==e&&(L.easing=e),L}}}var qe=function(t,e,i,n){this._tracks={},this._target=t,this._loop=e||!1,this._getter=i||Ee,this._setter=n||Re,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};qe.prototype={when:function(t,e){var i=this._tracks;for(var n in e)if(e.hasOwnProperty(n)){if(!i[n]){i[n]=[];var r=this._getter(this._target,n);if(null==r)continue;0!==t&&i[n].push({time:0,value:Xe(r)})}i[n].push({time:t,value:e[n]})}return this},during:function(t){return this._onframeList.push(t),this},pause:function(){for(var t=0;t<this._clipList.length;t++)this._clipList[t].pause();this._paused=!0},resume:function(){for(var t=0;t<this._clipList.length;t++)this._clipList[t].resume();this._paused=!1},isPaused:function(){return!!this._paused},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var t=this._doneList,e=t.length,i=0;i<e;i++)t[i].call(this)},start:function(t,e){var i,n=this,r=0,a=function(){--r||n._doneCallback()};for(var o in this._tracks)if(this._tracks.hasOwnProperty(o)){var s=je(this,t,a,this._tracks[o],o,e);s&&(this._clipList.push(s),r++,this.animation&&this.animation.addClip(s),i=s)}if(i){var l=i.onframe;i.onframe=function(t,e){l(t,e);for(var i=0;i<n._onframeList.length;i++)n._onframeList[i](t,e)}}return r||this._doneCallback(),this},stop:function(t){for(var e=this._clipList,i=this.animation,n=0;n<e.length;n++){var r=e[n];t&&r.onframe(this._target,1),i&&i.removeClip(r)}e.length=0},delay:function(t){return this._delay=t,this},done:function(t){return t&&this._doneList.push(t),this},getClips:function(){return this._clipList}};var Ue=1;"undefined"!=typeof window&&(Ue=Math.max(window.devicePixelRatio||1,1));var $e=Ue,Ke=function(){};var Qe=Ke,Je=function(){this.animators=[]};function ti(t,e,i,n,r,a,o,s){B(n)?(a=r,r=n,n=0):z(r)?(a=r,r="linear",n=0):z(n)?(a=n,n=0):z(i)?(a=i,i=500):i||(i=500),t.stopAnimation(),function t(e,i,n,r,a,o,s){var l={};var h=0;for(var u in r)r.hasOwnProperty(u)&&(null!=n[u]?E(r[u])&&!T(r[u])?t(e,i?i+"."+u:u,n[u],r[u],a,o,s):(s?(l[u]=n[u],ei(e,i,u,r[u])):l[u]=r[u],h++):null==r[u]||s||ei(e,i,u,r[u]));h>0&&e.animate(i,!1).when(null==a?500:a,l).delay(o||0)}(t,"",t,e,i,n,s);var l=t.animators.slice(),h=l.length;function u(){--h||a&&a()}h||a&&a();for(var c=0;c<l.length;c++)l[c].done(u).start(r,o)}function ei(t,e,i,n){if(e){var r={};r[e]={},r[e][i]=n,t.attr(r)}else t.attr(i,n)}Je.prototype={constructor:Je,animate:function(t,e){var i,n=!1,r=this,a=this.__zr;if(t){var o=t.split("."),s=r;n="shape"===o[0];for(var l=0,h=o.length;l<h;l++)s&&(s=s[o[l]]);s&&(i=s)}else i=r;if(i){var u=r.animators,c=new qe(i,e);return c.during(function(t){r.dirty(n)}).done(function(){u.splice(M(u,c),1)}),u.push(c),a&&a.animation.addAnimator(c),c}Qe('Property "'+t+'" is not existed in element '+r.id)},stopAnimation:function(t){for(var e=this.animators,i=e.length,n=0;n<i;n++)e[n].stop(t);return e.length=0,this},animateTo:function(t,e,i,n,r,a){ti(this,t,e,i,n,r,a)},animateFrom:function(t,e,i,n,r,a){ti(this,t,e,i,n,r,a,!0)}};var ii=function(t){ee.call(this,t),Mt.call(this,t),Je.call(this,t),this.id=t.id||i()};ii.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(t,e){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]),i[4]+=t,i[5]+=e,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(t,e){},attrKV:function(t,e){if("position"===t||"scale"===t||"origin"===t){if(e){var i=this[t];i||(i=this[t]=[]),i[0]=e[0],i[1]=e[1]}}else this[t]=e},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(E(t))for(var i in t)t.hasOwnProperty(i)&&this.attrKV(i,t[i]);return this.dirty(!1),this},setClipPath:function(t){var e=this.__zr;e&&t.addSelfToZr(e),this.clipPath&&this.clipPath!==t&&this.removeClipPath(),this.clipPath=t,t.__zr=e,t.__clipTarget=this,this.dirty(!1)},removeClipPath:function(){var t=this.clipPath;t&&(t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(t){this.__zr=t;var e=this.animators;if(e)for(var i=0;i<e.length;i++)t.animation.addAnimator(e[i]);this.clipPath&&this.clipPath.addSelfToZr(t)},removeSelfFromZr:function(t){this.__zr=null;var e=this.animators;if(e)for(var i=0;i<e.length;i++)t.animation.removeAnimator(e[i]);this.clipPath&&this.clipPath.removeSelfFromZr(t)}},I(ii,Je),I(ii,ee),I(ii,Mt);var ni,ri,ai,oi,si=vt,li=Math.min,hi=Math.max;function ui(t,e,i,n){i<0&&(t+=i,i=-i),n<0&&(e+=n,n=-n),this.x=t,this.y=e,this.width=i,this.height=n}ui.prototype={constructor:ui,union:function(t){var e=li(t.x,this.x),i=li(t.y,this.y);this.width=hi(t.x+t.width,this.x+this.width)-e,this.height=hi(t.y+t.height,this.y+this.height)-i,this.x=e,this.y=i},applyTransform:(ni=[],ri=[],ai=[],oi=[],function(t){if(t){ni[0]=ai[0]=this.x,ni[1]=oi[1]=this.y,ri[0]=oi[0]=this.x+this.width,ri[1]=ai[1]=this.y+this.height,si(ni,ni,t),si(ri,ri,t),si(ai,ai,t),si(oi,oi,t),this.x=li(ni[0],ri[0],ai[0],oi[0]),this.y=li(ni[1],ri[1],ai[1],oi[1]);var e=hi(ni[0],ri[0],ai[0],oi[0]),i=hi(ni[1],ri[1],ai[1],oi[1]);this.width=e-this.x,this.height=i-this.y}}),calculateTransform:function(t){var e=this,i=t.width/e.width,n=t.height/e.height,r=Gt();return jt(r,r,[-e.x,-e.y]),Ut(r,r,[i,n]),jt(r,r,[t.x,t.y]),r},intersect:function(t){if(!t)return!1;t instanceof ui||(t=ui.create(t));var e=this,i=e.x,n=e.x+e.width,r=e.y,a=e.y+e.height,o=t.x,s=t.x+t.width,l=t.y,h=t.y+t.height;return!(n<o||s<i||a<l||h<r)},contain:function(t,e){return t>=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height},clone:function(){return new ui(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},ui.create=function(t){return new ui(t.x,t.y,t.width,t.height)};var ci=function(t){for(var e in t=t||{},ii.call(this,t),t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};ci.prototype={constructor:ci,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,i=0;i<e.length;i++)if(e[i].name===t)return e[i]},childCount:function(){return this._children.length},add:function(t){return t&&t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),this},addBefore:function(t,e){if(t&&t!==this&&t.parent!==this&&e&&e.parent===this){var i=this._children,n=i.indexOf(e);n>=0&&(i.splice(n,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__storage,i=this.__zr;e&&e!==t.__storage&&(e.addToStorage(t),t instanceof ci&&t.addChildrenToStorage(e)),i&&i.refresh()},remove:function(t){var e=this.__zr,i=this.__storage,n=this._children,r=M(n,t);return r<0?this:(n.splice(r,1),t.parent=null,i&&(i.delFromStorage(t),t instanceof ci&&t.delChildrenFromStorage(i)),e&&e.refresh(),this)},removeAll:function(){var t,e,i=this._children,n=this.__storage;for(e=0;e<i.length;e++)t=i[e],n&&(n.delFromStorage(t),t instanceof ci&&t.delChildrenFromStorage(n)),t.parent=null;return i.length=0,this},eachChild:function(t,e){for(var i=this._children,n=0;n<i.length;n++){var r=i[n];t.call(e,r,n)}return this},traverse:function(t,e){for(var i=0;i<this._children.length;i++){var n=this._children[i];t.call(e,n),"group"===n.type&&n.traverse(t,e)}return this},addChildrenToStorage:function(t){for(var e=0;e<this._children.length;e++){var i=this._children[e];t.addToStorage(i),i instanceof ci&&i.addChildrenToStorage(t)}},delChildrenFromStorage:function(t){for(var e=0;e<this._children.length;e++){var i=this._children[e];t.delFromStorage(i),i instanceof ci&&i.delChildrenFromStorage(t)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(t){for(var e=null,i=new ui(0,0,0,0),n=t||this._children,r=[],a=0;a<n.length;a++){var o=n[a];if(!o.ignore&&!o.invisible){var s=o.getBoundingRect(),l=o.getLocalTransform(r);l?(i.copy(s),i.applyTransform(l),(e=e||i.clone()).union(i)):(e=e||s.clone()).union(s)}}return e||i}},S(ci,ii);var di=32,fi=7;function pi(t,e,i,n){var r=e+1;if(r===i)return 1;if(n(t[r++],t[e])<0){for(;r<i&&n(t[r],t[r-1])<0;)r++;!function(t,e,i){i--;for(;e<i;){var n=t[e];t[e++]=t[i],t[i--]=n}}(t,e,r)}else for(;r<i&&n(t[r],t[r-1])>=0;)r++;return r-e}function gi(t,e,i,n,r){for(n===e&&n++;n<i;n++){for(var a,o=t[n],s=e,l=n;s<l;)r(o,t[a=s+l>>>1])<0?l=a:s=a+1;var h=n-s;switch(h){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(;h>0;)t[s+h]=t[s+h-1],h--}t[s]=o}}function vi(t,e,i,n,r,a){var o=0,s=0,l=1;if(a(t,e[i+r])>0){for(s=n-r;l<s&&a(t,e[i+r+l])>0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),o+=r,l+=r}else{for(s=r+1;l<s&&a(t,e[i+r-l])<=0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var h=o;o=r-l,l=r-h}for(o++;o<l;){var u=o+(l-o>>>1);a(t,e[i+u])>0?o=u+1:l=u}return l}function mi(t,e,i,n,r,a){var o=0,s=0,l=1;if(a(t,e[i+r])<0){for(s=r+1;l<s&&a(t,e[i+r-l])<0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var h=o;o=r-l,l=r-h}else{for(s=n-r;l<s&&a(t,e[i+r+l])>=0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),o+=r,l+=r}for(o++;o<l;){var u=o+(l-o>>>1);a(t,e[i+u])<0?l=u:o=u+1}return l}function yi(t,e){var i,n,r=fi,a=0,o=[];function s(s){var l=i[s],h=n[s],u=i[s+1],c=n[s+1];n[s]=h+c,s===a-3&&(i[s+1]=i[s+2],n[s+1]=n[s+2]),a--;var d=mi(t[u],t,l,h,0,e);l+=d,0!==(h-=d)&&0!==(c=vi(t[l+h-1],t,u,c,c-1,e))&&(h<=c?function(i,n,a,s){var l=0;for(l=0;l<n;l++)o[l]=t[i+l];var h=0,u=a,c=i;if(t[c++]=t[u++],0==--s){for(l=0;l<n;l++)t[c+l]=o[h+l];return}if(1===n){for(l=0;l<s;l++)t[c+l]=t[u+l];return void(t[c+s]=o[h])}var d,f,p,g=r;for(;;){d=0,f=0,p=!1;do{if(e(t[u],o[h])<0){if(t[c++]=t[u++],f++,d=0,0==--s){p=!0;break}}else if(t[c++]=o[h++],d++,f=0,1==--n){p=!0;break}}while((d|f)<g);if(p)break;do{if(0!==(d=mi(t[u],o,h,n,0,e))){for(l=0;l<d;l++)t[c+l]=o[h+l];if(c+=d,h+=d,(n-=d)<=1){p=!0;break}}if(t[c++]=t[u++],0==--s){p=!0;break}if(0!==(f=vi(o[h],t,u,s,0,e))){for(l=0;l<f;l++)t[c+l]=t[u+l];if(c+=f,u+=f,0===(s-=f)){p=!0;break}}if(t[c++]=o[h++],1==--n){p=!0;break}g--}while(d>=fi||f>=fi);if(p)break;g<0&&(g=0),g+=2}if((r=g)<1&&(r=1),1===n){for(l=0;l<s;l++)t[c+l]=t[u+l];t[c+s]=o[h]}else{if(0===n)throw new Error;for(l=0;l<n;l++)t[c+l]=o[h+l]}}(l,h,u,c):function(i,n,a,s){var l=0;for(l=0;l<s;l++)o[l]=t[a+l];var h=i+n-1,u=s-1,c=a+s-1,d=0,f=0;if(t[c--]=t[h--],0==--n){for(d=c-(s-1),l=0;l<s;l++)t[d+l]=o[l];return}if(1===s){for(f=(c-=n)+1,d=(h-=n)+1,l=n-1;l>=0;l--)t[f+l]=t[d+l];return void(t[c]=o[u])}var p=r;for(;;){var g=0,v=0,m=!1;do{if(e(o[u],t[h])<0){if(t[c--]=t[h--],g++,v=0,0==--n){m=!0;break}}else if(t[c--]=o[u--],v++,g=0,1==--s){m=!0;break}}while((g|v)<p);if(m)break;do{if(0!==(g=n-mi(o[u],t,i,n,n-1,e))){for(n-=g,f=(c-=g)+1,d=(h-=g)+1,l=g-1;l>=0;l--)t[f+l]=t[d+l];if(0===n){m=!0;break}}if(t[c--]=o[u--],1==--s){m=!0;break}if(0!==(v=s-vi(t[h],o,0,s,s-1,e))){for(s-=v,f=(c-=v)+1,d=(u-=v)+1,l=0;l<v;l++)t[f+l]=o[d+l];if(s<=1){m=!0;break}}if(t[c--]=t[h--],0==--n){m=!0;break}p--}while(g>=fi||v>=fi);if(m)break;p<0&&(p=0),p+=2}(r=p)<1&&(r=1);if(1===s){for(f=(c-=n)+1,d=(h-=n)+1,l=n-1;l>=0;l--)t[f+l]=t[d+l];t[c]=o[u]}else{if(0===s)throw new Error;for(d=c-(s-1),l=0;l<s;l++)t[d+l]=o[l]}}(l,h,u,c))}i=[],n=[],this.mergeRuns=function(){for(;a>1;){var t=a-2;if(t>=1&&n[t-1]<=n[t]+n[t+1]||t>=2&&n[t-2]<=n[t]+n[t-1])n[t-1]<n[t+1]&&t--;else if(n[t]>n[t+1])break;s(t)}},this.forceMergeRuns=function(){for(;a>1;){var t=a-2;t>0&&n[t-1]<n[t+1]&&t--,s(t)}},this.pushRun=function(t,e){i[a]=t,n[a]=e,a+=1}}function xi(t,e,i,n){i||(i=0),n||(n=t.length);var r=n-i;if(!(r<2)){var a=0;if(r<di)gi(t,i,n,i+(a=pi(t,i,n,e)),e);else{var o=new yi(t,e),s=function(t){for(var e=0;t>=di;)e|=1&t,t>>=1;return t+e}(r);do{if((a=pi(t,i,n,e))<s){var l=r;l>s&&(l=s),gi(t,i,i+l,i+a,e),a=l}o.pushRun(i,a),o.mergeRuns(),r-=a,i+=a}while(0!==r);o.forceMergeRuns()}}}function _i(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var wi=function(){this._roots=[],this._displayList=[],this._displayListLen=0};wi.prototype={constructor:wi,traverse:function(t,e){for(var i=0;i<this._roots.length;i++)this._roots[i].traverse(t,e)},getDisplayList:function(t,e){return e=e||!1,t&&this.updateDisplayList(e),this._displayList},updateDisplayList:function(t){this._displayListLen=0;for(var e=this._roots,i=this._displayList,r=0,a=e.length;r<a;r++)this._updateAndAddDisplayable(e[r],null,t);i.length=this._displayListLen,n.canvasSupported&&xi(i,_i)},_updateAndAddDisplayable:function(t,e,i){if(!t.ignore||i){t.beforeUpdate(),t.__dirty&&t.update(),t.afterUpdate();var n=t.clipPath;if(n){e=e?e.slice():[];for(var r=n,a=t;r;)r.parent=a,r.updateTransform(),e.push(r),a=r,r=r.clipPath}if(t.isGroup){for(var o=t._children,s=0;s<o.length;s++){var l=o[s];t.__dirty&&(l.__dirty=!0),this._updateAndAddDisplayable(l,e,i)}t.__dirty=!1}else t.__clipPaths=e,this._displayList[this._displayListLen++]=t}},addRoot:function(t){t.__storage!==this&&(t instanceof ci&&t.addChildrenToStorage(this),this.addToStorage(t),this._roots.push(t))},delRoot:function(t){if(null==t){for(var e=0;e<this._roots.length;e++){var i=this._roots[e];i instanceof ci&&i.delChildrenFromStorage(this)}return this._roots=[],this._displayList=[],void(this._displayListLen=0)}if(t instanceof Array){e=0;for(var n=t.length;e<n;e++)this.delRoot(t[e])}else{var r=M(this._roots,t);r>=0&&(this.delFromStorage(t),this._roots.splice(r,1),t instanceof ci&&t.delChildrenFromStorage(this))}},addToStorage:function(t){return t&&(t.__storage=this,t.dirty(!1)),this},delFromStorage:function(t){return t&&(t.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:_i};var bi={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1},Mi=function(t,e,i){return bi.hasOwnProperty(e)?i*t.dpr:i},Si={NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},Ii=9,Ti=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],Ci=function(t){this.extendFrom(t,!1)};function Di(t,e,i){var n=null==e.x?0:e.x,r=null==e.x2?1:e.x2,a=null==e.y?0:e.y,o=null==e.y2?0:e.y2;return e.global||(n=n*i.width+i.x,r=r*i.width+i.x,a=a*i.height+i.y,o=o*i.height+i.y),n=isNaN(n)?0:n,r=isNaN(r)?1:r,a=isNaN(a)?0:a,o=isNaN(o)?0:o,t.createLinearGradient(n,a,r,o)}function Ai(t,e,i){var n=i.width,r=i.height,a=Math.min(n,r),o=null==e.x?.5:e.x,s=null==e.y?.5:e.y,l=null==e.r?.5:e.r;return e.global||(o=o*n+i.x,s=s*r+i.y,l*=a),t.createRadialGradient(o,s,0,o,s,l)}Ci.prototype={constructor:Ci,fill:"#000",stroke:null,opacity:1,fillOpacity:null,strokeOpacity:null,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(t,e,i){var n=i&&i.style,r=!n||t.__attrCachedBy!==Si.STYLE_BIND;t.__attrCachedBy=Si.STYLE_BIND;for(var a=0;a<Ti.length;a++){var o=Ti[a],s=o[0];(r||this[s]!==n[s])&&(t[s]=Mi(t,s,this[s]||o[1]))}if((r||this.fill!==n.fill)&&(t.fillStyle=this.fill),(r||this.stroke!==n.stroke)&&(t.strokeStyle=this.stroke),(r||this.opacity!==n.opacity)&&(t.globalAlpha=null==this.opacity?1:this.opacity),(r||this.blend!==n.blend)&&(t.globalCompositeOperation=this.blend||"source-over"),this.hasStroke()){var l=this.lineWidth;t.lineWidth=l/(this.strokeNoScale&&e&&e.getLineScale?e.getLineScale():1)}},hasFill:function(){var t=this.fill;return null!=t&&"none"!==t},hasStroke:function(){var t=this.stroke;return null!=t&&"none"!==t&&this.lineWidth>0},extendFrom:function(t,e){if(t)for(var i in t)!t.hasOwnProperty(i)||!0!==e&&(!1===e?this.hasOwnProperty(i):null==t[i])||(this[i]=t[i])},set:function(t,e){"string"==typeof t?this[t]=e:this.extendFrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendFrom(this,!0),t},getGradient:function(t,e,i){for(var n=("radial"===e.type?Ai:Di)(t,e,i),r=e.colorStops,a=0;a<r.length;a++)n.addColorStop(r[a].offset,r[a].color);return n}};for(var ki=Ci.prototype,Pi=0;Pi<Ti.length;Pi++){var Li=Ti[Pi];Li[0]in ki||(ki[Li[0]]=Li[1])}Ci.getGradient=ki.getGradient;var Oi=function(t,e){this.image=t,this.repeat=e,this.type="pattern"};function zi(){return!1}function Bi(t,e,i){var n=w(),r=e.getWidth(),a=e.getHeight(),o=n.style;return o&&(o.position="absolute",o.left=0,o.top=0,o.width=r+"px",o.height=a+"px",n.setAttribute("data-zr-dom-id",t)),n.width=r*i,n.height=a*i,n}Oi.prototype.getCanvasPattern=function(t){return t.createPattern(this.image,this.repeat||"repeat")};var Ei=function(t,e,i){var n;i=i||$e,"string"==typeof t?n=Bi(t,e,i):E(t)&&(t=(n=t).id),this.id=t,this.dom=n;var r=n.style;r&&(n.onselectstart=zi,r["-webkit-user-select"]="none",r["user-select"]="none",r["-webkit-touch-callout"]="none",r["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",r.padding=0,r.margin=0,r["border-width"]=0),this.domBack=null,this.ctxBack=null,this.painter=e,this.config=null,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=.7,this.dpr=i};Ei.prototype={constructor:Ei,__dirty:!0,__used:!1,__drawIndex:0,__startIndex:0,__endIndex:0,incremental:!1,getElementCount:function(){return this.__endIndex-this.__startIndex},initContext:function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},createBackBuffer:function(){var t=this.dpr;this.domBack=Bi("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!==t&&this.ctxBack.scale(t,t)},resize:function(t,e){var i=this.dpr,n=this.dom,r=n.style,a=this.domBack;r&&(r.width=t+"px",r.height=e+"px"),n.width=t*i,n.height=e*i,a&&(a.width=t*i,a.height=e*i,1!==i&&this.ctxBack.scale(i,i))},clear:function(t,e){var i,n=this.dom,r=this.ctx,a=n.width,o=n.height,s=(e=e||this.clearColor,this.motionBlur&&!t),l=this.lastFrameAlpha,h=this.dpr;(s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(n,0,0,a/h,o/h)),r.clearRect(0,0,a,o),e&&"transparent"!==e)&&(e.colorStops?(i=e.__canvasGradient||Ci.getGradient(r,e,{x:0,y:0,width:a,height:o}),e.__canvasGradient=i):e.image&&(i=Oi.prototype.getCanvasPattern.call(e,r)),r.save(),r.fillStyle=i||e,r.fillRect(0,0,a,o),r.restore());if(s){var u=this.domBack;r.save(),r.globalAlpha=l,r.drawImage(u,0,0,a,o),r.restore()}}};var Ri="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){setTimeout(t,16)},Ni=new ce(50);function Fi(t){if("string"==typeof t){var e=Ni.get(t);return e&&e.image}return t}function Wi(t,e,i,n,r){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!i)return e;var a=Ni.get(t),o={hostEl:i,cb:n,cbPayload:r};return a?!Hi(e=a.image)&&a.pending.push(o):((e=new Image).onload=e.onerror=Vi,Ni.put(t,e.__cachedImgObj={image:e,pending:[o]}),e.src=e.__zrImageSrc=t),e}return t}return e}function Vi(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<t.pending.length;e++){var i=t.pending[e],n=i.cb;n&&n(this,i.cbPayload),i.hostEl.dirty()}t.pending.length=0}function Hi(t){return t&&t.width&&t.height}var Gi={},Zi=0,Xi=5e3,Yi=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,ji="12px sans-serif",qi={};function Ui(t,e){var i=t+":"+(e=e||ji);if(Gi[i])return Gi[i];for(var n=(t+"").split("\n"),r=0,a=0,o=n.length;a<o;a++)r=Math.max(an(n[a],e).width,r);return Zi>Xi&&(Zi=0,Gi={}),Zi++,Gi[i]=r,r}function $i(t,e,i,n,r,a,o,s){return o?function(t,e,i,n,r,a,o,s){var l=sn(t,{rich:o,truncate:s,font:e,textAlign:i,textPadding:r,textLineHeight:a}),h=l.outerWidth,u=l.outerHeight,c=Ki(0,h,i),d=Qi(0,u,n);return new ui(c,d,h,u)}(t,e,i,n,r,a,o,s):function(t,e,i,n,r,a,o){var s=on(t,e,r,a,o),l=Ui(t,e);r&&(l+=r[1]+r[3]);var h=s.outerHeight,u=Ki(0,l,i),c=Qi(0,h,n),d=new ui(u,c,l,h);return d.lineHeight=s.lineHeight,d}(t,e,i,n,r,a,s)}function Ki(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function Qi(t,e,i){return"middle"===i?t-=e/2:"bottom"===i&&(t-=e),t}function Ji(t,e,i,n,r){if(!e)return"";var a=(t+"").split("\n");r=tn(e,i,n,r);for(var o=0,s=a.length;o<s;o++)a[o]=en(a[o],r);return a.join("\n")}function tn(t,e,i,n){(n=y({},n)).font=e;i=H(i,"...");n.maxIterations=H(n.maxIterations,2);var r=n.minChar=H(n.minChar,0);n.cnCharWidth=Ui("国",e);var a=n.ascCharWidth=Ui("a",e);n.placeholder=H(n.placeholder,"");for(var o=t=Math.max(0,t-1),s=0;s<r&&o>=a;s++)o-=a;var l=Ui(i,e);return l>o&&(i="",l=0),o=t-l,n.ellipsis=i,n.ellipsisWidth=l,n.contentWidth=o,n.containerWidth=t,n}function en(t,e){var i=e.containerWidth,n=e.font,r=e.contentWidth;if(!i)return"";var a=Ui(t,n);if(a<=i)return t;for(var o=0;;o++){if(a<=r||o>=e.maxIterations){t+=e.ellipsis;break}var s=0===o?nn(t,r,e.ascCharWidth,e.cnCharWidth):a>0?Math.floor(t.length*r/a):0;a=Ui(t=t.substr(0,s),n)}return""===t&&(t=e.placeholder),t}function nn(t,e,i,n){for(var r=0,a=0,o=t.length;a<o&&r<e;a++){var s=t.charCodeAt(a);r+=0<=s&&s<=127?i:n}return a}function rn(t){return Ui("国",t)}function an(t,e){return qi.measureText(t,e)}function on(t,e,i,n,r){null!=t&&(t+="");var a=H(n,rn(e)),o=t?t.split("\n"):[],s=o.length*a,l=s;if(i&&(l+=i[0]+i[2]),t&&r){var h=r.outerHeight,u=r.outerWidth;if(null!=h&&l>h)t="",o=[];else if(null!=u)for(var c=tn(u-(i?i[1]+i[3]:0),e,r.ellipsis,{minChar:r.minChar,placeholder:r.placeholder}),d=0,f=o.length;d<f;d++)o[d]=en(o[d],c)}return{lines:o,height:s,outerHeight:l,lineHeight:a}}function sn(t,e){var i={lines:[],width:0,height:0};if(null!=t&&(t+=""),!t)return i;for(var n,r=Yi.lastIndex=0;null!=(n=Yi.exec(t));){var a=n.index;a>r&&ln(i,t.substring(r,a)),ln(i,n[2],n[1]),r=Yi.lastIndex}r<t.length&&ln(i,t.substring(r,t.length));var o=i.lines,s=0,l=0,h=[],u=e.textPadding,c=e.truncate,d=c&&c.outerWidth,f=c&&c.outerHeight;u&&(null!=d&&(d-=u[1]+u[3]),null!=f&&(f-=u[0]+u[2]));for(var p=0;p<o.length;p++){for(var g=o[p],v=0,m=0,y=0;y<g.tokens.length;y++){var x=(A=g.tokens[y]).styleName&&e.rich[A.styleName]||{},_=A.textPadding=x.textPadding,w=A.font=x.font||e.font,b=A.textHeight=H(x.textHeight,rn(w));if(_&&(b+=_[0]+_[2]),A.height=b,A.lineHeight=G(x.textLineHeight,e.textLineHeight,b),A.textAlign=x&&x.textAlign||e.textAlign,A.textVerticalAlign=x&&x.textVerticalAlign||"middle",null!=f&&s+A.lineHeight>f)return{lines:[],width:0,height:0};A.textWidth=Ui(A.text,w);var M=x.textWidth,S=null==M||"auto"===M;if("string"==typeof M&&"%"===M.charAt(M.length-1))A.percentWidth=M,h.push(A),M=0;else{if(S){M=A.textWidth;var I=x.textBackgroundColor,T=I&&I.image;T&&Hi(T=Fi(T))&&(M=Math.max(M,T.width*b/T.height))}var C=_?_[1]+_[3]:0;M+=C;var D=null!=d?d-m:null;null!=D&&D<M&&(!S||D<C?(A.text="",A.textWidth=M=0):(A.text=Ji(A.text,D-C,w,c.ellipsis,{minChar:c.minChar}),A.textWidth=Ui(A.text,w),M=A.textWidth+C))}m+=A.width=M,x&&(v=Math.max(v,A.lineHeight))}g.width=m,g.lineHeight=v,s+=v,l=Math.max(l,m)}i.outerWidth=i.width=H(e.textWidth,l),i.outerHeight=i.height=H(e.textHeight,s),u&&(i.outerWidth+=u[1]+u[3],i.outerHeight+=u[0]+u[2]);for(p=0;p<h.length;p++){var A,k=(A=h[p]).percentWidth;A.width=parseInt(k,10)/100*l}return i}function ln(t,e,i){for(var n=""===e,r=e.split("\n"),a=t.lines,o=0;o<r.length;o++){var s=r[o],l={styleName:i,text:s,isLineHolder:!s&&!n};if(o)a.push({tokens:[l]});else{var h=(a[a.length-1]||(a[0]={tokens:[]})).tokens,u=h.length;1===u&&h[0].isLineHolder?h[0]=l:(s||!u||n)&&h.push(l)}}}function hn(t,e){var i,n,r,a,o,s=e.x,l=e.y,h=e.width,u=e.height,c=e.r;h<0&&(s+=h,h=-h),u<0&&(l+=u,u=-u),"number"==typeof c?i=n=r=a=c:c instanceof Array?1===c.length?i=n=r=a=c[0]:2===c.length?(i=r=c[0],n=a=c[1]):3===c.length?(i=c[0],n=a=c[1],r=c[2]):(i=c[0],n=c[1],r=c[2],a=c[3]):i=n=r=a=0,i+n>h&&(i*=h/(o=i+n),n*=h/o),r+a>h&&(r*=h/(o=r+a),a*=h/o),n+r>u&&(n*=u/(o=n+r),r*=u/o),i+a>u&&(i*=u/(o=i+a),a*=u/o),t.moveTo(s+i,l),t.lineTo(s+h-n,l),0!==n&&t.arc(s+h-n,l+n,n,-Math.PI/2,0),t.lineTo(s+h,l+u-r),0!==r&&t.arc(s+h-r,l+u-r,r,0,Math.PI/2),t.lineTo(s+a,l+u),0!==a&&t.arc(s+a,l+u-a,a,Math.PI/2,Math.PI),t.lineTo(s,l+i),0!==i&&t.arc(s+i,l+i,i,Math.PI,1.5*Math.PI)}qi.measureText=function(t,e){var i=b();return i.font=e||ji,i.measureText(t)};var un=ji,cn={left:1,right:1,center:1},dn={top:1,bottom:1,middle:1},fn=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]];function pn(t){return gn(t),C(t.rich,gn),t}function gn(t){if(t){t.font=function(t){var e=(t.fontSize||t.fontFamily)&&[t.fontStyle,t.fontWeight,(t.fontSize||12)+"px",t.fontFamily||"sans-serif"].join(" ");return e&&j(e)||t.textFont||t.font}(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||cn[e]?e:"left";var i=t.textVerticalAlign||t.textBaseline;"center"===i&&(i="middle"),t.textVerticalAlign=null==i||dn[i]?i:"top",t.textPadding&&(t.textPadding=X(t.textPadding))}}function vn(t,e,i,n,r,a){n.rich?function(t,e,i,n,r,a){a!==Ii&&(e.__attrCachedBy=Si.NONE);var o=t.__textCotentBlock;o&&!t.__dirtyText||(o=t.__textCotentBlock=sn(i,n));!function(t,e,i,n,r){var a=i.width,o=i.outerWidth,s=i.outerHeight,l=n.textPadding,h=bn(s,n,r),u=h.baseX,c=h.baseY,d=h.textAlign,f=h.textVerticalAlign;mn(e,n,r,u,c);var p=Ki(u,o,d),g=Qi(c,s,f),v=p,m=g;l&&(v+=l[3],m+=l[0]);var y=v+a;xn(n)&&_n(t,e,n,p,g,o,s);for(var x=0;x<i.lines.length;x++){for(var _,w=i.lines[x],b=w.tokens,M=b.length,S=w.lineHeight,I=w.width,T=0,C=v,D=y,A=M-1;T<M&&(!(_=b[T]).textAlign||"left"===_.textAlign);)yn(t,e,_,n,S,m,C,"left"),I-=_.width,C+=_.width,T++;for(;A>=0&&"right"===(_=b[A]).textAlign;)yn(t,e,_,n,S,m,D,"right"),I-=_.width,D-=_.width,A--;for(C+=(a-(C-v)-(y-D)-I)/2;T<=A;)_=b[T],yn(t,e,_,n,S,m,C+_.width/2,"center"),C+=_.width,T++;m+=S}}(t,e,o,n,r)}(t,e,i,n,r,a):function(t,e,i,n,r,a){var o,s=xn(n),l=!1,h=e.__attrCachedBy===Si.PLAIN_TEXT;a!==Ii?(a&&(o=a.style,l=!s&&h&&o),e.__attrCachedBy=s?Si.NONE:Si.PLAIN_TEXT):h&&(e.__attrCachedBy=Si.NONE);var u=n.font||un;l&&u===(o.font||un)||(e.font=u);var c=t.__computedFont;t.__styleFont!==u&&(t.__styleFont=u,c=t.__computedFont=e.font);var d=n.textPadding,f=n.textLineHeight,p=t.__textCotentBlock;p&&!t.__dirtyText||(p=t.__textCotentBlock=on(i,c,d,f,n.truncate));var g=p.outerHeight,v=p.lines,m=p.lineHeight,y=bn(g,n,r),x=y.baseX,_=y.baseY,w=y.textAlign||"left",b=y.textVerticalAlign;mn(e,n,r,x,_);var M=Qi(_,g,b),S=x,I=M;if(s||d){var T=Ui(i,c),C=T;d&&(C+=d[1]+d[3]);var D=Ki(x,C,w);s&&_n(t,e,n,D,M,C,g),d&&(S=Cn(x,w,d),I+=d[0])}e.textAlign=w,e.textBaseline="middle",e.globalAlpha=n.opacity||1;for(var A=0;A<fn.length;A++){var k=fn[A],P=k[0],L=k[1],O=n[P];l&&O===o[P]||(e[L]=Mi(e,L,O||k[2]))}I+=m/2;var z=n.textStrokeWidth,B=l?o.textStrokeWidth:null,E=!l||z!==B,R=!l||E||n.textStroke!==o.textStroke,N=Sn(n.textStroke,z),F=In(n.textFill);N&&(E&&(e.lineWidth=z),R&&(e.strokeStyle=N));F&&(l&&n.textFill===o.textFill||(e.fillStyle=F));if(1===v.length)N&&e.strokeText(v[0],S,I),F&&e.fillText(v[0],S,I);else for(var A=0;A<v.length;A++)N&&e.strokeText(v[A],S,I),F&&e.fillText(v[A],S,I),I+=m}(t,e,i,n,r,a)}function mn(t,e,i,n,r){if(i&&e.textRotation){var a=e.textOrigin;"center"===a?(n=i.width/2+i.x,r=i.height/2+i.y):a&&(n=a[0]+i.x,r=a[1]+i.y),t.translate(n,r),t.rotate(-e.textRotation),t.translate(-n,-r)}}function yn(t,e,i,n,r,a,o,s){var l=n.rich[i.styleName]||{};l.text=i.text;var h=i.textVerticalAlign,u=a+r/2;"top"===h?u=a+i.height/2:"bottom"===h&&(u=a+r-i.height/2),!i.isLineHolder&&xn(l)&&_n(t,e,l,"right"===s?o-i.width:"center"===s?o-i.width/2:o,u-i.height/2,i.width,i.height);var c=i.textPadding;c&&(o=Cn(o,s,c),u-=i.height/2-c[2]-i.textHeight/2),Mn(e,"shadowBlur",G(l.textShadowBlur,n.textShadowBlur,0)),Mn(e,"shadowColor",l.textShadowColor||n.textShadowColor||"transparent"),Mn(e,"shadowOffsetX",G(l.textShadowOffsetX,n.textShadowOffsetX,0)),Mn(e,"shadowOffsetY",G(l.textShadowOffsetY,n.textShadowOffsetY,0)),Mn(e,"textAlign",s),Mn(e,"textBaseline","middle"),Mn(e,"font",i.font||un);var d=Sn(l.textStroke||n.textStroke,p),f=In(l.textFill||n.textFill),p=H(l.textStrokeWidth,n.textStrokeWidth);d&&(Mn(e,"lineWidth",p),Mn(e,"strokeStyle",d),e.strokeText(i.text,o,u)),f&&(Mn(e,"fillStyle",f),e.fillText(i.text,o,u))}function xn(t){return!!(t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor)}function _n(t,e,i,n,r,a,o){var s=i.textBackgroundColor,l=i.textBorderWidth,h=i.textBorderColor,u=B(s);if(Mn(e,"shadowBlur",i.textBoxShadowBlur||0),Mn(e,"shadowColor",i.textBoxShadowColor||"transparent"),Mn(e,"shadowOffsetX",i.textBoxShadowOffsetX||0),Mn(e,"shadowOffsetY",i.textBoxShadowOffsetY||0),u||l&&h){e.beginPath();var c=i.textBorderRadius;c?hn(e,{x:n,y:r,width:a,height:o,r:c}):e.rect(n,r,a,o),e.closePath()}if(u)if(Mn(e,"fillStyle",s),null!=i.fillOpacity){var d=e.globalAlpha;e.globalAlpha=i.fillOpacity*i.opacity,e.fill(),e.globalAlpha=d}else e.fill();else if(E(s)){var f=s.image;(f=Wi(f,null,t,wn,s))&&Hi(f)&&e.drawImage(f,n,r,a,o)}if(l&&h)if(Mn(e,"lineWidth",l),Mn(e,"strokeStyle",h),null!=i.strokeOpacity){d=e.globalAlpha;e.globalAlpha=i.strokeOpacity*i.opacity,e.stroke(),e.globalAlpha=d}else e.stroke()}function wn(t,e){e.image=t}function bn(t,e,i){var n=e.x||0,r=e.y||0,a=e.textAlign,o=e.textVerticalAlign;if(i){var s=e.textPosition;if(s instanceof Array)n=i.x+Tn(s[0],i.width),r=i.y+Tn(s[1],i.height);else{var l=function(t,e,i){var n=e.x,r=e.y,a=e.height,o=e.width,s=a/2,l="left",h="top";switch(t){case"left":n-=i,r+=s,l="right",h="middle";break;case"right":n+=i+o,r+=s,h="middle";break;case"top":n+=o/2,r-=i,l="center",h="bottom";break;case"bottom":n+=o/2,r+=a+i,l="center";break;case"inside":n+=o/2,r+=s,l="center",h="middle";break;case"insideLeft":n+=i,r+=s,h="middle";break;case"insideRight":n+=o-i,r+=s,l="right",h="middle";break;case"insideTop":n+=o/2,r+=i,l="center";break;case"insideBottom":n+=o/2,r+=a-i,l="center",h="bottom";break;case"insideTopLeft":n+=i,r+=i;break;case"insideTopRight":n+=o-i,r+=i,l="right";break;case"insideBottomLeft":n+=i,r+=a-i,h="bottom";break;case"insideBottomRight":n+=o-i,r+=a-i,l="right",h="bottom"}return{x:n,y:r,textAlign:l,textVerticalAlign:h}}(s,i,e.textDistance);n=l.x,r=l.y,a=a||l.textAlign,o=o||l.textVerticalAlign}var h=e.textOffset;h&&(n+=h[0],r+=h[1])}return{baseX:n,baseY:r,textAlign:a,textVerticalAlign:o}}function Mn(t,e,i){return t[e]=Mi(t,e,i),t[e]}function Sn(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function In(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function Tn(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function Cn(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}function Dn(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}var An=new ui,kn=function(){};function Pn(t){for(var e in t=t||{},ii.call(this,t),t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new Ci(t.style,this),this._rect=null,this.__clipPaths=[]}function Ln(t){Pn.call(this,t)}kn.prototype={constructor:kn,drawRectText:function(t,e){var i=this.style;e=i.textRect||e,this.__dirty&&pn(i);var n=i.text;if(null!=n&&(n+=""),Dn(n,i)){t.save();var r=this.transform;i.transformText?this.setTransform(t):r&&(An.copy(e),An.applyTransform(r),e=An),vn(this,t,n,i,e,Ii),t.restore()}}},Pn.prototype={constructor:Pn,type:"displayable",__dirty:!0,invisible:!1,z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:!1,incremental:!1,globalScaleRatio:1,beforeBrush:function(t){},afterBrush:function(t){},brush:function(t,e){},getBoundingRect:function(){},contain:function(t,e){return this.rectContain(t,e)},traverse:function(t,e){t.call(e,this)},rectContain:function(t,e){var i=this.transformCoordToLocal(t,e);return this.getBoundingRect().contain(i[0],i[1])},dirty:function(){this.__dirty=this.__dirtyText=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(t){return this.animate("style",t)},attrKV:function(t,e){"style"!==t?ii.prototype.attrKV.call(this,t,e):this.style.set(e)},setStyle:function(t,e){return this.style.set(t,e),this.dirty(!1),this},useStyle:function(t){return this.style=new Ci(t,this),this.dirty(!1),this}},S(Pn,ii),I(Pn,kn),Ln.prototype={constructor:Ln,type:"image",brush:function(t,e){var i=this.style,n=i.image;i.bind(t,this,e);var r=this._image=Wi(n,this._image,this,this.onload);if(r&&Hi(r)){var a=i.x||0,o=i.y||0,s=i.width,l=i.height,h=r.width/r.height;if(null==s&&null!=l?s=l*h:null==l&&null!=s?l=s/h:null==s&&null==l&&(s=r.width,l=r.height),this.setTransform(t),i.sWidth&&i.sHeight){var u=i.sx||0,c=i.sy||0;t.drawImage(r,u,c,i.sWidth,i.sHeight,a,o,s,l)}else if(i.sx&&i.sy){var d=s-(u=i.sx),f=l-(c=i.sy);t.drawImage(r,u,c,d,f,a,o,s,l)}else t.drawImage(r,a,o,s,l);null!=i.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))}},getBoundingRect:function(){var t=this.style;return this._rect||(this._rect=new ui(t.x||0,t.y||0,t.width||0,t.height||0)),this._rect}},S(Ln,Pn);function On(t){return parseInt(t,10)}var zn=new ui(0,0,0,0),Bn=new ui(0,0,0,0);var En=function(t,e,i){this.type="canvas";var n=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase();this._opts=i=y({},i||{}),this.dpr=i.devicePixelRatio||$e,this._singleCanvas=n,this.root=t;var r=t.style;r&&(r["-webkit-tap-highlight-color"]="transparent",r["-webkit-user-select"]=r["user-select"]=r["-webkit-touch-callout"]="none",t.innerHTML=""),this.storage=e;var a=this._zlevelList=[],o=this._layers={};if(this._layerConfig={},this._needsManuallyCompositing=!1,n){var s=t.width,l=t.height;null!=i.width&&(s=i.width),null!=i.height&&(l=i.height),this.dpr=i.devicePixelRatio||1,t.width=s*this.dpr,t.height=l*this.dpr,this._width=s,this._height=l;var h=new Ei(t,this,this.dpr);h.__builtin__=!0,h.initContext(),o[314159]=h,h.zlevel=314159,a.push(314159),this._domRoot=t}else{this._width=this._getSize(0),this._height=this._getSize(1);var u=this._domRoot=function(t,e){var i=document.createElement("div");return i.style.cssText=["position:relative","overflow:hidden","width:"+t+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",i}(this._width,this._height);t.appendChild(u)}this._hoverlayer=null,this._hoverElements=[]};En.prototype={constructor:En,getType:function(){return"canvas"},isSingleCanvas:function(){return this._singleCanvas},getViewportRoot:function(){return this._domRoot},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(t){var e=this.storage.getDisplayList(!0),i=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,t,this._redrawId);for(var n=0;n<i.length;n++){var r=i[n],a=this._layers[r];if(!a.__builtin__&&a.refresh){var o=0===n?this._backgroundColor:null;a.refresh(o)}}return this.refreshHover(),this},addHover:function(t,e){if(!t.__hoverMir){var i=new t.constructor({style:t.style,shape:t.shape,z:t.z,z2:t.z2,silent:t.silent});return i.__from=t,t.__hoverMir=i,e&&i.setStyle(e),this._hoverElements.push(i),i}},removeHover:function(t){var e=t.__hoverMir,i=this._hoverElements,n=M(i,e);n>=0&&i.splice(n,1),t.__hoverMir=null},clearHover:function(t){for(var e=this._hoverElements,i=0;i<e.length;i++){var n=e[i].__from;n&&(n.__hoverMir=null)}e.length=0},refreshHover:function(){var t=this._hoverElements,e=t.length,i=this._hoverlayer;if(i&&i.clear(),e){xi(t,this.storage.displayableSortFunc),i||(i=this._hoverlayer=this.getLayer(1e5));var n={};i.ctx.save();for(var r=0;r<e;){var a=t[r],o=a.__from;o&&o.__zr?(r++,o.invisible||(a.transform=o.transform,a.invTransform=o.invTransform,a.__clipPaths=o.__clipPaths,this._doPaintEl(a,i,!0,n))):(t.splice(r,1),o.__hoverMir=null,e--)}i.ctx.restore()}},getHoverLayer:function(){return this.getLayer(1e5)},_paintList:function(t,e,i){if(this._redrawId===i){e=e||!1,this._updateLayerStatus(t);var n=this._doPaintList(t,e);if(this._needsManuallyCompositing&&this._compositeManually(),!n){var r=this;Ri(function(){r._paintList(t,e,i)})}}},_compositeManually:function(){var t=this.getLayer(314159).ctx,e=this._domRoot.width,i=this._domRoot.height;t.clearRect(0,0,e,i),this.eachBuiltinLayer(function(n){n.virtual&&t.drawImage(n.dom,0,0,e,i)})},_doPaintList:function(t,e){for(var i=[],r=0;r<this._zlevelList.length;r++){var a=this._zlevelList[r];(l=this._layers[a]).__builtin__&&l!==this._hoverlayer&&(l.__dirty||e)&&i.push(l)}for(var o=!0,s=0;s<i.length;s++){var l,h=(l=i[s]).ctx,u={};h.save();var c=e?l.__startIndex:l.__drawIndex,d=!e&&l.incremental&&Date.now,f=d&&Date.now(),p=l.zlevel===this._zlevelList[0]?this._backgroundColor:null;if(l.__startIndex===l.__endIndex)l.clear(!1,p);else if(c===l.__startIndex){var g=t[c];g.incremental&&g.notClear&&!e||l.clear(!1,p)}-1===c&&(console.error("For some unknown reason. drawIndex is -1"),c=l.__startIndex);for(var v=c;v<l.__endIndex;v++){var m=t[v];if(this._doPaintEl(m,l,e,u),m.__dirty=m.__dirtyText=!1,d)if(Date.now()-f>15)break}l.__drawIndex=v,l.__drawIndex<l.__endIndex&&(o=!1),u.prevElClipPaths&&h.restore(),h.restore()}return n.wxa&&C(this._layers,function(t){t&&t.ctx&&t.ctx.draw&&t.ctx.draw()}),o},_doPaintEl:function(t,e,i,n){var r=e.ctx,a=t.transform;if((e.__dirty||i)&&!t.invisible&&0!==t.style.opacity&&(!a||a[0]||a[3])&&(!t.culling||!function(t,e,i){return zn.copy(t.getBoundingRect()),t.transform&&zn.applyTransform(t.transform),Bn.width=e,Bn.height=i,!zn.intersect(Bn)}(t,this._width,this._height))){var o=t.__clipPaths;n.prevElClipPaths&&!function(t,e){if(t===e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var i=0;i<t.length;i++)if(t[i]!==e[i])return!0}(o,n.prevElClipPaths)||(n.prevElClipPaths&&(e.ctx.restore(),n.prevElClipPaths=null,n.prevEl=null),o&&(r.save(),function(t,e){for(var i=0;i<t.length;i++){var n=t[i];n.setTransform(e),e.beginPath(),n.buildPath(e,n.shape),e.clip(),n.restoreTransform(e)}}(o,r),n.prevElClipPaths=o)),t.beforeBrush&&t.beforeBrush(r),t.brush(r,n.prevEl||null),n.prevEl=t,t.afterBrush&&t.afterBrush(r)}},getLayer:function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=314159);var i=this._layers[t];return i||((i=new Ei("zr_"+t,this,this.dpr)).zlevel=t,i.__builtin__=!0,this._layerConfig[t]&&v(i,this._layerConfig[t],!0),e&&(i.virtual=e),this.insertLayer(t,i),i.initContext()),i},insertLayer:function(t,e){var i=this._layers,n=this._zlevelList,r=n.length,a=null,o=-1,s=this._domRoot;if(i[t])Qe("ZLevel "+t+" has been used already");else if(function(t){return!!t&&(!!t.__builtin__||"function"==typeof t.resize&&"function"==typeof t.refresh)}(e)){if(r>0&&t>n[0]){for(o=0;o<r-1&&!(n[o]<t&&n[o+1]>t);o++);a=i[n[o]]}if(n.splice(o+1,0,t),i[t]=e,!e.virtual)if(a){var l=a.dom;l.nextSibling?s.insertBefore(e.dom,l.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)}else Qe("Layer of zlevel "+t+" is not valid")},eachLayer:function(t,e){var i,n,r=this._zlevelList;for(n=0;n<r.length;n++)i=r[n],t.call(e,this._layers[i],i)},eachBuiltinLayer:function(t,e){var i,n,r,a=this._zlevelList;for(r=0;r<a.length;r++)n=a[r],(i=this._layers[n]).__builtin__&&t.call(e,i,n)},eachOtherLayer:function(t,e){var i,n,r,a=this._zlevelList;for(r=0;r<a.length;r++)n=a[r],(i=this._layers[n]).__builtin__||t.call(e,i,n)},getLayers:function(){return this._layers},_updateLayerStatus:function(t){function e(t){n&&(n.__endIndex!==t&&(n.__dirty=!0),n.__endIndex=t)}if(this.eachBuiltinLayer(function(t,e){t.__dirty=t.__used=!1}),this._singleCanvas)for(var i=1;i<t.length;i++){if((a=t[i]).zlevel!==t[i-1].zlevel||a.incremental){this._needsManuallyCompositing=!0;break}}var n=null,r=0;for(i=0;i<t.length;i++){var a,o,s=(a=t[i]).zlevel;a.incremental?((o=this.getLayer(s+.001,this._needsManuallyCompositing)).incremental=!0,r=1):o=this.getLayer(s+(r>0?.01:0),this._needsManuallyCompositing),o.__builtin__||Qe("ZLevel "+s+" has been used by unkown layer "+o.id),o!==n&&(o.__used=!0,o.__startIndex!==i&&(o.__dirty=!0),o.__startIndex=i,o.incremental?o.__drawIndex=-1:o.__drawIndex=i,e(i),n=o),a.__dirty&&(o.__dirty=!0,o.incremental&&o.__drawIndex<0&&(o.__drawIndex=i))}e(i),this.eachBuiltinLayer(function(t,e){!t.__used&&t.getElementCount()>0&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)})},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},setBackgroundColor:function(t){this._backgroundColor=t},configLayer:function(t,e){if(e){var i=this._layerConfig;i[t]?v(i[t],e,!0):i[t]=e;for(var n=0;n<this._zlevelList.length;n++){var r=this._zlevelList[n];if(r===t||r===t+.01)v(this._layers[r],i[t],!0)}}},delLayer:function(t){var e=this._layers,i=this._zlevelList,n=e[t];n&&(n.dom.parentNode.removeChild(n.dom),delete e[t],i.splice(M(i,t),1))},resize:function(t,e){if(this._domRoot.style){var i=this._domRoot;i.style.display="none";var n=this._opts;if(null!=t&&(n.width=t),null!=e&&(n.height=e),t=this._getSize(0),e=this._getSize(1),i.style.display="",this._width!==t||e!==this._height){for(var r in i.style.width=t+"px",i.style.height=e+"px",this._layers)this._layers.hasOwnProperty(r)&&this._layers[r].resize(t,e);C(this._progressiveLayers,function(i){i.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(314159).resize(t,e)}return this},clearLayer:function(t){var e=this._layers[t];e&&e.clear()},dispose:function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[314159].dom;var e=new Ei("image",this,t.pixelRatio||this.dpr);if(e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor),t.pixelRatio<=this.dpr){this.refresh();var i=e.dom.width,n=e.dom.height,r=e.ctx;this.eachLayer(function(t){t.__builtin__?r.drawImage(t.dom,0,0,i,n):t.renderToCanvas&&(e.ctx.save(),t.renderToCanvas(e.ctx),e.ctx.restore())})}else for(var a={},o=this.storage.getDisplayList(!0),s=0;s<o.length;s++){var l=o[s];this._doPaintEl(l,e,!0,a)}return e.dom},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,i=["width","height"][t],n=["clientWidth","clientHeight"][t],r=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=e[i]&&"auto"!==e[i])return parseFloat(e[i]);var o=this.root,s=document.defaultView.getComputedStyle(o);return(o[n]||On(s[i])||On(o.style[i]))-(On(s[r])||0)-(On(s[a])||0)|0},pathToImage:function(t,e){e=e||this.dpr;var i=document.createElement("canvas"),n=i.getContext("2d"),r=t.getBoundingRect(),a=t.style,o=a.shadowBlur*e,s=a.shadowOffsetX*e,l=a.shadowOffsetY*e,h=a.hasStroke()?a.lineWidth:0,u=Math.max(h/2,-s+o),c=Math.max(h/2,s+o),d=Math.max(h/2,-l+o),f=Math.max(h/2,l+o),p=r.width+u+c,g=r.height+d+f;i.width=p*e,i.height=g*e,n.scale(e,e),n.clearRect(0,0,p,g),n.dpr=e;var v={position:t.position,rotation:t.rotation,scale:t.scale};t.position=[u-r.x,d-r.y],t.rotation=0,t.scale=[1,1],t.updateTransform(),t&&t.brush(n);var m=new Ln({style:{x:0,y:0,image:i}});return null!=v.position&&(m.position=t.position=v.position),null!=v.rotation&&(m.rotation=t.rotation=v.rotation),null!=v.scale&&(m.scale=t.scale=v.scale),m}};var Rn=function(t){t=t||{},this.stage=t.stage||{},this.onframe=t.onframe||function(){},this._clips=[],this._running=!1,this._time,this._pausedTime,this._pauseStart,this._paused=!1,Mt.call(this)};Rn.prototype={constructor:Rn,addClip:function(t){this._clips.push(t)},addAnimator:function(t){t.animation=this;for(var e=t.getClips(),i=0;i<e.length;i++)this.addClip(e[i])},removeClip:function(t){var e=M(this._clips,t);e>=0&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),i=0;i<e.length;i++)this.removeClip(e[i]);t.animation=null},_update:function(){for(var t=(new Date).getTime()-this._pausedTime,e=t-this._time,i=this._clips,n=i.length,r=[],a=[],o=0;o<n;o++){var s=i[o],l=s.step(t,e);l&&(r.push(l),a.push(s))}for(o=0;o<n;)i[o]._needsRemove?(i[o]=i[n-1],i.pop(),n--):o++;n=r.length;for(o=0;o<n;o++)a[o].fire(r[o]);this._time=t,this.onframe(e),this.trigger("frame",e),this.stage.update&&this.stage.update()},_startLoop:function(){var t=this;this._running=!0,Ri(function e(){t._running&&(Ri(e),!t._paused&&t._update())})},start:function(){this._time=(new Date).getTime(),this._pausedTime=0,this._startLoop()},stop:function(){this._running=!1},pause:function(){this._paused||(this._pauseStart=(new Date).getTime(),this._paused=!0)},resume:function(){this._paused&&(this._pausedTime+=(new Date).getTime()-this._pauseStart,this._paused=!1)},clear:function(){this._clips=[]},isFinished:function(){return!this._clips.length},animate:function(t,e){var i=new qe(t,(e=e||{}).loop,e.getter,e.setter);return this.addAnimator(i),i}},I(Rn,Mt);var Nn=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Fn=["touchstart","touchend","touchmove"],Wn={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},Vn=D(Nn,function(t){var e=t.replace("mouse","pointer");return Wn[e]?e:t});function Hn(t){return"mousewheel"===t&&n.browser.firefox?"DOMMouseScroll":t}function Gn(t){t._touching=!0,clearTimeout(t._touchTimer),t._touchTimer=setTimeout(function(){t._touching=!1},700)}var Zn={mousemove:function(t){t=At(this.dom,t),this.trigger("mousemove",t)},mouseout:function(t){var e=(t=At(this.dom,t)).toElement||t.relatedTarget;if(e!==this.dom)for(;e&&9!==e.nodeType;){if(e===this.dom)return;e=e.parentNode}this.trigger("mouseout",t)},touchstart:function(t){(t=At(this.dom,t)).zrByTouch=!0,this._lastTouchMoment=new Date,this.handler.processGesture(this,t,"start"),Zn.mousemove.call(this,t),Zn.mousedown.call(this,t),Gn(this)},touchmove:function(t){(t=At(this.dom,t)).zrByTouch=!0,this.handler.processGesture(this,t,"change"),Zn.mousemove.call(this,t),Gn(this)},touchend:function(t){(t=At(this.dom,t)).zrByTouch=!0,this.handler.processGesture(this,t,"end"),Zn.mouseup.call(this,t),+new Date-this._lastTouchMoment<300&&Zn.click.call(this,t),Gn(this)},pointerdown:function(t){Zn.mousedown.call(this,t)},pointermove:function(t){Xn(t)||Zn.mousemove.call(this,t)},pointerup:function(t){Zn.mouseup.call(this,t)},pointerout:function(t){Xn(t)||Zn.mouseout.call(this,t)}};function Xn(t){var e=t.pointerType;return"pen"===e||"touch"===e}function Yn(t){var e;function i(e,i){C(e,function(e){!function(t,e,i){It?t.addEventListener(e,i):t.attachEvent("on"+e,i)}(t,Hn(e),i._handlers[e])},i)}Mt.call(this),this.dom=t,this._touching=!1,this._touchTimer,this._handlers={},e=this,C(Fn,function(t){e._handlers[t]=P(Zn[t],e)}),C(Vn,function(t){e._handlers[t]=P(Zn[t],e)}),C(Nn,function(t){e._handlers[t]=function(t,e){return function(){if(!e._touching)return t.apply(e,arguments)}}(Zn[t],e)}),n.pointerEventsSupported?i(Vn,this):(n.touchEventsSupported&&i(Fn,this),i(Nn,this))}C(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){Zn[t]=function(e){e=At(this.dom,e),this.trigger(t,e)}});var jn=Yn.prototype;jn.dispose=function(){for(var t=Nn.concat(Fn),e=0;e<t.length;e++){var i=t[e];kt(this.dom,Hn(i),this._handlers[i])}},jn.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},I(Yn,Mt);var qn=!n.canvasSupported,Un={canvas:En},$n={};function Kn(t,e){var n=new Qn(i(),t,e);return $n[n.id]=n,n}var Qn=function(t,e,i){i=i||{},this.dom=e,this.id=t;var r=this,a=new wi,o=i.renderer;if(qn){if(!Un.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");o="vml"}else o&&Un[o]||(o="canvas");var s=new Un[o](e,a,i,t);this.storage=a,this.painter=s;var l=n.node||n.worker?null:new Yn(s.getViewportRoot());this.handler=new Wt(a,s,l,s.root),this.animation=new Rn({stage:{update:P(this.flush,this)}}),this.animation.start(),this._needsRefresh;var h=a.delFromStorage,u=a.addToStorage;a.delFromStorage=function(t){h.call(a,t),t&&t.removeSelfFromZr(r)},a.addToStorage=function(t){u.call(a,t),t.addSelfToZr(r)}};Qn.prototype={constructor:Qn,getId:function(){return this.id},add:function(t){this.storage.addRoot(t),this._needsRefresh=!0},remove:function(t){this.storage.delRoot(t),this._needsRefresh=!0},configLayer:function(t,e){this.painter.configLayer&&this.painter.configLayer(t,e),this._needsRefresh=!0},setBackgroundColor:function(t){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this._needsRefresh=!0},refreshImmediately:function(){this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1},refresh:function(){this._needsRefresh=!0},flush:function(){var t;this._needsRefresh&&(t=!0,this.refreshImmediately()),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately()),t&&this.trigger("rendered")},addHover:function(t,e){if(this.painter.addHover){var i=this.painter.addHover(t,e);return this.refreshHover(),i}},removeHover:function(t){this.painter.removeHover&&(this.painter.removeHover(t),this.refreshHover())},clearHover:function(){this.painter.clearHover&&(this.painter.clearHover(),this.refreshHover())},refreshHover:function(){this._needsRefreshHover=!0},refreshHoverImmediately:function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.refreshHover()},resize:function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},clearAnimation:function(){this.animation.clear()},getWidth:function(){return this.painter.getWidth()},getHeight:function(){return this.painter.getHeight()},pathToImage:function(t,e){return this.painter.pathToImage(t,e)},setCursorStyle:function(t){this.handler.setCursorStyle(t)},findHover:function(t,e){return this.handler.findHover(t,e)},on:function(t,e,i){this.handler.on(t,e,i)},off:function(t,e){this.handler.off(t,e)},trigger:function(t,e){this.handler.trigger(t,e)},clear:function(){this.storage.delRoot(),this.painter.clear()},dispose:function(){var t;this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,t=this.id,delete $n[t]}};var Jn=(Object.freeze||Object)({version:"4.0.7",init:Kn,dispose:function(t){if(t)t.dispose();else{for(var e in $n)$n.hasOwnProperty(e)&&$n[e].dispose();$n={}}return this},getInstance:function(t){return $n[t]},registerPainter:function(t,e){Un[t]=e}}),tr=C,er=E,ir=O,nr="series\0";function rr(t){return t instanceof Array?t:null==t?[]:[t]}function ar(t,e,i){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var n=0,r=i.length;n<r;n++){var a=i[n];!t.emphasis[e].hasOwnProperty(a)&&t[e].hasOwnProperty(a)&&(t.emphasis[e][a]=t[e][a])}}}var or=["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 sr(t){return!er(t)||ir(t)||t instanceof Date?t:t.value}function lr(t,e){e=(e||[]).slice();var i=D(t||[],function(t,e){return{exist:t}});return tr(e,function(t,n){if(er(t)){for(var r=0;r<i.length;r++)if(!i[r].option&&null!=t.id&&i[r].exist.id===t.id+"")return i[r].option=t,void(e[n]=null);for(r=0;r<i.length;r++){var a=i[r].exist;if(!(i[r].option||null!=a.id&&null!=t.id||null==t.name||ur(t)||ur(a)||a.name!==t.name+""))return i[r].option=t,void(e[n]=null)}}}),tr(e,function(t,e){if(er(t)){for(var n=0;n<i.length;n++){var r=i[n].exist;if(!i[n].option&&!ur(r)&&null==t.id){i[n].option=t;break}}n>=i.length&&i.push({option:t})}}),i}function hr(t){var e=t.name;return!(!e||!e.indexOf(nr))}function ur(t){return er(t)&&t.id&&0===(t.id+"").indexOf("\0_ec_\0")}function cr(t,e){return null!=e.dataIndexInside?e.dataIndexInside:null!=e.dataIndex?O(e.dataIndex)?D(e.dataIndex,function(e){return t.indexOfRawIndex(e)}):t.indexOfRawIndex(e.dataIndex):null!=e.name?O(e.name)?D(e.name,function(e){return t.indexOfName(e)}):t.indexOfName(e.name):void 0}function dr(){var t="__\0ec_inner_"+fr+++"_"+Math.random().toFixed(5);return function(e){return e[t]||(e[t]={})}}var fr=0;function pr(t,e,i){if(B(e)){var n={};n[e+"Index"]=0,e=n}var r=i&&i.defaultMainType;!r||gr(e,r+"Index")||gr(e,r+"Id")||gr(e,r+"Name")||(e[r+"Index"]=0);var a={};return tr(e,function(n,r){n=e[r];if("dataIndex"!==r&&"dataIndexInside"!==r){var o=r.match(/^(\w+)(Index|Id|Name)$/)||[],s=o[1],l=(o[2]||"").toLowerCase();if(!(!s||!l||null==n||"index"===l&&"none"===n||i&&i.includeMainTypes&&M(i.includeMainTypes,s)<0)){var h={mainType:s};"index"===l&&"all"===n||(h[l]=n);var u=t.queryComponents(h);a[s+"Models"]=u,a[s+"Model"]=u[0]}}else a[r]=n}),a}function gr(t,e){return t&&t.hasOwnProperty(e)}function vr(t,e,i){t.setAttribute?t.setAttribute(e,i):t[e]=i}function mr(t){return"auto"===t?n.domSupported?"html":"richText":t||"html"}var yr=".",xr="___EC__COMPONENT__CONTAINER___";function _r(t){var e={main:"",sub:""};return t&&(t=t.split(yr),e.main=t[0]||"",e.sub=t[1]||""),e}function wr(t,e){t.$constructor=t,t.extend=function(t){var e=this,i=function(){t.$constructor?t.$constructor.apply(this,arguments):e.apply(this,arguments)};return y(i.prototype,t),i.extend=this.extend,i.superCall=Sr,i.superApply=Ir,S(i,this),i.superClass=e,i}}var br=0;function Mr(t){var e=["__\0is_clz",br++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}}function Sr(t,e){var i=Z(arguments,2);return this.superClass.prototype[e].apply(t,i)}function Ir(t,e,i){return this.superClass.prototype[e].apply(t,i)}function Tr(t,e){e=e||{};var i={};if(t.registerClass=function(t,e){if(e)if(function(t){Y(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}(e),(e=_r(e)).sub){if(e.sub!==xr){(function(t){var e=i[t.main];e&&e[xr]||((e=i[t.main]={})[xr]=!0);return e}(e))[e.sub]=t}}else i[e.main]=t;return t},t.getClass=function(t,e,n){var r=i[t];if(r&&r[xr]&&(r=e?r[e]:null),n&&!r)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return r},t.getClassesByMainType=function(t){t=_r(t);var e=[],n=i[t.main];return n&&n[xr]?C(n,function(t,i){i!==xr&&e.push(t)}):e.push(n),e},t.hasClass=function(t){return t=_r(t),!!i[t.main]},t.getAllClassMainTypes=function(){var t=[];return C(i,function(e,i){t.push(i)}),t},t.hasSubTypes=function(t){t=_r(t);var e=i[t.main];return e&&e[xr]},t.parseClassType=_r,e.registerWhenExtend){var n=t.extend;n&&(t.extend=function(e){var i=n.call(this,e);return t.registerClass(i,e.type)})}return t}var Cr=function(t){for(var e=0;e<t.length;e++)t[e][1]||(t[e][1]=t[e][0]);return function(e,i,n){for(var r={},a=0;a<t.length;a++){var o=t[a][1];if(!(i&&M(i,o)>=0||n&&M(n,o)<0)){var s=e.getShallow(o);null!=s&&(r[t[a][0]]=s)}}return r}},Dr=Cr([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Ar={getLineStyle:function(t){var e=Dr(this,t),i=this.getLineDash(e.lineWidth);return i&&(e.lineDash=i),e},getLineDash:function(t){null==t&&(t=1);var e=this.get("type"),i=Math.max(t,2),n=4*t;return"solid"===e||null==e?null:"dashed"===e?[n,n]:[i,i]}},kr=Cr([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),Pr={getAreaStyle:function(t,e){return kr(this,t,e)}},Lr=Math.pow,Or=Math.sqrt,zr=1e-8,Br=1e-4,Er=Or(3),Rr=1/3,Nr=it(),Fr=it(),Wr=it();function Vr(t){return t>-zr&&t<zr}function Hr(t){return t>zr||t<-zr}function Gr(t,e,i,n,r){var a=1-r;return a*a*(a*t+3*r*e)+r*r*(r*n+3*a*i)}function Zr(t,e,i,n,r){var a=1-r;return 3*(((e-t)*a+2*(i-e)*r)*a+(n-i)*r*r)}function Xr(t,e,i,n,r){var a=6*i-12*e+6*t,o=9*e+3*n-3*t-9*i,s=3*e-3*t,l=0;if(Vr(o)){if(Hr(a))(u=-s/a)>=0&&u<=1&&(r[l++]=u)}else{var h=a*a-4*o*s;if(Vr(h))r[0]=-a/(2*o);else if(h>0){var u,c=Or(h),d=(-a-c)/(2*o);(u=(-a+c)/(2*o))>=0&&u<=1&&(r[l++]=u),d>=0&&d<=1&&(r[l++]=d)}}return l}function Yr(t,e,i,n,r,a){var o=(e-t)*r+t,s=(i-e)*r+e,l=(n-i)*r+i,h=(s-o)*r+o,u=(l-s)*r+s,c=(u-h)*r+h;a[0]=t,a[1]=o,a[2]=h,a[3]=c,a[4]=c,a[5]=u,a[6]=l,a[7]=n}function jr(t,e,i,n){var r=1-n;return r*(r*t+2*n*e)+n*n*i}function qr(t,e,i,n){return 2*((1-n)*(e-t)+n*(i-e))}function Ur(t,e,i){var n=t+i-2*e;return 0===n?.5:(t-e)/n}function $r(t,e,i,n,r){var a=(e-t)*n+t,o=(i-e)*n+e,s=(o-a)*n+a;r[0]=t,r[1]=a,r[2]=s,r[3]=s,r[4]=o,r[5]=i}var Kr=Math.min,Qr=Math.max,Jr=Math.sin,ta=Math.cos,ea=2*Math.PI,ia=it(),na=it(),ra=it();function aa(t,e,i){if(0!==t.length){var n,r=t[0],a=r[0],o=r[0],s=r[1],l=r[1];for(n=1;n<t.length;n++)r=t[n],a=Kr(a,r[0]),o=Qr(o,r[0]),s=Kr(s,r[1]),l=Qr(l,r[1]);e[0]=a,e[1]=s,i[0]=o,i[1]=l}}function oa(t,e,i,n,r,a){r[0]=Kr(t,i),r[1]=Kr(e,n),a[0]=Qr(t,i),a[1]=Qr(e,n)}var sa=[],la=[];function ha(t,e,i,n,r,a,o,s,l,h){var u,c=Xr,d=Gr,f=c(t,i,r,o,sa);for(l[0]=1/0,l[1]=1/0,h[0]=-1/0,h[1]=-1/0,u=0;u<f;u++){var p=d(t,i,r,o,sa[u]);l[0]=Kr(p,l[0]),h[0]=Qr(p,h[0])}for(f=c(e,n,a,s,la),u=0;u<f;u++){var g=d(e,n,a,s,la[u]);l[1]=Kr(g,l[1]),h[1]=Qr(g,h[1])}l[0]=Kr(t,l[0]),h[0]=Qr(t,h[0]),l[0]=Kr(o,l[0]),h[0]=Qr(o,h[0]),l[1]=Kr(e,l[1]),h[1]=Qr(e,h[1]),l[1]=Kr(s,l[1]),h[1]=Qr(s,h[1])}function ua(t,e,i,n,r,a,o,s){var l=Ur,h=jr,u=Qr(Kr(l(t,i,r),1),0),c=Qr(Kr(l(e,n,a),1),0),d=h(t,i,r,u),f=h(e,n,a,c);o[0]=Kr(t,r,d),o[1]=Kr(e,a,f),s[0]=Qr(t,r,d),s[1]=Qr(e,a,f)}function ca(t,e,i,n,r,a,o,s,l){var h=mt,u=yt,c=Math.abs(r-a);if(c%ea<1e-4&&c>1e-4)return s[0]=t-i,s[1]=e-n,l[0]=t+i,void(l[1]=e+n);if(ia[0]=ta(r)*i+t,ia[1]=Jr(r)*n+e,na[0]=ta(a)*i+t,na[1]=Jr(a)*n+e,h(s,ia,na),u(l,ia,na),(r%=ea)<0&&(r+=ea),(a%=ea)<0&&(a+=ea),r>a&&!o?a+=ea:r<a&&o&&(r+=ea),o){var d=a;a=r,r=d}for(var f=0;f<a;f+=Math.PI/2)f>r&&(ra[0]=ta(f)*i+t,ra[1]=Jr(f)*n+e,h(s,ra,s),u(l,ra,l))}var da={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},fa=[],pa=[],ga=[],va=[],ma=Math.min,ya=Math.max,xa=Math.cos,_a=Math.sin,wa=Math.sqrt,ba=Math.abs,Ma="undefined"!=typeof Float32Array,Sa=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};function Ia(t,e,i,n,r,a,o){if(0===r)return!1;var s=r,l=0;if(o>e+s&&o>n+s||o<e-s&&o<n-s||a>t+s&&a>i+s||a<t-s&&a<i-s)return!1;if(t===i)return Math.abs(a-t)<=s/2;var h=(l=(e-n)/(t-i))*a-o+(t*n-i*e)/(t-i);return h*h/(l*l+1)<=s/2*s/2}function Ta(t,e,i,n,r,a,o,s,l,h,u){if(0===l)return!1;var c=l;return!(u>e+c&&u>n+c&&u>a+c&&u>s+c||u<e-c&&u<n-c&&u<a-c&&u<s-c||h>t+c&&h>i+c&&h>r+c&&h>o+c||h<t-c&&h<i-c&&h<r-c&&h<o-c)&&function(t,e,i,n,r,a,o,s,l,h,u){var c,d,f,p,g,v=.005,m=1/0;Nr[0]=l,Nr[1]=h;for(var y=0;y<1;y+=.05)Fr[0]=Gr(t,i,r,o,y),Fr[1]=Gr(e,n,a,s,y),(p=gt(Nr,Fr))<m&&(c=y,m=p);m=1/0;for(var x=0;x<32&&!(v<Br);x++)d=c-v,f=c+v,Fr[0]=Gr(t,i,r,o,d),Fr[1]=Gr(e,n,a,s,d),p=gt(Fr,Nr),d>=0&&p<m?(c=d,m=p):(Wr[0]=Gr(t,i,r,o,f),Wr[1]=Gr(e,n,a,s,f),g=gt(Wr,Nr),f<=1&&g<m?(c=f,m=g):v*=.5);return u&&(u[0]=Gr(t,i,r,o,c),u[1]=Gr(e,n,a,s,c)),Or(m)}(t,e,i,n,r,a,o,s,h,u,null)<=c/2}function Ca(t,e,i,n,r,a,o,s,l){if(0===o)return!1;var h=o;return!(l>e+h&&l>n+h&&l>a+h||l<e-h&&l<n-h&&l<a-h||s>t+h&&s>i+h&&s>r+h||s<t-h&&s<i-h&&s<r-h)&&function(t,e,i,n,r,a,o,s,l){var h,u=.005,c=1/0;Nr[0]=o,Nr[1]=s;for(var d=0;d<1;d+=.05)Fr[0]=jr(t,i,r,d),Fr[1]=jr(e,n,a,d),(v=gt(Nr,Fr))<c&&(h=d,c=v);c=1/0;for(var f=0;f<32&&!(u<Br);f++){var p=h-u,g=h+u;Fr[0]=jr(t,i,r,p),Fr[1]=jr(e,n,a,p);var v=gt(Fr,Nr);if(p>=0&&v<c)h=p,c=v;else{Wr[0]=jr(t,i,r,g),Wr[1]=jr(e,n,a,g);var m=gt(Wr,Nr);g<=1&&m<c?(h=g,c=m):u*=.5}}return l&&(l[0]=jr(t,i,r,h),l[1]=jr(e,n,a,h)),Or(c)}(t,e,i,n,r,a,s,l,null)<=h/2}Sa.prototype={constructor:Sa,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(t,e){this._ux=ba(1/$e/t)||0,this._uy=ba(1/$e/e)||0},getContext:function(){return this._ctx},beginPath:function(t){return this._ctx=t,t&&t.beginPath(),t&&(this.dpr=t.dpr),this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(t,e){return this.addData(da.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},lineTo:function(t,e){var i=ba(t-this._xi)>this._ux||ba(e-this._yi)>this._uy||this._len<5;return this.addData(da.L,t,e),this._ctx&&i&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),i&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,i,n,r,a){return this.addData(da.C,t,e,i,n,r,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,i,n,r,a):this._ctx.bezierCurveTo(t,e,i,n,r,a)),this._xi=r,this._yi=a,this},quadraticCurveTo:function(t,e,i,n){return this.addData(da.Q,t,e,i,n),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,i,n):this._ctx.quadraticCurveTo(t,e,i,n)),this._xi=i,this._yi=n,this},arc:function(t,e,i,n,r,a){return this.addData(da.A,t,e,i,i,n,r-n,0,a?0:1),this._ctx&&this._ctx.arc(t,e,i,n,r,a),this._xi=xa(r)*i+t,this._yi=_a(r)*i+e,this},arcTo:function(t,e,i,n,r){return this._ctx&&this._ctx.arcTo(t,e,i,n,r),this},rect:function(t,e,i,n){return this._ctx&&this._ctx.rect(t,e,i,n),this.addData(da.R,t,e,i,n),this},closePath:function(){this.addData(da.Z);var t=this._ctx,e=this._x0,i=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,i),t.closePath()),this._xi=e,this._yi=i,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t,this._dashIdx=0;for(var e=0,i=0;i<t.length;i++)e+=t[i];this._dashSum=e}return this},setLineDashOffset:function(t){return this._dashOffset=t,this},len:function(){return this._len},setData:function(t){var e=t.length;this.data&&this.data.length===e||!Ma||(this.data=new Float32Array(e));for(var i=0;i<e;i++)this.data[i]=t[i];this._len=e},appendPath:function(t){t instanceof Array||(t=[t]);for(var e=t.length,i=0,n=this._len,r=0;r<e;r++)i+=t[r].len();Ma&&this.data instanceof Float32Array&&(this.data=new Float32Array(n+i));for(r=0;r<e;r++)for(var a=t[r].data,o=0;o<a.length;o++)this.data[n++]=a[o];this._len=n},addData:function(t){if(this._saveData){var e=this.data;this._len+arguments.length>e.length&&(this._expandData(),e=this.data);for(var i=0;i<arguments.length;i++)e[this._len++]=arguments[i];this._prevCmd=t}},_expandData:function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e<this._len;e++)t[e]=this.data[e];this.data=t}},_needsDash:function(){return this._lineDash},_dashedLineTo:function(t,e){var i,n,r=this._dashSum,a=this._dashOffset,o=this._lineDash,s=this._ctx,l=this._xi,h=this._yi,u=t-l,c=e-h,d=wa(u*u+c*c),f=l,p=h,g=o.length;for(a<0&&(a=r+a),f-=(a%=r)*(u/=d),p-=a*(c/=d);u>0&&f<=t||u<0&&f>=t||0===u&&(c>0&&p<=e||c<0&&p>=e);)f+=u*(i=o[n=this._dashIdx]),p+=c*i,this._dashIdx=(n+1)%g,u>0&&f<l||u<0&&f>l||c>0&&p<h||c<0&&p>h||s[n%2?"moveTo":"lineTo"](u>=0?ma(f,t):ya(f,t),c>=0?ma(p,e):ya(p,e));u=f-t,c=p-e,this._dashOffset=-wa(u*u+c*c)},_dashedBezierTo:function(t,e,i,n,r,a){var o,s,l,h,u,c=this._dashSum,d=this._dashOffset,f=this._lineDash,p=this._ctx,g=this._xi,v=this._yi,m=Gr,y=0,x=this._dashIdx,_=f.length,w=0;for(d<0&&(d=c+d),d%=c,o=0;o<1;o+=.1)s=m(g,t,i,r,o+.1)-m(g,t,i,r,o),l=m(v,e,n,a,o+.1)-m(v,e,n,a,o),y+=wa(s*s+l*l);for(;x<_&&!((w+=f[x])>d);x++);for(o=(w-d)/y;o<=1;)h=m(g,t,i,r,o),u=m(v,e,n,a,o),x%2?p.moveTo(h,u):p.lineTo(h,u),o+=f[x]/y,x=(x+1)%_;x%2!=0&&p.lineTo(r,a),s=r-h,l=a-u,this._dashOffset=-wa(s*s+l*l)},_dashedQuadraticTo:function(t,e,i,n){var r=i,a=n;i=(i+2*t)/3,n=(n+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,i,n,r,a)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,Ma&&(this.data=new Float32Array(t)))},getBoundingRect:function(){fa[0]=fa[1]=ga[0]=ga[1]=Number.MAX_VALUE,pa[0]=pa[1]=va[0]=va[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,i=0,n=0,r=0,a=0;a<t.length;){var o=t[a++];switch(1===a&&(n=e=t[a],r=i=t[a+1]),o){case da.M:e=n=t[a++],i=r=t[a++],ga[0]=n,ga[1]=r,va[0]=n,va[1]=r;break;case da.L:oa(e,i,t[a],t[a+1],ga,va),e=t[a++],i=t[a++];break;case da.C:ha(e,i,t[a++],t[a++],t[a++],t[a++],t[a],t[a+1],ga,va),e=t[a++],i=t[a++];break;case da.Q:ua(e,i,t[a++],t[a++],t[a],t[a+1],ga,va),e=t[a++],i=t[a++];break;case da.A:var s=t[a++],l=t[a++],h=t[a++],u=t[a++],c=t[a++],d=t[a++]+c;a+=1;var f=1-t[a++];1===a&&(n=xa(c)*h+s,r=_a(c)*u+l),ca(s,l,h,u,c,d,f,ga,va),e=xa(d)*h+s,i=_a(d)*u+l;break;case da.R:oa(n=e=t[a++],r=i=t[a++],n+t[a++],r+t[a++],ga,va);break;case da.Z:e=n,i=r}mt(fa,fa,ga),yt(pa,pa,va)}return 0===a&&(fa[0]=fa[1]=pa[0]=pa[1]=0),new ui(fa[0],fa[1],pa[0]-fa[0],pa[1]-fa[1])},rebuildPath:function(t){for(var e,i,n,r,a,o,s=this.data,l=this._ux,h=this._uy,u=this._len,c=0;c<u;){var d=s[c++];switch(1===c&&(e=n=s[c],i=r=s[c+1]),d){case da.M:e=n=s[c++],i=r=s[c++],t.moveTo(n,r);break;case da.L:a=s[c++],o=s[c++],(ba(a-n)>l||ba(o-r)>h||c===u-1)&&(t.lineTo(a,o),n=a,r=o);break;case da.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),n=s[c-2],r=s[c-1];break;case da.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),n=s[c-2],r=s[c-1];break;case da.A:var f=s[c++],p=s[c++],g=s[c++],v=s[c++],m=s[c++],y=s[c++],x=s[c++],_=s[c++],w=g>v?g:v,b=g>v?1:g/v,M=g>v?v/g:1,S=m+y;Math.abs(g-v)>.001?(t.translate(f,p),t.rotate(x),t.scale(b,M),t.arc(0,0,w,m,S,1-_),t.scale(1/b,1/M),t.rotate(-x),t.translate(-f,-p)):t.arc(f,p,w,m,S,1-_),1===c&&(e=xa(m)*g+f,i=_a(m)*v+p),n=xa(S)*g+f,r=_a(S)*v+p;break;case da.R:e=n=s[c],i=r=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case da.Z:t.closePath(),n=e,r=i}}}},Sa.CMD=da;var Da=2*Math.PI;function Aa(t){return(t%=Da)<0&&(t+=Da),t}var ka=2*Math.PI;function Pa(t,e,i,n,r,a,o,s,l){if(0===o)return!1;var h=o;s-=t,l-=e;var u=Math.sqrt(s*s+l*l);if(u-h>i||u+h<i)return!1;if(Math.abs(n-r)%ka<1e-4)return!0;if(a){var c=n;n=Aa(r),r=Aa(c)}else n=Aa(n),r=Aa(r);n>r&&(r+=ka);var d=Math.atan2(l,s);return d<0&&(d+=ka),d>=n&&d<=r||d+ka>=n&&d+ka<=r}function La(t,e,i,n,r,a){if(a>e&&a>n||a<e&&a<n)return 0;if(n===e)return 0;var o=n<e?1:-1,s=(a-e)/(n-e);1!==s&&0!==s||(o=n<e?.5:-.5);var l=s*(i-t)+t;return l===r?1/0:l>r?o:0}var Oa=Sa.CMD,za=2*Math.PI,Ba=1e-4;var Ea=[-1,-1,-1],Ra=[-1,-1];function Na(t,e,i,n,r,a,o,s,l,h){if(h>e&&h>n&&h>a&&h>s||h<e&&h<n&&h<a&&h<s)return 0;var u,c=function(t,e,i,n,r,a){var o=n+3*(e-i)-t,s=3*(i-2*e+t),l=3*(e-t),h=t-r,u=s*s-3*o*l,c=s*l-9*o*h,d=l*l-3*s*h,f=0;if(Vr(u)&&Vr(c))Vr(s)?a[0]=0:(S=-l/s)>=0&&S<=1&&(a[f++]=S);else{var p=c*c-4*u*d;if(Vr(p)){var g=c/u,v=-g/2;(S=-s/o+g)>=0&&S<=1&&(a[f++]=S),v>=0&&v<=1&&(a[f++]=v)}else if(p>0){var m=Or(p),y=u*s+1.5*o*(-c+m),x=u*s+1.5*o*(-c-m);(S=(-s-((y=y<0?-Lr(-y,Rr):Lr(y,Rr))+(x=x<0?-Lr(-x,Rr):Lr(x,Rr))))/(3*o))>=0&&S<=1&&(a[f++]=S)}else{var _=(2*u*s-3*o*c)/(2*Or(u*u*u)),w=Math.acos(_)/3,b=Or(u),M=Math.cos(w),S=(-s-2*b*M)/(3*o),I=(v=(-s+b*(M+Er*Math.sin(w)))/(3*o),(-s+b*(M-Er*Math.sin(w)))/(3*o));S>=0&&S<=1&&(a[f++]=S),v>=0&&v<=1&&(a[f++]=v),I>=0&&I<=1&&(a[f++]=I)}}return f}(e,n,a,s,h,Ea);if(0===c)return 0;for(var d,f,p=0,g=-1,v=0;v<c;v++){var m=Ea[v],y=0===m||1===m?.5:1;Gr(t,i,r,o,m)<l||(g<0&&(g=Xr(e,n,a,s,Ra),Ra[1]<Ra[0]&&g>1&&(u=void 0,u=Ra[0],Ra[0]=Ra[1],Ra[1]=u),d=Gr(e,n,a,s,Ra[0]),g>1&&(f=Gr(e,n,a,s,Ra[1]))),2===g?m<Ra[0]?p+=d<e?y:-y:m<Ra[1]?p+=f<d?y:-y:p+=s<f?y:-y:m<Ra[0]?p+=d<e?y:-y:p+=s<d?y:-y)}return p}function Fa(t,e,i,n,r,a,o,s){if(s>e&&s>n&&s>a||s<e&&s<n&&s<a)return 0;var l=function(t,e,i,n,r){var a=t-2*e+i,o=2*(e-t),s=t-n,l=0;if(Vr(a))Hr(o)&&(u=-s/o)>=0&&u<=1&&(r[l++]=u);else{var h=o*o-4*a*s;if(Vr(h))(u=-o/(2*a))>=0&&u<=1&&(r[l++]=u);else if(h>0){var u,c=Or(h),d=(-o-c)/(2*a);(u=(-o+c)/(2*a))>=0&&u<=1&&(r[l++]=u),d>=0&&d<=1&&(r[l++]=d)}}return l}(e,n,a,s,Ea);if(0===l)return 0;var h=Ur(e,n,a);if(h>=0&&h<=1){for(var u=0,c=jr(e,n,a,h),d=0;d<l;d++){var f=0===Ea[d]||1===Ea[d]?.5:1;jr(t,i,r,Ea[d])<o||(Ea[d]<h?u+=c<e?f:-f:u+=a<c?f:-f)}return u}f=0===Ea[0]||1===Ea[0]?.5:1;return jr(t,i,r,Ea[0])<o?0:a<e?f:-f}function Wa(t,e,i,n,r,a,o,s){if((s-=e)>i||s<-i)return 0;var l=Math.sqrt(i*i-s*s);Ea[0]=-l,Ea[1]=l;var h=Math.abs(n-r);if(h<1e-4)return 0;if(h%za<1e-4){n=0,r=za;var u=a?1:-1;return o>=Ea[0]+t&&o<=Ea[1]+t?u:0}if(a){l=n;n=Aa(r),r=Aa(l)}else n=Aa(n),r=Aa(r);n>r&&(r+=za);for(var c=0,d=0;d<2;d++){var f=Ea[d];if(f+t>o){var p=Math.atan2(s,f);u=a?1:-1;p<0&&(p=za+p),(p>=n&&p<=r||p+za>=n&&p+za<=r)&&(p>Math.PI/2&&p<1.5*Math.PI&&(u=-u),c+=u)}}return c}function Va(t,e,i,n,r){for(var a,o,s=0,l=0,h=0,u=0,c=0,d=0;d<t.length;){var f=t[d++];switch(f===Oa.M&&d>1&&(i||(s+=La(l,h,u,c,n,r))),1===d&&(u=l=t[d],c=h=t[d+1]),f){case Oa.M:l=u=t[d++],h=c=t[d++];break;case Oa.L:if(i){if(Ia(l,h,t[d],t[d+1],e,n,r))return!0}else s+=La(l,h,t[d],t[d+1],n,r)||0;l=t[d++],h=t[d++];break;case Oa.C:if(i){if(Ta(l,h,t[d++],t[d++],t[d++],t[d++],t[d],t[d+1],e,n,r))return!0}else s+=Na(l,h,t[d++],t[d++],t[d++],t[d++],t[d],t[d+1],n,r)||0;l=t[d++],h=t[d++];break;case Oa.Q:if(i){if(Ca(l,h,t[d++],t[d++],t[d],t[d+1],e,n,r))return!0}else s+=Fa(l,h,t[d++],t[d++],t[d],t[d+1],n,r)||0;l=t[d++],h=t[d++];break;case Oa.A:var p=t[d++],g=t[d++],v=t[d++],m=t[d++],y=t[d++],x=t[d++];d+=1;var _=1-t[d++],w=Math.cos(y)*v+p,b=Math.sin(y)*m+g;d>1?s+=La(l,h,w,b,n,r):(u=w,c=b);var M=(n-p)*m/v+p;if(i){if(Pa(p,g,m,y,y+x,_,e,M,r))return!0}else s+=Wa(p,g,m,y,y+x,_,M,r);l=Math.cos(y+x)*v+p,h=Math.sin(y+x)*m+g;break;case Oa.R:u=l=t[d++],c=h=t[d++];w=u+t[d++],b=c+t[d++];if(i){if(Ia(u,c,w,c,e,n,r)||Ia(w,c,w,b,e,n,r)||Ia(w,b,u,b,e,n,r)||Ia(u,b,u,c,e,n,r))return!0}else s+=La(w,c,w,b,n,r),s+=La(u,b,u,c,n,r);break;case Oa.Z:if(i){if(Ia(l,h,u,c,e,n,r))return!0}else s+=La(l,h,u,c,n,r);l=u,h=c}}return i||(a=h,o=c,Math.abs(a-o)<Ba)||(s+=La(l,h,u,c,n,r)||0),0!==s}var Ha=Oi.prototype.getCanvasPattern,Ga=Math.abs,Za=new Sa(!0);function Xa(t){Pn.call(this,t),this.path=null}Xa.prototype={constructor:Xa,type:"path",__dirtyPath:!0,strokeContainThreshold:5,subPixelOptimize:!1,brush:function(t,e){var i,n=this.style,r=this.path||Za,a=n.hasStroke(),o=n.hasFill(),s=n.fill,l=n.stroke,h=o&&!!s.colorStops,u=a&&!!l.colorStops,c=o&&!!s.image,d=a&&!!l.image;(n.bind(t,this,e),this.setTransform(t),this.__dirty)&&(h&&(i=i||this.getBoundingRect(),this._fillGradient=n.getGradient(t,s,i)),u&&(i=i||this.getBoundingRect(),this._strokeGradient=n.getGradient(t,l,i)));h?t.fillStyle=this._fillGradient:c&&(t.fillStyle=Ha.call(s,t)),u?t.strokeStyle=this._strokeGradient:d&&(t.strokeStyle=Ha.call(l,t));var f=n.lineDash,p=n.lineDashOffset,g=!!t.setLineDash,v=this.getGlobalScale();if(r.setScale(v[0],v[1]),this.__dirtyPath||f&&!g&&a?(r.beginPath(t),f&&!g&&(r.setLineDash(f),r.setLineDashOffset(p)),this.buildPath(r,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),o)if(null!=n.fillOpacity){var m=t.globalAlpha;t.globalAlpha=n.fillOpacity*n.opacity,r.fill(t),t.globalAlpha=m}else r.fill(t);if(f&&g&&(t.setLineDash(f),t.lineDashOffset=p),a)if(null!=n.strokeOpacity){m=t.globalAlpha;t.globalAlpha=n.strokeOpacity*n.opacity,r.stroke(t),t.globalAlpha=m}else r.stroke(t);f&&g&&t.setLineDash([]),null!=n.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))},buildPath:function(t,e,i){},createPathProxy:function(){this.path=new Sa},getBoundingRect:function(){var t=this._rect,e=this.style,i=!t;if(i){var n=this.path;n||(n=this.path=new Sa),this.__dirtyPath&&(n.beginPath(),this.buildPath(n,this.shape,!1)),t=n.getBoundingRect()}if(this._rect=t,e.hasStroke()){var r=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||i){r.copy(t);var a=e.lineWidth,o=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(a=Math.max(a,this.strokeContainThreshold||4)),o>1e-10&&(r.width+=a/o,r.height+=a/o,r.x-=a/o/2,r.y-=a/o/2)}return r}return t},contain:function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect(),r=this.style;if(t=i[0],e=i[1],n.contain(t,e)){var a=this.path.data;if(r.hasStroke()){var o=r.lineWidth,s=r.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(r.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),function(t,e,i,n){return Va(t,e,!0,i,n)}(a,o/s,t,e)))return!0}if(r.hasFill())return function(t,e,i){return Va(t,0,!1,e,i)}(a,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=this.__dirtyText=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(t){return this.animate("shape",t)},attrKV:function(t,e){"shape"===t?(this.setShape(e),this.__dirtyPath=!0,this._rect=null):Pn.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var i=this.shape;if(i){if(E(t))for(var n in t)t.hasOwnProperty(n)&&(i[n]=t[n]);else i[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&Ga(t[0]-1)>1e-10&&Ga(t[3]-1)>1e-10?Math.sqrt(Ga(t[0]*t[3]-t[2]*t[1])):1}},Xa.extend=function(t){var e=function(e){Xa.call(this,e),t.style&&this.style.extendFrom(t.style,!1);var i=t.shape;if(i){this.shape=this.shape||{};var n=this.shape;for(var r in i)!n.hasOwnProperty(r)&&i.hasOwnProperty(r)&&(n[r]=i[r])}t.init&&t.init.call(this,e)};for(var i in S(e,Xa),t)"style"!==i&&"shape"!==i&&(e.prototype[i]=t[i]);return e},S(Xa,Pn);var Ya=Sa.CMD,ja=[[],[],[]],qa=Math.sqrt,Ua=Math.atan2,$a=function(t,e){var i,n,r,a,o,s=t.data,l=Ya.M,h=Ya.C,u=Ya.L,c=Ya.R,d=Ya.A,f=Ya.Q;for(r=0,a=0;r<s.length;){switch(i=s[r++],a=r,n=0,i){case l:case u:n=1;break;case h:n=3;break;case f:n=2;break;case d:var p=e[4],g=e[5],v=qa(e[0]*e[0]+e[1]*e[1]),m=qa(e[2]*e[2]+e[3]*e[3]),y=Ua(-e[1]/m,e[0]/v);s[r]*=v,s[r++]+=p,s[r]*=m,s[r++]+=g,s[r++]*=v,s[r++]*=m,s[r++]+=y,s[r++]+=y,a=r+=2;break;case c:x[0]=s[r++],x[1]=s[r++],vt(x,x,e),s[a++]=x[0],s[a++]=x[1],x[0]+=s[r++],x[1]+=s[r++],vt(x,x,e),s[a++]=x[0],s[a++]=x[1]}for(o=0;o<n;o++){var x;(x=ja[o])[0]=s[r++],x[1]=s[r++],vt(x,x,e),s[a++]=x[0],s[a++]=x[1]}}},Ka=Math.sqrt,Qa=Math.sin,Ja=Math.cos,to=Math.PI,eo=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},io=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(eo(t)*eo(e))},no=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(io(t,e))};function ro(t,e,i,n,r,a,o,s,l,h,u){var c=l*(to/180),d=Ja(c)*(t-i)/2+Qa(c)*(e-n)/2,f=-1*Qa(c)*(t-i)/2+Ja(c)*(e-n)/2,p=d*d/(o*o)+f*f/(s*s);p>1&&(o*=Ka(p),s*=Ka(p));var g=(r===a?-1:1)*Ka((o*o*(s*s)-o*o*(f*f)-s*s*(d*d))/(o*o*(f*f)+s*s*(d*d)))||0,v=g*o*f/s,m=g*-s*d/o,y=(t+i)/2+Ja(c)*v-Qa(c)*m,x=(e+n)/2+Qa(c)*v+Ja(c)*m,_=no([1,0],[(d-v)/o,(f-m)/s]),w=[(d-v)/o,(f-m)/s],b=[(-1*d-v)/o,(-1*f-m)/s],M=no(w,b);io(w,b)<=-1&&(M=to),io(w,b)>=1&&(M=0),0===a&&M>0&&(M-=2*to),1===a&&M<0&&(M+=2*to),u.addData(h,y,x,o,s,_,M,c,a)}var ao=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,oo=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function so(t,e){var i=function(t){if(!t)return new Sa;for(var e,i=0,n=0,r=i,a=n,o=new Sa,s=Sa.CMD,l=t.match(ao),h=0;h<l.length;h++){for(var u,c=l[h],d=c.charAt(0),f=c.match(oo)||[],p=f.length,g=0;g<p;g++)f[g]=parseFloat(f[g]);for(var v=0;v<p;){var m,y,x,_,w,b,M,S=i,I=n;switch(d){case"l":i+=f[v++],n+=f[v++],u=s.L,o.addData(u,i,n);break;case"L":i=f[v++],n=f[v++],u=s.L,o.addData(u,i,n);break;case"m":i+=f[v++],n+=f[v++],u=s.M,o.addData(u,i,n),r=i,a=n,d="l";break;case"M":i=f[v++],n=f[v++],u=s.M,o.addData(u,i,n),r=i,a=n,d="L";break;case"h":i+=f[v++],u=s.L,o.addData(u,i,n);break;case"H":i=f[v++],u=s.L,o.addData(u,i,n);break;case"v":n+=f[v++],u=s.L,o.addData(u,i,n);break;case"V":n=f[v++],u=s.L,o.addData(u,i,n);break;case"C":u=s.C,o.addData(u,f[v++],f[v++],f[v++],f[v++],f[v++],f[v++]),i=f[v-2],n=f[v-1];break;case"c":u=s.C,o.addData(u,f[v++]+i,f[v++]+n,f[v++]+i,f[v++]+n,f[v++]+i,f[v++]+n),i+=f[v-2],n+=f[v-1];break;case"S":m=i,y=n;var T=o.len(),C=o.data;e===s.C&&(m+=i-C[T-4],y+=n-C[T-3]),u=s.C,S=f[v++],I=f[v++],i=f[v++],n=f[v++],o.addData(u,m,y,S,I,i,n);break;case"s":m=i,y=n,T=o.len(),C=o.data,e===s.C&&(m+=i-C[T-4],y+=n-C[T-3]),u=s.C,S=i+f[v++],I=n+f[v++],i+=f[v++],n+=f[v++],o.addData(u,m,y,S,I,i,n);break;case"Q":S=f[v++],I=f[v++],i=f[v++],n=f[v++],u=s.Q,o.addData(u,S,I,i,n);break;case"q":S=f[v++]+i,I=f[v++]+n,i+=f[v++],n+=f[v++],u=s.Q,o.addData(u,S,I,i,n);break;case"T":m=i,y=n,T=o.len(),C=o.data,e===s.Q&&(m+=i-C[T-4],y+=n-C[T-3]),i=f[v++],n=f[v++],u=s.Q,o.addData(u,m,y,i,n);break;case"t":m=i,y=n,T=o.len(),C=o.data,e===s.Q&&(m+=i-C[T-4],y+=n-C[T-3]),i+=f[v++],n+=f[v++],u=s.Q,o.addData(u,m,y,i,n);break;case"A":x=f[v++],_=f[v++],w=f[v++],b=f[v++],M=f[v++],ro(S=i,I=n,i=f[v++],n=f[v++],b,M,x,_,w,u=s.A,o);break;case"a":x=f[v++],_=f[v++],w=f[v++],b=f[v++],M=f[v++],ro(S=i,I=n,i+=f[v++],n+=f[v++],b,M,x,_,w,u=s.A,o)}}"z"!==d&&"Z"!==d||(u=s.Z,o.addData(u),i=r,n=a),e=u}return o.toStatic(),o}(t);return(e=e||{}).buildPath=function(t){if(t.setData){t.setData(i.data),(e=t.getContext())&&t.rebuildPath(e)}else{var e=t;i.rebuildPath(e)}},e.applyTransform=function(t){$a(i,t),this.dirty(!0)},e}function lo(t,e){return new Xa(so(t,e))}var ho=function(t){Pn.call(this,t)};ho.prototype={constructor:ho,type:"text",brush:function(t,e){var i=this.style;this.__dirty&&pn(i),i.fill=i.stroke=i.shadowBlur=i.shadowColor=i.shadowOffsetX=i.shadowOffsetY=null;var n=i.text;null!=n&&(n+=""),Dn(n,i)?(this.setTransform(t),vn(this,t,n,i,null,e),this.restoreTransform(t)):t.__attrCachedBy=Si.NONE},getBoundingRect:function(){var t=this.style;if(this.__dirty&&pn(t),!this._rect){var e=t.text;null!=e?e+="":e="";var i=$i(t.text+"",t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich);if(i.x+=t.x||0,i.y+=t.y||0,Sn(t.textStroke,t.textStrokeWidth)){var n=t.textStrokeWidth;i.x-=n/2,i.y-=n/2,i.width+=n,i.height+=n}this._rect=i}return this._rect}},S(ho,Pn);var uo,co=Xa.extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(t,e,i){i&&t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI,!0)}}),fo=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]],po=Xa.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},brush:(uo=Xa.prototype.brush,n.browser.ie&&n.browser.version>=11?function(){var t,e=this.__clipPaths,i=this.style;if(e)for(var n=0;n<e.length;n++){var r=e[n],a=r&&r.shape,o=r&&r.type;if(a&&("sector"===o&&a.startAngle===a.endAngle||"rect"===o&&(!a.width||!a.height))){for(var s=0;s<fo.length;s++)fo[s][2]=i[fo[s][0]],i[fo[s][0]]=fo[s][1];t=!0;break}}if(uo.apply(this,arguments),t)for(s=0;s<fo.length;s++)i[fo[s][0]]=fo[s][2]}:uo),buildPath:function(t,e){var i=e.cx,n=e.cy,r=Math.max(e.r0||0,0),a=Math.max(e.r,0),o=e.startAngle,s=e.endAngle,l=e.clockwise,h=Math.cos(o),u=Math.sin(o);t.moveTo(h*r+i,u*r+n),t.lineTo(h*a+i,u*a+n),t.arc(i,n,a,o,s,!l),t.lineTo(Math.cos(s)*r+i,Math.sin(s)*r+n),0!==r&&t.arc(i,n,r,s,o,l),t.closePath()}}),go=Xa.extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(t,e){var i=e.cx,n=e.cy,r=2*Math.PI;t.moveTo(i+e.r,n),t.arc(i,n,e.r,0,r,!1),t.moveTo(i+e.r0,n),t.arc(i,n,e.r0,0,r,!0)}});function vo(t,e,i,n,r,a,o){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*o+(-3*(e-i)-2*s-l)*a+s*r+e}var mo=function(t,e){for(var i=t.length,n=[],r=0,a=1;a<i;a++)r+=dt(t[a-1],t[a]);var o=r/2;o=o<i?i:o;for(a=0;a<o;a++){var s,l,h,u=a/(o-1)*(e?i:i-1),c=Math.floor(u),d=u-c,f=t[c%i];e?(s=t[(c-1+i)%i],l=t[(c+1)%i],h=t[(c+2)%i]):(s=t[0===c?c:c-1],l=t[c>i-2?i-1:c+1],h=t[c>i-3?i-1:c+2]);var p=d*d,g=d*p;n.push([vo(s[0],f[0],l[0],h[0],d,p,g),vo(s[1],f[1],l[1],h[1],d,p,g)])}return n},yo=function(t,e,i,n){var r,a,o,s,l=[],h=[],u=[],c=[];if(n){o=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,f=t.length;d<f;d++)mt(o,o,t[d]),yt(s,s,t[d]);mt(o,o,n[0]),yt(s,s,n[1])}for(d=0,f=t.length;d<f;d++){var p=t[d];if(i)r=t[d?d-1:f-1],a=t[(d+1)%f];else{if(0===d||d===f-1){l.push(nt(t[d]));continue}r=t[d-1],a=t[d+1]}at(h,a,r),ut(h,h,e);var g=dt(p,r),v=dt(p,a),m=g+v;0!==m&&(g/=m,v/=m),ut(u,h,-g),ut(c,h,v);var y=rt([],p,u),x=rt([],p,c);n&&(yt(y,y,o),mt(y,y,s),yt(x,x,o),mt(x,x,s)),l.push(y),l.push(x)}return i&&l.push(l.shift()),l};function xo(t,e,i){var n=e.points,r=e.smooth;if(n&&n.length>=2){if(r&&"spline"!==r){var a=yo(n,r,i,e.smoothConstraint);t.moveTo(n[0][0],n[0][1]);for(var o=n.length,s=0;s<(i?o:o-1);s++){var l=a[2*s],h=a[2*s+1],u=n[(s+1)%o];t.bezierCurveTo(l[0],l[1],h[0],h[1],u[0],u[1])}}else{"spline"===r&&(n=mo(n,i)),t.moveTo(n[0][0],n[0][1]);s=1;for(var c=n.length;s<c;s++)t.lineTo(n[s][0],n[s][1])}i&&t.closePath()}}var _o=Xa.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){xo(t,e,!0)}}),wo=Xa.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){xo(t,e,!1)}}),bo=Math.round;function Mo(t,e,i){var n=bo(2*t);return(n+bo(e))%2==0?n/2:(n+(i?1:-1))/2}var So={},Io=Xa.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var i,n,r,a;this.subPixelOptimize?(!function(t,e,i){var n=i&&i.lineWidth;if(e&&n){var r=e.x,a=e.y,o=e.width,s=e.height;t.x=Mo(r,n,!0),t.y=Mo(a,n,!0),t.width=Math.max(Mo(r+o,n,!1)-t.x,0===o?0:1),t.height=Math.max(Mo(a+s,n,!1)-t.y,0===s?0:1)}}(So,e,this.style),i=So.x,n=So.y,r=So.width,a=So.height,So.r=e.r,e=So):(i=e.x,n=e.y,r=e.width,a=e.height),e.r?hn(t,e):t.rect(i,n,r,a),t.closePath()}}),To={},Co=Xa.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i,n,r,a;this.subPixelOptimize?(!function(t,e,i){var n=i&&i.lineWidth;if(e&&n){var r=e.x1,a=e.x2,o=e.y1,s=e.y2;bo(2*r)===bo(2*a)?t.x1=t.x2=Mo(r,n,!0):(t.x1=r,t.x2=a),bo(2*o)===bo(2*s)?t.y1=t.y2=Mo(o,n,!0):(t.y1=o,t.y2=s)}}(To,e,this.style),i=To.x1,n=To.y1,r=To.x2,a=To.y2):(i=e.x1,n=e.y1,r=e.x2,a=e.y2);var o=e.percent;0!==o&&(t.moveTo(i,n),o<1&&(r=i*(1-o)+r*o,a=n*(1-o)+a*o),t.lineTo(r,a))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}}),Do=[];function Ao(t,e,i){var n=t.cpx2,r=t.cpy2;return null===n||null===r?[(i?Zr:Gr)(t.x1,t.cpx1,t.cpx2,t.x2,e),(i?Zr:Gr)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(i?qr:jr)(t.x1,t.cpx1,t.x2,e),(i?qr:jr)(t.y1,t.cpy1,t.y2,e)]}var ko=Xa.extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.x1,n=e.y1,r=e.x2,a=e.y2,o=e.cpx1,s=e.cpy1,l=e.cpx2,h=e.cpy2,u=e.percent;0!==u&&(t.moveTo(i,n),null==l||null==h?(u<1&&($r(i,o,r,u,Do),o=Do[1],r=Do[2],$r(n,s,a,u,Do),s=Do[1],a=Do[2]),t.quadraticCurveTo(o,s,r,a)):(u<1&&(Yr(i,o,l,r,u,Do),o=Do[1],l=Do[2],r=Do[3],Yr(n,s,h,a,u,Do),s=Do[1],h=Do[2],a=Do[3]),t.bezierCurveTo(o,s,l,h,r,a)))},pointAt:function(t){return Ao(this.shape,t,!1)},tangentAt:function(t){var e=Ao(this.shape,t,!0);return ct(e,e)}}),Po=Xa.extend({type:"arc",shape:{cx:0,cy:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.cx,n=e.cy,r=Math.max(e.r,0),a=e.startAngle,o=e.endAngle,s=e.clockwise,l=Math.cos(a),h=Math.sin(a);t.moveTo(l*r+i,h*r+n),t.arc(i,n,r,a,o,!s)}}),Lo=Xa.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,i=0;i<e.length;i++)t=t||e[i].__dirtyPath;this.__dirtyPath=t,this.__dirty=this.__dirty||t},beforeBrush:function(){this._updatePathDirty();for(var t=this.shape.paths||[],e=this.getGlobalScale(),i=0;i<t.length;i++)t[i].path||t[i].createPathProxy(),t[i].path.setScale(e[0],e[1])},buildPath:function(t,e){for(var i=e.paths||[],n=0;n<i.length;n++)i[n].buildPath(t,i[n].shape,!0)},afterBrush:function(){for(var t=this.shape.paths||[],e=0;e<t.length;e++)t[e].__dirtyPath=!1},getBoundingRect:function(){return this._updatePathDirty(),Xa.prototype.getBoundingRect.call(this)}}),Oo=function(t){this.colorStops=t||[]};Oo.prototype={constructor:Oo,addColorStop:function(t,e){this.colorStops.push({offset:t,color:e})}};var zo=function(t,e,i,n,r,a){this.x=null==t?0:t,this.y=null==e?0:e,this.x2=null==i?1:i,this.y2=null==n?0:n,this.type="linear",this.global=a||!1,Oo.call(this,r)};zo.prototype={constructor:zo},S(zo,Oo);var Bo=function(t,e,i,n,r){this.x=null==t?.5:t,this.y=null==e?.5:e,this.r=null==i?.5:i,this.type="radial",this.global=r||!1,Oo.call(this,n)};function Eo(t){Pn.call(this,t),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}Bo.prototype={constructor:Bo},S(Bo,Oo),Eo.prototype.incremental=!0,Eo.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},Eo.prototype.addDisplayable=function(t,e){e?this._temporaryDisplayables.push(t):this._displayables.push(t),this.dirty()},Eo.prototype.addDisplayables=function(t,e){e=e||!1;for(var i=0;i<t.length;i++)this.addDisplayable(t[i],e)},Eo.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])},Eo.prototype.update=function(){this.updateTransform();for(var t=this._cursor;t<this._displayables.length;t++){(e=this._displayables[t]).parent=this,e.update(),e.parent=null}for(t=0;t<this._temporaryDisplayables.length;t++){var e;(e=this._temporaryDisplayables[t]).parent=this,e.update(),e.parent=null}},Eo.prototype.brush=function(t,e){for(var i=this._cursor;i<this._displayables.length;i++){(n=this._displayables[i]).beforeBrush&&n.beforeBrush(t),n.brush(t,i===this._cursor?null:this._displayables[i-1]),n.afterBrush&&n.afterBrush(t)}this._cursor=i;for(i=0;i<this._temporaryDisplayables.length;i++){var n;(n=this._temporaryDisplayables[i]).beforeBrush&&n.beforeBrush(t),n.brush(t,0===i?null:this._temporaryDisplayables[i-1]),n.afterBrush&&n.afterBrush(t)}this._temporaryDisplayables=[],this.notClear=!0};var Ro=[];Eo.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new ui(1/0,1/0,-1/0,-1/0),e=0;e<this._displayables.length;e++){var i=this._displayables[e],n=i.getBoundingRect().clone();i.needLocalTransform()&&n.applyTransform(i.getLocalTransform(Ro)),t.union(n)}this._rect=t}return this._rect},Eo.prototype.contain=function(t,e){var i=this.transformCoordToLocal(t,e);if(this.getBoundingRect().contain(i[0],i[1]))for(var n=0;n<this._displayables.length;n++){if(this._displayables[n].contain(t,e))return!0}return!1},S(Eo,Pn);var No=Math.round,Fo=Math.max,Wo=Math.min,Vo={},Ho=1;function Go(t){return Xa.extend(t)}function Zo(t,e,i,n){var r=lo(t,e);return i&&("center"===n&&(i=Yo(i,r.getBoundingRect())),qo(r,i)),r}function Xo(t,e,i){var n=new Ln({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(t){if("center"===i){var r={width:t.width,height:t.height};n.setStyle(Yo(e,r))}}});return n}function Yo(t,e){var i,n=e.width/e.height,r=t.height*n;return i=r<=t.width?t.height:(r=t.width)/n,{x:t.x+t.width/2-r/2,y:t.y+t.height/2-i/2,width:r,height:i}}var jo=function(t,e){for(var i=[],n=t.length,r=0;r<n;r++){var a=t[r];a.path||a.createPathProxy(),a.__dirtyPath&&a.buildPath(a.path,a.shape,!0),i.push(a.path)}var o=new Xa(e);return o.createPathProxy(),o.buildPath=function(t){t.appendPath(i);var e=t.getContext();e&&t.rebuildPath(e)},o};function qo(t,e){if(t.applyTransform){var i=t.getBoundingRect().calculateTransform(e);t.applyTransform(i)}}function Uo(t){var e=t.shape,i=t.style.lineWidth;return No(2*e.x1)===No(2*e.x2)&&(e.x1=e.x2=Ko(e.x1,i,!0)),No(2*e.y1)===No(2*e.y2)&&(e.y1=e.y2=Ko(e.y1,i,!0)),t}function $o(t){var e=t.shape,i=t.style.lineWidth,n=e.x,r=e.y,a=e.width,o=e.height;return e.x=Ko(e.x,i,!0),e.y=Ko(e.y,i,!0),e.width=Math.max(Ko(n+a,i,!1)-e.x,0===a?0:1),e.height=Math.max(Ko(r+o,i,!1)-e.y,0===o?0:1),t}function Ko(t,e,i){var n=No(2*t);return(n+No(e))%2==0?n/2:(n+(i?1:-1))/2}function Qo(t){return null!=t&&"none"!==t}var Jo=Q(),ts=0;function es(t){var e=t.__hoverStl;if(e&&!t.__highlighted){var i=t.useHoverLayer;t.__highlighted=i?"layer":"plain";var n=t.__zr;if(n||!i){var r=t,a=t.style;i&&(a=(r=n.addHover(t)).style),ys(a),i||function(t){if(t.__hoverStlDirty){t.__hoverStlDirty=!1;var e=t.__hoverStl;if(e){var i=t.__cachedNormalStl={};t.__cachedNormalZ2=t.z2;var n=t.style;for(var r in e)null!=e[r]&&(i[r]=n[r]);i.fill=n.fill,i.stroke=n.stroke}else t.__cachedNormalStl=t.__cachedNormalZ2=null}}(r),a.extendFrom(e),is(a,e,"fill"),is(a,e,"stroke"),ms(a),i||(t.dirty(!1),t.z2+=Ho)}}}function is(t,e,i){!Qo(e[i])&&Qo(t[i])&&(t[i]=function(t){if("string"!=typeof t)return t;var e=Jo.get(t);return e||(e=Ce(t,-.1),ts<1e4&&(Jo.set(t,e),ts++)),e}(t[i]))}function ns(t){var e=t.__highlighted;if(e)if(t.__highlighted=!1,"layer"===e)t.__zr&&t.__zr.removeHover(t);else if(e){var i=t.style,n=t.__cachedNormalStl;n&&(ys(i),t.setStyle(n),ms(i));var r=t.__cachedNormalZ2;null!=r&&t.z2-r===Ho&&(t.z2=r)}}function rs(t,e){t.isGroup?t.traverse(function(t){!t.isGroup&&e(t)}):e(t)}function as(t,e){e=t.__hoverStl=!1!==e&&(e||{}),t.__hoverStlDirty=!0,t.__highlighted&&(t.__cachedNormalStl=null,ns(t),es(t))}function os(t){this.__hoverSilentOnTouch&&t.zrByTouch||!this.__isEmphasisEntered&&rs(this,es)}function ss(t){this.__hoverSilentOnTouch&&t.zrByTouch||!this.__isEmphasisEntered&&rs(this,ns)}function ls(){this.__isEmphasisEntered=!0,rs(this,es)}function hs(){this.__isEmphasisEntered=!1,rs(this,ns)}function us(t,e,i){t.isGroup?t.traverse(function(t){!t.isGroup&&as(t,t.hoverStyle||e)}):as(t,t.hoverStyle||e),cs(t,i)}function cs(t,e){var i=!1===e;if(t.__hoverSilentOnTouch=null!=e&&e.hoverSilentOnTouch,!i||t.__hoverStyleTrigger){var n=i?"off":"on";t[n]("mouseover",os)[n]("mouseout",ss),t[n]("emphasis",ls)[n]("normal",hs),t.__hoverStyleTrigger=!i}}function ds(t,e,i,n,r,a,o){var s,l=(r=r||Vo).labelFetcher,h=r.labelDataIndex,u=r.labelDimIndex,c=i.getShallow("show"),d=n.getShallow("show");(c||d)&&(l&&(s=l.getFormattedLabel(h,"normal",null,u)),null==s&&(s=z(r.defaultText)?r.defaultText(h,r):r.defaultText));var f=c?s:null,p=d?H(l?l.getFormattedLabel(h,"emphasis",null,u):null,s):null;null==f&&null==p||(fs(t,i,a,r),fs(e,n,o,r,!0)),t.text=f,e.text=p}function fs(t,e,i,n,r){return ps(t,e,n,r),i&&y(t,i),t}function ps(t,e,i,n){if((i=i||Vo).isRectText){var r=e.getShallow("position")||(n?null:"inside");"outside"===r&&(r="top"),t.textPosition=r,t.textOffset=e.getShallow("offset");var a=e.getShallow("rotate");null!=a&&(a*=Math.PI/180),t.textRotation=a,t.textDistance=H(e.getShallow("distance"),n?null:5)}var o,s=e.ecModel,l=s&&s.option.textStyle,h=function(t){var e;for(;t&&t!==t.ecModel;){var i=(t.option||Vo).rich;if(i)for(var n in e=e||{},i)i.hasOwnProperty(n)&&(e[n]=1);t=t.parentModel}return e}(e);if(h)for(var u in o={},h)if(h.hasOwnProperty(u)){var c=e.getModel(["rich",u]);gs(o[u]={},c,l,i,n)}return t.rich=o,gs(t,e,l,i,n,!0),i.forceRich&&!i.textStyle&&(i.textStyle={}),t}function gs(t,e,i,n,r,a){i=!r&&i||Vo,t.textFill=vs(e.getShallow("color"),n)||i.color,t.textStroke=vs(e.getShallow("textBorderColor"),n)||i.textBorderColor,t.textStrokeWidth=H(e.getShallow("textBorderWidth"),i.textBorderWidth),t.insideRawTextPosition=t.textPosition,r||(a&&(t.insideRollbackOpt=n,ms(t)),null==t.textFill&&(t.textFill=n.autoColor)),t.fontStyle=e.getShallow("fontStyle")||i.fontStyle,t.fontWeight=e.getShallow("fontWeight")||i.fontWeight,t.fontSize=e.getShallow("fontSize")||i.fontSize,t.fontFamily=e.getShallow("fontFamily")||i.fontFamily,t.textAlign=e.getShallow("align"),t.textVerticalAlign=e.getShallow("verticalAlign")||e.getShallow("baseline"),t.textLineHeight=e.getShallow("lineHeight"),t.textWidth=e.getShallow("width"),t.textHeight=e.getShallow("height"),t.textTag=e.getShallow("tag"),a&&n.disableBox||(t.textBackgroundColor=vs(e.getShallow("backgroundColor"),n),t.textPadding=e.getShallow("padding"),t.textBorderColor=vs(e.getShallow("borderColor"),n),t.textBorderWidth=e.getShallow("borderWidth"),t.textBorderRadius=e.getShallow("borderRadius"),t.textBoxShadowColor=e.getShallow("shadowColor"),t.textBoxShadowBlur=e.getShallow("shadowBlur"),t.textBoxShadowOffsetX=e.getShallow("shadowOffsetX"),t.textBoxShadowOffsetY=e.getShallow("shadowOffsetY")),t.textShadowColor=e.getShallow("textShadowColor")||i.textShadowColor,t.textShadowBlur=e.getShallow("textShadowBlur")||i.textShadowBlur,t.textShadowOffsetX=e.getShallow("textShadowOffsetX")||i.textShadowOffsetX,t.textShadowOffsetY=e.getShallow("textShadowOffsetY")||i.textShadowOffsetY}function vs(t,e){return"auto"!==t?t:e&&e.autoColor?e.autoColor:null}function ms(t){var e=t.insideRollbackOpt;if(e&&null==t.textFill){var i,n=e.useInsideStyle,r=t.insideRawTextPosition,a=e.autoColor;!1!==n&&(!0===n||e.isRectText&&r&&"string"==typeof r&&r.indexOf("inside")>=0)?(i={textFill:null,textStroke:t.textStroke,textStrokeWidth:t.textStrokeWidth},t.textFill="#fff",null==t.textStroke&&(t.textStroke=a,null==t.textStrokeWidth&&(t.textStrokeWidth=2))):null!=a&&(i={textFill:null},t.textFill=a),i&&(t.insideRollback=i)}}function ys(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth,t.insideRollback=null)}function xs(t,e){var i=e||e.getModel("textStyle");return j([t.fontStyle||i&&i.getShallow("fontStyle")||"",t.fontWeight||i&&i.getShallow("fontWeight")||"",(t.fontSize||i&&i.getShallow("fontSize")||12)+"px",t.fontFamily||i&&i.getShallow("fontFamily")||"sans-serif"].join(" "))}function _s(t,e,i,n,r,a){if("function"==typeof r&&(a=r,r=null),n&&n.isAnimationEnabled()){var o=t?"Update":"",s=n.getShallow("animationDuration"+o),l=n.getShallow("animationEasing"+o),h=n.getShallow("animationDelay"+o);"function"==typeof h&&(h=h(r,n.getAnimationDelayParams?n.getAnimationDelayParams(e,r):null)),"function"==typeof s&&(s=s(r)),s>0?e.animateTo(i,s,h||0,l,a,!!a):(e.stopAnimation(),e.attr(i),a&&a())}else e.stopAnimation(),e.attr(i),a&&a()}function ws(t,e,i,n,r){_s(!0,t,e,i,n,r)}function bs(t,e){for(var i=Zt([]);t&&t!==e;)Yt(i,t.getLocalTransform(),i),t=t.parent;return i}function Ms(t,e,i){return e&&!T(e)&&(e=ee.getLocalTransform(e)),i&&(e=$t([],e)),vt([],t,e)}function Ss(t,e,i){var n=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),r=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),a=["left"===t?-n:"right"===t?n:0,"top"===t?-r:"bottom"===t?r:0];return a=Ms(a,e,i),Math.abs(a[0])>Math.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function Is(t,e,i,n){if(t&&e){var r,a=(r={},t.traverse(function(t){!t.isGroup&&t.anid&&(r[t.anid]=t)}),r);e.traverse(function(t){if(!t.isGroup&&t.anid){var e=a[t.anid];if(e){var n=o(t);t.attr(o(e)),ws(t,n,i,t.dataIndex)}}})}function o(t){var e={position:nt(t.position),rotation:t.rotation};return t.shape&&(e.shape=y({},t.shape)),e}}function Ts(t,e,i){var n=(e=y({rectHover:!0},e)).style={strokeNoScale:!0};if(i=i||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(n.image=t.slice(8),x(n,i),new Ln(e)):Zo(t.replace("path://",""),e,i,"center")}var Cs=(Object.freeze||Object)({Z2_EMPHASIS_LIFT:Ho,extendShape:Go,extendPath:function(t,e){return function(t,e){return Xa.extend(so(t,e))}(t,e)},makePath:Zo,makeImage:Xo,mergePath:jo,resizePath:qo,subPixelOptimizeLine:Uo,subPixelOptimizeRect:$o,subPixelOptimize:Ko,setElementHoverStyle:as,isInEmphasis:function(t){return t&&t.__isEmphasisEntered},setHoverStyle:us,setAsHoverStyleTrigger:cs,setLabelStyle:ds,setTextStyle:fs,setText:function(t,e,i){var n,r={isRectText:!0};!1===i?n=!0:r.autoColor=i,ps(t,e,r,n)},getFont:xs,updateProps:ws,initProps:function(t,e,i,n,r){_s(!1,t,e,i,n,r)},getTransform:bs,applyTransform:Ms,transformDirection:Ss,groupTransition:Is,clipPointsByRect:function(t,e){return D(t,function(t){var i=t[0];i=Fo(i,e.x),i=Wo(i,e.x+e.width);var n=t[1];return n=Fo(n,e.y),[i,n=Wo(n,e.y+e.height)]})},clipRectByRect:function(t,e){var i=Fo(t.x,e.x),n=Wo(t.x+t.width,e.x+e.width),r=Fo(t.y,e.y),a=Wo(t.y+t.height,e.y+e.height);if(n>=i&&a>=r)return{x:i,y:r,width:n-i,height:a-r}},createIcon:Ts,Group:ci,Image:Ln,Text:ho,Circle:co,Sector:po,Ring:go,Polygon:_o,Polyline:wo,Rect:Io,Line:Co,BezierCurve:ko,Arc:Po,IncrementalDisplayable:Eo,CompoundPath:Lo,LinearGradient:zo,RadialGradient:Bo,BoundingRect:ui}),Ds=["textStyle","color"],As={getTextColor:function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(Ds):null)},getFont:function(){return xs({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(t){return $i(t,this.getFont(),this.getShallow("align"),this.getShallow("verticalAlign")||this.getShallow("baseline"),this.getShallow("padding"),this.getShallow("lineHeight"),this.getShallow("rich"),this.getShallow("truncateText"))}},ks=Cr([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),Ps={getItemStyle:function(t,e){var i=ks(this,t,e),n=this.getBorderLineDash();return n&&(i.lineDash=n),i},getBorderLineDash:function(){var t=this.get("borderType");return"solid"===t||null==t?null:"dashed"===t?[5,5]:[1,1]}},Ls=I,Os=dr();function zs(t,e,i){this.parentModel=e,this.ecModel=i,this.option=t}function Bs(t,e,i){for(var n=0;n<e.length&&(!e[n]||null!=(t=t&&"object"==typeof t?t[e[n]]:null));n++);return null==t&&i&&(t=i.get(e)),t}function Es(t,e){var i=Os(t).getParent;return i?i.call(t,e):t.parentModel}zs.prototype={constructor:zs,init:null,mergeOption:function(t){v(this.option,t,!0)},get:function(t,e){return null==t?this.option:Bs(this.option,this.parsePath(t),!e&&Es(this,t))},getShallow:function(t,e){var i=this.option,n=null==i?i:i[t],r=!e&&Es(this,t);return null==n&&r&&(n=r.getShallow(t)),n},getModel:function(t,e){var i;return new zs(null==t?this.option:Bs(this.option,t=this.parsePath(t)),e=e||(i=Es(this,t))&&i.getModel(t),this.ecModel)},isEmpty:function(){return null==this.option},restoreData:function(){},clone:function(){return new(0,this.constructor)(g(this.option))},setReadOnly:function(t){},parsePath:function(t){return"string"==typeof t&&(t=t.split(".")),t},customizeGetParent:function(t){Os(this).getParent=t},isAnimationEnabled:function(){if(!n.node){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}}},wr(zs),Mr(zs),Ls(zs,Ar),Ls(zs,Pr),Ls(zs,As),Ls(zs,Ps);var Rs=0;function Ns(t){return[t||"",Rs++,Math.random().toFixed(5)].join("_")}var Fs=1e-4;function Ws(t,e,i,n){var r=e[1]-e[0],a=i[1]-i[0];if(0===r)return 0===a?i[0]:(i[0]+i[1])/2;if(n)if(r>0){if(t<=e[0])return i[0];if(t>=e[1])return i[1]}else{if(t>=e[0])return i[0];if(t<=e[1])return i[1]}else{if(t===e[0])return i[0];if(t===e[1])return i[1]}return(t-e[0])/r*a+i[0]}function Vs(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"string"==typeof t?(i=t,i.replace(/^\s+/,"").replace(/\s+$/,"")).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t;var i}function Hs(t,e,i){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),i?t:+t}function Gs(t){return t.sort(function(t,e){return t-e}),t}function Zs(t){var e=t.toString(),i=e.indexOf("e");if(i>0){var n=+e.slice(i+1);return n<0?-n:0}var r=e.indexOf(".");return r<0?0:e.length-1-r}function Xs(t,e){var i=Math.log,n=Math.LN10,r=Math.floor(i(t[1]-t[0])/n),a=Math.round(i(Math.abs(e[1]-e[0]))/n),o=Math.min(Math.max(-r+a,0),20);return isFinite(o)?o:20}function Ys(t){var e=2*Math.PI;return(t%e+e)%e}function js(t){return t>-Fs&&t<Fs}var qs=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function Us(t){if(t instanceof Date)return t;if("string"==typeof t){var e=qs.exec(t);if(!e)return new Date(NaN);if(e[8]){var i=+e[4]||0;return"Z"!==e[8].toUpperCase()&&(i-=e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,i,+(e[5]||0),+e[6]||0,+e[7]||0))}return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,+e[7]||0)}return null==t?new Date(NaN):new Date(Math.round(t))}function $s(t){return Math.pow(10,Ks(t))}function Ks(t){return Math.floor(Math.log(t)/Math.LN10)}function Qs(t,e){var i=Ks(t),n=Math.pow(10,i),r=t/n;return t=(e?r<1.5?1:r<2.5?2:r<4?3:r<7?5:10:r<1?1:r<2?2:r<3?3:r<5?5:10)*n,i>=-20?+t.toFixed(i<0?-i:0):t}var Js=(Object.freeze||Object)({linearMap:Ws,parsePercent:Vs,round:Hs,asc:Gs,getPrecision:function(t){if(t=+t,isNaN(t))return 0;for(var e=1,i=0;Math.round(t*e)/e!==t;)e*=10,i++;return i},getPrecisionSafe:Zs,getPixelPrecision:Xs,getPercentWithPrecision:function(t,e,i){if(!t[e])return 0;var n=A(t,function(t,e){return t+(isNaN(e)?0:e)},0);if(0===n)return 0;for(var r=Math.pow(10,i),a=D(t,function(t){return(isNaN(t)?0:t)/n*r*100}),o=100*r,s=D(a,function(t){return Math.floor(t)}),l=A(s,function(t,e){return t+e},0),h=D(a,function(t,e){return t-s[e]});l<o;){for(var u=Number.NEGATIVE_INFINITY,c=null,d=0,f=h.length;d<f;++d)h[d]>u&&(u=h[d],c=d);++s[c],h[c]=0,++l}return s[e]/r},MAX_SAFE_INTEGER:9007199254740991,remRadian:Ys,isRadianAroundZero:js,parseDate:Us,quantity:$s,nice:Qs,quantile:function(t,e){var i=(t.length-1)*e+1,n=Math.floor(i),r=+t[n-1],a=i-n;return a?r+a*(t[n]-r):r},reformIntervals:function(t){t.sort(function(t,e){return function t(e,i,n){return e.interval[n]<i.interval[n]||e.interval[n]===i.interval[n]&&(e.close[n]-i.close[n]==(n?-1:1)||!n&&t(e,i,1))}(t,e,0)?-1:1});for(var e=-1/0,i=1,n=0;n<t.length;){for(var r=t[n].interval,a=t[n].close,o=0;o<2;o++)r[o]<=e&&(r[o]=e,a[o]=o?1:1-i),e=r[o],i=a[o];r[0]===r[1]&&a[0]*a[1]!=1?t.splice(n,1):n++}return t},isNumeric:function(t){return t-parseFloat(t)>=0}});function tl(t){return isNaN(t)?"-":(t=(t+"").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function el(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()}),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}var il=X,nl=/([&<>"'])/g,rl={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function al(t){return null==t?"":(t+"").replace(nl,function(t,e){return rl[e]})}var ol=["a","b","c","d","e","f","g"],sl=function(t,e){return"{"+t+(null==e?"":e)+"}"};function ll(t,e,i){O(e)||(e=[e]);var n=e.length;if(!n)return"";for(var r=e[0].$vars||[],a=0;a<r.length;a++){var o=ol[a];t=t.replace(sl(o),sl(o,0))}for(var s=0;s<n;s++)for(var l=0;l<r.length;l++){var h=e[s][r[l]];t=t.replace(sl(ol[l],s),i?al(h):h)}return t}function hl(t,e){var i=(t=B(t)?{color:t,extraCssText:e}:t||{}).color,n=t.type,r=(e=t.extraCssText,t.renderMode||"html"),a=t.markerId||"X";return i?"html"===r?"subItem"===n?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+al(i)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:'+al(i)+";"+(e||"")+'"></span>':{renderMode:r,content:"{marker"+a+"|}  ",style:{color:i}}:""}function ul(t,e){return"0000".substr(0,e-(t+="").length)+t}function cl(t,e,i){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var n=Us(e),r=i?"UTC":"",a=n["get"+r+"FullYear"](),o=n["get"+r+"Month"]()+1,s=n["get"+r+"Date"](),l=n["get"+r+"Hours"](),h=n["get"+r+"Minutes"](),u=n["get"+r+"Seconds"](),c=n["get"+r+"Milliseconds"]();return t=t.replace("MM",ul(o,2)).replace("M",o).replace("yyyy",a).replace("yy",a%100).replace("dd",ul(s,2)).replace("d",s).replace("hh",ul(l,2)).replace("h",l).replace("mm",ul(h,2)).replace("m",h).replace("ss",ul(u,2)).replace("s",u).replace("SSS",ul(c,3))}function dl(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}var fl=Ji;var pl=(Object.freeze||Object)({addCommas:tl,toCamelCase:el,normalizeCssArray:il,encodeHTML:al,formatTpl:ll,formatTplSimple:function(t,e,i){return C(e,function(e,n){t=t.replace("{"+n+"}",i?al(e):e)}),t},getTooltipMarker:hl,formatTime:cl,capitalFirst:dl,truncateText:fl,getTextBoundingRect:function(t){return $i(t.text,t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich,t.truncate)},getTextRect:function(t,e,i,n,r,a,o,s){return $i(t,e,i,n,r,s,a,o)}}),gl=C,vl=["left","right","top","bottom","width","height"],ml=[["width","left","right"],["height","top","bottom"]];function yl(t,e,i,n,r){var a=0,o=0;null==n&&(n=1/0),null==r&&(r=1/0);var s=0;e.eachChild(function(l,h){var u,c,d=l.position,f=l.getBoundingRect(),p=e.childAt(h+1),g=p&&p.getBoundingRect();if("horizontal"===t){var v=f.width+(g?-g.x+f.x:0);(u=a+v)>n||l.newline?(a=0,u=v,o+=s+i,s=f.height):s=Math.max(s,f.height)}else{var m=f.height+(g?-g.y+f.y:0);(c=o+m)>r||l.newline?(a+=s+i,o=0,c=m,s=f.width):s=Math.max(s,f.width)}l.newline||(d[0]=a,d[1]=o,"horizontal"===t?a=u+i:o=c+i)})}var xl=yl;L(yl,"vertical"),L(yl,"horizontal");function _l(t,e,i){i=il(i||0);var n=e.width,r=e.height,a=Vs(t.left,n),o=Vs(t.top,r),s=Vs(t.right,n),l=Vs(t.bottom,r),h=Vs(t.width,n),u=Vs(t.height,r),c=i[2]+i[0],d=i[1]+i[3],f=t.aspect;switch(isNaN(h)&&(h=n-s-d-a),isNaN(u)&&(u=r-l-c-o),null!=f&&(isNaN(h)&&isNaN(u)&&(f>n/r?h=.8*n:u=.8*r),isNaN(h)&&(h=f*u),isNaN(u)&&(u=h/f)),isNaN(a)&&(a=n-s-h-d),isNaN(o)&&(o=r-l-u-c),t.left||t.right){case"center":a=n/2-h/2-i[3];break;case"right":a=n-h-d}switch(t.top||t.bottom){case"middle":case"center":o=r/2-u/2-i[0];break;case"bottom":o=r-u-c}a=a||0,o=o||0,isNaN(h)&&(h=n-d-a-(s||0)),isNaN(u)&&(u=r-c-o-(l||0));var p=new ui(a+i[3],o+i[0],h,u);return p.margin=i,p}function wl(t,e,i){!E(i)&&(i={});var n=i.ignoreSize;!O(n)&&(n=[n,n]);var r=o(ml[0],0),a=o(ml[1],1);function o(i,r){var a={},o=0,h={},u=0;if(gl(i,function(e){h[e]=t[e]}),gl(i,function(t){s(e,t)&&(a[t]=h[t]=e[t]),l(a,t)&&o++,l(h,t)&&u++}),n[r])return l(e,i[1])?h[i[2]]=null:l(e,i[2])&&(h[i[1]]=null),h;if(2!==u&&o){if(o>=2)return a;for(var c=0;c<i.length;c++){var d=i[c];if(!s(a,d)&&s(t,d)){a[d]=t[d];break}}return a}return h}function s(t,e){return t.hasOwnProperty(e)}function l(t,e){return null!=t[e]&&"auto"!==t[e]}function h(t,e,i){gl(t,function(t){e[t]=i[t]})}h(ml[0],t,r),h(ml[1],t,a)}function bl(t){return function(t,e){return e&&t&&gl(vl,function(i){e.hasOwnProperty(i)&&(t[i]=e[i])}),t}({},t)}var Ml,Sl,Il=dr(),Tl=zs.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(t,e,i,n){zs.call(this,t,e,i,n),this.uid=Ns("ec_cpt_model")},init:function(t,e,i,n){this.mergeDefaultAndTheme(t,i)},mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,n=i?bl(t):{};v(t,e.getTheme().get(this.mainType)),v(t,this.getDefaultOption()),i&&wl(t,n,i)},mergeOption:function(t,e){v(this.option,t,!0);var i=this.layoutMode;i&&wl(this.option,t,i)},optionUpdated:function(t,e){},getDefaultOption:function(){var t=Il(this);if(!t.defaultOption){for(var e=[],i=this.constructor;i;){var n=i.prototype.defaultOption;n&&e.push(n),i=i.superClass}for(var r={},a=e.length-1;a>=0;a--)r=v(r,e[a],!0);t.defaultOption=r}return t.defaultOption},getReferringComponents:function(t){return this.ecModel.queryComponents({mainType:t,index:this.get(t+"Index",!0),id:this.get(t+"Id",!0)})}});Tr(Tl,{registerWhenExtend:!0}),Sl={},(Ml=Tl).registerSubTypeDefaulter=function(t,e){t=_r(t),Sl[t.main]=e},Ml.determineSubType=function(t,e){var i=e.type;if(!i){var n=_r(t).main;Ml.hasSubTypes(t)&&Sl[n]&&(i=Sl[n](e))}return i},function(t,e){function i(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}t.topologicalTravel=function(t,n,r,a){if(t.length){var o=function(t){var n={},r=[];return C(t,function(a){var o=i(n,a),s=function(t,e){var i=[];return C(t,function(t){M(e,t)>=0&&i.push(t)}),i}(o.originalDeps=e(a),t);o.entryCount=s.length,0===o.entryCount&&r.push(a),C(s,function(t){M(o.predecessor,t)<0&&o.predecessor.push(t);var e=i(n,t);M(e.successor,t)<0&&e.successor.push(a)})}),{graph:n,noEntryList:r}}(n),s=o.graph,l=o.noEntryList,h={};for(C(t,function(t){h[t]=!0});l.length;){var u=l.pop(),c=s[u],d=!!h[u];d&&(r.call(a,u,c.originalDeps.slice()),delete h[u]),C(c.successor,d?p:f)}C(h,function(){throw new Error("Circle dependency may exists")})}function f(t){s[t].entryCount--,0===s[t].entryCount&&l.push(t)}function p(t){h[t]=!0,f(t)}}}(Tl,function(t){var e=[];C(Tl.getClassesByMainType(t),function(t){e=e.concat(t.prototype.dependencies||[])}),e=D(e,function(t){return _r(t).main}),"dataset"!==t&&M(e,"dataset")<=0&&e.unshift("dataset");return e}),I(Tl,{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")}}});var Cl="";"undefined"!=typeof navigator&&(Cl=navigator.platform||"");var Dl={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:Cl.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,animation:"auto",animationDuration:1e3,animationDurationUpdate:300,animationEasing:"exponentialOut",animationEasingUpdate:"cubicOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},Al=dr();var kl={clearColorPalette:function(){Al(this).colorIdx=0,Al(this).colorNameMap={}},getColorFromPalette:function(t,e,i){var n=Al(e=e||this),r=n.colorIdx||0,a=n.colorNameMap=n.colorNameMap||{};if(a.hasOwnProperty(t))return a[t];var o=rr(this.get("color",!0)),s=this.get("colorLayer",!0),l=null!=i&&s?function(t,e){for(var i=t.length,n=0;n<i;n++)if(t[n].length>e)return t[n];return t[i-1]}(s,i):o;if((l=l||o)&&l.length){var h=l[r];return t&&(a[t]=h),n.colorIdx=(r+1)%l.length,h}}};function Pl(t){var e=t.get("coordinateSystem"),i={coordSysName:e,coordSysDims:[],axisMap:Q(),categoryAxisMap:Q()},n=Ll[e];if(n)return n(t,i,i.axisMap,i.categoryAxisMap),i}var Ll={cartesian2d:function(t,e,i,n){var r=t.getReferringComponents("xAxis")[0],a=t.getReferringComponents("yAxis")[0];e.coordSysDims=["x","y"],i.set("x",r),i.set("y",a),Ol(r)&&(n.set("x",r),e.firstCategoryDimIndex=0),Ol(a)&&(n.set("y",a),e.firstCategoryDimIndex=1)},singleAxis:function(t,e,i,n){var r=t.getReferringComponents("singleAxis")[0];e.coordSysDims=["single"],i.set("single",r),Ol(r)&&(n.set("single",r),e.firstCategoryDimIndex=0)},polar:function(t,e,i,n){var r=t.getReferringComponents("polar")[0],a=r.findAxisModel("radiusAxis"),o=r.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],i.set("radius",a),i.set("angle",o),Ol(a)&&(n.set("radius",a),e.firstCategoryDimIndex=0),Ol(o)&&(n.set("angle",o),e.firstCategoryDimIndex=1)},geo:function(t,e,i,n){e.coordSysDims=["lng","lat"]},parallel:function(t,e,i,n){var r=t.ecModel,a=r.getComponent("parallel",t.get("parallelIndex")),o=e.coordSysDims=a.dimensions.slice();C(a.parallelAxisIndex,function(t,a){var s=r.getComponent("parallelAxis",t),l=o[a];i.set(l,s),Ol(s)&&null==e.firstCategoryDimIndex&&(n.set(l,s),e.firstCategoryDimIndex=a)})}};function Ol(t){return"category"===t.get("type")}var zl="original",Bl="arrayRows",El="objectRows",Rl="keyedColumns",Nl="unknown",Fl="typedArray",Wl="column",Vl="row";function Hl(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===Rl?{}:[]),this.sourceFormat=t.sourceFormat||Nl,this.seriesLayoutBy=t.seriesLayoutBy||Wl,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&Q(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}Hl.seriesDataToSource=function(t){return new Hl({data:t,sourceFormat:N(t)?Fl:zl,fromDataset:!1})},Mr(Hl);var Gl=dr();function Zl(t){var e=t.option,i=e.data,n=N(i)?Fl:zl,r=!1,a=e.seriesLayoutBy,o=e.sourceHeader,s=e.dimensions,l=function(t){var e=t.option;if(!e.data)return t.ecModel.getComponent("dataset",e.datasetIndex||0)}(t);if(l){var h=l.option;i=h.source,n=Gl(l).sourceFormat,r=!0,a=a||h.seriesLayoutBy,null==o&&(o=h.sourceHeader),s=s||h.dimensions}var u=function(t,e,i,n,r){if(!t)return{dimensionsDefine:Xl(r)};var a,o,s,l;if(e===Bl)"auto"===n||null==n?Yl(function(t){null!=t&&"-"!==t&&(B(t)?null==o&&(o=1):o=0)},i,t,10):o=n?1:0,r||1!==o||(r=[],Yl(function(t,e){r[e]=null!=t?t:""},i,t)),a=r?r.length:i===Vl?t.length:t[0]?t[0].length:null;else if(e===El)r||(r=function(t){var e,i=0;for(;i<t.length&&!(e=t[i++]););if(e){var n=[];return C(e,function(t,e){n.push(e)}),n}}(t),s=!0);else if(e===Rl)r||(r=[],s=!0,C(t,function(t,e){r.push(e)}));else if(e===zl){var h=sr(t[0]);a=O(h)&&h.length||1}s&&C(r,function(t,e){"name"===(E(t)?t.name:t)&&(l=e)});return{startIndex:o,dimensionsDefine:Xl(r),dimensionsDetectCount:a,potentialNameDimIndex:l}}(i,n,a,o,s),c=e.encode;!c&&l&&(c=function(t,e,i,n,r,a){var o=Pl(t),s={},l=[],h=[],u=t.subType,c=Q(["pie","map","funnel"]),d=Q(["line","bar","pictorialBar","scatter","effectScatter","candlestick","boxplot"]);if(o&&null!=d.get(u)){var f=t.ecModel,p=Gl(f).datasetMap,g=e.uid+"_"+r,v=p.get(g)||p.set(g,{categoryWayDim:1,valueWayDim:0});C(o.coordSysDims,function(t){if(null==o.firstCategoryDimIndex){var e=v.valueWayDim++;s[t]=e,h.push(e)}else if(o.categoryAxisMap.get(t))s[t]=0,l.push(0);else{var e=v.categoryWayDim++;s[t]=e,h.push(e)}})}else if(null!=c.get(u)){for(var m,y=0;y<5&&null==m;y++)ql(i,n,r,a.dimensionsDefine,a.startIndex,y)||(m=y);if(null!=m){s.value=m;var x=a.potentialNameDimIndex||Math.max(m-1,0);h.push(x),l.push(x)}}return l.length&&(s.itemName=l),h.length&&(s.seriesName=h),s}(t,l,i,n,a,u)),Gl(t).source=new Hl({data:i,fromDataset:r,seriesLayoutBy:a,sourceFormat:n,dimensionsDefine:u.dimensionsDefine,startIndex:u.startIndex,dimensionsDetectCount:u.dimensionsDetectCount,encodeDefine:c})}function Xl(t){if(t){var e=Q();return D(t,function(t,i){if(null==(t=y({},E(t)?t:{name:t})).name)return t;t.name+="",null==t.displayName&&(t.displayName=t.name);var n=e.get(t.name);return n?t.name+="-"+n.count++:e.set(t.name,{count:1}),t})}}function Yl(t,e,i,n){if(null==n&&(n=1/0),e===Vl)for(var r=0;r<i.length&&r<n;r++)t(i[r]?i[r][0]:null,r);else{var a=i[0]||[];for(r=0;r<a.length&&r<n;r++)t(a[r],r)}}function jl(t,e){return ql(t.data,t.sourceFormat,t.seriesLayoutBy,t.dimensionsDefine,t.startIndex,e)}function ql(t,e,i,n,r,a){var o,s;if(N(t))return!1;if(n&&(s=E(s=n[a])?s.name:s),e===Bl)if(i===Vl){for(var l=t[a],h=0;h<(l||[]).length&&h<5;h++)if(null!=(o=f(l[r+h])))return o}else for(h=0;h<t.length&&h<5;h++){var u=t[r+h];if(u&&null!=(o=f(u[a])))return o}else if(e===El){if(!s)return;for(h=0;h<t.length&&h<5;h++){if((c=t[h])&&null!=(o=f(c[s])))return o}}else if(e===Rl){if(!s)return;if(!(l=t[s])||N(l))return!1;for(h=0;h<l.length&&h<5;h++)if(null!=(o=f(l[h])))return o}else if(e===zl)for(h=0;h<t.length&&h<5;h++){var c,d=sr(c=t[h]);if(!O(d))return!1;if(null!=(o=f(d[a])))return o}function f(t){return(null==t||!isFinite(t)||""===t)&&(!(!B(t)||"-"===t)||void 0)}return!1}var Ul="\0_ec_inner",$l=zs.extend({init:function(t,e,i,n){i=i||{},this.option=null,this._theme=new zs(i),this._optionManager=n},setOption:function(t,e){Y(!(Ul in t),"please use chart.getOption()"),this._optionManager.setOption(t,e),this.resetOption(null)},resetOption:function(t){var e=!1,i=this._optionManager;if(!t||"recreate"===t){var n=i.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this.mergeOption(n)):function(t){t=t,this.option={},this.option[Ul]=1,this._componentsMap=Q({series:[]}),this._seriesIndices,this._seriesIndicesMap,e=t,i=this._theme.option,n=e.color&&!e.colorLayer,C(i,function(t,i){"colorLayer"===i&&n||Tl.hasClass(i)||("object"==typeof t?e[i]=e[i]?v(e[i],t,!1):g(t):null==e[i]&&(e[i]=t))}),v(t,Dl,!1),this.mergeOption(t);var e,i,n}.call(this,n),e=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var r=i.getTimelineOption(this);r&&(this.mergeOption(r),e=!0)}if(!t||"recreate"===t||"media"===t){var a=i.getMediaOption(this,this._api);a.length&&C(a,function(t){this.mergeOption(t,e=!0)},this)}return e},mergeOption:function(t){var e=this.option,i=this._componentsMap,n=[];Gl(this).datasetMap=Q(),C(t,function(t,i){null!=t&&(Tl.hasClass(i)?i&&n.push(i):e[i]=null==e[i]?g(t):v(e[i],t,!0))}),Tl.topologicalTravel(n,Tl.getAllClassMainTypes(),function(n,r){var a=rr(t[n]),o=lr(i.get(n),a);(function(t){var e=Q();tr(t,function(t,i){var n=t.exist;n&&e.set(n.id,t)}),tr(t,function(t,i){var n=t.option;Y(!n||null==n.id||!e.get(n.id)||e.get(n.id)===t,"id duplicates: "+(n&&n.id)),n&&null!=n.id&&e.set(n.id,t),!t.keyInfo&&(t.keyInfo={})}),tr(t,function(t,i){var n=t.exist,r=t.option,a=t.keyInfo;if(er(r)){if(a.name=null!=r.name?r.name+"":n?n.name:nr+i,n)a.id=n.id;else if(null!=r.id)a.id=r.id+"";else{var o=0;do{a.id="\0"+a.name+"\0"+o++}while(e.get(a.id))}e.set(a.id,t)}})})(o),C(o,function(t,e){var i=t.option;E(i)&&(t.keyInfo.mainType=n,t.keyInfo.subType=function(t,e,i){return e.type?e.type:i?i.subType:Tl.determineSubType(t,e)}(n,i,t.exist))});var s=function(t,e){O(e)||(e=e?[e]:[]);var i={};return C(e,function(e){i[e]=(t.get(e)||[]).slice()}),i}(i,r);e[n]=[],i.set(n,[]),C(o,function(t,r){var a=t.exist,o=t.option;if(Y(E(o)||a,"Empty component definition"),o){var l=Tl.getClass(n,t.keyInfo.subType,!0);if(a&&a instanceof l)a.name=t.keyInfo.name,a.mergeOption(o,this),a.optionUpdated(o,!1);else{var h=y({dependentModels:s,componentIndex:r},t.keyInfo);y(a=new l(o,this,this,h),h),a.init(o,this,this,h),a.optionUpdated(null,!0)}}else a.mergeOption({},this),a.optionUpdated({},!1);i.get(n)[r]=a,e[n][r]=a.option},this),"series"===n&&Kl(this,i.get("series"))},this),this._seriesIndicesMap=Q(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var t=g(this.option);return C(t,function(e,i){if(Tl.hasClass(i)){for(var n=(e=rr(e)).length-1;n>=0;n--)ur(e[n])&&e.splice(n,1);t[i]=e}}),delete t[Ul],t},getTheme:function(){return this._theme},getComponent:function(t,e){var i=this._componentsMap.get(t);if(i)return i[e||0]},queryComponents:function(t){var e=t.mainType;if(!e)return[];var i,n=t.index,r=t.id,a=t.name,o=this._componentsMap.get(e);if(!o||!o.length)return[];if(null!=n)O(n)||(n=[n]),i=k(D(n,function(t){return o[t]}),function(t){return!!t});else if(null!=r){var s=O(r);i=k(o,function(t){return s&&M(r,t.id)>=0||!s&&t.id===r})}else if(null!=a){var l=O(a);i=k(o,function(t){return l&&M(a,t.name)>=0||!l&&t.name===a})}else i=o.slice();return Ql(i,t)},findComponents:function(t){var e,i,n,r,a,o=t.query,s=t.mainType,l=(i=s+"Index",n=s+"Id",r=s+"Name",!(e=o)||null==e[i]&&null==e[n]&&null==e[r]?null:{mainType:s,index:e[i],id:e[n],name:e[r]}),h=l?this.queryComponents(l):this._componentsMap.get(s);return a=Ql(h,t),t.filter?k(a,t.filter):a},eachComponent:function(t,e,i){var n=this._componentsMap;if("function"==typeof t)i=e,e=t,n.each(function(t,n){C(t,function(t,r){e.call(i,n,t,r)})});else if(B(t))C(n.get(t),e,i);else if(E(t)){C(this.findComponents(t),e,i)}},getSeriesByName:function(t){return k(this._componentsMap.get("series"),function(e){return e.name===t})},getSeriesByIndex:function(t){return this._componentsMap.get("series")[t]},getSeriesByType:function(t){return k(this._componentsMap.get("series"),function(e){return e.subType===t})},getSeries:function(){return this._componentsMap.get("series").slice()},getSeriesCount:function(){return this._componentsMap.get("series").length},eachSeries:function(t,e){C(this._seriesIndices,function(i){var n=this._componentsMap.get("series")[i];t.call(e,n,i)},this)},eachRawSeries:function(t,e){C(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(t,e,i){C(this._seriesIndices,function(n){var r=this._componentsMap.get("series")[n];r.subType===t&&e.call(i,r,n)},this)},eachRawSeriesByType:function(t,e,i){return C(this.getSeriesByType(t),e,i)},isSeriesFiltered:function(t){return null==this._seriesIndicesMap.get(t.componentIndex)},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){Kl(this,k(this._componentsMap.get("series"),t,e))},restoreData:function(t){var e=this._componentsMap;Kl(this,e.get("series"));var i=[];e.each(function(t,e){i.push(e)}),Tl.topologicalTravel(i,Tl.getAllClassMainTypes(),function(i,n){C(e.get(i),function(e){("series"!==i||!function(t,e){if(e){var i=e.seiresIndex,n=e.seriesId,r=e.seriesName;return null!=i&&t.componentIndex!==i||null!=n&&t.id!==n||null!=r&&t.name!==r}}(e,t))&&e.restoreData()})})}});function Kl(t,e){t._seriesIndicesMap=Q(t._seriesIndices=D(e,function(t){return t.componentIndex})||[])}function Ql(t,e){return e.hasOwnProperty("subType")?k(t,function(t){return t.subType===e.subType}):t}I($l,kl);var Jl=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"];function th(t){C(Jl,function(e){this[e]=P(t[e],t)},this)}var eh={};function ih(){this._coordinateSystems=[]}ih.prototype={constructor:ih,create:function(t,e){var i=[];C(eh,function(n,r){var a=n.create(t,e);i=i.concat(a||[])}),this._coordinateSystems=i},update:function(t,e){C(this._coordinateSystems,function(i){i.update&&i.update(t,e)})},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},ih.register=function(t,e){eh[t]=e},ih.get=function(t){return eh[t]};var nh=C,rh=g,ah=D,oh=v,sh=/^(min|max)?(.+)$/;function lh(t){this._api=t,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}function hh(t,e,i){var n={width:e,height:i,aspectratio:e/i},r=!0;return C(t,function(t,e){var i=e.match(sh);if(i&&i[1]&&i[2]){var a=i[1],o=i[2].toLowerCase();(function(t,e,i){return"min"===i?t>=e:"max"===i?t<=e:t===e})(n[o],t,a)||(r=!1)}}),r}lh.prototype={constructor:lh,setOption:function(t,e){t&&C(rr(t.series),function(t){t&&t.data&&N(t.data)&&U(t.data)}),t=rh(t,!0);var i,n,r=this._optionBackup,a=function(t,e,i){var n,r,a=[],o=[],s=t.timeline;t.baseOption&&(r=t.baseOption);(s||t.options)&&(r=r||{},a=(t.options||[]).slice());if(t.media){r=r||{};var l=t.media;nh(l,function(t){t&&t.option&&(t.query?o.push(t):n||(n=t))})}r||(r=t);r.timeline||(r.timeline=s);return nh([r].concat(a).concat(D(o,function(t){return t.option})),function(t){nh(e,function(e){e(t,i)})}),{baseOption:r,timelineOptions:a,mediaDefault:n,mediaList:o}}.call(this,t,e,!r);this._newBaseOption=a.baseOption,r?(i=r.baseOption,n=a.baseOption,nh(n=n||{},function(t,e){if(null!=t){var n=i[e];if(Tl.hasClass(e)){t=rr(t);var r=lr(n=rr(n),t);i[e]=ah(r,function(t){return t.option&&t.exist?oh(t.exist,t.option,!0):t.exist||t.option})}else i[e]=oh(n,t,!0)}}),a.timelineOptions.length&&(r.timelineOptions=a.timelineOptions),a.mediaList.length&&(r.mediaList=a.mediaList),a.mediaDefault&&(r.mediaDefault=a.mediaDefault)):this._optionBackup=a},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=ah(e.timelineOptions,rh),this._mediaList=ah(e.mediaList,rh),this._mediaDefault=rh(e.mediaDefault),this._currentMediaIndices=[],rh(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,i=this._timelineOptions;if(i.length){var n=t.getComponent("timeline");n&&(e=rh(i[n.getCurrentIndex()],!0))}return e},getMediaOption:function(t){var e,i,n=this._api.getWidth(),r=this._api.getHeight(),a=this._mediaList,o=this._mediaDefault,s=[],l=[];if(!a.length&&!o)return l;for(var h=0,u=a.length;h<u;h++)hh(a[h].query,n,r)&&s.push(h);return!s.length&&o&&(s=[-1]),s.length&&(e=s,i=this._currentMediaIndices,e.join(",")!==i.join(","))&&(l=ah(s,function(t){return rh(-1===t?o.option:a[t].option)})),this._currentMediaIndices=s,l}};var uh=C,ch=E,dh=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function fh(t){var e=t&&t.itemStyle;if(e)for(var i=0,n=dh.length;i<n;i++){var r=dh[i],a=e.normal,o=e.emphasis;a&&a[r]&&(t[r]=t[r]||{},t[r].normal?v(t[r].normal,a[r]):t[r].normal=a[r],a[r]=null),o&&o[r]&&(t[r]=t[r]||{},t[r].emphasis?v(t[r].emphasis,o[r]):t[r].emphasis=o[r],o[r]=null)}}function ph(t,e,i){if(t&&t[e]&&(t[e].normal||t[e].emphasis)){var n=t[e].normal,r=t[e].emphasis;n&&(i?(t[e].normal=t[e].emphasis=null,x(t[e],n)):t[e]=n),r&&(t.emphasis=t.emphasis||{},t.emphasis[e]=r)}}function gh(t){ph(t,"itemStyle"),ph(t,"lineStyle"),ph(t,"areaStyle"),ph(t,"label"),ph(t,"labelLine"),ph(t,"upperLabel"),ph(t,"edgeLabel")}function vh(t,e){var i=ch(t)&&t[e],n=ch(i)&&i.textStyle;if(n)for(var r=0,a=or.length;r<a;r++){e=or[r];n.hasOwnProperty(e)&&(i[e]=n[e])}}function mh(t){t&&(gh(t),vh(t,"label"),t.emphasis&&vh(t.emphasis,"label"))}function yh(t){return O(t)?t:t?[t]:[]}function xh(t){return(O(t)?t[0]:t)||{}}var _h=function(t,e){uh(yh(t.series),function(t){ch(t)&&function(t){if(ch(t)){fh(t),gh(t),vh(t,"label"),vh(t,"upperLabel"),vh(t,"edgeLabel"),t.emphasis&&(vh(t.emphasis,"label"),vh(t.emphasis,"upperLabel"),vh(t.emphasis,"edgeLabel")),(i=t.markPoint)&&(fh(i),mh(i)),(n=t.markLine)&&(fh(n),mh(n));var e=t.markArea;e&&mh(e);var i,n,r=t.data;if("graph"===t.type){r=r||t.nodes;var a=t.links||t.edges;if(a&&!N(a))for(var o=0;o<a.length;o++)mh(a[o]);C(t.categories,function(t){gh(t)})}if(r&&!N(r))for(o=0;o<r.length;o++)mh(r[o]);if((i=t.markPoint)&&i.data){var s=i.data;for(o=0;o<s.length;o++)mh(s[o])}if((n=t.markLine)&&n.data){var l=n.data;for(o=0;o<l.length;o++)O(l[o])?(mh(l[o][0]),mh(l[o][1])):mh(l[o])}"gauge"===t.type?(vh(t,"axisLabel"),vh(t,"title"),vh(t,"detail")):"treemap"===t.type?(ph(t.breadcrumb,"itemStyle"),C(t.levels,function(t){gh(t)})):"tree"===t.type&&gh(t.leaves)}}(t)});var i=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&i.push("valueAxis","categoryAxis","logAxis","timeAxis"),uh(i,function(e){uh(yh(t[e]),function(t){t&&(vh(t,"axisLabel"),vh(t.axisPointer,"label"))})}),uh(yh(t.parallel),function(t){var e=t&&t.parallelAxisDefault;vh(e,"axisLabel"),vh(e&&e.axisPointer,"label")}),uh(yh(t.calendar),function(t){ph(t,"itemStyle"),vh(t,"dayLabel"),vh(t,"monthLabel"),vh(t,"yearLabel")}),uh(yh(t.radar),function(t){vh(t,"name")}),uh(yh(t.geo),function(t){ch(t)&&(mh(t),uh(yh(t.regions),function(t){mh(t)}))}),uh(yh(t.timeline),function(t){mh(t),ph(t,"label"),ph(t,"itemStyle"),ph(t,"controlStyle",!0);var e=t.data;O(e)&&C(e,function(t){E(t)&&(ph(t,"label"),ph(t,"itemStyle"))})}),uh(yh(t.toolbox),function(t){ph(t,"iconStyle"),uh(t.feature,function(t){ph(t,"iconStyle")})}),vh(xh(t.axisPointer),"label"),vh(xh(t.tooltip).axisPointer,"label")};function wh(t){C(bh,function(e){e[0]in t&&!(e[1]in t)&&(t[e[1]]=t[e[0]])})}var bh=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],Mh=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],Sh=function(t,e){_h(t,e),t.series=rr(t.series),C(t.series,function(t){if(E(t)){var e=t.type;if("pie"!==e&&"gauge"!==e||null!=t.clockWise&&(t.clockwise=t.clockWise),"gauge"===e){var i=function(t,e){e=e.split(",");for(var i=t,n=0;n<e.length&&null!=(i=i&&i[e[n]]);n++);return i}(t,"pointer.color");null!=i&&function(t,e,i,n){e=e.split(",");for(var r,a=t,o=0;o<e.length-1;o++)null==a[r=e[o]]&&(a[r]={}),a=a[r];(n||null==a[e[o]])&&(a[e[o]]=i)}(t,"itemStyle.normal.color",i)}wh(t)}}),t.dataRange&&(t.visualMap=t.dataRange),C(Mh,function(e){var i=t[e];i&&(O(i)||(i=[i]),C(i,function(t){wh(t)}))})};function Ih(t){C(t,function(e,i){var n=[],r=[NaN,NaN],a=[e.stackResultDimension,e.stackedOverDimension],o=e.data,s=e.isStackedByIndex,l=o.map(a,function(a,l,h){var u,c,d=o.get(e.stackedDimension,h);if(isNaN(d))return r;s?c=o.getRawIndex(h):u=o.get(e.stackedByDimension,h);for(var f=NaN,p=i-1;p>=0;p--){var g=t[p];if(s||(c=g.data.rawIndexOf(g.stackedByDimension,u)),c>=0){var v=g.data.getByRawIndex(g.stackResultDimension,c);if(d>=0&&v>0||d<=0&&v<0){d+=v,f=v;break}}}return n[0]=d,n[1]=f,n});o.hostModel.setData(l),e.data=l})}function Th(t,e){Hl.isInstance(t)||(t=Hl.seriesDataToSource(t)),this._source=t;var i=this._data=t.data,n=t.sourceFormat;n===Fl&&(this._offset=0,this._dimSize=e,this._data=i),y(this,Dh[n===Bl?n+"_"+t.seriesLayoutBy:n])}var Ch=Th.prototype;Ch.pure=!1,Ch.persistent=!0,Ch.getSource=function(){return this._source};var Dh={arrayRows_column:{pure:!0,count:function(){return Math.max(0,this._data.length-this._source.startIndex)},getItem:function(t){return this._data[t+this._source.startIndex]},appendData:Ph},arrayRows_row:{pure:!0,count:function(){var t=this._data[0];return t?Math.max(0,t.length-this._source.startIndex):0},getItem:function(t){t+=this._source.startIndex;for(var e=[],i=this._data,n=0;n<i.length;n++){var r=i[n];e.push(r?r[t]:null)}return e},appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},objectRows:{pure:!0,count:Ah,getItem:kh,appendData:Ph},keyedColumns:{pure:!0,count:function(){var t=this._source.dimensionsDefine[0].name,e=this._data[t];return e?e.length:0},getItem:function(t){for(var e=[],i=this._source.dimensionsDefine,n=0;n<i.length;n++){var r=this._data[i[n].name];e.push(r?r[t]:null)}return e},appendData:function(t){var e=this._data;C(t,function(t,i){for(var n=e[i]||(e[i]=[]),r=0;r<(t||[]).length;r++)n.push(t[r])})}},original:{count:Ah,getItem:kh,appendData:Ph},typedArray:{persistent:!1,pure:!0,count:function(){return this._data?this._data.length/this._dimSize:0},getItem:function(t,e){t-=this._offset,e=e||[];for(var i=this._dimSize*t,n=0;n<this._dimSize;n++)e[n]=this._data[i+n];return e},appendData:function(t){this._data=t},clean:function(){this._offset+=this.count(),this._data=null}}};function Ah(){return this._data.length}function kh(t){return this._data[t]}function Ph(t){for(var e=0;e<t.length;e++)this._data.push(t[e])}var Lh={arrayRows:Oh,objectRows:function(t,e,i,n){return null!=i?t[n]:t},keyedColumns:Oh,original:function(t,e,i,n){var r=sr(t);return null!=i&&r instanceof Array?r[i]:r},typedArray:Oh};function Oh(t,e,i,n){return null!=i?t[i]:t}var zh={arrayRows:Bh,objectRows:function(t,e,i,n){return Eh(t[e],this._dimensionInfos[e])},keyedColumns:Bh,original:function(t,e,i,n){var r=t&&(null==t.value?t:t.value);return!this._rawData.pure&&function(t){return er(t)&&!(t instanceof Array)}(t)&&(this.hasItemOption=!0),Eh(r instanceof Array?r[n]:r,this._dimensionInfos[e])},typedArray:function(t,e,i,n){return t[n]}};function Bh(t,e,i,n){return Eh(t[n],this._dimensionInfos[e])}function Eh(t,e){var i=e&&e.type;if("ordinal"===i){var n=e&&e.ordinalMeta;return n?n.parseAndCollect(t):t}return"time"===i&&"number"!=typeof t&&null!=t&&"-"!==t&&(t=+Us(t)),null==t||""===t?NaN:+t}function Rh(t,e,i){if(t){var n=t.getRawDataItem(e);if(null!=n){var r,a,o=t.getProvider().getSource().sourceFormat,s=t.getDimensionInfo(i);return s&&(r=s.name,a=s.index),Lh[o](n,e,a,r)}}}var Nh=/\{@(.+?)\}/g,Fh={getDataParams:function(t,e){var i=this.getData(e),n=this.getRawValue(t,e),r=i.getRawIndex(t),a=i.getName(t),o=i.getRawDataItem(t),s=i.getItemVisual(t,"color"),l=this.ecModel.getComponent("tooltip"),h=mr(l&&l.get("renderMode")),u=this.mainType,c="series"===u;return{componentType:u,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:c?this.subType:null,seriesIndex:this.seriesIndex,seriesId:c?this.id:null,seriesName:c?this.name:null,name:a,dataIndex:r,data:o,dataType:e,value:n,color:s,marker:hl({color:s,renderMode:h}),$vars:["seriesName","name","value"]}},getFormattedLabel:function(t,e,i,n,r){e=e||"normal";var a=this.getData(i),o=a.getItemModel(t),s=this.getDataParams(t,i);null!=n&&s.value instanceof Array&&(s.value=s.value[n]);var l=o.get("normal"===e?[r||"label","formatter"]:[e,r||"label","formatter"]);return"function"==typeof l?(s.status=e,l(s)):"string"==typeof l?ll(l,s).replace(Nh,function(e,i){var n=i.length;return"["===i.charAt(0)&&"]"===i.charAt(n-1)&&(i=+i.slice(1,n-1)),Rh(a,t,i)}):void 0},getRawValue:function(t,e){return Rh(this.getData(e),t)},formatTooltip:function(){}};function Wh(t){return new Vh(t)}function Vh(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0,this.context}var Hh=Vh.prototype;Hh.perform=function(t){var e,i=this._upstream,n=t&&t.skip;if(this._dirty&&i){var r=this.context;r.data=r.outputData=i.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!n&&(e=this._plan(this.context));var a,o=u(this._modBy),s=this._modDataCount||0,l=u(t&&t.modBy),h=t&&t.modDataCount||0;function u(t){return!(t>=1)&&(t=1),t}o===l&&s===h||(e="reset"),(this._dirty||"reset"===e)&&(this._dirty=!1,a=function(t,e){var i,n;t._dueIndex=t._outputDueEnd=t._dueEnd=0,t._settedOutputEnd=null,!e&&t._reset&&((i=t._reset(t.context))&&i.progress&&(n=i.forceFirstProgress,i=i.progress),O(i)&&!i.length&&(i=null));t._progress=i,t._modBy=t._modDataCount=null;var r=t._downstream;return r&&r.dirty(),n}(this,n)),this._modBy=l,this._modDataCount=h;var c=t&&t.step;if(this._dueEnd=i?i._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,f=Math.min(null!=c?this._dueIndex+c:1/0,this._dueEnd);if(!n&&(a||d<f)){var p=this._progress;if(O(p))for(var g=0;g<p.length;g++)Zh(this,p[g],d,f,l,h);else Zh(this,p,d,f,l,h)}this._dueIndex=f;var v=null!=this._settedOutputEnd?this._settedOutputEnd:f;this._outputDueEnd=v}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()};var Gh=function(){var t,e,i,n,r,a={reset:function(l,h,u,c){e=l,t=h,i=u,n=c,r=Math.ceil(n/i),a.next=i>1&&n>0?s:o}};return a;function o(){return e<t?e++:null}function s(){var a=e%r*i+Math.ceil(e/r),o=e>=t?null:a<n?a:e;return e++,o}}();function Zh(t,e,i,n,r,a){Gh.reset(i,n,r,a),t._callingProgress=e,t._callingProgress({start:i,end:n,count:n-i,next:Gh.next},t.context)}Hh.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},Hh.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},Hh.pipe=function(t){(this._downstream!==t||this._dirty)&&(this._downstream=t,t._upstream=this,t.dirty())},Hh.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},Hh.getUpstream=function(){return this._upstream},Hh.getDownstream=function(){return this._downstream},Hh.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t};var Xh=dr(),Yh=Tl.extend({type:"series.__base__",seriesIndex:0,coordinateSystem:null,defaultOption:null,legendDataProvider:null,visualColorAccessPath:"itemStyle.color",layoutMode:null,init:function(t,e,i,n){this.seriesIndex=this.componentIndex,this.dataTask=Wh({count:qh,reset:Uh}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,i),Zl(this);var r=this.getInitialData(t,i);Kh(r,this),this.dataTask.context.data=r,Xh(this).dataBeforeProcessed=r,jh(this)},mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,n=i?bl(t):{},r=this.subType;Tl.hasClass(r)&&(r+="Series"),v(t,e.getTheme().get(this.subType)),v(t,this.getDefaultOption()),ar(t,"label",["show"]),this.fillDataTextStyle(t.data),i&&wl(t,n,i)},mergeOption:function(t,e){t=v(this.option,t,!0),this.fillDataTextStyle(t.data);var i=this.layoutMode;i&&wl(this.option,t,i),Zl(this);var n=this.getInitialData(t,e);Kh(n,this),this.dataTask.dirty(),this.dataTask.context.data=n,Xh(this).dataBeforeProcessed=n,jh(this)},fillDataTextStyle:function(t){if(t&&!N(t))for(var e=["show"],i=0;i<t.length;i++)t[i]&&t[i].label&&ar(t[i],"label",e)},getInitialData:function(){},appendData:function(t){this.getRawData().appendData(t.data)},getData:function(t){var e=Jh(this);if(e){var i=e.context.data;return null==t?i:i.getLinkedData(t)}return Xh(this).data},setData:function(t){var e=Jh(this);if(e){var i=e.context;i.data!==t&&e.modifyOutputEnd&&e.setOutputEnd(t.count()),i.outputData=t,e!==this.dataTask&&(i.data=t)}Xh(this).data=t},getSource:function(){return Gl(this).source},getRawData:function(){return Xh(this).dataBeforeProcessed},getBaseAxis:function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},formatTooltip:function(t,e,i,n){var r=this,a="html"===(n=n||"html")?"<br/>":"\n",o="richText"===n,s={},l=0;function h(t){return{renderMode:n,content:al(tl(t)),style:s}}var u=this.getData(),c=u.mapDimension("defaultedTooltip",!0),d=c.length,f=this.getRawValue(t),p=O(f),g=u.getItemVisual(t,"color");E(g)&&g.colorStops&&(g=(g.colorStops[0]||{}).color),g=g||"transparent";var v=(d>1||p&&!d?function(i){var a=A(i,function(t,e,i){var n=u.getDimensionInfo(i);return t|(n&&!1!==n.tooltip&&null!=n.displayName)},0),h=[];function d(t,i){var c=u.getDimensionInfo(i);if(c&&!1!==c.otherDims.tooltip){var d=c.type,f="sub"+r.seriesIndex+"at"+l,p=hl({color:g,type:"subItem",renderMode:n,markerId:f}),v="string"==typeof p?p:p.content,m=(a?v+al(c.displayName||"-")+": ":"")+al("ordinal"===d?t+"":"time"===d?e?"":cl("yyyy/MM/dd hh:mm:ss",t):tl(t));m&&h.push(m),o&&(s[f]=g,++l)}}c.length?C(c,function(e){d(Rh(u,t,e),e)}):C(i,d);var f=a?o?"\n":"<br/>":"",p=f+h.join(f||", ");return{renderMode:n,content:p,style:s}}(f):h(d?Rh(u,t,c[0]):p?f[0]:f)).content,m=r.seriesIndex+"at"+l,y=hl({color:g,type:"item",renderMode:n,markerId:m});s[m]=g,++l;var x=u.getName(t),_=this.name;hr(this)||(_=""),_=_?al(_)+(e?": ":a):"";var w="string"==typeof y?y:y.content;return{html:e?w+_+v:_+w+(x?al(x)+": "+v:v),markers:s}},isAnimationEnabled:function(){if(n.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(t,e,i){var n=this.ecModel,r=kl.getColorFromPalette.call(this,t,e,i);return r||(r=n.getColorFromPalette(t,e,i)),r},coordDimToDataDim:function(t){return this.getRawData().mapDimension(t,!0)},getProgressive:function(){return this.get("progressive")},getProgressiveThreshold:function(){return this.get("progressiveThreshold")},getAxisTooltipData:null,getTooltipPosition:null,pipeTask:null,preventIncremental:null,pipelineContext:null});function jh(t){var e=t.name;hr(t)||(t.name=function(t){var e=t.getRawData(),i=e.mapDimension("seriesName",!0),n=[];return C(i,function(t){var i=e.getDimensionInfo(t);i.displayName&&n.push(i.displayName)}),n.join(" ")}(t)||e)}function qh(t){return t.model.getRawData().count()}function Uh(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),$h}function $h(t,e){t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function Kh(t,e){C(t.CHANGABLE_METHODS,function(i){t.wrapMethod(i,L(Qh,e))})}function Qh(t){var e=Jh(t);e&&e.setOutputEnd(this.count())}function Jh(t){var e=(t.ecModel||{}).scheduler,i=e&&e.getPipeline(t.uid);if(i){var n=i.currentTask;if(n){var r=n.agentStubMap;r&&(n=r.get(t.uid))}return n}}I(Yh,Fh),I(Yh,kl);var tu=function(){this.group=new ci,this.uid=Ns("viewComponent")};tu.prototype={constructor:tu,init:function(t,e){},render:function(t,e,i,n){},dispose:function(){},filterForExposedEvent:null};var eu=tu.prototype;eu.updateView=eu.updateLayout=eu.updateVisual=function(t,e,i,n){},wr(tu),Tr(tu,{registerWhenExtend:!0});var iu=function(){var t=dr();return function(e){var i=t(e),n=e.pipelineContext,r=i.large,a=i.progressiveRender,o=i.large=n.large,s=i.progressiveRender=n.progressiveRender;return!!(r^o||a^s)&&"reset"}},nu=dr(),ru=iu();function au(){this.group=new ci,this.uid=Ns("viewChart"),this.renderTask=Wh({plan:hu,reset:uu}),this.renderTask.context={view:this}}au.prototype={type:"chart",init:function(t,e){},render:function(t,e,i,n){},highlight:function(t,e,i,n){lu(t.getData(),n,"emphasis")},downplay:function(t,e,i,n){lu(t.getData(),n,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};var ou=au.prototype;function su(t,e){if(t&&(t.trigger(e),"group"===t.type))for(var i=0;i<t.childCount();i++)su(t.childAt(i),e)}function lu(t,e,i){var n=cr(t,e);null!=n?C(rr(n),function(e){su(t.getItemGraphicEl(e),i)}):t.eachItemGraphicEl(function(t){su(t,i)})}function hu(t){return ru(t.model)}function uu(t){var e=t.model,i=t.ecModel,n=t.api,r=t.payload,a=e.pipelineContext.progressiveRender,o=t.view,s=r&&nu(r).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return"render"!==l&&o[l](e,i,n,r),cu[l]}ou.updateView=ou.updateLayout=ou.updateVisual=function(t,e,i,n){this.render(t,e,i,n)},wr(au),Tr(au,{registerWhenExtend:!0}),au.markUpdateMethod=function(t,e){nu(t).updateMethod=e};var cu={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)}}},du="\0__throttleOriginMethod",fu="\0__throttleRate",pu="\0__throttleType";function gu(t,e,i){var n,r,a,o,s,l=0,h=0,u=null;function c(){h=(new Date).getTime(),u=null,t.apply(a,o||[])}e=e||0;var d=function(){n=(new Date).getTime(),a=this,o=arguments;var t=s||e,d=s||i;s=null,r=n-(d?l:h)-t,clearTimeout(u),d?u=setTimeout(c,t):r>=0?c():u=setTimeout(c,-r),l=n};return d.clear=function(){u&&(clearTimeout(u),u=null)},d.debounceNextCall=function(t){s=t},d}function vu(t,e,i,n){var r=t[e];if(r){var a=r[du]||r,o=r[pu];if(r[fu]!==i||o!==n){if(null==i||!n)return t[e]=a;(r=t[e]=gu(a,i,"debounce"===n))[du]=a,r[pu]=n,r[fu]=i}return r}}function mu(t,e){var i=t[e];i&&i[du]&&(t[e]=i[du])}var yu={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var i=t.getData(),n=(t.visualColorAccessPath||"itemStyle.color").split("."),r=t.get(n)||t.getColorFromPalette(t.name,null,e.getSeriesCount());if(i.setVisual("color",r),!e.isSeriesFiltered(t)){"function"!=typeof r||r instanceof Oo||i.each(function(e){i.setItemVisual(e,"color",r(t.getDataParams(e)))});return{dataEach:i.hasItemOption?function(t,e){var i=t.getItemModel(e).get(n,!0);null!=i&&t.setItemVisual(e,"color",i)}:null}}}},xu={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:"旭日图"}},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:""}}}},_u=function(t,e){var i=e.getModel("aria");if(i.get("show"))if(i.get("description"))t.setAttribute("aria-label",i.get("description"));else{var n=0;e.eachSeries(function(t,e){++n},this);var r,a=i.get("data.maxCount")||10,o=i.get("series.maxCount")||10,s=Math.min(n,o);if(!(n<1)){var l=function(){var t=e.getModel("title").option;t&&t.length&&(t=t[0]);return t&&t.text}();r=l?u(c("general.withTitle"),{title:l}):c("general.withoutTitle");var h=[];r+=u(c(n>1?"series.multiple.prefix":"series.single.prefix"),{seriesCount:n}),e.eachSeries(function(t,e){if(e<s){var i,r=t.get("name"),o="series."+(n>1?"multiple":"single")+".";i=u(i=c(r?o+"withName":o+"withoutName"),{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:(v=t.subType,xu.series.typeNames[v]||"自定义图")});var l=t.getData();window.data=l,l.count()>a?i+=u(c("data.partialData"),{displayCnt:a}):i+=c("data.allData");for(var d=[],f=0;f<l.count();f++)if(f<a){var p=l.getName(f),g=Rh(l,f);d.push(u(c(p?"data.withName":"data.withoutName"),{name:p,value:g}))}i+=d.join(c("data.separator.middle"))+c("data.separator.end"),h.push(i)}var v}),r+=h.join(c("series.multiple.separator.middle"))+c("series.multiple.separator.end"),t.setAttribute("aria-label",r)}}function u(t,e){if("string"!=typeof t)return t;var i=t;return C(e,function(t,e){i=i.replace(new RegExp("\\{\\s*"+e+"\\s*\\}","g"),t)}),i}function c(t){var e=i.get(t);if(null==e){for(var n=t.split("."),r=xu.aria,a=0;a<n.length;++a)r=r[n[a]];return r}return e}},wu=Math.PI;function bu(t,e,i,n){this.ecInstance=t,this.api=e,this.unfinished;i=this._dataProcessorHandlers=i.slice(),n=this._visualHandlers=n.slice();this._allHandlers=i.concat(n),this._stageTaskMap=Q()}var Mu=bu.prototype;function Su(t,e,i,n,r){var a;function o(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}r=r||{},C(e,function(e,s){if(!r.visualType||r.visualType===e.visualType){var l=t._stageTaskMap.get(e.uid),h=l.seriesTaskMap,u=l.overallTask;if(u){var c,d=u.agentStubMap;d.each(function(t){o(r,t)&&(t.dirty(),c=!0)}),c&&u.dirty(),Iu(u,n);var f=t.getPerformArgs(u,r.block);d.each(function(t){t.perform(f)}),a|=u.perform(f)}else h&&h.each(function(s,l){o(r,s)&&s.dirty();var h=t.getPerformArgs(s,r.block);h.skip=!e.performRawSeries&&i.isSeriesFiltered(s.context.model),Iu(s,n),a|=s.perform(h)})}}),t.unfinished|=a}Mu.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(t){var e=t.overallTask;e&&e.dirty()})},Mu.getPerformArgs=function(t,e){if(t.__pipeline){var i=this._pipelineMap.get(t.__pipeline.id),n=i.context,r=!e&&i.progressiveEnabled&&(!n||n.progressiveRender)&&t.__idxInPipeline>i.blockIndex?i.step:null,a=n&&n.modDataCount;return{step:r,modBy:null!=a?Math.ceil(a/r):null,modDataCount:a}}},Mu.getPipeline=function(t){return this._pipelineMap.get(t)},Mu.updateStreamModes=function(t,e){var i=this._pipelineMap.get(t.uid),n=t.getData().count(),r=i.progressiveEnabled&&e.incrementalPrepareRender&&n>=i.threshold,a=t.get("large")&&n>=t.get("largeThreshold"),o="mod"===t.get("progressiveChunkMode")?n:null;t.pipelineContext=i.context={progressiveRender:r,modDataCount:o,large:a}},Mu.restorePipelines=function(t){var e=this,i=e._pipelineMap=Q();t.eachSeries(function(t){var n=t.getProgressive(),r=t.uid;i.set(r,{id:r,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:n&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(n||700),count:0}),Bu(e,t,t.dataTask)})},Mu.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.ecInstance.getModel(),i=this.api;C(this._allHandlers,function(n){var r=t.get(n.uid)||t.set(n.uid,[]);n.reset&&function(t,e,i,n,r){var a=i.seriesTaskMap||(i.seriesTaskMap=Q()),o=e.seriesType,s=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(l):o?n.eachRawSeriesByType(o,l):s&&s(n,r).each(l);function l(i){var o=i.uid,s=a.get(o)||a.set(o,Wh({plan:ku,reset:Pu,count:zu}));s.context={model:i,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:t},Bu(t,i,s)}var h=t._pipelineMap;a.each(function(t,e){h.get(e)||(t.dispose(),a.removeKey(e))})}(this,n,r,e,i),n.overallReset&&function(t,e,i,n,r){var a=i.overallTask=i.overallTask||Wh({reset:Tu});a.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:t};var o=a.agentStubMap=a.agentStubMap||Q(),s=e.seriesType,l=e.getTargetSeries,h=!0,u=e.modifyOutputEnd;s?n.eachRawSeriesByType(s,c):l?l(n,r).each(c):(h=!1,C(n.getSeries(),c));function c(e){var i=e.uid,n=o.get(i);n||(n=o.set(i,Wh({reset:Cu,onDirty:Au})),a.dirty()),n.context={model:e,overallProgress:h,modifyOutputEnd:u},n.agent=a,n.__block=h,Bu(t,e,n)}var d=t._pipelineMap;o.each(function(t,e){d.get(e)||(t.dispose(),a.dirty(),o.removeKey(e))})}(this,n,r,e,i)},this)},Mu.prepareView=function(t,e,i,n){var r=t.renderTask,a=r.context;a.model=e,a.ecModel=i,a.api=n,r.__block=!t.incrementalPrepareRender,Bu(this,e,r)},Mu.performDataProcessorTasks=function(t,e){Su(this,this._dataProcessorHandlers,t,e,{block:!0})},Mu.performVisualTasks=function(t,e,i){Su(this,this._visualHandlers,t,e,i)},Mu.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e|=t.dataTask.perform()}),this.unfinished|=e},Mu.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})};var Iu=Mu.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)};function Tu(t){t.overallReset(t.ecModel,t.api,t.payload)}function Cu(t,e){return t.overallProgress&&Du}function Du(){this.agent.dirty(),this.getDownstream().dirty()}function Au(){this.agent&&this.agent.dirty()}function ku(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function Pu(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=rr(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?D(e,function(t,e){return Ou(e)}):Lu}var Lu=Ou(0);function Ou(t){return function(e,i){var n=i.data,r=i.resetDefines[t];if(r&&r.dataEach)for(var a=e.start;a<e.end;a++)r.dataEach(n,a);else r&&r.progress&&r.progress(e,n)}}function zu(t){return t.data.count()}function Bu(t,e,i){var n=e.uid,r=t._pipelineMap.get(n);!r.head&&(r.head=i),r.tail&&r.tail.pipe(i),r.tail=i,i.__idxInPipeline=r.count++,i.__pipeline=r}function Eu(t){Ru=null;try{t(Nu,Fu)}catch(t){}return Ru}bu.wrapStageHandler=function(t,e){return z(t)&&(t={overallReset:t,seriesType:Eu(t)}),t.uid=Ns("stageHandler"),e&&(t.visualType=e),t};var Ru,Nu={},Fu={};function Wu(t,e){for(var i in e.prototype)t[i]=J}Wu(Nu,$l),Wu(Fu,th),Nu.eachSeriesByType=Nu.eachRawSeriesByType=function(t){Ru=t},Nu.eachComponent=function(t){"series"===t.mainType&&t.subType&&(Ru=t.subType)};var Vu=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],Hu={color:Vu,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],Vu]},Gu=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],Zu={color:Gu,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:"#eee"},crossStyle:{color:"#eee"}}},legend:{textStyle:{color:"#eee"}},textStyle:{color:"#eee"},title:{textStyle:{color:"#eee"}},toolbox:{iconStyle:{normal:{borderColor:"#eee"}}},dataZoom:{textStyle:{color:"#eee"}},visualMap:{textStyle:{color:"#eee"}},timeline:{lineStyle:{color:"#eee"},itemStyle:{normal:{color:Gu[1]}},label:{normal:{textStyle:{color:"#eee"}}},controlStyle:{normal:{color:"#eee",borderColor:"#eee"}}},timeAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},logAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},valueAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},categoryAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},line:{symbol:"circle"},graph:{color:Gu},gauge:{title:{textStyle:{color:"#eee"}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};Zu.categoryAxis.splitLine.show=!1,Tl.extend({type:"dataset",defaultOption:{seriesLayoutBy:Wl,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){!function(t){var e=t.option.source,i=Nl;if(N(e))i=Fl;else if(O(e)){0===e.length&&(i=Bl);for(var n=0,r=e.length;n<r;n++){var a=e[n];if(null!=a){if(O(a)){i=Bl;break}if(E(a)){i=El;break}}}}else if(E(e)){for(var o in e)if(e.hasOwnProperty(o)&&T(e[o])){i=Rl;break}}else if(null!=e)throw new Error("Invalid data");Gl(t).sourceFormat=i}(this)}}),tu.extend({type:"dataset"});var Xu=Xa.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(t,e){var i=.5522848,n=e.cx,r=e.cy,a=e.rx,o=e.ry,s=a*i,l=o*i;t.moveTo(n-a,r),t.bezierCurveTo(n-a,r-l,n-s,r-o,n,r-o),t.bezierCurveTo(n+s,r-o,n+a,r-l,n+a,r),t.bezierCurveTo(n+a,r+l,n+s,r+o,n,r+o),t.bezierCurveTo(n-s,r+o,n-a,r+l,n-a,r),t.closePath()}}),Yu=/[\s,]+/;function ju(t){B(t)&&(t=(new DOMParser).parseFromString(t,"text/xml"));for(9===t.nodeType&&(t=t.firstChild);"svg"!==t.nodeName.toLowerCase()||1!==t.nodeType;)t=t.nextSibling;return t}function qu(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}qu.prototype.parse=function(t,e){e=e||{};var i=ju(t);if(!i)throw new Error("Illegal svg");var n=new ci;this._root=n;var r=i.getAttribute("viewBox")||"",a=parseFloat(i.getAttribute("width")||e.width),o=parseFloat(i.getAttribute("height")||e.height);isNaN(a)&&(a=null),isNaN(o)&&(o=null),tc(i,n,null,!0);for(var s,l,h=i.firstChild;h;)this._parseNode(h,n),h=h.nextSibling;if(r){var u=j(r).split(Yu);u.length>=4&&(s={x:parseFloat(u[0]||0),y:parseFloat(u[1]||0),width:parseFloat(u[2]),height:parseFloat(u[3])})}if(s&&null!=a&&null!=o&&(l=function(t,e,i){var n=e/t.width,r=i/t.height,a=Math.min(n,r),o=[a,a],s=[-(t.x+t.width/2)*a+e/2,-(t.y+t.height/2)*a+i/2];return{scale:o,position:s}}(s,a,o),!e.ignoreViewBox)){var c=n;(n=new ci).add(c),c.scale=l.scale.slice(),c.position=l.position.slice()}return e.ignoreRootClip||null==a||null==o||n.setClipPath(new Io({shape:{x:0,y:0,width:a,height:o}})),{root:n,width:a,height:o,viewBoxRect:s,viewBoxTransform:l}},qu.prototype._parseNode=function(t,e){var i,n,r=t.nodeName.toLowerCase();if("defs"===r?this._isDefine=!0:"text"===r&&(this._isText=!0),this._isDefine){if(n=$u[r]){var a=n.call(this,t),o=t.getAttribute("id");o&&(this._defs[o]=a)}}else(n=Uu[r])&&(i=n.call(this,t,e),e.add(i));for(var s=t.firstChild;s;)1===s.nodeType&&this._parseNode(s,i),3===s.nodeType&&this._isText&&this._parseText(s,i),s=s.nextSibling;"defs"===r?this._isDefine=!1:"text"===r&&(this._isText=!1)},qu.prototype._parseText=function(t,e){if(1===t.nodeType){var i=t.getAttribute("dx")||0,n=t.getAttribute("dy")||0;this._textX+=parseFloat(i),this._textY+=parseFloat(n)}var r=new ho({style:{text:t.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});Ku(e,r),tc(t,r,this._defs);var a=r.style.fontSize;a&&a<9&&(r.style.fontSize=9,r.scale=r.scale||[1,1],r.scale[0]*=a/9,r.scale[1]*=a/9);var o=r.getBoundingRect();return this._textX+=o.width,e.add(r),r};var Uu={g:function(t,e){var i=new ci;return Ku(e,i),tc(t,i,this._defs),i},rect:function(t,e){var i=new Io;return Ku(e,i),tc(t,i,this._defs),i.setShape({x:parseFloat(t.getAttribute("x")||0),y:parseFloat(t.getAttribute("y")||0),width:parseFloat(t.getAttribute("width")||0),height:parseFloat(t.getAttribute("height")||0)}),i},circle:function(t,e){var i=new co;return Ku(e,i),tc(t,i,this._defs),i.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),r:parseFloat(t.getAttribute("r")||0)}),i},line:function(t,e){var i=new Co;return Ku(e,i),tc(t,i,this._defs),i.setShape({x1:parseFloat(t.getAttribute("x1")||0),y1:parseFloat(t.getAttribute("y1")||0),x2:parseFloat(t.getAttribute("x2")||0),y2:parseFloat(t.getAttribute("y2")||0)}),i},ellipse:function(t,e){var i=new Xu;return Ku(e,i),tc(t,i,this._defs),i.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),rx:parseFloat(t.getAttribute("rx")||0),ry:parseFloat(t.getAttribute("ry")||0)}),i},polygon:function(t,e){var i=t.getAttribute("points");i&&(i=Qu(i));var n=new _o({shape:{points:i||[]}});return Ku(e,n),tc(t,n,this._defs),n},polyline:function(t,e){var i=new Xa;Ku(e,i),tc(t,i,this._defs);var n=t.getAttribute("points");return n&&(n=Qu(n)),new wo({shape:{points:n||[]}})},image:function(t,e){var i=new Ln;return Ku(e,i),tc(t,i,this._defs),i.setStyle({image:t.getAttribute("xlink:href"),x:t.getAttribute("x"),y:t.getAttribute("y"),width:t.getAttribute("width"),height:t.getAttribute("height")}),i},text:function(t,e){var i=t.getAttribute("x")||0,n=t.getAttribute("y")||0,r=t.getAttribute("dx")||0,a=t.getAttribute("dy")||0;this._textX=parseFloat(i)+parseFloat(r),this._textY=parseFloat(n)+parseFloat(a);var o=new ci;return Ku(e,o),tc(t,o,this._defs),o},tspan:function(t,e){var i=t.getAttribute("x"),n=t.getAttribute("y");null!=i&&(this._textX=parseFloat(i)),null!=n&&(this._textY=parseFloat(n));var r=t.getAttribute("dx")||0,a=t.getAttribute("dy")||0,o=new ci;return Ku(e,o),tc(t,o,this._defs),this._textX+=r,this._textY+=a,o},path:function(t,e){var i=lo(t.getAttribute("d")||"");return Ku(e,i),tc(t,i,this._defs),i}},$u={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||0,10),i=parseInt(t.getAttribute("y1")||0,10),n=parseInt(t.getAttribute("x2")||10,10),r=parseInt(t.getAttribute("y2")||0,10),a=new zo(e,i,n,r);return function(t,e){var i=t.firstChild;for(;i;){if(1===i.nodeType){var n=i.getAttribute("offset");n=n.indexOf("%")>0?parseInt(n,10)/100:n?parseFloat(n):0;var r=i.getAttribute("stop-color")||"#000000";e.addColorStop(n,r)}i=i.nextSibling}}(t,a),a},radialgradient:function(t){}};function Ku(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),x(e.__inheritedStyle,t.__inheritedStyle))}function Qu(t){for(var e=j(t).split(Yu),i=[],n=0;n<e.length;n+=2){var r=parseFloat(e[n]),a=parseFloat(e[n+1]);i.push([r,a])}return i}var Ju={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-align":"textAlign","alignment-baseline":"textBaseline"};function tc(t,e,i,n){var r=e.__inheritedStyle||{},a="text"===e.type;if(1===t.nodeType&&(function(t,e){var i=t.getAttribute("transform");if(i){i=i.replace(/,/g," ");var n=null,r=[];i.replace(nc,function(t,e,i){r.push(e,i)});for(var a=r.length-1;a>0;a-=2){var o=r[a],s=r[a-1];switch(n=n||Gt(),s){case"translate":o=j(o).split(Yu),jt(n,n,[parseFloat(o[0]),parseFloat(o[1]||0)]);break;case"scale":o=j(o).split(Yu),Ut(n,n,[parseFloat(o[0]),parseFloat(o[1]||o[0])]);break;case"rotate":o=j(o).split(Yu),qt(n,n,parseFloat(o[0]));break;case"skew":o=j(o).split(Yu),console.warn("Skew transform is not supported yet");break;case"matrix":var o=j(o).split(Yu);n[0]=parseFloat(o[0]),n[1]=parseFloat(o[1]),n[2]=parseFloat(o[2]),n[3]=parseFloat(o[3]),n[4]=parseFloat(o[4]),n[5]=parseFloat(o[5])}}e.setLocalTransform(n)}}(t,e),y(r,function(t){var e=t.getAttribute("style"),i={};if(!e)return i;var n,r={};rc.lastIndex=0;for(;null!=(n=rc.exec(e));)r[n[1]]=n[2];for(var a in Ju)Ju.hasOwnProperty(a)&&null!=r[a]&&(i[Ju[a]]=r[a]);return i}(t)),!n))for(var o in Ju)if(Ju.hasOwnProperty(o)){var s=t.getAttribute(o);null!=s&&(r[Ju[o]]=s)}var l=a?"textFill":"fill",h=a?"textStroke":"stroke";e.style=e.style||new Ci;var u=e.style;null!=r.fill&&u.set(l,ic(r.fill,i)),null!=r.stroke&&u.set(h,ic(r.stroke,i)),C(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(t){var e="lineWidth"===t&&a?"textStrokeWidth":t;null!=r[t]&&u.set(e,parseFloat(r[t]))}),r.textBaseline&&"auto"!==r.textBaseline||(r.textBaseline="alphabetic"),"alphabetic"===r.textBaseline&&(r.textBaseline="bottom"),"start"===r.textAlign&&(r.textAlign="left"),"end"===r.textAlign&&(r.textAlign="right"),C(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],function(t){null!=r[t]&&u.set(t,r[t])}),r.lineDash&&(e.style.lineDash=j(r.lineDash).split(Yu)),u[h]&&"none"!==u[h]&&(e[h]=!0),e.__inheritedStyle=r}var ec=/url\(\s*#(.*?)\)/;function ic(t,e){var i=e&&t&&t.match(ec);return i?e[j(i[1])]:t}var nc=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g;var rc=/([^\s:;]+)\s*:\s*([^:;]+)/g;var ac=Q(),oc={registerMap:function(t,e,i){var n;return O(e)?n=e:e.svg?n=[{type:"svg",source:e.svg,specialAreas:e.specialAreas}]:(e.geoJson&&!e.features&&(i=e.specialAreas,e=e.geoJson),n=[{type:"geoJSON",source:e,specialAreas:i}]),C(n,function(t){var e=t.type;"geoJson"===e&&(e=t.type="geoJSON"),(0,sc[e])(t)}),ac.set(t,n)},retrieveMap:function(t){return ac.get(t)}},sc={geoJSON:function(t){var e=t.source;t.geoJSON=B(e)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")():e},svg:function(t){t.svgXML=ju(t.source)}},lc=Y,hc=C,uc=z,cc=E,dc=Tl.parseClassType,fc=1e3,pc=1e3,gc=3e3,vc={PROCESSOR:{FILTER:fc,STATISTIC:5e3},VISUAL:{LAYOUT:pc,GLOBAL:2e3,CHART:gc,COMPONENT:4e3,BRUSH:5e3}},mc="__flagInMainProcess",yc="__optionUpdated",xc=/^[a-zA-Z0-9_]+$/;function _c(t){return function(e,i,n){e=e&&e.toLowerCase(),Mt.prototype[t].call(this,e,i,n)}}function wc(){Mt.call(this)}function bc(t,e,i){i=i||{},"string"==typeof e&&(e=Yc[e]),this.id,this.group,this._dom=t;var n=this._zr=Kn(t,{renderer:i.renderer||"canvas",devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height});this._throttledZrFlush=gu(P(n.flush,n),17),(e=g(e))&&Sh(e,!0),this._theme=e,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new ih;var r,a,o=this._api=(a=(r=this)._coordSysMgr,y(new th(r),{getCoordinateSystems:P(a.getCoordinateSystems,a),getComponentByElement:function(t){for(;t;){var e=t.__ecComponentInfo;if(null!=e)return r._model.getComponent(e.mainType,e.index);t=t.parent}}}));function s(t,e){return t.__prio-e.__prio}xi(Xc,s),xi(Hc,s),this._scheduler=new bu(this,o,Hc,Xc),Mt.call(this,this._ecEventProcessor=new Fc),this._messageCenter=new wc,this._initEvents(),this.resize=P(this.resize,this),this._pendingActions=[],n.animation.on("frame",this._onframe,this),function(t,e){t.on("rendered",function(){e.trigger("rendered"),!t.animation.isFinished()||e[yc]||e._scheduler.unfinished||e._pendingActions.length||e.trigger("finished")})}(n,this),U(this)}wc.prototype.on=_c("on"),wc.prototype.off=_c("off"),wc.prototype.one=_c("one"),I(wc,Mt);var Mc=bc.prototype;function Sc(t,e,i){var n,r=this._model,a=this._coordSysMgr.getCoordinateSystems();e=pr(r,e);for(var o=0;o<a.length;o++){var s=a[o];if(s[t]&&null!=(n=s[t](r,e,i)))return n}}Mc._onframe=function(){if(!this._disposed){var t=this._scheduler;if(this[yc]){var e=this[yc].silent;this[mc]=!0,Tc(this),Ic.update.call(this),this[mc]=!1,this[yc]=!1,kc.call(this,e),Pc.call(this,e)}else if(t.unfinished){var i=1,n=this._model,r=this._api;t.unfinished=!1;do{var a=+new Date;t.performSeriesTasks(n),t.performDataProcessorTasks(n),Dc(this,n),t.performVisualTasks(n),Bc(this,this._model,r,"remain"),i-=+new Date-a}while(i>0&&t.unfinished);t.unfinished||this._zr.flush()}}},Mc.getDom=function(){return this._dom},Mc.getZr=function(){return this._zr},Mc.setOption=function(t,e,i){var n;if(cc(e)&&(i=e.lazyUpdate,n=e.silent,e=e.notMerge),this[mc]=!0,!this._model||e){var r=new lh(this._api),a=this._theme,o=this._model=new $l(null,null,a,r);o.scheduler=this._scheduler,o.init(null,null,a,r)}this._model.setOption(t,Gc),i?(this[yc]={silent:n},this[mc]=!1):(Tc(this),Ic.update.call(this),this._zr.flush(),this[yc]=!1,this[mc]=!1,kc.call(this,n),Pc.call(this,n))},Mc.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},Mc.getModel=function(){return this._model},Mc.getOption=function(){return this._model&&this._model.getOption()},Mc.getWidth=function(){return this._zr.getWidth()},Mc.getHeight=function(){return this._zr.getHeight()},Mc.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},Mc.getRenderedCanvas=function(t){if(n.canvasSupported)return(t=t||{}).pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor"),this._zr.painter.getRenderedCanvas(t)},Mc.getSvgDataUrl=function(){if(n.svgSupported){var t=this._zr;return C(t.storage.getDisplayList(),function(t){t.stopAnimation(!0)}),t.painter.pathToDataUrl()}},Mc.getDataURL=function(t){var e=(t=t||{}).excludeComponents,i=this._model,n=[],r=this;hc(e,function(t){i.eachComponent({mainType:t},function(t){var e=r._componentsMap[t.__viewId];e.group.ignore||(n.push(e),e.group.ignore=!0)})});var a="svg"===this._zr.painter.getType()?this.getSvgDataUrl():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return hc(n,function(t){t.group.ignore=!1}),a},Mc.getConnectedDataURL=function(t){if(n.canvasSupported){var e=this.group,i=Math.min,r=Math.max;if(Uc[e]){var a=1/0,o=1/0,s=-1/0,l=-1/0,h=[],u=t&&t.pixelRatio||1;C(qc,function(n,u){if(n.group===e){var c=n.getRenderedCanvas(g(t)),d=n.getDom().getBoundingClientRect();a=i(d.left,a),o=i(d.top,o),s=r(d.right,s),l=r(d.bottom,l),h.push({dom:c,left:d.left,top:d.top})}});var c=(s*=u)-(a*=u),d=(l*=u)-(o*=u),f=w();f.width=c,f.height=d;var p=Kn(f);return hc(h,function(t){var e=new Ln({style:{x:t.left*u-a,y:t.top*u-o,image:t.dom}});p.add(e)}),p.refreshImmediately(),f.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}},Mc.convertToPixel=L(Sc,"convertToPixel"),Mc.convertFromPixel=L(Sc,"convertFromPixel"),Mc.containPixel=function(t,e){var i;return C(t=pr(this._model,t),function(t,n){n.indexOf("Models")>=0&&C(t,function(t){var r=t.coordinateSystem;if(r&&r.containPoint)i|=!!r.containPoint(e);else if("seriesModels"===n){var a=this._chartsMap[t.__viewId];a&&a.containPoint&&(i|=a.containPoint(e,t))}},this)},this),!!i},Mc.getVisual=function(t,e){var i=(t=pr(this._model,t,{defaultMainType:"series"})).seriesModel.getData(),n=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?i.indexOfRawIndex(t.dataIndex):null;return null!=n?i.getItemVisual(n,e):i.getVisual(e)},Mc.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},Mc.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var Ic={prepareAndUpdate:function(t){Tc(this),Ic.update.call(this,t)},update:function(t){var e=this._model,i=this._api,r=this._zr,a=this._coordSysMgr,o=this._scheduler;if(e){o.restoreData(e,t),o.performSeriesTasks(e),a.create(e,i),o.performDataProcessorTasks(e,t),Dc(this,e),a.update(e,i),Oc(e),o.performVisualTasks(e,t),zc(this,e,i,t);var s=e.get("backgroundColor")||"transparent";if(n.canvasSupported)r.setBackgroundColor(s);else{var l=Ie(s);s=Oe(l,"rgb"),0===l[3]&&(s="transparent")}Ec(e,i)}},updateTransform:function(t){var e=this._model,i=this,n=this._api;if(e){var r=[];e.eachComponent(function(a,o){var s=i.getViewOfComponentModel(o);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(o,e,n,t);l&&l.update&&r.push(s)}else r.push(s)});var a=Q();e.eachSeries(function(r){var o=i._chartsMap[r.__viewId];if(o.updateTransform){var s=o.updateTransform(r,e,n,t);s&&s.update&&a.set(r.uid,1)}else a.set(r.uid,1)}),Oc(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0,dirtyMap:a}),Bc(i,e,n,t,a),Ec(e,this._api)}},updateView:function(t){var e=this._model;e&&(au.markUpdateMethod(t,"updateView"),Oc(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),zc(this,this._model,this._api,t),Ec(e,this._api))},updateVisual:function(t){Ic.update.call(this,t)},updateLayout:function(t){Ic.update.call(this,t)}};function Tc(t){var e=t._model,i=t._scheduler;i.restorePipelines(e),i.prepareStageTasks(),Lc(t,"component",e,i),Lc(t,"chart",e,i),i.plan()}function Cc(t,e,i,n,r){var a=t._model;if(n){var o={};o[n+"Id"]=i[n+"Id"],o[n+"Index"]=i[n+"Index"],o[n+"Name"]=i[n+"Name"];var s={mainType:n,query:o};r&&(s.subType=r);var l=i.excludeSeriesId;null!=l&&(l=Q(rr(l))),a&&a.eachComponent(s,function(e){l&&null!=l.get(e.id)||h(t["series"===n?"_chartsMap":"_componentsMap"][e.__viewId])},t)}else hc(t._componentsViews.concat(t._chartsViews),h);function h(n){n&&n.__alive&&n[e]&&n[e](n.__model,a,t._api,i)}}function Dc(t,e){var i=t._chartsMap,n=t._scheduler;e.eachSeries(function(t){n.updateStreamModes(t,i[t.__viewId])})}function Ac(t,e){var i=t.type,n=t.escapeConnect,r=Wc[i],a=r.actionInfo,o=(a.update||"update").split(":"),s=o.pop();o=null!=o[0]&&dc(o[0]),this[mc]=!0;var l=[t],h=!1;t.batch&&(h=!0,l=D(t.batch,function(e){return(e=x(y({},e),t)).batch=null,e}));var u,c=[],d="highlight"===i||"downplay"===i;hc(l,function(t){(u=(u=r.action(t,this._model,this._api))||y({},t)).type=a.event||u.type,c.push(u),d?Cc(this,s,t,"series"):o&&Cc(this,s,t,o.main,o.sub)},this),"none"===s||d||o||(this[yc]?(Tc(this),Ic.update.call(this,t),this[yc]=!1):Ic[s].call(this,t)),u=h?{type:a.event||i,escapeConnect:n,batch:c}:c[0],this[mc]=!1,!e&&this._messageCenter.trigger(u.type,u)}function kc(t){for(var e=this._pendingActions;e.length;){var i=e.shift();Ac.call(this,i,t)}}function Pc(t){!t&&this.trigger("updated")}function Lc(t,e,i,n){for(var r="component"===e,a=r?t._componentsViews:t._chartsViews,o=r?t._componentsMap:t._chartsMap,s=t._zr,l=t._api,h=0;h<a.length;h++)a[h].__alive=!1;function u(t){var e="_ec_"+t.id+"_"+t.type,h=o[e];if(!h){var u=dc(t.type);(h=new(r?tu.getClass(u.main,u.sub):au.getClass(u.sub))).init(i,l),o[e]=h,a.push(h),s.add(h.group)}t.__viewId=h.__id=e,h.__alive=!0,h.__model=t,h.group.__ecComponentInfo={mainType:t.mainType,index:t.componentIndex},!r&&n.prepareView(h,t,i,l)}r?i.eachComponent(function(t,e){"series"!==t&&u(e)}):i.eachSeries(u);for(h=0;h<a.length;){var c=a[h];c.__alive?h++:(!r&&c.renderTask.dispose(),s.remove(c.group),c.dispose(i,l),a.splice(h,1),delete o[c.__id],c.__id=c.group.__ecComponentInfo=null)}}function Oc(t){t.clearColorPalette(),t.eachSeries(function(t){t.clearColorPalette()})}function zc(t,e,i,n){!function(t,e,i,n,r){hc(r||t._componentsViews,function(t){var r=t.__model;t.render(r,e,i,n),Nc(r,t)})}(t,e,i,n),hc(t._chartsViews,function(t){t.__alive=!1}),Bc(t,e,i,n),hc(t._chartsViews,function(t){t.__alive||t.remove(e,i)})}function Bc(t,e,i,r,a){var o,s=t._scheduler;e.eachSeries(function(e){var i=t._chartsMap[e.__viewId];i.__alive=!0;var n=i.renderTask;s.updatePayload(n,r),a&&a.get(e.uid)&&n.dirty(),o|=n.perform(s.getPerformArgs(n)),i.group.silent=!!e.get("silent"),Nc(e,i),function(t,e){var i=t.get("blendMode")||null;e.group.traverse(function(t){t.isGroup||t.style.blend!==i&&t.setStyle("blend",i),t.eachPendingDisplayable&&t.eachPendingDisplayable(function(t){t.setStyle("blend",i)})})}(e,i)}),s.unfinished|=o,function(t,e){var i=t.storage,r=0;i.traverse(function(t){t.isGroup||r++}),r>e.get("hoverLayerThreshold")&&!n.node&&i.traverse(function(t){t.isGroup||(t.useHoverLayer=!0)})}(t._zr,e),_u(t._zr.dom,e)}function Ec(t,e){hc(Zc,function(i){i(t,e)})}Mc.resize=function(t){this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var i=e.resetOption("media"),n=t&&t.silent;this[mc]=!0,i&&Tc(this),Ic.update.call(this),this[mc]=!1,kc.call(this,n),Pc.call(this,n)}},Mc.showLoading=function(t,e){if(cc(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),jc[t]){var i=jc[t](this._api,e),n=this._zr;this._loadingFX=i,n.add(i)}},Mc.hideLoading=function(){this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},Mc.makeActionFromEvent=function(t){var e=y({},t);return e.type=Vc[t.type],e},Mc.dispatchAction=function(t,e){cc(e)||(e={silent:!!e}),Wc[t.type]&&this._model&&(this[mc]?this._pendingActions.push(t):(Ac.call(this,t,e.silent),e.flush?this._zr.flush(!0):!1!==e.flush&&n.browser.weChat&&this._throttledZrFlush(),kc.call(this,e.silent),Pc.call(this,e.silent)))},Mc.appendData=function(t){var e=t.seriesIndex;this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0},Mc.on=_c("on"),Mc.off=_c("off"),Mc.one=_c("one");var Rc=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function Nc(t,e){var i=t.get("z"),n=t.get("zlevel");e.group.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=n&&(t.zlevel=n))})}function Fc(){this.eventInfo}Mc._initEvents=function(){hc(Rc,function(t){var e=function(e){var i,n=this.getModel(),r=e.target;if("globalout"===t)i={};else if(r&&null!=r.dataIndex){var a=r.dataModel||n.getSeriesByIndex(r.seriesIndex);i=a&&a.getDataParams(r.dataIndex,r.dataType,r)||{}}else r&&r.eventData&&(i=y({},r.eventData));if(i){var o=i.componentType,s=i.componentIndex;"markLine"!==o&&"markPoint"!==o&&"markArea"!==o||(o="series",s=i.seriesIndex);var l=o&&null!=s&&n.getComponent(o,s),h=l&&this["series"===l.mainType?"_chartsMap":"_componentsMap"][l.__viewId];i.event=e,i.type=t,this._ecEventProcessor.eventInfo={targetEl:r,packedEvent:i,model:l,view:h},this.trigger(t,i)}};e.zrEventfulCallAtLast=!0,this._zr.on(t,e,this)},this),hc(Vc,function(t,e){this._messageCenter.on(e,function(t){this.trigger(e,t)},this)},this)},Mc.isDisposed=function(){return this._disposed},Mc.clear=function(){this.setOption({series:[]},!0)},Mc.dispose=function(){if(!this._disposed){this._disposed=!0,vr(this.getDom(),Qc,"");var t=this._api,e=this._model;hc(this._componentsViews,function(i){i.dispose(e,t)}),hc(this._chartsViews,function(i){i.dispose(e,t)}),this._zr.dispose(),delete qc[this.id]}},I(bc,Mt),Fc.prototype={constructor:Fc,normalizeQuery:function(t){var e={},i={},n={};if(B(t)){var r=dc(t);e.mainType=r.main||null,e.subType=r.sub||null}else{var a=["Index","Name","Id"],o={name:1,dataIndex:1,dataType:1};C(t,function(t,r){for(var s=!1,l=0;l<a.length;l++){var h=a[l],u=r.lastIndexOf(h);if(u>0&&u===r.length-h.length){var c=r.slice(0,u);"data"!==c&&(e.mainType=c,e[h.toLowerCase()]=t,s=!0)}}o.hasOwnProperty(r)&&(i[r]=t,s=!0),s||(n[r]=t)})}return{cptQuery:e,dataQuery:i,otherQuery:n}},filter:function(t,e,i){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,a=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var l=e.cptQuery,h=e.dataQuery;return u(l,o,"mainType")&&u(l,o,"subType")&&u(l,o,"index","componentIndex")&&u(l,o,"name")&&u(l,o,"id")&&u(h,a,"name")&&u(h,a,"dataIndex")&&u(h,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,r,a));function u(t,e,i,n){return null==t[i]||e[n||i]===t[i]}},afterTrigger:function(){this.eventInfo=null}};var Wc={},Vc={},Hc=[],Gc=[],Zc=[],Xc=[],Yc={},jc={},qc={},Uc={},$c=new Date-0,Kc=new Date-0,Qc="_echarts_instance_";function Jc(t){Uc[t]=!1}var td=Jc;function ed(t){return qc[function(t,e){return t.getAttribute?t.getAttribute(e):t[e]}(t,Qc)]}function id(t,e){Yc[t]=e}function nd(t){Gc.push(t)}function rd(t,e){ld(Hc,t,e,fc)}function ad(t,e,i){"function"==typeof e&&(i=e,e="");var n=cc(t)?t.type:[t,t={event:e}][0];t.event=(t.event||n).toLowerCase(),e=t.event,lc(xc.test(n)&&xc.test(e)),Wc[n]||(Wc[n]={action:i,actionInfo:t}),Vc[e]=n}function od(t,e){ld(Xc,t,e,pc,"layout")}function sd(t,e){ld(Xc,t,e,gc,"visual")}function ld(t,e,i,n,r){(uc(e)||cc(e))&&(i=e,e=n);var a=bu.wrapStageHandler(i,r);return a.__prio=e,a.__raw=i,t.push(a),a}function hd(t,e){jc[t]=e}function ud(t){return Tl.extend(t)}function cd(t){return tu.extend(t)}function dd(t){return au.extend(t)}sd(2e3,yu),nd(Sh),rd(5e3,function(t){var e=Q();t.eachSeries(function(t){var i=t.get("stack");if(i){var n=e.get(i)||e.set(i,[]),r=t.getData(),a={stackResultDimension:r.getCalculationInfo("stackResultDimension"),stackedOverDimension:r.getCalculationInfo("stackedOverDimension"),stackedDimension:r.getCalculationInfo("stackedDimension"),stackedByDimension:r.getCalculationInfo("stackedByDimension"),isStackedByIndex:r.getCalculationInfo("isStackedByIndex"),data:r,seriesModel:t};if(!a.stackedDimension||!a.isStackedByIndex&&!a.stackedByDimension)return;n.length&&r.setCalculationInfo("stackedOnSeries",n[n.length-1].seriesModel),n.push(a)}}),e.each(Ih)}),hd("default",function(t,e){x(e=e||{},{text:"loading",color:"#c23531",textColor:"#000",maskColor:"rgba(255, 255, 255, 0.8)",zlevel:0});var i=new Io({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4}),n=new Po({shape:{startAngle:-wu/2,endAngle:-wu/2+.1,r:10},style:{stroke:e.color,lineCap:"round",lineWidth:5},zlevel:e.zlevel,z:10001}),r=new Io({style:{fill:"none",text:e.text,textPosition:"right",textDistance:10,textFill:e.textColor},zlevel:e.zlevel,z:10001});n.animateShape(!0).when(1e3,{endAngle:3*wu/2}).start("circularInOut"),n.animateShape(!0).when(1e3,{startAngle:3*wu/2}).delay(300).start("circularInOut");var a=new ci;return a.add(n),a.add(r),a.add(i),a.resize=function(){var e=t.getWidth()/2,a=t.getHeight()/2;n.setShape({cx:e,cy:a});var o=n.shape.r;r.setShape({x:e-o,y:a-o,width:2*o,height:2*o}),i.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},a.resize(),a}),ad({type:"highlight",event:"highlight",update:"highlight"},J),ad({type:"downplay",event:"downplay",update:"downplay"},J),id("light",Hu),id("dark",Zu);function fd(t){return t}function pd(t,e,i,n,r){this._old=t,this._new=e,this._oldKeyGetter=i||fd,this._newKeyGetter=n||fd,this.context=r}function gd(t,e,i,n,r){for(var a=0;a<t.length;a++){var o="_ec_"+r[n](t[a],a),s=e[o];null==s?(i.push(o),e[o]=a):(s.length||(e[o]=s=[s]),s.push(a))}}pd.prototype={constructor:pd,add:function(t){return this._add=t,this},update:function(t){return this._update=t,this},remove:function(t){return this._remove=t,this},execute:function(){var t=this._old,e=this._new,i={},n=[],r=[];for(gd(t,{},n,"_oldKeyGetter",this),gd(e,i,r,"_newKeyGetter",this),a=0;a<t.length;a++){if(null!=(s=i[o=n[a]]))(h=s.length)?(1===h&&(i[o]=null),s=s.unshift()):i[o]=null,this._update&&this._update(s,a);else this._remove&&this._remove(a)}for(var a=0;a<r.length;a++){var o=r[a];if(i.hasOwnProperty(o)){var s;if(null==(s=i[o]))continue;if(s.length)for(var l=0,h=s.length;l<h;l++)this._add&&this._add(s[l]);else this._add&&this._add(s)}}}};var vd=Q(["tooltip","label","itemName","itemId","seriesName"]);var md=E,yd=-1,xd="e\0\0",_d={float:"undefined"==typeof Float64Array?Array:Float64Array,int:"undefined"==typeof Int32Array?Array:Int32Array,ordinal:Array,number:Array,time:Array},wd="undefined"==typeof Uint32Array?Array:Uint32Array,bd="undefined"==typeof Int32Array?Array:Int32Array,Md="undefined"==typeof Uint16Array?Array:Uint16Array;function Sd(t){return t._rawCount>65535?wd:Md}var Id=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],Td=["_extent","_approximateExtent","_rawExtent"];function Cd(t,e){C(Id.concat(e.__wrappedMethods||[]),function(i){e.hasOwnProperty(i)&&(t[i]=e[i])}),t.__wrappedMethods=e.__wrappedMethods,C(Td,function(i){t[i]=g(e[i])}),t._calculationInfo=y(e._calculationInfo)}var Dd=function(t,e){t=t||["x","y"];for(var i={},n=[],r={},a=0;a<t.length;a++){var o=t[a];B(o)&&(o={name:o});var s=o.name;o.type=o.type||"float",o.coordDim||(o.coordDim=s,o.coordDimIndex=0),o.otherDims=o.otherDims||{},n.push(s),i[s]=o,o.index=a,o.createInvertedIndices&&(r[s]=[])}this.dimensions=n,this._dimensionInfos=i,this.hostModel=e,this.dataType,this._indices=null,this._count=0,this._rawCount=0,this._storage={},this._nameList=[],this._idList=[],this._optionModels=[],this._visual={},this._layout={},this._itemVisuals=[],this.hasItemVisual={},this._itemLayouts=[],this._graphicEls=[],this._chunkSize=1e5,this._chunkCount=0,this._rawData,this._rawExtent={},this._extent={},this._approximateExtent={},this._dimensionsSummary=function(t){var e={},i=e.encode={},n=Q(),r=[],a=[];C(t.dimensions,function(e){var o,s=t.getDimensionInfo(e),l=s.coordDim;if(l){var h=i[l];i.hasOwnProperty(l)||(h=i[l]=[]),h[s.coordDimIndex]=e,s.isExtraCoord||(n.set(l,1),"ordinal"!==(o=s.type)&&"time"!==o&&(r[0]=e)),s.defaultTooltip&&a.push(e)}vd.each(function(t,e){var n=i[e];i.hasOwnProperty(e)||(n=i[e]=[]);var r=s.otherDims[e];null!=r&&!1!==r&&(n[r]=s.name)})});var o=[],s={};n.each(function(t,e){var n=i[e];s[e]=n[0],o=o.concat(n)}),e.dataDimsOnCoord=o,e.encodeFirstDimNotExtra=s;var l=i.label;l&&l.length&&(r=l.slice());var h=i.tooltip;return h&&h.length?a=h.slice():a.length||(a=r.slice()),i.defaultedLabel=r,i.defaultedTooltip=a,e}(this),this._invertedIndicesMap=r,this._calculationInfo={}},Ad=Dd.prototype;function kd(t,e,i,n,r){var a=_d[e.type],o=n-1,s=e.name,l=t[s][o];if(l&&l.length<i){for(var h=new a(Math.min(r-o*i,i)),u=0;u<l.length;u++)h[u]=l[u];t[s][o]=h}for(var c=n*i;c<r;c+=i)t[s].push(new a(Math.min(r-c,i)))}function Pd(t){var e=t._invertedIndicesMap;C(e,function(i,n){var r=t._dimensionInfos[n].ordinalMeta;if(r){i=e[n]=new bd(r.categories.length);for(var a=0;a<i.length;a++)i[a]=yd;for(a=0;a<t._count;a++)i[t.get(n,a)]=a}})}function Ld(t,e,i){var n;if(null!=e){var r=t._chunkSize,a=Math.floor(i/r),o=i%r,s=t.dimensions[e],l=t._storage[s][a];if(l){n=l[o];var h=t._dimensionInfos[s].ordinalMeta;h&&h.categories.length&&(n=h.categories[n])}}return n}function Od(t){return t}function zd(t){return t<this._count&&t>=0?this._indices[t]:-1}function Bd(t,e){var i=t._idList[e];return null==i&&(i=Ld(t,t._idDimIdx,e)),null==i&&(i=xd+e),i}function Ed(t){return O(t)||(t=[t]),t}function Rd(t,e){var i=t.dimensions,n=new Dd(D(i,t.getDimensionInfo,t),t.hostModel);Cd(n,t);for(var r=n._storage={},a=t._storage,o=0;o<i.length;o++){var s=i[o];a[s]&&(M(e,s)>=0?(r[s]=Nd(a[s]),n._rawExtent[s]=Fd(),n._extent[s]=null):r[s]=a[s])}return n}function Nd(t){for(var e,i,n=new Array(t.length),r=0;r<t.length;r++)n[r]=(e=t[r],i=void 0,(i=e.constructor)===Array?e.slice():new i(e));return n}function Fd(){return[1/0,-1/0]}Ad.type="list",Ad.hasItemOption=!0,Ad.getDimension=function(t){return isNaN(t)||(t=this.dimensions[t]||t),t},Ad.getDimensionInfo=function(t){return this._dimensionInfos[this.getDimension(t)]},Ad.getDimensionsOnCoord=function(){return this._dimensionsSummary.dataDimsOnCoord.slice()},Ad.mapDimension=function(t,e){var i=this._dimensionsSummary;if(null==e)return i.encodeFirstDimNotExtra[t];var n=i.encode[t];return!0===e?(n||[]).slice():n&&n[e]},Ad.initData=function(t,e,i){(Hl.isInstance(t)||T(t))&&(t=new Th(t,this.dimensions.length)),this._rawData=t,this._storage={},this._indices=null,this._nameList=e||[],this._idList=[],this._nameRepeatCount={},i||(this.hasItemOption=!1),this.defaultDimValueGetter=zh[this._rawData.getSource().sourceFormat],this._dimValueGetter=i=i||this.defaultDimValueGetter,this._dimValueGetterArrayRows=zh.arrayRows,this._rawExtent={},this._initDataFromProvider(0,t.count()),t.pure&&(this.hasItemOption=!1)},Ad.getProvider=function(){return this._rawData},Ad.appendData=function(t){var e=this._rawData,i=this.count();e.appendData(t);var n=e.count();e.persistent||(n+=i),this._initDataFromProvider(i,n)},Ad.appendValues=function(t,e){for(var i=this._chunkSize,n=this._storage,r=this.dimensions,a=r.length,o=this._rawExtent,s=this.count(),l=s+Math.max(t.length,e?e.length:0),h=this._chunkCount,u=0;u<a;u++){o[m=r[u]]||(o[m]=Fd()),n[m]||(n[m]=[]),kd(n,this._dimensionInfos[m],i,h,l),this._chunkCount=n[m].length}for(var c=new Array(a),d=s;d<l;d++){for(var f=d-s,p=Math.floor(d/i),g=d%i,v=0;v<a;v++){var m=r[v],y=this._dimValueGetterArrayRows(t[f]||c,m,f,v);n[m][p][g]=y;var x=o[m];y<x[0]&&(x[0]=y),y>x[1]&&(x[1]=y)}e&&(this._nameList[d]=e[f])}this._rawCount=this._count=l,this._extent={},Pd(this)},Ad._initDataFromProvider=function(t,e){if(!(t>=e)){for(var i,n=this._chunkSize,r=this._rawData,a=this._storage,o=this.dimensions,s=o.length,l=this._dimensionInfos,h=this._nameList,u=this._idList,c=this._rawExtent,d=this._nameRepeatCount={},f=this._chunkCount,p=0;p<s;p++){c[w=o[p]]||(c[w]=Fd());var g=l[w];0===g.otherDims.itemName&&(i=this._nameDimIdx=p),0===g.otherDims.itemId&&(this._idDimIdx=p),a[w]||(a[w]=[]),kd(a,g,n,f,e),this._chunkCount=a[w].length}for(var v=new Array(s),m=t;m<e;m++){v=r.getItem(m,v);for(var y=Math.floor(m/n),x=m%n,_=0;_<s;_++){var w,b=a[w=o[_]][y],M=this._dimValueGetter(v,w,m,_);b[x]=M;var S=c[w];M<S[0]&&(S[0]=M),M>S[1]&&(S[1]=M)}if(!r.pure){var I=h[m];if(v&&null==I)if(null!=v.name)h[m]=I=v.name;else if(null!=i){var T=o[i],C=a[T][y];if(C){I=C[x];var D=l[T].ordinalMeta;D&&D.categories.length&&(I=D.categories[I])}}var A=null==v?null:v.id;null==A&&null!=I&&(d[I]=d[I]||0,A=I,d[I]>0&&(A+="__ec__"+d[I]),d[I]++),null!=A&&(u[m]=A)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=e,this._extent={},Pd(this)}},Ad.count=function(){return this._count},Ad.getIndices=function(){var t=this._indices;if(t){var e=t.constructor,i=this._count;if(e===Array){r=new e(i);for(var n=0;n<i;n++)r[n]=t[n]}else r=new e(t.buffer,0,i)}else{var r=new(e=Sd(this))(this.count());for(n=0;n<r.length;n++)r[n]=n}return r},Ad.get=function(t,e){if(!(e>=0&&e<this._count))return NaN;var i=this._storage;if(!i[t])return NaN;e=this.getRawIndex(e);var n=Math.floor(e/this._chunkSize),r=e%this._chunkSize;return i[t][n][r]},Ad.getByRawIndex=function(t,e){if(!(e>=0&&e<this._rawCount))return NaN;var i=this._storage[t];if(!i)return NaN;var n=Math.floor(e/this._chunkSize),r=e%this._chunkSize;return i[n][r]},Ad._getFast=function(t,e){var i=Math.floor(e/this._chunkSize),n=e%this._chunkSize;return this._storage[t][i][n]},Ad.getValues=function(t,e){var i=[];O(t)||(e=t,t=this.dimensions);for(var n=0,r=t.length;n<r;n++)i.push(this.get(t[n],e));return i},Ad.hasValue=function(t){for(var e=this._dimensionsSummary.dataDimsOnCoord,i=this._dimensionInfos,n=0,r=e.length;n<r;n++)if("ordinal"!==i[e[n]].type&&isNaN(this.get(e[n],t)))return!1;return!0},Ad.getDataExtent=function(t){t=this.getDimension(t);var e=this._storage[t],i=Fd();if(!e)return i;var n,r=this.count();if(!this._indices)return this._rawExtent[t].slice();if(n=this._extent[t])return n.slice();for(var a=(n=i)[0],o=n[1],s=0;s<r;s++){var l=this._getFast(t,this.getRawIndex(s));l<a&&(a=l),l>o&&(o=l)}return n=[a,o],this._extent[t]=n,n},Ad.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},Ad.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},Ad.getCalculationInfo=function(t){return this._calculationInfo[t]},Ad.setCalculationInfo=function(t,e){md(t)?y(this._calculationInfo,t):this._calculationInfo[t]=e},Ad.getSum=function(t){var e=0;if(this._storage[t])for(var i=0,n=this.count();i<n;i++){var r=this.get(t,i);isNaN(r)||(e+=r)}return e},Ad.getMedian=function(t){var e=[];this.each(t,function(t,i){isNaN(t)||e.push(t)});var i=[].concat(e).sort(function(t,e){return t-e}),n=this.count();return 0===n?0:n%2==1?i[(n-1)/2]:(i[n/2]+i[n/2-1])/2},Ad.rawIndexOf=function(t,e){var i=(t&&this._invertedIndicesMap[t])[e];return null==i||isNaN(i)?yd:i},Ad.indexOfName=function(t){for(var e=0,i=this.count();e<i;e++)if(this.getName(e)===t)return e;return-1},Ad.indexOfRawIndex=function(t){if(!this._indices)return t;if(t>=this._rawCount||t<0)return-1;var e=this._indices,i=e[t];if(null!=i&&i<this._count&&i===t)return t;for(var n=0,r=this._count-1;n<=r;){var a=(n+r)/2|0;if(e[a]<t)n=a+1;else{if(!(e[a]>t))return a;r=a-1}}return-1},Ad.indicesOfNearest=function(t,e,i){var n=[];if(!this._storage[t])return n;null==i&&(i=1/0);for(var r=Number.MAX_VALUE,a=-1,o=0,s=this.count();o<s;o++){var l=e-this.get(t,o),h=Math.abs(l);l<=i&&h<=r&&((h<r||l>=0&&a<0)&&(r=h,a=l,n.length=0),n.push(o))}return n},Ad.getRawIndex=Od,Ad.getRawDataItem=function(t){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(t));for(var e=[],i=0;i<this.dimensions.length;i++){var n=this.dimensions[i];e.push(this.get(n,t))}return e},Ad.getName=function(t){var e=this.getRawIndex(t);return this._nameList[e]||Ld(this,this._nameDimIdx,e)||""},Ad.getId=function(t){return Bd(this,this.getRawIndex(t))},Ad.each=function(t,e,i,n){if(this._count){"function"==typeof t&&(n=i,i=e,e=t,t=[]),i=i||n||this;for(var r=(t=D(Ed(t),this.getDimension,this)).length,a=0;a<this.count();a++)switch(r){case 0:e.call(i,a);break;case 1:e.call(i,this.get(t[0],a),a);break;case 2:e.call(i,this.get(t[0],a),this.get(t[1],a),a);break;default:for(var o=0,s=[];o<r;o++)s[o]=this.get(t[o],a);s[o]=a,e.apply(i,s)}}},Ad.filterSelf=function(t,e,i,n){if(this._count){"function"==typeof t&&(n=i,i=e,e=t,t=[]),i=i||n||this,t=D(Ed(t),this.getDimension,this);for(var r=this.count(),a=new(Sd(this))(r),o=[],s=t.length,l=0,h=t[0],u=0;u<r;u++){var c,d=this.getRawIndex(u);if(0===s)c=e.call(i,u);else if(1===s){var f=this._getFast(h,d);c=e.call(i,f,u)}else{for(var p=0;p<s;p++)o[p]=this._getFast(h,d);o[p]=u,c=e.apply(i,o)}c&&(a[l++]=d)}return l<r&&(this._indices=a),this._count=l,this._extent={},this.getRawIndex=this._indices?zd:Od,this}},Ad.selectRange=function(t){if(this._count){var e=[];for(var i in t)t.hasOwnProperty(i)&&e.push(i);var n=e.length;if(n){var r=this.count(),a=new(Sd(this))(r),o=0,s=e[0],l=t[s][0],h=t[s][1],u=!1;if(!this._indices){var c=0;if(1===n){for(var d=this._storage[e[0]],f=0;f<this._chunkCount;f++)for(var p=d[f],g=Math.min(this._count-f*this._chunkSize,this._chunkSize),v=0;v<g;v++){((w=p[v])>=l&&w<=h||isNaN(w))&&(a[o++]=c),c++}u=!0}else if(2===n){d=this._storage[s];var m=this._storage[e[1]],y=t[e[1]][0],x=t[e[1]][1];for(f=0;f<this._chunkCount;f++){p=d[f];var _=m[f];for(g=Math.min(this._count-f*this._chunkSize,this._chunkSize),v=0;v<g;v++){var w=p[v],b=_[v];(w>=l&&w<=h||isNaN(w))&&(b>=y&&b<=x||isNaN(b))&&(a[o++]=c),c++}}u=!0}}if(!u)if(1===n)for(v=0;v<r;v++){var M=this.getRawIndex(v);((w=this._getFast(s,M))>=l&&w<=h||isNaN(w))&&(a[o++]=M)}else for(v=0;v<r;v++){var S=!0;for(M=this.getRawIndex(v),f=0;f<n;f++){var I=e[f];((w=this._getFast(i,M))<t[I][0]||w>t[I][1])&&(S=!1)}S&&(a[o++]=this.getRawIndex(v))}return o<r&&(this._indices=a),this._count=o,this._extent={},this.getRawIndex=this._indices?zd:Od,this}}},Ad.mapArray=function(t,e,i,n){"function"==typeof t&&(n=i,i=e,e=t,t=[]),i=i||n||this;var r=[];return this.each(t,function(){r.push(e&&e.apply(this,arguments))},i),r},Ad.map=function(t,e,i,n){i=i||n||this;var r=Rd(this,t=D(Ed(t),this.getDimension,this));r._indices=this._indices,r.getRawIndex=r._indices?zd:Od;for(var a=r._storage,o=[],s=this._chunkSize,l=t.length,h=this.count(),u=[],c=r._rawExtent,d=0;d<h;d++){for(var f=0;f<l;f++)u[f]=this.get(t[f],d);u[l]=d;var p=e&&e.apply(i,u);if(null!=p){"object"!=typeof p&&(o[0]=p,p=o);for(var g=this.getRawIndex(d),v=Math.floor(g/s),m=g%s,y=0;y<p.length;y++){var x=t[y],_=p[y],w=c[x],b=a[x];b&&(b[v][m]=_),_<w[0]&&(w[0]=_),_>w[1]&&(w[1]=_)}}}return r},Ad.downSample=function(t,e,i,n){for(var r=Rd(this,[t]),a=r._storage,o=[],s=Math.floor(1/e),l=a[t],h=this.count(),u=this._chunkSize,c=r._rawExtent[t],d=new(Sd(this))(h),f=0,p=0;p<h;p+=s){s>h-p&&(s=h-p,o.length=s);for(var g=0;g<s;g++){var v=this.getRawIndex(p+g),m=Math.floor(v/u),y=v%u;o[g]=l[m][y]}var x=i(o),_=this.getRawIndex(Math.min(p+n(o,x)||0,h-1)),w=_%u;l[Math.floor(_/u)][w]=x,x<c[0]&&(c[0]=x),x>c[1]&&(c[1]=x),d[f++]=_}return r._count=f,r._indices=d,r.getRawIndex=zd,r},Ad.getItemModel=function(t){var e=this.hostModel;return new zs(this.getRawDataItem(t),e,e&&e.ecModel)},Ad.diff=function(t){var e=this;return new pd(t?t.getIndices():[],this.getIndices(),function(e){return Bd(t,e)},function(t){return Bd(e,t)})},Ad.getVisual=function(t){var e=this._visual;return e&&e[t]},Ad.setVisual=function(t,e){if(md(t))for(var i in t)t.hasOwnProperty(i)&&this.setVisual(i,t[i]);else this._visual=this._visual||{},this._visual[t]=e},Ad.setLayout=function(t,e){if(md(t))for(var i in t)t.hasOwnProperty(i)&&this.setLayout(i,t[i]);else this._layout[t]=e},Ad.getLayout=function(t){return this._layout[t]},Ad.getItemLayout=function(t){return this._itemLayouts[t]},Ad.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?y(this._itemLayouts[t]||{},e):e},Ad.clearItemLayouts=function(){this._itemLayouts.length=0},Ad.getItemVisual=function(t,e,i){var n=this._itemVisuals[t],r=n&&n[e];return null!=r||i?r:this.getVisual(e)},Ad.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{},r=this.hasItemVisual;if(this._itemVisuals[t]=n,md(e))for(var a in e)e.hasOwnProperty(a)&&(n[a]=e[a],r[a]=!0);else n[e]=i,r[e]=!0},Ad.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};var Wd=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};function Vd(t,e,i){Hl.isInstance(e)||(e=Hl.seriesDataToSource(e)),i=i||{},t=(t||[]).slice();for(var n=(i.dimsDef||[]).slice(),r=Q(i.encodeDef),a=Q(),o=Q(),s=[],l=function(t,e,i,n){var r=Math.max(t.dimensionsDetectCount||1,e.length,i.length,n||0);return C(e,function(t){var e=t.dimsDef;e&&(r=Math.max(r,e.length))}),r}(e,t,n,i.dimCount),h=0;h<l;h++){var u=n[h]=y({},E(n[h])?n[h]:{name:n[h]}),c=u.name,d=s[h]={otherDims:{}};null!=c&&null==a.get(c)&&(d.name=d.displayName=c,a.set(c,h)),null!=u.type&&(d.type=u.type),null!=u.displayName&&(d.displayName=u.displayName)}r.each(function(t,e){if(1===(t=rr(t).slice()).length&&t[0]<0)r.set(e,!1);else{var i=r.set(e,[]);C(t,function(t,n){B(t)&&(t=a.get(t)),null!=t&&t<l&&(i[n]=t,p(s[t],e,n))})}});var f=0;function p(t,e,i){null!=vd.get(e)?t.otherDims[e]=i:(t.coordDim=e,t.coordDimIndex=i,o.set(e,!0))}C(t,function(t,e){var i,n,a;if(B(t))i=t,t={};else{i=t.name;var o=t.ordinalMeta;t.ordinalMeta=null,(t=g(t)).ordinalMeta=o,n=t.dimsDef,a=t.otherDims,t.name=t.coordDim=t.coordDimIndex=t.dimsDef=t.otherDims=null}if(!1!==(l=r.get(i))){var l;if(!(l=rr(l)).length)for(var h=0;h<(n&&n.length||1);h++){for(;f<s.length&&null!=s[f].coordDim;)f++;f<s.length&&l.push(f++)}C(l,function(e,r){var o=s[e];if(p(x(o,t),i,r),null==o.name&&n){var l=n[r];!E(l)&&(l={name:l}),o.name=o.displayName=l.name,o.defaultTooltip=l.defaultTooltip}a&&x(o.otherDims,a)})}});var v=i.generateCoord,m=i.generateCoordCount,_=null!=m;m=v?m||1:0;for(var w=v||"value",b=0;b<l;b++){null==(d=s[b]=s[b]||{}).coordDim&&(d.coordDim=Hd(w,o,_),d.coordDimIndex=0,(!v||m<=0)&&(d.isExtraCoord=!0),m--),null==d.name&&(d.name=Hd(d.coordDim,a)),null==d.type&&jl(e,b,d.name)&&(d.type="ordinal")}return s}function Hd(t,e,i){if(i||null!=e.get(t)){for(var n=0;null!=e.get(t+n);)n++;t+=n}return e.set(t,!0),t}Ad.setItemGraphicEl=function(t,e){var i=this.hostModel;e&&(e.dataIndex=t,e.dataType=this.dataType,e.seriesIndex=i&&i.seriesIndex,"group"===e.type&&e.traverse(Wd,e)),this._graphicEls[t]=e},Ad.getItemGraphicEl=function(t){return this._graphicEls[t]},Ad.eachItemGraphicEl=function(t,e){C(this._graphicEls,function(i,n){i&&t&&t.call(e,i,n)})},Ad.cloneShallow=function(t){if(!t){var e=D(this.dimensions,this.getDimensionInfo,this);t=new Dd(e,this.hostModel)}if(t._storage=this._storage,Cd(t,this),this._indices){var i=this._indices.constructor;t._indices=new i(this._indices)}else t._indices=null;return t.getRawIndex=t._indices?zd:Od,t},Ad.wrapMethod=function(t,e){var i=this[t];"function"==typeof i&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=i.apply(this,arguments);return e.apply(this,[t].concat(Z(arguments)))})},Ad.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],Ad.CHANGABLE_METHODS=["filterSelf","selectRange"];var Gd=function(t,e){return Vd((e=e||{}).coordDimensions||[],t,{dimsDef:e.dimensionsDefine||t.dimensionsDefine,encodeDef:e.encodeDefine||t.encodeDefine,dimCount:e.dimensionsCount,generateCoord:e.generateCoord,generateCoordCount:e.generateCoordCount})};function Zd(t,e,i){var n,r,a,o,s=(i=i||{}).byIndex,l=i.stackedCoordDimension,h=!(!t||!t.get("stack"));if(C(e,function(t,i){B(t)&&(e[i]=t={name:t}),h&&!t.isExtraCoord&&(s||n||!t.ordinalMeta||(n=t),r||"ordinal"===t.type||"time"===t.type||l&&l!==t.coordDim||(r=t))}),!r||s||n||(s=!0),r){a="__\0ecstackresult",o="__\0ecstackedover",n&&(n.createInvertedIndices=!0);var u=r.coordDim,c=r.type,d=0;C(e,function(t){t.coordDim===u&&d++}),e.push({name:a,coordDim:u,coordDimIndex:d,type:c,isExtraCoord:!0,isCalculationCoord:!0}),d++,e.push({name:o,coordDim:o,coordDimIndex:d,type:c,isExtraCoord:!0,isCalculationCoord:!0})}return{stackedDimension:r&&r.name,stackedByDimension:n&&n.name,isStackedByIndex:s,stackedOverDimension:o,stackResultDimension:a}}function Xd(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function Yd(t,e){return Xd(t,e)?t.getCalculationInfo("stackResultDimension"):e}function jd(t,e,i){i=i||{},Hl.isInstance(t)||(t=Hl.seriesDataToSource(t));var n,r=e.get("coordinateSystem"),a=ih.get(r),o=Pl(e);o&&(n=D(o.coordSysDims,function(t){var e={name:t},i=o.axisMap.get(t);if(i){var n=i.get("type");e.type=function(t){return"category"===t?"ordinal":"time"===t?"time":"float"}(n)}return e})),n||(n=a&&(a.getDimensionsInfo?a.getDimensionsInfo():a.dimensions.slice())||["x","y"]);var s,l,h=Gd(t,{coordDimensions:n,generateCoord:i.generateCoord});o&&C(h,function(t,e){var i=t.coordDim,n=o.categoryAxisMap.get(i);n&&(null==s&&(s=e),t.ordinalMeta=n.getOrdinalMeta()),null!=t.otherDims.itemName&&(l=!0)}),l||null==s||(h[s].otherDims.itemName=0);var u=Zd(e,h),c=new Dd(h,e);c.setCalculationInfo(u);var d=null!=s&&function(t){if(t.sourceFormat===zl){var e=function(t){var e=0;for(;e<t.length&&null==t[e];)e++;return t[e]}(t.data||[]);return null!=e&&!O(sr(e))}}(t)?function(t,e,i,n){return n===s?i:this.defaultDimValueGetter(t,e,i,n)}:null;return c.hasItemOption=!1,c.initData(t,null,d),c}function qd(t){this._setting=t||{},this._extent=[1/0,-1/0],this._interval=0,this.init&&this.init.apply(this,arguments)}function Ud(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this._map}qd.prototype.parse=function(t){return t},qd.prototype.getSetting=function(t){return this._setting[t]},qd.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},qd.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},qd.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},qd.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},qd.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},qd.prototype.getExtent=function(){return this._extent.slice()},qd.prototype.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},qd.prototype.isBlank=function(){return this._isBlank},qd.prototype.setBlank=function(t){this._isBlank=t},qd.prototype.getLabel=null,wr(qd),Tr(qd,{registerWhenExtend:!0}),Ud.createByAxisModel=function(t){var e=t.option,i=e.data,n=i&&D(i,Qd);return new Ud({categories:n,needCollect:!n,deduplication:!1!==e.dedplication})};var $d=Ud.prototype;function Kd(t){return t._map||(t._map=Q(t.categories))}function Qd(t){return E(t)&&null!=t.value?t.value:t+""}$d.getOrdinal=function(t){return Kd(this).get(t)},$d.parseAndCollect=function(t){var e,i=this._needCollect;if("string"!=typeof t&&!i)return t;if(i&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var n=Kd(this);return null==(e=n.get(t))&&(i?(e=this.categories.length,this.categories[e]=t,n.set(t,e)):e=NaN),e};var Jd=qd.prototype,tf=qd.extend({type:"ordinal",init:function(t,e){t&&!O(t)||(t=new Ud({categories:t})),this._ordinalMeta=t,this._extent=e||[0,t.categories.length-1]},parse:function(t){return"string"==typeof t?this._ordinalMeta.getOrdinal(t):Math.round(t)},contain:function(t){return t=this.parse(t),Jd.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return Jd.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(Jd.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,i=e[0];i<=e[1];)t.push(i),i++;return t},getLabel:function(t){if(!this.isBlank())return this._ordinalMeta.categories[t]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},getOrdinalMeta:function(){return this._ordinalMeta},niceTicks:J,niceExtent:J});tf.create=function(){return new tf};var ef=Hs;function nf(t){return Zs(t)+2}function rf(t,e,i){t[e]=Math.max(Math.min(t[e],i[1]),i[0])}function af(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),rf(t,0,e),rf(t,1,e),t[0]>t[1]&&(t[0]=t[1])}var of=Hs,sf=qd.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(t,e){var i=this._extent;isNaN(t)||(i[0]=parseFloat(t)),isNaN(e)||(i[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]),sf.prototype.setExtent.call(this,e[0],e[1])},getInterval:function(){return this._interval},setInterval:function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=nf(t)},getTicks:function(){return function(t,e,i,n){var r=[];if(!t)return r;e[0]<i[0]&&r.push(e[0]);for(var a=i[0];a<=i[1]&&(r.push(a),(a=ef(a+t,n))!==r[r.length-1]);)if(r.length>1e4)return[];return e[1]>(r.length?r[r.length-1]:i[1])&&r.push(e[1]),r}(this._interval,this._extent,this._niceExtent,this._intervalPrecision)},getLabel:function(t,e){if(null==t)return"";var i=e&&e.precision;return null==i?i=Zs(t)||0:"auto"===i&&(i=this._intervalPrecision),tl(t=of(t,i,!0))},niceTicks:function(t,e,i){t=t||5;var n=this._extent,r=n[1]-n[0];if(isFinite(r)){r<0&&(r=-r,n.reverse());var a=function(t,e,i,n){var r={},a=t[1]-t[0],o=r.interval=Qs(a/e,!0);null!=i&&o<i&&(o=r.interval=i),null!=n&&o>n&&(o=r.interval=n);var s=r.intervalPrecision=nf(o);return af(r.niceTickExtent=[ef(Math.ceil(t[0]/o)*o,s),ef(Math.floor(t[1]/o)*o,s)],t),r}(n,t,e,i);this._intervalPrecision=a.intervalPrecision,this._interval=a.interval,this._niceExtent=a.niceTickExtent}},niceExtent:function(t){var e=this._extent;if(e[0]===e[1])if(0!==e[0]){var i=e[0];t.fixMax?e[0]-=i/2:(e[1]+=i/2,e[0]-=i/2)}else e[1]=1;var n=e[1]-e[0];isFinite(n)||(e[0]=0,e[1]=1),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var r=this._interval;t.fixMin||(e[0]=of(Math.floor(e[0]/r)*r)),t.fixMax||(e[1]=of(Math.ceil(e[1]/r)*r))}});sf.create=function(){return new sf};var lf="__ec_stack_",hf="undefined"!=typeof Float32Array?Float32Array:Array;function uf(t){return t.get("stack")||lf+t.seriesIndex}function cf(t){return t.dim+t.index}function df(t,e){var i=[];return e.eachSeriesByType(t,function(t){vf(t)&&!mf(t)&&i.push(t)}),i}function ff(t){var e=[];return C(t,function(t){var i=t.getData(),n=t.coordinateSystem.getBaseAxis(),r=n.getExtent(),a="category"===n.type?n.getBandWidth():Math.abs(r[1]-r[0])/i.count(),o=Vs(t.get("barWidth"),a),s=Vs(t.get("barMaxWidth"),a),l=t.get("barGap"),h=t.get("barCategoryGap");e.push({bandWidth:a,barWidth:o,barMaxWidth:s,barGap:l,barCategoryGap:h,axisKey:cf(n),stackId:uf(t)})}),function(t){var e={};C(t,function(t,i){var n=t.axisKey,r=t.bandWidth,a=e[n]||{bandWidth:r,remainedWidth:r,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},o=a.stacks;e[n]=a;var s=t.stackId;o[s]||a.autoWidthCount++,o[s]=o[s]||{width:0,maxWidth:0};var l=t.barWidth;l&&!o[s].width&&(o[s].width=l,l=Math.min(a.remainedWidth,l),a.remainedWidth-=l);var h=t.barMaxWidth;h&&(o[s].maxWidth=h);var u=t.barGap;null!=u&&(a.gap=u);var c=t.barCategoryGap;null!=c&&(a.categoryGap=c)});var i={};return C(e,function(t,e){i[e]={};var n=t.stacks,r=t.bandWidth,a=Vs(t.categoryGap,r),o=Vs(t.gap,1),s=t.remainedWidth,l=t.autoWidthCount,h=(s-a)/(l+(l-1)*o);h=Math.max(h,0),C(n,function(t,e){var i=t.maxWidth;i&&i<h&&(i=Math.min(i,s),t.width&&(i=Math.min(i,t.width)),s-=i,t.width=i,l--)}),h=(s-a)/(l+(l-1)*o),h=Math.max(h,0);var u,c=0;C(n,function(t,e){t.width||(t.width=h),u=t,c+=t.width*(1+o)}),u&&(c-=u.width*o);var d=-c/2;C(n,function(t,n){i[e][n]=i[e][n]||{offset:d,width:t.width},d+=t.width*(1+o)})}),i}(e)}function pf(t,e,i){if(t&&e){var n=t[cf(e)];return null!=n&&null!=i&&(n=n[uf(i)]),n}}var gf={seriesType:"bar",plan:iu(),reset:function(t){if(vf(t)&&mf(t)){var e=t.getData(),i=t.coordinateSystem,n=i.getBaseAxis(),r=i.getOtherAxis(n),a=e.mapDimension(r.dim),o=e.mapDimension(n.dim),s=r.isHorizontal(),l=s?0:1,h=pf(ff([t]),n,t).width;return h>.5||(h=.5),{progress:function(t,e){var u,c=new hf(2*t.count),d=[],f=[],p=0;for(;null!=(u=t.next());)f[l]=e.get(a,u),f[1-l]=e.get(o,u),d=i.dataToPoint(f,null,d),c[p++]=d[0],c[p++]=d[1];e.setLayout({largePoints:c,barWidth:h,valueAxisStart:yf(n,r,!1),valueAxisHorizontal:s})}}}}};function vf(t){return t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}function mf(t){return t.pipelineContext&&t.pipelineContext.large}function yf(t,e,i){var n,r,a=e.getGlobalExtent();a[0]>a[1]?(n=a[1],r=a[0]):(n=a[0],r=a[1]);var o=e.toGlobalCoord(e.dataToCoord(0));return o<n&&(o=n),o>r&&(o=r),o}var xf=sf.prototype,_f=Math.ceil,wf=Math.floor,bf=sf.extend({type:"time",getLabel:function(t){var e=this._stepLvl,i=new Date(t);return cl(e[0],i,this.getSetting("useUTC"))},niceExtent:function(t){var e=this._extent;if(e[0]===e[1]&&(e[0]-=864e5,e[1]+=864e5),e[1]===-1/0&&e[0]===1/0){var i=new Date;e[1]=+new Date(i.getFullYear(),i.getMonth(),i.getDate()),e[0]=e[1]-864e5}this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var n=this._interval;t.fixMin||(e[0]=Hs(wf(e[0]/n)*n)),t.fixMax||(e[1]=Hs(_f(e[1]/n)*n))},niceTicks:function(t,e,i){t=t||10;var n=this._extent,r=n[1]-n[0],a=r/t;null!=e&&a<e&&(a=e),null!=i&&a>i&&(a=i);var o=Mf.length,s=function(t,e,i,n){for(;i<n;){var r=i+n>>>1;t[r][1]<e?i=r+1:n=r}return i}(Mf,a,0,o),l=Mf[Math.min(s,o-1)],h=l[1];"year"===l[0]&&(h*=Qs(r/h/t,!0));var u=this.getSetting("useUTC")?0:60*new Date(+n[0]||+n[1]).getTimezoneOffset()*1e3,c=[Math.round(_f((n[0]-u)/h)*h+u),Math.round(wf((n[1]-u)/h)*h+u)];af(c,n),this._stepLvl=l,this._interval=h,this._niceExtent=c},parse:function(t){return+Us(t)}});C(["contain","normalize"],function(t){bf.prototype[t]=function(e){return xf[t].call(this,this.parse(e))}});var Mf=[["hh:mm:ss",1e3],["hh:mm:ss",5e3],["hh:mm:ss",1e4],["hh:mm:ss",15e3],["hh:mm:ss",3e4],["hh:mm\nMM-dd",6e4],["hh:mm\nMM-dd",3e5],["hh:mm\nMM-dd",6e5],["hh:mm\nMM-dd",9e5],["hh:mm\nMM-dd",18e5],["hh:mm\nMM-dd",36e5],["hh:mm\nMM-dd",72e5],["hh:mm\nMM-dd",216e5],["hh:mm\nMM-dd",432e5],["MM-dd\nyyyy",864e5],["MM-dd\nyyyy",1728e5],["MM-dd\nyyyy",2592e5],["MM-dd\nyyyy",3456e5],["MM-dd\nyyyy",432e6],["MM-dd\nyyyy",5184e5],["week",6048e5],["MM-dd\nyyyy",864e6],["week",12096e5],["week",18144e5],["month",26784e5],["week",36288e5],["month",53568e5],["week",6048e6],["quarter",8208e6],["month",107136e5],["month",13392e6],["half-year",16416e6],["month",214272e5],["month",26784e6],["year",32832e6]];bf.create=function(t){return new bf({useUTC:t.ecModel.get("useUTC")})};var Sf=qd.prototype,If=sf.prototype,Tf=Zs,Cf=Hs,Df=Math.floor,Af=Math.ceil,kf=Math.pow,Pf=Math.log,Lf=qd.extend({type:"log",base:10,$constructor:function(){qd.apply(this,arguments),this._originalScale=new sf},getTicks:function(){var t=this._originalScale,e=this._extent,i=t.getExtent();return D(If.getTicks.call(this),function(n){var r=Hs(kf(this.base,n));return r=n===e[0]&&t.__fixMin?Of(r,i[0]):r,r=n===e[1]&&t.__fixMax?Of(r,i[1]):r},this)},getLabel:If.getLabel,scale:function(t){return t=Sf.scale.call(this,t),kf(this.base,t)},setExtent:function(t,e){var i=this.base;t=Pf(t)/Pf(i),e=Pf(e)/Pf(i),If.setExtent.call(this,t,e)},getExtent:function(){var t=this.base,e=Sf.getExtent.call(this);e[0]=kf(t,e[0]),e[1]=kf(t,e[1]);var i=this._originalScale,n=i.getExtent();return i.__fixMin&&(e[0]=Of(e[0],n[0])),i.__fixMax&&(e[1]=Of(e[1],n[1])),e},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=Pf(t[0])/Pf(e),t[1]=Pf(t[1])/Pf(e),Sf.unionExtent.call(this,t)},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},niceTicks:function(t){t=t||10;var e=this._extent,i=e[1]-e[0];if(!(i===1/0||i<=0)){var n=$s(i);for(t/i*n<=.5&&(n*=10);!isNaN(n)&&Math.abs(n)<1&&Math.abs(n)>0;)n*=10;var r=[Hs(Af(e[0]/n)*n),Hs(Df(e[1]/n)*n)];this._interval=n,this._niceExtent=r}},niceExtent:function(t){If.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});function Of(t,e){return Cf(t,Tf(e))}function zf(t,e){var i,n,r,a=t.type,o=e.getMin(),s=e.getMax(),l=null!=o,h=null!=s,u=t.getExtent();"ordinal"===a?i=e.getCategories().length:(O(n=e.get("boundaryGap"))||(n=[n||0,n||0]),"boolean"==typeof n[0]&&(n=[0,0]),n[0]=Vs(n[0],1),n[1]=Vs(n[1],1),r=u[1]-u[0]||Math.abs(u[0])),null==o&&(o="ordinal"===a?i?0:NaN:u[0]-n[0]*r),null==s&&(s="ordinal"===a?i?i-1:NaN:u[1]+n[1]*r),"dataMin"===o?o=u[0]:"function"==typeof o&&(o=o({min:u[0],max:u[1]})),"dataMax"===s?s=u[1]:"function"==typeof s&&(s=s({min:u[0],max:u[1]})),(null==o||!isFinite(o))&&(o=NaN),(null==s||!isFinite(s))&&(s=NaN),t.setBlank(W(o)||W(s)||"ordinal"===a&&!t.getOrdinalMeta().categories.length),e.getNeedCrossZero()&&(o>0&&s>0&&!l&&(o=0),o<0&&s<0&&!h&&(s=0));var c=e.ecModel;if(c&&"time"===a){var d,f=df("bar",c);if(C(f,function(t){d|=t.getBaseAxis()===e.axis}),d){var p=ff(f),g=function(t,e,i,n){var r=i.axis.getExtent(),a=r[1]-r[0],o=pf(n,i.axis);if(void 0===o)return{min:t,max:e};var s=1/0;C(o,function(t){s=Math.min(t.offset,s)});var l=-1/0;C(o,function(t){l=Math.max(t.offset+t.width,l)}),s=Math.abs(s),l=Math.abs(l);var h=s+l,u=e-t,c=u/(1-(s+l)/a)-u;return{min:t-=c*(s/h),max:e+=c*(l/h)}}(o,s,e,p);o=g.min,s=g.max}}return[o,s]}function Bf(t,e){var i=zf(t,e),n=null!=e.getMin(),r=null!=e.getMax(),a=e.get("splitNumber");"log"===t.type&&(t.base=e.get("logBase"));var o=t.type;t.setExtent(i[0],i[1]),t.niceExtent({splitNumber:a,fixMin:n,fixMax:r,minInterval:"interval"===o||"time"===o?e.get("minInterval"):null,maxInterval:"interval"===o||"time"===o?e.get("maxInterval"):null});var s=e.get("interval");null!=s&&t.setInterval&&t.setInterval(s)}function Ef(t,e){if(e=e||t.get("type"))switch(e){case"category":return new tf(t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),[1/0,-1/0]);case"value":return new sf;default:return(qd.getClass(e)||sf).create(t)}}function Rf(t){var e,i=t.getLabelModel().get("formatter"),n="category"===t.type?t.scale.getExtent()[0]:null;return"string"==typeof i?(e=i,i=function(i){return i=t.scale.getLabel(i),e.replace("{value}",null!=i?i:"")}):"function"==typeof i?function(e,r){return null!=n&&(r=e-n),i(Nf(t,e),r)}:function(e){return t.scale.getLabel(e)}}function Nf(t,e){return"category"===t.type?t.scale.getLabel(e):e}function Ff(t){var e=t.get("interval");return null==e?"auto":e}function Wf(t){return"category"===t.type&&0===Ff(t.getLabelModel())}C(["contain","normalize"],function(t){Lf.prototype[t]=function(e){return e=Pf(e)/Pf(this.base),Sf[t].call(this,e)}}),Lf.create=function(){return new Lf};var Vf={getMin:function(t){var e=this.option,i=t||null==e.rangeStart?e.min:e.rangeStart;return this.axis&&null!=i&&"dataMin"!==i&&"function"!=typeof i&&!W(i)&&(i=this.axis.scale.parse(i)),i},getMax:function(t){var e=this.option,i=t||null==e.rangeEnd?e.max:e.rangeEnd;return this.axis&&null!=i&&"dataMax"!==i&&"function"!=typeof i&&!W(i)&&(i=this.axis.scale.parse(i)),i},getNeedCrossZero:function(){var t=this.option;return null==t.rangeStart&&null==t.rangeEnd&&!t.scale},getCoordSysModel:J,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},Hf=Go({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,r=e.width/2,a=e.height/2;t.moveTo(i,n-a),t.lineTo(i+r,n+a),t.lineTo(i-r,n+a),t.closePath()}}),Gf=Go({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,r=e.width/2,a=e.height/2;t.moveTo(i,n-a),t.lineTo(i+r,n),t.lineTo(i,n+a),t.lineTo(i-r,n),t.closePath()}}),Zf=Go({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.x,n=e.y,r=e.width/5*3,a=Math.max(r,e.height),o=r/2,s=o*o/(a-o),l=n-a+o+s,h=Math.asin(s/o),u=Math.cos(h)*o,c=Math.sin(h),d=Math.cos(h),f=.6*o,p=.7*o;t.moveTo(i-u,l+s),t.arc(i,l,o,Math.PI-h,2*Math.PI+h),t.bezierCurveTo(i+u-c*f,l+s+d*f,i,n-p,i,n),t.bezierCurveTo(i,n-p,i-u+c*f,l+s+d*f,i-u,l+s),t.closePath()}}),Xf=Go({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.height,n=e.width,r=e.x,a=e.y,o=n/3*2;t.moveTo(r,a),t.lineTo(r+o,a+i),t.lineTo(r,a+i/4*3),t.lineTo(r-o,a+i),t.lineTo(r,a),t.closePath()}}),Yf={line:function(t,e,i,n,r){r.x1=t,r.y1=e+n/2,r.x2=t+i,r.y2=e+n/2},rect:function(t,e,i,n,r){r.x=t,r.y=e,r.width=i,r.height=n},roundRect:function(t,e,i,n,r){r.x=t,r.y=e,r.width=i,r.height=n,r.r=Math.min(i,n)/4},square:function(t,e,i,n,r){var a=Math.min(i,n);r.x=t,r.y=e,r.width=a,r.height=a},circle:function(t,e,i,n,r){r.cx=t+i/2,r.cy=e+n/2,r.r=Math.min(i,n)/2},diamond:function(t,e,i,n,r){r.cx=t+i/2,r.cy=e+n/2,r.width=i,r.height=n},pin:function(t,e,i,n,r){r.x=t+i/2,r.y=e+n/2,r.width=i,r.height=n},arrow:function(t,e,i,n,r){r.x=t+i/2,r.y=e+n/2,r.width=i,r.height=n},triangle:function(t,e,i,n,r){r.cx=t+i/2,r.cy=e+n/2,r.width=i,r.height=n}},jf={};C({line:Co,rect:Io,roundRect:Io,square:Io,circle:co,diamond:Gf,pin:Zf,arrow:Xf,triangle:Hf},function(t,e){jf[e]=new t});var qf=Go({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},beforeBrush:function(){var t=this.style;"pin"===this.shape.symbolType&&"inside"===t.textPosition&&(t.textPosition=["50%","40%"],t.textAlign="center",t.textVerticalAlign="middle")},buildPath:function(t,e,i){var n=e.symbolType,r=jf[n];"none"!==e.symbolType&&(r||(r=jf[n="rect"]),Yf[n](e.x,e.y,e.width,e.height,r.shape),r.buildPath(t,r.shape,i))}});function Uf(t,e){if("image"!==this.type){var i=this.style,n=this.shape;n&&"line"===n.symbolType?i.stroke=t:this.__isEmptyBrush?(i.stroke=t,i.fill=e||"#fff"):(i.fill&&(i.fill=t),i.stroke&&(i.stroke=t)),this.dirty(!1)}}function $f(t,e,i,n,r,a,o){var s,l=0===t.indexOf("empty");return l&&(t=t.substr(5,1).toLowerCase()+t.substr(6)),(s=0===t.indexOf("image://")?Xo(t.slice(8),new ui(e,i,n,r),o?"center":"cover"):0===t.indexOf("path://")?Zo(t.slice(7),{},new ui(e,i,n,r),o?"center":"cover"):new qf({shape:{symbolType:t,x:e,y:i,width:n,height:r}})).__isEmptyBrush=l,s.setColor=Uf,s.setColor(a),s}var Kf={isDimensionStacked:Xd,enableDataStack:Zd,getStackedDimension:Yd};var Qf=(Object.freeze||Object)({createList:function(t){return jd(t.getSource(),t)},getLayoutRect:_l,dataStack:Kf,createScale:function(t,e){var i=e;zs.isInstance(e)||I(i=new zs(e),Vf);var n=Ef(i);return n.setExtent(t[0],t[1]),Bf(n,i),n},mixinAxisModelCommonMethods:function(t){I(t,Vf)},completeDimensions:Vd,createDimensions:Gd,createSymbol:$f}),Jf=1e-8;function tp(t,e){return Math.abs(t-e)<Jf}function ep(t,e,i){var n=0,r=t[0];if(!r)return!1;for(var a=1;a<t.length;a++){var o=t[a];n+=La(r[0],r[1],o[0],o[1],e,i),r=o}var s=t[0];return tp(r[0],s[0])&&tp(r[1],s[1])||(n+=La(r[0],r[1],s[0],s[1],e,i)),0!==n}function ip(t,e,i){if(this.name=t,this.geometries=e,i)i=[i[0],i[1]];else{var n=this.getBoundingRect();i=[n.x+n.width/2,n.y+n.height/2]}this.center=i}function np(t,e,i){for(var n=[],r=e[0],a=e[1],o=0;o<t.length;o+=2){var s=t.charCodeAt(o)-64,l=t.charCodeAt(o+1)-64;s=s>>1^-(1&s),l=l>>1^-(1&l),r=s+=r,a=l+=a,n.push([s/i,l/i])}return n}ip.prototype={constructor:ip,properties:null,getBoundingRect:function(){var t=this._rect;if(t)return t;for(var e=Number.MAX_VALUE,i=[e,e],n=[-e,-e],r=[],a=[],o=this.geometries,s=0;s<o.length;s++){if("polygon"===o[s].type)aa(o[s].exterior,r,a),mt(i,i,r),yt(n,n,a)}return 0===s&&(i[0]=i[1]=n[0]=n[1]=0),this._rect=new ui(i[0],i[1],n[0]-i[0],n[1]-i[1])},contain:function(t){var e=this.getBoundingRect(),i=this.geometries;if(!e.contain(t[0],t[1]))return!1;t:for(var n=0,r=i.length;n<r;n++)if("polygon"===i[n].type){var a=i[n].exterior,o=i[n].interiors;if(ep(a,t[0],t[1])){for(var s=0;s<(o?o.length:0);s++)if(ep(o[s]))continue t;return!0}}return!1},transformTo:function(t,e,i,n){var r=this.getBoundingRect(),a=r.width/r.height;i?n||(n=i/a):i=a*n;for(var o=new ui(t,e,i,n),s=r.calculateTransform(o),l=this.geometries,h=0;h<l.length;h++)if("polygon"===l[h].type){for(var u=l[h].exterior,c=l[h].interiors,d=0;d<u.length;d++)vt(u[d],u[d],s);for(var f=0;f<(c?c.length:0);f++)for(d=0;d<c[f].length;d++)vt(c[f][d],c[f][d],s)}(r=this._rect).copy(o),this.center=[r.x+r.width/2,r.y+r.height/2]},cloneShallow:function(t){null==t&&(t=this.name);var e=new ip(t,this.geometries,this.center);return e._rect=this._rect,e.transformTo=null,e}};var rp=function(t){return function(t){if(!t.UTF8Encoding)return t;var e=t.UTF8Scale;null==e&&(e=1024);for(var i=t.features,n=0;n<i.length;n++)for(var r=i[n].geometry,a=r.coordinates,o=r.encodeOffsets,s=0;s<a.length;s++){var l=a[s];if("Polygon"===r.type)a[s]=np(l,o[s],e);else if("MultiPolygon"===r.type)for(var h=0;h<l.length;h++){var u=l[h];l[h]=np(u,o[s][h],e)}}t.UTF8Encoding=!1}(t),D(k(t.features,function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0}),function(t){var e=t.properties,i=t.geometry,n=i.coordinates,r=[];"Polygon"===i.type&&r.push({type:"polygon",exterior:n[0],interiors:n.slice(1)}),"MultiPolygon"===i.type&&C(n,function(t){t[0]&&r.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})});var a=new ip(e.name,r,e.cp);return a.properties=e,a})},ap=dr();function op(t){return"category"===t.type?function(t){var e=t.getLabelModel(),i=lp(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:i.labelCategoryInterval}:i}(t):function(t){var e=t.scale.getTicks(),i=Rf(t);return{labels:D(e,function(e,n){return{formattedLabel:i(e,n),rawLabel:t.scale.getLabel(e),tickValue:e}})}}(t)}function sp(t,e){return"category"===t.type?function(t,e){var i,n,r=hp(t,"ticks"),a=Ff(e),o=up(r,a);if(o)return o;e.get("show")&&!t.scale.isBlank()||(i=[]);if(z(a))i=fp(t,a,!0);else if("auto"===a){var s=lp(t,t.getLabelModel());n=s.labelCategoryInterval,i=D(s.labels,function(t){return t.tickValue})}else i=dp(t,n=a,!0);return cp(r,a,{ticks:i,tickCategoryInterval:n})}(t,e):{ticks:t.scale.getTicks()}}function lp(t,e){var i,n,r=hp(t,"labels"),a=Ff(e),o=up(r,a);return o||(z(a)?i=fp(t,a):(n="auto"===a?function(t){var e=ap(t).autoInterval;return null!=e?e:ap(t).autoInterval=t.calculateCategoryInterval()}(t):a,i=dp(t,n)),cp(r,a,{labels:i,labelCategoryInterval:n}))}function hp(t,e){return ap(t)[e]||(ap(t)[e]=[])}function up(t,e){for(var i=0;i<t.length;i++)if(t[i].key===e)return t[i].value}function cp(t,e,i){return t.push({key:e,value:i}),i}function dp(t,e,i){var n=Rf(t),r=t.scale,a=r.getExtent(),o=t.getLabelModel(),s=[],l=Math.max((e||0)+1,1),h=a[0],u=r.count();0!==h&&l>1&&u/l>2&&(h=Math.round(Math.ceil(h/l)*l));var c=Wf(t),d=o.get("showMinLabel")||c,f=o.get("showMaxLabel")||c;d&&h!==a[0]&&g(a[0]);for(var p=h;p<=a[1];p+=l)g(p);function g(t){s.push(i?t:{formattedLabel:n(t),rawLabel:r.getLabel(t),tickValue:t})}return f&&p!==a[1]&&g(a[1]),s}function fp(t,e,i){var n=t.scale,r=Rf(t),a=[];return C(n.getTicks(),function(t){var o=n.getLabel(t);e(t,o)&&a.push(i?t:{formattedLabel:r(t),rawLabel:o,tickValue:t})}),a}var pp=[0,1],gp=function(t,e,i){this.dim=t,this.scale=e,this._extent=i||[0,0],this.inverse=!1,this.onBand=!1};function vp(t,e){var i=(t[1]-t[0])/e/2;t[0]+=i,t[1]-=i}gp.prototype={constructor:gp,contain:function(t){var e=this._extent,i=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return t>=i&&t<=n},containData:function(t){return this.contain(this.dataToCoord(t))},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(t){return Xs(t||this.scale.getExtent(),this._extent)},setExtent:function(t,e){var i=this._extent;i[0]=t,i[1]=e},dataToCoord:function(t,e){var i=this._extent,n=this.scale;return t=n.normalize(t),this.onBand&&"ordinal"===n.type&&vp(i=i.slice(),n.count()),Ws(t,pp,i,e)},coordToData:function(t,e){var i=this._extent,n=this.scale;this.onBand&&"ordinal"===n.type&&vp(i=i.slice(),n.count());var r=Ws(t,i,pp,e);return this.scale.scale(r)},pointToData:function(t,e){},getTicksCoords:function(t){var e=(t=t||{}).tickModel||this.getTickModel(),i=sp(this,e),n=D(i.ticks,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this),r=e.get("alignWithLabel");return function(t,e,i,n,r){var a=e.length;if(!t.onBand||n||!a)return;var o,s=t.getExtent();if(1===a)e[0].coord=s[0],o=e[1]={coord:s[0]};else{var l=e[1].coord-e[0].coord;C(e,function(t){t.coord-=l/2;var e=e||0;e%2>0&&(t.coord-=l/(2*(e+1)))}),o={coord:e[a-1].coord+l},e.push(o)}var h=s[0]>s[1];u(e[0].coord,s[0])&&(r?e[0].coord=s[0]:e.shift());r&&u(s[0],e[0].coord)&&e.unshift({coord:s[0]});u(s[1],o.coord)&&(r?o.coord=s[1]:e.pop());r&&u(o.coord,s[1])&&e.push({coord:s[1]});function u(t,e){return h?t>e:t<e}}(this,n,i.tickCategoryInterval,r,t.clamp),n},getViewLabels:function(){return op(this).labels},getLabelModel:function(){return this.model.getModel("axisLabel")},getTickModel:function(){return this.model.getModel("axisTick")},getBandWidth:function(){var t=this._extent,e=this.scale.getExtent(),i=e[1]-e[0]+(this.onBand?1:0);0===i&&(i=1);var n=Math.abs(t[1]-t[0]);return Math.abs(n)/i},isHorizontal:null,getRotate:null,calculateCategoryInterval:function(){return function(t){var e=function(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}(t),i=Rf(t),n=(e.axisRotate-e.labelRotate)/180*Math.PI,r=t.scale,a=r.getExtent(),o=r.count();if(a[1]-a[0]<1)return 0;var s=1;o>40&&(s=Math.max(1,Math.floor(o/40)));for(var l=a[0],h=t.dataToCoord(l+1)-t.dataToCoord(l),u=Math.abs(h*Math.cos(n)),c=Math.abs(h*Math.sin(n)),d=0,f=0;l<=a[1];l+=s){var p,g,v=$i(i(l),e.font,"center","top");p=1.3*v.width,g=1.3*v.height,d=Math.max(d,p,7),f=Math.max(f,g,7)}var m=d/u,y=f/c;isNaN(m)&&(m=1/0),isNaN(y)&&(y=1/0);var x=Math.max(0,Math.floor(Math.min(m,y))),_=ap(t.model),w=_.lastAutoInterval,b=_.lastTickCount;return null!=w&&null!=b&&Math.abs(w-x)<=1&&Math.abs(b-o)<=1&&w>x?x=w:(_.lastTickCount=o,_.lastAutoInterval=x),x}(this)}};var mp=rp,yp={};C(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],function(t){yp[t]=tt[t]});var xp={};function _p(t){return this._axes[t]}C(["extendShape","extendPath","makePath","makeImage","mergePath","resizePath","createIcon","setHoverStyle","setLabelStyle","setTextStyle","setText","getFont","updateProps","initProps","getTransform","clipPointsByRect","clipRectByRect","Group","Image","Text","Circle","Sector","Ring","Polygon","Polyline","Rect","Line","BezierCurve","Arc","IncrementalDisplayable","CompoundPath","LinearGradient","RadialGradient","BoundingRect"],function(t){xp[t]=Cs[t]});var wp=function(t){this._axes={},this._dimList=[],this.name=t||""};function bp(t){wp.call(this,t)}wp.prototype={constructor:wp,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return D(this._dimList,_p,this)},getAxesByScale:function(t){return t=t.toLowerCase(),k(this.getAxes(),function(e){return e.scale.type===t})},addAxis:function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},dataToCoord:function(t){return this._dataCoordConvert(t,"dataToCoord")},coordToData:function(t){return this._dataCoordConvert(t,"coordToData")},_dataCoordConvert:function(t,e){for(var i=this._dimList,n=t instanceof Array?[]:{},r=0;r<i.length;r++){var a=i[r],o=this._axes[a];n[a]=o[e](t[a])}return n}},bp.prototype={constructor:bp,type:"cartesian2d",dimensions:["x","y"],getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},containPoint:function(t){var e=this.getAxis("x"),i=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&i.contain(i.toLocalCoord(t[1]))},containData:function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},dataToPoint:function(t,e,i){var n=this.getAxis("x"),r=this.getAxis("y");return(i=i||[])[0]=n.toGlobalCoord(n.dataToCoord(t[0])),i[1]=r.toGlobalCoord(r.dataToCoord(t[1])),i},clampData:function(t,e){var i=this.getAxis("x").scale,n=this.getAxis("y").scale,r=i.getExtent(),a=n.getExtent(),o=i.parse(t[0]),s=n.parse(t[1]);return(e=e||[])[0]=Math.min(Math.max(Math.min(r[0],r[1]),o),Math.max(r[0],r[1])),e[1]=Math.min(Math.max(Math.min(a[0],a[1]),s),Math.max(a[0],a[1])),e},pointToData:function(t,e){var i=this.getAxis("x"),n=this.getAxis("y");return(e=e||[])[0]=i.coordToData(i.toLocalCoord(t[0])),e[1]=n.coordToData(n.toLocalCoord(t[1])),e},getOtherAxis:function(t){return this.getAxis("x"===t.dim?"y":"x")}},S(bp,wp);var Mp=function(t,e,i,n,r){gp.call(this,t,e,i),this.type=n||"value",this.position=r||"bottom"};Mp.prototype={constructor:Mp,index:0,getAxesOnZeroOf:null,model:null,isHorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},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},getOtherAxis:function(){this.grid.getOtherAxis()},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},toLocalCoord:null,toGlobalCoord:null},S(Mp,gp);var Sp={show:!0,zlevel: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:"#333",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:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},Ip={};Ip.categoryAxis=v({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},Sp),Ip.valueAxis=v({boundaryGap:[0,0],splitNumber:5},Sp),Ip.timeAxis=x({scale:!0,min:"dataMin",max:"dataMax"},Ip.valueAxis),Ip.logAxis=x({scale:!0,logBase:10},Ip.valueAxis);var Tp=["value","category","time","log"],Cp=function(t,e,i,n){C(Tp,function(r){e.extend({type:t+"Axis."+r,mergeDefaultAndTheme:function(e,n){var a=this.layoutMode,o=a?bl(e):{};v(e,n.getTheme().get(r+"Axis")),v(e,this.getDefaultOption()),e.type=i(t,e),a&&wl(e,o,a)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=Ud.createByAxisModel(this))},getCategories:function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:m([{},Ip[r+"Axis"],n],!0)})}),Tl.registerSubTypeDefaulter(t+"Axis",L(i,t))},Dp=Tl.extend({type:"cartesian2dAxis",axis:null,init:function(){Dp.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){Dp.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){Dp.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});function Ap(t,e){return e.type||(e.data?"category":"value")}v(Dp.prototype,Vf);var kp={offset:0};function Pp(t,e,i){return t.getCoordSysModel()===e}function Lp(t,e,i){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,i),this.model=t}Cp("x",Dp,Ap,kp),Cp("y",Dp,Ap,kp),Tl.extend({type:"grid",dependencies:["xAxis","yAxis"],layoutMode:"box",coordinateSystem:null,defaultOption:{show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:60,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"}});var Op=Lp.prototype;function zp(t,e,i,n){i.getAxesOnZeroOf=function(){return r?[r]:[]};var r,a=t[e],o=i.model,s=o.get("axisLine.onZero"),l=o.get("axisLine.onZeroAxisIndex");if(s){if(null!=l)Bp(a[l])&&(r=a[l]);else for(var h in a)if(a.hasOwnProperty(h)&&Bp(a[h])&&!n[u(a[h])]){r=a[h];break}r&&(n[u(r)]=!0)}function u(t){return t.dim+"_"+t.index}}function Bp(t){return t&&"category"!==t.type&&"time"!==t.type&&function(t){var e=t.scale.getExtent(),i=e[0],n=e[1];return!(i>0&&n>0||i<0&&n<0)}(t)}Op.type="grid",Op.axisPointerEnabled=!0,Op.getRect=function(){return this._rect},Op.update=function(t,e){var i=this._axesMap;this._updateScale(t,this.model),C(i.x,function(t){Bf(t.scale,t.model)}),C(i.y,function(t){Bf(t.scale,t.model)});var n={};C(i.x,function(t){zp(i,"y",t,n)}),C(i.y,function(t){zp(i,"x",t,n)}),this.resize(this.model,e)},Op.resize=function(t,e,i){var n=_l(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=n;var r=this._axesList;function a(){C(r,function(t){var e=t.isHorizontal(),i=e?[0,n.width]:[0,n.height],r=t.inverse?1:0;t.setExtent(i[r],i[1-r]),function(t,e){var i=t.getExtent(),n=i[0]+i[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return n-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return n-t+e}}(t,e?n.x:n.y)})}a(),!i&&t.get("containLabel")&&(C(r,function(t){if(!t.model.get("axisLabel.inside")){var e=function(t){var e=t.model,i=t.scale;if(e.get("axisLabel.show")&&!i.isBlank()){var n,r,a="category"===t.type,o=i.getExtent();r=a?i.count():(n=i.getTicks()).length;var s,l,h,u,c,d,f,p,g,v=t.getLabelModel(),m=Rf(t),y=1;r>40&&(y=Math.ceil(r/40));for(var x=0;x<r;x+=y){var _=m(n?n[x]:o[0]+x),w=v.getTextRect(_),b=(l=w,h=v.get("rotate")||0,u=void 0,c=void 0,d=void 0,f=void 0,p=void 0,g=void 0,u=h*Math.PI/180,c=l.plain(),d=c.width,f=c.height,p=d*Math.cos(u)+f*Math.sin(u),g=d*Math.sin(u)+f*Math.cos(u),new ui(c.x,c.y,p,g));s?s.union(b):s=b}return s}}(t);if(e){var i=t.isHorizontal()?"height":"width",r=t.model.get("axisLabel.margin");n[i]-=e[i]+r,"top"===t.position?n.y+=e.height+r:"left"===t.position&&(n.x+=e.width+r)}}}),a())},Op.getAxis=function(t,e){var i=this._axesMap[t];if(null!=i){if(null==e)for(var n in i)if(i.hasOwnProperty(n))return i[n];return i[e]}},Op.getAxes=function(){return this._axesList.slice()},Op.getCartesian=function(t,e){if(null!=t&&null!=e){var i="x"+t+"y"+e;return this._coordsMap[i]}E(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var n=0,r=this._coordsList;n<r.length;n++)if(r[n].getAxis("x").index===t||r[n].getAxis("y").index===e)return r[n]},Op.getCartesians=function(){return this._coordsList.slice()},Op.convertToPixel=function(t,e,i){var n=this._findConvertTarget(t,e);return n.cartesian?n.cartesian.dataToPoint(i):n.axis?n.axis.toGlobalCoord(n.axis.dataToCoord(i)):null},Op.convertFromPixel=function(t,e,i){var n=this._findConvertTarget(t,e);return n.cartesian?n.cartesian.pointToData(i):n.axis?n.axis.coordToData(n.axis.toLocalCoord(i)):null},Op._findConvertTarget=function(t,e){var i,n,r=e.seriesModel,a=e.xAxisModel||r&&r.getReferringComponents("xAxis")[0],o=e.yAxisModel||r&&r.getReferringComponents("yAxis")[0],s=e.gridModel,l=this._coordsList;if(r)M(l,i=r.coordinateSystem)<0&&(i=null);else if(a&&o)i=this.getCartesian(a.componentIndex,o.componentIndex);else if(a)n=this.getAxis("x",a.componentIndex);else if(o)n=this.getAxis("y",o.componentIndex);else if(s){s.coordinateSystem===this&&(i=this._coordsList[0])}return{cartesian:i,axis:n}},Op.containPoint=function(t){var e=this._coordsList[0];if(e)return e.containPoint(t)},Op._initCartesian=function(t,e,i){var n={left:!1,right:!1,top:!1,bottom:!1},r={x:{},y:{}},a={x:0,y:0};if(e.eachComponent("xAxis",o("x"),this),e.eachComponent("yAxis",o("y"),this),!a.x||!a.y)return this._axesMap={},void(this._axesList=[]);function o(e){return function(i,o){if(Pp(i,t)){var s=i.get("position");"x"===e?"top"!==s&&"bottom"!==s&&n[s="bottom"]&&(s="top"===s?"bottom":"top"):"left"!==s&&"right"!==s&&n[s="left"]&&(s="left"===s?"right":"left"),n[s]=!0;var l=new Mp(e,Ef(i),[0,0],i.get("type"),s),h="category"===l.type;l.onBand=h&&i.get("boundaryGap"),l.inverse=i.get("inverse"),i.axis=l,l.model=i,l.grid=this,l.index=o,this._axesList.push(l),r[e][o]=l,a[e]++}}}this._axesMap=r,C(r.x,function(e,i){C(r.y,function(n,r){var a="x"+i+"y"+r,o=new bp(a);o.grid=this,o.model=t,this._coordsMap[a]=o,this._coordsList.push(o),o.addAxis(e),o.addAxis(n)},this)},this)},Op._updateScale=function(t,e){function i(t,e,i){C(t.mapDimension(e.dim,!0),function(i){e.scale.unionExtentFromData(t,Yd(t,i))})}C(this._axesList,function(t){t.scale.setExtent(1/0,-1/0)}),t.eachSeries(function(n){if(Np(n)){var r=Rp(n,t),a=r[0],o=r[1];if(!Pp(a,e)||!Pp(o,e))return;var s=this.getCartesian(a.componentIndex,o.componentIndex),l=n.getData(),h=s.getAxis("x"),u=s.getAxis("y");"list"===l.type&&(i(l,h,n),i(l,u,n))}},this)},Op.getTooltipAxes=function(t){var e=[],i=[];return C(this.getCartesians(),function(n){var r=null!=t&&"auto"!==t?n.getAxis(t):n.getBaseAxis(),a=n.getOtherAxis(r);M(e,r)<0&&e.push(r),M(i,a)<0&&i.push(a)}),{baseAxes:e,otherAxes:i}};var Ep=["xAxis","yAxis"];function Rp(t,e){return D(Ep,function(e){return t.getReferringComponents(e)[0]})}function Np(t){return"cartesian2d"===t.get("coordinateSystem")}function Fp(t,e){var i=t.mapDimension("defaultedLabel",!0),n=i.length;if(1===n)return Rh(t,e,i[0]);if(n){for(var r=[],a=0;a<i.length;a++){var o=Rh(t,e,i[a]);r.push(o)}return r.join(" ")}}function Wp(t,e){"outside"===t.textPosition&&(t.textPosition=e)}Lp.create=function(t,e){var i=[];return t.eachComponent("grid",function(n,r){var a=new Lp(n,t,e);a.name="grid_"+r,a.resize(n,e,!0),n.coordinateSystem=a,i.push(a)}),t.eachSeries(function(t){if(Np(t)){var e=Rp(t),i=e[0],n=e[1],r=i.getCoordSysModel().coordinateSystem;t.coordinateSystem=r.getCartesian(i.componentIndex,n.componentIndex)}}),i},Lp.dimensions=Lp.prototype.dimensions=bp.prototype.dimensions,ih.register("cartesian2d",Lp),Yh.extend({type:"series.__base_bar__",getInitialData:function(t,e){return jd(this.getSource(),this)},getMarkerPosition:function(t){var e=this.coordinateSystem;if(e){var i=e.dataToPoint(e.clampData(t)),n=this.getData(),r=n.getLayout("offset"),a=n.getLayout("size");return i[e.getBaseAxis().isHorizontal()?0:1]+=r+a/2,i}return[NaN,NaN]},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",itemStyle:{},emphasis:{}}}).extend({type:"series.bar",dependencies:["grid","polar"],brushSelector:"rect",getProgressive:function(){return!!this.get("large")&&this.get("progressive")},getProgressiveThreshold:function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return e>t&&(t=e),t}});var Vp=Cr([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Hp={getBarItemStyle:function(t){var e=Vp(this,t);if(this.getBorderLineDash){var i=this.getBorderLineDash();i&&(e.lineDash=i)}return e}},Gp=["itemStyle","barBorderWidth"];y(zs.prototype,Hp),dd({type:"bar",render:function(t,e,i){this._updateDrawMode(t);var n=t.get("coordinateSystem");return"cartesian2d"!==n&&"polar"!==n||(this._isLargeDraw?this._renderLarge(t,e,i):this._renderNormal(t,e,i)),this.group},incrementalPrepareRender:function(t,e,i){this._clear(),this._updateDrawMode(t)},incrementalRender:function(t,e,i,n){this._incrementalRenderLarge(t,e)},_updateDrawMode:function(t){var e=t.pipelineContext.large;(null==this._isLargeDraw||e^this._isLargeDraw)&&(this._isLargeDraw=e,this._clear())},_renderNormal:function(t,e,i){var n,r=this.group,a=t.getData(),o=this._data,s=t.coordinateSystem,l=s.getBaseAxis();"cartesian2d"===s.type?n=l.isHorizontal():"polar"===s.type&&(n="angle"===l.dim);var h=t.isAnimationEnabled()?t:null;a.diff(o).add(function(e){if(a.hasValue(e)){var i=a.getItemModel(e),o=jp[s.type](a,e,i),l=Zp[s.type](a,e,i,o,n,h);a.setItemGraphicEl(e,l),r.add(l),qp(l,a,e,i,o,t,n,"polar"===s.type)}}).update(function(e,i){var l=o.getItemGraphicEl(i);if(a.hasValue(e)){var u=a.getItemModel(e),c=jp[s.type](a,e,u);l?ws(l,{shape:c},h,e):l=Zp[s.type](a,e,u,c,n,h,!0),a.setItemGraphicEl(e,l),r.add(l),qp(l,a,e,u,c,t,n,"polar"===s.type)}else r.remove(l)}).remove(function(t){var e=o.getItemGraphicEl(t);"cartesian2d"===s.type?e&&Xp(t,h,e):e&&Yp(t,h,e)}).execute(),this._data=a},_renderLarge:function(t,e,i){this._clear(),$p(t,this.group)},_incrementalRenderLarge:function(t,e){$p(e,this.group,!0)},dispose:J,remove:function(t){this._clear(t)},_clear:function(t){var e=this.group,i=this._data;t&&t.get("animation")&&i&&!this._isLargeDraw?i.eachItemGraphicEl(function(e){"sector"===e.type?Yp(e.dataIndex,t,e):Xp(e.dataIndex,t,e)}):e.removeAll(),this._data=null}});var Zp={cartesian2d:function(t,e,i,n,r,a,o){var s=new Io({shape:y({},n)});if(a){var l=r?"height":"width",h={};s.shape[l]=0,h[l]=n[l],Cs[o?"updateProps":"initProps"](s,{shape:h},a,e)}return s},polar:function(t,e,i,n,r,a,o){var s=n.startAngle<n.endAngle,l=new po({shape:x({clockwise:s},n)});if(a){var h=r?"r":"endAngle",u={};l.shape[h]=r?0:n.startAngle,u[h]=n[h],Cs[o?"updateProps":"initProps"](l,{shape:u},a,e)}return l}};function Xp(t,e,i){i.style.text=null,ws(i,{shape:{width:0}},e,t,function(){i.parent&&i.parent.remove(i)})}function Yp(t,e,i){i.style.text=null,ws(i,{shape:{r:i.shape.r0}},e,t,function(){i.parent&&i.parent.remove(i)})}var jp={cartesian2d:function(t,e,i){var n=t.getItemLayout(e),r=function(t,e){var i=t.get(Gp)||0;return Math.min(i,Math.abs(e.width),Math.abs(e.height))}(i,n),a=n.width>0?1:-1,o=n.height>0?1:-1;return{x:n.x+a*r/2,y:n.y+o*r/2,width:n.width-a*r,height:n.height-o*r}},polar:function(t,e,i){var n=t.getItemLayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle}}};function qp(t,e,i,n,r,a,o,s){var l=e.getItemVisual(i,"color"),h=e.getItemVisual(i,"opacity"),u=n.getModel("itemStyle"),c=n.getModel("emphasis.itemStyle").getBarItemStyle();s||t.setShape("r",u.get("barBorderRadius")||0),t.useStyle(x({fill:l,opacity:h},u.getBarItemStyle()));var d=n.getShallow("cursor");d&&t.attr("cursor",d);o?r.height:r.width;s||function(t,e,i,n,r,a,o){ds(t,e,i.getModel("label"),i.getModel("emphasis.label"),{labelFetcher:r,labelDataIndex:a,defaultText:Fp(r.getData(),a),isRectText:!0,autoColor:n}),Wp(t),Wp(e)}(t.style,c,n,l,a,i),us(t,c)}var Up=Xa.extend({type:"largeBar",shape:{points:[]},buildPath:function(t,e){for(var i=e.points,n=this.__startPoint,r=this.__valueIdx,a=0;a<i.length;a+=2)n[this.__valueIdx]=i[a+r],t.moveTo(n[0],n[1]),t.lineTo(i[a],i[a+1])}});function $p(t,e,i){var n=t.getData(),r=[],a=n.getLayout("valueAxisHorizontal")?1:0;r[1-a]=n.getLayout("valueAxisStart");var o=new Up({shape:{points:n.getLayout("largePoints")},incremental:!!i,__startPoint:r,__valueIdx:a});e.add(o),function(t,e,i){var n=i.getVisual("borderColor")||i.getVisual("color"),r=e.getModel("itemStyle").getItemStyle(["color","borderColor"]);t.useStyle(r),t.style.fill=null,t.style.stroke=n,t.style.lineWidth=i.getLayout("barWidth")}(o,t,n)}var Kp=Math.PI;function Qp(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e}var Jp=function(t,e){this.opt=e,this.axisModel=t,x(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new ci;var i=new ci({position:e.position.slice(),rotation:e.rotation});i.updateTransform(),this._transform=i.transform,this._dumbGroup=i};Jp.prototype={constructor:Jp,hasBuilder:function(t){return!!tg[t]},add:function(t){tg[t].call(this)},getGroup:function(){return this.group}};var tg={axisLine:function(){var t=this.opt,e=this.axisModel;if(e.get("axisLine.show")){var i=this.axisModel.axis.getExtent(),n=this._transform,r=[i[0],0],a=[i[1],0];n&&(vt(r,r,n),vt(a,a,n));var o=y({lineCap:"round"},e.getModel("axisLine.lineStyle").getLineStyle());this.group.add(new Co(Uo({anid:"line",shape:{x1:r[0],y1:r[1],x2:a[0],y2:a[1]},style:o,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1})));var s=e.get("axisLine.symbol"),l=e.get("axisLine.symbolSize"),h=e.get("axisLine.symbolOffset")||0;if("number"==typeof h&&(h=[h,h]),null!=s){"string"==typeof s&&(s=[s,s]),"string"!=typeof l&&"number"!=typeof l||(l=[l,l]);var u=l[0],c=l[1];C([{rotate:t.rotation+Math.PI/2,offset:h[0],r:0},{rotate:t.rotation-Math.PI/2,offset:h[1],r:Math.sqrt((r[0]-a[0])*(r[0]-a[0])+(r[1]-a[1])*(r[1]-a[1]))}],function(e,i){if("none"!==s[i]&&null!=s[i]){var n=$f(s[i],-u/2,-c/2,u,c,o.stroke,!0),a=e.r+e.offset,l=[r[0]+a*Math.cos(t.rotation),r[1]-a*Math.sin(t.rotation)];n.attr({rotation:e.rotate,position:l,silent:!0,z2:11}),this.group.add(n)}},this)}}},axisTickLabel:function(){var t=this.axisModel,e=this.opt,i=function(t,e,i){var n=e.axis;if(!e.get("axisTick.show")||n.scale.isBlank())return;for(var r=e.getModel("axisTick"),a=r.getModel("lineStyle"),o=r.get("length"),s=n.getTicksCoords(),l=[],h=[],u=t._transform,c=[],d=0;d<s.length;d++){var f=s[d].coord;l[0]=f,l[1]=0,h[0]=f,h[1]=i.tickDirection*o,u&&(vt(l,l,u),vt(h,h,u));var p=new Co(Uo({anid:"tick_"+s[d].tickValue,shape:{x1:l[0],y1:l[1],x2:h[0],y2:h[1]},style:x(a.getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")}),z2:2,silent:!0}));t.group.add(p),c.push(p)}return c}(this,t,e),n=function(t,e,i){var n=e.axis;if(!V(i.axisLabelShow,e.get("axisLabel.show"))||n.scale.isBlank())return;var r=e.getModel("axisLabel"),a=r.get("margin"),o=n.getViewLabels(),s=(V(i.labelRotate,r.get("rotate"))||0)*Kp/180,l=eg(i.rotation,s,i.labelDirection),h=e.getCategories(!0),u=[],c=ig(e),d=e.get("triggerEvent");return C(o,function(o,s){var f=o.tickValue,p=o.formattedLabel,g=o.rawLabel,v=r;h&&h[f]&&h[f].textStyle&&(v=new zs(h[f].textStyle,r,e.ecModel));var m=v.getTextColor()||e.get("axisLine.lineStyle.color"),y=[n.dataToCoord(f),i.labelOffset+i.labelDirection*a],x=new ho({anid:"label_"+f,position:y,rotation:l.rotation,silent:c,z2:10});fs(x.style,v,{text:p,textAlign:v.getShallow("align",!0)||l.textAlign,textVerticalAlign:v.getShallow("verticalAlign",!0)||v.getShallow("baseline",!0)||l.textVerticalAlign,textFill:"function"==typeof m?m("category"===n.type?g:"value"===n.type?f+"":f,s):m}),d&&(x.eventData=Qp(e),x.eventData.targetType="axisLabel",x.eventData.value=g),t._dumbGroup.add(x),x.updateTransform(),u.push(x),t.group.add(x),x.decomposeTransform()}),u}(this,t,e);!function(t,e,i){if(Wf(t.axis))return;var n=t.get("axisLabel.showMinLabel"),r=t.get("axisLabel.showMaxLabel");i=i||[];var a=(e=e||[])[0],o=e[1],s=e[e.length-1],l=e[e.length-2],h=i[0],u=i[1],c=i[i.length-1],d=i[i.length-2];!1===n?(ng(a),ng(h)):rg(a,o)&&(n?(ng(o),ng(u)):(ng(a),ng(h)));!1===r?(ng(s),ng(c)):rg(l,s)&&(r?(ng(l),ng(d)):(ng(s),ng(c)))}(t,n,i)},axisName:function(){var t=this.opt,e=this.axisModel,i=V(t.axisName,e.get("name"));if(i){var n,r,a=e.get("nameLocation"),o=t.nameDirection,s=e.getModel("nameTextStyle"),l=e.get("nameGap")||0,h=this.axisModel.axis.getExtent(),u=h[0]>h[1]?-1:1,c=["start"===a?h[0]-u*l:"end"===a?h[1]+u*l:(h[0]+h[1])/2,ag(a)?t.labelOffset+o*l:0],d=e.get("nameRotate");null!=d&&(d=d*Kp/180),ag(a)?n=eg(t.rotation,null!=d?d:t.rotation,o):(n=function(t,e,i,n){var r,a,o=Ys(i-t.rotation),s=n[0]>n[1],l="start"===e&&!s||"start"!==e&&s;js(o-Kp/2)?(a=l?"bottom":"top",r="center"):js(o-1.5*Kp)?(a=l?"top":"bottom",r="center"):(a="middle",r=o<1.5*Kp&&o>Kp/2?l?"left":"right":l?"right":"left");return{rotation:o,textAlign:r,textVerticalAlign:a}}(t,a,d||0,h),null!=(r=t.axisNameAvailableWidth)&&(r=Math.abs(r/Math.sin(n.rotation)),!isFinite(r)&&(r=null)));var f=s.getFont(),p=e.get("nameTruncate",!0)||{},g=p.ellipsis,v=V(t.nameTruncateMaxWidth,p.maxWidth,r),m=null!=g&&null!=v?fl(i,v,f,g,{minChar:2,placeholder:p.placeholder}):i,x=e.get("tooltip",!0),_=e.mainType,w={componentType:_,name:i,$vars:["name"]};w[_+"Index"]=e.componentIndex;var b=new ho({anid:"name",__fullText:i,__truncatedText:m,position:c,rotation:n.rotation,silent:ig(e),z2:1,tooltip:x&&x.show?y({content:i,formatter:function(){return i},formatterParams:w},x):null});fs(b.style,s,{text:m,textFont:f,textFill:s.getTextColor()||e.get("axisLine.lineStyle.color"),textAlign:n.textAlign,textVerticalAlign:n.textVerticalAlign}),e.get("triggerEvent")&&(b.eventData=Qp(e),b.eventData.targetType="axisName",b.eventData.name=i),this._dumbGroup.add(b),b.updateTransform(),this.group.add(b),b.decomposeTransform()}}},eg=Jp.innerTextLayout=function(t,e,i){var n,r,a=Ys(e-t);return js(a)?(r=i>0?"top":"bottom",n="center"):js(a-Kp)?(r=i>0?"bottom":"top",n="center"):(r="middle",n=a>0&&a<Kp?i>0?"right":"left":i>0?"left":"right"),{rotation:a,textAlign:n,textVerticalAlign:r}};function ig(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)}function ng(t){t&&(t.ignore=!0)}function rg(t,e,i){var n=t&&t.getBoundingRect().clone(),r=e&&e.getBoundingRect().clone();if(n&&r){var a=Zt([]);return qt(a,a,-t.rotation),n.applyTransform(Yt([],a,t.getLocalTransform())),r.applyTransform(Yt([],a,e.getLocalTransform())),n.intersect(r)}}function ag(t){return"middle"===t||"center"===t}var og=C,sg=L;function lg(t,e){var i={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return function(t,e,i){var n=e.getComponent("tooltip"),r=e.getComponent("axisPointer"),a=r.get("link",!0)||[],o=[];og(i.getCoordinateSystems(),function(i){if(i.axisPointerEnabled){var s=dg(i.model),l=t.coordSysAxesInfo[s]={};t.coordSysMap[s]=i;var h=i.model,u=h.getModel("tooltip",n);if(og(i.getAxes(),sg(p,!1,null)),i.getTooltipAxes&&n&&u.get("show")){var c="axis"===u.get("trigger"),d="cross"===u.get("axisPointer.type"),f=i.getTooltipAxes(u.get("axisPointer.axis"));(c||d)&&og(f.baseAxes,sg(p,!d||"cross",c)),d&&og(f.otherAxes,sg(p,"cross",!1))}}function p(n,s,h){var c=h.model.getModel("axisPointer",r),d=c.get("show");if(d&&("auto"!==d||n||cg(c))){null==s&&(s=c.get("triggerTooltip"));var f=(c=n?function(t,e,i,n,r,a){var o=e.getModel("axisPointer"),s={};og(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(t){s[t]=g(o.get(t))}),s.snap="category"!==t.type&&!!a,"cross"===o.get("type")&&(s.type="line");var l=s.label||(s.label={});if(null==l.show&&(l.show=!1),"cross"===r){var h=o.get("label.show");if(l.show=null==h||h,!a){var u=s.lineStyle=o.get("crossStyle");u&&x(l,u.textStyle)}}return t.model.getModel("axisPointer",new zs(s,i,n))}(h,u,r,e,n,s):c).get("snap"),p=dg(h.model),v=s||f||"category"===h.type,m=t.axesInfo[p]={key:p,axis:h,coordSys:i,axisPointerModel:c,triggerTooltip:s,involveSeries:v,snap:f,useHandle:cg(c),seriesModels:[]};l[p]=m,t.seriesInvolved|=v;var y=function(t,e){for(var i=e.model,n=e.dim,r=0;r<t.length;r++){var a=t[r]||{};if(hg(a[n+"AxisId"],i.id)||hg(a[n+"AxisIndex"],i.componentIndex)||hg(a[n+"AxisName"],i.name))return r}}(a,h);if(null!=y){var _=o[y]||(o[y]={axesInfo:{}});_.axesInfo[p]=m,_.mapper=a[y].mapper,m.linkGroup=_}}}})}(i,t,e),i.seriesInvolved&&function(t,e){e.eachSeries(function(e){var i=e.coordinateSystem,n=e.get("tooltip.trigger",!0),r=e.get("tooltip.show",!0);i&&"none"!==n&&!1!==n&&"item"!==n&&!1!==r&&!1!==e.get("axisPointer.show",!0)&&og(t.coordSysAxesInfo[dg(i.model)],function(t){var n=t.axis;i.getAxis(n.dim)===n&&(t.seriesModels.push(e),null==t.seriesDataCount&&(t.seriesDataCount=0),t.seriesDataCount+=e.getData().count())})},this)}(i,t),i}function hg(t,e){return"all"===t||O(t)&&M(t,e)>=0||t===e}function ug(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[dg(t)]}function cg(t){return!!t.get("handle.show")}function dg(t){return t.type+"||"+t.id}var fg=cd({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,i,n){this.axisPointerClass&&function(t){var e=ug(t);if(e){var i=e.axisPointerModel,n=e.axis.scale,r=i.option,a=i.get("status"),o=i.get("value");null!=o&&(o=n.parse(o));var s=cg(i);null==a&&(r.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==o||o>l[1])&&(o=l[1]),o<l[0]&&(o=l[0]),r.value=o,s&&(r.status=e.axis.scale.isBlank()?"hide":"show")}}(t),fg.superApply(this,"render",arguments),pg(this,t,e,i,n,!0)},updateAxisPointer:function(t,e,i,n,r){pg(this,t,e,i,n,!1)},remove:function(t,e){var i=this._axisPointer;i&&i.remove(e),fg.superApply(this,"remove",arguments)},dispose:function(t,e){gg(this,e),fg.superApply(this,"dispose",arguments)}});function pg(t,e,i,n,r,a){var o=fg.getAxisPointerClass(t.axisPointerClass);if(o){var s=function(t){var e=ug(t);return e&&e.axisPointerModel}(e);s?(t._axisPointer||(t._axisPointer=new o)).render(e,s,n,a):gg(t,n)}}function gg(t,e,i){var n=t._axisPointer;n&&n.dispose(e,i),t._axisPointer=null}var vg=[];function mg(t,e,i){i=i||{};var n=t.coordinateSystem,r=e.axis,a={},o=r.getAxesOnZeroOf()[0],s=r.position,l=o?"onZero":s,h=r.dim,u=n.getRect(),c=[u.x,u.x+u.width,u.y,u.y+u.height],d={left:0,right:1,top:0,bottom:1,onZero:2},f=e.get("offset")||0,p="x"===h?[c[2]-f,c[3]+f]:[c[0]-f,c[1]+f];if(o){var g=o.toGlobalCoord(o.dataToCoord(0));p[d.onZero]=Math.max(Math.min(g,p[1]),p[0])}a.position=["y"===h?p[d[l]]:c[0],"x"===h?p[d[l]]:c[3]],a.rotation=Math.PI/2*("x"===h?0:1);a.labelDirection=a.tickDirection=a.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],a.labelOffset=o?p[d[s]]-p[d.onZero]:0,e.get("axisTick.inside")&&(a.tickDirection=-a.tickDirection),V(i.labelInside,e.get("axisLabel.inside"))&&(a.labelDirection=-a.labelDirection);var v=e.get("axisLabel.rotate");return a.labelRotate="top"===l?-v:v,a.z2=1,a}fg.registerAxisPointerClass=function(t,e){vg[t]=e},fg.getAxisPointerClass=function(t){return t&&vg[t]};var yg=["axisLine","axisTickLabel","axisName"],xg=["splitArea","splitLine"],_g=fg.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(t,e,i,n){this.group.removeAll();var r=this._axisGroup;if(this._axisGroup=new ci,this.group.add(this._axisGroup),t.get("show")){var a=t.getCoordSysModel(),o=mg(a,t),s=new Jp(t,o);C(yg,s.add,s),this._axisGroup.add(s.getGroup()),C(xg,function(e){t.get(e+".show")&&this["_"+e](t,a)},this),Is(r,this._axisGroup,t),_g.superCall(this,"render",t,e,i,n)}},remove:function(){this._splitAreaColors=null},_splitLine:function(t,e){var i=t.axis;if(!i.scale.isBlank()){var n=t.getModel("splitLine"),r=n.getModel("lineStyle"),a=r.get("color");a=O(a)?a:[a];for(var o=e.coordinateSystem.getRect(),s=i.isHorizontal(),l=0,h=i.getTicksCoords({tickModel:n}),u=[],c=[],d=r.getLineStyle(),f=0;f<h.length;f++){var p=i.toGlobalCoord(h[f].coord);s?(u[0]=p,u[1]=o.y,c[0]=p,c[1]=o.y+o.height):(u[0]=o.x,u[1]=p,c[0]=o.x+o.width,c[1]=p);var g=l++%a.length,v=h[f].tickValue;this._axisGroup.add(new Co(Uo({anid:null!=v?"line_"+h[f].tickValue:null,shape:{x1:u[0],y1:u[1],x2:c[0],y2:c[1]},style:x({stroke:a[g]},d),silent:!0})))}}},_splitArea:function(t,e){var i=t.axis;if(!i.scale.isBlank()){var n=t.getModel("splitArea"),r=n.getModel("areaStyle"),a=r.get("color"),o=e.coordinateSystem.getRect(),s=i.getTicksCoords({tickModel:n,clamp:!0});if(s.length){var l=a.length,h=this._splitAreaColors,u=Q(),c=0;if(h)for(var d=0;d<s.length;d++){var f=h.get(s[d].tickValue);if(null!=f){c=(f+(l-1)*d)%l;break}}var p=i.toGlobalCoord(s[0].coord),g=r.getAreaStyle();a=O(a)?a:[a];for(d=1;d<s.length;d++){var v,m,y,_,w=i.toGlobalCoord(s[d].coord);i.isHorizontal()?(v=p,m=o.y,y=w-v,_=o.height,p=v+y):(v=o.x,m=p,y=o.width,p=m+(_=w-m));var b=s[d-1].tickValue;null!=b&&u.set(b,c),this._axisGroup.add(new Io({anid:null!=b?"area_"+b:null,shape:{x:v,y:m,width:y,height:_},style:x({fill:a[c]},g),silent:!0})),c=(c+1)%l}this._splitAreaColors=u}}}});_g.extend({type:"xAxis"}),_g.extend({type:"yAxis"}),cd({type:"grid",render:function(t,e){this.group.removeAll(),t.get("show")&&this.group.add(new Io({shape:t.coordinateSystem.getRect(),style:x({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))}}),nd(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})}),od(L(function(t,e){var i=df(t,e),n=ff(i),r={};C(i,function(t){var e=t.getData(),i=t.coordinateSystem,a=i.getBaseAxis(),o=uf(t),s=n[cf(a)][o],l=s.offset,h=s.width,u=i.getOtherAxis(a),c=t.get("barMinHeight")||0;r[o]=r[o]||[],e.setLayout({offset:l,size:h});var d=e.mapDimension(u.dim),f=e.mapDimension(a.dim),p=Xd(e,d),g=u.isHorizontal(),v=yf(0,u);v<0&&(v=u.toGlobalCoord(u.dataToCoord(1)));for(var m=0,y=e.count();m<y;m++){var x=e.get(d,m),_=e.get(f,m);if(!isNaN(x)){var w,b,M,S,I=x>=0?"p":"n",T=v;if(p&&(r[o][_]||(r[o][_]={p:v,n:v}),T=r[o][_][I]),g){var C=x;"log"==u.type&&C<1&&(C=1),w=T,b=(D=i.dataToPoint([C,_]))[1]+l,M=D[0]-T,S=h,Math.abs(M)<c&&(M=(M<0?-1:1)*c),p&&(r[o][_][I]=D[0])}else{var D;w=(D=i.dataToPoint([_,x]))[0]+l,b=T,M=h,S=D[1]-v,Math.abs(S)<c&&(S=(S<=0?-1:1)*c),p&&(r[o][_][I]+=S)}e.setItemLayout(m,{x:w,y:b,width:M,height:S})}}},this)},"bar")),od(gf),sd({seriesType:"bar",reset:function(t){t.getData().setVisual("legendSymbol","roundRect")}});var wg=ud({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(t,e,i){this.mergeDefaultAndTheme(t,i),t.selected=t.selected||{}},mergeOption:function(t){wg.superCall(this,"mergeOption",t)},optionUpdated:function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,i=0;i<t.length;i++){var n=t[i].get("name");if(this.isSelected(n)){this.select(n),e=!0;break}}!e&&this.select(t[0].get("name"))}},_updateData:function(t){var e=[],i=[];t.eachRawSeries(function(n){var r,a=n.name;if(i.push(a),n.legendDataProvider){var o=n.legendDataProvider(),s=o.mapArray(o.getName);t.isSeriesFiltered(n)||(i=i.concat(s)),s.length?e=e.concat(s):r=!0}else r=!0;r&&hr(n)&&e.push(n.name)}),this._availableNames=i;var n=D(this.get("data")||e,function(t){return"string"!=typeof t&&"number"!=typeof t||(t={name:t}),new zs(t,this,this.ecModel)},this);this._data=n},getData:function(){return this._data},select:function(t){var e=this.option.selected;"single"===this.get("selectedMode")&&C(this._data,function(t){e[t.get("name")]=!1});e[t]=!0},unSelect:function(t){"single"!==this.get("selectedMode")&&(this.option.selected[t]=!1)},toggleSelected:function(t){var e=this.option.selected;e.hasOwnProperty(t)||(e[t]=!0),this[e[t]?"unSelect":"select"](t)},isSelected:function(t){var e=this.option.selected;return!(e.hasOwnProperty(t)&&!e[t])&&M(this._availableNames,t)>=0},defaultOption:{zlevel:0,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,inactiveColor:"#ccc",textStyle:{color:"#333"},selectedMode:!0,tooltip:{show:!1}}});function bg(t,e,i){var n,r={},a="toggleSelected"===t;return i.eachComponent("legend",function(i){a&&null!=n?i[n?"select":"unSelect"](e.name):(i[t](e.name),n=i.isSelected(e.name)),C(i.getData(),function(t){var e=t.get("name");if("\n"!==e&&""!==e){var n=i.isSelected(e);r.hasOwnProperty(e)?r[e]=r[e]&&n:r[e]=n}})}),{name:e.name,selected:r}}ad("legendToggleSelect","legendselectchanged",L(bg,"toggleSelected")),ad("legendSelect","legendselected",L(bg,"select")),ad("legendUnSelect","legendunselected",L(bg,"unSelect"));var Mg=L,Sg=C,Ig=ci,Tg=cd({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new Ig),this._backgroundEl,this._isFirstRender=!0},getContentGroup:function(){return this._contentGroup},render:function(t,e,i){var n=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),t.get("show",!0)){var r=t.get("align");r&&"auto"!==r||(r="right"===t.get("left")&&"vertical"===t.get("orient")?"right":"left"),this.renderInner(r,t,e,i);var a=t.getBoxLayoutParams(),o={width:i.getWidth(),height:i.getHeight()},s=t.get("padding"),l=_l(a,o,s),h=this.layoutInner(t,r,l,n),u=_l(x({width:h.width,height:h.height},a),o,s);this.group.attr("position",[u.x-h.x,u.y-h.y]),this.group.add(this._backgroundEl=function(t,e){var i=il(e.get("padding")),n=e.getItemStyle(["color","opacity"]);return n.fill=e.get("backgroundColor"),t=new Io({shape:{x:t.x-i[3],y:t.y-i[0],width:t.width+i[1]+i[3],height:t.height+i[0]+i[2],r:e.get("borderRadius")},style:n,silent:!0,z2:-1})}(h,t))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl)},renderInner:function(t,e,i,n){var r=this.getContentGroup(),a=Q(),o=e.get("selectedMode"),s=[];i.eachRawSeries(function(t){!t.get("legendHoverLink")&&s.push(t.id)}),Sg(e.getData(),function(l,h){var u=l.get("name");if(this.newlineDisabled||""!==u&&"\n"!==u){var c=i.getSeriesByName(u)[0];if(!a.get(u))if(c){var d=c.getData(),f=d.getVisual("color");"function"==typeof f&&(f=f(c.getDataParams(0)));var p=d.getVisual("legendSymbol")||"roundRect",g=d.getVisual("symbol");this._createItem(u,h,l,e,p,g,t,f,o).on("click",Mg(Cg,u,n)).on("mouseover",Mg(Dg,c.name,null,n,s)).on("mouseout",Mg(Ag,c.name,null,n,s)),a.set(u,!0)}else i.eachRawSeries(function(i){if(!a.get(u)&&i.legendDataProvider){var r=i.legendDataProvider(),c=r.indexOfName(u);if(c<0)return;var d=r.getItemVisual(c,"color");this._createItem(u,h,l,e,"roundRect",null,t,d,o).on("click",Mg(Cg,u,n)).on("mouseover",Mg(Dg,null,u,n,s)).on("mouseout",Mg(Ag,null,u,n,s)),a.set(u,!0)}},this)}else r.add(new Ig({newline:!0}))},this)},_createItem:function(t,e,i,n,r,a,o,s,l){var h=n.get("itemWidth"),u=n.get("itemHeight"),c=n.get("inactiveColor"),d=n.get("symbolKeepAspect"),f=n.isSelected(t),p=new Ig,g=i.getModel("textStyle"),v=i.get("icon"),m=i.getModel("tooltip"),x=m.parentModel;if(r=v||r,p.add($f(r,0,0,h,u,f?s:c,null==d||d)),!v&&a&&(a!==r||"none"===a)){var _=.8*u;"none"===a&&(a="circle"),p.add($f(a,(h-_)/2,(u-_)/2,_,_,f?s:c,null==d||d))}var w="left"===o?h+5:-5,b=o,M=n.get("formatter"),S=t;"string"==typeof M&&M?S=M.replace("{name}",null!=t?t:""):"function"==typeof M&&(S=M(t)),p.add(new ho({style:fs({},g,{text:S,x:w,y:u/2,textFill:f?g.getTextColor():c,textAlign:b,textVerticalAlign:"middle"})}));var I=new Io({shape:p.getBoundingRect(),invisible:!0,tooltip:m.get("show")?y({content:t,formatter:x.get("formatter",!0)||function(){return t},formatterParams:{componentType:"legend",legendIndex:n.componentIndex,name:t,$vars:["name"]}},m.option):null});return p.add(I),p.eachChild(function(t){t.silent=!0}),I.silent=!l,this.getContentGroup().add(p),us(p),p.__legendDataIndex=e,p},layoutInner:function(t,e,i){var n=this.getContentGroup();xl(t.get("orient"),n,t.get("itemGap"),i.width,i.height);var r=n.getBoundingRect();return n.attr("position",[-r.x,-r.y]),this.group.getBoundingRect()},remove:function(){this.getContentGroup().removeAll(),this._isFirstRender=!0}});function Cg(t,e){e.dispatchAction({type:"legendToggleSelect",name:t})}function Dg(t,e,i,n){var r=i.getZr().storage.getDisplayList()[0];r&&r.useHoverLayer||i.dispatchAction({type:"highlight",seriesName:t,name:e,excludeSeriesId:n})}function Ag(t,e,i,n){var r=i.getZr().storage.getDisplayList()[0];r&&r.useHoverLayer||i.dispatchAction({type:"downplay",seriesName:t,name:e,excludeSeriesId:n})}rd(function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries(function(t){for(var i=0;i<e.length;i++)if(!e[i].isSelected(t.name))return!1;return!0})}),Tl.registerSubTypeDefaulter("legend",function(){return"plain"});var kg=wg.extend({type:"legend.scroll",setScrollDataIndex:function(t){this.option.scrollDataIndex=t},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},init:function(t,e,i,n){var r=bl(t);kg.superCall(this,"init",t,e,i,n),Pg(this,t,r)},mergeOption:function(t,e){kg.superCall(this,"mergeOption",t,e),Pg(this,this.option,t)},getOrient:function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}}});function Pg(t,e,i){var n=[1,1];n[t.getOrient().index]=0,wl(e,i,{type:"box",ignoreSize:n})}var Lg=ci,Og=["width","height"],zg=["x","y"],Bg=Tg.extend({type:"legend.scroll",newlineDisabled:!0,init:function(){Bg.superCall(this,"init"),this._currentIndex=0,this.group.add(this._containerGroup=new Lg),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new Lg),this._showController},resetInner:function(){Bg.superCall(this,"resetInner"),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},renderInner:function(t,e,i,n){var r=this;Bg.superCall(this,"renderInner",t,e,i,n);var a=this._controllerGroup,o=e.get("pageIconSize",!0);O(o)||(o=[o,o]),l("pagePrev",0);var s=e.getModel("pageTextStyle");function l(t,i){var s=t+"DataIndex",l=Ts(e.get("pageIcons",!0)[e.getOrient().name][i],{onclick:P(r._pageGo,r,s,e,n)},{x:-o[0]/2,y:-o[1]/2,width:o[0],height:o[1]});l.name=t,a.add(l)}a.add(new ho({name:"pageText",style:{textFill:s.getTextColor(),font:s.getFont(),textVerticalAlign:"middle",textAlign:"center"},silent:!0})),l("pageNext",1)},layoutInner:function(t,e,i,n){var r=this.getContentGroup(),a=this._containerGroup,o=this._controllerGroup,s=t.getOrient().index,l=Og[s],h=Og[1-s],u=zg[1-s];xl(t.get("orient"),r,t.get("itemGap"),s?i.width:null,s?null:i.height),xl("horizontal",o,t.get("pageButtonItemGap",!0));var c=r.getBoundingRect(),d=o.getBoundingRect(),f=this._showController=c[l]>i[l],p=[-c.x,-c.y];n||(p[s]=r.position[s]);var g=[0,0],v=[-d.x,-d.y],m=H(t.get("pageButtonGap",!0),t.get("itemGap",!0));f&&("end"===t.get("pageButtonPosition",!0)?v[s]+=i[l]-d[l]:g[s]+=d[l]+m);v[1-s]+=c[h]/2-d[h]/2,r.attr("position",p),a.attr("position",g),o.attr("position",v);var y=this.group.getBoundingRect();if((y={x:0,y:0})[l]=f?i[l]:c[l],y[h]=Math.max(c[h],d[h]),y[u]=Math.min(0,d[u]+v[1-s]),a.__rectSize=i[l],f){var x={x:0,y:0};x[l]=Math.max(i[l]-d[l]-m,0),x[h]=y[h],a.setClipPath(new Io({shape:x})),a.__rectSize=x[l]}else o.eachChild(function(t){t.attr({invisible:!0,silent:!0})});var _=this._getPageInfo(t);return null!=_.pageIndex&&ws(r,{position:_.contentPosition},!!f&&t),this._updatePageInfoView(t,_),y},_pageGo:function(t,e,i){var n=this._getPageInfo(e)[t];null!=n&&i.dispatchAction({type:"legendScroll",scrollDataIndex:n,legendId:e.id})},_updatePageInfoView:function(t,e){var i=this._controllerGroup;C(["pagePrev","pageNext"],function(n){var r=null!=e[n+"DataIndex"],a=i.childOfName(n);a&&(a.setStyle("fill",r?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),a.cursor=r?"pointer":"default")});var n=i.childOfName("pageText"),r=t.get("pageFormatter"),a=e.pageIndex,o=null!=a?a+1:0,s=e.pageCount;n&&r&&n.setStyle("text",B(r)?r.replace("{current}",o).replace("{total}",s):r({current:o,total:s}))},_getPageInfo:function(t){var e=t.get("scrollDataIndex",!0),i=this.getContentGroup(),n=this._containerGroup.__rectSize,r=t.getOrient().index,a=Og[r],o=zg[r],s=this._findTargetItemIndex(e),l=i.children(),h=l[s],u=l.length,c=u?1:0,d={contentPosition:i.position.slice(),pageCount:c,pageIndex:c-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!h)return d;var f=y(h);d.contentPosition[r]=-f.s;for(var p=s+1,g=f,v=f,m=null;p<=u;++p)(!(m=y(l[p]))&&v.e>g.s+n||m&&!x(m,g.s))&&(g=v.i>g.i?v:m)&&(null==d.pageNextDataIndex&&(d.pageNextDataIndex=g.i),++d.pageCount),v=m;for(p=s-1,g=f,v=f,m=null;p>=-1;--p)(m=y(l[p]))&&x(v,m.s)||!(g.i<v.i)||(v=g,null==d.pagePrevDataIndex&&(d.pagePrevDataIndex=g.i),++d.pageCount,++d.pageIndex),g=m;return d;function y(t){if(t){var e=t.getBoundingRect(),i=e[o]+t.position[r];return{s:i,e:i+e[a],i:t.__legendDataIndex}}}function x(t,e){return t.e>=e&&t.s<=e+n}},_findTargetItemIndex:function(t){var e,i=this.getContentGroup();return this._showController?i.eachChild(function(i,n){i.__legendDataIndex===t&&(e=n)}):e=0,e}});ad("legendScroll","legendscroll",function(t,e){var i=t.scrollDataIndex;null!=i&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(i)})});var Eg=function(t,e){var i,n=[],r=t.seriesIndex;if(null==r||!(i=e.getSeriesByIndex(r)))return{point:[]};var a=i.getData(),o=cr(a,t);if(null==o||o<0||O(o))return{point:[]};var s=a.getItemGraphicEl(o),l=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)n=l.dataToPoint(a.getValues(D(l.dimensions,function(t){return a.mapDimension(t)}),o,!0))||[];else if(s){var h=s.getBoundingRect().clone();h.applyTransform(s.transform),n=[h.x+h.width/2,h.y+h.height/2]}return{point:n,el:s}},Rg=C,Ng=L,Fg=dr();function Wg(t,e,i,n,r){var a=t.axis;if(!a.scale.isBlank()&&a.containData(e))if(t.involveSeries){var o=function(t,e){var i=e.axis,n=i.dim,r=t,a=[],o=Number.MAX_VALUE,s=-1;return Rg(e.seriesModels,function(e,l){var h,u,c=e.getData().mapDimension(n,!0);if(e.getAxisTooltipData){var d=e.getAxisTooltipData(c,t,i);u=d.dataIndices,h=d.nestestValue}else{if(!(u=e.getData().indicesOfNearest(c[0],t,"category"===i.type?.5:null)).length)return;h=e.getData().get(c[0],u[0])}if(null!=h&&isFinite(h)){var f=t-h,p=Math.abs(f);p<=o&&((p<o||f>=0&&s<0)&&(o=p,s=f,r=h,a.length=0),Rg(u,function(t){a.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})}))}}),{payloadBatch:a,snapToValue:r}}(e,t),s=o.payloadBatch,l=o.snapToValue;s[0]&&null==r.seriesIndex&&y(r,s[0]),!n&&t.snap&&a.containData(l)&&null!=l&&(e=l),i.showPointer(t,e,s,r),i.showTooltip(t,o,l)}else i.showPointer(t,e)}function Vg(t,e,i,n){t[e.key]={value:i,payloadBatch:n}}function Hg(t,e,i,n){var r=i.payloadBatch,a=e.axis,o=a.model,s=e.axisPointerModel;if(e.triggerTooltip&&r.length){var l=e.coordSys.model,h=dg(l),u=t.map[h];u||(u=t.map[h]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(u)),u.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesDataIndices:r.slice()})}}function Gg(t){var e=t.axis.model,i={},n=i.axisDim=t.axis.dim;return i.axisIndex=i[n+"AxisIndex"]=e.componentIndex,i.axisName=i[n+"AxisName"]=e.name,i.axisId=i[n+"AxisId"]=e.id,i}function Zg(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}ud({type:"axisPointer",coordSysAxesInfo:null,defaultOption:{show:"auto",triggerOn:null,zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#aaa",width:1,type:"solid"},shadowStyle:{color:"rgba(150,150,150,0.3)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,shadowBlur:3,shadowColor:"#aaa"},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 Xg=dr(),Yg=C;function jg(t,e,i){if(!n.node){var r=e.getZr();Xg(r).records||(Xg(r).records={}),function(t,e){if(Xg(t).initialized)return;function i(i,n){t.on(i,function(i){var r=function(t){var e={showTip:[],hideTip:[]},i=function(n){var r=e[n.type];r?r.push(n):(n.dispatchAction=i,t.dispatchAction(n))};return{dispatchAction:i,pendings:e}}(e);Yg(Xg(t).records,function(t){t&&n(t,i,r.dispatchAction)}),function(t,e){var i,n=t.showTip.length,r=t.hideTip.length;n?i=t.showTip[n-1]:r&&(i=t.hideTip[r-1]);i&&(i.dispatchAction=null,e.dispatchAction(i))}(r.pendings,e)})}Xg(t).initialized=!0,i("click",L(Ug,"click")),i("mousemove",L(Ug,"mousemove")),i("globalout",qg)}(r,e),(Xg(r).records[t]||(Xg(r).records[t]={})).handler=i}}function qg(t,e,i){t.handler("leave",null,i)}function Ug(t,e,i,n){e.handler(t,i,n)}function $g(t,e){if(!n.node){var i=e.getZr();(Xg(i).records||{})[t]&&(Xg(i).records[t]=null)}}var Kg=cd({type:"axisPointer",render:function(t,e,i){var n=e.getComponent("tooltip"),r=t.get("triggerOn")||n&&n.get("triggerOn")||"mousemove|click";jg("axisPointer",i,function(t,e,i){"none"!==r&&("leave"===t||r.indexOf(t)>=0)&&i({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})})},remove:function(t,e){$g(e.getZr(),"axisPointer"),Kg.superApply(this._model,"remove",arguments)},dispose:function(t,e){$g("axisPointer",e),Kg.superApply(this._model,"dispose",arguments)}}),Qg=dr(),Jg=g,tv=P;function ev(){}function iv(t,e,i,n){(function t(e,i){if(E(e)&&E(i)){var n=!0;return C(i,function(i,r){n=n&&t(e[r],i)}),!!n}return e===i})(Qg(i).lastProp,n)||(Qg(i).lastProp=n,e?ws(i,n,t):(i.stopAnimation(),i.attr(n)))}function nv(t,e){t[e.get("label.show")?"show":"hide"]()}function rv(t){return{position:t.position.slice(),rotation:t.rotation||0}}function av(t,e,i){var n=e.get("z"),r=e.get("zlevel");t&&t.traverse(function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=r&&(t.zlevel=r),t.silent=i)})}function ov(t,e,i,n,r){var a=sv(i.get("value"),e.axis,e.ecModel,i.get("seriesDataIndices"),{precision:i.get("label.precision"),formatter:i.get("label.formatter")}),o=i.getModel("label"),s=il(o.get("padding")||0),l=o.getFont(),h=$i(a,l),u=r.position,c=h.width+s[1]+s[3],d=h.height+s[0]+s[2],f=r.align;"right"===f&&(u[0]-=c),"center"===f&&(u[0]-=c/2);var p=r.verticalAlign;"bottom"===p&&(u[1]-=d),"middle"===p&&(u[1]-=d/2),function(t,e,i,n){var r=n.getWidth(),a=n.getHeight();t[0]=Math.min(t[0]+e,r)-e,t[1]=Math.min(t[1]+i,a)-i,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}(u,c,d,n);var g=o.get("backgroundColor");g&&"auto"!==g||(g=e.get("axisLine.lineStyle.color")),t.label={shape:{x:0,y:0,width:c,height:d,r:o.get("borderRadius")},position:u.slice(),style:{text:a,textFont:l,textFill:o.getTextColor(),textPosition:"inside",fill:g,stroke:o.get("borderColor")||"transparent",lineWidth:o.get("borderWidth")||0,shadowBlur:o.get("shadowBlur"),shadowColor:o.get("shadowColor"),shadowOffsetX:o.get("shadowOffsetX"),shadowOffsetY:o.get("shadowOffsetY")},z2:10}}function sv(t,e,i,n,r){t=e.scale.parse(t);var a=e.scale.getLabel(t,{precision:r.precision}),o=r.formatter;if(o){var s={value:Nf(e,t),seriesData:[]};C(n,function(t){var e=i.getSeriesByIndex(t.seriesIndex),n=t.dataIndexInside,r=e&&e.getDataParams(n);r&&s.seriesData.push(r)}),B(o)?a=o.replace("{value}",a):z(o)&&(a=o(s))}return a}function lv(t,e,i){var n=Gt();return qt(n,n,i.rotation),jt(n,n,i.position),Ms([t.dataToCoord(e),(i.labelOffset||0)+(i.labelDirection||1)*(i.labelMargin||0)],n)}ev.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(t,e,i,n){var r=e.get("value"),a=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=i,n||this._lastValue!==r||this._lastStatus!==a){this._lastValue=r,this._lastStatus=a;var o=this._group,s=this._handle;if(!a||"hide"===a)return o&&o.hide(),void(s&&s.hide());o&&o.show(),s&&s.show();var l={};this.makeElOption(l,r,t,e,i);var h=l.graphicKey;h!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=h;var u=this._moveAnimation=this.determineAnimation(t,e);if(o){var c=L(iv,e,u);this.updatePointerEl(o,l,c,e),this.updateLabelEl(o,l,c,e)}else o=this._group=new ci,this.createPointerEl(o,l,t,e),this.createLabelEl(o,l,t,e),i.getZr().add(o);av(o,e,!0),this._renderHandle(r)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineAnimation:function(t,e){var i=e.get("animation"),n=t.axis,r="category"===n.type,a=e.get("snap");if(!a&&!r)return!1;if("auto"===i||null==i){var o=this.animationThreshold;if(r&&n.getBandWidth()>o)return!0;if(a){var s=ug(t).seriesDataCount,l=n.getExtent();return Math.abs(l[0]-l[1])/s>o}return!1}return!0===i},makeElOption:function(t,e,i,n,r){},createPointerEl:function(t,e,i,n){var r=e.pointer;if(r){var a=Qg(t).pointerEl=new Cs[r.type](Jg(e.pointer));t.add(a)}},createLabelEl:function(t,e,i,n){if(e.label){var r=Qg(t).labelEl=new Io(Jg(e.label));t.add(r),nv(r,n)}},updatePointerEl:function(t,e,i){var n=Qg(t).pointerEl;n&&(n.setStyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,i,n){var r=Qg(t).labelEl;r&&(r.setStyle(e.label.style),i(r,{shape:e.label.shape,position:e.label.position}),nv(r,n))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e,i=this._axisPointerModel,n=this._api.getZr(),r=this._handle,a=i.getModel("handle"),o=i.get("status");if(!a.get("show")||!o||"hide"===o)return r&&n.remove(r),void(this._handle=null);this._handle||(e=!0,r=this._handle=Ts(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){Pt(t.event)},onmousedown:tv(this._onHandleDragMove,this,0,0),drift:tv(this._onHandleDragMove,this),ondragend:tv(this._onHandleDragEnd,this)}),n.add(r)),av(r,i,!1);r.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=a.get("size");O(s)||(s=[s,s]),r.attr("scale",[s[0]/2,s[1]/2]),vu(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},_moveHandleToValue:function(t,e){iv(this._axisPointerModel,!e&&this._moveAnimation,this._handle,rv(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(rv(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(rv(n)),Qg(i).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){if(this._handle){var 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}]})}},_onHandleDragEnd:function(t){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),i=this._group,n=this._handle;e&&i&&(this._lastGraphicKey=null,i&&e.remove(i),n&&e.remove(n),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,i){return{x:t[i=i||0],y:t[1-i],width:e[i],height:e[1-i]}}},ev.prototype.constructor=ev,wr(ev);var hv=ev.extend({makeElOption:function(t,e,i,n,r){var a=i.axis,o=a.grid,s=n.get("type"),l=uv(o,a).getOtherAxis(a).getGlobalExtent(),h=a.toGlobalCoord(a.dataToCoord(e,!0));if(s&&"none"!==s){var u=function(t){var e,i=t.get("type"),n=t.getModel(i+"Style");return"line"===i?(e=n.getLineStyle()).fill=null:"shadow"===i&&((e=n.getAreaStyle()).stroke=null),e}(n),c=cv[s](a,h,l,u);c.style=u,t.graphicKey=c.type,t.pointer=c}!function(t,e,i,n,r,a){var o=Jp.innerTextLayout(i.rotation,0,i.labelDirection);i.labelMargin=r.get("label.margin"),ov(e,n,r,a,{position:lv(n.axis,t,i),align:o.textAlign,verticalAlign:o.textVerticalAlign})}(e,t,mg(o.model,i),i,n,r)},getHandleTransform:function(t,e,i){var n=mg(e.axis.grid.model,e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:lv(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i,n){var r=i.axis,a=r.grid,o=r.getGlobalExtent(!0),s=uv(a,r).getOtherAxis(r).getGlobalExtent(),l="x"===r.dim?0:1,h=t.position;h[l]+=e[l],h[l]=Math.min(o[1],h[l]),h[l]=Math.max(o[0],h[l]);var u=(s[1]+s[0])/2,c=[u,u];c[l]=h[l];return{position:h,rotation:t.rotation,cursorPoint:c,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}}});function uv(t,e){var i={};return i[e.dim+"AxisIndex"]=e.index,t.getCartesian(i)}var cv={line:function(t,e,i,n){var r,a,o,s=(r=[e,i[0]],a=[e,i[1]],o=dv(t),{x1:r[o=o||0],y1:r[1-o],x2:a[o],y2:a[1-o]});return Uo({shape:s,style:n}),{type:"Line",shape:s}},shadow:function(t,e,i,n){var r,a,o,s=Math.max(1,t.getBandWidth()),l=i[1]-i[0];return{type:"Rect",shape:(r=[e-s/2,i[0]],a=[s,l],o=dv(t),{x:r[o=o||0],y:r[1-o],width:a[o],height:a[1-o]})}}};function dv(t){return"x"===t.dim?0:1}fg.registerAxisPointerClass("CartesianAxisPointer",hv),nd(function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!O(e)&&(t.axisPointer.link=[e])}}),rd(vc.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=lg(t,e)}),ad({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},function(t,e,i){var n=t.currTrigger,r=[t.x,t.y],a=t,o=t.dispatchAction||P(i.dispatchAction,i),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){Zg(r)&&(r=Eg({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var l=Zg(r),h=a.axesInfo,u=s.axesInfo,c="leave"===n||Zg(r),d={},f={},p={list:[],map:{}},g={showPointer:Ng(Vg,f),showTooltip:Ng(Hg,p)};Rg(s.coordSysMap,function(t,e){var i=l||t.containPoint(r);Rg(s.coordSysAxesInfo[e],function(t,e){var n=t.axis,a=function(t,e){for(var i=0;i<(t||[]).length;i++){var n=t[i];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}(h,t);if(!c&&i&&(!h||a)){var o=a&&a.value;null!=o||l||(o=n.pointToData(r)),null!=o&&Wg(t,o,g,!1,d)}})});var v={};return Rg(u,function(t,e){var i=t.linkGroup;i&&!f[e]&&Rg(i.axesInfo,function(e,n){var r=f[n];if(e!==t&&r){var a=r.value;i.mapper&&(a=t.axis.scale.parse(i.mapper(a,Gg(e),Gg(t)))),v[t.key]=a}})}),Rg(v,function(t,e){Wg(u[e],t,g,!0,d)}),function(t,e,i){var n=i.axesInfo=[];Rg(e,function(e,i){var r=e.axisPointerModel.option,a=t[i];a?(!e.useHandle&&(r.status="show"),r.value=a.value,r.seriesDataIndices=(a.payloadBatch||[]).slice()):!e.useHandle&&(r.status="hide"),"show"===r.status&&n.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:r.value})})}(f,u,d),function(t,e,i,n){if(!Zg(e)&&t.list.length){var r=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:i.tooltipOption,position:i.position,dataIndexInside:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:t.list})}else n({type:"hideTip"})}(p,r,t,o),function(t,e,i){var n=i.getZr(),r=Fg(n).axisPointerLastHighlights||{},a=Fg(n).axisPointerLastHighlights={};Rg(t,function(t,e){var i=t.axisPointerModel.option;"show"===i.status&&Rg(i.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;a[e]=t})});var o=[],s=[];C(r,function(t,e){!a[e]&&s.push(t)}),C(a,function(t,e){!r[e]&&o.push(t)}),s.length&&i.dispatchAction({type:"downplay",escapeConnect:!0,batch:s}),o.length&&i.dispatchAction({type:"highlight",escapeConnect:!0,batch:o})}(u,0,i),d}}),ud({type:"tooltip",dependencies:["axisPointer"],defaultOption:{zlevel:0,z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:!1,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"rgba(50,50,50,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#fff",fontSize:14}}});var fv=C,pv=el,gv=["","-webkit-","-moz-","-o-"];function vv(t){var e,i,r=[],a=t.get("transitionDuration"),o=t.get("backgroundColor"),s=t.getModel("textStyle"),l=t.get("padding");return a&&r.push((i="left "+(e=a)+"s cubic-bezier(0.23, 1, 0.32, 1),top "+e+"s cubic-bezier(0.23, 1, 0.32, 1)",D(gv,function(t){return t+"transition:"+i}).join(";"))),o&&(n.canvasSupported?r.push("background-Color:"+o):(r.push("background-Color:#"+De(o)),r.push("filter:alpha(opacity=70)"))),fv(["width","color","radius"],function(e){var i="border-"+e,n=pv(i),a=t.get(n);null!=a&&r.push(i+":"+a+("color"===e?"":"px"))}),r.push(function(t){var e=[],i=t.get("fontSize"),n=t.getTextColor();return n&&e.push("color:"+n),e.push("font:"+t.getFont()),i&&e.push("line-height:"+Math.round(3*i/2)+"px"),fv(["decoration","align"],function(i){var n=t.get(i);n&&e.push("text-"+i+":"+n)}),e.join(";")}(s)),null!=l&&r.push("padding:"+il(l).join("px ")+"px"),r.join(";")+";"}function mv(t,e){if(n.wxa)return null;var i=document.createElement("div"),r=this._zr=e.getZr();this.el=i,this._x=e.getWidth()/2,this._y=e.getHeight()/2,t.appendChild(i),this._container=t,this._show=!1,this._hideTimeout;var a=this;i.onmouseenter=function(){a._enterable&&(clearTimeout(a._hideTimeout),a._show=!0),a._inContent=!0},i.onmousemove=function(e){if(e=e||window.event,!a._enterable){var i=r.handler;At(t,e,!0),i.dispatch("mousemove",e)}},i.onmouseleave=function(){a._enterable&&a._show&&a.hideLater(a._hideDelay),a._inContent=!1}}function yv(t){this._zr=t.getZr(),this._show=!1,this._hideTimeout}mv.prototype={constructor:mv,_enterable:!0,update:function(){var t=this._container,e=t.currentStyle||document.defaultView.getComputedStyle(t),i=t.style;"absolute"!==i.position&&"absolute"!==e.position&&(i.position="relative")},show:function(t){clearTimeout(this._hideTimeout);var e=this.el;e.style.cssText="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+vv(t)+";left:"+this._x+"px;top:"+this._y+"px;"+(t.get("extraCssText")||""),e.style.display=e.innerHTML?"block":"none",e.style.pointerEvents=this._enterable?"auto":"none",this._show=!0},setContent:function(t){this.el.innerHTML=null==t?"":t},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el;return[t.clientWidth,t.clientHeight]},moveTo:function(t,e){var i,n=this._zr;n&&n.painter&&(i=n.painter.getViewportRootOffset())&&(t+=i.offsetLeft,e+=i.offsetTop);var r=this.el.style;r.left=t+"px",r.top=e+"px",this._x=t,this._y=e},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(P(this.hide,this),t)):this.hide())},isShow:function(){return this._show},getOuterSize:function(){var t=this.el.clientWidth,e=this.el.clientHeight;if(document.defaultView&&document.defaultView.getComputedStyle){var i=document.defaultView.getComputedStyle(this.el);i&&(t+=parseInt(i.paddingLeft,10)+parseInt(i.paddingRight,10)+parseInt(i.borderLeftWidth,10)+parseInt(i.borderRightWidth,10),e+=parseInt(i.paddingTop,10)+parseInt(i.paddingBottom,10)+parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10))}return{width:t,height:e}}},yv.prototype={constructor:yv,_enterable:!0,update:function(){},show:function(t){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.attr("show",!0),this._show=!0},setContent:function(t,e,i){this.el&&this._zr.remove(this.el);for(var n={},r=t,a=r.indexOf("{marker");a>=0;){var o=r.indexOf("|}"),s=r.substr(a+"{marker".length,o-a-"{marker".length);s.indexOf("sub")>-1?n["marker"+s]={textWidth:4,textHeight:4,textBorderRadius:2,textBackgroundColor:e[s],textOffset:[3,0]}:n["marker"+s]={textWidth:10,textHeight:10,textBorderRadius:5,textBackgroundColor:e[s]},a=(r=r.substr(o+1)).indexOf("{marker")}this.el=new ho({style:{rich:n,text:t,textLineHeight:20,textBackgroundColor:i.get("backgroundColor"),textBorderRadius:i.get("borderRadius"),textFill:i.get("textStyle.color"),textPadding:i.get("padding")},z:i.get("z")}),this._zr.add(this.el);var l=this;this.el.on("mouseover",function(){l._enterable&&(clearTimeout(l._hideTimeout),l._show=!0),l._inContent=!0}),this.el.on("mouseout",function(){l._enterable&&l._show&&l.hideLater(l._hideDelay),l._inContent=!1})},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el.getBoundingRect();return[t.width,t.height]},moveTo:function(t,e){this.el&&this.el.attr("position",[t,e])},hide:function(){this.el.hide(),this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(P(this.hide,this),t)):this.hide())},isShow:function(){return this._show},getOuterSize:function(){return this.getSize()}};var xv=P,_v=C,wv=Vs,bv=new Io({shape:{x:-1,y:-1,width:2,height:2}});function Mv(t){for(var e=t.pop();t.length;){var i=t.pop();i&&(zs.isInstance(i)&&(i=i.get("tooltip",!0)),"string"==typeof i&&(i={formatter:i}),e=new zs(i,e,e.ecModel))}return e}function Sv(t,e){return t.dispatchAction||P(e.dispatchAction,e)}function Iv(t){return"center"===t||"middle"===t}cd({type:"tooltip",init:function(t,e){if(!n.node){var i,r=t.getComponent("tooltip").get("renderMode");this._renderMode=mr(r),"html"===this._renderMode?(i=new mv(e.getDom(),e),this._newLine="<br/>"):(i=new yv(e),this._newLine="\n"),this._tooltipContent=i}},render:function(t,e,i){if(!n.node){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=i,this._lastDataByCoordSys=null,this._alwaysShowContent=t.get("alwaysShowContent");var r=this._tooltipContent;r.update(),r.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var t=this._tooltipModel.get("triggerOn");jg("itemTooltip",this._api,xv(function(e,i,n){"none"!==t&&(t.indexOf(e)>=0?this._tryShow(i,n):"leave"===e&&this._hide(n))},this))},_keepShow:function(){var t=this._tooltipModel,e=this._ecModel,i=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==t.get("triggerOn")){var n=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){n.manuallyShowTip(t,e,i,{x:n._lastX,y:n._lastY})})}},manuallyShowTip:function(t,e,i,r){if(r.from!==this.uid&&!n.node){var a=Sv(r,i);this._ticket="";var o=r.dataByCoordSys;if(r.tooltip&&null!=r.x&&null!=r.y){var s=bv;s.position=[r.x,r.y],s.update(),s.tooltip=r.tooltip,this._tryShow({offsetX:r.x,offsetY:r.y,target:s},a)}else if(o)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,event:{},dataByCoordSys:r.dataByCoordSys,tooltipOption:r.tooltipOption},a);else if(null!=r.seriesIndex){if(this._manuallyAxisShowTip(t,e,i,r))return;var l=Eg(r,e),h=l.point[0],u=l.point[1];null!=h&&null!=u&&this._tryShow({offsetX:h,offsetY:u,position:r.position,target:l.el,event:{}},a)}else null!=r.x&&null!=r.y&&(i.dispatchAction({type:"updateAxisPointer",x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:i.getZr().findHover(r.x,r.y).target,event:{}},a))}},manuallyHideTip:function(t,e,i,n){var r=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&r.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,n.from!==this.uid&&this._hide(Sv(n,i))},_manuallyAxisShowTip:function(t,e,i,n){var r=n.seriesIndex,a=n.dataIndex,o=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=r&&null!=a&&null!=o){var s=e.getSeriesByIndex(r);if(s)if("axis"===(t=Mv([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model,t])).get("trigger"))return i.dispatchAction({type:"updateAxisPointer",seriesIndex:r,dataIndex:a,position:n.position}),!0}},_tryShow:function(t,e){var i=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var n=t.dataByCoordSys;n&&n.length?this._showAxisTooltip(n,t):i&&null!=i.dataIndex?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(t,i,e)):i&&i.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(t,i,e)):(this._lastDataByCoordSys=null,this._hide(e))}},_showOrMove:function(t,e){var i=t.get("showDelay");e=P(e,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(e,i):e()},_showAxisTooltip:function(t,e){var i=this._ecModel,n=this._tooltipModel,r=[e.offsetX,e.offsetY],a=[],o=[],s=Mv([e.tooltipOption,n]),l=this._renderMode,h=this._newLine,u={};_v(t,function(t){_v(t.dataByAxis,function(t){var e=i.getComponent(t.axisDim+"Axis",t.axisIndex),n=t.value,r=[];if(e&&null!=n){var s=sv(n,e.axis,i,t.seriesDataIndices,t.valueLabelOpt);C(t.seriesDataIndices,function(a){var h=i.getSeriesByIndex(a.seriesIndex),c=a.dataIndexInside,d=h&&h.getDataParams(c);if(d.axisDim=t.axisDim,d.axisIndex=t.axisIndex,d.axisType=t.axisType,d.axisId=t.axisId,d.axisValue=Nf(e.axis,n),d.axisValueLabel=s,d){o.push(d);var f,p=h.formatTooltip(c,!0,null,l);if(E(p)){f=p.html;var g=p.markers;v(u,g)}else f=p;r.push(f)}});var c=s;"html"!==l?a.push(r.join(h)):a.push((c?al(c)+h:"")+r.join(h))}})},this),a.reverse(),a=a.join(this._newLine+this._newLine);var c=e.position;this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(s,c,r[0],r[1],this._tooltipContent,o):this._showTooltipContent(s,a,o,Math.random(),r[0],r[1],c,void 0,u)})},_showSeriesItemTooltip:function(t,e,i){var n=this._ecModel,r=e.seriesIndex,a=n.getSeriesByIndex(r),o=e.dataModel||a,s=e.dataIndex,l=e.dataType,h=o.getData(),u=Mv([h.getItemModel(s),o,a&&(a.coordinateSystem||{}).model,this._tooltipModel]),c=u.get("trigger");if(null==c||"item"===c){var d,f,p=o.getDataParams(s,l),g=o.formatTooltip(s,!1,l,this._renderMode);E(g)?(d=g.html,f=g.markers):(d=g,f=null);var v="item_"+o.name+"_"+s;this._showOrMove(u,function(){this._showTooltipContent(u,d,p,v,t.offsetX,t.offsetY,t.position,t.target,f)}),i({type:"showTip",dataIndexInside:s,dataIndex:h.getRawIndex(s),seriesIndex:r,from:this.uid})}},_showComponentItemTooltip:function(t,e,i){var n=e.tooltip;if("string"==typeof n){n={content:n,formatter:n}}var r=new zs(n,this._tooltipModel,this._ecModel),a=r.get("content"),o=Math.random();this._showOrMove(r,function(){this._showTooltipContent(r,a,r.get("formatterParams")||{},o,t.offsetX,t.offsetY,t.position,e)}),i({type:"showTip",from:this.uid})},_showTooltipContent:function(t,e,i,n,r,a,o,s,l){if(this._ticket="",t.get("showContent")&&t.get("show")){var h=this._tooltipContent,u=t.get("formatter");o=o||t.get("position");var c=e;if(u&&"string"==typeof u)c=ll(u,i,!0);else if("function"==typeof u){var d=xv(function(e,n){e===this._ticket&&(h.setContent(n,l,t),this._updatePosition(t,o,r,a,h,i,s))},this);this._ticket=n,c=u(i,n,d)}h.setContent(c,l,t),h.show(t),this._updatePosition(t,o,r,a,h,i,s)}},_updatePosition:function(t,e,i,n,r,a,o){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var h=r.getSize(),u=t.get("align"),c=t.get("verticalAlign"),d=o&&o.getBoundingRect().clone();if(o&&d.applyTransform(o.transform),"function"==typeof e&&(e=e([i,n],a,r.el,d,{viewSize:[s,l],contentSize:h.slice()})),O(e))i=wv(e[0],s),n=wv(e[1],l);else if(E(e)){e.width=h[0],e.height=h[1];var f=_l(e,{width:s,height:l});i=f.x,n=f.y,u=null,c=null}else if("string"==typeof e&&o){var p=function(t,e,i){var n=i[0],r=i[1],a=0,o=0,s=e.width,l=e.height;switch(t){case"inside":a=e.x+s/2-n/2,o=e.y+l/2-r/2;break;case"top":a=e.x+s/2-n/2,o=e.y-r-5;break;case"bottom":a=e.x+s/2-n/2,o=e.y+l+5;break;case"left":a=e.x-n-5,o=e.y+l/2-r/2;break;case"right":a=e.x+s+5,o=e.y+l/2-r/2}return[a,o]}(e,d,h);i=p[0],n=p[1]}else{p=function(t,e,i,n,r,a,o){var s=i.getOuterSize(),l=s.width,h=s.height;null!=a&&(t+l+a>n?t-=l+a:t+=a);null!=o&&(e+h+o>r?e-=h+o:e+=o);return[t,e]}(i,n,r,s,l,u?null:20,c?null:20);i=p[0],n=p[1]}if(u&&(i-=Iv(u)?h[0]/2:"right"===u?h[0]:0),c&&(n-=Iv(c)?h[1]/2:"bottom"===c?h[1]:0),t.get("confine")){p=function(t,e,i,n,r){var a=i.getOuterSize(),o=a.width,s=a.height;return t=Math.min(t+o,n)-o,e=Math.min(e+s,r)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}(i,n,r,s,l);i=p[0],n=p[1]}r.moveTo(i,n)},_updateContentNotChangedOnAxis:function(t){var e=this._lastDataByCoordSys,i=!!e&&e.length===t.length;return i&&_v(e,function(e,n){var r=e.dataByAxis||{},a=(t[n]||{}).dataByAxis||[];(i&=r.length===a.length)&&_v(r,function(t,e){var n=a[e]||{},r=t.seriesDataIndices||[],o=n.seriesDataIndices||[];(i&=t.value===n.value&&t.axisType===n.axisType&&t.axisId===n.axisId&&r.length===o.length)&&_v(r,function(t,e){var n=o[e];i&=t.seriesIndex===n.seriesIndex&&t.dataIndex===n.dataIndex})})}),this._lastDataByCoordSys=t,!!i},_hide:function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},dispose:function(t,e){n.node||(this._tooltipContent.hide(),$g("itemTooltip",e))}}),ad({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){}),ad({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){}),Tl.registerSubTypeDefaulter("dataZoom",function(){return"slider"});var Tv=["cartesian2d","polar","singleAxis"];var Cv,Dv,Av,kv,Pv=(Dv=["axisIndex","axis","index","id"],Av=D(Cv=(Cv=["x","y","z","radius","angle","single"]).slice(),dl),kv=D(Dv=(Dv||[]).slice(),dl),function(t,e){C(Cv,function(i,n){for(var r={name:i,capital:Av[n]},a=0;a<Dv.length;a++)r[Dv[a]]=i+kv[a];t.call(e,r)})});function Lv(t,e,i){return function(r){var a,o={nodes:[],records:{}};if(e(function(t){o.records[t.name]={}}),!r)return o;n(r,o);do{a=!1,t(s)}while(a);function s(t){!function(t,e){return M(e.nodes,t)>=0}(t,o)&&function(t,n){var r=!1;return e(function(e){C(i(t,e)||[],function(t){n.records[e.name][t]&&(r=!0)})}),r}(t,o)&&(n(t,o),a=!0)}return o};function n(t,n){n.nodes.push(t),e(function(e){C(i(t,e)||[],function(t){n.records[e.name][t]=!0})})}}var Ov=C,zv=Gs,Bv=function(t,e,i,n){this._dimName=t,this._axisIndex=e,this._valueWindow,this._percentWindow,this._dataExtent,this._minMaxSpan,this.ecModel=n,this._dataZoomModel=i};function Ev(t,e){var i=t.getAxisModel(),n=t._percentWindow,r=t._valueWindow;if(n){var a=Xs(r,[0,500]);a=Math.min(a,20);var o=e||0===n[0]&&100===n[1];i.setRange(o?null:+r[0].toFixed(a),o?null:+r[1].toFixed(a))}}Bv.prototype={constructor:Bv,hostedBy:function(t){return this._dataZoomModel===t},getDataValueWindow:function(){return this._valueWindow.slice()},getDataPercentWindow:function(){return this._percentWindow.slice()},getTargetSeriesModels:function(){var t=[],e=this.ecModel;return e.eachSeries(function(i){if(a=i.get("coordinateSystem"),M(Tv,a)>=0){var n=this._dimName,r=e.queryComponents({mainType:n+"Axis",index:i.get(n+"AxisIndex"),id:i.get(n+"AxisId")})[0];this._axisIndex===(r&&r.componentIndex)&&t.push(i)}var a},this),t},getAxisModel:function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},getOtherAxisModel:function(){var t,e,i,n=this._dimName,r=this.ecModel,a=this.getAxisModel();return"x"===n||"y"===n?(e="gridIndex",t="x"===n?"y":"x"):(e="polarIndex",t="angle"===n?"radius":"angle"),r.eachComponent(t+"Axis",function(t){(t.get(e)||0)===(a.get(e)||0)&&(i=t)}),i},getMinMaxSpan:function(){return g(this._minMaxSpan)},calculateDataWindow:function(t){var e=this._dataExtent,i=this.getAxisModel().axis.scale,n=this._dataZoomModel.getRangePropMode(),r=[0,100],a=[t.start,t.end],o=[];return Ov(["startValue","endValue"],function(e){o.push(null!=t[e]?i.parse(t[e]):null)}),Ov([0,1],function(t){var s=o[t],l=a[t];"percent"===n[t]?(null==l&&(l=r[t]),s=i.parse(Ws(l,r,e,!0))):l=Ws(s,e,r,!0),o[t]=s,a[t]=l}),{valueWindow:zv(o),percentWindow:zv(a)}},reset:function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=function(t,e,i){var n=[1/0,-1/0];Ov(i,function(t){var i=t.getData();i&&Ov(i.mapDimension(e,!0),function(t){var e=i.getApproximateExtent(t);e[0]<n[0]&&(n[0]=e[0]),e[1]>n[1]&&(n[1]=e[1])})}),n[1]<n[0]&&(n=[NaN,NaN]);return function(t,e){var i=t.getAxisModel(),n=i.getMin(!0),r="category"===i.get("type"),a=r&&i.getCategories().length;null!=n&&"dataMin"!==n&&"function"!=typeof n?e[0]=n:r&&(e[0]=a>0?0:NaN);var o=i.getMax(!0);null!=o&&"dataMax"!==o&&"function"!=typeof o?e[1]=o:r&&(e[1]=a>0?a-1:NaN),i.get("scale",!0)||(e[0]>0&&(e[0]=0),e[1]<0&&(e[1]=0))}(t,n),n}(this,this._dimName,e);var i=this.calculateDataWindow(t.option);this._valueWindow=i.valueWindow,this._percentWindow=i.percentWindow,function(t){var e=t._minMaxSpan={},i=t._dataZoomModel;Ov(["min","max"],function(n){e[n+"Span"]=i.get(n+"Span");var r=i.get(n+"ValueSpan");if(null!=r&&(e[n+"ValueSpan"]=r,null!=(r=t.getAxisModel().axis.scale.parse(r)))){var a=t._dataExtent;e[n+"Span"]=Ws(a[0]+r,a,[0,100],!0)}})}(this),Ev(this)}},restore:function(t){t===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,Ev(this,!0))},filterData:function(t,e){if(t===this._dataZoomModel){var i=this._dimName,n=this.getTargetSeriesModels(),r=t.get("filterMode"),a=this._valueWindow;"none"!==r&&Ov(n,function(t){var e=t.getData(),n=e.mapDimension(i,!0);n.length&&("weakFilter"===r?e.filterSelf(function(t){for(var i,r,o,s=0;s<n.length;s++){var l=e.get(n[s],t),h=!isNaN(l),u=l<a[0],c=l>a[1];if(h&&!u&&!c)return!0;h&&(o=!0),u&&(i=!0),c&&(r=!0)}return o&&i&&r}):Ov(n,function(i){if("empty"===r)t.setData(e.map(i,function(t){return function(t){return t>=a[0]&&t<=a[1]}(t)?t:NaN}));else{var n={};n[i]=a,e.selectRange(n)}}),Ov(n,function(t){e.setApproximateExtent(a,t)}))})}}};var Rv=C,Nv=Pv,Fv=ud({type:"dataZoom",dependencies:["xAxis","yAxis","zAxis","radiusAxis","angleAxis","singleAxis","series"],defaultOption:{zlevel:0,z:4,orient:null,xAxisIndex:null,yAxisIndex:null,filterMode:"filter",throttle:null,start:0,end:100,startValue:null,endValue:null,minSpan:null,maxSpan:null,minValueSpan:null,maxValueSpan:null,rangeMode:null},init:function(t,e,i){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var n=Wv(t);this.mergeDefaultAndTheme(t,i),this.doInit(n)},mergeOption:function(t){var e=Wv(t);v(this.option,t,!0),this.doInit(e)},doInit:function(t){var e=this.option;n.canvasSupported||(e.realtime=!1),this._setDefaultThrottle(t),Vv(this,t),Rv([["start","startValue"],["end","endValue"]],function(t,i){"value"===this._rangePropMode[i]&&(e[t[0]]=null)},this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var t=this._axisProxies;this.eachTargetAxis(function(e,i,n,r){var a=this.dependentModels[e.axis][i],o=a.__dzAxisProxy||(a.__dzAxisProxy=new Bv(e.name,i,this,r));t[e.name+"_"+i]=o},this)},_resetTarget:function(){var t=this.option,e=this._judgeAutoMode();Nv(function(e){var i=e.axisIndex;t[i]=rr(t[i])},this),"axisIndex"===e?this._autoSetAxisIndex():"orient"===e&&this._autoSetOrient()},_judgeAutoMode:function(){var t=this.option,e=!1;Nv(function(i){null!=t[i.axisIndex]&&(e=!0)},this);var i=t.orient;return null==i&&e?"orient":e?void 0:(null==i&&(t.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var t=!0,e=this.get("orient",!0),i=this.option,n=this.dependentModels;if(t){var r="vertical"===e?"y":"x";n[r+"Axis"].length?(i[r+"AxisIndex"]=[0],t=!1):Rv(n.singleAxis,function(n){t&&n.get("orient",!0)===e&&(i.singleAxisIndex=[n.componentIndex],t=!1)})}t&&Nv(function(e){if(t){var n=[],r=this.dependentModels[e.axis];if(r.length&&!n.length)for(var a=0,o=r.length;a<o;a++)"category"===r[a].get("type")&&n.push(a);i[e.axisIndex]=n,n.length&&(t=!1)}},this),t&&this.ecModel.eachSeries(function(t){this._isSeriesHasAllAxesTypeOf(t,"value")&&Nv(function(e){var n=i[e.axisIndex],r=t.get(e.axisIndex),a=t.get(e.axisId);M(n,r=t.ecModel.queryComponents({mainType:e.axis,index:r,id:a})[0].componentIndex)<0&&n.push(r)})},this)},_autoSetOrient:function(){var t;this.eachTargetAxis(function(e){!t&&(t=e.name)},this),this.option.orient="y"===t?"vertical":"horizontal"},_isSeriesHasAllAxesTypeOf:function(t,e){var i=!0;return Nv(function(n){var r=t.get(n.axisIndex),a=this.dependentModels[n.axis][r];a&&a.get("type")===e||(i=!1)},this),i},_setDefaultThrottle:function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var e=this.ecModel.option;this.option.throttle=e.animation&&e.animationDurationUpdate>0?100:20}},getFirstTargetAxisModel:function(){var t;return Nv(function(e){if(null==t){var i=this.get(e.axisIndex);i.length&&(t=this.dependentModels[e.axis][i[0]])}},this),t},eachTargetAxis:function(t,e){var i=this.ecModel;Nv(function(n){Rv(this.get(n.axisIndex),function(r){t.call(e,n,r,this,i)},this)},this)},getAxisProxy:function(t,e){return this._axisProxies[t+"_"+e]},getAxisModel:function(t,e){var i=this.getAxisProxy(t,e);return i&&i.getAxisModel()},setRawRange:function(t,e){var i=this.option;Rv([["start","startValue"],["end","endValue"]],function(e){null==t[e[0]]&&null==t[e[1]]||(i[e[0]]=t[e[0]],i[e[1]]=t[e[1]])},this),!e&&Vv(this,t)},getPercentRange:function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},getValueRange:function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var i=this.findRepresentativeAxisProxy();return i?i.getDataValueWindow():void 0},findRepresentativeAxisProxy:function(t){if(t)return t.__dzAxisProxy;var e=this._axisProxies;for(var i in e)if(e.hasOwnProperty(i)&&e[i].hostedBy(this))return e[i];for(var i in e)if(e.hasOwnProperty(i)&&!e[i].hostedBy(this))return e[i]},getRangePropMode:function(){return this._rangePropMode.slice()}});function Wv(t){var e={};return Rv(["start","end","startValue","endValue","throttle"],function(i){t.hasOwnProperty(i)&&(e[i]=t[i])}),e}function Vv(t,e){var i=t._rangePropMode,n=t.get("rangeMode");Rv([["start","startValue"],["end","endValue"]],function(t,r){var a=null!=e[t[0]],o=null!=e[t[1]];a&&!o?i[r]="percent":!a&&o?i[r]="value":n?i[r]=n[r]:a&&(i[r]="percent")})}var Hv=tu.extend({type:"dataZoom",render:function(t,e,i,n){this.dataZoomModel=t,this.ecModel=e,this.api=i},getTargetCoordInfo:function(){var t=this.dataZoomModel,e=this.ecModel,i={};return t.eachTargetAxis(function(t,n){var r=e.getComponent(t.axis,n);if(r){var a=r.getCoordSysModel();a&&function(t,e,i,n){for(var r,a=0;a<i.length;a++)if(i[a].model===t){r=i[a];break}r||i.push(r={model:t,axisModels:[],coordIndex:n});r.axisModels.push(e)}(a,r,i[a.mainType]||(i[a.mainType]=[]),a.componentIndex)}},this),i}}),Gv=(Fv.extend({type:"dataZoom.slider",layoutMode:"box",defaultOption:{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#2f4554",width:.5,opacity:.3},areaStyle:{color:"rgba(47,69,84,0.3)",opacity:.3}},borderColor:"#ddd",fillerColor:"rgba(167,183,204,0.4)",handleIcon:"M8.2,13.6V3.9H6.3v9.7H3.1v14.9h3.3v9.7h1.8v-9.7h3.3V13.6H8.2z M9.7,24.4H4.8v-1.4h4.9V24.4z M9.7,19.1H4.8v-1.4h4.9V19.1z",handleSize:"100%",handleStyle:{color:"#a7b7cc"},labelPrecision:null,labelFormatter:null,showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#333"}}}),function(t,e,i,n,r,a){e[0]=Xv(e[0],i),e[1]=Xv(e[1],i),t=t||0;var o=i[1]-i[0];null!=r&&(r=Xv(r,[0,o])),null!=a&&(a=Math.max(a,null!=r?r:0)),"all"===n&&(r=a=Math.abs(e[1]-e[0]),n=0);var s=Zv(e,n);e[n]+=t;var l=r||0,h=i.slice();s.sign<0?h[0]+=l:h[1]-=l,e[n]=Xv(e[n],h);var u=Zv(e,n);null!=r&&(u.sign!==s.sign||u.span<r)&&(e[1-n]=e[n]+s.sign*r);u=Zv(e,n);return null!=a&&u.span>a&&(e[1-n]=e[n]+u.sign*a),e});function Zv(t,e){var i=t[e]-t[1-e];return{span:Math.abs(i),sign:i>0?-1:i<0?1:e?-1:1}}function Xv(t,e){return Math.min(e[1],Math.max(e[0],t))}var Yv=Io,jv=Ws,qv=Gs,Uv=P,$v=C,Kv="horizontal",Qv=5,Jv=["line","bar","candlestick","scatter"],tm=Hv.extend({type:"dataZoom.slider",init:function(t,e){this._displayables={},this._orient,this._range,this._handleEnds,this._size,this._handleWidth,this._handleHeight,this._location,this._dragging,this._dataShadowInfo,this.api=e},render:function(t,e,i,n){tm.superApply(this,"render",arguments),vu(this,"_dispatchZoomAction",this.dataZoomModel.get("throttle"),"fixRate"),this._orient=t.get("orient"),!1!==this.dataZoomModel.get("show")?(n&&"dataZoom"===n.type&&n.from===this.uid||this._buildView(),this._updateView()):this.group.removeAll()},remove:function(){tm.superApply(this,"remove",arguments),mu(this,"_dispatchZoomAction")},dispose:function(){tm.superApply(this,"dispose",arguments),mu(this,"_dispatchZoomAction")},_buildView:function(){var t=this.group;t.removeAll(),this._resetLocation(),this._resetInterval();var e=this._displayables.barGroup=new ci;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},_resetLocation:function(){var t=this.dataZoomModel,e=this.api,i=this._findCoordRect(),n={width:e.getWidth(),height:e.getHeight()},r=this._orient===Kv?{right:n.width-i.x-i.width,top:n.height-30-7,width:i.width,height:30}:{right:7,top:i.y,width:30,height:i.height},a=bl(t.option);C(["right","top","width","height"],function(t){"ph"===a[t]&&(a[t]=r[t])});var o=_l(a,n,t.padding);this._location={x:o.x,y:o.y},this._size=[o.width,o.height],"vertical"===this._orient&&this._size.reverse()},_positionGroup:function(){var t=this.group,e=this._location,i=this._orient,n=this.dataZoomModel.getFirstTargetAxisModel(),r=n&&n.get("inverse"),a=this._displayables.barGroup,o=(this._dataShadowInfo||{}).otherAxisInverse;a.attr(i!==Kv||r?i===Kv&&r?{scale:o?[-1,1]:[-1,-1]}:"vertical"!==i||r?{scale:o?[-1,-1]:[-1,1],rotation:Math.PI/2}:{scale:o?[1,-1]:[1,1],rotation:Math.PI/2}:{scale:o?[1,1]:[1,-1]});var s=t.getBoundingRect([a]);t.attr("position",[e.x-s.x,e.y-s.y])},_getViewExtent:function(){return[0,this._size[0]]},_renderBackground:function(){var t=this.dataZoomModel,e=this._size,i=this._displayables.barGroup;i.add(new Yv({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40})),i.add(new Yv({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:P(this._onClickPanelClick,this)}))},_renderDataShadow:function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(t){var e=this._size,i=t.series,n=i.getRawData(),r=i.getShadowDim?i.getShadowDim():t.otherDim;if(null!=r){var a=n.getDataExtent(r),o=.3*(a[1]-a[0]);a=[a[0]-o,a[1]+o];var s,l=[0,e[1]],h=[0,e[0]],u=[[e[0],0],[0,0]],c=[],d=h[1]/(n.count()-1),f=0,p=Math.round(n.count()/e[0]);n.each([r],function(t,e){if(p>0&&e%p)f+=d;else{var i=null==t||isNaN(t)||""===t,n=i?0:jv(t,a,l,!0);i&&!s&&e?(u.push([u[u.length-1][0],0]),c.push([c[c.length-1][0],0])):!i&&s&&(u.push([f,0]),c.push([f,0])),u.push([f,n]),c.push([f,n]),f+=d,s=i}});var g=this.dataZoomModel;this._displayables.barGroup.add(new _o({shape:{points:u},style:x({fill:g.get("dataBackgroundColor")},g.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new wo({shape:{points:c},style:g.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19}))}}},_prepareDataShadowInfo:function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(!1!==e){var i,n=this.ecModel;return t.eachTargetAxis(function(r,a){C(t.getAxisProxy(r.name,a).getTargetSeriesModels(),function(t){if(!(i||!0!==e&&M(Jv,t.get("type"))<0)){var o,s=n.getComponent(r.axis,a).axis,l={x:"y",y:"x",radius:"angle",angle:"radius"}[r.name],h=t.coordinateSystem;null!=l&&h.getOtherAxis&&(o=h.getOtherAxis(s).inverse),l=t.getData().mapDimension(l),i={thisAxis:s,series:t,thisDim:r.name,otherDim:l,otherAxisInverse:o}}},this)},this),i}},_renderHandle:function(){var t=this._displayables,e=t.handles=[],i=t.handleLabels=[],n=this._displayables.barGroup,r=this._size,a=this.dataZoomModel;n.add(t.filler=new Yv({draggable:!0,cursor:em(this._orient),drift:Uv(this._onDragMove,this,"all"),onmousemove:function(t){Pt(t.event)},ondragstart:Uv(this._showDataInfo,this,!0),ondragend:Uv(this._onDragEnd,this),onmouseover:Uv(this._showDataInfo,this,!0),onmouseout:Uv(this._showDataInfo,this,!1),style:{fill:a.get("fillerColor"),textPosition:"inside"}})),n.add(new Yv($o({silent:!0,shape:{x:0,y:0,width:r[0],height:r[1]},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}}))),$v([0,1],function(t){var r=Ts(a.get("handleIcon"),{cursor:em(this._orient),draggable:!0,drift:Uv(this._onDragMove,this,t),onmousemove:function(t){Pt(t.event)},ondragend:Uv(this._onDragEnd,this),onmouseover:Uv(this._showDataInfo,this,!0),onmouseout:Uv(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),o=r.getBoundingRect();this._handleHeight=Vs(a.get("handleSize"),this._size[1]),this._handleWidth=o.width/o.height*this._handleHeight,r.setStyle(a.getModel("handleStyle").getItemStyle());var s=a.get("handleColor");null!=s&&(r.style.fill=s),n.add(e[t]=r);var l=a.textStyleModel;this.group.add(i[t]=new ho({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textVerticalAlign:"middle",textAlign:"center",textFill:l.getTextColor(),textFont:l.getFont()},z2:10}))},this)},_resetInterval:function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[jv(t[0],[0,100],e,!0),jv(t[1],[0,100],e,!0)]},_updateInterval:function(t,e){var i=this.dataZoomModel,n=this._handleEnds,r=this._getViewExtent(),a=i.findRepresentativeAxisProxy().getMinMaxSpan(),o=[0,100];Gv(e,n,r,i.get("zoomLock")?"all":t,null!=a.minSpan?jv(a.minSpan,o,r,!0):null,null!=a.maxSpan?jv(a.maxSpan,o,r,!0):null);var s=this._range,l=this._range=qv([jv(n[0],r,o,!0),jv(n[1],r,o,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},_updateView:function(t){var e=this._displayables,i=this._handleEnds,n=qv(i.slice()),r=this._size;$v([0,1],function(t){var n=e.handles[t],a=this._handleHeight;n.attr({scale:[a/2,a/2],position:[i[t],r[1]/2-a/2]})},this),e.filler.setShape({x:n[0],y:0,width:n[1]-n[0],height:r[1]}),this._updateDataInfo(t)},_updateDataInfo:function(t){var e=this.dataZoomModel,i=this._displayables,n=i.handleLabels,r=this._orient,a=["",""];if(e.get("showDetail")){var o=e.findRepresentativeAxisProxy();if(o){var s=o.getAxisModel().axis,l=this._range,h=t?o.calculateDataWindow({start:l[0],end:l[1]}).valueWindow:o.getDataValueWindow();a=[this._formatLabel(h[0],s),this._formatLabel(h[1],s)]}}var u=qv(this._handleEnds.slice());function c(t){var e=bs(i.handles[t].parent,this.group),o=Ss(0===t?"right":"left",e),s=this._handleWidth/2+Qv,l=Ms([u[t]+(0===t?-s:s),this._size[1]/2],e);n[t].setStyle({x:l[0],y:l[1],textVerticalAlign:r===Kv?"middle":o,textAlign:r===Kv?o:"center",text:a[t]})}c.call(this,0),c.call(this,1)},_formatLabel:function(t,e){var i=this.dataZoomModel,n=i.get("labelFormatter"),r=i.get("labelPrecision");null!=r&&"auto"!==r||(r=e.getPixelPrecision());var a=null==t||isNaN(t)?"":"category"===e.type||"time"===e.type?e.scale.getLabel(Math.round(t)):t.toFixed(Math.min(r,20));return z(n)?n(t,a):B(n)?n.replace("{value}",a):a},_showDataInfo:function(t){t=this._dragging||t;var e=this._displayables.handleLabels;e[0].attr("invisible",!t),e[1].attr("invisible",!t)},_onDragMove:function(t,e,i){this._dragging=!0;var n=Ms([e,i],this._displayables.barGroup.getLocalTransform(),!0),r=this._updateInterval(t,n[0]),a=this.dataZoomModel.get("realtime");this._updateView(!a),r&&a&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1),!this.dataZoomModel.get("realtime")&&this._dispatchZoomAction()},_onClickPanelClick:function(t){var e=this._size,i=this._displayables.barGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(i[0]<0||i[0]>e[0]||i[1]<0||i[1]>e[1])){var n=this._handleEnds,r=(n[0]+n[1])/2,a=this._updateInterval("all",i[0]-r);this._updateView(),a&&this._dispatchZoomAction()}},_dispatchZoomAction:function(){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:t[0],end:t[1]})},_findCoordRect:function(){var t;if($v(this.getTargetCoordInfo(),function(e){if(!t&&e.length){var i=e[0].model.coordinateSystem;t=i.getRect&&i.getRect()}}),!t){var e=this.api.getWidth(),i=this.api.getHeight();t={x:.2*e,y:.2*i,width:.6*e,height:.6*i}}return t}});function em(t){return"vertical"===t?"ns-resize":"ew-resize"}Fv.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}});var im="\0_ec_interaction_mutex";function nm(t,e){return!!function(t){return t[im]||(t[im]={})}(t)[e]}function rm(t){this.pointerChecker,this._zr=t,this._opt={};var e=P,i=e(am,this),n=e(om,this),r=e(sm,this),a=e(lm,this),o=e(hm,this);Mt.call(this),this.setPointerChecker=function(t){this.pointerChecker=t},this.enable=function(e,s){this.disable(),this._opt=x(g(s)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==e&&(e=!0),!0!==e&&"move"!==e&&"pan"!==e||(t.on("mousedown",i),t.on("mousemove",n),t.on("mouseup",r)),!0!==e&&"scale"!==e&&"zoom"!==e||(t.on("mousewheel",a),t.on("pinch",o))},this.disable=function(){t.off("mousedown",i),t.off("mousemove",n),t.off("mouseup",r),t.off("mousewheel",a),t.off("pinch",o)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}function am(t){if(!(Lt(t)||t.target&&t.target.draggable)){var e=t.offsetX,i=t.offsetY;this.pointerChecker&&this.pointerChecker(t,e,i)&&(this._x=e,this._y=i,this._dragging=!0)}}function om(t){if(this._dragging&&dm("moveOnMouseMove",t,this._opt)&&"pinch"!==t.gestureEvent&&!nm(this._zr,"globalPan")){var e=t.offsetX,i=t.offsetY,n=this._x,r=this._y,a=e-n,o=i-r;this._x=e,this._y=i,this._opt.preventDefaultMouseMove&&Pt(t.event),cm(this,"pan","moveOnMouseMove",t,{dx:a,dy:o,oldX:n,oldY:r,newX:e,newY:i})}}function sm(t){Lt(t)||(this._dragging=!1)}function lm(t){var e=dm("zoomOnMouseWheel",t,this._opt),i=dm("moveOnMouseWheel",t,this._opt),n=t.wheelDelta,r=Math.abs(n),a=t.offsetX,o=t.offsetY;if(0!==n&&(e||i)){if(e){var s=r>3?1.4:r>1?1.2:1.1;um(this,"zoom","zoomOnMouseWheel",t,{scale:n>0?s:1/s,originX:a,originY:o})}if(i){var l=Math.abs(n);um(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:(n>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:a,originY:o})}}}function hm(t){nm(this._zr,"globalPan")||um(this,"zoom",null,t,{scale:t.pinchScale>1?1.1:1/1.1,originX:t.pinchX,originY:t.pinchY})}function um(t,e,i,n,r){t.pointerChecker&&t.pointerChecker(n,r.originX,r.originY)&&(Pt(n.event),cm(t,e,i,n,r))}function cm(t,e,i,n,r){r.isAvailableBehavior=P(dm,null,i,n),t.trigger(e,r)}function dm(t,e,i){var n=i[t];return!t||n&&(!B(n)||e.event[n+"Key"])}ad({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){}),I(rm,Mt);var fm="\0_ec_dataZoom_roams";function pm(t,e){var i=vm(t),n=e.dataZoomId,r=e.coordId;C(i,function(t,i){var a=t.dataZoomInfos;a[n]&&M(e.allCoordIds,r)<0&&(delete a[n],t.count--)}),mm(i);var a=i[r];a||((a=i[r]={coordId:r,dataZoomInfos:{},count:0}).controller=function(t,e){var i=new rm(t.getZr());return C(["pan","zoom","scrollMove"],function(t){i.on(t,function(i){var n=[];C(e.dataZoomInfos,function(r){if(i.isAvailableBehavior(r.dataZoomModel.option)){var a=(r.getRange||{})[t],o=a&&a(e.controller,i);!r.dataZoomModel.get("disabled",!0)&&o&&n.push({dataZoomId:r.dataZoomId,start:o[0],end:o[1]})}}),n.length&&e.dispatchAction(n)})}),i}(t,a),a.dispatchAction=L(ym,t)),!a.dataZoomInfos[n]&&a.count++,a.dataZoomInfos[n]=e;var o,s,l,h,u=(o=a.dataZoomInfos,l={type_true:2,type_move:1,type_false:0,type_undefined:-1},h=!0,C(o,function(t){var e=t.dataZoomModel,i=!e.get("disabled",!0)&&(!e.get("zoomLock",!0)||"move");l["type_"+i]>l["type_"+s]&&(s=i),h&=e.get("preventDefaultMouseMove",!0)}),{controlType:s,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!h}});a.controller.enable(u.controlType,u.opt),a.controller.setPointerChecker(e.containsPoint),vu(a,"dispatchAction",e.dataZoomModel.get("throttle",!0),"fixRate")}function gm(t){return t.type+"\0_"+t.id}function vm(t){var e=t.getZr();return e[fm]||(e[fm]={})}function mm(t){C(t,function(e,i){e.count||(e.controller.dispose(),delete t[i])})}function ym(t,e){t.dispatchAction({type:"dataZoom",batch:e})}var xm=P,_m=Hv.extend({type:"dataZoom.inside",init:function(t,e){this._range},render:function(t,e,i,n){_m.superApply(this,"render",arguments),this._range=t.getPercentRange(),C(this.getTargetCoordInfo(),function(e,n){var r=D(e,function(t){return gm(t.model)});C(e,function(e){var a=e.model,o={};C(["pan","zoom","scrollMove"],function(t){o[t]=xm(wm[t],this,e,n)},this),pm(i,{coordId:gm(a),allCoordIds:r,containsPoint:function(t,e,i){return a.coordinateSystem.containPoint([e,i])},dataZoomId:t.id,dataZoomModel:t,getRange:o})},this)},this)},dispose:function(){var t,e,i;t=this.api,e=this.dataZoomModel.id,C(i=vm(t),function(t){t.controller.dispose();var i=t.dataZoomInfos;i[e]&&(delete i[e],t.count--)}),mm(i),_m.superApply(this,"dispose",arguments),this._range=null}}),wm={zoom:function(t,e,i,n){var r=this._range,a=r.slice(),o=t.axisModels[0];if(o){var s=Mm[e](null,[n.originX,n.originY],o,i,t),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],h=Math.max(1/n.scale,0);a[0]=(a[0]-l)*h+l,a[1]=(a[1]-l)*h+l;var u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return Gv(0,a,[0,100],0,u.minSpan,u.maxSpan),this._range=a,r[0]!==a[0]||r[1]!==a[1]?a:void 0}},pan:bm(function(t,e,i,n,r,a){var o=Mm[n]([a.oldX,a.oldY],[a.newX,a.newY],e,r,i);return o.signal*(t[1]-t[0])*o.pixel/o.pixelLength}),scrollMove:bm(function(t,e,i,n,r,a){return Mm[n]([0,0],[a.scrollDelta,a.scrollDelta],e,r,i).signal*(t[1]-t[0])*a.scrollDelta})};function bm(t){return function(e,i,n,r){var a=this._range,o=a.slice(),s=e.axisModels[0];if(s){var l=t(o,s,e,i,n,r);return Gv(l,o,[0,100],"all"),this._range=o,a[0]!==o[0]||a[1]!==o[1]?o:void 0}}}var Mm={grid:function(t,e,i,n,r){var a=i.axis,o={},s=r.model.coordinateSystem.getRect();return t=t||[0,0],"x"===a.dim?(o.pixel=e[0]-t[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=e[1]-t[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(t,e,i,n,r){var a=i.axis,o={},s=r.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),h=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===i.mainType?(o.pixel=e[0]-t[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?1:-1):(o.pixel=e[1]-t[1],o.pixelLength=h[1]-h[0],o.pixelStart=h[0],o.signal=a.inverse?-1:1),o},singleAxis:function(t,e,i,n,r){var a=i.axis,o=r.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===a.orient?(s.pixel=e[0]-t[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}};rd({getTargetSeries:function(t){var e=Q();return t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,i,n){C(n.getAxisProxy(t.name,i).getTargetSeriesModels(),function(t){e.set(t.uid,t)})})}),e},modifyOutputEnd:!0,overallReset:function(t,e){t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,i,n){n.getAxisProxy(t.name,i).reset(n,e)}),t.eachTargetAxis(function(t,i,n){n.getAxisProxy(t.name,i).filterData(n,e)})}),t.eachComponent("dataZoom",function(t){var e=t.findRepresentativeAxisProxy(),i=e.getDataPercentWindow(),n=e.getDataValueWindow();t.setRawRange({start:i[0],end:i[1],startValue:n[0],endValue:n[1]},!0)})}}),ad("dataZoom",function(t,e){var i=Lv(P(e.eachComponent,e,"dataZoom"),Pv,function(t,e){return t.get(e.axisIndex)}),n=[];e.eachComponent({mainType:"dataZoom",query:t},function(t,e){n.push.apply(n,i(t).nodes)}),C(n,function(e,i){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})}),t.version="4.2.1",t.dependencies={zrender:"4.0.6"},t.PRIORITY=vc,t.init=function(t,e,i){var n=ed(t);if(n)return n;var r=new bc(t,e,i);return r.id="ec_"+$c++,qc[r.id]=r,vr(t,Qc,r.id),function(t){var e="__connectUpdateStatus";function i(t,i){for(var n=0;n<t.length;n++)t[n][e]=i}hc(Vc,function(n,r){t._messageCenter.on(r,function(n){if(Uc[t.group]&&0!==t[e]){if(n&&n.escapeConnect)return;var r=t.makeActionFromEvent(n),a=[];hc(qc,function(e){e!==t&&e.group===t.group&&a.push(e)}),i(a,0),hc(a,function(t){1!==t[e]&&t.dispatchAction(r)}),i(a,2)}})})}(r),r},t.connect=function(t){if(O(t)){var e=t;t=null,hc(e,function(e){null!=e.group&&(t=e.group)}),t=t||"g_"+Kc++,hc(e,function(e){e.group=t})}return Uc[t]=!0,t},t.disConnect=Jc,t.disconnect=td,t.dispose=function(t){"string"==typeof t?t=qc[t]:t instanceof bc||(t=ed(t)),t instanceof bc&&!t.isDisposed()&&t.dispose()},t.getInstanceByDom=ed,t.getInstanceById=function(t){return qc[t]},t.registerTheme=id,t.registerPreprocessor=nd,t.registerProcessor=rd,t.registerPostUpdate=function(t){Zc.push(t)},t.registerAction=ad,t.registerCoordinateSystem=function(t,e){ih.register(t,e)},t.getCoordinateSystemDimensions=function(t){var e=ih.get(t);if(e)return e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice()},t.registerLayout=od,t.registerVisual=sd,t.registerLoading=hd,t.extendComponentModel=ud,t.extendComponentView=cd,t.extendSeriesModel=function(t){return Yh.extend(t)},t.extendChartView=dd,t.setCanvasCreator=function(t){p("createCanvas",t)},t.registerMap=function(t,e,i){oc.registerMap(t,e,i)},t.getMap=function(t){var e=oc.retrieveMap(t);return e&&e[0]&&{geoJson:e[0].geoJSON,specialAreas:e[0].specialAreas}},t.dataTool={},t.zrender=Jn,t.number=Js,t.format=pl,t.throttle=gu,t.helper=Qf,t.matrix=Kt,t.vector=xt,t.color=ze,t.parseGeoJSON=rp,t.parseGeoJson=mp,t.util=yp,t.graphic=xp,t.List=Dd,t.Model=zs,t.Axis=gp,t.env=n});

</script>
<script type="text/javascript">
function addCommas(x) {
  x = (x + '').split('.');
  return x[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,'$1,')
          + (x.length > 1 ? ('.' + x[1]) : '');
}
function myFormatter(params, ticket, callback) {
  colorText = '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:' + 
    params.color + 
    ';"></span>';

  return params.seriesName + "<br />" + colorText + params.name + ": " + addCommas(params.value) + " bytes";
}
</script>
   <blockquote class="book"> To make progress, we need better data on costs and performance to evaluate the - often simplistic and narrowly focused - solutions suggested. <cite>— Direction for ISO C++ <sup><a data-link-type="biblio" href="#biblio-p0939r2">[P0939R2]</a></sup></cite> </blockquote>
   <h2 class="heading settled" data-level="1" id="intro"><span class="secno">1. </span><span class="content">Introduction</span><a class="self-link" href="#intro"></a></h2>
    Error handling is never free.  In C++, reacting to an error condition always bears some cost.  It may be a speed cost from checks spread everywhere, or it may be a size cost for error handling cost, but costs are inevitable. 
   <p>One may try to avoid all the costs by calling <code class="highlight"><c- n="">std</c-><c- o="">::</c-><c- n="">abort</c-></code> or something similar, but even that has costs.  The only cost-free option is to ignore the errors entirely and expose yourself to the wrath of UB.</p>
   <p>So great, there are costs, but how should we measure the costs, and which error handling mechanisms exhibit what kinds of costs?</p>
   <p>In this paper, we will look at the <em>size</em> costs of error handling.  We’ll break things down into one-time costs and incremental costs, and subdivide by costs paid for error neutral functions, raising an error, and handling an error.  I will also discuss some of the inherent implementation difficulties and constraints of today’s C++ exceptions.</p>
   <h2 class="heading settled" data-level="2" id="exception_impl"><span class="secno">2. </span><span class="content">Exception implementation</span><a class="self-link" href="#exception_impl"></a></h2>
    In GCC, Clang, and MSVC x64, exceptions are implemented using the "table-based exceptions" strategy.  When an exception is thrown, the instruction pointer is used to look in a constant, global table to determine how to restore registers, which destructors to call, and how to get to the next frame.  This approach has the advantage that minimal extra code is required to be executed in the success path. 
   <p>In MSVC x86, exceptions are implemented with a variant of the "setjmp/longjmp" method.  Bookkeeping information is emitted anytime a try block is entered, or anytime an object with a non-trivial destructor has been constructed.  This information is linked together into a list.  When an exception is thrown, the list is traversed, destructors and catch blocks are executed.  This approach has the advantage that throwing an exception has a much more predictable and consistent cost than the table-based approach.</p>
   <p>In libc++abi (usually associated with Clang) and libsupc++ (usually associated with GCC), exception objects are allocated on the heap.  Both implementations have an emergency buffer they fall back to if allocations fail.  An alternative implementation could use the fixed sized buffer first, though this would still qualify as a dynamic allocation.</p>
   <p>With MSVC, exception objects are allocated into a buffer that is borrowed from the stack just beyond the throw site’s active frame. Each active exception gets a distinct buffer. The exception buffer and the stack frames between the throw and catch sites cannot be deallocated or reused until the exception is fully handled.  Destructors and other code run during unwinding consumes additional stack beyond the throwing stack frame and exception buffer.  At minimum, throwing one exception consumes roughly 2,100 bytes of stack on 32-bit Windows, and 9,700 bytes of stack on 64-bit Windows.  The stack size cost will quickly increase with large exception types, re-throws, distance between the throw and catch sites, and/or multiple active exceptions.</p>
   <p>The heap is often not present in freestanding environments.  Stack space is often tightly constrained in freestanding environments as well.</p>
   <p><a data-link-type="biblio" href="#biblio-renwicklowcost">[RenwickLowCost]</a> describes a way to implement exceptions by passing in exception information though a hidden function parameter.  Currently, this approach can’t be used for a conforming C++ implementation, but it will come close enough for many applications.  Most of the "tricky use cases" outlined below are not implementable with the hidden parameter trick unless all functions, including <code class="highlight"><c- k="">noexcept</c-></code> and C functions, are all passed the hidden parameter.  This would significantly undermine the utility of the approach.  The author does not have access to a compiler with this implementation of exceptions, so it has not been benchmarked.</p>
   <p><a data-link-type="biblio" href="#biblio-p0709">[P0709]</a> describes a way to implement a new kind of exceptions, where the error information is packaged with the return value in a discriminated union.  The author does not have access to a compiler that can use this kind of exception handling mechanism, so it has not been benchmarked.  Readers should _not_ assume that the costs will be the same as those for <code class="highlight"><c- n="">expected</c-></code> or returning a struct, as the code to test and the code to set the discriminator could cause substantial size differences from what was measured for existing cases.  The benefits of this approach are realized when a specific type (a yet to be standardized <code class="highlight"><c- n="">std</c-><c- o="">::</c-><c- n="">error</c-></code>) is thrown.  Throwing other types falls back to the current C++ exception approach.</p>
   <p>Conforming C++ exceptions need to be able to support some tricky use cases.</p>
   <ul>
    <li data-md="">
     <p>Transporting information across <code class="highlight"><c- k="">noexcept</c-></code> barriers.</p>
    </li><li data-md="">
     <p><code class="highlight"><c- n="">uncaught_exceptions</c-><c- p="">()</c-></code></p>
    </li><li data-md="">
     <p><code class="highlight"><c- n="">current_exception</c-><c- p="">()</c-></code></p>
    </li><li data-md="">
     <p>Re-throwing exceptions in distant functions, for example, in a "Lippincott" function <a data-link-type="biblio" href="#biblio-guillemot">[Guillemot]</a>.</p>
    </li><li data-md="">
     <p>Multiple in-flight exceptions at the same time.</p>
   </li></ul>
   <p>In addition, for exceptions to be acceptable in the market, there is also the requirement that C++ programs should be able to consume C source and C object files.</p>
   <p>In general, supporting these difficult use cases requires some kind of storage that is local to a thread.  In single threaded environments, "storage that is local to a thread" can be implemented with a simple global.  In multi-threaded environments, something more invasive or sophisticated is required.  In practice, the "more invasive or sophisticated" facilities are often not available in freestanding environments.  Getting those features into freestanding environments often requires substantial runtime cost, cooperation from vendors other than the compiler vendor, or both runtime cost and vendor cooperation.</p>
   <p>It may be possible to support useful, but non-conforming exceptions in freestanding environments.  This paper should help quantify some of the size costs.  The larger the size cost, the less utility the facility provides.</p>
   <h2 class="heading settled" data-level="3" id="methodology"><span class="secno">3. </span><span class="content">Measuring methodology</span><a class="self-link" href="#methodology"></a></h2>
    All benchmarks lie.  It’s important to know how a benchmark is set up so that the useful parts can be distinguished from the misleading parts. 
   <p>The specific build flags can be found in <a href="#build_flags">Appendix B</a>.  Following is a brief summary.</p>
   <p>MSVC 2019 was used for MSVC x86 and MSVC x64 builds.  The /d2FH4 flag described in <a data-link-type="biblio" href="#biblio-mofh4">[MoFH4]</a> was used, and /EHs was used when exceptions were on.</p>
   <p>GCC 7.3.1 from the Red Hat Developer Toolset 7.1 was used for my GCC builds.  The Linux x64 platform was targeted.</p>
   <p>Clang 8.0.0, libc++, and libc++abi was used for my Clang builds.  The Linux x64 platform was targeted.  The system linker and C library leaked in to this build.  The system GCC was GCC 4.8.4 from Ubuntu 14.04.3.</p>
   <p>All the binaries are optimized for size, rather than speed.</p>
   <p>All the binaries are built with static runtimes, so that we can also see the costs of the error handling runtime machinery.  For many people, this is a sunk cost.  If the cost of the runtime machinery isn’t of interest, then don’t pay attention to the one-time costs, and just look at the incremental costs.  Sizes were not calculated by just doing the "easy" thing and comparing the on-disk sizes of the resulting programs.  Programs have lots and lots of padding internal to them due to alignment constraints, and that padding can mask or inflate small cost changes.  Instead, the size is calculated by summing the size of all the non-code sections, and by summing the size of each function in the code sections.  Measuring the size of a function is a little tricky, as the compiler doesn’t emit that information directly.  There are often padding instructions between consecutive functions.  My measurements omit the padding instructions so that we can see code size differences as small as one byte.</p>
   <p>Measurements are also included where the size of some data sections related to unwinding are omitted.  On x64 Linux, programs can have an .eh_frame and .eh_frame_hdr section that can help with emitting back traces.  x64 Windows has similar sections named .xdata and .pdata.  These sections aren’t sufficient to implement C++ exception handling, and they don’t go away when exceptions are turned off.  On Linux and Windows, these sections should be considered a sunk cost, but on more exotic platforms, it is reasonable to omit those sections, as stack trace costs may not be tolerable.  These measurements are all labeled as "stripped".  x86 Windows doesn’t have these sections, so the "stripped" measurements are the same as the unstripped measurements.</p>
   <p>Note that on Linux, the entire user mode program can be statically linked.  This is the program under test, the C++ runtime, the C runtime, and any OS support.  On Windows, the program, the C++ runtime, and the C runtime can be statically linked, but the OS support (kernel32.dll) is still distinct.  With this in mind, refrain from comparing the one-time MSVC sizes to the Clang and GCC sizes, as it isn’t comparing the same set of functionality.</p>
   <p>These benchmarks are run on very small programs.  On larger programs, various code and data deduplication optimizations could substantially change the application-level costs of error handling. <a data-link-type="biblio" href="#biblio-mofh4">[MoFH4]</a> documents the kinds of deduplication that MSVC 2019 performs.</p>
   <h2 class="heading settled" data-level="4" id="starter_case"><span class="secno">4. </span><span class="content">Starter test cases</span><a class="self-link" href="#starter_case"></a></h2>
    To start with, we will look at code similar to the following: 
<pre class="highlight"><c- k="">struct</c-> <c- n="">Dtor</c-> <c- p="">{</c-><c- o="">~</c-><c- n="">Dtor</c-><c- p="">()</c-> <c- p="">{}};</c->
<c- b="">int</c-> <c- n="">global_int</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
<c- b="">void</c-> <c- nf="">callee</c-><c- p="">()</c-> <c- p="">{</c-><c- d="">/* will raise an error one day*/</c-><c- p="">}</c->
<c- b="">void</c-> <c- nf="">caller</c-><c- p="">()</c-> <c- p="">{</c->
  <c- n="">Dtor</c-> <c- n="">d</c-><c- p="">;</c->
  <c- n="">callee</c-><c- p="">();</c->
  <c- n="">global_int</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
<c- p="">}</c->
<c- b="">int</c-> <c- nf="">main</c-><c- p="">()</c-> <c- p="">{</c-> 
  <c- n="">caller</c-><c- p="">();</c->
  <c- k="">return</c-> <c- n="">global_int</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
   This code has some important properties for future comparisons. 
   <ul>
    <li data-md="">
     <p><code class="highlight"><c- n="">callee</c-><c- p="">()</c-></code> will eventually raise errors.</p>
    </li><li data-md="">
     <p><code class="highlight"><c- n="">caller</c-><c- p="">()</c-></code> needs to clean up the <code class="highlight"><c- n="">d</c-></code> object in error and non-error conditions.</p>
    </li><li data-md="">
     <p><code class="highlight"><c- n="">caller</c-><c- p="">()</c-></code> should only set <code class="highlight"><c- n="">global_int</c-></code> in success cases.</p>
    </li><li data-md="">
     <p>The code doesn’t have any error cases yet.  We can see the cost of error handling machinery when no errors are involved.</p>
   </li></ul>
   <p>In the actual tests all the function bodies are in separate .cpp files, and link-time / whole-program optimizations aren’t used.  If they had been used, the entire program would get optimized away, removing our ability to measure error handling differences.</p>
   <p>The above program is a useful template when using exceptions or <code class="highlight"><c- n="">std</c-><c- o="">::</c-><c- n="">abort</c-></code> as an error handling mechanism, but it won’t work as well for error codes.  So we mutate the program like so...</p>
<pre class="highlight"><c- b="">int</c-> <c- nf="">callee</c-><c- p="">()</c-> <c- p="">{</c-><c- k="">return</c-> <c- mi="">0</c-><c- p="">;}</c->
<c- b="">int</c-> <c- nf="">caller</c-><c- p="">()</c-> <c- p="">{</c->
  <c- n="">Dtor</c-> <c- n="">d</c-><c- p="">;</c->
  <c- b="">int</c-> <c- n="">e</c-> <c- o="">=</c-> <c- n="">callee</c-><c- p="">();</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">e</c-><c- p="">)</c->
    <c- k="">return</c-> <c- n="">e</c-><c- p="">;</c->
  <c- n="">global_int</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
  <c- k="">return</c-> <c- n="">e</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
   This is pretty typical integer return value code, without any macro niceties. 
   <p>Most of the programs were built with exceptions turned off, but the throw_* cases and noexcept_abort all had exceptions turned on in the program.</p>
   <ul>
    <li data-md="">
     <p>abort: When an error is encountered, kill the program with <code class="highlight"><c- n="">std</c-><c- o="">::</c-><c- n="">abort</c-></code>.</p>
    </li><li data-md="">
     <p>noexcept_abort: Same as abort, except exceptions are turned on, and all the functions declared in user source are marked as <code class="highlight"><c- k="">noexcept</c-></code>.</p>
    </li><li data-md="">
     <p>return_val: Return an integer error code, where zero represents success.</p>
    </li><li data-md="">
     <p>return_struct: Return an <code class="highlight"><c- n="">error_struct</c-></code> object (described below) rather than an integer error code.</p>
    </li><li data-md="">
     <p>ref_val and ref_struct: Rather than returning integers and <code class="highlight"><c- n="">error_struct</c-></code>s, construct them in main and pass them in by mutable reference.</p>
    </li><li data-md="">
     <p>expected_val and expected_struct: Use tl::expected <a data-link-type="biblio" href="#biblio-brandexpected">[BrandExpected]</a> wrapping either an integer or an error_struct, accordingly.</p>
    </li><li data-md="">
     <p>outcome_val and outcome_struct: Use outcome::experimental::status_result <a data-link-type="biblio" href="#biblio-douglasoutcome">[DouglasOutcome]</a> wrapping either an integer or an error_struct, accordingly.  This is built with RTTI turned off.</p>
    </li><li data-md="">
     <p>outcome_std_error: Use outcome::experimental::status_result <a data-link-type="biblio" href="#biblio-douglasoutcome">[DouglasOutcome]</a> wrapping a prototype of the proposed std::error <a data-link-type="biblio" href="#biblio-p1028r1">[P1028R1]</a>.  This is the idiomatic way to use outcome.  This is built with RTTI turned off.</p>
    </li><li data-md="">
     <p>tls_val and tls_struct: Use thread_local variables to communicate error conditions.</p>
    </li><li data-md="">
     <p>throw_val and throw_struct: Throw an integer or error_struct as an exception.  This is to allow a direct comparison to the other error handling strategies in terms of information transmitted from error site to handling site.</p>
    </li><li data-md="">
     <p>throw_exception: Throw an exception deriving from std::exception, that contains only an int.  This should represent more typical use cases.</p>
   </li></ul>
   <p>Expository code for all the cases can be found in <a href="#code">Appendix C</a>.  The actual code used for the benchmark can be found <a href="https://github.com/ben-craig/error_bench/tree/8807ec200b7992294490e8754847dce648a3eadb/src">on my github</a>.</p>
   <h2 class="heading settled" data-level="5" id="measurements"><span class="secno">5. </span><span class="content">Measurements</span><a class="self-link" href="#measurements"></a></h2>
   <h3 class="heading settled" data-level="5.1" id="neutral1"><span class="secno">5.1. </span><span class="content">Initial error neutral size cost</span><a class="self-link" href="#neutral1"></a></h3>
    My first batch of measurements is comparing each of the mechanisms to the abort test case that has no unwind information.  This lets us focus on the incremental costs of the other mechanisms. 
   <p align="center"><i>Warning! Logarithmic axis! Linear version <a href="#linearneutral1">here</a></i></p>
   <div id="CmpTerm" style="width: 100%;height:600px;"></div>
<script type="text/javascript">
  // based on prepared DOM, initialize echarts instance
  var myChart = echarts.init(document.getElementById('CmpTerm'));

  // specify chart configuration item and data
  var option = {
    tooltip: { formatter: myFormatter },
    calculable : true,
    legend: {
      type: 'scroll',
      right: 0,
      top: 0,
      orient: 'vertical',
    },
    xAxis: [{
      type: 'log',
      min: 1,
      max: 400000
    }],
    yAxis: [{
      type: 'category',
      data: ['Clang','GCC','MSVC x64','MSVC x86']
    }],
    grid: {
      top: 0,
      left: 65,
      right: 200
    },
    series: data_CmpTerm
  };

  // use configuration item and data specified to show chart
  myChart.setOption(option);
</script>
   <p align="center"><i>Warning! Logarithmic axis! Linear version <a href="#linearneutral1">here</a></i></p>
   <p>Set aside outcome for a moment.  These tables show us that the one-time cost for exceptions is really high (6KB on MSVC x86, 382KB on Clang x64), and the one time cost for unwind information is pretty high too (6KB on MSVC x64, 57KB on Clang).  Once we ignore unwind information, we can see that the one-time cost for TLS on Windows is small compared to unwind information, but high compared to the other error mechanisms (214 bytes - 481 bytes).  All the other (non-outcome) one-time overheads are 66 bytes or less.  Remember that this code doesn’t currently have any throw statements in the program.  This is the one-time cost of error neutral functions when exceptions are turned on.</p>
   <p>On MSVC, outcome pulls in exception handling routines, even though exceptions are disabled.</p>
   <p><a data-link-type="biblio" href="#biblio-batyievembedded">[BatyievEmbedded]</a> claims to be able to get the cost of the exception machinery down to 6,760 bytes on a bare metal ARMv4t system in Thumb mode with GCC 5.3.0.</p>
   <p>Note that noexcept_abort has the same cost as regular abort right now.  If everything is <code class="highlight"><c- k="">noexcept</c-></code>, the exception machinery costs are not incurred.</p>
   <h3 class="heading settled" data-level="5.2" id="neutral2"><span class="secno">5.2. </span><span class="content">Incremental error neutral size cost</span><a class="self-link" href="#neutral2"></a></h3>
    To measure the incremental cost of error neutral code, the code will be updated as follows: 
<pre class="highlight"><c- b="">void</c-> <c- nf="">callee2</c-><c- p="">(</c-><c- b="">int</c-> <c- n="">amount</c-><c- p="">)</c-> <c- p="">{</c->
  <c- n="">global_int</c-> <c- o="">+=</c-> <c- n="">amount</c-><c- p="">;</c->
  <c- c1="">// will error one day</c->
<c- p="">}</c->
<c- b="">void</c-> <c- nf="">caller2</c-><c- p="">(</c-><c- b="">int</c-> <c- n="">amount</c-><c- p="">)</c-> <c- p="">{</c->
  <c- n="">Dtor</c-> <c- n="">d</c-><c- p="">;</c->
  <c- n="">callee2</c-><c- p="">(</c-><c- n="">amount</c-><c- p="">);</c->
  <c- n="">global_int</c-> <c- o="">+=</c-> <c- n="">amount</c-><c- p="">;</c->
<c- p="">}</c->
<c- b="">int</c-> <c- nf="">main</c-><c- p="">()</c-> <c- p="">{</c-> 
  <c- n="">caller</c-><c- p="">();</c->
  <c- n="">caller2</c-><c- p="">(</c-><c- mi="">0</c-><c- p="">);</c->
  <c- k="">return</c-> <c- n="">global_int</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
   The "2" versions of these functions are slightly different than the original versions in order to avoid optimization where identical code is de-duplicated (COMDAT folding).  Each error handling case was updated to the idiomatic form that had the same semantics as this error neutral form.  Here are the incremental numbers: 
   <div id="SecondNeutral" style="width: 100%;height:600px;"></div>
<script type="text/javascript">
  // based on prepared DOM, initialize echarts instance
  var myChart = echarts.init(document.getElementById('SecondNeutral'));

  // specify chart configuration item and data
  var option = {
    tooltip: { formatter: myFormatter },
    calculable : true,
    legend: {
      type: 'scroll',
      right: 0,
      top: 0,
      orient: 'vertical',
    },
    xAxis: [{
      type: 'value',
    }],
    yAxis: [{
      type: 'category',
      data: ['Clang','GCC','MSVC x64','MSVC x86']
    }],
    grid: {
      top: 0,
      left: 65,
      right: 200
    },
    dataZoom: [{show: true}],
    series: data_Cost2ndNeutral
  };

  // use configuration item and data specified to show chart
  myChart.setOption(option);
</script>
   <p>The delta between the best and the worst is much smaller in the incremental error neutral measurements than in the one-time cost measurements.  The largest incremental cost is Clang/x64 outcome_std_error (278 bytes), and the smallest is a tie between GCC/x64 and Clang/x64 stripped.abort with 48 bytes.  There are many spurs in these graphs, and many of them can be attributed to codegen that is either low quality, or just code that isn’t trying to be as small as possible.  Many of the struct cases resulted in the compiler generating vectorization code, which is almost always larger than the equivalent scalar code. <code class="highlight"><c- n="">abort</c-></code> and return values were always cheaper than exceptions as well, even with included unwind information.</p>
   <h3 class="heading settled" data-level="5.3" id="error1"><span class="secno">5.3. </span><span class="content">Initial size cost of signaling an error</span><a class="self-link" href="#error1"></a></h3>
    What happens when an error is signaled first time?  What’s the one-time cost of that first error? 
<pre class="highlight"><c- b="">void</c-> <c- nf="">callee</c-><c- p="">()</c-> <c- p="">{</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">global_int</c-> <c- o="">==</c-> <c- n="">INT_MAX</c-><c- p="">)</c->
    <c- k="">throw</c-> <c- mi="">1</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
   <p align="center"><i>Warning! Logarithmic axis! Linear version <a href="#linearerror1">here</a></i></p>
   <div id="FirstError" style="width: 100%;height:600px;"></div>
<script type="text/javascript">
  // based on prepared DOM, initialize echarts instance
  var myChart = echarts.init(document.getElementById('FirstError'));

  // specify chart configuration item and data
  var option = {
    tooltip: { formatter: myFormatter },
    calculable : true,
    legend: {
      type: 'scroll',
      right: 0,
      top: 0,
      orient: 'vertical',
    },
    xAxis: [{
      type: 'log',
      min: 1,
      max: 250000
    }],
    yAxis: [{
      type: 'category',
      data: ['Clang','GCC','MSVC x64','MSVC x86']
    }],
    grid: {
      top: 0,
      left: 65,
      right: 200
    },
    series: data_Cost1stError
  };

  // use configuration item and data specified to show chart
  myChart.setOption(option);
</script>
   <p align="center"><i>Warning! Logarithmic axis! Linear version <a href="#linearerror1">here</a></i></p>
   <p>On MSVC, there are multiple ways to build with exceptions "on".  This experiment was built with <code class="highlight"><c- o="">/</c-><c- n="">EHs</c-></code>, which turns on exceptions in a C++ conforming manner.  The Microsoft recommended flag is <code class="highlight"><c- o="">/</c-><c- n="">EHsc</c-></code>, which turns on exceptions for all C++ functions, but assumes that <code class="highlight"><c- k="">extern</c-> <c- s="">"C"</c-></code> functions won’t throw.  This is a useful, though non-conforming option.  The trick is that the noexcept_abort <code class="highlight"><c- n="">callee</c-><c- p="">()</c-></code> implementation calls <code class="highlight"><c- n="">abort</c-><c- p="">()</c-></code>, and that’s an <code class="highlight"><c- k="">extern</c-> <c- s="">"C"</c-></code> function that isn’t marked as <code class="highlight"><c- k="">noexcept</c-></code>, so we suddenly need to pay for all the exception handling costs that we had been avoiding by making everything <code class="highlight"><c- k="">noexcept</c-></code>.  We can’t easily make the C runtime, or other people’s code <code class="highlight"><c- k="">noexcept</c-></code>.  We don’t see this on GCC and Clang because the C library they are calling marks abort as <code class="highlight"><c- n="">__attribute__</c-> <c- p="">((</c-><c- n="">__nothrow__</c-><c- p="">))</c-></code>, and that lets them avoid generating the exception machinery.</p>
   <p>GCC’s first throw costs look worse than Clang’s because Clang paid a lot of those costs even before there was a throw.  The outcome_std_error cases are expensive as they pull in the status code domain machinery at this point.</p>
   <h3 class="heading settled" data-level="5.4" id="error2"><span class="secno">5.4. </span><span class="content">Incremental size cost of signaling an error</span><a class="self-link" href="#error2"></a></h3>
<pre class="highlight"><c- b="">void</c-> <c- nf="">callee2</c-><c- p="">(</c-><c- b="">int</c-> <c- n="">amount</c-><c- p="">)</c-> <c- p="">{</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">global_int</c-> <c- o="">+</c-> <c- n="">amount</c-> <c- o="">==</c-> <c- n="">INT_MAX</c-><c- p="">)</c->
    <c- k="">throw</c-> <c- mi="">1</c-><c- p="">;</c->
  <c- n="">global_int</c-> <c- o="">+=</c-> <c- n="">amount</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
   <div id="SecondError" style="width: 100%;height:600px;"></div>
<script type="text/javascript">
  // based on prepared DOM, initialize echarts instance
  var myChart = echarts.init(document.getElementById('SecondError'));

  // specify chart configuration item and data
  var option = {
    tooltip: { formatter: myFormatter },
    calculable : true,
    legend: {
      type: 'scroll',
      right: 0,
      top: 0,
      orient: 'vertical',
    },
    xAxis: [{
      type: 'value',
    }],
    yAxis: [{
      type: 'category',
      data: ['Clang','GCC','MSVC x64','MSVC x86']
    }],
    grid: {
      top: 0,
      left: 65,
      right: 200
    },
    dataZoom: [{show: true}],
    series: data_Cost2ndError
  };

  // use configuration item and data specified to show chart
  myChart.setOption(option);
</script>
   <p>These numbers are all over the place.  Here are some highlights:</p>
   <ul>
    <li data-md="">
     <p>On GCC and Clang, all the throwing variants are more incrementally expensive than all the non-throwing variants.</p>
    </li><li data-md="">
     <p>On MSVC, it isn’t just the first non-<code class="highlight"><c- k="">noexcept</c-></code> function that is expensive in noexcept_abort, but the later calls are expensive too.</p>
    </li><li data-md="">
     <p>MSVC and Clang have somewhat inflated costs for struct errors.  Both compilers emit vectorized instructions in many cases, and vectorized instructions are large.</p>
   </li></ul>
   <h3 class="heading settled" data-level="5.5" id="handle1"><span class="secno">5.5. </span><span class="content">Initial size cost for handling an error</span><a class="self-link" href="#handle1"></a></h3>
    To get the initial handling costs, we’ll rewrite main to look something like this... 
<pre class="highlight"><c- b="">int</c-> <c- nf="">main</c-><c- p="">()</c-> <c- p="">{</c->
  <c- k="">try</c-> <c- p="">{</c->
    <c- n="">caller</c-><c- p="">();</c->
  <c- p="">}</c-> <c- k="">catch</c-> <c- p="">(</c-><c- b="">int</c-><c- p="">)</c-> <c- p="">{</c->
    <c- n="">global_int</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
  <c- p="">}</c->
  <c- n="">caller2</c-><c- p="">(</c-><c- mi="">0</c-><c- p="">);</c->
  <c- k="">return</c-> <c- n="">global_int</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
   <code class="highlight"><c- n="">abort</c-></code> results won’t be included here, because there is no "handling" of an <code class="highlight"><c- n="">abort</c-></code> call in C++.  The environment needs to handle it and restart the process, reboot the system, or relaunch the rocket. 
   <div id="FirstCatch" style="width: 100%;height:600px;"></div>
<script type="text/javascript">
  // based on prepared DOM, initialize echarts instance
  var myChart = echarts.init(document.getElementById('FirstCatch'));

  // specify chart configuration item and data
  var option = {
    tooltip: { formatter: myFormatter },
    calculable : true,
    legend: {
      type: 'scroll',
      right: 0,
      top: 0,
      orient: 'vertical',
    },
    xAxis: [{
      type: 'value',
    }],
    yAxis: [{
      type: 'category',
      data: ['Clang','GCC','MSVC x64','MSVC x86']
    }],
    grid: {
      top: 0,
      left: 65,
      right: 200
    },
    dataZoom: [{show: true}],
    series: data_Cost1stCatch
  };

  // use configuration item and data specified to show chart
  myChart.setOption(option);
</script>
   <p>Here we see that the initial catch cost of TLS and exceptions is universally high compared to the alternatives.</p>
   <h3 class="heading settled" data-level="5.6" id="handle2"><span class="secno">5.6. </span><span class="content">Incremental size cost for handling an error</span><a class="self-link" href="#handle2"></a></h3>
    Now for the incremental code, and the associated costs. 
<pre class="highlight"><c- b="">int</c-> <c- nf="">main</c-><c- p="">()</c-> <c- p="">{</c->
  <c- k="">try</c-> <c- p="">{</c->
    <c- n="">caller</c-><c- p="">();</c->
  <c- p="">}</c-> <c- k="">catch</c-> <c- p="">(</c-><c- b="">int</c-><c- p="">)</c-> <c- p="">{</c->
    <c- n="">global_int</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
  <c- p="">}</c->
  <c- k="">try</c-> <c- p="">{</c->
    <c- n="">caller2</c-><c- p="">(</c-><c- mi="">0</c-><c- p="">);</c->
  <c- p="">}</c-> <c- k="">catch</c-> <c- p="">(</c-><c- b="">int</c-><c- p="">)</c-> <c- p="">{</c->
    <c- n="">global_int</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
  <c- p="">}</c->
  <c- k="">return</c-> <c- n="">global_int</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
   Note that this is measuring the cost of handling a second error within a single function.  If the error handling were split over multiple functions, the cost profile may be different. 
   <div id="SecondCatch" style="width: 100%;height:600px;"></div>
<script type="text/javascript">
  // based on prepared DOM, initialize echarts instance
  var myChart = echarts.init(document.getElementById('SecondCatch'));

  // specify chart configuration item and data
  var option = {
    tooltip: { formatter: myFormatter },
    calculable : true,
    legend: {
      type: 'scroll',
      right: 0,
      top: 0,
      orient: 'vertical',
    },
    xAxis: [{
      type: 'value',
    }],
    yAxis: [{
      type: 'category',
      data: ['Clang','GCC','MSVC x64','MSVC x86']
    }],
    grid: {
      top: 0,
      left: 65,
      right: 200
    },
    dataZoom: [{show: true}],
    series: data_Cost2ndCatch
  };

  // use configuration item and data specified to show chart
  myChart.setOption(option);
</script>
   <h2 class="heading settled" data-level="6" id="conclusion"><span class="secno">6. </span><span class="content">Conclusion</span><a class="self-link" href="#conclusion"></a></h2>
    Exceptions and on-by-default unwinding information are reasonable error handling strategies in many environments, but they don’t serve all needs in all use cases.  C++ needs standards conforming ways to avoid exception and unwind overhead on platforms that are size constrained.  C++ is built on the foundation that you don’t pay for what you don’t use, and that you can’t write the language abstractions better by hand.  This paper provides evidence that you can write error handling code by hand that results in smaller code than the equivalent exception throwing code if all you use is terminate semantics or an integer’s worth of error information.  In each of the six test cases, terminate and integer return values beat exceptions on size, even before stripping out unwind information. 
   <p>WG21 should also note that returning a two-pointer structure isn’t "free" when compared to an integer return value.  Future error handling mechanisms should be sure to expose integer error values so that we don’t force space sensitive users to resort to hand written error return values.</p>
   <h2 class="heading settled" data-level="7" id="ack"><span class="secno">7. </span><span class="content">Acknowledgments</span><a class="self-link" href="#ack"></a></h2>
    Simon Brand, Niall Douglas, Brad Keryan, Reid Kleckner, Modi Mo, Herb Sutter, John McFarlane, Ben Saks, and Richard Smith provided valuable review commentary on this paper. 
   <p>Thanks to Lawrence Crowl, for asking the question "what if everything were <code class="highlight"><c- k="">noexcept</c-></code>?".</p>
   <p>Charts generated with <a data-link-type="biblio" href="#biblio-echarts">[ECharts]</a>.</p>
   <h2 class="heading settled" id="speed"><span class="content">Appendix A: Why no speed measurements?</span><a class="self-link" href="#speed"></a></h2>
    Gathering representative timings for very small pieces of code is difficult on modern hardware.  In the <a href="#code_neutral1">initial-error-neutral-function return_val benchmark</a>; <code class="highlight"><c- n="">main</c-><c- p="">()</c-></code>, <code class="highlight"><c- n="">caller</c-><c- p="">()</c-></code>, <code class="highlight"><c- n="">callee</c-><c- p="">()</c-></code>, and <code class="highlight"><c- n="">Dtor</c-><c- o="">::~</c-><c- n="">Dtor</c-><c- p="">()</c-></code> add up to just 21 instructions when compiled with MSVC 2019 x64.  There are no system calls, no atomic operations, no divisions, or any other highly expensive operations being performed.  The code easily fits into caches.  This means that micro-architectural stalls can have drastic effects on performance. 
   <p>One type of micro-architectural quirk that makes these measurements very painful is code alignment <a data-link-type="biblio" href="#biblio-bakhvalov">[Bakhvalov]</a>.  Each call and each branch can introduce stalls if jumping to a poorly aligned location.  These stalls can dominate the timings.  With poor alignment, the error neutral noexcept_terminate MSVC x86 case (12 instructions) can run slower than the error neutral throw_val MSVC x86 case (28 instructions, including TLS manipulation).</p>
   <p>In order to get representative timings, a benchmark needs to sample a representative set of alignments of all jumps.  Gathering such a sampling is challenging, especially if one does not have access to the source of the compiler.</p>
   <p>This isn’t just a problem that can be solved by increasing the number of loop iterations in a performance test.  Increasing loop iterations just gets a more accurate measurement of a single alignment.</p>
   <p>There exist tools to statically quantify the performance characteristics of assembly kernels.  Intel Architecture Code Analyzer <a data-link-type="biblio" href="#biblio-iaca">[IACA]</a> and LLVM Machine Code Analyzer <a data-link-type="biblio" href="#biblio-mca">[MCA]</a> can take a snippet of assembly and determine how many cycles that instruction sequence will take on a given architecture.  These tools weren’t suitable for my purposes, as neither is able to model call and return instructions currently.</p>
   <p>The author is hoping to gather representative speed measurements in a future paper.</p>
   <h2 class="heading settled" id="build_flags"><span class="content">Appendix B: The build flags</span><a class="self-link" href="#build_flags"></a></h2>
   <h3 class="heading settled" id="msvc"><span class="content">MSVC</span><a class="self-link" href="#msvc"></a></h3>
    The compiler and flags are the same for 32-bit and 64-bit builds, except that the 32-bit linker uses /machine:x86 and the 64-bit linker uses /machine:x64 
   <p>Compiler marketing version: Visual Studio 2019</p>
   <p>Compiler toolkit version: 14.20.27508</p>
   <p>cl.exe version: 19.20.27508.1</p>
   <p>Compiler codegen flags (no exceptions): /GR /Gy /Gw /O1 /MT /d2FH4 /std:c++latest /permissive- /DNDEBUG</p>
   <p>Compiler codegen flags (with exceptions): /EHs /GR /Gy /Gw /O1 /MT /d2FH4 /std:c++latest /permissive- /DNDEBUG</p>
   <p>Compiler codegen flags (outcome, no exceptions): /GR- /Gy /Gw /O1 /MT /d2FH4 /std:c++latest /permissive- /DNDEBUG</p>
   <p>Linker flags: /OPT:REF /release /subsystem:CONSOLE /incremental:no /OPT:ICF /NXCOMPAT /DYNAMICBASE /DEBUG *.obj</p>
   <h3 class="heading settled" id="clang_x64"><span class="content">Clang x64</span><a class="self-link" href="#clang_x64"></a></h3>
    Toolchains used: 
   <ul>
    <li data-md="">
     <p>Clang 8.0.0 and libc++</p>
    </li><li data-md="">
     <p>System linker from Ubuntu 14.04.3’s GCC 4.8.4 installation</p>
   </li></ul>
   <p>Compiler codegen flags (no exceptions): -fno-exceptions -Os -ffunction-sections -fdata-sections -std=c++17 -stdlib=libc++ -static -DNDEBUG</p>
   <p>Compiler codegen flags (exceptions): -Os -ffunction-sections -fdata-sections -std=c++17 -stdlib=libc++ -static -DNDEBUG</p>
   <p>Compiler codegen flags (outcome, no exceptions): -fno-rtti -fno-exceptions -Os -ffunction-sections -fdata-sections -std=c++17 -stdlib=libc++ -static -DNDEBUG</p>
   <p>Linking flags: -Wl,--gc-sections -pthread -static -static-libgcc -stdlib=libc++ *.o libc++abi.a</p>
   <h3 class="heading settled" id="gcc_x64"><span class="content">GCC x64</span><a class="self-link" href="#gcc_x64"></a></h3>
    Toolchain used: GCC 7.3.1 from the Red Hat Developer Toolset 7.1 
   <p>Compiler codegen flags (no exceptions): -fno-exceptions -Os -ffunction-sections -fdata-sections -std=c++17 -static</p>
   <p>Compiler codegen flags (exceptions): -Os -ffunction-sections -fdata-sections -std=c++17 -static</p>
   <p>Compiler codegen flags (outcome, no exceptions): -fno-rtti -fno-exceptions -Os -ffunction-sections -fdata-sections -std=c++17 -static -DNDEBUG</p>
   <p>Linking flags: -Wl,--gc-sections -pthread -static -static-libgcc -static-libstdc++ *.o</p>
   <h2 class="heading settled" id="code"><span class="content">Appendix C: The code</span><a class="self-link" href="#code"></a></h2>
    As stated before, this isn’t the exact code that was benchmarked.  In the benchmarked code, functions were placed in distinct translation units in order to avoid inlining.  The following code is provided to demonstrate what the error handling code looks like. 
   <h3 class="heading settled" id="code_support"><span class="content">Common support code</span><a class="self-link" href="#code_support"></a></h3>
   <details>
    <summary>Expand to see code snippets</summary>
     <strong>All cases</strong> 
<pre class="highlight"><c- k="">struct</c-> <c- n="">Dtor</c-> <c- p="">{</c-><c- o="">~</c-><c- n="">Dtor</c-><c- p="">()</c-> <c- p="">{}};</c->
<c- b="">int</c-> <c- n="">global_int</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
</pre>
    <p><strong>Error struct cases</strong></p>
<pre class="highlight"><c- b="">int</c-> <c- n="">error_info</c-> <c- o="">=</c-> <c- mi="">1</c-><c- p="">;</c->
<c- b="">int</c-> <c- n="">error_domain</c-> <c- o="">=</c-> <c- mi="">99</c-><c- p="">;</c->
<c- k="">struct</c-> <c- n="">error_struct</c-> <c- p="">{</c->
  <c- b="">void</c-> <c- o="">*</c-><c- n="">error</c-> <c- o="">=</c-> <c- k="">nullptr</c-><c- p="">;</c->
  <c- b="">void</c-> <c- o="">*</c-><c- n="">domain</c-> <c- o="">=</c-> <c- k="">nullptr</c-><c- p="">;</c->
<c- p="">};</c->
</pre>
    <p><strong>throw_exception</strong></p>
<pre class="highlight"><c- k="">class</c-> <c- nc="">err_exception</c-> <c- o="">:</c-> <c- k="">public</c-> <c- n="">std</c-><c- o="">::</c-><c- n="">exception</c-> <c- p="">{</c->
<c- k="">public</c-><c- o="">:</c->
  <c- b="">int</c-> <c- n="">val</c-><c- p="">;</c->
  <c- k="">explicit</c-> <c- nf="">err_exception</c-><c- p="">(</c-><c- b="">int</c-> <c- n="">e</c-><c- p="">)</c-> <c- o="">:</c-> <c- n="">val</c-><c- p="">(</c-><c- n="">e</c-><c- p="">)</c-> <c- p="">{}</c->
  <c- k="">const</c-> <c- b="">char</c-> <c- o="">*</c-><c- nf="">what</c-><c- p="">()</c-> <c- k="">const</c-> <c- k="">noexcept</c-> <c- k="">override</c-> <c- p="">{</c-> <c- k="">return</c-> <c- s="">""</c-><c- p="">;</c-> <c- p="">}</c->
<c- p="">};</c->
</pre>
   </details>
   <h3 class="heading settled" id="code_neutral1"><span class="content">Initial error neutral functions</span><a class="self-link" href="#code_neutral1"></a></h3>
    This section lays the groundwork for future comparisons.  All of these cases are capable of transporting error information from a future signaling site (<code class="highlight"><c- n="">callee</c-></code>) to a future catching site (<code class="highlight"><c- n="">main</c-></code>).  No errors are signaled here, but the plumbing is in place. 
   <details>
    <summary>Expand to see code snippets</summary>
     <strong>Default main function</strong> 
    <p>All of the <code class="highlight"><c- n="">main</c-></code> functions in this section look the same, except for the ref_struct and ref_val <code class="highlight"><c- n="">main</c-></code> functions.  To avoid repetition, I will show the most common main function here.  The ref_struct and ref_val cases will still show their <code class="highlight"><c- n="">main</c-> <c- n="">functions</c-></code>.</p>
<pre class="highlight"><c- b="">int</c-> <c- nf="">main</c-><c- p="">()</c-> <c- p="">{</c->
  <c- n="">caller</c-><c- p="">();</c->
  <c- k="">return</c-> <c- n="">global_int</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
    <strong>abort, throw_value, throw_struct, throw_exception</strong> 
<pre class="highlight"><c- b="">void</c-> <c- nf="">callee</c-><c- p="">()</c-> <c- p="">{</c-><c- d="">/* will raise an error one day*/</c-><c- p="">}</c->
<c- b="">void</c-> <c- nf="">caller</c-><c- p="">()</c-> <c- p="">{</c->
  <c- n="">Dtor</c-> <c- n="">d</c-><c- p="">;</c->
  <c- n="">callee</c-><c- p="">();</c->
  <c- n="">global_int</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
    <strong>noexcept_abort</strong> 
<pre class="highlight"><c- b="">void</c-> <c- nf="">callee</c-><c- p="">()</c-> <c- k="">noexcept</c-> <c- p="">{</c-><c- d="">/* will raise an error one day*/</c-><c- p="">}</c->
<c- b="">void</c-> <c- nf="">caller</c-><c- p="">()</c-> <c- k="">noexcept</c-> <c- p="">{</c->
  <c- n="">Dtor</c-> <c- n="">d</c-><c- p="">;</c->
  <c- n="">callee</c-><c- p="">();</c->
  <c- n="">global_int</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
    <strong>return_val</strong> 
<pre class="highlight"><c- b="">int</c-> <c- nf="">callee</c-><c- p="">()</c-> <c- k="">noexcept</c-> <c- p="">{</c-><c- k="">return</c-> <c- mi="">0</c-><c- p="">;}</c->
<c- b="">int</c-> <c- nf="">caller</c-><c- p="">()</c-> <c- k="">noexcept</c-> <c- p="">{</c->
  <c- n="">Dtor</c-> <c- n="">d</c-><c- p="">;</c->
  <c- b="">int</c-> <c- n="">e</c-> <c- o="">=</c-> <c- n="">callee</c-><c- p="">();</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">e</c-><c- p="">)</c->
    <c- k="">return</c-> <c- n="">e</c-><c- p="">;</c->
  <c- n="">global_int</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
  <c- k="">return</c-> <c- n="">e</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
    <strong>return_struct</strong> 
<pre class="highlight"><c- n="">error_struct</c-> <c- nf="">callee</c-><c- p="">()</c-> <c- k="">noexcept</c-> <c- p="">{</c-><c- k="">return</c-> <c- n="">error_struct</c-><c- p="">{};}</c->
<c- n="">error_struct</c-> <c- nf="">caller</c-><c- p="">()</c-> <c- k="">noexcept</c-> <c- p="">{</c->
  <c- n="">Dtor</c-> <c- n="">d</c-><c- p="">;</c->
  <c- n="">error_struct</c-> <c- n="">e</c-> <c- o="">=</c-> <c- n="">callee</c-><c- p="">();</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">e</c-><c- p="">.</c-><c- n="">error</c-><c- p="">)</c->
    <c- k="">return</c-> <c- n="">e</c-><c- p="">;</c->
  <c- n="">global_int</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
  <c- k="">return</c-> <c- n="">e</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
    <strong>ref_val</strong> 
<pre class="highlight"><c- b="">void</c-> <c- nf="">callee</c-><c- p="">(</c-><c- b="">int</c-> <c- o="">&amp;</c-><c- p="">)</c-> <c- p="">{}</c->
<c- b="">void</c-> <c- nf="">caller</c-><c- p="">(</c-><c- b="">int</c-> <c- o="">&amp;</c-><c- n="">e</c-><c- p="">)</c-> <c- p="">{</c->
  <c- n="">Dtor</c-> <c- n="">d</c-><c- p="">;</c->
  <c- n="">callee</c-><c- p="">(</c-><c- n="">e</c-><c- p="">);</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">e</c-><c- p="">)</c->
    <c- k="">return</c-><c- p="">;</c->
  <c- n="">global_int</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
<c- p="">}</c->
<c- b="">int</c-> <c- nf="">main</c-><c- p="">()</c-> <c- p="">{</c->
  <c- b="">int</c-> <c- n="">e</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
  <c- n="">caller</c-><c- p="">(</c-><c- n="">e</c-><c- p="">);</c->
  <c- k="">return</c-> <c- n="">global_int</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
    <strong>ref_struct</strong> 
<pre class="highlight"><c- b="">void</c-> <c- nf="">callee</c-><c- p="">(</c-><c- n="">error_struct</c-> <c- o="">&amp;</c-><c- p="">)</c-> <c- p="">{}</c->
<c- b="">void</c-> <c- nf="">caller</c-><c- p="">(</c-><c- n="">error_struct</c-> <c- o="">&amp;</c-><c- n="">e</c-><c- p="">)</c-> <c- p="">{</c->
  <c- n="">Dtor</c-> <c- n="">d</c-><c- p="">;</c->
  <c- n="">callee</c-><c- p="">(</c-><c- n="">e</c-><c- p="">);</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">e</c-><c- p="">.</c-><c- n="">error</c-><c- p="">)</c->
    <c- k="">return</c-><c- p="">;</c->
  <c- n="">global_int</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
<c- p="">}</c->
<c- b="">int</c-> <c- nf="">main</c-><c- p="">()</c-> <c- p="">{</c->
  <c- n="">error_struct</c-> <c- n="">e</c-><c- p="">;</c->
  <c- n="">caller</c-><c- p="">(</c-><c- n="">e</c-><c- p="">);</c->
  <c- k="">return</c-> <c- n="">global_int</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
    <strong>expected_val</strong> 
<pre class="highlight"><c- n="">tl</c-><c- o="">::</c-><c- n="">expected</c-><c- o="">&lt;</c-><c- b="">void</c-><c- p="">,</c-> <c- b="">int</c-><c- o="">&gt;</c-> <c- n="">callee</c-><c- p="">()</c-> <c- p="">{</c-> <c- k="">return</c-> <c- p="">{};</c-> <c- p="">}</c->
<c- n="">tl</c-><c- o="">::</c-><c- n="">expected</c-><c- o="">&lt;</c-><c- b="">void</c-><c- p="">,</c-> <c- b="">int</c-><c- o="">&gt;</c-> <c- n="">caller</c-><c- p="">()</c-> <c- p="">{</c->
  <c- n="">Dtor</c-> <c- n="">d</c-><c- p="">;</c->
  <c- n="">tl</c-><c- o="">::</c-><c- n="">expected</c-><c- o="">&lt;</c-><c- b="">void</c-><c- p="">,</c-> <c- b="">int</c-><c- o="">&gt;</c-> <c- n="">e</c-> <c- o="">=</c-> <c- n="">callee</c-><c- p="">();</c->
  <c- k="">if</c-> <c- p="">(</c-><c- o="">!</c-><c- n="">e</c-><c- p="">)</c->
    <c- k="">return</c-> <c- n="">e</c-><c- p="">;</c->
  <c- n="">global_int</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
  <c- k="">return</c-> <c- n="">e</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
    <strong>expected_struct</strong> 
<pre class="highlight"><c- n="">tl</c-><c- o="">::</c-><c- n="">expected</c-><c- o="">&lt;</c-><c- b="">void</c-><c- p="">,</c-> <c- n="">error_struct</c-><c- o="">&gt;</c-> <c- n="">callee</c-><c- p="">()</c-> <c- p="">{</c-> <c- k="">return</c-> <c- p="">{};</c-> <c- p="">}</c->
<c- n="">tl</c-><c- o="">::</c-><c- n="">expected</c-><c- o="">&lt;</c-><c- b="">void</c-><c- p="">,</c-> <c- n="">error_struct</c-><c- o="">&gt;</c-> <c- n="">caller</c-><c- p="">()</c-> <c- p="">{</c->
  <c- n="">Dtor</c-> <c- n="">d</c-><c- p="">;</c->
  <c- n="">tl</c-><c- o="">::</c-><c- n="">expected</c-><c- o="">&lt;</c-><c- b="">void</c-><c- p="">,</c-> <c- n="">error_struct</c-><c- o="">&gt;</c-> <c- n="">e</c-> <c- o="">=</c-> <c- n="">callee</c-><c- p="">();</c->
  <c- k="">if</c-> <c- p="">(</c-><c- o="">!</c-><c- n="">e</c-><c- p="">)</c->
    <c- k="">return</c-> <c- n="">e</c-><c- p="">;</c->
  <c- n="">global_int</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
  <c- k="">return</c-> <c- n="">e</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
    <strong>outcome_val</strong> 
<pre class="highlight"><c- k="">namespace</c-> <c- n="">outcome</c-> <c- o="">=</c-> <c- n="">OUTCOME_V2_NAMESPACE</c-><c- p="">;</c->

<c- k="">template</c-> <c- o="">&lt;</c-><c- k="">class</c-> <c- nc="">T</c-><c- p="">,</c-> <c- k="">class</c-> <c- nc="">E</c-><c- o="">&gt;</c->
<c- k="">using</c-> <c- n="">result</c-> <c- o="">=</c-> <c- n="">outcome</c-><c- o="">::</c-><c- n="">experimental</c-><c- o="">::</c-><c- n="">status_result</c-><c- o="">&lt;</c-><c- n="">T</c-><c- p="">,</c-> <c- n="">E</c-><c- o="">&gt;</c-><c- p="">;</c->

<c- n="">result</c-><c- o="">&lt;</c-><c- b="">void</c-><c- p="">,</c-> <c- b="">int</c-><c- o="">&gt;</c-> <c- n="">callee</c-><c- p="">()</c-> <c- p="">{</c->
  <c- k="">return</c-> <c- n="">outcome</c-><c- o="">::</c-><c- n="">success</c-><c- p="">();</c->
<c- p="">}</c->
<c- n="">result</c-><c- o="">&lt;</c-><c- b="">void</c-><c- p="">,</c-> <c- b="">int</c-><c- o="">&gt;</c-> <c- n="">caller</c-><c- p="">()</c-> <c- p="">{</c->
  <c- n="">Dtor</c-> <c- n="">d</c-><c- p="">;</c->
  <c- n="">OUTCOME_TRYV</c-><c- p="">(</c-><c- n="">callee</c-><c- p="">());</c->
  <c- n="">global_int</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
  <c- k="">return</c-> <c- n="">outcome</c-><c- o="">::</c-><c- n="">success</c-><c- p="">();</c->
<c- p="">}</c->
</pre>
    <strong>outcome_struct</strong> 
<pre class="highlight"><c- k="">namespace</c-> <c- n="">outcome</c-> <c- o="">=</c-> <c- n="">OUTCOME_V2_NAMESPACE</c-><c- p="">;</c->

<c- k="">template</c-> <c- o="">&lt;</c-><c- k="">class</c-> <c- nc="">T</c-><c- p="">,</c-> <c- k="">class</c-> <c- nc="">E</c-><c- o="">&gt;</c->
<c- k="">using</c-> <c- n="">result</c-> <c- o="">=</c-> <c- n="">outcome</c-><c- o="">::</c-><c- n="">experimental</c-><c- o="">::</c-><c- n="">status_result</c-><c- o="">&lt;</c-><c- n="">T</c-><c- p="">,</c-> <c- n="">E</c-><c- o="">&gt;</c-><c- p="">;</c->

<c- n="">result</c-><c- o="">&lt;</c-><c- b="">void</c-><c- p="">,</c-> <c- n="">error_struct</c-><c- o="">&gt;</c-> <c- n="">callee</c-><c- p="">()</c-> <c- p="">{</c->
  <c- k="">return</c-> <c- n="">outcome</c-><c- o="">::</c-><c- n="">success</c-><c- p="">();</c->
<c- p="">}</c->
<c- n="">result</c-><c- o="">&lt;</c-><c- b="">void</c-><c- p="">,</c-> <c- n="">error_struct</c-><c- o="">&gt;</c-> <c- n="">caller</c-><c- p="">()</c-> <c- p="">{</c->
  <c- n="">Dtor</c-> <c- n="">d</c-><c- p="">;</c->
  <c- n="">OUTCOME_TRYV</c-><c- p="">(</c-><c- n="">callee</c-><c- p="">());</c->
  <c- n="">global_int</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
  <c- k="">return</c-> <c- n="">outcome</c-><c- o="">::</c-><c- n="">success</c-><c- p="">();</c->
<c- p="">}</c->
</pre>
    <strong>outcome_std_error</strong> 
<pre class="highlight"><c- k="">namespace</c-> <c- n="">outcome</c-> <c- o="">=</c-> <c- n="">OUTCOME_V2_NAMESPACE</c-><c- p="">;</c->

<c- k="">template</c-> <c- o="">&lt;</c-><c- k="">class</c-> <c- nc="">T</c-><c- o="">&gt;</c->
<c- k="">using</c-> <c- n="">result</c-> <c- o="">=</c-> <c- n="">outcome</c-><c- o="">::</c-><c- n="">experimental</c-><c- o="">::</c-><c- n="">status_result</c-><c- o="">&lt;</c-><c- n="">T</c-><c- o="">&gt;</c-><c- p="">;</c->

<c- n="">result</c-><c- o="">&lt;</c-><c- b="">void</c-><c- o="">&gt;</c-> <c- n="">callee</c-><c- p="">()</c-> <c- p="">{</c->
  <c- k="">return</c-> <c- n="">outcome</c-><c- o="">::</c-><c- n="">success</c-><c- p="">();</c->
<c- p="">}</c->
<c- n="">result</c-><c- o="">&lt;</c-><c- b="">void</c-><c- o="">&gt;</c-> <c- n="">caller</c-><c- p="">()</c-> <c- p="">{</c->
  <c- n="">Dtor</c-> <c- n="">d</c-><c- p="">;</c->
  <c- n="">OUTCOME_TRYV</c-><c- p="">(</c-><c- n="">callee</c-><c- p="">());</c->
  <c- n="">global_int</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
  <c- k="">return</c-> <c- n="">outcome</c-><c- o="">::</c-><c- n="">success</c-><c- p="">();</c->
<c- p="">}</c->
</pre>
    <strong>tls_error_val</strong> 
<pre class="highlight"><c- k="">thread_local</c-> <c- b="">int</c-> <c- n="">tls_error_val_var</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
<c- b="">void</c-> <c- nf="">callee</c-><c- p="">()</c-> <c- p="">{}</c->
<c- b="">void</c-> <c- nf="">caller</c-><c- p="">()</c-> <c- p="">{</c->
  <c- n="">Dtor</c-> <c- n="">d</c-><c- p="">;</c->
  <c- n="">callee</c-><c- p="">();</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">tls_error_val_var</c-><c- p="">)</c->
    <c- k="">return</c-><c- p="">;</c->
  <c- n="">global_int</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
    <strong>tls_error_struct</strong> 
<pre class="highlight"><c- k="">thread_local</c-> <c- n="">error_struct</c-> <c- n="">tls_error_struct_var</c-><c- p="">{};</c->
<c- b="">void</c-> <c- nf="">callee</c-><c- p="">()</c-> <c- p="">{}</c->
<c- b="">void</c-> <c- nf="">caller</c-><c- p="">()</c-> <c- p="">{</c->
  <c- n="">Dtor</c-> <c- n="">d</c-><c- p="">;</c->
  <c- n="">callee</c-><c- p="">();</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">tls_error_struct_var</c-><c- p="">.</c-><c- n="">error</c-><c- p="">)</c->
    <c- k="">return</c-><c- p="">;</c->
  <c- n="">global_int</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
   </details>
   <h3 class="heading settled" id="code_neutral2"><span class="content">Incremental error neutral functions</span><a class="self-link" href="#code_neutral2"></a></h3>
    Here, we add an extra two functions with error transporting capabilities so that we can measure the incremental cost of error neutral functions.  These functions need to be slightly different than the old functions in order to avoid deduplication optimizations. 
   <p>In order to save on text length, the only functions that will be listed here are the functions were added or changed compared to the previous section.</p>
   <details>
    <summary>Expand to see code snippets</summary>
     <strong>Default main function</strong> 
    <p>All of the <code class="highlight"><c- n="">main</c-></code> functions in this section look the same, except for the ref_struct and ref_val <code class="highlight"><c- n="">main</c-></code> functions.  To avoid repetition, I will show the most common main function here.  The ref_struct and ref_val cases will still show their <code class="highlight"><c- n="">main</c-> <c- n="">functions</c-></code>.</p>
<pre class="highlight"><c- b="">int</c-> <c- nf="">main</c-><c- p="">()</c-> <c- p="">{</c->
  <c- n="">caller</c-><c- p="">();</c->
  <c- n="">caller2</c-><c- p="">(</c-><c- mi="">0</c-><c- p="">);</c->
  <c- k="">return</c-> <c- n="">global_int</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
    <strong>abort, throw_value, throw_struct, throw_exception</strong> 
<pre class="highlight"><c- b="">void</c-> <c- nf="">callee2</c-><c- p="">(</c-><c- b="">int</c-> <c- n="">amount</c-><c- p="">)</c-> <c- p="">{</c-> <c- n="">global_int</c-> <c- o="">+=</c-> <c- n="">amount</c-><c- p="">;</c-> <c- p="">}</c->
<c- b="">void</c-> <c- nf="">caller2</c-><c- p="">(</c-><c- b="">int</c-> <c- n="">amount</c-><c- p="">)</c-> <c- p="">{</c->
  <c- n="">Dtor</c-> <c- n="">d</c-><c- p="">;</c->
  <c- n="">callee2</c-><c- p="">(</c-><c- n="">amount</c-><c- p="">);</c->
  <c- n="">global_int</c-> <c- o="">+=</c-> <c- n="">amount</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
    <strong>noexcept_abort</strong> 
<pre class="highlight"><c- b="">void</c-> <c- nf="">callee2</c-><c- p="">(</c-><c- b="">int</c-> <c- n="">amount</c-><c- p="">)</c-> <c- k="">noexcept</c-> <c- p="">{</c-> <c- n="">global_int</c-> <c- o="">+=</c-> <c- n="">amount</c-><c- p="">;</c-> <c- p="">}</c->
<c- b="">void</c-> <c- nf="">caller2</c-><c- p="">(</c-><c- b="">int</c-> <c- n="">amount</c-><c- p="">)</c-> <c- k="">noexcept</c-> <c- p="">{</c->
  <c- n="">Dtor</c-> <c- n="">d</c-><c- p="">;</c->
  <c- n="">callee2</c-><c- p="">(</c-><c- n="">amount</c-><c- p="">);</c->
  <c- n="">global_int</c-> <c- o="">+=</c-> <c- n="">amount</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
    <strong>return_val</strong> 
<pre class="highlight"><c- b="">int</c-> <c- nf="">callee2</c-><c- p="">(</c-><c- b="">int</c-> <c- n="">amount</c-><c- p="">)</c-> <c- p="">{</c->
  <c- n="">global_int</c-> <c- o="">+=</c-> <c- n="">amount</c-><c- p="">;</c->
  <c- k="">return</c-> <c- mi="">0</c-><c- p="">;</c->
<c- p="">}</c->
<c- b="">int</c-> <c- nf="">caller2</c-><c- p="">(</c-><c- b="">int</c-> <c- n="">amount</c-><c- p="">)</c-> <c- p="">{</c->
  <c- n="">Dtor</c-> <c- n="">d</c-><c- p="">;</c->
  <c- b="">int</c-> <c- n="">e</c-> <c- o="">=</c-> <c- n="">callee2</c-><c- p="">(</c-><c- n="">amount</c-><c- p="">);</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">e</c-><c- p="">)</c->
    <c- k="">return</c-> <c- n="">e</c-><c- p="">;</c->
  <c- n="">global_int</c-> <c- o="">+=</c-> <c- n="">amount</c-><c- p="">;</c->
  <c- k="">return</c-> <c- n="">e</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
    <strong>return_struct</strong> 
<pre class="highlight"><c- n="">error_struct</c-> <c- nf="">callee2</c-><c- p="">(</c-><c- b="">int</c-> <c- n="">amount</c-><c- p="">)</c-> <c- p="">{</c->
  <c- n="">global_int</c-> <c- o="">+=</c-> <c- n="">amount</c-><c- p="">;</c->
  <c- k="">return</c-> <c- n="">error_struct</c-><c- p="">{};</c->
<c- p="">}</c->
<c- n="">error_struct</c-> <c- nf="">caller2</c-><c- p="">(</c-><c- b="">int</c-> <c- n="">amount</c-><c- p="">)</c-> <c- p="">{</c->
  <c- n="">Dtor</c-> <c- n="">d</c-><c- p="">;</c->
  <c- n="">error_struct</c-> <c- n="">e</c-> <c- o="">=</c-> <c- n="">callee2</c-><c- p="">(</c-><c- n="">amount</c-><c- p="">);</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">e</c-><c- p="">.</c-><c- n="">error</c-><c- p="">)</c->
    <c- k="">return</c-> <c- n="">e</c-><c- p="">;</c->
  <c- n="">global_int</c-> <c- o="">+=</c-> <c- n="">amount</c-><c- p="">;</c->
  <c- k="">return</c-> <c- n="">e</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
    <strong>ref_val</strong> 
<pre class="highlight"><c- b="">void</c-> <c- nf="">callee2</c-><c- p="">(</c-><c- b="">int</c-> <c- n="">amount</c-><c- p="">,</c-> <c- b="">int</c-> <c- o="">&amp;</c-><c- p="">)</c-> <c- p="">{</c-> <c- n="">global_int</c-> <c- o="">+=</c-> <c- n="">amount</c-><c- p="">;</c-> <c- p="">}</c->
<c- b="">void</c-> <c- nf="">caller2</c-><c- p="">(</c-><c- b="">int</c-> <c- n="">amount</c-><c- p="">,</c-> <c- b="">int</c-> <c- o="">&amp;</c-><c- n="">e</c-><c- p="">)</c-> <c- p="">{</c->
  <c- n="">Dtor</c-> <c- n="">d</c-><c- p="">;</c->
  <c- n="">callee2</c-><c- p="">(</c-><c- n="">amount</c-><c- p="">,</c-> <c- n="">e</c-><c- p="">);</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">e</c-><c- p="">)</c->
    <c- k="">return</c-><c- p="">;</c->
  <c- n="">global_int</c-> <c- o="">+=</c-> <c- n="">amount</c-><c- p="">;</c->
<c- p="">}</c->
<c- b="">int</c-> <c- nf="">main</c-><c- p="">()</c-> <c- p="">{</c->
  <c- b="">int</c-> <c- n="">e</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
  <c- n="">caller</c-><c- p="">(</c-><c- n="">e</c-><c- p="">);</c->
  <c- n="">caller2</c-><c- p="">(</c-><c- mi="">0</c-><c- p="">,</c-> <c- n="">e</c-><c- p="">);</c->
  <c- k="">return</c-> <c- n="">global_int</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
    <strong>ref_struct</strong> 
<pre class="highlight"><c- b="">void</c-> <c- nf="">callee2</c-><c- p="">(</c-><c- b="">int</c-> <c- n="">amount</c-><c- p="">,</c-> <c- n="">error_struct</c-> <c- o="">&amp;</c-><c- p="">)</c-> <c- p="">{</c-> <c- n="">global_int</c-> <c- o="">+=</c-> <c- n="">amount</c-><c- p="">;</c-> <c- p="">}</c->
<c- b="">void</c-> <c- nf="">caller2</c-><c- p="">(</c-><c- b="">int</c-> <c- n="">amount</c-><c- p="">,</c-> <c- n="">error_struct</c-> <c- o="">&amp;</c-><c- n="">e</c-><c- p="">)</c-> <c- p="">{</c->
  <c- n="">Dtor</c-> <c- n="">d</c-><c- p="">;</c->
  <c- n="">callee2</c-><c- p="">(</c-><c- n="">amount</c-><c- p="">,</c-> <c- n="">e</c-><c- p="">);</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">e</c-><c- p="">.</c-><c- n="">error</c-><c- p="">)</c->
    <c- k="">return</c-><c- p="">;</c->
  <c- n="">global_int</c-> <c- o="">+=</c-> <c- n="">amount</c-><c- p="">;</c->
<c- p="">}</c->
<c- b="">int</c-> <c- nf="">main</c-><c- p="">()</c-> <c- p="">{</c->
  <c- n="">error_struct</c-> <c- n="">e</c-><c- p="">;</c->
  <c- n="">caller</c-><c- p="">(</c-><c- n="">e</c-><c- p="">);</c->
  <c- n="">caller2</c-><c- p="">(</c-><c- mi="">0</c-><c- p="">,</c-> <c- n="">e</c-><c- p="">);</c->
  <c- k="">return</c-> <c- n="">global_int</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
    <strong>expected_val</strong> 
<pre class="highlight"><c- n="">tl</c-><c- o="">::</c-><c- n="">expected</c-><c- o="">&lt;</c-><c- b="">void</c-><c- p="">,</c-> <c- b="">int</c-><c- o="">&gt;</c-> <c- n="">callee2</c-><c- p="">(</c-><c- b="">int</c-> <c- n="">amount</c-><c- p="">)</c-> <c- p="">{</c->
  <c- n="">global_int</c-> <c- o="">+=</c-> <c- n="">amount</c-><c- p="">;</c->
  <c- k="">return</c-> <c- p="">{};</c->
<c- p="">}</c->
<c- n="">tl</c-><c- o="">::</c-><c- n="">expected</c-><c- o="">&lt;</c-><c- b="">void</c-><c- p="">,</c-> <c- b="">int</c-><c- o="">&gt;</c-> <c- n="">caller2</c-><c- p="">(</c-><c- b="">int</c-> <c- n="">amount</c-><c- p="">)</c-> <c- p="">{</c->
  <c- n="">Dtor</c-> <c- n="">d</c-><c- p="">;</c->
  <c- n="">tl</c-><c- o="">::</c-><c- n="">expected</c-><c- o="">&lt;</c-><c- b="">void</c-><c- p="">,</c-> <c- b="">int</c-><c- o="">&gt;</c-> <c- n="">e</c-> <c- o="">=</c-> <c- n="">callee2</c-><c- p="">(</c-><c- n="">amount</c-><c- p="">);</c->
  <c- k="">if</c-> <c- p="">(</c-><c- o="">!</c-><c- n="">e</c-><c- p="">)</c->
    <c- k="">return</c-> <c- n="">e</c-><c- p="">;</c->
  <c- n="">global_int</c-> <c- o="">+=</c-> <c- n="">amount</c-><c- p="">;</c->
  <c- k="">return</c-> <c- n="">e</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
    <strong>expected_struct</strong> 
<pre class="highlight"><c- n="">tl</c-><c- o="">::</c-><c- n="">expected</c-><c- o="">&lt;</c-><c- b="">void</c-><c- p="">,</c-> <c- n="">error_struct</c-><c- o="">&gt;</c-> <c- n="">callee2</c-><c- p="">(</c-><c- b="">int</c-> <c- n="">amount</c-><c- p="">)</c-> <c- p="">{</c->
  <c- n="">global_int</c-> <c- o="">+=</c-> <c- n="">amount</c-><c- p="">;</c->
  <c- k="">return</c-> <c- p="">{};</c->
<c- p="">}</c->
<c- n="">tl</c-><c- o="">::</c-><c- n="">expected</c-><c- o="">&lt;</c-><c- b="">void</c-><c- p="">,</c-> <c- n="">error_struct</c-><c- o="">&gt;</c-> <c- n="">caller2</c-><c- p="">(</c-><c- b="">int</c-> <c- n="">amount</c-><c- p="">)</c-> <c- p="">{</c->
  <c- n="">Dtor</c-> <c- n="">d</c-><c- p="">;</c->
  <c- n="">tl</c-><c- o="">::</c-><c- n="">expected</c-><c- o="">&lt;</c-><c- b="">void</c-><c- p="">,</c-> <c- n="">error_struct</c-><c- o="">&gt;</c-> <c- n="">e</c-> <c- o="">=</c-> <c- n="">callee2</c-><c- p="">(</c-><c- n="">amount</c-><c- p="">);</c->
  <c- k="">if</c-> <c- p="">(</c-><c- o="">!</c-><c- n="">e</c-><c- p="">)</c->
    <c- k="">return</c-> <c- n="">e</c-><c- p="">;</c->
  <c- n="">global_int</c-> <c- o="">+=</c-> <c- n="">amount</c-><c- p="">;</c->
  <c- k="">return</c-> <c- n="">e</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
    <strong>outcome_val</strong> 
<pre class="highlight"><c- n="">result</c-><c- o="">&lt;</c-><c- b="">void</c-><c- p="">,</c-> <c- b="">int</c-><c- o="">&gt;</c-> <c- n="">callee2</c-><c- p="">(</c-><c- b="">int</c-> <c- n="">amount</c-><c- p="">)</c-> <c- p="">{</c->
  <c- n="">global_int</c-> <c- o="">+=</c-> <c- n="">amount</c-><c- p="">;</c->
  <c- k="">return</c-> <c- n="">outcome</c-><c- o="">::</c-><c- n="">success</c-><c- p="">();</c->
<c- p="">}</c->
<c- n="">result</c-><c- o="">&lt;</c-><c- b="">void</c-><c- p="">,</c-> <c- b="">int</c-><c- o="">&gt;</c-> <c- n="">caller2</c-><c- p="">(</c-><c- b="">int</c-> <c- n="">amount</c-><c- p="">)</c-> <c- p="">{</c->
  <c- n="">Dtor</c-> <c- n="">d</c-><c- p="">;</c->
  <c- n="">OUTCOME_TRYV</c-><c- p="">(</c-><c- n="">callee2</c-><c- p="">(</c-><c- n="">amount</c-><c- p="">));</c->
  <c- n="">global_int</c-> <c- o="">+=</c-> <c- n="">amount</c-><c- p="">;</c->
  <c- k="">return</c-> <c- n="">outcome</c-><c- o="">::</c-><c- n="">success</c-><c- p="">();</c->
<c- p="">}</c->
</pre>
    <strong>outcome_struct</strong> 
<pre class="highlight"><c- n="">result</c-><c- o="">&lt;</c-><c- b="">void</c-><c- p="">,</c-> <c- n="">error_struct</c-><c- o="">&gt;</c-> <c- n="">callee2</c-><c- p="">(</c-><c- b="">int</c-> <c- n="">amount</c-><c- p="">)</c-> <c- p="">{</c->
  <c- n="">global_int</c-> <c- o="">+=</c-> <c- n="">amount</c-><c- p="">;</c->
  <c- k="">return</c-> <c- n="">outcome</c-><c- o="">::</c-><c- n="">success</c-><c- p="">();</c->
<c- p="">}</c->
<c- n="">result</c-><c- o="">&lt;</c-><c- b="">void</c-><c- p="">,</c-> <c- n="">error_struct</c-><c- o="">&gt;</c-> <c- n="">caller2</c-><c- p="">(</c-><c- b="">int</c-> <c- n="">amount</c-><c- p="">)</c-> <c- p="">{</c->
  <c- n="">Dtor</c-> <c- n="">d</c-><c- p="">;</c->
  <c- n="">OUTCOME_TRYV</c-><c- p="">(</c-><c- n="">callee2</c-><c- p="">(</c-><c- n="">amount</c-><c- p="">));</c->
  <c- n="">global_int</c-> <c- o="">+=</c-> <c- n="">amount</c-><c- p="">;</c->
  <c- k="">return</c-> <c- n="">outcome</c-><c- o="">::</c-><c- n="">success</c-><c- p="">();</c->
<c- p="">}</c->
</pre>
    <strong>outcome_std_error</strong> 
<pre class="highlight"><c- n="">result</c-><c- o="">&lt;</c-><c- b="">void</c-><c- o="">&gt;</c-> <c- n="">callee2</c-><c- p="">(</c-><c- b="">int</c-> <c- n="">amount</c-><c- p="">)</c-> <c- p="">{</c->
  <c- n="">global_int</c-> <c- o="">+=</c-> <c- n="">amount</c-><c- p="">;</c->
  <c- k="">return</c-> <c- n="">outcome</c-><c- o="">::</c-><c- n="">success</c-><c- p="">();</c->
<c- p="">}</c->
<c- n="">result</c-><c- o="">&lt;</c-><c- b="">void</c-><c- o="">&gt;</c-> <c- n="">caller2</c-><c- p="">(</c-><c- b="">int</c-> <c- n="">amount</c-><c- p="">)</c-> <c- p="">{</c->
  <c- n="">Dtor</c-> <c- n="">d</c-><c- p="">;</c->
  <c- n="">OUTCOME_TRYV</c-><c- p="">(</c-><c- n="">callee2</c-><c- p="">(</c-><c- n="">amount</c-><c- p="">));</c->
  <c- n="">global_int</c-> <c- o="">+=</c-> <c- n="">amount</c-><c- p="">;</c->
  <c- k="">return</c-> <c- n="">outcome</c-><c- o="">::</c-><c- n="">success</c-><c- p="">();</c->
<c- p="">}</c->
</pre>
    <strong>tls_error_val</strong> 
<pre class="highlight"><c- b="">void</c-> <c- nf="">callee2</c-><c- p="">(</c-><c- b="">int</c-> <c- n="">amount</c-><c- p="">)</c-> <c- p="">{</c-> <c- n="">global_int</c-> <c- o="">+=</c-> <c- n="">amount</c-><c- p="">;</c-> <c- p="">}</c->
<c- b="">void</c-> <c- nf="">caller2</c-><c- p="">(</c-><c- b="">int</c-> <c- n="">amount</c-><c- p="">)</c-> <c- p="">{</c->
  <c- n="">Dtor</c-> <c- n="">d</c-><c- p="">;</c->
  <c- n="">callee2</c-><c- p="">(</c-><c- n="">amount</c-><c- p="">);</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">tls_error_val_var</c-><c- p="">)</c->
    <c- k="">return</c-><c- p="">;</c->
  <c- n="">global_int</c-> <c- o="">+=</c-> <c- n="">amount</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
    <strong>tls_error_struct</strong> 
<pre class="highlight"><c- b="">void</c-> <c- nf="">callee2</c-><c- p="">(</c-><c- b="">int</c-> <c- n="">amount</c-><c- p="">)</c-> <c- p="">{</c-> <c- n="">global_int</c-> <c- o="">+=</c-> <c- n="">amount</c-><c- p="">;</c-> <c- p="">}</c->
<c- b="">void</c-> <c- nf="">caller2</c-><c- p="">(</c-><c- b="">int</c-> <c- n="">amount</c-><c- p="">)</c-> <c- p="">{</c->
  <c- n="">Dtor</c-> <c- n="">d</c-><c- p="">;</c->
  <c- n="">callee2</c-><c- p="">(</c-><c- n="">amount</c-><c- p="">);</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">tls_error_struct_var</c-><c- p="">.</c-><c- n="">error</c-><c- p="">)</c->
    <c- k="">return</c-><c- p="">;</c->
  <c- n="">global_int</c-> <c- o="">+=</c-> <c- n="">amount</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
   </details>
   <h3 class="heading settled" id="code_error1"><span class="content">Initial signaling of an error</span><a class="self-link" href="#code_error1"></a></h3>
   <details>
    <summary>Expand to see code snippets</summary>
     <strong>abort</strong> 
<pre class="highlight"><c- b="">void</c-> <c- nf="">callee</c-><c- p="">()</c-> <c- p="">{</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">global_int</c-> <c- o="">==</c-> <c- n="">INT_MAX</c-><c- p="">)</c->
    <c- n="">abort</c-><c- p="">();</c->
<c- p="">}</c->
</pre>
    <strong>noexcept_abort</strong> 
<pre class="highlight"><c- b="">void</c-> <c- nf="">callee</c-><c- p="">()</c-> <c- k="">noexcept</c-> <c- p="">{</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">global_int</c-> <c- o="">==</c-> <c- n="">INT_MAX</c-><c- p="">)</c->
    <c- n="">abort</c-><c- p="">();</c->
<c- p="">}</c->
</pre>
    <strong>return_val</strong> 
<pre class="highlight"><c- b="">int</c-> <c- nf="">callee</c-><c- p="">()</c-> <c- p="">{</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">global_int</c-> <c- o="">==</c-> <c- n="">INT_MAX</c-><c- p="">)</c-> <c- p="">{</c->
    <c- k="">return</c-> <c- mi="">1</c-><c- p="">;</c->
  <c- p="">}</c->
  <c- k="">return</c-> <c- mi="">0</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
    <strong>return_struct</strong> 
<pre class="highlight"><c- n="">error_struct</c-> <c- nf="">callee</c-><c- p="">()</c-> <c- p="">{</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">global_int</c-> <c- o="">==</c-> <c- n="">INT_MAX</c-><c- p="">)</c-> <c- p="">{</c->
    <c- n="">error_struct</c-> <c- n="">e</c-><c- p="">;</c->
    <c- n="">e</c-><c- p="">.</c-><c- n="">error</c-> <c- o="">=</c-> <c- o="">&amp;</c-><c- n="">error_info</c-><c- p="">;</c->
    <c- n="">e</c-><c- p="">.</c-><c- n="">domain</c-> <c- o="">=</c-> <c- o="">&amp;</c-><c- n="">error_domain</c-><c- p="">;</c->
    <c- k="">return</c-> <c- n="">e</c-><c- p="">;</c->
  <c- p="">}</c->
  <c- k="">return</c-> <c- n="">error_struct</c-><c- p="">{};</c->
<c- p="">}</c->
</pre>
    <strong>ref_val</strong> 
<pre class="highlight"><c- b="">void</c-> <c- nf="">callee</c-><c- p="">(</c-><c- b="">int</c-> <c- o="">&amp;</c-><c- n="">e</c-><c- p="">)</c-> <c- p="">{</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">global_int</c-> <c- o="">==</c-> <c- n="">INT_MAX</c-><c- p="">)</c-> <c- p="">{</c->
    <c- n="">e</c-> <c- o="">=</c-> <c- mi="">1</c-><c- p="">;</c->
    <c- k="">return</c-><c- p="">;</c->
  <c- p="">}</c->
<c- p="">}</c->
</pre>
    <strong>ref_struct</strong> 
<pre class="highlight"><c- b="">void</c-> <c- nf="">callee</c-><c- p="">(</c-><c- n="">error_struct</c-> <c- o="">&amp;</c-><c- n="">e</c-><c- p="">)</c-> <c- p="">{</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">global_int</c-> <c- o="">==</c-> <c- n="">INT_MAX</c-><c- p="">)</c-> <c- p="">{</c->
    <c- n="">e</c-><c- p="">.</c-><c- n="">error</c-> <c- o="">=</c-> <c- o="">&amp;</c-><c- n="">error_info</c-><c- p="">;</c->
    <c- n="">e</c-><c- p="">.</c-><c- n="">domain</c-> <c- o="">=</c-> <c- o="">&amp;</c-><c- n="">error_domain</c-><c- p="">;</c->
  <c- p="">}</c->
<c- p="">}</c->
</pre>
    <strong>expected_val</strong> 
<pre class="highlight"><c- n="">tl</c-><c- o="">::</c-><c- n="">expected</c-><c- o="">&lt;</c-><c- b="">void</c-><c- p="">,</c-> <c- b="">int</c-><c- o="">&gt;</c-> <c- n="">callee</c-><c- p="">()</c-> <c- p="">{</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">global_int</c-> <c- o="">==</c-> <c- n="">INT_MAX</c-><c- p="">)</c-> <c- p="">{</c->
    <c- k="">return</c-> <c- n="">tl</c-><c- o="">::</c-><c- n="">unexpected</c-><c- o="">&lt;</c-><c- b="">int</c-><c- o="">&gt;</c-><c- p="">{</c-><c- mi="">1</c-><c- p="">};</c->
  <c- p="">}</c->
  <c- k="">return</c-> <c- p="">{};</c->
<c- p="">}</c->
</pre>
    <strong>expected_struct</strong> 
<pre class="highlight"><c- n="">tl</c-><c- o="">::</c-><c- n="">expected</c-><c- o="">&lt;</c-><c- b="">void</c-><c- p="">,</c-> <c- n="">error_struct</c-><c- o="">&gt;</c-> <c- n="">callee</c-><c- p="">()</c-> <c- p="">{</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">global_int</c-> <c- o="">==</c-> <c- n="">INT_MAX</c-><c- p="">)</c-> <c- p="">{</c->
    <c- n="">error_struct</c-> <c- n="">e</c-><c- p="">;</c->
    <c- n="">e</c-><c- p="">.</c-><c- n="">error</c-> <c- o="">=</c-> <c- o="">&amp;</c-><c- n="">error_info</c-><c- p="">;</c->
    <c- n="">e</c-><c- p="">.</c-><c- n="">domain</c-> <c- o="">=</c-> <c- o="">&amp;</c-><c- n="">error_domain</c-><c- p="">;</c->
    <c- k="">return</c-> <c- n="">tl</c-><c- o="">::</c-><c- n="">unexpected</c-><c- o="">&lt;</c-><c- n="">error_struct</c-><c- o="">&gt;</c-><c- p="">{</c-><c- n="">e</c-><c- p="">};</c->
  <c- p="">}</c->
  <c- k="">return</c-> <c- p="">{};</c->
<c- p="">}</c->
</pre>
    <strong>outcome_val</strong> 
<pre class="highlight"><c- n="">result</c-><c- o="">&lt;</c-><c- b="">void</c-><c- p="">,</c-> <c- b="">int</c-><c- o="">&gt;</c-> <c- n="">callee</c-><c- p="">()</c-> <c- p="">{</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">global_int</c-> <c- o="">==</c-> <c- n="">INT_MAX</c-><c- p="">)</c-> <c- p="">{</c->
    <c- k="">return</c-> <c- n="">outcome</c-><c- o="">::</c-><c- n="">failure</c-><c- p="">(</c-><c- mi="">1</c-><c- p="">);</c->
  <c- p="">}</c->
  <c- k="">return</c-> <c- n="">outcome</c-><c- o="">::</c-><c- n="">success</c-><c- p="">();</c->
<c- p="">}</c->
</pre>
    <strong>outcome_struct</strong> 
<pre class="highlight"><c- n="">result</c-><c- o="">&lt;</c-><c- b="">void</c-><c- p="">,</c-> <c- n="">error_struct</c-><c- o="">&gt;</c-> <c- n="">callee</c-><c- p="">()</c-> <c- p="">{</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">global_int</c-> <c- o="">==</c-> <c- n="">INT_MAX</c-><c- p="">)</c-> <c- p="">{</c->
    <c- n="">error_struct</c-> <c- n="">e</c-><c- p="">;</c->
    <c- n="">e</c-><c- p="">.</c-><c- n="">error</c-> <c- o="">=</c-> <c- o="">&amp;</c-><c- n="">error_info</c-><c- p="">;</c->
    <c- n="">e</c-><c- p="">.</c-><c- n="">domain</c-> <c- o="">=</c-> <c- o="">&amp;</c-><c- n="">error_domain</c-><c- p="">;</c->
    <c- k="">return</c-> <c- n="">outcome</c-><c- o="">::</c-><c- n="">failure</c-><c- p="">(</c-><c- n="">e</c-><c- p="">);</c->
  <c- p="">}</c->
  <c- k="">return</c-> <c- n="">outcome</c-><c- o="">::</c-><c- n="">success</c-><c- p="">();</c->
<c- p="">}</c->
</pre>
    <strong>outcome_std_error</strong> 
<pre class="highlight"><c- n="">result</c-><c- o="">&lt;</c-><c- b="">void</c-><c- o="">&gt;</c-> <c- n="">callee</c-><c- p="">()</c-> <c- p="">{</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">global_int</c-> <c- o="">==</c-> <c- n="">INT_MAX</c-><c- p="">)</c-> <c- p="">{</c->
    <c- k="">return</c-> <c- n="">outcome</c-><c- o="">::</c-><c- n="">experimental</c-><c- o="">::</c-><c- n="">errc</c-><c- o="">::</c-><c- n="">argument_out_of_domain</c-><c- p="">;</c->
  <c- p="">}</c->
  <c- k="">return</c-> <c- n="">outcome</c-><c- o="">::</c-><c- n="">success</c-><c- p="">();</c->
<c- p="">}</c->
</pre>
    <strong>tls_error_val</strong> 
<pre class="highlight"><c- b="">void</c-> <c- nf="">callee</c-><c- p="">()</c-> <c- p="">{</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">global_int</c-> <c- o="">==</c-> <c- n="">INT_MAX</c-><c- p="">)</c-> <c- p="">{</c->
    <c- n="">tls_error_val_var</c-> <c- o="">=</c-> <c- mi="">1</c-><c- p="">;</c->
    <c- k="">return</c-><c- p="">;</c->
  <c- p="">}</c->
<c- p="">}</c->
</pre>
    <strong>tls_error_struct</strong> 
<pre class="highlight"><c- b="">void</c-> <c- nf="">callee</c-><c- p="">()</c-> <c- p="">{</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">global_int</c-> <c- o="">==</c-> <c- n="">INT_MAX</c-><c- p="">)</c-> <c- p="">{</c->
    <c- n="">tls_error_struct_var</c-><c- p="">.</c-><c- n="">error</c-> <c- o="">=</c-> <c- o="">&amp;</c-><c- n="">error_info</c-><c- p="">;</c->
    <c- n="">tls_error_struct_var</c-><c- p="">.</c-><c- n="">domain</c-> <c- o="">=</c-> <c- o="">&amp;</c-><c- n="">error_domain</c-><c- p="">;</c->
    <c- k="">return</c-><c- p="">;</c->
  <c- p="">}</c->
<c- p="">}</c->
</pre>
    <strong>throw_value</strong> 
<pre class="highlight"><c- b="">void</c-> <c- nf="">callee</c-><c- p="">()</c-> <c- p="">{</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">global_int</c-> <c- o="">==</c-> <c- n="">INT_MAX</c-><c- p="">)</c->
    <c- k="">throw</c-> <c- mi="">1</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
    <strong>throw_struct</strong> 
<pre class="highlight"><c- b="">void</c-> <c- nf="">callee</c-><c- p="">()</c-> <c- p="">{</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">global_int</c-> <c- o="">==</c-> <c- n="">INT_MAX</c-><c- p="">)</c-> <c- p="">{</c->
    <c- n="">error_struct</c-> <c- n="">e</c-><c- p="">;</c->
    <c- n="">e</c-><c- p="">.</c-><c- n="">error</c-> <c- o="">=</c-> <c- o="">&amp;</c-><c- n="">error_info</c-><c- p="">;</c->
    <c- n="">e</c-><c- p="">.</c-><c- n="">domain</c-> <c- o="">=</c-> <c- o="">&amp;</c-><c- n="">error_domain</c-><c- p="">;</c->
    <c- k="">throw</c-> <c- n="">e</c-><c- p="">;</c->
  <c- p="">}</c->
<c- p="">}</c->
</pre>
    <strong>throw_exception</strong> 
<pre class="highlight"><c- b="">void</c-> <c- nf="">callee</c-><c- p="">()</c-> <c- p="">{</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">global_int</c-> <c- o="">==</c-> <c- n="">INT_MAX</c-><c- p="">)</c->
    <c- k="">throw</c-> <c- n="">err_exception</c-><c- p="">(</c-><c- mi="">1</c-><c- p="">);</c->
<c- p="">}</c->
</pre>
   </details>
   <h3 class="heading settled" id="code_error2"><span class="content">Incremental signaling of an error</span><a class="self-link" href="#code_error2"></a></h3>
   <details>
    <summary>Expand to see code snippets</summary>
     <strong>abort</strong> 
<pre class="highlight"><c- b="">void</c-> <c- nf="">callee2</c-><c- p="">(</c-><c- b="">int</c-> <c- n="">amount</c-><c- p="">)</c-> <c- p="">{</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">global_int</c-> <c- o="">+</c-> <c- n="">amount</c-> <c- o="">==</c-> <c- n="">INT_MAX</c-><c- p="">)</c->
    <c- n="">abort</c-><c- p="">();</c->
  <c- n="">global_int</c-> <c- o="">+=</c-> <c- n="">amount</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
    <strong>noexcept_abort</strong> 
<pre class="highlight"><c- b="">void</c-> <c- nf="">callee2</c-><c- p="">(</c-><c- b="">int</c-> <c- n="">amount</c-><c- p="">)</c-> <c- k="">noexcept</c-> <c- p="">{</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">global_int</c-> <c- o="">+</c-> <c- n="">amount</c-> <c- o="">==</c-> <c- n="">INT_MAX</c-><c- p="">)</c->
    <c- n="">abort</c-><c- p="">();</c->
  <c- n="">global_int</c-> <c- o="">+=</c-> <c- n="">amount</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
    <strong>return_val</strong> 
<pre class="highlight"><c- b="">int</c-> <c- nf="">callee2</c-><c- p="">(</c-><c- b="">int</c-> <c- n="">amount</c-><c- p="">)</c-> <c- p="">{</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">global_int</c-> <c- o="">+</c-> <c- n="">amount</c-> <c- o="">==</c-> <c- n="">INT_MAX</c-><c- p="">)</c-> <c- p="">{</c->
    <c- k="">return</c-> <c- mi="">1</c-><c- p="">;</c->
  <c- p="">}</c->
  <c- n="">global_int</c-> <c- o="">+=</c-> <c- n="">amount</c-><c- p="">;</c->
  <c- k="">return</c-> <c- mi="">0</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
    <strong>return_struct</strong> 
<pre class="highlight"><c- n="">error_struct</c-> <c- nf="">callee2</c-><c- p="">(</c-><c- b="">int</c-> <c- n="">amount</c-><c- p="">)</c-> <c- p="">{</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">global_int</c-> <c- o="">+</c-> <c- n="">amount</c-> <c- o="">==</c-> <c- n="">INT_MAX</c-><c- p="">)</c-> <c- p="">{</c->
    <c- n="">error_struct</c-> <c- n="">e</c-><c- p="">;</c->
    <c- n="">e</c-><c- p="">.</c-><c- n="">error</c-> <c- o="">=</c-> <c- o="">&amp;</c-><c- n="">error_info</c-><c- p="">;</c->
    <c- n="">e</c-><c- p="">.</c-><c- n="">domain</c-> <c- o="">=</c-> <c- o="">&amp;</c-><c- n="">error_domain</c-><c- p="">;</c->
    <c- k="">return</c-> <c- n="">e</c-><c- p="">;</c->
  <c- p="">}</c->
  <c- n="">global_int</c-> <c- o="">+=</c-> <c- n="">amount</c-><c- p="">;</c->
  <c- k="">return</c-> <c- n="">error_struct</c-><c- p="">{};</c->
<c- p="">}</c->
</pre>
    <strong>ref_val</strong> 
<pre class="highlight"><c- b="">void</c-> <c- nf="">callee2</c-><c- p="">(</c-><c- b="">int</c-> <c- n="">amount</c-><c- p="">,</c-> <c- b="">int</c-> <c- o="">&amp;</c-><c- n="">e</c-><c- p="">)</c-> <c- p="">{</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">global_int</c-> <c- o="">+</c-> <c- n="">amount</c-> <c- o="">==</c-> <c- n="">INT_MAX</c-><c- p="">)</c-> <c- p="">{</c->
    <c- n="">e</c-> <c- o="">=</c-> <c- mi="">1</c-><c- p="">;</c->
    <c- k="">return</c-><c- p="">;</c->
  <c- p="">}</c->
  <c- n="">global_int</c-> <c- o="">+=</c-> <c- n="">amount</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
    <strong>ref_struct</strong> 
<pre class="highlight"><c- b="">void</c-> <c- nf="">callee2</c-><c- p="">(</c-><c- b="">int</c-> <c- n="">amount</c-><c- p="">,</c-> <c- n="">error_struct</c-> <c- o="">&amp;</c-><c- n="">e</c-><c- p="">)</c-> <c- p="">{</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">global_int</c-> <c- o="">+</c-> <c- n="">amount</c-> <c- o="">==</c-> <c- n="">INT_MAX</c-><c- p="">)</c-> <c- p="">{</c->
    <c- n="">e</c-><c- p="">.</c-><c- n="">error</c-> <c- o="">=</c-> <c- o="">&amp;</c-><c- n="">error_info</c-><c- p="">;</c->
    <c- n="">e</c-><c- p="">.</c-><c- n="">domain</c-> <c- o="">=</c-> <c- o="">&amp;</c-><c- n="">error_domain</c-><c- p="">;</c->
    <c- k="">return</c-><c- p="">;</c->
  <c- p="">}</c->
  <c- n="">global_int</c-> <c- o="">+=</c-> <c- n="">amount</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
    <strong>tls_error_val</strong> 
<pre class="highlight"><c- b="">void</c-> <c- nf="">callee2</c-><c- p="">(</c-><c- b="">int</c-> <c- n="">amount</c-><c- p="">)</c-> <c- p="">{</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">global_int</c-> <c- o="">+</c-> <c- n="">amount</c-> <c- o="">==</c-> <c- n="">INT_MAX</c-><c- p="">)</c-> <c- p="">{</c->
    <c- n="">tls_error_val_var</c-> <c- o="">=</c-> <c- mi="">1</c-><c- p="">;</c->
    <c- k="">return</c-><c- p="">;</c->
  <c- p="">}</c->
  <c- n="">global_int</c-> <c- o="">+=</c-> <c- n="">amount</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
    <strong>tls_error_struct</strong> 
<pre class="highlight"><c- b="">void</c-> <c- nf="">callee2</c-><c- p="">(</c-><c- b="">int</c-> <c- n="">amount</c-><c- p="">)</c-> <c- p="">{</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">global_int</c-> <c- o="">+</c-> <c- n="">amount</c-> <c- o="">==</c-> <c- n="">INT_MAX</c-><c- p="">)</c-> <c- p="">{</c->
    <c- n="">tls_error_struct_var</c-><c- p="">.</c-><c- n="">error</c-> <c- o="">=</c-> <c- o="">&amp;</c-><c- n="">error_info</c-><c- p="">;</c->
    <c- n="">tls_error_struct_var</c-><c- p="">.</c-><c- n="">domain</c-> <c- o="">=</c-> <c- o="">&amp;</c-><c- n="">error_domain</c-><c- p="">;</c->
    <c- k="">return</c-><c- p="">;</c->
  <c- p="">}</c->
  <c- n="">global_int</c-> <c- o="">+=</c-> <c- n="">amount</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
    <strong>expected_val</strong> 
<pre class="highlight"><c- n="">tl</c-><c- o="">::</c-><c- n="">expected</c-><c- o="">&lt;</c-><c- b="">void</c-><c- p="">,</c-> <c- b="">int</c-><c- o="">&gt;</c-> <c- n="">callee2</c-><c- p="">(</c-><c- b="">int</c-> <c- n="">amount</c-><c- p="">)</c-> <c- p="">{</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">global_int</c-> <c- o="">+</c-> <c- n="">amount</c-> <c- o="">==</c-> <c- n="">INT_MAX</c-><c- p="">)</c-> <c- p="">{</c->
    <c- k="">return</c-> <c- n="">tl</c-><c- o="">::</c-><c- n="">unexpected</c-><c- o="">&lt;</c-><c- b="">int</c-><c- o="">&gt;</c-><c- p="">{</c-><c- mi="">1</c-><c- p="">};</c->
  <c- p="">}</c->
  <c- n="">global_int</c-> <c- o="">+=</c-> <c- n="">amount</c-><c- p="">;</c->
  <c- k="">return</c-> <c- p="">{};</c->
<c- p="">}</c->
</pre>
    <strong>expected_struct</strong> 
<pre class="highlight"><c- n="">tl</c-><c- o="">::</c-><c- n="">expected</c-><c- o="">&lt;</c-><c- b="">void</c-><c- p="">,</c-> <c- n="">error_struct</c-><c- o="">&gt;</c-> <c- n="">callee2</c-><c- p="">(</c-><c- b="">int</c-> <c- n="">amount</c-><c- p="">)</c-> <c- p="">{</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">global_int</c-> <c- o="">+</c-> <c- n="">amount</c-> <c- o="">==</c-> <c- n="">INT_MAX</c-><c- p="">)</c-> <c- p="">{</c->
    <c- n="">error_struct</c-> <c- n="">e</c-><c- p="">;</c->
    <c- n="">e</c-><c- p="">.</c-><c- n="">error</c-> <c- o="">=</c-> <c- o="">&amp;</c-><c- n="">error_info</c-><c- p="">;</c->
    <c- n="">e</c-><c- p="">.</c-><c- n="">domain</c-> <c- o="">=</c-> <c- o="">&amp;</c-><c- n="">error_domain</c-><c- p="">;</c->
    <c- k="">return</c-> <c- n="">tl</c-><c- o="">::</c-><c- n="">unexpected</c-><c- o="">&lt;</c-><c- n="">error_struct</c-><c- o="">&gt;</c-><c- p="">{</c-><c- n="">e</c-><c- p="">};</c->
  <c- p="">}</c->
  <c- n="">global_int</c-> <c- o="">+=</c-> <c- n="">amount</c-><c- p="">;</c->
  <c- k="">return</c-> <c- p="">{};</c->
<c- p="">}</c->
</pre>
    <strong>outcome_val</strong> 
<pre class="highlight"><c- n="">result</c-><c- o="">&lt;</c-><c- b="">void</c-><c- p="">,</c-> <c- b="">int</c-><c- o="">&gt;</c-> <c- n="">callee2</c-><c- p="">(</c-><c- b="">int</c-> <c- n="">amount</c-><c- p="">)</c-> <c- p="">{</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">global_int</c-> <c- o="">+</c-> <c- n="">amount</c-> <c- o="">==</c-> <c- n="">INT_MAX</c-><c- p="">)</c-> <c- p="">{</c->
    <c- k="">return</c-> <c- n="">outcome</c-><c- o="">::</c-><c- n="">failure</c-><c- p="">(</c-><c- mi="">1</c-><c- p="">);</c->
  <c- p="">}</c->
  <c- n="">global_int</c-> <c- o="">+=</c-> <c- n="">amount</c-><c- p="">;</c->
  <c- k="">return</c-> <c- n="">outcome</c-><c- o="">::</c-><c- n="">success</c-><c- p="">();</c->
<c- p="">}</c->
</pre>
    <strong>outcome_struct</strong> 
<pre class="highlight"><c- n="">result</c-><c- o="">&lt;</c-><c- b="">void</c-><c- p="">,</c-> <c- n="">error_struct</c-><c- o="">&gt;</c-> <c- n="">callee2</c-><c- p="">(</c-><c- b="">int</c-> <c- n="">amount</c-><c- p="">)</c-> <c- p="">{</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">global_int</c-> <c- o="">+</c-> <c- n="">amount</c-> <c- o="">==</c-> <c- n="">INT_MAX</c-><c- p="">)</c-> <c- p="">{</c->
    <c- n="">error_struct</c-> <c- n="">e</c-><c- p="">;</c->
    <c- n="">e</c-><c- p="">.</c-><c- n="">error</c-> <c- o="">=</c-> <c- o="">&amp;</c-><c- n="">error_info</c-><c- p="">;</c->
    <c- n="">e</c-><c- p="">.</c-><c- n="">domain</c-> <c- o="">=</c-> <c- o="">&amp;</c-><c- n="">error_domain</c-><c- p="">;</c->
    <c- k="">return</c-> <c- n="">outcome</c-><c- o="">::</c-><c- n="">failure</c-><c- p="">(</c-><c- n="">e</c-><c- p="">);</c->
  <c- p="">}</c->
  <c- n="">global_int</c-> <c- o="">+=</c-> <c- n="">amount</c-><c- p="">;</c->
  <c- k="">return</c-> <c- n="">outcome</c-><c- o="">::</c-><c- n="">success</c-><c- p="">();</c->
<c- p="">}</c->
</pre>
    <strong>outcome_std_error</strong> 
<pre class="highlight"><c- n="">result</c-><c- o="">&lt;</c-><c- b="">void</c-><c- o="">&gt;</c-> <c- n="">callee2</c-><c- p="">(</c-><c- b="">int</c-> <c- n="">amount</c-><c- p="">)</c-> <c- p="">{</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">global_int</c-> <c- o="">+</c-> <c- n="">amount</c-> <c- o="">==</c-> <c- n="">INT_MAX</c-><c- p="">)</c-> <c- p="">{</c->
    <c- k="">return</c-> <c- n="">outcome</c-><c- o="">::</c-><c- n="">experimental</c-><c- o="">::</c-><c- n="">errc</c-><c- o="">::</c-><c- n="">argument_out_of_domain</c-><c- p="">;</c->
  <c- p="">}</c->
  <c- n="">global_int</c-> <c- o="">+=</c-> <c- n="">amount</c-><c- p="">;</c->
  <c- k="">return</c-> <c- n="">outcome</c-><c- o="">::</c-><c- n="">success</c-><c- p="">();</c->
<c- p="">}</c->
</pre>
    <strong>throw_value</strong> 
<pre class="highlight"><c- b="">void</c-> <c- nf="">callee2</c-><c- p="">(</c-><c- b="">int</c-> <c- n="">amount</c-><c- p="">)</c-> <c- p="">{</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">global_int</c-> <c- o="">+</c-> <c- n="">amount</c-> <c- o="">==</c-> <c- n="">INT_MAX</c-><c- p="">)</c->
    <c- k="">throw</c-> <c- mi="">1</c-><c- p="">;</c->
  <c- n="">global_int</c-> <c- o="">+=</c-> <c- n="">amount</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
    <strong>throw_struct</strong> 
<pre class="highlight"><c- b="">void</c-> <c- nf="">callee2</c-><c- p="">(</c-><c- b="">int</c-> <c- n="">amount</c-><c- p="">)</c-> <c- p="">{</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">global_int</c-> <c- o="">+</c-> <c- n="">amount</c-> <c- o="">==</c-> <c- n="">INT_MAX</c-><c- p="">)</c-> <c- p="">{</c->
    <c- n="">error_struct</c-> <c- n="">e</c-><c- p="">;</c->
    <c- n="">e</c-><c- p="">.</c-><c- n="">error</c-> <c- o="">=</c-> <c- o="">&amp;</c-><c- n="">error_info</c-><c- p="">;</c->
    <c- n="">e</c-><c- p="">.</c-><c- n="">domain</c-> <c- o="">=</c-> <c- o="">&amp;</c-><c- n="">error_domain</c-><c- p="">;</c->
    <c- k="">throw</c-> <c- n="">e</c-><c- p="">;</c->
  <c- p="">}</c->
  <c- n="">global_int</c-> <c- o="">+=</c-> <c- n="">amount</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
    <strong>throw_exception</strong> 
<pre class="highlight"><c- b="">void</c-> <c- nf="">callee2</c-><c- p="">(</c-><c- b="">int</c-> <c- n="">amount</c-><c- p="">)</c-> <c- p="">{</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">global_int</c-> <c- o="">+</c-> <c- n="">amount</c-> <c- o="">==</c-> <c- n="">INT_MAX</c-><c- p="">)</c->
    <c- k="">throw</c-> <c- n="">err_exception</c-><c- p="">(</c-><c- mi="">1</c-><c- p="">);</c->
  <c- n="">global_int</c-> <c- o="">+=</c-> <c- n="">amount</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
   </details>
   <h3 class="heading settled" id="code_catch1"><span class="content">Initial handling of an error</span><a class="self-link" href="#code_catch1"></a></h3>
   <details>
    <summary>Expand to see code snippets</summary>
     <strong>return_val</strong> 
<pre class="highlight"><c- b="">int</c-> <c- nf="">main</c-><c- p="">()</c-> <c- p="">{</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">caller</c-><c- p="">())</c-> <c- p="">{</c->
    <c- n="">global_int</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
  <c- p="">}</c->
  <c- n="">caller2</c-><c- p="">(</c-><c- mi="">0</c-><c- p="">);</c->
  <c- k="">return</c-> <c- n="">global_int</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
    <strong>return_struct</strong> 
<pre class="highlight"><c- b="">int</c-> <c- nf="">main</c-><c- p="">()</c-> <c- p="">{</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">caller</c-><c- p="">().</c-><c- n="">error</c-><c- p="">)</c-> <c- p="">{</c->
    <c- n="">global_int</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
  <c- p="">}</c->
  <c- n="">caller2</c-><c- p="">(</c-><c- mi="">0</c-><c- p="">);</c->
  <c- k="">return</c-> <c- n="">global_int</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
    <strong>ref_val</strong> 
<pre class="highlight"><c- b="">int</c-> <c- nf="">main</c-><c- p="">()</c-> <c- p="">{</c->
  <c- b="">int</c-> <c- n="">e</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
  <c- n="">caller</c-><c- p="">(</c-><c- n="">e</c-><c- p="">);</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">e</c-><c- p="">)</c-> <c- p="">{</c->
    <c- n="">global_int</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
    <c- n="">e</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
  <c- p="">}</c->
  <c- n="">caller2</c-><c- p="">(</c-><c- mi="">0</c-><c- p="">,</c-> <c- n="">e</c-><c- p="">);</c->
  <c- k="">return</c-> <c- n="">global_int</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
    <strong>ref_struct</strong> 
<pre class="highlight"><c- b="">int</c-> <c- nf="">main</c-><c- p="">()</c-> <c- p="">{</c->
  <c- n="">error_struct</c-> <c- n="">e</c-><c- p="">;</c->
  <c- n="">caller</c-><c- p="">(</c-><c- n="">e</c-><c- p="">);</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">e</c-><c- p="">.</c-><c- n="">error</c-><c- p="">)</c-> <c- p="">{</c->
    <c- n="">global_int</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
    <c- n="">e</c-> <c- o="">=</c-> <c- n="">error_struct</c-><c- p="">{};</c->
  <c- p="">}</c->
  <c- n="">caller2</c-><c- p="">(</c-><c- mi="">0</c-><c- p="">,</c-> <c- n="">e</c-><c- p="">);</c->
  <c- k="">return</c-> <c- n="">global_int</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
    <strong>tls_error_val</strong> 
<pre class="highlight"><c- b="">int</c-> <c- nf="">main</c-><c- p="">()</c-> <c- p="">{</c->
  <c- n="">caller</c-><c- p="">();</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">tls_error_val_var</c-><c- p="">)</c-> <c- p="">{</c->
    <c- n="">tls_error_val_var</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
    <c- n="">global_int</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
  <c- p="">}</c->
  <c- n="">caller2</c-><c- p="">(</c-><c- mi="">0</c-><c- p="">);</c->
  <c- k="">return</c-> <c- n="">global_int</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
    <strong>tls_error_struct</strong> 
<pre class="highlight"><c- b="">int</c-> <c- nf="">main</c-><c- p="">()</c-> <c- p="">{</c->
  <c- n="">caller</c-><c- p="">();</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">tls_error_struct_var</c-><c- p="">.</c-><c- n="">error</c-><c- p="">)</c-> <c- p="">{</c->
    <c- n="">tls_error_struct_var</c-> <c- o="">=</c-> <c- n="">error_struct</c-><c- p="">{};</c->
    <c- n="">global_int</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
  <c- p="">}</c->
  <c- n="">caller2</c-><c- p="">(</c-><c- mi="">0</c-><c- p="">);</c->
  <c- k="">return</c-> <c- n="">global_int</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
    <strong>expected_struct, expected_val, outcome_struct, outcome_val, and outcome_std_error</strong> 
<pre class="highlight"><c- b="">int</c-> <c- nf="">main</c-><c- p="">()</c-> <c- p="">{</c->
  <c- k="">if</c-> <c- p="">(</c-><c- o="">!</c-><c- n="">caller</c-><c- p="">())</c-> <c- p="">{</c->
    <c- n="">global_int</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
  <c- p="">}</c->
  <c- n="">caller2</c-><c- p="">(</c-><c- mi="">0</c-><c- p="">);</c->
  <c- k="">return</c-> <c- n="">global_int</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
    <strong>throw_value</strong> 
<pre class="highlight"><c- b="">int</c-> <c- nf="">main</c-><c- p="">()</c-> <c- p="">{</c->
  <c- k="">try</c-> <c- p="">{</c-> <c- n="">caller</c-><c- p="">();</c-> <c- p="">}</c->
  <c- k="">catch</c-> <c- p="">(</c-><c- b="">int</c-><c- p="">)</c-> <c- p="">{</c-> <c- n="">global_int</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c-> <c- p="">}</c->
  <c- n="">caller2</c-><c- p="">(</c-><c- mi="">0</c-><c- p="">);</c->
  <c- k="">return</c-> <c- n="">global_int</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
    <strong>throw_struct</strong> 
<pre class="highlight"><c- b="">int</c-> <c- nf="">main</c-><c- p="">()</c-> <c- p="">{</c->
  <c- k="">try</c-> <c- p="">{</c-> <c- n="">caller</c-><c- p="">();</c-> <c- p="">}</c->
  <c- k="">catch</c-> <c- p="">(</c-><c- k="">const</c-> <c- n="">error_struct</c-> <c- o="">&amp;</c-><c- p="">)</c-> <c- p="">{</c->
    <c- n="">global_int</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
  <c- p="">}</c->
  <c- n="">caller2</c-><c- p="">(</c-><c- mi="">0</c-><c- p="">);</c->
  <c- k="">return</c-> <c- n="">global_int</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
    <strong>throw_exception</strong> 
<pre class="highlight"><c- b="">int</c-> <c- nf="">main</c-><c- p="">()</c-> <c- p="">{</c->
  <c- k="">try</c-> <c- p="">{</c-> <c- n="">caller</c-><c- p="">();</c-> <c- p="">}</c->
  <c- k="">catch</c-> <c- p="">(</c-><c- k="">const</c-> <c- n="">std</c-><c- o="">::</c-><c- n="">exception</c-> <c- o="">&amp;</c-><c- p="">)</c-> <c- p="">{</c->
    <c- n="">global_int</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
  <c- p="">}</c->
  <c- n="">caller2</c-><c- p="">(</c-><c- mi="">0</c-><c- p="">);</c->
  <c- k="">return</c-> <c- n="">global_int</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
   </details>
   <h3 class="heading settled" id="code_catch2"><span class="content">Incremental handling of an error</span><a class="self-link" href="#code_catch2"></a></h3>
   <details>
    <summary>Expand to see code snippets</summary>
     <strong>return_val</strong> 
<pre class="highlight"><c- b="">int</c-> <c- nf="">main</c-><c- p="">()</c-> <c- p="">{</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">caller</c-><c- p="">())</c-> <c- p="">{</c->
    <c- n="">global_int</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
  <c- p="">}</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">caller2</c-><c- p="">(</c-><c- mi="">0</c-><c- p="">))</c-> <c- p="">{</c->
    <c- n="">global_int</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
  <c- p="">}</c->
  <c- k="">return</c-> <c- n="">global_int</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
    <strong>return_struct</strong> 
<pre class="highlight"><c- b="">int</c-> <c- nf="">main</c-><c- p="">()</c-> <c- p="">{</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">caller</c-><c- p="">().</c-><c- n="">error</c-><c- p="">)</c-> <c- p="">{</c->
    <c- n="">global_int</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
  <c- p="">}</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">caller2</c-><c- p="">(</c-><c- mi="">0</c-><c- p="">).</c-><c- n="">error</c-><c- p="">)</c-> <c- p="">{</c->
    <c- n="">global_int</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
  <c- p="">}</c->
  <c- k="">return</c-> <c- n="">global_int</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
    <strong>ref_val</strong> 
<pre class="highlight"><c- b="">int</c-> <c- nf="">main</c-><c- p="">()</c-> <c- p="">{</c->
  <c- b="">int</c-> <c- n="">e</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
  <c- n="">caller</c-><c- p="">(</c-><c- n="">e</c-><c- p="">);</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">e</c-><c- p="">)</c-> <c- p="">{</c->
    <c- n="">global_int</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
    <c- n="">e</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
  <c- p="">}</c->
  <c- n="">caller2</c-><c- p="">(</c-><c- mi="">0</c-><c- p="">,</c-> <c- n="">e</c-><c- p="">);</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">e</c-><c- p="">)</c-> <c- p="">{</c->
    <c- n="">global_int</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
    <c- n="">e</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
  <c- p="">}</c->
  <c- k="">return</c-> <c- n="">global_int</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
    <strong>ref_struct</strong> 
<pre class="highlight"><c- b="">int</c-> <c- nf="">main</c-><c- p="">()</c-> <c- p="">{</c->
  <c- n="">error_struct</c-> <c- n="">e</c-><c- p="">;</c->
  <c- n="">caller</c-><c- p="">(</c-><c- n="">e</c-><c- p="">);</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">e</c-><c- p="">.</c-><c- n="">error</c-><c- p="">)</c-> <c- p="">{</c->
    <c- n="">global_int</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
    <c- n="">e</c-> <c- o="">=</c-> <c- n="">error_struct</c-><c- p="">{};</c->
  <c- p="">}</c->
  <c- n="">caller2</c-><c- p="">(</c-><c- mi="">0</c-><c- p="">,</c-> <c- n="">e</c-><c- p="">);</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">e</c-><c- p="">.</c-><c- n="">error</c-><c- p="">)</c-> <c- p="">{</c->
    <c- n="">global_int</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
    <c- n="">e</c-> <c- o="">=</c-> <c- n="">error_struct</c-><c- p="">{};</c->
  <c- p="">}</c->
  <c- k="">return</c-> <c- n="">global_int</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
    <strong>tls_error_val</strong> 
<pre class="highlight"><c- b="">int</c-> <c- nf="">main</c-><c- p="">()</c-> <c- p="">{</c->
  <c- n="">caller</c-><c- p="">();</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">tls_error_val_var</c-><c- p="">)</c-> <c- p="">{</c->
    <c- n="">tls_error_val_var</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
    <c- n="">global_int</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
  <c- p="">}</c->
  <c- n="">caller2</c-><c- p="">(</c-><c- mi="">0</c-><c- p="">);</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">tls_error_val_var</c-><c- p="">)</c-> <c- p="">{</c->
    <c- n="">tls_error_val_var</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
    <c- n="">global_int</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
  <c- p="">}</c->
  <c- k="">return</c-> <c- n="">global_int</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
    <strong>tls_error_struct</strong> 
<pre class="highlight"><c- b="">int</c-> <c- nf="">main</c-><c- p="">()</c-> <c- p="">{</c->
  <c- n="">caller</c-><c- p="">();</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">tls_error_struct_var</c-><c- p="">.</c-><c- n="">error</c-><c- p="">)</c-> <c- p="">{</c->
    <c- n="">tls_error_struct_var</c-> <c- o="">=</c-> <c- n="">error_struct</c-><c- p="">{};</c->
    <c- n="">global_int</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
  <c- p="">}</c->
  <c- n="">caller2</c-><c- p="">(</c-><c- mi="">0</c-><c- p="">);</c->
  <c- k="">if</c-> <c- p="">(</c-><c- n="">tls_error_struct_var</c-><c- p="">.</c-><c- n="">error</c-><c- p="">)</c-> <c- p="">{</c->
    <c- n="">tls_error_struct_var</c-> <c- o="">=</c-> <c- n="">error_struct</c-><c- p="">{};</c->
    <c- n="">global_int</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
  <c- p="">}</c->
  <c- k="">return</c-> <c- n="">global_int</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
    <strong>expected_struct, expected_val, outcome_struct, outcome_val, and outcome_std_error</strong> 
<pre class="highlight"><c- b="">int</c-> <c- nf="">main</c-><c- p="">()</c-> <c- p="">{</c->
  <c- k="">if</c-> <c- p="">(</c-><c- o="">!</c-><c- n="">caller</c-><c- p="">())</c-> <c- p="">{</c-> <c- n="">global_int</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c-> <c- p="">}</c->
  <c- k="">if</c-> <c- p="">(</c-><c- o="">!</c-><c- n="">caller2</c-><c- p="">(</c-><c- mi="">0</c-><c- p="">))</c-> <c- p="">{</c-> <c- n="">global_int</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c-> <c- p="">}</c->
  <c- k="">return</c-> <c- n="">global_int</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
    <strong>throw_value</strong> 
<pre class="highlight"><c- b="">int</c-> <c- nf="">main</c-><c- p="">()</c-> <c- p="">{</c->
  <c- k="">try</c-> <c- p="">{</c-> <c- n="">caller</c-><c- p="">();</c-> <c- p="">}</c->
  <c- k="">catch</c-> <c- p="">(</c-><c- b="">int</c-><c- p="">)</c-> <c- p="">{</c-> <c- n="">global_int</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c-> <c- p="">}</c->
  <c- k="">try</c-> <c- p="">{</c-> <c- n="">caller2</c-><c- p="">(</c-><c- mi="">0</c-><c- p="">);</c-> <c- p="">}</c->
  <c- k="">catch</c-> <c- p="">(</c-><c- b="">int</c-><c- p="">)</c-> <c- p="">{</c-> <c- n="">global_int</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c-> <c- p="">}</c->
  <c- k="">return</c-> <c- n="">global_int</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
    <strong>throw_struct</strong> 
<pre class="highlight"><c- b="">int</c-> <c- nf="">main</c-><c- p="">()</c-> <c- p="">{</c->
  <c- k="">try</c-> <c- p="">{</c-> <c- n="">caller</c-><c- p="">();</c-> <c- p="">}</c->
  <c- k="">catch</c-> <c- p="">(</c-><c- k="">const</c-> <c- n="">error_struct</c-> <c- o="">&amp;</c-><c- p="">)</c-> <c- p="">{</c->
    <c- n="">global_int</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
  <c- p="">}</c->
  <c- k="">try</c-> <c- p="">{</c-> <c- n="">caller2</c-><c- p="">(</c-><c- mi="">0</c-><c- p="">);</c-> <c- p="">}</c->
  <c- k="">catch</c-> <c- p="">(</c-><c- k="">const</c-> <c- n="">error_struct</c-> <c- o="">&amp;</c-><c- p="">)</c-> <c- p="">{</c->
    <c- n="">global_int</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
  <c- p="">}</c->
  <c- k="">return</c-> <c- n="">global_int</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
    <strong>throw_exception</strong> 
<pre class="highlight"><c- b="">int</c-> <c- nf="">main</c-><c- p="">()</c-> <c- p="">{</c->
  <c- k="">try</c-> <c- p="">{</c-> <c- n="">caller</c-><c- p="">();</c-> <c- p="">}</c->
  <c- k="">catch</c-> <c- p="">(</c-><c- k="">const</c-> <c- n="">std</c-><c- o="">::</c-><c- n="">exception</c-> <c- o="">&amp;</c-><c- p="">)</c-> <c- p="">{</c->
    <c- n="">global_int</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
  <c- p="">}</c->
  <c- k="">try</c-> <c- p="">{</c-> <c- n="">caller2</c-><c- p="">(</c-><c- mi="">0</c-><c- p="">);</c-> <c- p="">}</c->
  <c- k="">catch</c-> <c- p="">(</c-><c- k="">const</c-> <c- n="">std</c-><c- o="">::</c-><c- n="">exception</c-> <c- o="">&amp;</c-><c- p="">)</c-> <c- p="">{</c->
    <c- n="">global_int</c-> <c- o="">=</c-> <c- mi="">0</c-><c- p="">;</c->
  <c- p="">}</c->
  <c- k="">return</c-> <c- n="">global_int</c-><c- p="">;</c->
<c- p="">}</c->
</pre>
   </details>
   <h2 class="heading settled" id="linear_graphs"><span class="content">Appendix D: Linear graphs</span><a class="self-link" href="#linear_graphs"></a></h2>
   <h3 class="heading settled" id="linearneutral1"><span class="content">Initial error neutral cost, linear</span><a class="self-link" href="#linearneutral1"></a></h3>
    <a href="#neutral1">Logarithmic version of this graph with commentary</a> 
   <div id="CmpTermLinear" style="width: 100%;height:600px;"></div>
<script type="text/javascript">
  // based on prepared DOM, initialize echarts instance
  var myChart = echarts.init(document.getElementById('CmpTermLinear'));

  // specify chart configuration item and data
  var option = {
    tooltip: { formatter: myFormatter },
    calculable : true,
    legend: {
      type: 'scroll',
      right: 0,
      top: 0,
      orient: 'vertical',
    },
    xAxis: [{ type: 'value' }],
    yAxis: [{
      type: 'category',
      data: ['Clang','GCC','MSVC x64','MSVC x86']
    }],
    grid: {
      top: 0,
      left: 65,
      right: 200
    },
    dataZoom: [{show: true}],
    series: data_CmpTerm
  };

  // use configuration item and data specified to show chart
  myChart.setOption(option);
</script>
   <h3 class="heading settled" id="linearerror1"><span class="content">Initial cost of signaling an error, linear</span><a class="self-link" href="#linearerror1"></a></h3>
    <a href="#error1">Logarithmic version of this graph with commentary</a> 
   <div id="FirstErrorLinear" style="width: 100%;height:600px;"></div>
<script type="text/javascript">
  // based on prepared DOM, initialize echarts instance
  var myChart = echarts.init(document.getElementById('FirstErrorLinear'));

  // specify chart configuration item and data
  var option = {
    tooltip: { formatter: myFormatter },
    calculable : true,
    legend: {
      type: 'scroll',
      right: 0,
      top: 0,
      orient: 'vertical',
    },
    xAxis: [{type: 'value'}],
    yAxis: [{
      type: 'category',
      data: ['Clang','GCC','MSVC x64','MSVC x86']
    }],
    grid: {
      top: 0,
      left: 65,
      right: 200
    },
    dataZoom: [{show: true}],
    series: data_Cost1stError
  };

  // use configuration item and data specified to show chart
  myChart.setOption(option);
</script>
  </main>
<script>
(function() {
  "use strict";
  var collapseSidebarText = '<span aria-hidden="true">←</span> '
                          + '<span>Collapse Sidebar</span>';
  var expandSidebarText   = '<span aria-hidden="true">→</span> '
                          + '<span>Pop Out Sidebar</span>';
  var tocJumpText         = '<span aria-hidden="true">↑</span> '
                          + '<span>Jump to Table of Contents</span>';

  var sidebarMedia = window.matchMedia('screen and (min-width: 78em)');
  var autoToggle   = function(e){ toggleSidebar(e.matches) };
  if(sidebarMedia.addListener) {
    sidebarMedia.addListener(autoToggle);
  }

  function toggleSidebar(on) {
    if (on == undefined) {
      on = !document.body.classList.contains('toc-sidebar');
    }

    /* Don’t scroll to compensate for the ToC if we’re above it already. */
    var headY = 0;
    var head = document.querySelector('.head');
    if (head) {
      // terrible approx of "top of ToC"
      headY += head.offsetTop + head.offsetHeight;
    }
    var skipScroll = window.scrollY < headY;

    var toggle = document.getElementById('toc-toggle');
    var tocNav = document.getElementById('toc');
    if (on) {
      var tocHeight = tocNav.offsetHeight;
      document.body.classList.add('toc-sidebar');
      document.body.classList.remove('toc-inline');
      toggle.innerHTML = collapseSidebarText;
      if (!skipScroll) {
        window.scrollBy(0, 0 - tocHeight);
      }
      tocNav.focus();
      sidebarMedia.addListener(autoToggle); // auto-collapse when out of room
    }
    else {
      document.body.classList.add('toc-inline');
      document.body.classList.remove('toc-sidebar');
      toggle.innerHTML = expandSidebarText;
      if (!skipScroll) {
        window.scrollBy(0, tocNav.offsetHeight);
      }
      if (toggle.matches(':hover')) {
        /* Unfocus button when not using keyboard navigation,
           because I don’t know where else to send the focus. */
        toggle.blur();
      }
    }
  }

  function createSidebarToggle() {
    /* Create the sidebar toggle in JS; it shouldn’t exist when JS is off. */
    var toggle = document.createElement('a');
      /* This should probably be a button, but appearance isn’t standards-track.*/
    toggle.id = 'toc-toggle';
    toggle.class = 'toc-toggle';
    toggle.href = '#toc';
    toggle.innerHTML = collapseSidebarText;

    sidebarMedia.addListener(autoToggle);
    var toggler = function(e) {
      e.preventDefault();
      sidebarMedia.removeListener(autoToggle); // persist explicit off states
      toggleSidebar();
      return false;
    }
    toggle.addEventListener('click', toggler, false);


    /* Get <nav id=toc-nav>, or make it if we don’t have one. */
    var tocNav = document.getElementById('toc-nav');
    if (!tocNav) {
      tocNav = document.createElement('p');
      tocNav.id = 'toc-nav';
      /* Prepend for better keyboard navigation */
      document.body.insertBefore(tocNav, document.body.firstChild);
    }
    /* While we’re at it, make sure we have a Jump to Toc link. */
    var tocJump = document.getElementById('toc-jump');
    if (!tocJump) {
      tocJump = document.createElement('a');
      tocJump.id = 'toc-jump';
      tocJump.href = '#toc';
      tocJump.innerHTML = tocJumpText;
      tocNav.appendChild(tocJump);
    }

    tocNav.appendChild(toggle);
  }

  var toc = document.getElementById('toc');
  if (toc) {
    createSidebarToggle();
    toggleSidebar(sidebarMedia.matches);

    /* If the sidebar has been manually opened and is currently overlaying the text
       (window too small for the MQ to add the margin to body),
       then auto-close the sidebar once you click on something in there. */
    toc.addEventListener('click', function(e) {
      if(e.target.tagName.toLowerCase() == "a" && document.body.classList.contains('toc-sidebar') && !sidebarMedia.matches) {
        toggleSidebar(false);
      }
    }, false);
  }
  else {
    console.warn("Can’t find Table of Contents. Please use <nav id='toc'> around the ToC.");
  }

  /* Wrap tables in case they overflow */
  var tables = document.querySelectorAll(':not(.overlarge) > table.data, :not(.overlarge) > table.index');
  var numTables = tables.length;
  for (var i = 0; i < numTables; i++) {
    var table = tables[i];
    var wrapper = document.createElement('div');
    wrapper.className = 'overlarge';
    table.parentNode.insertBefore(wrapper, table);
    wrapper.appendChild(table);
  }

})();
</script>
  <h2 class="no-num no-ref heading settled" id="references"><span class="content">References</span><a class="self-link" href="#references"></a></h2>
  <h3 class="no-num no-ref heading settled" id="informative"><span class="content">Informative References</span><a class="self-link" href="#informative"></a></h3>
  <dl>
   <dt id="biblio-bakhvalov">[Bakhvalov]
   </dt><dd>Denis Bakhvalov. <a href="https://dendibakh.github.io/blog/2018/01/18/Code_alignment_issues">Code alignment issues.</a>. URL: <a href="https://dendibakh.github.io/blog/2018/01/18/Code_alignment_issues">https://dendibakh.github.io/blog/2018/01/18/Code_alignment_issues</a>
   </dd><dt id="biblio-batyievembedded">[BatyievEmbedded]
   </dt><dd>Andrii Batyiev. <a href="https://andriidevel.blogspot.com/2016/05/size-cost-of-c-exception-handling-on.html">Size cost of C++ exception handling on embedded platform</a>. URL: <a href="https://andriidevel.blogspot.com/2016/05/size-cost-of-c-exception-handling-on.html">https://andriidevel.blogspot.com/2016/05/size-cost-of-c-exception-handling-on.html</a>
   </dd><dt id="biblio-brandexpected">[BrandExpected]
   </dt><dd>Simon Brand. <a href="https://github.com/TartanLlama/expected">expected</a>. URL: <a href="https://github.com/TartanLlama/expected">https://github.com/TartanLlama/expected</a>
   </dd><dt id="biblio-douglasoutcome">[DouglasOutcome]
   </dt><dd>Niall Douglas. <a href="https://github.com/ned14/outcome">outcome</a>. URL: <a href="https://github.com/ned14/outcome">https://github.com/ned14/outcome</a>
   </dd><dt id="biblio-echarts">[ECharts]
   </dt><dd><a href="https://ecomfe.github.io/echarts-doc/public/en/index.html">ECharts</a>. URL: <a href="https://ecomfe.github.io/echarts-doc/public/en/index.html">https://ecomfe.github.io/echarts-doc/public/en/index.html</a>
   </dd><dt id="biblio-guillemot">[Guillemot]
   </dt><dd>Nicolas Guillemot. <a href="http://cppsecrets.blogspot.com/2013/12/using-lippincott-function-for.html">Using a Lippincott Function for Centralized Exception Handling</a>. URL: <a href="http://cppsecrets.blogspot.com/2013/12/using-lippincott-function-for.html">http://cppsecrets.blogspot.com/2013/12/using-lippincott-function-for.html</a>
   </dd><dt id="biblio-iaca">[IACA]
   </dt><dd><a href="https://software.intel.com/en-us/articles/intel-architecture-code-analyzer">Intel Architecture Code Analyzer</a>. URL: <a href="https://software.intel.com/en-us/articles/intel-architecture-code-analyzer">https://software.intel.com/en-us/articles/intel-architecture-code-analyzer</a>
   </dd><dt id="biblio-mca">[MCA]
   </dt><dd><a href="https://llvm.org/docs/CommandGuide/llvm-mca.html">llvm-mca - LLVM Machine Code Analyzer</a>. URL: <a href="https://llvm.org/docs/CommandGuide/llvm-mca.html">https://llvm.org/docs/CommandGuide/llvm-mca.html</a>
   </dd><dt id="biblio-mofh4">[MoFH4]
   </dt><dd>Modi Mo. <a href="https://devblogs.microsoft.com/cppblog/making-cpp-exception-handling-smaller-x64/">Making C++ Exception Handling Smaller On x64</a>. URL: <a href="https://devblogs.microsoft.com/cppblog/making-cpp-exception-handling-smaller-x64/">https://devblogs.microsoft.com/cppblog/making-cpp-exception-handling-smaller-x64/</a>
   </dd><dt id="biblio-p0709">[P0709]
   </dt><dd>Herb Sutter. <a href="http://wg21.link/P0709">Zero-overhead deterministic exceptions: Throw values</a>. URL: <a href="http://wg21.link/P0709">http://wg21.link/P0709</a>
   </dd><dt id="biblio-p0939r2">[P0939R2]
   </dt><dd>H. Hinnant; et al. <a href="http://wg21.link/P0939R2">Direction for ISO C++</a>. URL: <a href="http://wg21.link/P0939R2">http://wg21.link/P0939R2</a>
   </dd><dt id="biblio-p1028r1">[P1028R1]
   </dt><dd>Niall Douglas. <a href="http://wg21.link/P1028R1">P1028R1: SG14 status_code and standard error object for P0709 Zero-overhead deterministic exceptions</a>. URL: <a href="http://wg21.link/P1028R1">http://wg21.link/P1028R1</a>
   </dd><dt id="biblio-renwicklowcost">[RenwickLowCost]
   </dt><dd>James Renwick; Tom Spink; Bjoern Franke. <a href="https://www.research.ed.ac.uk/portal/en/publications/lowcost-deterministic-c-exceptions-for-embedded-systems(2cfc59d5-fa95-45e0-83b2-46e51098cf1f).html">Low-cost Deterministic C++ Exceptions for Embedded Systems</a>. URL: <a href="https://www.research.ed.ac.uk/portal/en/publications/lowcost-deterministic-c-exceptions-for-embedded-systems(2cfc59d5-fa95-45e0-83b2-46e51098cf1f).html">https://www.research.ed.ac.uk/portal/en/publications/lowcost-deterministic-c-exceptions-for-embedded-systems(2cfc59d5-fa95-45e0-83b2-46e51098cf1f).html</a>
  </dd></dl></body></html>
  