diff --git a/contributes/meta3d-action-publish/.gitignore b/contributes/meta3d-action-publish/.gitignore
index dafad816d..7c3ca1eb4 100755
--- a/contributes/meta3d-action-publish/.gitignore
+++ b/contributes/meta3d-action-publish/.gitignore
@@ -23,3 +23,5 @@ npm-debug
yarn.lock
+
+publish/
\ No newline at end of file
diff --git a/contributes/meta3d-action-publish/package.json b/contributes/meta3d-action-publish/package.json
index 0cfd6ddfd..63429918f 100755
--- a/contributes/meta3d-action-publish/package.json
+++ b/contributes/meta3d-action-publish/package.json
@@ -1,6 +1,6 @@
{
"name": "meta3d-action-publish",
- "version": "1.3.35",
+ "version": "1.3.38",
"publisher": "meta3d",
"protocol": {
"name": "meta3d-action-publish-protocol"
@@ -29,7 +29,8 @@
"meta3d-editor-whole-protocol": "^1.3.0",
"meta3d-type": "^1.3.0",
"react": ">=16.8.4",
- "react-dom": ">=16.8.4"
+ "react-dom": ">=16.8.4",
+ "vconsole": "^3.15.1"
},
"devDependencies": {
"clean-webpack-plugin": "^4.0.0",
diff --git a/contributes/meta3d-action-publish/publish/index.html b/contributes/meta3d-action-publish/publish/index.html
index ebb160c65..31ff0ea5b 100644
--- a/contributes/meta3d-action-publish/publish/index.html
+++ b/contributes/meta3d-action-publish/publish/index.html
@@ -1 +1 @@
-
Meta3D
\ No newline at end of file
+Meta3D
\ No newline at end of file
diff --git a/contributes/meta3d-action-publish/publish/static/js/main.js b/contributes/meta3d-action-publish/publish/static/js/main.js
index deb13f90b..d37b0b9e8 100644
--- a/contributes/meta3d-action-publish/publish/static/js/main.js
+++ b/contributes/meta3d-action-publish/publish/static/js/main.js
@@ -1,3 +1,3 @@
/*! For license information please see main.js.LICENSE.txt */
-(()=>{var __webpack_modules__={7941:(e,t,n)=>{(t=n(1051)(!1)).push([e.id,".xflow-default-node {\n z-index: 10;\n display: flex;\n width: 180px;\n height: 36px;\n line-height: 36px;\n text-align: center;\n background-color: #fff;\n border: 1px solid #1890ff;\n border-radius: 2px;\n box-shadow: -1px -1px 4px 0 rgba(223,223,223,0.50), -2px 2px 4px 0 rgba(244,244,244,0.50), 2px 3px 8px 2px rgba(151,151,151,0.05);\n transition: all ease-in-out 0.15s;\n}\n.xflow-default-node:hover {\n background-color: #fff;\n border: 1px solid #3057e3;\n box-shadow: 0 0 3px 3px rgba(48, 86, 227, 0.15);\n cursor: move;\n}\n.xflow-default-node .icon {\n width: 36px;\n}\n.xflow-default-node .label {\n width: 108px;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.xflow-default-node .status {\n width: 36px;\n}\n.xflow-default-node.panel-node {\n border: 0;\n}\n.x6-node-selected .xflow-default-node {\n background-color: rgba(48, 86, 227, 0.05);\n border: 1px solid #3057e3;\n box-shadow: 0 0 3px 3px rgba(48, 86, 227, 0.15);\n}\n.x6-node-selected .xflow-default-node:hover {\n background-color: #fff;\n box-shadow: 0 0 5px 5px rgba(48, 86, 227, 0.15);\n}\n.xflow-default-group-node {\n z-index: 9;\n width: 100%;\n height: 100%;\n background-color: rgba(255, 255, 255, 0.65);\n border: 1px solid rgba(255, 255, 255, 0.25);\n border-radius: 4px;\n box-shadow: rgb(17 49 96 / 12%) 0px 1px 3px 0px, rgb(17 49 96 / 4%) 0px 0px 0px 1px;\n cursor: grab;\n}\n.xflow-default-group-node:hover {\n background-color: rgba(227, 244, 255, 0.45);\n border: 1px solid #1890ff;\n box-shadow: 0 0 3px 3px rgba(64, 169, 255, 0.2);\n cursor: move;\n}\n.xflow-default-group-node .xflow-group-header {\n display: flex;\n justify-content: space-between;\n padding: 0 12px;\n font-size: 14px;\n line-height: 38px;\n}\n.xflow-default-group-node .xflow-group-header .header-left {\n width: 80%;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n.xflow-default-group-node .xflow-group-header .header-right {\n display: inline-flex;\n align-items: center;\n}\n.xflow-default-group-node .xflow-group-header .header-right span.anticon {\n margin-left: 8px;\n}\n.x6-node-selected .xflow-default-group-node {\n background-color: rgba(243, 249, 255, 0.92);\n border: 1px solid #1890ff;\n box-shadow: 0 0 3px 3px rgba(64, 169, 255, 0.2);\n}\n.x6-node-selected .xflow-default-group-node:hover {\n background-color: rgba(243, 249, 255, 0.6);\n}\n.xflow-canvas-root {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n}\n.xflow-x6-canvas {\n width: 100%;\n height: 100%;\n}\n.xflow-app-workspace {\n position: relative;\n width: 100%;\n height: 100%;\n}\n.xflow-hide {\n display: none;\n}\n.x6-widget-dnd.dragging {\n cursor: grabbing !important;\n}\n/* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */\n/* stylelint-disable no-duplicate-selectors */\n/* stylelint-disable */\n/* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */\n.xflow-collapse-panel {\n border-right: 1px solid #d9d9d9;\n}\n.xflow-collapse-panel .disabled {\n position: relative;\n opacity: 0.45;\n}\n.xflow-collapse-panel .disabled::before {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 999;\n cursor: not-allowed;\n content: '';\n}\n.xflow-collapse-panel-node-wrapper {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n cursor: grab;\n}\n.xflow-collapse-panel-header {\n display: flex;\n justify-content: space-evenly;\n background: #fff;\n border-bottom: 1px solid #d9d9d9;\n}\n.xflow-collapse-panel-header-title {\n font-size: 16px;\n}\n.xflow-collapse-panel-header-search {\n width: 100%;\n padding: 0 12px;\n}\n.xflow-collapse-panel-body {\n padding: 0;\n overflow-x: hidden;\n overflow-y: auto;\n background: #fff;\n}\n.xflow-collapse-panel-footer {\n display: flex;\n justify-content: space-evenly;\n background: #fff;\n border-top: 1px solid #d9d9d9;\n}\n.xflow-collapse-panel-footer-title {\n font-size: 16px;\n}\n.xflow-collapse-panel .xflow-collapse-search-list {\n height: 100%;\n margin: 0;\n padding: 8px 0;\n overflow-y: auto;\n list-style: none;\n}\n.xflow-collapse-panel .xflow-collapse-search-list-item {\n margin: 0;\n padding: 4px 0;\n}\n.xflow-collapse-panel .xflow-collapse-list {\n height: 100%;\n margin: 0;\n padding: 0;\n overflow-y: auto;\n list-style: none;\n}\n.xflow-collapse-panel .xflow-collapse-list-item {\n margin: 0;\n padding: 0;\n}\n.xflow-collapse-panel .xflow-collapse-list-item.close .xflow-collapse-content {\n height: 0;\n transform: scaleY(0);\n}\n.xflow-collapse-panel .xflow-collapse-header {\n display: flex;\n justify-content: space-between;\n padding: 8px 16px;\n color: rgba(0, 0, 0, 0.65);\n line-height: 1.5;\n cursor: pointer;\n transition: all 0.3s;\n user-select: none;\n}\n.xflow-collapse-panel .xflow-collapse-header:hover {\n background: #f5f5f5;\n}\n.xflow-collapse-panel .xflow-collapse-header-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n}\n.xflow-collapse-panel .xflow-collapse-header-icon svg {\n transition: all 0.5s;\n}\n.xflow-collapse-panel .xflow-collapse-header-label {\n flex: 1;\n}\n.xflow-collapse-panel .xflow-collapse-header-extra {\n width: auto;\n}\n.xflow-collapse-panel .xflow-collapse-content {\n height: 100%;\n height: auto;\n overflow: hidden;\n transform: scaleY(1);\n transition: scale 0.15s ease-in-out;\n}\n.xflow-collapse-panel .xflow-collapse-content-item {\n padding: 4px 0;\n transition: all 0.5s;\n}\n.xflow-collapse-panel .xflow-collapse-content-item:hover {\n background: #f5f5f5;\n}\n.x6-menu {\n position: relative;\n display: inline-block;\n min-width: 160px;\n min-height: 32px;\n margin: 0;\n padding: 4px 0;\n background-color: #fff;\n outline: 0;\n box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);\n}\n.x6-menu-item {\n position: relative;\n}\n.x6-menu-item-active > .x6-menu-item-button,\n.x6-menu-item:hover > .x6-menu-item-button {\n color: #262626;\n background: #f5f5f5;\n}\n.x6-menu-item-divider {\n display: block;\n width: 100%;\n height: 1px;\n margin: 4px 0;\n background: rgba(150, 150, 150, 0.2);\n pointer-events: none;\n}\n.x6-menu-item-button {\n position: relative;\n display: flex;\n align-content: center;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n height: 28px;\n padding: 0 12px;\n color: #595959;\n text-align: left;\n background: transparent;\n border: none;\n outline: none;\n box-shadow: none;\n cursor: pointer;\n}\n.x6-menu-item-hidden {\n display: none;\n}\n.x6-menu-item-disabled > .x6-menu-item-button,\n.x6-menu-item-disabled:hover > .x6-menu-item-button {\n color: #595959;\n background-color: transparent;\n cursor: not-allowed;\n opacity: 0.4;\n}\n.x6-menu-item-icon {\n position: absolute;\n top: 50%;\n left: 6px;\n display: none;\n width: 24px;\n height: 24px;\n margin-top: -12px;\n font-size: 13px;\n}\n.x6-menu-item-text {\n padding-right: 56px;\n overflow: hidden;\n font-size: 13px;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n.x6-menu-item-hotkey {\n font-size: 13px;\n opacity: 0.75;\n}\n.x6-menu-submenu-arrow,\n.x6-menu-submenu.x6-menu-item-disabled:hover > .x6-menu-item-button > .x6-menu-submenu-arrow {\n position: absolute;\n top: 10px;\n right: 12px;\n width: 0;\n height: 0;\n border-top: 4px solid rgba(0, 0, 0, 0);\n border-bottom: 4px solid rgba(0, 0, 0, 0);\n border-left: 5px solid #262626;\n opacity: 0.4;\n pointer-events: none;\n}\n.x6-menu-submenu-menu,\n.x6-menu-submenu.x6-menu-item-disabled:hover > .x6-menu-submenu-menu {\n position: absolute;\n top: -5px;\n left: 100%;\n z-index: 9999;\n min-width: 200px;\n margin-left: -4px;\n padding: 5px 0;\n background: #fff;\n box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);\n transform: translateX(-10px);\n visibility: hidden;\n opacity: 0;\n transition: all 0.25s cubic-bezier(0.3, 1.2, 0.2, 1);\n}\n.x6-menu-submenu.x6-menu-item-active > .x6-menu-item-button > .x6-menu-submenu-arrow,\n.x6-menu-submenu:hover > .x6-menu-item-button > .x6-menu-submenu-arrow {\n opacity: 0.75;\n}\n.x6-menu-submenu.x6-menu-item-active > .x6-menu-submenu-menu,\n.x6-menu-submenu:hover > .x6-menu-submenu-menu {\n transform: translateX(0);\n visibility: visible;\n opacity: 1;\n}\n.x6-menu.x6-menu-has-icon .x6-menu-item-button {\n padding-left: 30px;\n}\n.x6-menu.x6-menu-has-icon .x6-menu-item-button .x6-menu-item-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.x6-menu.x6-menu-has-icon .x6-menu-item-button .x6-menu-item-text {\n padding-left: 2px;\n}\n.xflow-menu-mask {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1000;\n}\n.xflow-menu-mask .x6-dropdown {\n overflow: visible;\n pointer-events: all;\n}\n.xflow-menu-mask .xflow-context-menu-anchor {\n position: absolute;\n z-index: 1;\n background-color: #fff;\n}\n@keyframes xflow-processing-line {\n to {\n stroke-dashoffset: -1000;\n }\n}\n.dag-extension-container .x6-edge {\n stroke-width: 1px;\n}\n.dag-extension-container .x6-edge.success path:nth-child(2) {\n stroke: #d5d5d5 !important;\n}\n.dag-extension-container .x6-edge.success path:nth-child(3) {\n fill: #d5d5d5 !important;\n stroke: #d5d5d5 !important;\n}\n.dag-extension-container .x6-edge.error {\n stroke-width: 2px;\n}\n.dag-extension-container .x6-edge.error path:nth-child(2) {\n stroke: rgba(245, 34, 45, 0.45) !important;\n stroke-width: 2px;\n}\n.dag-extension-container .x6-edge.processing path:nth-child(2) {\n animation: xflow-processing-line 30s infinite linear;\n stroke: rgba(57, 202, 116, 0.8);\n stroke-width: 2px;\n stroke-dasharray: 8px, 2px;\n}\n.dag-extension-container .x6-edge.x6-edge-selected path:nth-child(2) {\n stroke: #1890ff;\n stroke-width: 2px;\n}\n.dag-extension-container .x6-edge:hover path:nth-child(2) {\n stroke: #1890ff;\n stroke-width: 2px;\n}\n.dag-extension-container .x6-edge.hoverHighlight path:nth-child(2) {\n stroke: #1890ff;\n stroke-width: 2px;\n}\n.dag-extension-container .x6-port .xflow-port-group .xflow-port-arrow {\n display: none;\n}\n.dag-extension-container .x6-port .xflow-port-group.available .xflow-port {\n stroke: rgba(57, 202, 116, 0.6);\n r: 8;\n stroke-width: 8px;\n}\n.dag-extension-container .x6-port .xflow-port-group.connected .xflow-port-arrow {\n display: block;\n}\n.dag-extension-container .x6-port .xflow-port-group.connected .xflow-port {\n display: none;\n}\n.dag-extension-container .x6-port .xflow-port-group.adsorbed .xflow-port {\n stroke: rgba(57, 202, 116, 0.85);\n r: 10;\n stroke-width: 10px;\n}\n.layout-top-bottom .x6-port .xflow-port-group .xflow-port-arrow {\n display: none;\n}\n.layout-top-bottom .x6-port .xflow-port-group.connected .xflow-port-arrow {\n display: block;\n}\n.layout-top-bottom .x6-port .xflow-port-group.connected .xflow-port {\n display: none;\n}\n.layout-left-right .x6-port .xflow-port-group .xflow-port-arrow {\n display: none;\n}\n.layout-left-right .x6-port .xflow-port-group.connected .xflow-port-arrow {\n display: block;\n transform: translate(0, 5px) rotate(270deg) !important;\n}\n.layout-left-right .x6-port .xflow-port-group.connected .xflow-port {\n display: none;\n}\n.flow-extension-container .x6-edge {\n stroke-width: 1px;\n}\n.flow-extension-container .x6-edge.success path:nth-child(2) {\n stroke: #888 !important;\n}\n.flow-extension-container .x6-edge.success path:nth-child(3) {\n fill: #888 !important;\n stroke: #888 !important;\n}\n.flow-extension-container .x6-edge.error {\n stroke-width: 2px;\n}\n.flow-extension-container .x6-edge.error path:nth-child(2) {\n stroke: rgba(245, 34, 45, 0.45) !important;\n stroke-width: 2px;\n}\n.flow-extension-container .x6-edge.guideProcessing path:nth-child(2) {\n stroke: rgba(57, 202, 116, 0.8);\n stroke-width: 2px;\n stroke-dasharray: 8px, 2px;\n}\n.flow-extension-container .x6-edge.guideProcessing path:nth-child(2):local {\n animation: processing-line 30s infinite linear;\n}\n.flow-extension-container .x6-edge.x6-edge-selected path:nth-child(2) {\n stroke: #1890ff;\n stroke-width: 2px;\n}\n.flow-extension-container .x6-edge:hover path:nth-child(2) {\n stroke: #1890ff;\n stroke-width: 2px;\n}\n.flow-extension-container .x6-edge.hoverHighlight path:nth-child(2) {\n stroke: #1890ff;\n stroke-width: 2px;\n}\n@keyframes processing-line {\n to {\n stroke-dashoffset: -1000;\n }\n}\n.flow-extension-container .x6-widget-transform {\n margin: -1px 0 0 -1px;\n padding: 0;\n border: 1px solid #239edd;\n}\n.flow-extension-container .x6-widget-transform > div {\n border: 1px solid #239edd;\n}\n.flow-extension-container .x6-widget-transform > div:hover {\n background-color: #3dafe4;\n}\n.flow-extension-container .x6-widget-transform-active-handle {\n background-color: #3dafe4;\n}\n.flow-extension-container .x6-widget-transform-resize {\n border-radius: 0;\n}\n.flow-extension-container .x6-widget-selection-inner {\n border: 1px solid #239edd;\n}\n.flow-extension-container .x6-widget-selection-box {\n opacity: 0;\n}\n.xflow-form-checkbox {\n margin-bottom: 2px !important;\n}\n.xflow-form-checkbox :global .ant-checkbox-wrapper {\n width: 100%;\n overflow: hidden;\n}\n.xflow-form-input :global .ant-input-clear-icon {\n color: rgba(0, 0, 0, 0.25);\n}\n.xflow-json-form {\n height: 100%;\n}\n.xflow-json-form label {\n font-size: 12px;\n}\n.xflow-json-form .ant-form-item {\n margin-bottom: 12px;\n}\n.xflow-json-form .ant-form-item .ant-form-item-label {\n padding-bottom: 4px;\n}\n.xflow-json-form .ant-form-item .ant-form-item-label > label {\n color: #666;\n}\n.xflow-json-form .ant-form-item .ant-form-item-control .ant-checkbox-wrapper {\n color: #666;\n}\n.xflow-json-form .ant-form-item-explain,\n.xflow-json-form .ant-form-item-extra {\n font-size: 12px;\n}\n.xflow-json-form .ant-form-item-explain-error > div {\n word-break: break-all;\n}\n.xflow-json-form .ant-form-item-extra {\n margin-top: 4px;\n}\n.xflow-json-form .tabs {\n flex-direction: column;\n height: 100%;\n}\n.xflow-json-form .tabs .ant-tabs-nav {\n box-shadow: 0 0 16px -5px rgba(0, 0, 0, 0.2);\n}\n.xflow-json-form .tabs .ant-tabs-nav .ant-tabs-nav-list {\n width: 100%;\n}\n.xflow-json-form .tabs .ant-tabs-nav .ant-tabs-nav-list .ant-tabs-tab {\n font-size: 12px;\n}\n.xflow-json-form .tabs .ant-tabs-nav .ant-tabs-nav-list .ant-tabs-tab-active {\n border-bottom-width: 0;\n}\n.xflow-json-form .tabs .ant-tabs-nav .ant-tabs-nav-list .ant-tabs-tab .ant-tabs-tab-btn {\n font-weight: normal;\n text-align: center;\n}\n.xflow-json-form .tabs .ant-tabs-content-holder {\n padding: 0 16px;\n overflow-y: auto;\n}\n.xflow-json-form .tabs.xTab .ant-tabs-nav .ant-tabs-nav-list {\n box-sizing: border-box;\n height: 40px;\n background-color: #fff;\n border-bottom: 1px solid #d9d9d9;\n}\n.xflow-json-form .tabs.xTab .ant-tabs-nav .ant-tabs-nav-list .ant-tabs-tab {\n background-color: #fff;\n}\n.xflow-json-form .tabs.xTab .ant-tabs-nav .ant-tabs-nav-list .ant-tabs-tab .ant-tabs-tab-btn {\n width: 100%;\n}\n.xflow-json-form .tabs.singleTab .ant-tabs-tab {\n width: 100%;\n}\n.xflow-json-form .tabs.coupleTab .ant-tabs-tab {\n width: 50%;\n margin-right: 0;\n border-right-width: 0;\n}\n.xflow-json-form .tabs.coupleTab .ant-tabs-tab:last-of-type {\n border-right-width: 1px;\n}\n.xflow-json-form .tabs.ternateTab .ant-tabs-tab {\n width: 33%;\n margin-right: 0;\n border-right-width: 0;\n}\n.xflow-json-form .tabs.ternateTab .ant-tabs-tab:last-of-type {\n border-right-width: 1px;\n}\n.xflow-json-schema-form {\n border-left: 1px solid #d9d9d9;\n}\n.xflow-json-schema-form-body {\n position: relative;\n width: 100%;\n height: 100%;\n}\n.xflow-json-schema-form-header {\n display: flex;\n justify-content: space-evenly;\n background: #fff;\n border-bottom: 1px solid #d9d9d9;\n}\n.xflow-json-schema-form-header-title {\n font-size: 16px;\n}\n.xflow-json-schema-form-footer {\n display: flex;\n justify-content: space-evenly;\n background: #fff;\n border-top: 1px solid #d9d9d9;\n}\n.xflow-json-schema-form-footer-title {\n font-size: 16px;\n}\n.text-truncate {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n.xflow-minimap {\n z-index: 999;\n background: #fff;\n box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.15);\n}\n.xflow-minimap .x6-widget-minimap .x6-graph {\n background: rgba(255, 255, 255, 0.9);\n}\n.xflow-minimap .x6-widget-minimap {\n background: rgba(34, 34, 34, 0.05);\n}\n.xflow-node-dnd-panel {\n border-right: 1px solid #d9d9d9;\n}\n.xflow-node-dnd-panel-header {\n display: flex;\n justify-content: space-evenly;\n background: #fff;\n border-bottom: 1px solid #d9d9d9;\n}\n.xflow-node-dnd-panel-header-title {\n font-size: 16px;\n}\n.xflow-node-dnd-panel-header-search {\n width: 100%;\n padding: 0 12px;\n}\n.xflow-node-dnd-panel-body {\n padding: 0;\n padding: 8px 0;\n overflow-x: hidden;\n overflow-y: auto;\n background: #fff;\n}\n.xflow-node-dnd-panel-body .ant-tree-iconEle.ant-tree-icon__customize {\n display: none !important;\n width: auto;\n margin-right: 0;\n color: rgba(0, 0, 0, 0.45);\n}\n.xflow-node-dnd-panel-body .ant-tree {\n background: unset;\n}\n.xflow-node-dnd-panel-body .ant-tree-switcher {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.xflow-node-dnd-panel-body .ant-tree-node-content-wrapper {\n display: flex;\n align-items: center;\n padding-left: 0;\n overflow: hidden;\n}\n.xflow-node-dnd-panel-body-list {\n margin: 0;\n padding: 0;\n}\n.xflow-node-dnd-panel-body-list-item {\n margin: 0;\n padding: 4px 12px;\n overflow: hidden;\n list-style-type: none;\n}\n.xflow-node-dnd-panel-body-list-item .xflow-node-dnd-panel-node-wrapper {\n justify-content: center;\n}\n.xflow-node-dnd-panel-tree-leaf {\n position: relative;\n}\n.xflow-node-dnd-panel-tree-leaf .ant-tree-iconEle {\n display: none;\n}\n.xflow-node-dnd-panel-tree-leaf .ant-tree-title {\n padding: 2px;\n}\n.xflow-node-dnd-panel-node-wrapper {\n display: flex;\n align-items: center;\n width: 100%;\n}\n.xflow-node-dnd-panel-footer {\n display: flex;\n justify-content: space-evenly;\n background: #fff;\n border-top: 1px solid #d9d9d9;\n}\n.xflow-node-dnd-panel-footer-title {\n font-size: 16px;\n}\n.xflow-dnd-node {\n width: 100%;\n height: 40px;\n}\n.x6-dropdown {\n position: absolute;\n top: -9999px;\n left: -9999px;\n z-index: 9999;\n display: block;\n max-height: 320px;\n overflow-y: scroll;\n border-radius: 3px;\n box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);\n}\n.x6-dropdown-hidden {\n display: none;\n}\n.x6-dropdown-overlay {\n display: inline-block;\n}\n.x6-dropdown.slide-down-enter.slide-down-enter-active.x6-dropdown-placement-bottomLeft,\n.x6-dropdown.slide-down-appear.slide-down-appear-active.x6-dropdown-placement-bottomLeft,\n.x6-dropdown.slide-down-enter.slide-down-enter-active.x6-dropdown-placement-bottomCenter,\n.x6-dropdown.slide-down-appear.slide-down-appear-active.x6-dropdown-placement-bottomCenter,\n.x6-dropdown.slide-down-enter.slide-down-enter-active.x6-dropdown-placement-bottomRight,\n.x6-dropdown.slide-down-appear.slide-down-appear-active.x6-dropdown-placement-bottomRight {\n animation-name: x6SlideUpIn;\n}\n.x6-dropdown.slide-up-enter.slide-up-enter-active.x6-dropdown-placement-topLeft,\n.x6-dropdown.slide-up-appear.slide-up-appear-active.x6-dropdown-placement-topLeft,\n.x6-dropdown.slide-up-enter.slide-up-enter-active.x6-dropdown-placement-topCenter,\n.x6-dropdown.slide-up-appear.slide-up-appear-active.x6-dropdown-placement-topCenter,\n.x6-dropdown.slide-up-enter.slide-up-enter-active.x6-dropdown-placement-topRight,\n.x6-dropdown.slide-up-appear.slide-up-appear-active.x6-dropdown-placement-topRight {\n animation-name: x6SlideDownIn;\n}\n.x6-dropdown.slide-down-leave.slide-down-leave-active.x6-dropdown-placement-bottomLeft,\n.x6-dropdown.slide-down-leave.slide-down-leave-active.x6-dropdown-placement-bottomCenter,\n.x6-dropdown.slide-down-leave.slide-down-leave-active.x6-dropdown-placement-bottomRight {\n animation-name: x6SlideUpOut;\n}\n.x6-dropdown.slide-up-leave.slide-up-leave-active.x6-dropdown-placement-topLeft,\n.x6-dropdown.slide-up-leave.slide-up-leave-active.x6-dropdown-placement-topCenter,\n.x6-dropdown.slide-up-leave.slide-up-leave-active.x6-dropdown-placement-topRight {\n animation-name: x6SlideDownOut;\n}\n@keyframes x6SlideUpIn {\n 0% {\n transform: scaleY(0.8);\n transform-origin: 0% 0%;\n opacity: 0;\n }\n 100% {\n transform: scaleY(1);\n transform-origin: 0% 0%;\n opacity: 1;\n }\n}\n@keyframes x6SlideUpOut {\n 0% {\n transform: scaleY(1);\n transform-origin: 0% 0%;\n opacity: 1;\n }\n 100% {\n transform: scaleY(0.8);\n transform-origin: 0% 0%;\n opacity: 0;\n }\n}\n@keyframes x6SlideDownIn {\n 0% {\n transform: scaleY(0.8);\n transform-origin: 100% 100%;\n opacity: 0;\n }\n 100% {\n transform: scaleY(1);\n transform-origin: 100% 100%;\n opacity: 1;\n }\n}\n@keyframes x6SlideDownOut {\n 0% {\n transform: scaleY(1);\n transform-origin: 100% 100%;\n opacity: 1;\n }\n 100% {\n transform: scaleY(0.8);\n transform-origin: 100% 100%;\n opacity: 0;\n }\n}\n.x6-toolbar {\n display: flex;\n flex-direction: row;\n height: 28px;\n margin: 0;\n padding: 0;\n padding-left: 4px;\n overflow: hidden;\n}\n.x6-toolbar-content {\n display: flex;\n flex: 1;\n flex-direction: row;\n justify-content: space-between;\n overflow: hidden;\n}\n.x6-toolbar-content-inner,\n.x6-toolbar-content-extras,\n.x6-toolbar-group,\n.x6-toolbar-item,\n.x6-toolbar-item-icon,\n.x6-toolbar-item-text {\n display: flex;\n flex-direction: row;\n}\n.x6-toolbar-content-extras {\n align-content: center;\n align-items: center;\n font-size: 14px;\n}\n.x6-toolbar-group::before {\n align-self: center;\n width: 1px;\n height: 40%;\n margin: 0 6px;\n background-color: rgba(0, 0, 0, 0.15);\n content: ' ';\n pointer-events: none;\n}\n.x6-toolbar-group:first-child::before {\n content: none;\n}\n.x6-toolbar-item {\n align-content: center;\n align-items: center;\n margin: 0;\n padding: 0 4px;\n color: #595959;\n background-color: transparent;\n border: 0;\n border-radius: 2px;\n outline: none;\n box-shadow: none;\n cursor: pointer;\n user-select: none;\n}\n.x6-toolbar-item.x6-toolbar-item-hidden {\n display: none;\n}\n.x6-toolbar-item.x6-toolbar-item-disabled,\n.x6-toolbar-item.x6-toolbar-item-disabled:hover {\n cursor: not-allowed;\n opacity: 0.4;\n}\n.x6-toolbar-item.x6-toolbar-item-disabled .x6-toolbar-item-icon .x6-toolbar-item:active {\n transform: none;\n}\n.x6-toolbar-item-icon,\n.x6-toolbar-item-text {\n align-content: center;\n align-items: center;\n}\n.x6-toolbar-item-icon {\n font-size: 14px;\n transition: transform 50ms ease;\n}\n.x6-toolbar-item-icon:active {\n transform: scale(1.27201965);\n}\n.x6-toolbar-item-text {\n padding-left: 4px;\n font-size: 12px;\n}\n.x6-toolbar-item-dropdown-wrap {\n margin-top: -13px;\n}\n.x6-toolbar-item-dropdown-arrow {\n width: 0;\n height: 0;\n margin-left: 6px;\n border-color: #262626 transparent transparent transparent;\n border-style: solid;\n border-width: 5px 4px 0 4px;\n opacity: 0.4;\n}\n.x6-toolbar.x6-toolbar-hover-effect {\n height: 32px;\n}\n.x6-toolbar.x6-toolbar-hover-effect .x6-toolbar-item {\n margin: 4px 2px 4px 0;\n padding: 0 6px;\n color: #595959;\n}\n.x6-toolbar.x6-toolbar-hover-effect .x6-toolbar-item-disabled.x6-toolbar-item:hover {\n color: #595959;\n background-color: transparent;\n}\n.x6-toolbar.x6-toolbar-hover-effect .x6-toolbar-item-disabled.x6-toolbar-item:hover .x6-toolbar-item-dropdown-arrow {\n opacity: 0.4;\n}\n.x6-toolbar-item.x6-toolbar-item-active,\n.x6-toolbar.x6-toolbar-hover-effect .x6-toolbar-item.x6-toolbar-item-active,\n.x6-toolbar.x6-toolbar-hover-effect .x6-toolbar-item:hover {\n color: #262626;\n background-color: #e0e0e0;\n}\n.x6-toolbar-item.x6-toolbar-item-active .x6-toolbar-item-dropdown-arrow,\n.x6-toolbar.x6-toolbar-hover-effect .x6-toolbar-item.x6-toolbar-item-active .x6-toolbar-item-dropdown-arrow,\n.x6-toolbar.x6-toolbar-hover-effect .x6-toolbar-item:hover .x6-toolbar-item-dropdown-arrow {\n opacity: 0.75;\n}\n.x6-toolbar-item.x6-toolbar-item-active {\n margin: 4px 0;\n}\n.x6-toolbar.x6-toolbar-big {\n height: 32px;\n}\n.x6-toolbar.x6-toolbar-big .x6-toolbar-content-extras {\n font-size: 16px;\n}\n.x6-toolbar.x6-toolbar-big .x6-toolbar-item {\n margin: 4px 4px 4px 0;\n padding: 0 5px;\n border-radius: 3px;\n}\n.x6-toolbar.x6-toolbar-big .x6-toolbar-item-text {\n font-size: 14px;\n}\n.x6-toolbar.x6-toolbar-big .x6-toolbar-item-icon {\n font-size: 16px;\n}\n.x6-toolbar.x6-toolbar-hover-effect.x6-toolbar-big {\n height: 40px;\n}\n.x6-toolbar.x6-toolbar-hover-effect.x6-toolbar-big .x6-toolbar-item {\n padding: 0 10px;\n}\n.x6-toolbar.x6-toolbar-small {\n height: 22px;\n}\n.x6-toolbar.x6-toolbar-small .x6-toolbar-content-extras {\n font-size: 12px;\n}\n.x6-toolbar.x6-toolbar-small .x6-toolbar-item {\n padding: 0 3px;\n}\n.x6-toolbar.x6-toolbar-small .x6-toolbar-item-text {\n margin-right: 2px;\n padding-left: 2px;\n font-size: 10px;\n}\n.x6-toolbar.x6-toolbar-small .x6-toolbar-item-icon {\n font-size: 12px;\n}\n.x6-toolbar.x6-toolbar-small .x6-toolbar-item.x6-toolbar-item-active {\n margin: 2px 0;\n}\n.x6-toolbar.x6-toolbar-hover-effect.x6-toolbar-small {\n height: 28px;\n}\n.x6-toolbar.x6-toolbar-hover-effect.x6-toolbar-small .x6-toolbar-item {\n margin: 4px 2px 4px 0;\n padding: 0 5px;\n}\n.x6-toolbar.x6-toolbar-hover-effect.x6-toolbar-small .x6-toolbar-item.x6-toolbar-item-active {\n margin: 4px 2px 4px 0;\n}\n.x6-toolbar.x6-toolbar-align-right .x6-toolbar-content {\n flex-direction: row-reverse;\n}\n.xflow-toolbar {\n position: absolute;\n z-index: 99;\n display: flex;\n height: 40px;\n background: #fff;\n}\n.xflow-toolbar-root {\n display: flex;\n justify-content: space-between;\n width: 100%;\n}\n.xflow-toolbar-root.horizontal-center {\n justify-content: center;\n}\n.xflow-toolbar-root.vertical {\n flex-direction: column;\n}\n.xflow-toolbar-root .x6-toolbar.x6-toolbar-hover-effect {\n align-items: center;\n height: 100%;\n}\n.xflow-toolbar-root .x6-toolbar-content {\n height: 100%;\n}\n.xflow-toolbar.vertical {\n right: unset;\n left: unset;\n width: 32px;\n height: auto;\n border: 1px solid rgba(0, 0, 0, 0.04);\n border-radius: 4px;\n box-shadow: 0 0 20px rgb(0 0 0 / 1%);\n}\n.xflow-toolbar.vertical .x6-toolbar.x6-toolbar-hover-effect {\n height: auto;\n padding: 8px 0;\n}\n.xflow-toolbar.vertical .x6-toolbar-content-inner,\n.xflow-toolbar.vertical .x6-toolbar-group {\n flex-direction: column;\n}\n.xflow-toolbar.vertical .x6-toolbar-item {\n margin: 0;\n padding: 6px 8px;\n color: #595959;\n}\n.xflow-toolbar.horizontal {\n right: 0;\n left: 0;\n}\n.xflow-toolbar.horizontal .x6-toolbar.x6-toolbar-hover-effect {\n height: 40px;\n line-height: 40px;\n}\n.flowchart-extension-container .x6-edge {\n stroke-width: 1px;\n}\n.flowchart-extension-container .x6-edge.success path:nth-child(2) {\n stroke: #888 !important;\n}\n.flowchart-extension-container .x6-edge.success path:nth-child(3) {\n fill: #888 !important;\n stroke: #888 !important;\n}\n.flowchart-extension-container .x6-edge.error {\n stroke-width: 2px;\n}\n.flowchart-extension-container .x6-edge.error path:nth-child(2) {\n stroke: rgba(245, 34, 45, 0.45) !important;\n stroke-width: 2px;\n}\n.flowchart-extension-container .x6-edge.guideProcessing path:nth-child(2) {\n stroke: rgba(57, 202, 116, 0.8);\n stroke-width: 2px;\n stroke-dasharray: 8px, 2px;\n}\n.flowchart-extension-container .x6-edge.guideProcessing path:nth-child(2):local {\n animation: processing-line 30s infinite linear;\n}\n.flowchart-extension-container .x6-edge.x6-edge-selected path:nth-child(2) {\n stroke: #1890ff;\n stroke-width: 2px;\n}\n.flowchart-extension-container .x6-edge:hover path:nth-child(2) {\n stroke: #1890ff;\n stroke-width: 2px;\n}\n.flowchart-extension-container .x6-edge.hoverHighlight path:nth-child(2) {\n stroke: #1890ff;\n stroke-width: 2px;\n}\n@keyframes processing-line {\n to {\n stroke-dashoffset: -1000;\n }\n}\n.flowchart-extension-container .x6-widget-transform {\n margin: -1px 0 0 -1px;\n padding: 0;\n border: 1px solid #239edd;\n}\n.flowchart-extension-container .x6-widget-transform > div {\n border: 1px solid #239edd;\n}\n.flowchart-extension-container .x6-widget-transform > div:hover {\n background-color: #3dafe4;\n}\n.flowchart-extension-container .x6-widget-transform-active-handle {\n background-color: #3dafe4;\n}\n.flowchart-extension-container .x6-widget-transform-resize {\n border-radius: 0;\n}\n.flowchart-extension-container .x6-widget-selection-inner {\n border: 1px solid #239edd;\n}\n.flowchart-extension-container .x6-widget-selection-box {\n opacity: 0;\n}\n.flowchart-extension-container.xflow-app-workspace {\n overflow: hidden;\n border: 1px solid #d9d9d9;\n}\n.flowchart-extension-container.xflow-app-workspace .xflow-workspace-panel {\n z-index: 1;\n background: #fff;\n}\n.flowchart-extension-container.xflow-app-workspace svg {\n overflow: visible !important;\n}\n.flowchart-extension-container.xflow-app-workspace .x6-edge {\n stroke-width: 1px;\n}\n.flowchart-extension-container.xflow-app-workspace .x6-edge.x6-edge-selected path:nth-child(2) {\n stroke: #1890ff;\n}\n.flowchart-extension-container.xflow-app-workspace .x6-edge:hover path:nth-child(2) {\n stroke: #1890ff;\n}\n.flowchart-extension-container.xflow-app-workspace .x6-edge.hoverHighlight path:nth-child(2) {\n stroke: #1890ff;\n}\n.flowchart-extension-container.xflow-app-workspace .x6-port > circle {\n stroke: #69c0ff;\n}\n.flowchart-extension-container.xflow-app-workspace .x6-widget-transform {\n box-sizing: border-box !important;\n margin: 0;\n padding: 0;\n border: 2px solid #3572f9;\n box-shadow: 0 4px 4px 0 #dbe6ff;\n}\n.flowchart-extension-container.xflow-app-workspace .x6-widget-transform > div {\n width: 8px;\n height: 8px;\n background-color: #fff;\n border: 1px solid #3572f9;\n}\n.flowchart-extension-container.xflow-app-workspace .xflow-json-form .ant-tabs-content-holder {\n padding: 0 !important;\n}\n.flowchart-container-collpase {\n transition: left 0.5s;\n}\n.flowchart-container-collpase-wrapper {\n position: relative;\n width: 100%;\n height: 100%;\n}\n.flowchart-container-collpase-nodes {\n border-right: 1px solid #d9d9d9;\n}\n.flowchart-container-collpase-icon {\n position: absolute;\n z-index: 99;\n width: 20px;\n color: #aaa;\n font-size: 12px;\n text-align: center;\n background: #fff;\n border: 1px solid #ccc;\n transform: translate(0, -50%);\n cursor: pointer;\n}\n.flowchart-container-collpase-icon:hover {\n color: #2b84c0;\n}\n.flowchart-container-collpase .xflow-workspace-panel {\n transition: left 0.5s;\n}\n.flowchart-editor-panel-body {\n padding: 12px;\n}\n.flowchart-editor-panel-body .flowchart-editor-color-container {\n width: 24px;\n height: 24px;\n padding: 4px;\n border: 1px solid #eee;\n border-radius: 2px;\n}\n.flowchart-editor-panel-body .flowchart-editor-panel-group {\n display: flex;\n flex-direction: column;\n grid-gap: 8px;\n margin-bottom: 12px;\n padding-bottom: 12px;\n font-size: 12px;\n}\n.flowchart-editor-panel-body .flowchart-editor-panel-group:first-child {\n border-bottom: 1px solid #ccc;\n}\n.flowchart-editor-panel-body .flowchart-editor-panel-group:last-child {\n margin-bottom: 0;\n}\n.flowchart-editor-panel-body .flowchart-editor-panel-group input,\n.flowchart-editor-panel-body .flowchart-editor-panel-group select {\n height: 24px;\n}\n.flowchart-editor-panel-body .flowchart-editor-panel-group h5 {\n margin: 0;\n color: rgba(0, 0, 0, 0.85);\n}\n.flowchart-editor-panel-body .flowchart-editor-panel-group .group {\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n.flowchart-editor-panel-body .flowchart-editor-panel-group .group > label {\n margin-right: 8px;\n color: rgba(0, 0, 0, 0.45);\n word-break: keep-all;\n}\n.flowchart-editor-panel-body .flowchart-editor-panel-group .split {\n display: flex;\n grid-gap: 8px;\n}\n.flowchart-editor-panel-body .flowchart-editor-panel-group .addon-before-group {\n position: relative;\n display: flex;\n flex-direction: row;\n width: 100%;\n height: 100%;\n overflow: hidden;\n vertical-align: center;\n border: 1px solid #d9d9d9;\n border-radius: 2px;\n}\n.flowchart-editor-panel-body .flowchart-editor-panel-group .addon-before-group > span {\n position: absolute;\n top: 0;\n right: 0;\n display: block;\n width: 20px;\n color: #000000d9;\n line-height: 24px;\n text-align: center;\n background-color: #fafafa;\n cursor: pointer;\n}\n.flowchart-editor-panel-body .flowchart-editor-panel-group .addon-before-group:hover > span {\n display: none;\n}\n.flowchart-editor-panel-body .flowchart-editor-node-text-style,\n.flowchart-editor-panel-body .flowchart-editor-edge-text-style,\n.flowchart-editor-panel-body .flowchart-editor-edge-stroke-style {\n display: flex;\n flex-direction: row;\n grid-gap: 8px;\n}\n.flowchart-editor-panel-body .ant-input-number {\n width: 100%;\n}\n.flowchart-editor-canvas-panel {\n display: flex;\n justify-content: center;\n padding-top: 60px;\n color: #aaa;\n}\n.flowchart-editor-pick-color-container {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 999;\n background: rgba(0, 0, 0, 0.25);\n}\n.flowchart-editor-pick-color-container .flowchart-editor-popover {\n position: absolute;\n top: 50%;\n left: 50%;\n padding: 12px;\n background: #fff;\n transform: translate(-50%, -50%);\n}\n.flowchart-editor-pick-color-container .sketch-picker {\n box-sizing: border-box !important;\n padding: 0 !important;\n border-radius: none !important;\n box-shadow: none !important;\n}\n.flowchart-editor-pick-color-container .foolter {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n margin-top: 12px;\n}\n.flowchart-extension-container .xflow-editor-panel-collpase {\n color: rgba(0, 0, 0, 0.85);\n font-size: 12px;\n transition: right 0.5s;\n}\n.flowchart-extension-container .xflow-editor-panel-collpase-wrapper {\n position: relative;\n width: 100%;\n height: 100%;\n}\n.flowchart-extension-container .xflow-editor-panel-collpase-icon {\n position: absolute;\n z-index: 99;\n width: 20px;\n color: #aaa;\n text-align: center;\n background: #fff;\n border: 1px solid #ccc;\n transform: translate(0, -50%);\n cursor: pointer;\n}\n.flowchart-extension-container .xflow-editor-panel-collpase-icon:hover {\n color: #2b84c0;\n}\n.flowchart-extension-container .xflow-editor-panel-collpase .xflow-workspace-panel {\n transition: left 0.5s;\n}\n.xflow-group-node {\n z-index: 9;\n width: 100%;\n height: 100%;\n background-color: rgba(255, 255, 255, 0.65);\n border: 1px solid rgba(255, 255, 255, 0.25);\n border-radius: 4px;\n box-shadow: rgb(17 49 96 / 12%) 0px 1px 3px 0px, rgb(17 49 96 / 4%) 0px 0px 0px 1px;\n cursor: grab;\n}\n.xflow-group-node:hover {\n background-color: rgba(227, 244, 255, 0.45);\n border: 1px solid #1890ff;\n box-shadow: 0 0 3px 3px rgba(64, 169, 255, 0.2);\n cursor: move;\n}\n.xflow-group-node .xflow-group-header {\n display: flex;\n justify-content: space-between;\n padding: 0 12px;\n line-height: 38px;\n}\n.xflow-group-node .xflow-group-header .header-left {\n width: 80%;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n.xflow-group-node .xflow-group-header .header-right {\n display: inline-flex;\n align-items: center;\n}\n.xflow-group-node .xflow-group-header .header-right span.anticon {\n margin-left: 8px;\n}\n.x6-node-selected .xflow-group-node {\n background-color: rgba(243, 249, 255, 0.92);\n border: 1px solid #1890ff;\n box-shadow: 0 0 3px 3px rgba(64, 169, 255, 0.2);\n}\n.x6-node-selected .xflow-group-node:hover {\n background-color: rgba(243, 249, 255, 0.6);\n}\n.flowchart-extension-container .xflow-node-panel {\n color: rgba(0, 0, 0, 0.85);\n font-size: 12px;\n}\n.flowchart-extension-container .xflow-node-panel-header {\n display: flex;\n justify-content: space-evenly;\n background: #fff;\n border-right: 1px solid #d9d9d9;\n border-bottom: 1px solid #d9d9d9;\n}\n.flowchart-extension-container .xflow-node-panel-header-title {\n font-size: 16px;\n}\n.flowchart-extension-container .xflow-node-panel-header-search {\n width: 100%;\n padding: 0 12px;\n}\n.flowchart-extension-container .xflow-node-panel-custom {\n display: flex;\n flex-wrap: wrap;\n grid-gap: 5px;\n background: #fff;\n cursor: grab;\n}\n.flowchart-extension-container .xflow-node-panel-official {\n grid-gap: 5px;\n background: #fff;\n cursor: grab;\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(24px, 1fr));\n}\n.flowchart-extension-container .xflow-node-panel-node-wrapper {\n display: flex;\n justify-content: center;\n cursor: pointer;\n}\n.flowchart-extension-container .xflow-node-panel .ant-collapse-content-box {\n padding: 12px;\n}\n.flowchart-extension-container .xflow-node-panel .ant-collapse-content {\n border-top: none;\n}\n.flowchart-extension-container .xflow-node-panel .ant-collapse-header {\n color: rgba(0, 0, 0, 0.85);\n font-size: 12px;\n}\n.flowchart-extension-container .xflow-node-panel-collpase {\n color: rgba(0, 0, 0, 0.85);\n font-size: 12px;\n transition: left 0.5s;\n}\n.flowchart-extension-container .xflow-node-panel-collpase-wrapper {\n position: relative;\n width: 100%;\n height: 100%;\n}\n.flowchart-extension-container .xflow-node-panel-collpase-nodes {\n border-right: 1px solid #d9d9d9;\n}\n.flowchart-extension-container .xflow-node-panel-collpase-icon {\n position: absolute;\n z-index: 99;\n width: 20px;\n color: #aaa;\n text-align: center;\n background: #fff;\n border: 1px solid #ccc;\n transform: translate(0, -50%);\n cursor: pointer;\n}\n.flowchart-extension-container .xflow-node-panel-collpase-icon:hover {\n color: #2b84c0;\n}\n\n.xflow-app-workspace {\n overflow: hidden;\n border: 1px solid #d9d9d9;\n}\n.xflow-app-workspace .xflow-workspace-panel {\n z-index: 1;\n background: #fff;\n}\n.xflow-app-workspace svg {\n overflow: visible !important;\n}\n.xflow-app-workspace .x6-edge {\n stroke-width: 1px;\n}\n.xflow-app-workspace .x6-edge.x6-edge-selected path:nth-child(2) {\n stroke: #3572f9;\n}\n.xflow-app-workspace .x6-edge:hover path:nth-child(2) {\n stroke: #3572f9;\n}\n.xflow-app-workspace .x6-edge.hoverHighlight path:nth-child(2) {\n stroke: #3572f9;\n}\n.xflow-app-workspace .x6-port > circle {\n stroke: #69c0ff;\n}\n.xflow-app-workspace .x6-widget-transform {\n box-sizing: border-box !important;\n margin: 0;\n padding: 0;\n border: 2px solid #3572f9;\n box-shadow: 0 4px 4px 0 #dbe6ff;\n}\n.xflow-app-workspace .x6-widget-transform > div {\n width: 8px;\n height: 8px;\n background-color: #fff;\n border: 1px solid #3572f9;\n}\n.xflow-app-workspace .xflow-json-form .ant-tabs-content-holder {\n padding: 0 !important;\n}\n.xflow-app-workspace .ant-collapse-header {\n display: flex;\n flex-wrap: nowrap;\n align-items: flex-start;\n padding: 12px 16px;\n color: rgba(0, 0, 0, 0.85);\n line-height: 1.5715;\n cursor: pointer;\n transition: all 0.3s, visibility 0s;\n}\n",""]),e.exports=t},2948:(e,t,n)=>{(t=n(1051)(!1)).push([e.id,"/* stylelint-disable */\nhtml,\nbody {\n width: 100%;\n height: 100%;\n}\ninput::-ms-clear,\ninput::-ms-reveal {\n display: none;\n}\n*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\nhtml {\n font-family: sans-serif;\n line-height: 1.15;\n -webkit-text-size-adjust: 100%;\n -ms-text-size-adjust: 100%;\n -ms-overflow-style: scrollbar;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n@-ms-viewport {\n width: device-width;\n}\nbody {\n margin: 0;\n}\n[tabindex='-1']:focus {\n outline: none;\n}\nhr {\n box-sizing: content-box;\n height: 0;\n overflow: visible;\n}\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n margin-top: 0;\n margin-bottom: 0.5em;\n font-weight: 500;\n}\np {\n margin-top: 0;\n margin-bottom: 1em;\n}\nabbr[title],\nabbr[data-original-title] {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline;\n text-decoration: underline dotted;\n border-bottom: 0;\n cursor: help;\n}\naddress {\n margin-bottom: 1em;\n font-style: normal;\n line-height: inherit;\n}\ninput[type='text'],\ninput[type='password'],\ninput[type='number'],\ntextarea {\n -webkit-appearance: none;\n}\nol,\nul,\ndl {\n margin-top: 0;\n margin-bottom: 1em;\n}\nol ol,\nul ul,\nol ul,\nul ol {\n margin-bottom: 0;\n}\ndt {\n font-weight: 500;\n}\ndd {\n margin-bottom: 0.5em;\n margin-left: 0;\n}\nblockquote {\n margin: 0 0 1em;\n}\ndfn {\n font-style: italic;\n}\nb,\nstrong {\n font-weight: bolder;\n}\nsmall {\n font-size: 80%;\n}\nsub,\nsup {\n position: relative;\n font-size: 75%;\n line-height: 0;\n vertical-align: baseline;\n}\nsub {\n bottom: -0.25em;\n}\nsup {\n top: -0.5em;\n}\npre,\ncode,\nkbd,\nsamp {\n font-size: 1em;\n font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;\n}\npre {\n margin-top: 0;\n margin-bottom: 1em;\n overflow: auto;\n}\nfigure {\n margin: 0 0 1em;\n}\nimg {\n vertical-align: middle;\n border-style: none;\n}\na,\narea,\nbutton,\n[role='button'],\ninput:not([type='range']),\nlabel,\nselect,\nsummary,\ntextarea {\n touch-action: manipulation;\n}\ntable {\n border-collapse: collapse;\n}\ncaption {\n padding-top: 0.75em;\n padding-bottom: 0.3em;\n text-align: left;\n caption-side: bottom;\n}\ninput,\nbutton,\nselect,\noptgroup,\ntextarea {\n margin: 0;\n color: inherit;\n font-size: inherit;\n font-family: inherit;\n line-height: inherit;\n}\nbutton,\ninput {\n overflow: visible;\n}\nbutton,\nselect {\n text-transform: none;\n}\nbutton,\nhtml [type='button'],\n[type='reset'],\n[type='submit'] {\n -webkit-appearance: button;\n}\nbutton::-moz-focus-inner,\n[type='button']::-moz-focus-inner,\n[type='reset']::-moz-focus-inner,\n[type='submit']::-moz-focus-inner {\n padding: 0;\n border-style: none;\n}\ninput[type='radio'],\ninput[type='checkbox'] {\n box-sizing: border-box;\n padding: 0;\n}\ninput[type='date'],\ninput[type='time'],\ninput[type='datetime-local'],\ninput[type='month'] {\n -webkit-appearance: listbox;\n}\ntextarea {\n overflow: auto;\n resize: vertical;\n}\nfieldset {\n min-width: 0;\n margin: 0;\n padding: 0;\n border: 0;\n}\nlegend {\n display: block;\n width: 100%;\n max-width: 100%;\n margin-bottom: 0.5em;\n padding: 0;\n color: inherit;\n font-size: 1.5em;\n line-height: inherit;\n white-space: normal;\n}\nprogress {\n vertical-align: baseline;\n}\n[type='number']::-webkit-inner-spin-button,\n[type='number']::-webkit-outer-spin-button {\n height: auto;\n}\n[type='search'] {\n outline-offset: -2px;\n -webkit-appearance: none;\n}\n[type='search']::-webkit-search-cancel-button,\n[type='search']::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n::-webkit-file-upload-button {\n font: inherit;\n -webkit-appearance: button;\n}\noutput {\n display: inline-block;\n}\nsummary {\n display: list-item;\n}\ntemplate {\n display: none;\n}\n[hidden] {\n display: none !important;\n}\nmark {\n padding: 0.2em;\n background-color: #feffe6;\n}\n",""]),e.exports=t},268:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Area:()=>cA,Bar:()=>dA,BidirectionalBar:()=>CN,Box:()=>EA,Bullet:()=>pA,Chord:()=>zA,CirclePacking:()=>vN,Column:()=>gA,DualAxes:()=>YA,FUNNEL_CONVERSATION_FIELD:()=>sw,Facet:()=>bN,Funnel:()=>vA,G2:()=>g,Gauge:()=>PA,Heatmap:()=>MA,Histogram:()=>bA,Line:()=>wA,Liquid:()=>kA,Mix:()=>SN,MultiView:()=>SN,Pie:()=>$A,Plot:()=>px,Progress:()=>NA,Radar:()=>RA,RadialBar:()=>lN,RingProgress:()=>DA,Rose:()=>FA,Sankey:()=>cN,Scatter:()=>UA,Stock:()=>iN,Sunburst:()=>rN,TinyArea:()=>VA,TinyColumn:()=>qA,TinyLine:()=>ZA,Treemap:()=>dN,Venn:()=>gN,Violin:()=>pN,Waterfall:()=>QA,WordCloud:()=>tN,adaptors:()=>LP,default:()=>kN,flow:()=>rb,getCanvasPattern:()=>Rb,measureTextWidth:()=>sb});var r={};n.r(r),n.d(r,{assign:()=>qt,default:()=>hn,defaultI18n:()=>Zt,format:()=>fn,parse:()=>pn,setGlobalDateI18n:()=>Qt,setGlobalDateMasks:()=>dn});var o={};n.r(o),n.d(o,{Arc:()=>ga,DataMarker:()=>xa,DataRegion:()=>wa,Html:()=>_a,Image:()=>ya,Line:()=>da,Region:()=>ma,RegionFilter:()=>Ea,Shape:()=>ka,Text:()=>pa});var i={};n.r(i),n.d(i,{ellipsisHead:()=>La,ellipsisMiddle:()=>ja,ellipsisTail:()=>Da,getDefault:()=>Ra});var a={};n.r(a),n.d(a,{equidistance:()=>qa,equidistanceWithReverseBoth:()=>Ga,getDefault:()=>Ua,reserveBoth:()=>Xa,reserveFirst:()=>Wa,reserveLast:()=>Va});var l={};n.r(l),n.d(l,{fixedAngle:()=>Za,getDefault:()=>Ka,unfixedAngle:()=>Ja});var s={};n.r(s),n.d(s,{autoEllipsis:()=>i,autoHide:()=>a,autoRotate:()=>l});var c={};n.r(c),n.d(c,{Base:()=>ol,Circle:()=>sl,Html:()=>gl,Line:()=>al});var u={};n.r(u),n.d(u,{CONTAINER_CLASS:()=>Tl,CROSSHAIR_X:()=>zl,CROSSHAIR_Y:()=>Hl,LIST_CLASS:()=>Ll,LIST_ITEM_CLASS:()=>Dl,MARKER_CLASS:()=>jl,NAME_CLASS:()=>Bl,TITLE_CLASS:()=>Rl,VALUE_CLASS:()=>Fl});var d={};n.r(d),n.d(d,{Base:()=>Df,Circle:()=>Ff,Ellipse:()=>zf,Image:()=>Wf,Line:()=>qf,Marker:()=>Kf,Path:()=>lp,Polygon:()=>cp,Polyline:()=>dp,Rect:()=>pp,Text:()=>gp});var f={};n.r(f),n.d(f,{Canvas:()=>xp,Group:()=>Rf,Shape:()=>d,getArcParams:()=>hf,version:()=>wp});var p={};n.r(p),n.d(p,{Base:()=>Rp,Circle:()=>Dp,Dom:()=>Fp,Ellipse:()=>zp,Image:()=>Up,Line:()=>Vp,Marker:()=>Yp,Path:()=>Zp,Polygon:()=>Qp,Polyline:()=>th,Rect:()=>rh,Text:()=>sh});var h={};n.r(h),n.d(h,{Canvas:()=>kh,Group:()=>Np,Shape:()=>p,version:()=>Oh});var g={};n.r(g),n.d(g,{Action:()=>Xs,BRUSH_FILTER_EVENTS:()=>py,Chart:()=>Au,ComponentController:()=>Nu,Coordinate:()=>Or,DIRECTION:()=>y,ELEMENT_RANGE_HIGHLIGHT_EVENTS:()=>av,Element:()=>Xu,Event:()=>Eu,Facet:()=>Hs,Geometry:()=>cd,GeometryLabel:()=>wd,Interaction:()=>Rc,InteractionAction:()=>Xs,LAYER:()=>v,Scale:()=>Dt,TooltipController:()=>Ru,Util:()=>Hd,VERSION:()=>zd,VIEW_LIFE_CIRCLE:()=>C,View:()=>_u,getActionClass:()=>Ys,getAnimation:()=>Du,getEngine:()=>R,getFacet:()=>Ws,getGeometryLabel:()=>Yu,getGeometryLabelLayout:()=>Zu,getInteraction:()=>Vc,getShapeFactory:()=>od,getTheme:()=>au,registerAction:()=>Ks,registerAnimation:()=>ju,registerComponentController:()=>bu,registerEngine:()=>L,registerFacet:()=>Vs,registerGeometry:()=>$u,registerGeometryLabel:()=>Ku,registerGeometryLabelLayout:()=>Ju,registerInteraction:()=>Xc,registerShape:()=>rd,registerShapeFactory:()=>nd,registerTheme:()=>lu});var m={};n.r(m),n.d(m,{cluster:()=>kI,hierarchy:()=>Ak,pack:()=>Mk,packEnclose:()=>ck,packSiblings:()=>Sk,partition:()=>bI,stratify:()=>_I,tree:()=>DI,treemap:()=>HI,treemapBinary:()=>UI,treemapDice:()=>yI,treemapResquarify:()=>VI,treemapSlice:()=>jI,treemapSliceDice:()=>WI,treemapSquarify:()=>zI});var v,y,b,x,w=n(6204),S=n(2970),E=n(9537);!function(e){e.FORE="fore",e.MID="mid",e.BG="bg"}(v||(v={})),(x=y||(y={})).TOP="top",x.TOP_LEFT="top-left",x.TOP_RIGHT="top-right",x.RIGHT="right",x.RIGHT_TOP="right-top",x.RIGHT_BOTTOM="right-bottom",x.LEFT="left",x.LEFT_TOP="left-top",x.LEFT_BOTTOM="left-bottom",x.BOTTOM="bottom",x.BOTTOM_LEFT="bottom-left",x.BOTTOM_RIGHT="bottom-right",x.RADIUS="radius",x.CIRCLE="circle",x.NONE="none",function(e){e.AXIS="axis",e.GRID="grid",e.LEGEND="legend",e.TOOLTIP="tooltip",e.ANNOTATION="annotation",e.SLIDER="slider",e.SCROLLBAR="scrollbar",e.OTHER="other"}(b||(b={}));var C,k,O,M;!function(e){e.BEFORE_RENDER="beforerender",e.AFTER_RENDER="afterrender",e.BEFORE_PAINT="beforepaint",e.AFTER_PAINT="afterpaint",e.BEFORE_CHANGE_DATA="beforechangedata",e.AFTER_CHANGE_DATA="afterchangedata",e.BEFORE_CLEAR="beforeclear",e.AFTER_CLEAR="afterclear",e.BEFORE_DESTROY="beforedestroy",e.BEFORE_CHANGE_SIZE="beforechangesize",e.AFTER_CHANGE_SIZE="afterchangesize"}(C||(C={})),function(e){e.BEFORE_DRAW_ANIMATE="beforeanimate",e.AFTER_DRAW_ANIMATE="afteranimate",e.BEFORE_RENDER_LABEL="beforerenderlabel",e.AFTER_RENDER_LABEL="afterrenderlabel"}(k||(k={})),function(e){e.MOUSE_ENTER="plot:mouseenter",e.MOUSE_DOWN="plot:mousedown",e.MOUSE_MOVE="plot:mousemove",e.MOUSE_UP="plot:mouseup",e.MOUSE_LEAVE="plot:mouseleave",e.TOUCH_START="plot:touchstart",e.TOUCH_MOVE="plot:touchmove",e.TOUCH_END="plot:touchend",e.TOUCH_CANCEL="plot:touchcancel",e.CLICK="plot:click",e.DBLCLICK="plot:dblclick",e.CONTEXTMENU="plot:contextmenu",e.LEAVE="plot:leave",e.ENTER="plot:enter"}(O||(O={})),function(e){e.ACTIVE="active",e.INACTIVE="inactive",e.SELECTED="selected",e.DEFAULT="default"}(M||(M={}));var I,$,_,P,A=["color","shape","size"],N="_origin",T={};function R(e){var t=T[e];if(!t)throw new Error("G engine '".concat(e,"' is not exist, please register it at first."));return t}function L(e,t){T[e]=t}function D(e){I||(I=document.createElement("table"),$=document.createElement("tr"),_=/^\s*<(\w+|!)[^>]*>/,P={tr:document.createElement("tbody"),tbody:I,thead:I,tfoot:I,td:$,th:$,"*":document.createElement("div")});var t=_.test(e)&&RegExp.$1;t&&t in P||(t="*");var n=P[t];e="string"==typeof e?e.replace(/(^\s*)|(\s*$)/g,""):e,n.innerHTML=""+e;var r=n.childNodes[0];return r&&n.contains(r)&&n.removeChild(r),r}function j(e,t){if(e)for(var n in t)t.hasOwnProperty(n)&&(e.style[n]=t[n]);return e}function F(e){return"number"==typeof e&&!isNaN(e)}function B(e,t,n,r){var o=n,i=r;if(t){var a=function(e){var t=getComputedStyle(e);return{width:(e.clientWidth||parseInt(t.width,10))-parseInt(t.paddingLeft,10)-parseInt(t.paddingRight,10),height:(e.clientHeight||parseInt(t.height,10))-parseInt(t.paddingTop,10)-parseInt(t.paddingBottom,10)}}(e);o=a.width?a.width:o,i=a.height?a.height:i}return{width:Math.max(F(o)?o:1,1),height:Math.max(F(i)?i:1,1)}}var z=n(9210),H=function(e){function t(t){var n=e.call(this)||this;n.destroyed=!1;var r=t.visible,o=void 0===r||r;return n.visible=o,n}return(0,S.ZT)(t,e),t.prototype.show=function(){this.visible||this.changeVisible(!0)},t.prototype.hide=function(){this.visible&&this.changeVisible(!1)},t.prototype.destroy=function(){this.off(),this.destroyed=!0},t.prototype.changeVisible=function(e){this.visible!==e&&(this.visible=e)},t}(z.Z);const U=H;var W="\t\n\v\f\r \u2028\u2029",V=new RegExp("([a-z])["+W+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+W+"]*,?["+W+"]*)+)","ig"),X=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+W+"]*,?["+W+"]*","ig"),q=function(e){if(!e)return null;if((0,E.kJ)(e))return e;var t={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},n=[];return String(e).replace(V,(function(r,o,i){var a=[],l=o.toLowerCase();if(i.replace(X,(function(e,t){t&&a.push(+t)})),"m"===l&&a.length>2&&(n.push([o].concat(a.splice(0,2))),l="l",o="m"===o?"l":"L"),"o"===l&&1===a.length&&n.push([o,a[0]]),"r"===l)n.push([o].concat(a));else for(;a.length>=t[l]&&(n.push([o].concat(a.splice(0,t[l]))),t[l]););return e})),n},G=function(e,t){if(e.length!==t.length)return!1;var n=!0;return(0,E.S6)(e,(function(e,r){if(e!==t[r])return n=!1,!1})),n};function Y(e,t,n){var r=null,o=n;return t=0;s--)a=i[s].index,"add"===i[s].type?e.splice(a,0,[].concat(e[a])):e.splice(a,1)}var d=o-(r=e.length);if(r0)){e[r]=t[r];break}n=Z(n,e[r-1],1)}e[r]=["Q"].concat(n.reduce((function(e,t){return e.concat(t)}),[]));break;case"T":e[r]=["T"].concat(n[0]);break;case"C":if(n.length<3){if(!(r>0)){e[r]=t[r];break}n=Z(n,e[r-1],2)}e[r]=["C"].concat(n.reduce((function(e,t){return e.concat(t)}),[]));break;case"S":if(n.length<2){if(!(r>0)){e[r]=t[r];break}n=Z(n,e[r-1],1)}e[r]=["S"].concat(n.reduce((function(e,t){return e.concat(t)}),[]));break;default:e[r]=t[r]}return e};const ee=function(){function e(e,t){this.bubbles=!0,this.target=null,this.currentTarget=null,this.delegateTarget=null,this.delegateObject=null,this.defaultPrevented=!1,this.propagationStopped=!1,this.shape=null,this.fromShape=null,this.toShape=null,this.propagationPath=[],this.type=e,this.name=e,this.originalEvent=t,this.timeStamp=t.timeStamp}return e.prototype.preventDefault=function(){this.defaultPrevented=!0,this.originalEvent.preventDefault&&this.originalEvent.preventDefault()},e.prototype.stopPropagation=function(){this.propagationStopped=!0},e.prototype.toString=function(){return"[Event (type="+this.type+")]"},e.prototype.save=function(){},e.prototype.restore=function(){},e}();function te(e,t){var n=e.indexOf(t);-1!==n&&e.splice(n,1)}var ne="undefined"!=typeof window&&void 0!==window.document;function re(e,t){if(e.isCanvas())return!0;for(var n=t.getParent(),r=!1;n;){if(n===e){r=!0;break}n=n.getParent()}return r}function oe(e){return e.cfg.visible&&e.cfg.capture}var ie=function(e){function t(t){var n=e.call(this)||this;n.destroyed=!1;var r=n.getDefaultCfg();return n.cfg=(0,E.CD)(r,t),n}return(0,S.ZT)(t,e),t.prototype.getDefaultCfg=function(){return{}},t.prototype.get=function(e){return this.cfg[e]},t.prototype.set=function(e,t){this.cfg[e]=t},t.prototype.destroy=function(){this.cfg={destroyed:!0},this.off(),this.destroyed=!0},t}(z.Z);const ae=ie;var le=n(8359),se=n(9382);function ce(e,t){var n=[],r=e[0],o=e[1],i=e[2],a=e[3],l=e[4],s=e[5],c=e[6],u=e[7],d=e[8],f=t[0],p=t[1],h=t[2],g=t[3],m=t[4],v=t[5],y=t[6],b=t[7],x=t[8];return n[0]=f*r+p*a+h*c,n[1]=f*o+p*l+h*u,n[2]=f*i+p*s+h*d,n[3]=g*r+m*a+v*c,n[4]=g*o+m*l+v*u,n[5]=g*i+m*s+v*d,n[6]=y*r+b*a+x*c,n[7]=y*o+b*l+x*u,n[8]=y*i+b*s+x*d,n}function ue(e,t){var n=[],r=t[0],o=t[1];return n[0]=e[0]*r+e[3]*o+e[6],n[1]=e[1]*r+e[4]*o+e[7],n}var de=se.vs,fe="matrix",pe=["zIndex","capture","visible","type"],he=["repeat"];function ge(e,t){var n={},r=t.attrs;for(var o in e)n[o]=r[o];return n}var me=function(e){function t(t){var n=e.call(this,t)||this;n.attrs={};var r=n.getDefaultAttrs();return(0,E.CD)(r,t.attrs),n.attrs=r,n.initAttrs(r),n.initAnimate(),n}return(0,S.ZT)(t,e),t.prototype.getDefaultCfg=function(){return{visible:!0,capture:!0,zIndex:0}},t.prototype.getDefaultAttrs=function(){return{matrix:this.getDefaultMatrix(),opacity:1}},t.prototype.onCanvasChange=function(e){},t.prototype.initAttrs=function(e){},t.prototype.initAnimate=function(){this.set("animable",!0),this.set("animating",!1)},t.prototype.isGroup=function(){return!1},t.prototype.getParent=function(){return this.get("parent")},t.prototype.getCanvas=function(){return this.get("canvas")},t.prototype.attr=function(){for(var e,t=[],n=0;n0?r=function(e,t){if(t.onFrame)return e;var n=t.startTime,r=t.delay,o=t.duration,i=Object.prototype.hasOwnProperty;return(0,E.S6)(e,(function(e){n+re.delay&&(0,E.S6)(t.toAttrs,(function(t,n){i.call(e.toAttrs,n)&&(delete e.toAttrs[n],delete e.fromAttrs[n])}))})),e}(r,y):n.addAnimator(this),r.push(y),this.set("animations",r),this.set("_pause",{isPaused:!1})}},t.prototype.stopAnimate=function(e){var t=this;void 0===e&&(e=!0);var n=this.get("animations");(0,E.S6)(n,(function(n){e&&(n.onFrame?t.attr(n.onFrame(1)):t.attr(n.toAttrs)),n.callback&&n.callback()})),this.set("animating",!1),this.set("animations",[])},t.prototype.pauseAnimate=function(){var e=this.get("timeline"),t=this.get("animations"),n=e.getTime();return(0,E.S6)(t,(function(e){e._paused=!0,e._pauseTime=n,e.pauseCallback&&e.pauseCallback()})),this.set("_pause",{isPaused:!0,pauseTime:n}),this},t.prototype.resumeAnimate=function(){var e=this.get("timeline").getTime(),t=this.get("animations"),n=this.get("_pause").pauseTime;return(0,E.S6)(t,(function(t){t.startTime=t.startTime+(e-n),t._paused=!1,t._pauseTime=null,t.resumeCallback&&t.resumeCallback()})),this.set("_pause",{isPaused:!1}),this.set("animations",t),this},t.prototype.emitDelegation=function(e,t){var n,r=this,o=t.propagationPath;this.getEvents(),"mouseenter"===e?n=t.fromShape:"mouseleave"===e&&(n=t.toShape);for(var i=function(e){var i=o[e],l=i.get("name");if(l){if((i.isGroup()||i.isCanvas&&i.isCanvas())&&n&&re(i,n))return"break";(0,E.kJ)(l)?(0,E.S6)(l,(function(e){r.emitDelegateEvent(i,e,t)})):a.emitDelegateEvent(i,l,t)}},a=this,l=0;l0)}));return o.length>0?(0,E.S6)(o,(function(o){var i=o.getBBox(),a=i.minX,l=i.maxX,s=i.minY,c=i.maxY;at&&(t=l),sr&&(r=c)})):(e=0,t=0,n=0,r=0),{x:e,y:n,minX:e,minY:n,maxX:t,maxY:r,width:t-e,height:r-n}},t.prototype.getCanvasBBox=function(){var e=1/0,t=-1/0,n=1/0,r=-1/0,o=this.getChildren().filter((function(e){return e.get("visible")&&(!e.isGroup()||e.isGroup()&&e.getChildren().length>0)}));return o.length>0?(0,E.S6)(o,(function(o){var i=o.getCanvasBBox(),a=i.minX,l=i.maxX,s=i.minY,c=i.maxY;at&&(t=l),sr&&(r=c)})):(e=0,t=0,n=0,r=0),{x:e,y:n,minX:e,minY:n,maxX:t,maxY:r,width:t-e,height:r-n}},t.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return t.children=[],t},t.prototype.onAttrChange=function(t,n,r){if(e.prototype.onAttrChange.call(this,t,n,r),"matrix"===t){var o=this.getTotalMatrix();this._applyChildrenMarix(o)}},t.prototype.applyMatrix=function(t){var n=this.getTotalMatrix();e.prototype.applyMatrix.call(this,t);var r=this.getTotalMatrix();r!==n&&this._applyChildrenMarix(r)},t.prototype._applyChildrenMarix=function(e){var t=this.getChildren();(0,E.S6)(t,(function(t){t.applyMatrix(e)}))},t.prototype.addShape=function(){for(var e=[],t=0;t=0;i--){var a=e[i];if(oe(a)&&(a.isGroup()?o=a.getShape(t,n,r):a.isHit(t,n)&&(o=a)),o)break}return o},t.prototype.add=function(e){var t=this.getCanvas(),n=this.getChildren(),r=this.get("timeline"),o=e.getParent();o&&function(e,t,n){void 0===n&&(n=!0),n?t.destroy():(t.set("parent",null),t.set("canvas",null)),te(e.getChildren(),t)}(o,e,!1),e.set("parent",this),t&&xe(e,t),r&&we(e,r),n.push(e),e.onCanvasChange("add"),this._applyElementMatrix(e)},t.prototype._applyElementMatrix=function(e){var t=this.getTotalMatrix();t&&e.applyMatrix(t)},t.prototype.getChildren=function(){return this.get("children")||[]},t.prototype.sort=function(){var e=this.getChildren();(0,E.S6)(e,(function(e,t){return e[be]=t,e})),e.sort((function(e,t){var n,r=(n=t,e.get("zIndex")-n.get("zIndex"));return 0===r?e[be]-t[be]:r})),this.onCanvasChange("sort")},t.prototype.clear=function(){if(this.set("clearing",!0),!this.destroyed){for(var e=this.getChildren(),t=e.length-1;t>=0;t--)e[t].destroy();this.set("children",[]),this.onCanvasChange("clear"),this.set("clearing",!1)}},t.prototype.destroy=function(){this.get("destroyed")||(this.clear(),e.prototype.destroy.call(this))},t.prototype.getFirst=function(){return this.getChildByIndex(0)},t.prototype.getLast=function(){var e=this.getChildren();return this.getChildByIndex(e.length-1)},t.prototype.getChildByIndex=function(e){return this.getChildren()[e]},t.prototype.getCount=function(){return this.getChildren().length},t.prototype.contain=function(e){return this.getChildren().indexOf(e)>-1},t.prototype.removeChild=function(e,t){void 0===t&&(t=!0),this.contain(e)&&e.remove(t)},t.prototype.findAll=function(e){var t=[],n=this.getChildren();return(0,E.S6)(n,(function(n){e(n)&&t.push(n),n.isGroup()&&(t=t.concat(n.findAll(e)))})),t},t.prototype.find=function(e){var t=null,n=this.getChildren();return(0,E.S6)(n,(function(n){if(e(n)?t=n:n.isGroup()&&(t=n.find(e)),t)return!1})),t},t.prototype.findById=function(e){return this.find((function(t){return t.get("id")===e}))},t.prototype.findByClassName=function(e){return this.find((function(t){return t.get("className")===e}))},t.prototype.findAllByName=function(e){return this.findAll((function(t){return t.get("name")===e}))},t}(ve);const Ee=Se;var Ce=n(2009),ke=n(3715),Oe=n(3603),Me=n(8522),Ie={},$e=[1,0,0,0,1,0,0,0,1];function _e(e,t,n){var r,o=t.startTime;if(nu.length?(c=q(a[s]),u=q(i[s]),u=K(u,c),u=Q(u,c),t.fromAttrs.path=u,t.toAttrs.path=c):t.pathFormatted||(c=q(a[s]),u=q(i[s]),u=Q(u,c),t.fromAttrs.path=u,t.toAttrs.path=c,t.pathFormatted=!0),o[s]=[];for(var d=0;d0){for(var i=r.animators.length-1;i>=0;i--)if((e=r.animators[i]).destroyed)r.removeAnimator(i);else{if(!e.isAnimatePaused())for(var a=(t=e.get("animations")).length-1;a>=0;a--)n=t[a],_e(e,n,o)&&(t.splice(a,1),n.callback&&n.callback());0===t.length&&r.removeAnimator(i)}r.canvas.get("autoDraw")||r.canvas.draw()}}))},e.prototype.addAnimator=function(e){this.animators.push(e)},e.prototype.removeAnimator=function(e){this.animators.splice(e,1)},e.prototype.isAnimating=function(){return!!this.animators.length},e.prototype.stop=function(){this.timer&&this.timer.stop()},e.prototype.stopAllAnimations=function(e){void 0===e&&(e=!0),this.animators.forEach((function(t){t.stopAnimate(e)})),this.animators=[],this.canvas.draw()},e.prototype.getTime=function(){return this.current},e}();const Ae=Pe;var Ne=["mousedown","mouseup","dblclick","mouseout","mouseover","mousemove","mouseleave","mouseenter","touchstart","touchmove","touchend","dragenter","dragover","dragleave","drop","contextmenu","mousewheel"];function Te(e,t,n){n.name=t,n.target=e,n.currentTarget=e,n.delegateTarget=e,e.emit(t,n)}function Re(e,t,n){if(n.bubbles){var r=void 0,o=!1;if("mouseenter"===t?(r=n.fromShape,o=!0):"mouseleave"===t&&(o=!0,r=n.toShape),e.isCanvas()&&o)return;if(r&&re(e,r))return void(n.bubbles=!1);n.name=t,n.currentTarget=e,n.delegateTarget=e,e.emit(t,n)}}const Le=function(){function e(e){var t=this;this.draggingShape=null,this.dragging=!1,this.currentShape=null,this.mousedownShape=null,this.mousedownPoint=null,this._eventCallback=function(e){var n=e.type;t._triggerEvent(n,e)},this._onDocumentMove=function(e){if(t.canvas.get("el")!==e.target&&(t.dragging||t.currentShape)){var n=t._getPointInfo(e);t.dragging&&t._emitEvent("drag",e,n,t.draggingShape)}},this._onDocumentMouseUp=function(e){if(t.canvas.get("el")!==e.target&&t.dragging){var n=t._getPointInfo(e);t.draggingShape&&t._emitEvent("drop",e,n,null),t._emitEvent("dragend",e,n,t.draggingShape),t._afterDrag(t.draggingShape,n,e)}},this.canvas=e.canvas}return e.prototype.init=function(){this._bindEvents()},e.prototype._bindEvents=function(){var e=this,t=this.canvas.get("el");(0,E.S6)(Ne,(function(n){t.addEventListener(n,e._eventCallback)})),document&&(document.addEventListener("mousemove",this._onDocumentMove),document.addEventListener("mouseup",this._onDocumentMouseUp))},e.prototype._clearEvents=function(){var e=this,t=this.canvas.get("el");(0,E.S6)(Ne,(function(n){t.removeEventListener(n,e._eventCallback)})),document&&(document.removeEventListener("mousemove",this._onDocumentMove),document.removeEventListener("mouseup",this._onDocumentMouseUp))},e.prototype._getEventObj=function(e,t,n,r,o,i){var a=new ee(e,t);return a.fromShape=o,a.toShape=i,a.x=n.x,a.y=n.y,a.clientX=n.clientX,a.clientY=n.clientY,a.propagationPath.push(r),a},e.prototype._getShape=function(e,t){return this.canvas.getShape(e.x,e.y,t)},e.prototype._getPointInfo=function(e){var t=this.canvas,n=t.getClientByEvent(e),r=t.getPointByEvent(e);return{x:r.x,y:r.y,clientX:n.x,clientY:n.y}},e.prototype._triggerEvent=function(e,t){var n=this._getPointInfo(t),r=this._getShape(n,t),o=this["_on"+e],i=!1;if(o)o.call(this,n,r,t);else{var a=this.currentShape;"mouseenter"===e||"dragenter"===e||"mouseover"===e?(this._emitEvent(e,t,n,null,null,r),r&&this._emitEvent(e,t,n,r,null,r),"mouseenter"===e&&this.draggingShape&&this._emitEvent("dragenter",t,n,null)):"mouseleave"===e||"dragleave"===e||"mouseout"===e?(i=!0,a&&this._emitEvent(e,t,n,a,a,null),this._emitEvent(e,t,n,null,a,null),"mouseleave"===e&&this.draggingShape&&this._emitEvent("dragleave",t,n,null)):this._emitEvent(e,t,n,r,null,null)}if(i||(this.currentShape=r),r&&!r.get("destroyed")){var l=this.canvas;l.get("el").style.cursor=r.attr("cursor")||l.get("cursor")}},e.prototype._onmousedown=function(e,t,n){0===n.button&&(this.mousedownShape=t,this.mousedownPoint=e,this.mousedownTimeStamp=n.timeStamp),this._emitEvent("mousedown",n,e,t,null,null)},e.prototype._emitMouseoverEvents=function(e,t,n,r){var o=this.canvas.get("el");n!==r&&(n&&(this._emitEvent("mouseout",e,t,n,n,r),this._emitEvent("mouseleave",e,t,n,n,r),r&&!r.get("destroyed")||(o.style.cursor=this.canvas.get("cursor"))),r&&(this._emitEvent("mouseover",e,t,r,n,r),this._emitEvent("mouseenter",e,t,r,n,r)))},e.prototype._emitDragoverEvents=function(e,t,n,r,o){r?(r!==n&&(n&&this._emitEvent("dragleave",e,t,n,n,r),this._emitEvent("dragenter",e,t,r,n,r)),o||this._emitEvent("dragover",e,t,r)):n&&this._emitEvent("dragleave",e,t,n,n,r),o&&this._emitEvent("dragover",e,t,r)},e.prototype._afterDrag=function(e,t,n){e&&(e.set("capture",!0),this.draggingShape=null),this.dragging=!1;var r=this._getShape(t,n);r!==e&&this._emitMouseoverEvents(n,t,e,r),this.currentShape=r},e.prototype._onmouseup=function(e,t,n){if(0===n.button){var r=this.draggingShape;this.dragging?(r&&this._emitEvent("drop",n,e,t),this._emitEvent("dragend",n,e,r),this._afterDrag(r,e,n)):(this._emitEvent("mouseup",n,e,t),t===this.mousedownShape&&this._emitEvent("click",n,e,t),this.mousedownShape=null,this.mousedownPoint=null)}},e.prototype._ondragover=function(e,t,n){n.preventDefault();var r=this.currentShape;this._emitDragoverEvents(n,e,r,t,!0)},e.prototype._onmousemove=function(e,t,n){var r=this.canvas,o=this.currentShape,i=this.draggingShape;if(this.dragging)i&&this._emitDragoverEvents(n,e,o,t,!1),this._emitEvent("drag",n,e,i);else{var a=this.mousedownPoint;if(a){var l=this.mousedownShape,s=n.timeStamp-this.mousedownTimeStamp,c=a.clientX-e.clientX,u=a.clientY-e.clientY;s>120||c*c+u*u>40?l&&l.get("draggable")?((i=this.mousedownShape).set("capture",!1),this.draggingShape=i,this.dragging=!0,this._emitEvent("dragstart",n,e,i),this.mousedownShape=null,this.mousedownPoint=null):!l&&r.get("draggable")?(this.dragging=!0,this._emitEvent("dragstart",n,e,null),this.mousedownShape=null,this.mousedownPoint=null):(this._emitMouseoverEvents(n,e,o,t),this._emitEvent("mousemove",n,e,t)):(this._emitMouseoverEvents(n,e,o,t),this._emitEvent("mousemove",n,e,t))}else this._emitMouseoverEvents(n,e,o,t),this._emitEvent("mousemove",n,e,t)}},e.prototype._emitEvent=function(e,t,n,r,o,i){var a=this._getEventObj(e,t,n,r,o,i);if(r){a.shape=r,Te(r,e,a);for(var l=r.getParent();l;)l.emitDelegation(e,a),a.propagationStopped||Re(l,e,a),a.propagationPath.push(l),l=l.getParent()}else Te(this.canvas,e,a)},e.prototype.destroy=function(){this._clearEvents(),this.canvas=null,this.currentShape=null,this.draggingShape=null,this.mousedownPoint=null,this.mousedownShape=null,this.mousedownTimeStamp=null},e}();var De=(0,le.qY)(),je=De&&"firefox"===De.name;!function(e){function t(t){var n=e.call(this,t)||this;return n.initContainer(),n.initDom(),n.initEvents(),n.initTimeline(),n}(0,S.ZT)(t,e),t.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return t.cursor="default",t.supportCSSTransform=!1,t},t.prototype.initContainer=function(){var e=this.get("container");(0,E.HD)(e)&&(e=document.getElementById(e),this.set("container",e))},t.prototype.initDom=function(){var e=this.createDom();this.set("el",e),this.get("container").appendChild(e),this.setDOMSize(this.get("width"),this.get("height"))},t.prototype.initEvents=function(){var e=new Le({canvas:this});e.init(),this.set("eventController",e)},t.prototype.initTimeline=function(){var e=new Ae(this);this.set("timeline",e)},t.prototype.setDOMSize=function(e,t){var n=this.get("el");ne&&(n.style.width=e+"px",n.style.height=t+"px")},t.prototype.changeSize=function(e,t){this.setDOMSize(e,t),this.set("width",e),this.set("height",t),this.onCanvasChange("changeSize")},t.prototype.getRenderer=function(){return this.get("renderer")},t.prototype.getCursor=function(){return this.get("cursor")},t.prototype.setCursor=function(e){this.set("cursor",e);var t=this.get("el");ne&&t&&(t.style.cursor=e)},t.prototype.getPointByEvent=function(e){if(this.get("supportCSSTransform")){if(je&&!(0,E.UM)(e.layerX)&&e.layerX!==e.offsetX)return{x:e.layerX,y:e.layerY};if(!(0,E.UM)(e.offsetX))return{x:e.offsetX,y:e.offsetY}}var t=this.getClientByEvent(e),n=t.x,r=t.y;return this.getPointByClient(n,r)},t.prototype.getClientByEvent=function(e){var t=e;return e.touches&&(t="touchend"===e.type?e.changedTouches[0]:e.touches[0]),{x:t.clientX,y:t.clientY}},t.prototype.getPointByClient=function(e,t){var n=this.get("el").getBoundingClientRect();return{x:e-n.left,y:t-n.top}},t.prototype.getClientByPoint=function(e,t){var n=this.get("el").getBoundingClientRect();return{x:e+n.left,y:t+n.top}},t.prototype.draw=function(){},t.prototype.removeDom=function(){var e=this.get("el");e.parentNode.removeChild(e)},t.prototype.clearEvents=function(){this.get("eventController").destroy()},t.prototype.isCanvas=function(){return!0},t.prototype.getParent=function(){return null},t.prototype.destroy=function(){var t=this.get("timeline");this.get("destroyed")||(this.clear(),t&&t.stop(),this.clearEvents(),this.removeDom(),e.prototype.destroy.call(this))}}(Ee),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}(0,S.ZT)(t,e),t.prototype.isGroup=function(){return!0},t.prototype.isEntityGroup=function(){return!1},t.prototype.clone=function(){for(var t=e.prototype.clone.call(this),n=this.getChildren(),r=0;r=e&&n.minY<=t&&n.maxY>=t},t.prototype.afterAttrsChange=function(t){e.prototype.afterAttrsChange.call(this,t),this.clearCacheBBox()},t.prototype.getBBox=function(){var e=this.cfg.bbox;return e||(e=this.calculateBBox(),this.set("bbox",e)),e},t.prototype.getCanvasBBox=function(){var e=this.cfg.canvasBBox;return e||(e=this.calculateCanvasBBox(),this.set("canvasBBox",e)),e},t.prototype.applyMatrix=function(t){e.prototype.applyMatrix.call(this,t),this.set("canvasBBox",null)},t.prototype.calculateCanvasBBox=function(){var e=this.getBBox(),t=this.getTotalMatrix(),n=e.minX,r=e.minY,o=e.maxX,i=e.maxY;if(t){var a=ue(t,[e.minX,e.minY]),l=ue(t,[e.maxX,e.minY]),s=ue(t,[e.minX,e.maxY]),c=ue(t,[e.maxX,e.maxY]);n=Math.min(a[0],l[0],s[0],c[0]),o=Math.max(a[0],l[0],s[0],c[0]),r=Math.min(a[1],l[1],s[1],c[1]),i=Math.max(a[1],l[1],s[1],c[1])}var u=this.attrs;if(u.shadowColor){var d=u.shadowBlur,f=void 0===d?0:d,p=u.shadowOffsetX,h=void 0===p?0:p,g=u.shadowOffsetY,m=void 0===g?0:g,v=n-f+h,y=o+f+h,b=r-f+m,x=i+f+m;n=Math.min(n,v),o=Math.max(o,y),r=Math.min(r,b),i=Math.max(i,x)}return{x:n,y:r,minX:n,minY:r,maxX:o,maxY:i,width:o-n,height:i-r}},t.prototype.clearCacheBBox=function(){this.set("bbox",null),this.set("canvasBBox",null)},t.prototype.isClipShape=function(){return this.get("isClipShape")},t.prototype.isInShape=function(e,t){return!1},t.prototype.isOnlyHitBox=function(){return!1},t.prototype.isHit=function(e,t){var n=this.get("startArrowShape"),r=this.get("endArrowShape"),o=[e,t,1],i=(o=this.invertFromMatrix(o))[0],a=o[1],l=this._isInBBox(i,a);if(this.isOnlyHitBox())return l;if(l&&!this.isClipped(i,a)){if(this.isInShape(i,a))return!0;if(n&&n.isHit(i,a))return!0;if(r&&r.isHit(i,a))return!0}return!1}}(ve);var Fe=new Map;function Be(e,t){Fe.set(e,t)}function ze(e){var t=e.attr();return{x:t.x,y:t.y,width:t.width,height:t.height}}function He(e){var t=e.attr(),n=t.x,r=t.y,o=t.r;return{x:n-o,y:r-o,width:2*o,height:2*o}}var Ue=n(3267);function We(e,t){return e&&t?{minX:Math.min(e.minX,t.minX),minY:Math.min(e.minY,t.minY),maxX:Math.max(e.maxX,t.maxX),maxY:Math.max(e.maxY,t.maxY)}:e||t}function Ve(e,t){var n=e.get("startArrowShape"),r=e.get("endArrowShape");return n&&(t=We(t,n.getCanvasBBox())),r&&(t=We(t,r.getCanvasBBox())),t}var Xe=null;var qe=n(1975);function Ge(e,t){var n=e.prePoint,r=e.currentPoint,o=e.nextPoint,i=Math.pow(r[0]-n[0],2)+Math.pow(r[1]-n[1],2),a=Math.pow(r[0]-o[0],2)+Math.pow(r[1]-o[1],2),l=Math.pow(n[0]-o[0],2)+Math.pow(n[1]-o[1],2),s=Math.acos((i+a-l)/(2*Math.sqrt(i)*Math.sqrt(a)));if(!s||0===Math.sin(s)||(0,E.vQ)(s,0))return{xExtra:0,yExtra:0};var c=Math.abs(Math.atan2(o[1]-r[1],o[0]-r[0])),u=Math.abs(Math.atan2(o[0]-r[0],o[1]-r[1]));return c=c>Math.PI/2?Math.PI-c:c,u=u>Math.PI/2?Math.PI-u:u,{xExtra:Math.cos(s/2-c)*(t/2*(1/Math.sin(s/2)))-t/2||0,yExtra:Math.cos(u-s/2)*(t/2*(1/Math.sin(s/2)))-t/2||0}}Be("rect",ze),Be("image",ze),Be("circle",He),Be("marker",He),Be("polyline",(function(e){for(var t=e.attr().points,n=[],r=[],o=0;o1){var o=function(e,t){return t?t-e:.14*e}(t,n);return t*r+o*(r-1)}return t}(o,i,a),p={x:n,y:r-f};u&&("end"===u||"right"===u?p.x-=c:"center"===u&&(p.x-=c/2)),d&&("top"===d?p.y+=f:"middle"===d&&(p.y+=f/2)),s={x:p.x,y:p.y,width:c,height:f}}else s={x:n,y:r,width:0,height:0};return s})),Be("path",(function(e){var t=e.attr(),n=t.path,r=t.stroke?t.lineWidth:0,o=function(e,t){for(var n=[],r=[],o=[],i=0;i=0},e.prototype.getAdjustRange=function(e,t,n){var r,o,i=this.yField,a=n.indexOf(t),l=n.length;return!i&&this.isAdjust("y")?(r=0,o=1):l>1?(r=n[0===a?0:a-1],o=n[a===l-1?l-1:a+1],0!==a?r+=(t-r)/2:r-=(o-t)/2,a!==l-1?o-=(o-t)/2:o+=(t-n[l-2])/2):(r=0===t?0:t-.5,o=0===t?1:t+.5),{pre:r,next:o}},e.prototype.adjustData=function(e,t){var n=this,r=this.getDimValues(t);E.S6(e,(function(e,t){E.S6(r,(function(r,o){n.adjustDim(o,r,e,t)}))}))},e.prototype.groupData=function(e,t){return E.S6(e,(function(e){void 0===e[t]&&(e[t]=0)})),E.vM(e,t)},e.prototype.adjustDim=function(e,t,n,r){},e.prototype.getDimValues=function(e){var t=this.xField,n=this.yField,r=E.f0({},this.dimValuesMap),o=[];return t&&this.isAdjust("x")&&o.push(t),n&&this.isAdjust("y")&&o.push(n),o.forEach((function(t){r&&r[t]||(r[t]=E.I(e,t).sort((function(e,t){return e-t})))})),!n&&this.isAdjust("y")&&(r.y=[0,1]),r},e}();const Ke=Ye;var Ze={},Je=function(e){return Ze[e.toLowerCase()]},Qe=function(e,t){if(Je(e))throw new Error("Adjust type '"+e+"' existed.");Ze[e.toLowerCase()]=t},et=function(e,t){return et=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},et(e,t)};function tt(e,t){function n(){this.constructor=e}et(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var nt=function(){return nt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0)r=c+this.getIntervalOnlyOffset(n,t);else if(!E.UM(s)&&E.UM(l)&&s>=0)r=c+this.getDodgeOnlyOffset(n,t);else if(!E.UM(l)&&!E.UM(s)&&l>=0&&s>=0)r=c+this.getIntervalAndDodgeOffset(n,t);else{var f=d*i/n,p=a*f;r=(c+u)/2+(.5*(d-n*f-(n-1)*p)+((t+1)*f+t*p)-.5*f-.5*d)}return r},t.prototype.getIntervalOnlyOffset=function(e,t){var n=this,r=n.defaultSize,o=n.intervalPadding,i=n.xDimensionLegenth,a=n.groupNum,l=n.dodgeRatio,s=n.maxColumnWidth,c=n.minColumnWidth,u=n.columnWidthRatio,d=o/i,f=(1-(a-1)*d)/a*l/(e-1),p=((1-d*(a-1))/a-f*(e-1))/e;if(p=E.UM(u)?p:1/a/e*u,!E.UM(s)){var h=s/i;p=Math.min(p,h)}if(!E.UM(c)){var g=c/i;p=Math.max(p,g)}return((.5+t)*(p=r?r/i:p)+t*(f=((1-(a-1)*d)/a-e*p)/(e-1))+.5*d)*a-d/2},t.prototype.getDodgeOnlyOffset=function(e,t){var n=this,r=n.defaultSize,o=n.dodgePadding,i=n.xDimensionLegenth,a=n.groupNum,l=n.marginRatio,s=n.maxColumnWidth,c=n.minColumnWidth,u=n.columnWidthRatio,d=o/i,f=1*l/(a-1),p=((1-f*(a-1))/a-d*(e-1))/e;if(p=u?1/a/e*u:p,!E.UM(s)){var h=s/i;p=Math.min(p,h)}if(!E.UM(c)){var g=c/i;p=Math.max(p,g)}return((.5+t)*(p=r?r/i:p)+t*d+.5*(f=(1-(p*e+d*(e-1))*a)/(a-1)))*a-f/2},t.prototype.getIntervalAndDodgeOffset=function(e,t){var n=this,r=n.intervalPadding,o=n.dodgePadding,i=n.xDimensionLegenth,a=n.groupNum,l=r/i,s=o/i;return((.5+t)*(((1-l*(a-1))/a-s*(e-1))/e)+t*s+.5*l)*a-l/2},t.prototype.getDistribution=function(e){var t=this.adjustDataArray,n=this.cacheMap,r=n[e];return r||(r={},E.S6(t,(function(t,n){var o=E.I(t,e);o.length||o.push(0),E.S6(o,(function(e){r[e]||(r[e]=[]),r[e].push(n)}))})),n[e]=r),r},t}(Ke);const ot=rt;var it=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return tt(t,e),t.prototype.process=function(e){var t=E.d9(e),n=E.xH(t);return this.adjustData(t,n),t},t.prototype.adjustDim=function(e,t,n){var r=this,o=this.groupData(n,e);return E.S6(o,(function(n,o){return r.adjustGroup(n,e,parseFloat(o),t)}))},t.prototype.getAdjustOffset=function(e){var t,n=e.pre,r=e.next,o=.05*(r-n);return(r-o-(t=n+o))*Math.random()+t},t.prototype.adjustGroup=function(e,t,n,r){var o=this,i=this.getAdjustRange(t,n,r);return E.S6(e,(function(e){e[t]=o.getAdjustOffset(i)})),e},t}(Ke);const at=it;var lt=E.Ct,st=function(e){function t(t){var n=e.call(this,t)||this,r=t.adjustNames,o=void 0===r?["y"]:r,i=t.height,a=void 0===i?NaN:i,l=t.size,s=void 0===l?10:l,c=t.reverseOrder,u=void 0!==c&&c;return n.adjustNames=o,n.height=a,n.size=s,n.reverseOrder=u,n}return tt(t,e),t.prototype.process=function(e){var t=this.yField,n=this.reverseOrder,r=t?this.processStack(e):this.processOneDimStack(e);return n?this.reverse(r):r},t.prototype.reverse=function(e){return e.slice(0).reverse()},t.prototype.processStack=function(e){var t=this,n=t.xField,r=t.yField,o=t.reverseOrder?this.reverse(e):e,i=new lt,a=new lt;return o.map((function(e){return e.map((function(e){var t,o=E.U2(e,n,0),l=E.U2(e,[r]),s=o.toString();if(l=E.kJ(l)?l[1]:l,!E.UM(l)){var c=l>=0?i:a;c.has(s)||c.set(s,0);var u=c.get(s),d=l+u;return c.set(s,d),nt(nt({},e),((t={})[r]=[u,d],t))}return e}))}))},t.prototype.processOneDimStack=function(e){var t=this,n=this,r=n.xField,o=n.height,i=n.reverseOrder?this.reverse(e):e,a=new lt;return i.map((function(e){return e.map((function(e){var n,i=t.size,l=e[r],s=2*i/o;a.has(l)||a.set(l,s/2);var c=a.get(l);return a.set(l,c+s),nt(nt({},e),((n={}).y=c,n))}))}))},t}(Ke);const ct=st;var ut=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return tt(t,e),t.prototype.process=function(e){var t=E.xH(e),n=this.xField,r=this.yField,o=this.getXValuesMaxMap(t),i=Math.max.apply(Math,Object.keys(o).map((function(e){return o[e]})));return E.UI(e,(function(e){return E.UI(e,(function(e){var t,a,l=e[r],s=e[n];if(E.kJ(l)){var c=(i-o[s])/2;return nt(nt({},e),((t={})[r]=E.UI(l,(function(e){return c+e})),t))}var u=(i-l)/2;return nt(nt({},e),((a={})[r]=[u,l+u],a))}))}))},t.prototype.getXValuesMaxMap=function(e){var t=this,n=this.xField,r=this.yField,o=E.vM(e,(function(e){return e[n]}));return E.Q8(o,(function(e){return t.getDimMaxValue(e,r)}))},t.prototype.getDimMaxValue=function(e,t){var n=E.UI(e,(function(e){return E.U2(e,t,[])})),r=E.xH(n);return Math.max.apply(Math,r)},t}(Ke);const dt=ut;Qe("Dodge",ot),Qe("Jitter",at),Qe("Stack",ct),Qe("Symmetric",dt);var ft=function(e,t){return(0,E.HD)(t)?t:e.invert(e.scale(t))},pt=function(){function e(e){this.names=[],this.scales=[],this.linear=!1,this.values=[],this.callback=function(){return[]},this._parseCfg(e)}return e.prototype.mapping=function(){for(var e=this,t=[],n=0;n1?1:Number(t),r=e.length-1,o=Math.floor(r*n),i=r*n-o,a=e[o],l=o===r?a:e[o+1];return xt([bt(a,l,i,0),bt(a,l,i,1),bt(a,l,i,2)])}(n,e)}},toRGB:(0,E.HP)(Ct),toCSSGradient:function(e){if(/^[r,R,L,l]{1}[\s]*\(/.test(e)){var t,n=void 0;if("l"===e[0]){var r=+(o=mt.exec(e))[1]+90;n=o[2],t="linear-gradient("+r+"deg, "}else if("r"===e[0]){var o;t="radial-gradient(",n=(o=vt.exec(e))[4]}var i=n.match(yt);return(0,E.S6)(i,(function(e,n){var r=e.split(":");t+=r[1]+" "+100*r[0]+"%",n!==i.length-1&&(t+=", ")})),t+=")"}return e}};var Ot=function(e){function t(t){var n=e.call(this,t)||this;return n.type="color",n.names=["color"],(0,E.HD)(n.values)&&(n.linear=!0),n.gradient=kt.gradient(n.values),n}return(0,S.ZT)(t,e),t.prototype.getLinearValue=function(e){return this.gradient(e)},t}(ht);const Mt=Ot,It=function(e){function t(t){var n=e.call(this,t)||this;return n.type="opacity",n.names=["opacity"],n}return(0,S.ZT)(t,e),t}(ht);var $t=function(e){function t(t){var n=e.call(this,t)||this;return n.names=["x","y"],n.type="position",n}return(0,S.ZT)(t,e),t.prototype.mapping=function(e,t){var n=this.scales,r=n[0],o=n[1];return(0,E.UM)(e)||(0,E.UM)(t)?[]:[(0,E.kJ)(e)?e.map((function(e){return r.scale(e)})):r.scale(e),(0,E.kJ)(t)?t.map((function(e){return o.scale(e)})):o.scale(t)]},t}(ht);const _t=$t;var Pt=function(e){function t(t){var n=e.call(this,t)||this;return n.type="shape",n.names=["shape"],n}return(0,S.ZT)(t,e),t.prototype.getLinearValue=function(e){var t=Math.round((this.values.length-1)*e);return this.values[t]},t}(ht);const At=Pt,Nt=function(e){function t(t){var n=e.call(this,t)||this;return n.type="size",n.names=["size"],n}return(0,S.ZT)(t,e),t}(ht);var Tt={};function Rt(e,t){Tt[e]=t}var Lt=function(){function e(e){this.type="base",this.isCategory=!1,this.isLinear=!1,this.isContinuous=!1,this.isIdentity=!1,this.values=[],this.range=[0,1],this.ticks=[],this.__cfg__=e,this.initCfg(),this.init()}return e.prototype.translate=function(e){return e},e.prototype.change=function(e){(0,E.f0)(this.__cfg__,e),this.init()},e.prototype.clone=function(){return this.constructor(this.__cfg__)},e.prototype.getTicks=function(){var e=this;return(0,E.UI)(this.ticks,(function(t,n){return(0,E.Kn)(t)?t:{text:e.getText(t,n),tickValue:t,value:e.scale(t)}}))},e.prototype.getText=function(e,t){var n=this.formatter,r=n?n(e,t):e;return(0,E.UM)(r)||!(0,E.mf)(r.toString)?"":r.toString()},e.prototype.getConfig=function(e){return this.__cfg__[e]},e.prototype.init=function(){(0,E.f0)(this,this.__cfg__),this.setDomain(),(0,E.xb)(this.getConfig("ticks"))&&(this.ticks=this.calculateTicks())},e.prototype.initCfg=function(){},e.prototype.setDomain=function(){},e.prototype.calculateTicks=function(){var e=this.tickMethod,t=[];if((0,E.HD)(e)){var n=Tt[e];if(!n)throw new Error("There is no method to to calculate ticks!");t=n(this)}else(0,E.mf)(e)&&(t=e(this));return t},e.prototype.rangeMin=function(){return this.range[0]},e.prototype.rangeMax=function(){return this.range[1]},e.prototype.calcPercent=function(e,t,n){return(0,E.hj)(e)?(e-t)/(n-t):NaN},e.prototype.calcValue=function(e,t,n){return t+e*(n-t)},e}();const Dt=Lt;var jt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="cat",t.isCategory=!0,t}return(0,S.ZT)(t,e),t.prototype.buildIndexMap=function(){if(!this.translateIndexMap){this.translateIndexMap=new Map;for(var e=0;ethis.max?NaN:this.values[r]},t.prototype.getText=function(t){for(var n=[],r=1;r1?e-1:e}this.translateIndexMap&&(this.translateIndexMap=void 0)},t}(Dt);const Ft=jt;var Bt=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,zt="\\d\\d?",Ht="\\d\\d",Ut="[^\\s]+",Wt=/\[([^]*?)\]/gm;function Vt(e,t){for(var n=[],r=0,o=e.length;r-1?o:null}};function qt(e){for(var t=[],n=1;n3?0:(e-e%10!=10?1:0)*e%10]}},Jt=qt({},Zt),Qt=function(e){return Jt=qt(Jt,e)},en=function(e){return e.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},tn=function(e,t){for(void 0===t&&(t=2),e=String(e);e.length0?"-":"+")+tn(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4)},Z:function(e){var t=e.getTimezoneOffset();return(t>0?"-":"+")+tn(Math.floor(Math.abs(t)/60),2)+":"+tn(Math.abs(t)%60,2)}},rn=function(e){return+e-1},on=[null,zt],an=[null,Ut],ln=["isPm",Ut,function(e,t){var n=e.toLowerCase();return n===t.amPm[0]?0:n===t.amPm[1]?1:null}],sn=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(e){var t=(e+"").match(/([+-]|\d\d)/gi);if(t){var n=60*+t[1]+parseInt(t[2],10);return"+"===t[0]?n:-n}return 0}],cn={D:["day",zt],DD:["day",Ht],Do:["day",zt+Ut,function(e){return parseInt(e,10)}],M:["month",zt,rn],MM:["month",Ht,rn],YY:["year",Ht,function(e){var t=+(""+(new Date).getFullYear()).substr(0,2);return+(""+(+e>68?t-1:t)+e)}],h:["hour",zt,void 0,"isPm"],hh:["hour",Ht,void 0,"isPm"],H:["hour",zt],HH:["hour",Ht],m:["minute",zt],mm:["minute",Ht],s:["second",zt],ss:["second",Ht],YYYY:["year","\\d{4}"],S:["millisecond","\\d",function(e){return 100*+e}],SS:["millisecond",Ht,function(e){return 10*+e}],SSS:["millisecond","\\d{3}"],d:on,dd:on,ddd:an,dddd:an,MMM:["month",Ut,Xt("monthNamesShort")],MMMM:["month",Ut,Xt("monthNames")],a:ln,A:ln,ZZ:sn,Z:sn},un={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},dn=function(e){return qt(un,e)},fn=function(e,t,n){if(void 0===t&&(t=un.default),void 0===n&&(n={}),"number"==typeof e&&(e=new Date(e)),"[object Date]"!==Object.prototype.toString.call(e)||isNaN(e.getTime()))throw new Error("Invalid Date pass to format");t=un[t]||t;var r=[];t=t.replace(Wt,(function(e,t){return r.push(t),"@@@"}));var o=qt(qt({},Jt),n);return(t=t.replace(Bt,(function(t){return nn[t](e,o)}))).replace(/@@@/g,(function(){return r.shift()}))};function pn(e,t,n){if(void 0===n&&(n={}),"string"!=typeof t)throw new Error("Invalid format in fecha parse");if(t=un[t]||t,e.length>1e3)return null;var r={year:(new Date).getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},o=[],i=[],a=t.replace(Wt,(function(e,t){return i.push(en(t)),"@@@"})),l={},s={};a=en(a).replace(Bt,(function(e){var t=cn[e],n=t[0],r=t[1],i=t[3];if(l[n])throw new Error("Invalid format. "+n+" specified twice in format");return l[n]=!0,i&&(s[i]=!0),o.push(t),"("+r+")"})),Object.keys(s).forEach((function(e){if(!l[e])throw new Error("Invalid format. "+e+" is required in specified format")})),a=a.replace(/@@@/g,(function(){return i.shift()}));var c=e.match(new RegExp(a,"i"));if(!c)return null;for(var u,d=qt(qt({},Jt),n),f=1;f11||r.month<0||r.day>31||r.day<1||r.hour>23||r.hour<0||r.minute>59||r.minute<0||r.second>59||r.second<0)return null;return u}const hn={format:fn,parse:pn,defaultI18n:Zt,setGlobalDateI18n:Qt,setGlobalDateMasks:dn};var gn="format";function mn(e,t){return(r[gn]||hn[gn])(e,t)}function vn(e){return(0,E.HD)(e)&&(e=e.indexOf("T")>0?new Date(e).getTime():new Date(e.replace(/-/gi,"/")).getTime()),(0,E.J_)(e)&&(e=e.getTime()),e}var yn=1e3,bn=6e4,xn=36e5,wn=24*xn,Sn=31*wn,En=365*wn,Cn=[["HH:mm:ss",yn],["HH:mm:ss",1e4],["HH:mm:ss",3e4],["HH:mm",bn],["HH:mm",6e5],["HH:mm",18e5],["HH",xn],["HH",6*xn],["HH",12*xn],["YYYY-MM-DD",wn],["YYYY-MM-DD",4*wn],["YYYY-WW",7*wn],["YYYY-MM",Sn],["YYYY-MM",4*Sn],["YYYY-MM",6*Sn],["YYYY",380*wn]];var kn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="timeCat",t}return(0,S.ZT)(t,e),t.prototype.translate=function(e){e=vn(e);var t=this.values.indexOf(e);return-1===t&&(t=(0,E.hj)(e)&&e-1){var r=this.values[n],o=this.formatter;return o?o(r,t):mn(r,this.mask)}return e},t.prototype.initCfg=function(){this.tickMethod="time-cat",this.mask="YYYY-MM-DD",this.tickCount=7},t.prototype.setDomain=function(){var t=this.values;(0,E.S6)(t,(function(e,n){t[n]=vn(e)})),t.sort((function(e,t){return e-t})),e.prototype.setDomain.call(this)},t}(Ft);const On=kn;var Mn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isContinuous=!0,t}return(0,S.ZT)(t,e),t.prototype.scale=function(e){if((0,E.UM)(e))return NaN;var t=this.rangeMin(),n=this.rangeMax();return this.max===this.min?t:t+this.getScalePercent(e)*(n-t)},t.prototype.init=function(){e.prototype.init.call(this);var t=this.ticks,n=(0,E.YM)(t),r=(0,E.Z$)(t);nthis.max&&(this.max=r),(0,E.UM)(this.minLimit)||(this.min=n),(0,E.UM)(this.maxLimit)||(this.max=r)},t.prototype.setDomain=function(){var e=(0,E.rx)(this.values),t=e.min,n=e.max;(0,E.UM)(this.min)&&(this.min=t),(0,E.UM)(this.max)&&(this.max=n),this.min>this.max&&(this.min=t,this.max=n)},t.prototype.calculateTicks=function(){var t=this,n=e.prototype.calculateTicks.call(this);return this.nice||(n=(0,E.hX)(n,(function(e){return e>=t.min&&e<=t.max}))),n},t.prototype.getScalePercent=function(e){var t=this.max,n=this.min;return(e-n)/(t-n)},t.prototype.getInvertPercent=function(e){return(e-this.rangeMin())/(this.rangeMax()-this.rangeMin())},t}(Dt);const In=Mn;var $n=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="linear",t.isLinear=!0,t}return(0,S.ZT)(t,e),t.prototype.invert=function(e){var t=this.getInvertPercent(e);return this.min+t*(this.max-this.min)},t.prototype.initCfg=function(){this.tickMethod="wilkinson-extended",this.nice=!1},t}(In);const _n=$n;function Pn(e,t){var n=Math.E;return t>=0?Math.pow(n,Math.log(t)/e):-1*Math.pow(n,Math.log(-t)/e)}function An(e,t){return 1===e?1:Math.log(t)/Math.log(e)}function Nn(e,t,n){(0,E.UM)(n)&&(n=Math.max.apply(null,e));var r=n;return(0,E.S6)(e,(function(e){e>0&&e1&&(r=1),r}var Tn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="log",t}return(0,S.ZT)(t,e),t.prototype.invert=function(e){var t,n=this.base,r=An(n,this.max),o=this.rangeMin(),i=this.rangeMax()-o,a=this.positiveMin;if(a){if(0===e)return 0;var l=1/(r-(t=An(n,a/n)))*i;if(e=0?1:-1;return Math.pow(i,n)*a},t.prototype.initCfg=function(){this.tickMethod="pow",this.exponent=2,this.tickCount=5,this.nice=!0},t.prototype.getScalePercent=function(e){var t=this.max,n=this.min;if(t===n)return 0;var r=this.exponent;return(Pn(r,e)-Pn(r,n))/(Pn(r,t)-Pn(r,n))},t}(In);const Dn=Ln;var jn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="time",t}return(0,S.ZT)(t,e),t.prototype.getText=function(e,t){var n=this.translate(e),r=this.formatter;return r?r(n,t):mn(n,this.mask)},t.prototype.scale=function(t){var n=t;return((0,E.HD)(n)||(0,E.J_)(n))&&(n=this.translate(n)),e.prototype.scale.call(this,n)},t.prototype.translate=function(e){return vn(e)},t.prototype.initCfg=function(){this.tickMethod="time-pretty",this.mask="YYYY-MM-DD",this.tickCount=7,this.nice=!1},t.prototype.setDomain=function(){var e=this.values,t=this.getConfig("min"),n=this.getConfig("max");if((0,E.UM)(t)&&(0,E.hj)(t)||(this.min=this.translate(this.min)),(0,E.UM)(n)&&(0,E.hj)(n)||(this.max=this.translate(this.max)),e&&e.length){var r=[],o=1/0,i=o,a=0;(0,E.S6)(e,(function(e){var t=vn(e);if(isNaN(t))throw new TypeError("Invalid Time: "+e+" in time scale!");o>t?(i=o,o=t):i>t&&(i=t),a1&&(this.minTickInterval=i-o),(0,E.UM)(t)&&(this.min=o),(0,E.UM)(n)&&(this.max=a)}},t}(_n);const Fn=jn;var Bn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="quantize",t}return(0,S.ZT)(t,e),t.prototype.invert=function(e){var t=this.ticks,n=t.length,r=this.getInvertPercent(e),o=Math.floor(r*(n-1));if(o>=n-1)return(0,E.Z$)(t);if(o<0)return(0,E.YM)(t);var i=t[o],a=o/(n-1);return i+(r-a)/((o+1)/(n-1)-a)*(t[o+1]-i)},t.prototype.initCfg=function(){this.tickMethod="r-pretty",this.tickCount=5,this.nice=!0},t.prototype.calculateTicks=function(){var t=e.prototype.calculateTicks.call(this);return this.nice||((0,E.Z$)(t)!==this.max&&t.push(this.max),(0,E.YM)(t)!==this.min&&t.unshift(this.min)),t},t.prototype.getScalePercent=function(e){var t=this.ticks;if(e<(0,E.YM)(t))return 0;if(e>(0,E.Z$)(t))return 1;var n=0;return(0,E.S6)(t,(function(t,r){if(!(e>=t))return!1;n=r})),n/(t.length-1)},t}(In);const zn=Bn,Hn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="quantile",t}return(0,S.ZT)(t,e),t.prototype.initCfg=function(){this.tickMethod="quantile",this.tickCount=5,this.nice=!0},t}(zn);var Un={};function Wn(e){return Un[e]}function Vn(e,t){if(Wn(e))throw new Error("type '"+e+"' existed.");Un[e]=t}var Xn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="identity",t.isIdentity=!0,t}return(0,S.ZT)(t,e),t.prototype.calculateTicks=function(){return this.values},t.prototype.scale=function(e){return this.values[0]!==e&&(0,E.hj)(e)?e:this.range[0]},t.prototype.invert=function(e){var t=this.range;return et[1]?NaN:this.values[0]},t}(Dt);const qn=Xn;function Gn(e){var t=e.values,n=e.tickInterval,r=e.tickCount,o=e.showLast;if((0,E.hj)(n)){var i=(0,E.hX)(t,(function(e,t){return t%n==0})),a=(0,E.Z$)(t);return o&&(0,E.Z$)(i)!==a&&i.push(a),i}var l=t.length,s=e.min,c=e.max;if((0,E.UM)(s)&&(s=0),(0,E.UM)(c)&&(c=t.length-1),!(0,E.hj)(r)||r>=l)return t.slice(s,c+1);if(r<=0||c<=0)return[];for(var u=1===r?l:Math.floor(l/(r-1)),d=[],f=s,p=0;p=c);p++)f=Math.min(s+p*u,c),p===r-1&&o?d.push(t[c]):d.push(t[f]);return d}var Yn=Math.sqrt(50),Kn=Math.sqrt(10),Zn=Math.sqrt(2),Jn=function(){function e(){this._domain=[0,1]}return e.prototype.domain=function(e){return e?(this._domain=Array.from(e,Number),this):this._domain.slice()},e.prototype.nice=function(e){var t,n;void 0===e&&(e=5);var r,o=this._domain.slice(),i=0,a=this._domain.length-1,l=this._domain[i],s=this._domain[a];return s0?r=Qn(l=Math.floor(l/r)*r,s=Math.ceil(s/r)*r,e):r<0&&(r=Qn(l=Math.ceil(l*r)/r,s=Math.floor(s*r)/r,e)),r>0?(o[i]=Math.floor(l/r)*r,o[a]=Math.ceil(s/r)*r,this.domain(o)):r<0&&(o[i]=Math.ceil(l*r)/r,o[a]=Math.floor(s*r)/r,this.domain(o)),this},e.prototype.ticks=function(e){return void 0===e&&(e=5),function(e,t,n){var r,o,i,a,l=-1;if(n=+n,(e=+e)==(t=+t)&&n>0)return[e];if((r=t0)for(e=Math.ceil(e/a),t=Math.floor(t/a),i=new Array(o=Math.ceil(t-e+1));++l=0?(i>=Yn?10:i>=Kn?5:i>=Zn?2:1)*Math.pow(10,o):-Math.pow(10,-o)/(i>=Yn?10:i>=Kn?5:i>=Zn?2:1)}function er(e,t,n){return("ceil"===n?Math.ceil(e/t):"floor"===n?Math.floor(e/t):Math.round(e/t))*t}function tr(e,t,n){var r=er(e,n,"floor"),o=er(t,n,"ceil");r=(0,E.ri)(r,n),o=(0,E.ri)(o,n);for(var i=[],a=Math.max((o-r)/(Math.pow(2,12)-1),n),l=r;l<=o;l+=a){var s=(0,E.ri)(l,a);i.push(s)}return{min:r,max:o,ticks:i}}function nr(e,t,n){var r,o=e.minLimit,i=e.maxLimit,a=e.min,l=e.max,s=e.tickCount,c=void 0===s?5:s,u=(0,E.UM)(o)?(0,E.UM)(t)?a:t:o,d=(0,E.UM)(i)?(0,E.UM)(n)?l:n:i;if(u>d&&(d=(r=[u,d])[0],u=r[1]),c<=2)return[u,d];for(var f=(d-u)/(c-1),p=[],h=0;h=0&&(s=1),1-l/(a-1)-n+s}function lr(e,t,n){var r=(0,E.dp)(t);return 1-(0,E.cq)(t,e)/(r-1)-n+1}function sr(e,t,n,r,o,i){var a=(e-1)/(i-o),l=(t-1)/(Math.max(i,r)-Math.min(n,o));return 2-Math.max(a/l,l/a)}function cr(e,t){return e>=t?2-(e-1)/(t-1):1}function ur(e,t,n,r){var o=t-e;return 1-.5*(Math.pow(t-r,2)+Math.pow(e-n,2))/Math.pow(.1*o,2)}function dr(e,t,n){var r=t-e;if(n>r){var o=(n-r)/2;return 1-Math.pow(o,2)/Math.pow(.1*r,2)}return 1}function fr(e,t,n){if(void 0===n&&(n=5),e===t)return{max:t,min:e,ticks:[e]};var r=n<0?0:Math.round(n);if(0===r)return{max:t,min:e,ticks:[]};var o=(t-e)/r,i=Math.pow(10,Math.floor(Math.log10(o))),a=i;2*i-o<1.5*(o-a)&&5*i-o<2.75*(o-(a=2*i))&&10*i-o<1.5*(o-(a=5*i))&&(a=10*i);for(var l=Math.ceil(t/a),s=Math.floor(e/a),c=Math.max(l*a,t),u=Math.min(s*a,e),d=Math.floor((c-u)/a)+1,f=new Array(d),p=0;p1e148){var l=(t-e)/(w=n||5);return{min:e,max:t,ticks:Array(w).fill(null).map((function(t,n){return rr(e+l*n)}))}}for(var s={score:-2,lmin:0,lmax:0,lstep:0},c=1;c<1/0;){for(var u=0;us.score&&(!r||C<=e&&k>=t)&&(s.lmin=C,s.lmax=k,s.lstep=O,s.score=_)}m+=1}p+=1}}c+=1}var P=rr(s.lmax),A=rr(s.lmin),N=rr(s.lstep),T=Math.floor(function(e){return Math.round(1e12*e)/1e12}((P-A)/N))+1,R=new Array(T);for(R[0]=rr(A),u=1;u>>1;r(e[l])>t?a=l:i=l+1}return i})(Cn,(t-e)/n)-1,i=Cn[o];return o<0?i=Cn[0]:o>=Cn.length&&(i=(0,E.Z$)(Cn)),i}(t,n,i)[1])/i;a>1&&(o*=Math.ceil(a)),r&&oEn)for(var s=hr(n),c=Math.ceil(i/En),u=l;u<=s+c;u+=c)a.push(gr(u));else if(i>Sn){var d=Math.ceil(i/Sn),f=mr(t),p=function(e,t){var n=hr(e),r=hr(t),o=mr(e);return 12*(r-n)+(mr(t)-o)%12}(t,n);for(u=0;u<=p+d;u+=d)a.push(vr(l,u+f))}else if(i>wn){var h=(b=new Date(t)).getFullYear(),g=b.getMonth(),m=b.getDate(),v=Math.ceil(i/wn),y=function(e,t){return Math.ceil((t-e)/wn)}(t,n);for(u=0;uxn){h=(b=new Date(t)).getFullYear(),g=b.getMonth(),v=b.getDate();var b,x=b.getHours(),w=Math.ceil(i/xn),S=function(e,t){return Math.ceil((t-e)/xn)}(t,n);for(u=0;u<=S+w;u+=w)a.push(new Date(h,g,v,x+u).getTime())}else if(i>bn){var E=function(e,t){return Math.ceil((t-e)/6e4)}(t,n),C=Math.ceil(i/bn);for(u=0;u<=E+C;u+=C)a.push(t+u*bn)}else{var k=i;k=512&&console.warn("Notice: current ticks length("+a.length+') >= 512, may cause performance issues, even out of memory. Because of the configure "tickInterval"(in milliseconds, current is '+i+") is too small, increase the value to solve the problem!"),a})),Rt("log",(function(e){var t,n=e.base,r=e.tickCount,o=e.min,i=e.max,a=e.values,l=An(n,i);if(o>0)t=Math.floor(An(n,o));else{var s=Nn(a,n,i);t=Math.floor(An(n,s))}for(var c=l-t,u=Math.ceil(c/r),d=[],f=t;f=0?1:-1;return Math.pow(e,t)*n}))})),Rt("quantile",(function(e){var t=e.tickCount,n=e.values;if(!n||!n.length)return[];for(var r=n.slice().sort((function(e,t){return e-t})),o=[],i=0;i=0&&this.radius<=1&&(n*=this.radius),this.d=Math.floor(n*(1-this.innerRadius)/t),this.a=this.d/(2*Math.PI),this.x={start:this.startAngle,end:this.endAngle},this.y={start:this.innerRadius*n,end:this.innerRadius*n+.99*this.d}},t.prototype.convertPoint=function(e){var t,n=e.x,r=e.y;this.isTransposed&&(n=(t=[r,n])[0],r=t[1]);var o=this.convertDim(n,"x"),i=this.a*o,a=this.convertDim(r,"y");return{x:this.center.x+Math.cos(o)*(i+a),y:this.center.y+Math.sin(o)*(i+a)}},t.prototype.invertPoint=function(e){var t,n=this.d+this.y.start,r=$r.$X([0,0],[e.x,e.y],[this.center.x,this.center.y]),o=se.Dg(r,[1,0],!0),i=o*this.a;$r.kE(r)this.width/r?(t=this.width/r,this.circleCenter={x:this.center.x-(.5-i)*this.width,y:this.center.y-(.5-a)*t*o}):(t=this.height/o,this.circleCenter={x:this.center.x-(.5-i)*t*r,y:this.center.y-(.5-a)*this.height}),this.polarRadius=this.radius,this.radius?this.radius>0&&this.radius<=1?this.polarRadius=t*this.radius:(this.radius<=0||this.radius>t)&&(this.polarRadius=t):this.polarRadius=t,this.x={start:this.startAngle,end:this.endAngle},this.y={start:this.innerRadius*this.polarRadius,end:this.polarRadius}},t.prototype.getRadius=function(){return this.polarRadius},t.prototype.convertPoint=function(e){var t,n=this.getCenter(),r=e.x,o=e.y;return this.isTransposed&&(r=(t=[o,r])[0],o=t[1]),r=this.convertDim(r,"x"),o=this.convertDim(o,"y"),{x:n.x+Math.cos(r)*o,y:n.y+Math.sin(r)*o}},t.prototype.invertPoint=function(e){var t,n=this.getCenter(),r=[e.x-n.x,e.y-n.y],o=this.startAngle,i=this.endAngle;this.isReflect("x")&&(o=(t=[i,o])[0],i=t[1]);var a=[1,0,0,0,1,0,0,0,1];se.zu(a,a,o);var l=[1,0,0];Sr(l,l,a);var s=[l[0],l[1]],c=se.Dg(s,r,i0?d:-d;var f=this.invertDim(u,"y"),p={x:0,y:0};return p.x=this.isTransposed?f:d,p.y=this.isTransposed?d:f,p},t.prototype.getCenter=function(){return this.circleCenter},t.prototype.getOneBox=function(){var e=this.startAngle,t=this.endAngle;if(Math.abs(t-e)>=2*Math.PI)return{minX:-1,maxX:1,minY:-1,maxY:1};for(var n=[0,Math.cos(e),Math.cos(t)],r=[0,Math.sin(e),Math.sin(t)],o=Math.min(e,t);o2&&(n.push([o].concat(a.splice(0,2))),l="l",o="m"===o?"l":"L"),"o"===l&&1===a.length&&n.push([o,a[0]]),"r"===l)n.push([o].concat(a));else for(;a.length>=t[l]&&(n.push([o].concat(a.splice(0,t[l]))),t[l]););return e})),n},Br=function(e,t){if(e.length!==t.length)return!1;var n=!0;return(0,E.S6)(e,(function(e,r){if(e!==t[r])return n=!1,!1})),n};function zr(e,t,n){var r=null,o=n;return t=0;s--)a=i[s].index,"add"===i[s].type?e.splice(a,0,[].concat(e[a])):e.splice(a,1)}var d=o-(r=e.length);if(r0)){e[r]=t[r];break}n=Ur(n,e[r-1],1)}e[r]=["Q"].concat(n.reduce((function(e,t){return e.concat(t)}),[]));break;case"T":e[r]=["T"].concat(n[0]);break;case"C":if(n.length<3){if(!(r>0)){e[r]=t[r];break}n=Ur(n,e[r-1],2)}e[r]=["C"].concat(n.reduce((function(e,t){return e.concat(t)}),[]));break;case"S":if(n.length<2){if(!(r>0)){e[r]=t[r];break}n=Ur(n,e[r-1],1)}e[r]=["S"].concat(n.reduce((function(e,t){return e.concat(t)}),[]));break;default:e[r]=t[r]}return e};const Xr=function(){function e(e,t){this.bubbles=!0,this.target=null,this.currentTarget=null,this.delegateTarget=null,this.delegateObject=null,this.defaultPrevented=!1,this.propagationStopped=!1,this.shape=null,this.fromShape=null,this.toShape=null,this.propagationPath=[],this.type=e,this.name=e,this.originalEvent=t,this.timeStamp=t.timeStamp}return e.prototype.preventDefault=function(){this.defaultPrevented=!0,this.originalEvent.preventDefault&&this.originalEvent.preventDefault()},e.prototype.stopPropagation=function(){this.propagationStopped=!0},e.prototype.toString=function(){return"[Event (type="+this.type+")]"},e.prototype.save=function(){},e.prototype.restore=function(){},e}();function qr(e,t){var n=e.indexOf(t);-1!==n&&e.splice(n,1)}var Gr="undefined"!=typeof window&&void 0!==window.document;function Yr(e,t){if(e.isCanvas())return!0;for(var n=t.getParent(),r=!1;n;){if(n===e){r=!0;break}n=n.getParent()}return r}function Kr(e){return e.cfg.visible&&e.cfg.capture}var Zr=function(e){function t(t){var n=e.call(this)||this;n.destroyed=!1;var r=n.getDefaultCfg();return n.cfg=(0,E.CD)(r,t),n}return(0,S.ZT)(t,e),t.prototype.getDefaultCfg=function(){return{}},t.prototype.get=function(e){return this.cfg[e]},t.prototype.set=function(e,t){this.cfg[e]=t},t.prototype.destroy=function(){this.cfg={destroyed:!0},this.off(),this.destroyed=!0},t}(z.Z);const Jr=Zr;function Qr(e,t){var n=[],r=e[0],o=e[1],i=e[2],a=e[3],l=e[4],s=e[5],c=e[6],u=e[7],d=e[8],f=t[0],p=t[1],h=t[2],g=t[3],m=t[4],v=t[5],y=t[6],b=t[7],x=t[8];return n[0]=f*r+p*a+h*c,n[1]=f*o+p*l+h*u,n[2]=f*i+p*s+h*d,n[3]=g*r+m*a+v*c,n[4]=g*o+m*l+v*u,n[5]=g*i+m*s+v*d,n[6]=y*r+b*a+x*c,n[7]=y*o+b*l+x*u,n[8]=y*i+b*s+x*d,n}function eo(e,t){var n=[],r=t[0],o=t[1];return n[0]=e[0]*r+e[3]*o+e[6],n[1]=e[1]*r+e[4]*o+e[7],n}var to=se.vs,no="matrix",ro=["zIndex","capture","visible","type"],oo=["repeat"];function io(e,t){var n={},r=t.attrs;for(var o in e)n[o]=r[o];return n}var ao=function(e){function t(t){var n=e.call(this,t)||this;n.attrs={};var r=n.getDefaultAttrs();return(0,E.CD)(r,t.attrs),n.attrs=r,n.initAttrs(r),n.initAnimate(),n}return(0,S.ZT)(t,e),t.prototype.getDefaultCfg=function(){return{visible:!0,capture:!0,zIndex:0}},t.prototype.getDefaultAttrs=function(){return{matrix:this.getDefaultMatrix(),opacity:1}},t.prototype.onCanvasChange=function(e){},t.prototype.initAttrs=function(e){},t.prototype.initAnimate=function(){this.set("animable",!0),this.set("animating",!1)},t.prototype.isGroup=function(){return!1},t.prototype.getParent=function(){return this.get("parent")},t.prototype.getCanvas=function(){return this.get("canvas")},t.prototype.attr=function(){for(var e,t=[],n=0;n0?r=function(e,t){if(t.onFrame)return e;var n=t.startTime,r=t.delay,o=t.duration,i=Object.prototype.hasOwnProperty;return(0,E.S6)(e,(function(e){n+re.delay&&(0,E.S6)(t.toAttrs,(function(t,n){i.call(e.toAttrs,n)&&(delete e.toAttrs[n],delete e.fromAttrs[n])}))})),e}(r,y):n.addAnimator(this),r.push(y),this.set("animations",r),this.set("_pause",{isPaused:!1})}},t.prototype.stopAnimate=function(e){var t=this;void 0===e&&(e=!0);var n=this.get("animations");(0,E.S6)(n,(function(n){e&&(n.onFrame?t.attr(n.onFrame(1)):t.attr(n.toAttrs)),n.callback&&n.callback()})),this.set("animating",!1),this.set("animations",[])},t.prototype.pauseAnimate=function(){var e=this.get("timeline"),t=this.get("animations"),n=e.getTime();return(0,E.S6)(t,(function(e){e._paused=!0,e._pauseTime=n,e.pauseCallback&&e.pauseCallback()})),this.set("_pause",{isPaused:!0,pauseTime:n}),this},t.prototype.resumeAnimate=function(){var e=this.get("timeline").getTime(),t=this.get("animations"),n=this.get("_pause").pauseTime;return(0,E.S6)(t,(function(t){t.startTime=t.startTime+(e-n),t._paused=!1,t._pauseTime=null,t.resumeCallback&&t.resumeCallback()})),this.set("_pause",{isPaused:!1}),this.set("animations",t),this},t.prototype.emitDelegation=function(e,t){var n,r=this,o=t.propagationPath;this.getEvents(),"mouseenter"===e?n=t.fromShape:"mouseleave"===e&&(n=t.toShape);for(var i=function(e){var i=o[e],l=i.get("name");if(l){if((i.isGroup()||i.isCanvas&&i.isCanvas())&&n&&Yr(i,n))return"break";(0,E.kJ)(l)?(0,E.S6)(l,(function(e){r.emitDelegateEvent(i,e,t)})):a.emitDelegateEvent(i,l,t)}},a=this,l=0;l0)}));return o.length>0?(0,E.S6)(o,(function(o){var i=o.getBBox(),a=i.minX,l=i.maxX,s=i.minY,c=i.maxY;at&&(t=l),sr&&(r=c)})):(e=0,t=0,n=0,r=0),{x:e,y:n,minX:e,minY:n,maxX:t,maxY:r,width:t-e,height:r-n}},t.prototype.getCanvasBBox=function(){var e=1/0,t=-1/0,n=1/0,r=-1/0,o=this.getChildren().filter((function(e){return e.get("visible")&&(!e.isGroup()||e.isGroup()&&e.getChildren().length>0)}));return o.length>0?(0,E.S6)(o,(function(o){var i=o.getCanvasBBox(),a=i.minX,l=i.maxX,s=i.minY,c=i.maxY;at&&(t=l),sr&&(r=c)})):(e=0,t=0,n=0,r=0),{x:e,y:n,minX:e,minY:n,maxX:t,maxY:r,width:t-e,height:r-n}},t.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return t.children=[],t},t.prototype.onAttrChange=function(t,n,r){if(e.prototype.onAttrChange.call(this,t,n,r),"matrix"===t){var o=this.getTotalMatrix();this._applyChildrenMarix(o)}},t.prototype.applyMatrix=function(t){var n=this.getTotalMatrix();e.prototype.applyMatrix.call(this,t);var r=this.getTotalMatrix();r!==n&&this._applyChildrenMarix(r)},t.prototype._applyChildrenMarix=function(e){var t=this.getChildren();(0,E.S6)(t,(function(t){t.applyMatrix(e)}))},t.prototype.addShape=function(){for(var e=[],t=0;t=0;i--){var a=e[i];if(Kr(a)&&(a.isGroup()?o=a.getShape(t,n,r):a.isHit(t,n)&&(o=a)),o)break}return o},t.prototype.add=function(e){var t=this.getCanvas(),n=this.getChildren(),r=this.get("timeline"),o=e.getParent();o&&function(e,t,n){void 0===n&&(n=!0),n?t.destroy():(t.set("parent",null),t.set("canvas",null)),qr(e.getChildren(),t)}(o,e,!1),e.set("parent",this),t&&uo(e,t),r&&fo(e,r),n.push(e),e.onCanvasChange("add"),this._applyElementMatrix(e)},t.prototype._applyElementMatrix=function(e){var t=this.getTotalMatrix();t&&e.applyMatrix(t)},t.prototype.getChildren=function(){return this.get("children")||[]},t.prototype.sort=function(){var e=this.getChildren();(0,E.S6)(e,(function(e,t){return e[co]=t,e})),e.sort((function(e,t){var n,r=(n=t,e.get("zIndex")-n.get("zIndex"));return 0===r?e[co]-t[co]:r})),this.onCanvasChange("sort")},t.prototype.clear=function(){if(this.set("clearing",!0),!this.destroyed){for(var e=this.getChildren(),t=e.length-1;t>=0;t--)e[t].destroy();this.set("children",[]),this.onCanvasChange("clear"),this.set("clearing",!1)}},t.prototype.destroy=function(){this.get("destroyed")||(this.clear(),e.prototype.destroy.call(this))},t.prototype.getFirst=function(){return this.getChildByIndex(0)},t.prototype.getLast=function(){var e=this.getChildren();return this.getChildByIndex(e.length-1)},t.prototype.getChildByIndex=function(e){return this.getChildren()[e]},t.prototype.getCount=function(){return this.getChildren().length},t.prototype.contain=function(e){return this.getChildren().indexOf(e)>-1},t.prototype.removeChild=function(e,t){void 0===t&&(t=!0),this.contain(e)&&e.remove(t)},t.prototype.findAll=function(e){var t=[],n=this.getChildren();return(0,E.S6)(n,(function(n){e(n)&&t.push(n),n.isGroup()&&(t=t.concat(n.findAll(e)))})),t},t.prototype.find=function(e){var t=null,n=this.getChildren();return(0,E.S6)(n,(function(n){if(e(n)?t=n:n.isGroup()&&(t=n.find(e)),t)return!1})),t},t.prototype.findById=function(e){return this.find((function(t){return t.get("id")===e}))},t.prototype.findByClassName=function(e){return this.find((function(t){return t.get("className")===e}))},t.prototype.findAllByName=function(e){return this.findAll((function(t){return t.get("name")===e}))},t}(lo);const ho=po;function go(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function mo(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function vo(){}var yo=.7,bo=1/yo,xo="\\s*([+-]?\\d+)\\s*",wo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",So="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Eo=/^#([0-9a-f]{3,8})$/,Co=new RegExp(`^rgb\\(${xo},${xo},${xo}\\)$`),ko=new RegExp(`^rgb\\(${So},${So},${So}\\)$`),Oo=new RegExp(`^rgba\\(${xo},${xo},${xo},${wo}\\)$`),Mo=new RegExp(`^rgba\\(${So},${So},${So},${wo}\\)$`),Io=new RegExp(`^hsl\\(${wo},${So},${So}\\)$`),$o=new RegExp(`^hsla\\(${wo},${So},${So},${wo}\\)$`),_o={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Po(){return this.rgb().formatHex()}function Ao(){return this.rgb().formatRgb()}function No(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Eo.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?To(t):3===n?new Do(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Ro(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Ro(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Co.exec(e))?new Do(t[1],t[2],t[3],1):(t=ko.exec(e))?new Do(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Oo.exec(e))?Ro(t[1],t[2],t[3],t[4]):(t=Mo.exec(e))?Ro(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Io.exec(e))?Uo(t[1],t[2]/100,t[3]/100,1):(t=$o.exec(e))?Uo(t[1],t[2]/100,t[3]/100,t[4]):_o.hasOwnProperty(e)?To(_o[e]):"transparent"===e?new Do(NaN,NaN,NaN,0):null}function To(e){return new Do(e>>16&255,e>>8&255,255&e,1)}function Ro(e,t,n,r){return r<=0&&(e=t=n=NaN),new Do(e,t,n,r)}function Lo(e,t,n,r){return 1===arguments.length?((o=e)instanceof vo||(o=No(o)),o?new Do((o=o.rgb()).r,o.g,o.b,o.opacity):new Do):new Do(e,t,n,null==r?1:r);var o}function Do(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function jo(){return`#${Ho(this.r)}${Ho(this.g)}${Ho(this.b)}`}function Fo(){const e=Bo(this.opacity);return`${1===e?"rgb(":"rgba("}${zo(this.r)}, ${zo(this.g)}, ${zo(this.b)}${1===e?")":`, ${e})`}`}function Bo(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function zo(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ho(e){return((e=zo(e))<16?"0":"")+e.toString(16)}function Uo(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Vo(e,t,n,r)}function Wo(e){if(e instanceof Vo)return new Vo(e.h,e.s,e.l,e.opacity);if(e instanceof vo||(e=No(e)),!e)return new Vo;if(e instanceof Vo)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,l=i-o,s=(i+o)/2;return l?(a=t===i?(n-r)/l+6*(n0&&s<1?0:a,new Vo(a,l,s,e.opacity)}function Vo(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Xo(e){return(e=(e||0)%360)<0?e+360:e}function qo(e){return Math.max(0,Math.min(1,e||0))}function Go(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function Yo(e,t,n,r,o){var i=e*e,a=i*e;return((1-3*e+3*i-a)*t+(4-6*i+3*a)*n+(1+3*e+3*i-3*a)*r+a*o)/6}go(vo,No,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Po,formatHex:Po,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Wo(this).formatHsl()},formatRgb:Ao,toString:Ao}),go(Do,Lo,mo(vo,{brighter(e){return e=null==e?bo:Math.pow(bo,e),new Do(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?yo:Math.pow(yo,e),new Do(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Do(zo(this.r),zo(this.g),zo(this.b),Bo(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:jo,formatHex:jo,formatHex8:function(){return`#${Ho(this.r)}${Ho(this.g)}${Ho(this.b)}${Ho(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Fo,toString:Fo})),go(Vo,(function(e,t,n,r){return 1===arguments.length?Wo(e):new Vo(e,t,n,null==r?1:r)}),mo(vo,{brighter(e){return e=null==e?bo:Math.pow(bo,e),new Vo(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?yo:Math.pow(yo,e),new Vo(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new Do(Go(e>=240?e-240:e+120,o,r),Go(e,o,r),Go(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new Vo(Xo(this.h),qo(this.s),qo(this.l),Bo(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Bo(this.opacity);return`${1===e?"hsl(":"hsla("}${Xo(this.h)}, ${100*qo(this.s)}%, ${100*qo(this.l)}%${1===e?")":`, ${e})`}`}}));const Ko=e=>()=>e;function Zo(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):Ko(isNaN(e)?t:e)}const Jo=function e(t){var n=function(e){return 1==(e=+e)?Zo:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):Ko(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=Lo(e)).r,(t=Lo(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=Zo(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=i(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function Qo(e){return function(t){var n,r,o=t.length,i=new Array(o),a=new Array(o),l=new Array(o);for(n=0;n=1?(n=1,t-1):Math.floor(n*t),o=e[r],i=e[r+1],a=r>0?e[r-1]:2*o-i,l=ri&&(o=t.slice(i,o),l[a]?l[a]+=o:l[++a]=o),(n=n[0])===(r=r[0])?l[a]?l[a]+=r:l[++a]=r:(l[++a]=null,s.push({i:a,x:oi(n,r)})),i=li.lastIndex;return if.length?(d=Fr(a[u]),f=Fr(i[u]),f=Hr(f,d),f=Vr(f,d),t.fromAttrs.path=f,t.toAttrs.path=d):t.pathFormatted||(d=Fr(a[u]),f=Fr(i[u]),f=Vr(f,d),t.fromAttrs.path=f,t.toAttrs.path=d,t.pathFormatted=!0),o[u]=[];for(var p=0;p0){for(var i=r.animators.length-1;i>=0;i--)if((e=r.animators[i]).destroyed)r.removeAnimator(i);else{if(!e.isAnimatePaused())for(var a=(t=e.get("animations")).length-1;a>=0;a--)n=t[a],fi(e,n,o)&&(t.splice(a,1),n.callback&&n.callback());0===t.length&&r.removeAnimator(i)}r.canvas.get("autoDraw")||r.canvas.draw()}}))},e.prototype.addAnimator=function(e){this.animators.push(e)},e.prototype.removeAnimator=function(e){this.animators.splice(e,1)},e.prototype.isAnimating=function(){return!!this.animators.length},e.prototype.stop=function(){this.timer&&this.timer.stop()},e.prototype.stopAllAnimations=function(e){void 0===e&&(e=!0),this.animators.forEach((function(t){t.stopAnimate(e)})),this.animators=[],this.canvas.draw()},e.prototype.getTime=function(){return this.current},e}();const hi=pi;var gi=["mousedown","mouseup","dblclick","mouseout","mouseover","mousemove","mouseleave","mouseenter","touchstart","touchmove","touchend","dragenter","dragover","dragleave","drop","contextmenu","mousewheel"];function mi(e,t,n){n.name=t,n.target=e,n.currentTarget=e,n.delegateTarget=e,e.emit(t,n)}function vi(e,t,n){if(n.bubbles){var r=void 0,o=!1;if("mouseenter"===t?(r=n.fromShape,o=!0):"mouseleave"===t&&(o=!0,r=n.toShape),e.isCanvas()&&o)return;if(r&&Yr(e,r))return void(n.bubbles=!1);n.name=t,n.currentTarget=e,n.delegateTarget=e,e.emit(t,n)}}var yi=function(){function e(e){var t=this;this.draggingShape=null,this.dragging=!1,this.currentShape=null,this.mousedownShape=null,this.mousedownPoint=null,this._eventCallback=function(e){var n=e.type;t._triggerEvent(n,e)},this._onDocumentMove=function(e){if(t.canvas.get("el")!==e.target&&(t.dragging||t.currentShape)){var n=t._getPointInfo(e);t.dragging&&t._emitEvent("drag",e,n,t.draggingShape)}},this._onDocumentMouseUp=function(e){if(t.canvas.get("el")!==e.target&&t.dragging){var n=t._getPointInfo(e);t.draggingShape&&t._emitEvent("drop",e,n,null),t._emitEvent("dragend",e,n,t.draggingShape),t._afterDrag(t.draggingShape,n,e)}},this.canvas=e.canvas}return e.prototype.init=function(){this._bindEvents()},e.prototype._bindEvents=function(){var e=this,t=this.canvas.get("el");(0,E.S6)(gi,(function(n){t.addEventListener(n,e._eventCallback)})),document&&(document.addEventListener("mousemove",this._onDocumentMove),document.addEventListener("mouseup",this._onDocumentMouseUp))},e.prototype._clearEvents=function(){var e=this,t=this.canvas.get("el");(0,E.S6)(gi,(function(n){t.removeEventListener(n,e._eventCallback)})),document&&(document.removeEventListener("mousemove",this._onDocumentMove),document.removeEventListener("mouseup",this._onDocumentMouseUp))},e.prototype._getEventObj=function(e,t,n,r,o,i){var a=new Xr(e,t);return a.fromShape=o,a.toShape=i,a.x=n.x,a.y=n.y,a.clientX=n.clientX,a.clientY=n.clientY,a.propagationPath.push(r),a},e.prototype._getShape=function(e,t){return this.canvas.getShape(e.x,e.y,t)},e.prototype._getPointInfo=function(e){var t=this.canvas,n=t.getClientByEvent(e),r=t.getPointByEvent(e);return{x:r.x,y:r.y,clientX:n.x,clientY:n.y}},e.prototype._triggerEvent=function(e,t){var n=this._getPointInfo(t),r=this._getShape(n,t),o=this["_on"+e],i=!1;if(o)o.call(this,n,r,t);else{var a=this.currentShape;"mouseenter"===e||"dragenter"===e||"mouseover"===e?(this._emitEvent(e,t,n,null,null,r),r&&this._emitEvent(e,t,n,r,null,r),"mouseenter"===e&&this.draggingShape&&this._emitEvent("dragenter",t,n,null)):"mouseleave"===e||"dragleave"===e||"mouseout"===e?(i=!0,a&&this._emitEvent(e,t,n,a,a,null),this._emitEvent(e,t,n,null,a,null),"mouseleave"===e&&this.draggingShape&&this._emitEvent("dragleave",t,n,null)):this._emitEvent(e,t,n,r,null,null)}if(i||(this.currentShape=r),r&&!r.get("destroyed")){var l=this.canvas;l.get("el").style.cursor=r.attr("cursor")||l.get("cursor")}},e.prototype._onmousedown=function(e,t,n){0===n.button&&(this.mousedownShape=t,this.mousedownPoint=e,this.mousedownTimeStamp=n.timeStamp),this._emitEvent("mousedown",n,e,t,null,null)},e.prototype._emitMouseoverEvents=function(e,t,n,r){var o=this.canvas.get("el");n!==r&&(n&&(this._emitEvent("mouseout",e,t,n,n,r),this._emitEvent("mouseleave",e,t,n,n,r),r&&!r.get("destroyed")||(o.style.cursor=this.canvas.get("cursor"))),r&&(this._emitEvent("mouseover",e,t,r,n,r),this._emitEvent("mouseenter",e,t,r,n,r)))},e.prototype._emitDragoverEvents=function(e,t,n,r,o){r?(r!==n&&(n&&this._emitEvent("dragleave",e,t,n,n,r),this._emitEvent("dragenter",e,t,r,n,r)),o||this._emitEvent("dragover",e,t,r)):n&&this._emitEvent("dragleave",e,t,n,n,r),o&&this._emitEvent("dragover",e,t,r)},e.prototype._afterDrag=function(e,t,n){e&&(e.set("capture",!0),this.draggingShape=null),this.dragging=!1;var r=this._getShape(t,n);r!==e&&this._emitMouseoverEvents(n,t,e,r),this.currentShape=r},e.prototype._onmouseup=function(e,t,n){if(0===n.button){var r=this.draggingShape;this.dragging?(r&&this._emitEvent("drop",n,e,t),this._emitEvent("dragend",n,e,r),this._afterDrag(r,e,n)):(this._emitEvent("mouseup",n,e,t),t===this.mousedownShape&&this._emitEvent("click",n,e,t),this.mousedownShape=null,this.mousedownPoint=null)}},e.prototype._ondragover=function(e,t,n){n.preventDefault();var r=this.currentShape;this._emitDragoverEvents(n,e,r,t,!0)},e.prototype._onmousemove=function(e,t,n){var r=this.canvas,o=this.currentShape,i=this.draggingShape;if(this.dragging)i&&this._emitDragoverEvents(n,e,o,t,!1),this._emitEvent("drag",n,e,i);else{var a=this.mousedownPoint;if(a){var l=this.mousedownShape,s=n.timeStamp-this.mousedownTimeStamp,c=a.clientX-e.clientX,u=a.clientY-e.clientY;s>120||c*c+u*u>40?l&&l.get("draggable")?((i=this.mousedownShape).set("capture",!1),this.draggingShape=i,this.dragging=!0,this._emitEvent("dragstart",n,e,i),this.mousedownShape=null,this.mousedownPoint=null):!l&&r.get("draggable")?(this.dragging=!0,this._emitEvent("dragstart",n,e,null),this.mousedownShape=null,this.mousedownPoint=null):(this._emitMouseoverEvents(n,e,o,t),this._emitEvent("mousemove",n,e,t)):(this._emitMouseoverEvents(n,e,o,t),this._emitEvent("mousemove",n,e,t))}else this._emitMouseoverEvents(n,e,o,t),this._emitEvent("mousemove",n,e,t)}},e.prototype._emitEvent=function(e,t,n,r,o,i){var a=this._getEventObj(e,t,n,r,o,i);if(r){a.shape=r,mi(r,e,a);for(var l=r.getParent();l;)l.emitDelegation(e,a),a.propagationStopped||vi(l,e,a),a.propagationPath.push(l),l=l.getParent()}else mi(this.canvas,e,a)},e.prototype.destroy=function(){this._clearEvents(),this.canvas=null,this.currentShape=null,this.draggingShape=null,this.mousedownPoint=null,this.mousedownShape=null,this.mousedownTimeStamp=null},e}();const bi=yi;var xi=(0,le.qY)(),wi=xi&&"firefox"===xi.name;!function(e){function t(t){var n=e.call(this,t)||this;return n.initContainer(),n.initDom(),n.initEvents(),n.initTimeline(),n}(0,S.ZT)(t,e),t.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return t.cursor="default",t.supportCSSTransform=!1,t},t.prototype.initContainer=function(){var e=this.get("container");(0,E.HD)(e)&&(e=document.getElementById(e),this.set("container",e))},t.prototype.initDom=function(){var e=this.createDom();this.set("el",e),this.get("container").appendChild(e),this.setDOMSize(this.get("width"),this.get("height"))},t.prototype.initEvents=function(){var e=new bi({canvas:this});e.init(),this.set("eventController",e)},t.prototype.initTimeline=function(){var e=new hi(this);this.set("timeline",e)},t.prototype.setDOMSize=function(e,t){var n=this.get("el");Gr&&(n.style.width=e+"px",n.style.height=t+"px")},t.prototype.changeSize=function(e,t){this.setDOMSize(e,t),this.set("width",e),this.set("height",t),this.onCanvasChange("changeSize")},t.prototype.getRenderer=function(){return this.get("renderer")},t.prototype.getCursor=function(){return this.get("cursor")},t.prototype.setCursor=function(e){this.set("cursor",e);var t=this.get("el");Gr&&t&&(t.style.cursor=e)},t.prototype.getPointByEvent=function(e){if(this.get("supportCSSTransform")){if(wi&&!(0,E.UM)(e.layerX)&&e.layerX!==e.offsetX)return{x:e.layerX,y:e.layerY};if(!(0,E.UM)(e.offsetX))return{x:e.offsetX,y:e.offsetY}}var t=this.getClientByEvent(e),n=t.x,r=t.y;return this.getPointByClient(n,r)},t.prototype.getClientByEvent=function(e){var t=e;return e.touches&&(t="touchend"===e.type?e.changedTouches[0]:e.touches[0]),{x:t.clientX,y:t.clientY}},t.prototype.getPointByClient=function(e,t){var n=this.get("el").getBoundingClientRect();return{x:e-n.left,y:t-n.top}},t.prototype.getClientByPoint=function(e,t){var n=this.get("el").getBoundingClientRect();return{x:e+n.left,y:t+n.top}},t.prototype.draw=function(){},t.prototype.removeDom=function(){var e=this.get("el");e.parentNode.removeChild(e)},t.prototype.clearEvents=function(){this.get("eventController").destroy()},t.prototype.isCanvas=function(){return!0},t.prototype.getParent=function(){return null},t.prototype.destroy=function(){var t=this.get("timeline");this.get("destroyed")||(this.clear(),t&&t.stop(),this.clearEvents(),this.removeDom(),e.prototype.destroy.call(this))}}(ho),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}(0,S.ZT)(t,e),t.prototype.isGroup=function(){return!0},t.prototype.isEntityGroup=function(){return!1},t.prototype.clone=function(){for(var t=e.prototype.clone.call(this),n=this.getChildren(),r=0;r=e&&n.minY<=t&&n.maxY>=t},t.prototype.afterAttrsChange=function(t){e.prototype.afterAttrsChange.call(this,t),this.clearCacheBBox()},t.prototype.getBBox=function(){var e=this.cfg.bbox;return e||(e=this.calculateBBox(),this.set("bbox",e)),e},t.prototype.getCanvasBBox=function(){var e=this.cfg.canvasBBox;return e||(e=this.calculateCanvasBBox(),this.set("canvasBBox",e)),e},t.prototype.applyMatrix=function(t){e.prototype.applyMatrix.call(this,t),this.set("canvasBBox",null)},t.prototype.calculateCanvasBBox=function(){var e=this.getBBox(),t=this.getTotalMatrix(),n=e.minX,r=e.minY,o=e.maxX,i=e.maxY;if(t){var a=eo(t,[e.minX,e.minY]),l=eo(t,[e.maxX,e.minY]),s=eo(t,[e.minX,e.maxY]),c=eo(t,[e.maxX,e.maxY]);n=Math.min(a[0],l[0],s[0],c[0]),o=Math.max(a[0],l[0],s[0],c[0]),r=Math.min(a[1],l[1],s[1],c[1]),i=Math.max(a[1],l[1],s[1],c[1])}var u=this.attrs;if(u.shadowColor){var d=u.shadowBlur,f=void 0===d?0:d,p=u.shadowOffsetX,h=void 0===p?0:p,g=u.shadowOffsetY,m=void 0===g?0:g,v=n-f+h,y=o+f+h,b=r-f+m,x=i+f+m;n=Math.min(n,v),o=Math.max(o,y),r=Math.min(r,b),i=Math.max(i,x)}return{x:n,y:r,minX:n,minY:r,maxX:o,maxY:i,width:o-n,height:i-r}},t.prototype.clearCacheBBox=function(){this.set("bbox",null),this.set("canvasBBox",null)},t.prototype.isClipShape=function(){return this.get("isClipShape")},t.prototype.isInShape=function(e,t){return!1},t.prototype.isOnlyHitBox=function(){return!1},t.prototype.isHit=function(e,t){var n=this.get("startArrowShape"),r=this.get("endArrowShape"),o=[e,t,1],i=(o=this.invertFromMatrix(o))[0],a=o[1],l=this._isInBBox(i,a);if(this.isOnlyHitBox())return l;if(l&&!this.isClipped(i,a)){if(this.isInShape(i,a))return!0;if(n&&n.isHit(i,a))return!0;if(r&&r.isHit(i,a))return!0}return!1}}(lo);var Si=new Map;function Ei(e,t){Si.set(e,t)}function Ci(e){var t=e.attr();return{x:t.x,y:t.y,width:t.width,height:t.height}}function ki(e){var t=e.attr(),n=t.x,r=t.y,o=t.r;return{x:n-o,y:r-o,width:2*o,height:2*o}}function Oi(e,t){return e&&t?{minX:Math.min(e.minX,t.minX),minY:Math.min(e.minY,t.minY),maxX:Math.max(e.maxX,t.maxX),maxY:Math.max(e.maxY,t.maxY)}:e||t}function Mi(e,t){var n=e.get("startArrowShape"),r=e.get("endArrowShape");return n&&(t=Oi(t,n.getCanvasBBox())),r&&(t=Oi(t,r.getCanvasBBox())),t}var Ii=null;function $i(e,t){var n=e.prePoint,r=e.currentPoint,o=e.nextPoint,i=Math.pow(r[0]-n[0],2)+Math.pow(r[1]-n[1],2),a=Math.pow(r[0]-o[0],2)+Math.pow(r[1]-o[1],2),l=Math.pow(n[0]-o[0],2)+Math.pow(n[1]-o[1],2),s=Math.acos((i+a-l)/(2*Math.sqrt(i)*Math.sqrt(a)));if(!s||0===Math.sin(s)||(0,E.vQ)(s,0))return{xExtra:0,yExtra:0};var c=Math.abs(Math.atan2(o[1]-r[1],o[0]-r[0])),u=Math.abs(Math.atan2(o[0]-r[0],o[1]-r[1]));return c=c>Math.PI/2?Math.PI-c:c,u=u>Math.PI/2?Math.PI-u:u,{xExtra:Math.cos(s/2-c)*(t/2*(1/Math.sin(s/2)))-t/2||0,yExtra:Math.cos(u-s/2)*(t/2*(1/Math.sin(s/2)))-t/2||0}}function _i(e,t,n){var r=new Xr(t,n);r.target=e,r.propagationPath.push(e),e.emitDelegation(t,r);for(var o=e.getParent();o;)o.emitDelegation(t,r),r.propagationPath.push(o),o=o.getParent()}Ei("rect",Ci),Ei("image",Ci),Ei("circle",ki),Ei("marker",ki),Ei("polyline",(function(e){for(var t=e.attr().points,n=[],r=[],o=0;o1){var o=function(e,t){return t?t-e:.14*e}(t,n);return t*r+o*(r-1)}return t}(o,i,a),p={x:n,y:r-f};u&&("end"===u||"right"===u?p.x-=c:"center"===u&&(p.x-=c/2)),d&&("top"===d?p.y+=f:"middle"===d&&(p.y+=f/2)),s={x:p.x,y:p.y,width:c,height:f}}else s={x:n,y:r,width:0,height:0};return s})),Ei("path",(function(e){var t=e.attr(),n=t.path,r=t.stroke?t.lineWidth:0,o=function(e,t){for(var n=[],r=[],o=[],i=0;i=0;n--)e.removeChild(t[n])}function Fi(e){var t=e.start,n=e.end,r=Math.min(t.x,n.x),o=Math.min(t.y,n.y),i=Math.max(t.x,n.x),a=Math.max(t.y,n.y);return{x:r,y:o,minX:r,minY:o,maxX:i,maxY:a,width:i-r,height:a-o}}function Bi(e,t,n,r){var o=e+n,i=t+r;return{x:e,y:t,width:n,height:r,minX:e,minY:t,maxX:isNaN(o)?0:o,maxY:isNaN(i)?0:i}}function zi(e,t,n){return(1-n)*e+t*n}function Hi(e,t,n){return{x:e.x+Math.cos(n)*t,y:e.y+Math.sin(n)*t}}var Ui=function(e,t,n){return void 0===n&&(n=Math.pow(Number.EPSILON,.5)),[e,t].includes(1/0)?Math.abs(e)===Math.abs(t):Math.abs(e-t)0?(0,E.S6)(f,(function(e){if(e.get("visible")){if(e.isGroup()&&0===e.get("children").length)return!0;var t=Wi(e),n=e.applyToMatrix([t.minX,t.minY,1]),r=e.applyToMatrix([t.minX,t.maxY,1]),o=e.applyToMatrix([t.maxX,t.minY,1]),i=e.applyToMatrix([t.maxX,t.maxY,1]),a=Math.min(n[0],r[0],o[0],i[0]),l=Math.max(n[0],r[0],o[0],i[0]),f=Math.min(n[1],r[1],o[1],i[1]),p=Math.max(n[1],r[1],o[1],i[1]);ac&&(c=l),fd&&(d=p)}})):(s=0,c=0,u=0,d=0),t=Bi(s,u,c-s,d-u)}else t=e.getBBox();return l?(n=t,r=l,Bi(o=Math.max(n.minX,r.minX),i=Math.max(n.minY,r.minY),Math.min(n.maxX,r.maxX)-o,Math.min(n.maxY,r.maxY)-i)):t}function Vi(e){return e+"px"}function Xi(e,t,n,r){var o,i,a,l,s=r/(o=e,a=(i=t).x-o.x,l=i.y-o.y,Math.sqrt(a*a+l*l)),c=0;return"start"===n?c=0-s:"end"===n&&(c=1+s),{x:zi(e.x,t.x,c),y:zi(e.y,t.y,c)}}var qi={none:[],point:["x","y"],region:["start","end"],points:["points"],circle:["center","radius","startAngle","endAngle"]},Gi=function(e){function t(t){var n=e.call(this,t)||this;return n.initCfg(),n}return(0,S.ZT)(t,e),t.prototype.getDefaultCfg=function(){return{id:"",name:"",type:"",locationType:"none",offsetX:0,offsetY:0,animate:!1,capture:!0,updateAutoRender:!1,animateOption:{appear:null,update:{duration:400,easing:"easeQuadInOut"},enter:{duration:400,easing:"easeQuadInOut"},leave:{duration:350,easing:"easeQuadIn"}},events:null,defaultCfg:{},visible:!0}},t.prototype.clear=function(){},t.prototype.update=function(e){var t=this,n=this.get("defaultCfg")||{};(0,E.S6)(e,(function(e,r){var o=e;t.get(r)!==e&&((0,E.Kn)(e)&&n[r]&&(o=(0,E.b$)({},n[r],e)),t.set(r,o))})),this.updateInner(e),this.afterUpdate(e)},t.prototype.updateInner=function(e){},t.prototype.afterUpdate=function(e){(0,E.wH)(e,"visible")&&(e.visible?this.show():this.hide()),(0,E.wH)(e,"capture")&&this.setCapture(e.capture)},t.prototype.getLayoutBBox=function(){return this.getBBox()},t.prototype.getLocationType=function(){return this.get("locationType")},t.prototype.getOffset=function(){return{offsetX:this.get("offsetX"),offsetY:this.get("offsetY")}},t.prototype.setOffset=function(e,t){this.update({offsetX:e,offsetY:t})},t.prototype.setLocation=function(e){var t=(0,S.pi)({},e);this.update(t)},t.prototype.getLocation=function(){var e=this,t={},n=this.get("locationType"),r=qi[n];return(0,E.S6)(r,(function(n){t[n]=e.get(n)})),t},t.prototype.isList=function(){return!1},t.prototype.isSlider=function(){return!1},t.prototype.init=function(){},t.prototype.initCfg=function(){var e=this,t=this.get("defaultCfg");(0,E.S6)(t,(function(t,n){var r=e.get(n);if((0,E.Kn)(r)){var o=(0,E.b$)({},t,r);e.set(n,o)}}))},t}(Jr);const Yi=Gi;var Ki="update_status",Zi=["visible","tip","delegateObject"],Ji=["container","group","shapesMap","isRegister","isUpdating","destroyed"],Qi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,S.pi)((0,S.pi)({},t),{container:null,shapesMap:{},group:null,capture:!0,isRegister:!1,isUpdating:!1,isInit:!0})},t.prototype.remove=function(){this.clear(),this.get("group").remove()},t.prototype.clear=function(){this.get("group").clear(),this.set("shapesMap",{}),this.clearOffScreenCache(),this.set("isInit",!0)},t.prototype.getChildComponentById=function(e){var t=this.getElementById(e);return t&&t.get("component")},t.prototype.getElementById=function(e){return this.get("shapesMap")[e]},t.prototype.getElementByLocalId=function(e){var t=this.getElementId(e);return this.getElementById(t)},t.prototype.getElementsByName=function(e){var t=[];return(0,E.S6)(this.get("shapesMap"),(function(n){n.get("name")===e&&t.push(n)})),t},t.prototype.getContainer=function(){return this.get("container")},t.prototype.updateInner=function(e){this.offScreenRender(),this.get("updateAutoRender")&&this.render()},t.prototype.render=function(){var e=this.get("offScreenGroup");e||(e=this.offScreenRender());var t=this.get("group");this.updateElements(e,t),this.deleteElements(),this.applyOffset(),this.get("eventInitted")||(this.initEvent(),this.set("eventInitted",!0)),this.set("isInit",!1)},t.prototype.show=function(){this.get("group").show(),this.set("visible",!0)},t.prototype.hide=function(){this.get("group").hide(),this.set("visible",!1)},t.prototype.setCapture=function(e){this.get("group").set("capture",e),this.set("capture",e)},t.prototype.destroy=function(){this.removeEvent(),this.remove(),e.prototype.destroy.call(this)},t.prototype.getBBox=function(){return this.get("group").getCanvasBBox()},t.prototype.getLayoutBBox=function(){var e=this.get("group"),t=this.getInnerLayoutBBox(),n=e.getTotalMatrix();return n&&(t=function(e,t){var n=Ti(e,[t.minX,t.minY]),r=Ti(e,[t.maxX,t.minY]),o=Ti(e,[t.minX,t.maxY]),i=Ti(e,[t.maxX,t.maxY]),a=Math.min(n[0],r[0],o[0],i[0]),l=Math.max(n[0],r[0],o[0],i[0]),s=Math.min(n[1],r[1],o[1],i[1]),c=Math.max(n[1],r[1],o[1],i[1]);return{x:a,y:s,minX:a,minY:s,maxX:l,maxY:c,width:l-a,height:c-s}}(n,t)),t},t.prototype.on=function(e,t,n){return this.get("group").on(e,t,n),this},t.prototype.off=function(e,t){var n=this.get("group");return n&&n.off(e,t),this},t.prototype.emit=function(e,t){this.get("group").emit(e,t)},t.prototype.init=function(){e.prototype.init.call(this),this.get("group")||this.initGroup(),this.offScreenRender()},t.prototype.getInnerLayoutBBox=function(){return this.get("offScreenBBox")||this.get("group").getBBox()},t.prototype.delegateEmit=function(e,t){var n=this.get("group");t.target=n,n.emit(e,t),_i(n,e,t)},t.prototype.createOffScreenGroup=function(){return new(this.get("group").getGroupBase())({delegateObject:this.getDelegateObject()})},t.prototype.applyOffset=function(){var e=this.get("offsetX"),t=this.get("offsetY");this.moveElementTo(this.get("group"),{x:e,y:t})},t.prototype.initGroup=function(){var e=this.get("container");this.set("group",e.addGroup({id:this.get("id"),name:this.get("name"),capture:this.get("capture"),visible:this.get("visible"),isComponent:!0,component:this,delegateObject:this.getDelegateObject()}))},t.prototype.offScreenRender=function(){this.clearOffScreenCache();var e=this.createOffScreenGroup();return this.renderInner(e),this.set("offScreenGroup",e),this.set("offScreenBBox",Wi(e)),e},t.prototype.addGroup=function(e,t){this.appendDelegateObject(e,t);var n=e.addGroup(t);return this.get("isRegister")&&this.registerElement(n),n},t.prototype.addShape=function(e,t){this.appendDelegateObject(e,t);var n=e.addShape(t);return this.get("isRegister")&&this.registerElement(n),n},t.prototype.addComponent=function(e,t){var n=t.id,r=t.component,o=(0,S._T)(t,["id","component"]),i=new r((0,S.pi)((0,S.pi)({},o),{id:n,container:e,updateAutoRender:this.get("updateAutoRender")}));return i.init(),i.render(),this.get("isRegister")&&this.registerElement(i.get("group")),i},t.prototype.initEvent=function(){},t.prototype.removeEvent=function(){this.get("group").off()},t.prototype.getElementId=function(e){return this.get("id")+"-"+this.get("name")+"-"+e},t.prototype.registerElement=function(e){var t=e.get("id");this.get("shapesMap")[t]=e},t.prototype.unregisterElement=function(e){var t=e.get("id");delete this.get("shapesMap")[t]},t.prototype.moveElementTo=function(e,t){var n=Ni(t);e.attr("matrix",n)},t.prototype.addAnimation=function(e,t,n){var r=t.attr("opacity");(0,E.UM)(r)&&(r=1),t.attr("opacity",0),t.animate({opacity:r},n)},t.prototype.removeAnimation=function(e,t,n){t.animate({opacity:0},n)},t.prototype.updateAnimation=function(e,t,n,r){t.animate(n,r)},t.prototype.updateElements=function(e,t){var n,r=this,o=this.get("animate"),i=this.get("animateOption"),a=e.getChildren().slice(0);(0,E.S6)(a,(function(e){var a=e.get("id"),l=r.getElementById(a),s=e.get("name");if(l)if(e.get("isComponent")){var c=e.get("component"),u=l.get("component"),d=(0,E.ei)(c.cfg,(0,E.e5)((0,E.XP)(c.cfg),Ji));u.update(d),l.set(Ki,"update")}else{var f=r.getReplaceAttrs(l,e);o&&i.update?r.updateAnimation(s,l,f,i.update):l.attr(f),e.isGroup()&&r.updateElements(e,l),(0,E.S6)(Zi,(function(t){l.set(t,e.get(t))})),function(e,t){if(e.getClip()||t.getClip()){var n=t.getClip();if(n){var r={type:n.get("type"),attrs:n.attr()};e.setClip(r)}else e.setClip(null)}}(l,e),n=l,l.set(Ki,"update")}else{t.add(e);var p=t.getChildren();if(p.splice(p.length-1,1),n){var h=p.indexOf(n);p.splice(h+1,0,e)}else p.unshift(e);if(r.registerElement(e),e.set(Ki,"add"),e.get("isComponent")?(c=e.get("component")).set("container",t):e.isGroup()&&r.registerNewGroup(e),n=e,o){var g=r.get("isInit")?i.appear:i.enter;g&&r.addAnimation(s,e,g)}}}))},t.prototype.clearUpdateStatus=function(e){var t=e.getChildren();(0,E.S6)(t,(function(e){e.set(Ki,null)}))},t.prototype.clearOffScreenCache=function(){var e=this.get("offScreenGroup");e&&e.destroy(),this.set("offScreenGroup",null),this.set("offScreenBBox",null)},t.prototype.getDelegateObject=function(){var e;return(e={})[this.get("name")]=this,e.component=this,e},t.prototype.appendDelegateObject=function(e,t){var n=e.get("delegateObject");t.delegateObject||(t.delegateObject={}),(0,E.CD)(t.delegateObject,n)},t.prototype.getReplaceAttrs=function(e,t){var n=e.attr(),r=t.attr();return(0,E.S6)(n,(function(e,t){void 0===r[t]&&(r[t]=void 0)})),r},t.prototype.registerNewGroup=function(e){var t=this,n=e.getChildren();(0,E.S6)(n,(function(e){t.registerElement(e),e.set(Ki,"add"),e.isGroup()&&t.registerNewGroup(e)}))},t.prototype.deleteElements=function(){var e=this,t=this.get("shapesMap"),n=[];(0,E.S6)(t,(function(e,t){!e.get(Ki)||e.destroyed?n.push([t,e]):e.set(Ki,null)}));var r=this.get("animate"),o=this.get("animateOption");(0,E.S6)(n,(function(n){var i=n[0],a=n[1];if(!a.destroyed){var l=a.get("name");if(r&&o.leave){var s=(0,E.CD)({callback:function(){e.removeElement(a)}},o.leave);e.removeAnimation(l,a,s)}else e.removeElement(a)}delete t[i]}))},t.prototype.removeElement=function(e){if(e.get("isGroup")){var t=e.get("component");t&&t.destroy()}e.remove()},t}(Yi);const ea=Qi;var ta="…";function na(e,t){return e.charCodeAt(t)>0&&e.charCodeAt(t)<128?1:2}var ra="…",oa=2,ia=400;function aa(e){if(e.length>ia)return function(e){for(var t=e.map((function(e){var t=e.attr("text");return(0,E.UM)(t)?"":""+t})),n=0,r=0,o=0;o=19968&&l<=40869?2:1}i>n&&(n=i,r=o)}return e[r].getBBox().width}(e);var t=0;return(0,E.S6)(e,(function(e){var n=e.getBBox().width;t=0?function(e,t,n){void 0===n&&(n="tail");var r=e.length,o="";if("tail"===n){for(var i=0,a=0;i1||r<0)&&(r=1),{x:zi(e.x,t.x,r),y:zi(e.y,t.y,r)}},t.prototype.renderLabel=function(e){var t=this.get("text"),n=this.get("start"),r=this.get("end"),o=t.position,i=t.content,a=t.style,l=t.offsetX,s=t.offsetY,c=t.autoRotate,u=t.maxLength,d=t.autoEllipsis,f=t.ellipsisPosition,p=t.background,h=t.isVertical,g=void 0!==h&&h,m=this.getLabelPoint(n,r,o),v=m.x+l,y=m.y+s,b={id:this.getElementId("line-text"),name:"annotation-line-text",x:v,y,content:i,style:a,maxLength:u,autoEllipsis:d,ellipsisPosition:f,background:p,isVertical:g};if(c){var x=[r.x-n.x,r.y-n.y];b.rotate=Math.atan2(x[1],x[0])}sa(e,b)},t}(ea);const da=ua;var fa=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,S.pi)((0,S.pi)({},t),{name:"annotation",type:"text",locationType:"point",x:0,y:0,content:"",rotate:null,style:{},background:null,maxLength:null,autoEllipsis:!0,isVertical:!1,ellipsisPosition:"tail",defaultCfg:{style:{fill:ca.textColor,fontSize:12,textAlign:"center",textBaseline:"middle",fontFamily:ca.fontFamily}}})},t.prototype.setLocation=function(e){this.set("x",e.x),this.set("y",e.y),this.resetLocation()},t.prototype.renderInner=function(e){var t=this.getLocation(),n=t.x,r=t.y,o=this.get("content"),i=this.get("style");sa(e,{id:this.getElementId("text"),name:this.get("name")+"-text",x:n,y:r,content:o,style:i,maxLength:this.get("maxLength"),autoEllipsis:this.get("autoEllipsis"),isVertical:this.get("isVertical"),ellipsisPosition:this.get("ellipsisPosition"),background:this.get("background"),rotate:this.get("rotate")})},t.prototype.resetLocation=function(){var e=this.getElementByLocalId("text-group");if(e){var t=this.getLocation(),n=t.x,r=t.y,o=this.get("rotate");Li(e,n,r),Ri(e,o,n,r)}},t}(ea);const pa=fa;var ha=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,S.pi)((0,S.pi)({},t),{name:"annotation",type:"arc",locationType:"circle",center:null,radius:100,startAngle:-Math.PI/2,endAngle:3*Math.PI/2,style:{stroke:"#999",lineWidth:1}})},t.prototype.renderInner=function(e){this.renderArc(e)},t.prototype.getArcPath=function(){var e=this.getLocation(),t=e.center,n=e.radius,r=e.startAngle,o=e.endAngle,i=Hi(t,n,r),a=Hi(t,n,o),l=o-r>Math.PI?1:0,s=[["M",i.x,i.y]];if(o-r==2*Math.PI){var c=Hi(t,n,r+Math.PI);s.push(["A",n,n,0,l,1,c.x,c.y]),s.push(["A",n,n,0,l,1,a.x,a.y])}else s.push(["A",n,n,0,l,1,a.x,a.y]);return s},t.prototype.renderArc=function(e){var t=this.getArcPath(),n=this.get("style");this.addShape(e,{type:"path",id:this.getElementId("arc"),name:"annotation-arc",attrs:(0,S.pi)({path:t},n)})},t}(ea);const ga=ha;const ma=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,S.pi)((0,S.pi)({},t),{name:"annotation",type:"region",locationType:"region",start:null,end:null,style:{},defaultCfg:{style:{lineWidth:0,fill:ca.regionColor,opacity:.4}}})},t.prototype.renderInner=function(e){this.renderRegion(e)},t.prototype.renderRegion=function(e){var t=this.get("start"),n=this.get("end"),r=this.get("style"),o=Fi({start:t,end:n});this.addShape(e,{type:"rect",id:this.getElementId("region"),name:"annotation-region",attrs:(0,S.pi)({x:o.x,y:o.y,width:o.width,height:o.height},r)})},t}(ea);var va=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,S.pi)((0,S.pi)({},t),{name:"annotation",type:"image",locationType:"region",start:null,end:null,src:null,style:{}})},t.prototype.renderInner=function(e){this.renderImage(e)},t.prototype.getImageAttrs=function(){var e=this.get("start"),t=this.get("end"),n=this.get("style"),r=Fi({start:e,end:t}),o=this.get("src");return(0,S.pi)({x:r.x,y:r.y,img:o,width:r.width,height:r.height},n)},t.prototype.renderImage=function(e){this.addShape(e,{type:"image",id:this.getElementId("image"),name:"annotation-image",attrs:this.getImageAttrs()})},t}(ea);const ya=va;var ba=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,S.pi)((0,S.pi)({},t),{name:"annotation",type:"dataMarker",locationType:"point",x:0,y:0,point:{},line:{},text:{},direction:"upward",autoAdjust:!0,coordinateBBox:null,defaultCfg:{point:{display:!0,style:{r:3,fill:"#FFFFFF",stroke:"#1890FF",lineWidth:2}},line:{display:!0,length:20,style:{stroke:ca.lineColor,lineWidth:1}},text:{content:"",display:!0,style:{fill:ca.textColor,opacity:.65,fontSize:12,textAlign:"start",fontFamily:ca.fontFamily}}}})},t.prototype.renderInner=function(e){(0,E.U2)(this.get("line"),"display")&&this.renderLine(e),(0,E.U2)(this.get("text"),"display")&&this.renderText(e),(0,E.U2)(this.get("point"),"display")&&this.renderPoint(e),this.get("autoAdjust")&&this.autoAdjust(e)},t.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x")+this.get("offsetX"),y:this.get("y")+this.get("offsetY")})},t.prototype.renderPoint=function(e){var t=this.getShapeAttrs().point;this.addShape(e,{type:"circle",id:this.getElementId("point"),name:"annotation-point",attrs:t})},t.prototype.renderLine=function(e){var t=this.getShapeAttrs().line;this.addShape(e,{type:"path",id:this.getElementId("line"),name:"annotation-line",attrs:t})},t.prototype.renderText=function(e){var t=this.getShapeAttrs().text,n=t.x,r=t.y,o=t.text,i=(0,S._T)(t,["x","y","text"]),a=this.get("text"),l=a.background,s=a.maxLength,c=a.autoEllipsis,u=a.isVertival,d=a.ellipsisPosition;sa(e,{x:n,y:r,id:this.getElementId("text"),name:"annotation-text",content:o,style:i,background:l,maxLength:s,autoEllipsis:c,isVertival:u,ellipsisPosition:d})},t.prototype.autoAdjust=function(e){var t=this.get("direction"),n=this.get("x"),r=this.get("y"),o=(0,E.U2)(this.get("line"),"length",0),i=this.get("coordinateBBox"),a=e.getBBox(),l=a.minX,s=a.maxX,c=a.minY,u=a.maxY,d=e.findById(this.getElementId("text-group")),f=e.findById(this.getElementId("text")),p=e.findById(this.getElementId("line"));if(i&&d){var h=d.attr("x"),g=d.attr("y"),m=f.getCanvasBBox(),v=m.width,y=m.height,b=0,x=0;if(n+l<=i.minX)if("leftward"===t)b=1;else{var w=i.minX-(n+l);h=d.attr("x")+w}else n+s>=i.maxX&&("rightward"===t?b=-1:(w=n+s-i.maxX,h=d.attr("x")-w));b&&(p&&p.attr("path",[["M",0,0],["L",o*b,0]]),h=(o+2+v)*b),r+c<=i.minY?"upward"===t?x=1:(w=i.minY-(r+c),g=d.attr("y")+w):r+u>=i.maxY&&("downward"===t?x=-1:(w=r+u-i.maxY,g=d.attr("y")-w)),x&&(p&&p.attr("path",[["M",0,0],["L",0,o*x]]),g=(o+2+y)*x),h===d.attr("x")&&g===d.attr("y")||Li(d,h,g)}},t.prototype.getShapeAttrs=function(){var e=(0,E.U2)(this.get("line"),"display"),t=(0,E.U2)(this.get("point"),"style",{}),n=(0,E.U2)(this.get("line"),"style",{}),r=(0,E.U2)(this.get("text"),"style",{}),o=this.get("direction"),i=e?(0,E.U2)(this.get("line"),"length",0):0,a=0,l=0,s="top",c="start";switch(o){case"upward":l=-1,s="bottom";break;case"downward":l=1,s="top";break;case"leftward":a=-1,c="end";break;case"rightward":a=1,c="start"}return{point:(0,S.pi)({x:0,y:0},t),line:(0,S.pi)({path:[["M",0,0],["L",i*a,i*l]]},n),text:(0,S.pi)({x:(i+2)*a,y:(i+2)*l,text:(0,E.U2)(this.get("text"),"content",""),textBaseline:s,textAlign:c},r)}},t}(ea);const xa=ba;const wa=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,S.pi)((0,S.pi)({},t),{name:"annotation",type:"dataRegion",locationType:"points",points:[],lineLength:0,region:{},text:{},defaultCfg:{region:{style:{lineWidth:0,fill:ca.regionColor,opacity:.4}},text:{content:"",style:{textAlign:"center",textBaseline:"bottom",fontSize:12,fill:ca.textColor,fontFamily:ca.fontFamily}}}})},t.prototype.renderInner=function(e){var t=(0,E.U2)(this.get("region"),"style",{}),n=((0,E.U2)(this.get("text"),"style",{}),this.get("lineLength")||0),r=this.get("points");if(r.length){var o=function(e){var t=e.map((function(e){return e.x})),n=e.map((function(e){return e.y})),r=Math.min.apply(Math,t),o=Math.min.apply(Math,n),i=Math.max.apply(Math,t),a=Math.max.apply(Math,n);return{x:r,y:o,minX:r,minY:o,maxX:i,maxY:a,width:i-r,height:a-o}}(r),i=[];i.push(["M",r[0].x,o.minY-n]),r.forEach((function(e){i.push(["L",e.x,e.y])})),i.push(["L",r[r.length-1].x,r[r.length-1].y-n]),this.addShape(e,{type:"path",id:this.getElementId("region"),name:"annotation-region",attrs:(0,S.pi)({path:i},t)}),sa(e,(0,S.pi)({id:this.getElementId("text"),name:"annotation-text",x:(o.minX+o.maxX)/2,y:o.minY-n},this.get("text")))}},t}(ea);var Sa=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,S.pi)((0,S.pi)({},t),{name:"annotation",type:"regionFilter",locationType:"region",start:null,end:null,color:null,shape:[]})},t.prototype.renderInner=function(e){var t=this,n=this.get("start"),r=this.get("end"),o=this.addGroup(e,{id:this.getElementId("region-filter"),capture:!1});(0,E.S6)(this.get("shapes"),(function(e,n){var r=e.get("type"),i=(0,E.d9)(e.attr());t.adjustShapeAttrs(i),t.addShape(o,{id:t.getElementId("shape-"+r+"-"+n),capture:!1,type:r,attrs:i})}));var i=Fi({start:n,end:r});o.setClip({type:"rect",attrs:{x:i.minX,y:i.minY,width:i.width,height:i.height}})},t.prototype.adjustShapeAttrs=function(e){var t=this.get("color");e.fill&&(e.fill=e.fillStyle=t),e.stroke=e.strokeStyle=t},t}(ea);const Ea=Sa;var Ca=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,S.pi)((0,S.pi)({},t),{name:"annotation",type:"shape",draw:E.ZT})},t.prototype.renderInner=function(e){var t=this.get("render");(0,E.mf)(t)&&t(e)},t}(ea);const ka=Ca;function Oa(e,t,n){var r;try{r=window.getComputedStyle?window.getComputedStyle(e,null)[t]:e.style[t]}catch(e){}finally{r=void 0===r?n:r}return r}var Ma=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,S.pi)((0,S.pi)({},t),{container:null,containerTpl:"",updateAutoRender:!0,containerClassName:"",parent:null})},t.prototype.getContainer=function(){return this.get("container")},t.prototype.show=function(){this.get("container").style.display="",this.set("visible",!0)},t.prototype.hide=function(){this.get("container").style.display="none",this.set("visible",!1)},t.prototype.setCapture=function(e){var t=e?"auto":"none";this.getContainer().style.pointerEvents=t,this.set("capture",e)},t.prototype.getBBox=function(){var e=this.getContainer();return Bi(parseFloat(e.style.left)||0,parseFloat(e.style.top)||0,e.clientWidth,e.clientHeight)},t.prototype.clear=function(){ji(this.get("container"))},t.prototype.destroy=function(){this.removeEvent(),this.removeDom(),e.prototype.destroy.call(this)},t.prototype.init=function(){e.prototype.init.call(this),this.initContainer(),this.initDom(),this.resetStyles(),this.applyStyles(),this.initEvent(),this.initCapture(),this.initVisible()},t.prototype.initCapture=function(){this.setCapture(this.get("capture"))},t.prototype.initVisible=function(){this.get("visible")?this.show():this.hide()},t.prototype.initDom=function(){},t.prototype.initContainer=function(){var e=this.get("container");if((0,E.UM)(e)){e=this.createDom();var t=this.get("parent");(0,E.HD)(t)&&(t=document.getElementById(t),this.set("parent",t)),t.appendChild(e),this.get("containerId")&&e.setAttribute("id",this.get("containerId")),this.set("container",e)}else(0,E.HD)(e)&&(e=document.getElementById(e),this.set("container",e));this.get("parent")||this.set("parent",e.parentNode)},t.prototype.resetStyles=function(){var e=this.get("domStyles"),t=this.get("defaultStyles");e=e?(0,E.b$)({},t,e):t,this.set("domStyles",e)},t.prototype.applyStyles=function(){var e=this.get("domStyles");if(e){var t=this.getContainer();this.applyChildrenStyles(t,e);var n,r=this.get("containerClassName");r&&(n=r,t.className.match(new RegExp("(\\s|^)"+n+"(\\s|$)")))&&j(t,e[r])}},t.prototype.applyChildrenStyles=function(e,t){(0,E.S6)(t,(function(t,n){var r=e.getElementsByClassName(n);(0,E.S6)(r,(function(e){j(e,t)}))}))},t.prototype.applyStyle=function(e,t){j(t,this.get("domStyles")[e])},t.prototype.createDom=function(){return D(this.get("containerTpl"))},t.prototype.initEvent=function(){},t.prototype.removeDom=function(){var e=this.get("container");e&&e.parentNode&&e.parentNode.removeChild(e)},t.prototype.removeEvent=function(){},t.prototype.updateInner=function(e){(0,E.wH)(e,"domStyles")&&(this.resetStyles(),this.applyStyles()),this.resetPosition()},t.prototype.resetPosition=function(){},t}(Yi);const Ia=Ma;var $a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,S.pi)((0,S.pi)({},t),{name:"annotation",type:"html",locationType:"point",x:0,y:0,containerTpl:'',alignX:"left",alignY:"top",html:"",zIndex:7})},t.prototype.render=function(){var e=this.getContainer(),t=this.get("html");ji(e);var n=(0,E.mf)(t)?t(e):t;if((0,E.kK)(n))e.appendChild(n);else if((0,E.HD)(n)||(0,E.hj)(n)){var r=D(""+n);r&&e.appendChild(r)}this.resetPosition()},t.prototype.resetPosition=function(){var e,t,n,r,o,i,a,l,s=this.getContainer(),c=this.getLocation(),u=c.x,d=c.y,f=this.get("alignX"),p=this.get("alignY"),h=this.get("offsetX"),g=this.get("offsetY"),m=(n=function(e,t){var n=Oa(e,"width",t);return"auto"===n&&(n=e.offsetWidth),parseFloat(n)}(e=s,t),r=parseFloat(Oa(e,"borderLeftWidth"))||0,o=parseFloat(Oa(e,"paddingLeft"))||0,i=parseFloat(Oa(e,"paddingRight"))||0,a=parseFloat(Oa(e,"borderRightWidth"))||0,l=parseFloat(Oa(e,"marginRight"))||0,n+r+a+o+i+(parseFloat(Oa(e,"marginLeft"))||0)+l),v=function(e,t){var n=function(e,t){var n=Oa(e,"height",t);return"auto"===n&&(n=e.offsetHeight),parseFloat(n)}(e,t),r=parseFloat(Oa(e,"borderTopWidth"))||0,o=parseFloat(Oa(e,"paddingTop"))||0,i=parseFloat(Oa(e,"paddingBottom"))||0;return n+r+(parseFloat(Oa(e,"borderBottomWidth"))||0)+o+i+(parseFloat(Oa(e,"marginTop"))||0)+(parseFloat(Oa(e,"marginBottom"))||0)}(s),y={x:u,y:d};"middle"===f?y.x-=Math.round(m/2):"right"===f&&(y.x-=Math.round(m)),"middle"===p?y.y-=Math.round(v/2):"bottom"===p&&(y.y-=Math.round(v)),h&&(y.x+=h),g&&(y.y+=g),j(s,{position:"absolute",left:y.x+"px",top:y.y+"px",zIndex:this.get("zIndex")})},t}(Ia);const _a=$a;function Pa(e,t,n){var r=t+"Style",o=null;return(0,E.S6)(n,(function(t,n){e[n]&&t[r]&&(o||(o={}),(0,E.CD)(o,t[r]))})),o}var Aa=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,S.pi)((0,S.pi)({},t),{name:"axis",ticks:[],line:{},tickLine:{},subTickLine:null,title:null,label:{},verticalFactor:1,verticalLimitLength:null,overlapOrder:["autoRotate","autoEllipsis","autoHide"],tickStates:{},optimize:{},defaultCfg:{line:{style:{lineWidth:1,stroke:ca.lineColor}},tickLine:{style:{lineWidth:1,stroke:ca.lineColor},alignTick:!0,length:5,displayWithLabel:!0},subTickLine:{style:{lineWidth:1,stroke:ca.lineColor},count:4,length:2},label:{autoRotate:!0,autoHide:!1,autoEllipsis:!1,style:{fontSize:12,fill:ca.textColor,fontFamily:ca.fontFamily,fontWeight:"normal"},offset:10,offsetX:0,offsetY:0},title:{autoRotate:!0,spacing:5,position:"center",style:{fontSize:12,fill:ca.textColor,textBaseline:"middle",fontFamily:ca.fontFamily,textAlign:"center"},iconStyle:{fill:ca.descriptionIconFill,stroke:ca.descriptionIconStroke},description:""},tickStates:{active:{labelStyle:{fontWeight:500},tickLineStyle:{lineWidth:2}},inactive:{labelStyle:{fill:ca.uncheckedColor}}},optimize:{enable:!0,threshold:400}},theme:{}})},t.prototype.renderInner=function(e){this.get("line")&&this.drawLine(e),this.drawTicks(e),this.get("title")&&this.drawTitle(e)},t.prototype.isList=function(){return!0},t.prototype.getItems=function(){return this.get("ticks")},t.prototype.setItems=function(e){this.update({ticks:e})},t.prototype.updateItem=function(e,t){(0,E.CD)(e,t),this.clear(),this.render()},t.prototype.clearItems=function(){var e=this.getElementByLocalId("label-group");e&&e.clear()},t.prototype.setItemState=function(e,t,n){e[t]=n,this.updateTickStates(e)},t.prototype.hasState=function(e,t){return!!e[t]},t.prototype.getItemStates=function(e){var t=this.get("tickStates"),n=[];return(0,E.S6)(t,(function(t,r){e[r]&&n.push(r)})),n},t.prototype.clearItemsState=function(e){var t=this,n=this.getItemsByState(e);(0,E.S6)(n,(function(n){t.setItemState(n,e,!1)}))},t.prototype.getItemsByState=function(e){var t=this,n=this.getItems();return(0,E.hX)(n,(function(n){return t.hasState(n,e)}))},t.prototype.getSidePoint=function(e,t){var n=this.getSideVector(t,e);return{x:e.x+n[0],y:e.y+n[1]}},t.prototype.getTextAnchor=function(e){var t;return(0,E.vQ)(e[0],0)?t="center":e[0]>0?t="start":e[0]<0&&(t="end"),t},t.prototype.getTextBaseline=function(e){var t;return(0,E.vQ)(e[1],0)?t="middle":e[1]>0?t="top":e[1]<0&&(t="bottom"),t},t.prototype.processOverlap=function(e){},t.prototype.drawLine=function(e){var t=this.getLinePath(),n=this.get("line");this.addShape(e,{type:"path",id:this.getElementId("line"),name:"axis-line",attrs:(0,E.CD)({path:t},n.style)})},t.prototype.getTickLineItems=function(e){var t=this,n=[],r=this.get("tickLine"),o=r.alignTick,i=r.length,a=1;return e.length>=2&&(a=e[1].value-e[0].value),(0,E.S6)(e,(function(e){var r=e.point;o||(r=t.getTickPoint(e.value-a/2));var l=t.getSidePoint(r,i);n.push({startPoint:r,tickValue:e.value,endPoint:l,tickId:e.id,id:"tickline-"+e.id})})),n},t.prototype.getSubTickLineItems=function(e){var t=[],n=this.get("subTickLine"),r=n.count,o=e.length;if(o>=2)for(var i=0;i0){var n=(0,E.dp)(t);if(n>e.threshold){var r=Math.ceil(n/e.threshold),o=t.filter((function(e,t){return t%r==0}));this.set("ticks",o),this.set("originalTicks",t)}}},t.prototype.getLabelAttrs=function(e,t,n){var r=this.get("label"),o=r.offset,i=r.offsetX,a=r.offsetY,l=r.rotate,s=r.formatter,c=this.getSidePoint(e.point,o),u=this.getSideVector(o,c),d=s?s(e.name,e,t):e.name,f=r.style;f=(0,E.mf)(f)?(0,E.U2)(this.get("theme"),["label","style"],{}):f;var p=(0,E.CD)({x:c.x+i,y:c.y+a,text:d,textAlign:this.getTextAnchor(u),textBaseline:this.getTextBaseline(u)},f);return l&&(p.matrix=Ai(c,l)),p},t.prototype.drawLabels=function(e){var t=this,n=this.get("ticks"),r=this.addGroup(e,{name:"axis-label-group",id:this.getElementId("label-group")});(0,E.S6)(n,(function(e,o){t.addShape(r,{type:"text",name:"axis-label",id:t.getElementId("label-"+e.id),attrs:t.getLabelAttrs(e,o,n),delegateObject:{tick:e,item:e,index:o}})})),this.processOverlap(r);var o=r.getChildren(),i=(0,E.U2)(this.get("theme"),["label","style"],{}),a=this.get("label"),l=a.style,s=a.formatter;if((0,E.mf)(l)){var c=o.map((function(e){return(0,E.U2)(e.get("delegateObject"),"tick")}));(0,E.S6)(o,(function(e,t){var n=e.get("delegateObject").tick,r=s?s(n.name,n,t):n.name,o=(0,E.CD)({},i,l(r,t,c));e.attr(o)}))}},t.prototype.getTitleAttrs=function(){var e=this.get("title"),t=e.style,n=e.position,r=e.offset,o=e.spacing,i=void 0===o?0:o,a=e.autoRotate,l=t.fontSize,s=.5;"start"===n?s=0:"end"===n&&(s=1);var c=this.getTickPoint(s),u=this.getSidePoint(c,r||i+l/2),d=(0,E.CD)({x:u.x,y:u.y,text:e.text},t),f=e.rotate,p=f;if((0,E.UM)(f)&&a){var h=this.getAxisVector(c);p=se.Dg(h,[1,0],!0)}if(p){var g=Ai(u,p);d.matrix=g}return d},t.prototype.drawTitle=function(e){var t,n=this.getTitleAttrs(),r=this.addShape(e,{type:"text",id:this.getElementId("title"),name:"axis-title",attrs:n});(null===(t=this.get("title"))||void 0===t?void 0:t.description)&&this.drawDescriptionIcon(e,r,n.matrix)},t.prototype.drawDescriptionIcon=function(e,t,n){var r=this.addGroup(e,{name:"axis-description",id:this.getElementById("description")}),o=t.getBBox(),i=o.maxX,a=o.maxY,l=o.height,s=this.get("title").iconStyle,c=l/2,u=c/6,d=i+4,f=a-l/2,p=[d+c,f-c],h=p[0],g=p[1],m=[h+c,g+c],v=m[0],y=m[1],b=[h,y+c],x=b[0],w=b[1],E=[d,g+c],C=E[0],k=E[1],O=[d+c,f-l/4],M=O[0],I=O[1],$=[M,I+u],_=$[0],P=$[1],A=[_,P+u],N=A[0],T=A[1],R=[N,T+3*c/4],L=R[0],D=R[1];this.addShape(r,{type:"path",id:this.getElementId("title-description-icon"),name:"axis-title-description-icon",attrs:(0,S.pi)({path:[["M",h,g],["A",c,c,0,0,1,v,y],["A",c,c,0,0,1,x,w],["A",c,c,0,0,1,C,k],["A",c,c,0,0,1,h,g],["M",M,I],["L",_,P],["M",N,T],["L",L,D]],lineWidth:u,matrix:n},s)}),this.addShape(r,{type:"rect",id:this.getElementId("title-description-rect"),name:"axis-title-description-rect",attrs:{x:d,y:f-l/2,width:l,height:l,stroke:"#000",fill:"#000",opacity:0,matrix:n,cursor:"pointer"}})},t.prototype.applyTickStates=function(e,t){if(this.getItemStates(e).length){var n=this.get("tickStates"),r=this.getElementId("label-"+e.id),o=t.findById(r);if(o){var i=Pa(e,"label",n);i&&o.attr(i)}var a=this.getElementId("tickline-"+e.id),l=t.findById(a);if(l){var s=Pa(e,"tickLine",n);s&&l.attr(s)}}},t.prototype.updateTickStates=function(e){var t=this.getItemStates(e),n=this.get("tickStates"),r=this.get("label"),o=this.getElementByLocalId("label-"+e.id),i=this.get("tickLine"),a=this.getElementByLocalId("tickline-"+e.id);if(t.length){if(o){var l=Pa(e,"label",n);l&&o.attr(l)}if(a){var s=Pa(e,"tickLine",n);s&&a.attr(s)}}else o&&o.attr(r.style),a&&a.attr(i.style)},t}(ea);const Na=Aa;function Ta(e,t,n,r){var o=t.getChildren(),i=!1;return(0,E.S6)(o,(function(t){var o=la(e,t,n,r);i=i||o})),i}function Ra(){return Da}function La(e,t,n){return Ta(e,t,n,"head")}function Da(e,t,n){return Ta(e,t,n,"tail")}function ja(e,t,n){return Ta(e,t,n,"middle")}function Fa(e){var t=function(e){var t=e.attr("matrix");return t&&1!==t[0]}(e)?function(e){var t=[0,0,0];return Sr(t,[1,0,0],e),Math.atan2(t[1],t[0])}(e.attr("matrix")):0;return t%360}function Ba(e,t,n,r){var o=!1,i=Fa(t),a=e?Math.abs(n.attr("y")-t.attr("y")):Math.abs(n.attr("x")-t.attr("x")),l=(e?n.attr("y")>t.attr("y"):n.attr("x")>t.attr("x"))?t.getBBox():n.getBBox();if(e){var s=Math.abs(Math.cos(i));o=Ui(s,0,Math.PI/180)?l.width+r>a:l.height/s+r>a}else s=Math.abs(Math.sin(i)),o=Ui(s,0,Math.PI/180)?l.width+r>a:l.height/s+r>a;return o}function za(e,t,n,r){var o=(null==r?void 0:r.minGap)||0,i=t.getChildren().slice().filter((function(e){return e.get("visible")}));if(!i.length)return!1;var a=!1;n&&i.reverse();for(var l=i.length,s=i[0],c=1;c1){f=Math.ceil(f);for(var h=0;h2){var a=o[0],l=o[o.length-1];a.get("visible")||(a.show(),za(e,t,!1,r)&&(i=!0)),l.get("visible")||(l.show(),za(e,t,!0,r)&&(i=!0))}return i}function Ya(e,t,n,r){var o=t.getChildren();if(!o.length)return!1;if(!e&&o.length<2)return!1;var i=aa(o),a=!1;return(a=e?!!n&&i>n:i>Math.abs(o[1].attr("x")-o[0].attr("x")))&&function(e,t){(0,E.S6)(e,(function(e){var n=Ai({x:e.attr("x"),y:e.attr("y")},t);e.attr("matrix",n)}))}(o,r(n,i)),a}function Ka(){return Za}function Za(e,t,n,r){return Ya(e,t,n,(function(){return(0,E.hj)(r)?r:e?ca.verticalAxisRotate:ca.horizontalAxisRotate}))}function Ja(e,t,n){return Ya(e,t,n,(function(t,n){if(!t)return e?ca.verticalAxisRotate:ca.horizontalAxisRotate;if(e)return-Math.acos(t/n);var r=0;return(t>n||(r=Math.asin(t/n))>Math.PI/4)&&(r=Math.PI/4),r}))}var Qa=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,S.pi)((0,S.pi)({},t),{type:"line",locationType:"region",start:null,end:null})},t.prototype.getLinePath=function(){var e=this.get("start"),t=this.get("end"),n=[];return n.push(["M",e.x,e.y]),n.push(["L",t.x,t.y]),n},t.prototype.getInnerLayoutBBox=function(){var t=this.get("start"),n=this.get("end"),r=e.prototype.getInnerLayoutBBox.call(this),o=Math.min(t.x,n.x,r.x),i=Math.min(t.y,n.y,r.y),a=Math.max(t.x,n.x,r.maxX),l=Math.max(t.y,n.y,r.maxY);return{x:o,y:i,minX:o,minY:i,maxX:a,maxY:l,width:a-o,height:l-i}},t.prototype.isVertical=function(){var e=this.get("start"),t=this.get("end");return(0,E.vQ)(e.x,t.x)},t.prototype.isHorizontal=function(){var e=this.get("start"),t=this.get("end");return(0,E.vQ)(e.y,t.y)},t.prototype.getTickPoint=function(e){var t=this.get("start"),n=this.get("end"),r=n.x-t.x,o=n.y-t.y;return{x:t.x+r*e,y:t.y+o*e}},t.prototype.getSideVector=function(e){var t=this.getAxisVector(),n=$r.Fv([0,0],t),r=this.get("verticalFactor"),o=[n[1],-1*n[0]];return $r.bA([0,0],o,e*r)},t.prototype.getAxisVector=function(){var e=this.get("start"),t=this.get("end");return[t.x-e.x,t.y-e.y]},t.prototype.processOverlap=function(e){var t=this,n=this.isVertical(),r=this.isHorizontal();if(n||r){var o=this.get("label"),i=this.get("title"),a=this.get("verticalLimitLength"),l=o.offset,s=a,c=0,u=0;i&&(c=i.style.fontSize,u=i.spacing),s&&(s=s-l-u-c);var d=this.get("overlapOrder");if((0,E.S6)(d,(function(n){o[n]&&t.canProcessOverlap(n)&&t.autoProcessOverlap(n,o[n],e,s)})),i&&(0,E.UM)(i.offset)){var f=e.getCanvasBBox(),p=n?f.width:f.height;i.offset=l+p+u+c/2}}},t.prototype.canProcessOverlap=function(e){var t=this.get("label");return"autoRotate"!==e||(0,E.UM)(t.rotate)},t.prototype.autoProcessOverlap=function(e,t,n,r){var o=this,i=this.isVertical(),a=!1,l=s[e];if(!0===t)this.get("label"),a=l.getDefault()(i,n,r);else if((0,E.mf)(t))a=t(i,n,r);else if((0,E.Kn)(t)){var c=t;l[c.type]&&(a=l[c.type](i,n,r,c.cfg))}else l[t]&&(a=l[t](i,n,r));if("autoRotate"===e){if(a){var u=n.getChildren(),d=this.get("verticalFactor");(0,E.S6)(u,(function(e){if("center"===e.attr("textAlign")){var t=d>0?"end":"start";e.attr("textAlign",t)}}))}}else if("autoHide"===e){var f=n.getChildren().slice(0);(0,E.S6)(f,(function(e){e.get("visible")||(o.get("isRegister")&&o.unregisterElement(e),e.remove())}))}},t}(Na);const el=Qa;var tl=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,S.pi)((0,S.pi)({},t),{type:"circle",locationType:"circle",center:null,radius:null,startAngle:-Math.PI/2,endAngle:3*Math.PI/2})},t.prototype.getLinePath=function(){var e=this.get("center"),t=e.x,n=e.y,r=this.get("radius"),o=r,i=this.get("startAngle"),a=this.get("endAngle"),l=[];if(Math.abs(a-i)===2*Math.PI)l=[["M",t,n-o],["A",r,o,0,1,1,t,n+o],["A",r,o,0,1,1,t,n-o],["Z"]];else{var s=this.getCirclePoint(i),c=this.getCirclePoint(a),u=Math.abs(a-i)>Math.PI?1:0,d=i>a?0:1;l=[["M",t,n],["L",s.x,s.y],["A",r,o,0,u,d,c.x,c.y],["L",t,n]]}return l},t.prototype.getTickPoint=function(e){var t=this.get("startAngle"),n=t+(this.get("endAngle")-t)*e;return this.getCirclePoint(n)},t.prototype.getSideVector=function(e,t){var n=this.get("center"),r=[t.x-n.x,t.y-n.y],o=this.get("verticalFactor"),i=$r.kE(r);return $r.bA(r,r,o*e/i),r},t.prototype.getAxisVector=function(e){var t=this.get("center"),n=[e.x-t.x,e.y-t.y];return[n[1],-1*n[0]]},t.prototype.getCirclePoint=function(e,t){var n=this.get("center");return t=t||this.get("radius"),{x:n.x+Math.cos(e)*t,y:n.y+Math.sin(e)*t}},t.prototype.canProcessOverlap=function(e){var t=this.get("label");return"autoRotate"!==e||(0,E.UM)(t.rotate)},t.prototype.processOverlap=function(e){var t=this,n=this.get("label"),r=this.get("title"),o=this.get("verticalLimitLength"),i=n.offset,a=o,l=0,s=0;r&&(l=r.style.fontSize,s=r.spacing),a&&(a=a-i-s-l);var c=this.get("overlapOrder");if((0,E.S6)(c,(function(r){n[r]&&t.canProcessOverlap(r)&&t.autoProcessOverlap(r,n[r],e,a)})),r&&(0,E.UM)(r.offset)){var u=e.getCanvasBBox().height;r.offset=i+u+s+l/2}},t.prototype.autoProcessOverlap=function(e,t,n,r){var o=this,i=!1,a=s[e];if(r>0)if(!0===t)i=a.getDefault()(!1,n,r);else if((0,E.mf)(t))i=t(!1,n,r);else if((0,E.Kn)(t)){var l=t;a[l.type]&&(i=a[l.type](!1,n,r,l.cfg))}else a[t]&&(i=a[t](!1,n,r));if("autoRotate"===e){if(i){var c=n.getChildren(),u=this.get("verticalFactor");(0,E.S6)(c,(function(e){if("center"===e.attr("textAlign")){var t=u>0?"end":"start";e.attr("textAlign",t)}}))}}else if("autoHide"===e){var d=n.getChildren().slice(0);(0,E.S6)(d,(function(e){e.get("visible")||(o.get("isRegister")&&o.unregisterElement(e),e.remove())}))}},t}(Na);const nl=tl;var rl=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,S.pi)((0,S.pi)({},t),{name:"crosshair",type:"base",line:{},text:null,textBackground:{},capture:!1,defaultCfg:{line:{style:{lineWidth:1,stroke:ca.lineColor}},text:{position:"start",offset:10,autoRotate:!1,content:null,style:{fill:ca.textColor,textAlign:"center",textBaseline:"middle",fontFamily:ca.fontFamily}},textBackground:{padding:5,style:{stroke:ca.lineColor}}}})},t.prototype.renderInner=function(e){this.get("line")&&this.renderLine(e),this.get("text")&&(this.renderText(e),this.renderBackground(e))},t.prototype.renderText=function(e){var t=this.get("text"),n=t.style,r=t.autoRotate,o=t.content;if(!(0,E.UM)(o)){var i=this.getTextPoint(),a=null;r&&(a=Ai(i,this.getRotateAngle())),this.addShape(e,{type:"text",name:"crosshair-text",id:this.getElementId("text"),attrs:(0,S.pi)((0,S.pi)((0,S.pi)({},i),{text:o,matrix:a}),n)})}},t.prototype.renderLine=function(e){var t=this.getLinePath(),n=this.get("line").style;this.addShape(e,{type:"path",name:"crosshair-line",id:this.getElementId("line"),attrs:(0,S.pi)({path:t},n)})},t.prototype.renderBackground=function(e){var t=this.getElementId("text"),n=e.findById(t),r=this.get("textBackground");if(r&&n){var o=n.getBBox(),i=Di(r.padding),a=r.style;this.addShape(e,{type:"rect",name:"crosshair-text-background",id:this.getElementId("text-background"),attrs:(0,S.pi)({x:o.x-i[3],y:o.y-i[0],width:o.width+i[1]+i[3],height:o.height+i[0]+i[2],matrix:n.attr("matrix")},a)}).toBack()}},t}(ea);const ol=rl;var il=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,S.pi)((0,S.pi)({},t),{type:"line",locationType:"region",start:null,end:null})},t.prototype.getRotateAngle=function(){var e=this.getLocation(),t=e.start,n=e.end,r=this.get("text").position,o=Math.atan2(n.y-t.y,n.x-t.x);return"start"===r?o-Math.PI/2:o+Math.PI/2},t.prototype.getTextPoint=function(){var e=this.getLocation(),t=e.start,n=e.end,r=this.get("text");return Xi(t,n,r.position,r.offset)},t.prototype.getLinePath=function(){var e=this.getLocation(),t=e.start,n=e.end;return[["M",t.x,t.y],["L",n.x,n.y]]},t}(ol);const al=il;var ll=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,S.pi)((0,S.pi)({},t),{type:"circle",locationType:"circle",center:null,radius:100,startAngle:-Math.PI/2,endAngle:3*Math.PI/2})},t.prototype.getRotateAngle=function(){var e=this.getLocation(),t=e.startAngle,n=e.endAngle;return"start"===this.get("text").position?t+Math.PI/2:n-Math.PI/2},t.prototype.getTextPoint=function(){var e=this.get("text"),t=e.position,n=e.offset,r=this.getLocation(),o=r.center,i=r.radius,a=r.startAngle,l=r.endAngle,s="start"===t?a:l,c=this.getRotateAngle()-Math.PI,u=Hi(o,i,s),d=Math.cos(c)*n,f=Math.sin(c)*n;return{x:u.x+d,y:u.y+f}},t.prototype.getLinePath=function(){var e=this.getLocation(),t=e.center,n=e.radius,r=e.startAngle,o=e.endAngle,i=null;if(o-r==2*Math.PI){var a=t.x,l=t.y;i=[["M",a,l-n],["A",n,n,0,1,1,a,l+n],["A",n,n,0,1,1,a,l-n],["Z"]]}else{var s=Hi(t,n,r),c=Hi(t,n,o),u=Math.abs(o-r)>Math.PI?1:0,d=r>o?0:1;i=[["M",s.x,s.y],["A",n,n,0,u,d,c.x,c.y]]}return i},t}(ol);const sl=ll;var cl,ul="g2-crosshair",dl=ul+"-line",fl=ul+"-text";const pl=((cl={})[""+ul]={position:"relative"},cl[""+dl]={position:"absolute",backgroundColor:"rgba(0, 0, 0, 0.25)"},cl[""+fl]={position:"absolute",color:ca.textColor,fontFamily:ca.fontFamily},cl);var hl=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,S.pi)((0,S.pi)({},t),{name:"crosshair",type:"html",locationType:"region",start:{x:0,y:0},end:{x:0,y:0},capture:!1,text:null,containerTpl:'',crosshairTpl:'',textTpl:'{content}',domStyles:null,containerClassName:ul,defaultStyles:pl,defaultCfg:{text:{position:"start",content:null,align:"center",offset:10}}})},t.prototype.render=function(){this.resetText(),this.resetPosition()},t.prototype.initCrossHair=function(){var e=this.getContainer(),t=D(this.get("crosshairTpl"));e.appendChild(t),this.applyStyle(dl,t),this.set("crosshairEl",t)},t.prototype.getTextPoint=function(){var e=this.getLocation(),t=e.start,n=e.end,r=this.get("text");return Xi(t,n,r.position,r.offset)},t.prototype.resetText=function(){var e=this.get("text"),t=this.get("textEl");if(e){var n=e.content;if(!t){var r=this.getContainer();t=D((0,E.ng)(this.get("textTpl"),e)),r.appendChild(t),this.applyStyle(fl,t),this.set("textEl",t)}t.innerHTML=n}else t&&t.remove()},t.prototype.isVertical=function(e,t){return e.x===t.x},t.prototype.resetPosition=function(){var e=this.get("crosshairEl");e||(this.initCrossHair(),e=this.get("crosshairEl"));var t=this.get("start"),n=this.get("end"),r=Math.min(t.x,n.x),o=Math.min(t.y,n.y);this.isVertical(t,n)?j(e,{width:"1px",height:Vi(Math.abs(n.y-t.y))}):j(e,{height:"1px",width:Vi(Math.abs(n.x-t.x))}),j(e,{top:Vi(o),left:Vi(r)}),this.alignText()},t.prototype.alignText=function(){var e=this.get("textEl");if(e){var t=this.get("text").align,n=e.clientWidth,r=this.getTextPoint();switch(t){case"center":r.x=r.x-n/2;break;case"right":r.x=r.x-n}j(e,{top:Vi(r.y),left:Vi(r.x)})}},t.prototype.updateInner=function(t){(0,E.wH)(t,"text")&&this.resetText(),e.prototype.updateInner.call(this,t)},t}(Ia);const gl=hl;var ml=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,S.pi)((0,S.pi)({},t),{name:"grid",line:{},alternateColor:null,capture:!1,items:[],closed:!1,defaultCfg:{line:{type:"line",style:{lineWidth:1,stroke:ca.lineColor}}}})},t.prototype.getLineType=function(){return(this.get("line")||this.get("defaultCfg").line).type},t.prototype.renderInner=function(e){this.drawGrid(e)},t.prototype.getAlternatePath=function(e,t){var n=this.getGridPath(e),r=t.slice(0).reverse(),o=this.getGridPath(r,!0);return this.get("closed")?n=n.concat(o):(o[0][0]="L",(n=n.concat(o)).push(["Z"])),n},t.prototype.getPathStyle=function(){return this.get("line").style},t.prototype.drawGrid=function(e){var t=this,n=this.get("line"),r=this.get("items"),o=this.get("alternateColor"),i=null;(0,E.S6)(r,(function(a,l){var s=a.id||l;if(n){var c=t.getPathStyle();c=(0,E.mf)(c)?c(a,l,r):c;var u=t.getElementId("line-"+s),d=t.getGridPath(a.points);t.addShape(e,{type:"path",name:"grid-line",id:u,attrs:(0,E.CD)({path:d},c)})}if(o&&l>0){var f=t.getElementId("region-"+s),p=l%2==0;if((0,E.HD)(o))p&&t.drawAlternateRegion(f,e,i.points,a.points,o);else{var h=p?o[1]:o[0];t.drawAlternateRegion(f,e,i.points,a.points,h)}}i=a}))},t.prototype.drawAlternateRegion=function(e,t,n,r,o){var i=this.getAlternatePath(n,r);this.addShape(t,{type:"path",id:e,name:"grid-region",attrs:{path:i,fill:o}})},t}(ea);const vl=ml;var yl=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,S.pi)((0,S.pi)({},t),{type:"circle",center:null,closed:!0})},t.prototype.getGridPath=function(e,t){var n,r,o,i,a=this.getLineType(),l=this.get("closed"),s=[];if(e.length)if("circle"===a){var c=this.get("center"),u=e[0],d=(n=c.x,r=c.y,o=u.x-n,i=u.y-r,Math.sqrt(o*o+i*i)),f=t?0:1;l?(s.push(["M",c.x,c.y-d]),s.push(["A",d,d,0,0,f,c.x,c.y+d]),s.push(["A",d,d,0,0,f,c.x,c.y-d]),s.push(["Z"])):(0,E.S6)(e,(function(e,t){0===t?s.push(["M",e.x,e.y]):s.push(["A",d,d,0,0,f,e.x,e.y])}))}else(0,E.S6)(e,(function(e,t){0===t?s.push(["M",e.x,e.y]):s.push(["L",e.x,e.y])})),l&&s.push(["Z"]);return s},t}(vl);const bl=yl;var xl=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,S.pi)((0,S.pi)({},t),{type:"line"})},t.prototype.getGridPath=function(e){var t=[];return(0,E.S6)(e,(function(e,n){0===n?t.push(["M",e.x,e.y]):t.push(["L",e.x,e.y])})),t},t}(vl);const wl=xl;var Sl=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,S.pi)((0,S.pi)({},t),{name:"legend",layout:"horizontal",locationType:"point",x:0,y:0,offsetX:0,offsetY:0,title:null,background:null})},t.prototype.getLayoutBBox=function(){var t=e.prototype.getLayoutBBox.call(this),n=this.get("maxWidth"),r=this.get("maxHeight"),o=t.width,i=t.height;return n&&(o=Math.min(o,n)),r&&(i=Math.min(i,r)),Bi(t.minX,t.minY,o,i)},t.prototype.setLocation=function(e){this.set("x",e.x),this.set("y",e.y),this.resetLocation()},t.prototype.resetLocation=function(){var e=this.get("x"),t=this.get("y"),n=this.get("offsetX"),r=this.get("offsetY");this.moveElementTo(this.get("group"),{x:e+n,y:t+r})},t.prototype.applyOffset=function(){this.resetLocation()},t.prototype.getDrawPoint=function(){return this.get("currentPoint")},t.prototype.setDrawPoint=function(e){return this.set("currentPoint",e)},t.prototype.renderInner=function(e){this.resetDraw(),this.get("title")&&this.drawTitle(e),this.drawLegendContent(e),this.get("background")&&this.drawBackground(e)},t.prototype.drawBackground=function(e){var t=this.get("background"),n=e.getBBox(),r=Di(t.padding),o=(0,S.pi)({x:0,y:0,width:n.width+r[1]+r[3],height:n.height+r[0]+r[2]},t.style);this.addShape(e,{type:"rect",id:this.getElementId("background"),name:"legend-background",attrs:o}).toBack()},t.prototype.drawTitle=function(e){var t=this.get("currentPoint"),n=this.get("title"),r=n.spacing,o=n.style,i=n.text,a=this.addShape(e,{type:"text",id:this.getElementId("title"),name:"legend-title",attrs:(0,S.pi)({text:i,x:t.x,y:t.y},o)}).getBBox();this.set("currentPoint",{x:t.x,y:a.maxY+r})},t.prototype.resetDraw=function(){var e=this.get("background"),t={x:0,y:0};if(e){var n=Di(e.padding);t.x=n[3],t.y=n[0]}this.set("currentPoint",t)},t}(ea);const El=Sl;var Cl={marker:{style:{inactiveFill:"#000",inactiveOpacity:.45,fill:"#000",opacity:1,size:12}},text:{style:{fill:"#ccc",fontSize:12}}},kl={fill:ca.textColor,fontSize:12,textAlign:"start",textBaseline:"middle",fontFamily:ca.fontFamily,fontWeight:"normal",lineHeight:12},Ol="navigation-arrow-right",Ml="navigation-arrow-left",Il={right:90*Math.PI/180,left:270*Math.PI/180,up:0,down:180*Math.PI/180},$l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.currentPageIndex=1,t.totalPagesCnt=1,t.pageWidth=0,t.pageHeight=0,t.startX=0,t.startY=0,t.onNavigationBack=function(){var e=t.getElementByLocalId("item-group");if(t.currentPageIndex>1){t.currentPageIndex-=1,t.updateNavigation();var n=t.getCurrentNavigationMatrix();t.get("animate")?e.animate({matrix:n},100):e.attr({matrix:n})}},t.onNavigationAfter=function(){var e=t.getElementByLocalId("item-group");if(t.currentPageIndexh&&(h=y),"horizontal"===d?(g&&gl}(e,g))&&(1===m&&(v=g.x+u,n.moveElementTo(p,{x:C,y:g.y+d/2-h.height/2-h.minY})),m+=1,g.x=r,g.y+=S),n.moveElementTo(e,g),e.getParent().setClip({type:"rect",attrs:{x:g.x,y:g.y,width:o+u,height:d}}),g.x+=o+u}))}else{(0,E.S6)(a,(function(e){var t=e.getBBox();t.width>y&&(y=t.width)})),b=y,y+=u,l&&(y=Math.min(l,y),b=Math.min(l,b)),this.pageWidth=y,this.pageHeight=s-Math.max(h.height,d+x);var k=Math.floor(this.pageHeight/(d+x));(0,E.S6)(a,(function(e,t){0!==t&&t%k==0&&(m+=1,g.x+=y,g.y=o),n.moveElementTo(e,g),e.getParent().setClip({type:"rect",attrs:{x:g.x,y:g.y,width:y,height:d}}),g.y+=d+x})),this.totalPagesCnt=m,this.moveElementTo(p,{x:r+b/2-h.width/2-h.minX,y:s-h.height-h.minY})}this.pageHeight&&this.pageWidth&&t.getParent().setClip({type:"rect",attrs:{x:this.startX,y:this.startY,width:this.pageWidth,height:this.pageHeight}}),"horizontal"===i&&this.get("maxRow")?this.totalPagesCnt=Math.ceil(m/this.get("maxRow")):this.totalPagesCnt=m,this.currentPageIndex>this.totalPagesCnt&&(this.currentPageIndex=1),this.updateNavigation(p),t.attr("matrix",this.getCurrentNavigationMatrix())},t.prototype.drawNavigation=function(e,t,n,r){var o={x:0,y:0},i=this.addGroup(e,{id:this.getElementId("navigation-group"),name:"legend-navigation"}),a=(0,E.U2)(r.marker,"style",{}),l=a.size,s=void 0===l?12:l,c=(0,S._T)(a,["size"]),u=this.drawArrow(i,o,Ml,"horizontal"===t?"up":"left",s,c);u.on("click",this.onNavigationBack);var d=u.getBBox();o.x+=d.width+2;var f=this.addShape(i,{type:"text",id:this.getElementId("navigation-text"),name:"navigation-text",attrs:(0,S.pi)({x:o.x,y:o.y+s/2,text:n,textBaseline:"middle"},(0,E.U2)(r.text,"style"))}).getBBox();return o.x+=f.width+2,this.drawArrow(i,o,Ol,"horizontal"===t?"down":"right",s,c).on("click",this.onNavigationAfter),i},t.prototype.updateNavigation=function(e){var t=(0,E.b$)({},Cl,this.get("pageNavigator")).marker.style,n=t.fill,r=t.opacity,o=t.inactiveFill,i=t.inactiveOpacity,a=this.currentPageIndex+"/"+this.totalPagesCnt,l=e?e.getChildren()[1]:this.getElementByLocalId("navigation-text"),s=e?e.findById(this.getElementId(Ml)):this.getElementByLocalId(Ml),c=e?e.findById(this.getElementId(Ol)):this.getElementByLocalId(Ol);l.attr("text",a),s.attr("opacity",1===this.currentPageIndex?i:r),s.attr("fill",1===this.currentPageIndex?o:n),s.attr("cursor",1===this.currentPageIndex?"not-allowed":"pointer"),c.attr("opacity",this.currentPageIndex===this.totalPagesCnt?i:r),c.attr("fill",this.currentPageIndex===this.totalPagesCnt?o:n),c.attr("cursor",this.currentPageIndex===this.totalPagesCnt?"not-allowed":"pointer");var u=s.getBBox().maxX+2;l.attr("x",u),u+=l.getBBox().width+2,this.updateArrowPath(c,{x:u,y:0})},t.prototype.drawArrow=function(e,t,n,r,o,i){var a=t.x,l=t.y,s=this.addShape(e,{type:"path",id:this.getElementId(n),name:n,attrs:(0,S.pi)({size:o,direction:r,path:[["M",a+o/2,l],["L",a,l+o],["L",a+o,l+o],["Z"]],cursor:"pointer"},i)});return s.attr("matrix",Ai({x:a+o/2,y:l+o/2},Il[r])),s},t.prototype.updateArrowPath=function(e,t){var n=t.x,r=t.y,o=e.attr(),i=o.size,a=o.direction,l=Ai({x:n+i/2,y:r+i/2},Il[a]);e.attr("path",[["M",n+i/2,r],["L",n,r+i],["L",n+i,r+i],["Z"]]),e.attr("matrix",l)},t.prototype.getCurrentNavigationMatrix=function(){var e=this,t=e.currentPageIndex,n=e.pageWidth,r=e.pageHeight;return Ni("horizontal"===this.get("layout")?{x:0,y:r*(1-t)}:{x:n*(1-t),y:0})},t.prototype.applyItemStates=function(e,t){if(this.getItemStates(e).length>0){var n=t.getChildren(),r=this.get("itemStates");(0,E.S6)(n,(function(t){var n=t.get("name").split("-")[2],o=Pa(e,n,r);o&&(t.attr(o),"marker"!==n||t.get("isStroke")&&t.get("isFill")||(t.get("isStroke")&&t.attr("fill",null),t.get("isFill")&&t.attr("stroke",null)))}))}},t.prototype.getLimitItemWidth=function(){var e=this.get("itemWidth"),t=this.get("maxItemWidth");return t?e&&(t=e<=t?e:t):e&&(t=e),t},t}(El);const _l=$l;var Pl=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,S.pi)((0,S.pi)({},t),{type:"continue",min:0,max:100,value:null,colors:[],track:{},rail:{},label:{},handler:{},slidable:!0,tip:null,step:null,maxWidth:null,maxHeight:null,defaultCfg:{label:{align:"rail",spacing:5,formatter:null,style:{fontSize:12,fill:ca.textColor,textBaseline:"middle",fontFamily:ca.fontFamily}},handler:{size:10,style:{fill:"#fff",stroke:"#333"}},track:{},rail:{type:"color",size:20,defaultLength:100,style:{fill:"#DCDEE2"}},title:{spacing:5,style:{fill:ca.textColor,fontSize:12,textAlign:"start",textBaseline:"top"}}}})},t.prototype.isSlider=function(){return!0},t.prototype.getValue=function(){return this.getCurrentValue()},t.prototype.getRange=function(){return{min:this.get("min"),max:this.get("max")}},t.prototype.setRange=function(e,t){this.update({min:e,max:t})},t.prototype.setValue=function(e){var t=this.getValue();this.set("value",e);var n=this.get("group");this.resetTrackClip(),this.get("slidable")&&this.resetHandlers(n),this.delegateEmit("valuechanged",{originValue:t,value:e})},t.prototype.initEvent=function(){var e=this.get("group");this.bindSliderEvent(e),this.bindRailEvent(e),this.bindTrackEvent(e)},t.prototype.drawLegendContent=function(e){this.drawRail(e),this.drawLabels(e),this.fixedElements(e),this.resetTrack(e),this.resetTrackClip(e),this.get("slidable")&&this.resetHandlers(e)},t.prototype.bindSliderEvent=function(e){this.bindHandlersEvent(e)},t.prototype.bindHandlersEvent=function(e){var t=this;e.on("legend-handler-min:drag",(function(e){var n=t.getValueByCanvasPoint(e.x,e.y),r=t.getCurrentValue()[1];rn&&(r=n),t.setValue([r,n])}))},t.prototype.bindRailEvent=function(e){},t.prototype.bindTrackEvent=function(e){var t=this,n=null;e.on("legend-track:dragstart",(function(e){n={x:e.x,y:e.y}})),e.on("legend-track:drag",(function(e){if(n){var r=t.getValueByCanvasPoint(n.x,n.y),o=t.getValueByCanvasPoint(e.x,e.y),i=t.getCurrentValue(),a=i[1]-i[0],l=t.getRange(),s=o-r;s<0?i[0]+s>l.min?t.setValue([i[0]+s,i[1]+s]):t.setValue([l.min,l.min+a]):s>0&&(s>0&&i[1]+so&&(s=o),s0&&this.changeRailLength(r,o,n[o]-c)}},t.prototype.changeRailLength=function(e,t,n){var r,o=e.getBBox();r="height"===t?this.getRailPath(o.x,o.y,o.width,n):this.getRailPath(o.x,o.y,n,o.height),e.attr("path",r)},t.prototype.changeRailPosition=function(e,t,n){var r=e.getBBox(),o=this.getRailPath(t,n,r.width,r.height);e.attr("path",o)},t.prototype.fixedHorizontal=function(e,t,n,r){var o=this.get("label"),i=o.align,a=o.spacing,l=n.getBBox(),s=e.getBBox(),c=t.getBBox(),u=l.height;this.fitRailLength(s,c,l,n),l=n.getBBox(),"rail"===i?(e.attr({x:r.x,y:r.y+u/2}),this.changeRailPosition(n,r.x+s.width+a,r.y),t.attr({x:r.x+s.width+l.width+2*a,y:r.y+u/2})):"top"===i?(e.attr({x:r.x,y:r.y}),t.attr({x:r.x+l.width,y:r.y}),this.changeRailPosition(n,r.x,r.y+s.height+a)):(this.changeRailPosition(n,r.x,r.y),e.attr({x:r.x,y:r.y+l.height+a}),t.attr({x:r.x+l.width,y:r.y+l.height+a}))},t.prototype.fixedVertail=function(e,t,n,r){var o=this.get("label"),i=o.align,a=o.spacing,l=n.getBBox(),s=e.getBBox(),c=t.getBBox();if(this.fitRailLength(s,c,l,n),l=n.getBBox(),"rail"===i)e.attr({x:r.x,y:r.y}),this.changeRailPosition(n,r.x,r.y+s.height+a),t.attr({x:r.x,y:r.y+s.height+l.height+2*a});else if("right"===i)e.attr({x:r.x+l.width+a,y:r.y}),this.changeRailPosition(n,r.x,r.y),t.attr({x:r.x+l.width+a,y:r.y+l.height});else{var u=Math.max(s.width,c.width);e.attr({x:r.x,y:r.y}),this.changeRailPosition(n,r.x+u+a,r.y),t.attr({x:r.x,y:r.y+l.height})}},t}(El);const Al=Pl;var Nl,Tl="g2-tooltip",Rl="g2-tooltip-title",Ll="g2-tooltip-list",Dl="g2-tooltip-list-item",jl="g2-tooltip-marker",Fl="g2-tooltip-value",Bl="g2-tooltip-name",zl="g2-tooltip-crosshair-x",Hl="g2-tooltip-crosshair-y";const Ul=((Nl={})[""+Tl]={position:"absolute",visibility:"visible",zIndex:8,transition:"visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), left 0.4s cubic-bezier(0.23, 1, 0.32, 1), top 0.4s cubic-bezier(0.23, 1, 0.32, 1)",backgroundColor:"rgba(255, 255, 255, 0.9)",boxShadow:"0px 0px 10px #aeaeae",borderRadius:"3px",color:"rgb(87, 87, 87)",fontSize:"12px",fontFamily:ca.fontFamily,lineHeight:"20px",padding:"10px 10px 6px 10px"},Nl[""+Rl]={marginBottom:"4px"},Nl[""+Ll]={margin:"0px",listStyleType:"none",padding:"0px"},Nl[""+Dl]={listStyleType:"none",marginBottom:"4px"},Nl[""+jl]={width:"8px",height:"8px",borderRadius:"50%",display:"inline-block",marginRight:"8px"},Nl[""+Fl]={display:"inline-block",float:"right",marginLeft:"30px"},Nl[""+zl]={position:"absolute",width:"1px",backgroundColor:"rgba(0, 0, 0, 0.25)"},Nl[""+Hl]={position:"absolute",height:"1px",backgroundColor:"rgba(0, 0, 0, 0.25)"},Nl);var Wl=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,S.pi)((0,S.pi)({},t),{name:"tooltip",type:"html",x:0,y:0,items:[],customContent:null,containerTpl:'',itemTpl:'\n \n {name}:\n {value}\n ',xCrosshairTpl:'',yCrosshairTpl:'',title:null,showTitle:!0,region:null,crosshairsRegion:null,containerClassName:Tl,crosshairs:null,offset:10,position:"right",domStyles:null,defaultStyles:Ul})},t.prototype.render=function(){this.get("customContent")?this.renderCustomContent():(this.resetTitle(),this.renderItems()),this.resetPosition()},t.prototype.clear=function(){this.clearCrosshairs(),this.setTitle(""),this.clearItemDoms()},t.prototype.show=function(){var e=this.getContainer();e&&!this.destroyed&&(this.set("visible",!0),j(e,{visibility:"visible"}),this.setCrossHairsVisible(!0))},t.prototype.hide=function(){var e=this.getContainer();e&&!this.destroyed&&(this.set("visible",!1),j(e,{visibility:"hidden"}),this.setCrossHairsVisible(!1))},t.prototype.getLocation=function(){return{x:this.get("x"),y:this.get("y")}},t.prototype.setLocation=function(e){this.set("x",e.x),this.set("y",e.y),this.resetPosition()},t.prototype.setCrossHairsVisible=function(e){var t=e?"":"none",n=this.get("xCrosshairDom"),r=this.get("yCrosshairDom");n&&j(n,{display:t}),r&&j(r,{display:t})},t.prototype.initContainer=function(){if(e.prototype.initContainer.call(this),this.get("customContent")){this.get("container")&&this.get("container").remove();var t=this.getHtmlContentNode();this.get("parent").appendChild(t),this.set("container",t),this.resetStyles(),this.applyStyles()}},t.prototype.updateInner=function(t){var n,r,o;this.get("customContent")?this.renderCustomContent():(n=t,r=["title","showTitle"],o=!1,(0,E.S6)(r,(function(e){if((0,E.wH)(n,e))return o=!0,!1})),o&&this.resetTitle(),(0,E.wH)(t,"items")&&this.renderItems()),e.prototype.updateInner.call(this,t)},t.prototype.initDom=function(){this.cacheDoms()},t.prototype.removeDom=function(){e.prototype.removeDom.call(this),this.clearCrosshairs()},t.prototype.resetPosition=function(){var e,t=this.get("x"),n=this.get("y"),r=this.get("offset"),o=this.getOffset(),i=o.offsetX,a=o.offsetY,l=this.get("position"),s=this.get("region"),c=this.getContainer(),u=this.getBBox(),d=u.width,f=u.height;s&&(e=Fi(s));var p=function(e,t,n,r,o,i,a){var l=function(e,t,n,r,o,i){var a=e,l=t;switch(i){case"left":a=e-r-n,l=t-o/2;break;case"right":a=e+n,l=t-o/2;break;case"top":a=e-r/2,l=t-o-n;break;case"bottom":a=e-r/2,l=t+n;break;default:a=e+n,l=t-o-n}return{x:a,y:l}}(e,t,n,r,o,i);if(a){var s=function(e,t,n,r,o){return{left:eo.x+o.width,top:to.y+o.height}}(l.x,l.y,r,o,a);"auto"===i?(s.right&&(l.x=Math.max(0,e-r-n)),s.top&&(l.y=Math.max(0,t-o-n))):"top"===i||"bottom"===i?(s.left&&(l.x=a.x),s.right&&(l.x=a.x+a.width-r),"top"===i&&s.top&&(l.y=t+n),"bottom"===i&&s.bottom&&(l.y=t-o-n)):(s.top&&(l.y=a.y),s.bottom&&(l.y=a.y+a.height-o),"left"===i&&s.left&&(l.x=e+n),"right"===i&&s.right&&(l.x=e-r-n))}return l}(t,n,r,d,f,l,e);j(c,{left:Vi(p.x+i),top:Vi(p.y+a)}),this.resetCrosshairs()},t.prototype.renderCustomContent=function(){var e=this.getHtmlContentNode(),t=this.get("parent"),n=this.get("container");n&&n.parentNode===t?t.replaceChild(e,n):t.appendChild(e),this.set("container",e),this.resetStyles(),this.applyStyles()},t.prototype.getHtmlContentNode=function(){var e,t=this.get("customContent");if(t){var n=t(this.get("title"),this.get("items"));e=(0,E.kK)(n)?n:D(n)}return e},t.prototype.cacheDoms=function(){var e=this.getContainer(),t=e.getElementsByClassName(Rl)[0],n=e.getElementsByClassName(Ll)[0];this.set("titleDom",t),this.set("listDom",n)},t.prototype.resetTitle=function(){var e=this.get("title");this.get("showTitle")&&e?this.setTitle(e):this.setTitle("")},t.prototype.setTitle=function(e){var t=this.get("titleDom");t&&(t.innerText=e)},t.prototype.resetCrosshairs=function(){var e=this.get("crosshairsRegion"),t=this.get("crosshairs");if(e&&t){var n=Fi(e),r=this.get("xCrosshairDom"),o=this.get("yCrosshairDom");"x"===t?(this.resetCrosshair("x",n),o&&(o.remove(),this.set("yCrosshairDom",null))):"y"===t?(this.resetCrosshair("y",n),r&&(r.remove(),this.set("xCrosshairDom",null))):(this.resetCrosshair("x",n),this.resetCrosshair("y",n)),this.setCrossHairsVisible(this.get("visible"))}else this.clearCrosshairs()},t.prototype.resetCrosshair=function(e,t){var n=this.checkCrosshair(e),r=this.get(e);j(n,"x"===e?{left:Vi(r),top:Vi(t.y),height:Vi(t.height)}:{top:Vi(r),left:Vi(t.x),width:Vi(t.width)})},t.prototype.checkCrosshair=function(e){var t=e+"CrosshairDom",n=e+"CrosshairTpl",r="CROSSHAIR_"+e.toUpperCase(),o=u[r],i=this.get(t),a=this.get("parent");return i||(i=D(this.get(n)),this.applyStyle(o,i),a.appendChild(i),this.set(t,i)),i},t.prototype.renderItems=function(){this.clearItemDoms();var e=this.get("items"),t=this.get("itemTpl"),n=this.get("listDom");n&&((0,E.S6)(e,(function(e){var r=kt.toCSSGradient(e.color),o=(0,S.pi)((0,S.pi)({},e),{color:r}),i=D((0,E.ng)(t,o));n.appendChild(i)})),this.applyChildrenStyles(n,this.get("domStyles")))},t.prototype.clearItemDoms=function(){this.get("listDom")&&ji(this.get("listDom"))},t.prototype.clearCrosshairs=function(){var e=this.get("xCrosshairDom"),t=this.get("yCrosshairDom");e&&e.remove(),t&&t.remove(),this.set("xCrosshairDom",null),this.set("yCrosshairDom",null)},t}(Ia);const Vl=Wl;var Xl={opacity:0},ql={stroke:"#C5C5C5",strokeOpacity:.85},Gl={fill:"#CACED4",opacity:.85};function Yl(e){return function(e){return(0,E.UI)(e,(function(e,t){return[0===t?"M":"L",e[0],e[1]]}))}(e)}var Kl=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,S.pi)((0,S.pi)({},t),{name:"trend",x:0,y:0,width:200,height:16,smooth:!0,isArea:!1,data:[],backgroundStyle:Xl,lineStyle:ql,areaStyle:Gl})},t.prototype.renderInner=function(e){var t=this.cfg,n=t.width,r=t.height,o=t.data,i=t.smooth,a=t.isArea,l=t.backgroundStyle,s=t.lineStyle,c=t.areaStyle;this.addShape(e,{id:this.getElementId("background"),type:"rect",attrs:(0,S.pi)({x:0,y:0,width:n,height:r},l)});var u=function(e,t,n,r){void 0===r&&(r=!0);var o=new _n({values:e}),i=new Ft({values:(0,E.UI)(e,(function(e,t){return t}))}),a=(0,E.UI)(e,(function(e,r){return[i.scale(r)*t,n-o.scale(e)*n]}));return r?function(e){if(e.length<=2)return Yl(e);var t=[];(0,E.S6)(e,(function(e){(0,E.Xy)(e,t.slice(t.length-2))||t.push(e[0],e[1])}));var n=(0,qe.e9)(t,!1),r=(0,E.YM)(e),o=r[0],i=r[1];return n.unshift(["M",o,i]),n}(a):Yl(a)}(o,n,r,i);if(this.addShape(e,{id:this.getElementId("line"),type:"path",attrs:(0,S.pi)({path:u},s)}),a){var d=function(e,t,n,r){var o=(0,S.pr)(e),i=function(e,t){var n=new _n({values:e}),r=n.max<0?n.max:Math.max(0,n.min);return t-n.scale(r)*t}(r,n);return o.push(["L",t,i]),o.push(["L",0,i]),o.push(["Z"]),o}(u,n,r,o);this.addShape(e,{id:this.getElementId("area"),type:"path",attrs:(0,S.pi)({path:d},c)})}},t.prototype.applyOffset=function(){var e=this.cfg,t=e.x,n=e.y;this.moveElementTo(this.get("group"),{x:t,y:n})},t}(ea),Zl={fill:"#F7F7F7",stroke:"#BFBFBF",radius:2,opacity:1,cursor:"ew-resize",highLightFill:"#FFF"},Jl=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,S.pi)((0,S.pi)({},t),{name:"handler",x:0,y:0,width:10,height:24,style:Zl})},t.prototype.renderInner=function(e){var t=this.cfg,n=t.width,r=t.height,o=t.style,i=o.fill,a=o.stroke,l=o.radius,s=o.opacity,c=o.cursor;this.addShape(e,{type:"rect",id:this.getElementId("background"),attrs:{x:0,y:0,width:n,height:r,fill:i,stroke:a,radius:l,opacity:s,cursor:c}});var u=1/3*n,d=2/3*n,f=1/4*r,p=3/4*r;this.addShape(e,{id:this.getElementId("line-left"),type:"line",attrs:{x1:u,y1:f,x2:u,y2:p,stroke:a,cursor:c}}),this.addShape(e,{id:this.getElementId("line-right"),type:"line",attrs:{x1:d,y1:f,x2:d,y2:p,stroke:a,cursor:c}})},t.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x"),y:this.get("y")})},t.prototype.initEvent=function(){this.bindEvents()},t.prototype.bindEvents=function(){var e=this;this.get("group").on("mouseenter",(function(){var t=e.get("style").highLightFill;e.getElementByLocalId("background").attr("fill",t),e.draw()})),this.get("group").on("mouseleave",(function(){var t=e.get("style").fill;e.getElementByLocalId("background").attr("fill",t),e.draw()}))},t.prototype.draw=function(){var e=this.get("container").get("canvas");e&&e.draw()},t}(ea),Ql={fill:"#416180",opacity:.05},es={fill:"#5B8FF9",opacity:.15,cursor:"move"},ts={width:10,height:24},ns={textBaseline:"middle",fill:"#000",opacity:.45},rs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMouseDown=function(e){return function(n){t.currentTarget=e;var r=n.originalEvent;r.stopPropagation(),r.preventDefault(),t.prevX=(0,E.U2)(r,"touches.0.pageX",r.pageX),t.prevY=(0,E.U2)(r,"touches.0.pageY",r.pageY);var o=t.getContainerDOM();o.addEventListener("mousemove",t.onMouseMove),o.addEventListener("mouseup",t.onMouseUp),o.addEventListener("mouseleave",t.onMouseUp),o.addEventListener("touchmove",t.onMouseMove),o.addEventListener("touchend",t.onMouseUp),o.addEventListener("touchcancel",t.onMouseUp)}},t.onMouseMove=function(e){var n=t.cfg.width,r=[t.get("start"),t.get("end")];e.stopPropagation(),e.preventDefault();var o=(0,E.U2)(e,"touches.0.pageX",e.pageX),i=(0,E.U2)(e,"touches.0.pageY",e.pageY),a=o-t.prevX,l=t.adjustOffsetRange(a/n);t.updateStartEnd(l),t.updateUI(t.getElementByLocalId("foreground"),t.getElementByLocalId("minText"),t.getElementByLocalId("maxText")),t.prevX=o,t.prevY=i,t.draw(),t.emit("sliderchange",[t.get("start"),t.get("end")].sort()),t.delegateEmit("valuechanged",{originValue:r,value:[t.get("start"),t.get("end")]})},t.onMouseUp=function(){t.currentTarget&&(t.currentTarget=void 0);var e=t.getContainerDOM();e&&(e.removeEventListener("mousemove",t.onMouseMove),e.removeEventListener("mouseup",t.onMouseUp),e.removeEventListener("mouseleave",t.onMouseUp),e.removeEventListener("touchmove",t.onMouseMove),e.removeEventListener("touchend",t.onMouseUp),e.removeEventListener("touchcancel",t.onMouseUp))},t}return(0,S.ZT)(t,e),t.prototype.setRange=function(e,t){this.set("minLimit",e),this.set("maxLimit",t);var n=this.get("start"),r=this.get("end"),o=(0,E.uZ)(n,e,t),i=(0,E.uZ)(r,e,t);this.get("isInit")||n===o&&r===i||this.setValue([o,i])},t.prototype.getRange=function(){return{min:this.get("minLimit")||0,max:this.get("maxLimit")||1}},t.prototype.setValue=function(e){var t=this.getRange();if((0,E.kJ)(e)&&2===e.length){var n=[this.get("start"),this.get("end")];this.update({start:(0,E.uZ)(e[0],t.min,t.max),end:(0,E.uZ)(e[1],t.min,t.max)}),this.get("updateAutoRender")||this.render(),this.delegateEmit("valuechanged",{originValue:n,value:e})}},t.prototype.getValue=function(){return[this.get("start"),this.get("end")]},t.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,S.pi)((0,S.pi)({},t),{name:"slider",x:0,y:0,width:100,height:16,backgroundStyle:{},foregroundStyle:{},handlerStyle:{},textStyle:{},defaultCfg:{backgroundStyle:Ql,foregroundStyle:es,handlerStyle:ts,textStyle:ns}})},t.prototype.update=function(t){var n=t.start,r=t.end,o=(0,S.pi)({},t);(0,E.UM)(n)||(o.start=(0,E.uZ)(n,0,1)),(0,E.UM)(r)||(o.end=(0,E.uZ)(r,0,1)),e.prototype.update.call(this,o),this.minHandler=this.getChildComponentById(this.getElementId("minHandler")),this.maxHandler=this.getChildComponentById(this.getElementId("maxHandler")),this.trend=this.getChildComponentById(this.getElementId("trend"))},t.prototype.init=function(){this.set("start",(0,E.uZ)(this.get("start"),0,1)),this.set("end",(0,E.uZ)(this.get("end"),0,1)),e.prototype.init.call(this)},t.prototype.render=function(){e.prototype.render.call(this),this.updateUI(this.getElementByLocalId("foreground"),this.getElementByLocalId("minText"),this.getElementByLocalId("maxText"))},t.prototype.renderInner=function(e){var t=this.cfg,n=(t.start,t.end,t.width),r=t.height,o=t.trendCfg,i=void 0===o?{}:o,a=t.minText,l=t.maxText,s=t.backgroundStyle,c=void 0===s?{}:s,u=t.foregroundStyle,d=void 0===u?{}:u,f=t.textStyle,p=void 0===f?{}:f,h=(0,E.b$)({},Zl,this.cfg.handlerStyle);(0,E.dp)((0,E.U2)(i,"data"))&&(this.trend=this.addComponent(e,(0,S.pi)({component:Kl,id:this.getElementId("trend"),x:0,y:0,width:n,height:r},i))),this.addShape(e,{id:this.getElementId("background"),type:"rect",attrs:(0,S.pi)({x:0,y:0,width:n,height:r},c)}),this.addShape(e,{id:this.getElementId("minText"),type:"text",attrs:(0,S.pi)({y:r/2,textAlign:"right",text:a,silent:!1},p)}),this.addShape(e,{id:this.getElementId("maxText"),type:"text",attrs:(0,S.pi)({y:r/2,textAlign:"left",text:l,silent:!1},p)}),this.addShape(e,{id:this.getElementId("foreground"),name:"foreground",type:"rect",attrs:(0,S.pi)({y:0,height:r},d)});var g=(0,E.U2)(h,"width",10),m=(0,E.U2)(h,"height",24);this.minHandler=this.addComponent(e,{component:Jl,id:this.getElementId("minHandler"),name:"handler-min",x:0,y:(r-m)/2,width:g,height:m,cursor:"ew-resize",style:h}),this.maxHandler=this.addComponent(e,{component:Jl,id:this.getElementId("maxHandler"),name:"handler-max",x:0,y:(r-m)/2,width:g,height:m,cursor:"ew-resize",style:h})},t.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x"),y:this.get("y")})},t.prototype.initEvent=function(){this.bindEvents()},t.prototype.updateUI=function(e,t,n){var r=this.cfg,o=r.start,i=r.end,a=r.width,l=r.minText,s=r.maxText,c=r.handlerStyle,u=r.height,d=o*a,f=i*a;this.trend&&(this.trend.update({width:a,height:u}),this.get("updateAutoRender")||this.trend.render()),e.attr("x",d),e.attr("width",f-d);var p=(0,E.U2)(c,"width",10);t.attr("text",l),n.attr("text",s);var h=this._dodgeText([d,f],t,n),g=h[0],m=h[1];this.minHandler&&(this.minHandler.update({x:d-p/2}),this.get("updateAutoRender")||this.minHandler.render()),(0,E.S6)(g,(function(e,n){return t.attr(n,e)})),this.maxHandler&&(this.maxHandler.update({x:f-p/2}),this.get("updateAutoRender")||this.maxHandler.render()),(0,E.S6)(m,(function(e,t){return n.attr(t,e)}))},t.prototype.bindEvents=function(){var e=this.get("group");e.on("handler-min:mousedown",this.onMouseDown("minHandler")),e.on("handler-min:touchstart",this.onMouseDown("minHandler")),e.on("handler-max:mousedown",this.onMouseDown("maxHandler")),e.on("handler-max:touchstart",this.onMouseDown("maxHandler"));var t=e.findById(this.getElementId("foreground"));t.on("mousedown",this.onMouseDown("foreground")),t.on("touchstart",this.onMouseDown("foreground"))},t.prototype.adjustOffsetRange=function(e){var t=this.cfg,n=t.start,r=t.end;switch(this.currentTarget){case"minHandler":var o=0-n,i=1-n;return Math.min(i,Math.max(o,e));case"maxHandler":return o=0-r,i=1-r,Math.min(i,Math.max(o,e));case"foreground":return o=0-n,i=1-r,Math.min(i,Math.max(o,e))}},t.prototype.updateStartEnd=function(e){var t=this.cfg,n=t.start,r=t.end;switch(this.currentTarget){case"minHandler":n+=e;break;case"maxHandler":r+=e;break;case"foreground":n+=e,r+=e}this.set("start",n),this.set("end",r)},t.prototype._dodgeText=function(e,t,n){var r,o,i=this.cfg,a=i.handlerStyle,l=i.width,s=(0,E.U2)(a,"width",10),c=e[0],u=e[1],d=!1;c>u&&(c=(r=[u,c])[0],u=r[1],t=(o=[n,t])[0],n=o[1],d=!0);var f=t.getBBox(),p=n.getBBox(),h=f.width>c-2?{x:c+s/2+2,textAlign:"left"}:{x:c-s/2-2,textAlign:"right"},g=p.width>l-u-2?{x:u-s/2-2,textAlign:"right"}:{x:u+s/2+2,textAlign:"left"};return d?[g,h]:[h,g]},t.prototype.draw=function(){var e=this.get("container"),t=e&&e.get("canvas");t&&t.draw()},t.prototype.getContainerDOM=function(){var e=this.get("container"),t=e&&e.get("canvas");return t&&t.get("container")},t}(ea);function os(e,t,n){if(e){if("function"==typeof e.addEventListener)return e.addEventListener(t,n,!1),{remove:function(){e.removeEventListener(t,n,!1)}};if("function"==typeof e.attachEvent)return e.attachEvent("on"+t,n),{remove:function(){e.detachEvent("on"+t,n)}}}}var is={default:{trackColor:"rgba(0,0,0,0)",thumbColor:"rgba(0,0,0,0.15)",size:8,lineCap:"round"},hover:{thumbColor:"rgba(0,0,0,0.2)"}},as=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.clearEvents=E.ZT,t.onStartEvent=function(e){return function(n){t.isMobile=e,n.originalEvent.preventDefault();var r=e?(0,E.U2)(n.originalEvent,"touches.0.clientX"):n.clientX,o=e?(0,E.U2)(n.originalEvent,"touches.0.clientY"):n.clientY;t.startPos=t.cfg.isHorizontal?r:o,t.bindLaterEvent()}},t.bindLaterEvent=function(){var e=t.getContainerDOM(),n=[];n=t.isMobile?[os(e,"touchmove",t.onMouseMove),os(e,"touchend",t.onMouseUp),os(e,"touchcancel",t.onMouseUp)]:[os(e,"mousemove",t.onMouseMove),os(e,"mouseup",t.onMouseUp),os(e,"mouseleave",t.onMouseUp)],t.clearEvents=function(){n.forEach((function(e){e.remove()}))}},t.onMouseMove=function(e){var n=t.cfg,r=n.isHorizontal,o=n.thumbOffset;e.preventDefault();var i=t.isMobile?(0,E.U2)(e,"touches.0.clientX"):e.clientX,a=t.isMobile?(0,E.U2)(e,"touches.0.clientY"):e.clientY,l=r?i:a,s=l-t.startPos;t.startPos=l,t.updateThumbOffset(o+s)},t.onMouseUp=function(e){e.preventDefault(),t.clearEvents()},t.onTrackClick=function(e){var n=t.cfg,r=n.isHorizontal,o=n.x,i=n.y,a=n.thumbLen,l=t.getContainerDOM().getBoundingClientRect(),s=e.clientX,c=e.clientY,u=r?s-l.left-o-a/2:c-l.top-i-a/2,d=t.validateRange(u);t.updateThumbOffset(d)},t.onThumbMouseOver=function(){var e=t.cfg.theme.hover.thumbColor;t.getElementByLocalId("thumb").attr("stroke",e),t.draw()},t.onThumbMouseOut=function(){var e=t.cfg.theme.default.thumbColor;t.getElementByLocalId("thumb").attr("stroke",e),t.draw()},t}return(0,S.ZT)(t,e),t.prototype.setRange=function(e,t){this.set("minLimit",e),this.set("maxLimit",t);var n=this.getValue(),r=(0,E.uZ)(n,e,t);n===r||this.get("isInit")||this.setValue(r)},t.prototype.getRange=function(){return{min:this.get("minLimit")||0,max:this.get("maxLimit")||1}},t.prototype.setValue=function(e){var t=this.getRange(),n=this.getValue();this.update({thumbOffset:(this.get("trackLen")-this.get("thumbLen"))*(0,E.uZ)(e,t.min,t.max)}),this.delegateEmit("valuechange",{originalValue:n,value:this.getValue()})},t.prototype.getValue=function(){return(0,E.uZ)(this.get("thumbOffset")/(this.get("trackLen")-this.get("thumbLen")),0,1)},t.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,S.pi)((0,S.pi)({},t),{name:"scrollbar",isHorizontal:!0,minThumbLen:20,thumbOffset:0,theme:is})},t.prototype.renderInner=function(e){this.renderTrackShape(e),this.renderThumbShape(e)},t.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x"),y:this.get("y")})},t.prototype.initEvent=function(){this.bindEvents()},t.prototype.renderTrackShape=function(e){var t=this.cfg,n=t.trackLen,r=t.theme,o=void 0===r?{default:{}}:r,i=(0,E.b$)({},is,o).default,a=i.lineCap,l=i.trackColor,s=i.size,c=(0,E.U2)(this.cfg,"size",s),u=this.get("isHorizontal")?{x1:0+c/2,y1:c/2,x2:n-c/2,y2:c/2,lineWidth:c,stroke:l,lineCap:a}:{x1:c/2,y1:0+c/2,x2:c/2,y2:n-c/2,lineWidth:c,stroke:l,lineCap:a};return this.addShape(e,{id:this.getElementId("track"),name:"track",type:"line",attrs:u})},t.prototype.renderThumbShape=function(e){var t=this.cfg,n=t.thumbOffset,r=t.thumbLen,o=t.theme,i=(0,E.b$)({},is,o).default,a=i.size,l=i.lineCap,s=i.thumbColor,c=(0,E.U2)(this.cfg,"size",a),u=this.get("isHorizontal")?{x1:n+c/2,y1:c/2,x2:n+r-c/2,y2:c/2,lineWidth:c,stroke:s,lineCap:l,cursor:"default"}:{x1:c/2,y1:n+c/2,x2:c/2,y2:n+r-c/2,lineWidth:c,stroke:s,lineCap:l,cursor:"default"};return this.addShape(e,{id:this.getElementId("thumb"),name:"thumb",type:"line",attrs:u})},t.prototype.bindEvents=function(){var e=this.get("group");e.on("mousedown",this.onStartEvent(!1)),e.on("mouseup",this.onMouseUp),e.on("touchstart",this.onStartEvent(!0)),e.on("touchend",this.onMouseUp),e.findById(this.getElementId("track")).on("click",this.onTrackClick);var t=e.findById(this.getElementId("thumb"));t.on("mouseover",this.onThumbMouseOver),t.on("mouseout",this.onThumbMouseOut)},t.prototype.getContainerDOM=function(){var e=this.get("container"),t=e&&e.get("canvas");return t&&t.get("container")},t.prototype.validateRange=function(e){var t=this.cfg,n=t.thumbLen,r=t.trackLen,o=e;return e+n>r?o=r-n:e+ne.x?e.x:t,n=ne.y?e.y:r,o=o=r&&e<=o}function Ss(e,t){return"object"==typeof e&&t.forEach((function(t){delete e[t]})),e}function Es(e,t,n){var r,o;void 0===t&&(t=[]),void 0===n&&(n=new Map);try{for(var i=(0,S.XA)(e),a=i.next();!a.done;a=i.next()){var l=a.value;n.has(l)||(t.push(l),n.set(l,!0))}}catch(e){r={error:e}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return t}var Cs=function(){function e(e,t,n,r){void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=0),void 0===r&&(r=0),this.x=e,this.y=t,this.height=r,this.width=n}return e.fromRange=function(t,n,r,o){return new e(t,n,r-t,o-n)},e.fromObject=function(t){return new e(t.minX,t.minY,t.width,t.height)},Object.defineProperty(e.prototype,"minX",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxX",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"minY",{get:function(){return this.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxY",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tl",{get:function(){return{x:this.x,y:this.y}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tr",{get:function(){return{x:this.maxX,y:this.y}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bl",{get:function(){return{x:this.x,y:this.maxY}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"br",{get:function(){return{x:this.maxX,y:this.maxY}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"top",{get:function(){return{x:this.x+this.width/2,y:this.minY}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"right",{get:function(){return{x:this.maxX,y:this.y+this.height/2}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bottom",{get:function(){return{x:this.x+this.width/2,y:this.maxY}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"left",{get:function(){return{x:this.minX,y:this.y+this.height/2}},enumerable:!1,configurable:!0}),e.prototype.isEqual=function(e){return this.x===e.x&&this.y===e.y&&this.width===e.width&&this.height===e.height},e.prototype.contains=function(e){return e.minX>=this.minX&&e.maxX<=this.maxX&&e.minY>=this.minY&&e.maxY<=this.maxY},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.add=function(){for(var e=[],t=0;te.minX&&this.minYe.minY},e.prototype.size=function(){return this.width*this.height},e.prototype.isPointIn=function(e){return e.x>=this.minX&&e.x<=this.maxX&&e.y>=this.minY&&e.y<=this.maxY},e}();function ks(e){if(e.isPolar&&!e.isTransposed)return(e.endAngle-e.startAngle)*e.getRadius();var t=e.convert({x:0,y:0}),n=e.convert({x:1,y:0});return Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2))}function Os(e,t){var n=e.getCenter();return Math.sqrt(Math.pow(t.x-n.x,2)+Math.pow(t.y-n.y,2))}function Ms(e,t){var n=e.getCenter();return Math.atan2(t.y-n.y,t.x-n.x)}function Is(e,t){void 0===t&&(t=0);var n,r=e.start,o=e.end,i=e.getWidth(),a=e.getHeight();if(e.isPolar){var l=e.startAngle,s=e.endAngle,c=e.getCenter(),u=e.getRadius();return{type:"path",startState:{path:vs(c.x,c.y,u+t,l,l)},endState:function(e){var n=(s-l)*e+l;return{path:vs(c.x,c.y,u+t,l,n)}},attrs:{path:vs(c.x,c.y,u+t,l,s)}}}return n=e.isTransposed?{height:a+2*t}:{width:i+2*t},{type:"rect",startState:{x:r.x-t,y:o.y-t,width:e.isTransposed?i+2*t:0,height:e.isTransposed?0:a+2*t},endState:n,attrs:{x:r.x-t,y:o.y-t,width:i+2*t,height:a+2*t}}}var $s=/^(?:(?!0000)[0-9]{4}([-/.]+)(?:(?:0?[1-9]|1[0-2])\1(?:0?[1-9]|1[0-9]|2[0-8])|(?:0?[13-9]|1[0-2])\1(?:29|30)|(?:0?[13578]|1[02])\1(?:31))|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)([-/.]+)0?2\2(?:29))(\s+([01]|([01][0-9]|2[0-3])):([0-9]|[0-5][0-9]):([0-9]|[0-5][0-9]))?$/;function _s(e,t,n,r){return void 0===t&&(t={}),t.type?t.type:"identity"!==e.type&&A.includes(n)&&["interval"].includes(r)||e.isCategory?"cat":e.type}function Ps(e){return e.alias||e.field}function As(e,t,n){var r,o=e.values.length;if(1===o)r=[.5,1];else{var i=0;r=function(e){if(e.isPolar){var t=e.startAngle;return e.endAngle-t==2*Math.PI}return!1}(t)?t.isTransposed?[(i=1/o*(0,E.U2)(n,"widthRatio.multiplePie",1/1.3))/2,1-i/2]:[0,1-1/o]:[i=1/o/2,1-i]}return r}function Ns(e,t){var n={start:{x:0,y:0},end:{x:0,y:0}};e.isRect?n=function(e){var t,n;switch(e){case y.TOP:t={x:0,y:1},n={x:1,y:1};break;case y.RIGHT:t={x:1,y:0},n={x:1,y:1};break;case y.BOTTOM:t={x:0,y:0},n={x:1,y:0};break;case y.LEFT:t={x:0,y:0},n={x:0,y:1};break;default:t=n={x:0,y:0}}return{start:t,end:n}}(t):e.isPolar&&(n=function(e){var t,n;return e.isTransposed?(t={x:0,y:0},n={x:1,y:0}):(t={x:0,y:0},n={x:0,y:1}),{start:t,end:n}}(e));var r=n.start,o=n.end;return{start:e.convert(r),end:e.convert(o)}}function Ts(e){var t=e.start,n=e.end;return t.x===n.x}function Rs(e,t){var n=e.start,r=e.end;return Ts(e)?(n.y-r.y)*(t.x-n.x)>0?1:-1:(r.x-n.x)*(n.y-t.y)>0?-1:1}function Ls(e,t){var n=(0,E.U2)(e,["components","axis"],{});return(0,E.b$)({},(0,E.U2)(n,["common"],{}),(0,E.b$)({},(0,E.U2)(n,[t],{})))}function Ds(e,t,n){var r=(0,E.U2)(e,["components","axis"],{});return(0,E.b$)({},(0,E.U2)(r,["common","title"],{}),(0,E.b$)({},(0,E.U2)(r,[t,"title"],{})),n)}function js(e){var t=e.x,n=e.y,r=e.circleCenter,o=n.start>n.end,i=e.isTransposed?e.convert({x:o?0:1,y:0}):e.convert({x:0,y:o?0:1}),a=[i.x-r.x,i.y-r.y],l=[1,0],s=i.y>r.y?$r.EU(a,l):-1*$r.EU(a,l),c=s+(t.end-t.start);return{center:r,radius:Math.sqrt(Math.pow(i.x-r.x,2)+Math.pow(i.y-r.y,2)),startAngle:s,endAngle:c}}function Fs(e,t){return(0,E.jn)(e)?!1!==e&&{}:(0,E.U2)(e,[t])}function Bs(e,t){return(0,E.U2)(e,"position",t)}function zs(e,t){return(0,E.U2)(t,["title","text"],Ps(e))}var Hs=function(){function e(e,t){this.destroyed=!1,this.facets=[],this.view=e,this.cfg=(0,E.b$)({},this.getDefaultCfg(),t)}return e.prototype.init=function(){this.container||(this.container=this.createContainer());var e=this.view.getData();this.facets=this.generateFacets(e)},e.prototype.render=function(){this.renderViews()},e.prototype.update=function(){},e.prototype.clear=function(){this.clearFacetViews()},e.prototype.destroy=function(){this.clear(),this.container&&(this.container.remove(!0),this.container=void 0),this.destroyed=!0,this.view=void 0,this.facets=[]},e.prototype.facetToView=function(e){var t=e.region,n=e.data,r=e.padding,o=void 0===r?this.cfg.padding:r,i=this.view.createView({region:t,padding:o});i.data(n||[]),e.view=i,this.beforeEachView(i,e);var a=this.cfg.eachView;return a&&a(i,e),this.afterEachView(i,e),i},e.prototype.createContainer=function(){return this.view.getLayer(v.FORE).addGroup()},e.prototype.renderViews=function(){this.createFacetViews()},e.prototype.createFacetViews=function(){var e=this;return this.facets.map((function(t){return e.facetToView(t)}))},e.prototype.clearFacetViews=function(){var e=this;(0,E.S6)(this.facets,(function(t){t.view&&(e.view.removeView(t.view),t.view=void 0)}))},e.prototype.parseSpacing=function(){var e=this.view.viewBBox,t=e.width,n=e.height;return this.cfg.spacing.map((function(e,r){return(0,E.hj)(e)?e/(0===r?t:n):parseFloat(e)/100}))},e.prototype.getFieldValues=function(e,t){var n=[],r={};return(0,E.S6)(e,(function(e){var o=e[t];(0,E.UM)(o)||r[o]||(n.push(o),r[o]=!0)})),n},e.prototype.getRegion=function(e,t,n,r){var o=(0,S.CR)(this.parseSpacing(),2),i=o[0],a=o[1],l=(1+i)/(0===t?1:t)-i,s=(1+a)/(0===e?1:e)-a,c={x:(l+i)*n,y:(s+a)*r};return{start:c,end:{x:c.x+l,y:c.y+s}}},e.prototype.getDefaultCfg=function(){return{eachView:void 0,showTitle:!0,spacing:[0,0],padding:10,fields:[]}},e.prototype.getDefaultTitleCfg=function(){return{style:{fontSize:14,fill:"#666",fontFamily:this.view.getTheme().fontFamily}}},e.prototype.processAxis=function(e,t){var n=e.getOptions(),r=n.coordinate,o=e.geometries;if("rect"===(0,E.U2)(r,"type","rect")&&o.length){(0,E.UM)(n.axes)&&(n.axes={});var i=n.axes,a=(0,S.CR)(o[0].getXYFields(),2),l=a[0],s=a[1],c=Fs(i,l),u=Fs(i,s);!1!==c&&(n.axes[l]=this.getXAxisOption(l,i,c,t)),!1!==u&&(n.axes[s]=this.getYAxisOption(s,i,u,t))}},e.prototype.getFacetDataFilter=function(e){return function(t){return(0,E.yW)(e,(function(e){var n=e.field,r=e.value;return!(!(0,E.UM)(r)&&n)||t[n]===r}))}},e}(),Us={},Ws=function(e){return Us[(0,E.vl)(e)]},Vs=function(e,t){Us[(0,E.vl)(e)]=t};const Xs=function(){function e(e,t){this.context=e,this.cfg=t,e.addAction(this)}return e.prototype.applyCfg=function(e){(0,E.f0)(this,e)},e.prototype.init=function(){this.applyCfg(this.cfg)},e.prototype.destroy=function(){this.context.removeAction(this),this.context=null},e}(),qs=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.execute=function(){this.callback&&this.callback(this.context)},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.callback=null},t}(Xs);var Gs={};function Ys(e){var t=Gs[e];return(0,E.U2)(t,"ActionClass")}function Ks(e,t,n){Gs[e]={ActionClass:t,cfg:n}}function Zs(e,t){var n=new qs(t);return n.callback=e,n.name="callback",n}function Js(e,t){for(var n=[e[0]],r=1,o=e.length;r0&&o>0&&(r>=t||o>=t)}function ac(e,t){var n=e.getCanvasBBox();return ic(e,t)?n:null}function lc(e,t){return e.event.maskShapes.map((function(e){return ac(e,t)})).filter((function(e){return!!e}))}function sc(e,t){return ic(e,t)?e.attr("path"):null}function cc(e){var t,n=e.event.target;return n&&(t=n.get("element")),t}function uc(e){var t,n=e.event.target;return n&&(t=n.get("delegateObject")),t}function dc(e){var t=e.event.gEvent;return!(t&&t.fromShape&&t.toShape&&t.fromShape.get("element")===t.toShape.get("element"))}function fc(e){return e&&e.component&&e.component.isList()}function pc(e){return e&&e.component&&e.component.isSlider()}function hc(e){var t=e.event.target;return t&&"mask"===(null==t?void 0:t.get("name"))||gc(e)}function gc(e){var t;return"multi-mask"===(null===(t=e.event.target)||void 0===t?void 0:t.get("name"))}function mc(e,t){var n=e.event.target;if(gc(e))return function(e,t){if("path"===e.event.target.get("type")){var n=function(e,t){return e.event.maskShapes.map((function(e){return sc(e,t)}))}(e,t);return n.length>0?n.flatMap((function(t){return Cc(e.view,t)})):null}var r=lc(e,t);return r.length>0?r.flatMap((function(t){return Sc(e.view,t)})):null}(e,t);if("path"===n.get("type")){var r=function(e,t){return sc(e.event.target,t)}(e,t);if(!r)return;return Cc(e.view,r)}var o=oc(e,t);return o?Sc(e.view,o):null}function vc(e,t,n){if(gc(e))return function(e,t,n){var r=lc(e,n);return r.length>0?r.flatMap((function(n){return yc(n,e,t)})):null}(e,t,n);var r=oc(e,n);return r?yc(r,e,t):null}function yc(e,t,n){var r=t.view,o=$c(r,n,{x:e.x,y:e.y}),i=$c(r,n,{x:e.maxX,y:e.maxY});return Sc(n,{minX:o.x,minY:o.y,maxX:i.x,maxY:i.y})}function bc(e){var t=e.geometries,n=[];return(0,E.S6)(t,(function(e){var t=e.elements;n=n.concat(t)})),e.views&&e.views.length&&(0,E.S6)(e.views,(function(e){n=n.concat(bc(e))})),n}function xc(e,t){var n=e.geometries,r=[];return(0,E.S6)(n,(function(e){var n=e.getElementsBy((function(e){return e.hasState(t)}));r=r.concat(n)})),r}function wc(e,t){var n=e.getModel().data;return(0,E.kJ)(n)?n[0][t]:n[t]}function Sc(e,t){var n=bc(e),r=[];return(0,E.S6)(n,(function(e){var n,o,i=e.shape.getCanvasBBox();n=t,(o=i).minX>n.maxX||o.maxXn.maxY||o.maxY=t.x&&e.y<=t.y&&e.maxY>t.y}function Ic(e){var t=e.parent,n=null;return t&&(n=t.views.filter((function(t){return t!==e}))),n}function $c(e,t,n){var r=function(e,t){return e.getCoordinate().invert(t)}(e,n);return t.getCoordinate().convert(r)}function _c(e,t,n,r){var o=!1;return(0,E.S6)(e,(function(e){if(e[n]===t[n]&&e[r]===t[r])return o=!0,!1})),o}function Pc(e,t){var n=e.getScaleByField(t);return!n&&e.views&&(0,E.S6)(e.views,(function(e){if(n=Pc(e,t))return!1})),n}var Ac=function(){function e(e){this.actions=[],this.event=null,this.cacheMap={},this.view=e}return e.prototype.cache=function(){for(var e=[],t=0;t=0&&t.splice(n,1)},e.prototype.getCurrentPoint=function(){var e=this.event;return e?e.target instanceof HTMLElement?this.view.getCanvas().getPointByClient(e.clientX,e.clientY):{x:e.x,y:e.y}:null},e.prototype.getCurrentShape=function(){return(0,E.U2)(this.event,["gEvent","shape"])},e.prototype.isInPlot=function(){var e=this.getCurrentPoint();return!!e&&this.view.isPointInPlot(e)},e.prototype.isInShape=function(e){var t=this.getCurrentShape();return!!t&&t.get("name")===e},e.prototype.isInComponent=function(e){var t=kc(this.view),n=this.getCurrentPoint();return!!n&&!!t.find((function(t){var r=t.getBBox();return e?t.get("name")===e&&Mc(r,n):Mc(r,n)}))},e.prototype.destroy=function(){(0,E.S6)(this.actions.slice(),(function(e){e.destroy()})),this.view=null,this.event=null,this.actions=null,this.cacheMap=null},e}();const Nc=Ac;var Tc=function(){function e(e,t){this.view=e,this.cfg=t}return e.prototype.init=function(){this.initEvents()},e.prototype.initEvents=function(){},e.prototype.clearEvents=function(){},e.prototype.destroy=function(){this.clearEvents()},e}();const Rc=Tc;function Lc(e,t,n){var r=e.split(":"),o=r[0],i=t.getAction(o)||function(e,t){var n=Gs[e],r=null;return n&&((r=new(0,n.ActionClass)(t,n.cfg)).name=e,r.init()),r}(o,t);if(!i)throw new Error("There is no action named ".concat(o));return{action:i,methodName:r[1],arg:n}}function Dc(e){var t=e.action,n=e.methodName,r=e.arg;if(!t[n])throw new Error("Action(".concat(t.name,") doesn't have a method called ").concat(n));t[n](r)}var jc="start",Fc="showEnable",Bc="end",zc="processing",Hc=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.callbackCaches={},r.emitCaches={},r.steps=n,r}return(0,S.ZT)(t,e),t.prototype.init=function(){this.initContext(),e.prototype.init.call(this)},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.steps=null,this.context&&(this.context.destroy(),this.context=null),this.callbackCaches=null,this.view=null},t.prototype.initEvents=function(){var e=this;(0,E.S6)(this.steps,(function(t,n){(0,E.S6)(t,(function(t){var r=e.getActionCallback(n,t);r&&e.bindEvent(t.trigger,r)}))}))},t.prototype.clearEvents=function(){var e=this;(0,E.S6)(this.steps,(function(t,n){(0,E.S6)(t,(function(t){var r=e.getActionCallback(n,t);r&&e.offEvent(t.trigger,r)}))}))},t.prototype.initContext=function(){var e=this.view,t=new Nc(e);this.context=t;var n=this.steps;(0,E.S6)(n,(function(e){(0,E.S6)(e,(function(e){if((0,E.mf)(e.action))e.actionObject={action:Zs(e.action,t),methodName:"execute"};else if((0,E.HD)(e.action))e.actionObject=Lc(e.action,t,e.arg);else if((0,E.kJ)(e.action)){var n=e.action,r=(0,E.kJ)(e.arg)?e.arg:[e.arg];e.actionObject=[],(0,E.S6)(n,(function(n,o){e.actionObject.push(Lc(n,t,r[o]))}))}}))}))},t.prototype.isAllowStep=function(e){var t=this.currentStepName,n=this.steps;if(t===e)return!0;if(e===Fc)return!0;if(e===zc)return t===jc;if(e===jc)return t!==zc;if(e===Bc)return t===zc||t===jc;if("rollback"===e){if(n[Bc])return t===Bc;if(t===jc)return!0}return!1},t.prototype.isAllowExecute=function(e,t){if(this.isAllowStep(e)){var n=this.getKey(e,t);return(!t.once||!this.emitCaches[n])&&(!t.isEnable||t.isEnable(this.context))}return!1},t.prototype.enterStep=function(e){this.currentStepName=e,this.emitCaches={}},t.prototype.afterExecute=function(e,t){e!==Fc&&this.currentStepName!==e&&this.enterStep(e);var n=this.getKey(e,t);this.emitCaches[n]=!0},t.prototype.getKey=function(e,t){return e+t.trigger+t.action},t.prototype.getActionCallback=function(e,t){var n=this,r=this.context,o=this.callbackCaches,i=t.actionObject;if(t.action&&i){var a=this.getKey(e,t);if(!o[a]){var l=function(o){r.event=o,n.isAllowExecute(e,t)?((0,E.kJ)(i)?(0,E.S6)(i,(function(e){r.event=o,Dc(e)})):(r.event=o,Dc(i)),n.afterExecute(e,t),t.callback&&(r.event=o,t.callback(r))):r.event=null};t.debounce?o[a]=(0,E.Ds)(l,t.debounce.wait,t.debounce.immediate):t.throttle?o[a]=(0,E.P2)(l,t.throttle.wait,{leading:t.throttle.leading,trailing:t.throttle.trailing}):o[a]=l}return o[a]}return null},t.prototype.bindEvent=function(e,t){var n=e.split(":");"window"===n[0]?window.addEventListener(n[1],t):"document"===n[0]?document.addEventListener(n[1],t):this.view.on(e,t)},t.prototype.offEvent=function(e,t){var n=e.split(":");"window"===n[0]?window.removeEventListener(n[1],t):"document"===n[0]?document.removeEventListener(n[1],t):this.view.off(e,t)},t}(Rc);const Uc=Hc;var Wc={};function Vc(e){return Wc[(0,E.vl)(e)]}function Xc(e,t){Wc[(0,E.vl)(e)]=t}function qc(e){var t,n={point:{default:{fill:e.pointFillColor,r:e.pointSize,stroke:e.pointBorderColor,lineWidth:e.pointBorder,fillOpacity:e.pointFillOpacity},active:{stroke:e.pointActiveBorderColor,lineWidth:e.pointActiveBorder},selected:{stroke:e.pointSelectedBorderColor,lineWidth:e.pointSelectedBorder},inactive:{fillOpacity:e.pointInactiveFillOpacity,strokeOpacity:e.pointInactiveBorderOpacity}},hollowPoint:{default:{fill:e.hollowPointFillColor,lineWidth:e.hollowPointBorder,stroke:e.hollowPointBorderColor,strokeOpacity:e.hollowPointBorderOpacity,r:e.hollowPointSize},active:{stroke:e.hollowPointActiveBorderColor,strokeOpacity:e.hollowPointActiveBorderOpacity},selected:{lineWidth:e.hollowPointSelectedBorder,stroke:e.hollowPointSelectedBorderColor,strokeOpacity:e.hollowPointSelectedBorderOpacity},inactive:{strokeOpacity:e.hollowPointInactiveBorderOpacity}},area:{default:{fill:e.areaFillColor,fillOpacity:e.areaFillOpacity,stroke:null},active:{fillOpacity:e.areaActiveFillOpacity},selected:{fillOpacity:e.areaSelectedFillOpacity},inactive:{fillOpacity:e.areaInactiveFillOpacity}},hollowArea:{default:{fill:null,stroke:e.hollowAreaBorderColor,lineWidth:e.hollowAreaBorder,strokeOpacity:e.hollowAreaBorderOpacity},active:{fill:null,lineWidth:e.hollowAreaActiveBorder},selected:{fill:null,lineWidth:e.hollowAreaSelectedBorder},inactive:{strokeOpacity:e.hollowAreaInactiveBorderOpacity}},interval:{default:{fill:e.intervalFillColor,fillOpacity:e.intervalFillOpacity},active:{stroke:e.intervalActiveBorderColor,lineWidth:e.intervalActiveBorder},selected:{stroke:e.intervalSelectedBorderColor,lineWidth:e.intervalSelectedBorder},inactive:{fillOpacity:e.intervalInactiveFillOpacity,strokeOpacity:e.intervalInactiveBorderOpacity}},hollowInterval:{default:{fill:e.hollowIntervalFillColor,stroke:e.hollowIntervalBorderColor,lineWidth:e.hollowIntervalBorder,strokeOpacity:e.hollowIntervalBorderOpacity},active:{stroke:e.hollowIntervalActiveBorderColor,lineWidth:e.hollowIntervalActiveBorder,strokeOpacity:e.hollowIntervalActiveBorderOpacity},selected:{stroke:e.hollowIntervalSelectedBorderColor,lineWidth:e.hollowIntervalSelectedBorder,strokeOpacity:e.hollowIntervalSelectedBorderOpacity},inactive:{stroke:e.hollowIntervalInactiveBorderColor,lineWidth:e.hollowIntervalInactiveBorder,strokeOpacity:e.hollowIntervalInactiveBorderOpacity}},line:{default:{stroke:e.lineBorderColor,lineWidth:e.lineBorder,strokeOpacity:e.lineBorderOpacity,fill:null,lineAppendWidth:10,lineCap:"round",lineJoin:"round"},active:{lineWidth:e.lineActiveBorder},selected:{lineWidth:e.lineSelectedBorder},inactive:{strokeOpacity:e.lineInactiveBorderOpacity}}},r=function(e){return{title:{autoRotate:!0,position:"center",spacing:e.axisTitleSpacing,style:{fill:e.axisTitleTextFillColor,fontSize:e.axisTitleTextFontSize,lineHeight:e.axisTitleTextLineHeight,textBaseline:"middle",fontFamily:e.fontFamily},iconStyle:{fill:e.axisDescriptionIconFillColor}},label:{autoRotate:!1,autoEllipsis:!1,autoHide:{type:"equidistance",cfg:{minGap:6}},offset:e.axisLabelOffset,style:{fill:e.axisLabelFillColor,fontSize:e.axisLabelFontSize,lineHeight:e.axisLabelLineHeight,fontFamily:e.fontFamily}},line:{style:{lineWidth:e.axisLineBorder,stroke:e.axisLineBorderColor}},grid:{line:{type:"line",style:{stroke:e.axisGridBorderColor,lineWidth:e.axisGridBorder,lineDash:e.axisGridLineDash}},alignTick:!0,animate:!0},tickLine:{style:{lineWidth:e.axisTickLineBorder,stroke:e.axisTickLineBorderColor},alignTick:!0,length:e.axisTickLineLength},subTickLine:null,animate:!0}}(e),o=function(e){return{title:null,marker:{symbol:"circle",spacing:e.legendMarkerSpacing,style:{r:e.legendCircleMarkerSize,fill:e.legendMarkerColor}},itemName:{spacing:5,style:{fill:e.legendItemNameFillColor,fontFamily:e.fontFamily,fontSize:e.legendItemNameFontSize,lineHeight:e.legendItemNameLineHeight,fontWeight:e.legendItemNameFontWeight,textAlign:"start",textBaseline:"middle"}},itemStates:{active:{nameStyle:{opacity:.8}},unchecked:{nameStyle:{fill:"#D8D8D8"},markerStyle:{fill:"#D8D8D8",stroke:"#D8D8D8"}},inactive:{nameStyle:{fill:"#D8D8D8"},markerStyle:{opacity:.2}}},flipPage:!0,pageNavigator:{marker:{style:{size:e.legendPageNavigatorMarkerSize,inactiveFill:e.legendPageNavigatorMarkerInactiveFillColor,inactiveOpacity:e.legendPageNavigatorMarkerInactiveFillOpacity,fill:e.legendPageNavigatorMarkerFillColor,opacity:e.legendPageNavigatorMarkerFillOpacity}},text:{style:{fill:e.legendPageNavigatorTextFillColor,fontSize:e.legendPageNavigatorTextFontSize}}},animate:!1,maxItemWidth:200,itemSpacing:e.legendItemSpacing,itemMarginBottom:e.legendItemMarginBottom,padding:e.legendPadding}}(e);return{background:e.backgroundColor,defaultColor:e.brandColor,subColor:e.subColor,semanticRed:e.paletteSemanticRed,semanticGreen:e.paletteSemanticGreen,padding:"auto",fontFamily:e.fontFamily,columnWidthRatio:.5,maxColumnWidth:null,minColumnWidth:null,roseWidthRatio:.9999999,multiplePieWidthRatio:1/1.3,colors10:e.paletteQualitative10,colors20:e.paletteQualitative20,sequenceColors:e.paletteSequence,shapes:{point:["hollow-circle","hollow-square","hollow-bowtie","hollow-diamond","hollow-hexagon","hollow-triangle","hollow-triangle-down","circle","square","bowtie","diamond","hexagon","triangle","triangle-down","cross","tick","plus","hyphen","line"],line:["line","dash","dot","smooth"],area:["area","smooth","line","smooth-line"],interval:["rect","hollow-rect","line","tick"]},sizes:[1,10],geometries:{interval:{rect:{default:{style:n.interval.default},active:{style:n.interval.active},inactive:{style:n.interval.inactive},selected:{style:function(e){var t=e.geometry.coordinate;if(t.isPolar&&t.isTransposed){var r=bs(e.getModel(),t),o=(r.startAngle+r.endAngle)/2,i=7.5*Math.cos(o),a=7.5*Math.sin(o);return{matrix:se.vs(null,[["t",i,a]])}}return n.interval.selected}}},"hollow-rect":{default:{style:n.hollowInterval.default},active:{style:n.hollowInterval.active},inactive:{style:n.hollowInterval.inactive},selected:{style:n.hollowInterval.selected}},line:{default:{style:n.hollowInterval.default},active:{style:n.hollowInterval.active},inactive:{style:n.hollowInterval.inactive},selected:{style:n.hollowInterval.selected}},tick:{default:{style:n.hollowInterval.default},active:{style:n.hollowInterval.active},inactive:{style:n.hollowInterval.inactive},selected:{style:n.hollowInterval.selected}},funnel:{default:{style:n.interval.default},active:{style:n.interval.active},inactive:{style:n.interval.inactive},selected:{style:n.interval.selected}},pyramid:{default:{style:n.interval.default},active:{style:n.interval.active},inactive:{style:n.interval.inactive},selected:{style:n.interval.selected}}},line:{line:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},dot:{default:{style:(0,S.pi)((0,S.pi)({},n.line.default),{lineCap:null,lineDash:[1,1]})},active:{style:(0,S.pi)((0,S.pi)({},n.line.active),{lineCap:null,lineDash:[1,1]})},inactive:{style:(0,S.pi)((0,S.pi)({},n.line.inactive),{lineCap:null,lineDash:[1,1]})},selected:{style:(0,S.pi)((0,S.pi)({},n.line.selected),{lineCap:null,lineDash:[1,1]})}},dash:{default:{style:(0,S.pi)((0,S.pi)({},n.line.default),{lineCap:null,lineDash:[5.5,1]})},active:{style:(0,S.pi)((0,S.pi)({},n.line.active),{lineCap:null,lineDash:[5.5,1]})},inactive:{style:(0,S.pi)((0,S.pi)({},n.line.inactive),{lineCap:null,lineDash:[5.5,1]})},selected:{style:(0,S.pi)((0,S.pi)({},n.line.selected),{lineCap:null,lineDash:[5.5,1]})}},smooth:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},hv:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},vh:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},hvh:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},vhv:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}}},polygon:{polygon:{default:{style:n.interval.default},active:{style:n.interval.active},inactive:{style:n.interval.inactive},selected:{style:n.interval.selected}}},point:{circle:{default:{style:n.point.default},active:{style:n.point.active},inactive:{style:n.point.inactive},selected:{style:n.point.selected}},square:{default:{style:n.point.default},active:{style:n.point.active},inactive:{style:n.point.inactive},selected:{style:n.point.selected}},bowtie:{default:{style:n.point.default},active:{style:n.point.active},inactive:{style:n.point.inactive},selected:{style:n.point.selected}},diamond:{default:{style:n.point.default},active:{style:n.point.active},inactive:{style:n.point.inactive},selected:{style:n.point.selected}},hexagon:{default:{style:n.point.default},active:{style:n.point.active},inactive:{style:n.point.inactive},selected:{style:n.point.selected}},triangle:{default:{style:n.point.default},active:{style:n.point.active},inactive:{style:n.point.inactive},selected:{style:n.point.selected}},"triangle-down":{default:{style:n.point.default},active:{style:n.point.active},inactive:{style:n.point.inactive},selected:{style:n.point.selected}},"hollow-circle":{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},"hollow-square":{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},"hollow-bowtie":{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},"hollow-diamond":{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},"hollow-hexagon":{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},"hollow-triangle":{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},"hollow-triangle-down":{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},cross:{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},tick:{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},plus:{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},hyphen:{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}},line:{default:{style:n.hollowPoint.default},active:{style:n.hollowPoint.active},inactive:{style:n.hollowPoint.inactive},selected:{style:n.hollowPoint.selected}}},area:{area:{default:{style:n.area.default},active:{style:n.area.active},inactive:{style:n.area.inactive},selected:{style:n.area.selected}},smooth:{default:{style:n.area.default},active:{style:n.area.active},inactive:{style:n.area.inactive},selected:{style:n.area.selected}},line:{default:{style:n.hollowArea.default},active:{style:n.hollowArea.active},inactive:{style:n.hollowArea.inactive},selected:{style:n.hollowArea.selected}},"smooth-line":{default:{style:n.hollowArea.default},active:{style:n.hollowArea.active},inactive:{style:n.hollowArea.inactive},selected:{style:n.hollowArea.selected}}},schema:{candle:{default:{style:n.hollowInterval.default},active:{style:n.hollowInterval.active},inactive:{style:n.hollowInterval.inactive},selected:{style:n.hollowInterval.selected}},box:{default:{style:n.hollowInterval.default},active:{style:n.hollowInterval.active},inactive:{style:n.hollowInterval.inactive},selected:{style:n.hollowInterval.selected}}},edge:{line:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},vhv:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},smooth:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},arc:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}}},violin:{violin:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},smooth:{default:{style:n.line.default},active:{style:n.line.active},inactive:{style:n.line.inactive},selected:{style:n.line.selected}},hollow:{default:{style:n.hollowArea.default},active:{style:n.hollowArea.active},inactive:{style:n.hollowArea.inactive},selected:{style:n.hollowArea.selected}},"hollow-smooth":{default:{style:n.hollowArea.default},active:{style:n.hollowArea.active},inactive:{style:n.hollowArea.inactive},selected:{style:n.hollowArea.selected}}}},components:{axis:{common:r,top:{position:"top",grid:null,title:null,verticalLimitLength:.5},bottom:{position:"bottom",grid:null,title:null,verticalLimitLength:.5},left:{position:"left",title:null,line:null,tickLine:null,verticalLimitLength:1/3},right:{position:"right",title:null,line:null,tickLine:null,verticalLimitLength:1/3},circle:{title:null,grid:(0,E.b$)({},r.grid,{line:{type:"line"}})},radius:{title:null,grid:(0,E.b$)({},r.grid,{line:{type:"circle"}})}},legend:{common:o,right:{layout:"vertical",padding:e.legendVerticalPadding},left:{layout:"vertical",padding:e.legendVerticalPadding},top:{layout:"horizontal",padding:e.legendHorizontalPadding},bottom:{layout:"horizontal",padding:e.legendHorizontalPadding},continuous:{title:null,background:null,track:{},rail:{type:"color",size:e.sliderRailHeight,defaultLength:e.sliderRailWidth,style:{fill:e.sliderRailFillColor,stroke:e.sliderRailBorderColor,lineWidth:e.sliderRailBorder}},label:{align:"rail",spacing:4,formatter:null,style:{fill:e.sliderLabelTextFillColor,fontSize:e.sliderLabelTextFontSize,lineHeight:e.sliderLabelTextLineHeight,textBaseline:"middle",fontFamily:e.fontFamily}},handler:{size:e.sliderHandlerWidth,style:{fill:e.sliderHandlerFillColor,stroke:e.sliderHandlerBorderColor}},slidable:!0,padding:o.padding}},tooltip:{showContent:!0,follow:!0,showCrosshairs:!1,showMarkers:!0,shared:!1,enterable:!1,position:"auto",marker:{symbol:"circle",stroke:"#fff",shadowBlur:10,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"rgba(0,0,0,0.09)",lineWidth:2,r:4},crosshairs:{line:{style:{stroke:e.tooltipCrosshairsBorderColor,lineWidth:e.tooltipCrosshairsBorder}},text:null,textBackground:{padding:2,style:{fill:"rgba(0, 0, 0, 0.25)",lineWidth:0,stroke:null}},follow:!1},domStyles:(t={},t["".concat(Tl)]={position:"absolute",visibility:"hidden",zIndex:8,transition:"left 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0s, top 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0s",backgroundColor:e.tooltipContainerFillColor,opacity:e.tooltipContainerFillOpacity,boxShadow:e.tooltipContainerShadow,borderRadius:"".concat(e.tooltipContainerBorderRadius,"px"),color:e.tooltipTextFillColor,fontSize:"".concat(e.tooltipTextFontSize,"px"),fontFamily:e.fontFamily,lineHeight:"".concat(e.tooltipTextLineHeight,"px"),padding:"0 12px 0 12px"},t["".concat(Rl)]={marginBottom:"12px",marginTop:"12px"},t["".concat(Ll)]={margin:0,listStyleType:"none",padding:0},t["".concat(Dl)]={listStyleType:"none",padding:0,marginBottom:"12px",marginTop:"12px",marginLeft:0,marginRight:0},t["".concat(jl)]={width:"8px",height:"8px",borderRadius:"50%",display:"inline-block",marginRight:"8px"},t["".concat(Fl)]={display:"inline-block",float:"right",marginLeft:"30px"},t)},annotation:{arc:{style:{stroke:e.annotationArcBorderColor,lineWidth:e.annotationArcBorder},animate:!0},line:{style:{stroke:e.annotationLineBorderColor,lineDash:e.annotationLineDash,lineWidth:e.annotationLineBorder},text:{position:"start",autoRotate:!0,style:{fill:e.annotationTextFillColor,stroke:e.annotationTextBorderColor,lineWidth:e.annotationTextBorder,fontSize:e.annotationTextFontSize,textAlign:"start",fontFamily:e.fontFamily,textBaseline:"bottom"}},animate:!0},text:{style:{fill:e.annotationTextFillColor,stroke:e.annotationTextBorderColor,lineWidth:e.annotationTextBorder,fontSize:e.annotationTextFontSize,textBaseline:"middle",textAlign:"start",fontFamily:e.fontFamily},animate:!0},region:{top:!1,style:{lineWidth:e.annotationRegionBorder,stroke:e.annotationRegionBorderColor,fill:e.annotationRegionFillColor,fillOpacity:e.annotationRegionFillOpacity},animate:!0},image:{top:!1,animate:!0},dataMarker:{top:!0,point:{style:{r:3,stroke:e.brandColor,lineWidth:2}},line:{style:{stroke:e.annotationLineBorderColor,lineWidth:e.annotationLineBorder},length:e.annotationDataMarkerLineLength},text:{style:{textAlign:"start",fill:e.annotationTextFillColor,stroke:e.annotationTextBorderColor,lineWidth:e.annotationTextBorder,fontSize:e.annotationTextFontSize,fontFamily:e.fontFamily}},direction:"upward",autoAdjust:!0,animate:!0},dataRegion:{style:{region:{fill:e.annotationRegionFillColor,fillOpacity:e.annotationRegionFillOpacity},text:{textAlign:"center",textBaseline:"bottom",fill:e.annotationTextFillColor,stroke:e.annotationTextBorderColor,lineWidth:e.annotationTextBorder,fontSize:e.annotationTextFontSize,fontFamily:e.fontFamily}},animate:!0}},slider:{common:{padding:[8,8,8,8],backgroundStyle:{fill:e.cSliderBackgroundFillColor,opacity:e.cSliderBackgroundFillOpacity},foregroundStyle:{fill:e.cSliderForegroundFillColor,opacity:e.cSliderForegroundFillOpacity},handlerStyle:{width:e.cSliderHandlerWidth,height:e.cSliderHandlerHeight,fill:e.cSliderHandlerFillColor,opacity:e.cSliderHandlerFillOpacity,stroke:e.cSliderHandlerBorderColor,lineWidth:e.cSliderHandlerBorder,radius:e.cSliderHandlerBorderRadius,highLightFill:e.cSliderHandlerHighlightFillColor},textStyle:{fill:e.cSliderTextFillColor,opacity:e.cSliderTextFillOpacity,fontSize:e.cSliderTextFontSize,lineHeight:e.cSliderTextLineHeight,fontWeight:e.cSliderTextFontWeight,stroke:e.cSliderTextBorderColor,lineWidth:e.cSliderTextBorder}}},scrollbar:{common:{padding:[8,8,8,8]},default:{style:{trackColor:e.scrollbarTrackFillColor,thumbColor:e.scrollbarThumbFillColor}},hover:{style:{thumbColor:e.scrollbarThumbHighlightFillColor}}}},labels:{offset:12,style:{fill:e.labelFillColor,fontSize:e.labelFontSize,fontFamily:e.fontFamily,stroke:e.labelBorderColor,lineWidth:e.labelBorder},fillColorDark:e.labelFillColorDark,fillColorLight:e.labelFillColorLight,autoRotate:!0},innerLabels:{style:{fill:e.innerLabelFillColor,fontSize:e.innerLabelFontSize,fontFamily:e.fontFamily,stroke:e.innerLabelBorderColor,lineWidth:e.innerLabelBorder},autoRotate:!0},overflowLabels:{style:{fill:e.overflowLabelFillColor,fontSize:e.overflowLabelFontSize,fontFamily:e.fontFamily,stroke:e.overflowLabelBorderColor,lineWidth:e.overflowLabelBorder}},pieLabels:{labelHeight:14,offset:10,labelLine:{style:{lineWidth:e.labelLineBorder}},autoRotate:!0}}}var Gc="#000",Yc="#595959",Kc="#8C8C8C",Zc="#BFBFBF",Jc="#D9D9D9",Qc="#FFFFFF",eu=["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"],tu=["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"],nu=["#B8E1FF","#9AC5FF","#7DAAFF","#5B8FF9","#3D76DD","#085EC0","#0047A5","#00318A","#001D70"],ru=function(e){void 0===e&&(e={});var t=e.paletteQualitative10,n=void 0===t?eu:t,r=e.paletteQualitative20,o=void 0===r?tu:r,i=e.brandColor,a=void 0===i?n[0]:i,l={backgroundColor:"transparent",brandColor:a,subColor:"rgba(0,0,0,0.05)",paletteQualitative10:n,paletteQualitative20:o,paletteSemanticRed:"#F4664A",paletteSemanticGreen:"#30BF78",paletteSemanticYellow:"#FAAD14",paletteSequence:nu,fontFamily:'"Segoe UI", Roboto, "Helvetica Neue", Arial,\n "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",\n "Noto Color Emoji"',axisLineBorderColor:Zc,axisLineBorder:1,axisLineDash:null,axisTitleTextFillColor:Yc,axisTitleTextFontSize:12,axisTitleTextLineHeight:12,axisTitleTextFontWeight:"normal",axisTitleSpacing:12,axisDescriptionIconFillColor:"#D9D9D9",axisTickLineBorderColor:Zc,axisTickLineLength:4,axisTickLineBorder:1,axisSubTickLineBorderColor:Jc,axisSubTickLineLength:2,axisSubTickLineBorder:1,axisLabelFillColor:Kc,axisLabelFontSize:12,axisLabelLineHeight:12,axisLabelFontWeight:"normal",axisLabelOffset:8,axisGridBorderColor:Jc,axisGridBorder:1,axisGridLineDash:null,legendTitleTextFillColor:Kc,legendTitleTextFontSize:12,legendTitleTextLineHeight:21,legendTitleTextFontWeight:"normal",legendMarkerColor:a,legendMarkerSpacing:8,legendMarkerSize:4,legendCircleMarkerSize:4,legendSquareMarkerSize:4,legendLineMarkerSize:5,legendItemNameFillColor:Yc,legendItemNameFontSize:12,legendItemNameLineHeight:12,legendItemNameFontWeight:"normal",legendItemSpacing:24,legendItemMarginBottom:12,legendPadding:[8,8,8,8],legendHorizontalPadding:[8,0,8,0],legendVerticalPadding:[0,8,0,8],legendPageNavigatorMarkerSize:12,legendPageNavigatorMarkerInactiveFillColor:Gc,legendPageNavigatorMarkerInactiveFillOpacity:.45,legendPageNavigatorMarkerFillColor:Gc,legendPageNavigatorMarkerFillOpacity:1,legendPageNavigatorTextFillColor:Kc,legendPageNavigatorTextFontSize:12,sliderRailFillColor:Jc,sliderRailBorder:0,sliderRailBorderColor:null,sliderRailWidth:100,sliderRailHeight:12,sliderLabelTextFillColor:Kc,sliderLabelTextFontSize:12,sliderLabelTextLineHeight:12,sliderLabelTextFontWeight:"normal",sliderHandlerFillColor:"#F0F0F0",sliderHandlerWidth:10,sliderHandlerHeight:14,sliderHandlerBorder:1,sliderHandlerBorderColor:Zc,annotationArcBorderColor:Jc,annotationArcBorder:1,annotationLineBorderColor:Zc,annotationLineBorder:1,annotationLineDash:null,annotationTextFillColor:Yc,annotationTextFontSize:12,annotationTextLineHeight:12,annotationTextFontWeight:"normal",annotationTextBorderColor:null,annotationTextBorder:0,annotationRegionFillColor:Gc,annotationRegionFillOpacity:.06,annotationRegionBorder:0,annotationRegionBorderColor:null,annotationDataMarkerLineLength:16,tooltipCrosshairsBorderColor:Zc,tooltipCrosshairsBorder:1,tooltipCrosshairsLineDash:null,tooltipContainerFillColor:"rgb(255, 255, 255)",tooltipContainerFillOpacity:.95,tooltipContainerShadow:"0px 0px 10px #aeaeae",tooltipContainerBorderRadius:3,tooltipTextFillColor:Yc,tooltipTextFontSize:12,tooltipTextLineHeight:12,tooltipTextFontWeight:"bold",labelFillColor:Yc,labelFillColorDark:"#2c3542",labelFillColorLight:"#ffffff",labelFontSize:12,labelLineHeight:12,labelFontWeight:"normal",labelBorderColor:null,labelBorder:0,innerLabelFillColor:Qc,innerLabelFontSize:12,innerLabelLineHeight:12,innerLabelFontWeight:"normal",innerLabelBorderColor:null,innerLabelBorder:0,overflowLabelFillColor:Yc,overflowLabelFontSize:12,overflowLabelLineHeight:12,overflowLabelFontWeight:"normal",overflowLabelBorderColor:Qc,overflowLabelBorder:1,labelLineBorder:1,labelLineBorderColor:Zc,cSliderRailHieght:16,cSliderBackgroundFillColor:"#416180",cSliderBackgroundFillOpacity:.05,cSliderForegroundFillColor:"#5B8FF9",cSliderForegroundFillOpacity:.15,cSliderHandlerHeight:24,cSliderHandlerWidth:10,cSliderHandlerFillColor:"#F7F7F7",cSliderHandlerFillOpacity:1,cSliderHandlerHighlightFillColor:"#FFF",cSliderHandlerBorderColor:"#BFBFBF",cSliderHandlerBorder:1,cSliderHandlerBorderRadius:2,cSliderTextFillColor:"#000",cSliderTextFillOpacity:.45,cSliderTextFontSize:12,cSliderTextLineHeight:12,cSliderTextFontWeight:"normal",cSliderTextBorderColor:null,cSliderTextBorder:0,scrollbarTrackFillColor:"rgba(0,0,0,0)",scrollbarThumbFillColor:"rgba(0,0,0,0.15)",scrollbarThumbHighlightFillColor:"rgba(0,0,0,0.2)",pointFillColor:a,pointFillOpacity:.95,pointSize:4,pointBorder:1,pointBorderColor:Qc,pointBorderOpacity:1,pointActiveBorderColor:Gc,pointSelectedBorder:2,pointSelectedBorderColor:Gc,pointInactiveFillOpacity:.3,pointInactiveBorderOpacity:.3,hollowPointSize:4,hollowPointBorder:1,hollowPointBorderColor:a,hollowPointBorderOpacity:.95,hollowPointFillColor:Qc,hollowPointActiveBorder:1,hollowPointActiveBorderColor:Gc,hollowPointActiveBorderOpacity:1,hollowPointSelectedBorder:2,hollowPointSelectedBorderColor:Gc,hollowPointSelectedBorderOpacity:1,hollowPointInactiveBorderOpacity:.3,lineBorder:2,lineBorderColor:a,lineBorderOpacity:1,lineActiveBorder:3,lineSelectedBorder:3,lineInactiveBorderOpacity:.3,areaFillColor:a,areaFillOpacity:.25,areaActiveFillColor:a,areaActiveFillOpacity:.5,areaSelectedFillColor:a,areaSelectedFillOpacity:.5,areaInactiveFillOpacity:.3,hollowAreaBorderColor:a,hollowAreaBorder:2,hollowAreaBorderOpacity:1,hollowAreaActiveBorder:3,hollowAreaActiveBorderColor:Gc,hollowAreaSelectedBorder:3,hollowAreaSelectedBorderColor:Gc,hollowAreaInactiveBorderOpacity:.3,intervalFillColor:a,intervalFillOpacity:.95,intervalActiveBorder:1,intervalActiveBorderColor:Gc,intervalActiveBorderOpacity:1,intervalSelectedBorder:2,intervalSelectedBorderColor:Gc,intervalSelectedBorderOpacity:1,intervalInactiveBorderOpacity:.3,intervalInactiveFillOpacity:.3,hollowIntervalBorder:2,hollowIntervalBorderColor:a,hollowIntervalBorderOpacity:1,hollowIntervalFillColor:Qc,hollowIntervalActiveBorder:2,hollowIntervalActiveBorderColor:Gc,hollowIntervalSelectedBorder:3,hollowIntervalSelectedBorderColor:Gc,hollowIntervalSelectedBorderOpacity:1,hollowIntervalInactiveBorderOpacity:.3};return(0,S.pi)((0,S.pi)({},l),e)};function ou(e){var t=e.styleSheet,n=void 0===t?{}:t,r=(0,S._T)(e,["styleSheet"]),o=ru(n);return(0,E.b$)({},qc(o),r)}ru();var iu={default:ou({})};function au(e){return(0,E.U2)(iu,(0,E.vl)(e),iu.default)}function lu(e,t){iu[(0,E.vl)(e)]=ou(t)}function su(e,t,n){var r=n.translate(e),o=n.translate(t);return(0,E.vQ)(r,o)}function cu(e,t,n){var r=n.coordinate,o=n.getYScale(),i=o.field,a=r.invert(t),l=o.invert(a.y);return(0,E.sE)(e,(function(e){var t=e[N];return t[i][0]<=l&&t[i][1]>=l}))||e[e.length-1]}var uu=(0,E.HP)((function(e){if(e.isCategory)return 1;for(var t=e.values,n=t.length,r=e.translate(t[0]),o=r,i=0;io&&(o=l)}return(o-r)/(n-1)}));function du(e){var t,n,r,o=function(e){var t=(0,E.VO)(e.attributes);return(0,E.hX)(t,(function(e){return(0,E.FX)(A,e.type)}))}(e);try{for(var i=(0,S.XA)(o),a=i.next();!a.done;a=i.next()){var l=a.value,s=l.getScale(l.type);if(s&&s.isLinear&&"cat"!==_s(s,(0,E.U2)(e.scaleDefs,s.field),l.type,e.type)){r=s;break}}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}var c=e.getXScale(),u=e.getYScale();return r||u||c}function fu(e,t,n){if(0===t.length)return null;var r=n.type,o=n.getXScale(),i=n.getYScale(),a=o.field,l=i.field,s=null;if("heatmap"===r||"point"===r){for(var c=n.coordinate.invert(e),u=o.invert(c.x),d=i.invert(c.y),f=1/0,p=0;p(1+i)/2&&(l=a),r.translate(r.invert(l))}(e,n),x=v[N][a],w=v[N][l],S=y[N][a],C=i.isLinear&&(0,E.kJ)(w);if((0,E.kJ)(x)){for(p=0;p=b){if(!C){s=_;break}(0,E.kJ)(s)||(s=[]),s.push(_)}(0,E.kJ)(s)&&(s=cu(s,e,n))}else{var k=void 0;if(o.isLinear||"timeCat"===o.type){if((b>o.translate(S)||bo.max||bMath.abs(o.translate(k[N][a])-b)&&(y=k)}var P=uu(n.getXScale());return!s&&Math.abs(o.translate(y[N][a])-b)<=P/2&&(s=y),s}function pu(e,t,n,r){var o,i;void 0===n&&(n=""),void 0===r&&(r=!1);var a,l,s=e[N],c=function(e,t,n){var r=t.getAttribute("position").getFields(),o=t.scales,i=(0,E.mf)(n)||!n?r[0]:n,a=o[i],l=a?a.getText(e[i]):e[i]||i;return(0,E.mf)(n)?n(l,e):l}(s,t,n),u=t.tooltipOption,d=t.theme.defaultColor,f=[];function p(t,n){if(r||!(0,E.UM)(n)&&""!==n){var o={title:c,data:s,mappingData:e,name:t,value:n,color:e.color||d,marker:!0};f.push(o)}}if((0,E.Kn)(u)){var h=u.fields,g=u.callback;if(g){var m=h.map((function(t){return e[N][t]})),v=g.apply(void 0,(0,S.ev)([],(0,S.CR)(m),!1)),y=(0,S.pi)({data:e[N],mappingData:e,title:c,color:e.color||d,marker:!0},v);f.push(y)}else{var b=t.scales;try{for(var x=(0,S.XA)(h),w=x.next();!w.done;w=x.next()){var C=w.value;if(!(0,E.UM)(s[C])){var k=b[C];p(a=Ps(k),l=k.getText(s[C]))}}}catch(e){o={error:e}}finally{try{w&&!w.done&&(i=x.return)&&i.call(x)}finally{if(o)throw o.error}}}}else{var O=du(t);l=function(e,t){var n=e[t.field];return(0,E.kJ)(n)?n.map((function(e){return t.getText(e)})).join("-"):t.getText(n)}(s,O),a=function(e,t){var n,r=t.getGroupScales();if(r.length&&(n=r[0]),n){var o=n.field;return n.getText(e[o])}return Ps(du(t))}(s,t),p(a,l)}return f}function hu(e,t,n,r){var o,i,a=r.showNil,l=[],s=e.dataArray;if(!(0,E.xb)(s)){e.sort(s);try{for(var c=(0,S.XA)(s),u=c.next();!u.done;u=c.next()){var d=fu(t,u.value,e);if(d){var f=e.getElementId(d),p=e.elementsMap[f];if("heatmap"===e.type||p.visible){var h=pu(d,e,n,a);h.length&&l.push(h)}}}}catch(e){o={error:e}}finally{try{u&&!u.done&&(i=c.return)&&i.call(c)}finally{if(o)throw o.error}}}return l}function gu(e,t,n,r){var o=r.showNil,i=[],a=e.container.getShape(t.x,t.y);if(a&&a.get("visible")&&a.get("origin")){var l=pu(a.get("origin").mappingData,e,n,o);l.length&&i.push(l)}return i}function mu(e,t,n){var r,o,i=[],a=e.geometries,l=n.shared,s=n.title,c=n.reversed;try{for(var u=(0,S.XA)(a),d=u.next();!d.done;d=u.next()){var f=d.value;if(f.visible&&!1!==f.tooltipOption){var p=f.type,h=void 0;(h=["point","edge","polygon"].includes(p)?gu(f,t,s,n):["area","line","path","heatmap"].includes(p)||!1!==l?hu(f,t,s,n):gu(f,t,s,n)).length&&(c&&h.reverse(),i.push(h))}}}catch(e){r={error:e}}finally{try{d&&!d.done&&(o=u.return)&&o.call(u)}finally{if(r)throw r.error}}return i}function vu(e){void 0===e&&(e=0);var t=(0,E.kJ)(e)?e:[e];switch(t.length){case 0:t=[0,0,0,0];break;case 1:t=new Array(4).fill(t[0]);break;case 2:t=(0,S.ev)((0,S.ev)([],(0,S.CR)(t),!1),(0,S.CR)(t),!1);break;case 3:t=(0,S.ev)((0,S.ev)([],(0,S.CR)(t),!1),[t[1]],!1);break;default:t=t.slice(0,4)}return t}var yu={};function bu(e,t){yu[e]=t}var xu=function(){function e(e){this.option=this.wrapperOption(e)}return e.prototype.update=function(e){return this.option=this.wrapperOption(e),this},e.prototype.hasAction=function(e){var t=this.option.actions;return(0,E.G)(t,(function(t){return t[0]===e}))},e.prototype.create=function(e,t){var n=this.option,r=n.type,o=n.cfg,i="theta"===r,a=(0,S.pi)({start:e,end:t},o),l=function(e){return Tr[e.toLowerCase()]}(i?"polar":r);return this.coordinate=new l(a),this.coordinate.type=r,i&&(this.hasAction("transpose")||this.transpose()),this.execActions(),this.coordinate},e.prototype.adjust=function(e,t){return this.coordinate.update({start:e,end:t}),this.coordinate.resetMatrix(),this.execActions(["scale","rotate","translate"]),this.coordinate},e.prototype.rotate=function(e){return this.option.actions.push(["rotate",e]),this},e.prototype.reflect=function(e){return this.option.actions.push(["reflect",e]),this},e.prototype.scale=function(e,t){return this.option.actions.push(["scale",e,t]),this},e.prototype.transpose=function(){return this.option.actions.push(["transpose"]),this},e.prototype.getOption=function(){return this.option},e.prototype.getCoordinate=function(){return this.coordinate},e.prototype.wrapperOption=function(e){return(0,S.pi)({type:"rect",actions:[],cfg:{}},e)},e.prototype.execActions=function(e){var t=this,n=this.option.actions;(0,E.S6)(n,(function(n){var r,o=(0,S.CR)(n),i=o[0],a=o.slice(1);((0,E.UM)(e)||e.includes(i))&&(r=t.coordinate)[i].apply(r,(0,S.ev)([],(0,S.CR)(a),!1))}))},e}();const wu=xu;var Su=function(){function e(e,t,n){this.view=e,this.gEvent=t,this.data=n,this.type=t.type}return e.fromData=function(t,n,r){return new e(t,new ee(n,{}),r)},Object.defineProperty(e.prototype,"target",{get:function(){return this.gEvent.target},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"event",{get:function(){return this.gEvent.originalEvent},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"x",{get:function(){return this.gEvent.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this.gEvent.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clientX",{get:function(){return this.gEvent.clientX},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clientY",{get:function(){return this.gEvent.clientY},enumerable:!1,configurable:!0}),e.prototype.toString=function(){return"[Event (type=".concat(this.type,")]")},e.prototype.clone=function(){return new e(this.view,this.gEvent,this.data)},e}();const Eu=Su;function Cu(e){var t=e.getController("axis"),n=e.getController("legend"),r=e.getController("annotation");[t,e.getController("slider"),e.getController("scrollbar"),n,r].forEach((function(e){e&&e.layout()}))}var ku=function(){function e(){this.scales=new Map,this.syncScales=new Map}return e.prototype.createScale=function(e,t,n,r){var o=n,i=this.getScaleMeta(r);if(0===t.length&&i){var a=i.scale,l={type:a.type};a.isCategory&&(l.values=a.values),o=(0,E.b$)(l,i.scaleDef,n)}var s=function(e,t,n){var r=t||[];if((0,E.hj)(e)||(0,E.UM)((0,E.Wx)(r,e))&&(0,E.xb)(n))return new(Wn("identity"))({field:e.toString(),values:[e]});var o=(0,E.I)(r,e),i=(0,E.U2)(n,"type",function(e){var t="linear";return $s.test(e)?t="timeCat":(0,E.HD)(e)&&(t="cat"),t}(o[0]));return new(Wn(i))((0,S.pi)({field:e,values:o},n))}(e,t,o);return this.cacheScale(s,n,r),s},e.prototype.sync=function(e,t){var n=this;this.syncScales.forEach((function(r,o){var i=Number.MAX_SAFE_INTEGER,a=Number.MIN_SAFE_INTEGER,l=[];(0,E.S6)(r,(function(e){var t=n.getScale(e);a=(0,E.hj)(t.max)?Math.max(a,t.max):a,i=(0,E.hj)(t.min)?Math.min(i,t.min):i,(0,E.S6)(t.values,(function(e){l.includes(e)||l.push(e)}))})),(0,E.S6)(r,(function(r){var o=n.getScale(r);if(o.isContinuous)o.change({min:i,max:a,values:l});else if(o.isCategory){var s=o.range,c=n.getScaleMeta(r);l&&!(0,E.U2)(c,["scaleDef","range"])&&(s=As((0,E.b$)({},o,{values:l}),e,t)),o.change({values:l,range:s})}}))}))},e.prototype.cacheScale=function(e,t,n){var r=this.getScaleMeta(n);r&&r.scale.type===e.type?(function(e,t){if("identity"!==e.type&&"identity"!==t.type){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);e.change(n)}}(r.scale,e),r.scaleDef=t):(r={key:n,scale:e,scaleDef:t},this.scales.set(n,r));var o=this.getSyncKey(r);if(r.syncKey=o,this.removeFromSyncScales(n),o){var i=this.syncScales.get(o);i||(i=[],this.syncScales.set(o,i)),i.push(n)}},e.prototype.getScale=function(e){var t=this.getScaleMeta(e);if(!t){var n=(0,E.Z$)(e.split("-")),r=this.syncScales.get(n);r&&r.length&&(t=this.getScaleMeta(r[0]))}return t&&t.scale},e.prototype.deleteScale=function(e){var t=this.getScaleMeta(e);if(t){var n=t.syncKey,r=this.syncScales.get(n);if(r&&r.length){var o=r.indexOf(e);-1!==o&&r.splice(o,1)}}this.scales.delete(e)},e.prototype.clear=function(){this.scales.clear(),this.syncScales.clear()},e.prototype.removeFromSyncScales=function(e){var t=this;this.syncScales.forEach((function(n,r){var o=n.indexOf(e);if(-1!==o)return n.splice(o,1),0===n.length&&t.syncScales.delete(r),!1}))},e.prototype.getSyncKey=function(e){var t=e.scale,n=e.scaleDef,r=t.field,o=(0,E.U2)(n,["sync"]);return!0===o?r:!1===o?void 0:o},e.prototype.getScaleMeta=function(e){return this.scales.get(e)},e}(),Ou=function(){function e(e,t,n,r){void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=0),void 0===r&&(r=0),this.top=e,this.right=t,this.bottom=n,this.left=r}return e.instance=function(t,n,r,o){return void 0===t&&(t=0),void 0===n&&(n=0),void 0===r&&(r=0),void 0===o&&(o=0),new e(t,n,r,o)},e.prototype.max=function(e){var t=(0,S.CR)(e,4),n=t[0],r=t[1],o=t[2],i=t[3];return this.top=Math.max(this.top,n),this.right=Math.max(this.right,r),this.bottom=Math.max(this.bottom,o),this.left=Math.max(this.left,i),this},e.prototype.shrink=function(e){var t=(0,S.CR)(e,4),n=t[0],r=t[1],o=t[2],i=t[3];return this.top+=n,this.right+=r,this.bottom+=o,this.left+=i,this},e.prototype.inc=function(e,t){var n=e.width,r=e.height;switch(t){case y.TOP:case y.TOP_LEFT:case y.TOP_RIGHT:this.top+=r;break;case y.RIGHT:case y.RIGHT_TOP:case y.RIGHT_BOTTOM:this.right+=n;break;case y.BOTTOM:case y.BOTTOM_LEFT:case y.BOTTOM_RIGHT:this.bottom+=r;break;case y.LEFT:case y.LEFT_TOP:case y.LEFT_BOTTOM:this.left+=n}return this},e.prototype.getPadding=function(){return[this.top,this.right,this.bottom,this.left]},e.prototype.clone=function(){return new(e.bind.apply(e,(0,S.ev)([void 0],(0,S.CR)(this.getPadding()),!1)))},e}();function Mu(e,t,n){var r=n.instance();t.forEach((function(e){e.autoPadding=r.max(e.autoPadding.getPadding())}))}var Iu=function(e){function t(t){var n=e.call(this,{visible:t.visible})||this;n.views=[],n.geometries=[],n.controllers=[],n.interactions={},n.limitInPlot=!1,n.options={data:[],animate:!0},n.usedControllers=Object.keys(yu),n.scalePool=new ku,n.layoutFunc=Cu,n.isPreMouseInPlot=!1,n.isDataChanged=!1,n.isCoordinateChanged=!1,n.createdScaleKeys=new Map,n.onCanvasEvent=function(e){var t=e.name;if(!t.includes(":")){var r=n.createViewEvent(e);n.doPlotEvent(r),n.emit(t,r)}},n.onDelegateEvents=function(e){var t=e.name;if(t.includes(":")){var r=n.createViewEvent(e);n.emit(t,r)}};var r=t.id,o=void 0===r?(0,E.EL)("view"):r,i=t.parent,a=t.canvas,l=t.backgroundGroup,s=t.middleGroup,c=t.foregroundGroup,u=t.region,d=void 0===u?{start:{x:0,y:0},end:{x:1,y:1}}:u,f=t.padding,p=t.appendPadding,h=t.theme,g=t.options,m=t.limitInPlot,v=t.syncViewPadding;return n.parent=i,n.canvas=a,n.backgroundGroup=l,n.middleGroup=s,n.foregroundGroup=c,n.region=d,n.padding=f,n.appendPadding=p,n.options=(0,S.pi)((0,S.pi)({},n.options),g),n.limitInPlot=m,n.id=o,n.syncViewPadding=v,n.themeObject=(0,E.Kn)(h)?(0,E.b$)({},au("default"),ou(h)):au(h),n.init(),n}return(0,S.ZT)(t,e),t.prototype.setLayout=function(e){this.layoutFunc=e},t.prototype.init=function(){this.calculateViewBBox(),this.initEvents(),this.initComponentController(),this.initOptions()},t.prototype.render=function(e,t){void 0===e&&(e=!1),this.emit(C.BEFORE_RENDER,Eu.fromData(this,C.BEFORE_RENDER,t)),this.paint(e),this.emit(C.AFTER_RENDER,Eu.fromData(this,C.AFTER_RENDER,t)),!1===this.visible&&this.changeVisible(!1)},t.prototype.clear=function(){var e=this;this.emit(C.BEFORE_CLEAR),this.filteredData=[],this.coordinateInstance=void 0,this.isDataChanged=!1,this.isCoordinateChanged=!1;for(var t=this.geometries,n=0;n');M.appendChild(I);var $=B(M,l,o,i),_=new(R(d).Canvas)((0,S.pi)({container:I,pixelRatio:f,localRefresh:h,supportCSSTransform:y},$));return(n=e.call(this,{parent:null,canvas:_,backgroundGroup:_.addGroup({zIndex:1}),middleGroup:_.addGroup({zIndex:2}),foregroundGroup:_.addGroup({zIndex:3}),padding:s,appendPadding:c,visible:m,options:w,limitInPlot:C,theme:k,syncViewPadding:O})||this).onResize=(0,E.Ds)((function(){n.forceFit()}),300),n.ele=M,n.canvas=_,n.width=$.width,n.height=$.height,n.autoFit=l,n.localRefresh=h,n.renderer=d,n.wrapperElement=I,n.updateCanvasStyle(),n.bindAutoFit(),n.initDefaultInteractions(x),n}return(0,S.ZT)(t,e),t.prototype.initDefaultInteractions=function(e){var t=this;(0,E.S6)(e,(function(e){t.interaction(e)}))},t.prototype.aria=function(e){var t="aria-label";!1===e?this.ele.removeAttribute(t):this.ele.setAttribute(t,e.label)},t.prototype.changeSize=function(e,t){return this.width===e&&this.height===t||(this.emit(C.BEFORE_CHANGE_SIZE),this.width=e,this.height=t,this.canvas.changeSize(e,t),this.render(!0),this.emit(C.AFTER_CHANGE_SIZE)),this},t.prototype.clear=function(){e.prototype.clear.call(this),this.aria(!1)},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.unbindAutoFit(),this.canvas.destroy(),function(e){var t=e.parentNode;t&&t.removeChild(e)}(this.wrapperElement),this.wrapperElement=null},t.prototype.changeVisible=function(t){return e.prototype.changeVisible.call(this,t),this.wrapperElement.style.display=t?"":"none",this},t.prototype.forceFit=function(){if(!this.destroyed){var e=B(this.ele,!0,this.width,this.height),t=e.width,n=e.height;this.changeSize(t,n)}},t.prototype.updateCanvasStyle=function(){j(this.canvas.get("el"),{display:"inline-block",verticalAlign:"middle"})},t.prototype.bindAutoFit=function(){this.autoFit&&window.addEventListener("resize",this.onResize)},t.prototype.unbindAutoFit=function(){this.autoFit&&window.removeEventListener("resize",this.onResize)},t}(_u);const Au=Pu;var Nu=function(){function e(e){this.visible=!0,this.components=[],this.view=e}return e.prototype.clear=function(e){(0,E.S6)(this.components,(function(e){e.component.destroy()})),this.components=[]},e.prototype.destroy=function(){this.clear()},e.prototype.getComponents=function(){return this.components},e.prototype.changeVisible=function(e){this.visible!==e&&(this.components.forEach((function(t){e?t.component.show():t.component.hide()})),this.visible=e)},e}(),Tu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isLocked=!1,t}return(0,S.ZT)(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"tooltip"},enumerable:!1,configurable:!0}),t.prototype.init=function(){},t.prototype.isVisible=function(){return!1!==this.view.getOptions().tooltip},t.prototype.render=function(){},t.prototype.showTooltip=function(e){if(this.point=e,this.isVisible()){var t=this.view,n=this.getTooltipItems(e);if(n.length){var r=this.getTitle(n),o={x:n[0].x,y:n[0].y};t.emit("tooltip:show",Eu.fromData(t,"tooltip:show",(0,S.pi)({items:n,title:r},e)));var i=this.getTooltipCfg(),a=i.follow,l=i.showMarkers,s=i.showCrosshairs,c=i.showContent,u=i.marker,d=this.items,f=this.title;if((0,E.Xy)(f,r)&&(0,E.Xy)(d,n)?(this.tooltip&&a&&(this.tooltip.update(e),this.tooltip.show()),this.tooltipMarkersGroup&&this.tooltipMarkersGroup.show()):(t.emit("tooltip:change",Eu.fromData(t,"tooltip:change",(0,S.pi)({items:n,title:r},e))),((0,E.mf)(c)?c(n):c)&&(this.tooltip||this.renderTooltip(),this.tooltip.update((0,E.CD)({},i,{items:this.getItemsAfterProcess(n),title:r},a?e:{})),this.tooltip.show()),l&&this.renderTooltipMarkers(n,u)),this.items=n,this.title=r,s){var p=(0,E.U2)(i,["crosshairs","follow"],!1);this.renderCrosshairs(p?e:o,i)}}else this.hideTooltip()}},t.prototype.hideTooltip=function(){if(this.getTooltipCfg().follow){var e=this.tooltipMarkersGroup;e&&e.hide();var t=this.xCrosshair,n=this.yCrosshair;t&&t.hide(),n&&n.hide();var r=this.tooltip;r&&r.hide(),this.view.emit("tooltip:hide",Eu.fromData(this.view,"tooltip:hide",{})),this.point=null}else this.point=null},t.prototype.lockTooltip=function(){this.isLocked=!0,this.tooltip&&this.tooltip.setCapture(!0)},t.prototype.unlockTooltip=function(){this.isLocked=!1;var e=this.getTooltipCfg();this.tooltip&&this.tooltip.setCapture(e.capture)},t.prototype.isTooltipLocked=function(){return this.isLocked},t.prototype.clear=function(){var e=this,t=e.tooltip,n=e.xCrosshair,r=e.yCrosshair,o=e.tooltipMarkersGroup;t&&(t.hide(),t.clear()),n&&n.clear(),r&&r.clear(),o&&o.clear(),(null==t?void 0:t.get("customContent"))&&(this.tooltip.destroy(),this.tooltip=null),this.title=null,this.items=null},t.prototype.destroy=function(){this.tooltip&&this.tooltip.destroy(),this.xCrosshair&&this.xCrosshair.destroy(),this.yCrosshair&&this.yCrosshair.destroy(),this.guideGroup&&this.guideGroup.remove(!0),this.reset()},t.prototype.reset=function(){this.items=null,this.title=null,this.tooltipMarkersGroup=null,this.tooltipCrosshairsGroup=null,this.xCrosshair=null,this.yCrosshair=null,this.tooltip=null,this.guideGroup=null,this.isLocked=!1,this.point=null},t.prototype.changeVisible=function(e){if(this.visible!==e){var t=this,n=t.tooltip,r=t.tooltipMarkersGroup,o=t.xCrosshair,i=t.yCrosshair;e?(n&&n.show(),r&&r.show(),o&&o.show(),i&&i.show()):(n&&n.hide(),r&&r.hide(),o&&o.hide(),i&&i.hide()),this.visible=e}},t.prototype.getTooltipItems=function(e){var t,n,r,o,i,a,l=this.findItemsFromView(this.view,e);if(l.length){l=(0,E.xH)(l);try{for(var s=(0,S.XA)(l),c=s.next();!c.done;c=s.next()){var u=c.value;try{for(var d=(r=void 0,(0,S.XA)(u)),f=d.next();!f.done;f=d.next()){var p=f.value,h=p.mappingData,g=h.x,m=h.y;p.x=(0,E.kJ)(g)?g[g.length-1]:g,p.y=(0,E.kJ)(m)?m[m.length-1]:m}}catch(e){r={error:e}}finally{try{f&&!f.done&&(o=d.return)&&o.call(d)}finally{if(r)throw r.error}}}}catch(e){t={error:e}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}if(!1===this.getTooltipCfg().shared&&l.length>1){var v=l[0],y=Math.abs(e.y-v[0].y);try{for(var b=(0,S.XA)(l),x=b.next();!x.done;x=b.next()){var w=x.value,C=Math.abs(e.y-w[0].y);C<=y&&(v=w,y=C)}}catch(e){i={error:e}}finally{try{x&&!x.done&&(a=b.return)&&a.call(b)}finally{if(i)throw i.error}}l=[v]}return function(e){for(var t=[],n=function(n){var r=e[n];(0,E.sE)(t,(function(e){return e.color===r.color&&e.name===r.name&&e.value===r.value&&e.title===r.title}))||t.push(r)},r=0;r'+r+"":r}})},t.prototype.getTitle=function(e){var t=e[0].title||e[0].name;return this.title=t,t},t.prototype.renderTooltip=function(){var e=this.view.getCanvas(),t={start:{x:0,y:0},end:{x:e.get("width"),y:e.get("height")}},n=this.getTooltipCfg(),r=new ps((0,S.pi)((0,S.pi)({parent:e.get("el").parentNode,region:t},n),{visible:!1,crosshairs:null}));r.init(),this.tooltip=r},t.prototype.renderTooltipMarkers=function(e,t){var n,r,o=this.getTooltipMarkersGroup(),i=this.view.getRootView(),a=i.limitInPlot;try{for(var l=(0,S.XA)(e),s=l.next();!s.done;s=l.next()){var c=s.value,u=c.x,d=c.y;if(a||(null==o?void 0:o.getClip())){var f=Is(i.getCoordinate()),p=f.type,h=f.attrs;null==o||o.setClip({type:p,attrs:h})}else null==o||o.setClip(void 0);var g=this.view.getTheme(),m=(0,E.U2)(g,["components","tooltip","marker"],{}),v=(0,S.pi)((0,S.pi)({fill:c.color,symbol:"circle",shadowColor:c.color},(0,E.mf)(t)?(0,S.pi)((0,S.pi)({},m),t(c)):t),{x:u,y:d});o.addShape("marker",{attrs:v})}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}},t.prototype.renderCrosshairs=function(e,t){var n=(0,E.U2)(t,["crosshairs","type"],"x");"x"===n?(this.yCrosshair&&this.yCrosshair.hide(),this.renderXCrosshairs(e,t)):"y"===n?(this.xCrosshair&&this.xCrosshair.hide(),this.renderYCrosshairs(e,t)):"xy"===n&&(this.renderXCrosshairs(e,t),this.renderYCrosshairs(e,t))},t.prototype.renderXCrosshairs=function(e,t){var n,r,o=this.getViewWithGeometry(this.view).getCoordinate();if(o.isRect)o.isTransposed?(n={x:o.start.x,y:e.y},r={x:o.end.x,y:e.y}):(n={x:e.x,y:o.end.y},r={x:e.x,y:o.start.y});else{var i=Ms(o,e),a=o.getCenter(),l=o.getRadius();r=ms(a.x,a.y,l,i),n=a}var s=(0,E.b$)({start:n,end:r,container:this.getTooltipCrosshairsGroup()},(0,E.U2)(t,"crosshairs",{}),this.getCrosshairsText("x",e,t));delete s.type;var c=this.xCrosshair;c?c.update(s):(c=new al(s)).init(),c.render(),c.show(),this.xCrosshair=c},t.prototype.renderYCrosshairs=function(e,t){var n,r,o=this.getViewWithGeometry(this.view).getCoordinate();if(o.isRect){var i=void 0,a=void 0;o.isTransposed?(i={x:e.x,y:o.end.y},a={x:e.x,y:o.start.y}):(i={x:o.start.x,y:e.y},a={x:o.end.x,y:e.y}),n={start:i,end:a},r="Line"}else n={center:o.getCenter(),radius:Os(o,e),startAngle:o.startAngle,endAngle:o.endAngle},r="Circle";delete(n=(0,E.b$)({container:this.getTooltipCrosshairsGroup()},n,(0,E.U2)(t,"crosshairs",{}),this.getCrosshairsText("y",e,t))).type;var l=this.yCrosshair;l?o.isRect&&"circle"===l.get("type")||!o.isRect&&"line"===l.get("type")?(l=new c[r](n)).init():l.update(n):(l=new c[r](n)).init(),l.render(),l.show(),this.yCrosshair=l},t.prototype.getCrosshairsText=function(e,t,n){var r=(0,E.U2)(n,["crosshairs","text"]),o=(0,E.U2)(n,["crosshairs","follow"]),i=this.items;if(r){var a=this.getViewWithGeometry(this.view),l=i[0],s=a.getXScale(),c=a.getYScales()[0],u=void 0,d=void 0;if(o){var f=this.view.getCoordinate().invert(t);u=s.invert(f.x),d=c.invert(f.y)}else u=l.data[s.field],d=l.data[c.field];var p="x"===e?u:d;return(0,E.mf)(r)?r=r(e,p,i,t):r.content=p,{text:r}}},t.prototype.getGuideGroup=function(){if(!this.guideGroup){var e=this.view.foregroundGroup;this.guideGroup=e.addGroup({name:"tooltipGuide",capture:!1})}return this.guideGroup},t.prototype.getTooltipMarkersGroup=function(){var e=this.tooltipMarkersGroup;return e&&!e.destroyed?(e.clear(),e.show()):((e=this.getGuideGroup().addGroup({name:"tooltipMarkersGroup"})).toFront(),this.tooltipMarkersGroup=e),e},t.prototype.getTooltipCrosshairsGroup=function(){var e=this.tooltipCrosshairsGroup;return e||((e=this.getGuideGroup().addGroup({name:"tooltipCrosshairsGroup",capture:!1})).toBack(),this.tooltipCrosshairsGroup=e),e},t.prototype.findItemsFromView=function(e,t){var n,r;if(!1===e.getOptions().tooltip)return[];var o=mu(e,t,this.getTooltipCfg());try{for(var i=(0,S.XA)(e.views),a=i.next();!a.done;a=i.next()){var l=a.value;o=o.concat(this.findItemsFromView(l,t))}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o},t.prototype.getViewWithGeometry=function(e){var t=this;return e.geometries.length?e:(0,E.sE)(e.views,(function(e){return t.getViewWithGeometry(e)}))},t.prototype.getItemsAfterProcess=function(e){return(this.getTooltipCfg().customItems||function(e){return e})(e)},t}(Nu);const Ru=Tu;var Lu={};function Du(e){return Lu[e.toLowerCase()]}function ju(e,t){Lu[e.toLowerCase()]=t}var Fu={appear:{duration:450,easing:"easeQuadOut"},update:{duration:400,easing:"easeQuadInOut"},enter:{duration:400,easing:"easeQuadInOut"},leave:{duration:350,easing:"easeQuadIn"}},Bu={interval:function(e){return{enter:{animation:e.isRect?e.isTransposed?"scale-in-x":"scale-in-y":"fade-in"},update:{animation:e.isPolar&&e.isTransposed?"sector-path-update":null},leave:{animation:"fade-out"}}},line:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},path:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},point:{appear:{animation:"zoom-in"},enter:{animation:"zoom-in"},leave:{animation:"zoom-out"}},area:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},polygon:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},schema:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},edge:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},label:{appear:{animation:"fade-in",delay:450},enter:{animation:"fade-in"},update:{animation:"position-update"},leave:{animation:"fade-out"}}},zu={line:function(){return{animation:"wave-in"}},area:function(){return{animation:"wave-in"}},path:function(){return{animation:"fade-in"}},interval:function(e){var t;return e.isRect?t=e.isTransposed?"grow-in-x":"grow-in-y":(t="grow-in-xy",e.isPolar&&e.isTransposed&&(t="wave-in")),{animation:t}},schema:function(e){return{animation:e.isRect?e.isTransposed?"grow-in-x":"grow-in-y":"grow-in-xy"}},polygon:function(){return{animation:"fade-in",duration:500}},edge:function(){return{animation:"fade-in"}}};function Hu(e,t,n){var r=Bu[e];return r&&((0,E.mf)(r)&&(r=r(t)),r=(0,E.b$)({},Fu,r),n)?r[n]:r}function Uu(e,t,n){var r=(0,E.U2)(e.get("origin"),"data",N),o=t.animation,i=function(e,t){return{delay:(0,E.mf)(e.delay)?e.delay(t):e.delay,easing:(0,E.mf)(e.easing)?e.easing(t):e.easing,duration:(0,E.mf)(e.duration)?e.duration(t):e.duration,callback:e.callback,repeat:e.repeat}}(t,r);if(o){var a=Du(o);a&&a(e,i,n)}else e.animate(n.toAttrs,i)}var Wu="element-background",Vu=function(e){function t(t){var n=e.call(this,t)||this;n.labelShape=[],n.states=[];var r=t.shapeFactory,o=t.container,i=t.offscreenGroup,a=t.elementIndex,l=t.visible,s=void 0===l||l;return n.shapeFactory=r,n.container=o,n.offscreenGroup=i,n.visible=s,n.elementIndex=a,n}return(0,S.ZT)(t,e),t.prototype.draw=function(e,t){void 0===t&&(t=!1),this.model=e,this.data=e.data,this.shapeType=this.getShapeType(e),this.drawShape(e,t),!1===this.visible&&this.changeVisible(!1)},t.prototype.update=function(e){var t=this.shapeFactory,n=this.shape;if(n){this.model=e,this.data=e.data,this.shapeType=this.getShapeType(e),this.setShapeInfo(n,e);var r=this.getOffscreenGroup(),o=t.drawShape(this.shapeType,e,r);o.cfg.data=this.data,o.cfg.origin=e,o.cfg.element=this,this.syncShapeStyle(n,o,this.getStates(),this.getAnimateCfg("update"))}},t.prototype.destroy=function(){var t=this.shapeFactory,n=this.shape;if(n){var r=this.getAnimateCfg("leave");r?Uu(n,r,{coordinate:t.coordinate,toAttrs:(0,S.pi)({},n.attr())}):n.remove(!0)}this.states=[],this.shapeFactory=void 0,this.container=void 0,this.shape=void 0,this.animate=void 0,this.geometry=void 0,this.labelShape=[],this.model=void 0,this.data=void 0,this.offscreenGroup=void 0,this.statesStyle=void 0,e.prototype.destroy.call(this)},t.prototype.changeVisible=function(t){e.prototype.changeVisible.call(this,t),t?(this.shape&&this.shape.show(),this.labelShape&&this.labelShape.forEach((function(e){e.show()}))):(this.shape&&this.shape.hide(),this.labelShape&&this.labelShape.forEach((function(e){e.hide()})))},t.prototype.setState=function(e,t){var n=this,r=n.states,o=n.shapeFactory,i=n.model,a=n.shape,l=n.shapeType,s=r.indexOf(e);if(t){if(s>-1)return;r.push(e),"active"!==e&&"selected"!==e||null==a||a.toFront()}else{if(-1===s)return;if(r.splice(s,1),"active"===e||"selected"===e){var c=this.geometry,u=c.sortZIndex,d=c.zIndexReversed?this.geometry.elements.length-this.elementIndex:this.elementIndex;u?a.setZIndex(d):a.set("zIndex",d)}}var f=o.drawShape(l,i,this.getOffscreenGroup());r.length?this.syncShapeStyle(a,f,r,null):this.syncShapeStyle(a,f,["reset"],null),f.remove(!0);var p={state:e,stateStatus:t,element:this,target:this.container};this.container.emit("statechange",p),_i(this.shape,"statechange",p)},t.prototype.clearStates=function(){var e=this,t=this.states;(0,E.S6)(t,(function(t){e.setState(t,!1)})),this.states=[]},t.prototype.hasState=function(e){return this.states.includes(e)},t.prototype.getStates=function(){return this.states},t.prototype.getData=function(){return this.data},t.prototype.getModel=function(){return this.model},t.prototype.getBBox=function(){var e=this.shape,t=this.labelShape,n={x:0,y:0,minX:0,minY:0,maxX:0,maxY:0,width:0,height:0};return e&&(n=e.getCanvasBBox()),t&&t.forEach((function(e){var t=e.getCanvasBBox();n.x=Math.min(t.x,n.x),n.y=Math.min(t.y,n.y),n.minX=Math.min(t.minX,n.minX),n.minY=Math.min(t.minY,n.minY),n.maxX=Math.max(t.maxX,n.maxX),n.maxY=Math.max(t.maxY,n.maxY)})),n.width=n.maxX-n.minX,n.height=n.maxY-n.minY,n},t.prototype.getStatesStyle=function(){if(!this.statesStyle){var e=this,t=e.shapeType,n=e.geometry,r=e.shapeFactory,o=n.stateOption,i=r.defaultShapeType,a=r.theme[t]||r.theme[i];this.statesStyle=(0,E.b$)({},a,o)}return this.statesStyle},t.prototype.getStateStyle=function(e,t){var n=this.getStatesStyle(),r=(0,E.U2)(n,[e,"style"],{}),o=r[t]||r;return(0,E.mf)(o)?o(this):o},t.prototype.getAnimateCfg=function(e){var t=this,n=this.animate;if(n){var r=n[e];return r?(0,S.pi)((0,S.pi)({},r),{callback:function(){var e;(0,E.mf)(r.callback)&&r.callback(),null===(e=t.geometry)||void 0===e||e.emit(k.AFTER_DRAW_ANIMATE)}}):r}return null},t.prototype.drawShape=function(e,t){var n;void 0===t&&(t=!1);var r=this,o=r.shapeFactory,i=r.container,a=r.shapeType;if(this.shape=o.drawShape(a,e,i),this.shape){this.setShapeInfo(this.shape,e);var l=this.shape.cfg.name;l?(0,E.HD)(l)&&(this.shape.cfg.name=["element",l]):this.shape.cfg.name=["element",this.shapeFactory.geometryType];var s=t?"enter":"appear",c=this.getAnimateCfg(s);c&&(null===(n=this.geometry)||void 0===n||n.emit(k.BEFORE_DRAW_ANIMATE),Uu(this.shape,c,{coordinate:o.coordinate,toAttrs:(0,S.pi)({},this.shape.attr())}))}},t.prototype.getOffscreenGroup=function(){if(!this.offscreenGroup){var e=this.container.getGroupBase();this.offscreenGroup=new e({})}return this.offscreenGroup},t.prototype.setShapeInfo=function(e,t){var n=this;e.cfg.origin=t,e.cfg.element=this,e.isGroup()&&e.get("children").forEach((function(e){n.setShapeInfo(e,t)}))},t.prototype.syncShapeStyle=function(e,t,n,r,o){var i,a=this;if(void 0===n&&(n=[]),void 0===o&&(o=0),e&&t){var l=e.get("clipShape"),s=t.get("clipShape");if(this.syncShapeStyle(l,s,n,r),e.isGroup())for(var c=e.get("children"),u=t.get("children"),d=0;d=a[c]?1:0,f=u>Math.PI?1:0,p=n.convert(l),h=Os(n,p);if(h>=.5)if(u===2*Math.PI){var g={x:(l.x+a.x)/2,y:(l.y+a.y)/2},m=n.convert(g);s.push(["A",h,h,0,f,d,m.x,m.y]),s.push(["A",h,h,0,f,d,p.x,p.y])}else s.push(["A",h,h,0,f,d,p.x,p.y]);return s}(n,r,e)):o.push(Js(i,e));break;case"a":o.push(Qs(i,e));break;default:o.push(i)}})),function(e){(0,E.S6)(e,(function(t,n){if("a"===t[0].toLowerCase()){var r=e[n-1],o=e[n+1];o&&"a"===o[0].toLowerCase()?r&&"l"===r[0].toLowerCase()&&(r[0]="M"):r&&"a"===r[0].toLowerCase()&&o&&"l"===o[0].toLowerCase()&&(o[0]="M")}}))}(o),o}(t,n):function(e,t){var n=[];return(0,E.S6)(t,(function(t){switch(t[0].toLowerCase()){case"m":case"l":case"c":n.push(Js(t,e));break;case"a":n.push(Qs(t,e));break;default:n.push(t)}})),n}(t,n),n},parsePoint:function(e){return this.coordinate.convert(e)},parsePoints:function(e){var t=this.coordinate;return e.map((function(e){return t.convert(e)}))},draw:function(e,t){}},td={};function nd(e,t){var n=(0,E.jC)(e),r=(0,S.pi)((0,S.pi)((0,S.pi)({},Qu),t),{geometryType:e});return td[n]=r,r}function rd(e,t,n){var r=(0,E.jC)(e),o=td[r],i=(0,S.pi)((0,S.pi)({},ed),n);return o[t]=i,i}function od(e){var t=(0,E.jC)(e);return td[t]}function id(e,t){return(0,E.G)(["color","shape","size","x","y","isInCircle","data","style","defaultStyle","points","mappingData"],(function(n){return!(0,E.Xy)(e[n],t[n])}))}function ad(e){return(0,E.kJ)(e)?e:e.split("*")}function ld(e,t){for(var n=[],r=[],o=[],i=new Map,a=0;a=0?t:n<=0?n:0},t.prototype.createAttrOption=function(e,t,n){if((0,E.UM)(t)||(0,E.Kn)(t))(0,E.Kn)(t)&&(0,E.Xy)(Object.keys(t),["values"])?(0,E.t8)(this.attributeOption,e,{fields:t.values}):(0,E.t8)(this.attributeOption,e,t);else{var r={};(0,E.hj)(t)?r.values=[t]:r.fields=ad(t),n&&((0,E.mf)(n)?r.callback=n:r.values=n),(0,E.t8)(this.attributeOption,e,r)}},t.prototype.initAttributes=function(){var e=this,t=this,n=t.attributes,r=t.attributeOption,o=t.theme,i=t.shapeType;this.groupScales=[];var a={},l=function(t){if(r.hasOwnProperty(t)){var l=r[t];if(!l)return{value:void 0};var s=(0,S.pi)({},l),c=s.callback,u=s.values,d=s.fields,f=(void 0===d?[]:d).map((function(n){var r=e.scales[n];return!a[n]&&A.includes(t)&&"cat"===_s(r,(0,E.U2)(e.scaleDefs,n),t,e.type)&&(e.groupScales.push(r),a[n]=!0),r}));s.scales=f,"position"!==t&&1===f.length&&"identity"===f[0].type?s.values=f[0].values:c||u||("size"===t?s.values=o.sizes:"shape"===t?s.values=o.shapes[i]||[]:"color"===t&&(f.length?s.values=f[0].values.length<=10?o.colors10:o.colors20:s.values=o.colors10));var p=br(t);n[t]=new p(s)}};for(var s in r){var c=l(s);if("object"==typeof c)return c.value}},t.prototype.processData=function(e){var t,n;this.hasSorted=!1;for(var r=this.getAttribute("position").scales.filter((function(e){return e.isCategory})),o=this.groupData(e),i=[],a=0,l=o.length;ai&&(i=c)}var u=this.scaleDefs,d={};oe.max&&!(0,E.U2)(u,[r,"max"])&&(d.max=i),e.change(d)},t.prototype.beforeMapping=function(e){var t=e;if(this.sortable&&this.sort(t),this.generatePoints)for(var n=0,r=t.length;n1)for(var u=0;u0}))}function md(e,t,n){var r=n.data,o=n.origin,i=n.animateCfg,a=n.coordinate,l=(0,E.U2)(i,"update");e.set("data",r),e.set("origin",o),e.set("animateCfg",i),e.set("coordinate",a),e.set("visible",t.get("visible")),(e.getChildren()||[]).forEach((function(s,c){var u=t.getChildByIndex(c);if(u){s.set("data",r),s.set("origin",o),s.set("animateCfg",i),s.set("coordinate",a);var d=xs(s,u);l?Uu(s,l,{toAttrs:d,coordinate:a}):s.attr(d),u.isGroup()&&md(s,u,n)}else e.removeChild(s),s.remove(!0)})),(0,E.S6)(t.getChildren(),(function(t,n){(0,E.kJ)(e.getChildren())&&n>=e.getCount()&&(t.destroyed||e.add(t))}))}var vd=function(){function e(e){this.shapesMap={};var t=e.layout,n=e.container;this.layout=t,this.container=n}return e.prototype.render=function(e,t,n){return void 0===n&&(n=!1),(0,S.mG)(this,void 0,void 0,(function(){var r,o,i,a,l,s,c,u,d=this;return(0,S.Jh)(this,(function(f){switch(f.label){case 0:if(r={},o=this.createOffscreenGroup(),!e.length)return[3,2];try{for(i=(0,S.XA)(e),a=i.next();!a.done;a=i.next())(l=a.value)&&(r[l.id]=this.renderLabel(l,o))}catch(e){c={error:e}}finally{try{a&&!a.done&&(u=i.return)&&u.call(i)}finally{if(c)throw c.error}}return[4,this.doLayout(e,t,r)];case 1:f.sent(),this.renderLabelLine(e,r),this.renderLabelBackground(e,r),this.adjustLabel(e,r),f.label=2;case 2:return s=this.shapesMap,(0,E.S6)(r,(function(e,t){if(e.destroyed)delete r[t];else{if(s[t]){var o=e.get("data"),i=e.get("origin"),a=e.get("coordinate"),l=e.get("animateCfg"),c=s[t];md(c,r[t],{data:o,origin:i,animateCfg:l,coordinate:a}),r[t]=c}else{if(d.container.destroyed)return;d.container.add(e);var u=(0,E.U2)(e.get("animateCfg"),n?"enter":"appear");u&&Uu(e,u,{toAttrs:(0,S.pi)({},e.attr()),coordinate:e.get("coordinate")})}delete s[t]}})),(0,E.S6)(s,(function(e){var t=(0,E.U2)(e.get("animateCfg"),"leave");t?Uu(e,t,{toAttrs:null,coordinate:e.get("coordinate")}):e.remove(!0)})),this.shapesMap=r,o.destroy(),[2]}}))}))},e.prototype.clear=function(){this.container.clear(),this.shapesMap={}},e.prototype.destroy=function(){this.container.destroy(),this.shapesMap=null},e.prototype.renderLabel=function(e,t){var n,r=e.id,o=e.elementId,i=e.data,a=e.mappingData,l=e.coordinate,s=e.animate,c=e.content,u={id:r,elementId:o,capture:e.capture,data:i,origin:(0,S.pi)((0,S.pi)({},a),{data:a[N]}),coordinate:l},d=t.addGroup((0,S.pi)({name:"label",animateCfg:!1!==this.animate&&null!==s&&!1!==s&&(0,E.b$)({},this.animate,s)},u));if(c.isGroup&&c.isGroup()||c.isShape&&c.isShape()){var f=c.getCanvasBBox(),p=f.width,h=f.height,g=(0,E.U2)(e,"textAlign","left"),m=e.x;"center"===g?m-=p/2:"right"!==g&&"end"!==g||(m-=p),dd(c,m,e.y-h/2),n=c,d.add(c)}else{var v=(0,E.U2)(e,["style","fill"]);n=d.addShape("text",(0,S.pi)({attrs:(0,S.pi)((0,S.pi)({x:e.x,y:e.y,textAlign:e.textAlign,textBaseline:(0,E.U2)(e,"textBaseline","middle"),text:e.content},e.style),{fill:(0,E.Ft)(v)?e.color:v})},u))}return e.rotate&&fd(n,e.rotate),d},e.prototype.doLayout=function(e,t,n){return(0,S.mG)(this,void 0,void 0,(function(){var r,o=this;return(0,S.Jh)(this,(function(i){switch(i.label){case 0:return this.layout?(r=(0,E.kJ)(this.layout)?this.layout:[this.layout],[4,Promise.all(r.map((function(r){var i=Zu((0,E.U2)(r,"type",""));if(i){var a=[],l=[];return(0,E.S6)(n,(function(e,n){a.push(e),l.push(t[e.get("elementId")])})),i(e,a,l,o.region,r.cfg)}})))]):[3,2];case 1:i.sent(),i.label=2;case 2:return[2]}}))}))},e.prototype.renderLabelLine=function(e,t){(0,E.S6)(e,(function(e){var n=(0,E.U2)(e,"coordinate");if(e&&n){var r=n.getCenter(),o=n.getRadius();if(e.labelLine){var i=(0,E.U2)(e,"labelLine",{}),a=e.id,l=i.path;if(!l){var s=ms(r.x,r.y,o,e.angle);l=[["M",s.x,s.y],["L",e.x,e.y]]}var c=t[a];c.destroyed||c.addShape("path",{capture:!1,attrs:(0,S.pi)({path:l,stroke:e.color?e.color:(0,E.U2)(e,["style","fill"],"#000"),fill:null},i.style),id:a,origin:e.mappingData,data:e.data,coordinate:e.coordinate})}}}))},e.prototype.renderLabelBackground=function(e,t){(0,E.S6)(e,(function(e){var n=(0,E.U2)(e,"coordinate"),r=(0,E.U2)(e,"background");if(r&&n){var o=e.id,i=t[o];if(!i.destroyed){var a=i.getChildren()[0];if(a){var l=hd(i,e,r.padding),s=l.rotation,c=(0,S._T)(l,["rotation"]),u=i.addShape("rect",{attrs:(0,S.pi)((0,S.pi)({},c),r.style||{}),id:o,origin:e.mappingData,data:e.data,coordinate:e.coordinate});if(u.setZIndex(-1),s){var d=a.getMatrix();u.setMatrix(d)}}}}}))},e.prototype.createOffscreenGroup=function(){return new(this.container.getGroupBase())({})},e.prototype.adjustLabel=function(e,t){(0,E.S6)(e,(function(e){if(e){var n=e.id,r=t[n];if(!r.destroyed){var o=r.findAll((function(e){return"path"!==e.get("type")}));(0,E.S6)(o,(function(t){t&&(e.offsetX&&t.attr("x",t.attr("x")+e.offsetX),e.offsetY&&t.attr("y",t.attr("y")+e.offsetY))}))}}}))},e}();const yd=vd;function bd(e){var t=0;return(0,E.S6)(e,(function(e){t+=e})),t/e.length}var xd=function(){function e(e){this.geometry=e}return e.prototype.getLabelItems=function(e){var t=this,n=[],r=this.getLabelCfgs(e);return(0,E.S6)(e,(function(e,o){var i=r[o];if(!i||(0,E.UM)(e.x)||(0,E.UM)(e.y))n.push(null);else{var a=(0,E.kJ)(i.content)?i.content:[i.content];i.content=a;var l=a.length;(0,E.S6)(a,(function(r,o){if((0,E.UM)(r)||""===r)n.push(null);else{var a=(0,S.pi)((0,S.pi)({},i),t.getLabelPoint(i,e,o));a.textAlign||(a.textAlign=t.getLabelAlign(a,o,l)),a.offset<=0&&(a.labelLine=null),n.push(a)}}))}})),n},e.prototype.render=function(e,t){return void 0===t&&(t=!1),(0,S.mG)(this,void 0,void 0,(function(){var n,r,o;return(0,S.Jh)(this,(function(i){switch(i.label){case 0:return n=this.getLabelItems(e),r=this.getLabelsRenderer(),o=this.getGeometryShapes(),[4,r.render(n,o,t)];case 1:return i.sent(),[2]}}))}))},e.prototype.clear=function(){var e=this.labelsRenderer;e&&e.clear()},e.prototype.destroy=function(){var e=this.labelsRenderer;e&&e.destroy(),this.labelsRenderer=null},e.prototype.getCoordinate=function(){return this.geometry.coordinate},e.prototype.getDefaultLabelCfg=function(e,t){var n=this.geometry,r=n.type,o=n.theme;return"polygon"===r||"interval"===r&&"middle"===t||e<0&&!["line","point","path"].includes(r)?(0,E.U2)(o,"innerLabels",{}):(0,E.U2)(o,"labels",{})},e.prototype.getThemedLabelCfg=function(e){var t=this.geometry,n=this.getDefaultLabelCfg(),r=t.type,o=t.theme;return"polygon"===r||e.offset<0&&!["line","point","path"].includes(r)?(0,E.b$)({},n,o.innerLabels,e):(0,E.b$)({},n,o.labels,e)},e.prototype.setLabelPosition=function(e,t,n,r){},e.prototype.getLabelOffset=function(e){var t=this.getCoordinate(),n=this.getOffsetVector(e);return t.isTransposed?n[0]:n[1]},e.prototype.getLabelOffsetPoint=function(e,t,n){var r=e.offset,o=this.getCoordinate().isTransposed,i=o?1:-1,a={x:0,y:0};return a[o?"x":"y"]=t>0||1===n?r*i:r*i*-1,a},e.prototype.getLabelPoint=function(e,t,n){var r=this.getCoordinate(),o=e.content.length;function i(t,n,r){void 0===r&&(r=!1);var o=t;return(0,E.kJ)(o)&&(o=1===e.content.length?r?bd(o):o.length<=2?o[t.length-1]:bd(o):o[n]),o}var a={content:e.content[n],x:0,y:0,start:{x:0,y:0},color:"#fff"},l=(0,E.kJ)(t.shape)?t.shape[0]:t.shape,s="funnel"===l||"pyramid"===l;if("polygon"===this.geometry.type){var c=function(e,t){if((0,E.hj)(e)&&(0,E.hj)(t))return[e,t];if(hs(e)||hs(t))return[gs(e),gs(t)];for(var n,r,o=-1,i=0,a=0,l=e.length-1,s=0;++o1&&0===t&&("right"===r?r="left":"left"===r&&(r="right"))}return r},e.prototype.getLabelId=function(e){var t=this.geometry,n=t.type,r=t.getXScale(),o=t.getYScale(),i=e[N],a=t.getElementId(e);return"line"===n||"area"===n?a+=" ".concat(i[r.field]):"path"===n&&(a+=" ".concat(i[r.field],"-").concat(i[o.field])),a},e.prototype.getLabelsRenderer=function(){var e=this.geometry,t=e.labelsContainer,n=e.labelOption,r=e.canvasRegion,o=e.animateOption,i=this.geometry.coordinate,a=this.labelsRenderer;return a||(a=new yd({container:t,layout:(0,E.U2)(n,["cfg","layout"],{type:this.defaultLayout})}),this.labelsRenderer=a),a.region=r,a.animate=!!o&&Hu("label",i),a},e.prototype.getLabelCfgs=function(e){var t=this,n=this.geometry,r=n.labelOption,o=n.scales,i=n.coordinate,a=r,l=a.fields,s=a.callback,c=a.cfg,u=l.map((function(e){return o[e]})),d=[];return(0,E.S6)(e,(function(e,n){var r,o=e[N],a=t.getLabelText(o,u);if(s){var f=l.map((function(e){return o[e]}));if(r=s.apply(void 0,(0,S.ev)([],(0,S.CR)(f),!1)),(0,E.UM)(r))return void d.push(null)}var p=(0,S.pi)((0,S.pi)({id:t.getLabelId(e),elementId:t.geometry.getElementId(e),data:o,mappingData:e,coordinate:i},c),r);(0,E.mf)(p.position)&&(p.position=p.position(o,e,n));var h=t.getLabelOffset(p.offset||0),g=t.getDefaultLabelCfg(h,p.position);(p=(0,E.b$)({},g,p)).offset=t.getLabelOffset(p.offset||0);var m=p.content;(0,E.mf)(m)?p.content=m(o,e,n):(0,E.o8)(m)&&(p.content=a[0]),d.push(p)})),d},e.prototype.getLabelText=function(e,t){var n=[];return(0,E.S6)(t,(function(t){var r=e[t.field];r=(0,E.kJ)(r)?r.map((function(e){return t.getText(e)})):t.getText(r),(0,E.UM)(r)||""===r?n.push(null):n.push(r)})),n},e.prototype.getOffsetVector=function(e){void 0===e&&(e=0);var t=this.getCoordinate(),n=0;return(0,E.hj)(e)&&(n=e),t.isTransposed?t.applyMatrix(n,0):t.applyMatrix(0,n)},e.prototype.getGeometryShapes=function(){var e=this.geometry,t={};return(0,E.S6)(e.elementsMap,(function(e,n){t[n]=e.shape})),(0,E.S6)(e.getOffscreenGroup().getChildren(),(function(n){var r=e.getElementId(n.get("origin").mappingData);t[r]=n})),t},e}();const wd=xd;function Sd(e,t,n){if(!e)return n;var r;if(e.callback&&e.callback.length>1){var o=Array(e.callback.length-1).fill("");r=e.mapping.apply(e,(0,S.ev)([t],(0,S.CR)(o),!1)).join("")}else r=e.mapping(t).join("");return r||n}var Ed={hexagon:function(e,t,n){var r=n/2*Math.sqrt(3);return[["M",e,t-n],["L",e+r,t-n/2],["L",e+r,t+n/2],["L",e,t+n],["L",e-r,t+n/2],["L",e-r,t-n/2],["Z"]]},bowtie:function(e,t,n){var r=n-1.5;return[["M",e-n,t-r],["L",e+n,t+r],["L",e+n,t-r],["L",e-n,t+r],["Z"]]},cross:function(e,t,n){return[["M",e-n,t-n],["L",e+n,t+n],["M",e+n,t-n],["L",e-n,t+n]]},tick:function(e,t,n){return[["M",e-n/2,t-n],["L",e+n/2,t-n],["M",e,t-n],["L",e,t+n],["M",e-n/2,t+n],["L",e+n/2,t+n]]},plus:function(e,t,n){return[["M",e-n,t],["L",e+n,t],["M",e,t-n],["L",e,t+n]]},hyphen:function(e,t,n){return[["M",e-n,t],["L",e+n,t]]},line:function(e,t,n){return[["M",e,t-n],["L",e,t+n]]}},Cd=["line","cross","tick","plus","hyphen"];function kd(e){var t=e.symbol;(0,E.HD)(t)&&Ed[t]&&(e.symbol=Ed[t])}function Od(e){return e.startsWith(y.LEFT)||e.startsWith(y.RIGHT)?"vertical":"horizontal"}function Md(e,t,n,r,o){var i=n.getScale(n.type);if(i.isCategory){var a=i.field,l=t.getAttribute("color"),s=t.getAttribute("shape"),c=e.getTheme().defaultColor,u=t.coordinate.isPolar;return i.getTicks().map((function(n,d){var f,p=n.text,h=n.value,g=p,m=i.invert(h),v=0===e.filterFieldData(a,[(f={},f[a]=m,f)]).length;(0,E.S6)(e.views,(function(e){var t;e.filterFieldData(a,[(t={},t[a]=m,t)]).length||(v=!0)}));var y,b,x=Sd(l,m,c),w=Sd(s,m,"point"),C=t.getShapeMarker(w,{color:x,isInPolar:u}),k=o;return(0,E.mf)(k)&&(k=k(g,d,(0,S.pi)({name:g,value:m},(0,E.b$)({},r,C)))),function(e,t){var n=e.symbol;if((0,E.HD)(n)&&-1!==Cd.indexOf(n)){var r=(0,E.U2)(e,"style",{}),o=(0,E.U2)(r,"lineWidth",1),i=r.stroke||r.fill||t;e.style=(0,E.b$)({},e.style,{lineWidth:o,stroke:i,fill:null})}}(C=(0,E.b$)({},r,C,Ss((0,S.pi)({},k),["style"])),x),k&&k.style&&(C.style=(y=C.style,b=k.style,(0,E.mf)(b)?b(y):(0,E.b$)({},y,b))),kd(C),{id:m,name:g,value:m,marker:C,unchecked:v}}))}return[]}function Id(e,t){var n=(0,E.U2)(e,["components","legend"],{});return(0,E.b$)({},(0,E.U2)(n,["common"],{}),(0,E.b$)({},(0,E.U2)(n,[t],{})))}function $d(e){return!e&&(null==e||isNaN(e))}function _d(e){if((0,E.kJ)(e))return $d(e[1].y);var t=e.y;return(0,E.kJ)(t)?$d(t[0]):$d(t)}function Pd(e,t,n){if(void 0===t&&(t=!1),void 0===n&&(n=!0),!e.length||1===e.length&&!n)return[];if(t){for(var r=[],o=0,i=e.length;o=e&&o<=e+n&&i>=t&&i<=t+r}function nf(e,t){return!(t.minX>e.maxX||t.maxXe.maxY||t.maxY=0&&a<.5*Math.PI?(r={x:s.minX,y:s.minY},o={x:s.maxX,y:s.maxY}):.5*Math.PI<=a&&a1&&(n*=Math.sqrt(p),r*=Math.sqrt(p));var h=n*n*(f*f)+r*r*(d*d),g=h?Math.sqrt((n*n*(r*r)-h)/h):1;i===a&&(g*=-1),isNaN(g)&&(g=0);var m=r?g*n*f/r:0,v=n?g*-r*d/n:0,y=(l+c)/2+Math.cos(o)*m-Math.sin(o)*v,b=(s+u)/2+Math.sin(o)*m+Math.cos(o)*v,x=[(d-m)/n,(f-v)/r],w=[(-1*d-m)/n,(-1*f-v)/r],S=pf([1,0],x),C=pf(x,w);return ff(x,w)<=-1&&(C=Math.PI),ff(x,w)>=1&&(C=0),0===a&&C>0&&(C-=2*Math.PI),1===a&&C<0&&(C+=2*Math.PI),{cx:y,cy:b,rx:rf(e,[c,u])?0:n,ry:rf(e,[c,u])?0:r,startAngle:S,endAngle:S+C,xRotation:o,arcFlag:i,sweepFlag:a}}var gf=Math.sin,mf=Math.cos,vf=Math.atan2,yf=Math.PI;function bf(e,t,n,r,o,i,a){var l=t.stroke,s=t.lineWidth,c=vf(r-i,n-o),u=new lp({type:"path",canvas:e.get("canvas"),isArrowShape:!0,attrs:{path:"M"+10*mf(yf/6)+","+10*gf(yf/6)+" L0,0 L"+10*mf(yf/6)+",-"+10*gf(yf/6),stroke:l,lineWidth:s}});u.translate(o,i),u.rotateAtPoint(o,i,c),e.set(a?"startArrowShape":"endArrowShape",u)}function xf(e,t,n,r,o,i,a){var l=t.startArrow,s=t.endArrow,c=t.stroke,u=t.lineWidth,d=a?l:s,f=d.d,p=d.fill,h=d.stroke,g=d.lineWidth,m=(0,S._T)(d,["d","fill","stroke","lineWidth"]),v=vf(r-i,n-o);f&&(o-=mf(v)*f,i-=gf(v)*f);var y=new lp({type:"path",canvas:e.get("canvas"),isArrowShape:!0,attrs:(0,S.pi)((0,S.pi)({},m),{stroke:h||c,lineWidth:g||u,fill:p})});y.translate(o,i),y.rotateAtPoint(o,i,v),e.set(a?"startArrowShape":"endArrowShape",y)}function wf(e,t,n,r,o){var i=vf(r-t,n-e);return{dx:mf(i)*o,dy:gf(i)*o}}function Sf(e,t,n,r,o,i){"object"==typeof t.startArrow?xf(e,t,n,r,o,i,!0):t.startArrow?bf(e,t,n,r,o,i,!0):e.set("startArrowShape",null)}function Ef(e,t,n,r,o,i){"object"==typeof t.endArrow?xf(e,t,n,r,o,i,!1):t.endArrow?bf(e,t,n,r,o,i,!1):e.set("startArrowShape",null)}var Cf={fill:"fillStyle",stroke:"strokeStyle",opacity:"globalAlpha"};function kf(e,t){var n=t.attr();for(var r in n){var o=n[r],i=Cf[r]?Cf[r]:r;"matrix"===i&&o?e.transform(o[0],o[1],o[3],o[4],o[6],o[7]):"lineDash"===i&&e.setLineDash?(0,E.kJ)(o)&&e.setLineDash(o):("strokeStyle"===i||"fillStyle"===i?o=uf(e,t,o):"globalAlpha"===i&&(o*=e.globalAlpha),e[i]=o)}}function Of(e,t,n){for(var r=0;rx?b:x,O=b>x?1:b/x,M=b>x?x/b:1;t.translate(v,y),t.rotate(E),t.scale(O,M),t.arc(0,0,k,w,S,1-C),t.scale(1/O,1/M),t.rotate(-E),t.translate(-v,-y)}break;case"Z":t.closePath()}if("Z"===f)l=s;else{var I=d.length;l=[d[I-2],d[I-1]]}}}}function Nf(e,t){var n=e.get("canvas");n&&("remove"===t&&(e._cacheCanvasBBox=e.get("cacheCanvasBBox")),e.get("hasChanged")||(e.set("hasChanged",!0),e.cfg.parent&&e.cfg.parent.get("hasChanged")||(n.refreshElement(e,t,n),n.get("autoDraw")&&n.draw())))}var Tf=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.onCanvasChange=function(e){Nf(this,e)},t.prototype.getShapeBase=function(){return d},t.prototype.getGroupBase=function(){return t},t.prototype._applyClip=function(e,t){t&&(e.save(),kf(e,t),t.createPath(e),e.restore(),e.clip(),t._afterDraw())},t.prototype.cacheCanvasBBox=function(){var e=this.cfg.children,t=[],n=[];(0,E.S6)(e,(function(e){var r=e.cfg.cacheCanvasBBox;r&&e.cfg.isInView&&(t.push(r.minX,r.maxX),n.push(r.minY,r.maxY))}));var r=null;if(t.length){var o=(0,E.VV)(t),i=(0,E.Fp)(t),a=(0,E.VV)(n),l=(0,E.Fp)(n);r={minX:o,minY:a,x:o,y:a,maxX:i,maxY:l,width:i-o,height:l-a};var s=this.cfg.canvas;if(s){var c=s.getViewRange();this.set("isInView",nf(r,c))}}else this.set("isInView",!1);this.set("cacheCanvasBBox",r)},t.prototype.draw=function(e,t){var n=this.cfg.children,r=!t||this.cfg.refresh;n.length&&r&&(e.save(),kf(e,this),this._applyClip(e,this.getClip()),Of(e,n,t),e.restore(),this.cacheCanvasBBox()),this.cfg.refresh=null,this.set("hasChanged",!1)},t.prototype.skipDraw=function(){this.set("cacheCanvasBBox",null),this.set("hasChanged",!1)},t}(Qd.AbstractGroup);const Rf=Tf;var Lf=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return(0,S.pi)((0,S.pi)({},t),{lineWidth:1,lineAppendWidth:0,strokeOpacity:1,fillOpacity:1})},t.prototype.getShapeBase=function(){return d},t.prototype.getGroupBase=function(){return Rf},t.prototype.onCanvasChange=function(e){Nf(this,e)},t.prototype.calculateBBox=function(){var e=this.get("type"),t=this.getHitLineWidth(),n=(0,Qd.getBBoxMethod)(e)(this),r=t/2,o=n.x-r,i=n.y-r,a=n.x+n.width+r,l=n.y+n.height+r;return{x:o,minX:o,y:i,minY:i,width:n.width+t,height:n.height+t,maxX:a,maxY:l}},t.prototype.isFill=function(){return!!this.attrs.fill||this.isClipShape()},t.prototype.isStroke=function(){return!!this.attrs.stroke},t.prototype._applyClip=function(e,t){t&&(e.save(),kf(e,t),t.createPath(e),e.restore(),e.clip(),t._afterDraw())},t.prototype.draw=function(e,t){var n=this.cfg.clipShape;if(t){if(!1===this.cfg.refresh)return void this.set("hasChanged",!1);if(!nf(t,this.getCanvasBBox()))return this.set("hasChanged",!1),void(this.cfg.isInView&&this._afterDraw())}e.save(),kf(e,this),this._applyClip(e,n),this.drawPath(e),e.restore(),this._afterDraw()},t.prototype.getCanvasViewBox=function(){var e=this.cfg.canvas;return e?e.getViewRange():null},t.prototype.cacheCanvasBBox=function(){var e=this.getCanvasViewBox();if(e){var t=this.getCanvasBBox(),n=nf(t,e);this.set("isInView",n),n?this.set("cacheCanvasBBox",t):this.set("cacheCanvasBBox",null)}},t.prototype._afterDraw=function(){this.cacheCanvasBBox(),this.set("hasChanged",!1),this.set("refresh",null)},t.prototype.skipDraw=function(){this.set("cacheCanvasBBox",null),this.set("isInView",null),this.set("hasChanged",!1)},t.prototype.drawPath=function(e){this.createPath(e),this.strokeAndFill(e),this.afterDrawPath(e)},t.prototype.fill=function(e){e.fill()},t.prototype.stroke=function(e){e.stroke()},t.prototype.strokeAndFill=function(e){var t=this.attrs,n=t.lineWidth,r=t.opacity,o=t.strokeOpacity,i=t.fillOpacity;this.isFill()&&((0,E.UM)(i)||1===i?this.fill(e):(e.globalAlpha=i,this.fill(e),e.globalAlpha=r)),this.isStroke()&&n>0&&((0,E.UM)(o)||1===o||(e.globalAlpha=o),this.stroke(e)),this.afterDrawPath(e)},t.prototype.createPath=function(e){},t.prototype.afterDrawPath=function(e){},t.prototype.isInShape=function(e,t){var n=this.isStroke(),r=this.isFill(),o=this.getHitLineWidth();return this.isInStrokeOrPath(e,t,n,r,o)},t.prototype.isInStrokeOrPath=function(e,t,n,r,o){return!1},t.prototype.getHitLineWidth=function(){if(!this.isStroke())return 0;var e=this.attrs;return e.lineWidth+e.lineAppendWidth},t}(Qd.AbstractShape);const Df=Lf;var jf=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return(0,S.pi)((0,S.pi)({},t),{x:0,y:0,r:0})},t.prototype.isInStrokeOrPath=function(e,t,n,r,o){var i=this.attr(),a=i.x,l=i.y,s=i.r,c=o/2,u=ef(a,l,e,t);return r&&n?u<=s+c:r?u<=s:!!n&&u>=s-c&&u<=s+c},t.prototype.createPath=function(e){var t=this.attr(),n=t.x,r=t.y,o=t.r;e.beginPath(),e.arc(n,r,o,0,2*Math.PI,!1),e.closePath()},t}(Df);const Ff=jf;function Bf(e,t,n,r){return e/(n*n)+t/(r*r)}const zf=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return(0,S.pi)((0,S.pi)({},t),{x:0,y:0,rx:0,ry:0})},t.prototype.isInStrokeOrPath=function(e,t,n,r,o){var i=this.attr(),a=o/2,l=i.x,s=i.y,c=i.rx,u=i.ry,d=(e-l)*(e-l),f=(t-s)*(t-s);return r&&n?Bf(d,f,c+a,u+a)<=1:r?Bf(d,f,c,u)<=1:!!n&&Bf(d,f,c-a,u-a)>=1&&Bf(d,f,c+a,u+a)<=1},t.prototype.createPath=function(e){var t=this.attr(),n=t.x,r=t.y,o=t.rx,i=t.ry;if(e.beginPath(),e.ellipse)e.ellipse(n,r,o,i,0,0,2*Math.PI,!1);else{var a=o>i?o:i,l=o>i?1:o/i,s=o>i?i/o:1;e.save(),e.translate(n,r),e.scale(l,s),e.arc(0,0,a,0,2*Math.PI),e.restore(),e.closePath()}},t}(Df);function Hf(e){return e instanceof HTMLElement&&(0,E.HD)(e.nodeName)&&"CANVAS"===e.nodeName.toUpperCase()}var Uf=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return(0,S.pi)((0,S.pi)({},t),{x:0,y:0,width:0,height:0})},t.prototype.initAttrs=function(e){this._setImage(e.img)},t.prototype.isStroke=function(){return!1},t.prototype.isOnlyHitBox=function(){return!0},t.prototype._afterLoading=function(){if(!0===this.get("toDraw")){var e=this.get("canvas");e?e.draw():this.createPath(this.get("context"))}},t.prototype._setImage=function(e){var t=this,n=this.attrs;if((0,E.HD)(e)){var r=new Image;r.onload=function(){if(t.destroyed)return!1;t.attr("img",r),t.set("loading",!1),t._afterLoading();var e=t.get("callback");e&&e.call(t)},r.crossOrigin="Anonymous",r.src=e,this.set("loading",!0)}else e instanceof Image?(n.width||(n.width=e.width),n.height||(n.height=e.height)):Hf(e)&&(n.width||(n.width=Number(e.getAttribute("width"))),n.height||(n.height,Number(e.getAttribute("height"))))},t.prototype.onAttrChange=function(t,n,r){e.prototype.onAttrChange.call(this,t,n,r),"img"===t&&this._setImage(n)},t.prototype.createPath=function(e){if(this.get("loading"))return this.set("toDraw",!0),void this.set("context",e);var t=this.attr(),n=t.x,r=t.y,o=t.width,i=t.height,a=t.sx,l=t.sy,s=t.swidth,c=t.sheight,u=t.img;(u instanceof Image||Hf(u))&&((0,E.UM)(a)||(0,E.UM)(l)||(0,E.UM)(s)||(0,E.UM)(c)?e.drawImage(u,n,r,o,i):e.drawImage(u,a,l,s,c,n,r,o,i))},t}(Df);const Wf=Uf;function Vf(e,t,n,r,o,i,a){var l=Math.min(e,n),s=Math.max(e,n),c=Math.min(t,r),u=Math.max(t,r),d=o/2;return i>=l-d&&i<=s+d&&a>=c-d&&a<=u+d&&Ue.x1.pointToLine(e,t,n,r,i,a)<=o/2}var Xf=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return(0,S.pi)((0,S.pi)({},t),{x1:0,y1:0,x2:0,y2:0,startArrow:!1,endArrow:!1})},t.prototype.initAttrs=function(e){this.setArrow()},t.prototype.onAttrChange=function(t,n,r){e.prototype.onAttrChange.call(this,t,n,r),this.setArrow()},t.prototype.setArrow=function(){var e=this.attr(),t=e.x1,n=e.y1,r=e.x2,o=e.y2,i=e.startArrow,a=e.endArrow;i&&Sf(this,e,r,o,t,n),a&&Ef(this,e,t,n,r,o)},t.prototype.isInStrokeOrPath=function(e,t,n,r,o){if(!n||!o)return!1;var i=this.attr();return Vf(i.x1,i.y1,i.x2,i.y2,o,e,t)},t.prototype.createPath=function(e){var t=this.attr(),n=t.x1,r=t.y1,o=t.x2,i=t.y2,a=t.startArrow,l=t.endArrow,s={dx:0,dy:0},c={dx:0,dy:0};a&&a.d&&(s=wf(n,r,o,i,t.startArrow.d)),l&&l.d&&(c=wf(n,r,o,i,t.endArrow.d)),e.beginPath(),e.moveTo(n+s.dx,r+s.dy),e.lineTo(o-c.dx,i-c.dy)},t.prototype.afterDrawPath=function(e){var t=this.get("startArrowShape"),n=this.get("endArrowShape");t&&t.draw(e),n&&n.draw(e)},t.prototype.getTotalLength=function(){var e=this.attr(),t=e.x1,n=e.y1,r=e.x2,o=e.y2;return Ue.x1.length(t,n,r,o)},t.prototype.getPoint=function(e){var t=this.attr(),n=t.x1,r=t.y1,o=t.x2,i=t.y2;return Ue.x1.pointAt(n,r,o,i,e)},t}(Df);const qf=Xf;var Gf={circle:function(e,t,n){return[["M",e-n,t],["A",n,n,0,1,0,e+n,t],["A",n,n,0,1,0,e-n,t]]},square:function(e,t,n){return[["M",e-n,t-n],["L",e+n,t-n],["L",e+n,t+n],["L",e-n,t+n],["Z"]]},diamond:function(e,t,n){return[["M",e-n,t],["L",e,t-n],["L",e+n,t],["L",e,t+n],["Z"]]},triangle:function(e,t,n){var r=n*Math.sin(1/3*Math.PI);return[["M",e-n,t+r],["L",e,t-r],["L",e+n,t+r],["Z"]]},"triangle-down":function(e,t,n){var r=n*Math.sin(1/3*Math.PI);return[["M",e-n,t-r],["L",e+n,t-r],["L",e,t+r],["Z"]]}},Yf=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.initAttrs=function(e){this._resetParamsCache()},t.prototype._resetParamsCache=function(){this.set("paramsCache",{})},t.prototype.onAttrChange=function(t,n,r){e.prototype.onAttrChange.call(this,t,n,r),-1!==["symbol","x","y","r","radius"].indexOf(t)&&this._resetParamsCache()},t.prototype.isOnlyHitBox=function(){return!0},t.prototype._getR=function(e){return(0,E.UM)(e.r)?e.radius:e.r},t.prototype._getPath=function(){var e,n,r=this.attr(),o=r.x,i=r.y,a=r.symbol||"circle",l=this._getR(r);if((0,E.mf)(a))n=(e=a)(o,i,l),n=(0,qe.wb)(n);else{if(!(e=t.Symbols[a]))return console.warn(a+" marker is not supported."),null;n=e(o,i,l)}return n},t.prototype.createPath=function(e){Af(this,e,{path:this._getPath()},this.get("paramsCache"))},t.Symbols=Gf,t}(Df);const Kf=Yf;function Zf(e,t,n){var r=(0,Qd.getOffScreenContext)();return e.createPath(r),r.isPointInPath(t,n)}var Jf=1e-6;function Qf(e){return Math.abs(e)0!=Qf(l[1]-n)>0&&Qf(t-(n-a[1])*(a[0]-l[0])/(a[1]-l[1])-a[0])<0&&(r=!r)}return r}function np(e,t,n,r,o,i,a,l){var s=(Math.atan2(l-t,a-e)+2*Math.PI)%(2*Math.PI);if(so)return!1;var c={x:e+n*Math.cos(s),y:t+n*Math.sin(s)};return ef(c.x,c.y,a,l)<=i/2}var rp=se.vs;const op=(0,S.pi)({hasArc:function(e){for(var t=!1,n=e.length,r=0;r0&&r.push(o),{polygons:n,polylines:r}},isPointInStroke:function(e,t,n,r,o){for(var i=!1,a=t/2,l=0;lv?m:v;Sr(w,w,rp(null,[["t",-h,-g],["r",-x],["s",1/(m>v?1:m/v),1/(m>v?v/m:1)]])),i=np(0,0,S,y,b,t,w[0],w[1])}if(i)break}}return i}},Qd.PathUtil);function ip(e,t,n){for(var r=!1,o=0;o=r[0]&&e<=r[1]&&(t=(e-r[0])/(r[1]-r[0]),n=o)}));var i=o[n];if((0,E.UM)(i)||(0,E.UM)(n))return null;var a=i.length,l=o[n+1];return Ue.Ll.pointAt(i[a-2],i[a-1],l[1],l[2],l[3],l[4],l[5],l[6],t)},t.prototype._calculateCurve=function(){var e=this.attr().path;this.set("curve",op.pathToCurve(e))},t.prototype._setTcache=function(){var e,t,n,r,o=0,i=0,a=[],l=this.get("curve");l&&((0,E.S6)(l,(function(e,t){n=l[t+1],r=e.length,n&&(o+=Ue.Ll.length(e[r-2],e[r-1],n[1],n[2],n[3],n[4],n[5],n[6])||0)})),this.set("totalLength",o),0!==o?((0,E.S6)(l,(function(s,c){n=l[c+1],r=s.length,n&&((e=[])[0]=i/o,t=Ue.Ll.length(s[r-2],s[r-1],n[1],n[2],n[3],n[4],n[5],n[6]),i+=t||0,e[1]=i/o,a.push(e))})),this.set("tCache",a)):this.set("tCache",[]))},t.prototype.getStartTangent=function(){var e,t=this.getSegments();if(t.length>1){var n=t[0].currentPoint,r=t[1].currentPoint,o=t[1].startTangent;e=[],o?(e.push([n[0]-o[0],n[1]-o[1]]),e.push([n[0],n[1]])):(e.push([r[0],r[1]]),e.push([n[0],n[1]]))}return e},t.prototype.getEndTangent=function(){var e,t=this.getSegments(),n=t.length;if(n>1){var r=t[n-2].currentPoint,o=t[n-1].currentPoint,i=t[n-1].endTangent;e=[],i?(e.push([o[0]-i[0],o[1]-i[1]]),e.push([o[0],o[1]])):(e.push([r[0],r[1]]),e.push([o[0],o[1]]))}return e},t}(Df);const lp=ap;function sp(e,t,n,r,o){var i=e.length;if(i<2)return!1;for(var a=0;a=r[0]&&e<=r[1]&&(t=(e-r[0])/(r[1]-r[0]),n=o)})),Ue.x1.pointAt(r[n][0],r[n][1],r[n+1][0],r[n+1][1],t)},t.prototype._setTcache=function(){var e=this.attr().points;if(e&&0!==e.length){var t=this.getTotalLength();if(!(t<=0)){var n,r,o=0,i=[];(0,E.S6)(e,(function(a,l){e[l+1]&&((n=[])[0]=o/t,r=Ue.x1.length(a[0],a[1],e[l+1][0],e[l+1][1]),o+=r,n[1]=o/t,i.push(n))})),this.set("tCache",i)}}},t.prototype.getStartTangent=function(){var e=this.attr().points,t=[];return t.push([e[1][0],e[1][1]]),t.push([e[0][0],e[0][1]]),t},t.prototype.getEndTangent=function(){var e=this.attr().points,t=e.length-1,n=[];return n.push([e[t-1][0],e[t-1][1]]),n.push([e[t][0],e[t][1]]),n},t}(Df);const dp=up;var fp=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return(0,S.pi)((0,S.pi)({},t),{x:0,y:0,width:0,height:0,radius:0})},t.prototype.isInStrokeOrPath=function(e,t,n,r,o){var i=this.attr(),a=i.x,l=i.y,s=i.width,c=i.height,u=i.radius;if(u){var d=!1;return n&&(d=function(e,t,n,r,o,i,a,l){return Vf(e+o,t,e+n-o,t,i,a,l)||Vf(e+n,t+o,e+n,t+r-o,i,a,l)||Vf(e+n-o,t+r,e+o,t+r,i,a,l)||Vf(e,t+r-o,e,t+o,i,a,l)||np(e+n-o,t+o,o,1.5*Math.PI,2*Math.PI,i,a,l)||np(e+n-o,t+r-o,o,0,.5*Math.PI,i,a,l)||np(e+o,t+r-o,o,.5*Math.PI,Math.PI,i,a,l)||np(e+o,t+o,o,Math.PI,1.5*Math.PI,i,a,l)}(a,l,s,c,u,o,e,t)),!d&&r&&(d=Zf(this,e,t)),d}var f=o/2;return r&&n?tf(a-f,l-f,s+f,c+f,e,t):r?tf(a,l,s,c,e,t):n?function(e,t,n,r,o,i,a){var l=o/2;return tf(e-l,t-l,n,o,i,a)||tf(e+n-l,t-l,o,r,i,a)||tf(e+l,t+r-l,n,o,i,a)||tf(e-l,t+l,o,r,i,a)}(a,l,s,c,o,e,t):void 0},t.prototype.createPath=function(e){var t=this.attr(),n=t.x,r=t.y,o=t.width,i=t.height,a=t.radius;if(e.beginPath(),0===a)e.rect(n,r,o,i);else{var l=function(e){var t=0,n=0,r=0,o=0;return(0,E.kJ)(e)?1===e.length?t=n=r=o=e[0]:2===e.length?(t=r=e[0],n=o=e[1]):3===e.length?(t=e[0],n=o=e[1],r=e[2]):(t=e[0],n=e[1],r=e[2],o=e[3]):t=n=r=o=e,[t,n,r,o]}(a),s=l[0],c=l[1],u=l[2],d=l[3];e.moveTo(n+s,r),e.lineTo(n+o-c,r),0!==c&&e.arc(n+o-c,r+c,c,-Math.PI/2,0),e.lineTo(n+o,r+i-u),0!==u&&e.arc(n+o-u,r+i-u,u,0,Math.PI/2),e.lineTo(n+d,r+i),0!==d&&e.arc(n+d,r+i-d,d,Math.PI/2,Math.PI),e.lineTo(n,r+s),0!==s&&e.arc(n+s,r+s,s,Math.PI,1.5*Math.PI),e.closePath()}},t}(Df);const pp=fp;var hp=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return(0,S.pi)((0,S.pi)({},t),{x:0,y:0,text:null,fontSize:12,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",textAlign:"start",textBaseline:"bottom"})},t.prototype.isOnlyHitBox=function(){return!0},t.prototype.initAttrs=function(e){this._assembleFont(),e.text&&this._setText(e.text)},t.prototype._assembleFont=function(){var e=this.attrs;e.font=(0,Qd.assembleFont)(e)},t.prototype._setText=function(e){var t=null;(0,E.HD)(e)&&-1!==e.indexOf("\n")&&(t=e.split("\n")),this.set("textArr",t)},t.prototype.onAttrChange=function(t,n,r){e.prototype.onAttrChange.call(this,t,n,r),t.startsWith("font")&&this._assembleFont(),"text"===t&&this._setText(n)},t.prototype._getSpaceingY=function(){var e=this.attrs,t=e.lineHeight,n=1*e.fontSize;return t?t-n:.14*n},t.prototype._drawTextArr=function(e,t,n){var r,o=this.attrs,i=o.textBaseline,a=o.x,l=o.y,s=1*o.fontSize,c=this._getSpaceingY(),u=(0,Qd.getTextHeight)(o.text,o.fontSize,o.lineHeight);(0,E.S6)(t,(function(t,o){r=l+o*(c+s)-u+s,"middle"===i&&(r+=u-s-(u-s)/2),"top"===i&&(r+=u-s),(0,E.UM)(t)||(n?e.fillText(t,a,r):e.strokeText(t,a,r))}))},t.prototype._drawText=function(e,t){var n=this.attr(),r=n.x,o=n.y,i=this.get("textArr");if(i)this._drawTextArr(e,i,t);else{var a=n.text;(0,E.UM)(a)||(t?e.fillText(a,r,o):e.strokeText(a,r,o))}},t.prototype.strokeAndFill=function(e){var t=this.attrs,n=t.lineWidth,r=t.opacity,o=t.strokeOpacity,i=t.fillOpacity;this.isStroke()&&n>0&&((0,E.UM)(o)||1===o||(e.globalAlpha=r),this.stroke(e)),this.isFill()&&((0,E.UM)(i)||1===i?this.fill(e):(e.globalAlpha=i,this.fill(e),e.globalAlpha=r)),this.afterDrawPath(e)},t.prototype.fill=function(e){this._drawText(e,!0)},t.prototype.stroke=function(e){this._drawText(e,!1)},t}(Df);const gp=hp;function mp(e,t,n){var r=e.getTotalMatrix();if(r){var o=function(e,t){if(t){var n=(0,Qd.invert)(t);return(0,Qd.multiplyVec2)(n,e)}return e}([t,n,1],r);return[o[0],o[1]]}return[t,n]}function vp(e,t,n){if(e.isCanvas&&e.isCanvas())return!0;if(!(0,Qd.isAllowCapture)(e)||!1===e.cfg.isInView)return!1;if(e.cfg.clipShape){var r=mp(e,t,n),o=r[0],i=r[1];if(e.isClipped(o,i))return!1}var a=e.cfg.cacheCanvasBBox||e.getCanvasBBox();return t>=a.minX&&t<=a.maxX&&n>=a.minY&&n<=a.maxY}function yp(e,t,n){if(!vp(e,t,n))return null;for(var r=null,o=e.getChildren(),i=o.length-1;i>=0;i--){var a=o[i];if(a.isGroup())r=yp(a,t,n);else if(vp(a,t,n)){var l=a,s=mp(a,t,n),c=s[0],u=s[1];l.isInShape(c,u)&&(r=a)}if(r)break}return r}var bp=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return t.renderer="canvas",t.autoDraw=!0,t.localRefresh=!0,t.refreshElements=[],t.clipView=!0,t.quickHit=!1,t},t.prototype.onCanvasChange=function(e){"attr"!==e&&"sort"!==e&&"changeSize"!==e||(this.set("refreshElements",[this]),this.draw())},t.prototype.getShapeBase=function(){return d},t.prototype.getGroupBase=function(){return Rf},t.prototype.getPixelRatio=function(){var e=this.get("pixelRatio")||(window?window.devicePixelRatio:1);return e>=1?Math.ceil(e):1},t.prototype.getViewRange=function(){return{minX:0,minY:0,maxX:this.cfg.width,maxY:this.cfg.height}},t.prototype.createDom=function(){var e=document.createElement("canvas"),t=e.getContext("2d");return this.set("context",t),e},t.prototype.setDOMSize=function(t,n){e.prototype.setDOMSize.call(this,t,n);var r=this.get("context"),o=this.get("el"),i=this.getPixelRatio();o.width=i*t,o.height=i*n,i>1&&r.scale(i,i)},t.prototype.clear=function(){e.prototype.clear.call(this),this._clearFrame();var t=this.get("context"),n=this.get("el");t.clearRect(0,0,n.width,n.height)},t.prototype.getShape=function(t,n){return this.get("quickHit")?yp(this,t,n):e.prototype.getShape.call(this,t,n,null)},t.prototype._getRefreshRegion=function(){var e,t=this.get("refreshElements"),n=this.getViewRange();return t.length&&t[0]===this?e=n:(e=function(e){if(!e.length)return null;var t=[],n=[],r=[],o=[];return(0,E.S6)(e,(function(e){var i=function(e){var t,n,r;if(e.destroyed)t=e._cacheCanvasBBox;else{var o=e.get("cacheCanvasBBox"),i=o&&!(!o.width||!o.height),a=e.getCanvasBBox(),l=a&&!(!a.width||!a.height);i&&l?(r=a,t=(n=o)&&r?{minX:Math.min(n.minX,r.minX),minY:Math.min(n.minY,r.minY),maxX:Math.max(n.maxX,r.maxX),maxY:Math.max(n.maxY,r.maxY)}:n||r):i?t=o:l&&(t=a)}return t}(e);i&&(t.push(i.minX),n.push(i.minY),r.push(i.maxX),o.push(i.maxY))})),{minX:(0,E.VV)(t),minY:(0,E.VV)(n),maxX:(0,E.Fp)(r),maxY:(0,E.Fp)(o)}}(t),e&&(e.minX=Math.floor(e.minX),e.minY=Math.floor(e.minY),e.maxX=Math.ceil(e.maxX),e.maxY=Math.ceil(e.maxY),e.maxY+=1,this.get("clipView")&&(e=function(e,t){return e&&t&&nf(e,t)?{minX:Math.max(e.minX,t.minX),minY:Math.max(e.minY,t.minY),maxX:Math.min(e.maxX,t.maxX),maxY:Math.min(e.maxY,t.maxY)}:null}(e,n)))),e},t.prototype.refreshElement=function(e){this.get("refreshElements").push(e)},t.prototype._clearFrame=function(){var e=this.get("drawFrame");e&&((0,E.VS)(e),this.set("drawFrame",null),this.set("refreshElements",[]))},t.prototype.draw=function(){var e=this.get("drawFrame");this.get("autoDraw")&&e||this._startDraw()},t.prototype._drawAll=function(){var e=this.get("context"),t=this.get("el"),n=this.getChildren();e.clearRect(0,0,t.width,t.height),kf(e,this),Of(e,n),this.set("refreshElements",[])},t.prototype._drawRegion=function(){var e=this.get("context"),t=this.get("refreshElements"),n=this.getChildren(),r=this._getRefreshRegion();r?(e.clearRect(r.minX,r.minY,r.maxX-r.minX,r.maxY-r.minY),e.save(),e.beginPath(),e.rect(r.minX,r.minY,r.maxX-r.minX,r.maxY-r.minY),e.clip(),kf(e,this),Mf(this,n,r),Of(e,n,r),e.restore()):t.length&&$f(t),(0,E.S6)(t,(function(e){e.get("hasChanged")&&e.set("hasChanged",!1)})),this.set("refreshElements",[])},t.prototype._startDraw=function(){var e=this,t=this.get("drawFrame");t||(t=(0,E.U7)((function(){e.get("localRefresh")?e._drawRegion():e._drawAll(),e.set("drawFrame",null)})),this.set("drawFrame",t))},t.prototype.skipDraw=function(){},t.prototype.removeDom=function(){var e=this.get("el");e.width=0,e.height=0,e.parentNode.removeChild(e)},t}(Qd.AbstractCanvas);const xp=bp;var wp="0.5.12",Sp=n(7166),Ep={rect:"path",circle:"circle",line:"line",path:"path",marker:"path",text:"text",polyline:"polyline",polygon:"polygon",image:"image",ellipse:"ellipse",dom:"foreignObject"},Cp={opacity:"opacity",fillStyle:"fill",fill:"fill",fillOpacity:"fill-opacity",strokeStyle:"stroke",strokeOpacity:"stroke-opacity",stroke:"stroke",x:"x",y:"y",r:"r",rx:"rx",ry:"ry",width:"width",height:"height",x1:"x1",x2:"x2",y1:"y1",y2:"y2",lineCap:"stroke-linecap",lineJoin:"stroke-linejoin",lineWidth:"stroke-width",lineDash:"stroke-dasharray",lineDashOffset:"stroke-dashoffset",miterLimit:"stroke-miterlimit",font:"font",fontSize:"font-size",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",fontFamily:"font-family",startArrow:"marker-start",endArrow:"marker-end",path:"d",class:"class",id:"id",style:"style",preserveAspectRatio:"preserveAspectRatio"};function kp(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function Op(e){var t=Ep[e.type],n=e.getParent();if(!t)throw new Error("the type "+e.type+" is not supported by svg");var r=kp(t);if(e.get("id")&&(r.id=e.get("id")),e.set("el",r),e.set("attrs",{}),n){var o=n.get("el");o||(o=n.createDom(),n.set("el",o)),o.appendChild(r)}return r}function Mp(e,t){var n=e.get("el"),r=(0,E.qo)(n.children).sort(t),o=document.createDocumentFragment();r.forEach((function(e){o.appendChild(e)})),n.appendChild(o)}function Ip(e){var t=e.attr().matrix;if(t){for(var n=e.cfg.el,r=[],o=0;o<9;o+=3)r.push(t[o]+","+t[o+1]);-1===(r=r.join(",")).indexOf("NaN")?n.setAttribute("transform","matrix("+r+")"):console.warn("invalid matrix:",t)}}function $p(e,t){var n=e.getClip(),r=e.get("el");if(n){if(n&&!r.hasAttribute("clip-path")){Op(n),n.createPath(t);var o=t.addClip(n);r.setAttribute("clip-path","url(#"+o+")")}}else r.removeAttribute("clip-path")}function _p(e,t){t.forEach((function(t){t.draw(e)}))}function Pp(e,t){var n=e.get("canvas");if(n&&n.get("autoDraw")){var r=n.get("context"),o=e.getParent(),i=o?o.getChildren():[n],a=e.get("el");if("remove"===t)if(e.get("isClipShape")){var l=a&&a.parentNode,s=l&&l.parentNode;l&&s&&s.removeChild(l)}else a&&a.parentNode&&a.parentNode.removeChild(a);else if("show"===t)a.setAttribute("visibility","visible");else if("hide"===t)a.setAttribute("visibility","hidden");else if("zIndex"===t)!function(e,t){var n=e.parentNode,r=Array.from(n.childNodes).filter((function(e){return 1===e.nodeType&&"defs"!==e.nodeName.toLowerCase()})),o=r[t],i=r.indexOf(e);if(o){if(i>t)n.insertBefore(e,o);else if(i0&&(t?"stroke"in n?this._setColor(e,"stroke",i):"strokeStyle"in n&&this._setColor(e,"stroke",a):this._setColor(e,"stroke",i||a),s&&u.setAttribute(Cp.strokeOpacity,s),c&&u.setAttribute(Cp.lineWidth,c))},t.prototype._setColor=function(e,t,n){var r=this.get("el");if(n)if(n=n.trim(),/^[r,R,L,l]{1}[\s]*\(/.test(n))(o=e.find("gradient",n))||(o=e.addGradient(n)),r.setAttribute(Cp[t],"url(#"+o+")");else if(/^[p,P]{1}[\s]*\(/.test(n)){var o;(o=e.find("pattern",n))||(o=e.addPattern(n)),r.setAttribute(Cp[t],"url(#"+o+")")}else r.setAttribute(Cp[t],n);else r.setAttribute(Cp[t],"none")},t.prototype.shadow=function(e,t){var n=this.attr(),r=t||n,o=r.shadowOffsetX,i=r.shadowOffsetY,a=r.shadowBlur,l=r.shadowColor;(o||i||a||l)&&function(e,t){var n=e.cfg.el,r=e.attr(),o={dx:r.shadowOffsetX,dy:r.shadowOffsetY,blur:r.shadowBlur,color:r.shadowColor};if(o.dx||o.dy||o.blur||o.color){var i=t.find("filter",o);i||(i=t.addShadow(o)),n.setAttribute("filter","url(#"+i+")")}else n.removeAttribute("filter")}(this,e)},t.prototype.transform=function(e){var t=this.attr();(e||t).matrix&&Ip(this)},t.prototype.isInShape=function(e,t){return this.isPointInPath(e,t)},t.prototype.isPointInPath=function(e,t){var n=this.get("el"),r=this.get("canvas").get("el").getBoundingClientRect(),o=e+r.left,i=t+r.top,a=document.elementFromPoint(o,i);return!(!a||!a.isEqualNode(n))},t.prototype.getHitLineWidth=function(){var e=this.attrs,t=e.lineWidth,n=e.lineAppendWidth;return this.isStroke()?t+n:0},t}(Sp.AbstractShape);const Rp=Tp;var Lp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="circle",t.canFill=!0,t.canStroke=!0,t}return(0,S.ZT)(t,e),t.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return(0,S.pi)((0,S.pi)({},t),{x:0,y:0,r:0})},t.prototype.createPath=function(e,t){var n=this.attr(),r=this.get("el");(0,E.S6)(t||n,(function(e,t){"x"===t||"y"===t?r.setAttribute("c"+t,e):Cp[t]&&r.setAttribute(Cp[t],e)}))},t}(Rp);const Dp=Lp;var jp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dom",t.canFill=!1,t.canStroke=!1,t}return(0,S.ZT)(t,e),t.prototype.createPath=function(e,t){var n=this.attr(),r=this.get("el");if((0,E.S6)(t||n,(function(e,t){Cp[t]&&r.setAttribute(Cp[t],e)})),"function"==typeof n.html){var o=n.html.call(this,n);if(o instanceof Element||o instanceof HTMLDocument){for(var i=r.childNodes,a=i.length-1;a>=0;a--)r.removeChild(i[a]);r.appendChild(o)}else r.innerHTML=o}else r.innerHTML=n.html},t}(Rp);const Fp=jp;var Bp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="ellipse",t.canFill=!0,t.canStroke=!0,t}return(0,S.ZT)(t,e),t.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return(0,S.pi)((0,S.pi)({},t),{x:0,y:0,rx:0,ry:0})},t.prototype.createPath=function(e,t){var n=this.attr(),r=this.get("el");(0,E.S6)(t||n,(function(e,t){"x"===t||"y"===t?r.setAttribute("c"+t,e):Cp[t]&&r.setAttribute(Cp[t],e)}))},t}(Rp);const zp=Bp;var Hp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="image",t.canFill=!1,t.canStroke=!1,t}return(0,S.ZT)(t,e),t.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return(0,S.pi)((0,S.pi)({},t),{x:0,y:0,width:0,height:0})},t.prototype.createPath=function(e,t){var n=this,r=this.attr(),o=this.get("el");(0,E.S6)(t||r,(function(e,t){"img"===t?n._setImage(r.img):Cp[t]&&o.setAttribute(Cp[t],e)}))},t.prototype.setAttr=function(e,t){this.attrs[e]=t,"img"===e&&this._setImage(t)},t.prototype._setImage=function(e){var t=this.attr(),n=this.get("el");if((0,E.HD)(e))n.setAttribute("href",e);else if(e instanceof window.Image)t.width||(n.setAttribute("width",e.width),this.attr("width",e.width)),t.height||(n.setAttribute("height",e.height),this.attr("height",e.height)),n.setAttribute("href",e.src);else if(e instanceof HTMLElement&&(0,E.HD)(e.nodeName)&&"CANVAS"===e.nodeName.toUpperCase())n.setAttribute("href",e.toDataURL());else if(e instanceof ImageData){var r=document.createElement("canvas");r.setAttribute("width",""+e.width),r.setAttribute("height",""+e.height),r.getContext("2d").putImageData(e,0,0),t.width||(n.setAttribute("width",""+e.width),this.attr("width",e.width)),t.height||(n.setAttribute("height",""+e.height),this.attr("height",e.height)),n.setAttribute("href",r.toDataURL())}},t}(Rp);const Up=Hp;var Wp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="line",t.canFill=!1,t.canStroke=!0,t}return(0,S.ZT)(t,e),t.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return(0,S.pi)((0,S.pi)({},t),{x1:0,y1:0,x2:0,y2:0,startArrow:!1,endArrow:!1})},t.prototype.createPath=function(e,t){var n=this.attr(),r=this.get("el");(0,E.S6)(t||n,(function(t,o){if("startArrow"===o||"endArrow"===o)if(t){var i=(0,E.Kn)(t)?e.addArrow(n,Cp[o]):e.getDefaultArrow(n,Cp[o]);r.setAttribute(Cp[o],"url(#"+i+")")}else r.removeAttribute(Cp[o]);else Cp[o]&&r.setAttribute(Cp[o],t)}))},t.prototype.getTotalLength=function(){var e=this.attr(),t=e.x1,n=e.y1,r=e.x2,o=e.y2;return Ue.x1.length(t,n,r,o)},t.prototype.getPoint=function(e){var t=this.attr(),n=t.x1,r=t.y1,o=t.x2,i=t.y2;return Ue.x1.pointAt(n,r,o,i,e)},t}(Rp);const Vp=Wp;var Xp={circle:function(e,t,n){return[["M",e,t],["m",-n,0],["a",n,n,0,1,0,2*n,0],["a",n,n,0,1,0,2*-n,0]]},square:function(e,t,n){return[["M",e-n,t-n],["L",e+n,t-n],["L",e+n,t+n],["L",e-n,t+n],["Z"]]},diamond:function(e,t,n){return[["M",e-n,t],["L",e,t-n],["L",e+n,t],["L",e,t+n],["Z"]]},triangle:function(e,t,n){var r=n*Math.sin(1/3*Math.PI);return[["M",e-n,t+r],["L",e,t-r],["L",e+n,t+r],["z"]]},triangleDown:function(e,t,n){var r=n*Math.sin(1/3*Math.PI);return[["M",e-n,t-r],["L",e+n,t-r],["L",e,t+r],["Z"]]}};const qp={get:function(e){return Xp[e]},register:function(e,t){Xp[e]=t},remove:function(e){delete Xp[e]},getAll:function(){return Xp}};var Gp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="marker",t.canFill=!0,t.canStroke=!0,t}return(0,S.ZT)(t,e),t.prototype.createPath=function(e){this.get("el").setAttribute("d",this._assembleMarker())},t.prototype._assembleMarker=function(){var e=this._getPath();return(0,E.kJ)(e)?e.map((function(e){return e.join(" ")})).join(""):e},t.prototype._getPath=function(){var e,t=this.attr(),n=t.x,r=t.y,o=t.r||t.radius,i=t.symbol||"circle";return(e=(0,E.mf)(i)?i:qp.get(i))?e(n,r,o):(console.warn(e+" symbol is not exist."),null)},t.symbolsFactory=qp,t}(Rp);const Yp=Gp;var Kp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="path",t.canFill=!0,t.canStroke=!0,t}return(0,S.ZT)(t,e),t.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return(0,S.pi)((0,S.pi)({},t),{startArrow:!1,endArrow:!1})},t.prototype.createPath=function(e,t){var n=this,r=this.attr(),o=this.get("el");(0,E.S6)(t||r,(function(t,i){if("path"===i&&(0,E.kJ)(t))o.setAttribute("d",n._formatPath(t));else if("startArrow"===i||"endArrow"===i)if(t){var a=(0,E.Kn)(t)?e.addArrow(r,Cp[i]):e.getDefaultArrow(r,Cp[i]);o.setAttribute(Cp[i],"url(#"+a+")")}else o.removeAttribute(Cp[i]);else Cp[i]&&o.setAttribute(Cp[i],t)}))},t.prototype._formatPath=function(e){var t=e.map((function(e){return e.join(" ")})).join("");return~t.indexOf("NaN")?"":t},t.prototype.getTotalLength=function(){var e=this.get("el");return e?e.getTotalLength():null},t.prototype.getPoint=function(e){var t=this.get("el"),n=this.getTotalLength();if(0===n)return null;var r=t?t.getPointAtLength(e*n):null;return r?{x:r.x,y:r.y}:null},t}(Rp);const Zp=Kp;var Jp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="polygon",t.canFill=!0,t.canStroke=!0,t}return(0,S.ZT)(t,e),t.prototype.createPath=function(e,t){var n=this.attr(),r=this.get("el");(0,E.S6)(t||n,(function(e,t){"points"===t&&(0,E.kJ)(e)&&e.length>=2?r.setAttribute("points",e.map((function(e){return e[0]+","+e[1]})).join(" ")):Cp[t]&&r.setAttribute(Cp[t],e)}))},t}(Rp);const Qp=Jp;var eh=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="polyline",t.canFill=!0,t.canStroke=!0,t}return(0,S.ZT)(t,e),t.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return(0,S.pi)((0,S.pi)({},t),{startArrow:!1,endArrow:!1})},t.prototype.onAttrChange=function(t,n,r){e.prototype.onAttrChange.call(this,t,n,r),-1!==["points"].indexOf(t)&&this._resetCache()},t.prototype._resetCache=function(){this.set("totalLength",null),this.set("tCache",null)},t.prototype.createPath=function(e,t){var n=this.attr(),r=this.get("el");(0,E.S6)(t||n,(function(e,t){"points"===t&&(0,E.kJ)(e)&&e.length>=2?r.setAttribute("points",e.map((function(e){return e[0]+","+e[1]})).join(" ")):Cp[t]&&r.setAttribute(Cp[t],e)}))},t.prototype.getTotalLength=function(){var e=this.attr().points,t=this.get("totalLength");return(0,E.UM)(t)?(this.set("totalLength",Ue.aH.length(e)),this.get("totalLength")):t},t.prototype.getPoint=function(e){var t,n,r=this.attr().points,o=this.get("tCache");return o||(this._setTcache(),o=this.get("tCache")),(0,E.S6)(o,(function(r,o){e>=r[0]&&e<=r[1]&&(t=(e-r[0])/(r[1]-r[0]),n=o)})),Ue.x1.pointAt(r[n][0],r[n][1],r[n+1][0],r[n+1][1],t)},t.prototype._setTcache=function(){var e=this.attr().points;if(e&&0!==e.length){var t=this.getTotalLength();if(!(t<=0)){var n,r,o=0,i=[];(0,E.S6)(e,(function(a,l){e[l+1]&&((n=[])[0]=o/t,r=Ue.x1.length(a[0],a[1],e[l+1][0],e[l+1][1]),o+=r,n[1]=o/t,i.push(n))})),this.set("tCache",i)}}},t.prototype.getStartTangent=function(){var e=this.attr().points,t=[];return t.push([e[1][0],e[1][1]]),t.push([e[0][0],e[0][1]]),t},t.prototype.getEndTangent=function(){var e=this.attr().points,t=e.length-1,n=[];return n.push([e[t-1][0],e[t-1][1]]),n.push([e[t][0],e[t][1]]),n},t}(Rp);const th=eh;var nh=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="rect",t.canFill=!0,t.canStroke=!0,t}return(0,S.ZT)(t,e),t.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return(0,S.pi)((0,S.pi)({},t),{x:0,y:0,width:0,height:0,radius:0})},t.prototype.createPath=function(e,t){var n=this,r=this.attr(),o=this.get("el"),i=!1,a=["x","y","width","height","radius"];(0,E.S6)(t||r,(function(e,t){-1===a.indexOf(t)||i?-1===a.indexOf(t)&&Cp[t]&&o.setAttribute(Cp[t],e):(o.setAttribute("d",n._assembleRect(r)),i=!0)}))},t.prototype._assembleRect=function(e){var t=e.x,n=e.y,r=e.width,o=e.height,i=e.radius;if(!i)return"M "+t+","+n+" l "+r+",0 l 0,"+o+" l"+-r+" 0 z";var a=function(e){var t=0,n=0,r=0,o=0;return(0,E.kJ)(e)?1===e.length?t=n=r=o=e[0]:2===e.length?(t=r=e[0],n=o=e[1]):3===e.length?(t=e[0],n=o=e[1],r=e[2]):(t=e[0],n=e[1],r=e[2],o=e[3]):t=n=r=o=e,{r1:t,r2:n,r3:r,r4:o}}(i);return(0,E.kJ)(i)?1===i.length?a.r1=a.r2=a.r3=a.r4=i[0]:2===i.length?(a.r1=a.r3=i[0],a.r2=a.r4=i[1]):3===i.length?(a.r1=i[0],a.r2=a.r4=i[1],a.r3=i[2]):(a.r1=i[0],a.r2=i[1],a.r3=i[2],a.r4=i[3]):a.r1=a.r2=a.r3=a.r4=i,[["M "+(t+a.r1)+","+n],["l "+(r-a.r1-a.r2)+",0"],["a "+a.r2+","+a.r2+",0,0,1,"+a.r2+","+a.r2],["l 0,"+(o-a.r2-a.r3)],["a "+a.r3+","+a.r3+",0,0,1,"+-a.r3+","+a.r3],["l "+(a.r3+a.r4-r)+",0"],["a "+a.r4+","+a.r4+",0,0,1,"+-a.r4+","+-a.r4],["l 0,"+(a.r4+a.r1-o)],["a "+a.r1+","+a.r1+",0,0,1,"+a.r1+","+-a.r1],["z"]].join(" ")},t}(Rp);const rh=nh;var oh={top:"before-edge",middle:"central",bottom:"after-edge",alphabetic:"baseline",hanging:"hanging"},ih={top:"text-before-edge",middle:"central",bottom:"text-after-edge",alphabetic:"alphabetic",hanging:"hanging"},ah={left:"left",start:"left",center:"middle",right:"end",end:"end"},lh=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="text",t.canFill=!0,t.canStroke=!0,t}return(0,S.ZT)(t,e),t.prototype.getDefaultAttrs=function(){var t=e.prototype.getDefaultAttrs.call(this);return(0,S.pi)((0,S.pi)({},t),{x:0,y:0,text:null,fontSize:12,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",textAlign:"start",textBaseline:"bottom"})},t.prototype.createPath=function(e,t){var n=this,r=this.attr(),o=this.get("el");this._setFont(),(0,E.S6)(t||r,(function(e,t){"text"===t?n._setText(""+e):"matrix"===t&&e?Ip(n):Cp[t]&&o.setAttribute(Cp[t],e)})),o.setAttribute("paint-order","stroke"),o.setAttribute("style","stroke-linecap:butt; stroke-linejoin:miter;")},t.prototype._setFont=function(){var e=this.get("el"),t=this.attr(),n=t.textBaseline,r=t.textAlign,o=(0,le.qY)();o&&"firefox"===o.name?e.setAttribute("dominant-baseline",ih[n]||"alphabetic"):e.setAttribute("alignment-baseline",oh[n]||"baseline"),e.setAttribute("text-anchor",ah[r]||"left")},t.prototype._setText=function(e){var t=this.get("el"),n=this.attr(),r=n.x,o=n.textBaseline,i=void 0===o?"bottom":o;if(e)if(~e.indexOf("\n")){var a=e.split("\n"),l=a.length-1,s="";(0,E.S6)(a,(function(e,t){0===t?"alphabetic"===i?s+=''+e+"":"top"===i?s+=''+e+"":"middle"===i?s+=''+e+"":"bottom"===i?s+=''+e+"":"hanging"===i&&(s+=''+e+""):s+=''+e+""})),t.innerHTML=s}else t.innerHTML=e;else t.innerHTML=""},t}(Rp);const sh=lh;var ch=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,uh=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,dh=/[\d.]+:(#[^\s]+|[^)]+\))/gi;function fh(e){var t=e.match(dh);if(!t)return"";var n="";return t.sort((function(e,t){return e=e.split(":"),t=t.split(":"),Number(e[0])-Number(t[0])})),(0,E.S6)(t,(function(e){e=e.split(":"),n+=''})),n}var ph=function(){function e(e){this.cfg={};var t=null,n=(0,E.EL)("gradient_");return"l"===e.toLowerCase()[0]?function(e,t){var n,r,o=ch.exec(e),i=(0,E.wQ)((0,E.c$)(parseFloat(o[1])),2*Math.PI),a=o[2];i>=0&&i<.5*Math.PI?(n={x:0,y:0},r={x:1,y:1}):.5*Math.PI<=i&&i';t.innerHTML=n},e}();const yh=vh;const bh=function(){function e(e,t){this.cfg={};var n=kp("marker"),r=(0,E.EL)("marker_");n.setAttribute("id",r);var o=kp("path");o.setAttribute("stroke",e.stroke||"none"),o.setAttribute("fill",e.fill||"none"),n.appendChild(o),n.setAttribute("overflow","visible"),n.setAttribute("orient","auto-start-reverse"),this.el=n,this.child=o,this.id=r;var i=e["marker-start"===t?"startArrow":"endArrow"];return this.stroke=e.stroke||"#000",!0===i?this._setDefaultPath(t,o):(this.cfg=i,this._setMarker(e.lineWidth,o)),this}return e.prototype.match=function(){return!1},e.prototype._setDefaultPath=function(e,t){var n=this.el;t.setAttribute("d","M0,0 L"+10*Math.cos(Math.PI/6)+",5 L0,10"),n.setAttribute("refX",""+10*Math.cos(Math.PI/6)),n.setAttribute("refY","5")},e.prototype._setMarker=function(e,t){var n=this.el,r=this.cfg.path,o=this.cfg.d;(0,E.kJ)(r)&&(r=r.map((function(e){return e.join(" ")})).join("")),t.setAttribute("d",r),n.appendChild(t),o&&n.setAttribute("refX",""+o/e)},e.prototype.update=function(e){var t=this.child;t.attr?t.attr("fill",e):t.setAttribute("fill",e)},e}(),xh=function(){function e(e){this.type="clip",this.cfg={};var t=kp("clipPath");this.el=t,this.id=(0,E.EL)("clip_"),t.id=this.id;var n=e.cfg.el;return t.appendChild(n),this.cfg=e,this}return e.prototype.match=function(){return!1},e.prototype.remove=function(){var e=this.el;e.parentNode.removeChild(e)},e}();var wh=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i;const Sh=function(){function e(e){this.cfg={};var t=kp("pattern");t.setAttribute("patternUnits","userSpaceOnUse");var n=kp("image");t.appendChild(n);var r=(0,E.EL)("pattern_");t.id=r,this.el=t,this.id=r,this.cfg=e;var o=wh.exec(e)[2];n.setAttribute("href",o);var i=new Image;function a(){t.setAttribute("width",""+i.width),t.setAttribute("height",""+i.height)}return o.match(/^data:/i)||(i.crossOrigin="Anonymous"),i.src=o,i.complete?a():(i.onload=a,i.src=i.src),this}return e.prototype.match=function(e,t){return this.cfg===t},e}();var Eh=function(){function e(e){var t=kp("defs"),n=(0,E.EL)("defs_");t.id=n,e.appendChild(t),this.children=[],this.defaultArrow={},this.el=t,this.canvas=e}return e.prototype.find=function(e,t){for(var n=this.children,r=null,o=0;o0&&(c[0][0]="L")),i=i.concat(c)})),i.push(["Z"])}return i}function _h(e,t,n,r,o){for(var i=Td(e,t,!t,"lineWidth"),a=e.connectNulls,l=e.isInCircle,s=Pd(e.points,a,e.showSinglePoint),c=[],u=0,d=s.length;ur&&(r=o),o=t[0]})));var p=this.scales[d];try{for(var h=(0,S.XA)(e),g=h.next();!g.done;g=h.next()){var m=g.value,v=this.getDrawCfg(m),y=v.x,b=v.y,x=p.scale(m[N][d]);this.drawGrayScaleBlurredCircle(y-l.x,b-s.y,n+r,x,f)}}catch(e){o={error:e}}finally{try{g&&!g.done&&(i=h.return)&&i.call(h)}finally{if(o)throw o.error}}var w=f.getImageData(0,0,c,u);this.clearShadowCanvasCtx(),this.colorize(w),f.putImageData(w,0,0);var E=this.getImageShape();E.attr("x",l.x),E.attr("y",s.y),E.attr("width",c),E.attr("height",u),E.attr("img",f.canvas),E.set("origin",this.getShapeInfo(e))},t.prototype.getDefaultSize=function(){var e=this.getAttribute("position"),t=this.coordinate;return Math.min(t.getWidth()/(4*e.scales[0].ticks.length),t.getHeight()/(4*e.scales[1].ticks.length))},t.prototype.clearShadowCanvasCtx=function(){var e=this.getShadowCanvasCtx();e.clearRect(0,0,e.canvas.width,e.canvas.height)},t.prototype.getShadowCanvasCtx=function(){var e=this.shadowCanvas;return e||(e=document.createElement("canvas"),this.shadowCanvas=e),e.width=this.coordinate.getWidth(),e.height=this.coordinate.getHeight(),e.getContext("2d")},t.prototype.getGrayScaleBlurredCanvas=function(){return this.grayScaleBlurredCanvas||(this.grayScaleBlurredCanvas=document.createElement("canvas")),this.grayScaleBlurredCanvas},t.prototype.drawGrayScaleBlurredCircle=function(e,t,n,r,o){var i=this.getGrayScaleBlurredCanvas();o.globalAlpha=r,o.drawImage(i,e-n,t-n)},t.prototype.colorize=function(e){for(var t=this.getAttribute("color"),n=e.data,r=this.paletteCache,o=3;ot&&(r=t-(n=n?t/(1+r/n):0)),o+i>t&&(i=t-(o=o?t/(1+i/o):0)),[n||0,r||0,o||0,i||0]}function Bh(e,t,n){var r=[];if(n.isRect){var o=n.isTransposed?{x:n.start.x,y:t[0].y}:{x:t[0].x,y:n.start.y},i=n.isTransposed?{x:n.end.x,y:t[2].y}:{x:t[3].x,y:n.end.y},a=(0,E.U2)(e,["background","style","radius"]);if(a){var l=n.isTransposed?Math.abs(t[0].y-t[2].y):t[2].x-t[1].x,s=n.isTransposed?n.getWidth():n.getHeight(),c=(0,S.CR)(Fh(a,Math.min(l,s)),4),u=c[0],d=c[1],f=c[2],p=c[3],h=n.isTransposed&&n.isReflect("y"),g=h?0:1,m=function(e){return h?-e:e};r.push(["M",o.x,i.y+m(u)]),0!==u&&r.push(["A",u,u,0,0,g,o.x+u,i.y]),r.push(["L",i.x-d,i.y]),0!==d&&r.push(["A",d,d,0,0,g,i.x,i.y+m(d)]),r.push(["L",i.x,o.y-m(f)]),0!==f&&r.push(["A",f,f,0,0,g,i.x-f,o.y]),r.push(["L",o.x+p,o.y]),0!==p&&r.push(["A",p,p,0,0,g,o.x,o.y-m(p)])}else r.push(["M",o.x,o.y]),r.push(["L",i.x,o.y]),r.push(["L",i.x,i.y]),r.push(["L",o.x,i.y]),r.push(["L",o.x,o.y]);r.push(["z"])}if(n.isPolar){var v=n.getCenter(),y=bs(e,n),b=y.startAngle,x=y.endAngle;if("theta"===n.type||n.isTransposed){var w=function(e){return Math.pow(e,2)};u=Math.sqrt(w(v.x-t[0].x)+w(v.y-t[0].y)),d=Math.sqrt(w(v.x-t[2].x)+w(v.y-t[2].y)),r=vs(v.x,v.y,u,n.startAngle,n.endAngle,d)}else r=vs(v.x,v.y,n.getRadius(),b,x)}return r}function zh(e,t,n){var r=[];return(0,E.UM)(t)?n?r.push(["M",e[0].x,e[0].y],["L",e[1].x,e[1].y],["L",(e[2].x+e[3].x)/2,(e[2].y+e[3].y)/2],["Z"]):r.push(["M",e[0].x,e[0].y],["L",e[1].x,e[1].y],["L",e[2].x,e[2].y],["L",e[3].x,e[3].y],["Z"]):r.push(["M",e[0].x,e[0].y],["L",e[1].x,e[1].y],["L",t[1].x,t[1].y],["L",t[0].x,t[0].y],["Z"]),r}function Hh(e,t){return[t,e]}function Uh(e){var t=e.theme,n=e.coordinate,r=e.getXScale(),o=r.values,i=e.beforeMappingData,a=o.length,l=ks(e.coordinate),s=e.intervalPadding,c=e.dodgePadding,u=e.maxColumnWidth||t.maxColumnWidth,d=e.minColumnWidth||t.minColumnWidth,f=e.columnWidthRatio||t.columnWidthRatio,p=e.multiplePieWidthRatio||t.multiplePieWidthRatio,h=e.roseWidthRatio||t.roseWidthRatio;if(r.isLinear&&o.length>1){o.sort();var g=function(e,t){var n=e.length,r=e;(0,E.HD)(r[0])&&(r=e.map((function(e){return t.translate(e)})));for(var o=r[1]-r[0],i=2;ia&&(o=a)}return o}(o,r);a=(r.max-r.min)/g,o.length>a&&(a=o.length)}var m=r.range,v=1/a,y=1;if(n.isPolar?y=n.isTransposed&&a>1?p:h:(r.isLinear&&(v*=m[1]-m[0]),y=f),!(0,E.UM)(s)&&s>=0?v=(1-s/l*(a-1))/a:v*=y,e.getAdjust("dodge")){var b=function(e,t){if(t){var n=(0,E.xH)(e);return(0,E.I)(n,t).length}return e.length}(i,e.getAdjust("dodge").dodgeBy);!(0,E.UM)(c)&&c>=0?v=(v-c/l*(b-1))/b:!(0,E.UM)(s)&&s>=0?(v*=y,v/=b):v/=b,v=v>=0?v:0}if(!(0,E.UM)(u)&&u>=0){var x=u/l;v>x&&(v=x)}if(!(0,E.UM)(d)&&d>=0){var w=d/l;v0&&!(0,E.U2)(o,[i,"min"])&&r.change({min:0}),l<=0&&!(0,E.U2)(o,[i,"max"])&&r.change({max:0}))}},t.prototype.getDrawCfg=function(t){var n=e.prototype.getDrawCfg.call(this,t);return n.background=this.background,n},t}(cd);const Vh=Wh;var Xh=function(e){function t(t){var n=e.call(this,t)||this;n.type="line";var r=t.sortable,o=void 0!==r&&r;return n.sortable=o,n}return(0,S.ZT)(t,e),t}(Ih);const qh=Xh;var Gh=["circle","square","bowtie","diamond","hexagon","triangle","triangle-down"];function Yh(e,t,n,r,o){var i,a,l=Td(t,o,!o,"r"),s=e.parsePoints(t.points),c=s[0];if(t.isStack)c=s[1];else if(s.length>1){var u=n.addGroup();try{for(var d=(0,S.XA)(s),f=d.next();!f.done;f=d.next()){var p=f.value;u.addShape({type:"marker",attrs:(0,S.pi)((0,S.pi)((0,S.pi)({},l),{symbol:Ed[r]||r}),p)})}}catch(e){i={error:e}}finally{try{f&&!f.done&&(a=d.return)&&a.call(d)}finally{if(i)throw i.error}}return u}return n.addShape({type:"marker",attrs:(0,S.pi)((0,S.pi)((0,S.pi)({},l),{symbol:Ed[r]||r}),c)})}nd("point",{defaultShapeType:"hollow-circle",getDefaultPoints:function(e){return Ld(e)}}),(0,E.S6)(Gh,(function(e){rd("point","hollow-".concat(e),{draw:function(t,n){return Yh(this,t,n,e,!0)},getMarker:function(t){var n=t.color;return{symbol:Ed[e]||e,style:{r:4.5,stroke:n,fill:null}}}})}));const Kh=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="point",t.shapeType="point",t.generatePoints=!0,t}return(0,S.ZT)(t,e),t.prototype.getDrawCfg=function(t){var n=e.prototype.getDrawCfg.call(this,t);return(0,S.pi)((0,S.pi)({},n),{isStack:!!this.getAdjust("stack")})},t}(cd);nd("polygon",{defaultShapeType:"polygon",getDefaultPoints:function(e){var t=[];return(0,E.S6)(e.x,(function(n,r){var o=e.y[r];t.push({x:n,y:o})})),t}}),rd("polygon","polygon",{draw:function(e,t){if(!(0,E.xb)(e.points)){var n=Td(e,!0,!0),r=this.parsePath(function(e){for(var t=e[0],n=1,r=[["M",t.x,t.y]];n2?"weight":"normal";if(e.isInCircle){var a={x:0,y:1};return"normal"===i?n=function(e,t,n){var r=og(t,n),o=[["M",e.x,e.y]];return o.push(r),o}(o[0],o[1],a):(r.fill=r.stroke,n=function(e,t){var n=og(e[1],t),r=og(e[3],t),o=[["M",e[0].x,e[0].y]];return o.push(r),o.push(["L",e[3].x,e[3].y]),o.push(["L",e[2].x,e[2].y]),o.push(n),o.push(["L",e[1].x,e[1].y]),o.push(["L",e[0].x,e[0].y]),o.push(["Z"]),o}(o,a)),n=this.parsePath(n),t.addShape("path",{attrs:(0,S.pi)((0,S.pi)({},r),{path:n})})}if("normal"===i)return n=ys(((o=this.parsePoints(o))[1].x+o[0].x)/2,o[0].y,Math.abs(o[1].x-o[0].x)/2,Math.PI,2*Math.PI),t.addShape("path",{attrs:(0,S.pi)((0,S.pi)({},r),{path:n})});var l=rg(o[1],o[3]),s=rg(o[2],o[0]);return n=[["M",o[0].x,o[0].y],["L",o[1].x,o[1].y],l,["L",o[3].x,o[3].y],["L",o[2].x,o[2].y],s,["Z"]],n=this.parsePath(n),r.fill=r.stroke,t.addShape("path",{attrs:(0,S.pi)((0,S.pi)({},r),{path:n})})},getMarker:function(e){return{symbol:"circle",style:{r:4.5,fill:e.color}}}}),rd("edge","smooth",{draw:function(e,t){var n=Td(e,!0,!1,"lineWidth"),r=e.points,o=this.parsePath(function(e,t){var n=rg(e,t),r=[["M",e.x,e.y]];return r.push(n),r}(r[0],r[1]));return t.addShape("path",{attrs:(0,S.pi)((0,S.pi)({},n),{path:o})})},getMarker:function(e){return{symbol:"circle",style:{r:4.5,fill:e.color}}}});var ig=1/3;rd("edge","vhv",{draw:function(e,t){var n=Td(e,!0,!1,"lineWidth"),r=e.points,o=this.parsePath(function(e,t){var n=[];n.push({x:e.x,y:e.y*(1-ig)+t.y*ig}),n.push({x:t.x,y:e.y*(1-ig)+t.y*ig}),n.push(t);var r=[["M",e.x,e.y]];return(0,E.S6)(n,(function(e){r.push(["L",e.x,e.y])})),r}(r[0],r[1]));return t.addShape("path",{attrs:(0,S.pi)((0,S.pi)({},n),{path:o})})},getMarker:function(e){return{symbol:"circle",style:{r:4.5,fill:e.color}}}}),rd("interval","funnel",{getPoints:function(e){return e.size=2*e.size,Dh(e)},draw:function(e,t){var n=Td(e,!1,!0),r=this.parsePath(zh(e.points,e.nextPoints,!1));return t.addShape("path",{attrs:(0,S.pi)((0,S.pi)({},n),{path:r}),name:"interval"})},getMarker:function(e){return{symbol:"square",style:{r:4,fill:e.color}}}}),rd("interval","hollow-rect",{draw:function(e,t){var n=Td(e,!0,!1),r=t,o=null==e?void 0:e.background;if(o){r=t.addGroup();var i=Rd(e),a=Bh(e,this.parsePoints(e.points),this.coordinate);r.addShape("path",{attrs:(0,S.pi)((0,S.pi)({},i),{path:a}),capture:!1,zIndex:-1,name:Wu})}var l=this.parsePath(jh(e.points)),s=r.addShape("path",{attrs:(0,S.pi)((0,S.pi)({},n),{path:l}),name:"interval"});return o?r:s},getMarker:function(e){var t=e.color;return e.isInPolar?{symbol:"circle",style:{r:4.5,stroke:t,fill:null}}:{symbol:"square",style:{r:4,stroke:t,fill:null}}}}),rd("interval","line",{getPoints:function(e){return n=(t=e).x,r=t.y,o=t.y0,(0,E.kJ)(r)?r.map((function(e,t){return{x:(0,E.kJ)(n)?n[t]:n,y:e}})):[{x:n,y:o},{x:n,y:r}];var t,n,r,o},draw:function(e,t){var n=Td(e,!0,!1,"lineWidth"),r=Ss((0,S.pi)({},n),["fill"]),o=this.parsePath(jh(e.points,!1));return t.addShape("path",{attrs:(0,S.pi)((0,S.pi)({},r),{path:o}),name:"interval"})},getMarker:function(e){return{symbol:function(e,t,n){return[["M",e,t-n],["L",e,t+n]]},style:{r:5,stroke:e.color}}}}),rd("interval","pyramid",{getPoints:function(e){return e.size=2*e.size,Dh(e)},draw:function(e,t){var n=Td(e,!1,!0),r=this.parsePath(zh(e.points,e.nextPoints,!0));return t.addShape("path",{attrs:(0,S.pi)((0,S.pi)({},n),{path:r}),name:"interval"})},getMarker:function(e){return{symbol:"square",style:{r:4,fill:e.color}}}}),rd("interval","tick",{getPoints:function(e){return function(e){var t,n,r,o=e.x,i=e.y,a=e.y0,l=e.size;(0,E.kJ)(i)?(n=(t=(0,S.CR)(i,2))[0],r=t[1]):(n=a,r=i);var s=o+l/2,c=o-l/2;return[{x:o,y:n},{x:o,y:r},{x:c,y:n},{x:s,y:n},{x:c,y:r},{x:s,y:r}]}(e)},draw:function(e,t){var n,r=Td(e,!0,!1),o=this.parsePath([["M",(n=e.points)[0].x,n[0].y],["L",n[1].x,n[1].y],["M",n[2].x,n[2].y],["L",n[3].x,n[3].y],["M",n[4].x,n[4].y],["L",n[5].x,n[5].y]]);return t.addShape("path",{attrs:(0,S.pi)((0,S.pi)({},r),{path:o}),name:"interval"})},getMarker:function(e){return{symbol:function(e,t,n){return[["M",e-n/2,t-n],["L",e+n/2,t-n],["M",e,t-n],["L",e,t+n],["M",e-n/2,t+n],["L",e+n/2,t+n]]},style:{r:5,stroke:e.color}}}});function ag(e){var t=(0,E.kJ)(e)?e:[e],n=t[0],r=t[t.length-1],o=t.length>1?t[1]:n;return{min:n,max:r,min1:o,max1:t.length>3?t[3]:r,median:t.length>2?t[2]:o}}function lg(e,t,n){var r,o=n/2;if((0,E.kJ)(t)){var i=ag(t),a=i.min,l=i.max,s=i.median,c=i.min1,u=e-o,d=e+o;r=[[u,l],[d,l],[e,l],[e,f=i.max1],[u,c],[u,f],[d,f],[d,c],[e,c],[e,a],[u,a],[d,a],[u,s],[d,s]]}else{t=(0,E.UM)(t)?.5:t;var f,p=ag(e),h=(a=p.min,l=p.max,s=p.median,t-o),g=t+o;r=[[a,h],[a,g],[a,t],[c=p.min1,t],[c,h],[c,g],[f=p.max1,g],[f,h],[f,t],[l,t],[l,h],[l,g],[s,h],[s,g]]}return r.map((function(e){return{x:e[0],y:e[1]}}))}function sg(e,t,n){var r=function(e){var t=((0,E.kJ)(e)?e:[e]).sort((function(e,t){return t-e}));return function(e,t,n){if((0,E.HD)(e))return e.padEnd(4,n);if((0,E.kJ)(e)){var r=e.length;if(r<4)for(var o=4-r,i=0;i1){var l=t.addGroup();try{for(var s=(0,S.XA)(i),c=s.next();!c.done;c=s.next()){var u=c.value;l.addShape("image",{attrs:{x:u.x-o/2,y:u.y-o,width:o,height:o,img:e.shape[1]}})}}catch(e){n={error:e}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return l}return t.addShape("image",{attrs:{x:a.x-o/2,y:a.y-o,width:o,height:o,img:e.shape[1]}})},getMarker:function(e){return{symbol:"circle",style:{r:4.5,fill:e.color}}}}),(0,E.S6)(Gh,(function(e){rd("point",e,{draw:function(t,n){return Yh(this,t,n,e,!1)},getMarker:function(t){var n=t.color;return{symbol:Ed[e]||e,style:{r:4.5,fill:n}}}})})),rd("schema","box",{getPoints:function(e){return lg(e.x,e.y,e.size)},draw:function(e,t){var n,r=Td(e,!0,!1),o=this.parsePath([["M",(n=e.points)[0].x,n[0].y],["L",n[1].x,n[1].y],["M",n[2].x,n[2].y],["L",n[3].x,n[3].y],["M",n[4].x,n[4].y],["L",n[5].x,n[5].y],["L",n[6].x,n[6].y],["L",n[7].x,n[7].y],["L",n[4].x,n[4].y],["Z"],["M",n[8].x,n[8].y],["L",n[9].x,n[9].y],["M",n[10].x,n[10].y],["L",n[11].x,n[11].y],["M",n[12].x,n[12].y],["L",n[13].x,n[13].y]]);return t.addShape("path",{attrs:(0,S.pi)((0,S.pi)({},r),{path:o,name:"schema"})})},getMarker:function(e){return{symbol:function(e,t,n){var r=lg(e,[t-6,t-3,t,t+3,t+6],n);return[["M",r[0].x+1,r[0].y],["L",r[1].x-1,r[1].y],["M",r[2].x,r[2].y],["L",r[3].x,r[3].y],["M",r[4].x,r[4].y],["L",r[5].x,r[5].y],["L",r[6].x,r[6].y],["L",r[7].x,r[7].y],["L",r[4].x,r[4].y],["Z"],["M",r[8].x,r[8].y],["L",r[9].x,r[9].y],["M",r[10].x+1,r[10].y],["L",r[11].x-1,r[11].y],["M",r[12].x,r[12].y],["L",r[13].x,r[13].y]]},style:{r:6,lineWidth:1,stroke:e.color}}}}),rd("schema","candle",{getPoints:function(e){return sg(e.x,e.y,e.size)},draw:function(e,t){var n,r=Td(e,!0,!0),o=this.parsePath([["M",(n=e.points)[0].x,n[0].y],["L",n[1].x,n[1].y],["M",n[2].x,n[2].y],["L",n[3].x,n[3].y],["L",n[4].x,n[4].y],["L",n[5].x,n[5].y],["Z"],["M",n[6].x,n[6].y],["L",n[7].x,n[7].y]]);return t.addShape("path",{attrs:(0,S.pi)((0,S.pi)({},r),{path:o,name:"schema"})})},getMarker:function(e){var t=e.color;return{symbol:function(e,t,n){var r=sg(e,[t+7.5,t+3,t-3,t-7.5],n);return[["M",r[0].x,r[0].y],["L",r[1].x,r[1].y],["M",r[2].x,r[2].y],["L",r[3].x,r[3].y],["L",r[4].x,r[4].y],["L",r[5].x,r[5].y],["Z"],["M",r[6].x,r[6].y],["L",r[7].x,r[7].y]]},style:{lineWidth:1,stroke:t,fill:t,r:6}}}}),rd("polygon","square",{draw:function(e,t){if(!(0,E.xb)(e.points)){var n=Td(e,!0,!0),r=this.parsePoints(e.points);return t.addShape("rect",{attrs:(0,S.pi)((0,S.pi)({},n),cg(r,e.size)),name:"polygon"})}},getMarker:function(e){return{symbol:"square",style:{r:4,fill:e.color}}}}),rd("violin","smooth",{draw:function(e,t){var n=Td(e,!0,!0),r=this.parsePath(Nd(e.points));return t.addShape("path",{attrs:(0,S.pi)((0,S.pi)({},n),{path:r})})},getMarker:function(e){return{symbol:"circle",style:{stroke:null,r:4,fill:e.color}}}}),rd("violin","hollow",{draw:function(e,t){var n=Td(e,!0,!1),r=this.parsePath(Ad(e.points));return t.addShape("path",{attrs:(0,S.pi)((0,S.pi)({},n),{path:r})})},getMarker:function(e){return{symbol:"circle",style:{r:4,fill:null,stroke:e.color}}}}),rd("violin","hollow-smooth",{draw:function(e,t){var n=Td(e,!0,!1),r=this.parsePath(Nd(e.points));return t.addShape("path",{attrs:(0,S.pi)((0,S.pi)({},n),{path:r})})},getMarker:function(e){return{symbol:"circle",style:{r:4,fill:null,stroke:e.color}}}});var ug=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.getLabelValueDir=function(e){var t=e.points;return t[0].y<=t[2].y?1:-1},t.prototype.getLabelOffsetPoint=function(t,n,r,o){var i,a=e.prototype.getLabelOffsetPoint.call(this,t,n,r),l=this.getCoordinate(),s=l.isTransposed?"x":"y",c=this.getLabelValueDir(t.mappingData);return a=(0,S.pi)((0,S.pi)({},a),((i={})[s]=a[s]*c,i)),l.isReflect("x")&&(a=(0,S.pi)((0,S.pi)({},a),{x:-1*a.x})),l.isReflect("y")&&(a=(0,S.pi)((0,S.pi)({},a),{y:-1*a.y})),a},t.prototype.getThemedLabelCfg=function(e){var t=this.geometry,n=this.getDefaultLabelCfg(),r=t.theme;return(0,E.b$)({},n,r.labels,"middle"===e.position?{offset:0}:{},e)},t.prototype.setLabelPosition=function(e,t,n,r){var o,i,a,l,s=this.getCoordinate(),c=s.isTransposed,u=t.points,d=s.convert(u[0]),f=s.convert(u[2]),p=this.getLabelValueDir(t),h=(0,E.kJ)(t.shape)?t.shape[0]:t.shape;if("funnel"===h||"pyramid"===h){var g=(0,E.U2)(t,"nextPoints"),m=(0,E.U2)(t,"points");if(g){var v=s.convert(m[0]),y=s.convert(m[1]),b=s.convert(g[0]),x=s.convert(g[1]);c?(o=Math.min(b.y,v.y),a=Math.max(b.y,v.y),i=(y.x+x.x)/2,l=(v.x+b.x)/2):(o=Math.min((y.y+x.y)/2,(v.y+b.y)/2),a=Math.max((y.y+x.y)/2,(v.y+b.y)/2),i=x.x,l=v.x)}else o=Math.min(f.y,d.y),a=Math.max(f.y,d.y),i=f.x,l=d.x}else o=Math.min(f.y,d.y),a=Math.max(f.y,d.y),i=f.x,l=d.x;switch(r){case"right":e.x=i,e.y=(o+a)/2,e.textAlign=(0,E.U2)(e,"textAlign",p>0?"left":"right");break;case"left":e.x=l,e.y=(o+a)/2,e.textAlign=(0,E.U2)(e,"textAlign",p>0?"left":"right");break;case"bottom":c&&(e.x=(i+l)/2),e.y=a,e.textAlign=(0,E.U2)(e,"textAlign","center"),e.textBaseline=(0,E.U2)(e,"textBaseline",p>0?"bottom":"top");break;case"middle":c&&(e.x=(i+l)/2),e.y=(o+a)/2,e.textAlign=(0,E.U2)(e,"textAlign","center"),e.textBaseline=(0,E.U2)(e,"textBaseline","middle");break;case"top":c&&(e.x=(i+l)/2),e.y=o,e.textAlign=(0,E.U2)(e,"textAlign","center"),e.textBaseline=(0,E.U2)(e,"textBaseline",p>0?"bottom":"top")}},t}(wd);const dg=ug;var fg=Math.PI/2,pg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.getLabelOffset=function(e){var t=this.getCoordinate(),n=0;if((0,E.hj)(e))n=e;else if((0,E.HD)(e)&&-1!==e.indexOf("%")){var r=t.getRadius();t.innerRadius>0&&(r*=1-t.innerRadius),n=.01*parseFloat(e)*r}return n},t.prototype.getLabelItems=function(t){var n=e.prototype.getLabelItems.call(this,t),r=this.geometry.getYScale();return(0,E.UI)(n,(function(e){if(e&&r){var t=r.scale((0,E.U2)(e.data,r.field));return(0,S.pi)((0,S.pi)({},e),{percent:t})}return e}))},t.prototype.getLabelAlign=function(e){var t,n=this.getCoordinate();if(e.labelEmit)t=e.angle<=Math.PI/2&&e.angle>=-Math.PI/2?"left":"right";else if(n.isTransposed){var r=n.getCenter(),o=e.offset;t=Math.abs(e.x-r.x)<1?"center":e.angle>Math.PI||e.angle<=0?o>0?"left":"right":o>0?"right":"left"}else t="center";return t},t.prototype.getLabelPoint=function(e,t,n){var r,o=1,i=e.content[n];this.isToMiddle(t)?r=this.getMiddlePoint(t.points):(1===e.content.length&&0===n?n=1:0===n&&(o=-1),r=this.getArcPoint(t,n));var a=e.offset*o,l=this.getPointAngle(r),s=e.labelEmit,c=this.getCirclePoint(l,a,r,s);return 0===c.r?c.content="":(c.content=i,c.angle=l,c.color=t.color),c.rotate=e.autoRotate?this.getLabelRotate(l,a,s):e.rotate,c.start={x:r.x,y:r.y},c},t.prototype.getArcPoint=function(e,t){return void 0===t&&(t=0),(0,E.kJ)(e.x)||(0,E.kJ)(e.y)?{x:(0,E.kJ)(e.x)?e.x[t]:e.x,y:(0,E.kJ)(e.y)?e.y[t]:e.y}:{x:e.x,y:e.y}},t.prototype.getPointAngle=function(e){return Ms(this.getCoordinate(),e)},t.prototype.getCirclePoint=function(e,t,n,r){var o=this.getCoordinate(),i=o.getCenter(),a=Os(o,n);if(0===a)return(0,S.pi)((0,S.pi)({},i),{r:a});var l=e;return o.isTransposed&&a>t&&!r?l=e+2*Math.asin(t/(2*a)):a+=t,{x:i.x+a*Math.cos(l),y:i.y+a*Math.sin(l),r:a}},t.prototype.getLabelRotate=function(e,t,n){var r=e+fg;return n&&(r-=fg),r&&(r>fg?r-=Math.PI:r<-fg&&(r+=Math.PI)),r},t.prototype.getMiddlePoint=function(e){var t=this.getCoordinate(),n=e.length,r={x:0,y:0};return(0,E.S6)(e,(function(e){r.x+=e.x,r.y+=e.y})),r.x/=n,r.y/=n,r=t.convert(r)},t.prototype.isToMiddle=function(e){return e.x.length>2},t}(wd);const hg=pg;var gg=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.defaultLayout="distribute",t}return(0,S.ZT)(t,e),t.prototype.getDefaultLabelCfg=function(t,n){var r=e.prototype.getDefaultLabelCfg.call(this,t,n);return(0,E.b$)({},r,(0,E.U2)(this.geometry.theme,"pieLabels",{}))},t.prototype.getLabelOffset=function(t){return e.prototype.getLabelOffset.call(this,t)||0},t.prototype.getLabelRotate=function(e,t,n){var r;return t<0&&((r=e)>Math.PI/2&&(r-=Math.PI),r<-Math.PI/2&&(r+=Math.PI)),r},t.prototype.getLabelAlign=function(e){var t,n=this.getCoordinate().getCenter();return t=e.angle<=Math.PI/2&&e.x>=n.x?"left":"right",e.offset<=0&&(t="right"===t?"left":"right"),t},t.prototype.getArcPoint=function(e){return e},t.prototype.getPointAngle=function(e){var t,n=this.getCoordinate(),r={x:(0,E.kJ)(e.x)?e.x[0]:e.x,y:e.y[0]},o={x:(0,E.kJ)(e.x)?e.x[1]:e.x,y:e.y[1]},i=Ms(n,r);if(e.points&&e.points[0].y===e.points[1].y)t=i;else{var a=Ms(n,o);i>=a&&(a+=2*Math.PI),t=i+(a-i)/2}return t},t.prototype.getCirclePoint=function(e,t){var n=this.getCoordinate(),r=n.getCenter(),o=n.getRadius()+t;return(0,S.pi)((0,S.pi)({},ms(r.x,r.y,o,e)),{angle:e,r:o})},t}(hg);const mg=gg;function vg(e,t,n){var r=e.filter((function(e){return!e.invisible}));r.sort((function(e,t){return e.y-t.y}));var o,i=!0,a=n.minY,l=n.maxY,s=Math.abs(a-l),c=0,u=Number.MIN_VALUE,d=r.map((function(e){return e.y>c&&(c=e.y),e.ys&&(s=c-a);i;)for(d.forEach((function(e){var t=(Math.min.apply(u,e.targets)+Math.max.apply(u,e.targets))/2;e.pos=Math.min(Math.max(u,t-e.size/2),s-e.size),e.pos=Math.max(0,e.pos)})),i=!1,o=d.length;o--;)if(o>0){var f=d[o-1],p=d[o];f.pos+f.size>p.pos&&(f.size+=p.size,f.targets=f.targets.concat(p.targets),f.pos+f.size>s&&(f.pos=s-f.size),d.splice(o,1),i=!0)}o=0,d.forEach((function(e){var n=a+t/2;e.targets.forEach((function(){r[o].y=e.pos+n,n+=t,o++}))}))}var yg=function(){function e(e){void 0===e&&(e={}),this.bitmap={};var t=e.xGap,n=void 0===t?1:t,r=e.yGap,o=void 0===r?8:r;this.xGap=n,this.yGap=o}return e.prototype.hasGap=function(e){for(var t=!0,n=this.bitmap,r=Math.round(e.minX),o=Math.round(e.maxX),i=Math.round(e.minY),a=Math.round(e.maxY),l=r;l<=o;l+=1)if(n[l]){if(l===r||l===o){for(var s=i;s<=a;s++)if(n[l][s]){t=!1;break}}else if(n[l][i]||n[l][a]){t=!1;break}}else n[l]={};return t},e.prototype.fillGap=function(e){for(var t=this.bitmap,n=Math.round(e.minX),r=Math.round(e.maxX),o=Math.round(e.minY),i=Math.round(e.maxY),a=n;a<=r;a+=1)t[a]||(t[a]={});for(a=n;a<=r;a+=this.xGap){for(var l=o;l<=i;l+=this.yGap)t[a][l]=!0;t[a][i]=!0}if(1!==this.yGap)for(a=o;a<=i;a+=1)t[n][a]=!0,t[r][a]=!0;if(1!==this.xGap)for(a=n;a<=r;a+=1)t[a][o]=!0,t[a][i]=!0},e.prototype.destroy=function(){this.bitmap={}},e}();function bg(e,t,n,r){var o=e.getCanvasBBox(),i=o.width,a=o.height,l={x:t,y:n,textAlign:"center"};switch(r){case 0:l.y-=a+1,l.x+=1,l.textAlign="left";break;case 1:l.y-=a+1,l.x-=1,l.textAlign="right";break;case 2:l.y+=a+1,l.x-=1,l.textAlign="right";break;case 3:l.y+=a+1,l.x+=1,l.textAlign="left";break;case 5:l.y-=2*a+2;break;case 6:l.y+=2*a+2;break;case 7:l.x+=i+1,l.textAlign="left";break;case 8:l.x-=i+1,l.textAlign="right"}return e.attr(l),e.getCanvasBBox()}function xg(e){if(e.length>4)return[];var t=function(e,t){return[t.x-e.x,t.y-e.y]};return[t(e[0],e[1]),t(e[1],e[2])]}function wg(e,t,n){void 0===t&&(t=0),void 0===n&&(n={x:0,y:0});var r=e.x,o=e.y;return{x:(r-n.x)*Math.cos(-t)+(o-n.y)*Math.sin(-t)+n.x,y:(n.x-r)*Math.sin(-t)+(o-n.y)*Math.cos(-t)+n.y}}function Sg(e){var t=[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}],n=e.rotation;return n?[wg(t[0],n,t[0]),wg(t[1],n,t[0]),wg(t[2],n,t[0]),wg(t[3],n,t[0])]:t}function Eg(e,t){if(e.length>4)return{min:0,max:0};var n=[];return e.forEach((function(e){var r,o;n.push(((r=[e.x,e.y])[0]||0)*((o=t)[0]||0)+(r[1]||0)*(o[1]||0)+(r[2]||0)*(o[2]||0))})),{min:Math.min.apply(Math,(0,S.ev)([],(0,S.CR)(n),!1)),max:Math.max.apply(Math,(0,S.ev)([],(0,S.CR)(n),!1))}}function Cg(e){return["x","y","width","height"].every((function(t){return"number"==typeof(n=e[t])&&!Number.isNaN(n)&&n!==1/0&&n!==-1/0;var n}))}function kg(e,t,n){if(void 0===n&&(n=0),!Cg(e)||!Cg(t))return!1;if(!e.rotation&&!t.rotation)return function(e,t,n){return void 0===n&&(n=0),!(t.x>e.x+e.width+n||t.x+t.widthe.y+e.height+n||t.y+t.heightc.min&&s.mine.x+e.width+n||t.x+t.widthe.y+e.height+n||t.y+t.heightp.min&&f.min0}))}function Rg(e,t,n){return e.some((function(e){return n(e,t)}))}function Lg(e,t){return Rg(e,t,(function(e,t){var n,r,o,i=pd(e),a=pd(t);return n=i.getCanvasBBox(),r=a.getCanvasBBox(),void 0===(o=2)&&(o=0),Math.max(0,Math.min(n.x+n.width+o,r.x+r.width+o)-Math.max(n.x-o,r.x-o))*Math.max(0,Math.min(n.y+n.height+o,r.y+r.height+o)-Math.max(n.y-o,r.y-o))>0}))}function Dg(){return Og||(Og=document.createElement("canvas").getContext("2d")),Og}var jg=(0,E.HP)((function(e,t){void 0===t&&(t={});var n=t.fontSize,r=t.fontFamily,o=t.fontWeight,i=t.fontStyle,a=t.fontVariant,l=Dg();return l.font=[i,a,o,"".concat(n,"px"),r].join(" "),l.measureText((0,E.HD)(e)?e:"").width}),(function(e,t){return void 0===t&&(t={}),(0,S.ev)([e],(0,S.CR)((0,E.VO)(t)),!1).join("")}));function Fg(e,t,n,r,o){var i,a,l=n.start,s=n.end,c=n.getWidth(),u=n.getHeight();"y"===o?(i=l.x+c/2,a=r.yl.x?r.x:l.x,a=l.y+u/2):"xy"===o&&(n.isPolar?(i=n.getCenter().x,a=n.getCenter().y):(i=(l.x+s.x)/2,a=(l.y+s.y)/2));var d=function(e,t,n){var r,o=(0,S.CR)(t,2),i=o[0],a=o[1];return e.applyToMatrix([i,a,1]),"x"===n?(e.setMatrix(se.vs(e.getMatrix(),[["t",-i,-a],["s",.01,1],["t",i,a]])),r=se.vs(e.getMatrix(),[["t",-i,-a],["s",100,1],["t",i,a]])):"y"===n?(e.setMatrix(se.vs(e.getMatrix(),[["t",-i,-a],["s",1,.01],["t",i,a]])),r=se.vs(e.getMatrix(),[["t",-i,-a],["s",1,100],["t",i,a]])):"xy"===n&&(e.setMatrix(se.vs(e.getMatrix(),[["t",-i,-a],["s",.01,.01],["t",i,a]])),r=se.vs(e.getMatrix(),[["t",-i,-a],["s",100,100],["t",i,a]])),r}(e,[i,a],o);e.animate({matrix:d},t)}function Bg(e,t){var n,r=hf(e,t),o=r.startAngle,i=r.endAngle;return!(0,E.vQ)(o,.5*-Math.PI)&&o<.5*-Math.PI&&(o+=2*Math.PI),!(0,E.vQ)(i,.5*-Math.PI)&&i<.5*-Math.PI&&(i+=2*Math.PI),0===t[5]&&(o=(n=(0,S.CR)([i,o],2))[0],i=n[1]),(0,E.vQ)(o,1.5*Math.PI)&&(o=-.5*Math.PI),(0,E.vQ)(i,-.5*Math.PI)&&!(0,E.vQ)(o,i)&&(i=1.5*Math.PI),{startAngle:o,endAngle:i}}function zg(e){var t;return"M"===e[0]||"L"===e[0]?t=[e[1],e[2]]:"a"!==e[0]&&"A"!==e[0]&&"C"!==e[0]||(t=[e[e.length-2],e[e.length-1]]),t}function Hg(e){var t,n,r,o=e.filter((function(e){return"A"===e[0]||"a"===e[0]}));if(0===o.length)return{startAngle:0,endAngle:0,radius:0,innerRadius:0};var i=o[0],a=o.length>1?o[1]:o[0],l=e.indexOf(i),s=e.indexOf(a),c=zg(e[l-1]),u=zg(e[s-1]),d=Bg(c,i),f=d.startAngle,p=d.endAngle,h=Bg(u,a),g=h.startAngle,m=h.endAngle;(0,E.vQ)(f,g)&&(0,E.vQ)(p,m)?(n=f,r=p):(n=Math.min(f,g),r=Math.max(p,m));var v=i[1],y=o[o.length-1][1];return v=0;a--){var l=this.getFacetsByLevel(e,a);try{for(var s=(t=void 0,(0,S.XA)(l)),c=s.next();!c.done;c=s.next()){var u=c.value;this.isLeaf(u)||(u.originColIndex=u.columnIndex,u.columnIndex=this.getRegionIndex(u.children),u.columnValuesLength=o.length)}}catch(e){t={error:e}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}}},t.prototype.getFacetsByLevel=function(e,t){var n=[];return e.forEach((function(e){e.rowIndex===t&&n.push(e)})),n},t.prototype.getRegionIndex=function(e){var t=e[0];return(e[e.length-1].columnIndex-t.columnIndex)/2+t.columnIndex},t.prototype.isLeaf=function(e){return!e.children||!e.children.length},t.prototype.getRows=function(){return this.cfg.fields.length+1},t.prototype.getChildFacets=function(e,t,n){var r=this,o=this.cfg.fields;if(!(o.length=n){var o=r.parsePosition([e[l],e[a.field]]);o&&d.push(o)}if(e[l]===u)return!1})),d},t.prototype.parsePercentPosition=function(e){var t=parseFloat(e[0])/100,n=parseFloat(e[1])/100,r=this.view.getCoordinate(),o=r.start,i=r.end,a=Math.min(o.x,i.x),l=Math.min(o.y,i.y);return{x:r.getWidth()*t+a,y:r.getHeight()*n+l}},t.prototype.getCoordinateBBox=function(){var e=this.view.getCoordinate(),t=e.start,n=e.end,r=e.getWidth(),o=e.getHeight(),i={x:Math.min(t.x,n.x),y:Math.min(t.y,n.y)};return{x:i.x,y:i.y,minX:i.x,minY:i.y,maxX:i.x+r,maxY:i.y+o,width:r,height:o}},t.prototype.getAnnotationCfg=function(e,t,n){var r=this,o=this.view.getCoordinate(),i=this.view.getCanvas(),a={};if((0,E.UM)(t))return null;var l=t.start,s=t.end,c=t.position,u=this.parsePosition(l),d=this.parsePosition(s),f=this.parsePosition(c);if(!(!["arc","image","line","region","regionFilter"].includes(e)||u&&d))return null;if(["text","dataMarker","html"].includes(e)&&!f)return null;if("arc"===e){var p=t,h=(p.start,p.end,(0,S._T)(p,["start","end"])),g=Ms(o,u),m=Ms(o,d);g>m&&(m=2*Math.PI+m),a=(0,S.pi)((0,S.pi)({},h),{center:o.getCenter(),radius:Os(o,u),startAngle:g,endAngle:m})}else if("image"===e){var v=t;v.start,v.end,h=(0,S._T)(v,["start","end"]),a=(0,S.pi)((0,S.pi)({},h),{start:u,end:d,src:t.src})}else if("line"===e){var y=t;y.start,y.end,h=(0,S._T)(y,["start","end"]),a=(0,S.pi)((0,S.pi)({},h),{start:u,end:d,text:(0,E.U2)(t,"text",null)})}else if("region"===e){var b=t;b.start,b.end,h=(0,S._T)(b,["start","end"]),a=(0,S.pi)((0,S.pi)({},h),{start:u,end:d})}else if("text"===e){var x=this.view.getData(),w=t,C=(w.position,w.content),k=(h=(0,S._T)(w,["position","content"]),C);(0,E.mf)(C)&&(k=C(x)),a=(0,S.pi)((0,S.pi)((0,S.pi)({},f),h),{content:k})}else if("dataMarker"===e){var O=t,M=(O.position,O.point),I=O.line,$=O.text,_=O.autoAdjust,P=O.direction;h=(0,S._T)(O,["position","point","line","text","autoAdjust","direction"]),a=(0,S.pi)((0,S.pi)((0,S.pi)({},h),f),{coordinateBBox:this.getCoordinateBBox(),point:M,line:I,text:$,autoAdjust:_,direction:P})}else if("dataRegion"===e){var A=t,N=A.start,T=A.end,R=A.region,L=($=A.text,A.lineLength);h=(0,S._T)(A,["start","end","region","text","lineLength"]),a=(0,S.pi)((0,S.pi)({},h),{points:this.getRegionPoints(N,T),region:R,text:$,lineLength:L})}else if("regionFilter"===e){var D=t,j=(D.start,D.end,D.apply),F=D.color,B=(h=(0,S._T)(D,["start","end","apply","color"]),this.view.geometries),z=[],H=function(e){e&&(e.isGroup()?e.getChildren().forEach((function(e){return H(e)})):z.push(e))};(0,E.S6)(B,(function(e){j?(0,E.FX)(j,e.type)&&(0,E.S6)(e.elements,(function(e){H(e.shape)})):(0,E.S6)(e.elements,(function(e){H(e.shape)}))})),a=(0,S.pi)((0,S.pi)({},h),{color:F,shapes:z,start:u,end:d})}else if("shape"===e){var U=t,W=U.render,V=(0,S._T)(U,["render"]);a=(0,S.pi)((0,S.pi)({},V),{render:function(e){if((0,E.mf)(t.render))return W(e,r.view,{parsePosition:r.parsePosition.bind(r)})}})}else if("html"===e){var X=t,q=X.html;X.position,V=(0,S._T)(X,["html","position"]),a=(0,S.pi)((0,S.pi)((0,S.pi)({},V),f),{parent:i.get("el").parentNode,html:function(e){return(0,E.mf)(q)?q(e,r.view):q}})}var G=(0,E.b$)({},n,(0,S.pi)((0,S.pi)({},a),{top:t.top,style:t.style,offsetX:t.offsetX,offsetY:t.offsetY}));return"html"!==e&&(G.container=this.getComponentContainer(G)),G.animate=this.view.getOptions().animate&&G.animate&&(0,E.U2)(t,"animate",G.animate),G.animateOption=(0,E.b$)({},Fu,G.animateOption,t.animateOption),G},t.prototype.isTop=function(e){return(0,E.U2)(e,"top",!0)},t.prototype.getComponentContainer=function(e){return this.isTop(e)?this.foregroundContainer:this.backgroundContainer},t.prototype.getAnnotationTheme=function(e){return(0,E.U2)(this.view.getTheme(),["components","annotation",e],{})},t.prototype.updateOrCreate=function(e){var t=this.cache.get(this.getCacheKey(e));if(t){var n=e.type,r=this.getAnnotationTheme(n),o=this.getAnnotationCfg(n,e,r);o&&Ss(o,["container"]),t.component.update((0,S.pi)((0,S.pi)({},o||{}),{visible:!!o})),(0,E.q9)(am,e.type)&&t.component.render()}else(t=this.createAnnotation(e))&&(t.component.init(),(0,E.q9)(am,e.type)&&t.component.render());return t},t.prototype.syncCache=function(e){var t=this,n=new Map(this.cache);return e.forEach((function(e,t){n.set(t,e)})),n.forEach((function(e,r){(0,E.sE)(t.option,(function(e){return r===t.getCacheKey(e)}))||(e.component.destroy(),n.delete(r))})),n},t.prototype.getCacheKey=function(e){return e},t}(Nu);const sm=lm;function cm(e,t){var n=(0,E.b$)({},(0,E.U2)(e,["components","axis","common"]),(0,E.U2)(e,["components","axis",t]));return(0,E.U2)(n,["grid"],{})}function um(e,t,n,r){var o=[],i=t.getTicks();return e.isPolar&&i.push({value:1,text:"",tickValue:""}),i.reduce((function(t,i,a){var l=i.value;if(r)o.push({points:[e.convert("y"===n?{x:0,y:l}:{x:l,y:0}),e.convert("y"===n?{x:1,y:l}:{x:l,y:1})]});else if(a){var s=(t.value+l)/2;o.push({points:[e.convert("y"===n?{x:0,y:s}:{x:s,y:0}),e.convert("y"===n?{x:1,y:s}:{x:s,y:1})]})}return i}),i[0]),o}function dm(e,t,n,r,o){var i=t.values.length,a=[],l=n.getTicks();return l.reduce((function(t,n){var l=t?t.value:n.value,s=n.value,c=(l+s)/2;return"x"===o?a.push({points:[e.convert({x:r?s:c,y:0}),e.convert({x:r?s:c,y:1})]}):a.push({points:(0,E.UI)(Array(i+1),(function(t,n){return e.convert({x:n/i,y:r?s:c})}))}),n}),l[0]),a}function fm(e,t){var n=(0,E.U2)(t,"grid");if(null===n)return!1;var r=(0,E.U2)(e,"grid");return!(void 0===n&&null===r)}var pm=["container"],hm=(0,S.pi)((0,S.pi)({},Fu),{appear:null}),gm=function(e){function t(t){var n=e.call(this,t)||this;return n.cache=new Map,n.gridContainer=n.view.getLayer(v.BG).addGroup(),n.gridForeContainer=n.view.getLayer(v.FORE).addGroup(),n.axisContainer=n.view.getLayer(v.BG).addGroup(),n.axisForeContainer=n.view.getLayer(v.FORE).addGroup(),n}return(0,S.ZT)(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"axis"},enumerable:!1,configurable:!0}),t.prototype.init=function(){},t.prototype.render=function(){this.update()},t.prototype.layout=function(){var e=this,t=this.view.getCoordinate();(0,E.S6)(this.getComponents(),(function(n){var r,o=n.component,i=n.direction,a=n.type,l=n.extra,s=l.dim,c=l.scale,u=l.alignTick;a===b.AXIS?t.isPolar?"x"===s?r=t.isTransposed?Ns(t,i):js(t):"y"===s&&(r=t.isTransposed?js(t):Ns(t,i)):r=Ns(t,i):a===b.GRID&&(r=t.isPolar?{items:t.isTransposed?"x"===s?dm(t,e.view.getYScales()[0],c,u,s):um(t,c,s,u):"x"===s?um(t,c,s,u):dm(t,e.view.getXScale(),c,u,s),center:e.view.getCoordinate().getCenter()}:{items:um(t,c,s,u)}),o.update(r)}))},t.prototype.update=function(){this.option=this.view.getOptions().axes;var e=new Map;this.updateXAxes(e),this.updateYAxes(e);var t=new Map;this.cache.forEach((function(n,r){e.has(r)?t.set(r,n):n.component.destroy()})),this.cache=t},t.prototype.clear=function(){e.prototype.clear.call(this),this.cache.clear(),this.gridContainer.clear(),this.gridForeContainer.clear(),this.axisContainer.clear(),this.axisForeContainer.clear()},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.gridContainer.remove(!0),this.gridForeContainer.remove(!0),this.axisContainer.remove(!0),this.axisForeContainer.remove(!0)},t.prototype.getComponents=function(){var e=[];return this.cache.forEach((function(t){e.push(t)})),e},t.prototype.updateXAxes=function(e){var t=this.view.getXScale();if(t&&!t.isIdentity){var n=Fs(this.option,t.field);if(!1!==n){var r=Bs(n,y.BOTTOM),o=v.BG,i="x",a=this.view.getCoordinate(),l=this.getId("axis",t.field),s=this.getId("grid",t.field);if(a.isRect)(c=this.cache.get(l))?(Ss(d=this.getLineAxisCfg(t,n,r),pm),c.component.update(d),e.set(l,c)):(c=this.createLineAxis(t,n,o,r,i),this.cache.set(l,c),e.set(l,c)),(u=this.cache.get(s))?(Ss(d=this.getLineGridCfg(t,n,r,i),pm),u.component.update(d),e.set(s,u)):(u=this.createLineGrid(t,n,o,r,i))&&(this.cache.set(s,u),e.set(s,u));else if(a.isPolar){var c,u;if(c=this.cache.get(l))Ss(d=a.isTransposed?this.getLineAxisCfg(t,n,y.RADIUS):this.getCircleAxisCfg(t,n,r),pm),c.component.update(d),e.set(l,c);else{if(a.isTransposed){if((0,E.o8)(n))return;c=this.createLineAxis(t,n,o,y.RADIUS,i)}else c=this.createCircleAxis(t,n,o,r,i);this.cache.set(l,c),e.set(l,c)}if(u=this.cache.get(s)){var d;Ss(d=a.isTransposed?this.getCircleGridCfg(t,n,y.RADIUS,i):this.getLineGridCfg(t,n,y.CIRCLE,i),pm),u.component.update(d),e.set(s,u)}else{if(a.isTransposed){if((0,E.o8)(n))return;u=this.createCircleGrid(t,n,o,y.RADIUS,i)}else u=this.createLineGrid(t,n,o,y.CIRCLE,i);u&&(this.cache.set(s,u),e.set(s,u))}}}}},t.prototype.updateYAxes=function(e){var t=this,n=this.view.getYScales();(0,E.S6)(n,(function(n,r){if(n&&!n.isIdentity){var o=n.field,i=Fs(t.option,o);if(!1!==i){var a=v.BG,l="y",s=t.getId("axis",o),c=t.getId("grid",o),u=t.view.getCoordinate();if(u.isRect){var d=Bs(i,0===r?y.LEFT:y.RIGHT);(f=t.cache.get(s))?(Ss(h=t.getLineAxisCfg(n,i,d),pm),f.component.update(h),e.set(s,f)):(f=t.createLineAxis(n,i,a,d,l),t.cache.set(s,f),e.set(s,f)),(p=t.cache.get(c))?(Ss(h=t.getLineGridCfg(n,i,d,l),pm),p.component.update(h),e.set(c,p)):(p=t.createLineGrid(n,i,a,d,l))&&(t.cache.set(c,p),e.set(c,p))}else if(u.isPolar){var f,p;if(f=t.cache.get(s))Ss(h=u.isTransposed?t.getCircleAxisCfg(n,i,y.CIRCLE):t.getLineAxisCfg(n,i,y.RADIUS),pm),f.component.update(h),e.set(s,f);else{if(u.isTransposed){if((0,E.o8)(i))return;f=t.createCircleAxis(n,i,a,y.CIRCLE,l)}else f=t.createLineAxis(n,i,a,y.RADIUS,l);t.cache.set(s,f),e.set(s,f)}if(p=t.cache.get(c)){var h;Ss(h=u.isTransposed?t.getLineGridCfg(n,i,y.CIRCLE,l):t.getCircleGridCfg(n,i,y.RADIUS,l),pm),p.component.update(h),e.set(c,p)}else{if(u.isTransposed){if((0,E.o8)(i))return;p=t.createLineGrid(n,i,a,y.CIRCLE,l)}else p=t.createCircleGrid(n,i,a,y.RADIUS,l);p&&(t.cache.set(c,p),e.set(c,p))}}}}}))},t.prototype.createLineAxis=function(e,t,n,r,o){var i={component:new ls(this.getLineAxisCfg(e,t,r)),layer:n,direction:r===y.RADIUS?y.NONE:r,type:b.AXIS,extra:{dim:o,scale:e}};return i.component.set("field",e.field),i.component.init(),i},t.prototype.createLineGrid=function(e,t,n,r,o){var i=this.getLineGridCfg(e,t,r,o);if(i){var a={component:new cs(i),layer:n,direction:y.NONE,type:b.GRID,extra:{dim:o,scale:e,alignTick:(0,E.U2)(i,"alignTick",!0)}};return a.component.init(),a}},t.prototype.createCircleAxis=function(e,t,n,r,o){var i={component:new ss(this.getCircleAxisCfg(e,t,r)),layer:n,direction:r,type:b.AXIS,extra:{dim:o,scale:e}};return i.component.set("field",e.field),i.component.init(),i},t.prototype.createCircleGrid=function(e,t,n,r,o){var i=this.getCircleGridCfg(e,t,r,o);if(i){var a={component:new us(i),layer:n,direction:y.NONE,type:b.GRID,extra:{dim:o,scale:e,alignTick:(0,E.U2)(i,"alignTick",!0)}};return a.component.init(),a}},t.prototype.getLineAxisCfg=function(e,t,n){var r=(0,E.U2)(t,["top"])?this.axisForeContainer:this.axisContainer,o=this.view.getCoordinate(),i=Ns(o,n),a=zs(e,t),l=Ls(this.view.getTheme(),n),s=(0,E.U2)(t,["title"])?(0,E.b$)({title:{style:{text:a}}},{title:Ds(this.view.getTheme(),n,t.title)},t):t,c=(0,E.b$)((0,S.pi)((0,S.pi)({container:r},i),{ticks:e.getTicks().map((function(e){return{id:"".concat(e.tickValue),name:e.text,value:e.value}})),verticalFactor:o.isPolar?-1*Rs(i,o.getCenter()):Rs(i,o.getCenter()),theme:l}),l,s),u=this.getAnimateCfg(c),d=u.animate,f=u.animateOption;c.animateOption=f,c.animate=d;var p=Ts(i),h=(0,E.U2)(c,"verticalLimitLength",p?1/3:.5);if(h<=1){var g=this.view.getCanvas().get("width"),m=this.view.getCanvas().get("height");c.verticalLimitLength=h*(p?g:m)}return c},t.prototype.getLineGridCfg=function(e,t,n,r){if(fm(Ls(this.view.getTheme(),n),t)){var o=cm(this.view.getTheme(),n),i=(0,E.b$)({container:(0,E.U2)(t,["top"])?this.gridForeContainer:this.gridContainer},o,(0,E.U2)(t,"grid"),this.getAnimateCfg(t));return i.items=um(this.view.getCoordinate(),e,r,(0,E.U2)(i,"alignTick",!0)),i}},t.prototype.getCircleAxisCfg=function(e,t,n){var r=(0,E.U2)(t,["top"])?this.axisForeContainer:this.axisContainer,o=this.view.getCoordinate(),i=e.getTicks().map((function(e){return{id:"".concat(e.tickValue),name:e.text,value:e.value}}));e.isCategory||Math.abs(o.endAngle-o.startAngle)!==2*Math.PI||i.length&&(i[i.length-1].name="");var a=zs(e,t),l=Ls(this.view.getTheme(),y.CIRCLE),s=(0,E.U2)(t,["title"])?(0,E.b$)({title:{style:{text:a}}},{title:Ds(this.view.getTheme(),n,t.title)},t):t,c=(0,E.b$)((0,S.pi)((0,S.pi)({container:r},js(this.view.getCoordinate())),{ticks:i,verticalFactor:1,theme:l}),l,s),u=this.getAnimateCfg(c),d=u.animate,f=u.animateOption;return c.animate=d,c.animateOption=f,c},t.prototype.getCircleGridCfg=function(e,t,n,r){if(fm(Ls(this.view.getTheme(),n),t)){var o=cm(this.view.getTheme(),y.RADIUS),i=(0,E.b$)({container:(0,E.U2)(t,["top"])?this.gridForeContainer:this.gridContainer,center:this.view.getCoordinate().getCenter()},o,(0,E.U2)(t,"grid"),this.getAnimateCfg(t)),a=(0,E.U2)(i,"alignTick",!0),l="x"===r?this.view.getYScales()[0]:this.view.getXScale();return i.items=dm(this.view.getCoordinate(),l,e,a,r),i}},t.prototype.getId=function(e,t){var n=this.view.getCoordinate();return"".concat(e,"-").concat(t,"-").concat(n.type)},t.prototype.getAnimateCfg=function(e){return{animate:this.view.getOptions().animate&&(0,E.U2)(e,"animate"),animateOption:e&&e.animateOption?(0,E.b$)({},hm,e.animateOption):hm}},t}(Nu);const mm=gm;function vm(e,t,n){return n===y.TOP?[e.minX+e.width/2-t.width/2,e.minY]:n===y.BOTTOM?[e.minX+e.width/2-t.width/2,e.maxY-t.height]:n===y.LEFT?[e.minX,e.minY+e.height/2-t.height/2]:n===y.RIGHT?[e.maxX-t.width,e.minY+e.height/2-t.height/2]:n===y.TOP_LEFT||n===y.LEFT_TOP?[e.tl.x,e.tl.y]:n===y.TOP_RIGHT||n===y.RIGHT_TOP?[e.tr.x-t.width,e.tr.y]:n===y.BOTTOM_LEFT||n===y.LEFT_BOTTOM?[e.bl.x,e.bl.y-t.height]:n===y.BOTTOM_RIGHT||n===y.RIGHT_BOTTOM?[e.br.x-t.width,e.br.y-t.height]:[0,0]}function ym(e,t){return(0,E.jn)(e)?!1!==e&&{}:(0,E.U2)(e,[t],e)}function bm(e){return(0,E.U2)(e,"position",y.BOTTOM)}var xm=function(e){function t(t){var n=e.call(this,t)||this;return n.container=n.view.getLayer(v.FORE).addGroup(),n}return(0,S.ZT)(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"legend"},enumerable:!1,configurable:!0}),t.prototype.init=function(){},t.prototype.render=function(){this.update()},t.prototype.layout=function(){var e=this;this.layoutBBox=this.view.viewBBox,(0,E.S6)(this.components,(function(t){var n=t.component,r=t.direction,o=Od(r),i=n.get("maxWidthRatio"),a=n.get("maxHeightRatio"),l=e.getCategoryLegendSizeCfg(o,i,a),s=n.get("maxWidth"),c=n.get("maxHeight");n.update({maxWidth:Math.min(l.maxWidth,s||0),maxHeight:Math.min(l.maxHeight,c||0)});var u=n.get("padding"),d=n.getLayoutBBox(),f=new Cs(d.x,d.y,d.width,d.height).expand(u),p=(0,S.CR)(vm(e.view.viewBBox,f,r),2),h=p[0],g=p[1],m=(0,S.CR)(vm(e.layoutBBox,f,r),2),v=m[0],y=m[1],b=0,x=0;r.startsWith("top")||r.startsWith("bottom")?(b=h,x=y):(b=v,x=g),n.setLocation({x:b+u[3],y:x+u[0]}),e.layoutBBox=e.layoutBBox.cut(f,r)}))},t.prototype.update=function(){var e=this;this.option=this.view.getOptions().legends;var t={};if((0,E.U2)(this.option,"custom")){var n="global-custom",r=this.getComponentById(n);if(r){var o=this.getCategoryCfg(void 0,void 0,void 0,this.option,!0);Ss(o,["container"]),r.component.update(o),t[n]=!0}else{var i=this.createCustomLegend(void 0,void 0,void 0,this.option);if(i){i.init();var a=v.FORE,l=bm(this.option);this.components.push({id:n,component:i,layer:a,direction:l,type:b.LEGEND,extra:void 0}),t[n]=!0}}}else this.loopLegends((function(n,r,o){var i=e.getId(o.field),a=e.getComponentById(i);if(a){var l=void 0,s=ym(e.option,o.field);!1!==s&&((0,E.U2)(s,"custom")?l=e.getCategoryCfg(n,r,o,s,!0):o.isLinear?l=e.getContinuousCfg(n,r,o,s):o.isCategory&&(l=e.getCategoryCfg(n,r,o,s))),l&&(Ss(l,["container"]),a.direction=bm(s),a.component.update(l),t[i]=!0)}else{var c=e.createFieldLegend(n,r,o);c&&(c.component.init(),e.components.push(c),t[i]=!0)}}));var s=[];(0,E.S6)(this.getComponents(),(function(e){t[e.id]?s.push(e):e.component.destroy()})),this.components=s},t.prototype.clear=function(){e.prototype.clear.call(this),this.container.clear()},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.container.remove(!0)},t.prototype.getGeometries=function(e){var t=this,n=e.geometries;return(0,E.S6)(e.views,(function(e){n=n.concat(t.getGeometries(e))})),n},t.prototype.loopLegends=function(e){if(this.view.getRootView()===this.view){var t=this.getGeometries(this.view),n={};(0,E.S6)(t,(function(t){var r=t.getGroupAttributes();(0,E.S6)(r,(function(r){var o=r.getScale(r.type);o&&"identity"!==o.type&&!n[o.field]&&(e(t,r,o),n[o.field]=!0)}))}))}},t.prototype.createFieldLegend=function(e,t,n){var r,o=ym(this.option,n.field),i=v.FORE,a=bm(o);if(!1!==o&&((0,E.U2)(o,"custom")?r=this.createCustomLegend(e,t,n,o):n.isLinear?r=this.createContinuousLegend(e,t,n,o):n.isCategory&&(r=this.createCategoryLegend(e,t,n,o))),r)return r.set("field",n.field),{id:this.getId(n.field),component:r,layer:i,direction:a,type:b.LEGEND,extra:{scale:n}}},t.prototype.createCustomLegend=function(e,t,n,r){var o=this.getCategoryCfg(e,t,n,r,!0);return new ds(o)},t.prototype.createContinuousLegend=function(e,t,n,r){var o=this.getContinuousCfg(e,t,n,Ss(r,["value"]));return new fs(o)},t.prototype.createCategoryLegend=function(e,t,n,r){var o=this.getCategoryCfg(e,t,n,r);return new ds(o)},t.prototype.getContinuousCfg=function(e,t,n,r){var o=n.getTicks(),i=(0,E.sE)(o,(function(e){return 0===e.value})),a=(0,E.sE)(o,(function(e){return 1===e.value})),l=o.map((function(e){var r=e.value,o=e.tickValue,i=t.mapping(n.invert(r)).join("");return{value:o,attrValue:i,color:i,scaleValue:r}}));i||l.push({value:n.min,attrValue:t.mapping(n.invert(0)).join(""),color:t.mapping(n.invert(0)).join(""),scaleValue:0}),a||l.push({value:n.max,attrValue:t.mapping(n.invert(1)).join(""),color:t.mapping(n.invert(1)).join(""),scaleValue:1}),l.sort((function(e,t){return e.value-t.value}));var s={min:(0,E.YM)(l).value,max:(0,E.Z$)(l).value,colors:[],rail:{type:t.type},track:{}};"size"===t.type&&(s.track={style:{fill:"size"===t.type?this.view.getTheme().defaultColor:void 0}}),"color"===t.type&&(s.colors=l.map((function(e){return e.attrValue})));var c=this.container,u=Od(bm(r)),d=(0,E.U2)(r,"title");return d&&(d=(0,E.b$)({text:Ps(n)},d)),s.container=c,s.layout=u,s.title=d,s.animateOption=Fu,this.mergeLegendCfg(s,r,"continuous")},t.prototype.getCategoryCfg=function(e,t,n,r,o){var i=this.container,a=(0,E.U2)(r,"position",y.BOTTOM),l=Id(this.view.getTheme(),a),s=(0,E.U2)(l,["marker"]),c=(0,E.U2)(r,"marker"),u=Od(a),d=(0,E.U2)(l,["pageNavigator"]),f=(0,E.U2)(r,"pageNavigator"),p=o?function(e,t,n){return n.map((function(n,r){var o=t;(0,E.mf)(o)&&(o=o(n.name,r,(0,E.b$)({},e,n)));var i=(0,E.mf)(n.marker)?n.marker(n.name,r,(0,E.b$)({},e,n)):n.marker,a=(0,E.b$)({},e,o,i);return kd(a),n.marker=a,n}))}(s,c,r.items):Md(this.view,e,t,s,c),h=(0,E.U2)(r,"title");h&&(h=(0,E.b$)({text:n?Ps(n):""},h));var g=(0,E.U2)(r,"maxWidthRatio"),m=(0,E.U2)(r,"maxHeightRatio"),v=this.getCategoryLegendSizeCfg(u,g,m);v.container=i,v.layout=u,v.items=p,v.title=h,v.animateOption=Fu,v.pageNavigator=(0,E.b$)({},d,f);var b=this.mergeLegendCfg(v,r,a);b.reversed&&b.items.reverse();var x=(0,E.U2)(b,"maxItemWidth");return x&&x<=1&&(b.maxItemWidth=this.view.viewBBox.width*x),b},t.prototype.mergeLegendCfg=function(e,t,n){var r=n.split("-")[0],o=Id(this.view.getTheme(),r);return(0,E.b$)({},o,e,t)},t.prototype.getId=function(e){return"".concat(this.name,"-").concat(e)},t.prototype.getComponentById=function(e){return(0,E.sE)(this.components,(function(t){return t.id===e}))},t.prototype.getCategoryLegendSizeCfg=function(e,t,n){void 0===t&&(t=.25),void 0===n&&(n=.25);var r=this.view.viewBBox,o=r.width,i=r.height;return"vertical"===e?{maxWidth:o*t,maxHeight:i}:{maxWidth:o,maxHeight:i*n}},t}(Nu);const wm=xm;var Sm=function(e){function t(t){var n=e.call(this,t)||this;return n.onChangeFn=E.ZT,n.resetMeasure=function(){n.clear()},n.onValueChange=function(e){var t=(0,S.CR)(e,2),r=t[0],o=t[1];n.start=r,n.end=o,n.changeViewData(r,o)},n.container=n.view.getLayer(v.FORE).addGroup(),n.onChangeFn=(0,E.P2)(n.onValueChange,20,{leading:!0}),n.width=0,n.view.on(C.BEFORE_CHANGE_DATA,n.resetMeasure),n.view.on(C.BEFORE_CHANGE_SIZE,n.resetMeasure),n}return(0,S.ZT)(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"slider"},enumerable:!1,configurable:!0}),t.prototype.destroy=function(){e.prototype.destroy.call(this),this.view.off(C.BEFORE_CHANGE_DATA,this.resetMeasure),this.view.off(C.BEFORE_CHANGE_SIZE,this.resetMeasure)},t.prototype.init=function(){},t.prototype.render=function(){this.option=this.view.getOptions().slider;var e=this.getSliderCfg(),t=e.start,n=e.end;(0,E.UM)(this.start)&&(this.start=t,this.end=n);var r=this.view.getOptions().data;this.option&&!(0,E.xb)(r)?this.slider?this.slider=this.updateSlider():(this.slider=this.createSlider(),this.slider.component.on("sliderchange",this.onChangeFn)):this.slider&&(this.slider.component.destroy(),this.slider=void 0)},t.prototype.layout=function(){var e=this;if(this.option&&!this.width&&(this.measureSlider(),setTimeout((function(){e.view.destroyed||e.changeViewData(e.start,e.end)}),0)),this.slider){var t=this.view.coordinateBBox.width,n=this.slider.component.get("padding"),r=(0,S.CR)(n,4),o=r[0],i=(r[1],r[2],r[3]),a=this.slider.component.getLayoutBBox(),l=new Cs(a.x,a.y,Math.min(a.width,t),a.height).expand(n),s=this.getMinMaxText(this.start,this.end),c=s.minText,u=s.maxText,d=(0,S.CR)(vm(this.view.viewBBox,l,y.BOTTOM),2),f=(d[0],d[1]),p=(0,S.CR)(vm(this.view.coordinateBBox,l,y.BOTTOM),2),h=p[0];p[1],this.slider.component.update((0,S.pi)((0,S.pi)({},this.getSliderCfg()),{x:h+i,y:f+o,width:this.width,start:this.start,end:this.end,minText:c,maxText:u})),this.view.viewBBox=this.view.viewBBox.cut(l,y.BOTTOM)}},t.prototype.update=function(){this.render()},t.prototype.createSlider=function(){var e=this.getSliderCfg(),t=new rs((0,S.pi)({container:this.container},e));return t.init(),{component:t,layer:v.FORE,direction:y.BOTTOM,type:b.SLIDER}},t.prototype.updateSlider=function(){var e=this.getSliderCfg();if(this.width){var t=this.getMinMaxText(this.start,this.end),n=t.minText,r=t.maxText;e=(0,S.pi)((0,S.pi)({},e),{width:this.width,start:this.start,end:this.end,minText:n,maxText:r})}return this.slider.component.update(e),this.slider},t.prototype.measureSlider=function(){var e=this.getSliderCfg().width;this.width=e},t.prototype.getSliderCfg=function(){var e={height:16,start:0,end:1,minText:"",maxText:"",x:0,y:0,width:this.view.coordinateBBox.width};if((0,E.Kn)(this.option)){var t=(0,S.pi)({data:this.getData()},(0,E.U2)(this.option,"trendCfg",{}));e=(0,E.b$)({},e,this.getThemeOptions(),this.option),e=(0,S.pi)((0,S.pi)({},e),{trendCfg:t})}return e.start=(0,E.uZ)(Math.min((0,E.UM)(e.start)?0:e.start,(0,E.UM)(e.end)?1:e.end),0,1),e.end=(0,E.uZ)(Math.max((0,E.UM)(e.start)?0:e.start,(0,E.UM)(e.end)?1:e.end),0,1),e},t.prototype.getData=function(){var e=this.view.getOptions().data,t=(0,S.CR)(this.view.getYScales(),1)[0],n=this.view.getGroupScales();if(n.length){var r=n[0],o=r.field,i=r.ticks;return e.reduce((function(e,n){return n[o]===i[0]&&e.push(n[t.field]),e}),[])}return e.map((function(e){return e[t.field]||0}))},t.prototype.getThemeOptions=function(){var e=this.view.getTheme();return(0,E.U2)(e,["components","slider","common"],{})},t.prototype.getMinMaxText=function(e,t){var n=this.view.getOptions().data,r=this.view.getXScale(),o=(0,E.I)(n,r.field);r.isLinear&&(o=o.sort());var i=o,a=(0,E.dp)(n);if(!r||!a)return{};var l=(0,E.dp)(i),s=Math.round(e*(l-1)),c=Math.round(t*(l-1)),u=(0,E.U2)(i,[s]),d=(0,E.U2)(i,[c]),f=this.getSliderCfg().formatter;return f&&(u=f(u,n[s],s),d=f(d,n[c],c)),{minText:u,maxText:d}},t.prototype.changeViewData=function(e,t){var n=this.view.getOptions().data,r=this.view.getXScale(),o=(0,E.dp)(n);if(r&&o){var i=(0,E.I)(n,r.field),a=this.view.getXScale().isLinear?i.sort((function(e,t){return Number(e)-Number(t)})):i,l=(0,E.dp)(a),s=Math.round(e*(l-1)),c=Math.round(t*(l-1));this.view.filter(r.field,(function(e,t){var n=a.indexOf(e);return!(n>-1)||ws(n,s,c)})),this.view.render(!0)}},t.prototype.getComponents=function(){return this.slider?[this.slider]:[]},t.prototype.clear=function(){this.slider&&(this.slider.component.destroy(),this.slider=void 0),this.width=0,this.start=void 0,this.end=void 0},t}(Nu);const Em=Sm;var Cm=function(e){function t(t){var n=e.call(this,t)||this;return n.onChangeFn=E.ZT,n.resetMeasure=function(){n.clear()},n.onValueChange=function(e){var t=e.ratio,r=n.getValidScrollbarCfg().animate;n.ratio=(0,E.uZ)(t,0,1);var o=n.view.getOptions().animate;r||n.view.animate(!1),n.changeViewData(n.getScrollRange(),!0),n.view.animate(o)},n.container=n.view.getLayer(v.FORE).addGroup(),n.onChangeFn=(0,E.P2)(n.onValueChange,20,{leading:!0}),n.trackLen=0,n.thumbLen=0,n.ratio=0,n.view.on(C.BEFORE_CHANGE_DATA,n.resetMeasure),n.view.on(C.BEFORE_CHANGE_SIZE,n.resetMeasure),n}return(0,S.ZT)(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"scrollbar"},enumerable:!1,configurable:!0}),t.prototype.destroy=function(){e.prototype.destroy.call(this),this.view.off(C.BEFORE_CHANGE_DATA,this.resetMeasure),this.view.off(C.BEFORE_CHANGE_SIZE,this.resetMeasure)},t.prototype.init=function(){},t.prototype.render=function(){this.option=this.view.getOptions().scrollbar,this.option?this.scrollbar?this.scrollbar=this.updateScrollbar():(this.scrollbar=this.createScrollbar(),this.scrollbar.component.on("scrollchange",this.onChangeFn)):this.scrollbar&&(this.scrollbar.component.destroy(),this.scrollbar=void 0)},t.prototype.layout=function(){var e=this;if(this.option&&!this.trackLen&&(this.measureScrollbar(),setTimeout((function(){e.view.destroyed||e.changeViewData(e.getScrollRange(),!0)}))),this.scrollbar){var t=this.view.coordinateBBox.width,n=this.scrollbar.component.get("padding"),r=this.scrollbar.component.getLayoutBBox(),o=new Cs(r.x,r.y,Math.min(r.width,t),r.height).expand(n),i=this.getScrollbarComponentCfg(),a=void 0,l=void 0;if(i.isHorizontal){var s=(0,S.CR)(vm(this.view.viewBBox,o,y.BOTTOM),2),c=(s[0],s[1]),u=(0,S.CR)(vm(this.view.coordinateBBox,o,y.BOTTOM),2),d=u[0];u[1],a=d,l=c}else{var f=(0,S.CR)(vm(this.view.viewBBox,o,y.RIGHT),2),p=(f[0],c=f[1],(0,S.CR)(vm(this.view.viewBBox,o,y.RIGHT),2));d=p[0],p[1],a=d,l=c}a+=n[3],l+=n[0],this.trackLen?this.scrollbar.component.update((0,S.pi)((0,S.pi)({},i),{x:a,y:l,trackLen:this.trackLen,thumbLen:this.thumbLen,thumbOffset:(this.trackLen-this.thumbLen)*this.ratio})):this.scrollbar.component.update((0,S.pi)((0,S.pi)({},i),{x:a,y:l})),this.view.viewBBox=this.view.viewBBox.cut(o,i.isHorizontal?y.BOTTOM:y.RIGHT)}},t.prototype.update=function(){this.render()},t.prototype.getComponents=function(){return this.scrollbar?[this.scrollbar]:[]},t.prototype.clear=function(){this.scrollbar&&(this.scrollbar.component.destroy(),this.scrollbar=void 0),this.trackLen=0,this.thumbLen=0,this.ratio=0,this.cnt=0,this.step=0,this.data=void 0,this.xScaleCfg=void 0,this.yScalesCfg=[]},t.prototype.setValue=function(e){this.onValueChange({ratio:e})},t.prototype.getValue=function(){return this.ratio},t.prototype.getThemeOptions=function(){var e=this.view.getTheme();return(0,E.U2)(e,["components","scrollbar","common"],{})},t.prototype.getScrollbarTheme=function(e){var t=(0,E.U2)(this.view.getTheme(),["components","scrollbar"]),n=e||{},r=n.thumbHighlightColor,o=(0,S._T)(n,["thumbHighlightColor"]);return{default:(0,E.b$)({},(0,E.U2)(t,["default","style"],{}),o),hover:(0,E.b$)({},(0,E.U2)(t,["hover","style"],{}),{thumbColor:r})}},t.prototype.measureScrollbar=function(){var e=this.view.getXScale(),t=this.view.getYScales().slice();this.data=this.getScrollbarData(),this.step=this.getStep(),this.cnt=this.getCnt();var n=this.getScrollbarComponentCfg(),r=n.trackLen,o=n.thumbLen;this.trackLen=r,this.thumbLen=o,this.xScaleCfg={field:e.field,values:e.values||[]},this.yScalesCfg=t},t.prototype.getScrollRange=function(){var e=Math.floor((this.cnt-this.step)*(0,E.uZ)(this.ratio,0,1));return[e,Math.min(e+this.step-1,this.cnt-1)]},t.prototype.changeViewData=function(e,t){var n=this,r=(0,S.CR)(e,2),o=r[0],i=r[1],a="vertical"!==this.getValidScrollbarCfg().type,l=(0,E.I)(this.data,this.xScaleCfg.field),s=this.view.getXScale().isLinear?l.sort((function(e,t){return Number(e)-Number(t)})):l,c=a?s:s.reverse();this.yScalesCfg.forEach((function(e){n.view.scale(e.field,{formatter:e.formatter,type:e.type,min:e.min,max:e.max,tickMethod:e.tickMethod})})),this.view.filter(this.xScaleCfg.field,(function(e){var t=c.indexOf(e);return!(t>-1)||ws(t,o,i)})),this.view.render(!0)},t.prototype.createScrollbar=function(){var e="vertical"!==this.getValidScrollbarCfg().type,t=new as((0,S.pi)((0,S.pi)({container:this.container},this.getScrollbarComponentCfg()),{x:0,y:0}));return t.init(),{component:t,layer:v.FORE,direction:e?y.BOTTOM:y.RIGHT,type:b.SCROLLBAR}},t.prototype.updateScrollbar=function(){var e=this.getScrollbarComponentCfg(),t=this.trackLen?(0,S.pi)((0,S.pi)({},e),{trackLen:this.trackLen,thumbLen:this.thumbLen,thumbOffset:(this.trackLen-this.thumbLen)*this.ratio}):(0,S.pi)({},e);return this.scrollbar.component.update(t),this.scrollbar},t.prototype.getStep=function(){if(this.step)return this.step;var e=this.view.coordinateBBox,t=this.getValidScrollbarCfg(),n=t.type,r=t.categorySize,o="vertical"!==n;return Math.floor((o?e.width:e.height)/r)},t.prototype.getCnt=function(){if(this.cnt)return this.cnt;var e=this.view.getXScale(),t=this.getScrollbarData(),n=(0,E.I)(t,e.field);return(0,E.dp)(n)},t.prototype.getScrollbarComponentCfg=function(){var e=this.view,t=e.coordinateBBox,n=e.viewBBox,r=this.getValidScrollbarCfg(),o=r.type,i=r.padding,a=r.width,l=r.height,s=r.style,c="vertical"!==o,u=(0,S.CR)(i,4),d=u[0],f=u[1],p=u[2],h=u[3],g=c?{x:t.minX+h,y:n.maxY-l-p}:{x:n.maxX-a-f,y:t.minY+d},m=this.getStep(),v=this.getCnt(),y=c?t.width-h-f:t.height-d-p,b=Math.max(y*(0,E.uZ)(m/v,0,1),20);return(0,S.pi)((0,S.pi)({},this.getThemeOptions()),{x:g.x,y:g.y,size:c?l:a,isHorizontal:c,trackLen:y,thumbLen:b,thumbOffset:0,theme:this.getScrollbarTheme(s)})},t.prototype.getValidScrollbarCfg=function(){var e={type:"horizontal",categorySize:32,width:8,height:8,padding:[0,0,0,0],animate:!0,style:{}};return(0,E.Kn)(this.option)&&(e=(0,S.pi)((0,S.pi)({},e),this.option)),(0,E.Kn)(this.option)&&this.option.padding||(e.padding=(e.type,[0,0,0,0])),e},t.prototype.getScrollbarData=function(){var e=this.view.getCoordinate(),t=this.getValidScrollbarCfg(),n=this.view.getOptions().data||[];return e.isReflect("y")&&"vertical"===t.type&&(n=(0,S.ev)([],(0,S.CR)(n),!1).reverse()),n},t}(Nu);const km=Cm;var Om={fill:"#CCD6EC",opacity:.3};var Mm=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.show=function(e){var t=this.context.view,n=this.context.event,r=t.getController("tooltip").getTooltipCfg(),o=function(e,t,n){var r,o,i,a,l,s,c=function(e,t,n){var r,o,i=mu(e,t,n);try{for(var a=(0,S.XA)(e.views),l=a.next();!l.done;l=a.next()){var s=l.value;i=i.concat(mu(s,t,n))}}catch(e){r={error:e}}finally{try{l&&!l.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return i}(e,t,n);if(c.length){c=(0,E.xH)(c);try{for(var u=(0,S.XA)(c),d=u.next();!d.done;d=u.next()){var f=d.value;try{for(var p=(i=void 0,(0,S.XA)(f)),h=p.next();!h.done;h=p.next()){var g=h.value,m=g.mappingData,v=m.x,y=m.y;g.x=(0,E.kJ)(v)?v[v.length-1]:v,g.y=(0,E.kJ)(y)?y[y.length-1]:y}}catch(e){i={error:e}}finally{try{h&&!h.done&&(a=p.return)&&a.call(p)}finally{if(i)throw i.error}}}}catch(e){r={error:e}}finally{try{d&&!d.done&&(o=u.return)&&o.call(u)}finally{if(r)throw r.error}}if(!1===n.shared&&c.length>1){var b=c[0],x=Math.abs(t.y-b[0].y);try{for(var w=(0,S.XA)(c),C=w.next();!C.done;C=w.next()){var k=C.value,O=Math.abs(t.y-k[0].y);O<=x&&(b=k,x=O)}}catch(e){l={error:e}}finally{try{C&&!C.done&&(s=w.return)&&s.call(w)}finally{if(l)throw l.error}}c=[b]}return(0,E.jj)((0,E.xH)(c))}return[]}(t,{x:n.x,y:n.y},r);if(!(0,E.Xy)(o,this.items)&&(this.items=o,o.length)){var i=t.getXScale().field,a=o[0].data[i],l=[],s=t.geometries;if((0,E.S6)(s,(function(e){if("interval"===e.type||"schema"===e.type){var t=e.getElementsBy((function(e){return e.getData()[i]===a}));l=l.concat(t)}})),l.length){var c=t.getCoordinate(),u=l[0].shape.getCanvasBBox(),d=l[0].shape.getCanvasBBox(),f=u;(0,E.S6)(l,(function(e){var t=e.shape.getCanvasBBox();c.isTransposed?(t.minYd.maxY&&(d=t)):(t.minXd.maxX&&(d=t)),f.x=Math.min(t.minX,f.minX),f.y=Math.min(t.minY,f.minY),f.width=Math.max(t.maxX,f.maxX)-f.x,f.height=Math.max(t.maxY,f.maxY)-f.y}));var p=t.backgroundGroup,h=t.coordinateBBox,g=void 0;if(c.isRect){var m=t.getXScale(),v=e||{},y=v.appendRatio,b=v.appendWidth;(0,E.UM)(b)&&(y=(0,E.UM)(y)?m.isLinear?0:.25:y,b=c.isTransposed?y*d.height:y*u.width);var x=void 0,w=void 0,C=void 0,k=void 0;c.isTransposed?(x=h.minX,w=Math.min(d.minY,u.minY)-b,C=h.width,k=f.height+2*b):(x=Math.min(u.minX,d.minX)-b,w=h.minY,C=f.width+2*b,k=h.height),g=[["M",x,w],["L",x+C,w],["L",x+C,w+k],["L",x,w+k],["Z"]]}else{var O=(0,E.YM)(l),M=(0,E.Z$)(l),I=bs(O.getModel(),c).startAngle,$=bs(M.getModel(),c).endAngle,_=c.getCenter(),P=c.getRadius(),A=c.innerRadius*P;g=vs(_.x,_.y,P,I,$,A)}if(this.regionPath)this.regionPath.attr("path",g),this.regionPath.show();else{var N=(0,E.U2)(e,"style",Om);this.regionPath=p.addShape({type:"path",name:"active-region",capture:!1,attrs:(0,S.pi)((0,S.pi)({},N),{path:g})})}}}},t.prototype.hide=function(){this.regionPath&&this.regionPath.hide(),this.items=null},t.prototype.destroy=function(){this.hide(),this.regionPath&&this.regionPath.remove(!0),e.prototype.destroy.call(this)},t}(Xs);const Im=Mm;var $m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.timeStamp=0,t}return(0,S.ZT)(t,e),t.prototype.show=function(){var e=this.context,t=e.event,n=e.view;if(!n.isTooltipLocked()){var r=this.timeStamp,o=+new Date;if(o-r>(0,E.U2)(e.view.getOptions(),"tooltip.showDelay",16)){var i=this.location,a={x:t.x,y:t.y};i&&(0,E.Xy)(i,a)||this.showTooltip(n,a),this.timeStamp=o,this.location=a}}},t.prototype.hide=function(){var e=this.context.view,t=e.getController("tooltip"),n=this.context.event,r=n.clientX,o=n.clientY;t.isCursorEntered({x:r,y:o})||e.isTooltipLocked()||(this.hideTooltip(e),this.location=null)},t.prototype.showTooltip=function(e,t){e.showTooltip(t)},t.prototype.hideTooltip=function(e){e.hideTooltip()},t}(Xs);const _m=$m;var Pm=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.showTooltip=function(e,t){var n=Ic(e);(0,E.S6)(n,(function(n){var r=$c(e,n,t);n.showTooltip(r)}))},t.prototype.hideTooltip=function(e){var t=Ic(e);(0,E.S6)(t,(function(e){e.hideTooltip()}))},t}(_m);const Am=Pm;var Nm=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.timeStamp=0,t}return(0,S.ZT)(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this),this.tooltip&&this.tooltip.destroy()},t.prototype.show=function(){var e=this.context.event,t=this.timeStamp,n=+new Date;if(n-t>16){var r=this.location,o={x:e.x,y:e.y};r&&(0,E.Xy)(r,o)||this.showTooltip(o),this.timeStamp=n,this.location=o}},t.prototype.hide=function(){this.hideTooltip(),this.location=null},t.prototype.showTooltip=function(e){var t=this.context,n=t.event.target;if(n&&n.get("tip")){if(this.tooltip){var r=t.view.canvas,o={start:{x:0,y:0},end:{x:r.get("width"),y:r.get("height")}};this.tooltip.set("region",o)}else this.renderTooltip();var i=n.get("tip");this.tooltip.update((0,S.pi)({title:i},e)),this.tooltip.show()}},t.prototype.hideTooltip=function(){this.tooltip&&this.tooltip.hide()},t.prototype.renderTooltip=function(){var e,t=this.context.view,n=t.canvas,r={start:{x:0,y:0},end:{x:n.get("width"),y:n.get("height")}},o=t.getTheme(),i=(0,E.U2)(o,["components","tooltip","domStyles"],{}),a=new ps({parent:n.get("el").parentNode,region:r,visible:!1,crosshairs:null,domStyles:(0,S.pi)({},(0,E.b$)({},i,(e={},e[Tl]={"max-width":"50%"},e[Rl]={"word-break":"break-all"},e)))});a.init(),a.setCapture(!1),this.tooltip=a},t}(Xs);const Tm=Nm;var Rm=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.stateName="",t}return(0,S.ZT)(t,e),t.prototype.hasState=function(e){return e.hasState(this.stateName)},t.prototype.setElementState=function(e,t){e.setState(this.stateName,t)},t.prototype.setState=function(){this.setStateEnable(!0)},t.prototype.clear=function(){var e=this.context.view;this.clearViewState(e)},t.prototype.clearViewState=function(e){var t=this,n=xc(e,this.stateName);(0,E.S6)(n,(function(e){t.setElementState(e,!1)}))},t}(Xs);const Lm=Rm;function Dm(e){return(0,E.U2)(e.get("delegateObject"),"item")}var jm=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.ignoreListItemStates=["unchecked"],t}return(0,S.ZT)(t,e),t.prototype.isItemIgnore=function(e,t){var n=this.ignoreListItemStates.filter((function(n){return t.hasState(e,n)}));return!!n.length},t.prototype.setStateByComponent=function(e,t,n){var r=this.context.view,o=e.get("field"),i=bc(r);this.setElementsStateByItem(i,o,t,n)},t.prototype.setStateByElement=function(e,t){this.setElementState(e,t)},t.prototype.isMathItem=function(e,t,n){var r=Pc(this.context.view,t),o=wc(e,t);return!(0,E.UM)(o)&&n.name===r.getText(o)},t.prototype.setElementsStateByItem=function(e,t,n,r){var o=this;(0,E.S6)(e,(function(e){o.isMathItem(e,t,n)&&e.setState(o.stateName,r)}))},t.prototype.setStateEnable=function(e){var t=cc(this.context);if(t)dc(this.context)&&this.setStateByElement(t,e);else{var n=uc(this.context);if(fc(n)){var r=n.item,o=n.component;if(r&&o&&!this.isItemIgnore(r,o)){var i=this.context.event.gEvent;if(i&&i.fromShape&&i.toShape&&Dm(i.fromShape)===Dm(i.toShape))return;this.setStateByComponent(o,r,e)}}}},t.prototype.toggle=function(){var e=cc(this.context);if(e){var t=e.hasState(this.stateName);this.setElementState(e,!t)}},t.prototype.reset=function(){this.setStateEnable(!1)},t}(Lm);const Fm=jm,Bm=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.stateName="active",t}return(0,S.ZT)(t,e),t.prototype.active=function(){this.setState()},t}(Fm);var zm=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.cache={},t}return(0,S.ZT)(t,e),t.prototype.getColorScale=function(e,t){var n=t.geometry.getAttribute("color");return n?e.getScaleByField(n.getFields()[0]):null},t.prototype.getLinkPath=function(e,t){var n=this.context.view.getCoordinate().isTransposed,r=e.shape.getCanvasBBox(),o=t.shape.getCanvasBBox();return n?[["M",r.minX,r.minY],["L",o.minX,o.maxY],["L",o.maxX,o.maxY],["L",r.maxX,r.minY],["Z"]]:[["M",r.maxX,r.minY],["L",o.minX,o.minY],["L",o.minX,o.maxY],["L",r.maxX,r.maxY],["Z"]]},t.prototype.addLinkShape=function(e,t,n,r){var o={opacity:.4,fill:t.shape.attr("fill")};e.addShape({type:"path",attrs:(0,S.pi)((0,S.pi)({},(0,E.b$)({},o,(0,E.mf)(r)?r(o,t):r)),{path:this.getLinkPath(t,n)})})},t.prototype.linkByElement=function(e,t){var n=this,r=this.context.view,o=this.getColorScale(r,e);if(o){var i=wc(e,o.field);if(!this.cache[i]){var a=function(e,t,n){return bc(e).filter((function(e){return wc(e,t)===n}))}(r,o.field,i),l=this.linkGroup.addGroup();this.cache[i]=l;var s=a.length;(0,E.S6)(a,(function(e,r){if(r=0}),t)},t}(Wm);const sv=lv,cv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.stateName="active",t}return(0,S.ZT)(t,e),t.prototype.highlight=function(){this.setState()},t.prototype.setElementState=function(e,t){Zm(bc(this.context.view),(function(t){return e===t}),t)},t.prototype.clear=function(){Km(this.context.view)},t}(Xm),uv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.stateName="selected",t}return(0,S.ZT)(t,e),t.prototype.selected=function(){this.setState()},t}(Wm),dv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.stateName="selected",t}return(0,S.ZT)(t,e),t.prototype.selected=function(){this.setState()},t}(Fm),fv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.stateName="selected",t}return(0,S.ZT)(t,e),t.prototype.selected=function(){this.setState()},t}(Xm);var pv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.stateName="",t.ignoreItemStates=[],t}return(0,S.ZT)(t,e),t.prototype.getTriggerListInfo=function(){var e=uc(this.context),t=null;return fc(e)&&(t={item:e.item,list:e.component}),t},t.prototype.getAllowComponents=function(){var e=this,t=kc(this.context.view),n=[];return(0,E.S6)(t,(function(t){t.isList()&&e.allowSetStateByElement(t)&&n.push(t)})),n},t.prototype.hasState=function(e,t){return e.hasState(t,this.stateName)},t.prototype.clearAllComponentsState=function(){var e=this,t=this.getAllowComponents();(0,E.S6)(t,(function(t){t.clearItemsState(e.stateName)}))},t.prototype.allowSetStateByElement=function(e){var t=e.get("field");if(!t)return!1;if(this.cfg&&this.cfg.componentNames){var n=e.get("name");if(-1===this.cfg.componentNames.indexOf(n))return!1}var r=Pc(this.context.view,t);return r&&r.isCategory},t.prototype.allowSetStateByItem=function(e,t){var n=this.ignoreItemStates;if(n.length){var r=n.filter((function(n){return t.hasState(e,n)}));return 0===r.length}return!0},t.prototype.setStateByElement=function(e,t,n){var r=e.get("field"),o=Pc(this.context.view,r),i=wc(t,r),a=o.getText(i);this.setItemsState(e,a,n)},t.prototype.setStateEnable=function(e){var t=this,n=cc(this.context);if(n){var r=this.getAllowComponents();(0,E.S6)(r,(function(r){t.setStateByElement(r,n,e)}))}else{var o=uc(this.context);if(fc(o)){var i=o.item,a=o.component;this.allowSetStateByElement(a)&&this.allowSetStateByItem(i,a)&&this.setItemState(a,i,e)}}},t.prototype.setItemsState=function(e,t,n){var r=this,o=e.getItems();(0,E.S6)(o,(function(o){o.name===t&&r.setItemState(e,o,n)}))},t.prototype.setItemState=function(e,t,n){e.setItemState(t,this.stateName,n)},t.prototype.setState=function(){this.setStateEnable(!0)},t.prototype.reset=function(){this.setStateEnable(!1)},t.prototype.toggle=function(){var e=this.getTriggerListInfo();if(e&&e.item){var t=e.list,n=e.item,r=this.hasState(t,n);this.setItemState(t,n,!r)}},t.prototype.clear=function(){var e=this.getTriggerListInfo();e?e.list.clearItemsState(this.stateName):this.clearAllComponentsState()},t}(Xs);const hv=pv,gv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.stateName="active",t}return(0,S.ZT)(t,e),t.prototype.active=function(){this.setState()},t}(hv);var mv="inactive",vv="active",yv="inactive",bv="active",xv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.stateName=bv,t.ignoreItemStates=["unchecked"],t}return(0,S.ZT)(t,e),t.prototype.setItemsState=function(e,t,n){this.setHighlightBy(e,(function(e){return e.name===t}),n)},t.prototype.setItemState=function(e,t,n){e.getItems(),this.setHighlightBy(e,(function(e){return e===t}),n)},t.prototype.setHighlightBy=function(e,t,n){var r=e.getItems();if(n)(0,E.S6)(r,(function(n){t(n)?(e.hasState(n,yv)&&e.setItemState(n,yv,!1),e.setItemState(n,bv,!0)):e.hasState(n,bv)||e.setItemState(n,yv,!0)}));else{var o=e.getItemsByState(bv),i=!0;(0,E.S6)(o,(function(e){if(!t(e))return i=!1,!1})),i?this.clear():(0,E.S6)(r,(function(n){t(n)&&(e.hasState(n,bv)&&e.setItemState(n,bv,!1),e.setItemState(n,yv,!0))}))}},t.prototype.highlight=function(){this.setState()},t.prototype.clear=function(){var e=this.getTriggerListInfo();if(e)!function(e){var t=e.getItems();(0,E.S6)(t,(function(t){e.hasState(t,vv)&&e.setItemState(t,vv,!1),e.hasState(t,mv)&&e.setItemState(t,mv,!1)}))}(e.list);else{var t=this.getAllowComponents();(0,E.S6)(t,(function(e){e.clearItemsState(bv),e.clearItemsState(yv)}))}},t}(hv);const wv=xv,Sv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.stateName="selected",t}return(0,S.ZT)(t,e),t.prototype.selected=function(){this.setState()},t}(hv),Ev=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.stateName="unchecked",t}return(0,S.ZT)(t,e),t.prototype.unchecked=function(){this.setState()},t}(hv);var Cv="unchecked",kv="checked",Ov=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.stateName=kv,t}return(0,S.ZT)(t,e),t.prototype.setItemState=function(e,t,n){this.setCheckedBy(e,(function(e){return e===t}),n)},t.prototype.setCheckedBy=function(e,t,n){var r=e.getItems();n&&(0,E.S6)(r,(function(n){t(n)?(e.hasState(n,Cv)&&e.setItemState(n,Cv,!1),e.setItemState(n,kv,!0)):e.hasState(n,kv)||e.setItemState(n,Cv,!0)}))},t.prototype.toggle=function(){var e=this.getTriggerListInfo();if(e&&e.item){var t=e.list,n=e.item;!(0,E.G)(t.getItems(),(function(e){return t.hasState(e,Cv)}))||t.hasState(n,Cv)?this.setItemState(t,n,!0):this.reset()}},t.prototype.checked=function(){this.setState()},t.prototype.reset=function(){var e=this.getAllowComponents();(0,E.S6)(e,(function(e){e.clearItemsState(kv),e.clearItemsState(Cv)}))},t}(hv);const Mv=Ov;var Iv="unchecked",$v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.toggle=function(){var e,t,n,r,o,i,a,l,s=this.getTriggerListInfo();if(null==s?void 0:s.item){var c=s.list,u=s.item,d=c.getItems(),f=d.filter((function(e){return!c.hasState(e,Iv)})),p=d.filter((function(e){return c.hasState(e,Iv)})),h=f[0];if(d.length===f.length)try{for(var g=(0,S.XA)(d),m=g.next();!m.done;m=g.next()){var v=m.value;c.setItemState(v,Iv,v.id!==u.id)}}catch(t){e={error:t}}finally{try{m&&!m.done&&(t=g.return)&&t.call(g)}finally{if(e)throw e.error}}else if(d.length-p.length==1)if(h.id===u.id)try{for(var y=(0,S.XA)(d),b=y.next();!b.done;b=y.next())v=b.value,c.setItemState(v,Iv,!1)}catch(e){n={error:e}}finally{try{b&&!b.done&&(r=y.return)&&r.call(y)}finally{if(n)throw n.error}}else try{for(var x=(0,S.XA)(d),w=x.next();!w.done;w=x.next())v=w.value,c.setItemState(v,Iv,v.id!==u.id)}catch(e){o={error:e}}finally{try{w&&!w.done&&(i=x.return)&&i.call(x)}finally{if(o)throw o.error}}else try{for(var E=(0,S.XA)(d),C=E.next();!C.done;C=E.next())v=C.value,c.setItemState(v,Iv,v.id!==u.id)}catch(e){a={error:e}}finally{try{C&&!C.done&&(l=E.return)&&l.call(E)}finally{if(a)throw a.error}}}},t}(hv);const _v=$v;var Pv="showRadio",Av="legend-radio-tip",Nv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.timeStamp=0,t}return(0,S.ZT)(t,e),t.prototype.show=function(){var e=this.getTriggerListInfo();if(null==e?void 0:e.item){var t=e.list,n=e.item;t.setItemState(n,Pv,!0)}},t.prototype.hide=function(){var e=this.getTriggerListInfo();if(null==e?void 0:e.item){var t=e.list,n=e.item;t.setItemState(n,Pv,!1)}},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.tooltip&&this.tooltip.destroy()},t.prototype.showTip=function(){var e=this.context.event,t=this.timeStamp,n=+new Date,r=this.context.event.target;if(n-t>16&&"legend-item-radio"===r.get("name")){var o=this.location,i={x:e.x,y:e.y};this.timeStamp=n,this.location=i,o&&(0,E.Xy)(o,i)||this.showTooltip(i)}},t.prototype.hideTip=function(){this.hideTooltip(),this.location=null},t.prototype.showTooltip=function(e){var t=this.context,n=t.event.target;if(n&&n.get("tip")){this.tooltip||this.renderTooltip();var r=t.view.getCanvas().get("el").getBoundingClientRect(),o=r.x,i=r.y;this.tooltip.update((0,S.pi)((0,S.pi)({title:n.get("tip")},e),{x:e.x+o,y:e.y+i})),this.tooltip.show()}},t.prototype.hideTooltip=function(){this.tooltip&&this.tooltip.hide()},t.prototype.renderTooltip=function(){var e,t=((e={})[Tl]={padding:"6px 8px",transform:"translate(-50%, -80%)",background:"rgba(0,0,0,0.75)",color:"#fff","border-radius":"2px","z-index":100},e[Rl]={"font-size":"12px","line-height":"14px","margin-bottom":0,"word-break":"break-all"},e);document.getElementById(Av)&&document.body.removeChild(document.getElementById(Av));var n=new ps({parent:document.body,region:null,visible:!1,crosshairs:null,domStyles:t,containerId:Av});n.init(),n.setCapture(!1),this.tooltip=n},t}(hv);const Tv=Nv;var Rv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.maskShape=null,t.points=[],t.starting=!1,t.moving=!1,t.preMovePoint=null,t.shapeType="path",t}return(0,S.ZT)(t,e),t.prototype.getCurrentPoint=function(){var e=this.context.event;return{x:e.x,y:e.y}},t.prototype.emitEvent=function(e){var t="mask:".concat(e),n=this.context.view,r=this.context.event;n.emit(t,{target:this.maskShape,shape:this.maskShape,points:this.points,x:r.x,y:r.y})},t.prototype.createMask=function(){var e=this.context.view,t=this.getMaskAttrs();return e.foregroundGroup.addShape({type:this.shapeType,name:"mask",draggable:!0,attrs:(0,S.pi)({fill:"#C5D4EB",opacity:.3},t)})},t.prototype.getMaskPath=function(){return[]},t.prototype.show=function(){this.maskShape&&(this.maskShape.show(),this.emitEvent("show"))},t.prototype.start=function(e){this.starting=!0,this.moving=!1,this.points=[this.getCurrentPoint()],this.maskShape||(this.maskShape=this.createMask(),this.maskShape.set("capture",!1)),this.updateMask(null==e?void 0:e.maskStyle),this.emitEvent("start")},t.prototype.moveStart=function(){this.moving=!0,this.preMovePoint=this.getCurrentPoint()},t.prototype.move=function(){if(this.moving&&this.maskShape){var e=this.getCurrentPoint(),t=this.preMovePoint,n=e.x-t.x,r=e.y-t.y,o=this.points;(0,E.S6)(o,(function(e){e.x+=n,e.y+=r})),this.updateMask(),this.emitEvent("change"),this.preMovePoint=e}},t.prototype.updateMask=function(e){var t=(0,E.b$)({},this.getMaskAttrs(),e);this.maskShape.attr(t)},t.prototype.moveEnd=function(){this.moving=!1,this.preMovePoint=null},t.prototype.end=function(){this.starting=!1,this.emitEvent("end"),this.maskShape&&this.maskShape.set("capture",!0)},t.prototype.hide=function(){this.maskShape&&(this.maskShape.hide(),this.emitEvent("hide"))},t.prototype.resize=function(){this.starting&&this.maskShape&&(this.points.push(this.getCurrentPoint()),this.updateMask(),this.emitEvent("change"))},t.prototype.destroy=function(){this.points=[],this.maskShape&&this.maskShape.remove(),this.maskShape=null,this.preMovePoint=null,e.prototype.destroy.call(this)},t}(Xs);const Lv=Rv;function Dv(e){var t=(0,E.Z$)(e),n=0,r=0,o=0;if(e.length){var i=e[0];n=Oc(i,t)/2,r=(t.x+i.x)/2,o=(t.y+i.y)/2}return{x:r,y:o,r:n}}const jv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.shapeType="circle",t}return(0,S.ZT)(t,e),t.prototype.getMaskAttrs=function(){return Dv(this.points)},t}(Lv);function Fv(e){return{start:(0,E.YM)(e),end:(0,E.Z$)(e)}}function Bv(e,t){return{x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),width:Math.abs(t.x-e.x),height:Math.abs(t.y-e.y)}}var zv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.shapeType="rect",t}return(0,S.ZT)(t,e),t.prototype.getRegion=function(){return Fv(this.points)},t.prototype.getMaskAttrs=function(){var e=this.getRegion();return Bv(e.start,e.end)},t}(Lv);const Hv=zv;function Uv(e){e.x=(0,E.uZ)(e.x,0,1),e.y=(0,E.uZ)(e.y,0,1)}function Wv(e,t,n,r){var o=null,i=null,a=r.invert((0,E.YM)(e)),l=r.invert((0,E.Z$)(e));return n&&(Uv(a),Uv(l)),"x"===t?(o=r.convert({x:a.x,y:0}),i=r.convert({x:l.x,y:1})):(o=r.convert({x:0,y:a.y}),i=r.convert({x:1,y:l.y})),{start:o,end:i}}var Vv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.dim="x",t.inPlot=!0,t}return(0,S.ZT)(t,e),t.prototype.getRegion=function(){var e=this.context.view.getCoordinate();return Wv(this.points,this.dim,this.inPlot,e)},t}(Hv);const Xv=Vv;function qv(e){var t=[];return e.length&&((0,E.S6)(e,(function(e,n){0===n?t.push(["M",e.x,e.y]):t.push(["L",e.x,e.y])})),t.push(["L",e[0].x,e[0].y])),t}function Gv(e){return{path:qv(e)}}const Yv=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.getMaskPath=function(){return qv(this.points)},t.prototype.getMaskAttrs=function(){return Gv(this.points)},t.prototype.addPoint=function(){this.resize()},t}(Lv);function Kv(e){return function(e,t){if(e.length<=2)return nc(e,!1);var n=e[0],r=[];(0,E.S6)(e,(function(e){r.push(e.x),r.push(e.y)}));var o=tc(r,!0,null);return o.unshift(["M",n.x,n.y]),o}(e)}function Zv(e){return{path:Kv(e)}}const Jv=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.getMaskPath=function(){return Kv(this.points)},t.prototype.getMaskAttrs=function(){return Zv(this.points)},t}(Yv);var Qv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.maskShapes=[],t.starting=!1,t.moving=!1,t.recordPoints=null,t.preMovePoint=null,t.shapeType="path",t.maskType="multi-mask",t}return(0,S.ZT)(t,e),t.prototype.getCurrentPoint=function(){var e=this.context.event;return{x:e.x,y:e.y}},t.prototype.emitEvent=function(e){var t="".concat(this.maskType,":").concat(e),n=this.context.view,r=this.context.event,o={type:this.shapeType,name:this.maskType,get:function(e){return o.hasOwnProperty(e)?o[e]:void 0}};n.emit(t,{target:o,maskShapes:this.maskShapes,multiPoints:this.recordPoints,x:r.x,y:r.y})},t.prototype.createMask=function(e){var t=this.context.view,n=this.recordPoints[e],r=this.getMaskAttrs(n),o=t.foregroundGroup.addShape({type:this.shapeType,name:"mask",draggable:!0,attrs:(0,S.pi)({fill:"#C5D4EB",opacity:.3},r)});this.maskShapes.push(o)},t.prototype.getMaskPath=function(e){return[]},t.prototype.show=function(){this.maskShapes.length>0&&(this.maskShapes.forEach((function(e){return e.show()})),this.emitEvent("show"))},t.prototype.start=function(e){this.recordPointStart(),this.starting=!0,this.moving=!1;var t=this.recordPoints.length-1;this.createMask(t),this.updateShapesCapture(!1),this.updateMask(null==e?void 0:e.maskStyle),this.emitEvent("start")},t.prototype.moveStart=function(){this.moving=!0,this.preMovePoint=this.getCurrentPoint(),this.updateShapesCapture(!1)},t.prototype.move=function(){if(this.moving&&0!==this.maskShapes.length){var e=this.getCurrentPoint(),t=this.preMovePoint,n=e.x-t.x,r=e.y-t.y,o=this.getCurMaskShapeIndex();o>-1&&(this.recordPoints[o].forEach((function(e){e.x+=n,e.y+=r})),this.updateMask(),this.emitEvent("change"),this.preMovePoint=e)}},t.prototype.updateMask=function(e){var t=this;this.recordPoints.forEach((function(n,r){var o=(0,E.b$)({},t.getMaskAttrs(n),e);t.maskShapes[r].attr(o)}))},t.prototype.resize=function(){this.starting&&this.maskShapes.length>0&&(this.recordPointContinue(),this.updateMask(),this.emitEvent("change"))},t.prototype.moveEnd=function(){this.moving=!1,this.preMovePoint=null,this.updateShapesCapture(!0)},t.prototype.end=function(){this.starting=!1,this.emitEvent("end"),this.updateShapesCapture(!0)},t.prototype.hide=function(){this.maskShapes.length>0&&(this.maskShapes.forEach((function(e){return e.hide()})),this.emitEvent("hide"))},t.prototype.remove=function(){var e=this.getCurMaskShapeIndex();e>-1&&(this.recordPoints.splice(e,1),this.maskShapes[e].remove(),this.maskShapes.splice(e,1),this.preMovePoint=null,this.updateShapesCapture(!0),this.emitEvent("change"))},t.prototype.clearAll=function(){this.recordPointClear(),this.maskShapes.forEach((function(e){return e.remove()})),this.maskShapes=[],this.preMovePoint=null},t.prototype.clear=function(){var e=this.getCurMaskShapeIndex();-1===e?(this.recordPointClear(),this.maskShapes.forEach((function(e){return e.remove()})),this.maskShapes=[],this.emitEvent("clearAll")):(this.recordPoints.splice(e,1),this.maskShapes[e].remove(),this.maskShapes.splice(e,1),this.preMovePoint=null,this.emitEvent("clearSingle")),this.preMovePoint=null},t.prototype.destroy=function(){this.clear(),e.prototype.destroy.call(this)},t.prototype.getRecordPoints=function(){var e;return(0,S.ev)([],(0,S.CR)(null!==(e=this.recordPoints)&&void 0!==e?e:[]),!1)},t.prototype.recordPointStart=function(){var e=this.getRecordPoints(),t=this.getCurrentPoint();this.recordPoints=(0,S.ev)((0,S.ev)([],(0,S.CR)(e),!1),[[t]],!1)},t.prototype.recordPointContinue=function(){var e=this.getRecordPoints(),t=this.getCurrentPoint(),n=e.splice(-1,1)[0]||[];n.push(t),this.recordPoints=(0,S.ev)((0,S.ev)([],(0,S.CR)(e),!1),[n],!1)},t.prototype.recordPointClear=function(){this.recordPoints=[]},t.prototype.updateShapesCapture=function(e){this.maskShapes.forEach((function(t){return t.set("capture",e)}))},t.prototype.getCurMaskShapeIndex=function(){var e=this.getCurrentPoint();return this.maskShapes.findIndex((function(t){var n=t.attrs,r=n.width,o=n.height,i=n.r;return!(0===r||0===o||0===i)&&t.isHit(e.x,e.y)}))},t}(Xs);const ey=Qv;var ty=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.shapeType="rect",t}return(0,S.ZT)(t,e),t.prototype.getRegion=function(e){return Fv(e)},t.prototype.getMaskAttrs=function(e){var t=this.getRegion(e);return Bv(t.start,t.end)},t}(ey);const ny=ty;var ry=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.dim="x",t.inPlot=!0,t}return(0,S.ZT)(t,e),t.prototype.getRegion=function(e){var t=this.context.view.getCoordinate();return Wv(e,this.dim,this.inPlot,t)},t}(ny);const oy=ry,iy=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.shapeType="circle",t.getMaskAttrs=Dv,t}return(0,S.ZT)(t,e),t}(ey),ay=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.getMaskPath=qv,t.getMaskAttrs=Gv,t}return(0,S.ZT)(t,e),t.prototype.addPoint=function(){this.resize()},t}(ey),ly=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.getMaskPath=Kv,t.getMaskAttrs=Zv,t}return(0,S.ZT)(t,e),t}(ay);var sy=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.setCursor=function(e){this.context.view.getCanvas().setCursor(e)},t.prototype.default=function(){this.setCursor("default")},t.prototype.pointer=function(){this.setCursor("pointer")},t.prototype.move=function(){this.setCursor("move")},t.prototype.crosshair=function(){this.setCursor("crosshair")},t.prototype.wait=function(){this.setCursor("wait")},t.prototype.help=function(){this.setCursor("help")},t.prototype.text=function(){this.setCursor("text")},t.prototype.eResize=function(){this.setCursor("e-resize")},t.prototype.wResize=function(){this.setCursor("w-resize")},t.prototype.nResize=function(){this.setCursor("n-resize")},t.prototype.sResize=function(){this.setCursor("s-resize")},t.prototype.neResize=function(){this.setCursor("ne-resize")},t.prototype.nwResize=function(){this.setCursor("nw-resize")},t.prototype.seResize=function(){this.setCursor("se-resize")},t.prototype.swResize=function(){this.setCursor("sw-resize")},t.prototype.nsResize=function(){this.setCursor("ns-resize")},t.prototype.ewResize=function(){this.setCursor("ew-resize")},t.prototype.zoomIn=function(){this.setCursor("zoom-in")},t.prototype.zoomOut=function(){this.setCursor("zoom-out")},t}(Xs);const cy=sy;var uy=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.filterView=function(e,t,n){var r=this;e.getScaleByField(t)&&e.filter(t,n),e.views&&e.views.length&&(0,E.S6)(e.views,(function(e){r.filterView(e,t,n)}))},t.prototype.filter=function(){var e=uc(this.context);if(e){var t=this.context.view,n=e.component,r=n.get("field");if(fc(e)){if(r){var o=n.getItemsByState("unchecked"),i=Pc(t,r),a=o.map((function(e){return e.name}));a.length?this.filterView(t,r,(function(e){var t=i.getText(e);return!a.includes(t)})):this.filterView(t,r,null),t.render(!0)}}else if(pc(e)){var l=n.getValue(),s=(0,S.CR)(l,2),c=s[0],u=s[1];this.filterView(t,r,(function(e){return e>=c&&e<=u})),t.render(!0)}}},t}(Xs);const dy=uy;function fy(e,t,n,r){var o=Math.min(n[t],r[t]),i=Math.max(n[t],r[t]),a=(0,S.CR)(e.range,2),l=a[0],s=a[1];if(os&&(i=s),o===s&&i===s)return null;var c=e.invert(o),u=e.invert(i);if(e.isCategory){var d=e.values.indexOf(c),f=e.values.indexOf(u),p=e.values.slice(d,f+1);return function(e){return p.includes(e)}}return function(e){return e>=c&&e<=u}}var py;!function(e){e.FILTER="brush-filter-processing",e.RESET="brush-filter-reset",e.BEFORE_FILTER="brush-filter:beforefilter",e.AFTER_FILTER="brush-filter:afterfilter",e.BEFORE_RESET="brush-filter:beforereset",e.AFTER_RESET="brush-filter:afterreset"}(py||(py={}));var hy=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.dims=["x","y"],t.startPoint=null,t.isStarted=!1,t}return(0,S.ZT)(t,e),t.prototype.hasDim=function(e){return this.dims.includes(e)},t.prototype.start=function(){var e=this.context;this.isStarted=!0,this.startPoint=e.getCurrentPoint()},t.prototype.filter=function(){var e,t;if(hc(this.context)){var n=this.context.event.target.getCanvasBBox();e={x:n.x,y:n.y},t={x:n.maxX,y:n.maxY}}else{if(!this.isStarted)return;e=this.startPoint,t=this.context.getCurrentPoint()}if(!(Math.abs(e.x-t.x)<5||Math.abs(e.x-t.y)<5)){var r=this.context,o=r.view,i={view:o,event:r.event,dims:this.dims};o.emit(py.BEFORE_FILTER,Eu.fromData(o,py.BEFORE_FILTER,i));var a=o.getCoordinate(),l=a.invert(t),s=a.invert(e);if(this.hasDim("x")){var c=o.getXScale(),u=fy(c,"x",l,s);this.filterView(o,c.field,u)}if(this.hasDim("y")){var d=o.getYScales()[0];u=fy(d,"y",l,s),this.filterView(o,d.field,u)}this.reRender(o,{source:py.FILTER}),o.emit(py.AFTER_FILTER,Eu.fromData(o,py.AFTER_FILTER,i))}},t.prototype.end=function(){this.isStarted=!1},t.prototype.reset=function(){var e=this.context.view;if(e.emit(py.BEFORE_RESET,Eu.fromData(e,py.BEFORE_RESET,{})),this.isStarted=!1,this.hasDim("x")){var t=e.getXScale();this.filterView(e,t.field,null)}if(this.hasDim("y")){var n=e.getYScales()[0];this.filterView(e,n.field,null)}this.reRender(e,{source:py.RESET}),e.emit(py.AFTER_RESET,Eu.fromData(e,py.AFTER_RESET,{}))},t.prototype.filterView=function(e,t,n){e.filter(t,n)},t.prototype.reRender=function(e,t){e.render(!0,t)},t}(Xs);const gy=hy;var my=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.filterView=function(e,t,n){var r=Ic(e);(0,E.S6)(r,(function(e){e.filter(t,n)}))},t.prototype.reRender=function(e){var t=Ic(e);(0,E.S6)(t,(function(e){e.render(!0)}))},t}(gy);const vy=my;var yy=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.filter=function(){var e=uc(this.context),t=this.context.view,n=bc(t);if(hc(this.context)){var r=mc(this.context,10);r&&(0,E.S6)(n,(function(e){r.includes(e)?e.show():e.hide()}))}else if(e){var o=e.component,i=o.get("field");if(fc(e)){if(i){var a=o.getItemsByState("unchecked"),l=Pc(t,i),s=a.map((function(e){return e.name}));(0,E.S6)(n,(function(e){var t=wc(e,i),n=l.getText(t);s.indexOf(n)>=0?e.hide():e.show()}))}}else if(pc(e)){var c=o.getValue(),u=(0,S.CR)(c,2),d=u[0],f=u[1];(0,E.S6)(n,(function(e){var t=wc(e,i);t>=d&&t<=f?e.show():e.hide()}))}}},t.prototype.clear=function(){var e=bc(this.context.view);(0,E.S6)(e,(function(e){e.show()}))},t.prototype.reset=function(){this.clear()},t}(Xs);const by=yy;var xy=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.byRecord=!1,t}return(0,S.ZT)(t,e),t.prototype.filter=function(){hc(this.context)&&(this.byRecord?this.filterByRecord():this.filterByBBox())},t.prototype.filterByRecord=function(){var e=this.context.view,t=mc(this.context,10);if(t){var n=e.getXScale().field,r=e.getYScales()[0].field,o=t.map((function(e){return e.getModel().data})),i=Ic(e);(0,E.S6)(i,(function(e){var t=bc(e);(0,E.S6)(t,(function(e){var t=e.getModel().data;_c(o,t,n,r)?e.show():e.hide()}))}))}},t.prototype.filterByBBox=function(){var e=this,t=Ic(this.context.view);(0,E.S6)(t,(function(t){var n=vc(e.context,t,10),r=bc(t);n&&(0,E.S6)(r,(function(e){n.includes(e)?e.show():e.hide()}))}))},t.prototype.reset=function(){var e=Ic(this.context.view);(0,E.S6)(e,(function(e){var t=bc(e);(0,E.S6)(t,(function(e){e.show()}))}))},t}(Xs);const wy=xy;var Sy=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buttonGroup=null,t.buttonCfg={name:"button",text:"button",textStyle:{x:0,y:0,fontSize:12,fill:"#333333",cursor:"pointer"},padding:[8,10],style:{fill:"#f7f7f7",stroke:"#cccccc",cursor:"pointer"},activeStyle:{fill:"#e6e6e6"}},t}return(0,S.ZT)(t,e),t.prototype.getButtonCfg=function(){return(0,E.b$)(this.buttonCfg,this.cfg)},t.prototype.drawButton=function(){var e=this.getButtonCfg(),t=this.context.view.foregroundGroup.addGroup({name:e.name}),n=t.addShape({type:"text",name:"button-text",attrs:(0,S.pi)({text:e.text},e.textStyle)}).getBBox(),r=vu(e.padding),o=t.addShape({type:"rect",name:"button-rect",attrs:(0,S.pi)({x:n.x-r[3],y:n.y-r[0],width:n.width+r[1]+r[3],height:n.height+r[0]+r[2]},e.style)});o.toBack(),t.on("mouseenter",(function(){o.attr(e.activeStyle)})),t.on("mouseleave",(function(){o.attr(e.style)})),this.buttonGroup=t},t.prototype.resetPosition=function(){var e=this.context.view.getCoordinate().convert({x:1,y:1}),t=this.buttonGroup,n=t.getBBox(),r=se.vs(null,[["t",e.x-n.width-10,e.y+n.height+5]]);t.setMatrix(r)},t.prototype.show=function(){this.buttonGroup||this.drawButton(),this.resetPosition(),this.buttonGroup.show()},t.prototype.hide=function(){this.buttonGroup&&this.buttonGroup.hide()},t.prototype.destroy=function(){var t=this.buttonGroup;t&&t.remove(),e.prototype.destroy.call(this)},t}(Xs);const Ey=Sy;var Cy=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.starting=!1,t.dragStart=!1,t}return(0,S.ZT)(t,e),t.prototype.start=function(){this.starting=!0,this.startPoint=this.context.getCurrentPoint()},t.prototype.drag=function(){if(this.startPoint){var e=this.context.getCurrentPoint(),t=this.context.view,n=this.context.event;this.dragStart?t.emit("drag",{target:n.target,x:n.x,y:n.y}):Oc(e,this.startPoint)>4&&(t.emit("dragstart",{target:n.target,x:n.x,y:n.y}),this.dragStart=!0)}},t.prototype.end=function(){if(this.dragStart){var e=this.context.view,t=this.context.event;e.emit("dragend",{target:t.target,x:t.x,y:t.y})}this.starting=!1,this.dragStart=!1},t}(Xs);const ky=Cy;var Oy=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.starting=!1,t.isMoving=!1,t.startPoint=null,t.startMatrix=null,t}return(0,S.ZT)(t,e),t.prototype.start=function(){this.starting=!0,this.startPoint=this.context.getCurrentPoint(),this.startMatrix=this.context.view.middleGroup.getMatrix()},t.prototype.move=function(){if(this.starting){var e=this.startPoint,t=this.context.getCurrentPoint();if(Oc(e,t)>5&&!this.isMoving&&(this.isMoving=!0),this.isMoving){var n=this.context.view,r=se.vs(this.startMatrix,[["t",t.x-e.x,t.y-e.y]]);n.backgroundGroup.setMatrix(r),n.foregroundGroup.setMatrix(r),n.middleGroup.setMatrix(r)}}},t.prototype.end=function(){this.isMoving&&(this.isMoving=!1),this.startMatrix=null,this.starting=!1,this.startPoint=null},t.prototype.reset=function(){this.starting=!1,this.startPoint=null,this.isMoving=!1;var e=this.context.view;e.backgroundGroup.resetMatrix(),e.foregroundGroup.resetMatrix(),e.middleGroup.resetMatrix(),this.isMoving=!1},t}(Xs);const My=Oy;var Iy=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.dims=["x","y"],t.cfgFields=["dims"],t.cacheScaleDefs={},t}return(0,S.ZT)(t,e),t.prototype.hasDim=function(e){return this.dims.includes(e)},t.prototype.getScale=function(e){var t=this.context.view;return"x"===e?t.getXScale():t.getYScales()[0]},t.prototype.resetDim=function(e){var t=this.context.view;if(this.hasDim(e)&&this.cacheScaleDefs[e]){var n=this.getScale(e);t.scale(n.field,this.cacheScaleDefs[e]),this.cacheScaleDefs[e]=null}},t.prototype.reset=function(){this.resetDim("x"),this.resetDim("y"),this.context.view.render(!0)},t}(Xs);const $y=Iy;var _y=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.startPoint=null,t.starting=!1,t.startCache={},t}return(0,S.ZT)(t,e),t.prototype.start=function(){var e=this;this.startPoint=this.context.getCurrentPoint(),this.starting=!0;var t=this.dims;(0,E.S6)(t,(function(t){var n=e.getScale(t),r=n.min,o=n.max,i=n.values;e.startCache[t]={min:r,max:o,values:i}}))},t.prototype.end=function(){this.startPoint=null,this.starting=!1,this.startCache={}},t.prototype.translate=function(){var e=this;if(this.starting){var t=this.startPoint,n=this.context.view.getCoordinate(),r=this.context.getCurrentPoint(),o=n.invert(t),i=n.invert(r),a=i.x-o.x,l=i.y-o.y,s=this.context.view,c=this.dims;(0,E.S6)(c,(function(t){e.translateDim(t,{x:-1*a,y:-1*l})})),s.render(!0)}},t.prototype.translateDim=function(e,t){if(this.hasDim(e)){var n=this.getScale(e);n.isLinear&&this.translateLinear(e,n,t)}},t.prototype.translateLinear=function(e,t,n){var r=this.context.view,o=this.startCache[e],i=o.min,a=o.max,l=a-i,s=n[e]*l;this.cacheScaleDefs[e]||(this.cacheScaleDefs[e]={nice:t.nice,min:i,max:a}),r.scale(t.field,{nice:!1,min:i+s,max:a+s})},t.prototype.reset=function(){e.prototype.reset.call(this),this.startPoint=null,this.starting=!1},t}($y);const Py=_y;var Ay=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.zoomRatio=.05,t}return(0,S.ZT)(t,e),t.prototype.zoomIn=function(){this.zoom(this.zoomRatio)},t.prototype.zoom=function(e){var t=this,n=this.dims;(0,E.S6)(n,(function(n){t.zoomDim(n,e)})),this.context.view.render(!0)},t.prototype.zoomOut=function(){this.zoom(-1*this.zoomRatio)},t.prototype.zoomDim=function(e,t){if(this.hasDim(e)){var n=this.getScale(e);n.isLinear&&this.zoomLinear(e,n,t)}},t.prototype.zoomLinear=function(e,t,n){var r=this.context.view;this.cacheScaleDefs[e]||(this.cacheScaleDefs[e]={nice:t.nice,min:t.min,max:t.max});var o=this.cacheScaleDefs[e],i=o.max-o.min,a=t.min,l=t.max,s=n*i,c=a-s,u=l+s,d=(u-c)/i;u>c&&d<100&&d>.01&&r.scale(t.field,{nice:!1,min:a-s,max:l+s})},t}($y);const Ny=Ay;var Ty=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.scroll=function(e){var t=this.context,n=t.view,r=t.event;if(n.getOptions().scrollbar){var o=(null==e?void 0:e.wheelDelta)||1,i=n.getController("scrollbar"),a=n.getXScale(),l=n.getOptions().data,s=(0,E.dp)((0,E.I)(l,a.field)),c=(0,E.dp)(a.values),u=i.getValue(),d=Math.floor((s-c)*u)+(function(e){return e.gEvent.originalEvent.deltaY>0}(r)?o:-o),f=o/(s-c)/1e4,p=(0,E.uZ)(d/(s-c)+f,0,1);i.setValue(p)}},t}(Xs);const Ry=Ty;var Ly=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.show=function(){var e=this.context,t=uc(e).axis.cfg.title,n=t.description,r=t.text,o=t.descriptionTooltipStyle,i=e.event,a=i.x,l=i.y;this.tooltip||this.renderTooltip(),this.tooltip.update({title:r||"",customContent:function(){return'\n \n
\n 字段说明:').concat(n,"\n
\n
\n ")},x:a,y:l}),this.tooltip.show()},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.tooltip&&this.tooltip.destroy()},t.prototype.hide=function(){this.tooltip&&this.tooltip.hide()},t.prototype.renderTooltip=function(){var e,t=this.context.view.canvas,n={start:{x:0,y:0},end:{x:t.get("width"),y:t.get("height")}},r=new ps({parent:t.get("el").parentNode,region:n,visible:!1,containerId:"aixs-description-tooltip",domStyles:(0,S.pi)({},(0,E.b$)({},(e={},e[Tl]={"max-width":"50%",padding:"10px","line-height":"15px","font-size":"12px",color:"rgba(0, 0, 0, .65)"},e[Rl]={"word-break":"break-all","margin-bottom":"3px"},e)))});r.init(),r.setCapture(!1),this.tooltip=r},t}(Xs);const Dy=Ly;function jy(e){return e.isInPlot()}function Fy(e){return e.gEvent.preventDefault(),e.gEvent.originalEvent.deltaY>0}lu("dark",qc(Jd)),L("canvas",f),L("svg",h),$u("Polygon",Jh),$u("Interval",Vh),$u("Schema",eg),$u("Path",Ih),$u("Point",Kh),$u("Line",qh),$u("Area",Nh),$u("Edge",Th),$u("Heatmap",Lh),$u("Violin",ng),Ku("base",wd),Ku("interval",dg),Ku("pie",mg),Ku("polar",hg),Ju("overlap",(function(e,t,n,r){var o=new yg;(0,E.S6)(t,(function(e){for(var t=e.find((function(e){return"text"===e.get("type")})),n=t.attr(),r=n.x,i=n.y,a=!1,l=0;l<=8;l++){var s=bg(t,r,i,l);if(o.hasGap(s)){o.fillGap(s),a=!0;break}}a||e.remove(!0)})),o.destroy()})),Ju("distribute",(function(e,t,n,r){if(e.length&&t.length){var o=e[0]?e[0].offset:0,i=t[0].get("coordinate"),a=i.getRadius(),l=i.getCenter();if(o>0){var s=2*(a+o)+28,c={start:i.start,end:i.end},u=[[],[]];e.forEach((function(e){e&&("right"===e.textAlign?u[0].push(e):u[1].push(e))})),u.forEach((function(e,n){var r=s/14;e.length>r&&(e.sort((function(e,t){return t["..percent"]-e["..percent"]})),e.splice(r,e.length-r)),e.sort((function(e,t){return e.y-t.y})),function(e,t,n,r,o,i){var a,l,s,c=!0,u=r.start,d=r.end,f=Math.min(u.y,d.y),p=Math.abs(u.y-d.y),h=0,g=Number.MIN_VALUE,m=t.map((function(e){return e.y>h&&(h=e.y),e.yp&&(p=h-f);c;)for(m.forEach((function(e){var t=(Math.min.apply(g,e.targets)+Math.max.apply(g,e.targets))/2;e.pos=Math.min(Math.max(g,t-e.size/2),p-e.size)})),c=!1,s=m.length;s--;)if(s>0){var v=m[s-1],y=m[s];v.pos+v.size>y.pos&&(v.size+=y.size,v.targets=v.targets.concat(y.targets),v.pos+v.size>p&&(v.pos=p-v.size),m.splice(s,1),c=!0)}s=0,m.forEach((function(e){var n=f+7;e.targets.forEach((function(){t[s].y=e.pos+n,n+=14,s++}))}));var b={};try{for(var x=(0,S.XA)(e),w=x.next();!w.done;w=x.next()){var C=w.value;b[C.get("id")]=C}}catch(e){a={error:e}}finally{try{w&&!w.done&&(l=x.return)&&l.call(x)}finally{if(a)throw a.error}}t.forEach((function(e){var t=e.r*e.r,n=Math.pow(Math.abs(e.y-o.y),2);if(to.maxX||r.maxY>o.maxY)&&e.remove(!0)}))})),Ju("limit-in-canvas",(function(e,t,n,r){(0,E.S6)(t,(function(e){var t=r.minX,n=r.minY,o=r.maxX,i=r.maxY,a=e.getCanvasBBox(),l=a.minX,s=a.minY,c=a.maxX,u=a.maxY,d=a.x,f=a.y,p=a.width,h=a.height,g=d,m=f;(lo?g=o-p:c>o&&(g-=c-o),s>i?m=i-h:u>i&&(m-=u-i),g===d&&m===f||dd(e,g-d,m-f)}))})),Ju("limit-in-plot",(function(e,t,n,r,o){if(!(t.length<=0)){var i=(null==o?void 0:o.direction)||["top","right","bottom","left"],a=(null==o?void 0:o.action)||"translate",l=(null==o?void 0:o.margin)||0,s=t[0].get("coordinate");if(s){var c=function(e,t){void 0===t&&(t=0);var n=e.start,r=e.end,o=e.getWidth(),i=e.getHeight(),a=Math.min(n.x,r.x),l=Math.min(n.y,r.y);return Cs.fromRange(a-t,l-t,a+o+t,l+i+t)}(s,l),u=c.minX,d=c.minY,f=c.maxX,p=c.maxY;(0,E.S6)(t,(function(e){var t=e.getCanvasBBox(),n=t.minX,r=t.minY,o=t.maxX,l=t.maxY,s=t.x,c=t.y,h=t.width,g=t.height,m=s,v=c;if(i.indexOf("left")>=0&&(n=0&&(r=0&&(n>f?m=f-h:o>f&&(m-=o-f)),i.indexOf("bottom")>=0&&(r>p?v=p-g:l>p&&(v-=l-p)),m!==s||v!==c){var y=m-s;if("translate"===a)dd(e,y,v-c);else if("ellipsis"===a){e.findAll((function(e){return"text"===e.get("type")})).forEach((function(e){var t=(0,E.ei)(e.attr(),["fontSize","fontFamily","fontWeight","fontStyle","fontVariant"]),n=e.getCanvasBBox(),r=function(e,t,n){var r,o=jg("...",n);r=(0,E.HD)(e)?e:(0,E.BB)(e);var i,a,l=t,s=[];if(jg(e,n)<=t)return e;for(;i=r.substr(0,16),!((a=jg(i,n))+o>l&&a>l);)if(s.push(i),l-=a,!(r=r.substr(16)))return s.join("");for(;i=r.substr(0,1),!((a=jg(i,n))+o>l);)if(s.push(i),l-=a,!(r=r.substr(1)))return s.join("");return"".concat(s.join(""),"...")}(e.attr("text"),n.width-Math.abs(y),t);e.attr("text",r)}))}else e.hide()}}))}}})),Ju("pie-outer",(function(e,t,n,r){var o,i,a=(0,E.hX)(e,(function(e){return!(0,E.UM)(e)})),l=t[0]&&t[0].get("coordinate");if(l){var s=l.getCenter(),c=l.getRadius(),u={};try{for(var d=(0,S.XA)(t),f=d.next();!f.done;f=d.next()){var p=f.value;u[p.get("id")]=p}}catch(e){o={error:e}}finally{try{f&&!f.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}var h=(0,E.U2)(a[0],"labelHeight",14),g=(0,E.U2)(a[0],"offset",0);if(!(g<=0)){var m="right",v=(0,E.vM)(a,(function(e){return e.xn&&(e.sort((function(e,t){return t.percent-e.percent})),(0,E.S6)(e,(function(e,t){t+1>n&&(u[e.id].set("visible",!1),e.invisible=!0)}))),vg(e,h,C)})),(0,E.S6)(v,(function(e,t){(0,E.S6)(e,(function(e){var n=t===m,r=u[e.id].getChildByIndex(0);if(r){var o=c+g,i=e.y-s.y,a=Math.pow(o,2),d=Math.pow(i,2),f=a-d>0?a-d:0,p=Math.sqrt(f),h=Math.abs(Math.cos(e.angle)*o);e.x=n?s.x+Math.max(p,h):s.x-Math.max(p,h)}r&&(r.attr("y",e.y),r.attr("x",e.x)),function(e,t){var n=t.getCenter(),r=t.getRadius();if(e&&e.labelLine){var o=e.angle,i=e.offset,a=ms(n.x,n.y,r,o),l=e.x+(0,E.U2)(e,"offsetX",0)*(Math.cos(o)>0?1:-1),s=e.y+(0,E.U2)(e,"offsetY",0)*(Math.sin(o)>0?1:-1),c={x:l-4*Math.cos(o),y:s-4*Math.sin(o)},u=e.labelLine.smooth,d=[],f=c.x-n.x,p=c.y-n.y,h=Math.atan(p/f);if(f<0&&(h+=Math.PI),!1===u){(0,E.Kn)(e.labelLine)||(e.labelLine={});var g=0;(o<0&&o>-Math.PI/2||o>1.5*Math.PI)&&c.y>a.y&&(g=1),o>=0&&oa.y&&(g=1),o>=Math.PI/2&&oc.y&&(g=1),(o<-Math.PI/2||o>=Math.PI&&o<1.5*Math.PI)&&a.y>c.y&&(g=1);var m=i/2>4?4:Math.max(i/2-1,0),v=ms(n.x,n.y,r+m,o),y=ms(n.x,n.y,r+i/2,h);d.push("M ".concat(a.x," ").concat(a.y)),d.push("L ".concat(v.x," ").concat(v.y)),d.push("A ".concat(n.x," ").concat(n.y," 0 ").concat(0," ").concat(g," ").concat(y.x," ").concat(y.y)),d.push("L ".concat(c.x," ").concat(c.y))}else{v=ms(n.x,n.y,r+(i/2>4?4:Math.max(i/2-1,0)),o);var b=a.xMath.pow(Math.E,-16)&&d.push.apply(d,["C",c.x+4*b,c.y,2*v.x-a.x,2*v.y-a.y,a.x,a.y]),d.push("L ".concat(a.x," ").concat(a.y))}e.labelLine.path=d.join(" ")}}(e,l)}))}))}}})),Ju("adjust-color",(function(e,t,n){if(0!==n.length){var r=n[0].get("element").geometry.theme,o=r.labels||{},i=o.fillColorLight,a=o.fillColorDark;n.forEach((function(e,n){var o=t[n].find((function(e){return"text"===e.get("type")})),l=Cs.fromObject(e.getBBox()),s=Cs.fromObject(o.getCanvasBBox()),c=!l.contains(s),u=function(e){var t=kt.toRGB(e).toUpperCase();if(Ag[t])return Ag[t];var n=(0,S.CR)(kt.rgb2arr(t),3);return(299*n[0]+587*n[1]+114*n[2])/1e3<128}(e.attr("fill"));c?o.attr(r.overflowLabels.style):u?i&&o.attr("fill",i):a&&o.attr("fill",a)}))}})),Ju("interval-adjust-position",(function(e,t,n){var r;if(0!==n.length){var o=null===(r=n[0])||void 0===r?void 0:r.get("element"),i=null==o?void 0:o.geometry;i&&"interval"===i.type&&function(e,t,n){return!!e.getAdjust("stack")||t.every((function(t,r){var o=n[r];return function(e,t,n){var r=e.coordinate,o=pd(t),i=Cs.fromObject(o.getCanvasBBox()),a=Cs.fromObject(n.getBBox());return r.isTransposed?a.height>=i.height:a.width>=i.width}(e,t,o)}))}(i,t,n)&&n.forEach((function(e,n){var r=t[n];!function(e,t,n){var r=e.coordinate,o=Cs.fromObject(n.getBBox()),i=pd(t);r.isTransposed?i.attr({x:o.minX+o.width/2,textAlign:"center"}):i.attr({y:o.minY+o.height/2,textBaseline:"middle"})}(i,r,e)}))}})),Ju("interval-hide-overlap",(function(e,t,n){var r;if(0!==n.length){var o=null===(r=n[0])||void 0===r?void 0:r.get("element"),i=null==o?void 0:o.geometry;if(i&&"interval"===i.type){var a,l=function(e){var t=[],n=Math.max(Math.floor(e.length/500),1);return(0,E.S6)(e,(function(e,r){r%n==0?t.push(e):e.set("visible",!1)})),t}(t),s=(0,S.CR)(i.getXYFields(),1)[0],c=[],u=[],d=(0,E.vM)(l,(function(e){return e.get("data")[s]})),f=(0,E.jj)((0,E.UI)(l,(function(e){return e.get("data")[s]})));l.forEach((function(e){e.set("visible",!0)}));var p=function(e){e&&(e.length&&u.push(e.pop()),u.push.apply(u,(0,S.ev)([],(0,S.CR)(e),!1)))};for((0,E.dp)(f)>0&&(a=f.shift(),p(d[a])),(0,E.dp)(f)>0&&(a=f.pop(),p(d[a])),(0,E.S6)(f.reverse(),(function(e){p(d[e])}));u.length>0;){var h=u.shift();h.get("visible")&&(gd(h,c)?h.set("visible",!1):c.push(h))}}}})),Ju("point-adjust-position",(function(e,t,n,r,o){var i,a;if(0!==n.length){var l=null===(i=n[0])||void 0===i?void 0:i.get("element"),s=null==l?void 0:l.geometry;if(s&&"point"===s.type){var c=(0,S.CR)(s.getXYFields(),2),u=c[0],d=c[1],f=(0,E.vM)(t,(function(e){return e.get("data")[u]})),p=[],h=o&&o.offset||(null===(a=e[0])||void 0===a?void 0:a.offset)||12;(0,E.UI)((0,E.XP)(f).reverse(),(function(e){for(var t=function(e,t){var n=e.getXYFields()[1],r=[],o=t.sort((function(e,t){return e.get("data")[n]-e.get("data")[n]}));return o.length>0&&r.push(o.shift()),o.length>0&&r.push(o.pop()),r.push.apply(r,(0,S.ev)([],(0,S.CR)(o),!1)),r}(s,f[e]);t.length;){var n=t.shift(),r=pd(n);if(Ng(p,n,(function(e,t){return e.get("data")[u]===t.get("data")[u]&&e.get("data")[d]===t.get("data")[d]})))r.set("visible",!1);else{var o=!1;Tg(p,n)&&(r.attr("y",r.attr("y")+2*h),o=Tg(p,n)),o?r.set("visible",!1):p.push(n)}}}))}}})),Ju("pie-spider",(function(e,t,n,r){var o,i,a=t[0]&&t[0].get("coordinate");if(a){var l=a.getCenter(),s=a.getRadius(),c={};try{for(var u=(0,S.XA)(t),d=u.next();!d.done;d=u.next()){var f=d.value;c[f.get("id")]=f}}catch(e){o={error:e}}finally{try{d&&!d.done&&(i=u.return)&&i.call(u)}finally{if(o)throw o.error}}var p=(0,E.U2)(e[0],"labelHeight",14),h=Math.max((0,E.U2)(e[0],"offset",0),4);(0,E.S6)(e,(function(e){if(e&&(0,E.U2)(c,[e.id])){var t=e.x>l.x||e.x===l.x&&e.y>l.y,n=(0,E.UM)(e.offsetX)?4:e.offsetX,r=ms(l.x,l.y,s+4,e.angle),o=h+n;e.x=l.x+(t?1:-1)*(s+o),e.y=r.y}}));var g=a.start,m=a.end,v="right",y=(0,E.vM)(e,(function(e){return e.xb&&(b=Math.min(t,Math.abs(g.y-m.y)))}));var x={minX:g.x,maxX:m.x,minY:l.y-b/2,maxY:l.y+b/2};(0,E.S6)(y,(function(e,t){var n=b/p;e.length>n&&(e.sort((function(e,t){return t.percent-e.percent})),(0,E.S6)(e,(function(e,t){t>n&&(c[e.id].set("visible",!1),e.invisible=!0)}))),vg(e,p,x)}));var w=x.minY,C=x.maxY;(0,E.S6)(y,(function(e,t){var n=t===v;(0,E.S6)(e,(function(e){var t=(0,E.U2)(c,e&&[e.id]);if(t)if(e.yC)t.set("visible",!1);else{var r=t.getChildByIndex(0),o=r.getCanvasBBox(),i=n?o.x:o.maxX,l=o.y+o.height/2;dd(r,e.x-i,e.y-l),e.labelLine&&function(e,t,n){var r,o=t.getCenter(),i=t.getRadius(),a={x:e.x-(n?4:-4),y:e.y},l=ms(o.x,o.y,i+4,e.angle),s={x:a.x,y:a.y},c={x:l.x,y:l.y},u=ms(o.x,o.y,i,e.angle);if(a.y!==l.y){var d=n?4:-4;s.y=a.y,e.angle<0&&e.angle>=-Math.PI/2&&(s.x=Math.max(l.x,a.x-d),a.y0&&e.anglel.y?c.y=s.y:(c.y=l.y,c.x=Math.max(c.x,s.x-d))),e.angle>Math.PI/2&&(s.x=Math.min(l.x,a.x-d),a.y>l.y?c.y=s.y:(c.y=l.y,c.x=Math.min(c.x,s.x-d))),e.angle<-Math.PI/2&&(s.x=Math.min(l.x,a.x-d),a.y0&&r.push(o.shift()),o.length>0&&r.push(o.pop()),r.push.apply(r,(0,S.ev)([],(0,S.CR)(o),!1)),r}(s,f[e]);t.length;){var n=t.shift(),r=pd(n);if(Rg(p,n,(function(e,t){return e.get("data")[u]===t.get("data")[u]&&e.get("data")[d]===t.get("data")[d]})))r.set("visible",!1);else{var o=!1;Lg(p,n)&&(r.attr("y",r.attr("y")+2*h),o=Lg(p,n)),o?r.set("visible",!1):p.push(n)}}}))}}})),ju("fade-in",(function(e,t,n){var r={fillOpacity:(0,E.UM)(e.attr("fillOpacity"))?1:e.attr("fillOpacity"),strokeOpacity:(0,E.UM)(e.attr("strokeOpacity"))?1:e.attr("strokeOpacity"),opacity:(0,E.UM)(e.attr("opacity"))?1:e.attr("opacity")};e.attr({fillOpacity:0,strokeOpacity:0,opacity:0}),e.animate(r,t)})),ju("fade-out",(function(e,t,n){var r=t.easing,o=t.duration,i=t.delay;e.animate({fillOpacity:0,strokeOpacity:0,opacity:0},o,r,(function(){e.remove(!0)}),i)})),ju("grow-in-x",(function(e,t,n){Fg(e,t,n.coordinate,n.minYPoint,"x")})),ju("grow-in-xy",(function(e,t,n){Fg(e,t,n.coordinate,n.minYPoint,"xy")})),ju("grow-in-y",(function(e,t,n){Fg(e,t,n.coordinate,n.minYPoint,"y")})),ju("scale-in-x",(function(e,t,n){var r=e.getBBox(),o=e.get("origin").mappingData.points,i=o[0].y-o[1].y>0?r.maxX:r.minX,a=(r.minY+r.maxY)/2;e.applyToMatrix([i,a,1]);var l=se.vs(e.getMatrix(),[["t",-i,-a],["s",.01,1],["t",i,a]]);e.setMatrix(l),e.animate({matrix:se.vs(e.getMatrix(),[["t",-i,-a],["s",100,1],["t",i,a]])},t)})),ju("scale-in-y",(function(e,t,n){var r=e.getBBox(),o=e.get("origin").mappingData,i=(r.minX+r.maxX)/2,a=o.points,l=a[0].y-a[1].y<=0?r.maxY:r.minY;e.applyToMatrix([i,l,1]);var s=se.vs(e.getMatrix(),[["t",-i,-l],["s",1,.01],["t",i,l]]);e.setMatrix(s),e.animate({matrix:se.vs(e.getMatrix(),[["t",-i,-l],["s",1,100],["t",i,l]])},t)})),ju("wave-in",(function(e,t,n){var r=Is(n.coordinate,20),o=r.type,i=r.startState,a=r.endState,l=e.setClip({type:o,attrs:i});n.toAttrs&&e.attr(n.toAttrs),l.animate(a,(0,S.pi)((0,S.pi)({},t),{callback:function(){e&&!e.get("destroyed")&&e.set("clipShape",null),l.remove(!0),(0,E.mf)(t.callback)&&t.callback()}}))})),ju("zoom-in",(function(e,t,n){Ug(e,t,"zoomIn")})),ju("zoom-out",(function(e,t,n){Ug(e,t,"zoomOut")})),ju("position-update",(function(e,t,n){var r=n.toAttrs,o=r.x,i=r.y;delete r.x,delete r.y,e.attr(r),e.animate({x:o,y:i},t)})),ju("sector-path-update",(function(e,t,n){var r=n.toAttrs,o=n.coordinate,i=r.path||[],a=i.map((function(e){return e[0]}));if(!(i.length<1)){var l=Hg(i),s=l.startAngle,c=l.endAngle,u=l.radius,d=l.innerRadius,f=Hg(e.attr("path")),p=f.startAngle,h=f.endAngle,g=o.getCenter(),m=s-p,v=c-h;0!==m||0!==v?e.animate((function(e){var t=p+e*m,n=h+e*v;return(0,S.pi)((0,S.pi)({},r),{path:(0,E.Xy)(a,["M","A","A","Z"])?ys(g.x,g.y,u,t,n):vs(g.x,g.y,u,t,n,d)})}),(0,S.pi)((0,S.pi)({},t),{callback:function(){e.attr("path",i),(0,E.mf)(t.callback)&&t.callback()}})):e.attr(r)}})),ju("path-in",(function(e,t,n){var r=e.getTotalLength();e.attr("lineDash",[r]),e.animate((function(e){return{lineDashOffset:(1-e)*r}}),t)})),Vs("rect",tm),Vs("mirror",Qg),Vs("list",Yg),Vs("matrix",Zg),Vs("circle",qg),Vs("tree",rm),bu("axis",mm),bu("legend",wm),bu("tooltip",Ru),bu("annotation",sm),bu("slider",Em),bu("scrollbar",km),Ks("tooltip",_m),Ks("sibling-tooltip",Am),Ks("ellipsis-text",Tm),Ks("element-active",Bm),Ks("element-single-active",qm),Ks("element-range-active",Vm),Ks("element-highlight",tv),Ks("element-highlight-by-x",iv),Ks("element-highlight-by-color",rv),Ks("element-single-highlight",cv),Ks("element-range-highlight",sv),Ks("element-sibling-highlight",sv,{effectSiblings:!0,effectByRecord:!0}),Ks("element-selected",dv),Ks("element-single-selected",fv),Ks("element-range-selected",uv),Ks("element-link-by-color",Hm),Ks("active-region",Im),Ks("list-active",gv),Ks("list-selected",Sv),Ks("list-highlight",wv),Ks("list-unchecked",Ev),Ks("list-checked",Mv),Ks("list-focus",_v),Ks("list-radio",Tv),Ks("legend-item-highlight",wv,{componentNames:["legend"]}),Ks("axis-label-highlight",wv,{componentNames:["axis"]}),Ks("axis-description",Dy),Ks("rect-mask",Hv),Ks("x-rect-mask",Xv,{dim:"x"}),Ks("y-rect-mask",Xv,{dim:"y"}),Ks("circle-mask",jv),Ks("path-mask",Yv),Ks("smooth-path-mask",Jv),Ks("rect-multi-mask",ny),Ks("x-rect-multi-mask",oy,{dim:"x"}),Ks("y-rect-multi-mask",oy,{dim:"y"}),Ks("circle-multi-mask",iy),Ks("path-multi-mask",ay),Ks("smooth-path-multi-mask",ly),Ks("cursor",cy),Ks("data-filter",dy),Ks("brush",gy),Ks("brush-x",gy,{dims:["x"]}),Ks("brush-y",gy,{dims:["y"]}),Ks("sibling-filter",vy),Ks("sibling-x-filter",vy,{dims:"x"}),Ks("sibling-y-filter",vy,{dims:"y"}),Ks("element-filter",by),Ks("element-sibling-filter",wy),Ks("element-sibling-filter-record",wy,{byRecord:!0}),Ks("view-drag",ky),Ks("view-move",My),Ks("scale-translate",Py),Ks("scale-zoom",Ny),Ks("reset-button",Ey,{name:"reset-button",text:"reset"}),Ks("mousewheel-scroll",Ry),Xc("tooltip",{start:[{trigger:"plot:mousemove",action:"tooltip:show",throttle:{wait:50,leading:!0,trailing:!1}},{trigger:"plot:touchmove",action:"tooltip:show",throttle:{wait:50,leading:!0,trailing:!1}}],end:[{trigger:"plot:mouseleave",action:"tooltip:hide"},{trigger:"plot:leave",action:"tooltip:hide"},{trigger:"plot:touchend",action:"tooltip:hide"}]}),Xc("ellipsis-text",{start:[{trigger:"legend-item-name:mousemove",action:"ellipsis-text:show",throttle:{wait:50,leading:!0,trailing:!1}},{trigger:"legend-item-name:touchstart",action:"ellipsis-text:show",throttle:{wait:50,leading:!0,trailing:!1}},{trigger:"axis-label:mousemove",action:"ellipsis-text:show",throttle:{wait:50,leading:!0,trailing:!1}},{trigger:"axis-label:touchstart",action:"ellipsis-text:show",throttle:{wait:50,leading:!0,trailing:!1}}],end:[{trigger:"legend-item-name:mouseleave",action:"ellipsis-text:hide"},{trigger:"legend-item-name:touchend",action:"ellipsis-text:hide"},{trigger:"axis-label:mouseleave",action:"ellipsis-text:hide"},{trigger:"axis-label:mouseout",action:"ellipsis-text:hide"},{trigger:"axis-label:touchend",action:"ellipsis-text:hide"}]}),Xc("element-active",{start:[{trigger:"element:mouseenter",action:"element-active:active"}],end:[{trigger:"element:mouseleave",action:"element-active:reset"}]}),Xc("element-selected",{start:[{trigger:"element:click",action:"element-selected:toggle"}]}),Xc("element-highlight",{start:[{trigger:"element:mouseenter",action:"element-highlight:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight:reset"}]}),Xc("element-highlight-by-x",{start:[{trigger:"element:mouseenter",action:"element-highlight-by-x:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight-by-x:reset"}]}),Xc("element-highlight-by-color",{start:[{trigger:"element:mouseenter",action:"element-highlight-by-color:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight-by-color:reset"}]}),Xc("legend-active",{start:[{trigger:"legend-item:mouseenter",action:["list-active:active","element-active:active"]}],end:[{trigger:"legend-item:mouseleave",action:["list-active:reset","element-active:reset"]}]}),Xc("legend-highlight",{start:[{trigger:"legend-item:mouseenter",action:["legend-item-highlight:highlight","element-highlight:highlight"]}],end:[{trigger:"legend-item:mouseleave",action:["legend-item-highlight:reset","element-highlight:reset"]}]}),Xc("axis-label-highlight",{start:[{trigger:"axis-label:mouseenter",action:["axis-label-highlight:highlight","element-highlight:highlight"]}],end:[{trigger:"axis-label:mouseleave",action:["axis-label-highlight:reset","element-highlight:reset"]}]}),Xc("element-list-highlight",{start:[{trigger:"element:mouseenter",action:["list-highlight:highlight","element-highlight:highlight"]}],end:[{trigger:"element:mouseleave",action:["list-highlight:reset","element-highlight:reset"]}]}),Xc("element-range-highlight",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"mask:mouseenter",action:"cursor:move"},{trigger:"plot:mouseleave",action:"cursor:default"},{trigger:"mask:mouseleave",action:"cursor:crosshair"}],start:[{trigger:"plot:mousedown",isEnable:function(e){return!e.isInShape("mask")},action:["rect-mask:start","rect-mask:show"]},{trigger:"mask:dragstart",action:["rect-mask:moveStart"]}],processing:[{trigger:"plot:mousemove",action:["rect-mask:resize"]},{trigger:"mask:drag",action:["rect-mask:move"]},{trigger:"mask:change",action:["element-range-highlight:highlight"]}],end:[{trigger:"plot:mouseup",action:["rect-mask:end"]},{trigger:"mask:dragend",action:["rect-mask:moveEnd"]},{trigger:"document:mouseup",isEnable:function(e){return!e.isInPlot()},action:["element-range-highlight:clear","rect-mask:end","rect-mask:hide"]}],rollback:[{trigger:"dblclick",action:["element-range-highlight:clear","rect-mask:hide"]}]}),Xc("brush",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:jy,action:["brush:start","rect-mask:start","rect-mask:show"]}],processing:[{trigger:"mousemove",isEnable:jy,action:["rect-mask:resize"]}],end:[{trigger:"mouseup",isEnable:jy,action:["brush:filter","brush:end","rect-mask:end","rect-mask:hide","reset-button:show"]}],rollback:[{trigger:"reset-button:click",action:["brush:reset","reset-button:hide","cursor:crosshair"]}]}),Xc("brush-visible",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"plot:mousedown",action:["rect-mask:start","rect-mask:show"]}],processing:[{trigger:"plot:mousemove",action:["rect-mask:resize"]},{trigger:"mask:change",action:["element-range-highlight:highlight"]}],end:[{trigger:"plot:mouseup",action:["rect-mask:end","rect-mask:hide","element-filter:filter","element-range-highlight:clear"]}],rollback:[{trigger:"dblclick",action:["element-filter:clear"]}]}),Xc("brush-x",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:jy,action:["brush-x:start","x-rect-mask:start","x-rect-mask:show"]}],processing:[{trigger:"mousemove",isEnable:jy,action:["x-rect-mask:resize"]}],end:[{trigger:"mouseup",isEnable:jy,action:["brush-x:filter","brush-x:end","x-rect-mask:end","x-rect-mask:hide"]}],rollback:[{trigger:"dblclick",action:["brush-x:reset"]}]}),Xc("element-path-highlight",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:jy,action:"path-mask:start"},{trigger:"mousedown",isEnable:jy,action:"path-mask:show"}],processing:[{trigger:"mousemove",action:"path-mask:addPoint"}],end:[{trigger:"mouseup",action:"path-mask:end"}],rollback:[{trigger:"dblclick",action:"path-mask:hide"}]}),Xc("brush-x-multi",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"mask:mouseenter",action:"cursor:move"},{trigger:"plot:mouseleave",action:"cursor:default"},{trigger:"mask:mouseleave",action:"cursor:crosshair"}],start:[{trigger:"mousedown",isEnable:jy,action:["x-rect-multi-mask:start","x-rect-multi-mask:show"]},{trigger:"mask:dragstart",action:["x-rect-multi-mask:moveStart"]}],processing:[{trigger:"mousemove",isEnable:function(e){return!gc(e)},action:["x-rect-multi-mask:resize"]},{trigger:"multi-mask:change",action:"element-range-highlight:highlight"},{trigger:"mask:drag",action:["x-rect-multi-mask:move"]}],end:[{trigger:"mouseup",action:["x-rect-multi-mask:end"]},{trigger:"mask:dragend",action:["x-rect-multi-mask:moveEnd"]}],rollback:[{trigger:"dblclick",action:["x-rect-multi-mask:clear","cursor:crosshair"]},{trigger:"multi-mask:clearAll",action:["element-range-highlight:clear"]},{trigger:"multi-mask:clearSingle",action:["element-range-highlight:highlight"]}]}),Xc("element-single-selected",{start:[{trigger:"element:click",action:"element-single-selected:toggle"}]}),Xc("legend-filter",{showEnable:[{trigger:"legend-item:mouseenter",action:["cursor:pointer","list-radio:show"]},{trigger:"legend-item:mouseleave",action:["cursor:default","list-radio:hide"]}],start:[{trigger:"legend-item:click",isEnable:function(e){return!e.isInShape("legend-item-radio")},action:["legend-item-highlight:reset","element-highlight:reset","list-unchecked:toggle","data-filter:filter","list-radio:show"]},{trigger:"legend-item-radio:mouseenter",action:["list-radio:showTip"]},{trigger:"legend-item-radio:mouseleave",action:["list-radio:hideTip"]},{trigger:"legend-item-radio:click",action:["list-focus:toggle","data-filter:filter","list-radio:show"]}]}),Xc("continuous-filter",{start:[{trigger:"legend:valuechanged",action:"data-filter:filter"}]}),Xc("continuous-visible-filter",{start:[{trigger:"legend:valuechanged",action:"element-filter:filter"}]}),Xc("legend-visible-filter",{showEnable:[{trigger:"legend-item:mouseenter",action:"cursor:pointer"},{trigger:"legend-item:mouseleave",action:"cursor:default"}],start:[{trigger:"legend-item:click",action:["legend-item-highlight:reset","element-highlight:reset","list-unchecked:toggle","element-filter:filter"]}]}),Xc("active-region",{start:[{trigger:"plot:mousemove",action:"active-region:show"}],end:[{trigger:"plot:mouseleave",action:"active-region:hide"}]}),Xc("axis-description",{start:[{trigger:"axis-description:mousemove",action:"axis-description:show"}],end:[{trigger:"axis-description:mouseleave",action:"axis-description:hide"}]}),Xc("view-zoom",{start:[{trigger:"plot:mousewheel",isEnable:function(e){return Fy(e.event)},action:"scale-zoom:zoomOut",throttle:{wait:100,leading:!0,trailing:!1}},{trigger:"plot:mousewheel",isEnable:function(e){return!Fy(e.event)},action:"scale-zoom:zoomIn",throttle:{wait:100,leading:!0,trailing:!1}}]}),Xc("sibling-tooltip",{start:[{trigger:"plot:mousemove",action:"sibling-tooltip:show"}],end:[{trigger:"plot:mouseleave",action:"sibling-tooltip:hide"}]}),Xc("plot-mousewheel-scroll",{start:[{trigger:"plot:mousewheel",action:"mousewheel-scroll:scroll"}]});var By,zy=["type","alias","tickCount","tickInterval","min","max","nice","minLimit","maxLimit","range","tickMethod","base","exponent","mask","sync"];!function(e){e.ERROR="error",e.WARN="warn",e.INFO="log"}(By||(By={}));var Hy="AntV/G2Plot";function Uy(e){for(var t=[],n=1;n=0})),o=n.every((function(e){return(0,E.U2)(e,[t])<=0}));return r?{min:0}:o?{max:0}:{}}function qy(e,t,n,r,o){if(void 0===o&&(o=[]),!Array.isArray(e))return{nodes:[],links:[]};var i=[],a={},l=-1;return e.forEach((function(e){var s=e[t],c=e[n],u=e[r],d=Vy(e,o);a[s]||(a[s]=(0,S.pi)({id:++l,name:s},d)),a[c]||(a[c]=(0,S.pi)({id:++l,name:c},d)),i.push((0,S.pi)({source:a[s].id,target:a[c].id,value:u},d))})),{nodes:Object.values(a).sort((function(e,t){return e.id-t.id})),links:i}}function Gy(e,t){var n=(0,E.hX)(e,(function(e){var n=e[t];return null===n||"number"==typeof n&&!isNaN(n)}));return Wy(By.WARN,n.length===e.length,"illegal data existed in chart data."),n}var Yy,Ky={}.toString,Zy=function(e,t){return Ky.call(e)==="[object "+t+"]"},Jy=function(e){return Zy(e,"Array")},Qy=function(e){if(!function(e){return"object"==typeof e&&null!==e}(e)||!Zy(e,"Object"))return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t},eb=function(e,t,n,r){for(var o in n=n||0,r=r||5,t)if(Object.prototype.hasOwnProperty.call(t,o)){var i=t[o];i?Qy(i)?(Qy(e[o])||(e[o]={}),n0&&(n=n.map((function(e,n){return t.forEach((function(r,o){e+=t[o][n]})),e}))),n}function pb(e,t,n){var r=[],o=e[0],i=null;if(e.length<=2)return function(e,t){var n=[];if(e.length){n.push(["M",e[0].x,e[0].y]);for(var r=1,o=e.length;r"},key:"".concat(0===r?"top":"bottom","-statistic")},Vy(t,["offsetX","offsetY","rotate","style","formatter"])))}}))},yb=function(e,t,n){var r=t.statistic;[r.title,r.content].forEach((function(t){if(t){var r=(0,E.mf)(t.style)?t.style(n):t.style;e.annotation().html((0,S.pi)({position:["50%","100%"],html:function(e,o){var i=o.getCoordinate(),a=o.views[0].getCoordinate(),l=a.getCenter(),s=a.getRadius(),c=Math.max(Math.sin(a.startAngle),Math.sin(a.endAngle))*s,u=l.y+c-i.y.start-parseFloat((0,E.U2)(r,"fontSize",0)),d=i.getRadius()*i.innerRadius*2;mb(e,(0,S.pi)({width:"".concat(d,"px"),transform:"translate(-50%, ".concat(u,"px)")},gb(r)));var f=o.getData();if(t.customHtml)return t.customHtml(e,o,n,f);var p=t.content;return t.formatter&&(p=t.formatter(n,f)),p?(0,E.HD)(p)?p:"".concat(p):""}},Vy(t,["offsetX","offsetY","rotate","style","formatter"])))}}))};function bb(e,t){return t?(0,E.u4)(t,(function(e,t,n){return e.replace(new RegExp("{\\s*".concat(n,"\\s*}"),"g"),t)}),e):e}function xb(e,t){return e.views.find((function(e){return e.id===t}))}function wb(e){var t=e.parent;return t?t.views:[]}function Sb(e){return wb(e).filter((function(t){return t!==e}))}function Eb(e,t,n){void 0===n&&(n=e.geometries),"boolean"==typeof t?e.animate(t):e.animate(!0),(0,E.S6)(n,(function(e){var n;n=(0,E.mf)(t)?t(e.type||e.shapeType,e)||!0:t,e.animate(n)}))}function Cb(){return"object"==typeof window?null===window||void 0===window?void 0:window.devicePixelRatio:2}function kb(e,t){void 0===t&&(t=e);var n=document.createElement("canvas"),r=Cb();return n.width=e*r,n.height=t*r,n.style.width="".concat(e,"px"),n.style.height="".concat(t,"px"),n.getContext("2d").scale(r,r),n}function Ob(e,t,n,r){void 0===r&&(r=n);var o=t.backgroundColor,i=t.opacity;e.globalAlpha=i,e.fillStyle=o,e.beginPath(),e.fillRect(0,0,n,r),e.closePath()}function Mb(e,t,n){var r=e+t;return n?2*r:r}function Ib(e,t){return t?[[e*(1/4),e*(1/4)],[e*(3/4),e*(3/4)]]:[[.5*e,.5*e]]}function $b(e,t){var n=t*Math.PI/180;return{a:Math.cos(n)*(1/e),b:Math.sin(n)*(1/e),c:-Math.sin(n)*(1/e),d:Math.cos(n)*(1/e),e:0,f:0}}var _b={size:6,padding:2,backgroundColor:"transparent",opacity:1,rotation:0,fill:"#fff",fillOpacity:.5,stroke:"transparent",lineWidth:0,isStagger:!0};function Pb(e,t,n,r){var o=t.size,i=t.fill,a=t.lineWidth,l=t.stroke,s=t.fillOpacity;e.beginPath(),e.globalAlpha=s,e.fillStyle=i,e.strokeStyle=l,e.lineWidth=a,e.arc(n,r,o/2,0,2*Math.PI,!1),e.fill(),a&&e.stroke(),e.closePath()}var Ab={rotation:45,spacing:5,opacity:1,backgroundColor:"transparent",strokeOpacity:.5,stroke:"#fff",lineWidth:2};var Nb={size:6,padding:1,isStagger:!0,backgroundColor:"transparent",opacity:1,rotation:0,fill:"#fff",fillOpacity:.5,stroke:"transparent",lineWidth:0};function Tb(e,t,n,r){var o=t.stroke,i=t.size,a=t.fill,l=t.lineWidth,s=t.fillOpacity;e.globalAlpha=s,e.strokeStyle=o,e.lineWidth=l,e.fillStyle=a,e.strokeRect(n-i/2,r-i/2,i,i),e.fillRect(n-i/2,r-i/2,i,i)}function Rb(e){var t,n=e.type,r=e.cfg;switch(n){case"dot":t=function(e){var t=tb({},_b,e),n=t.size,r=t.padding,o=t.isStagger,i=t.rotation,a=Mb(n,r,o),l=Ib(a,o),s=kb(a,a),c=s.getContext("2d");Ob(c,t,a);for(var u=0,d=l;u0&&function(e,t,n){!function(e,t,n){var r=e.view,o=e.geometry,i=e.group,a=e.options,l=e.horizontal,s=a.offset,c=a.size,u=a.arrow,d=r.getCoordinate(),f=Bx(d,t)[3],p=Bx(d,n)[0],h=p.y-f.y,g=p.x-f.x;if("boolean"!=typeof u){var m,v=u.headSize,y=a.spacing;l?(g-v)/2b){var w=x/g.length,E=Math.max(1,Math.ceil(b/w)-1),C="".concat(g.slice(0,E),"...");y.attr("text",C)}}}}(e,t,n)}(s,c[t-1],e)}))}})),r}}(r.yField,!t,!!o),(void 0===(n=!r.isStack)&&(n=!1),function(e){var t=e.chart,r=e.options.connectedArea,o=function(){t.removeInteraction(Lx.hover),t.removeInteraction(Lx.click)};if(!n&&r){var i=r.trigger||"hover";o(),t.interaction(Lx[i],{start:Dx(i,r.style)})}else o();return e}),qb)(e)}function Yx(e){var t=e.options,n=t.xField,r=t.yField,o=t.xAxis,i=t.yAxis,a={left:"bottom",right:"top",top:"left",bottom:"right"},l=!1!==i&&(0,S.pi)({position:a[(null==i?void 0:i.position)||"left"]},i),s=!1!==o&&(0,S.pi)({position:a[(null==o?void 0:o.position)||"bottom"]},o);return(0,S.pi)((0,S.pi)({},e),{options:(0,S.pi)((0,S.pi)({},t),{xField:r,yField:n,xAxis:l,yAxis:s})})}function Kx(e){var t=e.options.label;return t&&!t.position&&(t.position="left",t.layout||(t.layout=[{type:"interval-adjust-position"},{type:"interval-hide-overlap"},{type:"adjust-color"},{type:"limit-in-plot",cfg:{action:"hide"}}])),tb({},e,{options:{label:t}})}function Zx(e){var t=e.options,n=t.seriesField,r=t.isStack,o=t.legend;return n?!1!==o&&(o=(0,S.pi)({position:r?"top-left":"right-top"},o||{})):o=!1,tb({},e,{options:{legend:o}})}function Jx(e){var t=e.options,n=[{type:"transpose"},{type:"reflectY"}].concat(t.coordinate||[]);return tb({},e,{options:{coordinate:n}})}function Qx(e){var t=e.chart,n=e.options,r=n.barStyle,o=n.barWidthRatio,i=n.minBarWidth,a=n.maxBarWidth,l=n.barBackground;return Gx({chart:t,options:(0,S.pi)((0,S.pi)({},n),{columnStyle:r,columnWidthRatio:o,minColumnWidth:i,maxColumnWidth:a,columnBackground:l})},!0)}function ew(e){return rb(Yx,Kx,Zx,jb,Jx,Qx)(e)}Xc(Lx.hover,{start:Dx(Lx.hover),end:[{trigger:"interval:mouseleave",action:["element-highlight-by-color:reset","element-link-by-color:unlink"]}]}),Xc(Lx.click,{start:Dx(Lx.click),end:[{trigger:"document:mousedown",action:["element-highlight-by-color:clear","element-link-by-color:clear"]}]});var tw,nw=tb({},px.getDefaultOptions(),{barWidthRatio:.6,marginRatio:1/32,tooltip:{shared:!0,showMarkers:!1,offset:20},legend:{radio:{}},interactions:[{type:"active-region"}]}),rw=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="bar",t}return(0,S.ZT)(t,e),t.getDefaultOptions=function(){return nw},t.prototype.changeData=function(e){var t,n;this.updateOption({data:e});var r=this.chart,o=this.options,i=o.isPercent,a=o.xField,l=o.yField,s=o.xAxis,c=o.yAxis;a=(t=[l,a])[0],l=t[1],s=(n=[c,s])[0],c=n[1],Ux({chart:r,options:(0,S.pi)((0,S.pi)({},o),{xField:a,yField:l,yAxis:c,xAxis:s})}),r.changeData(gx(e,a,l,a,i))},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return ew},t}(px),ow=tb({},px.getDefaultOptions(),{columnWidthRatio:.6,marginRatio:1/32,tooltip:{shared:!0,showMarkers:!1,offset:20},legend:{radio:{}},interactions:[{type:"active-region"}]}),iw=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="column",t}return(0,S.ZT)(t,e),t.getDefaultOptions=function(){return ow},t.prototype.changeData=function(e){this.updateOption({data:e});var t=this.options,n=t.yField,r=t.xField,o=t.isPercent;Ux({chart:this.chart,options:this.options}),this.chart.changeData(gx(e,n,r,n,o))},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return Gx},t}(px),aw="$$percentage$$",lw="$$mappingValue$$",sw="$$conversion$$",cw="$$totalPercentage$$",uw="$$x$$",dw="$$y$$",fw={appendPadding:[0,80],minSize:0,maxSize:1,meta:(tw={},tw[lw]={min:0,max:1,nice:!1},tw),label:{style:{fill:"#fff",fontSize:12}},tooltip:{showTitle:!1,showMarkers:!1,shared:!1},conversionTag:{offsetX:10,offsetY:0,style:{fontSize:12,fill:"rgba(0,0,0,0.45)"}}},pw="CONVERSION_TAG_NAME";function hw(e,t,n){var r,o=n.yField,i=n.maxSize,a=n.minSize,l=(0,E.U2)((0,E.UT)(t,o),[o]),s=(0,E.hj)(i)?i:1,c=(0,E.hj)(a)?a:0;return r=(0,E.UI)(e,(function(t,n){var r=(t[o]||0)/l;return t[aw]=r,t[lw]=(s-c)*r+c,t[sw]=[(0,E.U2)(e,[n-1,o]),t[o]],t})),r}function gw(e){return function(t){var n=t.chart,r=t.options,o=r.conversionTag,i=r.filteredData||n.getOptions().data;if(o){var a=o.formatter;i.forEach((function(t,r){if(!(r<=0||Number.isNaN(t[lw]))){var l=e(t,r,i,{top:!0,name:pw,text:{content:(0,E.mf)(a)?a(t,i):a,offsetX:o.offsetX,offsetY:o.offsetY,position:"end",autoRotate:!1,style:(0,S.pi)({textAlign:"start",textBaseline:"middle"},o.style)}});n.annotation().line(l)}}))}return t}}function mw(e){var t=e.chart,n=e.options,r=n.data,o=void 0===r?[]:r,i=hw(o,o,{yField:n.yField,maxSize:n.maxSize,minSize:n.minSize});return t.data(i),e}function vw(e){var t=e.chart,n=e.options,r=n.xField,o=n.yField,i=n.color,a=n.tooltip,l=n.label,s=n.shape,c=void 0===s?"funnel":s,u=n.funnelStyle,d=n.state,f=Qb(a,[r,o]),p=f.fields,h=f.formatter;return nx({chart:t,options:{type:"interval",xField:r,yField:lw,colorField:r,tooltipFields:(0,E.kJ)(p)&&p.concat([aw,sw]),mapping:{shape:c,tooltip:h,color:i,style:u},label:l,state:d}}),ob(e.chart,"interval").adjust("symmetric"),e}function yw(e){var t=e.chart,n=e.options.isTransposed;return t.coordinate({type:"rect",actions:n?[]:[["transpose"],["scale",1,-1]]}),e}function bw(e){var t=e.options,n=e.chart,r=t.maxSize,o=(0,E.U2)(n,["geometries","0","dataArray"],[]),i=(0,E.U2)(n,["options","data","length"]),a=(0,E.UI)(o,(function(e){return(0,E.U2)(e,["0","nextPoints","0","x"])*i-.5}));return gw((function(e,t,n,o){var i=r-(r-e[lw])/2;return(0,S.pi)((0,S.pi)({},o),{start:[a[t-1]||t-.5,i],end:[a[t-1]||t-.5,i+.05]})}))(e),e}function xw(e){return rb(mw,vw,yw,bw)(e)}function ww(e){var t,n=e.chart,r=e.options,o=r.data,i=void 0===o?[]:o,a=r.yField;return n.data(i),n.scale(((t={})[a]={sync:!0},t)),e}function Sw(e){var t=e.chart,n=e.options,r=n.data,o=n.xField,i=n.yField,a=n.color,l=n.compareField,s=n.isTransposed,c=n.tooltip,u=n.maxSize,d=n.minSize,f=n.label,p=n.funnelStyle,h=n.state,g=n.showFacetTitle;return t.facet("mirror",{fields:[l],transpose:!s,padding:s?0:[32,0,0,0],showTitle:g,eachView:function(e,t){var n=s?t.rowIndex:t.columnIndex;s||e.coordinate({type:"rect",actions:[["transpose"],["scale",0===n?-1:1,-1]]});var g=hw(t.data,r,{yField:i,maxSize:u,minSize:d});e.data(g);var m=Qb(c,[o,i,l]),v=m.fields,y=m.formatter,b=s?{offset:0===n?10:-23,position:0===n?"bottom":"top"}:{offset:10,position:"left",style:{textAlign:0===n?"end":"start"}};nx({chart:e,options:{type:"interval",xField:o,yField:lw,colorField:o,tooltipFields:(0,E.kJ)(v)&&v.concat([aw,sw]),mapping:{shape:"funnel",tooltip:y,color:a,style:p},label:!1!==f&&tb({},b,f),state:h}})}}),e}function Ew(e){var t=e.chart,n=e.index,r=e.options,o=r.conversionTag,i=r.isTransposed;((0,E.hj)(n)?[t]:t.views).forEach((function(e,t){var a=(0,E.U2)(e,["geometries","0","dataArray"],[]),l=(0,E.U2)(e,["options","data","length"]),s=(0,E.UI)(a,(function(e){return(0,E.U2)(e,["0","nextPoints","0","x"])*l-.5}));gw((function(e,r,a,l){var c=0===(n||t)?-1:1;return tb({},l,{start:[s[r-1]||r-.5,e[lw]],end:[s[r-1]||r-.5,e[lw]+.05],text:i?{style:{textAlign:"start"}}:{offsetX:!1!==o?c*o.offsetX:0,style:{textAlign:0===(n||t)?"end":"start"}}})}))(tb({},{chart:e,options:r}))}))}function Cw(e){return e.chart.once("beforepaint",(function(){return Ew(e)})),e}function kw(e){var t=e.chart,n=e.options,r=n.data,o=void 0===r?[]:r,i=n.yField,a=(0,E.u4)(o,(function(e,t){return e+(t[i]||0)}),0),l=(0,E.UT)(o,i)[i],s=(0,E.UI)(o,(function(e,t){var n=[],r=[];if(e[cw]=(e[i]||0)/a,t){var s=o[t-1][uw],c=o[t-1][dw];n[0]=s[3],r[0]=c[3],n[1]=s[2],r[1]=c[2]}else n[0]=-.5,r[0]=1,n[1]=.5,r[1]=1;return r[2]=r[1]-e[cw],n[2]=(r[2]+1)/4,r[3]=r[2],n[3]=-n[2],e[uw]=n,e[dw]=r,e[aw]=(e[i]||0)/l,e[sw]=[(0,E.U2)(o,[t-1,i]),e[i]],e}));return t.data(s),e}function Ow(e){var t=e.chart,n=e.options,r=n.xField,o=n.yField,i=n.color,a=n.tooltip,l=n.label,s=n.funnelStyle,c=n.state,u=Qb(a,[r,o]),d=u.fields,f=u.formatter;return nx({chart:t,options:{type:"polygon",xField:uw,yField:dw,colorField:r,tooltipFields:(0,E.kJ)(d)&&d.concat([aw,sw]),label:l,state:c,mapping:{tooltip:f,color:i,style:s}}}),e}function Mw(e){var t=e.chart,n=e.options.isTransposed;return t.coordinate({type:"rect",actions:n?[["transpose"],["reflect","x"]]:[]}),e}function Iw(e){return gw((function(e,t,n,r){return(0,S.pi)((0,S.pi)({},r),{start:[e[uw][1],e[dw][1]],end:[e[uw][1]+.05,e[dw][1]]})}))(e),e}function $w(e){var t,n=e.chart,r=e.options,o=r.data,i=void 0===o?[]:o,a=r.yField;return n.data(i),n.scale(((t={})[a]={sync:!0},t)),e}function _w(e){var t=e.chart,n=e.options,r=n.seriesField,o=n.isTransposed,i=n.showFacetTitle;return t.facet("rect",{fields:[r],padding:[o?0:32,10,0,10],showTitle:i,eachView:function(t,n){xw(tb({},e,{chart:t,options:{data:n.data}}))}}),e}var Pw=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendering=!1,t}return(0,S.ZT)(t,e),t.prototype.change=function(e){var t=this;if(!this.rendering){var n=e.seriesField,r=e.compareField,o=r?Ew:bw,i=this.context.view,a=n||r?i.views:[i];(0,E.UI)(a,(function(n,r){var i=n.getController("annotation"),a=(0,E.hX)((0,E.U2)(i,["option"],[]),(function(e){return e.name!==pw}));i.clear(!0),(0,E.S6)(a,(function(e){"object"==typeof e&&n.annotation()[e.type](e)}));var l=(0,E.U2)(n,["filteredData"],n.getOptions().data);o({chart:n,index:r,options:(0,S.pi)((0,S.pi)({},e),{filteredData:hw(l,l,e)})}),n.filterData(l),t.rendering=!0,n.render(!0)}))}this.rendering=!1},t}(Xs),Aw="funnel-conversion-tag",Nw="funnel-afterrender",Tw={trigger:"afterrender",action:"".concat(Aw,":change")};function Rw(e){var t,n=e.options,r=n.compareField,o=n.xField,i=n.yField,a=n.locale,l=n.funnelStyle,s=n.data,c=Jb(a);return(r||l)&&(t=function(e){return tb({},r&&{lineWidth:1,stroke:"#fff"},(0,E.mf)(l)?l(e):l)}),tb({options:{label:r?{fields:[o,i,r,aw,sw],formatter:function(e){return"".concat(e[i])}}:{fields:[o,i,aw,sw],offset:0,position:"middle",formatter:function(e){return"".concat(e[o]," ").concat(e[i])}},tooltip:{title:o,formatter:function(e){return{name:e[o],value:e[i]}}},conversionTag:{formatter:function(e){return"".concat(c.get(["conversionTag","label"]),": ").concat(jx.apply(void 0,e[sw]))}}}},e,{options:{funnelStyle:t,data:(0,E.d9)(s)}})}function Lw(e){var t=e.options,n=t.compareField,r=t.dynamicHeight;return t.seriesField?function(e){return rb($w,_w)(e)}(e):n?function(e){return rb(ww,Sw,Cw)(e)}(e):r?function(e){return rb(kw,Ow,Mw,Iw)(e)}(e):xw(e)}function Dw(e){var t,n=e.options,r=n.xAxis,o=n.yAxis,i=n.xField,a=n.yField;return rb(Vb(((t={})[i]=r,t[a]=o,t)))(e)}function jw(e){return e.chart.axis(!1),e}function Fw(e){var t=e.chart,n=e.options.legend;return!1===n?t.legend(!1):t.legend(n),e}function Bw(e){var t=e.chart,n=e.options,r=n.interactions,o=n.dynamicHeight;return(0,E.S6)(r,(function(e){!1===e.enable?t.removeInteraction(e.type):t.interaction(e.type,e.cfg||{})})),o?t.removeInteraction(Nw):t.interaction(Nw,{start:[(0,S.pi)((0,S.pi)({},Tw),{arg:n})]}),e}function zw(e){return rb(Rw,Lw,Dw,jw,jb,Bw,Fw,Bb,zb,Xb())(e)}Ks(Aw,Pw),Xc(Nw,{start:[Tw]});var Hw,Uw=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="funnel",t}return(0,S.ZT)(t,e),t.getDefaultOptions=function(){return fw},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return zw},t.prototype.setState=function(e,t,n){void 0===n&&(n=!0);var r=ab(this.chart);(0,E.S6)(r,(function(r){t(r.getData())&&r.setState(e,n)}))},t.prototype.getStates=function(){var e=ab(this.chart),t=[];return(0,E.S6)(e,(function(e){var n=e.getData(),r=e.getStates();(0,E.S6)(r,(function(r){t.push({data:n,state:r,geometry:e.geometry,element:e})}))})),t},t.CONVERSATION_FIELD=sw,t.PERCENT_FIELD=aw,t.TOTAL_PERCENT_FIELD=cw,t}(px),Ww="range",Vw="type",Xw="percent",qw="#f0f0f0",Gw="indicator-view",Yw="range-view",Kw={percent:0,range:{ticks:[]},innerRadius:.9,radius:.95,startAngle:-7/6*Math.PI,endAngle:1/6*Math.PI,syncViewPadding:!0,axis:{line:null,label:{offset:-24,style:{textAlign:"center",textBaseline:"middle"}},subTickLine:{length:-8},tickLine:{length:-12},grid:null},indicator:{pointer:{style:{lineWidth:5,lineCap:"round"}},pin:{style:{r:9.75,lineWidth:4.5,fill:"#fff"}}},statistic:{title:!1},meta:(Hw={},Hw[Ww]={sync:"v"},Hw[Xw]={sync:"v",tickCount:5,tickInterval:.2},Hw),animation:!1};function Zw(e){var t;return[(t={},t[Xw]=(0,E.uZ)(e,0,1),t)]}function Jw(e,t){var n=(0,E.U2)(t,["ticks"],[]),r=(0,E.dp)(n)?(0,E.jj)(n):[0,(0,E.uZ)(e,0,1),1];return r[0]||r.shift(),function(e,t){return e.map((function(n,r){var o;return(o={})[Ww]=n-(e[r-1]||0),o[Vw]="".concat(r),o[Xw]=t,o}))}(r,e)}function Qw(e){var t=e.chart,n=e.options,r=n.percent,o=n.range,i=n.radius,a=n.innerRadius,l=n.startAngle,s=n.endAngle,c=n.axis,u=n.indicator,d=n.gaugeStyle,f=n.type,p=n.meter,h=o.color,g=o.width;if(u){var m=Zw(r),v=t.createView({id:Gw});v.data(m),v.point().position("".concat(Xw,"*1")).shape(u.shape||"gauge-indicator").customInfo({defaultColor:t.getTheme().defaultColor,indicator:u}),v.coordinate("polar",{startAngle:l,endAngle:s,radius:a*i}),v.axis(Xw,c),v.scale(Xw,Vy(c,zy))}var y=Jw(r,n.range),b=t.createView({id:Yw});b.data(y);var x=(0,E.HD)(h)?[h,qw]:h;return ix({chart:b,options:{xField:"1",yField:Ww,seriesField:Vw,rawFields:[Xw],isStack:!0,interval:{color:x,style:d,shape:"meter"===f?"meter-gauge":null},args:{zIndexReversed:!0,sortZIndex:!0},minColumnWidth:g,maxColumnWidth:g}}).ext.geometry.customInfo({meter:p}),b.coordinate("polar",{innerRadius:a,radius:i,startAngle:l,endAngle:s}).transpose(),e}function eS(e){var t;return rb(Vb(((t={range:{min:0,max:1,maxLimit:1,minLimit:0}})[Xw]={},t)))(e)}function tS(e,t){var n=e.chart,r=e.options,o=r.statistic,i=r.percent;if(n.getController("annotation").clear(!0),o){var a=o.content,l=void 0;a&&(l=tb({},{content:"".concat((100*i).toFixed(2),"%"),style:{opacity:.75,fontSize:"30px",lineHeight:1,textAlign:"center",color:"rgba(44,53,66,0.85)"}},a)),yb(n,{statistic:(0,S.pi)((0,S.pi)({},o),{content:l})},{percent:i})}return t&&n.render(!0),e}function nS(e){var t=e.chart,n=e.options.tooltip;return n?t.tooltip(tb({showTitle:!1,showMarkers:!1,containerTpl:'',domStyles:{"g2-tooltip":{padding:"4px 8px",fontSize:"10px"}},customContent:function(e,t){var n=(0,E.U2)(t,[0,"data",Xw],0);return"".concat((100*n).toFixed(2),"%")}},n)):t.tooltip(!1),e}function rS(e){return e.chart.legend(!1),e}function oS(e){return rb(zb,Bb,Qw,eS,nS,tS,Fb,Xb(),rS)(e)}rd("point","gauge-indicator",{draw:function(e,t){var n=e.customInfo,r=n.indicator,o=n.defaultColor,i=r,a=i.pointer,l=i.pin,s=t.addGroup(),c=this.parsePoint({x:0,y:0});return a&&s.addShape("line",{name:"pointer",attrs:(0,S.pi)({x1:c.x,y1:c.y,x2:e.x,y2:e.y,stroke:o},a.style)}),l&&s.addShape("circle",{name:"pin",attrs:(0,S.pi)({x:c.x,y:c.y,stroke:o},l.style)}),s}}),rd("interval","meter-gauge",{draw:function(e,t){var n=e.customInfo.meter,r=void 0===n?{}:n,o=r.steps,i=void 0===o?50:o,a=r.stepRatio,l=void 0===a?.5:a;i=i<1?1:i,l=(0,E.uZ)(l,0,1);var s=this.coordinate,c=s.startAngle,u=s.endAngle,d=0;l>0&&l<1&&(d=(u-c)/i/(l/(1-l)+1-1/i));for(var f=d/(1-l)*l,p=t.addGroup(),h=this.coordinate.getCenter(),g=this.coordinate.getRadius(),m=Hd.getAngle(e,this.coordinate),v=m.startAngle,y=m.endAngle,b=v;b1?s/(r-1):l.max),!n&&!r){var u=function(e){return Math.ceil(Math.log(e.length)/Math.LN2)+1}(a);c=s/u}var d={},f=(0,E.vM)(i,o);(0,E.xb)(f)?(0,E.S6)(i,(function(e){var n=aS(e[t],c,r),o="".concat(n[0],"-").concat(n[1]);(0,E.wH)(d,o)||(d[o]={range:n,count:0}),d[o].count+=1})):Object.keys(f).forEach((function(e){(0,E.S6)(f[e],(function(n){var i=aS(n[t],c,r),a="".concat(i[0],"-").concat(i[1]),l="".concat(a,"-").concat(e);(0,E.wH)(d,l)||(d[l]={range:i,count:0},d[l][o]=e),d[l].count+=1}))}));var p=[];return(0,E.S6)(d,(function(e){p.push(e)})),p}var sS="range",cS="count",uS=tb({},px.getDefaultOptions(),{columnStyle:{stroke:"#FFFFFF"},tooltip:{shared:!0,showMarkers:!1},interactions:[{type:"active-region"}]});function dS(e){var t=e.chart,n=e.options,r=n.data,o=n.binField,i=n.binNumber,a=n.binWidth,l=n.color,s=n.stackField,c=n.legend,u=n.columnStyle,d=lS(r,o,a,i,s);return t.data(d),ix(tb({},e,{options:{xField:sS,yField:cS,seriesField:s,isStack:!0,interval:{color:l,style:u}}})),c&&s?t.legend(s,c):t.legend(!1),e}function fS(e){var t,n=e.options,r=n.xAxis,o=n.yAxis;return rb(Vb(((t={})[sS]=r,t[cS]=o,t)))(e)}function pS(e){var t=e.chart,n=e.options,r=n.xAxis,o=n.yAxis;return!1===r?t.axis(sS,!1):t.axis(sS,r),!1===o?t.axis(cS,!1):t.axis(cS,o),e}function hS(e){var t=e.chart,n=e.options.label,r=ob(t,"interval");if(n){var o=n.callback,i=(0,S._T)(n,["callback"]);r.label({fields:[cS],callback:o,cfg:lb(i)})}else r.label(!1);return e}function gS(e){return rb(zb,Lb("columnStyle"),dS,fS,pS,Hb,hS,jb,Fb,Bb)(e)}var mS=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="histogram",t}return(0,S.ZT)(t,e),t.getDefaultOptions=function(){return uS},t.prototype.changeData=function(e){this.updateOption({data:e});var t=this.options,n=t.binField,r=t.binNumber,o=t.binWidth,i=t.stackField;this.chart.changeData(lS(e,n,o,r,i))},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return gS},t}(px),vS=tb({},px.getDefaultOptions(),{tooltip:{shared:!0,showMarkers:!0,showCrosshairs:!0,crosshairs:{type:"x"}},legend:{position:"top-left",radio:{}},isStack:!1}),yS=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.active=function(){var e=this.getView(),t=this.context.event;if(t.data){var n=t.data.items,r=e.geometries.filter((function(e){return"point"===e.type}));(0,E.S6)(r,(function(e){(0,E.S6)(e.elements,(function(e){var t=-1!==(0,E.cx)(n,(function(t){return t.data===e.data}));e.setState("active",t)}))}))}},t.prototype.reset=function(){var e=this.getView().geometries.filter((function(e){return"point"===e.type}));(0,E.S6)(e,(function(e){(0,E.S6)(e.elements,(function(e){e.setState("active",!1)}))}))},t.prototype.getView=function(){return this.context.view},t}(Xs);Ks("marker-active",yS),Xc("marker-active",{start:[{trigger:"tooltip:show",action:"marker-active:active"}],end:[{trigger:"tooltip:hide",action:"marker-active:reset"}]});var bS=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="line",t}return(0,S.ZT)(t,e),t.getDefaultOptions=function(){return vS},t.prototype.changeData=function(e){this.updateOption({data:e}),vx({chart:this.chart,options:this.options}),this.chart.changeData(e)},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return Ex},t}(px),xS=tb({},px.getDefaultOptions(),{legend:{position:"right",radio:{}},tooltip:{shared:!1,showTitle:!1,showMarkers:!1},label:{layout:{type:"limit-in-plot",cfg:{action:"ellipsis"}}},pieStyle:{stroke:"white",lineWidth:1},statistic:{title:{style:{fontWeight:300,color:"#4B535E",textAlign:"center",fontSize:"20px",lineHeight:1}},content:{style:{fontWeight:"bold",color:"rgba(44,53,66,0.85)",textAlign:"center",fontSize:"32px",lineHeight:1}}},theme:{components:{annotation:{text:{animate:!1}}}}}),wS=[1,0,0,0,1,0,0,0,1];function SS(e,t){var n=t?(0,S.ev)([],t,!0):(0,S.ev)([],wS,!0);return Hd.transform(n,e)}var ES=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.getActiveElements=function(){var e=Hd.getDelegationObject(this.context);if(e){var t=this.context.view,n=e.component,r=e.item,o=n.get("field");if(o)return t.geometries[0].elements.filter((function(e){return e.getModel().data[o]===r.value}))}return[]},t.prototype.getActiveElementLabels=function(){var e=this.context.view,t=this.getActiveElements();return e.geometries[0].labelsContainer.getChildren().filter((function(e){return t.find((function(t){return(0,E.Xy)(t.getData(),e.get("data"))}))}))},t.prototype.transfrom=function(e){void 0===e&&(e=7.5);var t=this.getActiveElements(),n=this.getActiveElementLabels();t.forEach((function(t,r){var o=n[r],i=t.geometry.coordinate;if(i.isPolar&&i.isTransposed){var a=Hd.getAngle(t.getModel(),i),l=(a.startAngle+a.endAngle)/2,s=e,c=s*Math.cos(l),u=s*Math.sin(l);t.shape.setMatrix(SS([["t",c,u]])),o.setMatrix(SS([["t",c,u]]))}}))},t.prototype.active=function(){this.transfrom()},t.prototype.reset=function(){this.transfrom(0)},t}(Xs),CS=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.getAnnotations=function(e){return(e||this.context.view).getController("annotation").option},t.prototype.getInitialAnnotation=function(){return this.initialAnnotation},t.prototype.init=function(){var e=this,t=this.context.view;t.removeInteraction("tooltip"),t.on("afterchangesize",(function(){var n=e.getAnnotations(t);e.initialAnnotation=n}))},t.prototype.change=function(e){var t=this.context,n=t.view,r=t.event;this.initialAnnotation||(this.initialAnnotation=this.getAnnotations());var o=(0,E.U2)(r,["data","data"]);if(r.type.match("legend-item")){var i=Hd.getDelegationObject(this.context),a=n.getGroupedFields()[0];if(i&&a){var l=i.item;o=n.getData().find((function(e){return e[a]===l.value}))}}if(o){var s=(0,E.U2)(e,"annotations",[]),c=(0,E.U2)(e,"statistic",{});n.getController("annotation").clear(!0),(0,E.S6)(s,(function(e){"object"==typeof e&&n.annotation()[e.type](e)})),vb(n,{statistic:c,plotType:"pie"},o),n.render(!0)}var u,d,f=((d=this.context.event.target)&&(u=d.get("element")),u);f&&f.shape.toFront()},t.prototype.reset=function(){var e=this.context.view;e.getController("annotation").clear(!0);var t=this.getInitialAnnotation();(0,E.S6)(t,(function(t){e.annotation()[t.type](t)})),e.render(!0)},t}(Xs),kS="pie-statistic";function OS(e,t){var n;switch(e){case"inner":return n="-30%",(0,E.HD)(t)&&t.endsWith("%")?.01*parseFloat(t)>0?n:t:t<0?t:n;case"outer":return n=12,(0,E.HD)(t)&&t.endsWith("%")?.01*parseFloat(t)<0?n:t:t>0?t:n;default:return t}}function MS(e,t){return(0,E.yW)(Gy(e,t),(function(e){return 0===e[t]}))}function IS(e){var t=e.chart,n=e.options,r=n.data,o=n.angleField,i=n.colorField,a=n.color,l=n.pieStyle,s=n.shape,c=Gy(r,o);if(MS(c,o)){var u="$$percentage$$";c=c.map((function(e){var t;return(0,S.pi)((0,S.pi)({},e),((t={})[u]=1/c.length,t))})),t.data(c),ix(tb({},e,{options:{xField:"1",yField:u,seriesField:i,isStack:!0,interval:{color:a,shape:s,style:l},args:{zIndexReversed:!0,sortZIndex:!0}}}))}else t.data(c),ix(tb({},e,{options:{xField:"1",yField:o,seriesField:i,isStack:!0,interval:{color:a,shape:s,style:l},args:{zIndexReversed:!0,sortZIndex:!0}}}));return e}function $S(e){var t,n=e.chart,r=e.options,o=r.meta,i=r.colorField,a=tb({},o);return n.scale(a,((t={})[i]={type:"cat"},t)),e}function _S(e){var t=e.chart,n=e.options,r=n.radius,o=n.innerRadius,i=n.startAngle,a=n.endAngle;return t.coordinate({type:"theta",cfg:{radius:r,innerRadius:o,startAngle:i,endAngle:a}}),e}function PS(e){var t=e.chart,n=e.options,r=n.label,o=n.colorField,i=n.angleField,a=t.geometries[0];if(r){var l=r.callback,s=lb((0,S._T)(r,["callback"]));if(s.content){var c=s.content;s.content=function(e,n,r){var a=e[o],l=e[i],s=t.getScaleByField(i),u=null==s?void 0:s.scale(l);return(0,E.mf)(c)?c((0,S.pi)((0,S.pi)({},e),{percent:u}),n,r):(0,E.HD)(c)?bb(c,{value:l,name:a,percentage:(0,E.hj)(u)&&!(0,E.UM)(l)?"".concat((100*u).toFixed(2),"%"):null}):c}}var u=s.type?{inner:"",outer:"pie-outer",spider:"pie-spider"}[s.type]:"pie-outer",d=s.layout?(0,E.kJ)(s.layout)?s.layout:[s.layout]:[];s.layout=(u?[{type:u}]:[]).concat(d),a.label({fields:o?[i,o]:[i],callback:l,cfg:(0,S.pi)((0,S.pi)({},s),{offset:OS(s.type,s.offset),type:"pie"})})}else a.label(!1);return e}function AS(e){var t=e.innerRadius,n=e.statistic,r=e.angleField,o=e.colorField,i=e.meta,a=Jb(e.locale);if(t&&n){var l=tb({},xS.statistic,n),s=l.title,c=l.content;return!1!==s&&(s=tb({},{formatter:function(e){var t=e?e[o]:(0,E.UM)(s.content)?a.get(["statistic","total"]):s.content;return((0,E.U2)(i,[o,"formatter"])||function(e){return e})(t)}},s)),!1!==c&&(c=tb({},{formatter:function(e,t){var n=e?e[r]:function(e,t){var n=null;return(0,E.S6)(e,(function(e){"number"==typeof e[t]&&(n+=e[t])})),n}(t,r),o=(0,E.U2)(i,[r,"formatter"])||function(e){return e};return e||(0,E.UM)(c.content)?o(n):c.content}},c)),tb({},{statistic:{title:s,content:c}},e)}return e}function NS(e){var t=e.chart,n=AS(e.options),r=n.innerRadius,o=n.statistic;return t.getController("annotation").clear(!0),rb(Xb())(e),r&&o&&vb(t,{statistic:o,plotType:"pie"}),e}function TS(e){var t=e.chart,n=e.options,r=n.tooltip,o=n.colorField,i=n.angleField,a=n.data;if(!1===r)t.tooltip(r);else if(t.tooltip(tb({},r,{shared:!1})),MS(a,i)){var l=(0,E.U2)(r,"fields"),s=(0,E.U2)(r,"formatter");(0,E.xb)((0,E.U2)(r,"fields"))&&(l=[o,i],s=s||function(e){return{name:e[o],value:(0,E.BB)(e[i])}}),t.geometries[0].tooltip(l.join("*"),tx(l,s))}return e}function RS(e){var t=e.chart,n=AS(e.options),r=n.interactions,o=n.statistic,i=n.annotations;return(0,E.S6)(r,(function(e){var n,r;if(!1===e.enable)t.removeInteraction(e.type);else if("pie-statistic-active"===e.type){var a=[];(null===(n=e.cfg)||void 0===n?void 0:n.start)||(a=[{trigger:"element:mouseenter",action:"".concat(kS,":change"),arg:{statistic:o,annotations:i}}]),(0,E.S6)(null===(r=e.cfg)||void 0===r?void 0:r.start,(function(e){a.push((0,S.pi)((0,S.pi)({},e),{arg:{statistic:o,annotations:i}}))})),t.interaction(e.type,tb({},e.cfg,{start:a}))}else t.interaction(e.type,e.cfg||{})})),e}function LS(e){return rb(Lb("pieStyle"),IS,$S,zb,_S,Db,TS,PS,Hb,NS,RS,Bb)(e)}Ks(kS,CS),Xc("pie-statistic-active",{start:[{trigger:"element:mouseenter",action:"pie-statistic:change"}],end:[{trigger:"element:mouseleave",action:"pie-statistic:reset"}]}),Ks("pie-legend",ES),Xc("pie-legend-active",{start:[{trigger:"legend-item:mouseenter",action:"pie-legend:active"}],end:[{trigger:"legend-item:mouseleave",action:"pie-legend:reset"}]});var DS=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="pie",t}return(0,S.ZT)(t,e),t.getDefaultOptions=function(){return xS},t.prototype.changeData=function(e){this.chart.emit(C.BEFORE_CHANGE_DATA,Eu.fromData(this.chart,C.BEFORE_CHANGE_DATA,null));var t=this.options,n=this.options.angleField,r=Gy(t.data,n),o=Gy(e,n);MS(r,n)||MS(o,n)?this.update({data:e}):(this.updateOption({data:e}),this.chart.data(o),NS({chart:this.chart,options:this.options}),this.chart.render(!0)),this.chart.emit(C.AFTER_CHANGE_DATA,Eu.fromData(this.chart,C.AFTER_CHANGE_DATA,null))},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return LS},t}(px),jS=["#FAAD14","#E8EDF3"],FS={percent:.2,color:jS,animation:{}};function BS(e){var t=(0,E.uZ)(cb(e)?e:0,0,1);return[{current:"".concat(t),type:"current",percent:t},{current:"".concat(t),type:"target",percent:1}]}function zS(e){var t=e.chart,n=e.options,r=n.percent,o=n.progressStyle,i=n.color,a=n.barWidthRatio;return t.data(BS(r)),ix(tb({},e,{options:{xField:"current",yField:"percent",seriesField:"type",widthRatio:a,interval:{style:o,color:(0,E.HD)(i)?[i,jS[1]]:i},args:{zIndexReversed:!0,sortZIndex:!0}}})),t.tooltip(!1),t.axis(!1),t.legend(!1),e}function HS(e){return e.chart.coordinate("rect").transpose(),e}function US(e){return rb(zS,Vb({}),HS,Bb,zb,Xb())(e)}var WS=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="process",t}return(0,S.ZT)(t,e),t.getDefaultOptions=function(){return FS},t.prototype.changeData=function(e){this.updateOption({percent:e}),this.chart.changeData(BS(e))},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return US},t}(px);function VS(e){var t=e.chart,n=e.options,r=n.innerRadius,o=n.radius;return t.coordinate("theta",{innerRadius:r,radius:o}),e}function XS(e,t){var n=e.chart,r=e.options,o=r.innerRadius,i=r.statistic,a=r.percent,l=r.meta;if(n.getController("annotation").clear(!0),o&&i){var s=(0,E.U2)(l,["percent","formatter"])||function(e){return"".concat((100*e).toFixed(2),"%")},c=i.content;c&&(c=tb({},c,{content:(0,E.UM)(c.content)?s(a):c.content})),vb(n,{statistic:(0,S.pi)((0,S.pi)({},i),{content:c}),plotType:"ring-progress"},{percent:a})}return t&&n.render(!0),e}function qS(e){return rb(zS,Vb({}),VS,XS,Bb,zb,Xb())(e)}var GS={percent:.2,innerRadius:.8,radius:.98,color:["#FAAD14","#E8EDF3"],statistic:{title:!1,content:{style:{fontSize:"14px",fontWeight:300,fill:"#4D4D4D",textAlign:"center",textBaseline:"middle"}}},animation:{}},YS=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="ring-process",t}return(0,S.ZT)(t,e),t.getDefaultOptions=function(){return GS},t.prototype.changeData=function(e){this.chart.emit(C.BEFORE_CHANGE_DATA,Eu.fromData(this.chart,C.BEFORE_CHANGE_DATA,null)),this.updateOption({percent:e}),this.chart.data(BS(e)),XS({chart:this.chart,options:this.options},!0),this.chart.emit(C.AFTER_CHANGE_DATA,Eu.fromData(this.chart,C.AFTER_CHANGE_DATA,null))},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return qS},t}(px),KS=n(740),ZS={exp:KS.regressionExp,linear:KS.regressionLinear,loess:KS.regressionLoess,log:KS.regressionLog,poly:KS.regressionPoly,pow:KS.regressionPow,quad:KS.regressionQuad},JS=function(e,t){var n=t.view,r=t.options,o=r.xField,i=r.yField,a=n.getScaleByField(o),l=n.getScaleByField(i);return pb(e.map((function(e){return n.getCoordinate().convert({x:a.scale(e[0]),y:l.scale(e[1])})})),!1)},QS=function(e){var t,n=e.options,r=n.xField,o=n.yField,i=n.data,a=n.regressionLine,l=a.type,s=void 0===l?"linear":l,c=a.algorithm,u=a.equation,d=null;return c?(t=(0,E.kJ)(c)?c:c(i),d=u):d=function(e,t){var n,r,o,i=function(e){return Number.isFinite(e)?(t=e,void 0===n&&(n=4),Math.round(t*Math.pow(10,n))/Math.pow(10,n)):"?";var t,n};switch(e){case"linear":return"y = ".concat(i(t.a),"x + ").concat(i(t.b),", R^2 = ").concat(i(t.rSquared));case"exp":return"y = ".concat(i(t.a),"e^(").concat(i(t.b),"x), R^2 = ").concat(i(t.rSquared));case"log":return"y = ".concat(i(t.a),"ln(x) + ").concat(i(t.b),", R^2 = ").concat(i(t.rSquared));case"quad":return"y = ".concat(i(t.a),"x^2 + ").concat(i(t.b),"x + ").concat(i(t.c),", R^2 = ").concat(i(t.rSquared));case"poly":for(var a="y = ".concat(i(null===(n=t.coefficients)||void 0===n?void 0:n[0])," + ").concat(i(null===(r=t.coefficients)||void 0===r?void 0:r[1]),"x + ").concat(i(null===(o=t.coefficients)||void 0===o?void 0:o[2]),"x^2"),l=3;l0,u=s>0;function d(e,t){var n=(0,E.U2)(r,[e]);function o(e){return(0,E.U2)(n,e)}var i={};return"x"===t?((0,E.hj)(l)&&((0,E.hj)(o("min"))||(i.min=c?0:2*l),(0,E.hj)(o("max"))||(i.max=c?2*l:0)),i):((0,E.hj)(s)&&((0,E.hj)(o("min"))||(i.min=u?0:2*s),(0,E.hj)(o("max"))||(i.max=u?2*s:0)),i)}return(0,S.pi)((0,S.pi)({},r),((t={})[o]=(0,S.pi)((0,S.pi)({},r[o]),d(o,"x")),t[i]=(0,S.pi)((0,S.pi)({},r[i]),d(i,"y")),t))};function tE(e){var t=e.data,n=void 0===t?[]:t,r=e.xField,o=e.yField;if(n.length){for(var i=!0,a=!0,l=n[0],s=void 0,c=1;c',itemTpl:"{value}",domStyles:{"g2-tooltip":{padding:"2px 4px",fontSize:"10px"}},showCrosshairs:!0,crosshairs:{type:"x"}},_E={appendPadding:2,tooltip:(0,S.pi)({},$E),animation:{}};function PE(e){var t=e.chart,n=e.options,r=n.data,o=n.color,i=n.areaStyle,a=n.point,l=n.line,s=null==a?void 0:a.state,c=OE(r);t.data(c);var u=tb({},e,{options:{xField:ME,yField:IE,area:{color:o,style:i},line:l,point:a}}),d=tb({},u,{options:{tooltip:!1}}),f=tb({},u,{options:{tooltip:!1,state:s}});return rx(u),ax(d),lx(f),t.axis(!1),t.legend(!1),e}function AE(e){var t,n,r=e.options,o=r.xAxis,i=r.yAxis,a=OE(r.data);return rb(Vb(((t={})[ME]=o,t[IE]=i,t),((n={})[ME]={type:"cat"},n[IE]=Xy(a,IE),n)))(e)}function NE(e){return rb(Lb("areaStyle"),PE,AE,jb,zb,Bb,Xb())(e)}var TE={appendPadding:2,tooltip:(0,S.pi)({},$E),color:"l(90) 0:#E5EDFE 1:#ffffff",areaStyle:{fillOpacity:.6},line:{size:1,color:"#5B8FF9"},animation:{}},RE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="tiny-area",t}return(0,S.ZT)(t,e),t.getDefaultOptions=function(){return TE},t.prototype.changeData=function(e){this.updateOption({data:e});var t=this.chart;AE({chart:t,options:this.options}),t.changeData(OE(e))},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return NE},t}(px);function LE(e){var t=e.chart,n=e.options,r=n.data,o=n.color,i=n.columnStyle,a=n.columnWidthRatio,l=OE(r);return t.data(l),ix(tb({},e,{options:{xField:ME,yField:IE,widthRatio:a,interval:{style:i,color:o}}})),t.axis(!1),t.legend(!1),t.interaction("element-active"),e}function DE(e){return rb(zb,Lb("columnStyle"),LE,AE,jb,Bb,Xb())(e)}var jE={showTitle:!1,shared:!0,showMarkers:!1,customContent:function(e,t){return"".concat((0,E.U2)(t,[0,"data","y"],0))},containerTpl:'',itemTpl:"{value}",domStyles:{"g2-tooltip":{padding:"2px 4px",fontSize:"10px"}}},FE={appendPadding:2,tooltip:(0,S.pi)({},jE),animation:{}},BE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="tiny-column",t}return(0,S.ZT)(t,e),t.getDefaultOptions=function(){return FE},t.prototype.changeData=function(e){this.updateOption({data:e});var t=this.chart;AE({chart:t,options:this.options}),t.changeData(OE(e))},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return DE},t}(px);function zE(e){var t=e.chart,n=e.options,r=n.data,o=n.color,i=n.lineStyle,a=n.point,l=null==a?void 0:a.state,s=OE(r);t.data(s);var c=tb({},e,{options:{xField:ME,yField:IE,line:{color:o,style:i},point:a}}),u=tb({},c,{options:{tooltip:!1,state:l}});return ax(c),lx(u),t.axis(!1),t.legend(!1),e}function HE(e){return rb(zE,AE,zb,jb,Bb,Xb())(e)}var UE=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="tiny-line",t}return(0,S.ZT)(t,e),t.getDefaultOptions=function(){return _E},t.prototype.changeData=function(e){this.updateOption({data:e});var t=this.chart;AE({chart:t,options:this.options}),t.changeData(OE(e))},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return HE},t}(px),WE={line:Ex,pie:LS,column:Gx,bar:ew,area:Mx,gauge:oS,"tiny-line":HE,"tiny-column":DE,"tiny-area":NE,"ring-progress":qS,progress:US,scatter:uE,histogram:gS,funnel:zw,stock:CE},VE={line:bS,pie:DS,column:iw,bar:rw,area:$x,gauge:iS,"tiny-line":UE,"tiny-column":BE,"tiny-area":RE,"ring-progress":YS,progress:WS,scatter:fE,histogram:mS,funnel:Uw,stock:kE},XE={pie:{label:!1},column:{tooltip:{showMarkers:!1}},bar:{tooltip:{showMarkers:!1}}};function qE(e,t,n){var r=VE[e];r?(0,WE[e])({chart:t,options:tb({},r.getDefaultOptions(),(0,E.U2)(XE,e,{}),n)}):console.error("could not find ".concat(e," plot"))}function GE(e){var t=e.chart,n=e.options,r=n.views,o=n.legend;return(0,E.S6)(r,(function(e){var n=e.region,r=e.data,o=e.meta,i=e.axes,a=e.coordinate,l=e.interactions,s=e.annotations,c=e.tooltip,u=e.geometries,d=t.createView({region:n});d.data(r);var f={};i&&(0,E.S6)(i,(function(e,t){f[t]=Vy(e,zy)})),f=tb({},o,f),d.scale(f),i?(0,E.S6)(i,(function(e,t){d.axis(t,e)})):d.axis(!1),d.coordinate(a),(0,E.S6)(u,(function(e){var t=nx({chart:d,options:e}).ext,n=e.adjust;n&&t.geometry.adjust(n)})),(0,E.S6)(l,(function(e){!1===e.enable?d.removeInteraction(e.type):d.interaction(e.type,e.cfg)})),(0,E.S6)(s,(function(e){d.annotation()[e.type]((0,S.pi)({},e))})),"boolean"==typeof e.animation?d.animate(!1):(d.animate(!0),(0,E.S6)(d.geometries,(function(t){t.animate(e.animation)}))),c&&(d.interaction("tooltip"),d.tooltip(c))})),o?(0,E.S6)(o,(function(e,n){t.legend(n,e)})):t.legend(!1),t.tooltip(n.tooltip),e}function YE(e){var t=e.chart,n=e.options,r=n.plots,o=n.data,i=void 0===o?[]:o;return(0,E.S6)(r,(function(e){var n=e.type,r=e.region,o=e.options,a=void 0===o?{}:o,l=e.top,s=a.tooltip;if(l)qE(n,t,(0,S.pi)((0,S.pi)({},a),{data:i}));else{var c=t.createView((0,S.pi)({region:r},Vy(a,fx)));s&&c.interaction("tooltip"),qE(n,c,(0,S.pi)({data:i},a))}})),e}function KE(e){var t=e.chart,n=e.options;return t.option("slider",n.slider),e}function ZE(e){return rb(Bb,GE,YE,Fb,Bb,zb,jb,KE,Xb())(e)}var JE=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.getAssociationItems=function(e,t){var n,r=this.context.event,o=t||{},i=o.linkField,a=o.dim,l=[];if(null===(n=r.data)||void 0===n?void 0:n.data){var s=r.data.data;(0,E.S6)(e,(function(e){var t,n,r=i;if("x"===a?r=e.getXScale().field:"y"===a?r=null===(t=e.getYScales().find((function(e){return e.field===r})))||void 0===t?void 0:t.field:r||(r=null===(n=e.getGroupScales()[0])||void 0===n?void 0:n.field),r){var o=(0,E.UI)(ib(e),(function(t){var n=!1,o=!1,i=(0,E.kJ)(s)?(0,E.U2)(s[0],r):(0,E.U2)(s,r);return function(e,t){var n=e.getModel().data;return(0,E.kJ)(n)?n[0][t]:n[t]}(t,r)===i?n=!0:o=!0,{element:t,view:e,active:n,inactive:o}}));l.push.apply(l,o)}}))}return l},t.prototype.showTooltip=function(e){var t=Sb(this.context.view),n=this.getAssociationItems(t,e);(0,E.S6)(n,(function(e){if(e.active){var t=e.element.shape.getCanvasBBox();e.view.showTooltip({x:t.minX+t.width/2,y:t.minY+t.height/2})}}))},t.prototype.hideTooltip=function(){var e=Sb(this.context.view);(0,E.S6)(e,(function(e){e.hideTooltip()}))},t.prototype.active=function(e){var t=wb(this.context.view),n=this.getAssociationItems(t,e);(0,E.S6)(n,(function(e){var t=e.active,n=e.element;t&&n.setState("active",!0)}))},t.prototype.selected=function(e){var t=wb(this.context.view),n=this.getAssociationItems(t,e);(0,E.S6)(n,(function(e){var t=e.active,n=e.element;t&&n.setState("selected",!0)}))},t.prototype.highlight=function(e){var t=wb(this.context.view),n=this.getAssociationItems(t,e);(0,E.S6)(n,(function(e){var t=e.inactive,n=e.element;t&&n.setState("inactive",!0)}))},t.prototype.reset=function(){var e=wb(this.context.view);(0,E.S6)(e,(function(e){!function(e){var t=ib(e);(0,E.S6)(t,(function(e){e.hasState("active")&&e.setState("active",!1),e.hasState("selected")&&e.setState("selected",!1),e.hasState("inactive")&&e.setState("inactive",!1)}))}(e)}))},t}(Xs);Ks("association",JE),Xc("association-active",{start:[{trigger:"element:mouseenter",action:"association:active"}],end:[{trigger:"element:mouseleave",action:"association:reset"}]}),Xc("association-selected",{start:[{trigger:"element:mouseenter",action:"association:selected"}],end:[{trigger:"element:mouseleave",action:"association:reset"}]}),Xc("association-highlight",{start:[{trigger:"element:mouseenter",action:"association:highlight"}],end:[{trigger:"element:mouseleave",action:"association:reset"}]}),Xc("association-tooltip",{start:[{trigger:"element:mousemove",action:"association:showTooltip"}],end:[{trigger:"element:mouseleave",action:"association:hideTooltip"}]});var QE,eC=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="mix",t}return(0,S.ZT)(t,e),t.prototype.getSchemaAdaptor=function(){return ZE},t}(px);!function(e){e.DEV="DEV",e.BETA="BETA",e.STABLE="STABLE"}(QE||(QE={})),Object.defineProperty((function(){}),"MultiView",{get:function(){var e,t;return e=QE.STABLE,t="MultiView",console.warn(e===QE.DEV?"Plot '".concat(t,"' is in DEV stage, just give us issues."):e===QE.BETA?"Plot '".concat(t,"' is in BETA stage, DO NOT use it in production env."):e===QE.STABLE?"Plot '".concat(t,"' is in STABLE stage, import it by \"import { ").concat(t," } from '@antv/g2plot'\"."):"invalid Stage type."),eC},enumerable:!1,configurable:!0});var tC="first-axes-view",nC="second-axes-view",rC="series-field-key";function oC(e,t,n,r,o){var i=[];t.forEach((function(t){r.forEach((function(r){var o,a=((o={})[e]=r[e],o[n]=t,o[t]=r[t],o);i.push(a)}))}));var a=Object.values((0,E.vM)(i,n)),l=a[0],s=void 0===l?[]:l,c=a[1],u=void 0===c?[]:c;return o?[s.reverse(),u.reverse()]:[s,u]}function iC(e){return"vertical"!==e}function aC(e,t,n){var r=t[0],o=t[1],i=r.autoPadding,a=o.autoPadding,l=e.__axisPosition,s=l.layout,c=l.position;if(iC(s)&&"top"===c&&(r.autoPadding=n.instance(i.top,0,i.bottom,i.left),o.autoPadding=n.instance(a.top,i.left,a.bottom,0)),iC(s)&&"bottom"===c&&(r.autoPadding=n.instance(i.top,i.right/2+5,i.bottom,i.left),o.autoPadding=n.instance(a.top,a.right,a.bottom,i.right/2+5)),!iC(s)&&"bottom"===c){var u=i.left>=a.left?i.left:a.left;r.autoPadding=n.instance(i.top,i.right,i.bottom/2+5,u),o.autoPadding=n.instance(i.bottom/2+5,a.right,a.bottom,u)}iC(s)||"top"!==c||(u=i.left>=a.left?i.left:a.left,r.autoPadding=n.instance(i.top,i.right,0,u),o.autoPadding=n.instance(0,a.right,i.top,u))}function lC(e){var t,n,r=e.chart,o=e.options,i=o.data,a=o.xField,l=o.yField,s=o.color,c=o.barStyle,u=o.widthRatio,d=o.legend,f=o.layout,p=oC(a,l,rC,i,iC(f));d?r.legend(rC,d):!1===d&&r.legend(!1);var h=p[0],g=p[1];return iC(f)?((t=r.createView({region:{start:{x:0,y:0},end:{x:.5,y:1}},id:tC})).coordinate().transpose().reflect("x"),(n=r.createView({region:{start:{x:.5,y:0},end:{x:1,y:1}},id:nC})).coordinate().transpose(),t.data(h),n.data(g)):(t=r.createView({region:{start:{x:0,y:0},end:{x:1,y:.5}},id:tC}),(n=r.createView({region:{start:{x:0,y:.5},end:{x:1,y:1}},id:nC})).coordinate().reflect("y"),t.data(h),n.data(g)),ix(tb({},e,{chart:t,options:{widthRatio:u,xField:a,yField:l[0],seriesField:rC,interval:{color:s,style:c}}})),ix(tb({},e,{chart:n,options:{xField:a,yField:l[1],seriesField:rC,widthRatio:u,interval:{color:s,style:c}}})),e}function sC(e){var t,n,r,o=e.options,i=e.chart,a=o.xAxis,l=o.yAxis,s=o.xField,c=o.yField,u=xb(i,tC),d=xb(i,nC),f={};return(0,E.XP)((null==o?void 0:o.meta)||{}).map((function(e){(0,E.U2)(null==o?void 0:o.meta,[e,"alias"])&&(f[e]=o.meta[e].alias)})),i.scale(((t={})[rC]={sync:!0,formatter:function(e){return(0,E.U2)(f,e,e)}},t)),Vb(((n={})[s]=a,n[c[0]]=l[c[0]],n))(tb({},e,{chart:u})),Vb(((r={})[s]=a,r[c[1]]=l[c[1]],r))(tb({},e,{chart:d})),e}function cC(e){var t=e.chart,n=e.options,r=n.xAxis,o=n.yAxis,i=n.xField,a=n.yField,l=n.layout,s=xb(t,tC),c=xb(t,nC);return"bottom"===(null==r?void 0:r.position)?c.axis(i,(0,S.pi)((0,S.pi)({},r),{label:{formatter:function(){return""}}})):c.axis(i,!1),!1===r?s.axis(i,!1):s.axis(i,(0,S.pi)({position:iC(l)?"top":"bottom"},r)),!1===o?(s.axis(a[0],!1),c.axis(a[1],!1)):(s.axis(a[0],o[a[0]]),c.axis(a[1],o[a[1]])),t.__axisPosition={position:s.getOptions().axes[i].position,layout:l},e}function uC(e){var t=e.chart;return Fb(tb({},e,{chart:xb(t,tC)})),Fb(tb({},e,{chart:xb(t,nC)})),e}function dC(e){var t=e.chart,n=e.options,r=n.yField,o=n.yAxis;return qb(tb({},e,{chart:xb(t,tC),options:{yAxis:o[r[0]]}})),qb(tb({},e,{chart:xb(t,nC),options:{yAxis:o[r[1]]}})),e}function fC(e){var t=e.chart;return zb(tb({},e,{chart:xb(t,tC)})),zb(tb({},e,{chart:xb(t,nC)})),zb(e),e}function pC(e){var t=e.chart;return Bb(tb({},e,{chart:xb(t,tC)})),Bb(tb({},e,{chart:xb(t,nC)})),e}function hC(e){var t,n,r=this,o=e.chart,i=e.options,a=i.label,l=i.yField,s=i.layout,c=xb(o,tC),u=xb(o,nC),d=ob(c,"interval"),f=ob(u,"interval");if(a){var p=a.callback,h=(0,S._T)(a,["callback"]);h.position||(h.position="middle"),void 0===h.offset&&(h.offset=2);var g=(0,S.pi)({},h);if(iC(s)){var m=(null===(t=g.style)||void 0===t?void 0:t.textAlign)||("middle"===h.position?"center":"left");h.style=tb({},h.style,{textAlign:m}),g.style=tb({},g.style,{textAlign:{left:"right",right:"left",center:"center"}[m]})}else{var v={top:"bottom",bottom:"top",middle:"middle"};"string"==typeof h.position?h.position=v[h.position]:"function"==typeof h.position&&(h.position=function(){for(var e=[],t=0;t1?"".concat(t,"_").concat(n):"".concat(t)}function PC(e){var t=e.data,n=e.xField,r=e.measureField,o=e.rangeField,i=e.targetField,a=e.layout,l=[],s=[];t.forEach((function(e,t){var a=[e[o]].flat();a.sort((function(e,t){return e-t})),a.forEach((function(r,i){var s,c=0===i?r:a[i]-a[i-1];l.push(((s={rKey:"".concat(o,"_").concat(i)})[n]=n?e[n]:String(t),s[o]=c,s))}));var c=[e[r]].flat();c.forEach((function(o,i){var a;l.push(((a={mKey:_C(c,r,i)})[n]=n?e[n]:String(t),a[r]=o,a))}));var u=[e[i]].flat();u.forEach((function(r,o){var a;l.push(((a={tKey:_C(u,i,o)})[n]=n?e[n]:String(t),a[i]=r,a))})),s.push(e[o],e[r],e[i])}));var c=Math.min.apply(Math,s.flat(1/0)),u=Math.max.apply(Math,s.flat(1/0));return c=c>0?0:c,"vertical"===a&&l.reverse(),{min:c,max:u,ds:l}}function AC(e){var t=e.chart,n=e.options,r=n.bulletStyle,o=n.targetField,i=n.rangeField,a=n.measureField,l=n.xField,s=n.color,c=n.layout,u=n.size,d=n.label,f=PC(n),p=f.min,h=f.max,g=f.ds;t.data(g),ix(tb({},e,{options:{xField:l,yField:i,seriesField:"rKey",isStack:!0,label:(0,E.U2)(d,"range"),interval:{color:(0,E.U2)(s,"range"),style:(0,E.U2)(r,"range"),size:(0,E.U2)(u,"range")}}})),t.geometries[0].tooltip(!1),ix(tb({},e,{options:{xField:l,yField:a,seriesField:"mKey",isStack:!0,label:(0,E.U2)(d,"measure"),interval:{color:(0,E.U2)(s,"measure"),style:(0,E.U2)(r,"measure"),size:(0,E.U2)(u,"measure")}}}));var m=tb({},e,{options:{xField:l,yField:o,seriesField:"tKey",label:(0,E.U2)(d,"target"),point:{color:(0,E.U2)(s,"target"),style:(0,E.U2)(r,"target"),size:(0,E.mf)((0,E.U2)(u,"target"))?function(e){return(0,E.U2)(u,"target")(e)/2}:(0,E.U2)(u,"target")/2,shape:"horizontal"===c?"line":"hyphen"}}});return lx(m),"horizontal"===c&&t.coordinate().transpose(),(0,S.pi)((0,S.pi)({},e),{ext:{data:{min:p,max:h}}})}function NC(e){var t,n,r=e.options,o=e.ext,i=r.xAxis,a=r.yAxis,l=r.targetField,s=r.rangeField,c=r.measureField,u=r.xField,d=o.data;return rb(Vb(((t={})[u]=i,t[c]=a,t),((n={})[c]={min:null==d?void 0:d.min,max:null==d?void 0:d.max,sync:!0},n[l]={sync:"".concat(c)},n[s]={sync:"".concat(c)},n)))(e)}function TC(e){var t=e.chart,n=e.options,r=n.xAxis,o=n.yAxis,i=n.xField,a=n.measureField,l=n.rangeField,s=n.targetField;return t.axis("".concat(l),!1),t.axis("".concat(s),!1),!1===r?t.axis("".concat(i),!1):t.axis("".concat(i),r),!1===o?t.axis("".concat(a),!1):t.axis("".concat(a),o),e}function RC(e){var t=e.chart,n=e.options.legend;return t.removeInteraction("legend-filter"),t.legend(n),t.legend("rKey",!1),t.legend("mKey",!1),t.legend("tKey",!1),e}function LC(e){var t=e.chart,n=e.options,r=n.label,o=n.measureField,i=n.targetField,a=n.rangeField,l=t.geometries,s=l[0],c=l[1],u=l[2];return(0,E.U2)(r,"range")?s.label("".concat(a),(0,S.pi)({layout:[{type:"limit-in-plot"}]},lb(r.range))):s.label(!1),(0,E.U2)(r,"measure")?c.label("".concat(o),(0,S.pi)({layout:[{type:"limit-in-plot"}]},lb(r.measure))):c.label(!1),(0,E.U2)(r,"target")?u.label("".concat(i),(0,S.pi)({layout:[{type:"limit-in-plot"}]},lb(r.target))):u.label(!1),e}function DC(e){rb(AC,NC,TC,RC,zb,LC,jb,Fb,Bb)(e)}var jC=tb({},px.getDefaultOptions(),{layout:"horizontal",size:{range:30,measure:20,target:20},xAxis:{tickLine:!1,line:null},bulletStyle:{range:{fillOpacity:.5}},label:{measure:{position:"right"}},tooltip:{showMarkers:!1}}),FC=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="bullet",t}return(0,S.ZT)(t,e),t.getDefaultOptions=function(){return jC},t.prototype.changeData=function(e){this.updateOption({data:e});var t=PC(this.options),n=t.min,r=t.max,o=t.ds;NC({options:this.options,ext:{data:{min:n,max:r}},chart:this.chart}),this.chart.changeData(o)},t.prototype.getSchemaAdaptor=function(){return DC},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t}(px),BC={y:0,nodeWidthRatio:.05,weight:!1,nodePaddingRatio:.1,id:function(e){return e.id},source:function(e){return e.source},target:function(e){return e.target},sourceWeight:function(e){return e.value||1},targetWeight:function(e){return e.value||1},sortBy:null};var zC="x",HC="y",UC="name",WC="source",VC={nodeStyle:{opacity:1,fillOpacity:1,lineWidth:1},edgeStyle:{opacity:.5,lineWidth:2},label:{fields:["x","name"],callback:function(e,t){return{offsetX:(e[0]+e[1])/2>.5?-4:4,content:t}},labelEmit:!0,style:{fill:"#8c8c8c"}},tooltip:{showTitle:!1,showMarkers:!1,fields:["source","target","value","isNode"],showContent:function(e){return!(0,E.U2)(e,[0,"data","isNode"])},formatter:function(e){var t=e.source,n=e.target,r=e.value;return{name:"".concat(t," -> ").concat(n),value:r}}},interactions:[{type:"element-active"}],weight:!0,nodePaddingRatio:.1,nodeWidthRatio:.05};function XC(e){var t=e.options,n=t.data,r=t.sourceField,o=t.targetField,i=t.weightField,a=t.nodePaddingRatio,l=t.nodeWidthRatio,s=t.rawFields,c=void 0===s?[]:s,u=function(e,t){var n=function(e){return(0,E.f0)({},BC,e)}(e),r={},o=t.nodes,i=t.links;o.forEach((function(e){var t=n.id(e);r[t]=e})),function(e,t,n){(0,E.U5)(e,(function(e,r){e.inEdges=t.filter((function(e){return"".concat(n.target(e))==="".concat(r)})),e.outEdges=t.filter((function(e){return"".concat(n.source(e))==="".concat(r)})),e.edges=e.outEdges.concat(e.inEdges),e.frequency=e.edges.length,e.value=0,e.inEdges.forEach((function(t){e.value+=n.targetWeight(t)})),e.outEdges.forEach((function(t){e.value+=n.sourceWeight(t)}))}))}(r,i,n),function(e,t){var n={weight:function(e,t){return t.value-e.value},frequency:function(e,t){return t.frequency-e.frequency},id:function(e,n){return"".concat(t.id(e)).localeCompare("".concat(t.id(n)))}}[t.sortBy];!n&&(0,E.mf)(t.sortBy)&&(n=t.sortBy),n&&e.sort(n)}(o,n);var a=function(e,t){var n=e.length;if(!n)throw new TypeError("Invalid nodes: it's empty!");if(t.weight){var r=t.nodePaddingRatio;if(r<0||r>=1)throw new TypeError("Invalid nodePaddingRatio: it must be in range [0, 1)!");var o=r/(2*n),i=t.nodeWidthRatio;if(i<=0||i>=1)throw new TypeError("Invalid nodeWidthRatio: it must be in range (0, 1)!");var a=0;e.forEach((function(e){a+=e.value})),e.forEach((function(e){e.weight=e.value/a,e.width=e.weight*(1-r),e.height=i})),e.forEach((function(n,r){for(var a=0,l=r-1;l>=0;l--)a+=e[l].width+2*o;var s=n.minX=o+a,c=n.maxX=n.minX+n.width,u=n.minY=t.y-i/2,d=n.maxY=u+i;n.x=[s,c,c,s],n.y=[u,u,d,d]}))}else{var l=1/n;e.forEach((function(e,n){e.x=(n+.5)*l,e.y=t.y}))}return e}(o,n),l=function(e,t,n){if(n.weight){var r={};(0,E.U5)(e,(function(e,t){r[t]=e.value})),t.forEach((function(t){var o=n.source(t),i=n.target(t),a=e[o],l=e[i];if(a&&l){var s=r[o],c=n.sourceWeight(t),u=a.minX+(a.value-s)/a.value*a.width,d=u+c/a.value*a.width;r[o]-=c;var f=r[i],p=n.targetWeight(t),h=l.minX+(l.value-f)/l.value*l.width,g=h+p/l.value*l.width;r[i]-=p;var m=n.y;t.x=[u,d,h,g],t.y=[m,m,m,m],t.source=a,t.target=l}}))}else t.forEach((function(t){var r=e[n.source(t)],o=e[n.target(t)];r&&o&&(t.x=[r.x,o.x],t.y=[r.y,o.y],t.source=r,t.target=o)}));return t}(r,i,n);return{nodes:a,links:l}}({weight:!0,nodePaddingRatio:a,nodeWidthRatio:l},qy(n,r,o,i)),d=u.nodes,f=u.links,p=d.map((function(e){return(0,S.pi)((0,S.pi)({},Vy(e,(0,S.ev)(["id","x","y","name"],c,!0))),{isNode:!0})})),h=f.map((function(e){return(0,S.pi)((0,S.pi)({source:e.source.name,target:e.target.name,name:e.source.name||e.target.name},Vy(e,(0,S.ev)(["x","y","value"],c,!0))),{isNode:!1})}));return(0,S.pi)((0,S.pi)({},e),{ext:(0,S.pi)((0,S.pi)({},e.ext),{chordData:{nodesData:p,edgesData:h}})})}function qC(e){var t;return e.chart.scale(((t={x:{sync:!0,nice:!0},y:{sync:!0,nice:!0,max:1}})[UC]={sync:"color"},t[WC]={sync:"color"},t)),e}function GC(e){return e.chart.axis(!1),e}function YC(e){return e.chart.legend(!1),e}function KC(e){var t=e.chart,n=e.options.tooltip;return t.tooltip(n),e}function ZC(e){return e.chart.coordinate("polar").reflect("y"),e}function JC(e){var t=e.chart,n=e.options,r=e.ext.chordData.nodesData,o=n.nodeStyle,i=n.label,a=n.tooltip,l=t.createView();return l.data(r),sx({chart:l,options:{xField:zC,yField:HC,seriesField:UC,polygon:{style:o},label:i,tooltip:a}}),e}function QC(e){var t=e.chart,n=e.options,r=e.ext.chordData.edgesData,o=n.edgeStyle,i=n.tooltip,a=t.createView();return a.data(r),ox({chart:a,options:{xField:zC,yField:HC,seriesField:WC,edge:{style:o,shape:"arc"},tooltip:i}}),e}function ek(e){var t=e.chart;return Eb(t,e.options.animation,function(e){return(0,E.U2)(e,["views","length"],0)<=0?e.geometries:(0,E.u4)(e.views,(function(e,t){return e.concat(t.geometries)}),e.geometries)}(t)),e}function tk(e){return rb(zb,XC,ZC,qC,GC,YC,KC,QC,JC,Fb,Hb,ek)(e)}var nk=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="chord",t}return(0,S.ZT)(t,e),t.getDefaultOptions=function(){return VC},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return tk},t}(px),rk=["x","y","r","name","value","path","depth"],ok={colorField:"name",autoFit:!0,pointStyle:{lineWidth:0,stroke:"#fff"},legend:!1,hierarchyConfig:{size:[1,1],padding:0},label:{fields:["name"],layout:{type:"limit-in-shape"}},tooltip:{showMarkers:!1,showTitle:!1},drilldown:{enabled:!1}},ik="drilldown-bread-crumb",ak={position:"top-left",dividerText:"/",textStyle:{fontSize:12,fill:"rgba(0, 0, 0, 0.65)",cursor:"pointer"},activeTextStyle:{fill:"#87B5FF"}},lk="hierarchy-data-transform-params",sk=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.name="drill-down",t.historyCache=[],t.breadCrumbGroup=null,t.breadCrumbCfg=ak,t}return(0,S.ZT)(t,e),t.prototype.click=function(){var e=(0,E.U2)(this.context,["event","data","data"]);if(!e)return!1;this.drill(e),this.drawBreadCrumb()},t.prototype.resetPosition=function(){if(this.breadCrumbGroup){var e=this.context.view.getCoordinate(),t=this.breadCrumbGroup,n=t.getBBox(),r=this.getButtonCfg().position,o={x:e.start.x,y:e.end.y-(n.height+10)};e.isPolar&&(o={x:0,y:0}),"bottom-left"===r&&(o={x:e.start.x,y:e.start.y});var i=Hd.transform(null,[["t",o.x+0,o.y+n.height+5]]);t.setMatrix(i)}},t.prototype.back=function(){(0,E.dp)(this.historyCache)&&this.backTo(this.historyCache.slice(0,-1))},t.prototype.reset=function(){this.historyCache[0]&&this.backTo(this.historyCache.slice(0,1)),this.historyCache=[],this.hideCrumbGroup()},t.prototype.drill=function(e){var t=this.context.view,n=(0,E.U2)(t,["interactions","drill-down","cfg","transformData"],(function(e){return e})),r=n((0,S.pi)({data:e.data},e[lk]));t.changeData(r);for(var o=[],i=e;i;){var a=i.data;o.unshift({id:"".concat(a.name,"_").concat(i.height,"_").concat(i.depth),name:a.name,children:n((0,S.pi)({data:a},e[lk]))}),i=i.parent}this.historyCache=(this.historyCache||[]).slice(0,-1).concat(o)},t.prototype.backTo=function(e){if(e&&!(e.length<=0)){var t=this.context.view,n=(0,E.Z$)(e).children;t.changeData(n),e.length>1?(this.historyCache=e,this.drawBreadCrumb()):(this.historyCache=[],this.hideCrumbGroup())}},t.prototype.getButtonCfg=function(){var e=this.context.view,t=(0,E.U2)(e,["interactions","drill-down","cfg","drillDownConfig"]);return tb(this.breadCrumbCfg,null==t?void 0:t.breadCrumb,this.cfg)},t.prototype.drawBreadCrumb=function(){this.drawBreadCrumbGroup(),this.resetPosition(),this.breadCrumbGroup.show()},t.prototype.drawBreadCrumbGroup=function(){var e=this,t=this.getButtonCfg(),n=this.historyCache;this.breadCrumbGroup?this.breadCrumbGroup.clear():this.breadCrumbGroup=this.context.view.foregroundGroup.addGroup({name:ik});var r=0;n.forEach((function(o,i){var a=e.breadCrumbGroup.addShape({type:"text",id:o.id,name:"".concat(ik,"_").concat(o.name,"_text"),attrs:(0,S.pi)((0,S.pi)({text:0!==i||(0,E.UM)(t.rootText)?o.name:t.rootText},t.textStyle),{x:r,y:0})}),l=a.getBBox();if(r+=l.width+4,a.on("click",(function(t){var r,o=t.target.get("id");if(o!==(null===(r=(0,E.Z$)(n))||void 0===r?void 0:r.id)){var i=n.slice(0,n.findIndex((function(e){return e.id===o}))+1);e.backTo(i)}})),a.on("mouseenter",(function(e){var r;e.target.get("id")!==(null===(r=(0,E.Z$)(n))||void 0===r?void 0:r.id)?a.attr(t.activeTextStyle):a.attr({cursor:"default"})})),a.on("mouseleave",(function(){a.attr(t.textStyle)})),i0&&n*n>r*r+o*o}function pk(e,t){for(var n=0;n(a*=a)?(r=(c+a-o)/(2*c),i=Math.sqrt(Math.max(0,a/c-r*r)),n.x=e.x-r*l-i*s,n.y=e.y-r*s+i*l):(r=(c+o-a)/(2*c),i=Math.sqrt(Math.max(0,o/c-r*r)),n.x=t.x+r*l-i*s,n.y=t.y+r*s+i*l)):(n.x=t.x+n.r,n.y=t.y)}function yk(e,t){var n=e.r+t.r-1e-6,r=t.x-e.x,o=t.y-e.y;return n>0&&n*n>r*r+o*o}function bk(e){var t=e._,n=e.next._,r=t.r+n.r,o=(t.x*n.r+n.x*t.r)/r,i=(t.y*n.r+n.y*t.r)/r;return o*o+i*i}function xk(e){this._=e,this.next=null,this.previous=null}function wk(e){if(!(i=(t=e,e="object"==typeof t&&"length"in t?t:Array.from(t)).length))return 0;var t,n,r,o,i,a,l,s,c,u,d,f;if((n=e[0]).x=0,n.y=0,!(i>1))return n.r;if(r=e[1],n.x=-r.r,r.x=n.r,r.y=0,!(i>2))return n.r+r.r;vk(r,n,o=e[2]),n=new xk(n),r=new xk(r),o=new xk(o),n.next=o.previous=r,r.next=n.previous=o,o.next=r.previous=n;e:for(s=3;s=0;)t+=n[r].value;else t=1;e.value=t}function Ak(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=Tk)):void 0===t&&(t=Nk);for(var n,r,o,i,a,l=new Dk(e),s=[l];n=s.pop();)if((o=t(n.data))&&(a=(o=Array.from(o)).length))for(n.children=o,i=a-1;i>=0;--i)s.push(r=o[i]=new Dk(o[i])),r.parent=n,r.depth=n.depth+1;return l.eachBefore(Lk)}function Nk(e){return e.children}function Tk(e){return Array.isArray(e)?e[1]:null}function Rk(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function Lk(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function Dk(e){this.data=e,this.depth=this.height=0,this.parent=null}Dk.prototype=Ak.prototype={constructor:Dk,count:function(){return this.eachAfter(Pk)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,o,i=this,a=[i],l=[],s=-1;i=a.pop();)if(l.push(i),n=i.children)for(r=0,o=n.length;r=0;--r)i.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,o=r&&r.length;--o>=0;)n+=r[o].value;t.value=n}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),o=null;for(e=n.pop(),t=r.pop();e===t;)o=e,e=n.pop(),t=r.pop();return o}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var o=r.length;e!==n;)r.splice(o,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t},copy:function(){return Ak(this).eachBefore(Rk)},[Symbol.iterator]:function*(){var e,t,n,r,o=this,i=[o];do{for(e=i.reverse(),i=[];o=e.pop();)if(yield o,t=o.children)for(n=0,r=t.length;n0&&n1;)r="".concat(null===(t=a.parent.data)||void 0===t?void 0:t.name," / ").concat(r),a=a.parent;if(i&&e.depth>2)return null;var s=tb({},e.data,(0,S.pi)((0,S.pi)((0,S.pi)({},Vy(e.data,o)),{path:r}),e));s.ext=n,s[lk]={hierarchyConfig:n,rawFields:o,enableDrillDown:i},l.push(s)})),l}function Xk(e,t,n){var r=fb([e,t]),o=r[0],i=r[1],a=r[2],l=r[3],s=n.width-(l+i),c=n.height-(o+a),u=Math.min(s,c),d=(s-u)/2,f=(c-u)/2;return{finalPadding:[o+f,i+d,a+f,l+d],finalSize:u<0?0:u}}function qk(e){var t=e.chart,n=Math.min(t.viewBBox.width,t.viewBBox.height);return tb({options:{size:function(e){return e.r*n}}},e)}function Gk(e){var t=e.options,n=e.chart,r=n.viewBBox,o=t.padding,i=t.appendPadding,a=t.drilldown,l=i;(null==a?void 0:a.enabled)&&(l=fb([db(n.appendPadding,(0,E.U2)(a,["breadCrumb","position"])),i]));var s=Xk(o,l,r).finalPadding;return n.padding=s,n.appendPadding=0,e}function Yk(e){var t=e.chart,n=e.options,r=t.padding,o=t.appendPadding,i=n.color,a=n.colorField,l=n.pointStyle,s=n.hierarchyConfig,c=n.sizeField,u=n.rawFields,d=void 0===u?[]:u,f=n.drilldown,p=Vk({data:n.data,hierarchyConfig:s,enableDrillDown:null==f?void 0:f.enabled,rawFields:d});t.data(p);var h=Xk(r,o,t.viewBBox).finalSize,g=function(e){return e.r*h};return c&&(g=function(e){return e[c]*h}),lx(tb({},e,{options:{xField:"x",yField:"y",seriesField:a,sizeField:c,rawFields:(0,S.ev)((0,S.ev)([],rk,!0),d,!0),point:{color:i,style:l,shape:"circle",size:g}}})),e}function Kk(e){return rb(Vb({},{x:{min:0,max:1,minLimit:0,maxLimit:1,nice:!0},y:{min:0,max:1,minLimit:0,maxLimit:1,nice:!0}}))(e)}function Zk(e){var t=e.chart,n=e.options.tooltip;if(!1===n)t.tooltip(!1);else{var r=n;(0,E.U2)(n,"fields")||(r=tb({},{customItems:function(e){return e.map((function(e){var n=(0,E.U2)(t.getOptions(),"scales"),r=(0,E.U2)(n,["name","formatter"],(function(e){return e})),o=(0,E.U2)(n,["value","formatter"],(function(e){return e}));return(0,S.pi)((0,S.pi)({},e),{name:r(e.data.name),value:o(e.data.value)})}))}},r)),t.tooltip(r)}return e}function Jk(e){return e.chart.axis(!1),e}function Qk(e){var t=e.drilldown,n=e.interactions,r=void 0===n?[]:n;return(null==t?void 0:t.enabled)?tb({},e,{interactions:(0,S.ev)((0,S.ev)([],r,!0),[{type:"drill-down",cfg:{drillDownConfig:t,transformData:Vk,enableDrillDown:!0}}],!1)}):e}function eO(e){return Fb({chart:e.chart,options:Qk(e.options)}),e}function tO(e){return rb(Lb("pointStyle"),qk,Gk,zb,Kk,Yk,Jk,Db,Zk,eO,Bb,Xb())(e)}function nO(e){var t=(0,E.U2)(e,["event","data","data"],{});return(0,E.kJ)(t.children)&&t.children.length>0}function rO(e){var t=e.view.getCoordinate(),n=t.innerRadius;if(n){var r=e.event,o=r.x,i=r.y,a=t.center,l=a.x,s=a.y,c=t.getRadius()*n;return Math.sqrt(Math.pow(l-o,2)+Math.pow(s-i,2))-1)||function(e,t,n){var r=Math.min(t,n),o=Math.max(t,n);return e>=r&&e<=o}(t,c,u)})),e.getRootView().render(!0)}};function bO(e){var t,n=e.options,r=n.geometryOptions,o=void 0===r?[]:r,i=n.xField,a=n.yField,l=(0,E.yW)(o,(function(e){var t=e.geometry;return t===iO.Line||void 0===t}));return tb({},{options:{geometryOptions:[],meta:(t={},t[i]={type:"cat",sync:!0,range:l?[0,1]:void 0},t),tooltip:{showMarkers:l,showCrosshairs:l,shared:!0,crosshairs:{type:"x"}},interactions:l?[{type:"legend-visible-filter"}]:[{type:"legend-visible-filter"},{type:"active-region"}],legend:{position:"top-left"}}},e,{options:{yAxis:gO(a,n.yAxis),geometryOptions:[hO(0,a[0],o[0]),hO(0,a[1],o[1])],annotations:gO(a,n.annotations)}})}function xO(e){var t,n,r=e.chart,o=e.options.geometryOptions,i={line:0,column:1};return[{type:null===(t=o[0])||void 0===t?void 0:t.geometry,id:lO},{type:null===(n=o[1])||void 0===n?void 0:n.geometry,id:sO}].sort((function(e,t){return-i[e.type]+i[t.type]})).forEach((function(e){return r.createView({id:e.id})})),e}function wO(e){var t=e.chart,n=e.options,r=n.xField,o=n.yField,i=n.geometryOptions,a=n.data,l=n.tooltip;return[(0,S.pi)((0,S.pi)({},i[0]),{id:lO,data:a[0],yField:o[0]}),(0,S.pi)((0,S.pi)({},i[1]),{id:sO,data:a[1],yField:o[1]})].forEach((function(e){var n=e.id,o=e.data,i=e.yField,a=pO(e)&&e.isPercent,s=a?hx(o,i,r,i):o,c=xb(t,n).data(s),u=a?(0,S.pi)({formatter:function(t){return{name:t[e.seriesField]||i,value:(100*Number(t[i])).toFixed(2)+"%"}}},l):l;!function(e){var t=e.options,n=e.chart,r=t.geometryOption,o=r.isStack,i=r.color,a=r.seriesField,l=r.groupField,s=r.isGroup,c=["xField","yField"];if(fO(r)){ax(tb({},e,{options:(0,S.pi)((0,S.pi)((0,S.pi)({},Vy(t,c)),r),{line:{color:r.color,style:r.lineStyle}})})),lx(tb({},e,{options:(0,S.pi)((0,S.pi)((0,S.pi)({},Vy(t,c)),r),{point:r.point&&(0,S.pi)({color:i,shape:"circle"},r.point)})}));var u=[];s&&u.push({type:"dodge",dodgeBy:l||a,customOffset:0}),o&&u.push({type:"stack"}),u.length&&(0,E.S6)(n.geometries,(function(e){e.adjust(u)}))}pO(r)&&Gx(tb({},e,{options:(0,S.pi)((0,S.pi)((0,S.pi)({},Vy(t,c)),r),{widthRatio:r.columnWidthRatio,interval:(0,S.pi)((0,S.pi)({},Vy(r,["color"])),{style:r.columnStyle})})}))}({chart:c,options:{xField:r,yField:i,tooltip:u,geometryOption:e}})})),e}function SO(e){var t,n=e.chart,r=e.options.geometryOptions,o=(null===(t=n.getTheme())||void 0===t?void 0:t.colors10)||[],i=0;return n.once("beforepaint",(function(){(0,E.S6)(r,(function(e,t){var r=xb(n,0===t?lO:sO);if(!e.color){var a=r.getGroupScales(),l=(0,E.U2)(a,[0,"values","length"],1),s=o.slice(i,i+l).concat(0===t?[]:o);r.geometries.forEach((function(t){e.seriesField?t.color(e.seriesField,s):t.color(s[0])})),i+=l}})),n.render(!0)})),e}function EO(e){var t,n,r=e.chart,o=e.options,i=o.xAxis,a=o.yAxis,l=o.xField,s=o.yField;return Vb(((t={})[l]=i,t[s[0]]=a[0],t))(tb({},e,{chart:xb(r,lO)})),Vb(((n={})[l]=i,n[s[1]]=a[1],n))(tb({},e,{chart:xb(r,sO)})),e}function CO(e){var t=e.chart,n=e.options,r=xb(t,lO),o=xb(t,sO),i=n.xField,a=n.yField,l=n.xAxis,s=n.yAxis;return t.axis(i,!1),t.axis(a[0],!1),t.axis(a[1],!1),r.axis(i,l),r.axis(a[0],mO(s[0],oO.Left)),o.axis(i,!1),o.axis(a[1],mO(s[1],oO.Right)),e}function kO(e){var t=e.chart,n=e.options.tooltip,r=xb(t,lO),o=xb(t,sO);return t.tooltip(n),r.tooltip({shared:!0}),o.tooltip({shared:!0}),e}function OO(e){var t=e.chart;return Fb(tb({},e,{chart:xb(t,lO)})),Fb(tb({},e,{chart:xb(t,sO)})),e}function MO(e){var t=e.chart,n=e.options.annotations,r=(0,E.U2)(n,[0]),o=(0,E.U2)(n,[1]);return Xb(r)(tb({},e,{chart:xb(t,lO),options:{annotations:r}})),Xb(o)(tb({},e,{chart:xb(t,sO),options:{annotations:o}})),e}function IO(e){var t=e.chart;return zb(tb({},e,{chart:xb(t,lO)})),zb(tb({},e,{chart:xb(t,sO)})),zb(e),e}function $O(e){var t=e.chart;return Bb(tb({},e,{chart:xb(t,lO)})),Bb(tb({},e,{chart:xb(t,sO)})),e}function _O(e){var t=e.chart,n=e.options.yAxis;return qb(tb({},e,{chart:xb(t,lO),options:{yAxis:n[0]}})),qb(tb({},e,{chart:xb(t,sO),options:{yAxis:n[1]}})),e}function PO(e){var t=e.chart,n=e.options,r=n.legend,o=n.geometryOptions,i=n.yField,a=n.data,l=xb(t,lO),s=xb(t,sO);if(!1===r)t.legend(!1);else if((0,E.Kn)(r)&&!0===r.custom)t.legend(r);else{var c=(0,E.U2)(o,[0,"legend"],r),u=(0,E.U2)(o,[1,"legend"],r);t.once("beforepaint",(function(){var e=a[0].length?vO({view:l,geometryOption:o[0],yField:i[0],legend:c}):[],n=a[1].length?vO({view:s,geometryOption:o[1],yField:i[1],legend:u}):[];t.legend(tb({},r,{custom:!0,items:e.concat(n)}))})),o[0].seriesField&&l.legend(o[0].seriesField,c),o[1].seriesField&&s.legend(o[1].seriesField,u),t.on("legend-item:click",(function(e){var n=(0,E.U2)(e,"gEvent.delegateObject",{});if(n&&n.item){var r=n.item,o=r.value,a=r.isGeometry,l=r.viewId;if(a){if((0,E.cx)(i,(function(e){return e===o}))>-1){var s=(0,E.U2)(xb(t,l),"geometries");(0,E.S6)(s,(function(e){e.changeVisible(!n.item.unchecked)}))}}else{var c=(0,E.U2)(t.getController("legend"),"option.items",[]);(0,E.S6)(t.views,(function(e){var n=e.getGroupScales();(0,E.S6)(n,(function(t){t.values&&t.values.indexOf(o)>-1&&e.filter(t.field,(function(e){return!(0,E.sE)(c,(function(t){return t.value===e})).unchecked}))})),t.render(!0)}))}}}))}return e}function AO(e){var t=e.chart,n=e.options.slider,r=xb(t,lO),o=xb(t,sO);return n&&(r.option("slider",n),r.on("slider:valuechanged",(function(e){var t=e.event,n=t.value,r=t.originValue;(0,E.Xy)(n,r)||yO(o,n)})),t.once("afterpaint",(function(){if(!(0,E.jn)(n)){var e=n.start,t=n.end;(e||t)&&yO(o,[e,t])}}))),e}function NO(e){return rb(bO,xO,IO,wO,EO,CO,_O,kO,OO,MO,$O,SO,PO,AO)(e)}var TO=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dual-axes",t}return(0,S.ZT)(t,e),t.prototype.getDefaultOptions=function(){return tb({},e.prototype.getDefaultOptions.call(this),{yAxis:[],syncViewPadding:!0})},t.prototype.getSchemaAdaptor=function(){return NO},t}(px);function RO(e){var t=e.chart,n=e.options,r=n.type,o=n.data,i=n.fields,a=n.eachView,l=(0,E.CE)(n,["type","data","fields","eachView","axes","meta","tooltip","coordinate","theme","legend","interactions","annotations"]);return t.data(o),t.facet(r,(0,S.pi)((0,S.pi)({},l),{fields:i,eachView:function(e,t){var n=a(e,t);if(n.geometries)!function(e,t){var n=t.data,r=t.coordinate,o=t.interactions,i=t.annotations,a=t.animation,l=t.tooltip,s=t.axes,c=t.meta,u=t.geometries;n&&e.data(n);var d={};s&&(0,E.S6)(s,(function(e,t){d[t]=Vy(e,zy)})),d=tb({},c,d),e.scale(d),r&&e.coordinate(r),!1===s?e.axis(!1):(0,E.S6)(s,(function(t,n){e.axis(n,t)})),(0,E.S6)(u,(function(t){var n=nx({chart:e,options:t}).ext,r=t.adjust;r&&n.geometry.adjust(r)})),(0,E.S6)(o,(function(t){!1===t.enable?e.removeInteraction(t.type):e.interaction(t.type,t.cfg)})),(0,E.S6)(i,(function(t){e.annotation()[t.type]((0,S.pi)({},t))})),Eb(e,a),l?(e.interaction("tooltip"),e.tooltip(l)):!1===l&&e.removeInteraction("tooltip")}(e,n);else{var r=n,o=r.options;o.tooltip&&e.interaction("tooltip"),qE(r.type,e,o)}}})),e}function LO(e){var t=e.chart,n=e.options,r=n.axes,o=n.meta,i=n.tooltip,a=n.coordinate,l=n.theme,s=n.legend,c=n.interactions,u=n.annotations,d={};return r&&(0,E.S6)(r,(function(e,t){d[t]=Vy(e,zy)})),d=tb({},o,d),t.scale(d),t.coordinate(a),r?(0,E.S6)(r,(function(e,n){t.axis(n,e)})):t.axis(!1),i?(t.interaction("tooltip"),t.tooltip(i)):!1===i&&t.removeInteraction("tooltip"),t.legend(s),l&&t.theme(l),(0,E.S6)(c,(function(e){!1===e.enable?t.removeInteraction(e.type):t.interaction(e.type,e.cfg)})),(0,E.S6)(u,(function(e){t.annotation()[e.type]((0,S.pi)({},e))})),e}function DO(e){return rb(zb,RO,LO)(e)}var jO={title:{style:{fontSize:12,fill:"rgba(0,0,0,0.65)"}},rowTitle:{style:{fontSize:12,fill:"rgba(0,0,0,0.65)"}},columnTitle:{style:{fontSize:12,fill:"rgba(0,0,0,0.65)"}}},FO=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="area",t}return(0,S.ZT)(t,e),t.getDefaultOptions=function(){return jO},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return DO},t}(px);function BO(e){var t=e.chart,n=e.options,r=n.data,o=n.type,i=n.xField,a=n.yField,l=n.colorField,s=n.sizeField,c=n.sizeRatio,u=n.shape,d=n.color,f=n.tooltip,p=n.heatmapStyle,h=n.meta;t.data(r);var g="polygon";"density"===o&&(g="heatmap");var m=Qb(f,[i,a,l]),v=m.fields,y=m.formatter,b=1;return(c||0===c)&&(u||s?c<0||c>1?console.warn("sizeRatio is not in effect: It must be a number in [0,1]"):b=c:console.warn("sizeRatio is not in effect: Must define shape or sizeField first")),nx(tb({},e,{options:{type:g,colorField:l,tooltipFields:v,shapeField:s||"",label:void 0,mapping:{tooltip:y,shape:u&&(s?function(e){var t=r.map((function(e){return e[s]})),n=(null==h?void 0:h[s])||{},o=n.min,i=n.max;return o=(0,E.hj)(o)?o:Math.min.apply(Math,t),i=(0,E.hj)(i)?i:Math.max.apply(Math,t),[u,((0,E.U2)(e,s)-o)/(i-o),b]}:function(){return[u,1,b]}),color:d||l&&t.getTheme().sequenceColors.join("-"),style:p}}})),e}function zO(e){var t,n=e.options,r=n.xAxis,o=n.yAxis,i=n.xField,a=n.yField;return rb(Vb(((t={})[i]=r,t[a]=o,t)))(e)}function HO(e){var t=e.chart,n=e.options,r=n.xAxis,o=n.yAxis,i=n.xField,a=n.yField;return!1===r?t.axis(i,!1):t.axis(i,r),!1===o?t.axis(a,!1):t.axis(a,o),e}function UO(e){var t=e.chart,n=e.options,r=n.legend,o=n.colorField,i=n.sizeField,a=n.sizeLegend,l=!1!==r;return o&&t.legend(o,!!l&&r),i&&t.legend(i,void 0===a?r:a),l||a||t.legend(!1),e}function WO(e){var t=e.chart,n=e.options,r=n.label,o=n.colorField,i=ob(t,"density"===n.type?"heatmap":"polygon");if(r){if(o){var a=r.callback,l=(0,S._T)(r,["callback"]);i.label({fields:[o],callback:a,cfg:lb(l)})}}else i.label(!1);return e}function VO(e){var t,n,r=e.chart,o=e.options,i=o.coordinate,a=o.reflect,l=tb({actions:[]},null!=i?i:{type:"rect"});return a&&(null===(n=null===(t=l.actions)||void 0===t?void 0:t.push)||void 0===n||n.call(t,["reflect",a])),r.coordinate(l),e}function XO(e){return rb(zb,Lb("heatmapStyle"),zO,VO,BO,HO,UO,jb,WO,Xb(),Fb,Bb,Hb)(e)}var qO=tb({},px.getDefaultOptions(),{type:"polygon",legend:!1,coordinate:{type:"rect"},xAxis:{tickLine:null,line:null,grid:{alignTick:!1,line:{style:{lineWidth:1,lineDash:null,stroke:"#f0f0f0"}}}},yAxis:{grid:{alignTick:!1,line:{style:{lineWidth:1,lineDash:null,stroke:"#f0f0f0"}}}}});rd("polygon","circle",{draw:function(e,t){var n,r,o=e.x,i=e.y,a=this.parsePoints(e.points),l=Math.abs(a[2].x-a[1].x),s=Math.abs(a[1].y-a[0].y),c=Math.min(l,s)/2,u=Number(e.shape[1]),d=Number(e.shape[2]),f=c*Math.sqrt(d)*Math.sqrt(u),p=(null===(n=e.style)||void 0===n?void 0:n.fill)||e.color||(null===(r=e.defaultStyle)||void 0===r?void 0:r.fill);return t.addShape("circle",{attrs:(0,S.pi)((0,S.pi)((0,S.pi)({x:o,y:i,r:f},e.defaultStyle),e.style),{fill:p})})}}),rd("polygon","square",{draw:function(e,t){var n,r,o=e.x,i=e.y,a=this.parsePoints(e.points),l=Math.abs(a[2].x-a[1].x),s=Math.abs(a[1].y-a[0].y),c=Math.min(l,s),u=Number(e.shape[1]),d=Number(e.shape[2]),f=c*Math.sqrt(d)*Math.sqrt(u),p=(null===(n=e.style)||void 0===n?void 0:n.fill)||e.color||(null===(r=e.defaultStyle)||void 0===r?void 0:r.fill);return t.addShape("rect",{attrs:(0,S.pi)((0,S.pi)((0,S.pi)({x:o-f/2,y:i-f/2,width:f,height:f},e.defaultStyle),e.style),{fill:p})})}});var GO=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="heatmap",t}return(0,S.ZT)(t,e),t.getDefaultOptions=function(){return qO},t.prototype.getSchemaAdaptor=function(){return XO},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t}(px),YO="liquid";function KO(e){return[{percent:e,type:YO}]}function ZO(e){var t=e.chart,n=e.options,r=n.percent,o=n.liquidStyle,i=n.radius,a=n.outline,l=n.wave,s=n.shape,c=n.shapeStyle,u=n.animation;t.scale({percent:{min:0,max:1}}),t.data(KO(r));var d=n.color||t.getTheme().defaultColor,f=ix(tb({},e,{options:{xField:"type",yField:"percent",widthRatio:i,interval:{color:d,style:o,shape:"liquid-fill-gauge"}}})).ext.geometry,p={percent:r,radius:i,outline:a,wave:l,shape:s,shapeStyle:c,background:t.getTheme().background,animation:u};return f.customInfo(p),t.legend(!1),t.axis(!1),t.tooltip(!1),e}function JO(e,t){var n=e.chart,r=e.options,o=r.statistic,i=r.percent,a=r.meta;n.getController("annotation").clear(!0);var l=(0,E.U2)(a,["percent","formatter"])||function(e){return"".concat((100*e).toFixed(2),"%")},s=o.content;return s&&(s=tb({},s,{content:(0,E.UM)(s.content)?l(i):s.content})),vb(n,{statistic:(0,S.pi)((0,S.pi)({},o),{content:s}),plotType:"liquid"},{percent:i}),t&&n.render(!0),e}function QO(e){return rb(zb,Lb("liquidStyle"),ZO,JO,Vb({}),Bb,Fb)(e)}var eM={radius:.9,statistic:{title:!1,content:{style:{opacity:.75,fontSize:"30px",lineHeight:"30px",textAlign:"center"}}},outline:{border:2,distance:0},wave:{count:3,length:192},shape:"circle"};function tM(e,t,n){return e+(t-e)*n}function nM(e,t,n,r){return 0===t?[[e+.5*n/Math.PI/2,r/2],[e+.5*n/Math.PI,r],[e+n/4,r]]:1===t?[[e+.5*n/Math.PI/2*(Math.PI-2),r],[e+.5*n/Math.PI/2*(Math.PI-1),r/2],[e+n/4,0]]:2===t?[[e+.5*n/Math.PI/2,-r/2],[e+.5*n/Math.PI,-r],[e+n/4,-r]]:[[e+.5*n/Math.PI/2*(Math.PI-2),-r],[e+.5*n/Math.PI/2*(Math.PI-1),-r/2],[e+n/4,0]]}function rM(e,t,n,r,o,i,a){for(var l=4*Math.ceil(2*e/n*4),s=[],c=r;c<2*-Math.PI;)c+=2*Math.PI;for(;c>0;)c-=2*Math.PI;var u=i-e+(c=c/Math.PI/2*n)-2*e;s.push(["M",u,t]);for(var d=0,f=0;f0){var M=t.addGroup({name:"waves"}),I=M.setClip({type:"path",attrs:{path:O}});!function(e,t,n,r,o,i,a,l,s,c){for(var u=o.fill,d=o.opacity,f=a.getBBox(),p=f.maxX-f.minX,h=f.maxY-f.minY,g=0;g0){var a=this.view.geometries[0],l=a.dataArray,s=i[0].name,c=[];return l.forEach((function(e){e.forEach((function(e){var t=Hd.getTooltipItems(e,a)[0];if(!r&&t&&t.name===s){var n=(0,E.UM)(o)?s:o;c.push((0,S.pi)((0,S.pi)({},t),{name:t.title,title:n}))}else r&&t&&(n=(0,E.UM)(o)?t.name||s:o,c.push((0,S.pi)((0,S.pi)({},t),{name:t.title,title:n})))}))})),c}return[]},t}(Ru);bu("radar-tooltip",fM),Ks("radar-tooltip",function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.init=function(){this.context.view.removeInteraction("tooltip")},t.prototype.show=function(){var e=this.context.event;this.getTooltipController().showTooltip({x:e.x,y:e.y})},t.prototype.hide=function(){this.getTooltipController().hideTooltip()},t.prototype.getTooltipController=function(){return this.context.view.getController("radar-tooltip")},t}(Xs)),Xc("radar-tooltip",{start:[{trigger:"plot:mousemove",action:"radar-tooltip:show"}],end:[{trigger:"plot:mouseleave",action:"radar-tooltip:hide"}]});var pM=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="radar",t}return(0,S.ZT)(t,e),t.prototype.changeData=function(e){this.updateOption({data:e}),this.chart.changeData(e)},t.prototype.getDefaultOptions=function(){return tb({},e.prototype.getDefaultOptions.call(this),{xAxis:{label:{offset:15},grid:{line:{type:"line"}}},yAxis:{grid:{line:{type:"circle"}}},legend:{position:"top"},tooltip:{shared:!0,showCrosshairs:!0,showMarkers:!0,crosshairs:{type:"xy",line:{style:{stroke:"#565656",lineDash:[4]}},follow:!0}}})},t.prototype.getSchemaAdaptor=function(){return dM},t}(px);function hM(e,t,n){var r=n.map((function(e){return e[t]})).filter((function(e){return void 0!==e})),o=r.length>0?Math.max.apply(Math,r):0,i=Math.abs(e)%360;return i?360*o/i:o}function gM(e){var t=e.chart,n=e.options,r=n.barStyle,o=n.color,i=n.tooltip,a=n.colorField,l=n.type,s=n.xField,c=n.yField,u=n.data,d=n.shape,f=Gy(u,c);return t.data(f),ix(tb({},e,{options:{tooltip:i,seriesField:a,interval:{style:r,color:o,shape:d||("line"===l?"line":"intervel")},minColumnWidth:n.minBarWidth,maxColumnWidth:n.maxBarWidth,columnBackground:n.barBackground}})),"line"===l&&lx({chart:t,options:{xField:s,yField:c,seriesField:a,point:{shape:"circle",color:o}}}),e}function mM(e){var t,n=e.options,r=n.yField,o=n.xField,i=n.data,a=n.isStack,l=n.isGroup,s=n.colorField,c=n.maxAngle,u=a&&!l&&s?function(e,t,n){var r=[];return e.forEach((function(e){var o=r.find((function(n){return n[t]===e[t]}));o?o[n]+=e[n]||null:r.push((0,S.pi)({},e))})),r}(i,o,r):i,d=Gy(u,r);return rb(Vb(((t={})[r]={min:0,max:hM(c,r,d)},t)))(e)}function vM(e){var t=e.chart,n=e.options,r=n.radius,o=n.innerRadius,i=n.startAngle,a=n.endAngle;return t.coordinate({type:"polar",cfg:{radius:r,innerRadius:o,startAngle:i,endAngle:a}}).transpose(),e}function yM(e){var t=e.chart,n=e.options,r=n.xField,o=n.xAxis;return t.axis(r,o),e}function bM(e){var t=e.chart,n=e.options,r=n.label,o=n.yField,i=ob(t,"interval");if(r){var a=r.callback,l=(0,S._T)(r,["callback"]);i.label({fields:[o],callback:a,cfg:(0,S.pi)((0,S.pi)({},lb(l)),{type:"polar"})})}else i.label(!1);return e}function xM(e){return rb(Lb("barStyle"),gM,mM,yM,vM,Fb,Bb,zb,jb,Db,Xb(),bM)(e)}var wM=tb({},px.getDefaultOptions(),{interactions:[{type:"element-active"}],legend:!1,tooltip:{showMarkers:!1},xAxis:{grid:null,tickLine:null,line:null},maxAngle:240}),SM=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="radial-bar",t}return(0,S.ZT)(t,e),t.getDefaultOptions=function(){return wM},t.prototype.changeData=function(e){this.updateOption({data:e}),mM({chart:this.chart,options:this.options}),this.chart.changeData(e)},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return xM},t}(px);function EM(e){var t=e.chart,n=e.options,r=n.data,o=n.sectorStyle,i=n.shape,a=n.color;return t.data(r),rb(ix)(tb({},e,{options:{marginRatio:1,interval:{style:o,color:a,shape:i}}})),e}function CM(e){var t=e.chart,n=e.options,r=n.label,o=n.xField,i=ob(t,"interval");if(!1===r)i.label(!1);else if((0,E.Kn)(r)){var a=r.callback,l=r.fields,s=(0,S._T)(r,["callback","fields"]),c=s.offset,u=s.layout;(void 0===c||c>=0)&&(u=u?(0,E.kJ)(u)?u:[u]:[],s.layout=(0,E.hX)(u,(function(e){return"limit-in-shape"!==e.type})),s.layout.length||delete s.layout),i.label({fields:l||[o],callback:a,cfg:lb(s)})}else Wy(By.WARN,null===r,"the label option must be an Object."),i.label({fields:[o]});return e}function kM(e){var t=e.chart,n=e.options,r=n.legend,o=n.seriesField;return!1===r?t.legend(!1):o&&t.legend(o,r),e}function OM(e){var t=e.chart,n=e.options,r=n.radius,o=n.innerRadius,i=n.startAngle,a=n.endAngle;return t.coordinate({type:"polar",cfg:{radius:r,innerRadius:o,startAngle:i,endAngle:a}}),e}function MM(e){var t,n=e.options,r=n.xAxis,o=n.yAxis,i=n.xField,a=n.yField;return rb(Vb(((t={})[i]=r,t[a]=o,t)))(e)}function IM(e){var t=e.chart,n=e.options,r=n.xAxis,o=n.yAxis,i=n.xField,a=n.yField;return r?t.axis(i,r):t.axis(i,!1),o?t.axis(a,o):t.axis(a,!1),e}function $M(e){rb(Lb("sectorStyle"),EM,MM,CM,OM,IM,kM,jb,Fb,Bb,zb,Xb(),Hb)(e)}var _M=tb({},px.getDefaultOptions(),{xAxis:!1,yAxis:!1,legend:{position:"right",radio:{}},sectorStyle:{stroke:"#fff",lineWidth:1},label:{layout:{type:"limit-in-shape"}},tooltip:{shared:!0,showMarkers:!1},interactions:[{type:"active-region"}]}),PM=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="rose",t}return(0,S.ZT)(t,e),t.getDefaultOptions=function(){return _M},t.prototype.changeData=function(e){this.updateOption({data:e}),this.chart.changeData(e)},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return $M},t}(px),AM="x",NM="y",TM="name",RM="nodes",LM="edges";function DM(e,t,n){if(!(0,E.kJ)(e))return[];var r=[],o=function(e,t,n){var r=[];return e.forEach((function(e){var o=e[t],i=e[n];r.includes(o)||r.push(o),r.includes(i)||r.push(i)})),r}(e,t,n),i=function(e,t,n,r){var o={};return t.forEach((function(e){o[e]={},t.forEach((function(t){o[e][t]=0}))})),e.forEach((function(e){o[e[n]][e[r]]=1})),o}(e,o,t,n),a={};function l(e){a[e]=1,o.forEach((function(t){if(0!=i[e][t])if(1==a[t])r.push("".concat(e,"_").concat(t));else{if(-1==a[t])return;l(t)}})),a[e]=-1}return o.forEach((function(e){a[e]=0})),o.forEach((function(e){-1!=a[e]&&l(e)})),0!==r.length&&console.warn("sankey data contains circle, ".concat(r.length," records removed."),r),e.filter((function(e){return r.findIndex((function(r){return r==="".concat(e[t],"_").concat(e[n])}))<0}))}function jM(e){return e.target.depth}function FM(e,t){return e.sourceLinks.length?e.depth:t-1}function BM(e){return function(){return e}}function zM(e,t){for(var n=0,r=0;rr)throw new Error("circular link");o=i,i=new Set}if(t)for(var l=Math.max(HM(n,(function(e){return e.depth}))+1,0),s=void 0,c=0;cn)throw new Error("circular link");r=o,o=new Set}}(y),function(t){var r=function(e){for(var t=e.nodes,r=Math.max(HM(t,(function(e){return e.depth}))+1,0),i=(a-o-s)/(r-1),l=new Array(r).fill(0).map((function(){return[]})),c=0,u=t;c0){var v=(u/d-c.y0)*t;c.y0+=v,c.y1+=v,w(c)}}void 0===n&&a.sort(VM),a.length&&y(a,r)}}function v(e,t,r){for(var o=e.length-2;o>=0;--o){for(var i=e[o],a=0,l=i;a0){var m=(c/u-s.y0)*t;s.y0+=m,s.y1+=m,w(s)}}void 0===n&&i.sort(VM),i.length&&y(i,r)}}function y(t,n){var r=t.length>>1,o=t[r];x(t,o.y0-e,r-1,n),b(t,o.y1+e,r+1,n),x(t,l,t.length-1,n),b(t,i,0,n)}function b(t,n,r,o){for(;r1e-6&&(i.y0+=a,i.y1+=a),n=i.y1+e}}function x(t,n,r,o){for(;r>=0;--r){var i=t[r],a=(i.y1-n)*o;a>1e-6&&(i.y0-=a,i.y1-=a),n=i.y0-e}}function w(e){var t=e.sourceLinks,n=e.targetLinks;if(void 0===r){for(var o=0,i=n;o "+e.target,value:e.value}}},nodeWidthRatio:.008,nodePaddingRatio:.01,animation:{appear:{animation:"wave-in"},enter:{animation:"wave-in"}}}},t.prototype.changeData=function(e){this.updateOption({data:e});var t=rI(this.options,this.chart.width,this.chart.height),n=t.nodes,r=t.edges,o=xb(this.chart,RM),i=xb(this.chart,LM);o.changeData(n),i.changeData(r)},t.prototype.getSchemaAdaptor=function(){return cI},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t}(px),fI="ancestor-node",pI="value",hI="path",gI=[hI,jk,Bk,Fk,"name","depth","height"],mI=tb({},px.getDefaultOptions(),{innerRadius:0,radius:.85,hierarchyConfig:{field:"value"},tooltip:{shared:!0,showMarkers:!1,offset:20,showTitle:!1},legend:!1,sunburstStyle:{lineWidth:.5,stroke:"#FFF"},drilldown:{enabled:!0}});function vI(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function yI(e,t,n,r,o){for(var i,a=e.children,l=-1,s=a.length,c=e.value&&(r-t)/e.value;++l0)throw new Error("cycle");return i}return n.id=function(t){return arguments.length?(e=Ek(t),n):e},n.parentId=function(e){return arguments.length?(t=Ek(e),n):t},n}function PI(e,t){return e.parent===t.parent?1:2}function AI(e){var t=e.children;return t?t[0]:e.t}function NI(e){var t=e.children;return t?t[t.length-1]:e.t}function TI(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function RI(e,t,n){return e.a.parent===t.parent?e.a:n}function LI(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}function DI(){var e=PI,t=1,n=1,r=null;function o(o){var s=function(e){for(var t,n,r,o,i,a=new LI(e,0),l=[a];t=l.pop();)if(r=t._.children)for(t.children=new Array(i=r.length),o=i-1;o>=0;--o)l.push(n=t.children[o]=new LI(r[o],o)),n.parent=t;return(a.parent=new LI(null,0)).children=[a],a}(o);if(s.eachAfter(i),s.parent.m=-s.z,s.eachBefore(a),r)o.eachBefore(l);else{var c=o,u=o,d=o;o.eachBefore((function(e){e.xu.x&&(u=e),e.depth>d.depth&&(d=e)}));var f=c===u?1:e(c,u)/2,p=f-c.x,h=t/(u.x+f+p),g=n/(d.depth||1);o.eachBefore((function(e){e.x=(e.x+p)*h,e.y=e.depth*g}))}return o}function i(t){var n=t.children,r=t.parent.children,o=t.i?r[t.i-1]:null;if(n){!function(e){for(var t,n=0,r=0,o=e.children,i=o.length;--i>=0;)(t=o[i]).z+=n,t.m+=n,n+=t.s+(r+=t.c)}(t);var i=(n[0].z+n[n.length-1].z)/2;o?(t.z=o.z+e(t._,o._),t.m=t.z-i):t.z=i}else o&&(t.z=o.z+e(t._,o._));t.parent.A=function(t,n,r){if(n){for(var o,i=t,a=t,l=n,s=i.parent.children[0],c=i.m,u=a.m,d=l.m,f=s.m;l=NI(l),i=AI(i),l&&i;)s=AI(s),(a=NI(a)).a=t,(o=l.z+d-i.z-c+e(l._,i._))>0&&(TI(RI(l,t,r),t,o),c+=o,u+=o),d+=l.m,c+=i.m,f+=s.m,u+=a.m;l&&!NI(a)&&(a.t=l,a.m+=d-u),i&&!AI(s)&&(s.t=i,s.m+=c-f,r=t)}return r}(t,o,t.parent.A||r[0])}function a(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function l(e){e.x*=t,e.y=e.depth*n}return o.separation=function(t){return arguments.length?(e=t,o):e},o.size=function(e){return arguments.length?(r=!1,t=+e[0],n=+e[1],o):r?null:[t,n]},o.nodeSize=function(e){return arguments.length?(r=!0,t=+e[0],n=+e[1],o):r?[t,n]:null},o}function jI(e,t,n,r,o){for(var i,a=e.children,l=-1,s=a.length,c=e.value&&(o-n)/e.value;++lf&&(f=l),m=u*u*g,(p=Math.max(f/m,m/d))>h){u-=l;break}h=p}v.push(a={value:u,dice:s1?t:1)},n}(FI);function HI(){var e=zI,t=!1,n=1,r=1,o=[0],i=Ck,a=Ck,l=Ck,s=Ck,c=Ck;function u(e){return e.x0=e.y0=0,e.x1=n,e.y1=r,e.eachBefore(d),o=[0],t&&e.eachBefore(vI),e}function d(t){var n=o[t.depth],r=t.x0+n,u=t.y0+n,d=t.x1-n,f=t.y1-n;d=n-1){var u=l[t];return u.x0=o,u.y0=i,u.x1=a,void(u.y1=s)}for(var d=c[t],f=r/2+d,p=t+1,h=n-1;p>>1;c[g]s-i){var y=r?(o*v+a*m)/r:a;e(t,p,m,o,i,y,s),e(p,n,v,y,i,a,s)}else{var b=r?(i*v+s*m)/r:s;e(t,p,m,o,i,a,b),e(p,n,v,o,b,a,s)}}(0,s,e.value,t,n,r,o)}function WI(e,t,n,r,o){(1&e.depth?jI:yI)(e,t,n,r,o)}const VI=function e(t){function n(e,n,r,o,i){if((a=e._squarify)&&a.ratio===t)for(var a,l,s,c,u,d=-1,f=a.length,p=e.value;++d1?t:1)},n}(FI);var XI={field:"value",tile:"treemapSquarify",size:[1,1],round:!1,ignoreParentValue:!0,padding:0,paddingInner:0,paddingOuter:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,as:["x","y"],sort:function(e,t){return t.value-e.value},ratio:.5*(1+Math.sqrt(5))};function qI(e,t){var n,r=(t=(0,E.f0)({},XI,t)).as;if(!(0,E.kJ)(r)||2!==r.length)throw new TypeError('Invalid as: it must be an array with 2 strings (e.g. [ "x", "y" ])!');try{n=Hk(t)}catch(e){console.warn(e)}var o,i,a=(o=t.tile,i=t.ratio,"treemapSquarify"===o?m[o].ratio(i):m[o]),l=function(e){return HI().tile(a).size(t.size).round(t.round).padding(t.padding).paddingInner(t.paddingInner).paddingOuter(t.paddingOuter).paddingTop(t.paddingTop).paddingRight(t.paddingRight).paddingBottom(t.paddingBottom).paddingLeft(t.paddingLeft)(Ak(e).sum((function(e){return t.ignoreParentValue&&e.children?0:e[n]})).sort(t.sort))}(e),s=r[0],c=r[1];return l.each((function(e){e[s]=[e.x0,e.x1,e.x1,e.x0],e[c]=[e.y1,e.y1,e.y0,e.y0],["x0","x1","y0","y1"].forEach((function(t){-1===r.indexOf(t)&&delete e[t]}))})),Uk(l)}function GI(e){var t=e.data,n=e.colorField,r=e.rawFields,o=e.hierarchyConfig,i=void 0===o?{}:o,a=i.activeDepth,l={partition:wI,treemap:qI},s=e.seriesField,c=e.type||"partition",u=l[c](t,(0,S.pi)((0,S.pi)({field:s||"value"},(0,E.CE)(i,["activeDepth"])),{type:"hierarchy.".concat(c),as:["x","y"]})),d=[];return u.forEach((function(e){var t,o,l,c,u,f;if(0===e.depth)return null;if(a>0&&e.depth>a)return null;for(var p=e.data.name,h=(0,S.pi)({},e);h.depth>1;)p="".concat(null===(o=h.parent.data)||void 0===o?void 0:o.name," / ").concat(p),h=h.parent;var g=(0,S.pi)((0,S.pi)((0,S.pi)({},Vy(e.data,(0,S.ev)((0,S.ev)([],r||[],!0),[i.field],!1))),((t={})[hI]=p,t[fI]=h.data.name,t)),e);s&&(g[s]=e.data[s]||(null===(c=null===(l=e.parent)||void 0===l?void 0:l.data)||void 0===c?void 0:c[s])),n&&(g[n]=e.data[n]||(null===(f=null===(u=e.parent)||void 0===u?void 0:u.data)||void 0===f?void 0:f[n])),g.ext=i,g[lk]={hierarchyConfig:i,colorField:n,rawFields:r},d.push(g)})),d}function YI(e){var t,n=e.chart,r=e.options,o=r.color,i=r.colorField,a=void 0===i?fI:i,l=r.sunburstStyle,s=r.rawFields,c=void 0===s?[]:s,u=r.shape,d=GI(r);return n.data(d),l&&(t=function(e){return tb({},{fillOpacity:Math.pow(.85,e.depth)},(0,E.mf)(l)?l(e):l)}),sx(tb({},e,{options:{xField:"x",yField:"y",seriesField:a,rawFields:(0,E.jj)((0,S.ev)((0,S.ev)([],gI,!0),c,!0)),polygon:{color:o,style:t,shape:u}}})),e}function KI(e){return e.chart.axis(!1),e}function ZI(e){var t=e.chart,n=e.options.label,r=ob(t,"polygon");if(n){var o=n.fields,i=void 0===o?["name"]:o,a=n.callback,l=(0,S._T)(n,["fields","callback"]);r.label({fields:i,callback:a,cfg:lb(l)})}else r.label(!1);return e}function JI(e){var t=e.chart,n=e.options,r=n.innerRadius,o=n.radius,i=n.reflect,a=t.coordinate({type:"polar",cfg:{innerRadius:r,radius:o}});return i&&a.reflect(i),e}function QI(e){var t,n=e.options,r=n.hierarchyConfig,o=n.meta;return rb(Vb({},((t={})[pI]=(0,E.U2)(o,(0,E.U2)(r,["field"],"value")),t)))(e)}function e$(e){var t=e.chart,n=e.options.tooltip;if(!1===n)t.tooltip(!1);else{var r=n;(0,E.U2)(n,"fields")||(r=tb({},{customItems:function(e){return e.map((function(e){var n=(0,E.U2)(t.getOptions(),"scales"),r=(0,E.U2)(n,[hI,"formatter"],(function(e){return e})),o=(0,E.U2)(n,[pI,"formatter"],(function(e){return e}));return(0,S.pi)((0,S.pi)({},e),{name:r(e.data[hI]),value:o(e.data.value)})}))}},r)),t.tooltip(r)}return e}function t$(e){var t=e.drilldown,n=e.interactions,r=void 0===n?[]:n;return(null==t?void 0:t.enabled)?tb({},e,{interactions:(0,S.ev)((0,S.ev)([],r,!0),[{type:"drill-down",cfg:{drillDownConfig:t,transformData:GI}}],!1)}):e}function n$(e){var t=e.chart,n=e.options,r=n.drilldown;return Fb({chart:t,options:t$(n)}),(null==r?void 0:r.enabled)&&(t.appendPadding=db(t.appendPadding,(0,E.U2)(r,["breadCrumb","position"]))),e}function r$(e){return rb(zb,Lb("sunburstStyle"),YI,KI,QI,Db,JI,e$,ZI,n$,Bb,Xb())(e)}var o$=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="sunburst",t}return(0,S.ZT)(t,e),t.getDefaultOptions=function(){return mI},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return r$},t.SUNBURST_ANCESTOR_FIELD=fI,t.SUNBURST_PATH_FIELD=hI,t.NODE_ANCESTORS_FIELD=Bk,t}(px);function i$(e,t){if((0,E.kJ)(e))return e.find((function(e){return e.type===t}))}function a$(e,t){var n=i$(e,t);return n&&!1!==n.enable}function l$(e){var t=e.interactions,n=e.drilldown;return(0,E.U2)(n,"enabled")||a$(t,"treemap-drill-down")}function s$(e){var t=e.data,n=e.colorField,r=e.enableDrillDown,o=e.hierarchyConfig,i=qI(t,(0,S.pi)((0,S.pi)({},o),{type:"hierarchy.treemap",field:"value",as:["x","y"]})),a=[];return i.forEach((function(e){if(0===e.depth)return null;if(r&&1!==e.depth)return null;if(!r&&e.children)return null;var i=e.ancestors().map((function(e){return{data:e.data,height:e.height,value:e.value}})),l=r&&(0,E.kJ)(t.path)?i.concat(t.path.slice(1)):i,s=Object.assign({},e.data,(0,S.pi)({x:e.x,y:e.y,depth:e.depth,value:e.value,path:l},e));if(!e.data[n]&&e.parent){var c=e.ancestors().find((function(e){return e.data[n]}));s[n]=null==c?void 0:c.data[n]}else s[n]=e.data[n];s[lk]={hierarchyConfig:o,colorField:n,enableDrillDown:r},a.push(s)})),a}function c$(e){var t=e.options.colorField;return tb({options:{rawFields:["value"],tooltip:{fields:["name","value",t,"path"],formatter:function(e){return{name:e.name,value:e.value}}}}},e)}function u$(e){var t=e.chart,n=e.options,r=n.color,o=n.colorField,i=n.rectStyle,a=n.hierarchyConfig,l=n.rawFields,s=s$({data:n.data,colorField:n.colorField,enableDrillDown:l$(n),hierarchyConfig:a});return t.data(s),sx(tb({},e,{options:{xField:"x",yField:"y",seriesField:o,rawFields:l,polygon:{color:r,style:i}}})),t.coordinate().reflect("y"),e}function d$(e){return e.chart.axis(!1),e}function f$(e){var t=e.drilldown,n=e.interactions,r=void 0===n?[]:n;return l$(e)?tb({},e,{interactions:(0,S.ev)((0,S.ev)([],r,!0),[{type:"drill-down",cfg:{drillDownConfig:t,transformData:s$}}],!1)}):e}function p$(e){var t=e.chart,n=e.options,r=n.interactions,o=n.drilldown;Fb({chart:t,options:f$(n)});var i=i$(r,"view-zoom");return i&&(!1!==i.enable?t.getCanvas().on("mousewheel",(function(e){e.preventDefault()})):t.getCanvas().off("mousewheel")),l$(n)&&(t.appendPadding=db(t.appendPadding,(0,E.U2)(o,["breadCrumb","position"]))),e}function h$(e){return rb(c$,zb,Lb("rectStyle"),u$,d$,Db,jb,p$,Bb,Xb())(e)}var g$={colorField:"name",rectStyle:{lineWidth:1,stroke:"#fff"},hierarchyConfig:{tile:"treemapSquarify"},label:{fields:["name"],layout:{type:"limit-in-shape"}},tooltip:{showMarkers:!1,showTitle:!1},drilldown:{enabled:!1,breadCrumb:{position:"bottom-left",rootText:"初始",dividerText:"/",textStyle:{fontSize:12,fill:"rgba(0, 0, 0, 0.65)",cursor:"pointer"},activeTextStyle:{fill:"#87B5FF"}}}},m$=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="treemap",t}return(0,S.ZT)(t,e),t.getDefaultOptions=function(){return g$},t.prototype.changeData=function(e){var t=this.options,n=t.colorField,r=t.interactions,o=t.hierarchyConfig;this.updateOption({data:e});var i=s$({data:e,colorField:n,enableDrillDown:a$(r,"treemap-drill-down"),hierarchyConfig:o});this.chart.changeData(i),function(e){var t=e.interactions["drill-down"];t&&t.context.actions.find((function(e){return"drill-down-action"===e.name})).reset()}(this.chart)},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return h$},t}(px),v$="id",y$="path",b$={appendPadding:[10,0,20,0],blendMode:"multiply",tooltip:{showTitle:!1,showMarkers:!1,fields:["id","size"],formatter:function(e){return{name:e.id,value:e.size}}},legend:{position:"top-left"},label:{style:{textAlign:"center",fill:"#fff"}},interactions:[{type:"legend-filter",enable:!1}],state:{active:{style:{stroke:"#000"}},selected:{style:{stroke:"#000",lineWidth:2}},inactive:{style:{fillOpacity:.3,strokeOpacity:.3}}},defaultInteractions:["tooltip","venn-legend-active"]};function x$(e){e&&e.geometries[0].elements.forEach((function(e){e.shape.toFront()}))}var w$=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.syncElementsPos=function(){x$(this.context.view)},t.prototype.active=function(){e.prototype.active.call(this),this.syncElementsPos()},t.prototype.toggle=function(){e.prototype.toggle.call(this),this.syncElementsPos()},t.prototype.reset=function(){e.prototype.reset.call(this),this.syncElementsPos()},t}(Ys("element-active")),S$=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.syncElementsPos=function(){x$(this.context.view)},t.prototype.highlight=function(){e.prototype.highlight.call(this),this.syncElementsPos()},t.prototype.toggle=function(){e.prototype.toggle.call(this),this.syncElementsPos()},t.prototype.clear=function(){e.prototype.clear.call(this),this.syncElementsPos()},t.prototype.reset=function(){e.prototype.reset.call(this),this.syncElementsPos()},t}(Ys("element-highlight")),E$=Ys("element-selected"),C$=Ys("element-single-selected"),k$=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.syncElementsPos=function(){x$(this.context.view)},t.prototype.selected=function(){e.prototype.selected.call(this),this.syncElementsPos()},t.prototype.toggle=function(){e.prototype.toggle.call(this),this.syncElementsPos()},t.prototype.reset=function(){e.prototype.reset.call(this),this.syncElementsPos()},t}(E$),O$=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.syncElementsPos=function(){x$(this.context.view)},t.prototype.selected=function(){e.prototype.selected.call(this),this.syncElementsPos()},t.prototype.toggle=function(){e.prototype.toggle.call(this),this.syncElementsPos()},t.prototype.reset=function(){e.prototype.reset.call(this),this.syncElementsPos()},t}(C$);Ks("venn-element-active",w$),Ks("venn-element-highlight",S$),Ks("venn-element-selected",k$),Ks("venn-element-single-selected",O$),Xc("venn-element-active",{start:[{trigger:"element:mouseenter",action:"venn-element-active:active"}],end:[{trigger:"element:mouseleave",action:"venn-element-active:reset"}]}),Xc("venn-element-highlight",{start:[{trigger:"element:mouseenter",action:"venn-element-highlight:highlight"}],end:[{trigger:"element:mouseleave",action:"venn-element-highlight:reset"}]}),Xc("venn-element-selected",{start:[{trigger:"element:click",action:"venn-element-selected:toggle"}],rollback:[{trigger:"dblclick",action:["venn-element-selected:reset"]}]}),Xc("venn-element-single-selected",{start:[{trigger:"element:click",action:"venn-element-single-selected:toggle"}],rollback:[{trigger:"dblclick",action:["venn-element-single-selected:reset"]}]}),Xc("venn-legend-active",{start:[{trigger:"legend-item:mouseenter",action:["list-active:active","venn-element-active:active"]}],end:[{trigger:"legend-item:mouseleave",action:["list-active:reset","venn-element-active:reset"]}]}),Xc("venn-legend-highlight",{start:[{trigger:"legend-item:mouseenter",action:["legend-item-highlight:highlight","venn-element-highlight:highlight"]}],end:[{trigger:"legend-item:mouseleave",action:["legend-item-highlight:reset","venn-element-highlight:reset"]}]});var M$=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,S.ZT)(t,e),t.prototype.getLabelPoint=function(e,t,n){var r=e.data,o=r.x,i=r.y,a=e.customLabelInfo,l=a.offsetX,s=a.offsetY;return{content:e.content[n],x:o+l,y:i+s}},t}(wd);Ku("venn",M$);const I$=Array.isArray;var $$="\t\n\v\f\r \u2028\u2029",_$=new RegExp("([a-z])["+$$+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+$$+"]*,?["+$$+"]*)+)","ig"),P$=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+$$+"]*,?["+$$+"]*","ig");Math.PI,rd("schema","venn",{draw:function(e,t){var n=function(e){if(!e)return null;if(I$(e))return e;var t={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},n=[];return String(e).replace(_$,(function(e,r,o){var i=[],a=r.toLowerCase();if(o.replace(P$,(function(e,t){t&&i.push(+t)})),"m"===a&&i.length>2&&(n.push([r].concat(i.splice(0,2))),a="l",r="m"===r?"l":"L"),"o"===a&&1===i.length&&n.push([r,i[0]]),"r"===a)n.push([r].concat(i));else for(;i.length>=t[a]&&(n.push([r].concat(i.splice(0,t[a]))),t[a]););return""})),n}(e.data[y$]),r=function(e){return tb({},e.defaultStyle,{fill:e.color},e.style)}(e),o=t.addGroup({name:"venn-shape"});o.addShape("path",{attrs:(0,S.pi)((0,S.pi)({},r),{path:n}),name:"venn-path"});var i=e.customInfo,a=i.offsetX,l=i.offsetY,s=Hd.transform(null,[["t",a,l]]);return o.setMatrix(s),o},getMarker:function(e){var t=e.color;return{symbol:"circle",style:{lineWidth:0,stroke:t,fill:t,r:4}}}});var A$={normal:function(e){return e},multiply:function(e,t){return e*t/255},screen:function(e,t){return 255*(1-(1-e/255)*(1-t/255))},overlay:function(e,t){return t<128?2*e*t/255:255*(1-2*(1-e/255)*(1-t/255))},darken:function(e,t){return e>t?t:e},lighten:function(e,t){return e>t?e:t},dodge:function(e,t){return 255===e||(e=t/255*255/(1-e/255))>255?255:e},burn:function(e,t){return 255===t?255:0===e?0:255*(1-Math.min(1,(1-t/255)/(e/255)))}};function N$(e){var t,n=e.replace("/s+/g","");return"string"!=typeof n||n.startsWith("rgba")||n.startsWith("#")?(n.startsWith("rgba")&&(t=n.replace("rgba(","").replace(")","").split(",")),n.startsWith("#")&&(t=kt.rgb2arr(n).concat([1])),t.map((function(e,t){return 3===t?Number(e):0|e}))):kt.rgb2arr(kt.toRGB(n)).concat([1])}var T$=n(8495),R$=1e-10;function L$(e,t){var n,r=function(e){for(var t=[],n=0;nt[n].radius+R$)return!1;return!0}(t,e)})),i=0,a=0,l=[];if(o.length>1){var s=z$(o);for(n=0;n-1){var g=e[d.parentIndex[h]],m=Math.atan2(d.x-g.x,d.y-g.y),v=Math.atan2(u.x-g.x,u.y-g.y),y=v-m;y<0&&(y+=2*Math.PI);var b=v-y/2,x=j$(f,{x:g.x+g.radius*Math.sin(b),y:g.y+g.radius*Math.cos(b)});x>2*g.radius&&(x=2*g.radius),(null===p||p.width>x)&&(p={circle:g,width:x,p1:d,p2:u})}null!==p&&(l.push(p),i+=D$(p.circle.radius,p.width),u=d)}}else{var w=e[0];for(n=1;nMath.abs(w.radius-e[n].radius)){S=!0;break}S?i=a=0:(i=w.radius*w.radius*Math.PI,l.push({circle:w,p1:{x:w.x,y:w.y+w.radius},p2:{x:w.x-R$,y:w.y+w.radius},width:2*w.radius}))}return a/=2,t&&(t.area=i+a,t.arcArea=i,t.polygonArea=a,t.arcs=l,t.innerPoints=o,t.intersectionPoints=r),i+a}function D$(e,t){return e*e*Math.acos(1-t/e)-(e-t)*Math.sqrt(t*(2*e-t))}function j$(e,t){return Math.sqrt((e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y))}function F$(e,t,n){if(n>=e+t)return 0;if(n<=Math.abs(e-t))return Math.PI*Math.min(e,t)*Math.min(e,t);var r=t-(n*n-e*e+t*t)/(2*n);return D$(e,e-(n*n-t*t+e*e)/(2*n))+D$(t,r)}function B$(e,t){var n=j$(e,t),r=e.radius,o=t.radius;if(n>=r+o||n<=Math.abs(r-o))return[];var i=(r*r-o*o+n*n)/(2*n),a=Math.sqrt(r*r-i*i),l=e.x+i*(t.x-e.x)/n,s=e.y+i*(t.y-e.y)/n,c=-(t.y-e.y)*(a/n),u=-(t.x-e.x)*(a/n);return[{x:l+c,y:s-u},{x:l-c,y:s+u}]}function z$(e){for(var t={x:0,y:0},n=0;n=a&&(i=r[n],a=l)}var s=(0,T$.nelderMead)((function(n){return-1*H$({x:n[0],y:n[1]},e,t)}),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,c={x:s[0],y:s[1]},u=!0;for(n=0;ne[n].radius){u=!1;break}for(n=0;n=Math.min(o[u].size,o[d].size)&&(c=0),i[u].push({set:d,size:s.size,weight:c}),i[d].push({set:u,size:s.size,weight:c})}var f=[];for(n in i)if(i.hasOwnProperty(n)){var p=0;for(a=0;a=8){var o=function(e,t){var n,r=(t=t||{}).restarts||10,o=[],i={};for(n=0;n=Math.min(t[i].size,t[a].size)?s=1:e.size<=1e-10&&(s=-1),o[i][a]=o[a][i]=s})),{distances:r,constraints:o}}(e,o,i),s=l.distances,c=l.constraints,u=(0,T$.norm2)(s.map(T$.norm2))/s.length;s=s.map((function(e){return e.map((function(e){return e/u}))}));var d,f,p=function(e,t){return function(e,t,n,r){var o,i=0;for(o=0;o0&&h<=d||f<0&&h>=d||(i+=2*g*g,t[2*o]+=4*g*(a-c),t[2*o+1]+=4*g*(l-u),t[2*s]+=4*g*(c-a),t[2*s+1]+=4*g*(u-l))}return i}(e,t,s,c)};for(n=0;nt?1:-1})),t=0;t0&&console.log("WARNING: area "+i+" not represented on screen")}return n}(c,l);return l.forEach((function(e){var t=e.sets,n=t.join(",");e[v$]=n;var r=function(e){var t={};L$(e,t);var n=t.arcs;if(0===n.length)return"M 0 0";if(1==n.length){var r=n[0].circle;return function(e,t,n){var r=[],o=e-n,i=t;return r.push("M",o,i),r.push("A",n,n,0,1,0,o+2*n,i),r.push("A",n,n,0,1,0,o,i),r.join(" ")}(r.x,r.y,r.radius)}for(var o=["\nM",n[0].p2.x,n[0].p2.y],i=0;il;o.push("\nA",l,l,0,s?1:0,1,a.p1.x,a.p1.y)}return o.join(" ")}(t.map((function(e){return c[e]})));/[zZ]$/.test(r)||(r+=" Z"),e[y$]=r;var o=u[n]||{x:0,y:0};(0,E.f0)(e,o)})),l}var K$=40;function Z$(e,t,n){var r=e.chart,o=e.options,i=o.blendMode,a=o.setsField,l=r.getTheme(),s=l.colors10,c=l.colors20,u=n;(0,E.kJ)(u)||(u=t.filter((function(e){return 1===e[a].length})).length<=10?s:c);var d=G$(u,t,i,a);return function(e){return d.get(e)||u[0]}}function J$(e){var t=e.chart,n=e.options,r=n.legend,o=n.appendPadding,i=n.padding,a=ub(o);return!1!==r&&(a=db(o,(0,E.U2)(r,"position"),K$)),t.appendPadding=fb([a,i]),e}function Q$(e){var t=e.options.data;t||(Wy(By.WARN,!1,"warn: %s","数据不能为空"),t=[]);var n=t.filter((function(e){return 1===e.sets.length})).map((function(e){return e.sets[0]})),r=t.filter((function(e){var t=e.sets;return function(e,t){for(var n=0;n1)throw new Error("quantiles must be between 0 and 1");return 1===t?e[e.length-1]:0===t?e[0]:n%1!=0?e[Math.ceil(n)-1]:e.length%2==0?(e[n-1]+e[n])/2:e[n]}function w_(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function S_(e,t,n,r){for(n=n||0,r=r||e.length-1;r>n;){if(r-n>600){var o=r-n+1,i=t-n+1,a=Math.log(o),l=.5*Math.exp(2*a/3),s=.5*Math.sqrt(a*l*(o-l)/o);i-o/2<0&&(s*=-1),S_(e,t,Math.max(n,Math.floor(t-i*l/o+s)),Math.min(r,Math.floor(t+(o-i)*l/o+s)))}var c=e[t],u=n,d=r;for(w_(e,n,t),e[r]>c&&w_(e,n,r);uc;)d--}e[n]===c?w_(e,n,d):w_(e,++d,r),d<=t&&(n=d+1),t<=d&&(r=d-1)}}function E_(e,t){var n=e.slice();if(Array.isArray(t)){!function(e,t){for(var n=[0],r=0;r0?u:d}}}})).ext.geometry.customInfo((0,S.pi)((0,S.pi)({},h),{leaderLine:l})),e}function K_(e){var t,n,r=e.options,o=r.xAxis,i=r.yAxis,a=r.xField,l=r.yField,s=r.meta,c=tb({},{alias:l},(0,E.U2)(s,l));return rb(Vb(((t={})[a]=o,t[l]=i,t[H_]=i,t),tb({},s,((n={})[H_]=c,n[U_]=c,n[W_]=c,n))))(e)}function Z_(e){var t=e.chart,n=e.options,r=n.xAxis,o=n.yAxis,i=n.xField,a=n.yField;return!1===r?t.axis(i,!1):t.axis(i,r),!1===o?(t.axis(a,!1),t.axis(H_,!1)):(t.axis(a,o),t.axis(H_,o)),e}function J_(e){var t=e.chart,n=e.options,r=n.legend,o=n.total,i=n.risingFill,a=n.fallingFill,l=Jb(n.locale);if(!1===r)t.legend(!1);else{var s=[{name:l.get(["general","increase"]),value:"increase",marker:{symbol:"square",style:{r:5,fill:i}}},{name:l.get(["general","decrease"]),value:"decrease",marker:{symbol:"square",style:{r:5,fill:a}}}];o&&s.push({name:o.label||"",value:"total",marker:{symbol:"square",style:tb({},{r:5},(0,E.U2)(o,"style"))}}),t.legend(tb({},{custom:!0,position:"top",items:s},r)),t.removeInteraction("legend-filter")}return e}function Q_(e){var t=e.chart,n=e.options,r=n.label,o=n.labelMode,i=n.xField,a=ob(t,"interval");if(r){var l=r.callback,s=(0,S._T)(r,["callback"]);a.label({fields:"absolute"===o?[W_,i]:[U_,i],callback:l,cfg:lb(s)})}else a.label(!1);return e}function eP(e){var t=e.chart,n=e.options,r=n.tooltip,o=n.xField,i=n.yField;if(!1!==r){t.tooltip((0,S.pi)({showCrosshairs:!1,showMarkers:!1,shared:!0,fields:[i]},r));var a=t.geometries[0];(null==r?void 0:r.formatter)?a.tooltip("".concat(o,"*").concat(i),r.formatter):a.tooltip(i)}else t.tooltip(!1);return e}function tP(e){return rb(G_,zb,Y_,K_,Z_,J_,eP,Q_,Hb,Fb,Bb,Xb())(e)}rd("interval","waterfall",{draw:function(e,t){var n=e.customInfo,r=e.points,o=e.nextPoints,i=t.addGroup(),a=this.parsePath(function(e){for(var t=[],n=0;n=d));)if(n.x=c+i,n.y=u+s,!(n.x+n.x0<0||n.y+n.y0<0||n.x+n.x1>e[0]||n.y+n.y1>e[1]||r&&vP(n,t,e[0])||r&&(O=n,M=r,!(O.x+O.x1>M[0].x&&O.x+O.x0M[0].y&&O.y+O.y0>5,v=e[0]>>5,y=n.x-(m<<4),b=127&y,x=32-b,w=n.y1-n.y0,S=void 0,E=(n.y+n.y0)*v+(y>>5),C=0;C>>b:0);E+=v}return delete n.sprite,!0}var O,M;return!1}return p.start=function(){var a=e[0],g=e[1],m=function(e){e.width=e.height=1;var t=Math.sqrt(e.getContext("2d",{willReadFrequently:!0}).getImageData(0,0,1,1).data.length>>2);e.width=(sP<<5)/t,e.height=cP/t;var n=e.getContext("2d",{willReadFrequently:!0});return n.fillStyle=n.strokeStyle="red",n.textAlign="center",{context:n,ratio:t}}(f()),v=p.board?p.board:xP((e[0]>>5)*e[1]),y=s.length,b=[],x=s.map((function(e,a,l){return e.text=u.call(this,e,a,l),e.font=t.call(this,e,a,l),e.style=d.call(this,e,a,l),e.weight=r.call(this,e,a,l),e.rotate=o.call(this,e,a,l),e.size=~~n.call(this,e,a,l),e.padding=i.call(this,e,a,l),e})).sort((function(e,t){return t.size-e.size})),w=-1,S=p.board?[{x:0,y:0},{x:a,y:g}]:null;return function(){for(var t=Date.now();Date.now()-t>1,n.y=g*(l()+.5)>>1,mP(m,n,x,w),n.hasText&&h(v,n,S)&&(b.push(n),S?p.hasImage||yP(S,n):S=[{x:n.x+n.x0,y:n.y+n.y0},{x:n.x+n.x1,y:n.y+n.y1}],n.x-=e[0]>>1,n.y-=e[1]>>1)}p._tags=b,p._bounds=S}(),p},p.createMask=function(t){var n=document.createElement("canvas"),r=e[0],o=e[1];if(r&&o){var i=r>>5,a=xP((r>>5)*o);n.width=r,n.height=o;var l=n.getContext("2d");l.drawImage(t,0,0,t.width,t.height,0,0,r,o);for(var s=l.getImageData(0,0,r,o).data,c=0;c>5),f=c*r+u<<2,h=s[f]>=250&&s[f+1]>=250&&s[f+2]>=250?1<<31-u%32:0;a[d]|=h}p.board=a,p.hasImage=!0}},p.timeInterval=function(e){c=null==e?1/0:e},p.words=function(e){s=e},p.size=function(t){e=[+t[0],+t[1]]},p.font=function(e){t=SP(e)},p.fontWeight=function(e){r=SP(e)},p.rotate=function(e){o=SP(e)},p.spiral=function(e){a=EP[e]||e},p.fontSize=function(e){n=SP(e)},p.padding=function(e){i=SP(e)},p.random=function(e){l=SP(e)},p}();["font","fontSize","fontWeight","padding","rotate","size","spiral","timeInterval","random"].forEach((function(e){(0,E.UM)(t[e])||n[e](t[e])})),n.words(e),t.imageMask&&n.createMask(t.imageMask);var r=n.start()._tags;r.forEach((function(e){e.x+=t.size[0]/2,e.y+=t.size[1]/2}));var o=t.size,i=o[0],a=o[1];return r.push({text:"",value:0,x:0,y:0,opacity:0}),r.push({text:"",value:0,x:i,y:a,opacity:0}),r}(e,t=(0,E.f0)({},iP,t))}var lP=Math.PI/180,sP=64,cP=2048;function uP(e){return e.text}function dP(){return"serif"}function fP(){return"normal"}function pP(e){return e.value}function hP(){return 90*~~(2*Math.random())}function gP(){return 1}function mP(e,t,n,r){if(!t.sprite){var o=e.context,i=e.ratio;o.clearRect(0,0,(sP<<5)/i,cP/i);var a=0,l=0,s=0,c=n.length;for(--r;++r>5<<5,d=~~Math.max(Math.abs(g+m),Math.abs(g-m))}else u=u+31>>5<<5;if(d>s&&(s=d),a+u>=sP<<5&&(a=0,l+=s,s=0),l+d>=cP)break;o.translate((a+(u>>1))/i,(l+(d>>1))/i),t.rotate&&o.rotate(t.rotate*lP),o.fillText(t.text,0,0),t.padding&&(o.lineWidth=2*t.padding,o.strokeText(t.text,0,0)),o.restore(),t.width=u,t.height=d,t.xoff=a,t.yoff=l,t.x1=u>>1,t.y1=d>>1,t.x0=-t.x1,t.y0=-t.y1,t.hasText=!0,a+=u}for(var y=o.getImageData(0,0,(sP<<5)/i,cP/i).data,b=[];--r>=0;)if((t=n[r]).hasText){for(var x=(u=t.width)>>5,w=(d=t.y1-t.y0,0);w>5),O=y[(l+C)*(sP<<5)+(a+w)<<2]?1<<31-w%32:0;b[k]|=O,S|=O}S?E=C:(t.y0++,d--,C--,l++)}t.y1=t.y0+E,t.sprite=b.slice(0,(t.y1-t.y0)*x)}}}function vP(e,t,n){n>>=5;for(var r,o=e.sprite,i=e.width>>5,a=e.x-(i<<4),l=127&a,s=32-l,c=e.y1-e.y0,u=(e.y+e.y0)*n+(a>>5),d=0;d>>l:0))&t[u+f])return!0;u+=n}return!1}function yP(e,t){var n=e[0],r=e[1];t.x+t.x0r.x&&(r.x=t.x+t.x1),t.y+t.y1>r.y&&(r.y=t.y+t.y1)}function bP(e){var t=e[0]/e[1];return function(e){return[t*(e*=.1)*Math.cos(e),e*Math.sin(e)]}}function xP(e){for(var t=[],n=-1;++n=18&&(RP=FP.createRoot)}catch(e){}function HP(e){var t=FP.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;t&&"object"==typeof t&&(t.usingClientEntryPoint=e)}var UP="__rc_react_root__";var WP=new Map;const VP=function(e,t,n){var r=document.createElement("div");return"tooltip"===t&&(r.setAttribute("data-uuid",n),WP.has(n)?r=WP.get(n):WP.set(n,r),r.className="g2-tooltip"),function(e,t){RP?function(e,t){HP(!0);var n=t[UP]||RP(t);HP(!1),n.render(e),t[UP]=n}(e,t):function(e,t){zP(e,t)}(e,t)}(e,r),r};var XP=function(e,t){return{}.toString.call(e)==="[object ".concat(t,"]")},qP=function(e){return e&&"object"==typeof e?(Array.isArray(e)?t=e.map((function(e){return qP(e)})):(t={},Object.keys(e).forEach((function(n){return t[n]=qP(e[n])}))),t):e;var t},GP=function(e,t){for(var n=e,r=0;r{"use strict";n.d(t,{Z:()=>r});const r=function(){function e(){this._events={}}return e.prototype.on=function(e,t,n){return this._events[e]||(this._events[e]=[]),this._events[e].push({callback:t,once:!!n}),this},e.prototype.once=function(e,t){return this.on(e,t,!0)},e.prototype.emit=function(e){for(var t=this,n=[],r=1;r{"use strict";n.d(t,{Z:()=>a});var r=n(2970),o=n(9210),i=n(9405);const a=function(e){function t(t){var n=e.call(this)||this;n.destroyed=!1;var r=n.getDefaultCfg();return n.cfg=(0,i.CD)(r,t),n}return(0,r.ZT)(t,e),t.prototype.getDefaultCfg=function(){return{}},t.prototype.get=function(e){return this.cfg[e]},t.prototype.set=function(e,t){this.cfg[e]=t},t.prototype.destroy=function(){this.cfg={destroyed:!0},this.off(),this.destroyed=!0},t}(o.Z)},7085:(e,t,n)=>{"use strict";n.d(t,{Z:()=>be});var r=n(2970),o=n(8359),i=n(6179),a=n(9405),l=n(9537),s=n(2009);function c(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function u(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function d(){}var f=.7,p=1/f,h="\\s*([+-]?\\d+)\\s*",g="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",m="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",v=/^#([0-9a-f]{3,8})$/,y=new RegExp(`^rgb\\(${h},${h},${h}\\)$`),b=new RegExp(`^rgb\\(${m},${m},${m}\\)$`),x=new RegExp(`^rgba\\(${h},${h},${h},${g}\\)$`),w=new RegExp(`^rgba\\(${m},${m},${m},${g}\\)$`),S=new RegExp(`^hsl\\(${g},${m},${m}\\)$`),E=new RegExp(`^hsla\\(${g},${m},${m},${g}\\)$`),C={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function k(){return this.rgb().formatHex()}function O(){return this.rgb().formatRgb()}function M(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=v.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?I(t):3===n?new P(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?$(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?$(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=y.exec(e))?new P(t[1],t[2],t[3],1):(t=b.exec(e))?new P(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=x.exec(e))?$(t[1],t[2],t[3],t[4]):(t=w.exec(e))?$(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=S.exec(e))?D(t[1],t[2]/100,t[3]/100,1):(t=E.exec(e))?D(t[1],t[2]/100,t[3]/100,t[4]):C.hasOwnProperty(e)?I(C[e]):"transparent"===e?new P(NaN,NaN,NaN,0):null}function I(e){return new P(e>>16&255,e>>8&255,255&e,1)}function $(e,t,n,r){return r<=0&&(e=t=n=NaN),new P(e,t,n,r)}function _(e,t,n,r){return 1===arguments.length?((o=e)instanceof d||(o=M(o)),o?new P((o=o.rgb()).r,o.g,o.b,o.opacity):new P):new P(e,t,n,null==r?1:r);var o}function P(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function A(){return`#${L(this.r)}${L(this.g)}${L(this.b)}`}function N(){const e=T(this.opacity);return`${1===e?"rgb(":"rgba("}${R(this.r)}, ${R(this.g)}, ${R(this.b)}${1===e?")":`, ${e})`}`}function T(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function R(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function L(e){return((e=R(e))<16?"0":"")+e.toString(16)}function D(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new F(e,t,n,r)}function j(e){if(e instanceof F)return new F(e.h,e.s,e.l,e.opacity);if(e instanceof d||(e=M(e)),!e)return new F;if(e instanceof F)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,l=i-o,s=(i+o)/2;return l?(a=t===i?(n-r)/l+6*(n0&&s<1?0:a,new F(a,l,s,e.opacity)}function F(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function B(e){return(e=(e||0)%360)<0?e+360:e}function z(e){return Math.max(0,Math.min(1,e||0))}function H(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function U(e,t,n,r,o){var i=e*e,a=i*e;return((1-3*e+3*i-a)*t+(4-6*i+3*a)*n+(1+3*e+3*i-3*a)*r+a*o)/6}c(d,M,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:k,formatHex:k,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return j(this).formatHsl()},formatRgb:O,toString:O}),c(P,_,u(d,{brighter(e){return e=null==e?p:Math.pow(p,e),new P(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?f:Math.pow(f,e),new P(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new P(R(this.r),R(this.g),R(this.b),T(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:A,formatHex:A,formatHex8:function(){return`#${L(this.r)}${L(this.g)}${L(this.b)}${L(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:N,toString:N})),c(F,(function(e,t,n,r){return 1===arguments.length?j(e):new F(e,t,n,null==r?1:r)}),u(d,{brighter(e){return e=null==e?p:Math.pow(p,e),new F(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?f:Math.pow(f,e),new F(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new P(H(e>=240?e-240:e+120,o,r),H(e,o,r),H(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new F(B(this.h),z(this.s),z(this.l),T(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=T(this.opacity);return`${1===e?"hsl(":"hsla("}${B(this.h)}, ${100*z(this.s)}%, ${100*z(this.l)}%${1===e?")":`, ${e})`}`}}));const W=e=>()=>e;function V(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):W(isNaN(e)?t:e)}const X=function e(t){var n=function(e){return 1==(e=+e)?V:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):W(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=_(e)).r,(t=_(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=V(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=i(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function q(e){return function(t){var n,r,o=t.length,i=new Array(o),a=new Array(o),l=new Array(o);for(n=0;n=1?(n=1,t-1):Math.floor(n*t),o=e[r],i=e[r+1],a=r>0?e[r-1]:2*o-i,l=ri&&(o=t.slice(i,o),l[a]?l[a]+=o:l[++a]=o),(n=n[0])===(r=r[0])?l[a]?l[a]+=r:l[++a]=r:(l[++a]=null,s.push({i:a,x:J(n,r)})),i=te.lastIndex;return ip.length?(f=ie.parsePathString(a[d]),p=ie.parsePathString(i[d]),p=ie.fillPathByDiff(p,f),p=ie.formatPath(p,f),t.fromAttrs.path=p,t.toAttrs.path=f):t.pathFormatted||(f=ie.parsePathString(a[d]),p=ie.parsePathString(i[d]),p=ie.formatPath(p,f),t.fromAttrs.path=p,t.toAttrs.path=f,t.pathFormatted=!0),o[d]=[];for(var h=0;h0){for(var i=r.animators.length-1;i>=0;i--)if((e=r.animators[i]).destroyed)r.removeAnimator(i);else{if(!e.isAnimatePaused())for(var a=(t=e.get("animations")).length-1;a>=0;a--)n=t[a],le(e,n,o)&&(t.splice(a,1),n.callback&&n.callback());0===t.length&&r.removeAnimator(i)}r.canvas.get("autoDraw")||r.canvas.draw()}}))},e.prototype.addAnimator=function(e){this.animators.push(e)},e.prototype.removeAnimator=function(e){this.animators.splice(e,1)},e.prototype.isAnimating=function(){return!!this.animators.length},e.prototype.stop=function(){this.timer&&this.timer.stop()},e.prototype.stopAllAnimations=function(e){void 0===e&&(e=!0),this.animators.forEach((function(t){t.stopAnimate(e)})),this.animators=[],this.canvas.draw()},e.prototype.getTime=function(){return this.current},e}();const ce=se;var ue=n(4378),de=["mousedown","mouseup","dblclick","mouseout","mouseover","mousemove","mouseleave","mouseenter","touchstart","touchmove","touchend","dragenter","dragover","dragleave","drop","contextmenu","mousewheel"];function fe(e,t,n){n.name=t,n.target=e,n.currentTarget=e,n.delegateTarget=e,e.emit(t,n)}function pe(e,t,n){if(n.bubbles){var r=void 0,o=!1;if("mouseenter"===t?(r=n.fromShape,o=!0):"mouseleave"===t&&(o=!0,r=n.toShape),e.isCanvas()&&o)return;if(r&&(0,a.UY)(e,r))return void(n.bubbles=!1);n.name=t,n.currentTarget=e,n.delegateTarget=e,e.emit(t,n)}}var he=function(){function e(e){var t=this;this.draggingShape=null,this.dragging=!1,this.currentShape=null,this.mousedownShape=null,this.mousedownPoint=null,this._eventCallback=function(e){var n=e.type;t._triggerEvent(n,e)},this._onDocumentMove=function(e){if(t.canvas.get("el")!==e.target&&(t.dragging||t.currentShape)){var n=t._getPointInfo(e);t.dragging&&t._emitEvent("drag",e,n,t.draggingShape)}},this._onDocumentMouseUp=function(e){if(t.canvas.get("el")!==e.target&&t.dragging){var n=t._getPointInfo(e);t.draggingShape&&t._emitEvent("drop",e,n,null),t._emitEvent("dragend",e,n,t.draggingShape),t._afterDrag(t.draggingShape,n,e)}},this.canvas=e.canvas}return e.prototype.init=function(){this._bindEvents()},e.prototype._bindEvents=function(){var e=this,t=this.canvas.get("el");(0,a.S6)(de,(function(n){t.addEventListener(n,e._eventCallback)})),document&&(document.addEventListener("mousemove",this._onDocumentMove),document.addEventListener("mouseup",this._onDocumentMouseUp))},e.prototype._clearEvents=function(){var e=this,t=this.canvas.get("el");(0,a.S6)(de,(function(n){t.removeEventListener(n,e._eventCallback)})),document&&(document.removeEventListener("mousemove",this._onDocumentMove),document.removeEventListener("mouseup",this._onDocumentMouseUp))},e.prototype._getEventObj=function(e,t,n,r,o,i){var a=new ue.Z(e,t);return a.fromShape=o,a.toShape=i,a.x=n.x,a.y=n.y,a.clientX=n.clientX,a.clientY=n.clientY,a.propagationPath.push(r),a},e.prototype._getShape=function(e,t){return this.canvas.getShape(e.x,e.y,t)},e.prototype._getPointInfo=function(e){var t=this.canvas,n=t.getClientByEvent(e),r=t.getPointByEvent(e);return{x:r.x,y:r.y,clientX:n.x,clientY:n.y}},e.prototype._triggerEvent=function(e,t){var n=this._getPointInfo(t),r=this._getShape(n,t),o=this["_on"+e],i=!1;if(o)o.call(this,n,r,t);else{var a=this.currentShape;"mouseenter"===e||"dragenter"===e||"mouseover"===e?(this._emitEvent(e,t,n,null,null,r),r&&this._emitEvent(e,t,n,r,null,r),"mouseenter"===e&&this.draggingShape&&this._emitEvent("dragenter",t,n,null)):"mouseleave"===e||"dragleave"===e||"mouseout"===e?(i=!0,a&&this._emitEvent(e,t,n,a,a,null),this._emitEvent(e,t,n,null,a,null),"mouseleave"===e&&this.draggingShape&&this._emitEvent("dragleave",t,n,null)):this._emitEvent(e,t,n,r,null,null)}if(i||(this.currentShape=r),r&&!r.get("destroyed")){var l=this.canvas;l.get("el").style.cursor=r.attr("cursor")||l.get("cursor")}},e.prototype._onmousedown=function(e,t,n){0===n.button&&(this.mousedownShape=t,this.mousedownPoint=e,this.mousedownTimeStamp=n.timeStamp),this._emitEvent("mousedown",n,e,t,null,null)},e.prototype._emitMouseoverEvents=function(e,t,n,r){var o=this.canvas.get("el");n!==r&&(n&&(this._emitEvent("mouseout",e,t,n,n,r),this._emitEvent("mouseleave",e,t,n,n,r),r&&!r.get("destroyed")||(o.style.cursor=this.canvas.get("cursor"))),r&&(this._emitEvent("mouseover",e,t,r,n,r),this._emitEvent("mouseenter",e,t,r,n,r)))},e.prototype._emitDragoverEvents=function(e,t,n,r,o){r?(r!==n&&(n&&this._emitEvent("dragleave",e,t,n,n,r),this._emitEvent("dragenter",e,t,r,n,r)),o||this._emitEvent("dragover",e,t,r)):n&&this._emitEvent("dragleave",e,t,n,n,r),o&&this._emitEvent("dragover",e,t,r)},e.prototype._afterDrag=function(e,t,n){e&&(e.set("capture",!0),this.draggingShape=null),this.dragging=!1;var r=this._getShape(t,n);r!==e&&this._emitMouseoverEvents(n,t,e,r),this.currentShape=r},e.prototype._onmouseup=function(e,t,n){if(0===n.button){var r=this.draggingShape;this.dragging?(r&&this._emitEvent("drop",n,e,t),this._emitEvent("dragend",n,e,r),this._afterDrag(r,e,n)):(this._emitEvent("mouseup",n,e,t),t===this.mousedownShape&&this._emitEvent("click",n,e,t),this.mousedownShape=null,this.mousedownPoint=null)}},e.prototype._ondragover=function(e,t,n){n.preventDefault();var r=this.currentShape;this._emitDragoverEvents(n,e,r,t,!0)},e.prototype._onmousemove=function(e,t,n){var r=this.canvas,o=this.currentShape,i=this.draggingShape;if(this.dragging)i&&this._emitDragoverEvents(n,e,o,t,!1),this._emitEvent("drag",n,e,i);else{var a=this.mousedownPoint;if(a){var l=this.mousedownShape,s=n.timeStamp-this.mousedownTimeStamp,c=a.clientX-e.clientX,u=a.clientY-e.clientY;s>120||c*c+u*u>40?l&&l.get("draggable")?((i=this.mousedownShape).set("capture",!1),this.draggingShape=i,this.dragging=!0,this._emitEvent("dragstart",n,e,i),this.mousedownShape=null,this.mousedownPoint=null):!l&&r.get("draggable")?(this.dragging=!0,this._emitEvent("dragstart",n,e,null),this.mousedownShape=null,this.mousedownPoint=null):(this._emitMouseoverEvents(n,e,o,t),this._emitEvent("mousemove",n,e,t)):(this._emitMouseoverEvents(n,e,o,t),this._emitEvent("mousemove",n,e,t))}else this._emitMouseoverEvents(n,e,o,t),this._emitEvent("mousemove",n,e,t)}},e.prototype._emitEvent=function(e,t,n,r,o,i){var a=this._getEventObj(e,t,n,r,o,i);if(r){a.shape=r,fe(r,e,a);for(var l=r.getParent();l;)l.emitDelegation(e,a),a.propagationStopped||pe(l,e,a),a.propagationPath.push(l),l=l.getParent()}else fe(this.canvas,e,a)},e.prototype.destroy=function(){this._clearEvents(),this.canvas=null,this.currentShape=null,this.draggingShape=null,this.mousedownPoint=null,this.mousedownShape=null,this.mousedownTimeStamp=null},e}();const ge=he;var me=(0,o.qY)(),ve=me&&"firefox"===me.name,ye=function(e){function t(t){var n=e.call(this,t)||this;return n.initContainer(),n.initDom(),n.initEvents(),n.initTimeline(),n}return(0,r.ZT)(t,e),t.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return t.cursor="default",t.supportCSSTransform=!1,t},t.prototype.initContainer=function(){var e=this.get("container");(0,a.HD)(e)&&(e=document.getElementById(e),this.set("container",e))},t.prototype.initDom=function(){var e=this.createDom();this.set("el",e),this.get("container").appendChild(e),this.setDOMSize(this.get("width"),this.get("height"))},t.prototype.initEvents=function(){var e=new ge({canvas:this});e.init(),this.set("eventController",e)},t.prototype.initTimeline=function(){var e=new ce(this);this.set("timeline",e)},t.prototype.setDOMSize=function(e,t){var n=this.get("el");a.jU&&(n.style.width=e+"px",n.style.height=t+"px")},t.prototype.changeSize=function(e,t){this.setDOMSize(e,t),this.set("width",e),this.set("height",t),this.onCanvasChange("changeSize")},t.prototype.getRenderer=function(){return this.get("renderer")},t.prototype.getCursor=function(){return this.get("cursor")},t.prototype.setCursor=function(e){this.set("cursor",e);var t=this.get("el");a.jU&&t&&(t.style.cursor=e)},t.prototype.getPointByEvent=function(e){if(this.get("supportCSSTransform")){if(ve&&!(0,a.kK)(e.layerX)&&e.layerX!==e.offsetX)return{x:e.layerX,y:e.layerY};if(!(0,a.kK)(e.offsetX))return{x:e.offsetX,y:e.offsetY}}var t=this.getClientByEvent(e),n=t.x,r=t.y;return this.getPointByClient(n,r)},t.prototype.getClientByEvent=function(e){var t=e;return e.touches&&(t="touchend"===e.type?e.changedTouches[0]:e.touches[0]),{x:t.clientX,y:t.clientY}},t.prototype.getPointByClient=function(e,t){var n=this.get("el").getBoundingClientRect();return{x:e-n.left,y:t-n.top}},t.prototype.getClientByPoint=function(e,t){var n=this.get("el").getBoundingClientRect();return{x:e+n.left,y:t+n.top}},t.prototype.draw=function(){},t.prototype.removeDom=function(){var e=this.get("el");e.parentNode.removeChild(e)},t.prototype.clearEvents=function(){this.get("eventController").destroy()},t.prototype.isCanvas=function(){return!0},t.prototype.getParent=function(){return null},t.prototype.destroy=function(){var t=this.get("timeline");this.get("destroyed")||(this.clear(),t&&t.stop(),this.clearEvents(),this.removeDom(),e.prototype.destroy.call(this))},t}(i.Z);const be=ye},6179:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(2970),o=n(3985),i=n(9405),a={},l="_INDEX";function s(e,t){if(e.set("canvas",t),e.isGroup()){var n=e.get("children");n.length&&n.forEach((function(e){s(e,t)}))}}function c(e,t){if(e.set("timeline",t),e.isGroup()){var n=e.get("children");n.length&&n.forEach((function(e){c(e,t)}))}}const u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,r.ZT)(t,e),t.prototype.isCanvas=function(){return!1},t.prototype.getBBox=function(){var e=1/0,t=-1/0,n=1/0,r=-1/0,o=this.getChildren().filter((function(e){return e.get("visible")&&(!e.isGroup()||e.isGroup()&&e.getChildren().length>0)}));return o.length>0?(0,i.S6)(o,(function(o){var i=o.getBBox(),a=i.minX,l=i.maxX,s=i.minY,c=i.maxY;at&&(t=l),sr&&(r=c)})):(e=0,t=0,n=0,r=0),{x:e,y:n,minX:e,minY:n,maxX:t,maxY:r,width:t-e,height:r-n}},t.prototype.getCanvasBBox=function(){var e=1/0,t=-1/0,n=1/0,r=-1/0,o=this.getChildren().filter((function(e){return e.get("visible")&&(!e.isGroup()||e.isGroup()&&e.getChildren().length>0)}));return o.length>0?(0,i.S6)(o,(function(o){var i=o.getCanvasBBox(),a=i.minX,l=i.maxX,s=i.minY,c=i.maxY;at&&(t=l),sr&&(r=c)})):(e=0,t=0,n=0,r=0),{x:e,y:n,minX:e,minY:n,maxX:t,maxY:r,width:t-e,height:r-n}},t.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return t.children=[],t},t.prototype.onAttrChange=function(t,n,r){if(e.prototype.onAttrChange.call(this,t,n,r),"matrix"===t){var o=this.getTotalMatrix();this._applyChildrenMarix(o)}},t.prototype.applyMatrix=function(t){var n=this.getTotalMatrix();e.prototype.applyMatrix.call(this,t);var r=this.getTotalMatrix();r!==n&&this._applyChildrenMarix(r)},t.prototype._applyChildrenMarix=function(e){var t=this.getChildren();(0,i.S6)(t,(function(t){t.applyMatrix(e)}))},t.prototype.addShape=function(){for(var e=[],t=0;t=0;a--){var l=e[a];if((0,i.pP)(l)&&(l.isGroup()?o=l.getShape(t,n,r):l.isHit(t,n)&&(o=l)),o)break}return o},t.prototype.add=function(e){var t=this.getCanvas(),n=this.getChildren(),r=this.get("timeline"),o=e.getParent();o&&function(e,t,n){void 0===n&&(n=!0),n?t.destroy():(t.set("parent",null),t.set("canvas",null)),(0,i.As)(e.getChildren(),t)}(o,e,!1),e.set("parent",this),t&&s(e,t),r&&c(e,r),n.push(e),e.onCanvasChange("add"),this._applyElementMatrix(e)},t.prototype._applyElementMatrix=function(e){var t=this.getTotalMatrix();t&&e.applyMatrix(t)},t.prototype.getChildren=function(){return this.get("children")},t.prototype.sort=function(){var e,t=this.getChildren();(0,i.S6)(t,(function(e,t){return e[l]=t,e})),t.sort((e=function(e,t){return e.get("zIndex")-t.get("zIndex")},function(t,n){var r=e(t,n);return 0===r?t[l]-n[l]:r})),this.onCanvasChange("sort")},t.prototype.clear=function(){if(this.set("clearing",!0),!this.destroyed){for(var e=this.getChildren(),t=e.length-1;t>=0;t--)e[t].destroy();this.set("children",[]),this.onCanvasChange("clear"),this.set("clearing",!1)}},t.prototype.destroy=function(){this.get("destroyed")||(this.clear(),e.prototype.destroy.call(this))},t.prototype.getFirst=function(){return this.getChildByIndex(0)},t.prototype.getLast=function(){var e=this.getChildren();return this.getChildByIndex(e.length-1)},t.prototype.getChildByIndex=function(e){return this.getChildren()[e]},t.prototype.getCount=function(){return this.getChildren().length},t.prototype.contain=function(e){return this.getChildren().indexOf(e)>-1},t.prototype.removeChild=function(e,t){void 0===t&&(t=!0),this.contain(e)&&e.remove(t)},t.prototype.findAll=function(e){var t=[],n=this.getChildren();return(0,i.S6)(n,(function(n){e(n)&&t.push(n),n.isGroup()&&(t=t.concat(n.findAll(e)))})),t},t.prototype.find=function(e){var t=null,n=this.getChildren();return(0,i.S6)(n,(function(n){if(e(n)?t=n:n.isGroup()&&(t=n.find(e)),t)return!1})),t},t.prototype.findById=function(e){return this.find((function(t){return t.get("id")===e}))},t.prototype.findByClassName=function(e){return this.find((function(t){return t.get("className")===e}))},t.prototype.findAllByName=function(e){return this.findAll((function(t){return t.get("name")===e}))},t}(o.Z)},3985:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var r=n(2970),o=n(9537),i=n(9382),a=n(9405),l=n(5971),s=n(2824),c=i.vs,u="matrix",d=["zIndex","capture","visible","type"],f=["repeat"];function p(e,t){var n={},r=t.attrs;for(var o in e)n[o]=r[o];return n}const h=function(e){function t(t){var n=e.call(this,t)||this;n.attrs={};var r=n.getDefaultAttrs();return(0,o.CD)(r,t.attrs),n.attrs=r,n.initAttrs(r),n.initAnimate(),n}return(0,r.ZT)(t,e),t.prototype.getDefaultCfg=function(){return{visible:!0,capture:!0,zIndex:0}},t.prototype.getDefaultAttrs=function(){return{matrix:this.getDefaultMatrix(),opacity:1}},t.prototype.onCanvasChange=function(e){},t.prototype.initAttrs=function(e){},t.prototype.initAnimate=function(){this.set("animable",!0),this.set("animating",!1)},t.prototype.isGroup=function(){return!1},t.prototype.getParent=function(){return this.get("parent")},t.prototype.getCanvas=function(){return this.get("canvas")},t.prototype.attr=function(){for(var e,t=[],n=0;n0?r=function(e,t){if(t.onFrame)return e;var n=t.startTime,r=t.delay,i=t.duration,a=Object.prototype.hasOwnProperty;return(0,o.S6)(e,(function(e){n+re.delay&&(0,o.S6)(t.toAttrs,(function(t,n){a.call(e.toAttrs,n)&&(delete e.toAttrs[n],delete e.fromAttrs[n])}))})),e}(r,w):n.addAnimator(this),r.push(w),this.set("animations",r),this.set("_pause",{isPaused:!1})}},t.prototype.stopAnimate=function(e){var t=this;void 0===e&&(e=!0);var n=this.get("animations");(0,o.S6)(n,(function(n){e&&(n.onFrame?t.attr(n.onFrame(1)):t.attr(n.toAttrs)),n.callback&&n.callback()})),this.set("animating",!1),this.set("animations",[])},t.prototype.pauseAnimate=function(){var e=this.get("timeline"),t=this.get("animations"),n=e.getTime();return(0,o.S6)(t,(function(e){e._paused=!0,e._pauseTime=n,e.pauseCallback&&e.pauseCallback()})),this.set("_pause",{isPaused:!0,pauseTime:n}),this},t.prototype.resumeAnimate=function(){var e=this.get("timeline").getTime(),t=this.get("animations"),n=this.get("_pause").pauseTime;return(0,o.S6)(t,(function(t){t.startTime=t.startTime+(e-n),t._paused=!1,t._pauseTime=null,t.resumeCallback&&t.resumeCallback()})),this.set("_pause",{isPaused:!1}),this.set("animations",t),this},t.prototype.emitDelegation=function(e,t){var n,r=this,i=t.propagationPath;this.getEvents(),"mouseenter"===e?n=t.fromShape:"mouseleave"===e&&(n=t.toShape);for(var l=function(e){var l=i[e],c=l.get("name");if(c){if((l.isGroup()||l.isCanvas&&l.isCanvas())&&n&&(0,a.UY)(l,n))return"break";(0,o.kJ)(c)?(0,o.S6)(c,(function(e){r.emitDelegateEvent(l,e,t)})):s.emitDelegateEvent(l,c,t)}},s=this,c=0;c{"use strict";n.d(t,{Z:()=>o});var r=n(2970);const o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,r.ZT)(t,e),t.prototype.isGroup=function(){return!0},t.prototype.isEntityGroup=function(){return!1},t.prototype.clone=function(){for(var t=e.prototype.clone.call(this),n=this.getChildren(),r=0;r{"use strict";n.d(t,{Z:()=>a});var r=n(2970),o=n(3985),i=n(5971);const a=function(e){function t(t){return e.call(this,t)||this}return(0,r.ZT)(t,e),t.prototype._isInBBox=function(e,t){var n=this.getBBox();return n.minX<=e&&n.maxX>=e&&n.minY<=t&&n.maxY>=t},t.prototype.afterAttrsChange=function(t){e.prototype.afterAttrsChange.call(this,t),this.clearCacheBBox()},t.prototype.getBBox=function(){var e=this.cfg.bbox;return e||(e=this.calculateBBox(),this.set("bbox",e)),e},t.prototype.getCanvasBBox=function(){var e=this.cfg.canvasBBox;return e||(e=this.calculateCanvasBBox(),this.set("canvasBBox",e)),e},t.prototype.applyMatrix=function(t){e.prototype.applyMatrix.call(this,t),this.set("canvasBBox",null)},t.prototype.calculateCanvasBBox=function(){var e=this.getBBox(),t=this.getTotalMatrix(),n=e.minX,r=e.minY,o=e.maxX,a=e.maxY;if(t){var l=(0,i.rG)(t,[e.minX,e.minY]),s=(0,i.rG)(t,[e.maxX,e.minY]),c=(0,i.rG)(t,[e.minX,e.maxY]),u=(0,i.rG)(t,[e.maxX,e.maxY]);n=Math.min(l[0],s[0],c[0],u[0]),o=Math.max(l[0],s[0],c[0],u[0]),r=Math.min(l[1],s[1],c[1],u[1]),a=Math.max(l[1],s[1],c[1],u[1])}var d=this.attrs;if(d.shadowColor){var f=d.shadowBlur,p=void 0===f?0:f,h=d.shadowOffsetX,g=void 0===h?0:h,m=d.shadowOffsetY,v=void 0===m?0:m,y=n-p+g,b=o+p+g,x=r-p+v,w=a+p+v;n=Math.min(n,y),o=Math.max(o,b),r=Math.min(r,x),a=Math.max(a,w)}return{x:n,y:r,minX:n,minY:r,maxX:o,maxY:a,width:o-n,height:a-r}},t.prototype.clearCacheBBox=function(){this.set("bbox",null),this.set("canvasBBox",null)},t.prototype.isClipShape=function(){return this.get("isClipShape")},t.prototype.isInShape=function(e,t){return!1},t.prototype.isOnlyHitBox=function(){return!1},t.prototype.isHit=function(e,t){var n=this.get("startArrowShape"),r=this.get("endArrowShape"),o=[e,t,1],i=(o=this.invertFromMatrix(o))[0],a=o[1],l=this._isInBBox(i,a);if(this.isOnlyHitBox())return l;if(l&&!this.isClipped(i,a)){if(this.isInShape(i,a))return!0;if(n&&n.isHit(i,a))return!0;if(r&&r.isHit(i,a))return!0}return!1},t}(o.Z)},3909:(e,t,n)=>{"use strict";n.d(t,{C:()=>a,_:()=>i});var r=n(8522),o={};function i(e){return o[e.toLowerCase()]||r[e]}function a(e,t){o[e.toLowerCase()]=t}},6478:(e,t,n)=>{"use strict";n.d(t,{b:()=>i,W:()=>o});var r=new Map;function o(e,t){r.set(e,t)}function i(e){return r.get(e)}function a(e){var t=e.attr();return{x:t.x,y:t.y,width:t.width,height:t.height}}function l(e){var t=e.attr(),n=t.x,r=t.y,o=t.r;return{x:n-o,y:r-o,width:2*o,height:2*o}}var s=n(3267);function c(e,t){return e&&t?{minX:Math.min(e.minX,t.minX),minY:Math.min(e.minY,t.minY),maxX:Math.max(e.maxX,t.maxX),maxY:Math.max(e.maxY,t.maxY)}:e||t}function u(e,t){var n=e.get("startArrowShape"),r=e.get("endArrowShape");return n&&(t=c(t,n.getCanvasBBox())),r&&(t=c(t,r.getCanvasBBox())),t}var d=n(1893),f=n(1975),p=n(9537);function h(e,t){var n=e.prePoint,r=e.currentPoint,o=e.nextPoint,i=Math.pow(r[0]-n[0],2)+Math.pow(r[1]-n[1],2),a=Math.pow(r[0]-o[0],2)+Math.pow(r[1]-o[1],2),l=Math.pow(n[0]-o[0],2)+Math.pow(n[1]-o[1],2),s=Math.acos((i+a-l)/(2*Math.sqrt(i)*Math.sqrt(a)));if(!s||0===Math.sin(s)||(0,p.vQ)(s,0))return{xExtra:0,yExtra:0};var c=Math.abs(Math.atan2(o[1]-r[1],o[0]-r[0])),u=Math.abs(Math.atan2(o[0]-r[0],o[1]-r[1]));return c=c>Math.PI/2?Math.PI-c:c,u=u>Math.PI/2?Math.PI-u:u,{xExtra:Math.cos(s/2-c)*(t/2*(1/Math.sin(s/2)))-t/2||0,yExtra:Math.cos(u-s/2)*(t/2*(1/Math.sin(s/2)))-t/2||0}}o("rect",a),o("image",a),o("circle",l),o("marker",l),o("polyline",(function(e){for(var t=e.attr().points,n=[],r=[],o=0;o{"use strict";n.d(t,{Z:()=>r});const r=function(){function e(e,t){this.bubbles=!0,this.target=null,this.currentTarget=null,this.delegateTarget=null,this.delegateObject=null,this.defaultPrevented=!1,this.propagationStopped=!1,this.shape=null,this.fromShape=null,this.toShape=null,this.propagationPath=[],this.type=e,this.name=e,this.originalEvent=t,this.timeStamp=t.timeStamp}return e.prototype.preventDefault=function(){this.defaultPrevented=!0,this.originalEvent.preventDefault&&this.originalEvent.preventDefault()},e.prototype.stopPropagation=function(){this.propagationStopped=!0},e.prototype.toString=function(){return"[Event (type="+this.type+")]"},e.prototype.save=function(){},e.prototype.restore=function(){},e}()},7166:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AbstractCanvas:()=>c.Z,AbstractGroup:()=>u.Z,AbstractShape:()=>d.Z,Base:()=>s.Z,Event:()=>l.Z,PathUtil:()=>r,assembleFont:()=>p.$O,getBBoxMethod:()=>f.b,getOffScreenContext:()=>m.L,getTextHeight:()=>p.FE,invert:()=>g.U_,isAllowCapture:()=>h.pP,multiplyVec2:()=>g.rG,registerBBox:()=>f.W,registerEasing:()=>v.C,version:()=>y});var r=n(2313),o=n(946),i={};for(const e in o)["default","Event","Base","AbstractCanvas","AbstractGroup","AbstractShape","PathUtil","getBBoxMethod","registerBBox","getTextHeight","assembleFont","isAllowCapture","multiplyVec2","invert","getOffScreenContext","registerEasing","version"].indexOf(e)<0&&(i[e]=()=>o[e]);n.d(t,i);var a=n(1603);i={};for(const e in a)["default","Event","Base","AbstractCanvas","AbstractGroup","AbstractShape","PathUtil","getBBoxMethod","registerBBox","getTextHeight","assembleFont","isAllowCapture","multiplyVec2","invert","getOffScreenContext","registerEasing","version"].indexOf(e)<0&&(i[e]=()=>a[e]);n.d(t,i);var l=n(4378),s=n(2824),c=n(7085),u=n(4813),d=n(6267),f=n(6478),p=n(1893),h=n(9405),g=n(5971),m=n(3417),v=n(3909),y="0.5.11"},1603:()=>{},946:()=>{},5971:(e,t,n)=>{"use strict";function r(e,t){var n=[],r=e[0],o=e[1],i=e[2],a=e[3],l=e[4],s=e[5],c=e[6],u=e[7],d=e[8],f=t[0],p=t[1],h=t[2],g=t[3],m=t[4],v=t[5],y=t[6],b=t[7],x=t[8];return n[0]=f*r+p*a+h*c,n[1]=f*o+p*l+h*u,n[2]=f*i+p*s+h*d,n[3]=g*r+m*a+v*c,n[4]=g*o+m*l+v*u,n[5]=g*i+m*s+v*d,n[6]=y*r+b*a+x*c,n[7]=y*o+b*l+x*u,n[8]=y*i+b*s+x*d,n}function o(e,t){var n=[],r=t[0],o=t[1];return n[0]=e[0]*r+e[3]*o+e[6],n[1]=e[1]*r+e[4]*o+e[7],n}function i(e){var t=[],n=e[0],r=e[1],o=e[2],i=e[3],a=e[4],l=e[5],s=e[6],c=e[7],u=e[8],d=u*a-l*c,f=-u*i+l*s,p=c*i-a*s,h=n*d+r*f+o*p;return h?(h=1/h,t[0]=d*h,t[1]=(-u*r+o*c)*h,t[2]=(l*r-o*a)*h,t[3]=f*h,t[4]=(u*n-o*s)*h,t[5]=(-l*n+o*i)*h,t[6]=p*h,t[7]=(-c*n+r*s)*h,t[8]=(a*n-r*i)*h,t):null}n.d(t,{U_:()=>i,rG:()=>o,xq:()=>r})},3417:(e,t,n)=>{"use strict";n.d(t,{L:()=>o});var r=null;function o(){if(!r){var e=document.createElement("canvas");e.width=1,e.height=1,r=e.getContext("2d")}return r}},2313:(e,t,n)=>{"use strict";n.r(t),n.d(t,{catmullRomToBezier:()=>s,fillPath:()=>$,fillPathByDiff:()=>A,formatPath:()=>R,intersection:()=>M,parsePathArray:()=>m,parsePathString:()=>l,pathToAbsolute:()=>u,pathToCurve:()=>h,rectPath:()=>S});var r=n(9537),o="\t\n\v\f\r \u2028\u2029",i=new RegExp("([a-z])["+o+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+o+"]*,?["+o+"]*)+)","ig"),a=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+o+"]*,?["+o+"]*","ig"),l=function(e){if(!e)return null;if((0,r.kJ)(e))return e;var t={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},n=[];return String(e).replace(i,(function(r,o,i){var l=[],s=o.toLowerCase();if(i.replace(a,(function(e,t){t&&l.push(+t)})),"m"===s&&l.length>2&&(n.push([o].concat(l.splice(0,2))),s="l",o="m"===o?"l":"L"),"o"===s&&1===l.length&&n.push([o,l[0]]),"r"===s)n.push([o].concat(l));else for(;l.length>=t[s]&&(n.push([o].concat(l.splice(0,t[s]))),t[s]););return e})),n},s=function(e,t){for(var n=[],r=0,o=e.length;o-2*!t>r;r+=2){var i=[{x:+e[r-2],y:+e[r-1]},{x:+e[r],y:+e[r+1]},{x:+e[r+2],y:+e[r+3]},{x:+e[r+4],y:+e[r+5]}];t?r?o-4===r?i[3]={x:+e[0],y:+e[1]}:o-2===r&&(i[2]={x:+e[0],y:+e[1]},i[3]={x:+e[2],y:+e[3]}):i[0]={x:+e[o-2],y:+e[o-1]}:o-4===r?i[3]=i[2]:r||(i[0]={x:+e[r],y:+e[r+1]}),n.push(["C",(-i[0].x+6*i[1].x+i[2].x)/6,(-i[0].y+6*i[1].y+i[2].y)/6,(i[1].x+6*i[2].x-i[3].x)/6,(i[1].y+6*i[2].y-i[3].y)/6,i[2].x,i[2].y])}return n},c=function(e,t,n,r,o){var i=[];if(null===o&&null===r&&(r=n),e=+e,t=+t,n=+n,r=+r,null!==o){var a=Math.PI/180,l=e+n*Math.cos(-r*a),s=e+n*Math.cos(-o*a);i=[["M",l,t+n*Math.sin(-r*a)],["A",n,n,0,+(o-r>180),0,s,t+n*Math.sin(-o*a)]]}else i=[["M",e,t],["m",0,-r],["a",n,r,0,1,1,0,2*r],["a",n,r,0,1,1,0,-2*r],["z"]];return i},u=function(e){if(!(e=l(e))||!e.length)return[["M",0,0]];var t,n,r=[],o=0,i=0,a=0,u=0,d=0;"M"===e[0][0]&&(a=o=+e[0][1],u=i=+e[0][2],d++,r[0]=["M",o,i]);for(var f=3===e.length&&"M"===e[0][0]&&"R"===e[1][0].toUpperCase()&&"Z"===e[2][0].toUpperCase(),p=void 0,h=void 0,g=d,m=e.length;g1&&(n*=S=Math.sqrt(S),r*=S);var E=n*n,C=r*r,k=(i===a?-1:1)*Math.sqrt(Math.abs((E*C-E*w*w-C*x*x)/(E*w*w+C*x*x)));h=k*n*w/r+(e+l)/2,g=k*-r*x/n+(t+s)/2,d=Math.asin(((t-g)/r).toFixed(9)),f=Math.asin(((s-g)/r).toFixed(9)),d=ef&&(d-=2*Math.PI),!a&&f>d&&(f-=2*Math.PI)}var O=f-d;if(Math.abs(O)>m){var M=f,I=l,$=s;f=d+m*(a&&f>d?1:-1),l=h+n*Math.cos(f),s=g+r*Math.sin(f),y=p(l,s,n,r,o,0,a,I,$,[f,M,h,g])}O=f-d;var _=Math.cos(d),P=Math.sin(d),A=Math.cos(f),N=Math.sin(f),T=Math.tan(O/4),R=4/3*n*T,L=4/3*r*T,D=[e,t],j=[e+R*P,t-L*_],F=[l+R*N,s-L*A],B=[l,s];if(j[0]=2*D[0]-j[0],j[1]=2*D[1]-j[1],c)return[j,F,B].concat(y);for(var z=[],H=0,U=(y=[j,F,B].concat(y).join().split(",")).length;H7){e[t].shift();for(var i=e[t];i.length;)l[t]="A",o&&(s[t]="A"),e.splice(t++,0,["C"].concat(i.splice(0,6)));e.splice(t,1),n=Math.max(r.length,o&&o.length||0)}},v=function(e,t,i,a,l){e&&t&&"M"===e[l][0]&&"M"!==t[l][0]&&(t.splice(l,0,["M",a.x,a.y]),i.bx=0,i.by=0,i.x=e[l][1],i.y=e[l][2],n=Math.max(r.length,o&&o.length||0))};n=Math.max(r.length,o&&o.length||0);for(var y=0;y1?1:s<0?0:s)/2,u=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],d=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],f=0,p=0;p<12;p++){var h=c*u[p]+c,g=v(h,e,n,o,a),m=v(h,t,r,i,l),y=g*g+m*m;f+=d[p]*Math.sqrt(y)}return c*f},b=function(e,t,n,r,o,i,a,l){for(var s,c,u,d,f=[],p=[[],[]],h=0;h<2;++h)if(0===h?(c=6*e-12*n+6*o,s=-3*e+9*n-9*o+3*a,u=3*n-3*e):(c=6*t-12*r+6*i,s=-3*t+9*r-9*i+3*l,u=3*r-3*t),Math.abs(s)<1e-12){if(Math.abs(c)<1e-12)continue;(d=-u/c)>0&&d<1&&f.push(d)}else{var g=c*c-4*u*s,m=Math.sqrt(g);if(!(g<0)){var v=(-c+m)/(2*s);v>0&&v<1&&f.push(v);var y=(-c-m)/(2*s);y>0&&y<1&&f.push(y)}}for(var b,x=f.length,w=x;x--;)b=1-(d=f[x]),p[0][x]=b*b*b*e+3*b*b*d*n+3*b*d*d*o+d*d*d*a,p[1][x]=b*b*b*t+3*b*b*d*r+3*b*d*d*i+d*d*d*l;return p[0][w]=e,p[1][w]=t,p[0][w+1]=a,p[1][w+1]=l,p[0].length=p[1].length=w+2,{min:{x:Math.min.apply(0,p[0]),y:Math.min.apply(0,p[1])},max:{x:Math.max.apply(0,p[0]),y:Math.max.apply(0,p[1])}}},x=function(e,t,n,r,o,i,a,l){if(!(Math.max(e,n)Math.max(o,a)||Math.max(t,r)Math.max(i,l))){var s=(e-n)*(i-l)-(t-r)*(o-a);if(s){var c=((e*r-t*n)*(o-a)-(e-n)*(o*l-i*a))/s,u=((e*r-t*n)*(i-l)-(t-r)*(o*l-i*a))/s,d=+c.toFixed(2),f=+u.toFixed(2);if(!(d<+Math.min(e,n).toFixed(2)||d>+Math.max(e,n).toFixed(2)||d<+Math.min(o,a).toFixed(2)||d>+Math.max(o,a).toFixed(2)||f<+Math.min(t,r).toFixed(2)||f>+Math.max(t,r).toFixed(2)||f<+Math.min(i,l).toFixed(2)||f>+Math.max(i,l).toFixed(2)))return{x:c,y:u}}}},w=function(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height},S=function(e,t,n,r,o){if(o)return[["M",+e+ +o,t],["l",n-2*o,0],["a",o,o,0,0,1,o,o],["l",0,r-2*o],["a",o,o,0,0,1,-o,o],["l",2*o-n,0],["a",o,o,0,0,1,-o,-o],["l",0,2*o-r],["a",o,o,0,0,1,o,-o],["z"]];var i=[["M",e,t],["l",n,0],["l",0,r],["l",-n,0],["z"]];return i.parsePathArray=m,i},E=function(e,t,n,r){return null===e&&(e=t=n=r=0),null===t&&(t=e.y,n=e.width,r=e.height,e=e.x),{x:e,y:t,width:n,w:n,height:r,h:r,x2:e+n,y2:t+r,cx:e+n/2,cy:t+r/2,r1:Math.min(n,r)/2,r2:Math.max(n,r)/2,r0:Math.sqrt(n*n+r*r)/2,path:S(e,t,n,r),vb:[e,t,n,r].join(" ")}},C=function(e,t,n,o,i,a,l,s){(0,r.kJ)(e)||(e=[e,t,n,o,i,a,l,s]);var c=b.apply(null,e);return E(c.min.x,c.min.y,c.max.x-c.min.x,c.max.y-c.min.y)},k=function(e,t,n,r,o,i,a,l,s){var c=1-s,u=Math.pow(c,3),d=Math.pow(c,2),f=s*s,p=f*s,h=e+2*s*(n-e)+f*(o-2*n+e),g=t+2*s*(r-t)+f*(i-2*r+t),m=n+2*s*(o-n)+f*(a-2*o+n),v=r+2*s*(i-r)+f*(l-2*i+r);return{x:u*e+3*d*s*n+3*c*s*s*o+p*a,y:u*t+3*d*s*r+3*c*s*s*i+p*l,m:{x:h,y:g},n:{x:m,y:v},start:{x:c*e+s*n,y:c*t+s*r},end:{x:c*o+s*a,y:c*i+s*l},alpha:90-180*Math.atan2(h-m,g-v)/Math.PI}},O=function(e,t,n){if(r=C(e),o=C(t),r=E(r),o=E(o),!(w(o,r.x,r.y)||w(o,r.x2,r.y)||w(o,r.x,r.y2)||w(o,r.x2,r.y2)||w(r,o.x,o.y)||w(r,o.x2,o.y)||w(r,o.x,o.y2)||w(r,o.x2,o.y2)||(r.xo.x||o.xr.x)&&(r.yo.y||o.yr.y)))return n?0:[];for(var r,o,i=~~(y.apply(0,e)/8),a=~~(y.apply(0,t)/8),l=[],s=[],c={},u=n?0:[],d=0;d=0&&M<=1&&I>=0&&I<=1&&(n?u+=1:u.push({x:O.x,y:O.y,t1:M,t2:I}))}}return u},M=function(e,t){return function(e,t,n){var r,o,i,a,l,s,c,u,d,f;e=h(e),t=h(t);for(var p=[],g=0,m=e.length;g=3&&(3===e.length&&t.push("Q"),t=t.concat(e[1])),2===e.length&&t.push("L"),t.concat(e[e.length-1])}))}(e,t,n));else{var o=[].concat(e);"M"===o[0]&&(o[0]="L");for(var i=0;i<=n-1;i++)r.push(o)}return r}(e[o],e[o+1],r))}),[]);return s.unshift(e[0]),"Z"!==t[r]&&"z"!==t[r]||s.push("Z"),s},_=function(e,t){if(e.length!==t.length)return!1;var n=!0;return(0,r.S6)(e,(function(e,r){if(e!==t[r])return n=!1,!1})),n};function P(e,t,n){var r=null,o=n;return t=0;s--)a=i[s].index,"add"===i[s].type?e.splice(a,0,[].concat(e[a])):e.splice(a,1)}var d=o-(r=e.length);if(r0)){e[r]=t[r];break}n=N(n,e[r-1],1)}e[r]=["Q"].concat(n.reduce((function(e,t){return e.concat(t)}),[]));break;case"T":e[r]=["T"].concat(n[0]);break;case"C":if(n.length<3){if(!(r>0)){e[r]=t[r];break}n=N(n,e[r-1],2)}e[r]=["C"].concat(n.reduce((function(e,t){return e.concat(t)}),[]));break;case"S":if(n.length<2){if(!(r>0)){e[r]=t[r];break}n=N(n,e[r-1],1)}e[r]=["S"].concat(n.reduce((function(e,t){return e.concat(t)}),[]));break;default:e[r]=t[r]}return e}},1893:(e,t,n)=>{"use strict";n.d(t,{$O:()=>l,FE:()=>i,mY:()=>a});var r=n(9405),o=n(3417);function i(e,t,n){var o=1;if((0,r.HD)(e)&&(o=e.split("\n").length),o>1){var i=function(e,t){return t?t-e:.14*e}(t,n);return t*o+i*(o-1)}return t}function a(e,t){var n=(0,o.L)(),i=0;if((0,r.kK)(e)||""===e)return i;if(n.save(),n.font=t,(0,r.HD)(e)&&e.includes("\n")){var a=e.split("\n");(0,r.S6)(a,(function(e){var t=n.measureText(e).width;i{"use strict";n.d(t,{As:()=>o,CD:()=>r.CD,HD:()=>r.HD,Kn:()=>r.Kn,S6:()=>r.S6,UY:()=>a,jC:()=>r.jC,jU:()=>i,kK:()=>r.UM,mf:()=>r.mf,pP:()=>l});var r=n(9537);function o(e,t){var n=e.indexOf(t);-1!==n&&e.splice(n,1)}var i="undefined"!=typeof window&&void 0!==window.document;function a(e,t){if(e.isCanvas())return!0;for(var n=t.getParent(),r=!1;n;){if(n===e){r=!0;break}n=n.getParent()}return r}function l(e){return e.cfg.visible&&e.cfg.capture}},3267:(e,t,n)=>{"use strict";n.d(t,{wN:()=>_,Ll:()=>C,x1:()=>d,aH:()=>A,lD:()=>y,Zr:()=>r});var r={};n.r(r),n.d(r,{distance:()=>i,getBBoxByArray:()=>l,getBBoxRange:()=>s,isNumberEqual:()=>a,piMod:()=>c});var o=n(9537);function i(e,t,n,r){var o=e-n,i=t-r;return Math.sqrt(o*o+i*i)}function a(e,t){return Math.abs(e-t)<.001}function l(e,t){var n=(0,o.VV)(e),r=(0,o.VV)(t);return{x:n,y:r,width:(0,o.Fp)(e)-n,height:(0,o.Fp)(t)-r}}function s(e,t,n,r){return{minX:(0,o.VV)([e,n]),maxX:(0,o.Fp)([e,n]),minY:(0,o.VV)([t,r]),maxY:(0,o.Fp)([t,r])}}function c(e){return(e+2*Math.PI)%(2*Math.PI)}var u=n(4668);const d={box:function(e,t,n,r){return l([e,n],[t,r])},length:function(e,t,n,r){return i(e,t,n,r)},pointAt:function(e,t,n,r,o){return{x:(1-o)*e+o*n,y:(1-o)*t+o*r}},pointDistance:function(e,t,n,r,o,a){var l=(n-e)*(o-e)+(r-t)*(a-t);return l<0?i(e,t,o,a):l>(n-e)*(n-e)+(r-t)*(r-t)?i(n,r,o,a):this.pointToLine(e,t,n,r,o,a)},pointToLine:function(e,t,n,r,o,i){var a=[n-e,r-t];if(u.I6(a,[0,0]))return Math.sqrt((o-e)*(o-e)+(i-t)*(i-t));var l=[-a[1],a[0]];u.Fv(l,l);var s=[o-e,i-t];return Math.abs(u.AK(s,l))},tangentAngle:function(e,t,n,r){return Math.atan2(r-t,n-e)}};function f(e,t,n,r,o,a){var l,s=1/0,c=[n,r],u=20;a&&a>200&&(u=a/10);for(var d=1/u,f=d/10,p=0;p<=u;p++){var h=p*d,g=[o.apply(null,e.concat([h])),o.apply(null,t.concat([h]))];(b=i(c[0],c[1],g[0],g[1]))=0&&b=0?[o]:[]}function g(e,t,n,r){return 2*(1-r)*(t-e)+2*r*(n-t)}function m(e,t,n,r,o,i,a){var l=p(e,n,o,a),s=p(t,r,i,a),c=d.pointAt(e,t,n,r,a),u=d.pointAt(n,r,o,i,a);return[[e,t,c.x,c.y,l,s],[l,s,u.x,u.y,o,i]]}function v(e,t,n,r,o,a,l){if(0===l)return(i(e,t,n,r)+i(n,r,o,a)+i(e,t,o,a))/2;var s=m(e,t,n,r,o,a,.5),c=s[0],u=s[1];return c.push(l-1),u.push(l-1),v.apply(null,c)+v.apply(null,u)}const y={box:function(e,t,n,r,o,i){var a=h(e,n,o)[0],s=h(t,r,i)[0],c=[e,o],u=[t,i];return void 0!==a&&c.push(p(e,n,o,a)),void 0!==s&&u.push(p(t,r,i,s)),l(c,u)},length:function(e,t,n,r,o,i){return v(e,t,n,r,o,i,3)},nearestPoint:function(e,t,n,r,o,i,a,l){return f([e,n,o],[t,r,i],a,l,p)},pointDistance:function(e,t,n,r,o,a,l,s){var c=this.nearestPoint(e,t,n,r,o,a,l,s);return i(c.x,c.y,l,s)},interpolationAt:p,pointAt:function(e,t,n,r,o,i,a){return{x:p(e,n,o,a),y:p(t,r,i,a)}},divide:function(e,t,n,r,o,i,a){return m(e,t,n,r,o,i,a)},tangentAngle:function(e,t,n,r,o,i,a){var l=g(e,n,o,a),s=g(t,r,i,a);return c(Math.atan2(s,l))}};function b(e,t,n,r,o){var i=1-o;return i*i*i*e+3*t*o*i*i+3*n*o*o*i+r*o*o*o}function x(e,t,n,r,o){var i=1-o;return 3*(i*i*(t-e)+2*i*o*(n-t)+o*o*(r-n))}function w(e,t,n,r){var o,i,l,s=-3*e+9*t-9*n+3*r,c=6*e-12*t+6*n,u=3*t-3*e,d=[];if(a(s,0))a(c,0)||(o=-u/c)>=0&&o<=1&&d.push(o);else{var f=c*c-4*s*u;a(f,0)?d.push(-c/(2*s)):f>0&&(i=(-c-(l=Math.sqrt(f)))/(2*s),(o=(-c+l)/(2*s))>=0&&o<=1&&d.push(o),i>=0&&i<=1&&d.push(i))}return d}function S(e,t,n,r,o,i,a,l,s){var c=b(e,n,o,a,s),u=b(t,r,i,l,s),f=d.pointAt(e,t,n,r,s),p=d.pointAt(n,r,o,i,s),h=d.pointAt(o,i,a,l,s),g=d.pointAt(f.x,f.y,p.x,p.y,s),m=d.pointAt(p.x,p.y,h.x,h.y,s);return[[e,t,f.x,f.y,g.x,g.y,c,u],[c,u,m.x,m.y,h.x,h.y,a,l]]}function E(e,t,n,r,o,a,l,s,c){if(0===c)return function(e,t){for(var n=0,r=e.length,o=0;o0?n:-1*n}function O(e,t,n,r,o,i){return n*Math.cos(o)*Math.cos(i)-r*Math.sin(o)*Math.sin(i)+e}function M(e,t,n,r,o,i){return n*Math.sin(o)*Math.cos(i)+r*Math.cos(o)*Math.sin(i)+t}function I(e,t,n){return{x:e*Math.cos(n),y:t*Math.sin(n)}}function $(e,t,n){var r=Math.cos(n),o=Math.sin(n);return[e*r-t*o,e*o+t*r]}const _={box:function(e,t,n,r,o,i,a){for(var l=function(e,t,n){return Math.atan(-t/e*Math.tan(n))}(n,r,o),s=1/0,c=-1/0,u=[i,a],d=2*-Math.PI;d<=2*Math.PI;d+=Math.PI){var f=l+d;ic&&(c=p)}var h=function(e,t,n){return Math.atan(t/(e*Math.tan(n)))}(n,r,o),g=1/0,m=-1/0,v=[i,a];for(d=2*-Math.PI;d<=2*Math.PI;d+=Math.PI){var y=h+d;im&&(m=b)}return{x:s,y:g,width:c-s,height:m-g}},length:function(e,t,n,r,o,i,a){},nearestPoint:function(e,t,n,r,o,i,a,l,s){var c=$(l-e,s-t,-o),u=function(e,t,n,r,o,i){var a=n,l=r;if(0===a||0===l)return{x:e,y:t};for(var s,c,u=o-e,d=i-t,f=Math.abs(u),p=Math.abs(d),h=a*a,g=l*l,m=Math.PI/4,v=0;v<4;v++){s=a*Math.cos(m),c=l*Math.sin(m);var y=(h-g)*Math.pow(Math.cos(m),3)/a,b=(g-h)*Math.pow(Math.sin(m),3)/l,x=s-y,w=c-b,S=f-y,E=p-b,C=Math.hypot(w,x),O=Math.hypot(E,S);m+=C*Math.asin((x*E-w*S)/(C*O))/Math.sqrt(h+g-s*s-c*c),m=Math.min(Math.PI/2,Math.max(0,m))}return{x:e+k(s,u),y:t+k(c,d)}}(0,0,n,r,c[0],c[1]),d=function(e,t,n,r){return(Math.atan2(r*e,n*t)+2*Math.PI)%(2*Math.PI)}(n,r,u.x,u.y);da&&(u=I(n,r,a));var f=$(u.x,u.y,o);return{x:f[0]+e,y:f[1]+t}},pointDistance:function(e,t,n,r,o,a,l,s,c){var u=this.nearestPoint(e,t,n,r,s,c);return i(u.x,u.y,s,c)},pointAt:function(e,t,n,r,o,i,a,l){var s=(a-i)*l+i;return{x:O(e,0,n,r,o,s),y:M(0,t,n,r,o,s)}},tangentAngle:function(e,t,n,r,o,i,a,l){var s=(a-i)*l+i,u=function(e,t,n,r,o,i,a,l){return-1*n*Math.cos(o)*Math.sin(l)-r*Math.sin(o)*Math.cos(l)}(0,0,n,r,o,0,0,s),d=function(e,t,n,r,o,i,a,l){return-1*n*Math.sin(o)*Math.sin(l)+r*Math.cos(o)*Math.cos(l)}(0,0,n,r,o,0,0,s);return c(Math.atan2(d,u))}};function P(e){for(var t=0,n=[],r=0;r1||t<0||e.length<2)return null;var n=P(e),r=n.segments,o=n.totalLength;if(0===o)return{x:e[0][0],y:e[0][1]};for(var i=0,a=null,l=0;l=i&&t<=i+f){var p=(t-i)/f;a=d.pointAt(c[0],c[1],u[0],u[1],p);break}i+=f}return a}(e,t)},pointDistance:function(e,t,n){return function(e,t,n){for(var r=1/0,o=0;o1||t<0||e.length<2)return 0;for(var n=P(e),r=n.segments,o=n.totalLength,i=0,a=0,l=0;l=i&&t<=i+d){a=Math.atan2(u[1]-c[1],u[0]-c[0]);break}i+=d}return a}(e,t)}}},6563:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(2970),o=n(9210),i=n(1933);const a=function(e){function t(t){var n=e.call(this)||this;n.destroyed=!1;var r=n.getDefaultCfg();return n.cfg=(0,i.CD)(r,t),n}return(0,r.ZT)(t,e),t.prototype.getDefaultCfg=function(){return{}},t.prototype.get=function(e){return this.cfg[e]},t.prototype.set=function(e,t){this.cfg[e]=t},t.prototype.destroy=function(){this.cfg={destroyed:!0},this.off(),this.destroyed=!0},t}(o.Z)},1841:(e,t,n)=>{"use strict";n.d(t,{Z:()=>O});var r=n(2970),o=n(8359),i=n(3286),a=n(1933),l=n(9537),s=n(2009),c=n(3715),u=n(3603),d=n(6617),f=n(1861),p=[1,0,0,0,1,0,0,0,1];function h(e,t,n){var r,o=t.startTime;if(ng.length?(h=f.parsePathString(a[d]),g=f.parsePathString(i[d]),g=f.fillPathByDiff(g,h),g=f.formatPath(g,h),t.fromAttrs.path=g,t.toAttrs.path=h):t.pathFormatted||(h=f.parsePathString(a[d]),g=f.parsePathString(i[d]),g=f.formatPath(g,h),t.fromAttrs.path=g,t.toAttrs.path=h,t.pathFormatted=!0),o[d]=[];for(var m=0;m0){for(var i=r.animators.length-1;i>=0;i--)if((e=r.animators[i]).destroyed)r.removeAnimator(i);else{if(!e.isAnimatePaused())for(var a=(t=e.get("animations")).length-1;a>=0;a--)n=t[a],h(e,n,o)&&(t.splice(a,1),n.callback&&n.callback());0===t.length&&r.removeAnimator(i)}r.canvas.get("autoDraw")||r.canvas.draw()}}))},e.prototype.addAnimator=function(e){this.animators.push(e)},e.prototype.removeAnimator=function(e){this.animators.splice(e,1)},e.prototype.isAnimating=function(){return!!this.animators.length},e.prototype.stop=function(){this.timer&&this.timer.stop()},e.prototype.stopAllAnimations=function(e){void 0===e&&(e=!0),this.animators.forEach((function(t){t.stopAnimate(e)})),this.animators=[],this.canvas.draw()},e.prototype.getTime=function(){return this.current},e}();const m=g;var v=n(3627),y=["mousedown","mouseup","dblclick","mouseout","mouseover","mousemove","mouseleave","mouseenter","touchstart","touchmove","touchend","dragenter","dragover","dragleave","drop","contextmenu","mousewheel"];function b(e,t,n){n.name=t,n.target=e,n.currentTarget=e,n.delegateTarget=e,e.emit(t,n)}function x(e,t,n){if(n.bubbles){var r=void 0,o=!1;if("mouseenter"===t?(r=n.fromShape,o=!0):"mouseleave"===t&&(o=!0,r=n.toShape),e.isCanvas()&&o)return;if(r&&(0,a.UY)(e,r))return void(n.bubbles=!1);n.name=t,n.currentTarget=e,n.delegateTarget=e,e.emit(t,n)}}var w=function(){function e(e){var t=this;this.draggingShape=null,this.dragging=!1,this.currentShape=null,this.mousedownShape=null,this.mousedownPoint=null,this._eventCallback=function(e){var n=e.type;t._triggerEvent(n,e)},this._onDocumentMove=function(e){if(t.canvas.get("el")!==e.target&&(t.dragging||t.currentShape)){var n=t._getPointInfo(e);t.dragging&&t._emitEvent("drag",e,n,t.draggingShape)}},this._onDocumentMouseUp=function(e){if(t.canvas.get("el")!==e.target&&t.dragging){var n=t._getPointInfo(e);t.draggingShape&&t._emitEvent("drop",e,n,null),t._emitEvent("dragend",e,n,t.draggingShape),t._afterDrag(t.draggingShape,n,e)}},this.canvas=e.canvas}return e.prototype.init=function(){this._bindEvents()},e.prototype._bindEvents=function(){var e=this,t=this.canvas.get("el");(0,a.S6)(y,(function(n){t.addEventListener(n,e._eventCallback)})),document&&(document.addEventListener("mousemove",this._onDocumentMove),document.addEventListener("mouseup",this._onDocumentMouseUp))},e.prototype._clearEvents=function(){var e=this,t=this.canvas.get("el");(0,a.S6)(y,(function(n){t.removeEventListener(n,e._eventCallback)})),document&&(document.removeEventListener("mousemove",this._onDocumentMove),document.removeEventListener("mouseup",this._onDocumentMouseUp))},e.prototype._getEventObj=function(e,t,n,r,o,i){var a=new v.Z(e,t);return a.fromShape=o,a.toShape=i,a.x=n.x,a.y=n.y,a.clientX=n.clientX,a.clientY=n.clientY,a.propagationPath.push(r),a},e.prototype._getShape=function(e,t){return this.canvas.getShape(e.x,e.y,t)},e.prototype._getPointInfo=function(e){var t=this.canvas,n=t.getClientByEvent(e),r=t.getPointByEvent(e);return{x:r.x,y:r.y,clientX:n.x,clientY:n.y}},e.prototype._triggerEvent=function(e,t){var n=this._getPointInfo(t),r=this._getShape(n,t),o=this["_on"+e],i=!1;if(o)o.call(this,n,r,t);else{var a=this.currentShape;"mouseenter"===e||"dragenter"===e||"mouseover"===e?(this._emitEvent(e,t,n,null,null,r),r&&this._emitEvent(e,t,n,r,null,r),"mouseenter"===e&&this.draggingShape&&this._emitEvent("dragenter",t,n,null)):"mouseleave"===e||"dragleave"===e||"mouseout"===e?(i=!0,a&&this._emitEvent(e,t,n,a,a,null),this._emitEvent(e,t,n,null,a,null),"mouseleave"===e&&this.draggingShape&&this._emitEvent("dragleave",t,n,null)):this._emitEvent(e,t,n,r,null,null)}if(i||(this.currentShape=r),r&&!r.get("destroyed")){var l=this.canvas;l.get("el").style.cursor=r.attr("cursor")||l.get("cursor")}},e.prototype._onmousedown=function(e,t,n){0===n.button&&(this.mousedownShape=t,this.mousedownPoint=e,this.mousedownTimeStamp=n.timeStamp),this._emitEvent("mousedown",n,e,t,null,null)},e.prototype._emitMouseoverEvents=function(e,t,n,r){var o=this.canvas.get("el");n!==r&&(n&&(this._emitEvent("mouseout",e,t,n,n,r),this._emitEvent("mouseleave",e,t,n,n,r),r&&!r.get("destroyed")||(o.style.cursor=this.canvas.get("cursor"))),r&&(this._emitEvent("mouseover",e,t,r,n,r),this._emitEvent("mouseenter",e,t,r,n,r)))},e.prototype._emitDragoverEvents=function(e,t,n,r,o){r?(r!==n&&(n&&this._emitEvent("dragleave",e,t,n,n,r),this._emitEvent("dragenter",e,t,r,n,r)),o||this._emitEvent("dragover",e,t,r)):n&&this._emitEvent("dragleave",e,t,n,n,r),o&&this._emitEvent("dragover",e,t,r)},e.prototype._afterDrag=function(e,t,n){e&&(e.set("capture",!0),this.draggingShape=null),this.dragging=!1;var r=this._getShape(t,n);r!==e&&this._emitMouseoverEvents(n,t,e,r),this.currentShape=r},e.prototype._onmouseup=function(e,t,n){if(0===n.button){var r=this.draggingShape;this.dragging?(r&&this._emitEvent("drop",n,e,t),this._emitEvent("dragend",n,e,r),this._afterDrag(r,e,n)):(this._emitEvent("mouseup",n,e,t),t===this.mousedownShape&&this._emitEvent("click",n,e,t),this.mousedownShape=null,this.mousedownPoint=null)}},e.prototype._ondragover=function(e,t,n){n.preventDefault();var r=this.currentShape;this._emitDragoverEvents(n,e,r,t,!0)},e.prototype._onmousemove=function(e,t,n){var r=this.canvas,o=this.currentShape,i=this.draggingShape;if(this.dragging)i&&this._emitDragoverEvents(n,e,o,t,!1),this._emitEvent("drag",n,e,i);else{var a=this.mousedownPoint;if(a){var l=this.mousedownShape,s=n.timeStamp-this.mousedownTimeStamp,c=a.clientX-e.clientX,u=a.clientY-e.clientY;s>120||c*c+u*u>40?l&&l.get("draggable")?((i=this.mousedownShape).set("capture",!1),this.draggingShape=i,this.dragging=!0,this._emitEvent("dragstart",n,e,i),this.mousedownShape=null,this.mousedownPoint=null):!l&&r.get("draggable")?(this.dragging=!0,this._emitEvent("dragstart",n,e,null),this.mousedownShape=null,this.mousedownPoint=null):(this._emitMouseoverEvents(n,e,o,t),this._emitEvent("mousemove",n,e,t)):(this._emitMouseoverEvents(n,e,o,t),this._emitEvent("mousemove",n,e,t))}else this._emitMouseoverEvents(n,e,o,t),this._emitEvent("mousemove",n,e,t)}},e.prototype._emitEvent=function(e,t,n,r,o,i){var a=this._getEventObj(e,t,n,r,o,i);if(r){a.shape=r,b(r,e,a);for(var l=r.getParent();l;)l.emitDelegation(e,a),a.propagationStopped||x(l,e,a),a.propagationPath.push(l),l=l.getParent()}else b(this.canvas,e,a)},e.prototype.destroy=function(){this._clearEvents(),this.canvas=null,this.currentShape=null,this.draggingShape=null,this.mousedownPoint=null,this.mousedownShape=null,this.mousedownTimeStamp=null},e}();const S=w;var E=(0,o.qY)(),C=E&&"firefox"===E.name,k=function(e){function t(t){var n=e.call(this,t)||this;return n.initContainer(),n.initDom(),n.initEvents(),n.initTimeline(),n}return(0,r.ZT)(t,e),t.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return t.cursor="default",t.supportCSSTransform=!1,t},t.prototype.initContainer=function(){var e=this.get("container");(0,a.HD)(e)&&(e=document.getElementById(e),this.set("container",e))},t.prototype.initDom=function(){var e=this.createDom();this.set("el",e),this.get("container").appendChild(e),this.setDOMSize(this.get("width"),this.get("height"))},t.prototype.initEvents=function(){var e=new S({canvas:this});e.init(),this.set("eventController",e)},t.prototype.initTimeline=function(){var e=new m(this);this.set("timeline",e)},t.prototype.setDOMSize=function(e,t){var n=this.get("el");a.jU&&(n.style.width=e+"px",n.style.height=t+"px")},t.prototype.changeSize=function(e,t){this.setDOMSize(e,t),this.set("width",e),this.set("height",t),this.onCanvasChange("changeSize")},t.prototype.getRenderer=function(){return this.get("renderer")},t.prototype.getCursor=function(){return this.get("cursor")},t.prototype.setCursor=function(e){this.set("cursor",e);var t=this.get("el");a.jU&&t&&(t.style.cursor=e)},t.prototype.getPointByEvent=function(e){if(this.get("supportCSSTransform")){if(C&&!(0,a.kK)(e.layerX)&&e.layerX!==e.offsetX)return{x:e.layerX,y:e.layerY};if(!(0,a.kK)(e.offsetX))return{x:e.offsetX,y:e.offsetY}}var t=this.getClientByEvent(e),n=t.x,r=t.y;return this.getPointByClient(n,r)},t.prototype.getClientByEvent=function(e){var t=e;return e.touches&&(t="touchend"===e.type?e.changedTouches[0]:e.touches[0]),{x:t.clientX,y:t.clientY}},t.prototype.getPointByClient=function(e,t){var n=this.get("el").getBoundingClientRect();return{x:e-n.left,y:t-n.top}},t.prototype.getClientByPoint=function(e,t){var n=this.get("el").getBoundingClientRect();return{x:e+n.left,y:t+n.top}},t.prototype.draw=function(){},t.prototype.removeDom=function(){var e=this.get("el");e.parentNode.removeChild(e)},t.prototype.clearEvents=function(){this.get("eventController").destroy()},t.prototype.isCanvas=function(){return!0},t.prototype.getParent=function(){return null},t.prototype.destroy=function(){var t=this.get("timeline");this.get("destroyed")||(this.clear(),t&&t.stop(),this.clearEvents(),this.removeDom(),e.prototype.destroy.call(this))},t}(i.Z);const O=k},3286:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(2970),o=n(8049),i=n(1933),a={},l="_INDEX";function s(e,t){if(e.set("canvas",t),e.isGroup()){var n=e.get("children");n.length&&n.forEach((function(e){s(e,t)}))}}function c(e,t){if(e.set("timeline",t),e.isGroup()){var n=e.get("children");n.length&&n.forEach((function(e){c(e,t)}))}}const u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,r.ZT)(t,e),t.prototype.isCanvas=function(){return!1},t.prototype.getBBox=function(){var e=1/0,t=-1/0,n=1/0,r=-1/0,o=this.getChildren().filter((function(e){return e.get("visible")&&(!e.isGroup()||e.isGroup()&&e.getChildren().length>0)}));return o.length>0?(0,i.S6)(o,(function(o){var i=o.getBBox(),a=i.minX,l=i.maxX,s=i.minY,c=i.maxY;at&&(t=l),sr&&(r=c)})):(e=0,t=0,n=0,r=0),{x:e,y:n,minX:e,minY:n,maxX:t,maxY:r,width:t-e,height:r-n}},t.prototype.getCanvasBBox=function(){var e=1/0,t=-1/0,n=1/0,r=-1/0,o=this.getChildren().filter((function(e){return e.get("visible")&&(!e.isGroup()||e.isGroup()&&e.getChildren().length>0)}));return o.length>0?(0,i.S6)(o,(function(o){var i=o.getCanvasBBox(),a=i.minX,l=i.maxX,s=i.minY,c=i.maxY;a