From 09638d56bc13ff73559be0208d27d0e65bef8f17 Mon Sep 17 00:00:00 2001 From: yyc-git <395976266@qq.com> Date: Thu, 14 Mar 2024 12:01:12 +0800 Subject: [PATCH] feat(engine): fix run in mobile update publish action: add meta; canvas's size use document.documentElement.clientWidth instead of window.innerWidth; add vConsole; adjust page ui size; --- contributes/meta3d-action-publish/.gitignore | 2 + .../meta3d-action-publish/package.json | 5 ++- .../meta3d-action-publish/publish/index.html | 2 +- .../publish/static/js/main.js | 2 +- .../publish/static/js/main.js.map | 2 +- .../publish_source/index.html | 2 + .../publish_source/src/Main.tsx | 6 +++ .../publish_source/src/Page.tsx | 41 ++++++++++--------- .../publish_source/src/Scene.tsx | 12 +----- .../publish_source/src/ViewUtils.ts | 9 ++++ doc/jiehuo.org | 19 ++++++--- .../package.json | 2 +- .../meta3d-pipeline-event/package.json | 4 +- 13 files changed, 65 insertions(+), 43 deletions(-) create mode 100644 contributes/meta3d-action-publish/publish_source/src/ViewUtils.ts 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;l
    ',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;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)},8049:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var r=n(2970),o=n(9537),i=n(9382),a=n(1933),l=n(7902),s=n(6563),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(8049),i=n(7902);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)},6617:(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}},4995:(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(3750),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}()},9019:(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(1861),o=n(9767),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(1507);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(3627),s=n(6563),c=n(1841),u=n(1554),d=n(6996),f=n(4995),p=n(3750),h=n(1933),g=n(7902),m=n(3434),v=n(6617),y="0.5.11"},1507:()=>{},9767:()=>{},7902:(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})},3434:(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}},1861:(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}},3750:(e,t,n)=>{"use strict";n.d(t,{$O:()=>l,FE:()=>i,mY:()=>a});var r=n(1933),o=n(3434);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}},9382:(e,t,n)=>{"use strict";n.d(t,{Dg:()=>c,lh:()=>l,m$:()=>i,vs:()=>s,zu:()=>a});var r=n(4136),o=n(4668);function i(e,t,n){var o=[0,0,0,0,0,0,0,0,0];return r.vc(o,n),r.Jp(e,o,t)}function a(e,t,n){var o=[0,0,0,0,0,0,0,0,0];return r.Us(o,n),r.Jp(e,o,t)}function l(e,t,n){var o=[0,0,0,0,0,0,0,0,0];return r.xJ(o,n),r.Jp(e,o,t)}function s(e,t){for(var n,o,s,c=e?[].concat(e):[1,0,0,0,1,0,0,0,1],u=0,d=t.length;u=0;return n?i?2*Math.PI-r:r:i?r:2*Math.PI-r}},1975:(e,t,n)=>{"use strict";n.d(t,{e9:()=>s,Wq:()=>_,tr:()=>f,wb:()=>g,zx:()=>S});var r=n(9537),o=/[MLHVQTCSAZ]([^MLHVQTCSAZ]*)/gi,i=/[^\s\,]+/gi;const a=function(e){var t=e||[];return(0,r.kJ)(t)?t:(0,r.HD)(t)?(t=t.match(o),(0,r.S6)(t,(function(e,n){if((e=e.match(i))[0].length>1){var o=e[0].charAt(0);e.splice(1,0,e[0].substr(1)),e[0]=o}(0,r.S6)(e,(function(t,n){isNaN(t)||(e[n]=+t)})),t[n]=e})),t):void 0};var l=n(4668);const s=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=[[0,0],[1,1]]);for(var r=!!t,o=[],i=0,a=e.length;i2&&(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}var p=/[a-z]/;function h(e,t){return[t[0]+(t[0]-e[0]),t[1]+(t[1]-e[1])]}function g(e){var t=f(e);if(!t||!t.length)return[["M",0,0]];for(var n=!1,r=0;r=0){n=!0;break}}if(!n)return t;var i=[],a=0,l=0,s=0,c=0,u=0,d=t[0];"M"!==d[0]&&"m"!==d[0]||(s=a=+d[1],c=l=+d[2],u++,i[0]=["M",a,l]),r=u;for(var g=t.length;r1&&(n*=Math.sqrt(h),o*=Math.sqrt(h));var g=n*n*(p*p)+o*o*(f*f),m=g?Math.sqrt((n*n*(o*o)-g)/g):1;a===l&&(m*=-1),isNaN(m)&&(m=0);var x=o?m*n*p/o:0,w=n?m*-o*f/n:0,S=(s+u)/2+Math.cos(i)*x-Math.sin(i)*w,E=(c+d)/2+Math.sin(i)*x+Math.cos(i)*w,C=[(f-x)/n,(p-w)/o],k=[(-1*f-x)/n,(-1*p-w)/o],O=y([1,0],C),M=y(C,k);return v(C,k)<=-1&&(M=Math.PI),v(C,k)>=1&&(M=0),0===l&&M>0&&(M-=2*Math.PI),1===l&&M<0&&(M+=2*Math.PI),{cx:S,cy:E,rx:b(e,[u,d])?0:n,ry:b(e,[u,d])?0:o,startAngle:O,endAngle:O+M,xRotation:i,arcFlag:a,sweepFlag:l}}function w(e,t){return[t[0]+(t[0]-e[0]),t[1]+(t[1]-e[1])]}function S(e){for(var t=[],n=null,r=null,o=null,i=0,l=(e=a(e)).length,s=0;s0!=C(l[1]-n)>0&&C(t-(n-a[1])*(a[0]-l[0])/(a[1]-l[1])-a[0])<0&&(r=!r)}return r}var M=function(e,t,n){return e>=t&&e<=n};function I(e){for(var t=[],n=e.length,r=0;r1){var a=e[0],l=e[n-1];t.push({from:{x:l[0],y:l[1]},to:{x:a[0],y:a[1]}})}return t}function $(e){var t=e.map((function(e){return e[0]})),n=e.map((function(e){return e[1]}));return{minX:Math.min.apply(null,t),maxX:Math.max.apply(null,t),minY:Math.min.apply(null,n),maxY:Math.max.apply(null,n)}}function _(e,t){if(e.length<2||t.length<2)return!1;var n,o;if(n=$(e),(o=$(t)).minX>n.maxX||o.maxXn.maxY||o.maxY.001*(a*a+l*l)*(s*s+c*c)){var f=(o*c-i*s)/u,p=(o*l-i*a)/u;M(f,0,1)&&M(p,0,1)&&(d={x:e.x+f*a,y:e.y+f*l})}return d}(e.from,e.to,t.from,t.to))return n=!0,!1})),n}(a,e))return s=!0,!1})),s}},9537:(e,t,n)=>{"use strict";n.d(t,{Ct:()=>We,f0:()=>Ie,uZ:()=>z,VS:()=>fe,d9:()=>he,FX:()=>o,Ds:()=>ge,b$:()=>ye,e5:()=>a,S6:()=>p,yW:()=>R,hX:()=>i,sE:()=>y,cx:()=>b,Wx:()=>x,ri:()=>H,xH:()=>w,U5:()=>Z,U2:()=>$e,Lo:()=>Ue,rx:()=>C,ru:()=>B,vM:()=>j,Ms:()=>F,wH:()=>J,YM:()=>N,q9:()=>o,cq:()=>be,kJ:()=>d,jn:()=>ie,J_:()=>ae,kK:()=>ue,xb:()=>we,Xy:()=>Ee,mf:()=>c,BD:()=>g,UM:()=>u,Ft:()=>le,hj:()=>U,vQ:()=>V,Kn:()=>f,PO:()=>v,HD:()=>$,P9:()=>s,o8:()=>ce,XP:()=>h,Z$:()=>T,vl:()=>te,UI:()=>Ce,Q8:()=>Oe,Fp:()=>S,UT:()=>X,HP:()=>me,VV:()=>E,F:()=>q,CD:()=>Ie,wQ:()=>G,ZT:()=>je,CE:()=>Ne,ei:()=>Ae,u4:()=>M,Od:()=>I,U7:()=>de,t8:()=>_e,dp:()=>Fe,G:()=>L,MR:()=>_,ng:()=>ne,P2:()=>Te,qo:()=>Re,c$:()=>K,BB:()=>ee,jj:()=>P,EL:()=>De,jC:()=>re,VO:()=>Q,I:()=>A});const r=function(e){return null!==e&&"function"!=typeof e&&isFinite(e.length)},o=function(e,t){return!!r(e)&&e.indexOf(t)>-1},i=function(e,t){if(!r(e))return e;for(var n=[],o=0;ot[o])return 1;if(e[o]n?n:e},H=function(e,t){var n=t.toString(),r=n.indexOf(".");if(-1===r)return Math.round(e);var o=n.substr(r+1).length;return o>20&&(o=20),parseFloat(e.toFixed(o))},U=function(e){return s(e,"Number")};Number.isInteger&&Number.isInteger;var W=1e-5;function V(e,t,n){return void 0===n&&(n=W),Math.abs(e-t)r&&(n=i,r=a)}return n}},q=function(e,t){if(d(e)){for(var n,r=1/0,o=0;ot?(r&&(clearTimeout(r),r=null),l=c,a=e.apply(o,i),r||(o=i=null)):r||!1===n.trailing||(r=setTimeout(s,u)),a};return c.cancel=function(){clearTimeout(r),l=0,r=o=i=null},c},Re=function(e){return r(e)?Array.prototype.slice.call(e):[]};var Le={};const De=function(e){return Le[e=e||"g"]?Le[e]+=1:Le[e]=1,e+Le[e]},je=function(){};function Fe(e){return u(e)?0:r(e)?e.length:Object.keys(e).length}var Be,ze=n(2970);const He=me((function(e,t){void 0===t&&(t={});var n=t.fontSize,r=t.fontFamily,o=t.fontWeight,i=t.fontStyle,a=t.fontVariant;return Be||(Be=document.createElement("canvas").getContext("2d")),Be.font=[i,a,o,n+"px",r].join(" "),Be.measureText($(e)?e:"").width}),(function(e,t){return void 0===t&&(t={}),(0,ze.pr)([e],Q(t)).join("")})),Ue=function(e,t,n,r){void 0===r&&(r="...");var o,i,a=He(r,n),l=$(e)?e:ee(e),s=t,c=[];if(He(e,n)<=t)return e;for(;o=l.substr(0,16),!((i=He(o,n))+a>s&&i>s);)if(c.push(o),s-=i,!(l=l.substr(16)))return c.join("");for(;o=l.substr(0,1),!((i=He(o,n))+a>s);)if(c.push(o),s-=i,!(l=l.substr(1)))return c.join("");return""+c.join("")+r},We=function(){function e(){this.map={}}return e.prototype.has=function(e){return void 0!==this.map[e]},e.prototype.get=function(e,t){var n=this.map[e];return void 0===n?t:n},e.prototype.set=function(e,t){this.map[e]=t},e.prototype.clear=function(){this.map={}},e.prototype.delete=function(e){delete this.map[e]},e.prototype.size=function(){return Object.keys(this.map).length},e}()},8840:(e,t,n)=>{"use strict";var r;n.r(t),n.d(t,{AbstractSDKRequest:()=>o,AbstractStorage:()=>i,StorageType:()=>r,formatUrl:()=>a}),function(e){e.local="local",e.none="none",e.session="session"}(r||(r={}));var o=function(){},i=function(){};function a(e,t,n){void 0===n&&(n={});var r=/\?/.test(t),o="";for(var i in n)""===o?!r&&(t+="?"):o+="&",o+=i+"="+encodeURIComponent(n[i]);return/^http(s)?\:\/\//.test(t+=o)?t:""+e+t}},3075:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>Wa});var r={};n.r(r),n.d(r,{LineString:()=>Gr,MultiLineString:()=>Qr,MultiPoint:()=>Zr,MultiPolygon:()=>to,Point:()=>so,Polygon:()=>Kr});var o,i=n(3507),a=n(8840),l=(o=function(e,t){return o=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])},o(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=function(){return s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=1)return[2,this._refreshAccessToken(--e)];throw new Error(JSON.stringify({code:j.OPERATION_FAIL,message:"重试获取 refresh token 失败"}));case 9:return ce.fire("loginStateExpire"),[4,this._cache.removeStoreAsync(o)];case 10:h.sent(),h.label=11;case 11:throw new Error(JSON.stringify({code:j.NETWORK_ERROR,msg:"refresh access_token failed:"+c.data.code}));case 12:return c.data.access_token?(ce.fire("refreshAccessToken"),[4,this._cache.setStoreAsync(n,c.data.access_token)]):[3,15];case 13:return h.sent(),[4,this._cache.setStoreAsync(r,c.data.access_token_expire+Date.now())];case 14:return h.sent(),[2,{accessToken:c.data.access_token,accessTokenExpire:c.data.access_token_expire}];case 15:return c.data.refresh_token?[4,this._cache.removeStoreAsync(o)]:[3,19];case 16:return h.sent(),[4,this._cache.setStoreAsync(o,c.data.refresh_token)];case 17:return h.sent(),[4,this._refreshAccessToken()];case 18:h.sent(),h.label=19;case 19:return[2]}}))}))},e.prototype._setRefreshToken=function(e){return L(this,void 0,void 0,(function(){var t,n,r,o;return D(this,(function(i){switch(i.label){case 0:return t=this._cache.keys,n=t.accessTokenKey,r=t.accessTokenExpireKey,o=t.refreshTokenKey,[4,this._cache.removeStoreAsync(n)];case 1:return i.sent(),[4,this._cache.removeStoreAsync(r)];case 2:return i.sent(),[4,this._cache.setStoreAsync(o,e)];case 3:return i.sent(),[2]}}))}))},e}(),G={},Y=function(){return Y=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0;l--)(o=e[l])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Z=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},J=i.adapters.useAdapters,Q=i.adapters.useDefaultAdapter,ee=i.adapters.RUNTIME,te=i.constants.ERRORS,ne=i.constants.COMMUNITY_SITE_URL,re=i.utils.printWarn,oe=i.helpers.catchErrorsDecorator,ie={timeout:15e3,persistence:"local"},ae=6e5,le={},se=function(){function e(e){this._config=e||this._config,this.authInstance=null}return Object.defineProperty(e.prototype,"config",{get:function(){return this._config},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"platform",{get:function(){return y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cache",{get:function(){return C(this._config.env)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"localCache",{get:function(){return k(this._config.env)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"request",{get:function(){return e=this._config.env,G[e];var e},enumerable:!1,configurable:!0}),e.prototype.init=function(t){if(!t.env)throw new Error(JSON.stringify({code:te.INVALID_PARAMS,msg:"env must not be specified"}));if(y.adapter||this._useDefaultAdapter(),this.requestClient=new y.adapter.reqClass({timeout:t.timeout||5e3,timeoutMsg:"["+_+"][REQUEST TIMEOUT] request had been abort since didn't finished within"+t.timeout/1e3+"s"}),y.runtime!==ee.WEB){if(!t.appSecret)throw new Error(JSON.stringify({code:te.INVALID_PARAMS,msg:"invalid appSecret"}));var n=y.adapter.getAppSign?y.adapter.getAppSign():"";if(t.appSign&&n&&t.appSign!==n)throw new Error(JSON.stringify({code:te.INVALID_PARAMS,msg:"invalid appSign"}));if(n&&(t.appSign=n),!t.appSign)throw new Error(JSON.stringify({code:te.INVALID_PARAMS,msg:"invalid appSign"}))}this._config=Y(Y({},ie),t),this._config.timeout=this._formatTimeout(this._config.timeout);var r=this._config,o=r.env,i=r.persistence,a=r.debug,l=r.timeout,s=r.appSecret,c=r.appSign;E({env:o,persistence:i,debug:a,platformInfo:this.platform}),function(e){G[e.env]=new q(R(R({},e),{throw:!0}))}({env:o,region:t.region||"",timeout:l,appSecret:s,appSign:c}),t.region&&function(e,t,n){N(t?"//"+e+"."+t+".tcb-api.tencentcloudapi.com/web":"//"+e+".ap-shanghai.tcb-api.tencentcloudapi.com/web",void 0)}(o,t.region||"");var u=new e(this._config);return u.requestClient=this.requestClient,u},e.prototype.updateConfig=function(e){var t=e.persistence,n=e.debug;this._config.persistence=t,this._config.debug=n,E({env:this._config.env,persistence:t,debug:n,platformInfo:this.platform})},e.prototype.registerExtension=function(e){le[e.name]=e},e.prototype.invokeExtension=function(e,t){return n=this,r=void 0,i=function(){var n;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]ae:return re(te.INVALID_PARAMS,"timeout is greater than maximum value[10min]"),ae;case e<100:return re(te.INVALID_PARAMS,"timeout is less than maximum value[100ms]"),100;default:return e}},K([oe({mode:"sync",title:"Cloudbase 初始化失败",messages:["请确认以下各项:"," 1 - 调用 cloudbase.init() 的语法或参数是否正确"," 2 - 如果是非浏览器环境,是否配置了安全应用来源(https://docs.cloudbase.net/api-reference/webv2/adapter.html#jie-ru-liu-cheng)","如果问题依然存在,建议到官方问答社区提问或寻找帮助:"+ne]}),Z("design:type",Function),Z("design:paramtypes",[Object]),Z("design:returntype",e)],e.prototype,"init",null),K([oe({title:"调用扩展能力失败",messages:["请确认以下各项:"," 1 - 调用 invokeExtension() 的语法或参数是否正确"," 2 - 被调用的扩展能力是否已经安装并通过 registerExtension() 注册","如果问题依然存在,建议到官方问答社区提问或寻找帮助:"+ne]}),Z("design:type",Function),Z("design:paramtypes",[String,Object]),Z("design:returntype",Promise)],e.prototype,"invokeExtension",null),e}(),ce=new se;ce.useAdapters(f);const ue=ce;var de,fe=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}s((r=r.apply(e,t||[])).next())}))},pe=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]Date.now()?[4,(i=new zt({envId:this._config.env,cache:this._cache,request:this._request})).checkLocalStateAsync()]:[3,4]:[3,7];case 3:return a.sent(),[2,i];case 4:return[4,this._cache.removeStoreAsync(t)];case 5:return a.sent(),[4,this._cache.removeStoreAsync(n)];case 6:a.sent(),a.label=7;case 7:return[2]}}))}))},e.prototype.setRefreshToken=function(e){return fe(this,void 0,void 0,(function(){var t,n,r,o;return pe(this,(function(i){switch(i.label){case 0:return t=this._cache.keys,n=t.accessTokenKey,r=t.accessTokenExpireKey,o=t.refreshTokenKey,[4,this._cache.removeStoreAsync(n)];case 1:return i.sent(),[4,this._cache.removeStoreAsync(r)];case 2:return i.sent(),[4,this._cache.setStoreAsync(o,e)];case 3:return i.sent(),[2]}}))}))},e.prototype.setAccessToken=function(e,t){return fe(this,void 0,void 0,(function(){var n,r,o;return pe(this,(function(i){switch(i.label){case 0:return n=this._cache.keys,r=n.accessTokenKey,o=n.accessTokenExpireKey,[4,this._cache.setStoreAsync(r,e)];case 1:return i.sent(),[4,this._cache.setStoreAsync(o,t)];case 2:return i.sent(),[2]}}))}))},e.prototype.refreshUserInfo=function(){return fe(this,void 0,void 0,(function(){var e;return pe(this,(function(t){switch(t.label){case 0:return[4,this._request.send("auth.getUserInfo",{})];case 1:return e=t.sent().data,[4,this.setLocalUserInfo(e)];case 2:return t.sent(),[2,e]}}))}))},e.prototype.setLocalUserInfo=function(e){return fe(this,void 0,void 0,(function(){var t;return pe(this,(function(n){switch(n.label){case 0:return t=this._cache.keys.userInfoKey,[4,this._cache.setStoreAsync(t,e)];case 1:return n.sent(),[2]}}))}))},e}();!function(e){e.ANONYMOUS="ANONYMOUS",e.WECHAT="WECHAT",e.WECHAT_PUBLIC="WECHAT-PUBLIC",e.WECHAT_OPEN="WECHAT-OPEN",e.CUSTOM="CUSTOM",e.EMAIL="EMAIL",e.USERNAME="USERNAME",e.NULL="NULL",e.PHONE="PHONE"}(de||(de={}));var ge=function(){var e=function(t,n){return e=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])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),me=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},ve=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},ye=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}s((r=r.apply(e,t||[])).next())}))},be=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=0;l--)(o=e[l])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);i>3&&a&&Object.defineProperty(t,n,a)}([Be({title:"匿名登录失败",messages:["请确认以下各项:"," 1 - 当前环境是否开启了匿名登录"," 2 - 调用 auth().anonymouseProvider().signIn() 的语法或参数是否正确","如果问题依然存在,建议到官方问答社区提问或寻找帮助:"+Le]}),Ae("design:type",Function),Ae("design:paramtypes",[]),Ae("design:returntype",Promise)],t.prototype,"signIn",null),t}(he),He=function(){var e=function(t,n){return e=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])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ue=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},We=i.constants.ERRORS,Ve=i.constants.COMMUNITY_SITE_URL,Xe=i.utils.isString,qe=i.helpers.catchErrorsDecorator,Ge=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return He(t,e),t.prototype.signIn=function(e){return t=this,n=void 0,o=function(){var t,n,r,o,i,a,l;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=0;l--)(o=e[l])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);i>3&&a&&Object.defineProperty(t,n,a)}([qe({title:"自定义登录失败",messages:["请确认以下各项:"," 1 - 当前环境是否开启了自定义登录"," 2 - 调用 auth().customAuthProvider().signIn() 的语法或参数是否正确"," 3 - ticket 是否归属于当前环境"," 4 - 创建 ticket 的自定义登录私钥是否过期","如果问题依然存在,建议到官方问答社区提问或寻找帮助:"+Ve]}),Ue("design:type",Function),Ue("design:paramtypes",[String]),Ue("design:returntype",Promise)],t.prototype,"signIn",null),t}(he),Ye=function(){var e=function(t,n){return e=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])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ke=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Ze=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Je=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}s((r=r.apply(e,t||[])).next())}))},Qe=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=0;l--)(o=e[l])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);i>3&&a&&Object.defineProperty(t,n,a)}([dt({title:"用户名密码登录失败",messages:["请确认以下各项:"," 1 - 调用 auth().signInWithUsernameAndPassword() 的语法或参数是否正确"," 2 - 当前环境是否开通了用户名密码登录"," 3 - 用户名密码是否匹配","如果问题依然存在,建议到官方问答社区提问或寻找帮助:"+ut]}),lt("design:type",Function),lt("design:paramtypes",[String,String]),lt("design:returntype",Promise)],t.prototype,"signIn",null),t}(he),pt=function(){var e=function(t,n){return e=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])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ht=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},gt=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},mt=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}s((r=r.apply(e,t||[])).next())}))},vt=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=0;l--)(o=e[l])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},It=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},$t=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}s((r=r.apply(e,t||[])).next())}))},_t=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=0;l--)(o=e[l])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);i>3&&a&&Object.defineProperty(t,n,a)}([Kt({customInfo:{className:"Cloudbase",methodName:"callFunction"},title:"函数调用失败",messages:["请确认以下各项:"," 1 - 调用 callFunction() 的语法或参数是否正确"," 2 - 当前环境下是否存在此函数"," 3 - 函数安全规则是否限制了当前登录状态访问","如果问题依然存在,建议到官方问答社区提问或寻找帮助:"+Gt]}),Vt("design:type",Function),Vt("design:paramtypes",[Object,Function]),Vt("design:returntype",Promise)],e.prototype,"callFunction",null),e}(),Qt=new Jt,en={name:Zt,entity:{callFunction:Qt.callFunction}};try{cloudbase.registerComponent(en)}catch(e){}var tn=function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},nn=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},rn=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}s((r=r.apply(e,t||[])).next())}))},on=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0){for(c=0,u=l;c0?(this._availableRetries.CHECK_LAST--,this.scheduleSendACK()):this.closeWithError(new Nn({errCode:Tn.SDK_DATABASE_REALTIME_LISTENER_CHECK_LAST_FAIL,errMsg:t})),[3,3];case 3:return[2]}}))}))},this.handleCommonError=function(e,t){if(_n(e))switch(e.payload.msgData.code){case"CHECK_LOGIN_FAILED":case"SIGN_EXPIRED_ERROR":case"SIGN_INVALID_ERROR":case"SIGN_PARAM_INVALID":return void t.onSignError(e);default:return void t.onNotRetryableError(e)}else{if(function(e){return"timeout"===e.type}(e))return void t.onTimeoutError(e);if(function(e){return"cancelled"===e.type}(e))return void t.onCancelledError(e)}t.onUnknownError(e)},this.watchId="watchid_"+ +new Date+"_"+Math.random(),this.envId=e.envId,this.collectionName=e.collectionName,this.query=e.query,this.limit=e.limit,this.orderBy=e.orderBy,this.send=e.send,this.login=e.login,this.isWSConnected=e.isWSConnected,this.onceWSConnected=e.onceWSConnected,this.getWaitExpectedTimeoutLength=e.getWaitExpectedTimeoutLength,this.onWatchStart=e.onWatchStart,this.onWatchClose=e.onWatchClose,this.debug=e.debug,this._availableRetries={INIT_WATCH:2,REBUILD_WATCH:2,CHECK_LAST:2},this.listener=new On({close:this.closeWatch,onChange:e.onChange,onError:e.onError,debug:this.debug,virtualClient:this}),this.initWatch()}return e.prototype.onMessage=function(e){var t=this;switch(this.watchStatus){case kn.PAUSED:if("ERROR"!==e.msgType)return;break;case kn.LOGGINGIN:case kn.INITING:case kn.REBUILDING:return void console.warn("[realtime listener] internal non-fatal error: unexpected message received while "+this.watchStatus);case kn.CLOSED:return void console.warn("[realtime listener] internal non-fatal error: unexpected message received when the watch has closed");case kn.ERRORED:return void console.warn("[realtime listener] internal non-fatal error: unexpected message received when the watch has ended with error")}if(this.sessionInfo)switch(this.scheduleSendACK(),e.msgType){case"NEXT_EVENT":console.warn("nextevent "+e.msgData.currEvent+" ignored",e),this.handleServerEvents(e);break;case"CHECK_EVENT":this.sessionInfo.currentEventId0)&&(this._availableRetries[e]--,console.log("[realtime] "+e+" use a retry ticket, now only "+this._availableRetries[e]+" retry left"),!0)},e.prototype.handleServerEvents=function(e){return Ln(this,void 0,void 0,(function(){var t;return Dn(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),this.scheduleSendACK(),[4,this._handleServerEvents(e)];case 1:return n.sent(),this._postHandleServerEventsValidityCheck(e),[3,3];case 2:throw t=n.sent(),console.error("[realtime listener] internal non-fatal error: handle server events failed with error: ",t),t;case 3:return[2]}}))}))},e.prototype._handleServerEvents=function(e){return Ln(this,void 0,void 0,(function(){var t,n,r,o,i,a,l,s,c,u,d,f;return Dn(this,(function(p){switch(p.label){case 0:if(t=e.requestId,n=e.msgData.events,r=e.msgType,!n.length||!this.sessionInfo)return[2];o=this.sessionInfo;try{i=n.map(Bn)}catch(e){return this.closeWithError(new Nn({errCode:Tn.SDK_DATABASE_REALTIME_LISTENER_RECEIVE_INVALID_SERVER_DATA,errMsg:e})),[2]}a=jn(o.currentDocs),l=!1,s=function(n,s){var u,d,f,p,h,g,m,v,y,b,x;return Dn(this,(function(w){switch(w.label){case 0:return u=i[n],o.currentEventId>=u.id?(!i[n-1]||u.id>i[n-1].id?console.warn("[realtime] duplicate event received, cur "+o.currentEventId+" but got "+u.id):console.error("[realtime listener] server non-fatal error: events out of order (the latter event's id is smaller than that of the former) (requestId "+t+")"),[2,"continue"]):[3,1];case 1:if(o.currentEventId!==u.id-1)return[3,2];switch(u.dataType){case"update":if(!u.doc)switch(u.queueType){case"update":case"dequeue":if(d=a.find((function(e){return e._id===u.docId})),d){if(g=En()(d),u.updatedFields)for(h in u.updatedFields)bn()(g,h,u.updatedFields[h]);if(u.removedFields)for(f=0,p=u.removedFields;f-1?a.splice(v,1):console.error("[realtime listener] internal non-fatal server error: unexpected dequeue event where no doc is associated.");break;case"update":v=a.findIndex((function(e){return e._id===u.docId})),v>-1?a[v]=u.doc:console.error("[realtime listener] internal non-fatal server error: unexpected queueType update event where no doc is associated.")}return(n===s-1||i[n+1]&&i[n+1].id!==u.id)&&(y=jn(a),b=i.slice(0,n+1).filter((function(e){return e.id===u.id})),c.sessionInfo.currentEventId=u.id,c.sessionInfo.currentDocs=a,x=new Mn({id:u.id,docChanges:b,docs:y,msgType:r}),c.listener.onChange(x)),[3,4];case 2:return console.warn("[realtime listener] event received is out of order, cur "+c.sessionInfo.currentEventId+" but got "+u.id),[4,c.rebuildWatch()];case 3:return w.sent(),[2,{value:void 0}];case 4:return[2]}}))},c=this,u=0,d=i.length,p.label=1;case 1:return u=this.sessionInfo.expectEventId&&this.clearWaitExpectedEvent(),this.sessionInfo.currentEventId0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0?(this._wsInitPromise=void 0,[4,Rn(this._reconnectInterval)]):[3,9];case 7:l.sent(),e&&(this._reconnectState=!1),l.label=8;case 8:return r(this.initWebSocketConnection(e,n-1)),[3,10];case 9:o(i),e&&this.closeAllClients(new Nn({errCode:Tn.SDK_DATABASE_REALTIME_LISTENER_RECONNECT_WATCH_FAIL,errMsg:i})),l.label=10;case 10:return[3,11];case 11:return[2]}}))}))})),r.label=1;case 1:return r.trys.push([1,3,4,5]),[4,this._wsInitPromise];case 2:return r.sent(),this._wsReadySubsribers.forEach((function(e){return(0,e.resolve)()})),[3,5];case 3:return r.sent(),this._wsReadySubsribers.forEach((function(e){return(0,e.reject)()})),[3,5];case 4:return this._wsInitPromise=void 0,this._wsReadySubsribers=[],[7];case 5:return[2]}}))}))},this.initWebSocketEvent=function(){return new Promise((function(e,n){if(!t._ws)throw new Error("can not initWebSocketEvent, ws not exists");var r=!1;t._ws.onopen=function(t){console.warn("[realtime] ws event: open",t),r=!0,e()},t._ws.onerror=function(e){t._logins=new Map,r?(console.error("[realtime] ws event: error",e),t.clearHeartbeat(),t._virtualWSClient.forEach((function(t){return t.closeWithError(new Nn({errCode:Tn.SDK_DATABASE_REALTIME_LISTENER_WEBSOCKET_CONNECTION_ERROR,errMsg:e}))}))):(console.error("[realtime] ws open failed with ws event: error",e),n(e))},t._ws.onclose=function(e){switch(console.warn("[realtime] ws event: close",e),t._logins=new Map,t.clearHeartbeat(),e.code){case zn.ReconnectWebSocket:case zn.NoRealtimeListeners:break;case zn.HeartbeatPingError:case zn.HeartbeatPongTimeoutError:case zn.NormalClosure:case zn.AbnormalClosure:t._maxReconnect>0?t.initWebSocketConnection(!0,t._maxReconnect):t.closeAllClients(Un(e.code));break;case zn.NoAuthentication:t.closeAllClients(Un(e.code,e.reason));break;default:t._maxReconnect>0?t.initWebSocketConnection(!0,t._maxReconnect):t.closeAllClients(Un(e.code))}},t._ws.onmessage=function(e){var n,r=e.data;t.heartbeat();try{n=JSON.parse(r)}catch(e){throw new Error("[realtime] onMessage parse res.data error: "+e)}if("ERROR"===n.msgType){var o=null;t._virtualWSClient.forEach((function(e){e.watchId===n.watchId&&(o=e)})),o&&o.listener.onError(n)}var i=t._wsResponseWait.get(n.requestId);if(i){try{"ERROR"===n.msgType?i.reject(new $n(n)):i.resolve(n)}catch(e){console.error("ws onMessage responseWaitSpec.resolve(msg) errored:",e)}finally{t._wsResponseWait.delete(n.requestId)}if(i.skipOnMessage)return}if("PONG"!==n.msgType){var a=n.watchId&&t._watchIdClientMap.get(n.watchId);if(a)a.onMessage(n);else switch(console.error("[realtime] no realtime listener found responsible for watchId "+n.watchId+": ",n),n.msgType){case"INIT_EVENT":case"NEXT_EVENT":case"CHECK_EVENT":(a=t._queryIdClientMap.get(n.msgData.queryID))&&a.onMessage(n);break;default:for(var l=0,s=Array.from(t._watchIdClientMap.entries());l1e4)return void console.warn("[realtime] untrusted rtt observed: "+c);t._rttObserved.length>=3&&t._rttObserved.splice(0,t._rttObserved.length-3+1),t._rttObserved.push(c)}},t.heartbeat()}))},this.isWSConnected=function(){return Boolean(t._ws&&1===t._ws.readyState)},this.onceWSConnected=function(){return Kn(t,void 0,void 0,(function(){var e=this;return Zn(this,(function(t){return this.isWSConnected()?[2]:this._wsInitPromise?[2,this._wsInitPromise]:[2,new Promise((function(t,n){e._wsReadySubsribers.push({resolve:t,reject:n})}))]}))}))},this.webLogin=function(e,n){return Kn(t,void 0,void 0,(function(){var t,r,o,i,a,l,s,c,u=this;return Zn(this,(function(d){switch(d.label){case 0:if(!n)if(e){if(t=this._logins.get(e)){if(t.loggedIn&&t.loginResult)return[2,t.loginResult];if(t.loggingInPromise)return[2,t.loggingInPromise]}}else if(null==(r=this._logins.get(""))?void 0:r.loggingInPromise)return[2,r.loggingInPromise];o=new Promise((function(e,t){return Kn(u,void 0,void 0,(function(){var n,r,o,i,a;return Zn(this,(function(l){switch(l.label){case 0:return l.trys.push([0,3,,4]),[4,this.getWsSign()];case 1:return n=l.sent(),r={envId:n.envId||"",accessToken:"",referrer:"web",sdkVersion:"",dataVersion:""},o={watchId:void 0,requestId:Cn(),msgType:"LOGIN",msgData:r,exMsgData:{runtime:qn(),signStr:n.signStr,secretVersion:n.secretVersion}},[4,this.send({msg:o,waitResponse:!0,skipOnMessage:!0,timeout:5e3})];case 2:return(i=l.sent()).msgData.code?t(new Error(i.msgData.code+" "+i.msgData.message)):e({envId:n.envId}),[3,4];case 3:return a=l.sent(),t(a),[3,4];case 4:return[2]}}))}))})),i=e&&this._logins.get(e),a=Date.now(),i?(i.loggedIn=!1,i.loggingInPromise=o,i.loginStartTS=a):(i={loggedIn:!1,loggingInPromise:o,loginStartTS:a},this._logins.set(e||"",i)),d.label=1;case 1:return d.trys.push([1,3,,4]),[4,o];case 2:if(l=d.sent(),(s=e&&this._logins.get(e))&&s===i&&s.loginStartTS===a)return i.loggedIn=!0,i.loggingInPromise=void 0,i.loginStartTS=void 0,i.loginResult=l,[2,l];if(s){if(s.loggedIn&&s.loginResult)return[2,s.loginResult];if(s.loggingInPromise)return[2,s.loggingInPromise];throw new Error("ws unexpected login info")}throw new Error("ws login info reset");case 3:throw c=d.sent(),i.loggedIn=!1,i.loggingInPromise=void 0,i.loginStartTS=void 0,i.loginResult=void 0,c;case 4:return[2]}}))}))},this.getWsSign=function(){return Kn(t,void 0,void 0,(function(){var e,t,n,r,o,i,a;return Zn(this,(function(l){switch(l.label){case 0:return this._wsSign&&this._wsSign.expiredTs>Date.now()?[2,this._wsSign]:(e=Date.now()+6e4,[4,this._context.appConfig.request.send("auth.wsWebSign",{runtime:qn()})]);case 1:if((t=l.sent()).code)throw new Error("[tcb-js-sdk] 获取实时数据推送登录票据失败: "+t.code);if(t.data)return n=t.data,r=n.signStr,o=n.wsUrl,i=n.secretVersion,a=n.envId,[2,{signStr:r,wsUrl:o,secretVersion:i,envId:a,expiredTs:e}];throw new Error("[tcb-js-sdk] 获取实时数据推送登录票据失败")}}))}))},this.getWaitExpectedTimeoutLength=function(){return t._rttObserved.length?t._rttObserved.reduce((function(e,t){return e+t}))/t._rttObserved.length*1.5:5e3},this.ping=function(){return Kn(t,void 0,void 0,(function(){var e;return Zn(this,(function(t){switch(t.label){case 0:return e={watchId:void 0,requestId:Cn(),msgType:"PING",msgData:null},[4,this.send({msg:e})];case 1:return t.sent(),[2]}}))}))},this.onWatchStart=function(e,n){t._queryIdClientMap.set(n,e)},this.onWatchClose=function(e,n){n&&t._queryIdClientMap.delete(n),t._watchIdClientMap.delete(e.watchId),t._virtualWSClient.delete(e),t._virtualWSClient.size||t.close(zn.NoRealtimeListeners)},this._maxReconnect=e.maxReconnect||5,this._reconnectInterval=e.reconnectInterval||1e4,this._context=e.context}return e.prototype.clearHeartbeat=function(){this._pingTimeoutId&&clearTimeout(this._pingTimeoutId),this._pongTimeoutId&&clearTimeout(this._pongTimeoutId)},e.prototype.close=function(e){this.clearHeartbeat(),this._ws&&(this._ws.close(e,Hn[e].name),this._ws=void 0)},e.prototype.watch=function(e){this._ws||this._wsInitPromise||this.initWebSocketConnection(!1);var t=new Fn(Yn(Yn({},e),{send:this.send,login:this.webLogin,isWSConnected:this.isWSConnected,onceWSConnected:this.onceWSConnected,getWaitExpectedTimeoutLength:this.getWaitExpectedTimeoutLength,onWatchStart:this.onWatchStart,onWatchClose:this.onWatchClose,debug:!0}));return this._virtualWSClient.add(t),this._watchIdClientMap.set(t.watchId,t),t.listener},e.prototype.heartbeat=function(e){var t=this;this.clearHeartbeat(),this._pingTimeoutId=setTimeout((function(){return Kn(t,void 0,void 0,(function(){var e=this;return Zn(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),this._ws&&1===this._ws.readyState?(this._lastPingSendTS=Date.now(),[4,this.ping()]):[2];case 1:return t.sent(),this._pingFailed=0,this._pongTimeoutId=setTimeout((function(){console.error("pong timed out"),e._pongMissed<2?(e._pongMissed++,e.heartbeat(!0)):e.initWebSocketConnection(!0)}),this._context.appConfig.realtimePongWaitTimeout),[3,3];case 2:return t.sent(),this._pingFailed<2?(this._pingFailed++,this.heartbeat()):this.close(zn.HeartbeatPingError),[3,3];case 3:return[2]}}))}))}),e?0:this._context.appConfig.realtimePingInterval)},e}(),Qn={target:"database",entity:function(){var e,t=this.platform,n=t.adapter,r=t.runtime;e=n.wsClass,Wn=e,Gn(r)}},er={name:"realtime",IIFE:!0,entity:function(){this.prototype.wsClientClass=Jn}};try{cloudbase.registerComponent(er),cloudbase.registerHook(Qn)}catch(e){}var tr,nr,rr=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},or=i.constants.ERRORS,ir=i.constants.COMMUNITY_SITE_URL,ar=i.helpers.catchErrorsDecorator,lr="analytics",sr=["mall"],cr=new(function(){function e(){}return e.prototype.analytics=function(e){return t=this,n=void 0,o=function(){var t,n,r;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=0;l--)(o=e[l])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);i>3&&a&&Object.defineProperty(t,n,a)}([ar({customInfo:{className:"Cloudbase",methodName:"analytics"},title:"上报调用失败",messages:["请确认以下各项:"," 1 - 调用 analytics() 的语法或参数是否正确","如果问题依然存在,建议到官方问答社区提问或寻找帮助:"+ir]}),rr("design:type",Function),rr("design:paramtypes",[Object]),rr("design:returntype",Promise)],e.prototype,"analytics",null),e}()),ur={name:lr,entity:{analytics:cr.analytics}};try{cloudbase.registerComponent(ur)}catch(e){}!function(e){e.DocIDError="文档ID不合法",e.CollNameError="集合名称不合法",e.OpStrError="操作符不合法",e.DirectionError="排序字符不合法",e.IntergerError="must be integer",e.QueryParamTypeError="查询参数必须为对象",e.QueryParamValueError="查询参数对象值不能均为undefined"}(nr||(nr={}));var dr,fr,pr="Object",hr="GeoPoint",gr="GeoLineString",mr="GeoPolygon",vr="GeoMultiPoint",yr="GeoMultiLineString",br="GeoMultiPolygon",xr="Date",wr="ServerDate",Sr=["desc","asc"],Er=["<","<=","==",">=",">"];!function(e){e.lt="<",e.gt=">",e.lte="<=",e.gte=">=",e.eq="=="}(dr||(dr={})),(tr={})[dr.eq]="$eq",tr[dr.lt]="$lt",tr[dr.lte]="$lte",tr[dr.gt]="$gt",tr[dr.gte]="$gte",function(e){e.WHERE="WHERE",e.DOC="DOC"}(fr||(fr={}));var Cr=function(){var e=function(t,n){return e=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])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),kr=[],Or={},Mr=function(e){function t(t,n){if(n!==Or)throw new TypeError("InternalSymbol cannot be constructed with new operator");return e.call(this,t)||this}return Cr(t,e),t.for=function(e){for(var n=0,r=kr.length;n=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(e.coordinates),o=r.next();!o.done;o=r.next()){var i=o.value;if(!Ur(i[0])||!Ur(i[1]))return!1}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return!0},e.isClosed=function(e){var t=e.points[0],n=e.points[e.points.length-1];if(t.latitude===n.latitude&&t.longitude===n.longitude)return!0},Object.defineProperty(e.prototype,"_internalType",{get:function(){return Tr},enumerable:!0,configurable:!0}),e}(),Yr=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Kr=function(){function e(e){if(!Wr(e))throw new TypeError('"lines" must be of type LineString[]. Received type '+typeof e);if(0===e.length)throw new Error("Polygon must contain 1 linestring at least");e.forEach((function(e){if(!(e instanceof Gr))throw new TypeError('"lines" must be of type LineString[]. Received type '+typeof e+"[]");if(!Gr.isClosed(e))throw new Error("LineString "+e.points.map((function(e){return e.toReadableString()}))+" is not a closed cycle")})),this.lines=e}return e.prototype.parse=function(e){var t;return(t={})[e]={type:"Polygon",coordinates:this.lines.map((function(e){return e.points.map((function(e){return[e.longitude,e.latitude]}))}))},t},e.prototype.toJSON=function(){return{type:"Polygon",coordinates:this.lines.map((function(e){return e.points.map((function(e){return[e.longitude,e.latitude]}))}))}},e.validate=function(e){var t,n,r,o;if("Polygon"!==e.type||!Wr(e.coordinates))return!1;try{for(var i=Yr(e.coordinates),a=i.next();!a.done;a=i.next()){var l=a.value;if(!this.isCloseLineString(l))return!1;try{for(var s=(r=void 0,Yr(l)),c=s.next();!c.done;c=s.next()){var u=c.value;if(!Ur(u[0])||!Ur(u[1]))return!1}}catch(e){r={error:e}}finally{try{c&&!c.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return!0},e.isCloseLineString=function(e){var t=e[0],n=e[e.length-1];return t[0]===n[0]&&t[1]===n[1]},Object.defineProperty(e.prototype,"_internalType",{get:function(){return jr},enumerable:!0,configurable:!0}),e}(),Zr=function(){function e(e){if(!Wr(e))throw new TypeError('"points" must be of type Point[]. Received type '+typeof e);if(0===e.length)throw new Error('"points" must contain 1 point at least');e.forEach((function(e){if(!(e instanceof so))throw new TypeError('"points" must be of type Point[]. Received type '+typeof e+"[]")})),this.points=e}return e.prototype.parse=function(e){var t;return(t={})[e]={type:"MultiPoint",coordinates:this.points.map((function(e){return e.toJSON().coordinates}))},t},e.prototype.toJSON=function(){return{type:"MultiPoint",coordinates:this.points.map((function(e){return e.toJSON().coordinates}))}},e.validate=function(e){var t,n;if("MultiPoint"!==e.type||!Wr(e.coordinates))return!1;try{for(var r=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(e.coordinates),o=r.next();!o.done;o=r.next()){var i=o.value;if(!Ur(i[0])||!Ur(i[1]))return!1}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return!0},Object.defineProperty(e.prototype,"_internalType",{get:function(){return Lr},enumerable:!0,configurable:!0}),e}(),Jr=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Qr=function(){function e(e){if(!Wr(e))throw new TypeError('"lines" must be of type LineString[]. Received type '+typeof e);if(0===e.length)throw new Error("Polygon must contain 1 linestring at least");e.forEach((function(e){if(!(e instanceof Gr))throw new TypeError('"lines" must be of type LineString[]. Received type '+typeof e+"[]")})),this.lines=e}return e.prototype.parse=function(e){var t;return(t={})[e]={type:"MultiLineString",coordinates:this.lines.map((function(e){return e.points.map((function(e){return[e.longitude,e.latitude]}))}))},t},e.prototype.toJSON=function(){return{type:"MultiLineString",coordinates:this.lines.map((function(e){return e.points.map((function(e){return[e.longitude,e.latitude]}))}))}},e.validate=function(e){var t,n,r,o;if("MultiLineString"!==e.type||!Wr(e.coordinates))return!1;try{for(var i=Jr(e.coordinates),a=i.next();!a.done;a=i.next()){var l=a.value;try{for(var s=(r=void 0,Jr(l)),c=s.next();!c.done;c=s.next()){var u=c.value;if(!Ur(u[0])||!Ur(u[1]))return!1}}catch(e){r={error:e}}finally{try{c&&!c.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return!0},Object.defineProperty(e.prototype,"_internalType",{get:function(){return Dr},enumerable:!0,configurable:!0}),e}(),eo=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},to=function(){function e(e){var t,n;if(!Wr(e))throw new TypeError('"polygons" must be of type Polygon[]. Received type '+typeof e);if(0===e.length)throw new Error("MultiPolygon must contain 1 polygon at least");try{for(var r=eo(e),o=r.next();!o.done;o=r.next()){var i=o.value;if(!(i instanceof Kr))throw new TypeError('"polygon" must be of type Polygon[]. Received type '+typeof i+"[]")}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}this.polygons=e}return e.prototype.parse=function(e){var t;return(t={})[e]={type:"MultiPolygon",coordinates:this.polygons.map((function(e){return e.lines.map((function(e){return e.points.map((function(e){return[e.longitude,e.latitude]}))}))}))},t},e.prototype.toJSON=function(){return{type:"MultiPolygon",coordinates:this.polygons.map((function(e){return e.lines.map((function(e){return e.points.map((function(e){return[e.longitude,e.latitude]}))}))}))}},e.validate=function(e){var t,n,r,o,i,a;if("MultiPolygon"!==e.type||!Wr(e.coordinates))return!1;try{for(var l=eo(e.coordinates),s=l.next();!s.done;s=l.next()){var c=s.value;try{for(var u=(r=void 0,eo(c)),d=u.next();!d.done;d=u.next()){var f=d.value;try{for(var p=(i=void 0,eo(f)),h=p.next();!h.done;h=p.next()){var g=h.value;if(!Ur(g[0])||!Ur(g[1]))return!1}}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}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}return!0},Object.defineProperty(e.prototype,"_internalType",{get:function(){return Rr},enumerable:!0,configurable:!0}),e}(),no=function(){function e(e){var t=(void 0===e?{}:e).offset,n=void 0===t?0:t;this.offset=n}return Object.defineProperty(e.prototype,"_internalType",{get:function(){return Fr},enumerable:!0,configurable:!0}),e.prototype.parse=function(){return{$date:{offset:this.offset}}},e}();function ro(e){return new no(e)}var oo,io=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},ao=function(){function e(){}return e.formatResDocumentData=function(t){return t.map((function(t){return e.formatField(t)}))},e.formatField=function(t){var n=Object.keys(t),r={};return Array.isArray(t)&&(r=[]),n.forEach((function(n){var o,i=t[n];switch(e.whichType(i)){case hr:o=new so(i.coordinates[0],i.coordinates[1]);break;case gr:o=new Gr(i.coordinates.map((function(e){return new so(e[0],e[1])})));break;case mr:o=new Kr(i.coordinates.map((function(e){return new Gr(e.map((function(e){var t=io(e,2),n=t[0],r=t[1];return new so(n,r)})))})));break;case vr:o=new Zr(i.coordinates.map((function(e){return new so(e[0],e[1])})));break;case yr:o=new Qr(i.coordinates.map((function(e){return new Gr(e.map((function(e){var t=io(e,2),n=t[0],r=t[1];return new so(n,r)})))})));break;case br:o=new to(i.coordinates.map((function(e){return new Kr(e.map((function(e){return new Gr(e.map((function(e){var t=io(e,2),n=t[0],r=t[1];return new so(n,r)})))})))})));break;case xr:o=new Date(1e3*i.$timestamp);break;case pr:case"Array":o=e.formatField(i);break;case wr:o=new Date(i.$date);break;default:o=i}Array.isArray(r)?r.push(o):r[n]=o})),r},e.whichType=function(e){var t=Object.prototype.toString.call(e).slice(8,-1);if(t===xr)return"BsonDate";if(t===pr){if(e instanceof so)return hr;if(e instanceof Date)return xr;if(e instanceof no)return wr;e.$timestamp?t=xr:e.$date?t=wr:so.validate(e)?t=hr:Gr.validate(e)?t=gr:Kr.validate(e)?t=mr:Zr.validate(e)?t=vr:Qr.validate(e)?t=yr:to.validate(e)&&(t=br)}return t},e.generateDocId=function(){for(var e="",t=0;t<24;t++)e+="ABCDEFabcdef0123456789".charAt(Math.floor(22*Math.random()));return e},e}(),lo=function(){function e(){}return e.isGeopoint=function(e,t){if("Number"!==ao.whichType(t))throw new Error("Geo Point must be number type");var n=Math.abs(t);if("latitude"===e&&n>90)throw new Error("latitude should be a number ranges from -90 to 90");if("longitude"===e&&n>180)throw new Error("longitude should be a number ranges from -180 to 180");return!0},e.isInteger=function(e,t){if(!Number.isInteger(t))throw new Error(e+nr.IntergerError);return!0},e.isFieldOrder=function(e){if(-1===Sr.indexOf(e))throw new Error(nr.DirectionError);return!0},e.isFieldPath=function(e){if(!/^[a-zA-Z0-9-_\.]/.test(e))throw new Error;return!0},e.isOperator=function(e){if(-1===Er.indexOf(e))throw new Error(nr.OpStrError);return!0},e.isCollName=function(e){if(!/^[a-zA-Z0-9]([a-zA-Z0-9-_]){1,32}$/.test(e))throw new Error(nr.CollNameError);return!0},e.isDocID=function(e){if(!/^([a-fA-F0-9]){24}$/.test(e))throw new Error(nr.DocIDError);return!0},e}(),so=function(){function e(e,t){lo.isGeopoint("longitude",e),lo.isGeopoint("latitude",t),this.longitude=e,this.latitude=t}return e.prototype.parse=function(e){var t;return(t={})[e]={type:"Point",coordinates:[this.longitude,this.latitude]},t},e.prototype.toJSON=function(){return{type:"Point",coordinates:[this.longitude,this.latitude]}},e.prototype.toReadableString=function(){return"["+this.longitude+","+this.latitude+"]"},e.validate=function(e){return"Point"===e.type&&Wr(e.coordinates)&&lo.isGeopoint("longitude",e.coordinates[0])&&lo.isGeopoint("latitude",e.coordinates[1])},Object.defineProperty(e.prototype,"_internalType",{get:function(){return Nr},enumerable:!0,configurable:!0}),e}(),co=function(){var e;if(!Promise){(e=function(){}).promise={};var t=function(){throw new Error('Your Node runtime does support ES6 Promises. Set "global.Promise" to your preferred implementation of promises.')};return Object.defineProperty(e.promise,"then",{get:t}),Object.defineProperty(e.promise,"catch",{get:t}),e}var n=new Promise((function(t,n){e=function(e,r){return e?n(e):t(r)}}));return e.promise=n,e};!function(e){e.SET="set",e.REMOVE="remove",e.INC="inc",e.MUL="mul",e.PUSH="push",e.PULL="pull",e.PULL_ALL="pullAll",e.POP="pop",e.SHIFT="shift",e.UNSHIFT="unshift",e.ADD_TO_SET="addToSet",e.BIT="bit",e.RENAME="rename",e.MAX="max",e.MIN="min"}(oo||(oo={}));var uo,fo=function(){function e(e,t,n){this._internalType=_r,Object.defineProperties(this,{_internalType:{enumerable:!1,configurable:!1}}),this.operator=e,this.operands=t,this.fieldName=n||$r}return e.prototype._setFieldName=function(t){return new e(this.operator,this.operands,t)},e}();function po(e){return e&&e instanceof fo&&e._internalType===_r}!function(e){e.AND="and",e.OR="or",e.NOT="not",e.NOR="nor"}(uo||(uo={}));var ho=function(){function e(e,t,n){if(this._internalType=Ar,Object.defineProperties(this,{_internalType:{enumerable:!1,configurable:!1}}),this.operator=e,this.operands=t,this.fieldName=n||$r,this.fieldName!==$r)if(Array.isArray(t)){t=t.slice(),this.operands=t;for(var r=0,o=t.length;r0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},Oo=function(){for(var e=[],t=0;t-1)throw new Error("Cannot convert circular structure to JSON");return Io(e,Oo(t,[e]))}));if(Hr(e)){var n=Co({},e);for(var r in n){if(t.indexOf(n[r])>-1)throw new Error("Cannot convert circular structure to JSON");n[r]=Io(n[r],Oo(t,[n[r]]))}return n}return e}switch(e._internalType){case Nr:return e.toJSON();case Fr:case Br:return e.parse();default:return e.toJSON?e.toJSON():e}}var $o=function(){return $o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},Po=function(){for(var e=[],t=0;t-1)throw new Error("Cannot convert circular structure to JSON");var l=Ao(a,t,Po(n,[i]),Po(r,[a]));o[i]=l;var s=!1;for(var c in l)/^\$/.test(c)?s=!0:(o[i+"."+c]=l[c],delete o[i][c]);s||delete o[i]}}return o}function No(e){return Ao(e,Ro,[],[e])}function To(e,t,n){for(var r in t[n]||delete e[n],t)e[r]?Wr(e[r])?e[r].push(t[r]):Hr(e[r])?Hr(t[r])?Object.assign(e[r],t[r]):(console.warn("unmergable condition, query is object but condition is "+zr(t)+", can only overwrite",t,n),e[r]=t[r]):(console.warn("to-merge query is of type "+zr(e)+", can only overwrite",e,t,n),e[r]=t[r]):e[r]=t[r]}function Ro(e){return qr(e)||Vr(e)||Xr(e)}function Lo(e){return Mo(e)}var Do=function(){function e(){}return e.encode=function(t){return(new e).encodeUpdate(t)},e.prototype.encodeUpdate=function(e){return po(e)?this.encodeUpdateCommand(e):"object"===zr(e)?this.encodeUpdateObject(e):e},e.prototype.encodeUpdateCommand=function(e){if(e.fieldName===$r)throw new Error("Cannot encode a comparison command with unset field name");switch(e.operator){case oo.PUSH:case oo.PULL:case oo.PULL_ALL:case oo.POP:case oo.SHIFT:case oo.UNSHIFT:case oo.ADD_TO_SET:return this.encodeArrayUpdateCommand(e);default:return this.encodeFieldUpdateCommand(e)}},e.prototype.encodeFieldUpdateCommand=function(e){var t,n,r,o,i=Eo(e.operator);return e.operator===oo.REMOVE?((t={})[i]=((n={})[e.fieldName]="",n),t):((r={})[i]=((o={})[e.fieldName]=e.operands[0],o),r)},e.prototype.encodeArrayUpdateCommand=function(e){var t,n,r,o,i,a,l,s,c,u,d=Eo(e.operator);switch(e.operator){case oo.PUSH:var f=void 0;return f=Wr(e.operands)?{$each:e.operands.map(Lo)}:e.operands,(t={})[d]=((n={})[e.fieldName]=f,n),t;case oo.UNSHIFT:return f={$each:e.operands.map(Lo),$position:0},(r={})[d]=((o={})[e.fieldName]=f,o),r;case oo.POP:return(i={})[d]=((a={})[e.fieldName]=1,a),i;case oo.SHIFT:return(l={})[d]=((s={})[e.fieldName]=-1,s),l;default:return(c={})[d]=((u={})[e.fieldName]=Lo(e.operands),u),c}},e.prototype.encodeUpdateObject=function(e){var t=No(e);for(var n in t)if(!/^\$/.test(n)){var r=t[n];if(po(r))t[n]=r._setFieldName(n),To(t,this.encodeUpdateCommand(t[n]),n);else{t[n]=r=Lo(r);var o=new fo(oo.SET,[r],n);To(t,this.encodeUpdateCommand(o),n)}}return t},e}(),jo={};function Fo(e){if(!za.wsClientClass)throw new Error("to use realtime you must import realtime module first");var t=e.config.env;return jo[t]||(jo[t]=new za.wsClientClass({context:{appConfig:{docSizeLimit:1e3,realtimePingInterval:1e4,realtimePongWaitTimeout:5e3,request:new za.reqClass(e.config)}}})),jo[t]}for(var Bo=function(){return Bo=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&(n.order=t),this._queryOptions.offset&&(n.offset=this._queryOptions.offset),this._queryOptions.limit?n.limit=this._queryOptions.limit<1e3?this._queryOptions.limit:1e3:n.limit=100,this._queryOptions.projection&&(n.projection=this._queryOptions.projection),this._request.send("database.queryDocument",n).then((function(t){if(t.code)e(0,t);else{var n={data:ao.formatResDocumentData(t.data.list),requestId:t.requestId};t.TotalCount&&(n.total=t.TotalCount),t.Limit&&(n.limit=t.Limit),t.Offset&&(n.offset=t.Offset),e(0,n)}})).catch((function(t){e(t)})),e.promise},e.prototype.count=function(e){e=e||co();var t={collectionName:this._coll,queryType:fr.WHERE};return this._fieldFilters&&(t.query=this._fieldFilters),this._request.send("database.countDocument",t).then((function(t){t.code?e(0,t):e(0,{requestId:t.requestId,total:t.data.total})})).catch((function(t){e(t)})),e.promise},e.prototype.where=function(t){if("Object"!==Object.prototype.toString.call(t).slice(8,-1))throw Error(nr.QueryParamTypeError);var n=Object.keys(t),r=n.some((function(e){return void 0!==t[e]}));if(n.length&&!r)throw Error(nr.QueryParamValueError);return new e(this._db,this._coll,Ho.encode(t),this._fieldOrders,this._queryOptions)},e.prototype.orderBy=function(t,n){lo.isFieldPath(t),lo.isFieldOrder(n);var r={field:t,direction:n},o=this._fieldOrders.concat(r);return new e(this._db,this._coll,this._fieldFilters,o,this._queryOptions)},e.prototype.limit=function(t){lo.isInteger("limit",t);var n=Wo({},this._queryOptions);return n.limit=t,new e(this._db,this._coll,this._fieldFilters,this._fieldOrders,n)},e.prototype.skip=function(t){lo.isInteger("offset",t);var n=Wo({},this._queryOptions);return n.offset=t,new e(this._db,this._coll,this._fieldFilters,this._fieldOrders,n)},e.prototype.update=function(e,t){if(t=t||co(),!e||"object"!=typeof e)return Promise.resolve({code:"INVALID_PARAM",message:"参数必需是非空对象"});if(e.hasOwnProperty("_id"))return Promise.resolve({code:"INVALID_PARAM",message:"不能更新_id的值"});var n={collectionName:this._coll,query:this._fieldFilters,queryType:fr.WHERE,multi:!0,merge:!0,upsert:!1,data:Do.encode(e)};return this._request.send("database.updateDocument",n).then((function(e){e.code?t(0,e):t(0,{requestId:e.requestId,updated:e.data.updated,upsertId:e.data.upsert_id})})).catch((function(e){t(e)})),t.promise},e.prototype.field=function(t){for(var n in t)t[n]?"object"!=typeof t[n]&&(t[n]=1):t[n]=0;var r=Wo({},this._queryOptions);return r.projection=t,new e(this._db,this._coll,this._fieldFilters,this._fieldOrders,r)},e.prototype.remove=function(e){e=e||co(),Object.keys(this._queryOptions).length>0&&console.warn("`offset`, `limit` and `projection` are not supported in remove() operation"),this._fieldOrders.length>0&&console.warn("`orderBy` is not supported in remove() operation");var t={collectionName:this._coll,query:Ho.encode(this._fieldFilters),queryType:fr.WHERE,multi:!0};return this._request.send("database.deleteDocument",t).then((function(t){t.code?e(0,t):e(0,{requestId:t.requestId,deleted:t.data.deleted})})).catch((function(t){e(t)})),e.promise},e}(),Xo=[],qo=[],Go="undefined"!=typeof Uint8Array?Uint8Array:Array,Yo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ko=0;Ko<64;++Ko)Xo[Ko]=Yo[Ko],qo[Yo.charCodeAt(Ko)]=Ko;function Zo(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function Jo(e,t,n){for(var r,o,i=[],a=t;a>18&63]+Xo[o>>12&63]+Xo[o>>6&63]+Xo[63&o]);return i.join("")}qo["-".charCodeAt(0)]=62,qo["_".charCodeAt(0)]=63;var Qo,ei,ti=function(e){var t,n,r=Zo(e),o=r[0],i=r[1],a=new Go(function(e,t,n){return 3*(t+n)/4-n}(0,o,i)),l=0,s=i>0?o-4:o;for(n=0;n>16&255,a[l++]=t>>8&255,a[l++]=255&t;return 2===i&&(t=qo[e.charCodeAt(n)]<<2|qo[e.charCodeAt(n+1)]>>4,a[l++]=255&t),1===i&&(t=qo[e.charCodeAt(n)]<<10|qo[e.charCodeAt(n+1)]<<4|qo[e.charCodeAt(n+2)]>>2,a[l++]=t>>8&255,a[l++]=255&t),a},ni=function(e){for(var t,n=e.length,r=n%3,o=[],i=16383,a=0,l=n-r;al?l:a+i));return 1===r?(t=e[n-1],o.push(Xo[t>>2]+Xo[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],o.push(Xo[t>>10]+Xo[t>>4&63]+Xo[t<<2&63]+"=")),o.join("")},ri=function(e,t,n,r,o){var i,a,l=8*o-r-1,s=(1<>1,u=-7,d=n?o-1:0,f=n?-1:1,p=e[t+d];for(d+=f,i=p&(1<<-u)-1,p>>=-u,u+=l;u>0;i=256*i+e[t+d],d+=f,u-=8);for(a=i&(1<<-u)-1,i>>=-u,u+=r;u>0;a=256*a+e[t+d],d+=f,u-=8);if(0===i)i=1-c;else{if(i===s)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),i-=c}return(p?-1:1)*a*Math.pow(2,i-r)},oi=function(e,t,n,r,o,i){var a,l,s,c=8*i-o-1,u=(1<>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-1,h=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(l=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-a))<1&&(a--,s*=2),(t+=a+d>=1?f/s:f*Math.pow(2,1-d))*s>=2&&(a++,s/=2),a+d>=u?(l=0,a=u):a+d>=1?(l=(t*s-1)*Math.pow(2,o),a+=d):(l=t*Math.pow(2,d-1)*Math.pow(2,o),a=0));o>=8;e[n+p]=255&l,p+=h,l/=256,o-=8);for(a=a<0;e[n+p]=255&a,p+=h,a/=256,c-=8);e[n+p-h]|=128*g},ii=(Qo=function(e,t){var n="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=i,t.SlowBuffer=function(e){return+e!=e&&(e=0),i.alloc(+e)},t.INSPECT_MAX_BYTES=50;var r=2147483647;function o(e){if(e>r)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,i.prototype),t}function i(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return s(e)}return a(e,t,n)}function a(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!i.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var n=0|f(e,t),r=o(n),a=r.write(e,t);return a!==n&&(r=r.slice(0,a)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(j(e,Uint8Array)){var t=new Uint8Array(e);return u(t.buffer,t.byteOffset,t.byteLength)}return c(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(e));if(j(e,ArrayBuffer)||e&&j(e.buffer,ArrayBuffer))return u(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(j(e,SharedArrayBuffer)||e&&j(e.buffer,SharedArrayBuffer)))return u(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return i.from(r,t,n);var a=function(e){if(i.isBuffer(e)){var t=0|d(e.length),n=o(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||F(e.length)?o(0):c(e):"Buffer"===e.type&&Array.isArray(e.data)?c(e.data):void 0}(e);if(a)return a;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return i.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(e))}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function s(e){return l(e),o(e<0?0:0|d(e))}function c(e){for(var t=e.length<0?0:0|d(e.length),n=o(t),r=0;r=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return 0|e}function f(e,t){if(i.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||j(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+babelHelpers.typeof(e));var n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;for(var o=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return R(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return L(e).length;default:if(o)return r?-1:R(e).length;t=(""+t).toLowerCase(),o=!0}}function p(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return M(this,t,n);case"utf8":case"utf-8":return E(this,t,n);case"ascii":return k(this,t,n);case"latin1":case"binary":return O(this,t,n);case"base64":return S(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function h(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function g(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),F(n=+n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=i.from(t,r)),i.isBuffer(t))return 0===t.length?-1:m(e,t,n,r,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):m(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function m(e,t,n,r,o){var i,a=1,l=e.length,s=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,l/=2,s/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var u=-1;for(i=n;il&&(n=l-s),i=n;i>=0;i--){for(var d=!0,f=0;fo&&(r=o):r=o;var i=t.length;r>i/2&&(r=i/2);for(var a=0;a>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function S(e,t,n){return 0===t&&n===e.length?ni(e):ni(e.slice(t,n))}function E(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o239?4:c>223?3:c>191?2:1;if(o+d<=n)switch(d){case 1:c<128&&(u=c);break;case 2:128==(192&(i=e[o+1]))&&(s=(31&c)<<6|63&i)>127&&(u=s);break;case 3:i=e[o+1],a=e[o+2],128==(192&i)&&128==(192&a)&&(s=(15&c)<<12|(63&i)<<6|63&a)>2047&&(s<55296||s>57343)&&(u=s);break;case 4:i=e[o+1],a=e[o+2],l=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&l)&&(s=(15&c)<<18|(63&i)<<12|(63&a)<<6|63&l)>65535&&s<1114112&&(u=s)}null===u?(u=65533,d=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),o+=d}return function(e){var t=e.length;if(t<=C)return String.fromCharCode.apply(String,e);for(var n="",r=0;rr.length?i.from(a).copy(r,o):Uint8Array.prototype.set.call(r,a,o);else{if(!i.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,o)}o+=a.length}return r},i.byteLength=f,i.prototype._isBuffer=!0,i.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;tn&&(e+=" ... "),""},n&&(i.prototype[n]=i.prototype.inspect),i.prototype.compare=function(e,t,n,r,o){if(j(e,Uint8Array)&&(e=i.from(e,e.offset,e.byteLength)),!i.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+babelHelpers.typeof(e));if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var a=(o>>>=0)-(r>>>=0),l=(n>>>=0)-(t>>>=0),s=Math.min(a,l),c=this.slice(r,o),u=e.slice(t,n),d=0;d>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return v(this,e,t,n);case"utf8":case"utf-8":return y(this,e,t,n);case"ascii":case"latin1":case"binary":return b(this,e,t,n);case"base64":return x(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var C=4096;function k(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;or)&&(n=r);for(var o="",i=t;in)throw new RangeError("Trying to access beyond buffer length")}function _(e,t,n,r,o,a){if(!i.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function P(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function A(e,t,n,r,o){return t=+t,n>>>=0,o||P(e,0,n,4),oi(e,t,n,r,23,4),n+4}function N(e,t,n,r,o){return t=+t,n>>>=0,o||P(e,0,n,8),oi(e,t,n,r,52,8),n+8}i.prototype.slice=function(e,t){var n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t>>=0,t>>>=0,n||$(e,t,this.length);for(var r=this[e],o=1,i=0;++i>>=0,t>>>=0,n||$(e,t,this.length);for(var r=this[e+--t],o=1;t>0&&(o*=256);)r+=this[e+--t]*o;return r},i.prototype.readUint8=i.prototype.readUInt8=function(e,t){return e>>>=0,t||$(e,1,this.length),this[e]},i.prototype.readUint16LE=i.prototype.readUInt16LE=function(e,t){return e>>>=0,t||$(e,2,this.length),this[e]|this[e+1]<<8},i.prototype.readUint16BE=i.prototype.readUInt16BE=function(e,t){return e>>>=0,t||$(e,2,this.length),this[e]<<8|this[e+1]},i.prototype.readUint32LE=i.prototype.readUInt32LE=function(e,t){return e>>>=0,t||$(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},i.prototype.readUint32BE=i.prototype.readUInt32BE=function(e,t){return e>>>=0,t||$(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},i.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||$(e,t,this.length);for(var r=this[e],o=1,i=0;++i=(o*=128)&&(r-=Math.pow(2,8*t)),r},i.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||$(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},i.prototype.readInt8=function(e,t){return e>>>=0,t||$(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},i.prototype.readInt16LE=function(e,t){e>>>=0,t||$(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},i.prototype.readInt16BE=function(e,t){e>>>=0,t||$(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},i.prototype.readInt32LE=function(e,t){return e>>>=0,t||$(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},i.prototype.readInt32BE=function(e,t){return e>>>=0,t||$(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},i.prototype.readFloatLE=function(e,t){return e>>>=0,t||$(e,4,this.length),ri(this,e,!0,23,4)},i.prototype.readFloatBE=function(e,t){return e>>>=0,t||$(e,4,this.length),ri(this,e,!1,23,4)},i.prototype.readDoubleLE=function(e,t){return e>>>=0,t||$(e,8,this.length),ri(this,e,!0,52,8)},i.prototype.readDoubleBE=function(e,t){return e>>>=0,t||$(e,8,this.length),ri(this,e,!1,52,8)},i.prototype.writeUintLE=i.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||_(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i>>=0,n>>>=0,r||_(this,e,t,n,Math.pow(2,8*n)-1,0);var o=n-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+n},i.prototype.writeUint8=i.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||_(this,e,t,1,255,0),this[t]=255&e,t+1},i.prototype.writeUint16LE=i.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||_(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},i.prototype.writeUint16BE=i.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||_(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},i.prototype.writeUint32LE=i.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||_(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},i.prototype.writeUint32BE=i.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||_(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},i.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var o=Math.pow(2,8*n-1);_(this,e,t,n,o-1,-o)}var i=0,a=1,l=0;for(this[t]=255&e;++i>0)-l&255;return t+n},i.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var o=Math.pow(2,8*n-1);_(this,e,t,n,o-1,-o)}var i=n-1,a=1,l=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===l&&0!==this[t+i+1]&&(l=1),this[t+i]=(e/a>>0)-l&255;return t+n},i.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||_(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},i.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||_(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},i.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||_(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},i.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||_(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},i.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||_(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},i.prototype.writeFloatLE=function(e,t,n){return A(this,e,t,!0,n)},i.prototype.writeFloatBE=function(e,t,n){return A(this,e,t,!1,n)},i.prototype.writeDoubleLE=function(e,t,n){return N(this,e,t,!0,n)},i.prototype.writeDoubleBE=function(e,t,n){return N(this,e,t,!1,n)},i.prototype.copy=function(e,t,n,r){if(!i.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(a=t;a55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function L(e){return ti(function(e){if((e=(e=e.split("=")[0]).trim().replace(T,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function D(e,t,n,r){for(var o=0;o=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function j(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function F(e){return e!=e}var B=function(){for(var e="0123456789abcdef",t=new Array(256),n=0;n<16;++n)for(var r=16*n,o=0;o<16;++o)t[r+o]=e[n]+e[o];return t}()},Qo(ei={exports:{}},ei.exports),ei.exports),ai=ii.Buffer;ii.SlowBuffer,ii.INSPECT_MAX_BYTES,ii.kMaxLength;var li=function(e,t){return li=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])},li(e,t)};function si(e,t){function n(){this.constructor=e}li(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var ci=function(e){function t(n){var r=e.call(this,n)||this;return Object.setPrototypeOf(r,t.prototype),r}return si(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"BSONError"},enumerable:!1,configurable:!0}),t}(Error),ui=function(e){function t(n){var r=e.call(this,n)||this;return Object.setPrototypeOf(r,t.prototype),r}return si(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"BSONTypeError"},enumerable:!1,configurable:!0}),t}(TypeError);function di(e){return e&&e.Math==Math&&e}function fi(){return di("object"==typeof globalThis&&globalThis)||di("object"==typeof window&&window)||di("object"==typeof self&&self)||di("object"==typeof n.g&&n.g)||Function("return this")()}var pi=function(e){var t,n="object"==typeof(t=fi()).navigator&&"ReactNative"===t.navigator.product?"BSON: For React Native please polyfill crypto.getRandomValues, e.g. using: https://www.npmjs.com/package/react-native-get-random-values.":"BSON: No cryptographic implementation for random bytes present, falling back to a less secure implementation.";console.warn(n);for(var r=ai.alloc(e),o=0;o");this.sub_type=null!=n?n:e.BSON_BINARY_SUBTYPE_DEFAULT,null==t?(this.buffer=ai.alloc(e.BUFFER_SIZE),this.position=0):("string"==typeof t?this.buffer=ai.from(t,"binary"):Array.isArray(t)?this.buffer=ai.from(t):this.buffer=yi(t),this.position=this.buffer.byteLength)}return e.prototype.put=function(t){if("string"==typeof t&&1!==t.length)throw new ui("only accepts single character String");if("number"!=typeof t&&1!==t.length)throw new ui("only accepts single character Uint8Array or Array");var n;if((n="string"==typeof t?t.charCodeAt(0):"number"==typeof t?t:t[0])<0||n>255)throw new ui("only accepts number in a valid unsigned byte range 0-255");if(this.buffer.length>this.position)this.buffer[this.position++]=n;else{var r=ai.alloc(e.BUFFER_SIZE+this.buffer.length);this.buffer.copy(r,0,0,this.buffer.length),this.buffer=r,this.buffer[this.position++]=n}},e.prototype.write=function(e,t){if(t="number"==typeof t?t:this.position,this.buffer.lengththis.position?t+e.length:this.position):"string"==typeof e&&(this.buffer.write(e,t,e.length,"binary"),this.position=t+e.length>this.position?t+e.length:this.position)},e.prototype.read=function(e,t){return t=t&&t>0?t:this.position,this.buffer.slice(e,e+t)},e.prototype.value=function(e){return(e=!!e)&&this.buffer.length===this.position?this.buffer:e?this.buffer.slice(0,this.position):this.buffer.toString("binary",0,this.position)},e.prototype.length=function(){return this.position},e.prototype.toJSON=function(){return this.buffer.toString("base64")},e.prototype.toString=function(e){return this.buffer.toString(e)},e.prototype.toExtendedJSON=function(e){e=e||{};var t=this.buffer.toString("base64"),n=Number(this.sub_type).toString(16);return e.legacy?{$binary:t,$type:1===n.length?"0"+n:n}:{$binary:{base64:t,subType:1===n.length?"0"+n:n}}},e.prototype.toUUID=function(){if(this.sub_type===e.SUBTYPE_UUID)return new Oi(this.buffer.slice(0,this.position));throw new ci('Binary sub_type "'.concat(this.sub_type,'" is not supported for converting to UUID. Only "').concat(e.SUBTYPE_UUID,'" is currently supported.'))},e.fromExtendedJSON=function(t,n){var r,o;if(n=n||{},"$binary"in t?n.legacy&&"string"==typeof t.$binary&&"$type"in t?(o=t.$type?parseInt(t.$type,16):0,r=ai.from(t.$binary,"base64")):"string"!=typeof t.$binary&&(o=t.$binary.subType?parseInt(t.$binary.subType,16):0,r=ai.from(t.$binary.base64,"base64")):"$uuid"in t&&(o=4,r=wi(t.$uuid)),!r)throw new ui("Unexpected Binary Extended JSON format ".concat(JSON.stringify(t)));return 4===o?new Oi(r):new e(r,o)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var e=this.value(!0);return'new Binary(Buffer.from("'.concat(e.toString("hex"),'", "hex"), ').concat(this.sub_type,")")},e.BSON_BINARY_SUBTYPE_DEFAULT=0,e.BUFFER_SIZE=256,e.SUBTYPE_DEFAULT=0,e.SUBTYPE_FUNCTION=1,e.SUBTYPE_BYTE_ARRAY=2,e.SUBTYPE_UUID_OLD=3,e.SUBTYPE_UUID=4,e.SUBTYPE_MD5=5,e.SUBTYPE_ENCRYPTED=6,e.SUBTYPE_COLUMN=7,e.SUBTYPE_USER_DEFINED=128,e}();Object.defineProperty(ki.prototype,"_bsontype",{value:"Binary"});var Oi=function(e){function t(n){var r,o,i=this;if(null==n)r=t.generate();else if(n instanceof t)r=ai.from(n.buffer),o=n.__id;else if(ArrayBuffer.isView(n)&&16===n.byteLength)r=yi(n);else{if("string"!=typeof n)throw new ui("Argument passed in UUID constructor must be a UUID, a 16 byte Buffer or a 32/36 character hex string (dashes excluded/included, format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).");r=wi(n)}return(i=e.call(this,r,4)||this).__id=o,i}return si(t,e),Object.defineProperty(t.prototype,"id",{get:function(){return this.buffer},set:function(e){this.buffer=e,t.cacheHexString&&(this.__id=Si(e))},enumerable:!1,configurable:!0}),t.prototype.toHexString=function(e){if(void 0===e&&(e=!0),t.cacheHexString&&this.__id)return this.__id;var n=Si(this.id,e);return t.cacheHexString&&(this.__id=n),n},t.prototype.toString=function(e){return e?this.id.toString(e):this.toHexString()},t.prototype.toJSON=function(){return this.toHexString()},t.prototype.equals=function(e){if(!e)return!1;if(e instanceof t)return e.id.equals(this.id);try{return new t(e).id.equals(this.id)}catch(e){return!1}},t.prototype.toBinary=function(){return new ki(this.id,ki.SUBTYPE_UUID)},t.generate=function(){var e=hi(16);return e[6]=15&e[6]|64,e[8]=63&e[8]|128,ai.from(e)},t.isValid=function(e){return!!e&&(e instanceof t||("string"==typeof e?xi(e):!!gi(e)&&16===e.length&&64==(240&e[6])&&128==(128&e[8])))},t.createFromHexString=function(e){return new t(wi(e))},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new UUID("'.concat(this.toHexString(),'")')},t}(ki),Mi=function(){function e(t,n){if(!(this instanceof e))return new e(t,n);this.code=t,this.scope=n}return e.prototype.toJSON=function(){return{code:this.code,scope:this.scope}},e.prototype.toExtendedJSON=function(){return this.scope?{$code:this.code,$scope:this.scope}:{$code:this.code}},e.fromExtendedJSON=function(t){return new e(t.$code,t.$scope)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var e=this.toJSON();return'new Code("'.concat(String(e.code),'"').concat(e.scope?", ".concat(JSON.stringify(e.scope)):"",")")},e}();Object.defineProperty(Mi.prototype,"_bsontype",{value:"Code"});var Ii=function(){function e(t,n,r,o){if(!(this instanceof e))return new e(t,n,r,o);var i=t.split(".");2===i.length&&(r=i.shift(),t=i.shift()),this.collection=t,this.oid=n,this.db=r,this.fields=o||{}}return Object.defineProperty(e.prototype,"namespace",{get:function(){return this.collection},set:function(e){this.collection=e},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){var e=Object.assign({$ref:this.collection,$id:this.oid},this.fields);return null!=this.db&&(e.$db=this.db),e},e.prototype.toExtendedJSON=function(e){e=e||{};var t={$ref:this.collection,$id:this.oid};return e.legacy?t:(this.db&&(t.$db=this.db),t=Object.assign(t,this.fields))},e.fromExtendedJSON=function(t){var n=Object.assign({},t);return delete n.$ref,delete n.$id,delete n.$db,new e(t.$ref,t.$id,t.$db,n)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var e=void 0===this.oid||void 0===this.oid.toString?this.oid:this.oid.toString();return'new DBRef("'.concat(this.namespace,'", new ObjectId("').concat(String(e),'")').concat(this.db?', "'.concat(this.db,'"'):"",")")},e}();Object.defineProperty(Ii.prototype,"_bsontype",{value:"DBRef"});var $i=void 0;try{$i=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(tr){}var _i=4294967296,Pi=0x10000000000000000,Ai=Pi/2,Ni={},Ti={},Ri=function(){function e(t,n,r){if(void 0===t&&(t=0),!(this instanceof e))return new e(t,n,r);"bigint"==typeof t?Object.assign(this,e.fromBigInt(t,!!n)):"string"==typeof t?Object.assign(this,e.fromString(t,!!n)):(this.low=0|t,this.high=0|n,this.unsigned=!!r),Object.defineProperty(this,"__isLong__",{value:!0,configurable:!1,writable:!1,enumerable:!1})}return e.fromBits=function(t,n,r){return new e(t,n,r)},e.fromInt=function(t,n){var r,o,i;return n?(i=0<=(t>>>=0)&&t<256)&&(o=Ti[t])?o:(r=e.fromBits(t,(0|t)<0?-1:0,!0),i&&(Ti[t]=r),r):(i=-128<=(t|=0)&&t<128)&&(o=Ni[t])?o:(r=e.fromBits(t,t<0?-1:0,!1),i&&(Ni[t]=r),r)},e.fromNumber=function(t,n){if(isNaN(t))return n?e.UZERO:e.ZERO;if(n){if(t<0)return e.UZERO;if(t>=Pi)return e.MAX_UNSIGNED_VALUE}else{if(t<=-Ai)return e.MIN_VALUE;if(t+1>=Ai)return e.MAX_VALUE}return t<0?e.fromNumber(-t,n).neg():e.fromBits(t%_i|0,t/_i|0,n)},e.fromBigInt=function(t,n){return e.fromString(t.toString(),n)},e.fromString=function(t,n,r){if(0===t.length)throw Error("empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return e.ZERO;if("number"==typeof n?(r=n,n=!1):n=!!n,(r=r||10)<2||360)throw Error("interior hyphen");if(0===o)return e.fromString(t.substring(1),n,r).neg();for(var i=e.fromNumber(Math.pow(r,8)),a=e.ZERO,l=0;l>>16,r=65535&this.high,o=this.low>>>16,i=65535&this.low,a=t.high>>>16,l=65535&t.high,s=t.low>>>16,c=0,u=0,d=0,f=0;return d+=(f+=i+(65535&t.low))>>>16,f&=65535,u+=(d+=o+s)>>>16,d&=65535,c+=(u+=r+l)>>>16,u&=65535,c+=n+a,c&=65535,e.fromBits(d<<16|f,c<<16|u,this.unsigned)},e.prototype.and=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low&t.low,this.high&t.high,this.unsigned)},e.prototype.compare=function(t){if(e.isLong(t)||(t=e.fromValue(t)),this.eq(t))return 0;var n=this.isNegative(),r=t.isNegative();return n&&!r?-1:!n&&r?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},e.prototype.comp=function(e){return this.compare(e)},e.prototype.divide=function(t){if(e.isLong(t)||(t=e.fromValue(t)),t.isZero())throw Error("division by zero");if($i){if(!this.unsigned&&-2147483648===this.high&&-1===t.low&&-1===t.high)return this;var n=(this.unsigned?$i.div_u:$i.div_s)(this.low,this.high,t.low,t.high);return e.fromBits(n,$i.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?e.UZERO:e.ZERO;var r,o,i;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return e.UZERO;if(t.gt(this.shru(1)))return e.UONE;i=e.UZERO}else{if(this.eq(e.MIN_VALUE))return t.eq(e.ONE)||t.eq(e.NEG_ONE)?e.MIN_VALUE:t.eq(e.MIN_VALUE)?e.ONE:(r=this.shr(1).div(t).shl(1)).eq(e.ZERO)?t.isNegative()?e.ONE:e.NEG_ONE:(o=this.sub(t.mul(r)),i=r.add(o.div(t)));if(t.eq(e.MIN_VALUE))return this.unsigned?e.UZERO:e.ZERO;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();i=e.ZERO}for(o=this;o.gte(t);){r=Math.max(1,Math.floor(o.toNumber()/t.toNumber()));for(var a=Math.ceil(Math.log(r)/Math.LN2),l=a<=48?1:Math.pow(2,a-48),s=e.fromNumber(r),c=s.mul(t);c.isNegative()||c.gt(o);)r-=l,c=(s=e.fromNumber(r,this.unsigned)).mul(t);s.isZero()&&(s=e.ONE),i=i.add(s),o=o.sub(c)}return i},e.prototype.div=function(e){return this.divide(e)},e.prototype.equals=function(t){return e.isLong(t)||(t=e.fromValue(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&this.high===t.high&&this.low===t.low},e.prototype.eq=function(e){return this.equals(e)},e.prototype.getHighBits=function(){return this.high},e.prototype.getHighBitsUnsigned=function(){return this.high>>>0},e.prototype.getLowBits=function(){return this.low},e.prototype.getLowBitsUnsigned=function(){return this.low>>>0},e.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.eq(e.MIN_VALUE)?64:this.neg().getNumBitsAbs();var t,n=0!==this.high?this.high:this.low;for(t=31;t>0&&0==(n&1<0},e.prototype.gt=function(e){return this.greaterThan(e)},e.prototype.greaterThanOrEqual=function(e){return this.comp(e)>=0},e.prototype.gte=function(e){return this.greaterThanOrEqual(e)},e.prototype.ge=function(e){return this.greaterThanOrEqual(e)},e.prototype.isEven=function(){return 0==(1&this.low)},e.prototype.isNegative=function(){return!this.unsigned&&this.high<0},e.prototype.isOdd=function(){return 1==(1&this.low)},e.prototype.isPositive=function(){return this.unsigned||this.high>=0},e.prototype.isZero=function(){return 0===this.high&&0===this.low},e.prototype.lessThan=function(e){return this.comp(e)<0},e.prototype.lt=function(e){return this.lessThan(e)},e.prototype.lessThanOrEqual=function(e){return this.comp(e)<=0},e.prototype.lte=function(e){return this.lessThanOrEqual(e)},e.prototype.modulo=function(t){if(e.isLong(t)||(t=e.fromValue(t)),$i){var n=(this.unsigned?$i.rem_u:$i.rem_s)(this.low,this.high,t.low,t.high);return e.fromBits(n,$i.get_high(),this.unsigned)}return this.sub(this.div(t).mul(t))},e.prototype.mod=function(e){return this.modulo(e)},e.prototype.rem=function(e){return this.modulo(e)},e.prototype.multiply=function(t){if(this.isZero())return e.ZERO;if(e.isLong(t)||(t=e.fromValue(t)),$i){var n=$i.mul(this.low,this.high,t.low,t.high);return e.fromBits(n,$i.get_high(),this.unsigned)}if(t.isZero())return e.ZERO;if(this.eq(e.MIN_VALUE))return t.isOdd()?e.MIN_VALUE:e.ZERO;if(t.eq(e.MIN_VALUE))return this.isOdd()?e.MIN_VALUE:e.ZERO;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(e.TWO_PWR_24)&&t.lt(e.TWO_PWR_24))return e.fromNumber(this.toNumber()*t.toNumber(),this.unsigned);var r=this.high>>>16,o=65535&this.high,i=this.low>>>16,a=65535&this.low,l=t.high>>>16,s=65535&t.high,c=t.low>>>16,u=65535&t.low,d=0,f=0,p=0,h=0;return p+=(h+=a*u)>>>16,h&=65535,f+=(p+=i*u)>>>16,p&=65535,f+=(p+=a*c)>>>16,p&=65535,d+=(f+=o*u)>>>16,f&=65535,d+=(f+=i*c)>>>16,f&=65535,d+=(f+=a*s)>>>16,f&=65535,d+=r*u+o*c+i*s+a*l,d&=65535,e.fromBits(p<<16|h,d<<16|f,this.unsigned)},e.prototype.mul=function(e){return this.multiply(e)},e.prototype.negate=function(){return!this.unsigned&&this.eq(e.MIN_VALUE)?e.MIN_VALUE:this.not().add(e.ONE)},e.prototype.neg=function(){return this.negate()},e.prototype.not=function(){return e.fromBits(~this.low,~this.high,this.unsigned)},e.prototype.notEquals=function(e){return!this.equals(e)},e.prototype.neq=function(e){return this.notEquals(e)},e.prototype.ne=function(e){return this.notEquals(e)},e.prototype.or=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low|t.low,this.high|t.high,this.unsigned)},e.prototype.shiftLeft=function(t){return e.isLong(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?e.fromBits(this.low<>>32-t,this.unsigned):e.fromBits(0,this.low<>>t|this.high<<32-t,this.high>>t,this.unsigned):e.fromBits(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},e.prototype.shr=function(e){return this.shiftRight(e)},e.prototype.shiftRightUnsigned=function(t){if(e.isLong(t)&&(t=t.toInt()),0==(t&=63))return this;var n=this.high;if(t<32){var r=this.low;return e.fromBits(r>>>t|n<<32-t,n>>>t,this.unsigned)}return 32===t?e.fromBits(n,0,this.unsigned):e.fromBits(n>>>t-32,0,this.unsigned)},e.prototype.shr_u=function(e){return this.shiftRightUnsigned(e)},e.prototype.shru=function(e){return this.shiftRightUnsigned(e)},e.prototype.subtract=function(t){return e.isLong(t)||(t=e.fromValue(t)),this.add(t.neg())},e.prototype.sub=function(e){return this.subtract(e)},e.prototype.toInt=function(){return this.unsigned?this.low>>>0:this.low},e.prototype.toNumber=function(){return this.unsigned?(this.high>>>0)*_i+(this.low>>>0):this.high*_i+(this.low>>>0)},e.prototype.toBigInt=function(){return BigInt(this.toString())},e.prototype.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},e.prototype.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},e.prototype.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},e.prototype.toSigned=function(){return this.unsigned?e.fromBits(this.low,this.high,!1):this},e.prototype.toString=function(t){if((t=t||10)<2||36>>0).toString(t);if((a=s).isZero())return c+l;for(;c.length<6;)c="0"+c;l=""+c+l}},e.prototype.toUnsigned=function(){return this.unsigned?this:e.fromBits(this.low,this.high,!0)},e.prototype.xor=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low^t.low,this.high^t.high,this.unsigned)},e.prototype.eqz=function(){return this.isZero()},e.prototype.le=function(e){return this.lessThanOrEqual(e)},e.prototype.toExtendedJSON=function(e){return e&&e.relaxed?this.toNumber():{$numberLong:this.toString()}},e.fromExtendedJSON=function(t,n){var r=e.fromString(t.$numberLong);return n&&n.relaxed?r.toNumber():r},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new Long("'.concat(this.toString(),'"').concat(this.unsigned?", true":"",")")},e.TWO_PWR_24=e.fromInt(16777216),e.MAX_UNSIGNED_VALUE=e.fromBits(-1,-1,!0),e.ZERO=e.fromInt(0),e.UZERO=e.fromInt(0,!0),e.ONE=e.fromInt(1),e.UONE=e.fromInt(1,!0),e.NEG_ONE=e.fromInt(-1),e.MAX_VALUE=e.fromBits(-1,2147483647,!1),e.MIN_VALUE=e.fromBits(0,-2147483648,!1),e}();Object.defineProperty(Ri.prototype,"__isLong__",{value:!0}),Object.defineProperty(Ri.prototype,"_bsontype",{value:"Long"});var Li=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,Di=/^(\+|-)?(Infinity|inf)$/i,ji=/^(\+|-)?NaN$/i,Fi=6111,Bi=-6176,zi=[124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Hi=[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Ui=[120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Wi=/^([-+])?(\d+)?$/;function Vi(e){return!isNaN(parseInt(e,10))}function Xi(e){var t=Ri.fromNumber(1e9),n=Ri.fromNumber(0);if(!(e.parts[0]||e.parts[1]||e.parts[2]||e.parts[3]))return{quotient:e,rem:n};for(var r=0;r<=3;r++)n=(n=n.shiftLeft(32)).add(new Ri(e.parts[r],0)),e.parts[r]=n.div(t).low,n=n.modulo(t);return{quotient:e,rem:n}}function qi(e,t){throw new ui('"'.concat(e,'" is not a valid Decimal128 string - ').concat(t))}var Gi=function(){function e(t){if(!(this instanceof e))return new e(t);if("string"==typeof t)this.bytes=e.fromString(t).bytes;else{if(!gi(t))throw new ui("Decimal128 must take a Buffer or string");if(16!==t.byteLength)throw new ui("Decimal128 must take a Buffer of 16 bytes");this.bytes=t}}return e.fromString=function(t){var n,r=!1,o=!1,i=!1,a=0,l=0,s=0,c=0,u=0,d=[0],f=0,p=0,h=0,g=0,m=0,v=0,y=new Ri(0,0),b=new Ri(0,0),x=0;if(t.length>=7e3)throw new ui(t+" not a valid Decimal128 string");var w=t.match(Li),S=t.match(Di),E=t.match(ji);if(!w&&!S&&!E||0===t.length)throw new ui(t+" not a valid Decimal128 string");if(w){var C=w[2],k=w[4],O=w[5],M=w[6];k&&void 0===M&&qi(t,"missing exponent power"),k&&void 0===C&&qi(t,"missing exponent base"),void 0===k&&(O||M)&&qi(t,"missing e before exponent")}if("+"!==t[x]&&"-"!==t[x]||(r="-"===t[x++]),!Vi(t[x])&&"."!==t[x]){if("i"===t[x]||"I"===t[x])return new e(ai.from(r?Hi:Ui));if("N"===t[x])return new e(ai.from(zi))}for(;Vi(t[x])||"."===t[x];)"."!==t[x]?(f<34&&("0"!==t[x]||i)&&(i||(u=l),i=!0,d[p++]=parseInt(t[x],10),f+=1),i&&(s+=1),o&&(c+=1),l+=1,x+=1):(o&&qi(t,"contains multiple periods"),o=!0,x+=1);if(o&&!l)throw new ui(t+" not a valid Decimal128 string");if("e"===t[x]||"E"===t[x]){var I=t.substr(++x).match(Wi);if(!I||!I[2])return new e(ai.from(zi));m=parseInt(I[0],10),x+=I[0].length}if(t[x])return new e(ai.from(zi));if(h=0,f){if(g=f-1,1!==(a=s))for(;0===d[u+a-1];)a-=1}else h=0,g=0,d[0]=0,s=1,f=1,a=0;for(m<=c&&c-m>16384?m=Bi:m-=c;m>Fi;){if((g+=1)-h>34){if(d.join("").match(/^0+$/)){m=Fi;break}qi(t,"overflow")}m-=1}for(;m=5&&(P=1,5===_))for(P=d[g]%2==1?1:0,v=u+g+2;v<$;v++)if(parseInt(t[v],10)){P=1;break}if(P)for(var A=g;A>=0;A--)if(++d[A]>9&&(d[A]=0,0===A)){if(!(m>>0)<(L=T.high>>>0)||R===L&&N.low>>>0>>0)&&(D.high=D.high.add(Ri.fromNumber(1))),n=m+6176;var j={low:Ri.fromNumber(0),high:Ri.fromNumber(0)};D.high.shiftRightUnsigned(49).and(Ri.fromNumber(1)).equals(Ri.fromNumber(1))?(j.high=j.high.or(Ri.fromNumber(3).shiftLeft(61)),j.high=j.high.or(Ri.fromNumber(n).and(Ri.fromNumber(16383).shiftLeft(47))),j.high=j.high.or(D.high.and(Ri.fromNumber(0x7fffffffffff)))):(j.high=j.high.or(Ri.fromNumber(16383&n).shiftLeft(49)),j.high=j.high.or(D.high.and(Ri.fromNumber(562949953421311)))),j.low=D.low,r&&(j.high=j.high.or(Ri.fromString("9223372036854775808")));var F=ai.alloc(16);return x=0,F[x++]=255&j.low.low,F[x++]=j.low.low>>8&255,F[x++]=j.low.low>>16&255,F[x++]=j.low.low>>24&255,F[x++]=255&j.low.high,F[x++]=j.low.high>>8&255,F[x++]=j.low.high>>16&255,F[x++]=j.low.high>>24&255,F[x++]=255&j.high.low,F[x++]=j.high.low>>8&255,F[x++]=j.high.low>>16&255,F[x++]=j.high.low>>24&255,F[x++]=255&j.high.high,F[x++]=j.high.high>>8&255,F[x++]=j.high.high>>16&255,F[x++]=j.high.high>>24&255,new e(F)},e.prototype.toString=function(){for(var e,t=0,n=new Array(36),r=0;r>26&31;if(m>>3==3){if(30===m)return u.join("")+"Infinity";if(31===m)return"NaN";e=g>>15&16383,o=8+(g>>14&1)}else o=g>>14&7,e=g>>17&16383;var v=e-6176;if(c.parts[0]=(16383&g)+((15&o)<<14),c.parts[1]=h,c.parts[2]=p,c.parts[3]=f,0===c.parts[0]&&0===c.parts[1]&&0===c.parts[2]&&0===c.parts[3])s=!0;else for(a=3;a>=0;a--){var y=0,b=Xi(c);if(c=b.quotient,y=b.rem.low)for(i=8;i>=0;i--)n[9*a+i]=y%10,y=Math.floor(y/10)}if(s)t=1,n[l]=0;else for(t=36;!n[l];)t-=1,l+=1;var x=t-1+v;if(x>=34||x<=-7||v>0){if(t>34)return u.push("".concat(0)),v>0?u.push("E+".concat(v)):v<0&&u.push("E".concat(v)),u.join("");for(u.push("".concat(n[l++])),(t-=1)&&u.push("."),r=0;r0?u.push("+".concat(x)):u.push("".concat(x))}else if(v>=0)for(r=0;r0)for(r=0;r>8&255,r[9]=n>>16&255,r},e.prototype.toString=function(e){return e?this.id.toString(e):this.toHexString()},e.prototype.toJSON=function(){return this.toHexString()},e.prototype.equals=function(t){if(null==t)return!1;if(t instanceof e)return this[ta][11]===t[ta][11]&&this[ta].equals(t[ta]);if("string"==typeof t&&e.isValid(t)&&12===t.length&&gi(this.id))return t===ai.prototype.toString.call(this.id,"latin1");if("string"==typeof t&&e.isValid(t)&&24===t.length)return t.toLowerCase()===this.toHexString();if("string"==typeof t&&e.isValid(t)&&12===t.length)return ai.from(t).equals(this.id);if("object"==typeof t&&"toHexString"in t&&"function"==typeof t.toHexString){var n=t.toHexString(),r=this.toHexString().toLowerCase();return"string"==typeof n&&n.toLowerCase()===r}return!1},e.prototype.getTimestamp=function(){var e=new Date,t=this.id.readUInt32BE(0);return e.setTime(1e3*Math.floor(t)),e},e.createPk=function(){return new e},e.createFromTime=function(t){var n=ai.from([0,0,0,0,0,0,0,0,0,0,0,0]);return n.writeUInt32BE(t,0),new e(n)},e.createFromHexString=function(t){if(void 0===t||null!=t&&24!==t.length)throw new ui("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");return new e(ai.from(t,"hex"))},e.isValid=function(t){if(null==t)return!1;try{return new e(t),!0}catch(e){return!1}},e.prototype.toExtendedJSON=function(){return this.toHexString?{$oid:this.toHexString()}:{$oid:this.toString("hex")}},e.fromExtendedJSON=function(t){return new e(t.$oid)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new ObjectId("'.concat(this.toHexString(),'")')},e.index=Math.floor(16777215*Math.random()),e}();Object.defineProperty(na.prototype,"generate",{value:vi((function(e){return na.generate(e)}),"Please use the static `ObjectId.generate(time)` instead")}),Object.defineProperty(na.prototype,"getInc",{value:vi((function(){return na.getInc()}),"Please use the static `ObjectId.getInc()` instead")}),Object.defineProperty(na.prototype,"get_inc",{value:vi((function(){return na.getInc()}),"Please use the static `ObjectId.getInc()` instead")}),Object.defineProperty(na,"get_inc",{value:vi((function(){return na.getInc()}),"Please use the static `ObjectId.getInc()` instead")}),Object.defineProperty(na.prototype,"_bsontype",{value:"ObjectID"});var ra=function(){function e(t,n){if(!(this instanceof e))return new e(t,n);if(this.pattern=t,this.options=(null!=n?n:"").split("").sort().join(""),-1!==this.pattern.indexOf("\0"))throw new ci("BSON Regex patterns cannot contain null bytes, found: ".concat(JSON.stringify(this.pattern)));if(-1!==this.options.indexOf("\0"))throw new ci("BSON Regex options cannot contain null bytes, found: ".concat(JSON.stringify(this.options)));for(var r=0;r>>0,i:this.low>>>0}}},t.fromExtendedJSON=function(e){return new t(e.$timestamp)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return"new Timestamp({ t: ".concat(this.getHighBits(),", i: ").concat(this.getLowBits()," })")},t.MAX_VALUE=Ri.MAX_UNSIGNED_VALUE,t}(Ri);var aa=2147483647,la=-2147483648,sa=0x8000000000000000,ca=-0x8000000000000000,ua={$oid:na,$binary:ki,$uuid:ki,$symbol:oa,$numberInt:Ki,$numberDecimal:Gi,$numberDouble:Yi,$numberLong:Ri,$minKey:Ji,$maxKey:Zi,$regex:ra,$regularExpression:ra,$timestamp:ia};function da(e,t){if(void 0===t&&(t={}),"number"==typeof e){if(t.relaxed||t.legacy)return e;if(Math.floor(e)===e){if(e>=la&&e<=aa)return new Ki(e);if(e>=ca&&e<=sa)return Ri.fromNumber(e)}return new Yi(e)}if(null==e||"object"!=typeof e)return e;if(e.$undefined)return null;for(var n=Object.keys(e).filter((function(t){return t.startsWith("$")&&null!=e[t]})),r=0;r ")})).join(""),i=r[n],a=" -> "+r.slice(n+1,r.length-1).map((function(e){return"".concat(e," -> ")})).join(""),l=r[r.length-1],s=" ".repeat(o.length+i.length/2),c="-".repeat(a.length+(i.length+l.length)/2-1);throw new ui("Converting circular structure to EJSON:\n"+" ".concat(o).concat(i).concat(a).concat(l,"\n")+" ".concat(s,"\\").concat(c,"/"))}t.seenObjects[t.seenObjects.length-1].obj=e}if(Array.isArray(e))return function(e,t){return e.map((function(e,n){t.seenObjects.push({propertyName:"index ".concat(n),obj:null});try{return pa(e,t)}finally{t.seenObjects.pop()}}))}(e,t);if(void 0===e)return null;if(e instanceof Date||mi(f=e)&&"[object Date]"===Object.prototype.toString.call(f)){var u=e.getTime(),d=u>-1&&u<2534023188e5;return t.legacy?t.relaxed&&d?{$date:e.getTime()}:{$date:fa(e)}:t.relaxed&&d?{$date:fa(e)}:{$date:{$numberLong:e.getTime().toString()}}}var f;if(!("number"!=typeof e||t.relaxed&&isFinite(e))){if(Math.floor(e)===e){var p=e>=ca&&e<=sa;if(e>=la&&e<=aa)return{$numberInt:e.toString()};if(p)return{$numberLong:e.toString()}}return{$numberDouble:e.toString()}}if(e instanceof RegExp||function(e){return"[object RegExp]"===Object.prototype.toString.call(e)}(e)){var h=e.flags;if(void 0===h){var g=e.toString().match(/[gimuy]*$/);g&&(h=g[0])}return new ra(e.source,h).toExtendedJSON(t)}return null!=e&&"object"==typeof e?function(e,t){if(null==e||"object"!=typeof e)throw new ci("not an object instance");var n=e._bsontype;if(void 0===n){var r={};for(var o in e){t.seenObjects.push({propertyName:o,obj:null});try{var i=pa(e[o],t);"__proto__"===o?Object.defineProperty(r,o,{value:i,writable:!0,enumerable:!0,configurable:!0}):r[o]=i}finally{t.seenObjects.pop()}}return r}if(function(e){return mi(e)&&Reflect.has(e,"_bsontype")&&"string"==typeof e._bsontype}(e)){var a=e;if("function"!=typeof a.toExtendedJSON){var l=ga[e._bsontype];if(!l)throw new ui("Unrecognized or invalid _bsontype: "+e._bsontype);a=l(a)}return"Code"===n&&a.scope?a=new Mi(a.code,pa(a.scope,t)):"DBRef"===n&&a.oid&&(a=new Ii(pa(a.collection,t),pa(a.oid,t),pa(a.db,t),pa(a.fields,t))),a.toExtendedJSON(t)}throw new ci("_bsontype must be a string, but was: "+typeof n)}(e,t):e}var ha,ga={Binary:function(e){return new ki(e.value(),e.sub_type)},Code:function(e){return new Mi(e.code,e.scope)},DBRef:function(e){return new Ii(e.collection||e.namespace,e.oid,e.db,e.fields)},Decimal128:function(e){return new Gi(e.bytes)},Double:function(e){return new Yi(e.value)},Int32:function(e){return new Ki(e.value)},Long:function(e){return Ri.fromBits(null!=e.low?e.low:e.low_,null!=e.low?e.high:e.high_,null!=e.low?e.unsigned:e.unsigned_)},MaxKey:function(){return new Zi},MinKey:function(){return new Ji},ObjectID:function(e){return new na(e)},ObjectId:function(e){return new na(e)},BSONRegExp:function(e){return new ra(e.pattern,e.options)},Symbol:function(e){return new oa(e.value)},Timestamp:function(e){return ia.fromBits(e.low,e.high)}};!function(e){function t(e,t){var n=Object.assign({},{relaxed:!0,legacy:!1},t);return"boolean"==typeof n.relaxed&&(n.strict=!n.relaxed),"boolean"==typeof n.strict&&(n.relaxed=!n.strict),JSON.parse(e,(function(e,t){if(-1!==e.indexOf("\0"))throw new ci("BSON Document field names cannot contain null bytes, found: ".concat(JSON.stringify(e)));return da(t,n)}))}function n(e,t,n,r){null!=n&&"object"==typeof n&&(r=n,n=0),null==t||"object"!=typeof t||Array.isArray(t)||(r=t,t=void 0,n=0);var o=pa(e,Object.assign({relaxed:!0,legacy:!1},r,{seenObjects:[{propertyName:"(root)",obj:null}]}));return JSON.stringify(o,t,n)}e.parse=t,e.stringify=n,e.serialize=function(e,t){return t=t||{},JSON.parse(n(e,t))},e.deserialize=function(e,n){return n=n||{},t(JSON.stringify(e),n)}}(ha||(ha={}));var ma=fi();ma.Map?ma.Map:function(){function e(e){void 0===e&&(e=[]),this._keys=[],this._values={};for(var t=0;t0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.COMMUNITY_SITE_URL=t.IS_DEBUG_MODE=t.getProtocol=t.setProtocol=t.getSdkName=t.setSdkName=void 0;var n="@cloudbase/js-sdk";t.setSdkName=function(e){n=e},t.getSdkName=function(){return n};var r="undefined"!=typeof location&&"http:"===location.protocol?"http:":"https:";t.setProtocol=function(e){r=e},t.getProtocol=function(){return r},t.IS_DEBUG_MODE=!1,t.COMMUNITY_SITE_URL="https://support.qq.com/products/148793"},6291:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ERRORS=void 0,t.ERRORS={INVALID_PARAMS:"INVALID_PARAMS",INVALID_SYNTAX:"INVALID_SYNTAX",INVALID_OPERATION:"INVALID_OPERATION",OPERATION_FAIL:"OPERATION_FAIL",NETWORK_ERROR:"NETWORK_ERROR",UNKOWN_ERROR:"UNKOWN_ERROR"}},1695:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(4736),t),o(n(6291),t)},241:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}s((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]d}));f.unshift(a[d].replace(u,n+"."+r).replace(c,o)),(i=new Error).stack=(l?"@debugger":"Error")+"\n"+f.join("\n")}return i}t.catchErrorsDecorator=function(e){var t=e.mode,n=void 0===t?"async":t,l=e.customInfo,d=void 0===l?{}:l,f=e.title,p=e.messages,h=void 0===p?[]:p;return function(e,t,l){if(a.IS_DEBUG_MODE){var p=d.className||e.constructor.name,g=d.methodName||t,m=l.value,v=function(e){var t="",n=(new Error).stack.split("\n"),r=n.findIndex((function(e){return s.test(e)}));if(-1!==r){var o=c.exec(n[r+1]||"");t=o?o[0]:""}return t}();l.value="sync"===n?function(){for(var e=[],t=0;t0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=0?JSON.parse(r).content:""}s.printWarn(c.ERRORS.INVALID_OPERATION,"current platform's storage is asynchronous, please use getStoreAsync insteed")},e.prototype.getStoreAsync=function(e,t){var n;return i(this,void 0,void 0,(function(){var r;return a(this,(function(o){switch(o.label){case 0:try{if("undefined"!=typeof process&&(null===(n=process.env)||void 0===n?void 0:n.tcb_token))return[2,process.env.tcb_token];if(!this._storage)return[2,""]}catch(e){return[2,""]}return t=t||"localCachev1",[4,this._storage.getItem(e)];case 1:return(r=o.sent())&&r.indexOf(t)>=0?[2,JSON.parse(r).content]:[2,""]}}))}))},e.prototype.removeStore=function(e){"async"!==this.mode?this._storage.removeItem(e):s.printWarn(c.ERRORS.INVALID_OPERATION,"current platform's storage is asynchronous, please use removeStoreAsync insteed")},e.prototype.removeStoreAsync=function(e){return i(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,this._storage.removeItem(e)];case 1:return t.sent(),[2]}}))}))},e}();t.CloudbaseCache=f},7858:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=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])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t0},e}();t.CloudbaseEventEmitter=c;var u=new c;t.addEventListener=function(e,t){u.on(e,t)},t.activateEvent=function(e,t){void 0===t&&(t={}),u.fire(e,t)},t.removeEventListener=function(e,t){u.off(e,t)}},6786:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.transformPhone=t.sleep=t.printGroupLog=t.throwError=t.printInfo=t.printError=t.printWarn=t.execCallback=t.createPromiseCallback=t.removeParam=t.getHash=t.getQuery=t.toQueryString=t.createSign=t.formatUrl=t.genSeqId=t.isFormData=t.isInstanceOf=t.isNull=t.isPalinObject=t.isUndefined=t.isString=t.isArray=void 0;var o=r(n(8606)),i=r(n(5067)),a=r(n(9693)),l=n(1695);function s(e){var t=i.default.stringify(e);return(t=(t=t.replace(/=+$/,"")).replace(/\+/g,"-")).replace(/\//g,"_")}t.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},t.isString=function(e){return"string"==typeof e},t.isUndefined=function(e){return void 0===e},t.isPalinObject=function(e){return"[object Object]"===Object.prototype.toString.call(e)},t.isNull=function(e){return"[object Null]"===Object.prototype.toString.call(e)},t.isInstanceOf=function(e,t){return e instanceof t},t.isFormData=function(e){return"[object FormData]"===Object.prototype.toString.call(e)},t.genSeqId=function(){return Math.random().toString(16).slice(2)},t.formatUrl=function(e,t,n){void 0===n&&(n={});var r=/\?/.test(t),o="";for(var i in n)""===o?!r&&(t+="?"):o+="&",o+=i+"="+encodeURIComponent(n[i]);return/^http(s)?\:\/\//.test(t+=o)?t:""+e+t},t.createSign=function(e,t){var n=s(a.default.parse(JSON.stringify({alg:"HS256",typ:"JWT"})))+"."+s(a.default.parse(JSON.stringify(e)));return n+"."+s(o.default(n,t))},t.toQueryString=function(e){void 0===e&&(e={});var t=[];for(var n in e)t.push(n+"="+encodeURIComponent(e[n]));return t.join("&")},t.getQuery=function(e,t){if("undefined"==typeof window)return!1;var n=t||window.location.search,r=new RegExp("(^|&)"+e+"=([^&]*)(&|$)"),o=n.substr(n.indexOf("?")+1).match(r);return null!=o?o[2]:""},t.getHash=function(e){if("undefined"==typeof window)return"";var t=window.location.hash.match(new RegExp("[#?&/]"+e+"=([^&#]*)"));return t?t[1]:""},t.removeParam=function(e,t){var n=t.split("?")[0],r=[],o=-1!==t.indexOf("?")?t.split("?")[1]:"";if(""!==o){for(var i=(r=o.split("&")).length-1;i>=0;i-=1)r[i].split("=")[0]===e&&r.splice(i,1);n=n+"?"+r.join("&")}return n},t.createPromiseCallback=function(){var e;if(!Promise){(e=function(){}).promise={};var t=function(){throw new Error('Your Node runtime does support ES6 Promises. Set "global.Promise" to your preferred implementation of promises.')};return Object.defineProperty(e.promise,"then",{get:t}),Object.defineProperty(e.promise,"catch",{get:t}),e}var n=new Promise((function(t,n){e=function(e,r){return e?n(e):t(r)}}));return e.promise=n,e},t.execCallback=function(e,t,n){if(void 0===n&&(n=null),e&&"function"==typeof e)return e(t,n);if(t)throw t;return n},t.printWarn=function(e,t){console.warn("["+l.getSdkName()+"]["+e+"]:"+t)},t.printError=function(e,t){console.error({code:e,msg:"["+l.getSdkName()+"]["+e+"]:"+t})},t.printInfo=function(e,t){console.log("["+l.getSdkName()+"]["+e+"]:"+t)},t.throwError=function(e,t){throw new Error(JSON.stringify({code:e,msg:"["+l.getSdkName()+"]["+e+"]:"+t}))},t.printGroupLog=function(e){var t=e.title,n=e.subtitle,r=void 0===n?"":n,o=e.content,i=void 0===o?[]:o,a=e.printTrace,l=void 0!==a&&a,s=e.collapsed;void 0!==s&&s?console.groupCollapsed(t,r):console.group(t,r);for(var c=0,u=i;c{"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),h=Symbol.for("react.lazy");Symbol.for("react.offscreen");function g(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case o:case a:case i:case d:case f:return e;default:switch(e=e&&e.$$typeof){case c:case s:case u:case h:case p:case l:return e;default:return t}}case r:return t}}}Symbol.for("react.module.reference"),t.isFragment=function(e){return g(e)===o},t.isMemo=function(e){return g(e)===p}},9313:(e,t,n)=>{"use strict";e.exports=n(5379)},1691:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Affix:()=>pi,Alert:()=>zl,Anchor:()=>cs,App:()=>Ag,AutoComplete:()=>mx,Avatar:()=>hw,BackTop:()=>ww,Badge:()=>Fw,Breadcrumb:()=>CC,Button:()=>dd,Calendar:()=>QM,Card:()=>J$,Carousel:()=>U_,Cascader:()=>QP,Checkbox:()=>lA,Col:()=>mA,Collapse:()=>TA,ColorPicker:()=>$R,ConfigProvider:()=>Xc,DatePicker:()=>KR,Descriptions:()=>sL,Divider:()=>DA,Drawer:()=>kL,Dropdown:()=>DL,Empty:()=>mb,Flex:()=>GL,FloatButton:()=>vD,Form:()=>sj,Grid:()=>cj,Image:()=>kF,Input:()=>ZT,InputNumber:()=>wT,Layout:()=>jF,List:()=>KB,Mentions:()=>zz,Menu:()=>iC,Modal:()=>tH,Pagination:()=>PB,Popconfirm:()=>vH,Popover:()=>dw,Progress:()=>VH,QRCode:()=>bU,Radio:()=>wU,Rate:()=>RU,Result:()=>YU,Row:()=>KU,Segmented:()=>dW,Select:()=>ux,Skeleton:()=>SI,Slider:()=>jW,Space:()=>NL,Spin:()=>FB,Statistic:()=>VW,Steps:()=>hV,Switch:()=>AV,Table:()=>fK,Tabs:()=>D$,Tag:()=>EK,TimePicker:()=>TK,Timeline:()=>zK,Tooltip:()=>rw,Tour:()=>oZ,Transfer:()=>NZ,Tree:()=>aY,TreeSelect:()=>aJ,Typography:()=>qJ,Upload:()=>XQ,Watermark:()=>QQ,message:()=>Zz,notification:()=>dH,theme:()=>IK,version:()=>kr});var r=n(6204),o=n.t(r,2),i=n(5681),a=n.n(i);function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},n=[];return r.Children.forEach(e,(function(e){(null!=e||t.keepEmpty)&&(Array.isArray(e)?n=n.concat(c(e)):(0,s.isFragment)(e)&&e.props?n=n.concat(c(e.props.children,t)):n.push(e))})),n}var u={},d=[];function f(e,t){}function p(e,t){}function h(e,t,n){t||u[n]||(e(!1,n),u[n]=!0)}function g(e,t){h(f,e,t)}g.preMessage=function(e){d.push(e)},g.resetWarned=function(){u={}},g.noteOnce=function(e,t){h(p,e,t)};const m=g;function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function y(e){var t=function(e,t){if("object"!==v(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==v(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===v(t)?t:String(t)}function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(e){for(var t=1;t0},e.prototype.connect_=function(){P&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),R?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){P&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;T.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),D=function(e,t){for(var n=0,r=Object.keys(t);n0},e}(),G="undefined"!=typeof WeakMap?new WeakMap:new _,Y=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=L.getInstance(),r=new q(t,n,this);G.set(this,r)};["observe","unobserve","disconnect"].forEach((function(e){Y.prototype[e]=function(){var t;return(t=G.get(this))[e].apply(t,arguments)}}));const K=void 0!==A.ResizeObserver?A.ResizeObserver:Y;var Z=new Map,J=new K((function(e){e.forEach((function(e){var t,n=e.target;null===(t=Z.get(n))||void 0===t||t.forEach((function(e){return e(n)}))}))}));function Q(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:1),t};xe.cancel=function(e){var t=ye.get(e);return be(e),me(t)};const we=xe,Se=function(e){let t;const n=function(){if(null==t){for(var n=arguments.length,r=new Array(n),o=0;o()=>{t=null,e.apply(void 0,he(n))})(r))}};return n.cancel=()=>{we.cancel(t),t=null},n},Ee="anticon",Ce=r.createContext({getPrefixCls:(e,t)=>t||(e?`ant-${e}`:"ant"),iconPrefixCls:Ee}),{Consumer:ke}=Ce;function Oe(e){return Oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Oe(e)}function Me(e){var t=function(e,t){if("object"!==Oe(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==Oe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Oe(t)?t:String(t)}function Ie(e,t,n){return(t=Me(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $e(e){if(Array.isArray(e))return e}function _e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)};function Fe(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}var Be="data-rc-order",ze="data-rc-priority",He="rc-util-key",Ue=new Map;function We(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).mark;return e?e.startsWith("data-")?e:"data-".concat(e):He}function Ve(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function Xe(e){return Array.from((Ue.get(e)||e).children).filter((function(e){return"STYLE"===e.tagName}))}function qe(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Fe())return null;var n=t.csp,r=t.prepend,o=t.priority,i=void 0===o?0:o,a=function(e){return"queue"===e?"prependQueue":e?"prepend":"append"}(r),l="prependQueue"===a,s=document.createElement("style");s.setAttribute(Be,a),l&&i&&s.setAttribute(ze,"".concat(i)),null!=n&&n.nonce&&(s.nonce=null==n?void 0:n.nonce),s.innerHTML=e;var c=Ve(t),u=c.firstChild;if(r){if(l){var d=Xe(c).filter((function(e){if(!["prepend","prependQueue"].includes(e.getAttribute(Be)))return!1;var t=Number(e.getAttribute(ze)||0);return i>=t}));if(d.length)return c.insertBefore(s,d[d.length-1].nextSibling),s}c.insertBefore(s,u)}else c.appendChild(s);return s}function Ge(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Xe(Ve(t)).find((function(n){return n.getAttribute(We(t))===e}))}function Ye(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Ge(e,t);n&&Ve(t).removeChild(n)}function Ke(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!function(e,t){var n=Ue.get(e);if(!n||!function(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}(document,n)){var r=qe("",t),o=r.parentNode;Ue.set(e,o),e.removeChild(r)}}(Ve(n),n);var r,o,i,a=Ge(t,n);if(a)return null!==(r=n.csp)&&void 0!==r&&r.nonce&&a.nonce!==(null===(o=n.csp)||void 0===o?void 0:o.nonce)&&(a.nonce=null===(i=n.csp)||void 0===i?void 0:i.nonce),a.innerHTML!==e&&(a.innerHTML=e),a;var l=qe(e,n);return l.setAttribute(We(n),t),l}var Ze={},Je=[];function Qe(e,t){}function et(e,t){}function tt(e,t,n){t||Ze[n]||(e(!1,n),Ze[n]=!0)}function nt(e,t){tt(Qe,e,t)}function rt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ot(e,t){for(var n=0;n1&&void 0!==arguments[1]&&arguments[1],o={map:this.cache};return e.forEach((function(e){var t;o=o?null===(t=o)||void 0===t||null===(t=t.map)||void 0===t?void 0:t.get(e):void 0})),null!==(t=o)&&void 0!==t&&t.value&&r&&(o.value[1]=this.cacheCallTimes++),null===(n=o)||void 0===n?void 0:n.value}},{key:"get",value:function(e){var t;return null===(t=this.internalGet(e,!0))||void 0===t?void 0:t[0]}},{key:"has",value:function(e){return!!this.internalGet(e)}},{key:"set",value:function(t,n){var r=this;if(!this.has(t)){if(this.size()+1>e.MAX_CACHE_SIZE+e.MAX_CACHE_OFFSET){var o=this.keys.reduce((function(e,t){var n=Ne(e,2)[1];return r.internalGet(t)[1]4&&void 0!==arguments[4]&&arguments[4])return e;var o=De(De({},arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}),{},(Ie(r={},st,t),Ie(r,ct,n),r)),i=Object.keys(o).map((function(e){var t=o[e];return t?"".concat(e,'="').concat(t,'"'):null})).filter((function(e){return e})).join(" ");return"")}var $t=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"--".concat(t?"".concat(t,"-"):"").concat(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z0-9]+)/g,"$1-$2").replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase()},_t=function(e,t,n){return Object.keys(e).length?".".concat(t).concat(null!=n&&n.scope?".".concat(n.scope):"","{").concat(Object.entries(e).map((function(e){var t=Ne(e,2),n=t[0],r=t[1];return"".concat(n,":").concat(r,";")})).join(""),"}"):""},Pt=function(e,t,n){var r={},o={};return Object.entries(e).forEach((function(e){var t,i,a=Ne(e,2),l=a[0],s=a[1];if(null!=n&&null!==(t=n.preserve)&&void 0!==t&&t[l])o[l]=s;else if(!("string"!=typeof s&&"number"!=typeof s||null!=n&&null!==(i=n.ignore)&&void 0!==i&&i[l])){var c,u=$t(l,null==n?void 0:n.prefix);r[u]="number"!=typeof s||null!=n&&null!==(c=n.unitless)&&void 0!==c&&c[l]?String(s):"".concat(s,"px"),o[l]="var(".concat(u,")")}})),[o,_t(r,t,{scope:null==n?void 0:n.scope})]},At=Fe()?r.useLayoutEffect:r.useEffect;const Nt=function(e,t){var n=r.useRef(!0);At((function(){return e(n.current)}),t),At((function(){return n.current=!1,function(){n.current=!0}}),[])};var Tt=De({},o).useInsertionEffect;const Rt=Tt?function(e,t,n){return Tt((function(){return e(),t()}),n)}:function(e,t,n){r.useMemo(e,n),Nt((function(){return t(!0)}),n)},Lt=void 0!==De({},o).useInsertionEffect?function(e){var t=[],n=!1;return r.useEffect((function(){return n=!1,function(){n=!0,t.length&&t.forEach((function(e){return e()}))}}),e),function(e){n||t.push(e)}}:function(){return function(e){e()}},Dt=function(){return!1};function jt(e,t,n,o,i){var a=r.useContext(ft).cache,l=[e].concat(Re(t)),s=l.join("_"),c=Lt([s]),u=(Dt(),function(e){a.update(l,(function(t){var r=Ne(t||[void 0,void 0],2),o=r[0],i=[void 0===o?0:o,r[1]||n()];return e?e(i):i}))});r.useMemo((function(){u()}),[s]);var d=a.get(l)[1];return Rt((function(){null==i||i(d)}),(function(e){return u((function(t){var n=Ne(t,2),r=n[0],o=n[1];return e&&0===r&&(null==i||i(d)),[r+1,o]})),function(){a.update(l,(function(t){var n=Ne(t||[],2),r=n[0],i=void 0===r?0:r,s=n[1];return 0==i-1?(c((function(){!e&&a.get(l)||null==o||o(s,!1)})),null):[i-1,s]}))}}),[s]),d}var Ft={},Bt="css",zt=new Map,Ht=0;var Ut=function(e,t,n,r){var o=De(De({},n.getDerivativeToken(e)),t);return r&&(o=r(o)),o},Wt="token";function Vt(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=(0,r.useContext)(ft),i=o.cache.instanceId,a=o.container,l=n.salt,s=void 0===l?"":l,c=n.override,u=void 0===c?Ft:c,d=n.formatToken,f=n.getComputedToken,p=n.cssVar,h=function(e,n){for(var r=yt,o=0;oHt&&r.forEach((function(e){!function(e,t){"undefined"!=typeof document&&document.querySelectorAll("style[".concat(st,'="').concat(e,'"]')).forEach((function(e){var n;e[ut]===t&&(null===(n=e.parentNode)||void 0===n||n.removeChild(e))}))}(e,t),zt.delete(e)}))}(e[0]._themeKey,i)}),(function(e){var t=Ne(e,4),n=t[0],r=t[3];if(p&&r){var o=Ke(r,je("css-variables-".concat(n._themeKey)),{mark:ct,prepend:"queue",attachTo:a,priority:-999});o[ut]=i,o.setAttribute(st,n._themeKey)}}));return y}function Xt(){return Xt=Object.assign?Object.assign.bind():function(e){for(var t=1;t0?an(vn,--gn):0,pn--,10===mn&&(pn=1,fn--),mn}function xn(){return mn=gn2||Cn(mn)>3?"":" "}function Mn(e,t){for(;--t&&xn()&&!(mn<48||mn>102||mn>57&&mn<65||mn>70&&mn<97););return En(e,Sn()+(t<6&&32==wn()&&32==xn()))}function In(e){for(;xn();)switch(mn){case e:return gn;case 34:case 39:34!==e&&39!==e&&In(mn);break;case 40:41===e&&In(e);break;case 92:xn()}return gn}function $n(e,t){for(;xn()&&e+mn!==57&&(e+mn!==84||47!==wn()););return"/*"+En(t,gn-1)+"*"+tn(47===e?e:xn())}function _n(e){for(;!Cn(wn());)xn();return En(e,gn)}function Pn(e){return function(e){return vn="",e}(An("",null,null,null,[""],e=function(e){return fn=pn=1,hn=sn(vn=e),gn=0,[]}(e),0,[0],e))}function An(e,t,n,r,o,i,a,l,s){for(var c=0,u=0,d=a,f=0,p=0,h=0,g=1,m=1,v=1,y=0,b="",x=o,w=i,S=r,E=b;m;)switch(h=y,y=xn()){case 40:if(108!=h&&58==an(E,d-1)){-1!=on(E+=rn(kn(y),"&","&\f"),"&\f")&&(v=-1);break}case 34:case 39:case 91:E+=kn(y);break;case 9:case 10:case 13:case 32:E+=On(h);break;case 92:E+=Mn(Sn()-1,7);continue;case 47:switch(wn()){case 42:case 47:cn(Tn($n(xn(),Sn()),t,n,s),s);break;default:E+="/"}break;case 123*g:l[c++]=sn(E)*v;case 125*g:case 59:case 0:switch(y){case 0:case 125:m=0;case 59+u:-1==v&&(E=rn(E,/\f/g,"")),p>0&&sn(E)-d&&cn(p>32?Rn(E+";",r,n,d-1,s):Rn(rn(E," ","")+";",r,n,d-2,s),s);break;case 59:E+=";";default:if(cn(S=Nn(E,t,n,c,u,o,l,b,x=[],w=[],d,i),i),123===y)if(0===u)An(E,t,S,S,x,i,d,l,w);else switch(99===f&&110===an(E,3)?100:f){case 100:case 108:case 109:case 115:An(e,S,S,r&&cn(Nn(e,S,S,0,0,o,l,b,o,x=[],d,w),w),o,w,d,l,r?x:w);break;default:An(E,S,S,S,[""],w,0,l,w)}}c=u=p=0,g=v=1,b=E="",d=a;break;case 58:d=1+sn(E),p=h;default:if(g<1)if(123==y)--g;else if(125==y&&0==g++&&125==bn())continue;switch(E+=tn(y),y*g){case 38:v=u>0?1:(E+="\f",-1);break;case 44:l[c++]=(sn(E)-1)*v,v=1;break;case 64:45===wn()&&(E+=kn(xn())),f=wn(),u=d=sn(b=E+=_n(Sn())),y++;break;case 45:45===h&&2==sn(E)&&(g=0)}}return i}function Nn(e,t,n,r,o,i,a,l,s,c,u,d){for(var f=o-1,p=0===o?i:[""],h=function(e){return e.length}(p),g=0,m=0,v=0;g0?p[y]+" "+b:rn(b,/&\f/g,p[y])))&&(s[v++]=x);return yn(e,t,n,0===o?Yt:l,s,c,u,d)}function Tn(e,t,n,r){return yn(e,t,n,Gt,tn(mn),ln(e,2,-2),0,r)}function Rn(e,t,n,r,o){return yn(e,t,n,Kt,ln(e,0,r),ln(e,r+1,-1),r,o)}var Ln,Dn="data-ant-cssinjs-cache-path",jn="_FILE_STYLE__",Fn=!0;var Bn="_multi_value_";function zn(e){return un(Pn(e),dn).replace(/\{%%%\:[^;];}/g,";")}var Hn=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{root:!0,parentSelectors:[]},o=r.root,i=r.injectHash,a=r.parentSelectors,l=n.hashId,s=n.layer,c=(n.path,n.hashPriority),u=n.transformers,d=void 0===u?[]:u,f=(n.linters,""),p={};function h(t){var r=t.getName(l);if(!p[r]){var o=Ne(e(t.style,n,{root:!1,parentSelectors:a}),1)[0];p[r]="@keyframes ".concat(t.getName(l)).concat(o)}}var g=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.forEach((function(t){Array.isArray(t)?e(t,n):t&&n.push(t)})),n}(Array.isArray(t)?t:[t]);if(g.forEach((function(t){var r="string"!=typeof t||o?t:{};if("string"==typeof r)f+="".concat(r,"\n");else if(r._keyframe)h(r);else{var s=d.reduce((function(e,t){var n;return(null==t||null===(n=t.visit)||void 0===n?void 0:n.call(t,e))||e}),r);Object.keys(s).forEach((function(t){var r=s[t];if("object"!==Oe(r)||!r||"animationName"===t&&r._keyframe||function(e){return"object"===Oe(e)&&e&&("_skip_check_"in e||Bn in e)}(r)){var u;function w(e,t){var n=e.replace(/[A-Z]/g,(function(e){return"-".concat(e.toLowerCase())})),r=t;qt[e]||"number"!=typeof r||0===r||(r="".concat(r,"px")),"animationName"===e&&null!=t&&t._keyframe&&(h(t),r=t.getName(l)),f+="".concat(n,":").concat(r,";")}var d=null!==(u=null==r?void 0:r.value)&&void 0!==u?u:r;"object"===Oe(r)&&null!=r&&r[Bn]&&Array.isArray(d)?d.forEach((function(e){w(t,e)})):w(t,d)}else{var g=!1,m=t.trim(),v=!1;(o||i)&&l?m.startsWith("@")?g=!0:m=function(e,t,n){if(!t)return e;var r=".".concat(t),o="low"===n?":where(".concat(r,")"):r;return e.split(",").map((function(e){var t,n=e.trim().split(/\s+/),r=n[0]||"",i=(null===(t=r.match(/^\w+/))||void 0===t?void 0:t[0])||"";return[r="".concat(i).concat(o).concat(r.slice(i.length))].concat(Re(n.slice(1))).join(" ")})).join(",")}(t,l,c):!o||l||"&"!==m&&""!==m||(m="",v=!0);var y=Ne(e(r,n,{root:v,injectHash:g,parentSelectors:[].concat(Re(a),[m])}),2),b=y[0],x=y[1];p=De(De({},p),x),f+="".concat(m).concat(b)}}))}})),o){if(s&&(void 0===kt&&(kt=function(e,t,n){if(Fe()){var r,o;Ke(e,Et);var i=document.createElement("div");i.style.position="fixed",i.style.left="0",i.style.top="0",null==t||t(i),document.body.appendChild(i);var a=n?n(i):null===(r=getComputedStyle(i).content)||void 0===r?void 0:r.includes(Ct);return null===(o=i.parentNode)||void 0===o||o.removeChild(i),Ye(Et),a}return!1}("@layer ".concat(Et," { .").concat(Et,' { content: "').concat(Ct,'"!important; } }'),(function(e){e.className=Et}))),kt)){var m=s.split(","),v=m[m.length-1].trim();f="@layer ".concat(v," {").concat(f,"}"),m.length>1&&(f="@layer ".concat(s,"{%%%:%}").concat(f))}}else f="{".concat(f,"}");return[f,p]};function Un(e,t){return je("".concat(e.join("%")).concat(t))}function Wn(){return null}var Vn="style";function Xn(e,t){var n=e.token,o=e.path,i=e.hashId,a=e.layer,l=e.nonce,s=e.clientOnly,c=e.order,u=void 0===c?0:c,d=r.useContext(ft),f=d.autoClear,p=(d.mock,d.defaultCache),h=d.hashPriority,g=d.container,m=d.ssrInline,v=d.transformers,y=d.linters,b=d.cache,x=n._tokenKey,w=[x].concat(Re(o)),S=Ot,E=jt(Vn,w,(function(){var e=w.join("|");if(function(e){return function(){if(!Ln&&(Ln={},Fe())){var e=document.createElement("div");e.className=Dn,e.style.position="fixed",e.style.visibility="hidden",e.style.top="-9999px",document.body.appendChild(e);var t=getComputedStyle(e).content||"";(t=t.replace(/^"/,"").replace(/"$/,"")).split(";").forEach((function(e){var t=Ne(e.split(":"),2),n=t[0],r=t[1];Ln[n]=r}));var n,r=document.querySelector("style[".concat(Dn,"]"));r&&(Fn=!1,null===(n=r.parentNode)||void 0===n||n.removeChild(r)),document.body.removeChild(e)}}(),!!Ln[e]}(e)){var n=function(e){var t=Ln[e],n=null;if(t&&Fe())if(Fn)n=jn;else{var r=document.querySelector("style[".concat(ct,'="').concat(Ln[e],'"]'));r?n=r.innerHTML:delete Ln[e]}return[n,t]}(e),r=Ne(n,2),l=r[0],c=r[1];if(l)return[l,x,c,{},s,u]}var d=t(),f=Ne(Hn(d,{hashId:i,hashPriority:h,layer:a,path:o.join("-"),transformers:v,linters:y}),2),p=f[0],g=f[1],m=zn(p),b=Un(w,m);return[m,x,b,g,s,u]}),(function(e,t){var n=Ne(e,3)[2];(t||f)&&Ot&&Ye(n,{mark:ct})}),(function(e){var t=Ne(e,4),n=t[0],r=(t[1],t[2]),o=t[3];if(S&&n!==jn){var i={mark:ct,prepend:"queue",attachTo:g,priority:u},a="function"==typeof l?l():l;a&&(i.csp={nonce:a});var s=Ke(n,r,i);s[ut]=b.instanceId,s.setAttribute(st,x),Object.keys(o).forEach((function(e){Ke(zn(o[e]),"_effect-".concat(e),i)}))}})),C=Ne(E,3),k=C[0],O=C[1],M=C[2];return function(e){var t,n;return t=m&&!S&&p?r.createElement("style",Xt({},(Ie(n={},st,O),Ie(n,ct,M),n),{dangerouslySetInnerHTML:{__html:k}})):r.createElement(Wn,null),r.createElement(r.Fragment,null,t,e)}}var qn="cssVar";var Gn;Ie(Gn={},Vn,(function(e,t,n){var r=Ne(e,6),o=r[0],i=r[1],a=r[2],l=r[3],s=r[4],c=r[5],u=(n||{}).plain;if(s)return null;var d=o,f={"data-rc-order":"prependQueue","data-rc-priority":"".concat(c)};return d=It(o,i,a,f,u),l&&Object.keys(l).forEach((function(e){if(!t[e]){t[e]=!0;var n=zn(l[e]);d+=It(n,i,"_effect-".concat(e),f,u)}})),[c,a,d]})),Ie(Gn,Wt,(function(e,t,n){var r=Ne(e,5),o=r[2],i=r[3],a=r[4],l=(n||{}).plain;if(!i)return null;var s=o._tokenKey;return[-999,s,It(i,a,s,{"data-rc-order":"prependQueue","data-rc-priority":"".concat(-999)},l)]})),Ie(Gn,qn,(function(e,t,n){var r=Ne(e,4),o=r[1],i=r[2],a=r[3],l=(n||{}).plain;return o?[-999,i,It(o,a,i,{"data-rc-order":"prependQueue","data-rc-priority":"".concat(-999)},l)]:null}));var Yn=function(){function e(t,n){rt(this,e),Ie(this,"name",void 0),Ie(this,"style",void 0),Ie(this,"_keyframe",!0),this.name=t,this.style=n}return it(e,[{key:"getName",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e?"".concat(e,"-").concat(this.name):this.name}}]),e}();const Kn=Yn;function Zn(e){return e.notSplit=!0,e}function Jn(e){var t=r.useRef();t.current=e;var n=r.useCallback((function(){for(var e,n=arguments.length,r=new Array(n),o=0;oe.length)&&(t=e.length);for(var n=0,r=new Array(t);n3&&void 0!==arguments[3]&&arguments[3];return t.length&&r&&void 0===n&&!hr(e,t.slice(0,-1))?e:gr(e,t,n,r)}function vr(e){return Array.isArray(e)?[]:{}}var yr="undefined"==typeof Reflect?Object.keys:Reflect.ownKeys;const br={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},xr=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{boxSizing:"border-box",margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:"none",fontFamily:t?"inherit":e.fontFamily}},wr=e=>({a:{color:e.colorLink,textDecoration:e.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${e.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive},"&:active,\n &:hover":{textDecoration:e.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e.linkFocusDecoration,outline:0},"&[disabled]":{color:e.colorTextDisabled,cursor:"not-allowed"}}}),Sr=(e,t)=>{const{fontFamily:n,fontSize:r}=e,o=`[class^="${t}"], [class*=" ${t}"]`;return{[o]:{fontFamily:n,fontSize:r,boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"},[o]:{boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}}}}},Er=e=>({outline:`${Mt(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`,outlineOffset:1,transition:"outline-offset 0s, outline 0s"}),Cr=e=>({"&:focus-visible":Object.assign({},Er(e))}),kr="5.12.2";function Or(e,t){(function(e){return"string"==typeof e&&-1!==e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!==e.indexOf("%")}(e);return e=360===t?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:e=360===t?(e<0?e%t+t:e%t)/parseFloat(String(t)):e%t/parseFloat(String(t))}function Mr(e){return Math.min(1,Math.max(0,e))}function Ir(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function $r(e){return e<=1?"".concat(100*Number(e),"%"):e}function _r(e){return 1===e.length?"0"+e:String(e)}function Pr(e,t,n){e=Or(e,255),t=Or(t,255),n=Or(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),i=0,a=0,l=(r+o)/2;if(r===o)a=0,i=0;else{var s=r-o;switch(a=l>.5?s/(2-r-o):s/(r+o),r){case e:i=(t-n)/s+(t1&&(n-=1),n<1/6?e+6*n*(t-e):n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Nr(e,t,n){e=Or(e,255),t=Or(t,255),n=Or(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),i=0,a=r,l=r-o,s=0===r?0:l/r;if(r===o)i=0;else{switch(r){case e:i=(t-n)/l+(t=60&&Math.round(e.h)<=240?n?Math.round(e.h)-Wr*t:Math.round(e.h)+Wr*t:n?Math.round(e.h)+Wr*t:Math.round(e.h)-Wr*t)<0?r+=360:r>=360&&(r-=360),r}function to(e,t,n){return 0===e.h&&0===e.s?e.s:((r=n?e.s-Vr*t:t===Kr?e.s+Vr:e.s+Xr*t)>1&&(r=1),n&&t===Yr&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2)));var r}function no(e,t,n){var r;return(r=n?e.v+qr*t:e.v-Gr*t)>1&&(r=1),Number(r.toFixed(2))}function ro(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=jr(e),o=Yr;o>0;o-=1){var i=Jr(r),a=Qr(jr({h:eo(i,o,!0),s:to(i,o,!0),v:no(i,o,!0)}));n.push(a)}n.push(Qr(r));for(var l=1;l<=Kr;l+=1){var s=Jr(r),c=Qr(jr({h:eo(s,l),s:to(s,l),v:no(s,l)}));n.push(c)}return"dark"===t.theme?Zr.map((function(e){var r,o,i,a=e.index,l=e.opacity;return Qr((r=jr(t.backgroundColor||"#141414"),i=100*l/100,{r:((o=jr(n[a])).r-r.r)*i+r.r,g:(o.g-r.g)*i+r.g,b:(o.b-r.b)*i+r.b}))})):n}var oo={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},io={},ao={};Object.keys(oo).forEach((function(e){io[e]=ro(oo[e]),io[e].primary=io[e][5],ao[e]=ro(oo[e],{theme:"dark",backgroundColor:"#141414"}),ao[e].primary=ao[e][5]})),io.red,io.volcano;var lo=io.gold,so=(io.orange,io.yellow,io.lime,io.green,io.cyan,io.blue);io.geekblue,io.purple,io.magenta,io.grey,io.grey;const co=e=>{const{controlHeight:t}=e;return{controlHeightSM:.75*t,controlHeightXS:.5*t,controlHeightLG:1.25*t}},uo={blue:"#1677ff",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#eb2f96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},fo=Object.assign(Object.assign({},uo),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,\n'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',\n'Noto Color Emoji'",fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,motion:!0});var po=function(){function e(t,n){var r;if(void 0===t&&(t=""),void 0===n&&(n={}),t instanceof e)return t;"number"==typeof t&&(t=function(e){return{r:e>>16,g:(65280&e)>>8,b:255&e}}(t)),this.originalInput=t;var o=jr(t);this.originalInput=t,this.r=o.r,this.g=o.g,this.b=o.b,this.a=o.a,this.roundA=Math.round(100*this.a)/100,this.format=null!==(r=n.format)&&void 0!==r?r:o.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=o.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},e.prototype.getLuminance=function(){var e=this.toRgb(),t=e.r/255,n=e.g/255,r=e.b/255;return.2126*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(e){return this.a=Ir(e),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){return 0===this.toHsl().s},e.prototype.toHsv=function(){var e=Nr(this.r,this.g,this.b);return{h:360*e.h,s:e.s,v:e.v,a:this.a}},e.prototype.toHsvString=function(){var e=Nr(this.r,this.g,this.b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.v);return 1===this.a?"hsv(".concat(t,", ").concat(n,"%, ").concat(r,"%)"):"hsva(".concat(t,", ").concat(n,"%, ").concat(r,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var e=Pr(this.r,this.g,this.b);return{h:360*e.h,s:e.s,l:e.l,a:this.a}},e.prototype.toHslString=function(){var e=Pr(this.r,this.g,this.b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.l);return 1===this.a?"hsl(".concat(t,", ").concat(n,"%, ").concat(r,"%)"):"hsla(".concat(t,", ").concat(n,"%, ").concat(r,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(e){return void 0===e&&(e=!1),Tr(this.r,this.g,this.b,e)},e.prototype.toHexString=function(e){return void 0===e&&(e=!1),"#"+this.toHex(e)},e.prototype.toHex8=function(e){return void 0===e&&(e=!1),function(e,t,n,r,o){var i,a=[_r(Math.round(e).toString(16)),_r(Math.round(t).toString(16)),_r(Math.round(n).toString(16)),_r((i=r,Math.round(255*parseFloat(i)).toString(16)))];return o&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))&&a[3].startsWith(a[3].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}(this.r,this.g,this.b,this.a,e)},e.prototype.toHex8String=function(e){return void 0===e&&(e=!1),"#"+this.toHex8(e)},e.prototype.toHexShortString=function(e){return void 0===e&&(e=!1),1===this.a?this.toHexString(e):this.toHex8String(e)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var e=Math.round(this.r),t=Math.round(this.g),n=Math.round(this.b);return 1===this.a?"rgb(".concat(e,", ").concat(t,", ").concat(n,")"):"rgba(".concat(e,", ").concat(t,", ").concat(n,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var e=function(e){return"".concat(Math.round(100*Or(e,255)),"%")};return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var e=function(e){return Math.round(100*Or(e,255))};return 1===this.a?"rgb(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%)"):"rgba(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(0===this.a)return"transparent";if(this.a<1)return!1;for(var e="#"+Tr(this.r,this.g,this.b,!1),t=0,n=Object.entries(Dr);t=0;return t||!r||!e.startsWith("hex")&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this.a?this.toName():this.toRgbString()},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=Mr(n.l),new e(n)},e.prototype.brighten=function(t){void 0===t&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(-t/100*255))),n.g=Math.max(0,Math.min(255,n.g-Math.round(-t/100*255))),n.b=Math.max(0,Math.min(255,n.b-Math.round(-t/100*255))),new e(n)},e.prototype.darken=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=Mr(n.l),new e(n)},e.prototype.tint=function(e){return void 0===e&&(e=10),this.mix("white",e)},e.prototype.shade=function(e){return void 0===e&&(e=10),this.mix("black",e)},e.prototype.desaturate=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=Mr(n.s),new e(n)},e.prototype.saturate=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=Mr(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){void 0===n&&(n=50);var r=this.toRgb(),o=new e(t).toRgb(),i=n/100;return new e({r:(o.r-r.r)*i+r.r,g:(o.g-r.g)*i+r.g,b:(o.b-r.b)*i+r.b,a:(o.a-r.a)*i+r.a})},e.prototype.analogous=function(t,n){void 0===t&&(t=6),void 0===n&&(n=30);var r=this.toHsl(),o=360/n,i=[this];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,i.push(new e(r));return i},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){void 0===t&&(t=6);for(var n=this.toHsv(),r=n.h,o=n.s,i=n.v,a=[],l=1/t;t--;)a.push(new e({h:r,s:o,v:i})),i=(i+l)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb(),o=n.a+r.a*(1-n.a);return new e({r:(n.r*n.a+r.r*r.a*(1-n.a))/o,g:(n.g*n.a+r.g*r.a*(1-n.a))/o,b:(n.b*n.a+r.b*r.a*(1-n.a))/o,a:o})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,o=[this],i=360/t,a=1;anew po(e).setAlpha(t).toRgbString(),mo=(e,t)=>new po(e).darken(t).toHexString(),vo=e=>{const t=ro(e);return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[4],6:t[5],7:t[6],8:t[4],9:t[5],10:t[6]}},yo=(e,t)=>{const n=e||"#fff",r=t||"#000";return{colorBgBase:n,colorTextBase:r,colorText:go(r,.88),colorTextSecondary:go(r,.65),colorTextTertiary:go(r,.45),colorTextQuaternary:go(r,.25),colorFill:go(r,.15),colorFillSecondary:go(r,.06),colorFillTertiary:go(r,.04),colorFillQuaternary:go(r,.02),colorBgLayout:mo(n,4),colorBgContainer:mo(n,0),colorBgElevated:mo(n,0),colorBgSpotlight:go(r,.85),colorBgBlur:"transparent",colorBorder:mo(n,15),colorBorderSecondary:mo(n,6)}},bo=e=>{const t=function(e){const t=new Array(10).fill(null).map(((t,n)=>{const r=n-1,o=e*Math.pow(2.71828,r/5),i=n>1?Math.floor(o):Math.ceil(o);return 2*Math.floor(i/2)}));return t[1]=e,t.map((e=>({size:e,lineHeight:(e+8)/e})))}(e),n=t.map((e=>e.size)),r=t.map((e=>e.lineHeight)),o=n[1],i=n[0],a=n[2],l=r[1],s=r[0],c=r[2];return{fontSizeSM:i,fontSize:o,fontSizeLG:a,fontSizeXL:n[3],fontSizeHeading1:n[6],fontSizeHeading2:n[5],fontSizeHeading3:n[4],fontSizeHeading4:n[3],fontSizeHeading5:n[2],lineHeight:l,lineHeightLG:c,lineHeightSM:s,fontHeight:Math.round(l*o),fontHeightLG:Math.round(c*a),fontHeightSM:Math.round(s*i),lineHeightHeading1:r[6],lineHeightHeading2:r[5],lineHeightHeading3:r[4],lineHeightHeading4:r[3],lineHeightHeading5:r[2]}};function xo(e){const t=Object.keys(uo).map((t=>{const n=ro(e[t]);return new Array(10).fill(1).reduce(((e,r,o)=>(e[`${t}-${o+1}`]=n[o],e[`${t}${o+1}`]=n[o],e)),{})})).reduce(((e,t)=>Object.assign(Object.assign({},e),t)),{});return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e),t),ho(e,{generateColorPalettes:vo,generateNeutralColorPalettes:yo})),bo(e.fontSize)),function(e){const{sizeUnit:t,sizeStep:n}=e;return{sizeXXL:t*(n+8),sizeXL:t*(n+4),sizeLG:t*(n+2),sizeMD:t*(n+1),sizeMS:t*n,size:t*n,sizeSM:t*(n-1),sizeXS:t*(n-2),sizeXXS:t*(n-3)}}(e)),co(e)),function(e){const{motionUnit:t,motionBase:n,borderRadius:r,lineWidth:o}=e;return Object.assign({motionDurationFast:`${(n+t).toFixed(1)}s`,motionDurationMid:`${(n+2*t).toFixed(1)}s`,motionDurationSlow:`${(n+3*t).toFixed(1)}s`,lineWidthBold:o+1},(e=>{let t=e,n=e,r=e,o=e;return e<6&&e>=5?t=e+1:e<16&&e>=6?t=e+2:e>=16&&(t=16),e<7&&e>=5?n=4:e<8&&e>=7?n=5:e<14&&e>=8?n=6:e<16&&e>=14?n=7:e>=16&&(n=8),e<6&&e>=2?r=1:e>=6&&(r=2),e>4&&e<8?o=4:e>=8&&(o=6),{borderRadius:e,borderRadiusXS:r,borderRadiusSM:n,borderRadiusLG:t,borderRadiusOuter:o}})(r))}(e))}const wo=vt(xo),So={token:fo,override:{override:fo},hashed:!0},Eo=r.createContext(So);function Co(e){return e>=0&&e<=255}const ko=function(e,t){const{r:n,g:r,b:o,a:i}=new po(e).toRgb();if(i<1)return e;const{r:a,g:l,b:s}=new po(t).toRgb();for(let e=.01;e<=1;e+=.01){const t=Math.round((n-a*(1-e))/e),i=Math.round((r-l*(1-e))/e),c=Math.round((o-s*(1-e))/e);if(Co(t)&&Co(i)&&Co(c))return new po({r:t,g:i,b:c,a:Math.round(100*e)/100}).toRgbString()}return new po({r:n,g:r,b:o,a:1}).toRgbString()};var Oo=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o{delete r[e]}));const o=Object.assign(Object.assign({},n),r);if(!1===o.motion){const e="0s";o.motionDurationFast=e,o.motionDurationMid=e,o.motionDurationSlow=e}return Object.assign(Object.assign(Object.assign({},o),{colorFillContent:o.colorFillSecondary,colorFillContentHover:o.colorFill,colorFillAlter:o.colorFillQuaternary,colorBgContainerDisabled:o.colorFillTertiary,colorBorderBg:o.colorBgContainer,colorSplit:ko(o.colorBorderSecondary,o.colorBgContainer),colorTextPlaceholder:o.colorTextQuaternary,colorTextDisabled:o.colorTextQuaternary,colorTextHeading:o.colorText,colorTextLabel:o.colorTextSecondary,colorTextDescription:o.colorTextTertiary,colorTextLightSolid:o.colorWhite,colorHighlight:o.colorError,colorBgTextHover:o.colorFillSecondary,colorBgTextActive:o.colorFill,colorIcon:o.colorTextTertiary,colorIconHover:o.colorText,colorErrorOutline:ko(o.colorErrorBg,o.colorBgContainer),colorWarningOutline:ko(o.colorWarningBg,o.colorBgContainer),fontSizeIcon:o.fontSizeSM,lineWidthFocus:4*o.lineWidth,lineWidth:o.lineWidth,controlOutlineWidth:2*o.lineWidth,controlInteractiveSize:o.controlHeight/2,controlItemBgHover:o.colorFillTertiary,controlItemBgActive:o.colorPrimaryBg,controlItemBgActiveHover:o.colorPrimaryBgHover,controlItemBgActiveDisabled:o.colorFill,controlTmpOutline:o.colorFillQuaternary,controlOutline:ko(o.colorPrimaryBg,o.colorBgContainer),lineType:o.lineType,borderRadius:o.borderRadius,borderRadiusXS:o.borderRadiusXS,borderRadiusSM:o.borderRadiusSM,borderRadiusLG:o.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:o.sizeXXS,paddingXS:o.sizeXS,paddingSM:o.sizeSM,padding:o.size,paddingMD:o.sizeMD,paddingLG:o.sizeLG,paddingXL:o.sizeXL,paddingContentHorizontalLG:o.sizeLG,paddingContentVerticalLG:o.sizeMS,paddingContentHorizontal:o.sizeMS,paddingContentVertical:o.sizeSM,paddingContentHorizontalSM:o.size,paddingContentVerticalSM:o.sizeXS,marginXXS:o.sizeXXS,marginXS:o.sizeXS,marginSM:o.sizeSM,margin:o.size,marginMD:o.sizeMD,marginLG:o.sizeLG,marginXL:o.sizeXL,marginXXL:o.sizeXXL,boxShadow:"\n 0 6px 16px 0 rgba(0, 0, 0, 0.08),\n 0 3px 6px -4px rgba(0, 0, 0, 0.12),\n 0 9px 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowSecondary:"\n 0 6px 16px 0 rgba(0, 0, 0, 0.08),\n 0 3px 6px -4px rgba(0, 0, 0, 0.12),\n 0 9px 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowTertiary:"\n 0 1px 2px 0 rgba(0, 0, 0, 0.03),\n 0 1px 6px -1px rgba(0, 0, 0, 0.02),\n 0 2px 4px 0 rgba(0, 0, 0, 0.02)\n ",screenXS:480,screenXSMin:480,screenXSMax:575,screenSM:576,screenSMMin:576,screenSMMax:767,screenMD:768,screenMDMin:768,screenMDMax:991,screenLG:992,screenLGMin:992,screenLGMax:1199,screenXL:1200,screenXLMin:1200,screenXLMax:1599,screenXXL:1600,screenXXLMin:1600,boxShadowPopoverArrow:"2px 2px 5px rgba(0, 0, 0, 0.05)",boxShadowCard:`\n 0 1px 2px -2px ${new po("rgba(0, 0, 0, 0.16)").toRgbString()},\n 0 3px 6px 0 ${new po("rgba(0, 0, 0, 0.12)").toRgbString()},\n 0 5px 12px 4px ${new po("rgba(0, 0, 0, 0.09)").toRgbString()}\n `,boxShadowDrawerRight:"\n -6px 0 16px 0 rgba(0, 0, 0, 0.08),\n -3px 0 6px -4px rgba(0, 0, 0, 0.12),\n -9px 0 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowDrawerLeft:"\n 6px 0 16px 0 rgba(0, 0, 0, 0.08),\n 3px 0 6px -4px rgba(0, 0, 0, 0.12),\n 9px 0 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowDrawerUp:"\n 0 6px 16px 0 rgba(0, 0, 0, 0.08),\n 0 3px 6px -4px rgba(0, 0, 0, 0.12),\n 0 9px 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowDrawerDown:"\n 0 -6px 16px 0 rgba(0, 0, 0, 0.08),\n 0 -3px 6px -4px rgba(0, 0, 0, 0.12),\n 0 -9px 28px 8px rgba(0, 0, 0, 0.05)\n ",boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),r)}var Io=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o{const r=n.getDerivativeToken(e),{override:o}=t,i=Io(t,["override"]);let a=Object.assign(Object.assign({},r),{override:o});return a=Mo(a),i&&Object.entries(i).forEach((e=>{let[t,n]=e;const{theme:r}=n,o=Io(n,["theme"]);let i=o;r&&(i=Ao(Object.assign(Object.assign({},a),o),{override:o},r)),a[t]=i})),a};function No(){const{token:e,hashed:t,theme:n,override:o,cssVar:i}=r.useContext(Eo),a=`${kr}-${t||""}`,l=n||wo,[s,c,u]=Vt(l,[fo,e],{salt:a,override:o,getComputedToken:Ao,formatToken:Mo,cssVar:i&&{prefix:i.prefix,key:i.key,unitless:$o,ignore:_o,preserve:Po}});return[l,u,t?c:"",s,i]}function To(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ro(e){return Ro="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ro(e)}function Lo(e){var t=function(e,t){if("object"!=Ro(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Ro(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ro(t)?t:String(t)}function Do(e,t){for(var n=0;n{Object.keys(e).forEach((t=>{Object.defineProperty(r,t,{configurable:!0,enumerable:!0,get:()=>e[t]})}))})),Yo=!0,r}const Zo={};function Jo(){}const Qo=(e,t)=>{const[n,r]=No();return Xn({theme:n,token:r,hashId:"",path:["ant-design-icons",e],nonce:()=>null==t?void 0:t.nonce},(()=>[{[`.${e}`]:Object.assign(Object.assign({},{display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),{[`.${e} .${e}-icon`]:{display:"block"}})}]))},ei=(e,t,n)=>{var r;return"function"==typeof n?n(Ko(t,null!==(r=t[e])&&void 0!==r?r:{})):null!=n?n:{}},ti=(e,t,n,r)=>{const o=Object.assign({},t[e]);if(null==r?void 0:r.deprecatedTokens){const{deprecatedTokens:e}=r;e.forEach((e=>{let[t,n]=e;var r;((null==o?void 0:o[t])||(null==o?void 0:o[n]))&&(null!==(r=o[n])&&void 0!==r||(o[n]=null==o?void 0:o[t]))}))}let i=Object.assign(Object.assign({},n),o);return(null==r?void 0:r.format)&&(i=r.format(i)),Object.keys(i).forEach((e=>{i[e]===t[e]&&delete i[e]})),i};function ni(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=Array.isArray(e)?e:[e,e],[l]=i,s=i.join("-");return e=>{const[i,c,u,d,f]=No(),{getPrefixCls:p,iconPrefixCls:h,csp:g}=(0,r.useContext)(Ce),m=p(),v=f?"css":"js",y=(e=>{const t="css"===e?qo:Wo;return e=>new t(e)})(v),{max:b,min:x}=function(e){return"js"===e?{max:Math.max,min:Math.min}:{max:function(){for(var e=arguments.length,t=new Array(e),n=0;nMt(e))).join(",")})`},min:function(){for(var e=arguments.length,t=new Array(e),n=0;nMt(e))).join(",")})`}}}(v),w={theme:i,token:d,hashId:u,nonce:()=>null==g?void 0:g.nonce,clientOnly:o.clientOnly,order:o.order||-999};Xn(Object.assign(Object.assign({},w),{clientOnly:!1,path:["Shared",m]}),(()=>[{"&":wr(d)}])),Qo(h,g);const S=Xn(Object.assign(Object.assign({},w),{path:[s,e,h]}),(()=>{if(!1===o.injectStyle)return[];const{token:r,flush:i}=function(e){let t,n=e,r=Jo;return Go&&"undefined"!=typeof Proxy&&(t=new Set,n=new Proxy(e,{get:(e,n)=>(Yo&&t.add(n),e[n])}),r=(e,n)=>{var r;Zo[e]={global:Array.from(t),component:Object.assign(Object.assign({},null===(r=Zo[e])||void 0===r?void 0:r.component),n)}}),{token:n,keys:t,flush:r}}(d),a=ei(l,c,n),s=`.${e}`,p=ti(l,c,a,{deprecatedTokens:o.deprecatedTokens,format:o.format});f&&Object.keys(a).forEach((e=>{a[e]=`var(${$t(e,((e,t)=>`${[t,e.replace(/([A-Z]+)([A-Z][a-z]+)/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2")].filter(Boolean).join("-")}`)(l,f.prefix))})`}));const g=Ko(r,{componentCls:s,prefixCls:e,iconCls:`.${h}`,antCls:`.${m}`,calc:y,max:b,min:x},f?a:p),v=t(g,{hashId:u,prefixCls:e,rootPrefixCls:m,iconPrefixCls:h});return i(l,p),[!1===o.resetStyle?null:Sr(g,e),v]}));return[S,a()(u,null==f?void 0:f.key)]}}const ri=(e,t,n,r)=>{const o=ni(e,t,n,Object.assign({resetStyle:!1,order:-998},r));return e=>{let{prefixCls:t}=e;return o(t),null}},oi=(e,t,n,o)=>{const i=ni(e,t,n,o),a=((e,t,n)=>{function o(t){return`${e}${t.slice(0,1).toUpperCase()}${t.slice(1)}`}const{unitless:i={},injectStyle:a=!0}=null!=n?n:{},l={[o("zIndexPopup")]:!0};Object.keys(i).forEach((e=>{l[o(e)]=i[e]}));const s=i=>{let{rootCls:a,cssVar:s}=i;const[,c]=No();return function(e,t){var n=e.key,o=e.prefix,i=e.unitless,a=e.ignore,l=e.token,s=e.scope,c=void 0===s?"":s,u=(0,r.useContext)(ft),d=u.cache.instanceId,f=u.container,p=l._tokenKey,h=[].concat(Re(e.path),[n,c,p]),g=jt(qn,h,(function(){var e=t(),r=Ne(Pt(e,n,{prefix:o,unitless:i,ignore:a,scope:c}),2),l=r[0],s=r[1];return[l,s,Un(h,s),n]}),(function(e){var t=Ne(e,3)[2];Ot&&Ye(t,{mark:ct})}),(function(e){var t=Ne(e,3),r=t[1],o=t[2];if(r){var i=Ke(r,o,{mark:ct,prepend:"queue",attachTo:f,priority:-999});i[ut]=d,i.setAttribute(st,n)}}))}({path:[e],prefix:s.prefix,key:null==s?void 0:s.key,unitless:Object.assign(Object.assign({},$o),l),ignore:_o,token:c,scope:a},(()=>{const r=ei(e,c,t),i=ti(e,c,r,{format:null==n?void 0:n.format,deprecatedTokens:null==n?void 0:n.deprecatedTokens});return Object.keys(r).forEach((e=>{i[o(e)]=i[e],delete i[e]})),i})),null};return t=>{const[,,,,n]=No();return o=>a&&n?r.createElement(r.Fragment,null,r.createElement(s,{rootCls:t,cssVar:n,component:e}),o):o}})(e,n,o);return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;const[,n]=i(e);return[a(t),n]}},ii=oi("Affix",(e=>{const{componentCls:t}=e;return{[t]:{position:"fixed",zIndex:e.zIndexPopup}}}),(e=>({zIndexPopup:e.zIndexBase+10})));function ai(e){return e!==window?e.getBoundingClientRect():{top:0,bottom:window.innerHeight}}function li(e,t,n){if(void 0!==n&&t.top>e.top-n)return n+t.top}function si(e,t,n){if(void 0!==n&&t.bottom{var n;const{style:o,offsetTop:i,offsetBottom:l,prefixCls:s,className:c,rootClassName:u,children:d,target:f,onChange:p}=e,{getPrefixCls:h,getTargetContainer:g}=r.useContext(Ce),m=h("affix",s),[v,y]=r.useState(!1),[b,x]=r.useState(),[w,S]=r.useState(),E=r.useRef(di.None),C=r.useRef(null),k=r.useRef(),O=r.useRef(null),M=r.useRef(null),I=r.useRef(null),$=null!==(n=null!=f?f:g)&&void 0!==n?n:ui,_=void 0===l&&void 0===i?0:i,P=()=>{E.current=di.Prepare,(()=>{if(E.current!==di.Prepare||!M.current||!O.current||!$)return;const e=$();if(e){const t={status:di.None},n=ai(O.current);if(0===n.top&&0===n.left&&0===n.width&&0===n.height)return;const r=ai(e),o=li(n,r,_),i=si(n,r,l);void 0!==o?(t.affixStyle={position:"fixed",top:o,width:n.width,height:n.height},t.placeholderStyle={width:n.width,height:n.height}):void 0!==i&&(t.affixStyle={position:"fixed",bottom:i,width:n.width,height:n.height},t.placeholderStyle={width:n.width,height:n.height}),t.lastAffix=!!t.affixStyle,v!==t.lastAffix&&(null==p||p(t.lastAffix)),E.current=t.status,x(t.affixStyle),S(t.placeholderStyle),y(t.lastAffix)}})()},A=Se((()=>{P()})),N=Se((()=>{if($&&b){const e=$();if(e&&O.current){const t=ai(e),n=ai(O.current),r=li(n,t,_),o=si(n,t,l);if(void 0!==r&&b.top===r||void 0!==o&&b.bottom===o)return}}P()})),T=()=>{const e=null==$?void 0:$();e&&(ci.forEach((t=>{var n;k.current&&(null===(n=C.current)||void 0===n||n.removeEventListener(t,k.current)),null==e||e.addEventListener(t,N)})),C.current=e,k.current=N)};r.useImperativeHandle(t,(()=>({updatePosition:A}))),r.useEffect((()=>(I.current=setTimeout(T),()=>(()=>{I.current&&(clearTimeout(I.current),I.current=null);const e=null==$?void 0:$();ci.forEach((t=>{var n;null==e||e.removeEventListener(t,N),k.current&&(null===(n=C.current)||void 0===n||n.removeEventListener(t,k.current))})),A.cancel(),N.cancel()})())),[]),r.useEffect((()=>{T()}),[f,b]),r.useEffect((()=>{A()}),[f,i,l]);const[R,L]=ii(m),D=a()(u,L,m),j=a()({[D]:b});let F=fe(e,["prefixCls","offsetTop","offsetBottom","target","onChange","rootClassName"]);return R(r.createElement(se,{onResize:A},r.createElement("div",Object.assign({style:o,className:c,ref:O},F),b&&r.createElement("div",{style:w,"aria-hidden":"true"}),r.createElement("div",{className:j,ref:M,style:b},r.createElement(se,{onResize:A},d)))))})),pi=fi;function hi(){return hi=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}const wi=(0,r.createContext)({});function Si(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ei(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{}).mark;return e?e.startsWith("data-")?e:"data-".concat(e):Oi}function $i(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function _i(e){return Array.from((Mi.get(e)||e).children).filter((function(e){return"STYLE"===e.tagName}))}function Pi(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!or())return null;var n=t.csp,r=t.prepend,o=t.priority,i=void 0===o?0:o,a=function(e){return"queue"===e?"prependQueue":e?"prepend":"append"}(r),l="prependQueue"===a,s=document.createElement("style");s.setAttribute(Ci,a),l&&i&&s.setAttribute(ki,"".concat(i)),null!=n&&n.nonce&&(s.nonce=null==n?void 0:n.nonce),s.innerHTML=e;var c=$i(t),u=c.firstChild;if(r){if(l){var d=_i(c).filter((function(e){if(!["prepend","prependQueue"].includes(e.getAttribute(Ci)))return!1;var t=Number(e.getAttribute(ki)||0);return i>=t}));if(d.length)return c.insertBefore(s,d[d.length-1].nextSibling),s}c.insertBefore(s,u)}else c.appendChild(s);return s}function Ai(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!function(e,t){var n=Mi.get(e);if(!n||!function(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}(document,n)){var r=Pi("",t),o=r.parentNode;Mi.set(e,o),e.removeChild(r)}}($i(n),n);var r,o,i,a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return _i($i(t)).find((function(n){return n.getAttribute(Ii(t))===e}))}(t,n);if(a)return null!==(r=n.csp)&&void 0!==r&&r.nonce&&a.nonce!==(null===(o=n.csp)||void 0===o?void 0:o.nonce)&&(a.nonce=null===(i=n.csp)||void 0===i?void 0:i.nonce),a.innerHTML!==e&&(a.innerHTML=e),a;var l=Pi(e,n);return l.setAttribute(Ii(n),t),l}function Ni(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}function Ti(e){return"object"===yi(e)&&"string"==typeof e.name&&"string"==typeof e.theme&&("object"===yi(e.icon)||"function"==typeof e.icon)}function Ri(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(t,n){var r=e[n];return"class"===n?(t.className=r,delete t.class):(delete t[n],t[function(e){return e.replace(/-(.)/g,(function(e,t){return t.toUpperCase()}))}(n)]=r),t}),{})}function Li(e,t,n){return n?r.createElement(e.tag,Ei(Ei({key:t},Ri(e.attrs)),n),(e.children||[]).map((function(n,r){return Li(n,"".concat(t,"-").concat(e.tag,"-").concat(r))}))):r.createElement(e.tag,Ei({key:t},Ri(e.attrs)),(e.children||[]).map((function(n,r){return Li(n,"".concat(t,"-").concat(e.tag,"-").concat(r))})))}function Di(e){return ro(e)[0]}function ji(e){return e?Array.isArray(e)?e:[e]:[]}var Fi=["icon","className","onClick","style","primaryColor","secondaryColor"],Bi={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1},zi=function(e){var t,n,o,i,a,l=e.icon,s=e.className,c=e.onClick,u=e.style,d=e.primaryColor,f=e.secondaryColor,p=xi(e,Fi),h=r.useRef(),g=Bi;if(d&&(g={primaryColor:d,secondaryColor:f||Di(d)}),t=h,n=(0,r.useContext)(wi),o=n.csp,i=n.prefixCls,a="\n.anticon {\n display: inline-block;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n",i&&(a=a.replace(/anticon/g,i)),(0,r.useEffect)((function(){var e,n=function(e){return Ni(e)instanceof ShadowRoot}(e=t.current)?Ni(e):null;Ai(a,"@ant-design-icons",{prepend:!0,csp:o,attachTo:n})}),[]),function(e,t){m(e,"[@ant-design/icons] ".concat(t))}(Ti(l),"icon should be icon definiton, but got ".concat(l)),!Ti(l))return null;var v=l;return v&&"function"==typeof v.icon&&(v=Ei(Ei({},v),{},{icon:v.icon(g.primaryColor,g.secondaryColor)})),Li(v.icon,"svg-".concat(v.name),Ei(Ei({className:s,onClick:c,style:u,"data-icon":v.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},p),{},{ref:h}))};zi.displayName="IconReact",zi.getTwoToneColors=function(){return Ei({},Bi)},zi.setTwoToneColors=function(e){var t=e.primaryColor,n=e.secondaryColor;Bi.primaryColor=t,Bi.secondaryColor=n||Di(t),Bi.calculated=!!n};const Hi=zi;function Ui(e){var t=vi(ji(e),2),n=t[0],r=t[1];return Hi.setTwoToneColors({primaryColor:n,secondaryColor:r})}var Wi=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];Ui(so.primary);var Vi=r.forwardRef((function(e,t){var n,o=e.className,i=e.icon,l=e.spin,s=e.rotate,c=e.tabIndex,u=e.onClick,d=e.twoToneColor,f=xi(e,Wi),p=r.useContext(wi),h=p.prefixCls,g=void 0===h?"anticon":h,m=p.rootClassName,v=a()(m,g,(bi(n={},"".concat(g,"-").concat(i.name),!!i.name),bi(n,"".concat(g,"-spin"),!!l||"loading"===i.name),n),o),y=c;void 0===y&&u&&(y=-1);var b=s?{msTransform:"rotate(".concat(s,"deg)"),transform:"rotate(".concat(s,"deg)")}:void 0,x=vi(ji(d),2),w=x[0],S=x[1];return r.createElement("span",hi({role:"img","aria-label":i.name},f,{ref:t,tabIndex:y,onClick:u,className:v}),r.createElement(Hi,{icon:i,primaryColor:w,secondaryColor:S,style:b}))}));Vi.displayName="AntdIcon",Vi.getTwoToneColor=function(){var e=Hi.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor},Vi.setTwoToneColor=Ui;const Xi=Vi;var qi=function(e,t){return r.createElement(Xi,hi({},e,{ref:t,icon:gi}))};const Gi=r.forwardRef(qi),Yi={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"};var Ki=function(e,t){return r.createElement(Xi,hi({},e,{ref:t,icon:Yi}))};const Zi=r.forwardRef(Ki),Ji={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"};var Qi=function(e,t){return r.createElement(Xi,hi({},e,{ref:t,icon:Ji}))};const ea=r.forwardRef(Qi),ta={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"};var na=function(e,t){return r.createElement(Xi,hi({},e,{ref:t,icon:ta}))};const ra=r.forwardRef(na),oa={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"};var ia=function(e,t){return r.createElement(Xi,hi({},e,{ref:t,icon:oa}))};const aa=r.forwardRef(ia);function la(e){return function(e){return e instanceof HTMLElement||e instanceof SVGElement}(e)?e:e instanceof r.Component?w.findDOMNode(e):null}var sa=n(5356);function ca(e,t,n){var o=r.useRef({});return"value"in o.current&&!n(o.current.condition,t)||(o.current.value=e(),o.current.condition=t),o.current.value}function ua(e,t){"function"==typeof e?e(t):"object"===Oe(e)&&e&&"current"in e&&(e.current=t)}function da(){for(var e=arguments.length,t=new Array(e),n=0;n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var ga=["children"],ma=r.createContext({});function va(e){var t=e.children,n=ha(e,ga);return r.createElement(ma.Provider,{value:n},t)}function ya(e,t){return ya=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ya(e,t)}function ba(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ya(e,t)}function xa(e){return xa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},xa(e)}function wa(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Sa(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=xa(e);if(t){var o=xa(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===Oe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return wa(e)}(this,n)}}const Ea=function(e){ba(n,e);var t=Sa(n);function n(){return rt(this,n),t.apply(this,arguments)}return it(n,[{key:"render",value:function(){return this.props.children}}]),n}(r.Component);function Ca(e){var t=r.useRef(!1),n=Ne(r.useState(e),2),o=n[0],i=n[1];return r.useEffect((function(){return t.current=!1,function(){t.current=!0}}),[]),[o,function(e,n){n&&t.current||i(e)}]}var ka="none",Oa="appear",Ma="enter",Ia="leave",$a="none",_a="prepare",Pa="start",Aa="active",Na="end",Ta="prepared";function Ra(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}function La(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit".concat(e)]="webkit".concat(t),n["Moz".concat(e)]="moz".concat(t),n["ms".concat(e)]="MS".concat(t),n["O".concat(e)]="o".concat(t.toLowerCase()),n}var Da,ja,Fa,Ba=(Da=Ra(),ja="undefined"!=typeof window?window:{},Fa={animationend:La("Animation","AnimationEnd"),transitionend:La("Transition","TransitionEnd")},Da&&("AnimationEvent"in ja||delete Fa.animationend.animation,"TransitionEvent"in ja||delete Fa.transitionend.transition),Fa),za={};if(Ra()){var Ha=document.createElement("div");za=Ha.style}var Ua={};function Wa(e){if(Ua[e])return Ua[e];var t=Ba[e];if(t)for(var n=Object.keys(t),r=n.length,o=0;o1&&void 0!==arguments[1]?arguments[1]:1),t};rl.cancel=function(e){var t=tl.get(e);return nl(t),Qa(t)};const ol=rl;var il=[_a,Pa,Aa,Na],al=[_a,Ta];function ll(e){return e===Aa||e===Na}const sl=function(e){var t=e;"object"===Oe(e)&&(t=e.transitionSupport);var n=r.forwardRef((function(e,n){var o=e.visible,i=void 0===o||o,l=e.removeOnLeave,s=void 0===l||l,c=e.forceRender,u=e.children,d=e.motionName,f=e.leavedClassName,p=e.eventProps,h=function(e,n){return!(!e.motionName||!t||!1===n)}(e,r.useContext(ma).motion),g=(0,r.useRef)(),m=(0,r.useRef)(),v=function(e,t,n,o){var i=o.motionEnter,a=void 0===i||i,l=o.motionAppear,s=void 0===l||l,c=o.motionLeave,u=void 0===c||c,d=o.motionDeadline,f=o.motionLeaveImmediately,p=o.onAppearPrepare,h=o.onEnterPrepare,g=o.onLeavePrepare,m=o.onAppearStart,v=o.onEnterStart,y=o.onLeaveStart,b=o.onAppearActive,x=o.onEnterActive,w=o.onLeaveActive,S=o.onAppearEnd,E=o.onEnterEnd,C=o.onLeaveEnd,k=o.onVisibleChanged,O=Ne(Ca(),2),M=O[0],I=O[1],$=Ne(Ca(ka),2),_=$[0],P=$[1],A=Ne(Ca(null),2),N=A[0],T=A[1],R=(0,r.useRef)(!1),L=(0,r.useRef)(null);function D(){return n()}var j=(0,r.useRef)(!1);function F(){P(ka,!0),T(null,!0)}function B(e){var t=D();if(!e||e.deadline||e.target===t){var n,r=j.current;_===Oa&&r?n=null==S?void 0:S(t,e):_===Ma&&r?n=null==E?void 0:E(t,e):_===Ia&&r&&(n=null==C?void 0:C(t,e)),_!==ka&&r&&!1!==n&&F()}}var z=Ne(function(e){var t=(0,r.useRef)(),n=(0,r.useRef)(e);n.current=e;var o=r.useCallback((function(e){n.current(e)}),[]);function i(e){e&&(e.removeEventListener(Ya,o),e.removeEventListener(Ga,o))}return r.useEffect((function(){return function(){i(t.current)}}),[]),[function(e){t.current&&t.current!==e&&i(t.current),e&&e!==t.current&&(e.addEventListener(Ya,o),e.addEventListener(Ga,o),t.current=e)},i]}(B),1)[0],H=function(e){var t,n,r;switch(e){case Oa:return Ie(t={},_a,p),Ie(t,Pa,m),Ie(t,Aa,b),t;case Ma:return Ie(n={},_a,h),Ie(n,Pa,v),Ie(n,Aa,x),n;case Ia:return Ie(r={},_a,g),Ie(r,Pa,y),Ie(r,Aa,w),r;default:return{}}},U=r.useMemo((function(){return H(_)}),[_]),W=Ne(function(e,t,n){var o=Ne(Ca($a),2),i=o[0],a=o[1],l=function(){var e=r.useRef(null);function t(){ol.cancel(e.current)}return r.useEffect((function(){return function(){t()}}),[]),[function n(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;t();var i=ol((function(){o<=1?r({isCanceled:function(){return i!==e.current}}):n(r,o-1)}));e.current=i},t]}(),s=Ne(l,2),c=s[0],u=s[1],d=t?al:il;return Za((function(){if(i!==$a&&i!==Na){var e=d.indexOf(i),t=d[e+1],r=n(i);!1===r?a(t,!0):t&&c((function(e){function n(){e.isCanceled()||a(t,!0)}!0===r?n():Promise.resolve(r).then(n)}))}}),[e,i]),r.useEffect((function(){return function(){u()}}),[]),[function(){a(_a,!0)},i]}(_,!e,(function(e){if(e===_a){var t=U[_a];return!!t&&t(D())}var n;return X in U&&T((null===(n=U[X])||void 0===n?void 0:n.call(U,D(),null))||null),X===Aa&&(z(D()),d>0&&(clearTimeout(L.current),L.current=setTimeout((function(){B({deadline:!0})}),d))),X===Ta&&F(),true})),2),V=W[0],X=W[1],q=ll(X);j.current=q,Za((function(){I(t);var n,r=R.current;R.current=!0,!r&&t&&s&&(n=Oa),r&&t&&a&&(n=Ma),(r&&!t&&u||!r&&f&&!t&&u)&&(n=Ia);var o=H(n);n&&(e||o[_a])?(P(n),V()):P(ka)}),[t]),(0,r.useEffect)((function(){(_===Oa&&!s||_===Ma&&!a||_===Ia&&!u)&&P(ka)}),[s,a,u]),(0,r.useEffect)((function(){return function(){R.current=!1,clearTimeout(L.current)}}),[]);var G=r.useRef(!1);(0,r.useEffect)((function(){M&&(G.current=!0),void 0!==M&&_===ka&&((G.current||M)&&(null==k||k(M)),G.current=!0)}),[M,_]);var Y=N;return U[_a]&&X===Pa&&(Y=De({transition:"none"},Y)),[_,X,Y,null!=M?M:t]}(h,i,(function(){try{return g.current instanceof HTMLElement?g.current:la(m.current)}catch(e){return null}}),e),y=Ne(v,4),b=y[0],x=y[1],w=y[2],S=y[3],E=r.useRef(S);S&&(E.current=!0);var C,k=r.useCallback((function(e){g.current=e,ua(n,e)}),[n]),O=De(De({},p),{},{visible:i});if(u)if(b===ka)C=S?u(De({},O),k):!s&&E.current&&f?u(De(De({},O),{},{className:f}),k):c||!s&&!f?u(De(De({},O),{},{style:{display:"none"}}),k):null;else{var M,I;x===_a?I="prepare":ll(x)?I="active":x===Pa&&(I="start");var $=Ka(d,"".concat(b,"-").concat(I));C=u(De(De({},O),{},{className:a()(Ka(d,b),(M={},Ie(M,$,$&&I),Ie(M,d,"string"==typeof d),M)),style:w}),k)}else C=null;return r.isValidElement(C)&&pa(C)&&(C.ref||(C=r.cloneElement(C,{ref:k}))),r.createElement(Ea,{ref:m},C)}));return n.displayName="CSSMotion",n}(qa);var cl="add",ul="keep",dl="remove",fl="removed";function pl(e){var t;return De(De({},t=e&&"object"===Oe(e)&&"key"in e?e:{key:e}),{},{key:String(t.key)})}function hl(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(pl)}var gl=["component","children","onVisibleChanged","onAllRemoved"],ml=["status"],vl=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];const yl=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:sl,n=function(e){ba(o,e);var n=Sa(o);function o(){var e;rt(this,o);for(var t=arguments.length,r=new Array(t),i=0;i0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[],r=0,o=t.length,i=hl(e),a=hl(t);i.forEach((function(e){for(var t=!1,i=r;i1})).forEach((function(e){(n=n.filter((function(t){var n=t.key,r=t.status;return n!==e||r!==dl}))).forEach((function(t){t.key===e&&(t.status=ul)}))})),n}(r,o);return{keyEntities:i.filter((function(e){var t=r.find((function(t){var n=t.key;return e.key===n}));return!t||t.status!==fl||e.status!==dl}))}}}]),o}(r.Component);return Ie(n,"defaultProps",{component:"div"}),n}(qa),bl=sl;var xl="".concat("accept acceptCharset accessKey action allowFullScreen allowTransparency\n alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge\n charSet checked classID className colSpan cols content contentEditable contextMenu\n controls coords crossOrigin data dateTime default defer dir disabled download draggable\n encType form formAction formEncType formMethod formNoValidate formTarget frameBorder\n headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity\n is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media\n mediaGroup method min minLength multiple muted name noValidate nonce open\n optimum pattern placeholder poster preload radioGroup readOnly rel required\n reversed role rowSpan rows sandbox scope scoped scrolling seamless selected\n shape size sizes span spellCheck src srcDoc srcLang srcSet start step style\n summary tabIndex target title type useMap value width wmode wrap"," ").concat("onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown\n onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick\n onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown\n onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel\n onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough\n onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata\n onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError").split(/[\s\n]+/),wl="aria-",Sl="data-";function El(e,t){return 0===e.indexOf(t)}function Cl(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t=!1===n?{aria:!0,data:!0,attr:!0}:!0===n?{aria:!0}:de({},n);var r={};return Object.keys(e).forEach((function(n){(t.aria&&("role"===n||El(n,wl))||t.data&&El(n,Sl)||t.attr&&xl.includes(n))&&(r[n]=e[n])})),r}const{isValidElement:kl}=o;function Ol(e){return e&&kl(e)&&e.type===r.Fragment}function Ml(e,t,n){return kl(e)?r.cloneElement(e,"function"==typeof n?n(e.props||{}):n):t}function Il(e,t){return Ml(e,e,t)}const $l=(e,t,n,r,o)=>({background:e,border:`${Mt(r.lineWidth)} ${r.lineType} ${t}`,[`${o}-icon`]:{color:n}}),_l=e=>{const{componentCls:t,motionDurationSlow:n,marginXS:r,marginSM:o,fontSize:i,fontSizeLG:a,lineHeight:l,borderRadiusLG:s,motionEaseInOutCirc:c,withDescriptionIconSize:u,colorText:d,colorTextHeading:f,withDescriptionPadding:p,defaultPadding:h}=e;return{[t]:Object.assign(Object.assign({},xr(e)),{position:"relative",display:"flex",alignItems:"center",padding:h,wordWrap:"break-word",borderRadius:s,[`&${t}-rtl`]:{direction:"rtl"},[`${t}-content`]:{flex:1,minWidth:0},[`${t}-icon`]:{marginInlineEnd:r,lineHeight:0},"&-description":{display:"none",fontSize:i,lineHeight:l},"&-message":{color:f},[`&${t}-motion-leave`]:{overflow:"hidden",opacity:1,transition:`max-height ${n} ${c}, opacity ${n} ${c},\n padding-top ${n} ${c}, padding-bottom ${n} ${c},\n margin-bottom ${n} ${c}`},[`&${t}-motion-leave-active`]:{maxHeight:0,marginBottom:"0 !important",paddingTop:0,paddingBottom:0,opacity:0}}),[`${t}-with-description`]:{alignItems:"flex-start",padding:p,[`${t}-icon`]:{marginInlineEnd:o,fontSize:u,lineHeight:0},[`${t}-message`]:{display:"block",marginBottom:r,color:f,fontSize:a},[`${t}-description`]:{display:"block",color:d}},[`${t}-banner`]:{marginBottom:0,border:"0 !important",borderRadius:0}}},Pl=e=>{const{componentCls:t,colorSuccess:n,colorSuccessBorder:r,colorSuccessBg:o,colorWarning:i,colorWarningBorder:a,colorWarningBg:l,colorError:s,colorErrorBorder:c,colorErrorBg:u,colorInfo:d,colorInfoBorder:f,colorInfoBg:p}=e;return{[t]:{"&-success":$l(o,r,n,e,t),"&-info":$l(p,f,d,e,t),"&-warning":$l(l,a,i,e,t),"&-error":Object.assign(Object.assign({},$l(u,c,s,e,t)),{[`${t}-description > pre`]:{margin:0,padding:0}})}}},Al=e=>{const{componentCls:t,iconCls:n,motionDurationMid:r,marginXS:o,fontSizeIcon:i,colorIcon:a,colorIconHover:l}=e;return{[t]:{"&-action":{marginInlineStart:o},[`${t}-close-icon`]:{marginInlineStart:o,padding:0,overflow:"hidden",fontSize:i,lineHeight:Mt(i),backgroundColor:"transparent",border:"none",outline:"none",cursor:"pointer",[`${n}-close`]:{color:a,transition:`color ${r}`,"&:hover":{color:l}}},"&-close-text":{color:a,transition:`color ${r}`,"&:hover":{color:l}}}}},Nl=oi("Alert",(e=>[_l(e),Pl(e),Al(e)]),(e=>({withDescriptionIconSize:e.fontSizeHeading3,defaultPadding:`${e.paddingContentVerticalSM}px 12px`,withDescriptionPadding:`${e.paddingMD}px ${e.paddingContentHorizontalLG}px`})));const Tl={success:Gi,info:aa,error:Zi,warning:ra},Rl=e=>{const{icon:t,prefixCls:n,type:o}=e,i=Tl[o]||null;return t?Ml(t,r.createElement("span",{className:`${n}-icon`},t),(()=>({className:a()(`${n}-icon`,{[t.props.className]:t.props.className})}))):r.createElement(i,{className:`${n}-icon`})},Ll=e=>{const{isClosable:t,prefixCls:n,closeIcon:o,handleClose:i}=e,a=!0===o||void 0===o?r.createElement(ea,null):o;return t?r.createElement("button",{type:"button",onClick:i,className:`${n}-close-icon`,tabIndex:0},a):null},Dl=e=>{const{description:t,prefixCls:n,message:o,banner:i,className:l,rootClassName:s,style:c,onMouseEnter:u,onMouseLeave:d,onClick:f,afterClose:p,showIcon:h,closable:g,closeText:m,closeIcon:v,action:y}=e,b=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o{var n;w(!0),null===(n=e.onClose)||void 0===n||n.call(e,t)},_=r.useMemo((()=>void 0!==e.type?e.type:i?"warning":"info"),[e.type,i]),P=r.useMemo((()=>!!m||("boolean"==typeof g?g:!1!==v&&null!=v)),[m,v,g]),A=!(!i||void 0!==h)||h,N=a()(O,`${O}-${_}`,{[`${O}-with-description`]:!!t,[`${O}-no-icon`]:!A,[`${O}-banner`]:!!i,[`${O}-rtl`]:"rtl"===C},null==k?void 0:k.className,l,s,I),T=Cl(b,{aria:!0,data:!0});return M(r.createElement(bl,{visible:!x,motionName:`${O}-motion`,motionAppear:!1,motionEnter:!1,onLeaveStart:e=>({maxHeight:e.offsetHeight}),onLeaveEnd:p},(n=>{let{className:i,style:l}=n;return r.createElement("div",Object.assign({ref:S,"data-show":!x,className:a()(N,i),style:Object.assign(Object.assign(Object.assign({},null==k?void 0:k.style),c),l),onMouseEnter:u,onMouseLeave:d,onClick:f,role:"alert"},T),A?r.createElement(Rl,{description:t,icon:e.icon,prefixCls:O,type:_}):null,r.createElement("div",{className:`${O}-content`},o?r.createElement("div",{className:`${O}-message`},o):null,t?r.createElement("div",{className:`${O}-description`},t):null),y?r.createElement("div",{className:`${O}-action`},y):null,r.createElement(Ll,{isClosable:P,prefixCls:O,closeIcon:m||v,handleClose:$}))})))};let jl=function(e){Bo(n,e);var t=Ho(n);function n(){var e;return To(this,n),(e=t.apply(this,arguments)).state={error:void 0,info:{componentStack:""}},e}return jo(n,[{key:"componentDidCatch",value:function(e,t){this.setState({error:e,info:t})}},{key:"render",value:function(){const{message:e,description:t,children:n}=this.props,{error:o,info:i}=this.state,a=i&&i.componentStack?i.componentStack:null,l=void 0===e?(o||"").toString():e,s=void 0===t?a:t;return o?r.createElement(Dl,{type:"error",message:l,description:r.createElement("pre",{style:{fontSize:"0.9em",overflowX:"auto"}},s)}):n}}]),n}(r.Component);const Fl=jl,Bl=Dl;Bl.ErrorBoundary=Fl;const zl=Bl,Hl=e=>"object"==typeof e&&null!=e&&1===e.nodeType,Ul=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,Wl=(e,t)=>{if(e.clientHeight{const t=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}})(e);return!!t&&(t.clientHeightit||i>e&&a=t&&l>=n?i-e-r:a>t&&ln?a-t+o:0,Xl=e=>{const t=e.parentElement;return null==t?e.getRootNode().host||null:t},ql=(e,t)=>{var n,r,o,i;if("undefined"==typeof document)return[];const{scrollMode:a,block:l,inline:s,boundary:c,skipOverflowHiddenElements:u}=t,d="function"==typeof c?c:e=>e!==c;if(!Hl(e))throw new TypeError("Invalid target");const f=document.scrollingElement||document.documentElement,p=[];let h=e;for(;Hl(h)&&d(h);){if(h=Xl(h),h===f){p.push(h);break}null!=h&&h===document.body&&Wl(h)&&!Wl(document.documentElement)||null!=h&&Wl(h,u)&&p.push(h)}const g=null!=(r=null==(n=window.visualViewport)?void 0:n.width)?r:innerWidth,m=null!=(i=null==(o=window.visualViewport)?void 0:o.height)?i:innerHeight,{scrollX:v,scrollY:y}=window,{height:b,width:x,top:w,right:S,bottom:E,left:C}=e.getBoundingClientRect(),{top:k,right:O,bottom:M,left:I}=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);let $="start"===l||"nearest"===l?w-k:"end"===l?E+M:w+b/2-k+M,_="center"===s?C+x/2-I+O:"end"===s?S+O:C-I;const P=[];for(let e=0;e=0&&C>=0&&E<=m&&S<=g&&w>=o&&E<=c&&C>=u&&S<=i)return P;const d=getComputedStyle(t),h=parseInt(d.borderLeftWidth,10),k=parseInt(d.borderTopWidth,10),O=parseInt(d.borderRightWidth,10),M=parseInt(d.borderBottomWidth,10);let I=0,A=0;const N="offsetWidth"in t?t.offsetWidth-t.clientWidth-h-O:0,T="offsetHeight"in t?t.offsetHeight-t.clientHeight-k-M:0,R="offsetWidth"in t?0===t.offsetWidth?0:r/t.offsetWidth:0,L="offsetHeight"in t?0===t.offsetHeight?0:n/t.offsetHeight:0;if(f===t)I="start"===l?$:"end"===l?$-m:"nearest"===l?Vl(y,y+m,m,k,M,y+$,y+$+b,b):$-m/2,A="start"===s?_:"center"===s?_-g/2:"end"===s?_-g:Vl(v,v+g,g,h,O,v+_,v+_+x,x),I=Math.max(0,I+y),A=Math.max(0,A+v);else{I="start"===l?$-o-k:"end"===l?$-c+M+T:"nearest"===l?Vl(o,c,n,k,M+T,$,$+b,b):$-(o+n/2)+T/2,A="start"===s?_-u-h:"center"===s?_-(u+r/2)+N/2:"end"===s?_-i+O+N:Vl(u,i,r,h,O+N,_,_+x,x);const{scrollLeft:e,scrollTop:a}=t;I=0===L?0:Math.max(0,Math.min(a+I/L,t.scrollHeight-n/L+T)),A=0===R?0:Math.max(0,Math.min(e+A/R,t.scrollWidth-r/R+N)),$+=a-I,_+=e-A}P.push({el:t,top:I,left:A})}return P},Gl=e=>!1===e?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&0!==Object.keys(e).length)(e)?e:{block:"start",inline:"nearest"};function Yl(e,t){if(!e.isConnected||!(e=>{let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1})(e))return;const n=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);if((e=>"object"==typeof e&&"function"==typeof e.behavior)(t))return t.behavior(ql(e,t));const r="boolean"==typeof t||null==t?void 0:t.behavior;for(const{el:o,top:i,left:a}of ql(e,Gl(t))){const e=i-n.top+n.bottom,t=a-n.left+n.right;o.scroll({top:e,left:t,behavior:r})}}function Kl(e){return null!=e&&e===e.window}function Zl(e,t){var n,r;if("undefined"==typeof window)return 0;const o=t?"scrollTop":"scrollLeft";let i=0;return Kl(e)?i=e[t?"pageYOffset":"pageXOffset"]:e instanceof Document?i=e.documentElement[o]:(e instanceof HTMLElement||e)&&(i=e[o]),e&&!Kl(e)&&"number"!=typeof i&&(i=null===(r=(null!==(n=e.ownerDocument)&&void 0!==n?n:e).documentElement)||void 0===r?void 0:r[o]),i}function Jl(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{getContainer:n=(()=>window),callback:r,duration:o=450}=t,i=n(),a=Zl(i,!0),l=Date.now(),s=()=>{const t=Date.now()-l,n=function(e,t,n,r){const o=n-t;return(e/=r/2)<1?o/2*e*e*e+t:o/2*((e-=2)*e*e+2)+t}(t>o?o:t,a,e,o);Kl(i)?i.scrollTo(window.pageXOffset,n):i instanceof Document||"HTMLDocument"===i.constructor.name?i.documentElement.scrollTop=n:i.scrollTop=n,t{const[,,,,t]=No();return t?`${e}-css-var`:""},es=r.createContext(void 0),ts=e=>{const{href:t,title:n,prefixCls:o,children:i,className:l,target:s,replace:c}=e,u=r.useContext(es),{registerLink:d,unregisterLink:f,scrollTo:p,onClick:h,activeLink:g,direction:m}=u||{};r.useEffect((()=>(null==d||d(t),()=>{null==f||f(t)})),[t]);const{getPrefixCls:v}=r.useContext(Ce),y=v("anchor",o),b=g===t,x=a()(`${y}-link`,l,{[`${y}-link-active`]:b}),w=a()(`${y}-link-title`,{[`${y}-link-title-active`]:b});return r.createElement("div",{className:x},r.createElement("a",{className:w,href:t,title:"string"==typeof n?n:"",target:s,onClick:e=>{c&&(e.preventDefault(),window.location.replace(t)),null==h||h(e,{title:n,href:t}),null==p||p(t)}},n),"horizontal"!==m?i:null)},ns=e=>{const{componentCls:t,holderOffsetBlock:n,motionDurationSlow:r,lineWidthBold:o,colorPrimary:i,lineType:a,colorSplit:l,calc:s}=e;return{[`${t}-wrapper`]:{marginBlockStart:s(n).mul(-1).equal(),paddingBlockStart:n,[t]:Object.assign(Object.assign({},xr(e)),{position:"relative",paddingInlineStart:o,[`${t}-link`]:{paddingBlock:e.linkPaddingBlock,paddingInline:`${Mt(e.linkPaddingInlineStart)} 0`,"&-title":Object.assign(Object.assign({},br),{position:"relative",display:"block",marginBlockEnd:e.anchorTitleBlock,color:e.colorText,transition:`all ${e.motionDurationSlow}`,"&:only-child":{marginBlockEnd:0}}),[`&-active > ${t}-link-title`]:{color:e.colorPrimary},[`${t}-link`]:{paddingBlock:e.anchorPaddingBlockSecondary}}}),[`&:not(${t}-wrapper-horizontal)`]:{[t]:{"&::before":{position:"absolute",insetInlineStart:0,top:0,height:"100%",borderInlineStart:`${Mt(o)} ${a} ${l}`,content:'" "'},[`${t}-ink`]:{position:"absolute",insetInlineStart:0,display:"none",transform:"translateY(-50%)",transition:`top ${r} ease-in-out`,width:o,backgroundColor:i,[`&${t}-ink-visible`]:{display:"inline-block"}}}},[`${t}-fixed ${t}-ink ${t}-ink`]:{display:"none"}}}},rs=e=>{const{componentCls:t,motionDurationSlow:n,lineWidthBold:r,colorPrimary:o}=e;return{[`${t}-wrapper-horizontal`]:{position:"relative","&::before":{position:"absolute",left:{_skip_check_:!0,value:0},right:{_skip_check_:!0,value:0},bottom:0,borderBottom:`${Mt(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,content:'" "'},[t]:{overflowX:"scroll",position:"relative",display:"flex",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"},[`${t}-link:first-of-type`]:{paddingInline:0},[`${t}-ink`]:{position:"absolute",bottom:0,transition:`left ${n} ease-in-out, width ${n} ease-in-out`,height:r,backgroundColor:o}}}}},os=oi("Anchor",(e=>{const{fontSize:t,fontSizeLG:n,paddingXXS:r,calc:o}=e,i=Ko(e,{holderOffsetBlock:r,anchorPaddingBlockSecondary:o(r).div(2).equal(),anchorTitleBlock:o(t).div(14).mul(3).equal(),anchorBallSize:o(n).div(2).equal()});return[ns(i),rs(i)]}),(e=>({linkPaddingBlock:e.paddingXXS,linkPaddingInlineStart:e.padding})));function is(){return window}function as(e,t){if(!e.getClientRects().length)return 0;const n=e.getBoundingClientRect();return n.width||n.height?t===window?(t=e.ownerDocument.documentElement,n.top-t.clientTop):n.top-t.getBoundingClientRect().top:n.top}const ls=/#([\S ]+)$/,ss=e=>{var t;const{rootClassName:n,prefixCls:o,className:i,style:l,offsetTop:s,affix:c=!0,showInkInFixed:u=!1,children:d,items:f,direction:p="vertical",bounds:h,targetOffset:g,onClick:m,onChange:v,getContainer:y,getCurrentAnchor:b,replace:x}=e,[w,S]=r.useState([]),[E,C]=r.useState(null),k=r.useRef(E),O=r.useRef(null),M=r.useRef(null),I=r.useRef(!1),{direction:$,anchor:_,getTargetContainer:P,getPrefixCls:A}=r.useContext(Ce),N=A("anchor",o),T=Ql(N),[R,L]=os(N,T),D=null!==(t=null!=y?y:P)&&void 0!==t?t:is,j=JSON.stringify(w),F=Jn((e=>{w.includes(e)||S((t=>[].concat(he(t),[e])))})),B=Jn((e=>{w.includes(e)&&S((t=>t.filter((t=>t!==e))))})),z=Jn((e=>{if(k.current===e)return;const t="function"==typeof b?b(e):e;C(t),k.current=t,null==v||v(e)})),H=r.useCallback((()=>{if(I.current)return;const e=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5;const r=[],o=D();if(e.forEach((e=>{const i=ls.exec(null==e?void 0:e.toString());if(!i)return;const a=document.getElementById(i[1]);if(a){const i=as(a,o);it.top>e.top?t:e));return e.link}return""}(w,void 0!==g?g:s||0,h);z(e)}),[j,g,s]),U=r.useCallback((e=>{z(e);const t=ls.exec(e);if(!t)return;const n=document.getElementById(t[1]);if(!n)return;const r=D();let o=Zl(r,!0)+as(n,r);o-=void 0!==g?g:s||0,I.current=!0,Jl(o,{getContainer:D,callback(){I.current=!1}})}),[g,s]),W=a()(L,T,n,`${N}-wrapper`,{[`${N}-wrapper-horizontal`]:"horizontal"===p,[`${N}-rtl`]:"rtl"===$},i,null==_?void 0:_.className),V=a()(N,{[`${N}-fixed`]:!c&&!u}),X=a()(`${N}-ink`,{[`${N}-ink-visible`]:E}),q=Object.assign(Object.assign({maxHeight:s?`calc(100vh - ${s}px)`:"100vh"},null==_?void 0:_.style),l),G=e=>Array.isArray(e)?e.map((e=>r.createElement(ts,Object.assign({replace:x},e,{key:e.key}),"vertical"===p&&G(e.children)))):null,Y=r.createElement("div",{ref:O,className:W,style:q},r.createElement("div",{className:V},r.createElement("span",{className:X,ref:M}),"items"in e?G(f):d));r.useEffect((()=>{const e=D();return H(),null==e||e.addEventListener("scroll",H),()=>{null==e||e.removeEventListener("scroll",H)}}),[j]),r.useEffect((()=>{"function"==typeof b&&z(b(k.current||""))}),[b]),r.useEffect((()=>{(()=>{var e;const t=null===(e=O.current)||void 0===e?void 0:e.querySelector(`.${N}-link-title-active`);if(t&&M.current){const{style:e}=M.current,n="horizontal"===p;e.top=n?"":`${t.offsetTop+t.clientHeight/2}px`,e.height=n?"":`${t.clientHeight}px`,e.left=n?`${t.offsetLeft}px`:"",e.width=n?`${t.clientWidth}px`:"",n&&Yl(t,{scrollMode:"if-needed",block:"nearest"})}})()}),[p,b,j,E]);const K=r.useMemo((()=>({registerLink:F,unregisterLink:B,scrollTo:U,activeLink:E,onClick:m,direction:p})),[E,m,U,p]);return R(r.createElement(es.Provider,{value:K},c?r.createElement(pi,{offsetTop:s,target:D},Y):Y))};ss.Link=ts;const cs=ss;var us={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){var t=e.keyCode;if(e.altKey&&!e.ctrlKey||e.metaKey||t>=us.F1&&t<=us.F12)return!1;switch(t){case us.ALT:case us.CAPS_LOCK:case us.CONTEXT_MENU:case us.CTRL:case us.DOWN:case us.END:case us.ESC:case us.HOME:case us.INSERT:case us.LEFT:case us.MAC_FF_META:case us.META:case us.NUMLOCK:case us.NUM_CENTER:case us.PAGE_DOWN:case us.PAGE_UP:case us.PAUSE:case us.PRINT_SCREEN:case us.RIGHT:case us.SHIFT:case us.UP:case us.WIN_KEY:case us.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=us.ZERO&&e<=us.NINE)return!0;if(e>=us.NUM_ZERO&&e<=us.NUM_MULTIPLY)return!0;if(e>=us.A&&e<=us.Z)return!0;if(-1!==window.navigator.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case us.SPACE:case us.QUESTION_MARK:case us.NUM_PLUS:case us.NUM_MINUS:case us.NUM_PERIOD:case us.NUM_DIVISION:case us.SEMICOLON:case us.DASH:case us.EQUALS:case us.COMMA:case us.PERIOD:case us.SLASH:case us.APOSTROPHE:case us.SINGLE_QUOTE:case us.OPEN_SQUARE_BRACKET:case us.BACKSLASH:case us.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};const ds=us;var fs=r.forwardRef((function(e,t){var n=e.prefixCls,o=e.style,i=e.className,l=e.duration,s=void 0===l?4.5:l,c=e.eventKey,u=e.content,d=e.closable,f=e.closeIcon,p=void 0===f?"x":f,h=e.props,g=e.onClick,m=e.onNoticeClose,v=e.times,y=e.hovering,b=Ne(r.useState(!1),2),x=b[0],w=b[1],S=y||x,E=function(){m(c)};r.useEffect((function(){if(!S&&s>0){var e=setTimeout((function(){E()}),1e3*s);return function(){clearTimeout(e)}}}),[s,S,v]);var C="".concat(n,"-notice");return r.createElement("div",Xt({},h,{ref:t,className:a()(C,i,Ie({},"".concat(C,"-closable"),d)),style:o,onMouseEnter:function(e){var t;w(!0),null==h||null===(t=h.onMouseEnter)||void 0===t||t.call(h,e)},onMouseLeave:function(e){var t;w(!1),null==h||null===(t=h.onMouseLeave)||void 0===t||t.call(h,e)},onClick:g}),r.createElement("div",{className:"".concat(C,"-content")},u),d&&r.createElement("a",{tabIndex:0,className:"".concat(C,"-close"),onKeyDown:function(e){"Enter"!==e.key&&"Enter"!==e.code&&e.keyCode!==ds.ENTER||E()},onClick:function(e){e.preventDefault(),e.stopPropagation(),E()}},p))}));const ps=fs;var hs=r.createContext({});const gs=function(e){var t=e.children,n=e.classNames;return r.createElement(hs.Provider,{value:{classNames:n}},t)};var ms=["className","style","classNames","styles"];const vs=function(e){var t,n=e.configList,o=e.placement,i=e.prefixCls,l=e.className,s=e.style,c=e.motion,u=e.onAllNoticeRemoved,d=e.onNoticeClose,f=e.stack,p=(0,r.useContext)(hs).classNames,h=(0,r.useRef)({}),g=Ne((0,r.useState)(null),2),m=g[0],v=g[1],y=Ne((0,r.useState)([]),2),b=y[0],x=y[1],w=n.map((function(e){return{config:e,key:String(e.key)}})),S=Ne(function(e){var t,n,r,o={offset:8,threshold:3,gap:16};return e&&"object"===Oe(e)&&(o.offset=null!==(t=e.offset)&&void 0!==t?t:8,o.threshold=null!==(n=e.threshold)&&void 0!==n?n:3,o.gap=null!==(r=e.gap)&&void 0!==r?r:16),[!!e,o]}(f),2),E=S[0],C=S[1],k=C.offset,O=C.threshold,M=C.gap,I=E&&(b.length>0||w.length<=O),$="function"==typeof c?c(o):c;return(0,r.useEffect)((function(){E&&b.length>1&&x((function(e){return e.filter((function(e){return w.some((function(t){var n=t.key;return e===n}))}))}))}),[b,w,E]),(0,r.useEffect)((function(){var e,t;E&&h.current[null===(e=w[w.length-1])||void 0===e?void 0:e.key]&&v(h.current[null===(t=w[w.length-1])||void 0===t?void 0:t.key])}),[w,E]),r.createElement(yl,Xt({key:o,className:a()(i,"".concat(i,"-").concat(o),null==p?void 0:p.list,l,(t={},Ie(t,"".concat(i,"-stack"),!!E),Ie(t,"".concat(i,"-stack-expanded"),I),t)),style:s,keys:w,motionAppear:!0},$,{onAllRemoved:function(){u(o)}}),(function(e,t){var n=e.config,l=e.className,s=e.style,c=e.index,u=n,f=u.key,g=u.times,v=String(f),y=n,S=y.className,C=y.style,O=y.classNames,$=y.styles,_=ha(y,ms),P=w.findIndex((function(e){return e.key===v})),A={};if(E){var N=w.length-1-(P>-1?P:c-1),T="top"===o||"bottom"===o?"-50%":"0";if(N>0){var R,L,D;A.height=I?null===(R=h.current[v])||void 0===R?void 0:R.offsetHeight:null==m?void 0:m.offsetHeight;for(var j=0,F=0;F-1?h.current[v]=e:delete h.current[v]},prefixCls:i,classNames:O,styles:$,className:a()(S,null==p?void 0:p.notice),style:C,times:g,key:f,eventKey:f,onNoticeClose:d,hovering:E&&b.length>0})))}))};var ys=r.forwardRef((function(e,t){var n=e.prefixCls,o=void 0===n?"rc-notification":n,i=e.container,a=e.motion,l=e.maxCount,s=e.className,c=e.style,u=e.onAllRemoved,d=e.stack,f=e.renderNotifications,p=Ne(r.useState([]),2),h=p[0],g=p[1],m=function(e){var t,n=h.find((function(t){return t.key===e}));null==n||null===(t=n.onClose)||void 0===t||t.call(n),g((function(t){return t.filter((function(t){return t.key!==e}))}))};r.useImperativeHandle(t,(function(){return{open:function(e){g((function(t){var n,r=Re(t),o=r.findIndex((function(t){return t.key===e.key})),i=De({},e);return o>=0?(i.times=((null===(n=t[o])||void 0===n?void 0:n.times)||0)+1,r[o]=i):(i.times=0,r.push(i)),l>0&&r.length>l&&(r=r.slice(-l)),r}))},close:function(e){m(e)},destroy:function(){g([])}}}));var v=Ne(r.useState({}),2),y=v[0],b=v[1];r.useEffect((function(){var e={};h.forEach((function(t){var n=t.placement,r=void 0===n?"topRight":n;r&&(e[r]=e[r]||[],e[r].push(t))})),Object.keys(y).forEach((function(t){e[t]=e[t]||[]})),b(e)}),[h]);var x=function(e){b((function(t){var n=De({},t);return(n[e]||[]).length||delete n[e],n}))},S=r.useRef(!1);if(r.useEffect((function(){Object.keys(y).length>0?S.current=!0:S.current&&(null==u||u(),S.current=!1)}),[y]),!i)return null;var E=Object.keys(y);return(0,w.createPortal)(r.createElement(r.Fragment,null,E.map((function(e){var t=y[e],n=r.createElement(vs,{key:e,configList:t,placement:e,prefixCls:o,className:null==s?void 0:s(e),style:null==c?void 0:c(e),motion:a,onNoticeClose:m,onAllNoticeRemoved:x,stack:d});return f?f(n,{prefixCls:o,key:e}):n}))),i)}));const bs=ys;var xs=["getContainer","motion","prefixCls","maxCount","className","style","onAllRemoved","stack","renderNotifications"],ws=function(){return document.body},Ss=0;function Es(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.getContainer,n=void 0===t?ws:t,o=e.motion,i=e.prefixCls,a=e.maxCount,l=e.className,s=e.style,c=e.onAllRemoved,u=e.stack,d=e.renderNotifications,f=ha(e,xs),p=Ne(r.useState(),2),h=p[0],g=p[1],m=r.useRef(),v=r.createElement(bs,{container:h,ref:m,prefixCls:i,motion:o,maxCount:a,className:l,style:s,onAllRemoved:c,stack:u,renderNotifications:d}),y=Ne(r.useState([]),2),b=y[0],x=y[1],w=r.useMemo((function(){return{open:function(e){var t=function(){for(var e={},t=arguments.length,n=new Array(t),r=0;r{const e=()=>{};return e.deprecated=Cs,e},Ms={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"};var Is=function(e,t){return r.createElement(Xi,hi({},e,{ref:t,icon:Ms}))};const $s=r.forwardRef(Is),_s=r.createContext(void 0),Ps=100,As=1e3,Ns={Modal:Ps,Drawer:Ps,Popover:Ps,Popconfirm:Ps,Tooltip:Ps,Tour:Ps},Ts={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1};function Rs(e,t){const[,n]=No(),o=r.useContext(_s),i=function(e){return e in Ns}(e);if(void 0!==t)return[t,t];let a=null!=o?o:0;return i?(a+=(o?0:n.zIndexPopupBase)+Ns[e],a=Math.min(a,n.zIndexPopupBase+As)):a+=Ts[e],[void 0===o?t:a,a]}const Ls=e=>{const{componentCls:t,iconCls:n,boxShadow:r,colorText:o,colorSuccess:i,colorError:a,colorWarning:l,colorInfo:s,fontSizeLG:c,motionEaseInOutCirc:u,motionDurationSlow:d,marginXS:f,paddingXS:p,borderRadiusLG:h,zIndexPopup:g,contentPadding:m,contentBg:v}=e,y=`${t}-notice`,b=new Kn("MessageMoveIn",{"0%":{padding:0,transform:"translateY(-100%)",opacity:0},"100%":{padding:p,transform:"translateY(0)",opacity:1}}),x=new Kn("MessageMoveOut",{"0%":{maxHeight:e.height,padding:p,opacity:1},"100%":{maxHeight:0,padding:0,opacity:0}}),w={padding:p,textAlign:"center",[`${t}-custom-content > ${n}`]:{verticalAlign:"text-bottom",marginInlineEnd:f,fontSize:c},[`${y}-content`]:{display:"inline-block",padding:m,background:v,borderRadius:h,boxShadow:r,pointerEvents:"all"},[`${t}-success > ${n}`]:{color:i},[`${t}-error > ${n}`]:{color:a},[`${t}-warning > ${n}`]:{color:l},[`${t}-info > ${n},\n ${t}-loading > ${n}`]:{color:s}};return[{[t]:Object.assign(Object.assign({},xr(e)),{color:o,position:"fixed",top:f,width:"100%",pointerEvents:"none",zIndex:g,[`${t}-move-up`]:{animationFillMode:"forwards"},[`\n ${t}-move-up-appear,\n ${t}-move-up-enter\n `]:{animationName:b,animationDuration:d,animationPlayState:"paused",animationTimingFunction:u},[`\n ${t}-move-up-appear${t}-move-up-appear-active,\n ${t}-move-up-enter${t}-move-up-enter-active\n `]:{animationPlayState:"running"},[`${t}-move-up-leave`]:{animationName:x,animationDuration:d,animationPlayState:"paused",animationTimingFunction:u},[`${t}-move-up-leave${t}-move-up-leave-active`]:{animationPlayState:"running"},"&-rtl":{direction:"rtl",span:{direction:"rtl"}}})},{[t]:{[`${y}-wrapper`]:Object.assign({},w)}},{[`${t}-notice-pure-panel`]:Object.assign(Object.assign({},w),{padding:0,textAlign:"start"})}]},Ds=oi("Message",(e=>{const t=Ko(e,{height:150});return[Ls(t)]}),(e=>({zIndexPopup:e.zIndexPopupBase+As+10,contentBg:e.colorBgElevated,contentPadding:`${(e.controlHeightLG-e.fontSize*e.lineHeight)/2}px ${e.paddingSM}px`})));const js={info:r.createElement(aa,null),success:r.createElement(Gi,null),error:r.createElement(Zi,null),warning:r.createElement(ra,null),loading:r.createElement($s,null)},Fs=e=>{let{prefixCls:t,type:n,icon:o,children:i}=e;return r.createElement("div",{className:a()(`${t}-custom-content`,`${t}-${n}`)},o||js[n],r.createElement("span",null,i))};function Bs(e){let t;const n=new Promise((n=>{t=e((()=>{n(!0)}))})),r=()=>{null==t||t()};return r.then=(e,t)=>n.then(e,t),r.promise=n,r}var zs=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o{let{children:t,prefixCls:n}=e;const[o,i]=Ds(n);return o(r.createElement(gs,{classNames:{list:i,notice:i}},t))},Ws=(e,t)=>{let{prefixCls:n,key:o}=t;return r.createElement(Us,{prefixCls:n,key:o},e)},Vs=r.forwardRef(((e,t)=>{const{top:n,prefixCls:o,getContainer:i,maxCount:l,duration:s=Hs,rtl:c,transitionName:u,onAllRemoved:d}=e,{getPrefixCls:f,getPopupContainer:p,message:h}=r.useContext(Ce),g=o||f("message"),m=r.createElement("span",{className:`${g}-close-x`},r.createElement(ea,{className:`${g}-close-icon`})),[v,y]=Es({prefixCls:g,style:()=>({left:"50%",transform:"translateX(-50%)",top:null!=n?n:8}),className:()=>a()({[`${g}-rtl`]:c}),motion:()=>function(e,t){return{motionName:null!=t?t:`${e}-move-up`}}(g,u),closable:!1,closeIcon:m,duration:s,getContainer:()=>(null==i?void 0:i())||(null==p?void 0:p())||document.body,maxCount:l,onAllRemoved:d,renderNotifications:Ws});return r.useImperativeHandle(t,(()=>Object.assign(Object.assign({},v),{prefixCls:g,message:h}))),y}));let Xs=0;function qs(e){const t=r.useRef(null),n=(Os("Message"),r.useMemo((()=>{const e=e=>{var n;null===(n=t.current)||void 0===n||n.close(e)},n=n=>{if(!t.current){const e=()=>{};return e.then=()=>{},e}const{open:o,prefixCls:i,message:l}=t.current,s=`${i}-notice`,{content:c,icon:u,type:d,key:f,className:p,style:h,onClose:g}=n,m=zs(n,["content","icon","type","key","className","style","onClose"]);let v=f;return null==v&&(Xs+=1,v=`antd-message-${Xs}`),Bs((t=>(o(Object.assign(Object.assign({},m),{key:v,content:r.createElement(Fs,{prefixCls:i,type:d,icon:u},c),placement:"top",className:a()(d&&`${s}-${d}`,p,null==l?void 0:l.className),style:Object.assign(Object.assign({},null==l?void 0:l.style),h),onClose:()=>{null==g||g(),t()}})),()=>{e(v)})))},o={open:n,destroy:n=>{var r;void 0!==n?e(n):null===(r=t.current)||void 0===r||r.destroy()}};return["info","success","warning","error","loading"].forEach((e=>{o[e]=(t,r,o)=>{let i,a,l;i=t&&"object"==typeof t&&"content"in t?t:{content:t},"function"==typeof r?l=r:(a=r,l=o);const s=Object.assign(Object.assign({onClose:l,duration:a},i),{type:e});return n(s)}})),o}),[]));return[n,r.createElement(Vs,Object.assign({key:"message-holder"},e,{ref:t}))]}function Gs(e){return qs(e)}function Ys(){Ys=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof v?t:v,a=Object.create(i.prototype),l=new P(r||[]);return o(a,"_invoke",{value:M(e,n,l)}),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var f="suspendedStart",p="suspendedYield",h="executing",g="completed",m={};function v(){}function y(){}function b(){}var x={};c(x,a,(function(){return this}));var w=Object.getPrototypeOf,S=w&&w(w(A([])));S&&S!==n&&r.call(S,a)&&(x=S);var E=b.prototype=v.prototype=Object.create(x);function k(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function n(o,i,a,l){var s=d(e[o],e,i);if("throw"!==s.type){var c=s.arg,u=c.value;return u&&"object"==C(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,l)}),(function(e){n("throw",e,a,l)})):t.resolve(u).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,l)}))}l(s.arg)}var i;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return i=i?i.then(o,o):o()}})}function M(t,n,r){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===g){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var l=r.delegate;if(l){var s=I(l,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===f)throw o=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=h;var c=d(t,n,r);if("normal"===c.type){if(o=r.done?g:p,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(o=g,r.method="throw",r.arg=c.arg)}}}function I(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,I(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=d(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function $(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach($,this),this.reset(!0)}function A(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o=0;--i){var a=this.tryEntries[i],l=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;_(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:A(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function Ks(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function Zs(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Ks(i,r,o,a,l,"next",e)}function l(e){Ks(i,r,o,a,l,"throw",e)}a(void 0)}))}}var Js,Qs=de({},S),ec=Qs.version,tc=Qs.render,nc=Qs.unmountComponentAtNode;try{Number((ec||"").split(".")[0])>=18&&(Js=Qs.createRoot)}catch(Ul){}function rc(e){var t=Qs.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;t&&"object"===C(t)&&(t.usingClientEntryPoint=e)}var oc="__rc_react_root__";function ic(e,t){Js?function(e,t){rc(!0);var n=t[oc]||Js(t);rc(!1),n.render(e),t[oc]=n}(e,t):function(e,t){tc(e,t)}(e,t)}function ac(e){return lc.apply(this,arguments)}function lc(){return(lc=Zs(Ys().mark((function e(t){return Ys().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.resolve().then((function(){var e;null===(e=t[oc])||void 0===e||e.unmount(),delete t[oc]})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function sc(e){nc(e)}function cc(e){return uc.apply(this,arguments)}function uc(){return(uc=Zs(Ys().mark((function e(t){return Ys().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===Js){e.next=2;break}return e.abrupt("return",ac(t));case 2:sc(t);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}const dc=(0,r.createContext)(void 0),fc={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"},pc={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},hc={lang:Object.assign({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},{locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",yearFormat:"YYYY",dateFormat:"M/D/YYYY",dayFormat:"D",dateTimeFormat:"M/D/YYYY HH:mm:ss",monthBeforeYear:!0,previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"}),timePickerLocale:Object.assign({},pc)},gc=hc,mc="${label} is not a valid ${type}",vc={locale:"en",Pagination:fc,DatePicker:hc,TimePicker:pc,Calendar:gc,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckall:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand"},PageHeader:{back:"Back"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:mc,method:mc,array:mc,object:mc,number:mc,date:mc,boolean:mc,integer:mc,float:mc,regexp:mc,email:mc,url:mc,hex:mc},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"},QRCode:{expired:"QR code expired",refresh:"Refresh"},ColorPicker:{presetEmpty:"Empty"}};let yc=Object.assign({},vc.Modal),bc=[];const xc=()=>bc.reduce(((e,t)=>Object.assign(Object.assign({},e),t)),vc.Modal);function wc(){return yc}const Sc=(0,r.createContext)(void 0),Ec=e=>{const{locale:t={},children:n,_ANT_MARK__:o}=e;r.useEffect((()=>{const e=function(e){if(e){const t=Object.assign({},e);return bc.push(t),yc=xc(),()=>{bc=bc.filter((e=>e!==t)),yc=xc()}}yc=Object.assign({},vc.Modal)}(t&&t.Modal);return e}),[t]);const i=r.useMemo((()=>Object.assign(Object.assign({},t),{exist:!0})),[t]);return r.createElement(Sc.Provider,{value:i},n)},Cc=`-ant-${Date.now()}-${Math.random()}`;const kc=r.createContext(!1),Oc=e=>{let{children:t,disabled:n}=e;const o=r.useContext(kc);return r.createElement(kc.Provider,{value:null!=n?n:o},t)},Mc=kc,Ic=r.createContext(void 0),$c=e=>{let{children:t,size:n}=e;const o=r.useContext(Ic);return r.createElement(Ic.Provider,{value:n||o},t)},_c=Ic,Pc=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=new Set;return function e(t,o){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=r.has(t);if(m(!a,"Warning: There may be circular references"),a)return!1;if(t===o)return!0;if(n&&i>1)return!1;r.add(t);var l=i+1;if(Array.isArray(t)){if(!Array.isArray(o)||t.length!==o.length)return!1;for(var s=0;s"":Nc;function Rc(e){const{children:t}=e,[,n]=No(),{motion:o}=n,i=r.useRef(!1);return i.current=i.current||!1===o,i.current?r.createElement(va,{motion:o},t):t}const Lc=()=>null;const Dc=["getTargetContainer","getPopupContainer","renderEmpty","pageHeader","input","pagination","form","select","button"];let jc,Fc,Bc;function zc(){return jc||"ant"}function Hc(){return Fc||Ee}const Uc=()=>({getPrefixCls:(e,t)=>t||(e?`${zc()}-${e}`:zc()),getIconPrefixCls:Hc,getRootPrefixCls:()=>jc||zc(),getTheme:()=>Bc}),Wc=e=>{const{children:t,csp:n,autoInsertSpaceInButton:o,alert:i,anchor:a,form:l,locale:s,componentSize:c,direction:u,space:d,virtual:f,dropdownMatchSelectWidth:p,popupMatchSelectWidth:h,popupOverflow:g,legacyLocale:m,parentContext:v,iconPrefixCls:y,theme:b,componentDisabled:x,segmented:w,statistic:S,spin:E,calendar:O,carousel:M,cascader:I,collapse:$,typography:_,checkbox:P,descriptions:A,divider:N,drawer:T,skeleton:R,steps:L,image:D,layout:j,list:F,mentions:B,modal:z,progress:H,result:U,slider:W,breadcrumb:V,menu:X,pagination:q,input:G,empty:Y,badge:K,radio:Z,rate:J,switch:Q,transfer:ee,avatar:te,message:ne,tag:re,table:oe,card:ie,tabs:ae,timeline:le,timePicker:se,upload:ce,notification:ue,tree:de,colorPicker:fe,datePicker:pe,rangePicker:he,flex:ge,wave:me,dropdown:ve,warning:ye}=e,be=r.useCallback(((t,n)=>{const{prefixCls:r}=e;if(n)return n;const o=r||v.getPrefixCls("");return t?`${o}-${t}`:o}),[v.getPrefixCls,e.prefixCls]),xe=y||v.iconPrefixCls||Ee,we=n||v.csp;Qo(xe,we);const Se=function(e,t){Os("ConfigProvider");const n=e||{},r=!1!==n.inherit&&t?t:So,o=Tc();return k((()=>{var i,a;if(!e)return t;const l=Object.assign({},r.components);Object.keys(e.components||{}).forEach((t=>{l[t]=Object.assign(Object.assign({},l[t]),e.components[t])}));const s=`css-var-${o.replace(/:/g,"")}`,c=(null!==(i=n.cssVar)&&void 0!==i?i:r.cssVar)&&Object.assign(Object.assign(Object.assign({prefix:"ant"},"object"==typeof r.cssVar?r.cssVar:{}),"object"==typeof n.cssVar?n.cssVar:{}),{key:"object"==typeof n.cssVar&&(null===(a=n.cssVar)||void 0===a?void 0:a.key)||s});return Object.assign(Object.assign(Object.assign({},r),n),{token:Object.assign(Object.assign({},r.token),n.token),components:l,cssVar:c})}),[n,r],((e,t)=>e.some(((e,n)=>{const r=t[n];return!Pc(e,r,!0)}))))}(b,v.theme),ke={csp:we,autoInsertSpaceInButton:o,alert:i,anchor:a,locale:s||m,direction:u,space:d,virtual:f,popupMatchSelectWidth:null!=h?h:p,popupOverflow:g,getPrefixCls:be,iconPrefixCls:xe,theme:Se,segmented:w,statistic:S,spin:E,calendar:O,carousel:M,cascader:I,collapse:$,typography:_,checkbox:P,descriptions:A,divider:N,drawer:T,skeleton:R,steps:L,image:D,input:G,layout:j,list:F,mentions:B,modal:z,progress:H,result:U,slider:W,breadcrumb:V,menu:X,pagination:q,empty:Y,badge:K,radio:Z,rate:J,switch:Q,transfer:ee,avatar:te,message:ne,tag:re,table:oe,card:ie,tabs:ae,timeline:le,timePicker:se,upload:ce,notification:ue,tree:de,colorPicker:fe,datePicker:pe,rangePicker:he,flex:ge,wave:me,dropdown:ve,warning:ye},Oe=Object.assign({},v);Object.keys(ke).forEach((e=>{void 0!==ke[e]&&(Oe[e]=ke[e])})),Dc.forEach((t=>{const n=e[t];n&&(Oe[t]=n)}));const Me=k((()=>Oe),Oe,((e,t)=>{const n=Object.keys(e),r=Object.keys(t);return n.length!==r.length||n.some((n=>e[n]!==t[n]))})),Ie=r.useMemo((()=>({prefixCls:xe,csp:we})),[xe,we]);let $e=r.createElement(r.Fragment,null,r.createElement(Lc,{dropdownMatchSelectWidth:p}),t);const _e=r.useMemo((()=>{var e,t,n,r;return function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&($e=r.createElement(dc.Provider,{value:_e},$e)),s&&($e=r.createElement(Ec,{locale:s,_ANT_MARK__:"internalMark"},$e)),(xe||we)&&($e=r.createElement(wi.Provider,{value:Ie},$e)),c&&($e=r.createElement($c,{size:c},$e)),$e=r.createElement(Rc,null,$e);const Pe=r.useMemo((()=>{const e=Se||{},{algorithm:t,token:n,components:r,cssVar:o}=e,i=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o0)?vt(t):wo,l={};Object.entries(r||{}).forEach((e=>{let[t,n]=e;const r=Object.assign({},n);"algorithm"in r&&(!0===r.algorithm?r.theme=a:(Array.isArray(r.algorithm)||"function"==typeof r.algorithm)&&(r.theme=vt(r.algorithm)),delete r.algorithm),l[t]=r}));const s=Object.assign(Object.assign({},fo),n);return Object.assign(Object.assign({},i),{theme:a,token:s,components:l,override:Object.assign({override:s},l),cssVar:o})}),[Se]);return b&&($e=r.createElement(Eo.Provider,{value:Pe},$e)),Me.warning&&($e=r.createElement(ks.Provider,{value:Me.warning},$e)),void 0!==x&&($e=r.createElement(Oc,{disabled:x},$e)),r.createElement(Ce.Provider,{value:Me},$e)},Vc=e=>{const t=r.useContext(Ce),n=r.useContext(Sc);return r.createElement(Wc,Object.assign({parentContext:t,legacyLocale:n},e))};Vc.ConfigContext=Ce,Vc.SizeContext=_c,Vc.config=e=>{let{prefixCls:t,iconPrefixCls:n,theme:r}=e;void 0!==t&&(jc=t),void 0!==n&&(Fc=n),r&&(function(e){return Object.keys(e).some((e=>e.endsWith("Color")))}(r)?function(e,t){const n=function(e,t){const n={},r=(e,t)=>{let n=e.clone();return n=(null==t?void 0:t(n))||n,n.toRgbString()},o=(e,t)=>{const o=new po(e),i=ro(o.toRgbString());n[`${t}-color`]=r(o),n[`${t}-color-disabled`]=i[1],n[`${t}-color-hover`]=i[4],n[`${t}-color-active`]=i[6],n[`${t}-color-outline`]=o.clone().setAlpha(.2).toRgbString(),n[`${t}-color-deprecated-bg`]=i[0],n[`${t}-color-deprecated-border`]=i[2]};if(t.primaryColor){o(t.primaryColor,"primary");const e=new po(t.primaryColor),i=ro(e.toRgbString());i.forEach(((e,t)=>{n[`primary-${t+1}`]=e})),n["primary-color-deprecated-l-35"]=r(e,(e=>e.lighten(35))),n["primary-color-deprecated-l-20"]=r(e,(e=>e.lighten(20))),n["primary-color-deprecated-t-20"]=r(e,(e=>e.tint(20))),n["primary-color-deprecated-t-50"]=r(e,(e=>e.tint(50))),n["primary-color-deprecated-f-12"]=r(e,(e=>e.setAlpha(.12*e.getAlpha())));const a=new po(i[0]);n["primary-color-active-deprecated-f-30"]=r(a,(e=>e.setAlpha(.3*e.getAlpha()))),n["primary-color-active-deprecated-d-02"]=r(a,(e=>e.darken(2)))}return t.successColor&&o(t.successColor,"success"),t.warningColor&&o(t.warningColor,"warning"),t.errorColor&&o(t.errorColor,"error"),t.infoColor&&o(t.infoColor,"info"),`\n :root {\n ${Object.keys(n).map((t=>`--${e}-${t}: ${n[t]};`)).join("\n")}\n }\n `.trim()}(e,t);or()&&Ai(n,`${Cc}-dynamic-theme`)}(zc(),r):Bc=r)},Vc.useConfig=function(){return{componentDisabled:(0,r.useContext)(Mc),componentSize:(0,r.useContext)(_c)}},Object.defineProperty(Vc,"SizeContext",{get:()=>_c});const Xc=Vc,qc=()=>({height:0,opacity:0}),Gc=e=>{const{scrollHeight:t}=e;return{height:t,opacity:1}},Yc=e=>({height:e?e.offsetHeight:0}),Kc=(e,t)=>!0===(null==t?void 0:t.deadline)||"height"===t.propertyName,Zc=(e,t,n)=>void 0!==n?n:`${e}-${t}`,Jc=function(){return{motionName:`${arguments.length>0&&void 0!==arguments[0]?arguments[0]:"ant"}-motion-collapse`,onAppearStart:qc,onEnterStart:qc,onAppearActive:Gc,onEnterActive:Gc,onLeaveStart:Yc,onLeaveActive:qc,onAppearEnd:Kc,onEnterEnd:Kc,onLeaveEnd:Kc,motionDeadline:500}},Qc=(e,t)=>{const n=r.useContext(Sc);return[r.useMemo((()=>{var r;const o=t||vc[e],i=null!==(r=null==n?void 0:n[e])&&void 0!==r?r:{};return Object.assign(Object.assign({},"function"==typeof o?o():o),i||{})}),[e,t,n]),r.useMemo((()=>{const e=null==n?void 0:n.locale;return(null==n?void 0:n.exist)&&!e?vc.locale:e}),[n])]},eu=function(e){if(!e)return!1;if(e instanceof Element){if(e.offsetParent)return!0;if(e.getBBox){var t=e.getBBox(),n=t.width,r=t.height;if(n||r)return!0}if(e.getBoundingClientRect){var o=e.getBoundingClientRect(),i=o.width,a=o.height;if(i||a)return!0}}return!1},tu=e=>{const{componentCls:t,colorPrimary:n}=e;return{[t]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:`var(--wave-color, ${n})`,boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:[`box-shadow 0.4s ${e.motionEaseOutCirc}`,`opacity 2s ${e.motionEaseOutCirc}`].join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0},"&.wave-quick":{transition:[`box-shadow 0.3s ${e.motionEaseInOut}`,`opacity 0.35s ${e.motionEaseInOut}`].join(",")}}}}},nu=ni("Wave",(e=>[tu(e)]));function ru(e){return e&&"#fff"!==e&&"#ffffff"!==e&&"rgb(255, 255, 255)"!==e&&"rgba(255, 255, 255, 1)"!==e&&function(e){const t=(e||"").match(/rgba?\((\d*), (\d*), (\d*)(, [\d.]*)?\)/);return!(t&&t[1]&&t[2]&&t[3]&&t[1]===t[2]&&t[2]===t[3])}(e)&&!/rgba\((?:\d*, ){3}0\)/.test(e)&&"transparent"!==e}const ou="ant-wave-target";function iu(e){return Number.isNaN(e)?0:e}const au=e=>{const{className:t,target:n,component:o}=e,i=r.useRef(null),[l,s]=r.useState(null),[c,u]=r.useState([]),[d,f]=r.useState(0),[p,h]=r.useState(0),[g,m]=r.useState(0),[v,y]=r.useState(0),[b,x]=r.useState(!1),w={left:d,top:p,width:g,height:v,borderRadius:c.map((e=>`${e}px`)).join(" ")};function S(){const e=getComputedStyle(n);s(function(e){const{borderTopColor:t,borderColor:n,backgroundColor:r}=getComputedStyle(e);return ru(t)?t:ru(n)?n:ru(r)?r:null}(n));const t="static"===e.position,{borderLeftWidth:r,borderTopWidth:o}=e;f(t?n.offsetLeft:iu(-parseFloat(r))),h(t?n.offsetTop:iu(-parseFloat(o))),m(n.offsetWidth),y(n.offsetHeight);const{borderTopLeftRadius:i,borderTopRightRadius:a,borderBottomLeftRadius:l,borderBottomRightRadius:c}=e;u([i,a,c,l].map((e=>iu(parseFloat(e)))))}if(l&&(w["--wave-color"]=l),r.useEffect((()=>{if(n){const e=we((()=>{S(),x(!0)}));let t;return"undefined"!=typeof ResizeObserver&&(t=new ResizeObserver(S),t.observe(n)),()=>{we.cancel(e),null==t||t.disconnect()}}}),[]),!b)return null;const E=("Checkbox"===o||"Radio"===o)&&(null==n?void 0:n.classList.contains(ou));return r.createElement(bl,{visible:!0,motionAppear:!0,motionName:"wave-motion",motionDeadline:5e3,onAppearEnd:(e,t)=>{var n;if(t.deadline||"opacity"===t.propertyName){const e=null===(n=i.current)||void 0===n?void 0:n.parentElement;cc(e).then((()=>{null==e||e.remove()}))}return!1}},(e=>{let{className:n}=e;return r.createElement("div",{ref:i,className:a()(t,{"wave-quick":E},n),style:w})}))},lu=(e,t)=>{var n;const{component:o}=t;if("Checkbox"===o&&!(null===(n=e.querySelector("input"))||void 0===n?void 0:n.checked))return;const i=document.createElement("div");i.style.position="absolute",i.style.left="0px",i.style.top="0px",null==e||e.insertBefore(i,null==e?void 0:e.firstChild),ic(r.createElement(au,Object.assign({},t,{target:e})),i)},su=e=>{const{children:t,disabled:n,component:o}=e,{getPrefixCls:i}=(0,r.useContext)(Ce),l=(0,r.useRef)(null),s=i("wave"),[,c]=nu(s),u=function(e,t,n){const{wave:o}=r.useContext(Ce),[,i,a]=No(),l=Jn((r=>{const l=e.current;if((null==o?void 0:o.disabled)||!l)return;const s=l.querySelector(`.${ou}`)||l,{showEffect:c}=o||{};(c||lu)(s,{className:t,token:i,component:n,event:r,hashId:a})})),s=r.useRef();return e=>{we.cancel(s.current),s.current=we((()=>{l(e)}))}}(l,a()(s,c),o);return r.useEffect((()=>{const e=l.current;if(!e||1!==e.nodeType||n)return;const t=t=>{!eu(t.target)||!e.getAttribute||e.getAttribute("disabled")||e.disabled||e.className.includes("disabled")||e.className.includes("-leave")||u(t)};return e.addEventListener("click",t,!0),()=>{e.removeEventListener("click",t,!0)}}),[n]),r.isValidElement(t)?Il(t,{ref:I(t)?O(t.ref,l):l}):null!=t?t:null},cu=e=>{const t=r.useContext(_c);return r.useMemo((()=>e?"string"==typeof e?null!=e?e:t:e instanceof Function?e(t):t:t),[e,t])},uu=e=>{const{componentCls:t}=e;return{[t]:{"&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"}}}},du=e=>{const{componentCls:t}=e;return{[t]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${t}-item:empty`]:{display:"none"}}}},fu=e=>{const{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}},pu=oi("Space",(e=>{const t=Ko(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[du(t),fu(t),uu(t)]}),(()=>({})),{resetStyle:!1});var hu=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o{const n=r.useContext(gu),o=r.useMemo((()=>{if(!n)return"";const{compactDirection:r,isFirstItem:o,isLastItem:i}=n,l="vertical"===r?"-vertical-":"-";return a()(`${e}-compact${l}item`,{[`${e}-compact${l}first-item`]:o,[`${e}-compact${l}last-item`]:i,[`${e}-compact${l}item-rtl`]:"rtl"===t})}),[e,t,n]);return{compactSize:null==n?void 0:n.compactSize,compactDirection:null==n?void 0:n.compactDirection,compactItemClassnames:o}},vu=e=>{let{children:t}=e;return r.createElement(gu.Provider,{value:null},t)},yu=e=>{var{children:t}=e,n=hu(e,["children"]);return r.createElement(gu.Provider,{value:n},t)};const bu=r.createContext(void 0),xu=/^[\u4e00-\u9fa5]{2}$/,wu=xu.test.bind(xu);function Su(e){return"danger"===e?{danger:!0}:{type:e}}function Eu(e){return"string"==typeof e}function Cu(e){return"text"===e||"link"===e}const ku=(0,r.forwardRef)(((e,t)=>{const{className:n,style:o,children:i,prefixCls:l}=e,s=a()(`${l}-icon`,n);return r.createElement("span",{ref:t,className:s,style:o},i)})),Ou=ku,Mu=(0,r.forwardRef)(((e,t)=>{let{prefixCls:n,className:o,style:i,iconClassName:l}=e;const s=a()(`${n}-loading-icon`,o);return r.createElement(Ou,{prefixCls:n,className:s,style:i,ref:t},r.createElement($s,{className:l}))})),Iu=()=>({width:0,opacity:0,transform:"scale(0)"}),$u=e=>({width:e.scrollWidth,opacity:1,transform:"scale(1)"}),_u=e=>{const{prefixCls:t,loading:n,existIcon:o,className:i,style:a}=e,l=!!n;return o?r.createElement(Mu,{prefixCls:t,className:i,style:a}):r.createElement(bl,{visible:l,motionName:`${t}-loading-icon-motion`,motionLeave:l,removeOnLeave:!0,onAppearStart:Iu,onAppearActive:$u,onEnterStart:Iu,onEnterActive:$u,onLeaveStart:$u,onLeaveActive:Iu},((e,n)=>{let{className:o,style:l}=e;return r.createElement(Mu,{prefixCls:t,className:i,style:Object.assign(Object.assign({},a),l),ref:n,iconClassName:o})}))},Pu=(e,t)=>({[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineEndColor:t}}},"&:not(:first-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineStartColor:t}}}}}),Au=e=>{const{componentCls:t,fontSize:n,lineWidth:r,groupBorderColor:o,colorErrorHover:i}=e;return{[`${t}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${t}`]:{"&:not(:last-child)":{[`&, & > ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:e.calc(r).mul(-1).equal(),[`&, & > ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[t]:{position:"relative",zIndex:1,"&:hover,\n &:focus,\n &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${t}-icon-only`]:{fontSize:n}},Pu(`${t}-primary`,o),Pu(`${t}-danger`,i)]}},Nu=e=>{const{componentCls:t,iconCls:n,fontWeight:r}=e;return{[t]:{outline:"none",position:"relative",display:"inline-block",fontWeight:r,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",background:"transparent",border:`${Mt(e.lineWidth)} ${e.lineType} transparent`,cursor:"pointer",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation",lineHeight:e.lineHeight,color:e.colorText,"&:disabled > *":{pointerEvents:"none"},"> span":{display:"inline-block"},[`${t}-icon`]:{lineHeight:0},[`> ${n} + span, > span + ${n}`]:{marginInlineStart:e.marginXS},[`&:not(${t}-icon-only) > ${t}-icon`]:{[`&${t}-loading-icon, &:not(:last-child)`]:{marginInlineEnd:e.marginXS}},"> a":{color:"currentColor"},"&:not(:disabled)":Object.assign({},Cr(e)),[`&${t}-two-chinese-chars::first-letter`]:{letterSpacing:"0.34em"},[`&${t}-two-chinese-chars > *:not(${n})`]:{marginInlineEnd:"-0.34em",letterSpacing:"0.34em"},[`&-icon-only${t}-compact-item`]:{flex:"none"}}}},Tu=(e,t,n)=>({[`&:not(:disabled):not(${e}-disabled)`]:{"&:hover":t,"&:active":n}}),Ru=e=>({minWidth:e.controlHeight,paddingInlineStart:0,paddingInlineEnd:0,borderRadius:"50%"}),Lu=e=>({borderRadius:e.controlHeight,paddingInlineStart:e.calc(e.controlHeight).div(2).equal(),paddingInlineEnd:e.calc(e.controlHeight).div(2).equal()}),Du=e=>({cursor:"not-allowed",borderColor:e.borderColorDisabled,color:e.colorTextDisabled,background:e.colorBgContainerDisabled,boxShadow:"none"}),ju=(e,t,n,r,o,i,a,l)=>({[`&${e}-background-ghost`]:Object.assign(Object.assign({color:n||void 0,background:t,borderColor:r||void 0,boxShadow:"none"},Tu(e,Object.assign({background:t},a),Object.assign({background:t},l))),{"&:disabled":{cursor:"not-allowed",color:o||void 0,borderColor:i||void 0}})}),Fu=e=>({[`&:disabled, &${e.componentCls}-disabled`]:Object.assign({},Du(e))}),Bu=e=>Object.assign({},Fu(e)),zu=e=>({[`&:disabled, &${e.componentCls}-disabled`]:{cursor:"not-allowed",color:e.colorTextDisabled}}),Hu=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Bu(e)),{background:e.defaultBg,borderColor:e.defaultBorderColor,color:e.defaultColor,boxShadow:e.defaultShadow}),Tu(e.componentCls,{color:e.colorPrimaryHover,borderColor:e.colorPrimaryHover},{color:e.colorPrimaryActive,borderColor:e.colorPrimaryActive})),ju(e.componentCls,e.ghostBg,e.defaultGhostColor,e.defaultGhostBorderColor,e.colorTextDisabled,e.colorBorder)),{[`&${e.componentCls}-dangerous`]:Object.assign(Object.assign(Object.assign({color:e.colorError,borderColor:e.colorError},Tu(e.componentCls,{color:e.colorErrorHover,borderColor:e.colorErrorBorderHover},{color:e.colorErrorActive,borderColor:e.colorErrorActive})),ju(e.componentCls,e.ghostBg,e.colorError,e.colorError,e.colorTextDisabled,e.colorBorder)),Fu(e))}),Uu=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Bu(e)),{color:e.primaryColor,background:e.colorPrimary,boxShadow:e.primaryShadow}),Tu(e.componentCls,{color:e.colorTextLightSolid,background:e.colorPrimaryHover},{color:e.colorTextLightSolid,background:e.colorPrimaryActive})),ju(e.componentCls,e.ghostBg,e.colorPrimary,e.colorPrimary,e.colorTextDisabled,e.colorBorder,{color:e.colorPrimaryHover,borderColor:e.colorPrimaryHover},{color:e.colorPrimaryActive,borderColor:e.colorPrimaryActive})),{[`&${e.componentCls}-dangerous`]:Object.assign(Object.assign(Object.assign({background:e.colorError,boxShadow:e.dangerShadow,color:e.dangerColor},Tu(e.componentCls,{background:e.colorErrorHover},{background:e.colorErrorActive})),ju(e.componentCls,e.ghostBg,e.colorError,e.colorError,e.colorTextDisabled,e.colorBorder,{color:e.colorErrorHover,borderColor:e.colorErrorHover},{color:e.colorErrorActive,borderColor:e.colorErrorActive})),Fu(e))}),Wu=e=>Object.assign(Object.assign({},Hu(e)),{borderStyle:"dashed"}),Vu=e=>Object.assign(Object.assign(Object.assign({color:e.colorLink},Tu(e.componentCls,{color:e.colorLinkHover,background:e.linkHoverBg},{color:e.colorLinkActive})),zu(e)),{[`&${e.componentCls}-dangerous`]:Object.assign(Object.assign({color:e.colorError},Tu(e.componentCls,{color:e.colorErrorHover},{color:e.colorErrorActive})),zu(e))}),Xu=e=>Object.assign(Object.assign(Object.assign({},Tu(e.componentCls,{color:e.colorText,background:e.textHoverBg},{color:e.colorText,background:e.colorBgTextActive})),zu(e)),{[`&${e.componentCls}-dangerous`]:Object.assign(Object.assign({color:e.colorError},zu(e)),Tu(e.componentCls,{color:e.colorErrorHover,background:e.colorErrorBg},{color:e.colorErrorHover,background:e.colorErrorBg}))}),qu=e=>{const{componentCls:t}=e;return{[`${t}-default`]:Hu(e),[`${t}-primary`]:Uu(e),[`${t}-dashed`]:Wu(e),[`${t}-link`]:Vu(e),[`${t}-text`]:Xu(e),[`${t}-ghost`]:ju(e.componentCls,e.ghostBg,e.colorBgContainer,e.colorBgContainer,e.colorTextDisabled,e.colorBorder)}},Gu=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const{componentCls:n,controlHeight:r,fontSize:o,borderRadius:i,buttonPaddingHorizontal:a,iconCls:l,buttonPaddingVertical:s}=e,c=`${n}-icon-only`;return[{[`${n}${t}`]:{fontSize:o,height:r,padding:`${Mt(s)} ${Mt(a)}`,borderRadius:i,[`&${c}`]:{width:r,paddingInlineStart:0,paddingInlineEnd:0,[`&${n}-round`]:{width:"auto"},[l]:{fontSize:e.buttonIconOnlyFontSize}},[`&${n}-loading`]:{opacity:e.opacityLoading,cursor:"default"},[`${n}-loading-icon`]:{transition:`width ${e.motionDurationSlow} ${e.motionEaseInOut}, opacity ${e.motionDurationSlow} ${e.motionEaseInOut}`}}},{[`${n}${n}-circle${t}`]:Ru(e)},{[`${n}${n}-round${t}`]:Lu(e)}]},Yu=e=>Gu(Ko(e,{fontSize:e.contentFontSize})),Ku=e=>{const t=Ko(e,{controlHeight:e.controlHeightSM,fontSize:e.contentFontSizeSM,padding:e.paddingXS,buttonPaddingHorizontal:e.paddingInlineSM,buttonPaddingVertical:e.paddingBlockSM,borderRadius:e.borderRadiusSM,buttonIconOnlyFontSize:e.onlyIconSizeSM});return Gu(t,`${e.componentCls}-sm`)},Zu=e=>{const t=Ko(e,{controlHeight:e.controlHeightLG,fontSize:e.contentFontSizeLG,buttonPaddingHorizontal:e.paddingInlineLG,buttonPaddingVertical:e.paddingBlockLG,borderRadius:e.borderRadiusLG,buttonIconOnlyFontSize:e.onlyIconSizeLG});return Gu(t,`${e.componentCls}-lg`)},Ju=e=>{const{componentCls:t}=e;return{[t]:{[`&${t}-block`]:{width:"100%"}}}},Qu=e=>{const{paddingInline:t,onlyIconSize:n,paddingBlock:r}=e;return Ko(e,{buttonPaddingHorizontal:t,buttonPaddingVertical:r,buttonIconOnlyFontSize:n})},ed=e=>{const t=e.fontSize,n=e.fontSize,r=e.fontSizeLG;return{fontWeight:400,defaultShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlTmpOutline}`,primaryShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlOutline}`,dangerShadow:`0 ${e.controlOutlineWidth}px 0 ${e.colorErrorOutline}`,primaryColor:e.colorTextLightSolid,dangerColor:e.colorTextLightSolid,borderColorDisabled:e.colorBorder,defaultGhostColor:e.colorBgContainer,ghostBg:"transparent",defaultGhostBorderColor:e.colorBgContainer,paddingInline:e.paddingContentHorizontal-e.lineWidth,paddingInlineLG:e.paddingContentHorizontal-e.lineWidth,paddingInlineSM:8-e.lineWidth,paddingBlock:Math.max((e.controlHeight-t*e.lineHeight)/2-e.lineWidth,0),paddingBlockSM:Math.max((e.controlHeightSM-n*e.lineHeight)/2-e.lineWidth,0),paddingBlockLG:Math.max((e.controlHeightLG-r*e.lineHeight)/2-e.lineWidth,0),onlyIconSize:e.fontSizeLG,onlyIconSizeSM:e.fontSizeLG-2,onlyIconSizeLG:e.fontSizeLG+2,groupBorderColor:e.colorPrimaryHover,linkHoverBg:"transparent",textHoverBg:e.colorBgTextHover,defaultColor:e.colorText,defaultBg:e.colorBgContainer,defaultBorderColor:e.colorBorder,defaultBorderColorDisabled:e.colorBorder,contentFontSize:t,contentFontSizeSM:n,contentFontSizeLG:r}},td=oi("Button",(e=>{const t=Qu(e);return[Nu(t),Ku(t),Yu(t),Zu(t),Ju(t),qu(t),Au(t)]}),ed,{unitless:{fontWeight:!0}});function nd(e,t,n){const{focusElCls:r,focus:o,borderElCls:i}=n,a=i?"> *":"",l=["hover",o?"focus":null,"active"].filter(Boolean).map((e=>`&:${e} ${a}`)).join(",");return{[`&-item:not(${t}-last-item)`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal()},"&-item":Object.assign(Object.assign({[l]:{zIndex:2}},r?{[`&${r}`]:{zIndex:2}}:{}),{[`&[disabled] ${a}`]:{zIndex:0}})}}function rd(e,t,n){const{borderElCls:r}=n,o=r?`> ${r}`:"";return{[`&-item:not(${t}-first-item):not(${t}-last-item) ${o}`]:{borderRadius:0},[`&-item:not(${t}-last-item)${t}-first-item`]:{[`& ${o}, &${e}-sm ${o}, &${e}-lg ${o}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${t}-first-item)${t}-last-item`]:{[`& ${o}, &${e}-sm ${o}, &${e}-lg ${o}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function od(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{focus:!0};const{componentCls:n}=e,r=`${n}-compact`;return{[r]:Object.assign(Object.assign({},nd(e,r,t)),rd(n,r,t))}}function id(e,t){return{[`&-item:not(${t}-last-item)`]:{marginBottom:e.calc(e.lineWidth).mul(-1).equal()},"&-item":{"&:hover,&:focus,&:active":{zIndex:2},"&[disabled]":{zIndex:0}}}}function ad(e){const t=`${e.componentCls}-compact-vertical`;return{[t]:Object.assign(Object.assign({},id(e,t)),(n=e.componentCls,r=t,{[`&-item:not(${r}-first-item):not(${r}-last-item)`]:{borderRadius:0},[`&-item${r}-first-item:not(${r}-last-item)`]:{[`&, &${n}-sm, &${n}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${r}-last-item:not(${r}-first-item)`]:{[`&, &${n}-sm, &${n}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}))};var n,r}const ld=e=>{const{componentCls:t,calc:n}=e;return{[t]:{[`&-compact-item${t}-primary`]:{[`&:not([disabled]) + ${t}-compact-item${t}-primary:not([disabled])`]:{position:"relative","&:before":{position:"absolute",top:n(e.lineWidth).mul(-1).equal(),insetInlineStart:n(e.lineWidth).mul(-1).equal(),display:"inline-block",width:e.lineWidth,height:`calc(100% + ${Mt(e.lineWidth)} * 2)`,backgroundColor:e.colorPrimaryHover,content:'""'}}},"&-compact-vertical-item":{[`&${t}-primary`]:{[`&:not([disabled]) + ${t}-compact-vertical-item${t}-primary:not([disabled])`]:{position:"relative","&:before":{position:"absolute",top:n(e.lineWidth).mul(-1).equal(),insetInlineStart:n(e.lineWidth).mul(-1).equal(),display:"inline-block",width:`calc(100% + ${Mt(e.lineWidth)} * 2)`,height:e.lineWidth,backgroundColor:e.colorPrimaryHover,content:'""'}}}}}}},sd=ri(["Button","compact"],(e=>{const t=Qu(e);return[od(t),ad(t),ld(t)]}),ed);const cd=(e,t)=>{var n,o;const{loading:i=!1,prefixCls:l,type:s="default",danger:c,shape:u="default",size:d,styles:f,disabled:p,className:h,rootClassName:g,children:m,icon:v,ghost:y=!1,block:b=!1,htmlType:x="button",classNames:w,style:S={}}=e,E=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);ofunction(e){if("object"==typeof e&&e){let t=null==e?void 0:e.delay;return t=Number.isNaN(t)||"number"!=typeof t?0:t,{loading:t<=0,delay:t}}return{loading:!!e,delay:0}}(i)),[i]),[L,D]=(0,r.useState)(R.loading),[j,F]=(0,r.useState)(!1),B=O(t,(0,r.createRef)()),z=1===r.Children.count(m)&&!v&&!Cu(s);(0,r.useEffect)((()=>{let e=null;return R.delay>0?e=setTimeout((()=>{e=null,D(!0)}),R.delay):D(R.loading),function(){e&&(clearTimeout(e),e=null)}}),[R]),(0,r.useEffect)((()=>{if(!B||!B.current||!1===k)return;const e=B.current.textContent;z&&wu(e)?j||F(!0):j&&F(!1)}),[B]);const H=t=>{const{onClick:n}=e;L||N?t.preventDefault():null==n||n(t)},U=!1!==k,{compactSize:W,compactItemClassnames:V}=mu($,M),X=cu((e=>{var t,n;return null!==(n=null!==(t=null!=d?d:W)&&void 0!==t?t:T)&&void 0!==n?n:e})),q=X&&{large:"lg",small:"sm",middle:void 0}[X]||"",G=L?"loading":v,Y=fe(E,["navigate"]),K=a()($,P,{[`${$}-${u}`]:"default"!==u&&u,[`${$}-${s}`]:s,[`${$}-${q}`]:q,[`${$}-icon-only`]:!m&&0!==m&&!!G,[`${$}-background-ghost`]:y&&!Cu(s),[`${$}-loading`]:L,[`${$}-two-chinese-chars`]:j&&U&&!L,[`${$}-block`]:b,[`${$}-dangerous`]:!!c,[`${$}-rtl`]:"rtl"===M},V,h,g,null==I?void 0:I.className),Z=Object.assign(Object.assign({},null==I?void 0:I.style),S),J=a()(null==w?void 0:w.icon,null===(n=null==I?void 0:I.classNames)||void 0===n?void 0:n.icon),Q=Object.assign(Object.assign({},(null==f?void 0:f.icon)||{}),(null===(o=null==I?void 0:I.styles)||void 0===o?void 0:o.icon)||{}),ee=v&&!L?r.createElement(Ou,{prefixCls:$,className:J,style:Q},v):r.createElement(_u,{existIcon:!!v,prefixCls:$,loading:!!L}),te=m||0===m?function(e,t){let n=!1;const o=[];return r.Children.forEach(e,(e=>{const t=typeof e,r="string"===t||"number"===t;if(n&&r){const t=o.length-1,n=o[t];o[t]=`${n}${e}`}else o.push(e);n=r})),r.Children.map(o,(e=>function(e,t){if(null==e)return;const n=t?" ":"";return"string"!=typeof e&&"number"!=typeof e&&Eu(e.type)&&wu(e.props.children)?Il(e,{children:e.props.children.split("").join(n)}):Eu(e)?wu(e)?r.createElement("span",null,e.split("").join(n)):r.createElement("span",null,e):Ol(e)?r.createElement("span",null,e):e}(e,t)))}(m,z&&U):null;if(void 0!==Y.href)return _(r.createElement("a",Object.assign({},Y,{className:a()(K,{[`${$}-disabled`]:N}),href:N?void 0:Y.href,style:Z,onClick:H,ref:B,tabIndex:N?-1:0}),ee,te));let ne=r.createElement("button",Object.assign({},E,{type:x,className:K,style:Z,onClick:H,disabled:N,ref:B}),ee,te,V&&r.createElement(sd,{key:"compact",prefixCls:$}));return Cu(s)||(ne=r.createElement(su,{component:"Button",disabled:!!L},ne)),_(ne)},ud=(0,r.forwardRef)(cd);ud.Group=e=>{const{getPrefixCls:t,direction:n}=r.useContext(Ce),{prefixCls:o,size:i,className:l}=e,s=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o{const{type:t,children:n,prefixCls:o,buttonProps:i,close:a,autoFocus:l,emitEvent:s,isSilent:c,quitOnNullishReturnValue:u,actionFn:d}=e,f=r.useRef(!1),p=r.useRef(null),[h,g]=cr(!1),m=function(){null==a||a.apply(void 0,arguments)};return r.useEffect((()=>{let e=null;return l&&(e=setTimeout((()=>{var e;null===(e=p.current)||void 0===e||e.focus()}))),()=>{e&&clearTimeout(e)}}),[]),r.createElement(dd,Object.assign({},Su(t),{onClick:e=>{if(f.current)return;if(f.current=!0,!d)return void m();let t;if(s){if(t=d(e),u&&!fd(t))return f.current=!1,void m(e)}else if(d.length)t=d(a),f.current=!1;else if(t=d(),!t)return void m();(e=>{fd(e)&&(g(!0),e.then((function(){g(!1,!0),m.apply(void 0,arguments),f.current=!1}),(e=>{if(g(!1,!0),f.current=!1,!(null==c?void 0:c()))return Promise.reject(e)})))})(t)},loading:h,prefixCls:o},i,{ref:p}),n)},hd=r.createContext({}),{Provider:gd}=hd,md=()=>{const{autoFocusButton:e,cancelButtonProps:t,cancelTextLocale:n,isSilent:o,mergedOkCancel:i,rootPrefixCls:a,close:l,onCancel:s,onConfirm:c}=(0,r.useContext)(hd);return i?r.createElement(pd,{isSilent:o,actionFn:s,close:function(){null==l||l.apply(void 0,arguments),null==c||c(!1)},autoFocus:"cancel"===e,buttonProps:t,prefixCls:`${a}-btn`},n):null},vd=()=>{const{autoFocusButton:e,close:t,isSilent:n,okButtonProps:o,rootPrefixCls:i,okTextLocale:a,okType:l,onConfirm:s,onOk:c}=(0,r.useContext)(hd);return r.createElement(pd,{isSilent:n,type:l||"primary",actionFn:c,close:function(){null==t||t.apply(void 0,arguments),null==s||s(!0)},autoFocus:"ok"===e,buttonProps:o,prefixCls:`${i}-btn`},a)};var yd={},bd=[];function xd(e,t){}function wd(e,t){}function Sd(e,t,n){t||yd[n]||(e(!1,n),yd[n]=!0)}function Ed(e,t){Sd(xd,e,t)}Ed.preMessage=function(e){bd.push(e)},Ed.resetWarned=function(){yd={}},Ed.noteOnce=function(e,t){Sd(wd,e,t)};const Cd=Ed,kd=r.createContext(null);var Od=Ra()?r.useLayoutEffect:r.useEffect,Md=function(e,t){var n=r.useRef(!0);Od((function(){return e(n.current)}),t),Od((function(){return n.current=!1,function(){n.current=!0}}),[])},Id=function(e,t){Md((function(t){if(!t)return e()}),t)};const $d=Md;var _d=[];function Pd(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}var Ad,Nd="data-rc-order",Td="data-rc-priority",Rd="rc-util-key",Ld=new Map;function Dd(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).mark;return e?e.startsWith("data-")?e:"data-".concat(e):Rd}function jd(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function Fd(e){return Array.from((Ld.get(e)||e).children).filter((function(e){return"STYLE"===e.tagName}))}function Bd(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Ra())return null;var n=t.csp,r=t.prepend,o=t.priority,i=void 0===o?0:o,a=function(e){return"queue"===e?"prependQueue":e?"prepend":"append"}(r),l="prependQueue"===a,s=document.createElement("style");s.setAttribute(Nd,a),l&&i&&s.setAttribute(Td,"".concat(i)),null!=n&&n.nonce&&(s.nonce=null==n?void 0:n.nonce),s.innerHTML=e;var c=jd(t),u=c.firstChild;if(r){if(l){var d=Fd(c).filter((function(e){if(!["prepend","prependQueue"].includes(e.getAttribute(Nd)))return!1;var t=Number(e.getAttribute(Td)||0);return i>=t}));if(d.length)return c.insertBefore(s,d[d.length-1].nextSibling),s}c.insertBefore(s,u)}else c.appendChild(s);return s}function zd(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Fd(jd(t)).find((function(n){return n.getAttribute(Dd(t))===e}))}function Hd(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=zd(e,t);n&&jd(t).removeChild(n)}function Ud(e){if("undefined"==typeof document)return 0;if(e||void 0===Ad){var t=document.createElement("div");t.style.width="100%",t.style.height="200px";var n=document.createElement("div"),r=n.style;r.position="absolute",r.top="0",r.left="0",r.pointerEvents="none",r.visibility="hidden",r.width="200px",r.height="150px",r.overflow="hidden",n.appendChild(t),document.body.appendChild(n);var o=t.offsetWidth;n.style.overflow="scroll";var i=t.offsetWidth;o===i&&(i=n.clientWidth),document.body.removeChild(n),Ad=o-i}return Ad}function Wd(e){var t=e.match(/^(.*)px$/),n=Number(null==t?void 0:t[1]);return Number.isNaN(n)?Ud():n}function Vd(e){if(!("undefined"!=typeof document&&e&&e instanceof Element))return{width:0,height:0};var t=getComputedStyle(e,"::-webkit-scrollbar"),n=t.width,r=t.height;return{width:Wd(n),height:Wd(r)}}var Xd="rc-util-locker-".concat(Date.now()),qd=0;function Gd(e){var t=!!e,n=Ne(r.useState((function(){return qd+=1,"".concat(Xd,"_").concat(qd)})),1)[0];$d((function(){if(t){var e=Vd(document.body).width,r=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth;!function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!function(e,t){var n=Ld.get(e);if(!n||!Pd(document,n)){var r=Bd("",t),o=r.parentNode;Ld.set(e,o),e.removeChild(r)}}(jd(n),n);var r,o,i,a=zd(t,n);if(a)return null!==(r=n.csp)&&void 0!==r&&r.nonce&&a.nonce!==(null===(o=n.csp)||void 0===o?void 0:o.nonce)&&(a.nonce=null===(i=n.csp)||void 0===i?void 0:i.nonce),a.innerHTML!==e&&(a.innerHTML=e),a;var l=Bd(e,n);l.setAttribute(Dd(n),t)}("\nhtml body {\n overflow-y: hidden;\n ".concat(r?"width: calc(100% - ".concat(e,"px);"):"","\n}"),n)}else Hd(n);return function(){Hd(n)}}),[t,n])}var Yd=!1,Kd=function(e){return!1!==e&&(Ra()&&e?"string"==typeof e?document.querySelector(e):"function"==typeof e?e():e:null)},Zd=r.forwardRef((function(e,t){var n=e.open,o=e.autoLock,i=e.getContainer,a=(e.debug,e.autoDestroy),l=void 0===a||a,s=e.children,c=Ne(r.useState(n),2),u=c[0],d=c[1],f=u||n;r.useEffect((function(){(l||n)&&d(n)}),[n,l]);var p=Ne(r.useState((function(){return Kd(i)})),2),h=p[0],g=p[1];r.useEffect((function(){var e=Kd(i);g(null!=e?e:null)}));var m=function(e,t){var n=Ne(r.useState((function(){return Ra()?document.createElement("div"):null})),1)[0],o=r.useRef(!1),i=r.useContext(kd),a=Ne(r.useState(_d),2),l=a[0],s=a[1],c=i||(o.current?void 0:function(e){s((function(t){return[e].concat(Re(t))}))});function u(){n.parentElement||document.body.appendChild(n),o.current=!0}function d(){var e;null===(e=n.parentElement)||void 0===e||e.removeChild(n),o.current=!1}return $d((function(){return e?i?i(u):u():d(),d}),[e]),$d((function(){l.length&&(l.forEach((function(e){return e()})),s(_d))}),[l]),[n,c]}(f&&!h),v=Ne(m,2),y=v[0],b=v[1],x=null!=h?h:y;Gd(o&&n&&Ra()&&(x===y||x===document.body));var S=null;s&&pa(s)&&t&&(S=s.ref);var E=fa(S,t);if(!f||!Ra()||void 0===h)return null;var C=!1===x||Yd,k=s;return t&&(k=r.cloneElement(s,{ref:E})),r.createElement(kd.Provider,{value:b},C?k:(0,w.createPortal)(k,x))}));const Jd=Zd;var Qd=r.createContext({}),ef=0;function tf(e){var t=Ne(r.useState("ssr-id"),2),n=t[0],i=t[1],a=De({},o).useId,l=null==a?void 0:a();return r.useEffect((function(){if(!a){var e=ef;ef+=1,i("rc_unique_".concat(e))}}),[]),e||l||n}var nf="".concat("accept acceptCharset accessKey action allowFullScreen allowTransparency\n alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge\n charSet checked classID className colSpan cols content contentEditable contextMenu\n controls coords crossOrigin data dateTime default defer dir disabled download draggable\n encType form formAction formEncType formMethod formNoValidate formTarget frameBorder\n headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity\n is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media\n mediaGroup method min minLength multiple muted name noValidate nonce open\n optimum pattern placeholder poster preload radioGroup readOnly rel required\n reversed role rowSpan rows sandbox scope scoped scrolling seamless selected\n shape size sizes span spellCheck src srcDoc srcLang srcSet start step style\n summary tabIndex target title type useMap value width wmode wrap"," ").concat("onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown\n onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick\n onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown\n onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel\n onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough\n onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata\n onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError").split(/[\s\n]+/),rf="aria-",of="data-";function af(e,t){return 0===e.indexOf(t)}function lf(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t=!1===n?{aria:!0,data:!0,attr:!0}:!0===n?{aria:!0}:De({},n);var r={};return Object.keys(e).forEach((function(n){(t.aria&&("role"===n||af(n,rf))||t.data&&af(n,of)||t.attr&&nf.includes(n))&&(r[n]=e[n])})),r}function sf(e,t,n){var r=t;return!r&&n&&(r="".concat(e,"-").concat(n)),r}function cf(e,t){var n=e["page".concat(t?"Y":"X","Offset")],r="scroll".concat(t?"Top":"Left");if("number"!=typeof n){var o=e.document;"number"!=typeof(n=o.documentElement[r])&&(n=o.body[r])}return n}const uf=r.memo((function(e){return e.children}),(function(e,t){return!t.shouldUpdate}));var df={width:0,height:0,overflow:"hidden",outline:"none"},ff=r.forwardRef((function(e,t){var n=e.prefixCls,o=e.className,i=e.style,l=e.title,s=e.ariaId,c=e.footer,u=e.closable,d=e.closeIcon,f=e.onClose,p=e.children,h=e.bodyStyle,g=e.bodyProps,m=e.modalRender,v=e.onMouseDown,y=e.onMouseUp,b=e.holderRef,x=e.visible,w=e.forceRender,S=e.width,E=e.height,C=e.classNames,k=e.styles,O=fa(b,r.useContext(Qd).panel),M=(0,r.useRef)(),I=(0,r.useRef)();r.useImperativeHandle(t,(function(){return{focus:function(){var e;null===(e=M.current)||void 0===e||e.focus()},changeActive:function(e){var t=document.activeElement;e&&t===I.current?M.current.focus():e||t!==M.current||I.current.focus()}}}));var $,_,P,A={};void 0!==S&&(A.width=S),void 0!==E&&(A.height=E),c&&($=r.createElement("div",{className:a()("".concat(n,"-footer"),null==C?void 0:C.footer),style:De({},null==k?void 0:k.footer)},c)),l&&(_=r.createElement("div",{className:a()("".concat(n,"-header"),null==C?void 0:C.header),style:De({},null==k?void 0:k.header)},r.createElement("div",{className:"".concat(n,"-title"),id:s},l))),u&&(P=r.createElement("button",{type:"button",onClick:f,"aria-label":"Close",className:"".concat(n,"-close")},d||r.createElement("span",{className:"".concat(n,"-close-x")})));var N=r.createElement("div",{className:a()("".concat(n,"-content"),null==C?void 0:C.content),style:null==k?void 0:k.content},P,_,r.createElement("div",Xt({className:a()("".concat(n,"-body"),null==C?void 0:C.body),style:De(De({},h),null==k?void 0:k.body)},g),p),$);return r.createElement("div",{key:"dialog-element",role:"dialog","aria-labelledby":l?s:null,"aria-modal":"true",ref:O,style:De(De({},i),A),className:a()(n,o),onMouseDown:v,onMouseUp:y},r.createElement("div",{tabIndex:0,ref:M,style:df,"aria-hidden":"true"}),r.createElement(uf,{shouldUpdate:x||w},m?m(N):N),r.createElement("div",{tabIndex:0,ref:I,style:df,"aria-hidden":"true"}))}));const pf=ff;var hf=r.forwardRef((function(e,t){var n=e.prefixCls,o=e.title,i=e.style,l=e.className,s=e.visible,c=e.forceRender,u=e.destroyOnClose,d=e.motionName,f=e.ariaId,p=e.onVisibleChanged,h=e.mousePosition,g=(0,r.useRef)(),m=Ne(r.useState(),2),v=m[0],y=m[1],b={};function x(){var e,t,n,r,o,i=(n={left:(t=(e=g.current).getBoundingClientRect()).left,top:t.top},o=(r=e.ownerDocument).defaultView||r.parentWindow,n.left+=cf(o),n.top+=cf(o,!0),n);y(h?"".concat(h.x-i.left,"px ").concat(h.y-i.top,"px"):"")}return v&&(b.transformOrigin=v),r.createElement(bl,{visible:s,onVisibleChanged:p,onAppearPrepare:x,onEnterPrepare:x,forceRender:c,motionName:d,removeOnLeave:u,ref:g},(function(s,c){var u=s.className,d=s.style;return r.createElement(pf,Xt({},e,{ref:t,title:o,ariaId:f,prefixCls:n,holderRef:c,style:De(De(De({},d),i),b),className:a()(l,u)}))}))}));hf.displayName="Content";const gf=hf;function mf(e){var t=e.prefixCls,n=e.style,o=e.visible,i=e.maskProps,l=e.motionName,s=e.className;return r.createElement(bl,{key:"mask",visible:o,motionName:l,leavedClassName:"".concat(t,"-mask-hidden")},(function(e,o){var l=e.className,c=e.style;return r.createElement("div",Xt({ref:o,style:De(De({},c),n),className:a()("".concat(t,"-mask"),l,s)},i))}))}function vf(e){var t=e.prefixCls,n=void 0===t?"rc-dialog":t,o=e.zIndex,i=e.visible,l=void 0!==i&&i,s=e.keyboard,c=void 0===s||s,u=e.focusTriggerAfterClose,d=void 0===u||u,f=e.wrapStyle,p=e.wrapClassName,h=e.wrapProps,g=e.onClose,m=e.afterOpenChange,v=e.afterClose,y=e.transitionName,b=e.animation,x=e.closable,w=void 0===x||x,S=e.mask,E=void 0===S||S,C=e.maskTransitionName,k=e.maskAnimation,O=e.maskClosable,M=void 0===O||O,I=e.maskStyle,$=e.maskProps,_=e.rootClassName,P=e.classNames,A=e.styles,N=(0,r.useRef)(),T=(0,r.useRef)(),R=(0,r.useRef)(),L=Ne(r.useState(l),2),D=L[0],j=L[1],F=tf();function B(e){null==g||g(e)}var z=(0,r.useRef)(!1),H=(0,r.useRef)(),U=null;return M&&(U=function(e){z.current?z.current=!1:T.current===e.target&&B(e)}),(0,r.useEffect)((function(){l&&(j(!0),Pd(T.current,document.activeElement)||(N.current=document.activeElement))}),[l]),(0,r.useEffect)((function(){return function(){clearTimeout(H.current)}}),[]),r.createElement("div",Xt({className:a()("".concat(n,"-root"),_)},lf(e,{data:!0})),r.createElement(mf,{prefixCls:n,visible:E&&l,motionName:sf(n,C,k),style:De(De({zIndex:o},I),null==A?void 0:A.mask),maskProps:$,className:null==P?void 0:P.mask}),r.createElement("div",Xt({tabIndex:-1,onKeyDown:function(e){if(c&&e.keyCode===ds.ESC)return e.stopPropagation(),void B(e);l&&e.keyCode===ds.TAB&&R.current.changeActive(!e.shiftKey)},className:a()("".concat(n,"-wrap"),p,null==P?void 0:P.wrapper),ref:T,onClick:U,style:De(De(De({zIndex:o},f),null==A?void 0:A.wrapper),{},{display:D?null:"none"})},h),r.createElement(gf,Xt({},e,{onMouseDown:function(){clearTimeout(H.current),z.current=!0},onMouseUp:function(){H.current=setTimeout((function(){z.current=!1}))},ref:R,closable:w,ariaId:F,prefixCls:n,visible:l&&D,onClose:B,onVisibleChanged:function(e){if(e)Pd(T.current,document.activeElement)||null===(t=R.current)||void 0===t||t.focus();else{if(j(!1),E&&N.current&&d){try{N.current.focus({preventScroll:!0})}catch(e){}N.current=null}D&&(null==v||v())}var t;null==m||m(e)},motionName:sf(n,y,b)}))))}var yf=function(e){var t=e.visible,n=e.getContainer,o=e.forceRender,i=e.destroyOnClose,a=void 0!==i&&i,l=e.afterClose,s=e.panelRef,c=Ne(r.useState(t),2),u=c[0],d=c[1],f=r.useMemo((function(){return{panel:s}}),[s]);return r.useEffect((function(){t&&d(!0)}),[t]),o||!a||u?r.createElement(Qd.Provider,{value:f},r.createElement(Jd,{open:t||o||u,autoDestroy:!1,getContainer:n,autoLock:t||u},r.createElement(vf,Xt({},e,{destroyOnClose:a,afterClose:function(){null==l||l(),d(!1)}})))):null};yf.displayName="Dialog";const bf=yf;function xf(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:r.createElement(ea,null);const i=function(e,t,n){return"boolean"==typeof e?e:void 0===t?!!n:!1!==t&&null!==t}(e,t,arguments.length>4&&void 0!==arguments[4]&&arguments[4]);if(!i)return[!1,null];const a="boolean"==typeof t||null==t?o:t;return[!0,n?n(a):a]}function wf(){wf=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof v?t:v,a=Object.create(i.prototype),l=new _(r||[]);return o(a,"_invoke",{value:O(e,n,l)}),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var f="suspendedStart",p="suspendedYield",h="executing",g="completed",m={};function v(){}function y(){}function b(){}var x={};c(x,a,(function(){return this}));var w=Object.getPrototypeOf,S=w&&w(w(P([])));S&&S!==n&&r.call(S,a)&&(x=S);var E=b.prototype=v.prototype=Object.create(x);function C(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function n(o,i,a,l){var s=d(e[o],e,i);if("throw"!==s.type){var c=s.arg,u=c.value;return u&&"object"==Oe(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,l)}),(function(e){n("throw",e,a,l)})):t.resolve(u).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,l)}))}l(s.arg)}var i;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return i=i?i.then(o,o):o()}})}function O(t,n,r){var o=f;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===g){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var l=r.delegate;if(l){var s=M(l,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===f)throw o=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=h;var c=d(t,n,r);if("normal"===c.type){if(o=r.done?g:p,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(o=g,r.method="throw",r.arg=c.arg)}}}function M(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,M(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=d(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function I(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function $(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(I,this),this.reset(!0)}function P(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o=0;--i){var a=this.tryEntries[i],l=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(s&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),$(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;$(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:P(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function Sf(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function Ef(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Sf(i,r,o,a,l,"next",e)}function l(e){Sf(i,r,o,a,l,"throw",e)}a(void 0)}))}}function Cf(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[];return r.Children.forEach(e,(function(e){(null!=e||t.keepEmpty)&&(Array.isArray(e)?n=n.concat(Cf(e)):(0,sa.isFragment)(e)&&e.props?n=n.concat(Cf(e.props.children,t)):n.push(e))})),n}const kf=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=new Set;return function e(t,o){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=r.has(t);if(Cd(!a,"Warning: There may be circular references"),a)return!1;if(t===o)return!0;if(n&&i>1)return!1;r.add(t);var l=i+1;if(Array.isArray(t)){if(!Array.isArray(o)||t.length!==o.length)return!1;for(var s=0;s1?t-1:0),r=1;r=i)return e;switch(e){case"%s":return String(n[o++]);case"%d":return Number(n[o++]);case"%j":try{return JSON.stringify(n[o++])}catch(e){return"[Circular]"}break;default:return e}})):e}function Ff(e,t){return null==e||!("array"!==t||!Array.isArray(e)||e.length)||!(!function(e){return"string"===e||"url"===e||"hex"===e||"email"===e||"date"===e||"pattern"===e}(t)||"string"!=typeof e||e)}function Bf(e,t,n){var r=0,o=e.length;!function i(a){if(a&&a.length)n(a);else{var l=r;r+=1,l()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,qf=/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i,Gf={integer:function(e){return Gf.number(e)&&parseInt(e,10)===e},float:function(e){return Gf.number(e)&&!Gf.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch(e){return!1}},date:function(e){return"function"==typeof e.getTime&&"function"==typeof e.getMonth&&"function"==typeof e.getYear&&!isNaN(e.getTime())},number:function(e){return!isNaN(e)&&"number"==typeof e},object:function(e){return"object"==typeof e&&!Gf.array(e)},method:function(e){return"function"==typeof e},email:function(e){return"string"==typeof e&&e.length<=320&&!!e.match(Xf)},url:function(e){return"string"==typeof e&&e.length<=2048&&!!e.match(function(){if(Wf)return Wf;var e="[a-fA-F\\d:]",t=function(t){return t&&t.includeBoundaries?"(?:(?<=\\s|^)(?="+e+")|(?<="+e+")(?=\\s|$))":""},n="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",r="[a-fA-F\\d]{1,4}",o=("\n(?:\n(?:"+r+":){7}(?:"+r+"|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\n(?:"+r+":){6}(?:"+n+"|:"+r+"|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4\n(?:"+r+":){5}(?::"+n+"|(?::"+r+"){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4\n(?:"+r+":){4}(?:(?::"+r+"){0,1}:"+n+"|(?::"+r+"){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4\n(?:"+r+":){3}(?:(?::"+r+"){0,2}:"+n+"|(?::"+r+"){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4\n(?:"+r+":){2}(?:(?::"+r+"){0,3}:"+n+"|(?::"+r+"){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4\n(?:"+r+":){1}(?:(?::"+r+"){0,4}:"+n+"|(?::"+r+"){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4\n(?::(?:(?::"+r+"){0,5}:"+n+"|(?::"+r+"){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4\n)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1\n").replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),i=new RegExp("(?:^"+n+"$)|(?:^"+o+"$)"),a=new RegExp("^"+n+"$"),l=new RegExp("^"+o+"$"),s=function(e){return e&&e.exact?i:new RegExp("(?:"+t(e)+n+t(e)+")|(?:"+t(e)+o+t(e)+")","g")};s.v4=function(e){return e&&e.exact?a:new RegExp(""+t(e)+n+t(e),"g")},s.v6=function(e){return e&&e.exact?l:new RegExp(""+t(e)+o+t(e),"g")};var c=s.v4().source,u=s.v6().source;return Wf=new RegExp("(?:^(?:(?:(?:[a-z]+:)?//)|www\\.)(?:\\S+(?::\\S*)?@)?(?:localhost|"+c+"|"+u+'|(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:[/?#][^\\s"]*)?$)',"i")}())},hex:function(e){return"string"==typeof e&&!!e.match(qf)}},Yf="enum",Kf=Vf,Zf=function(e,t,n,r,o){(/^\s+$/.test(t)||""===t)&&r.push(jf(o.messages.whitespace,e.fullField))},Jf=function(e,t,n,r,o){if(e.required&&void 0===t)Vf(e,t,n,r,o);else{var i=e.type;["integer","float","array","regexp","object","method","email","number","date","url","hex"].indexOf(i)>-1?Gf[i](t)||r.push(jf(o.messages.types[i],e.fullField,e.type)):i&&typeof t!==e.type&&r.push(jf(o.messages.types[i],e.fullField,e.type))}},Qf=function(e,t,n,r,o){var i="number"==typeof e.len,a="number"==typeof e.min,l="number"==typeof e.max,s=t,c=null,u="number"==typeof t,d="string"==typeof t,f=Array.isArray(t);if(u?c="number":d?c="string":f&&(c="array"),!c)return!1;f&&(s=t.length),d&&(s=t.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"_").length),i?s!==e.len&&r.push(jf(o.messages[c].len,e.fullField,e.len)):a&&!l&&se.max?r.push(jf(o.messages[c].max,e.fullField,e.max)):a&&l&&(se.max)&&r.push(jf(o.messages[c].range,e.fullField,e.min,e.max))},ep=function(e,t,n,r,o){e[Yf]=Array.isArray(e[Yf])?e[Yf]:[],-1===e[Yf].indexOf(t)&&r.push(jf(o.messages[Yf],e.fullField,e[Yf].join(", ")))},tp=function(e,t,n,r,o){e.pattern&&(e.pattern instanceof RegExp?(e.pattern.lastIndex=0,e.pattern.test(t)||r.push(jf(o.messages.pattern.mismatch,e.fullField,t,e.pattern))):"string"==typeof e.pattern&&(new RegExp(e.pattern).test(t)||r.push(jf(o.messages.pattern.mismatch,e.fullField,t,e.pattern))))},np=function(e,t,n,r,o){var i=e.type,a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Ff(t,i)&&!e.required)return n();Kf(e,t,r,a,o,i),Ff(t,i)||Jf(e,t,r,a,o)}n(a)},rp={string:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Ff(t,"string")&&!e.required)return n();Kf(e,t,r,i,o,"string"),Ff(t,"string")||(Jf(e,t,r,i,o),Qf(e,t,r,i,o),tp(e,t,r,i,o),!0===e.whitespace&&Zf(e,t,r,i,o))}n(i)},method:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Ff(t)&&!e.required)return n();Kf(e,t,r,i,o),void 0!==t&&Jf(e,t,r,i,o)}n(i)},number:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(""===t&&(t=void 0),Ff(t)&&!e.required)return n();Kf(e,t,r,i,o),void 0!==t&&(Jf(e,t,r,i,o),Qf(e,t,r,i,o))}n(i)},boolean:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Ff(t)&&!e.required)return n();Kf(e,t,r,i,o),void 0!==t&&Jf(e,t,r,i,o)}n(i)},regexp:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Ff(t)&&!e.required)return n();Kf(e,t,r,i,o),Ff(t)||Jf(e,t,r,i,o)}n(i)},integer:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Ff(t)&&!e.required)return n();Kf(e,t,r,i,o),void 0!==t&&(Jf(e,t,r,i,o),Qf(e,t,r,i,o))}n(i)},float:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Ff(t)&&!e.required)return n();Kf(e,t,r,i,o),void 0!==t&&(Jf(e,t,r,i,o),Qf(e,t,r,i,o))}n(i)},array:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(null==t&&!e.required)return n();Kf(e,t,r,i,o,"array"),null!=t&&(Jf(e,t,r,i,o),Qf(e,t,r,i,o))}n(i)},object:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Ff(t)&&!e.required)return n();Kf(e,t,r,i,o),void 0!==t&&Jf(e,t,r,i,o)}n(i)},enum:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Ff(t)&&!e.required)return n();Kf(e,t,r,i,o),void 0!==t&&ep(e,t,r,i,o)}n(i)},pattern:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Ff(t,"string")&&!e.required)return n();Kf(e,t,r,i,o),Ff(t,"string")||tp(e,t,r,i,o)}n(i)},date:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Ff(t,"date")&&!e.required)return n();var a;Kf(e,t,r,i,o),Ff(t,"date")||(a=t instanceof Date?t:new Date(t),Jf(e,a,r,i,o),a&&Qf(e,a.getTime(),r,i,o))}n(i)},url:np,hex:np,email:np,required:function(e,t,n,r,o){var i=[],a=Array.isArray(t)?"array":typeof t;Kf(e,t,r,i,o,a),n(i)},any:function(e,t,n,r,o){var i=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(Ff(t)&&!e.required)return n();Kf(e,t,r,i,o)}n(i)}};function op(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var ip=op(),ap=function(){function e(e){this.rules=null,this._messages=ip,this.define(e)}var t=e.prototype;return t.define=function(e){var t=this;if(!e)throw new Error("Cannot configure a schema with no rules");if("object"!=typeof e||Array.isArray(e))throw new Error("Rules must be an object");this.rules={},Object.keys(e).forEach((function(n){var r=e[n];t.rules[n]=Array.isArray(r)?r:[r]}))},t.messages=function(e){return e&&(this._messages=Uf(op(),e)),this._messages},t.validate=function(t,n,r){var o=this;void 0===n&&(n={}),void 0===r&&(r=function(){});var i=t,a=n,l=r;if("function"==typeof a&&(l=a,a={}),!this.rules||0===Object.keys(this.rules).length)return l&&l(null,i),Promise.resolve(i);if(a.messages){var s=this.messages();s===ip&&(s=op()),Uf(s,a.messages),a.messages=s}else a.messages=this.messages();var c={};(a.keys||Object.keys(this.rules)).forEach((function(e){var n=o.rules[e],r=i[e];n.forEach((function(n){var a=n;"function"==typeof a.transform&&(i===t&&(i=Pf({},i)),r=i[e]=a.transform(r)),(a="function"==typeof a?{validator:a}:Pf({},a)).validator=o.getValidationMethod(a),a.validator&&(a.field=e,a.fullField=a.fullField||e,a.type=o.getType(a),c[e]=c[e]||[],c[e].push({rule:a,value:r,source:i,field:e}))}))}));var u={};return function(e,t,n,r,o){if(t.first){var i=new Promise((function(t,i){var a=function(e){var t=[];return Object.keys(e).forEach((function(n){t.push.apply(t,e[n]||[])})),t}(e);Bf(a,n,(function(e){return r(e),e.length?i(new zf(e,Df(e))):t(o)}))}));return i.catch((function(e){return e})),i}var a=!0===t.firstFields?Object.keys(e):t.firstFields||[],l=Object.keys(e),s=l.length,c=0,u=[],d=new Promise((function(t,i){var d=function(e){if(u.push.apply(u,e),++c===s)return r(u),u.length?i(new zf(u,Df(u))):t(o)};l.length||(r(u),t(o)),l.forEach((function(t){var r=e[t];-1!==a.indexOf(t)?Bf(r,n,d):function(e,t,n){var r=[],o=0,i=e.length;function a(e){r.push.apply(r,e||[]),++o===i&&n(r)}e.forEach((function(e){t(e,a)}))}(r,n,d)}))}));return d.catch((function(e){return e})),d}(c,a,(function(t,n){var r,o=t.rule,l=!("object"!==o.type&&"array"!==o.type||"object"!=typeof o.fields&&"object"!=typeof o.defaultField);function s(e,t){return Pf({},t,{fullField:o.fullField+"."+e,fullFields:o.fullFields?[].concat(o.fullFields,[e]):[e]})}function c(r){void 0===r&&(r=[]);var c=Array.isArray(r)?r:[r];!a.suppressWarning&&c.length&&e.warning("async-validator:",c),c.length&&void 0!==o.message&&(c=[].concat(o.message));var d=c.map(Hf(o,i));if(a.first&&d.length)return u[o.field]=1,n(d);if(l){if(o.required&&!t.value)return void 0!==o.message?d=[].concat(o.message).map(Hf(o,i)):a.error&&(d=[a.error(o,jf(a.messages.required,o.field))]),n(d);var f={};o.defaultField&&Object.keys(t.value).map((function(e){f[e]=o.defaultField})),f=Pf({},f,t.rule.fields);var p={};Object.keys(f).forEach((function(e){var t=f[e],n=Array.isArray(t)?t:[t];p[e]=n.map(s.bind(null,e))}));var h=new e(p);h.messages(a.messages),t.rule.options&&(t.rule.options.messages=a.messages,t.rule.options.error=a.error),h.validate(t.value,t.rule.options||a,(function(e){var t=[];d&&d.length&&t.push.apply(t,d),e&&e.length&&t.push.apply(t,e),n(t.length?t:null)}))}else n(d)}if(l=l&&(o.required||!o.required&&t.value),o.field=t.field,o.asyncValidator)r=o.asyncValidator(o,t.value,c,t.source,a);else if(o.validator){try{r=o.validator(o,t.value,c,t.source,a)}catch(e){null==console.error||console.error(e),a.suppressValidatorError||setTimeout((function(){throw e}),0),c(e.message)}!0===r?c():!1===r?c("function"==typeof o.message?o.message(o.fullField||o.field):o.message||(o.fullField||o.field)+" fails"):r instanceof Array?c(r):r instanceof Error&&c(r.message)}r&&r.then&&r.then((function(){return c()}),(function(e){return c(e)}))}),(function(e){!function(e){var t=[],n={};function r(e){var n;Array.isArray(e)?t=(n=t).concat.apply(n,e):t.push(e)}for(var o=0;o3&&void 0!==arguments[3]&&arguments[3];return t.length&&r&&void 0===n&&!up(e,t.slice(0,-1))?e:dp(e,t,n,r)}function pp(e){return Array.isArray(e)?[]:{}}var hp="undefined"==typeof Reflect?Object.keys:Reflect.ownKeys;function gp(){for(var e=arguments.length,t=new Array(e),n=0;n2&&void 0!==arguments[2]&&arguments[2];return e&&e.some((function(e){return Mp(t,e,n)}))}function Mp(e,t){return!(!e||!t)&&!(!(arguments.length>2&&void 0!==arguments[2]&&arguments[2])&&e.length!==t.length)&&t.every((function(t,n){return e[n]===t}))}function Ip(e){var t=arguments.length<=1?void 0:arguments[1];return t&&t.target&&"object"===Oe(t.target)&&e in t.target?t.target[e]:t}function $p(e,t,n){var r=e.length;if(t<0||t>=r||n<0||n>=r)return e;var o=e[t],i=t-n;return i>0?[].concat(Re(e.slice(0,n)),[o],Re(e.slice(n,t)),Re(e.slice(t+1,r))):i<0?[].concat(Re(e.slice(0,t)),Re(e.slice(t+1,n+1)),[o],Re(e.slice(n+1,r))):e}var _p=["name"],Pp=[];function Ap(e,t,n,r,o,i){return"function"==typeof e?e(t,n,"source"in i?{source:i.source}:{}):r!==o}var Np=function(e){ba(n,e);var t=Sa(n);function n(e){var o;return rt(this,n),Ie(wa(o=t.call(this,e)),"state",{resetCount:0}),Ie(wa(o),"cancelRegisterFunc",null),Ie(wa(o),"mounted",!1),Ie(wa(o),"touched",!1),Ie(wa(o),"dirty",!1),Ie(wa(o),"validatePromise",void 0),Ie(wa(o),"prevValidating",void 0),Ie(wa(o),"errors",Pp),Ie(wa(o),"warnings",Pp),Ie(wa(o),"cancelRegister",(function(){var e=o.props,t=e.preserve,n=e.isListField,r=e.name;o.cancelRegisterFunc&&o.cancelRegisterFunc(n,t,Cp(r)),o.cancelRegisterFunc=null})),Ie(wa(o),"getNamePath",(function(){var e=o.props,t=e.name,n=e.fieldContext.prefixName;return void 0!==t?[].concat(Re(void 0===n?[]:n),Re(t)):[]})),Ie(wa(o),"getRules",(function(){var e=o.props,t=e.rules,n=void 0===t?[]:t,r=e.fieldContext;return n.map((function(e){return"function"==typeof e?e(r):e}))})),Ie(wa(o),"refresh",(function(){o.mounted&&o.setState((function(e){return{resetCount:e.resetCount+1}}))})),Ie(wa(o),"metaCache",null),Ie(wa(o),"triggerMetaEvent",(function(e){var t=o.props.onMetaChange;if(t){var n=De(De({},o.getMeta()),{},{destroy:e});kf(o.metaCache,n)||t(n),o.metaCache=n}else o.metaCache=null})),Ie(wa(o),"onStoreChange",(function(e,t,n){var r=o.props,i=r.shouldUpdate,a=r.dependencies,l=void 0===a?[]:a,s=r.onReset,c=n.store,u=o.getNamePath(),d=o.getValue(e),f=o.getValue(c),p=t&&Op(t,u);switch("valueUpdate"===n.type&&"external"===n.source&&d!==f&&(o.touched=!0,o.dirty=!0,o.validatePromise=null,o.errors=Pp,o.warnings=Pp,o.triggerMetaEvent()),n.type){case"reset":if(!t||p)return o.touched=!1,o.dirty=!1,o.validatePromise=void 0,o.errors=Pp,o.warnings=Pp,o.triggerMetaEvent(),null==s||s(),void o.refresh();break;case"remove":if(i)return void o.reRender();break;case"setField":var h=n.data;if(p)return"touched"in h&&(o.touched=h.touched),"validating"in h&&!("originRCField"in h)&&(o.validatePromise=h.validating?Promise.resolve([]):null),"errors"in h&&(o.errors=h.errors||Pp),"warnings"in h&&(o.warnings=h.warnings||Pp),o.dirty=!0,o.triggerMetaEvent(),void o.reRender();if("value"in h&&Op(t,u,!0))return void o.reRender();if(i&&!u.length&&Ap(i,e,c,d,f,n))return void o.reRender();break;case"dependenciesUpdate":if(l.map(Cp).some((function(e){return Op(n.relatedFields,e)})))return void o.reRender();break;default:if(p||(!l.length||u.length||i)&&Ap(i,e,c,d,f,n))return void o.reRender()}!0===i&&o.reRender()})),Ie(wa(o),"validateRules",(function(e){var t=o.getNamePath(),n=o.getValue(),r=e||{},i=r.triggerName,a=r.validateOnly,l=void 0!==a&&a,s=Promise.resolve().then(Ef(wf().mark((function r(){var a,l,c,u,d,f,p;return wf().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(o.mounted){r.next=2;break}return r.abrupt("return",[]);case 2:if(a=o.props,l=a.validateFirst,c=void 0!==l&&l,u=a.messageVariables,d=a.validateDebounce,f=o.getRules(),i&&(f=f.filter((function(e){return e})).filter((function(e){var t=e.validateTrigger;return!t||_f(t).includes(i)}))),!d||!i){r.next=10;break}return r.next=8,new Promise((function(e){setTimeout(e,d)}));case 8:if(o.validatePromise===s){r.next=10;break}return r.abrupt("return",[]);case 10:return(p=wp(t,n,f,e,c,u)).catch((function(e){return e})).then((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Pp;if(o.validatePromise===s){var t;o.validatePromise=null;var n=[],r=[];null===(t=e.forEach)||void 0===t||t.call(e,(function(e){var t=e.rule.warningOnly,o=e.errors,i=void 0===o?Pp:o;t?r.push.apply(r,Re(i)):n.push.apply(n,Re(i))})),o.errors=n,o.warnings=r,o.triggerMetaEvent(),o.reRender()}})),r.abrupt("return",p);case 13:case"end":return r.stop()}}),r)}))));return l||(o.validatePromise=s,o.dirty=!0,o.errors=Pp,o.warnings=Pp,o.triggerMetaEvent(),o.reRender()),s})),Ie(wa(o),"isFieldValidating",(function(){return!!o.validatePromise})),Ie(wa(o),"isFieldTouched",(function(){return o.touched})),Ie(wa(o),"isFieldDirty",(function(){return!(!o.dirty&&void 0===o.props.initialValue)||void 0!==(0,o.props.fieldContext.getInternalHooks(Of).getInitialValue)(o.getNamePath())})),Ie(wa(o),"getErrors",(function(){return o.errors})),Ie(wa(o),"getWarnings",(function(){return o.warnings})),Ie(wa(o),"isListField",(function(){return o.props.isListField})),Ie(wa(o),"isList",(function(){return o.props.isList})),Ie(wa(o),"isPreserve",(function(){return o.props.preserve})),Ie(wa(o),"getMeta",(function(){return o.prevValidating=o.isFieldValidating(),{touched:o.isFieldTouched(),validating:o.prevValidating,errors:o.errors,warnings:o.warnings,name:o.getNamePath(),validated:null===o.validatePromise}})),Ie(wa(o),"getOnlyChild",(function(e){if("function"==typeof e){var t=o.getMeta();return De(De({},o.getOnlyChild(e(o.getControlled(),t,o.props.fieldContext))),{},{isFunction:!0})}var n=Cf(e);return 1===n.length&&r.isValidElement(n[0])?{child:n[0],isFunction:!1}:{child:n,isFunction:!1}})),Ie(wa(o),"getValue",(function(e){var t=o.props.fieldContext.getFieldsValue,n=o.getNamePath();return up(e||t(!0),n)})),Ie(wa(o),"getControlled",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=o.props,n=t.trigger,r=t.validateTrigger,i=t.getValueFromEvent,a=t.normalize,l=t.valuePropName,s=t.getValueProps,c=t.fieldContext,u=void 0!==r?r:c.validateTrigger,d=o.getNamePath(),f=c.getInternalHooks,p=c.getFieldsValue,h=f(Of).dispatch,g=o.getValue(),m=s||function(e){return Ie({},l,e)},v=e[n],y=De(De({},e),m(g));return y[n]=function(){var e;o.touched=!0,o.dirty=!0,o.triggerMetaEvent();for(var t=arguments.length,n=new Array(t),r=0;r=0&&t<=n.length?(u.keys=[].concat(Re(u.keys.slice(0,t)),[u.id],Re(u.keys.slice(t))),i([].concat(Re(n.slice(0,t)),[e],Re(n.slice(t))))):(u.keys=[].concat(Re(u.keys),[u.id]),i([].concat(Re(n),[e]))),u.id+=1},remove:function(e){var t=l(),n=new Set(Array.isArray(e)?e:[e]);n.size<=0||(u.keys=u.keys.filter((function(e,t){return!n.has(t)})),i(t.filter((function(e,t){return!n.has(t)}))))},move:function(e,t){if(e!==t){var n=l();e<0||e>=n.length||t<0||t>=n.length||(u.keys=$p(u.keys,e,t),i($p(n,e,t)))}}},f=r||[];return Array.isArray(f)||(f=[]),o(f.map((function(e,t){var n=u.keys[t];return void 0===n&&(u.keys[t]=u.id,n=u.keys[t],u.id+=1),{name:t,key:n,isListField:!0}})),c,t)}))))};var Lp="__@field_split__";function Dp(e){return e.map((function(e){return"".concat(Oe(e),":").concat(e)})).join(Lp)}var jp=function(){function e(){rt(this,e),Ie(this,"kvs",new Map)}return it(e,[{key:"set",value:function(e,t){this.kvs.set(Dp(e),t)}},{key:"get",value:function(e){return this.kvs.get(Dp(e))}},{key:"update",value:function(e,t){var n=t(this.get(e));n?this.set(e,n):this.delete(e)}},{key:"delete",value:function(e){this.kvs.delete(Dp(e))}},{key:"map",value:function(e){return Re(this.kvs.entries()).map((function(t){var n=Ne(t,2),r=n[0],o=n[1],i=r.split(Lp);return e({key:i.map((function(e){var t=Ne(e.match(/^([^:]*):(.*)$/),3),n=t[1],r=t[2];return"number"===n?Number(r):r})),value:o})}))}},{key:"toJSON",value:function(){var e={};return this.map((function(t){var n=t.key,r=t.value;return e[n.join(".")]=r,null})),e}}]),e}();const Fp=jp;var Bp=["name"],zp=it((function e(t){var n=this;rt(this,e),Ie(this,"formHooked",!1),Ie(this,"forceRootUpdate",void 0),Ie(this,"subscribable",!0),Ie(this,"store",{}),Ie(this,"fieldEntities",[]),Ie(this,"initialValues",{}),Ie(this,"callbacks",{}),Ie(this,"validateMessages",null),Ie(this,"preserve",null),Ie(this,"lastValidatePromise",null),Ie(this,"getForm",(function(){return{getFieldValue:n.getFieldValue,getFieldsValue:n.getFieldsValue,getFieldError:n.getFieldError,getFieldWarning:n.getFieldWarning,getFieldsError:n.getFieldsError,isFieldsTouched:n.isFieldsTouched,isFieldTouched:n.isFieldTouched,isFieldValidating:n.isFieldValidating,isFieldsValidating:n.isFieldsValidating,resetFields:n.resetFields,setFields:n.setFields,setFieldValue:n.setFieldValue,setFieldsValue:n.setFieldsValue,validateFields:n.validateFields,submit:n.submit,_init:!0,getInternalHooks:n.getInternalHooks}})),Ie(this,"getInternalHooks",(function(e){return e===Of?(n.formHooked=!0,{dispatch:n.dispatch,initEntityValue:n.initEntityValue,registerField:n.registerField,useSubscribe:n.useSubscribe,setInitialValues:n.setInitialValues,destroyForm:n.destroyForm,setCallbacks:n.setCallbacks,setValidateMessages:n.setValidateMessages,getFields:n.getFields,setPreserve:n.setPreserve,getInitialValue:n.getInitialValue,registerWatch:n.registerWatch}):(Cd(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)})),Ie(this,"useSubscribe",(function(e){n.subscribable=e})),Ie(this,"prevWithoutPreserves",null),Ie(this,"setInitialValues",(function(e,t){if(n.initialValues=e||{},t){var r,o=gp(e,n.store);null===(r=n.prevWithoutPreserves)||void 0===r||r.map((function(t){var n=t.key;o=fp(o,n,up(e,n))})),n.prevWithoutPreserves=null,n.updateStore(o)}})),Ie(this,"destroyForm",(function(){var e=new Fp;n.getFieldEntities(!0).forEach((function(t){n.isMergedPreserve(t.isPreserve())||e.set(t.getNamePath(),!0)})),n.prevWithoutPreserves=e})),Ie(this,"getInitialValue",(function(e){var t=up(n.initialValues,e);return e.length?gp(t):t})),Ie(this,"setCallbacks",(function(e){n.callbacks=e})),Ie(this,"setValidateMessages",(function(e){n.validateMessages=e})),Ie(this,"setPreserve",(function(e){n.preserve=e})),Ie(this,"watchList",[]),Ie(this,"registerWatch",(function(e){return n.watchList.push(e),function(){n.watchList=n.watchList.filter((function(t){return t!==e}))}})),Ie(this,"notifyWatch",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(n.watchList.length){var t=n.getFieldsValue(),r=n.getFieldsValue(!0);n.watchList.forEach((function(n){n(t,r,e)}))}})),Ie(this,"timeoutId",null),Ie(this,"warningUnhooked",(function(){})),Ie(this,"updateStore",(function(e){n.store=e})),Ie(this,"getFieldEntities",(function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?n.fieldEntities.filter((function(e){return e.getNamePath().length})):n.fieldEntities})),Ie(this,"getFieldsMap",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=new Fp;return n.getFieldEntities(e).forEach((function(e){var n=e.getNamePath();t.set(n,e)})),t})),Ie(this,"getFieldEntitiesForNamePathList",(function(e){if(!e)return n.getFieldEntities(!0);var t=n.getFieldsMap(!0);return e.map((function(e){var n=Cp(e);return t.get(n)||{INVALIDATE_NAME_PATH:Cp(e)}}))})),Ie(this,"getFieldsValue",(function(e,t){var r,o,i;if(n.warningUnhooked(),!0===e||Array.isArray(e)?(r=e,o=t):e&&"object"===Oe(e)&&(i=e.strict,o=e.filter),!0===r&&!o)return n.store;var a=n.getFieldEntitiesForNamePathList(Array.isArray(r)?r:null),l=[];return a.forEach((function(e){var t,n,a,s,c="INVALIDATE_NAME_PATH"in e?e.INVALIDATE_NAME_PATH:e.getNamePath();if(i){if(null!==(a=(s=e).isList)&&void 0!==a&&a.call(s))return}else if(!r&&null!==(t=(n=e).isListField)&&void 0!==t&&t.call(n))return;if(o){var u="getMeta"in e?e.getMeta():null;o(u)&&l.push(c)}else l.push(c)})),kp(n.store,l.map(Cp))})),Ie(this,"getFieldValue",(function(e){n.warningUnhooked();var t=Cp(e);return up(n.store,t)})),Ie(this,"getFieldsError",(function(e){return n.warningUnhooked(),n.getFieldEntitiesForNamePathList(e).map((function(t,n){return t&&!("INVALIDATE_NAME_PATH"in t)?{name:t.getNamePath(),errors:t.getErrors(),warnings:t.getWarnings()}:{name:Cp(e[n]),errors:[],warnings:[]}}))})),Ie(this,"getFieldError",(function(e){n.warningUnhooked();var t=Cp(e);return n.getFieldsError([t])[0].errors})),Ie(this,"getFieldWarning",(function(e){n.warningUnhooked();var t=Cp(e);return n.getFieldsError([t])[0].warnings})),Ie(this,"isFieldsTouched",(function(){n.warningUnhooked();for(var e=arguments.length,t=new Array(e),r=0;r0&&void 0!==arguments[0]?arguments[0]:{},r=new Fp,o=n.getFieldEntities(!0);o.forEach((function(e){var t=e.props.initialValue,n=e.getNamePath();if(void 0!==t){var o=r.get(n)||new Set;o.add({entity:e,value:t}),r.set(n,o)}})),t.entities?e=t.entities:t.namePathList?(e=[],t.namePathList.forEach((function(t){var n,o=r.get(t);o&&(n=e).push.apply(n,Re(Re(o).map((function(e){return e.entity}))))}))):e=o,e.forEach((function(e){if(void 0!==e.props.initialValue){var o=e.getNamePath();if(void 0!==n.getInitialValue(o))Cd(!1,"Form already set 'initialValues' with path '".concat(o.join("."),"'. Field can not overwrite it."));else{var i=r.get(o);if(i&&i.size>1)Cd(!1,"Multiple Field with path '".concat(o.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(i){var a=n.getFieldValue(o);e.isListField()||t.skipExist&&void 0!==a||n.updateStore(fp(n.store,o,Re(i)[0].value))}}}}))})),Ie(this,"resetFields",(function(e){n.warningUnhooked();var t=n.store;if(!e)return n.updateStore(gp(n.initialValues)),n.resetWithFieldInitialValue(),n.notifyObservers(t,null,{type:"reset"}),void n.notifyWatch();var r=e.map(Cp);r.forEach((function(e){var t=n.getInitialValue(e);n.updateStore(fp(n.store,e,t))})),n.resetWithFieldInitialValue({namePathList:r}),n.notifyObservers(t,r,{type:"reset"}),n.notifyWatch(r)})),Ie(this,"setFields",(function(e){n.warningUnhooked();var t=n.store,r=[];e.forEach((function(e){var o=e.name,i=ha(e,Bp),a=Cp(o);r.push(a),"value"in i&&n.updateStore(fp(n.store,a,i.value)),n.notifyObservers(t,[a],{type:"setField",data:e})})),n.notifyWatch(r)})),Ie(this,"getFields",(function(){return n.getFieldEntities(!0).map((function(e){var t=e.getNamePath(),r=De(De({},e.getMeta()),{},{name:t,value:n.getFieldValue(t)});return Object.defineProperty(r,"originRCField",{value:!0}),r}))})),Ie(this,"initEntityValue",(function(e){var t=e.props.initialValue;if(void 0!==t){var r=e.getNamePath();void 0===up(n.store,r)&&n.updateStore(fp(n.store,r,t))}})),Ie(this,"isMergedPreserve",(function(e){var t=void 0!==e?e:n.preserve;return null==t||t})),Ie(this,"registerField",(function(e){n.fieldEntities.push(e);var t=e.getNamePath();if(n.notifyWatch([t]),void 0!==e.props.initialValue){var r=n.store;n.resetWithFieldInitialValue({entities:[e],skipExist:!0}),n.notifyObservers(r,[e.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(r,o){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(n.fieldEntities=n.fieldEntities.filter((function(t){return t!==e})),!n.isMergedPreserve(o)&&(!r||i.length>1)){var a=r?void 0:n.getInitialValue(t);if(t.length&&n.getFieldValue(t)!==a&&n.fieldEntities.every((function(e){return!Mp(e.getNamePath(),t)}))){var l=n.store;n.updateStore(fp(l,t,a,!0)),n.notifyObservers(l,[t],{type:"remove"}),n.triggerDependenciesUpdate(l,t)}}n.notifyWatch([t])}})),Ie(this,"dispatch",(function(e){switch(e.type){case"updateValue":var t=e.namePath,r=e.value;n.updateValue(t,r);break;case"validateField":var o=e.namePath,i=e.triggerName;n.validateFields([o],{triggerName:i})}})),Ie(this,"notifyObservers",(function(e,t,r){if(n.subscribable){var o=De(De({},r),{},{store:n.getFieldsValue(!0)});n.getFieldEntities().forEach((function(n){(0,n.onStoreChange)(e,t,o)}))}else n.forceRootUpdate()})),Ie(this,"triggerDependenciesUpdate",(function(e,t){var r=n.getDependencyChildrenFields(t);return r.length&&n.validateFields(r),n.notifyObservers(e,r,{type:"dependenciesUpdate",relatedFields:[t].concat(Re(r))}),r})),Ie(this,"updateValue",(function(e,t){var r=Cp(e),o=n.store;n.updateStore(fp(n.store,r,t)),n.notifyObservers(o,[r],{type:"valueUpdate",source:"internal"}),n.notifyWatch([r]);var i=n.triggerDependenciesUpdate(o,r),a=n.callbacks.onValuesChange;a&&a(kp(n.store,[r]),n.getFieldsValue()),n.triggerOnFieldsChange([r].concat(Re(i)))})),Ie(this,"setFieldsValue",(function(e){n.warningUnhooked();var t=n.store;if(e){var r=gp(n.store,e);n.updateStore(r)}n.notifyObservers(t,null,{type:"valueUpdate",source:"external"}),n.notifyWatch()})),Ie(this,"setFieldValue",(function(e,t){n.setFields([{name:e,value:t}])})),Ie(this,"getDependencyChildrenFields",(function(e){var t=new Set,r=[],o=new Fp;return n.getFieldEntities().forEach((function(e){(e.props.dependencies||[]).forEach((function(t){var n=Cp(t);o.update(n,(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Set;return t.add(e),t}))}))})),function e(n){(o.get(n)||new Set).forEach((function(n){if(!t.has(n)){t.add(n);var o=n.getNamePath();n.isFieldDirty()&&o.length&&(r.push(o),e(o))}}))}(e),r})),Ie(this,"triggerOnFieldsChange",(function(e,t){var r=n.callbacks.onFieldsChange;if(r){var o=n.getFields();if(t){var i=new Fp;t.forEach((function(e){var t=e.name,n=e.errors;i.set(t,n)})),o.forEach((function(e){e.errors=i.get(e.name)||e.errors}))}var a=o.filter((function(t){var n=t.name;return Op(e,n)}));a.length&&r(a,o)}})),Ie(this,"validateFields",(function(e,t){var r,o;n.warningUnhooked(),Array.isArray(e)||"string"==typeof e||"string"==typeof t?(r=e,o=t):o=e;var i=!!r,a=i?r.map(Cp):[],l=[],s=String(Date.now()),c=new Set,u=o||{},d=u.recursive,f=u.dirty;n.getFieldEntities(!0).forEach((function(e){if(i||a.push(e.getNamePath()),e.props.rules&&e.props.rules.length&&(!f||e.isFieldDirty())){var t=e.getNamePath();if(c.add(t.join(s)),!i||Op(a,t,d)){var r=e.validateRules(De({validateMessages:De(De({},sp),n.validateMessages)},o));l.push(r.then((function(){return{name:t,errors:[],warnings:[]}})).catch((function(e){var n,r=[],o=[];return null===(n=e.forEach)||void 0===n||n.call(e,(function(e){var t=e.rule.warningOnly,n=e.errors;t?o.push.apply(o,Re(n)):r.push.apply(r,Re(n))})),r.length?Promise.reject({name:t,errors:r,warnings:o}):{name:t,errors:r,warnings:o}})))}}}));var p=function(e){var t=!1,n=e.length,r=[];return e.length?new Promise((function(o,i){e.forEach((function(e,a){e.catch((function(e){return t=!0,e})).then((function(e){n-=1,r[a]=e,n>0||(t&&i(r),o(r))}))}))})):Promise.resolve([])}(l);n.lastValidatePromise=p,p.catch((function(e){return e})).then((function(e){var t=e.map((function(e){return e.name}));n.notifyObservers(n.store,t,{type:"validateFinish"}),n.triggerOnFieldsChange(t,e)}));var h=p.then((function(){return n.lastValidatePromise===p?Promise.resolve(n.getFieldsValue(a)):Promise.reject([])})).catch((function(e){var t=e.filter((function(e){return e&&e.errors.length}));return Promise.reject({values:n.getFieldsValue(a),errorFields:t,outOfDate:n.lastValidatePromise!==p})}));h.catch((function(e){return e}));var g=a.filter((function(e){return c.has(e.join(s))}));return n.triggerOnFieldsChange(g),h})),Ie(this,"submit",(function(){n.warningUnhooked(),n.validateFields().then((function(e){var t=n.callbacks.onFinish;if(t)try{t(e)}catch(e){console.error(e)}})).catch((function(e){var t=n.callbacks.onFinishFailed;t&&t(e)}))})),this.forceRootUpdate=t}));const Hp=function(e){var t=r.useRef(),n=Ne(r.useState({}),2)[1];if(!t.current)if(e)t.current=e;else{var o=new zp((function(){n({})}));t.current=o.getForm()}return[t.current]};var Up=r.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),Wp=function(e){var t=e.validateMessages,n=e.onFormChange,o=e.onFormFinish,i=e.children,a=r.useContext(Up),l=r.useRef({});return r.createElement(Up.Provider,{value:De(De({},a),{},{validateMessages:De(De({},a.validateMessages),t),triggerFormChange:function(e,t){n&&n(e,{changedFields:t,forms:l.current}),a.triggerFormChange(e,t)},triggerFormFinish:function(e,t){o&&o(e,{values:t,forms:l.current}),a.triggerFormFinish(e,t)},registerForm:function(e,t){e&&(l.current=De(De({},l.current),{},Ie({},e,t))),a.registerForm(e,t)},unregisterForm:function(e){var t=De({},l.current);delete t[e],l.current=t,a.unregisterForm(e)}})},i)};const Vp=Up;var Xp=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed"];const qp=function(e,t){var n=e.name,o=e.initialValues,i=e.fields,a=e.form,l=e.preserve,s=e.children,c=e.component,u=void 0===c?"form":c,d=e.validateMessages,f=e.validateTrigger,p=void 0===f?"onChange":f,h=e.onValuesChange,g=e.onFieldsChange,m=e.onFinish,v=e.onFinishFailed,y=ha(e,Xp),b=r.useContext(Vp),x=Ne(Hp(a),1)[0],w=x.getInternalHooks(Of),S=w.useSubscribe,E=w.setInitialValues,C=w.setCallbacks,k=w.setValidateMessages,O=w.setPreserve,M=w.destroyForm;r.useImperativeHandle(t,(function(){return x})),r.useEffect((function(){return b.registerForm(n,x),function(){b.unregisterForm(n)}}),[b,x,n]),k(De(De({},b.validateMessages),d)),C({onValuesChange:h,onFieldsChange:function(e){if(b.triggerFormChange(n,e),g){for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o{}}),Qp=r.createContext(null),eh=e=>{const t=fe(e,["prefixCls"]);return r.createElement(Wp,Object.assign({},t))},th=r.createContext({prefixCls:""}),nh=r.createContext({}),rh=e=>{let{children:t,status:n,override:o}=e;const i=(0,r.useContext)(nh),a=(0,r.useMemo)((()=>{const e=Object.assign({},i);return o&&delete e.isFormItemInput,n&&(delete e.status,delete e.hasFeedback,delete e.feedbackIcon),e}),[n,o,i]);return r.createElement(nh.Provider,{value:a},t)};function oh(){}const ih=r.createContext({add:oh,remove:oh});function ah(e){const t=r.useContext(ih),n=r.useRef();return Jn((r=>{if(r){const o=e?r.querySelector(e):r;t.add(o),n.current=o}else t.remove(n.current)}))}const lh=ih,sh=()=>{const{cancelButtonProps:e,cancelTextLocale:t,onCancel:n}=(0,r.useContext)(hd);return r.createElement(dd,Object.assign({onClick:n},e),t)},ch=()=>{const{confirmLoading:e,okButtonProps:t,okType:n,okTextLocale:o,onOk:i}=(0,r.useContext)(hd);return r.createElement(dd,Object.assign({},Su(n),{loading:e,onClick:i},t),o)};function uh(e,t){return r.createElement("span",{className:`${e}-close-x`},t||r.createElement(ea,{className:`${e}-close-icon`}))}const dh=e=>{const{okText:t,okType:n="primary",cancelText:o,confirmLoading:i,onOk:a,onCancel:l,okButtonProps:s,cancelButtonProps:c,footer:u}=e,[d]=Qc("Modal",wc()),f={confirmLoading:i,okButtonProps:s,cancelButtonProps:c,okTextLocale:t||(null==d?void 0:d.okText),cancelTextLocale:o||(null==d?void 0:d.cancelText),okType:n,onOk:a,onCancel:l},p=r.useMemo((()=>f),he(Object.values(f)));let h;return"function"==typeof u||void 0===u?(h=r.createElement(r.Fragment,null,r.createElement(sh,null),r.createElement(ch,null)),"function"==typeof u&&(h=u(h,{OkBtn:ch,CancelBtn:sh})),h=r.createElement(gd,{value:p},h)):h=u,r.createElement(Oc,{disabled:!1},h)},fh=e=>({animationDuration:e,animationFillMode:"both"}),ph=e=>({animationDuration:e,animationFillMode:"both"}),hh=function(e,t,n,r){const o=arguments.length>4&&void 0!==arguments[4]&&arguments[4]?"&":"";return{[`\n ${o}${e}-enter,\n ${o}${e}-appear\n `]:Object.assign(Object.assign({},fh(r)),{animationPlayState:"paused"}),[`${o}${e}-leave`]:Object.assign(Object.assign({},ph(r)),{animationPlayState:"paused"}),[`\n ${o}${e}-enter${e}-enter-active,\n ${o}${e}-appear${e}-appear-active\n `]:{animationName:t,animationPlayState:"running"},[`${o}${e}-leave${e}-leave-active`]:{animationName:n,animationPlayState:"running",pointerEvents:"none"}}},gh=new Kn("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),mh=new Kn("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),vh=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{antCls:n}=e,r=`${n}-fade`,o=t?"&":"";return[hh(r,gh,mh,e.motionDurationMid,t),{[`\n ${o}${r}-enter,\n ${o}${r}-appear\n `]:{opacity:0,animationTimingFunction:"linear"},[`${o}${r}-leave`]:{animationTimingFunction:"linear"}}]},yh=new Kn("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),bh=new Kn("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),xh=new Kn("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),wh=new Kn("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),Sh=new Kn("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),Eh=new Kn("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),Ch=new Kn("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),kh=new Kn("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),Oh=new Kn("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),Mh=new Kn("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),Ih=new Kn("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),$h=new Kn("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),_h={zoom:{inKeyframes:yh,outKeyframes:bh},"zoom-big":{inKeyframes:xh,outKeyframes:wh},"zoom-big-fast":{inKeyframes:xh,outKeyframes:wh},"zoom-left":{inKeyframes:Ch,outKeyframes:kh},"zoom-right":{inKeyframes:Oh,outKeyframes:Mh},"zoom-up":{inKeyframes:Sh,outKeyframes:Eh},"zoom-down":{inKeyframes:Ih,outKeyframes:$h}},Ph=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:o,outKeyframes:i}=_h[t];return[hh(r,o,i,"zoom-big-fast"===t?e.motionDurationFast:e.motionDurationMid),{[`\n ${r}-enter,\n ${r}-appear\n `]:{transform:"scale(0)",opacity:0,animationTimingFunction:e.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]};function Ah(e){return{position:e,inset:0}}const Nh=e=>{const{componentCls:t,antCls:n}=e;return[{[`${t}-root`]:{[`${t}${n}-zoom-enter, ${t}${n}-zoom-appear`]:{transform:"none",opacity:0,animationDuration:e.motionDurationSlow,userSelect:"none"},[`${t}${n}-zoom-leave ${t}-content`]:{pointerEvents:"none"},[`${t}-mask`]:Object.assign(Object.assign({},Ah("fixed")),{zIndex:e.zIndexPopupBase,height:"100%",backgroundColor:e.colorBgMask,pointerEvents:"none",[`${t}-hidden`]:{display:"none"}}),[`${t}-wrap`]:Object.assign(Object.assign({},Ah("fixed")),{zIndex:e.zIndexPopupBase,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch",[`&:has(${t}${n}-zoom-enter), &:has(${t}${n}-zoom-appear)`]:{pointerEvents:"none"}})}},{[`${t}-root`]:vh(e)}]},Th=e=>{const{componentCls:t}=e;return[{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:"rtl"},[`${t}-centered`]:{textAlign:"center","&::before":{display:"inline-block",width:0,height:"100%",verticalAlign:"middle",content:'""'},[t]:{top:0,display:"inline-block",paddingBottom:0,textAlign:"start",verticalAlign:"middle"}},[`@media (max-width: ${e.screenSMMax}px)`]:{[t]:{maxWidth:"calc(100vw - 16px)",margin:`${Mt(e.marginXS)} auto`},[`${t}-centered`]:{[t]:{flex:1}}}}},{[t]:Object.assign(Object.assign({},xr(e)),{pointerEvents:"none",position:"relative",top:100,width:"auto",maxWidth:`calc(100vw - ${Mt(e.calc(e.margin).mul(2).equal())})`,margin:"0 auto",paddingBottom:e.paddingLG,[`${t}-title`]:{margin:0,color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.titleFontSize,lineHeight:e.titleLineHeight,wordWrap:"break-word"},[`${t}-content`]:{position:"relative",backgroundColor:e.contentBg,backgroundClip:"padding-box",border:0,borderRadius:e.borderRadiusLG,boxShadow:e.boxShadow,pointerEvents:"auto",padding:e.contentPadding},[`${t}-close`]:Object.assign({position:"absolute",top:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),insetInlineEnd:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),zIndex:e.calc(e.zIndexPopupBase).add(10).equal(),padding:0,color:e.modalCloseIconColor,fontWeight:e.fontWeightStrong,lineHeight:1,textDecoration:"none",background:"transparent",borderRadius:e.borderRadiusSM,width:e.modalCloseBtnSize,height:e.modalCloseBtnSize,border:0,outline:0,cursor:"pointer",transition:`color ${e.motionDurationMid}, background-color ${e.motionDurationMid}`,"&-x":{display:"flex",fontSize:e.fontSizeLG,fontStyle:"normal",lineHeight:`${Mt(e.modalCloseBtnSize)}`,justifyContent:"center",textTransform:"none",textRendering:"auto"},"&:hover":{color:e.modalIconHoverColor,backgroundColor:e.closeBtnHoverBg,textDecoration:"none"},"&:active":{backgroundColor:e.closeBtnActiveBg}},Cr(e)),[`${t}-header`]:{color:e.colorText,background:e.headerBg,borderRadius:`${Mt(e.borderRadiusLG)} ${Mt(e.borderRadiusLG)} 0 0`,marginBottom:e.headerMarginBottom,padding:e.headerPadding,borderBottom:e.headerBorderBottom},[`${t}-body`]:{fontSize:e.fontSize,lineHeight:e.lineHeight,wordWrap:"break-word",padding:e.bodyPadding},[`${t}-footer`]:{textAlign:"end",background:e.footerBg,marginTop:e.footerMarginTop,padding:e.footerPadding,borderTop:e.footerBorderTop,borderRadius:e.footerBorderRadius,[`${e.antCls}-btn + ${e.antCls}-btn:not(${e.antCls}-dropdown-trigger)`]:{marginBottom:0,marginInlineStart:e.marginXS}},[`${t}-open`]:{overflow:"hidden"}})},{[`${t}-pure-panel`]:{top:"auto",padding:0,display:"flex",flexDirection:"column",[`${t}-content,\n ${t}-body,\n ${t}-confirm-body-wrapper`]:{display:"flex",flexDirection:"column",flex:"auto"},[`${t}-confirm-body`]:{marginBottom:"auto"}}}]},Rh=e=>{const{componentCls:t}=e;return{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:"rtl",[`${t}-confirm-body`]:{direction:"rtl"}}}}},Lh=e=>{const t=e.padding,n=e.fontSizeHeading5,r=e.lineHeightHeading5;return Ko(e,{modalHeaderHeight:e.calc(e.calc(r).mul(n).equal()).add(e.calc(t).mul(2).equal()).equal(),modalFooterBorderColorSplit:e.colorSplit,modalFooterBorderStyle:e.lineType,modalFooterBorderWidth:e.lineWidth,modalIconHoverColor:e.colorIconHover,modalCloseIconColor:e.colorIcon,modalCloseBtnSize:e.fontHeight,modalConfirmIconSize:e.fontHeight,modalTitleHeight:e.calc(e.titleFontSize).mul(e.titleLineHeight).equal()})},Dh=e=>({footerBg:"transparent",headerBg:e.colorBgElevated,titleLineHeight:e.lineHeightHeading5,titleFontSize:e.fontSizeHeading5,contentBg:e.colorBgElevated,titleColor:e.colorTextHeading,closeBtnHoverBg:e.wireframe?"transparent":e.colorFillContent,closeBtnActiveBg:e.wireframe?"transparent":e.colorFillContentHover,contentPadding:e.wireframe?0:`${Mt(e.paddingMD)} ${Mt(e.paddingContentHorizontalLG)}`,headerPadding:e.wireframe?`${Mt(e.padding)} ${Mt(e.paddingLG)}`:0,headerBorderBottom:e.wireframe?`${Mt(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:"none",headerMarginBottom:e.wireframe?0:e.marginXS,bodyPadding:e.wireframe?e.paddingLG:0,footerPadding:e.wireframe?`${Mt(e.paddingXS)} ${Mt(e.padding)}`:0,footerBorderTop:e.wireframe?`${Mt(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:"none",footerBorderRadius:e.wireframe?`0 0 ${Mt(e.borderRadiusLG)} ${Mt(e.borderRadiusLG)}`:0,footerMarginTop:e.wireframe?0:e.marginSM,confirmBodyPadding:e.wireframe?`${Mt(2*e.padding)} ${Mt(2*e.padding)} ${Mt(e.paddingLG)}`:0,confirmIconMarginInlineEnd:e.wireframe?e.margin:e.marginSM,confirmBtnsMarginTop:e.wireframe?e.marginLG:e.marginSM}),jh=oi("Modal",(e=>{const t=Lh(e);return[Th(t),Rh(t),Nh(t),Ph(t,"zoom")]}),Dh,{unitless:{titleLineHeight:!0}});let Fh;or()&&window.document.documentElement&&document.documentElement.addEventListener("click",(e=>{Fh={x:e.pageX,y:e.pageY},setTimeout((()=>{Fh=null}),100)}),!0);const Bh=e=>{var t;const{getPopupContainer:n,getPrefixCls:o,direction:i,modal:l}=r.useContext(Ce),s=t=>{const{onCancel:n}=e;null==n||n(t)},{prefixCls:c,className:u,rootClassName:d,open:f,wrapClassName:p,centered:h,getContainer:g,closeIcon:m,closable:v,focusTriggerAfterClose:y=!0,style:b,visible:x,width:w=520,footer:S,classNames:E,styles:C}=e,k=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o{const{onOk:n}=e;null==n||n(t)},onCancel:s})),[N,T]=xf(v,m,(e=>uh(O,e)),r.createElement(ea,{className:`${O}-close-icon`}),!0),R=ah(`.${O}-content`),[L,D]=Rs("Modal",k.zIndex);return $(r.createElement(vu,null,r.createElement(rh,{status:!0,override:!0},r.createElement(_s.Provider,{value:D},r.createElement(bf,Object.assign({width:w},k,{zIndex:L,getContainer:void 0===g?n:g,prefixCls:O,rootClassName:a()(_,d,I),footer:A,visible:null!=f?f:x,mousePosition:null!==(t=k.mousePosition)&&void 0!==t?t:Fh,onClose:s,closable:N,closeIcon:T,focusTriggerAfterClose:y,transitionName:Zc(M,"zoom",e.transitionName),maskTransitionName:Zc(M,"fade",e.maskTransitionName),className:a()(_,u,null==l?void 0:l.className),style:Object.assign(Object.assign({},null==l?void 0:l.style),b),classNames:Object.assign(Object.assign({wrapper:P},null==l?void 0:l.classNames),E),styles:Object.assign(Object.assign({},null==l?void 0:l.styles),C),panelRef:R}))))))},zh=e=>{const{componentCls:t,titleFontSize:n,titleLineHeight:r,modalConfirmIconSize:o,fontSize:i,lineHeight:a,modalTitleHeight:l,fontHeight:s,confirmBodyPadding:c}=e,u=`${t}-confirm`;return{[u]:{"&-rtl":{direction:"rtl"},[`${e.antCls}-modal-header`]:{display:"none"},[`${u}-body-wrapper`]:Object.assign({},{"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),[`&${t} ${t}-body`]:{padding:c},[`${u}-body`]:{display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${e.iconCls}`]:{flex:"none",fontSize:o,marginInlineEnd:e.confirmIconMarginInlineEnd,marginTop:e.calc(e.calc(s).sub(o).equal()).div(2).equal()},[`&-has-title > ${e.iconCls}`]:{marginTop:e.calc(e.calc(l).sub(o).equal()).div(2).equal()}},[`${u}-paragraph`]:{display:"flex",flexDirection:"column",flex:"auto",rowGap:e.marginXS,maxWidth:`calc(100% - ${Mt(e.calc(e.modalConfirmIconSize).add(e.marginSM).equal())})`},[`${u}-title`]:{color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:n,lineHeight:r},[`${u}-content`]:{color:e.colorText,fontSize:i,lineHeight:a},[`${u}-btns`]:{textAlign:"end",marginTop:e.confirmBtnsMarginTop,[`${e.antCls}-btn + ${e.antCls}-btn`]:{marginBottom:0,marginInlineStart:e.marginXS}}},[`${u}-error ${u}-body > ${e.iconCls}`]:{color:e.colorError},[`${u}-warning ${u}-body > ${e.iconCls},\n ${u}-confirm ${u}-body > ${e.iconCls}`]:{color:e.colorWarning},[`${u}-info ${u}-body > ${e.iconCls}`]:{color:e.colorInfo},[`${u}-success ${u}-body > ${e.iconCls}`]:{color:e.colorSuccess}}},Hh=ri(["Modal","confirm"],(e=>{const t=Lh(e);return[zh(t)]}),Dh,{order:-1e3});function Uh(e){const{prefixCls:t,icon:n,okText:o,cancelText:i,confirmPrefixCls:l,type:s,okCancel:c,footer:u,locale:d}=e,f=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);ox),he(Object.values(x))),S=r.createElement(r.Fragment,null,r.createElement(md,null),r.createElement(vd,null)),E=void 0!==e.title&&null!==e.title,C=`${l}-body`;return r.createElement("div",{className:`${l}-body-wrapper`},r.createElement("div",{className:a()(C,{[`${C}-has-title`]:E})},p,r.createElement("div",{className:`${l}-paragraph`},E&&r.createElement("span",{className:`${l}-title`},e.title),r.createElement("div",{className:`${l}-content`},e.content))),void 0===u||"function"==typeof u?r.createElement(gd,{value:w},r.createElement("div",{className:`${l}-btns`},"function"==typeof u?u(S,{OkBtn:vd,CancelBtn:md}):S)):u,r.createElement(Hh,{prefixCls:t}))}const Wh=e=>{const{close:t,zIndex:n,afterClose:o,open:i,keyboard:l,centered:s,getContainer:c,maskStyle:u,direction:d,prefixCls:f,wrapClassName:p,rootPrefixCls:h,bodyStyle:g,closable:m=!1,closeIcon:v,modalRender:y,focusTriggerAfterClose:b,onConfirm:x,styles:w}=e,S=`${f}-confirm`,E=e.width||416,C=e.style||{},k=void 0===e.mask||e.mask,O=void 0!==e.maskClosable&&e.maskClosable,M=a()(S,`${S}-${e.type}`,{[`${S}-rtl`]:"rtl"===d},e.className),[,I]=No(),$=r.useMemo((()=>void 0!==n?n:I.zIndexPopupBase+As),[n,I]);return r.createElement(Bh,{prefixCls:f,className:M,wrapClassName:a()({[`${S}-centered`]:!!e.centered},p),onCancel:()=>{null==t||t({triggerCancel:!0}),null==x||x(!1)},open:i,title:"",footer:null,transitionName:Zc(h||"","zoom",e.transitionName),maskTransitionName:Zc(h||"","fade",e.maskTransitionName),mask:k,maskClosable:O,style:C,styles:Object.assign({body:g,mask:u},w),width:E,zIndex:$,afterClose:o,keyboard:l,centered:s,getContainer:c,closable:m,closeIcon:v,modalRender:y,focusTriggerAfterClose:b},r.createElement(Uh,Object.assign({},e,{confirmPrefixCls:S})))},Vh=e=>{const{rootPrefixCls:t,iconPrefixCls:n,direction:o,theme:i}=e;return r.createElement(Xc,{prefixCls:t,iconPrefixCls:n,direction:o,theme:i},r.createElement(Wh,Object.assign({},e)))},Xh=[];var qh=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);oe&&e.triggerCancel));e.onCancel&&i&&e.onCancel.apply(e,[()=>{}].concat(he(r.slice(1))));for(let e=0;e{const e=wc(),{getPrefixCls:n,getIconPrefixCls:c,getTheme:u}=Uc(),d=n(void 0,Gh),f=a||`${d}-modal`,p=c(),h=u();let g=l;!1===g&&(g=void 0),ic(r.createElement(Vh,Object.assign({},s,{getContainer:g,prefixCls:f,rootPrefixCls:d,iconPrefixCls:p,okText:o,locale:e,theme:h,cancelText:i||e.cancelText})),t)}))}function l(){for(var t=arguments.length,n=new Array(t),r=0;r{"function"==typeof e.afterClose&&e.afterClose(),i.apply(this,n)}}),o.visible&&delete o.visible,a(o)}return a(o),Xh.push(l),{destroy:l,update:function(e){o="function"==typeof e?e(o):Object.assign(Object.assign({},o),e),a(o)}}}function Kh(e){return Object.assign(Object.assign({},e),{type:"warning"})}function Zh(e){return Object.assign(Object.assign({},e),{type:"info"})}function Jh(e){return Object.assign(Object.assign({},e),{type:"success"})}function Qh(e){return Object.assign(Object.assign({},e),{type:"error"})}function eg(e){return Object.assign(Object.assign({},e),{type:"confirm"})}const tg=(e,t)=>{var n,{afterClose:o,config:i}=e,a=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);oe&&e.triggerCancel));c.onCancel&&r&&c.onCancel.apply(c,[()=>{}].concat(he(t.slice(1))))};r.useImperativeHandle(t,(()=>({destroy:g,update:e=>{u((t=>Object.assign(Object.assign({},t),e)))}})));const m=null!==(n=c.okCancel)&&void 0!==n?n:"confirm"===c.type,[v]=Qc("Modal",vc.Modal);return r.createElement(Vh,Object.assign({prefixCls:p,rootPrefixCls:h},c,{close:g,open:l,afterClose:()=>{var e;o(),null===(e=c.afterClose)||void 0===e||e.call(c)},okText:c.okText||(m?null==v?void 0:v.okText:null==v?void 0:v.justOkText),direction:c.direction||d,cancelText:c.cancelText||(null==v?void 0:v.cancelText)},a))},ng=r.forwardRef(tg);let rg=0;const og=r.memo(r.forwardRef(((e,t)=>{const[n,o]=function(){const[e,t]=r.useState([]);return[e,r.useCallback((e=>(t((t=>[].concat(he(t),[e]))),()=>{t((t=>t.filter((t=>t!==e))))})),[])]}();return r.useImperativeHandle(t,(()=>({patchElement:o})),[]),r.createElement(r.Fragment,null,n)}))),ig=function(){const e=r.useRef(null),[t,n]=r.useState([]);r.useEffect((()=>{t.length&&(he(t).forEach((e=>{e()})),n([]))}),[t]);const o=r.useCallback((t=>function(o){var i;rg+=1;const a=r.createRef();let l;const s=new Promise((e=>{l=e}));let c,u=!1;const d=r.createElement(ng,{key:`modal-${rg}`,config:t(o),ref:a,afterClose:()=>{null==c||c()},isSilent:()=>u,onConfirm:e=>{l(e)}});c=null===(i=e.current)||void 0===i?void 0:i.patchElement(d),c&&Xh.push(c);const f={destroy:()=>{function e(){var e;null===(e=a.current)||void 0===e||e.destroy()}a.current?e():n((t=>[].concat(he(t),[e])))},update:e=>{function t(){var t;null===(t=a.current)||void 0===t||t.update(e)}a.current?t():n((e=>[].concat(he(e),[t])))},then:e=>(u=!0,s.then(e))};return f}),[]);return[r.useMemo((()=>({info:o(Zh),success:o(Jh),error:o(Qh),warning:o(Kh),confirm:o(eg)})),[]),r.createElement(og,{key:"modal-holder",ref:e})]},ag=e=>{const{componentCls:t,notificationMarginEdge:n,animationMaxHeight:r}=e,o=`${t}-notice`,i=new Kn("antNotificationFadeIn",{"0%":{transform:"translate3d(100%, 0, 0)",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",opacity:1}});return{[t]:{[`&${t}-top, &${t}-bottom`]:{marginInline:0,[o]:{marginInline:"auto auto"}},[`&${t}-top`]:{[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:new Kn("antNotificationTopFadeIn",{"0%":{top:-r,opacity:0},"100%":{top:0,opacity:1}})}},[`&${t}-bottom`]:{[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:new Kn("antNotificationBottomFadeIn",{"0%":{bottom:e.calc(r).mul(-1).equal(),opacity:0},"100%":{bottom:0,opacity:1}})}},[`&${t}-topRight, &${t}-bottomRight`]:{[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:i}},[`&${t}-topLeft, &${t}-bottomLeft`]:{marginRight:{value:0,_skip_check_:!0},marginLeft:{value:n,_skip_check_:!0},[o]:{marginInlineEnd:"auto",marginInlineStart:0},[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationName:new Kn("antNotificationLeftFadeIn",{"0%":{transform:"translate3d(-100%, 0, 0)",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",opacity:1}})}}}}},lg=["top","topLeft","topRight","bottom","bottomLeft","bottomRight"],sg={topLeft:"left",topRight:"right",bottomLeft:"left",bottomRight:"right",top:"left",bottom:"left"},cg=e=>{const t={};for(let n=1;n ${e.componentCls}-notice`]:{opacity:0,transition:`opacity ${e.motionDurationMid}`}};return Object.assign({[`&:not(:nth-last-child(-n+${e.notificationStackLayer}))`]:{opacity:0,overflow:"hidden",color:"transparent",pointerEvents:"none"}},t)},ug=e=>{const t={};for(let n=1;n{const{componentCls:t}=e;return Object.assign({[`${t}-stack`]:{[`& > ${t}-notice-wrapper`]:Object.assign({transition:`all ${e.motionDurationSlow}, backdrop-filter 0s`,position:"absolute"},cg(e))},[`${t}-stack:not(${t}-stack-expanded)`]:{[`& > ${t}-notice-wrapper`]:Object.assign({},ug(e))},[`${t}-stack${t}-stack-expanded`]:{[`& > ${t}-notice-wrapper`]:{"&:not(:nth-last-child(-n + 1))":{opacity:1,overflow:"unset",color:"inherit",pointerEvents:"auto",[`& > ${e.componentCls}-notice`]:{opacity:1}},"&:after":{content:'""',position:"absolute",height:e.margin,width:"100%",insetInline:0,bottom:e.calc(e.margin).mul(-1).equal(),background:"transparent",pointerEvents:"auto"}}}},lg.map((t=>((e,t)=>{const{componentCls:n}=e;return{[`${n}-${t}`]:{[`&${n}-stack > ${n}-notice-wrapper`]:{[t.startsWith("top")?"top":"bottom"]:0,[sg[t]]:{value:0,_skip_check_:!0}}}}})(e,t))).reduce(((e,t)=>Object.assign(Object.assign({},e),t)),{}))},fg=e=>{const{iconCls:t,componentCls:n,boxShadow:r,fontSizeLG:o,notificationMarginBottom:i,borderRadiusLG:a,colorSuccess:l,colorInfo:s,colorWarning:c,colorError:u,colorTextHeading:d,notificationBg:f,notificationPadding:p,notificationMarginEdge:h,fontSize:g,lineHeight:m,width:v,notificationIconSize:y,colorText:b}=e,x=`${n}-notice`;return{position:"relative",marginBottom:i,marginInlineStart:"auto",background:f,borderRadius:a,boxShadow:r,[x]:{padding:p,width:v,maxWidth:`calc(100vw - ${Mt(e.calc(h).mul(2).equal())})`,overflow:"hidden",lineHeight:m,wordWrap:"break-word"},[`${n}-close-icon`]:{fontSize:g,cursor:"pointer"},[`${x}-message`]:{marginBottom:e.marginXS,color:d,fontSize:o,lineHeight:e.lineHeightLG},[`${x}-description`]:{fontSize:g,color:b},[`${x}-closable ${x}-message`]:{paddingInlineEnd:e.paddingLG},[`${x}-with-icon ${x}-message`]:{marginBottom:e.marginXS,marginInlineStart:e.calc(e.marginSM).add(y).equal(),fontSize:o},[`${x}-with-icon ${x}-description`]:{marginInlineStart:e.calc(e.marginSM).add(y).equal(),fontSize:g},[`${x}-icon`]:{position:"absolute",fontSize:y,lineHeight:1,[`&-success${t}`]:{color:l},[`&-info${t}`]:{color:s},[`&-warning${t}`]:{color:c},[`&-error${t}`]:{color:u}},[`${x}-close`]:{position:"absolute",top:e.notificationPaddingVertical,insetInlineEnd:e.notificationPaddingHorizontal,color:e.colorIcon,outline:"none",width:e.notificationCloseButtonSize,height:e.notificationCloseButtonSize,borderRadius:e.borderRadiusSM,transition:`background-color ${e.motionDurationMid}, color ${e.motionDurationMid}`,display:"flex",alignItems:"center",justifyContent:"center","&:hover":{color:e.colorIconHover,backgroundColor:e.closeBtnHoverBg}},[`${x}-btn`]:{float:"right",marginTop:e.marginSM}}},pg=e=>{const{componentCls:t,notificationMarginBottom:n,notificationMarginEdge:r,motionDurationMid:o,motionEaseInOut:i}=e,a=`${t}-notice`,l=new Kn("antNotificationFadeOut",{"0%":{maxHeight:e.animationMaxHeight,marginBottom:n},"100%":{maxHeight:0,marginBottom:0,paddingTop:0,paddingBottom:0,opacity:0}});return[{[t]:Object.assign(Object.assign({},xr(e)),{position:"fixed",zIndex:e.zIndexPopup,marginRight:{value:r,_skip_check_:!0},[`${t}-hook-holder`]:{position:"relative"},[`${t}-fade-appear-prepare`]:{opacity:"0 !important"},[`${t}-fade-enter, ${t}-fade-appear`]:{animationDuration:e.motionDurationMid,animationTimingFunction:i,animationFillMode:"both",opacity:0,animationPlayState:"paused"},[`${t}-fade-leave`]:{animationTimingFunction:i,animationFillMode:"both",animationDuration:o,animationPlayState:"paused"},[`${t}-fade-enter${t}-fade-enter-active, ${t}-fade-appear${t}-fade-appear-active`]:{animationPlayState:"running"},[`${t}-fade-leave${t}-fade-leave-active`]:{animationName:l,animationPlayState:"running"},"&-rtl":{direction:"rtl",[`${a}-btn`]:{float:"left"}}})},{[t]:{[`${a}-wrapper`]:Object.assign({},fg(e))}}]},hg=e=>({zIndexPopup:e.zIndexPopupBase+As+50,width:384,closeBtnHoverBg:e.wireframe?"transparent":e.colorFillContent}),gg=e=>{const t=e.paddingMD,n=e.paddingLG;return Ko(e,{notificationBg:e.colorBgElevated,notificationPaddingVertical:t,notificationPaddingHorizontal:n,notificationIconSize:e.calc(e.fontSizeLG).mul(e.lineHeightLG).equal(),notificationCloseButtonSize:e.calc(e.controlHeightLG).mul(.55).equal(),notificationMarginBottom:e.margin,notificationPadding:`${Mt(e.paddingMD)} ${Mt(e.paddingContentHorizontalLG)}`,notificationMarginEdge:e.marginLG,animationMaxHeight:150,notificationStackLayer:3})},mg=oi("Notification",(e=>{const t=gg(e);return[pg(t),ag(t),dg(t)]}),hg),vg=ri(["Notification","PurePanel"],(e=>{const t=`${e.componentCls}-notice`,n=gg(e);return{[`${t}-pure-panel`]:Object.assign(Object.assign({},fg(n)),{width:n.width,maxWidth:`calc(100vw - ${Mt(e.calc(n.notificationMarginEdge).mul(2).equal())})`,margin:0})}}),hg);function yg(e,t){return null===t||!1===t?null:t||r.createElement("span",{className:`${e}-close-x`},r.createElement(ea,{className:`${e}-close-icon`}))}const bg={success:Gi,info:aa,error:Zi,warning:ra},xg=e=>{const{prefixCls:t,icon:n,type:o,message:i,description:l,btn:s,role:c="alert"}=e;let u=null;return n?u=r.createElement("span",{className:`${t}-icon`},n):o&&(u=r.createElement(bg[o]||null,{className:a()(`${t}-icon`,`${t}-icon-${o}`)})),r.createElement("div",{className:a()({[`${t}-with-icon`]:u}),role:c},u,r.createElement("div",{className:`${t}-message`},i),r.createElement("div",{className:`${t}-description`},l),s&&r.createElement("div",{className:`${t}-btn`},s))};var wg=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o{let{children:t,prefixCls:n}=e;const[o,i]=mg(n);return o(r.createElement(gs,{classNames:{list:i,notice:i}},t))},Cg=(e,t)=>{let{prefixCls:n,key:o}=t;return r.createElement(Eg,{prefixCls:n,key:o},e)},kg=r.forwardRef(((e,t)=>{const{top:n,bottom:o,prefixCls:i,getContainer:l,maxCount:s,rtl:c,onAllRemoved:u,stack:d}=e,{getPrefixCls:f,getPopupContainer:p,notification:h}=r.useContext(Ce),[,g]=No(),m=i||f("notification"),[v,y]=Es({prefixCls:m,style:e=>function(e,t,n){let r;switch(e){case"top":r={left:"50%",transform:"translateX(-50%)",right:"auto",top:t,bottom:"auto"};break;case"topLeft":r={left:0,top:t,bottom:"auto"};break;case"topRight":r={right:0,top:t,bottom:"auto"};break;case"bottom":r={left:"50%",transform:"translateX(-50%)",right:"auto",top:"auto",bottom:n};break;case"bottomLeft":r={left:0,top:"auto",bottom:n};break;default:r={right:0,top:"auto",bottom:n}}return r}(e,null!=n?n:24,null!=o?o:24),className:()=>a()({[`${m}-rtl`]:c}),motion:()=>function(e){return{motionName:`${e}-fade`}}(m),closable:!0,closeIcon:yg(m),duration:4.5,getContainer:()=>(null==l?void 0:l())||(null==p?void 0:p())||document.body,maxCount:s,onAllRemoved:u,renderNotifications:Cg,stack:!1!==d&&{threshold:"object"==typeof d?null==d?void 0:d.threshold:void 0,offset:8,gap:g.margin}});return r.useImperativeHandle(t,(()=>Object.assign(Object.assign({},v),{prefixCls:m,notification:h}))),y}));function Og(e){const t=r.useRef(null),n=(Os("Notification"),r.useMemo((()=>{const n=n=>{var o;if(!t.current)return;const{open:i,prefixCls:l,notification:s}=t.current,c=`${l}-notice`,{message:u,description:d,icon:f,type:p,btn:h,className:g,style:m,role:v="alert",closeIcon:y}=n,b=wg(n,["message","description","icon","type","btn","className","style","role","closeIcon"]),x=yg(c,y);return i(Object.assign(Object.assign({placement:null!==(o=null==e?void 0:e.placement)&&void 0!==o?o:Sg},b),{content:r.createElement(xg,{prefixCls:c,icon:f,type:p,message:u,description:d,btn:h,role:v}),className:a()(p&&`${c}-${p}`,g,null==s?void 0:s.className),style:Object.assign(Object.assign({},null==s?void 0:s.style),m),closeIcon:x,closable:!!x}))},o={open:n,destroy:e=>{var n,r;void 0!==e?null===(n=t.current)||void 0===n||n.close(e):null===(r=t.current)||void 0===r||r.destroy()}};return["success","info","warning","error"].forEach((e=>{o[e]=t=>n(Object.assign(Object.assign({},t),{type:e}))})),o}),[]));return[n,r.createElement(kg,Object.assign({key:"notification-holder"},e,{ref:t}))]}function Mg(e){return Og(e)}const Ig=r.createContext({}),$g=r.createContext({message:{},notification:{},modal:{}}),_g=oi("App",(e=>{const{componentCls:t,colorText:n,fontSize:r,lineHeight:o,fontFamily:i}=e;return{[t]:{color:n,fontSize:r,lineHeight:o,fontFamily:i}}}),(()=>({}))),Pg=e=>{const{prefixCls:t,children:n,className:o,rootClassName:i,message:l,notification:s,style:c,component:u="div"}=e,{getPrefixCls:d}=(0,r.useContext)(Ce),f=d("app",t),[p,h]=_g(f),g=a()(h,f,o,i),m=(0,r.useContext)(Ig),v=r.useMemo((()=>({message:Object.assign(Object.assign({},m.message),l),notification:Object.assign(Object.assign({},m.notification),s)})),[l,s,m.message,m.notification]),[y,b]=Gs(v.message),[x,w]=Mg(v.notification),[S,E]=ig(),C=r.useMemo((()=>({message:y,notification:x,modal:S})),[y,x,S]),k=!1===u?r.Fragment:u,O={className:g,style:c};return p(r.createElement($g.Provider,{value:C},r.createElement(Ig.Provider,{value:v},r.createElement(k,Object.assign({},!1===u?void 0:O),E,b,w,n))))};Pg.useApp=()=>r.useContext($g);const Ag=Pg;function Ng(e){return t=>r.createElement(Xc,{theme:{token:{motion:!1,zIndexPopupBase:0}}},r.createElement(e,Object.assign({},t)))}const Tg=(e,t,n,o)=>Ng((i=>{const{prefixCls:a,style:l}=i,s=r.useRef(null),[c,u]=r.useState(0),[d,f]=r.useState(0),[p,h]=dr(!1,{value:i.open}),{getPrefixCls:g}=r.useContext(Ce),m=g(t||"select",a);r.useEffect((()=>{if(h(!0),"undefined"!=typeof ResizeObserver){const e=new ResizeObserver((e=>{const t=e[0].target;u(t.offsetHeight+8),f(t.offsetWidth)})),t=setInterval((()=>{var r;const o=n?`.${n(m)}`:`.${m}-dropdown`,i=null===(r=s.current)||void 0===r?void 0:r.querySelector(o);i&&(clearInterval(t),e.observe(i))}),10);return()=>{clearInterval(t),e.disconnect()}}}),[]);let v=Object.assign(Object.assign({},i),{style:Object.assign(Object.assign({},l),{margin:0}),open:p,visible:p,getPopupContainer:()=>s.current});o&&(v=o(v));const y={paddingBottom:c,position:"relative",minWidth:d};return r.createElement("div",{ref:s,style:y},r.createElement(e,Object.assign({},v)))}));function Rg(e){var t=r.useRef();t.current=e;var n=r.useCallback((function(){for(var e,n=arguments.length,r=new Array(n),o=0;o0&&void 0!==arguments[0]?arguments[0]:250,t=r.useRef(null),n=r.useRef(null);return r.useEffect((function(){return function(){window.clearTimeout(n.current)}}),[]),[function(){return t.current},function(r){(r||null===t.current)&&(t.current=r),window.clearTimeout(n.current),n.current=window.setTimeout((function(){t.current=null}),e)}]}var Hg=new Map,Ug=new K((function(e){e.forEach((function(e){var t,n=e.target;null===(t=Hg.get(n))||void 0===t||t.forEach((function(e){return e(n)}))}))})),Wg=function(e){ba(n,e);var t=Sa(n);function n(){return rt(this,n),t.apply(this,arguments)}return it(n,[{key:"render",value:function(){return this.props.children}}]),n}(r.Component),Vg=r.createContext(null);function Xg(e,t){var n=e.children,o=e.disabled,i=r.useRef(null),a=r.useRef(null),l=r.useContext(Vg),s="function"==typeof n,c=s?n(i):n,u=r.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),d=!s&&r.isValidElement(c)&&pa(c),f=d?c.ref:null,p=r.useMemo((function(){return da(f,i)}),[f,i]),h=function(){return la(i.current)||la(a.current)};r.useImperativeHandle(t,(function(){return h()}));var g=r.useRef(e);g.current=e;var m=r.useCallback((function(e){var t=g.current,n=t.onResize,r=t.data,o=e.getBoundingClientRect(),i=o.width,a=o.height,s=e.offsetWidth,c=e.offsetHeight,d=Math.floor(i),f=Math.floor(a);if(u.current.width!==d||u.current.height!==f||u.current.offsetWidth!==s||u.current.offsetHeight!==c){var p={width:d,height:f,offsetWidth:s,offsetHeight:c};u.current=p;var h=s===Math.round(i)?i:s,m=c===Math.round(a)?a:c,v=De(De({},p),{},{offsetWidth:h,offsetHeight:m});null==l||l(v,e,r),n&&Promise.resolve().then((function(){n(v,e)}))}}),[]);return r.useEffect((function(){var e,t,n=h();return n&&!o&&(e=n,t=m,Hg.has(e)||(Hg.set(e,new Set),Ug.observe(e)),Hg.get(e).add(t)),function(){return function(e,t){Hg.has(e)&&(Hg.get(e).delete(t),Hg.get(e).size||(Ug.unobserve(e),Hg.delete(e)))}(n,m)}}),[i.current,o]),r.createElement(Wg,{ref:a},d?r.cloneElement(c,{ref:p}):c)}const qg=r.forwardRef(Xg);function Gg(e,t){var n=e.children;return("function"==typeof n?[n]:Cf(n)).map((function(n,o){var i=(null==n?void 0:n.key)||"".concat("rc-observer-key","-").concat(o);return r.createElement(qg,Xt({},e,{key:i,ref:0===o?t:void 0}),n)}))}var Yg=r.forwardRef(Gg);Yg.Collection=function(e){var t=e.children,n=e.onBatchResize,o=r.useRef(0),i=r.useRef([]),a=r.useContext(Vg),l=r.useCallback((function(e,t,r){o.current+=1;var l=o.current;i.current.push({size:e,element:t,data:r}),Promise.resolve().then((function(){l===o.current&&(null==n||n(i.current),i.current=[])})),null==a||a(e,t,r)}),[n,a]);return r.createElement(Vg.Provider,{value:l},t)};const Kg=Yg;var Zg=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],Jg=void 0;function Qg(e,t){var n=e.prefixCls,o=e.invalidate,i=e.item,l=e.renderItem,s=e.responsive,c=e.responsiveDisabled,u=e.registerSize,d=e.itemKey,f=e.className,p=e.style,h=e.children,g=e.display,m=e.order,v=e.component,y=void 0===v?"div":v,b=ha(e,Zg),x=s&&!g;function w(e){u(d,e)}r.useEffect((function(){return function(){w(null)}}),[]);var S,E=l&&i!==Jg?l(i):h;o||(S={opacity:x?0:1,height:x?0:Jg,overflowY:x?"hidden":Jg,order:s?m:Jg,pointerEvents:x?"none":Jg,position:x?"absolute":Jg});var C={};x&&(C["aria-hidden"]=!0);var k=r.createElement(y,Xt({className:a()(!o&&n,f),style:De(De({},S),p)},C,b,{ref:t}),E);return s&&(k=r.createElement(Kg,{onResize:function(e){w(e.offsetWidth)},disabled:c},k)),k}var em=r.forwardRef(Qg);em.displayName="Item";const tm=em;function nm(e,t){var n=Ne(r.useState(t),2),o=n[0],i=n[1];return[o,Rg((function(t){e((function(){i(t)}))}))]}var rm=r.createContext(null),om=["component"],im=["className"],am=["className"],lm=function(e,t){var n=r.useContext(rm);if(!n){var o=e.component,i=void 0===o?"div":o,l=ha(e,om);return r.createElement(i,Xt({},l,{ref:t}))}var s=n.className,c=ha(n,im),u=e.className,d=ha(e,am);return r.createElement(rm.Provider,{value:null},r.createElement(tm,Xt({ref:t,className:a()(s,u)},c,d)))},sm=r.forwardRef(lm);sm.displayName="RawItem";const cm=sm;var um=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],dm="responsive",fm="invalidate";function pm(e){return"+ ".concat(e.length," ...")}function hm(e,t){var n,o=e.prefixCls,i=void 0===o?"rc-overflow":o,l=e.data,s=void 0===l?[]:l,c=e.renderItem,u=e.renderRawItem,d=e.itemKey,f=e.itemWidth,p=void 0===f?10:f,h=e.ssr,g=e.style,m=e.className,v=e.maxCount,y=e.renderRest,b=e.renderRawRest,x=e.suffix,S=e.component,E=void 0===S?"div":S,C=e.itemComponent,k=e.onVisibleChange,O=ha(e,um),M="full"===h,I=(n=r.useRef(null),function(e){n.current||(n.current=[],function(e){if("undefined"==typeof MessageChannel)ol(e);else{var t=new MessageChannel;t.port1.onmessage=function(){return e()},t.port2.postMessage(void 0)}}((function(){(0,w.unstable_batchedUpdates)((function(){n.current.forEach((function(e){e()})),n.current=null}))}))),n.current.push(e)}),$=Ne(nm(I,null),2),_=$[0],P=$[1],A=_||0,N=Ne(nm(I,new Map),2),T=N[0],R=N[1],L=Ne(nm(I,0),2),D=L[0],j=L[1],F=Ne(nm(I,0),2),B=F[0],z=F[1],H=Ne(nm(I,0),2),U=H[0],W=H[1],V=Ne((0,r.useState)(null),2),X=V[0],q=V[1],G=Ne((0,r.useState)(null),2),Y=G[0],K=G[1],Z=r.useMemo((function(){return null===Y&&M?Number.MAX_SAFE_INTEGER:Y||0}),[Y,_]),J=Ne((0,r.useState)(!1),2),Q=J[0],ee=J[1],te="".concat(i,"-item"),ne=Math.max(D,B),re=v===dm,oe=s.length&&re,ie=v===fm,ae=oe||"number"==typeof v&&s.length>v,le=(0,r.useMemo)((function(){var e=s;return oe?e=null===_&&M?s:s.slice(0,Math.min(s.length,A/p)):"number"==typeof v&&(e=s.slice(0,v)),e}),[s,p,_,v,oe]),se=(0,r.useMemo)((function(){return oe?s.slice(Z+1):s.slice(le.length)}),[s,le,oe,Z]),ce=(0,r.useCallback)((function(e,t){var n;return"function"==typeof d?d(e):null!==(n=d&&(null==e?void 0:e[d]))&&void 0!==n?n:t}),[d]),ue=(0,r.useCallback)(c||function(e){return e},[c]);function de(e,t,n){(Y!==e||void 0!==t&&t!==X)&&(K(e),n||(ee(eA){de(r-1,e-o-U+B);break}}x&&pe(0)+U>A&&q(null)}}),[A,T,B,U,ce,le]);var he=Q&&!!se.length,ge={};null!==X&&oe&&(ge={position:"absolute",left:X,top:0});var me,ve={prefixCls:te,responsive:oe,component:C,invalidate:ie},ye=u?function(e,t){var n=ce(e,t);return r.createElement(rm.Provider,{key:n,value:De(De({},ve),{},{order:t,item:e,itemKey:n,registerSize:fe,display:t<=Z})},u(e,t))}:function(e,t){var n=ce(e,t);return r.createElement(tm,Xt({},ve,{order:t,key:n,item:e,renderItem:ue,itemKey:n,registerSize:fe,display:t<=Z}))},be={order:he?Z:Number.MAX_SAFE_INTEGER,className:"".concat(te,"-rest"),registerSize:function(e,t){z(t),j(B)},display:he};if(b)b&&(me=r.createElement(rm.Provider,{value:De(De({},ve),be)},b(se)));else{var xe=y||pm;me=r.createElement(tm,Xt({},ve,be),"function"==typeof xe?xe(se):xe)}var we=r.createElement(E,Xt({className:a()(!ie&&i,m),style:g,ref:t},O),le.map(ye),ae?me:null,x&&r.createElement(tm,Xt({},ve,{responsive:re,responsiveDisabled:!oe,order:Z,className:"".concat(te,"-suffix"),registerSize:function(e,t){W(t)},display:!0,style:ge}),x));return re&&(we=r.createElement(Kg,{onResize:function(e,t){P(t.clientWidth)},disabled:!oe},we)),we}var gm=r.forwardRef(hm);gm.displayName="Overflow",gm.Item=cm,gm.RESPONSIVE=dm,gm.INVALIDATE=fm;const mm=gm;var vm=function(e,t){var n,o=e.prefixCls,i=e.id,l=e.inputElement,s=e.disabled,c=e.tabIndex,u=e.autoFocus,d=e.autoComplete,f=e.editable,p=e.activeDescendantId,h=e.value,g=e.maxLength,m=e.onKeyDown,v=e.onMouseDown,y=e.onChange,b=e.onPaste,x=e.onCompositionStart,w=e.onCompositionEnd,S=e.open,E=e.attrs,C=l||r.createElement("input",null),k=C,O=k.ref,M=k.props,I=M.onKeyDown,$=M.onChange,_=M.onMouseDown,P=M.onCompositionStart,A=M.onCompositionEnd,N=M.style;return C.props,r.cloneElement(C,De(De(De({type:"search"},M),{},{id:i,ref:da(t,O),disabled:s,tabIndex:c,autoComplete:d||"off",autoFocus:u,className:a()("".concat(o,"-selection-search-input"),null===(n=C)||void 0===n||null===(n=n.props)||void 0===n?void 0:n.className),role:"combobox","aria-expanded":S||!1,"aria-haspopup":"listbox","aria-owns":"".concat(i,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(i,"_list"),"aria-activedescendant":S?p:void 0},E),{},{value:f?h:"",maxLength:g,readOnly:!f,unselectable:f?null:"on",style:De(De({},N),{},{opacity:f?null:0}),onKeyDown:function(e){m(e),I&&I(e)},onMouseDown:function(e){v(e),_&&_(e)},onChange:function(e){y(e),$&&$(e)},onCompositionStart:function(e){x(e),P&&P(e)},onCompositionEnd:function(e){w(e),A&&A(e)},onPaste:b}))},ym=r.forwardRef(vm);ym.displayName="Input";const bm=ym;function xm(e){return Array.isArray(e)?e:void 0!==e?[e]:[]}var wm="undefined"!=typeof window&&window.document&&window.document.documentElement;function Sm(e){return["string","number"].includes(Oe(e))}function Em(e){var t=void 0;return e&&(Sm(e.title)?t=e.title.toString():Sm(e.label)&&(t=e.label.toString())),t}function Cm(e){var t;return null!==(t=e.key)&&void 0!==t?t:e.value}var km=function(e){e.preventDefault(),e.stopPropagation()};const Om=function(e){var t,n,o=e.id,i=e.prefixCls,l=e.values,s=e.open,c=e.searchValue,u=e.autoClearSearchValue,d=e.inputRef,f=e.placeholder,p=e.disabled,h=e.mode,g=e.showSearch,m=e.autoFocus,v=e.autoComplete,y=e.activeDescendantId,b=e.tabIndex,x=e.removeIcon,w=e.maxTagCount,S=e.maxTagTextLength,E=e.maxTagPlaceholder,C=void 0===E?function(e){return"+ ".concat(e.length," ...")}:E,k=e.tagRender,O=e.onToggleOpen,M=e.onRemove,I=e.onInputChange,$=e.onInputPaste,_=e.onInputKeyDown,P=e.onInputMouseDown,A=e.onInputCompositionStart,N=e.onInputCompositionEnd,T=r.useRef(null),R=Ne((0,r.useState)(0),2),L=R[0],D=R[1],j=Ne((0,r.useState)(!1),2),F=j[0],B=j[1],z="".concat(i,"-selection"),H=s||"multiple"===h&&!1===u||"tags"===h?c:"",U="tags"===h||"multiple"===h&&!1===u||g&&(s||F);function W(e,t,n,o,i){return r.createElement("span",{className:a()("".concat(z,"-item"),Ie({},"".concat(z,"-item-disabled"),n)),title:Em(e)},r.createElement("span",{className:"".concat(z,"-item-content")},t),o&&r.createElement(jg,{className:"".concat(z,"-item-remove"),onMouseDown:km,onClick:i,customizeIcon:x},"×"))}t=function(){D(T.current.scrollWidth)},n=[H],wm?r.useLayoutEffect(t,n):r.useEffect(t,n);var V=r.createElement("div",{className:"".concat(z,"-search"),style:{width:L},onFocus:function(){B(!0)},onBlur:function(){B(!1)}},r.createElement(bm,{ref:d,open:s,prefixCls:i,id:o,inputElement:null,disabled:p,autoFocus:m,autoComplete:v,editable:U,activeDescendantId:y,value:H,onKeyDown:_,onMouseDown:P,onChange:I,onPaste:$,onCompositionStart:A,onCompositionEnd:N,tabIndex:b,attrs:lf(e,!0)}),r.createElement("span",{ref:T,className:"".concat(z,"-search-mirror"),"aria-hidden":!0},H," ")),X=r.createElement(mm,{prefixCls:"".concat(z,"-overflow"),data:l,renderItem:function(e){var t=e.disabled,n=e.label,o=e.value,i=!p&&!t,a=n;if("number"==typeof S&&("string"==typeof n||"number"==typeof n)){var l=String(a);l.length>S&&(a="".concat(l.slice(0,S),"..."))}var c=function(t){t&&t.stopPropagation(),M(e)};return"function"==typeof k?function(e,t,n,o,i){return r.createElement("span",{onMouseDown:function(e){km(e),O(!s)}},k({label:t,value:e,disabled:n,closable:o,onClose:i}))}(o,a,t,i,c):W(e,a,t,i,c)},renderRest:function(e){var t="function"==typeof C?C(e):C;return W({title:t},t,!1)},suffix:V,itemKey:Cm,maxCount:w});return r.createElement(r.Fragment,null,X,!l.length&&!H&&r.createElement("span",{className:"".concat(z,"-placeholder")},f))},Mm=function(e){var t=e.inputElement,n=e.prefixCls,o=e.id,i=e.inputRef,a=e.disabled,l=e.autoFocus,s=e.autoComplete,c=e.activeDescendantId,u=e.mode,d=e.open,f=e.values,p=e.placeholder,h=e.tabIndex,g=e.showSearch,m=e.searchValue,v=e.activeValue,y=e.maxLength,b=e.onInputKeyDown,x=e.onInputMouseDown,w=e.onInputChange,S=e.onInputPaste,E=e.onInputCompositionStart,C=e.onInputCompositionEnd,k=e.title,O=Ne(r.useState(!1),2),M=O[0],I=O[1],$="combobox"===u,_=$||g,P=f[0],A=m||"";$&&v&&!M&&(A=v),r.useEffect((function(){$&&I(!1)}),[$,v]);var N=!("combobox"!==u&&!d&&!g||!A),T=void 0===k?Em(P):k;return r.createElement(r.Fragment,null,r.createElement("span",{className:"".concat(n,"-selection-search")},r.createElement(bm,{ref:i,prefixCls:n,id:o,open:d,inputElement:t,disabled:a,autoFocus:l,autoComplete:s,editable:_,activeDescendantId:c,value:A,onKeyDown:b,onMouseDown:x,onChange:function(e){I(!0),w(e)},onPaste:S,onCompositionStart:E,onCompositionEnd:C,tabIndex:h,attrs:lf(e,!0),maxLength:$?y:void 0})),!$&&P?r.createElement("span",{className:"".concat(n,"-selection-item"),title:T,style:N?{visibility:"hidden"}:void 0},P.label):null,function(){if(P)return null;var e=N?{visibility:"hidden"}:void 0;return r.createElement("span",{className:"".concat(n,"-selection-placeholder"),style:e},p)}())};var Im=function(e,t){var n=(0,r.useRef)(null),o=(0,r.useRef)(!1),i=e.prefixCls,a=e.open,l=e.mode,s=e.showSearch,c=e.tokenWithEnter,u=e.autoClearSearchValue,d=e.onSearch,f=e.onSearchSubmit,p=e.onToggleOpen,h=e.onInputKeyDown,g=e.domRef;r.useImperativeHandle(t,(function(){return{focus:function(){n.current.focus()},blur:function(){n.current.blur()}}}));var m=Ne(zg(0),2),v=m[0],y=m[1],b=(0,r.useRef)(null),x=function(e){!1!==d(e,!0,o.current)&&p(!0)},w={inputRef:n,onInputKeyDown:function(e){var t,n=e.which;n!==ds.UP&&n!==ds.DOWN||e.preventDefault(),h&&h(e),n!==ds.ENTER||"tags"!==l||o.current||a||null==f||f(e.target.value),t=n,[ds.ESC,ds.SHIFT,ds.BACKSPACE,ds.TAB,ds.WIN_KEY,ds.ALT,ds.META,ds.WIN_KEY_RIGHT,ds.CTRL,ds.SEMICOLON,ds.EQUALS,ds.CAPS_LOCK,ds.CONTEXT_MENU,ds.F1,ds.F2,ds.F3,ds.F4,ds.F5,ds.F6,ds.F7,ds.F8,ds.F9,ds.F10,ds.F11,ds.F12].includes(t)||p(!0)},onInputMouseDown:function(){y(!0)},onInputChange:function(e){var t=e.target.value;if(c&&b.current&&/[\r\n]/.test(b.current)){var n=b.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");t=t.replace(n,b.current)}b.current=null,x(t)},onInputPaste:function(e){var t=e.clipboardData.getData("text");b.current=t},onInputCompositionStart:function(){o.current=!0},onInputCompositionEnd:function(e){o.current=!1,"combobox"!==l&&x(e.target.value)}},S="multiple"===l||"tags"===l?r.createElement(Om,Xt({},e,w)):r.createElement(Mm,Xt({},e,w));return r.createElement("div",{ref:g,className:"".concat(i,"-selector"),onClick:function(e){e.target!==n.current&&(void 0!==document.body.style.msTouchAction?setTimeout((function(){n.current.focus()})):n.current.focus())},onMouseDown:function(e){var t=v();e.target===n.current||t||"combobox"===l||e.preventDefault(),("combobox"===l||s&&t)&&a||(a&&!1!==u&&d("",!0,!1),p())}},S)},$m=r.forwardRef(Im);$m.displayName="Selector";const _m=$m;function Pm(e){return Pm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pm(e)}function Am(e){var t=function(e,t){if("object"!=Pm(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Pm(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Pm(t)?t:String(t)}function Nm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Tm(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:{},n=[];return r.Children.forEach(e,(function(e){(null!=e||t.keepEmpty)&&(Array.isArray(e)?n=n.concat(Bm(e)):(0,Fm.isFragment)(e)&&e.props?n=n.concat(Bm(e.props.children,t)):n.push(e))})),n}var zm={},Hm=[];function Um(e,t){}function Wm(e,t){}function Vm(e,t,n){t||zm[n]||(e(!1,n),zm[n]=!0)}function Xm(e,t){Vm(Um,e,t)}function qm(e){return qm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qm(e)}function Gm(e){var t=function(e,t){if("object"!==qm(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==qm(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===qm(t)?t:String(t)}function Ym(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Km(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0,z=Dm(r.useState(!w||!B),2),H=z[0],U=z[1];if(Iv((function(){!H&&B&&s&&U(!0)}),[H,B,s]),!H)return null;var W="auto",V={left:"-1000vw",top:"-1000vh",right:W,bottom:W};if(I||!u){var X,q=v.points,G=v.dynamicInset||(null===(X=v._experimental)||void 0===X?void 0:X.dynamicInset),Y=G&&"r"===q[0][1],K=G&&"b"===q[0][0];Y?(V.right=P,V.left=W):(V.left=$,V.right=W),K?(V.bottom=A,V.top=W):(V.top=_,V.bottom=W)}var Z={};return R&&(R.includes("height")&&D?Z.height=D:R.includes("minHeight")&&D&&(Z.minHeight=D),R.includes("width")&&L?Z.width=L:R.includes("minWidth")&&L&&(Z.minWidth=L)),u||(Z.pointerEvents="none"),r.createElement(E,{open:x||F,getContainer:w&&function(){return w(s)},autoDestroy:S},r.createElement(Pv,{prefixCls:i,open:u,zIndex:C,mask:h,motion:b}),r.createElement(mv,{onResize:N,disabled:!u},(function(e){return r.createElement(bl,$v({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:x,leavedClassName:"".concat(i,"-hidden")},y,{onAppearPrepare:T,onEnterPrepare:T,visible:u,onVisibleChanged:function(e){var t;null==y||null===(t=y.onVisibleChanged)||void 0===t||t.call(y,e),c(e)}}),(function(n,s){var c=n.className,d=n.style,h=a()(i,c,o);return r.createElement("div",{ref:tv(e,t,s),className:h,style:Tm(Tm(Tm(Tm({"--arrow-x":"".concat(m.x||0,"px"),"--arrow-y":"".concat(m.y||0,"px")},V),Z),d),{},{boxSizing:"border-box",zIndex:C},l),onMouseEnter:k,onMouseLeave:O,onPointerEnter:M,onClick:p},g&&r.createElement(_v,{prefixCls:i,arrow:g,arrowPos:m,align:v}),r.createElement(Nv,{cache:!u&&!f},j))}))})))}));const Rv=Tv;var Lv=r.forwardRef((function(e,t){var n=e.children,o=e.getTriggerDOMNode,i=rv(n),a=r.useCallback((function(e){ev(t,o?o(e):e)}),[o]),l=nv(a,n.ref);return i?r.cloneElement(n,{ref:l}):n}));const Dv=Lv,jv=r.createContext(null);function Fv(e){return e?Array.isArray(e)?e:[e]:[]}function Bv(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(arguments.length>2?arguments[2]:void 0)?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function zv(e,t,n,r){return t||(n?{motionName:"".concat(e,"-").concat(n)}:r?{motionName:r}:null)}function Hv(e){return e.ownerDocument.defaultView}function Uv(e){for(var t=[],n=null==e?void 0:e.parentElement,r=["hidden","scroll","clip","auto"];n;){var o=Hv(n).getComputedStyle(n);[o.overflowX,o.overflowY,o.overflow].some((function(e){return r.includes(e)}))&&t.push(n),n=n.parentElement}return t}function Wv(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Number.isNaN(e)?t:e}function Vv(e){return Wv(parseFloat(e),0)}function Xv(e,t){var n=Tm({},e);return(t||[]).forEach((function(e){if(!(e instanceof HTMLBodyElement||e instanceof HTMLHtmlElement)){var t=Hv(e).getComputedStyle(e),r=t.overflow,o=t.overflowClipMargin,i=t.borderTopWidth,a=t.borderBottomWidth,l=t.borderLeftWidth,s=t.borderRightWidth,c=e.getBoundingClientRect(),u=e.offsetHeight,d=e.clientHeight,f=e.offsetWidth,p=e.clientWidth,h=Vv(i),g=Vv(a),m=Vv(l),v=Vv(s),y=Wv(Math.round(c.width/f*1e3)/1e3),b=Wv(Math.round(c.height/u*1e3)/1e3),x=(f-p-m-v)*y,w=(u-d-h-g)*b,S=h*b,E=g*b,C=m*y,k=v*y,O=0,M=0;if("clip"===r){var I=Vv(o);O=I*y,M=I*b}var $=c.x+C-O,_=c.y+S-M,P=$+c.width+2*O-C-k-x,A=_+c.height+2*M-S-E-w;n.left=Math.max(n.left,$),n.top=Math.max(n.top,_),n.right=Math.min(n.right,P),n.bottom=Math.min(n.bottom,A)}})),n}function qv(e){var t="".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0),n=t.match(/^(.*)\%$/);return n?e*(parseFloat(n[1])/100):parseFloat(t)}function Gv(e,t){var n=Dm(t||[],2),r=n[0],o=n[1];return[qv(e.width,r),qv(e.height,o)]}function Yv(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return[e[0],e[1]]}function Kv(e,t){var n,r=t[0],o=t[1];return n="t"===r?e.y:"b"===r?e.y+e.height:e.y+e.height/2,{x:"l"===o?e.x:"r"===o?e.x+e.width:e.x+e.width/2,y:n}}function Zv(e,t){var n={t:"b",b:"t",l:"r",r:"l"};return e.map((function(e,r){return r===t?n[e]||"c":e})).join("")}function Jv(e){return function(e){if(Array.isArray(e))return Rm(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Lm(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Qv=function(e){return+setTimeout(e,16)},ey=function(e){return clearTimeout(e)};"undefined"!=typeof window&&"requestAnimationFrame"in window&&(Qv=function(e){return window.requestAnimationFrame(e)},ey=function(e){return window.cancelAnimationFrame(e)});var ty=0,ny=new Map;function ry(e){ny.delete(e)}var oy=function(e){var t=ty+=1;return function n(r){if(0===r)ry(t),e();else{var o=Qv((function(){n(r-1)}));ny.set(t,o)}}(arguments.length>1&&void 0!==arguments[1]?arguments[1]:1),t};oy.cancel=function(e){var t=ny.get(e);return ry(e),ey(t)};const iy=oy;var ay=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];const ly=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Jd,t=r.forwardRef((function(t,n){var o=t.prefixCls,i=void 0===o?"rc-trigger-popup":o,l=t.children,s=t.action,c=void 0===s?"hover":s,u=t.showAction,d=t.hideAction,f=t.popupVisible,p=t.defaultPopupVisible,h=t.onPopupVisibleChange,g=t.afterPopupVisibleChange,m=t.mouseEnterDelay,v=t.mouseLeaveDelay,y=void 0===v?.1:v,b=t.focusDelay,x=t.blurDelay,w=t.mask,S=t.maskClosable,E=void 0===S||S,C=t.getPopupContainer,k=t.forceRender,O=t.autoDestroy,M=t.destroyPopupOnHide,I=t.popup,$=t.popupClassName,_=t.popupStyle,P=t.popupPlacement,A=t.builtinPlacements,N=void 0===A?{}:A,T=t.popupAlign,R=t.zIndex,L=t.stretch,D=t.getPopupClassNameFromAlign,j=t.fresh,F=t.alignPoint,B=t.onPopupClick,z=t.onPopupAlign,H=t.arrow,U=t.popupMotion,W=t.maskMotion,V=t.popupTransitionName,X=t.popupAnimation,q=t.maskTransitionName,G=t.maskAnimation,Y=t.className,K=t.getTriggerDOMNode,Z=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,ay),J=O||M||!1,Q=Dm(r.useState(!1),2),ee=Q[0],te=Q[1];Iv((function(){te(function(){if("undefined"==typeof navigator||"undefined"==typeof window)return!1;var e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(null==e?void 0:e.substr(0,4))}())}),[]);var ne=r.useRef({}),re=r.useContext(jv),oe=r.useMemo((function(){return{registerSubPopup:function(e,t){ne.current[e]=t,null==re||re.registerSubPopup(e,t)}}}),[re]),ie=Ov(),ae=Dm(r.useState(null),2),le=ae[0],se=ae[1],ce=bv((function(e){Zm(e)&&le!==e&&se(e),null==re||re.registerSubPopup(ie,e)})),ue=Dm(r.useState(null),2),de=ue[0],fe=ue[1],pe=r.useRef(null),he=bv((function(e){Zm(e)&&de!==e&&(fe(e),pe.current=e)})),ge=r.Children.only(l),me=(null==ge?void 0:ge.props)||{},ve={},ye=bv((function(e){var t,n,r=de;return(null==r?void 0:r.contains(e))||(null===(t=yv(r))||void 0===t?void 0:t.host)===e||e===r||(null==le?void 0:le.contains(e))||(null===(n=yv(le))||void 0===n?void 0:n.host)===e||e===le||Object.values(ne.current).some((function(t){return(null==t?void 0:t.contains(e))||e===t}))})),be=zv(i,U,X,V),xe=zv(i,W,G,q),we=Dm(r.useState(p||!1),2),Se=we[0],Ee=we[1],Ce=null!=f?f:Se,ke=bv((function(e){void 0===f&&Ee(e)}));Iv((function(){Ee(f||!1)}),[f]);var Oe=r.useRef(Ce);Oe.current=Ce;var Me=r.useRef([]);Me.current=[];var Ie=bv((function(e){var t;ke(e),(null!==(t=Me.current[Me.current.length-1])&&void 0!==t?t:Ce)!==e&&(Me.current.push(e),null==h||h(e))})),$e=r.useRef(),_e=function(){clearTimeout($e.current)},Pe=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;_e(),0===t?Ie(e):$e.current=setTimeout((function(){Ie(e)}),1e3*t)};r.useEffect((function(){return _e}),[]);var Ae=Dm(r.useState(!1),2),Ne=Ae[0],Te=Ae[1];Iv((function(e){e&&!Ce||Te(!0)}),[Ce]);var Re=Dm(r.useState(null),2),Le=Re[0],De=Re[1],je=Dm(r.useState([0,0]),2),Fe=je[0],Be=je[1],ze=function(e){Be([e.clientX,e.clientY])},He=function(e,t,n,o,i,a,l){var s=Dm(r.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:i[o]||{}}),2),c=s[0],u=s[1],d=r.useRef(0),f=r.useMemo((function(){return t?Uv(t):[]}),[t]),p=r.useRef({});e||(p.current={});var h=bv((function(){if(t&&n&&e){var r,s,c,d=t,h=d.ownerDocument,g=Hv(d).getComputedStyle(d),m=g.width,v=g.height,y=g.position,b=d.style.left,x=d.style.top,w=d.style.right,S=d.style.bottom,E=d.style.overflow,C=Tm(Tm({},i[o]),a),k=h.createElement("div");if(null===(r=d.parentElement)||void 0===r||r.appendChild(k),k.style.left="".concat(d.offsetLeft,"px"),k.style.top="".concat(d.offsetTop,"px"),k.style.position=y,k.style.height="".concat(d.offsetHeight,"px"),k.style.width="".concat(d.offsetWidth,"px"),d.style.left="0",d.style.top="0",d.style.right="auto",d.style.bottom="auto",d.style.overflow="hidden",Array.isArray(n))c={x:n[0],y:n[1],width:0,height:0};else{var O=n.getBoundingClientRect();c={x:O.x,y:O.y,width:O.width,height:O.height}}var M=d.getBoundingClientRect(),I=h.documentElement,$=I.clientWidth,_=I.clientHeight,P=I.scrollWidth,A=I.scrollHeight,N=I.scrollTop,T=I.scrollLeft,R=M.height,L=M.width,D=c.height,j=c.width,F={left:0,top:0,right:$,bottom:_},B={left:-T,top:-N,right:P-T,bottom:A-N},z=C.htmlRegion,H="visible",U="visibleFirst";"scroll"!==z&&z!==U&&(z=H);var W=z===U,V=Xv(B,f),X=Xv(F,f),q=z===H?X:V,G=W?X:q;d.style.left="auto",d.style.top="auto",d.style.right="0",d.style.bottom="0";var Y=d.getBoundingClientRect();d.style.left=b,d.style.top=x,d.style.right=w,d.style.bottom=S,d.style.overflow=E,null===(s=d.parentElement)||void 0===s||s.removeChild(k);var K=Wv(Math.round(L/parseFloat(m)*1e3)/1e3),Z=Wv(Math.round(R/parseFloat(v)*1e3)/1e3);if(0===K||0===Z||Zm(n)&&!function(e){if(!e)return!1;if(e instanceof Element){if(e.offsetParent)return!0;if(e.getBBox){var t=e.getBBox(),n=t.width,r=t.height;if(n||r)return!0}if(e.getBoundingClientRect){var o=e.getBoundingClientRect(),i=o.width,a=o.height;if(i||a)return!0}}return!1}(n))return;var J=C.offset,Q=C.targetOffset,ee=Dm(Gv(M,J),2),te=ee[0],ne=ee[1],re=Dm(Gv(c,Q),2),oe=re[0],ie=re[1];c.x-=oe,c.y-=ie;var ae=Dm(C.points||[],2),le=ae[0],se=Yv(ae[1]),ce=Yv(le),ue=Kv(c,se),de=Kv(M,ce),fe=Tm({},C),pe=ue.x-de.x+te,he=ue.y-de.y+ne;function lt(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:q,r=M.x+e,o=M.y+t,i=r+L,a=o+R,l=Math.max(r,n.left),s=Math.max(o,n.top),c=Math.min(i,n.right),u=Math.min(a,n.bottom);return Math.max(0,(c-l)*(u-s))}var ge,me,ve,ye,be=lt(pe,he),xe=lt(pe,he,X),we=Kv(c,["t","l"]),Se=Kv(M,["t","l"]),Ee=Kv(c,["b","r"]),Ce=Kv(M,["b","r"]),ke=C.overflow||{},Oe=ke.adjustX,Me=ke.adjustY,Ie=ke.shiftX,$e=ke.shiftY,_e=function(e){return"boolean"==typeof e?e:e>=0};function st(){ge=M.y+he,me=ge+R,ve=M.x+pe,ye=ve+L}st();var Pe=_e(Me),Ae=ce[0]===se[0];if(Pe&&"t"===ce[0]&&(me>G.bottom||p.current.bt)){var Ne=he;Ae?Ne-=R-D:Ne=we.y-Ce.y-ne;var Te=lt(pe,Ne),Re=lt(pe,Ne,X);Te>be||Te===be&&(!W||Re>=xe)?(p.current.bt=!0,he=Ne,ne=-ne,fe.points=[Zv(ce,0),Zv(se,0)]):p.current.bt=!1}if(Pe&&"b"===ce[0]&&(gebe||De===be&&(!W||je>=xe)?(p.current.tb=!0,he=Le,ne=-ne,fe.points=[Zv(ce,0),Zv(se,0)]):p.current.tb=!1}var Fe=_e(Oe),Be=ce[1]===se[1];if(Fe&&"l"===ce[1]&&(ye>G.right||p.current.rl)){var ze=pe;Be?ze-=L-j:ze=we.x-Ce.x-te;var He=lt(ze,he),Ue=lt(ze,he,X);He>be||He===be&&(!W||Ue>=xe)?(p.current.rl=!0,pe=ze,te=-te,fe.points=[Zv(ce,1),Zv(se,1)]):p.current.rl=!1}if(Fe&&"r"===ce[1]&&(vebe||Ve===be&&(!W||Xe>=xe)?(p.current.lr=!0,pe=We,te=-te,fe.points=[Zv(ce,1),Zv(se,1)]):p.current.lr=!1}st();var qe=!0===Ie?0:Ie;"number"==typeof qe&&(veX.right&&(pe-=ye-X.right-te,c.x>X.right-qe&&(pe+=c.x-X.right+qe)));var Ge=!0===$e?0:$e;"number"==typeof Ge&&(geX.bottom&&(he-=me-X.bottom-ne,c.y>X.bottom-Ge&&(he+=c.y-X.bottom+Ge)));var Ye=M.x+pe,Ke=Ye+L,Ze=M.y+he,Je=Ze+R,Qe=c.x,et=Qe+j,tt=c.y,nt=tt+D,rt=(Math.max(Ye,Qe)+Math.min(Ke,et))/2-Ye,ot=(Math.max(Ze,tt)+Math.min(Je,nt))/2-Ze;null==l||l(t,fe);var it=Y.right-M.x-(pe+M.width),at=Y.bottom-M.y-(he+M.height);u({ready:!0,offsetX:pe/K,offsetY:he/Z,offsetR:it/K,offsetB:at/Z,arrowX:rt/K,arrowY:ot/Z,scaleX:K,scaleY:Z,align:fe})}})),g=function(){u((function(e){return Tm(Tm({},e),{},{ready:!1})}))};return Iv(g,[o]),Iv((function(){e||g()}),[e]),[c.ready,c.offsetX,c.offsetY,c.offsetR,c.offsetB,c.arrowX,c.arrowY,c.scaleX,c.scaleY,c.align,function(){d.current+=1;var e=d.current;Promise.resolve().then((function(){d.current===e&&h()}))}]}(Ce,le,F?Fe:de,P,N,T,z),Ue=Dm(He,11),We=Ue[0],Ve=Ue[1],Xe=Ue[2],qe=Ue[3],Ge=Ue[4],Ye=Ue[5],Ke=Ue[6],Ze=Ue[7],Je=Ue[8],Qe=Ue[9],et=Ue[10],tt=function(e,t,n,o){return r.useMemo((function(){var r=Fv(null!=n?n:t),i=Fv(null!=o?o:t),a=new Set(r),l=new Set(i);return e&&(a.has("hover")&&(a.delete("hover"),a.add("click")),l.has("hover")&&(l.delete("hover"),l.add("click"))),[a,l]}),[e,t,n,o])}(ee,c,u,d),nt=Dm(tt,2),rt=nt[0],ot=nt[1],it=rt.has("click"),at=ot.has("click")||ot.has("contextMenu"),lt=bv((function(){Ne||et()}));!function(e,t,n,r,o){Iv((function(){if(e&&t&&n){var o=n,i=Uv(t),a=Uv(o),l=Hv(o),s=new Set([l].concat(Jv(i),Jv(a)));function c(){r(),Oe.current&&F&&at&&Pe(!1)}return s.forEach((function(e){e.addEventListener("scroll",c,{passive:!0})})),l.addEventListener("resize",c,{passive:!0}),r(),function(){s.forEach((function(e){e.removeEventListener("scroll",c),l.removeEventListener("resize",c)}))}}}),[e,t,n])}(Ce,de,le,lt),Iv((function(){lt()}),[Fe,P]),Iv((function(){!Ce||null!=N&&N[P]||lt()}),[JSON.stringify(T)]);var st=r.useMemo((function(){var e=function(e,t,n,r){for(var o=n.points,i=Object.keys(e),a=0;a1?a-1:0),s=1;s1?n-1:0),o=1;o1?n-1:0),o=1;o0&&void 0!==arguments[0]?arguments[0]:10,t=Ne(r.useState(!1),2),n=t[0],o=t[1],i=r.useRef(null),a=function(){window.clearTimeout(i.current)};return r.useEffect((function(){return a}),[]),[n,function(t,n){a(),i.current=window.setTimeout((function(){o(t),n&&n()}),e)},a]}(),me=Ne(ge,3),ve=me[0],ye=me[1],be=me[2];r.useImperativeHandle(t,(function(){var e,t;return{focus:null===(e=fe.current)||void 0===e?void 0:e.focus,blur:null===(t=fe.current)||void 0===t?void 0:t.blur,scrollTo:function(e){var t;return null===(t=pe.current)||void 0===t?void 0:t.scrollTo(e)}}}));var xe=r.useMemo((function(){var e;if("combobox"!==b)return _;var t=null===(e=p[0])||void 0===e?void 0:e.value;return"string"==typeof t||"number"==typeof t?String(t):""}),[_,b,p]),we="combobox"===b&&"function"==typeof S&&S()||null,Se="function"==typeof E&&E(),Ee=fa(ue,null==Se||null===(n=Se.props)||void 0===n?void 0:n.ref),Ce=Ne(r.useState(!1),2),ke=Ce[0],Me=Ce[1];$d((function(){Me(!0)}),[]);var $e=Ne(Dg(!1,{defaultValue:k,value:C}),2),_e=$e[0],Pe=$e[1],Ae=!!ke&&_e,Te=!v&&g;(x||Te&&Ae&&"combobox"===b)&&(Ae=!1);var Le=!Te&&Ae,je=r.useCallback((function(e){var t=void 0!==e?e:!Ae;x||(Pe(t),Ae!==t&&(null==O||O(t)))}),[x,Ae,Pe,O]),Fe=r.useMemo((function(){return(T||[]).some((function(e){return["\n","\r\n"].includes(e)}))}),[T]),Be=function(e,t,n){var r=!0,o=e;null==I||I(null);var i=n?null:function(e,t){if(!t||!t.length)return null;var n=!1,r=function e(t,r){var o=cp(r),i=o[0],a=o.slice(1);if(!i)return[t];var l=t.split(i);return n=n||l.length>1,l.reduce((function(t,n){return[].concat(Re(t),Re(e(n,a)))}),[]).filter((function(e){return e}))}(e,t);return n?r:null}(e,T);return"combobox"!==b&&i&&(o="",null==N||N(i),je(!1),r=!1),A&&xe!==o&&A(o,{source:t?"typing":"effect"}),r};r.useEffect((function(){Ae||re||"combobox"===b||Be("",!1,!1)}),[Ae]),r.useEffect((function(){_e&&x&&Pe(!1),x&&!he.current&&ye(!1)}),[x]);var ze=Ne(zg(),2),He=ze[0],Ue=ze[1],We=r.useRef(!1),Ve=[];r.useEffect((function(){return function(){Ve.forEach((function(e){return clearTimeout(e)})),Ve.splice(0,Ve.length)}}),[]);var Xe,qe=Ne(r.useState({}),2)[1];Se&&(Xe=function(e){je(e)}),function(e,t,n,o){var i=r.useRef(null);i.current={open:t,triggerOpen:n,customizedTrigger:o},r.useEffect((function(){function e(e){var t,n;if(null===(t=i.current)||void 0===t||!t.customizedTrigger){var r=e.target;r.shadowRoot&&e.composed&&(r=e.composedPath()[0]||r),i.current.open&&[ce.current,null===(n=de.current)||void 0===n?void 0:n.getPopupElement()].filter((function(e){return e})).every((function(e){return!e.contains(r)&&e!==r}))&&i.current.triggerOpen(!1)}}return window.addEventListener("mousedown",e),function(){return window.removeEventListener("mousedown",e)}}),[])}(0,Le,je,!!Se);var Ge,Ye=r.useMemo((function(){return De(De({},e),{},{notFoundContent:v,open:Ae,triggerOpen:Le,id:i,showSearch:oe,multiple:re,toggleOpen:je})}),[e,v,Le,Ae,i,oe,re,je]),Ke=!!L||w;Ke&&(Ge=r.createElement(jg,{className:a()("".concat(l,"-arrow"),Ie({},"".concat(l,"-arrow-loading"),w)),customizeIcon:L,customizeIconProps:{loading:w,searchValue:xe,open:Ae,focused:ve,showSearch:oe}}));var Ze,Je=function(e,t,n,o,i){var a=arguments.length>5&&void 0!==arguments[5]&&arguments[5],l=arguments.length>6?arguments[6]:void 0,s=arguments.length>7?arguments[7]:void 0,c=r.useMemo((function(){return"object"===Oe(o)?o.clearIcon:i||void 0}),[o,i]);return{allowClear:r.useMemo((function(){return!(a||!o||!n.length&&!l||"combobox"===s&&""===l)}),[o,a,n.length,l,s]),clearIcon:r.createElement(jg,{className:"".concat(e,"-clear"),onMouseDown:t,customizeIcon:c},"×")}}(l,(function(){var e;null==y||y(),null===(e=fe.current)||void 0===e||e.focus(),h([],{type:"clear",values:p}),Be("",!1,!1)}),p,R,D,x,xe,b),Qe=Je.allowClear,et=Je.clearIcon,tt=r.createElement(j,{ref:pe}),nt=a()(l,s,(Ie(o={},"".concat(l,"-focused"),ve),Ie(o,"".concat(l,"-multiple"),re),Ie(o,"".concat(l,"-single"),!re),Ie(o,"".concat(l,"-allow-clear"),R),Ie(o,"".concat(l,"-show-arrow"),Ke),Ie(o,"".concat(l,"-disabled"),x),Ie(o,"".concat(l,"-loading"),w),Ie(o,"".concat(l,"-open"),Ae),Ie(o,"".concat(l,"-customize-input"),we),Ie(o,"".concat(l,"-show-search"),oe),o)),rt=r.createElement(dy,{ref:de,disabled:x,prefixCls:l,visible:Le,popupElement:tt,animation:F,transitionName:B,dropdownStyle:z,dropdownClassName:H,direction:d,dropdownMatchSelectWidth:U,dropdownRender:W,dropdownAlign:V,placement:X,builtinPlacements:q,getPopupContainer:G,empty:g,getTriggerDOMNode:function(){return ue.current},onPopupVisibleChange:Xe,onPopupMouseEnter:function(){qe({})}},Se?r.cloneElement(Se,{ref:Ee}):r.createElement(_m,Xt({},e,{domRef:ue,prefixCls:l,inputElement:we,ref:fe,id:i,showSearch:oe,autoClearSearchValue:P,mode:b,activeDescendantId:$,tagRender:u,values:p,open:Ae,onToggleOpen:je,activeValue:M,searchValue:xe,onSearch:Be,onSearchSubmit:function(e){e&&e.trim()&&A(e,{source:"submit"})},onRemove:function(e){var t=p.filter((function(t){return t!==e}));h(t,{type:"remove",values:[e]})},tokenWithEnter:Fe})));return Ze=Se?rt:r.createElement("div",Xt({className:nt},ie,{ref:ce,onMouseDown:function(e){var t,n=e.target,r=null===(t=de.current)||void 0===t?void 0:t.getPopupElement();if(r&&r.contains(n)){var o=setTimeout((function(){var e,t=Ve.indexOf(o);-1!==t&&Ve.splice(t,1),be(),le||r.contains(document.activeElement)||null===(e=fe.current)||void 0===e||e.focus()}));Ve.push(o)}for(var i=arguments.length,a=new Array(i>1?i-1:0),l=1;l=0;a-=1){var l=o[a];if(!l.disabled){o.splice(a,1),i=l;break}}i&&h(o,{type:"remove",values:[i]})}for(var s=arguments.length,c=new Array(s>1?s-1:0),u=1;u1?t-1:0),r=1;r0,D=r.useMemo((function(){return 0===l||0===T?0:l/T*R}),[l,T,R]),j=r.useRef({top:D,dragging:y,pageY:w,startTop:C});j.current={top:D,dragging:y,pageY:w,startTop:C};var F=function(e){b(!0),S(My(e,f)),k(j.current.top),c(),e.stopPropagation(),e.preventDefault()};r.useEffect((function(){var e=function(e){e.preventDefault()},t=M.current,n=I.current;return t.addEventListener("touchstart",e),n.addEventListener("touchstart",F),function(){t.removeEventListener("touchstart",e),n.removeEventListener("touchstart",F)}}),[]);var B=r.useRef();B.current=T;var z=r.useRef();z.current=R,r.useEffect((function(){if(y){var e,t=function(t){var n=j.current,r=n.dragging,o=n.pageY,i=n.startTop;if(ol.cancel(e),r){var a=My(t,f)-o,l=i;!O&&f?l-=a:l+=a;var s=B.current,c=z.current,u=c?l/c:0,p=Math.ceil(u*s);p=Math.max(p,0),p=Math.min(p,s),e=ol((function(){d(p,f)}))}},n=function(){b(!1),u()};return window.addEventListener("mousemove",t),window.addEventListener("touchmove",t),window.addEventListener("mouseup",n),window.addEventListener("touchend",n),function(){window.removeEventListener("mousemove",t),window.removeEventListener("touchmove",t),window.removeEventListener("mouseup",n),window.removeEventListener("touchend",n),ol.cancel(e)}}}),[y]),r.useEffect((function(){N()}),[l]),r.useImperativeHandle(t,(function(){return{delayHidden:N}}));var H="".concat(o,"-scrollbar"),U={position:"absolute",visibility:_&&L?null:"hidden"},W={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return f?(U.height=8,U.left=0,U.right=0,U.bottom=0,W.height="100%",W.width=p,O?W.left=D:W.right=D):(U.width=8,U.top=0,U.bottom=0,O?U.right=0:U.left=0,W.width="100%",W.height=p,W.top=D),r.createElement("div",{ref:M,className:a()(H,(n={},Ie(n,"".concat(H,"-horizontal"),f),Ie(n,"".concat(H,"-vertical"),!f),Ie(n,"".concat(H,"-visible"),_),n)),style:De(De({},U),g),onMouseDown:function(e){e.stopPropagation(),e.preventDefault()},onMouseMove:N},r.createElement("div",{ref:I,className:a()("".concat(H,"-thumb"),Ie({},"".concat(H,"-thumb-moving"),y)),style:De(De({},W),m),onMouseDown:F}))}));const $y=Iy;function _y(e){var t=e.children,n=e.setRef,o=r.useCallback((function(e){n(e)}),[]);return r.cloneElement(t,{ref:o})}const Py=function(){function e(){rt(this,e),this.maps=void 0,this.id=0,this.maps=Object.create(null)}return it(e,[{key:"set",value:function(e,t){this.maps[e]=t,this.id+=1}},{key:"get",value:function(e){return this.maps[e]}}]),e}();const Ay="object"===("undefined"==typeof navigator?"undefined":Oe(navigator))&&/Firefox/i.test(navigator.userAgent),Ny=function(e,t){var n=(0,r.useRef)(!1),o=(0,r.useRef)(null),i=(0,r.useRef)({top:e,bottom:t});return i.current.top=e,i.current.bottom=t,function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=e<0&&i.current.top||e>0&&i.current.bottom;return t&&r?(clearTimeout(o.current),n.current=!1):r&&!n.current||(clearTimeout(o.current),n.current=!0,o.current=setTimeout((function(){n.current=!1}),50)),!n.current&&r}};var Ty=20;function Ry(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=e/(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)*100;return isNaN(t)&&(t=0),t=Math.max(t,Ty),t=Math.min(t,e/2),Math.floor(t)}var Ly=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles"],Dy=[],jy={overflowY:"auto",overflowAnchor:"none"};function Fy(e,t){var n=e.prefixCls,o=void 0===n?"rc-virtual-list":n,i=e.className,l=e.height,s=e.itemHeight,c=e.fullHeight,u=void 0===c||c,d=e.style,f=e.data,p=e.children,h=e.itemKey,g=e.virtual,m=e.direction,v=e.scrollWidth,y=e.component,b=void 0===y?"div":y,x=e.onScroll,S=e.onVirtualScroll,E=e.onVisibleChange,C=e.innerProps,k=e.extraRender,O=e.styles,M=ha(e,Ly),I=!(!1===g||!l||!s),$=I&&f&&(s*f.length>l||!!v),_="rtl"===m,P=a()(o,Ie({},"".concat(o,"-rtl"),_),i),A=f||Dy,N=(0,r.useRef)(),T=(0,r.useRef)(),R=Ne((0,r.useState)(0),2),L=R[0],D=R[1],j=Ne((0,r.useState)(0),2),F=j[0],B=j[1],z=Ne((0,r.useState)(!1),2),H=z[0],U=z[1],W=function(){U(!0)},V=function(){U(!1)},X=r.useCallback((function(e){return"function"==typeof h?h(e):null==e?void 0:e[h]}),[h]),q={getKey:X};function G(e){D((function(t){var n=function(e){var t=e;return Number.isNaN(ve.current)||(t=Math.min(t,ve.current)),t=Math.max(t,0)}("function"==typeof e?e(t):e);return N.current.scrollTop=n,n}))}var Y=(0,r.useRef)({start:0,end:A.length}),K=(0,r.useRef)(),Z=Ne(function(e,t,n){var o=Ne(r.useState(e),2),i=o[0],a=o[1],l=Ne(r.useState(null),2),s=l[0],c=l[1];return r.useEffect((function(){var r=function(e,t,n){var r,o,i=e.length,a=t.length;if(0===i&&0===a)return null;i0&&void 0!==arguments[0]&&arguments[0];u();var t=function(){l.current.forEach((function(e,t){if(e&&e.offsetParent){var n=la(e),r=n.offsetHeight;s.current.get(t)!==r&&s.current.set(t,n.offsetHeight)}})),a((function(e){return e+1}))};e?t():c.current=ol(t)}return(0,r.useEffect)((function(){return u}),[]),[function(t,n){var r=e(t);l.current.get(r);n?(l.current.set(r,n),d()):l.current.delete(r)},d,s.current,i]}(X),Q=Ne(J,4),ee=Q[0],te=Q[1],ne=Q[2],re=Q[3],oe=r.useMemo((function(){if(!I)return{scrollHeight:void 0,start:0,end:A.length-1,offset:void 0};var e;if(!$)return{scrollHeight:(null===(e=T.current)||void 0===e?void 0:e.offsetHeight)||0,start:0,end:A.length-1,offset:void 0};for(var t,n,r,o=0,i=A.length,a=0;a=L&&void 0===t&&(t=a,n=o),f>L+l&&void 0===r&&(r=a),o=f}return void 0===t&&(t=0,n=0,r=Math.ceil(l/s)),void 0===r&&(r=A.length-1),{scrollHeight:o,start:t,end:r=Math.min(r+1,A.length-1),offset:n}}),[$,I,L,A,re,l]),ie=oe.scrollHeight,ae=oe.start,le=oe.end,se=oe.offset;Y.current.start=ae,Y.current.end=le;var ce=Ne(r.useState({width:0,height:l}),2),ue=ce[0],de=ce[1],fe=(0,r.useRef)(),pe=(0,r.useRef)(),he=r.useMemo((function(){return Ry(ue.width,v)}),[ue.width,v]),ge=r.useMemo((function(){return Ry(ue.height,ie)}),[ue.height,ie]),me=ie-l,ve=(0,r.useRef)(me);ve.current=me;var ye=L<=0,be=L>=me,xe=Ny(ye,be),we=function(){return{x:_?-F:F,y:L}},Se=(0,r.useRef)(we()),Ee=Rg((function(){if(S){var e=we();Se.current.x===e.x&&Se.current.y===e.y||(S(e),Se.current=e)}}));function Ce(e,t){var n=e;t?((0,w.flushSync)((function(){B(n)})),Ee()):G(n)}var ke=function(e){var t=e,n=v-ue.width;return t=Math.max(t,0),Math.min(t,n)},Me=Rg((function(e,t){t?((0,w.flushSync)((function(){B((function(t){return ke(t+(_?-e:e))}))})),Ee()):G((function(t){return t+e}))})),$e=Ne(function(e,t,n,o,i){var a=(0,r.useRef)(0),l=(0,r.useRef)(null),s=(0,r.useRef)(null),c=(0,r.useRef)(!1),u=Ny(t,n),d=(0,r.useRef)(null),f=(0,r.useRef)(null);return[function(t){if(e){ol.cancel(f.current),f.current=ol((function(){d.current=null}),2);var n=t.deltaX,r=t.deltaY,p=t.shiftKey,h=n,g=r;("sx"===d.current||!d.current&&p&&r&&!n)&&(h=r,g=0,d.current="sx");var m=Math.abs(h),v=Math.abs(g);null===d.current&&(d.current=o&&m>v?"x":"y"),"y"===d.current?function(e,t){ol.cancel(l.current),a.current+=t,s.current=t,u(t)||(Ay||e.preventDefault(),l.current=ol((function(){var e=c.current?10:1;i(a.current*e),a.current=0})))}(t,g):function(e,t){i(t,!0),Ay||e.preventDefault()}(t,h)}},function(t){e&&(c.current=t.detail===s.current)}]}(I,ye,be,!!v,Me),2),_e=$e[0],Pe=$e[1];!function(e,t,n){var o,i=(0,r.useRef)(!1),a=(0,r.useRef)(0),l=(0,r.useRef)(null),s=(0,r.useRef)(null),c=function(e){if(i.current){var t=Math.ceil(e.touches[0].pageY),r=a.current-t;a.current=t,n(r)&&e.preventDefault(),clearInterval(s.current),s.current=setInterval((function(){(!n(r*=.9333333333333333,!0)||Math.abs(r)<=.1)&&clearInterval(s.current)}),16)}},u=function(){i.current=!1,o()},d=function(e){o(),1!==e.touches.length||i.current||(i.current=!0,a.current=Math.ceil(e.touches[0].pageY),l.current=e.target,l.current.addEventListener("touchmove",c),l.current.addEventListener("touchend",u))};o=function(){l.current&&(l.current.removeEventListener("touchmove",c),l.current.removeEventListener("touchend",u))},$d((function(){return e&&t.current.addEventListener("touchstart",d),function(){var e;null===(e=t.current)||void 0===e||e.removeEventListener("touchstart",d),o(),clearInterval(s.current)}}),[e])}(I,N,(function(e,t){return!xe(e,t)&&(_e({preventDefault:function(){},deltaY:e}),!0)})),$d((function(){function e(e){I&&e.preventDefault()}var t=N.current;return t.addEventListener("wheel",_e),t.addEventListener("DOMMouseScroll",Pe),t.addEventListener("MozMousePixelScroll",e),function(){t.removeEventListener("wheel",_e),t.removeEventListener("DOMMouseScroll",Pe),t.removeEventListener("MozMousePixelScroll",e)}}),[I]),$d((function(){v&&B((function(e){return ke(e)}))}),[ue.width,v]);var Ae=function(){var e,t;null===(e=fe.current)||void 0===e||e.delayHidden(),null===(t=pe.current)||void 0===t||t.delayHidden()},Te=function(e,t,n,o,i,a,l,s){var c=r.useRef(),u=Ne(r.useState(null),2),d=u[0],f=u[1];return $d((function(){if(d&&d.times<10){if(!e.current)return void f((function(e){return De({},e)}));a();var r=d.targetAlign,s=d.originAlign,c=d.index,u=d.offset,p=e.current.clientHeight,h=!1,g=r,m=null;if(p){for(var v=r||s,y=0,b=0,x=0,w=Math.min(t.length-1,c),S=0;S<=w;S+=1){var E=i(t[S]);b=y;var C=n.get(E);y=x=b+(void 0===C?o:C)}for(var k="top"===v?u:p-u,O=w;O>=0;O-=1){var M=i(t[O]),I=n.get(M);if(void 0===I){h=!0;break}if((k-=I)<=0)break}switch(v){case"top":m=b-u;break;case"bottom":m=x-p+u;break;default:var $=e.current.scrollTop;b<$?g="top":x>$+p&&(g="bottom")}null!==m&&l(m),m!==d.lastTop&&(h=!0)}h&&f(De(De({},d),{},{times:d.times+1,targetAlign:g,lastTop:m}))}}),[d,e.current]),function(e){if(null!=e){if(ol.cancel(c.current),"number"==typeof e)l(e);else if(e&&"object"===Oe(e)){var n,r=e.align;n="index"in e?e.index:t.findIndex((function(t){return i(t)===e.key}));var o=e.offset;f({times:0,index:n,offset:void 0===o?0:o,originAlign:r})}}else s()}}(N,A,ne,s,X,(function(){return te(!0)}),G,Ae);r.useImperativeHandle(t,(function(){return{getScrollInfo:we,scrollTo:function(e){var t;(t=e)&&"object"===Oe(t)&&("left"in t||"top"in t)?(void 0!==e.left&&B(ke(e.left)),Te(e.top)):Te(e)}}})),$d((function(){if(E){var e=A.slice(ae,le+1);E(e,A)}}),[ae,le,A]);var Re=function(e,t,n,o){var i=Ne(r.useMemo((function(){return[new Map,[]]}),[e,n.id,o]),2),a=i[0],l=i[1];return function(r){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r,s=a.get(r),c=a.get(i);if(void 0===s||void 0===c)for(var u=e.length,d=l.length;dl&&r.createElement($y,{ref:fe,prefixCls:o,scrollOffset:L,scrollRange:ie,rtl:_,onScroll:Ce,onStartMove:W,onStopMove:V,spinSize:ge,containerSize:ue.height,style:null==O?void 0:O.verticalScrollBar,thumbStyle:null==O?void 0:O.verticalScrollBarThumb}),$&&v&&r.createElement($y,{ref:pe,prefixCls:o,scrollOffset:F,scrollRange:v,rtl:_,onScroll:Ce,onStartMove:W,onStopMove:V,spinSize:he,containerSize:ue.width,horizontal:!0,style:null==O?void 0:O.horizontalScrollBar,thumbStyle:null==O?void 0:O.horizontalScrollBarThumb}))}var By=r.forwardRef(Fy);By.displayName="List";const zy=By,Hy=r.createContext(null);var Uy=["disabled","title","children","style","className"];function Wy(e){return"string"==typeof e||"number"==typeof e}var Vy=function(e,t){var n=Bg(),o=n.prefixCls,i=n.id,l=n.open,s=n.multiple,c=n.mode,u=n.searchValue,d=n.toggleOpen,f=n.notFoundContent,p=n.onPopupScroll,h=r.useContext(Hy),g=h.flattenOptions,m=h.onActiveValue,v=h.defaultActiveFirstOption,y=h.onSelect,b=h.menuItemSelectedIcon,x=h.rawValues,w=h.fieldNames,S=h.virtual,E=h.direction,C=h.listHeight,k=h.listItemHeight,O=h.optionRender,M="".concat(o,"-item"),I=ca((function(){return g}),[l,g],(function(e,t){return t[0]&&e[1]!==t[1]})),$=r.useRef(null),_=function(e){e.preventDefault()},P=function(e){$.current&&$.current.scrollTo("number"==typeof e?{index:e}:e)},A=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=I.length,r=0;r1&&void 0!==arguments[1]&&arguments[1];R(e);var n={source:t?"keyboard":"mouse"},r=I[e];r?m(r.value,e,n):m(null,-1,n)};(0,r.useEffect)((function(){L(!1!==v?A(0):-1)}),[I.length,u]);var D=r.useCallback((function(e){return x.has(e)&&"combobox"!==c}),[c,Re(x).toString(),x.size]);(0,r.useEffect)((function(){var e,t=setTimeout((function(){if(!s&&l&&1===x.size){var e=Array.from(x)[0],t=I.findIndex((function(t){return t.data.value===e}));-1!==t&&(L(t),P(t))}}));return l&&(null===(e=$.current)||void 0===e||e.scrollTo(void 0)),function(){return clearTimeout(t)}}),[l,u]);var j=function(e){void 0!==e&&y(e,{selected:!x.has(e)}),s||d(!1)};if(r.useImperativeHandle(t,(function(){return{onKeyDown:function(e){var t=e.which,n=e.ctrlKey;switch(t){case ds.N:case ds.P:case ds.UP:case ds.DOWN:var r=0;if(t===ds.UP?r=-1:t===ds.DOWN?r=1:/(mac\sos|macintosh)/i.test(navigator.appVersion)&&n&&(t===ds.N?r=1:t===ds.P&&(r=-1)),0!==r){var o=A(T+r,r);P(o),L(o,!0)}break;case ds.ENTER:var i=I[T];i&&!i.data.disabled?j(i.value):j(void 0),l&&e.preventDefault();break;case ds.ESC:d(!1),l&&e.stopPropagation()}},onKeyUp:function(){},scrollTo:function(e){P(e)}}})),0===I.length)return r.createElement("div",{role:"listbox",id:"".concat(i,"_list"),className:"".concat(M,"-empty"),onMouseDown:_},f);var F=Object.keys(w).map((function(e){return w[e]})),B=function(e){return e.label};function z(e,t){return{role:e.group?"presentation":"option",id:"".concat(i,"_list_").concat(t)}}var H=function(e){var t=I[e];if(!t)return null;var n=t.data||{},o=n.value,i=t.group,a=lf(n,!0),l=B(t);return t?r.createElement("div",Xt({"aria-label":"string"!=typeof l||i?null:l},a,{key:e},z(t,e),{"aria-selected":D(o)}),o):null},U={role:"listbox",id:"".concat(i,"_list")};return r.createElement(r.Fragment,null,S&&r.createElement("div",Xt({},U,{style:{height:0,width:0,overflow:"hidden"}}),H(T-1),H(T),H(T+1)),r.createElement(zy,{itemKey:"key",ref:$,data:I,height:C,itemHeight:k,fullHeight:!1,onMouseDown:_,onScroll:p,virtual:S,direction:E,innerProps:S?null:U},(function(e,t){var n,o=e.group,i=e.groupOption,l=e.data,s=e.label,c=e.value,u=l.key;if(o){var d,f=null!==(d=l.title)&&void 0!==d?d:Wy(s)?s.toString():void 0;return r.createElement("div",{className:a()(M,"".concat(M,"-group")),title:f},void 0!==s?s:u)}var p=l.disabled,h=l.title,g=(l.children,l.style),m=l.className,v=Cy(ha(l,Uy),F),y=D(c),x="".concat(M,"-option"),w=a()(M,x,m,(Ie(n={},"".concat(x,"-grouped"),i),Ie(n,"".concat(x,"-active"),T===t&&!p),Ie(n,"".concat(x,"-disabled"),p),Ie(n,"".concat(x,"-selected"),y),n)),E=B(e),C=!b||"function"==typeof b||y,k="number"==typeof E?E:E||c,I=Wy(k)?k.toString():void 0;return void 0!==h&&(I=h),r.createElement("div",Xt({},lf(v),S?{}:z(e,t),{"aria-selected":y,className:w,title:I,onMouseMove:function(){T===t||p||L(t)},onClick:function(){p||j(c)},style:g}),r.createElement("div",{className:"".concat(x,"-content")},"function"==typeof O?O(e,{index:t}):k),r.isValidElement(b)||y,C&&r.createElement(jg,{className:"".concat(M,"-option-state"),customizeIcon:b,customizeIconProps:{value:c,disabled:p,isSelected:y}},y?"✓":null))})))},Xy=r.forwardRef(Vy);Xy.displayName="OptionList";const qy=Xy;function Gy(e,t){return xm(e).join("").toUpperCase().includes(t)}var Yy=0,Ky=Ra();function Zy(e){var t=Ne(r.useState(),2),n=t[0],o=t[1];return r.useEffect((function(){var e;o("rc_select_".concat((Ky?(e=Yy,Yy+=1):e="TEST_OR_SSR",e)))}),[]),e||n}var Jy=["children","value"],Qy=["children"];function eb(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Cf(e).map((function(e,n){if(!r.isValidElement(e)||!e.type)return null;var o=e,i=o.type.isSelectOptGroup,a=o.key,l=o.props,s=l.children,c=ha(l,Qy);return t||!i?function(e){var t=e,n=t.key,r=t.props,o=r.children,i=r.value;return De({key:n,value:void 0!==i?i:n,children:o},ha(r,Jy))}(e):De(De({key:"__RC_SELECT_GRP__".concat(null===a?n:a,"__"),label:a},c),{},{options:eb(s)})})).filter((function(e){return e}))}function tb(e){var t=r.useRef();t.current=e;var n=r.useCallback((function(){return t.current.apply(t,arguments)}),[]);return n}var nb=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","optionRender","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","value","defaultValue","labelInValue","onChange"],rb=["inputValue"],ob=r.forwardRef((function(e,t){var n=e.id,o=e.mode,i=e.prefixCls,a=void 0===i?"rc-select":i,l=e.backfill,s=e.fieldNames,c=e.inputValue,u=e.searchValue,d=e.onSearch,f=e.autoClearSearchValue,p=void 0===f||f,h=e.onSelect,g=e.onDeselect,m=e.dropdownMatchSelectWidth,v=void 0===m||m,y=e.filterOption,b=e.filterSort,x=e.optionFilterProp,w=e.optionLabelProp,S=e.options,E=e.optionRender,C=e.children,k=e.defaultActiveFirstOption,O=e.menuItemSelectedIcon,M=e.virtual,I=e.direction,$=e.listHeight,_=void 0===$?200:$,P=e.listItemHeight,A=void 0===P?20:P,N=e.value,T=e.defaultValue,R=e.labelInValue,L=e.onChange,D=ha(e,nb),j=Zy(n),F=vy(o),B=!(S||!C),z=r.useMemo((function(){return(void 0!==y||"combobox"!==o)&&y}),[y,o]),H=r.useMemo((function(){return py(s,B)}),[JSON.stringify(s),B]),U=Ne(Dg("",{value:void 0!==u?u:c,postState:function(e){return e||""}}),2),W=U[0],V=U[1],X=function(e,t,n,o,i){return r.useMemo((function(){var r=e;!e&&(r=eb(t));var a=new Map,l=new Map,s=function(e,t,n){n&&"string"==typeof n&&e.set(t[n],t)};return function e(t){for(var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],c=0;c1&&void 0!==arguments[1]?arguments[1]:{},n=t.fieldNames,r=t.childrenAsData,o=[],i=py(n,!1),a=i.label,l=i.value,s=i.options,c=i.groupLabel;return function e(t,n){t.forEach((function(t){if(n||!(s in t)){var i=t[l];o.push({key:fy(t,o.length),groupOption:n,data:t,label:t[a],value:i})}else{var u=t[c];void 0===u&&r&&(u=t.label),o.push({key:fy(t,o.length),group:!0,data:t,label:u}),e(t[s],!0)}}))}(e,!1),o}(ue,{fieldNames:H,childrenAsData:B})}),[ue,H,B]),fe=function(e){var t=K(e);if(Q(t),L&&(t.length!==re.length||t.some((function(e,t){var n;return(null===(n=re[t])||void 0===n?void 0:n.value)!==(null==e?void 0:e.value)})))){var n=R?t:t.map((function(e){return e.value})),r=t.map((function(e){return hy(oe(e.value))}));L(F?n:n[0],F?r:r[0])}},pe=Ne(r.useState(null),2),he=pe[0],ge=pe[1],me=Ne(r.useState(0),2),ve=me[0],ye=me[1],be=void 0!==k?k:"combobox"!==o,xe=r.useCallback((function(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).source,r=void 0===n?"keyboard":n;ye(t),l&&"combobox"===o&&null!==e&&"keyboard"===r&&ge(String(e))}),[l,o]),we=function(e,t,n){var r=function(){var t,n=oe(e);return[R?{label:null==n?void 0:n[H.label],value:e,key:null!==(t=null==n?void 0:n.key)&&void 0!==t?t:e}:e,hy(n)]};if(t&&h){var o=Ne(r(),2),i=o[0],a=o[1];h(i,a)}else if(!t&&g&&"clear"!==n){var l=Ne(r(),2),s=l[0],c=l[1];g(s,c)}},Se=tb((function(e,t){var n,r=!F||t.selected;n=r?F?[].concat(Re(re),[e]):[e]:re.filter((function(t){return t.value!==e})),fe(n),we(e,r),"combobox"===o?ge(""):vy&&!p||(V(""),ge(""))})),Ee=r.useMemo((function(){var e=!1!==M&&!1!==v;return De(De({},X),{},{flattenOptions:de,onActiveValue:xe,defaultActiveFirstOption:be,onSelect:Se,menuItemSelectedIcon:O,rawValues:ae,fieldNames:H,virtual:e,direction:I,listHeight:_,listItemHeight:A,childrenAsData:B,optionRender:E})}),[X,de,xe,be,Se,O,ae,H,M,v,_,A,B,E]);return r.createElement(Hy.Provider,{value:Ee},r.createElement(by,Xt({},D,{id:j,prefixCls:a,ref:t,omitDomProps:rb,mode:o,displayValues:ie,onDisplayValuesChange:function(e,t){fe(e);var n=t.type,r=t.values;"remove"!==n&&"clear"!==n||r.forEach((function(e){we(e.value,!1,n)}))},direction:I,searchValue:W,onSearch:function(e,t){if(V(e),ge(null),"submit"!==t.source)"blur"!==t.source&&("combobox"===o&&fe(e),null==d||d(e));else{var n=(e||"").trim();if(n){var r=Array.from(new Set([].concat(Re(ae),[n])));fe(r),we(n,!0),V("")}}},autoClearSearchValue:p,onSearchSplit:function(e){var t=e;"tags"!==o&&(t=e.map((function(e){var t=G.get(e);return null==t?void 0:t.value})).filter((function(e){return void 0!==e})));var n=Array.from(new Set([].concat(Re(ae),Re(t))));fe(n),n.forEach((function(e){we(e,!0)}))},dropdownMatchSelectWidth:v,OptionList:qy,emptyOptions:!de.length,activeValue:he,activeDescendantId:"".concat(j,"_list_").concat(ve)})))})),ib=ob;ib.Option=Ey,ib.OptGroup=wy;const ab=ib;function lb(e,t,n){return a()({[`${e}-status-success`]:"success"===t,[`${e}-status-warning`]:"warning"===t,[`${e}-status-error`]:"error"===t,[`${e}-status-validating`]:"validating"===t,[`${e}-has-feedback`]:n})}const sb=(e,t)=>t||e,cb=()=>{const[,e]=No(),t=new po(e.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return r.createElement("svg",{style:t,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},r.createElement("g",{fill:"none",fillRule:"evenodd"},r.createElement("g",{transform:"translate(24 31.67)"},r.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),r.createElement("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"}),r.createElement("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"}),r.createElement("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"}),r.createElement("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"})),r.createElement("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"}),r.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},r.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),r.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},ub=()=>{const[,e]=No(),{colorFill:t,colorFillTertiary:n,colorFillQuaternary:o,colorBgContainer:i}=e,{borderColor:a,shadowColor:l,contentColor:s}=(0,r.useMemo)((()=>({borderColor:new po(t).onBackground(i).toHexShortString(),shadowColor:new po(n).onBackground(i).toHexShortString(),contentColor:new po(o).onBackground(i).toHexShortString()})),[t,n,o,i]);return r.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},r.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},r.createElement("ellipse",{fill:l,cx:"32",cy:"33",rx:"32",ry:"7"}),r.createElement("g",{fillRule:"nonzero",stroke:a},r.createElement("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),r.createElement("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:s}))))},db=e=>{const{componentCls:t,margin:n,marginXS:r,marginXL:o,fontSize:i,lineHeight:a}=e;return{[t]:{marginInline:r,fontSize:i,lineHeight:a,textAlign:"center",[`${t}-image`]:{height:e.emptyImgHeight,marginBottom:r,opacity:e.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${t}-description`]:{color:e.colorText},[`${t}-footer`]:{marginTop:n},"&-normal":{marginBlock:o,color:e.colorTextDisabled,[`${t}-description`]:{color:e.colorTextDisabled},[`${t}-image`]:{height:e.emptyImgHeightMD}},"&-small":{marginBlock:r,color:e.colorTextDisabled,[`${t}-image`]:{height:e.emptyImgHeightSM}}}}},fb=oi("Empty",(e=>{const{componentCls:t,controlHeightLG:n,calc:r}=e,o=Ko(e,{emptyImgCls:`${t}-img`,emptyImgHeight:r(n).mul(2.5).equal(),emptyImgHeightMD:n,emptyImgHeightSM:r(n).mul(.875).equal()});return[db(o)]}));const pb=r.createElement(cb,null),hb=r.createElement(ub,null),gb=e=>{var{className:t,rootClassName:n,prefixCls:o,image:i=pb,description:l,children:s,imageStyle:c,style:u}=e,d=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o{const{componentName:t}=e,{getPrefixCls:n}=(0,r.useContext)(Ce),o=n("empty");switch(t){case"Table":case"List":return r.createElement(mb,{image:mb.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return r.createElement(mb,{image:mb.PRESENTED_IMAGE_SIMPLE,className:`${o}-small`});default:return r.createElement(mb,null)}},yb=new Kn("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),bb=new Kn("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),xb=new Kn("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),wb=new Kn("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),Sb=new Kn("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),Eb=new Kn("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),Cb=new Kn("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),kb=new Kn("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),Ob={"slide-up":{inKeyframes:yb,outKeyframes:bb},"slide-down":{inKeyframes:xb,outKeyframes:wb},"slide-left":{inKeyframes:Sb,outKeyframes:Eb},"slide-right":{inKeyframes:Cb,outKeyframes:kb}},Mb=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:o,outKeyframes:i}=Ob[t];return[hh(r,o,i,e.motionDurationMid),{[`\n ${r}-enter,\n ${r}-appear\n `]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:e.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInQuint}}]},Ib=new Kn("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),$b=new Kn("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),_b=new Kn("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Pb=new Kn("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),Ab=new Kn("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Nb=new Kn("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),Tb={"move-up":{inKeyframes:new Kn("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),outKeyframes:new Kn("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}})},"move-down":{inKeyframes:Ib,outKeyframes:$b},"move-left":{inKeyframes:_b,outKeyframes:Pb},"move-right":{inKeyframes:Ab,outKeyframes:Nb}},Rb=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:o,outKeyframes:i}=Tb[t];return[hh(r,o,i,e.motionDurationMid),{[`\n ${r}-enter,\n ${r}-appear\n `]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},Lb=e=>{const{optionHeight:t,optionFontSize:n,optionLineHeight:r,optionPadding:o}=e;return{position:"relative",display:"block",minHeight:t,padding:o,color:e.colorText,fontWeight:"normal",fontSize:n,lineHeight:r,boxSizing:"border-box"}},Db=e=>{const{antCls:t,componentCls:n}=e,r=`${n}-item`,o=`&${t}-slide-up-enter${t}-slide-up-enter-active`,i=`&${t}-slide-up-appear${t}-slide-up-appear-active`,a=`&${t}-slide-up-leave${t}-slide-up-leave-active`,l=`${n}-dropdown-placement-`;return[{[`${n}-dropdown`]:Object.assign(Object.assign({},xr(e)),{position:"absolute",top:-9999,zIndex:e.zIndexPopup,boxSizing:"border-box",padding:e.paddingXXS,overflow:"hidden",fontSize:e.fontSize,fontVariant:"initial",backgroundColor:e.colorBgElevated,borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,[`\n ${o}${l}bottomLeft,\n ${i}${l}bottomLeft\n `]:{animationName:yb},[`\n ${o}${l}topLeft,\n ${i}${l}topLeft,\n ${o}${l}topRight,\n ${i}${l}topRight\n `]:{animationName:xb},[`${a}${l}bottomLeft`]:{animationName:bb},[`\n ${a}${l}topLeft,\n ${a}${l}topRight\n `]:{animationName:wb},"&-hidden":{display:"none"},[`${r}`]:Object.assign(Object.assign({},Lb(e)),{cursor:"pointer",transition:`background ${e.motionDurationSlow} ease`,borderRadius:e.borderRadiusSM,"&-group":{color:e.colorTextDescription,fontSize:e.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},br),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${r}-option-disabled)`]:{backgroundColor:e.optionActiveBg},[`&-selected:not(${r}-option-disabled)`]:{color:e.optionSelectedColor,fontWeight:e.optionSelectedFontWeight,backgroundColor:e.optionSelectedBg,[`${r}-option-state`]:{color:e.colorPrimary}},"&-disabled":{[`&${r}-option-selected`]:{backgroundColor:e.colorBgContainerDisabled},color:e.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:e.calc(e.controlPaddingHorizontal).mul(2).equal()}}}),"&-rtl":{direction:"rtl"}})},Mb(e,"slide-up"),Mb(e,"slide-down"),Rb(e,"move-up"),Rb(e,"move-down")]};function jb(e,t){const{componentCls:n,iconCls:r}=e,o=`${n}-selection-overflow`,i=e.multipleSelectItemHeight,a=(e=>{const{multipleSelectItemHeight:t,selectHeight:n,lineWidth:r}=e;return e.calc(n).sub(t).div(2).sub(r).equal()})(e);return{[`${n}-multiple${t?`${n}-${t}`:""}`]:{fontSize:e.fontSize,[o]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${n}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",height:"100%",padding:`${Mt(e.calc(a).sub(2).equal())} ${Mt(e.calc(2).mul(2).equal())}`,borderRadius:e.borderRadius,[`${n}-show-search&`]:{cursor:"text"},[`${n}-disabled&`]:{background:e.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${Mt(2)} 0`,lineHeight:Mt(i),visibility:"hidden",content:'"\\a0"'}},[`\n &${n}-show-arrow ${n}-selector,\n &${n}-allow-clear ${n}-selector\n `]:{paddingInlineEnd:e.calc(e.fontSizeIcon).add(e.controlPaddingHorizontal).equal()},[`${n}-selection-item`]:{display:"flex",alignSelf:"center",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:i,marginTop:2,marginBottom:2,lineHeight:Mt(e.calc(i).sub(e.calc(e.lineWidth).mul(2)).equal()),background:e.multipleItemBg,border:`${Mt(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`,borderRadius:e.borderRadiusSM,cursor:"default",transition:`font-size ${e.motionDurationSlow}, line-height ${e.motionDurationSlow}, height ${e.motionDurationSlow}`,marginInlineEnd:e.calc(2).mul(2).equal(),paddingInlineStart:e.paddingXS,paddingInlineEnd:e.calc(e.paddingXS).div(2).equal(),[`${n}-disabled&`]:{color:e.multipleItemColorDisabled,borderColor:e.multipleItemBorderColorDisabled,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:e.calc(e.paddingXS).div(2).equal(),overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},{display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),{display:"inline-flex",alignItems:"center",color:e.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${r}`]:{verticalAlign:"-0.2em"},"&:hover":{color:e.colorIconHover}})},[`${o}-item + ${o}-item`]:{[`${n}-selection-search`]:{marginInlineStart:0}},[`${o}-item-suffix`]:{height:"100%"},[`${n}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(a).equal(),"\n &-input,\n &-mirror\n ":{height:i,fontFamily:e.fontFamily,lineHeight:Mt(i),transition:`all ${e.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${n}-selection-placeholder`]:{position:"absolute",top:"50%",insetInlineStart:e.inputPaddingHorizontalBase,insetInlineEnd:e.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${e.motionDurationSlow}`}}}}const Fb=e=>{const{componentCls:t}=e,n=Ko(e,{selectHeight:e.controlHeightSM,multipleSelectItemHeight:e.controlHeightXS,borderRadius:e.borderRadiusSM,borderRadiusSM:e.borderRadiusXS}),r=Ko(e,{fontSize:e.fontSizeLG,selectHeight:e.controlHeightLG,multipleSelectItemHeight:e.multipleItemHeightLG,borderRadius:e.borderRadiusLG,borderRadiusSM:e.borderRadius});return[jb(e),jb(n,"sm"),{[`${t}-multiple${t}-sm`]:{[`${t}-selection-placeholder`]:{insetInline:e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal()},[`${t}-selection-search`]:{marginInlineStart:2}}},jb(r,"lg")]};function Bb(e,t){const{componentCls:n,inputPaddingHorizontalBase:r,borderRadius:o}=e,i=e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal();return{[`${n}-single${t?`${n}-${t}`:""}`]:{fontSize:e.fontSize,height:e.controlHeight,[`${n}-selector`]:Object.assign(Object.assign({},xr(e,!0)),{display:"flex",borderRadius:o,[`${n}-selection-search`]:{position:"absolute",top:0,insetInlineStart:r,insetInlineEnd:r,bottom:0,"&-input":{width:"100%",WebkitAppearance:"textfield"}},[`\n ${n}-selection-item,\n ${n}-selection-placeholder\n `]:{padding:0,lineHeight:Mt(i),transition:`all ${e.motionDurationSlow}, visibility 0s`,alignSelf:"center"},[`${n}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${n}-selection-item:empty:after`,`${n}-selection-placeholder:empty:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`\n &${n}-show-arrow ${n}-selection-item,\n &${n}-show-arrow ${n}-selection-placeholder\n `]:{paddingInlineEnd:e.showArrowPaddingInlineEnd},[`&${n}-open ${n}-selection-item`]:{color:e.colorTextPlaceholder},[`&:not(${n}-customize-input)`]:{[`${n}-selector`]:{width:"100%",height:"100%",padding:`0 ${Mt(r)}`,[`${n}-selection-search-input`]:{height:i},"&:after":{lineHeight:Mt(i)}}},[`&${n}-customize-input`]:{[`${n}-selector`]:{"&:after":{display:"none"},[`${n}-selection-search`]:{position:"static",width:"100%"},[`${n}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${Mt(r)}`,"&:after":{display:"none"}}}}}}}function zb(e){const{componentCls:t}=e,n=e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal();return[Bb(e),Bb(Ko(e,{controlHeight:e.controlHeightSM,borderRadius:e.borderRadiusSM}),"sm"),{[`${t}-single${t}-sm`]:{[`&:not(${t}-customize-input)`]:{[`${t}-selection-search`]:{insetInlineStart:n,insetInlineEnd:n},[`${t}-selector`]:{padding:`0 ${Mt(n)}`},[`&${t}-show-arrow ${t}-selection-search`]:{insetInlineEnd:e.calc(n).add(e.calc(e.fontSize).mul(1.5)).equal()},[`\n &${t}-show-arrow ${t}-selection-item,\n &${t}-show-arrow ${t}-selection-placeholder\n `]:{paddingInlineEnd:e.calc(e.fontSize).mul(1.5).equal()}}}},Bb(Ko(e,{controlHeight:e.singleItemHeightLG,fontSize:e.fontSizeLG,borderRadius:e.borderRadiusLG}),"lg")]}const Hb=e=>{const{componentCls:t,selectorBg:n}=e;return{position:"relative",backgroundColor:n,border:`${Mt(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,input:{cursor:"pointer"},[`${t}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit",height:"100%"}},[`${t}-disabled&`]:{color:e.colorTextDisabled,background:e.colorBgContainerDisabled,cursor:"not-allowed",[`${t}-multiple&`]:{background:e.multipleSelectorBgDisabled},input:{cursor:"not-allowed"}}}},Ub=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const{componentCls:r,borderHoverColor:o,antCls:i,borderActiveColor:a,outlineColor:l,controlOutlineWidth:s}=t,c=n?{[`${r}-selector`]:{borderColor:a}}:{};return{[e]:{[`&:not(${r}-disabled):not(${r}-customize-input):not(${i}-pagination-size-changer)`]:Object.assign(Object.assign({},c),{[`&:hover ${r}-selector`]:{borderColor:o},[`${r}-focused& ${r}-selector`]:{borderColor:a,boxShadow:`0 0 0 ${Mt(s)} ${l}`,outline:0}})}}},Wb=e=>{const{componentCls:t}=e;return{[`${t}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none",fontFamily:"inherit","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},Vb=e=>{const{antCls:t,componentCls:n,inputPaddingHorizontalBase:r,iconCls:o}=e;return{[n]:Object.assign(Object.assign({},xr(e)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${n}-customize-input) ${n}-selector`]:Object.assign(Object.assign({},Hb(e)),Wb(e)),[`${n}-selection-item`]:Object.assign(Object.assign({flex:1,fontWeight:"normal",position:"relative",userSelect:"none"},br),{[`> ${t}-typography`]:{display:"inline"}}),[`${n}-selection-placeholder`]:Object.assign(Object.assign({},br),{flex:1,color:e.colorTextPlaceholder,pointerEvents:"none"}),[`${n}-arrow`]:Object.assign(Object.assign({},{display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:r,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[o]:{verticalAlign:"top",transition:`transform ${e.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${n}-suffix)`]:{pointerEvents:"auto"}},[`${n}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${n}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:r,zIndex:1,display:"inline-block",width:e.fontSizeIcon,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:e.clearBg,cursor:"pointer",opacity:0,transition:`color ${e.motionDurationMid} ease, opacity ${e.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:e.colorTextTertiary}},"&:hover":{[`${n}-clear`]:{opacity:1}}}),[`${n}-has-feedback`]:{[`${n}-clear`]:{insetInlineEnd:e.calc(r).add(e.fontSize).add(e.paddingXS).equal()}}}},Xb=e=>{const{componentCls:t}=e;return[{[t]:{[`&-borderless ${t}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${t}-in-form-item`]:{width:"100%"}}},Vb(e),zb(e),Fb(e),Db(e),{[`${t}-rtl`]:{direction:"rtl"}},Ub(t,Ko(e,{borderHoverColor:e.colorPrimaryHover,borderActiveColor:e.colorPrimary,outlineColor:e.controlOutline})),Ub(`${t}-status-error`,Ko(e,{borderHoverColor:e.colorErrorHover,borderActiveColor:e.colorError,outlineColor:e.colorErrorOutline}),!0),Ub(`${t}-status-warning`,Ko(e,{borderHoverColor:e.colorWarningHover,borderActiveColor:e.colorWarning,outlineColor:e.colorWarningOutline}),!0),od(e,{borderElCls:`${t}-selector`,focusElCls:`${t}-focused`})]},qb=oi("Select",((e,t)=>{let{rootPrefixCls:n}=t;const r=Ko(e,{rootPrefixCls:n,inputPaddingHorizontalBase:e.calc(e.paddingSM).sub(1).equal(),multipleSelectItemHeight:e.multipleItemHeight,selectHeight:e.controlHeight});return[Xb(r)]}),(e=>{const{fontSize:t,lineHeight:n,controlHeight:r,controlPaddingHorizontal:o,zIndexPopupBase:i,colorText:a,fontWeightStrong:l,controlItemBgActive:s,controlItemBgHover:c,colorBgContainer:u,colorFillSecondary:d,controlHeightLG:f,controlHeightSM:p,colorBgContainerDisabled:h,colorTextDisabled:g}=e;return{zIndexPopup:i+50,optionSelectedColor:a,optionSelectedFontWeight:l,optionSelectedBg:s,optionActiveBg:c,optionPadding:`${(r-t*n)/2}px ${o}px`,optionFontSize:t,optionLineHeight:n,optionHeight:r,selectorBg:u,clearBg:u,singleItemHeightLG:f,multipleItemBg:d,multipleItemBorderColor:"transparent",multipleItemHeight:p,multipleItemHeightLG:r,multipleSelectorBgDisabled:h,multipleItemColorDisabled:g,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(1.25*e.fontSize)}}),{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}});function Gb(e,t){return e||(e=>{const t={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:"scroll"===e?"scroll":"visible",dynamicInset:!0};return{bottomLeft:Object.assign(Object.assign({},t),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},t),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},t),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},t),{points:["br","tr"],offset:[0,-4]})}})(t)}const Yb={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"};var Kb=function(e,t){return r.createElement(Xi,hi({},e,{ref:t,icon:Yb}))};const Zb=r.forwardRef(Kb),Jb={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"};var Qb=function(e,t){return r.createElement(Xi,hi({},e,{ref:t,icon:Jb}))};const ex=r.forwardRef(Qb),tx={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"};var nx=function(e,t){return r.createElement(Xi,hi({},e,{ref:t,icon:tx}))};const rx=r.forwardRef(nx);function ox(e){let{suffixIcon:t,clearIcon:n,menuItemSelectedIcon:o,removeIcon:i,loading:a,multiple:l,hasFeedback:s,prefixCls:c,showSuffixIcon:u,feedbackIcon:d,showArrow:f,componentName:p}=e;const h=null!=n?n:r.createElement(Zi,null),g=e=>null!==t||s||f?r.createElement(r.Fragment,null,!1!==u&&e,s&&d):null;let m=null;if(void 0!==t)m=g(t);else if(a)m=g(r.createElement($s,{spin:!0}));else{const e=`${c}-suffix`;m=t=>{let{open:n,showSearch:o}=t;return g(n&&o?r.createElement(rx,{className:e}):r.createElement(ex,{className:e}))}}let v=null;v=void 0!==o?o:l?r.createElement(Zb,null):null;let y=null;return y=void 0!==i?i:r.createElement(ea,null),{clearIcon:h,suffixIcon:m,itemIcon:v,removeIcon:y}}function ix(e,t){return void 0!==t?t:null!==e}const ax="SECRET_COMBOBOX_MODE_DO_NOT_USE",lx=(e,t)=>{var n,o,{prefixCls:i,bordered:l=!0,className:s,rootClassName:c,getPopupContainer:u,popupClassName:d,dropdownClassName:f,listHeight:p=256,placement:h,listItemHeight:g=24,size:m,disabled:v,notFoundContent:y,status:b,builtinPlacements:x,dropdownMatchSelectWidth:w,popupMatchSelectWidth:S,direction:E,style:C,allowClear:k}=e,O=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o{const{mode:e}=O;if("combobox"!==e)return e===ax?"combobox":e}),[O.mode]),W="multiple"===U||"tags"===U,V=ix(O.suffixIcon,O.showArrow),X=null!==(n=null!=S?S:w)&&void 0!==n?n:A,{status:q,hasFeedback:G,isFormItemInput:Y,feedbackIcon:K}=r.useContext(nh),Z=sb(q,b);let J;J=void 0!==y?y:"combobox"===U?null:(null==$?void 0:$("Select"))||r.createElement(vb,{componentName:"Select"});const{suffixIcon:Q,itemIcon:ee,removeIcon:te,clearIcon:ne}=ox(Object.assign(Object.assign({},O),{multiple:W,hasFeedback:G,feedbackIcon:K,showSuffixIcon:V,prefixCls:R,showArrow:O.showArrow,componentName:"Select"})),re=!0===k?{clearIcon:ne}:k,oe=fe(O,["suffixIcon","itemIcon"]),ie=a()(d||f,{[`${R}-dropdown-${D}`]:"rtl"===D},c,B,H),ae=cu((e=>{var t;return null!==(t=null!=m?m:j)&&void 0!==t?t:e})),le=r.useContext(Mc),se=null!=v?v:le,ce=a()({[`${R}-lg`]:"large"===ae,[`${R}-sm`]:"small"===ae,[`${R}-rtl`]:"rtl"===D,[`${R}-borderless`]:!l,[`${R}-in-form-item`]:Y},lb(R,Z,G),F,null==T?void 0:T.className,s,c,B,H),ue=r.useMemo((()=>void 0!==h?h:"rtl"===D?"bottomRight":"bottomLeft"),[h,D]),de=Gb(x,N),[pe]=Rs("SelectLike",null===(o=O.dropdownStyle)||void 0===o?void 0:o.zIndex);return z(r.createElement(ab,Object.assign({ref:t,virtual:P,showSearch:null==T?void 0:T.showSearch},oe,{style:Object.assign(Object.assign({},null==T?void 0:T.style),C),dropdownMatchSelectWidth:X,builtinPlacements:de,transitionName:Zc(L,"slide-up",O.transitionName),listHeight:p,listItemHeight:g,mode:U,prefixCls:R,placement:ue,direction:D,suffixIcon:Q,menuItemSelectedIcon:ee,removeIcon:te,allowClear:re,notFoundContent:J,className:ce,getPopupContainer:u||M,dropdownClassName:ie,disabled:se,dropdownStyle:Object.assign(Object.assign({},null==O?void 0:O.dropdownStyle),{zIndex:pe})})))},sx=r.forwardRef(lx),cx=Tg(sx);sx.SECRET_COMBOBOX_MODE_DO_NOT_USE=ax,sx.Option=Ey,sx.OptGroup=wy,sx._InternalPanelDoNotUseOrYouWillBeFired=cx;const ux=sx,{Option:dx}=ux;function fx(e){return e&&e.type&&(e.type.isSelectOption||e.type.isSelectOptGroup)}const px=(e,t)=>{var n;const{prefixCls:o,className:i,popupClassName:l,dropdownClassName:s,children:u,dataSource:d}=e,f=c(u);let p;1===f.length&&kl(f[0])&&!fx(f[0])&&([p]=f);const h=p?()=>p:void 0;let g;g=f.length&&fx(f[0])?u:d?d.map((e=>{if(kl(e))return e;switch(typeof e){case"string":return r.createElement(dx,{key:e,value:e},e);case"object":{const{value:t}=e;return r.createElement(dx,{key:t,value:t},e.text)}default:return}})):[];const{getPrefixCls:m}=r.useContext(Ce),v=m("select",o),[y]=Rs("SelectLike",null===(n=e.dropdownStyle)||void 0===n?void 0:n.zIndex);return r.createElement(ux,Object.assign({ref:t,suffixIcon:null},fe(e,["dataSource","dropdownClassName"]),{prefixCls:v,popupClassName:l||s,dropdownStyle:Object.assign(Object.assign({},e.dropdownStyle),{zIndex:y}),className:a()(`${v}-auto-complete`,i),mode:ux.SECRET_COMBOBOX_MODE_DO_NOT_USE,getInputElement:h}),g)},hx=r.forwardRef(px),gx=Tg(hx);hx.Option=dx,hx._InternalPanelDoNotUseOrYouWillBeFired=gx;const mx=hx,vx=["xxl","xl","lg","md","sm","xs"];function yx(){const[,e]=No(),t=(e=>({xs:`(max-width: ${e.screenXSMax}px)`,sm:`(min-width: ${e.screenSM}px)`,md:`(min-width: ${e.screenMD}px)`,lg:`(min-width: ${e.screenLG}px)`,xl:`(min-width: ${e.screenXL}px)`,xxl:`(min-width: ${e.screenXXL}px)`}))((e=>{const t=e,n=[].concat(vx).reverse();return n.forEach(((e,r)=>{const o=e.toUpperCase(),i=`screen${o}Min`,a=`screen${o}`;if(!(t[i]<=t[a]))throw new Error(`${i}<=${a} fails : !(${t[i]}<=${t[a]})`);if(r{const e=new Map;let n=-1,r={};return{matchHandlers:{},dispatch:t=>(r=t,e.forEach((e=>e(r))),e.size>=1),subscribe(t){return e.size||this.register(),n+=1,e.set(n,t),t(r),n},unsubscribe(t){e.delete(t),e.size||this.unregister()},unregister(){Object.keys(t).forEach((e=>{const n=t[e],r=this.matchHandlers[n];null==r||r.mql.removeListener(null==r?void 0:r.listener)})),e.clear()},register(){Object.keys(t).forEach((e=>{const n=t[e],o=t=>{let{matches:n}=t;this.dispatch(Object.assign(Object.assign({},r),{[e]:n}))},i=window.matchMedia(n);i.addListener(o),this.matchHandlers[n]={mql:i,listener:o},o(i)}))},responsiveMap:t}}),[e])}const bx=(e,t)=>{if(t&&"object"==typeof t)for(let n=0;ne+1),0);return e}const wx=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=(0,r.useRef)({}),n=xx(),o=yx();return sr((()=>{const r=o.subscribe((r=>{t.current=r,e&&n()}));return()=>o.unsubscribe(r)}),[]),t.current},Sx=r.createContext({}),Ex=e=>{const{antCls:t,componentCls:n,iconCls:r,avatarBg:o,avatarColor:i,containerSize:a,containerSizeLG:l,containerSizeSM:s,textFontSize:c,textFontSizeLG:u,textFontSizeSM:d,borderRadius:f,borderRadiusLG:p,borderRadiusSM:h,lineWidth:g,lineType:m,calc:v}=e,y=(e,t,o)=>({width:e,height:e,lineHeight:Mt(v(e).sub(v(g).mul(2)).equal()),borderRadius:"50%",[`&${n}-square`]:{borderRadius:o},[`${n}-string`]:{position:"absolute",left:{_skip_check_:!0,value:"50%"},transformOrigin:"0 center"},[`&${n}-icon`]:{fontSize:t,[`> ${r}`]:{margin:0}}});return{[n]:Object.assign(Object.assign(Object.assign(Object.assign({},xr(e)),{position:"relative",display:"inline-block",overflow:"hidden",color:i,whiteSpace:"nowrap",textAlign:"center",verticalAlign:"middle",background:o,border:`${Mt(g)} ${m} transparent`,"&-image":{background:"transparent"},[`${t}-image-img`]:{display:"block"}}),y(a,c,f)),{"&-lg":Object.assign({},y(l,u,p)),"&-sm":Object.assign({},y(s,d,h)),"> img":{display:"block",width:"100%",height:"100%",objectFit:"cover"}})}},Cx=e=>{const{componentCls:t,groupBorderColor:n,groupOverlapping:r,groupSpace:o}=e;return{[`${t}-group`]:{display:"inline-flex",[`${t}`]:{borderColor:n},"> *:not(:first-child)":{marginInlineStart:r}},[`${t}-group-popover`]:{[`${t} + ${t}`]:{marginInlineStart:o}}}},kx=oi("Avatar",(e=>{const{colorTextLightSolid:t,colorTextPlaceholder:n}=e,r=Ko(e,{avatarBg:n,avatarColor:t});return[Ex(r),Cx(r)]}),(e=>{const{controlHeight:t,controlHeightLG:n,controlHeightSM:r,fontSize:o,fontSizeLG:i,fontSizeXL:a,fontSizeHeading3:l,marginXS:s,marginXXS:c,colorBorderBg:u}=e;return{containerSize:t,containerSizeLG:n,containerSizeSM:r,textFontSize:Math.round((i+a)/2),textFontSizeLG:l,textFontSizeSM:o,groupSpace:c,groupOverlapping:-s,groupBorderColor:u}}));const Ox=(e,t)=>{const[n,o]=r.useState(1),[i,l]=r.useState(!1),[s,c]=r.useState(!0),u=r.useRef(null),d=r.useRef(null),f=O(t,u),{getPrefixCls:p,avatar:h}=r.useContext(Ce),g=r.useContext(Sx),m=()=>{if(!d.current||!u.current)return;const t=d.current.offsetWidth,n=u.current.offsetWidth;if(0!==t&&0!==n){const{gap:r=4}=e;2*r{l(!0)}),[]),r.useEffect((()=>{c(!0),o(1)}),[e.src]),r.useEffect(m,[e.gap]);const{prefixCls:v,shape:y,size:b,src:x,srcSet:w,icon:S,className:E,rootClassName:C,alt:k,draggable:M,children:I,crossOrigin:$}=e,_=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o{var t,n;return null!==(n=null!==(t=null!=b?b:null==g?void 0:g.size)&&void 0!==t?t:e)&&void 0!==n?n:"default"})),A=Object.keys("object"==typeof P&&P||{}).some((e=>["xs","sm","md","lg","xl","xxl"].includes(e))),N=wx(A),T=r.useMemo((()=>{if("object"!=typeof P)return{};const e=vx.find((e=>N[e])),t=P[e];return t?{width:t,height:t,lineHeight:`${t}px`,fontSize:t&&(S||I)?t/2:18}:{}}),[N,P]),R=p("avatar",v),L=Ql(R),[D,j]=kx(R,L),F=a()({[`${R}-lg`]:"large"===P,[`${R}-sm`]:"small"===P}),B=r.isValidElement(x),z=y||(null==g?void 0:g.shape)||"circle",H=a()(R,F,null==h?void 0:h.className,`${R}-${z}`,{[`${R}-image`]:B||x&&s,[`${R}-icon`]:!!S},L,E,C,j),U="number"==typeof P?{width:P,height:P,lineHeight:`${P}px`,fontSize:S?P/2:18}:{};let W;if("string"==typeof x&&s)W=r.createElement("img",{src:x,draggable:M,srcSet:w,onError:()=>{const{onError:t}=e;!1!==(null==t?void 0:t())&&c(!1)},alt:k,crossOrigin:$});else if(B)W=x;else if(S)W=S;else if(i||1!==n){const e=`scale(${n}) translateX(-50%)`,t={msTransform:e,WebkitTransform:e,transform:e},o="number"==typeof P?{lineHeight:`${P}px`}:{};W=r.createElement(se,{onResize:m},r.createElement("span",{className:`${R}-string`,ref:d,style:Object.assign(Object.assign({},o),t)},I))}else W=r.createElement("span",{className:`${R}-string`,style:{opacity:0},ref:d},I);return delete _.onError,delete _.gap,D(r.createElement("span",Object.assign({},_,{style:Object.assign(Object.assign(Object.assign(Object.assign({},U),T),null==h?void 0:h.style),_.style),className:H,ref:f}),W))},Mx=r.forwardRef(Ox),Ix=e=>e?"function"==typeof e?e():e:null;function $x(e){var t=e.children,n=e.prefixCls,o=e.id,i=e.overlayInnerStyle,l=e.className,s=e.style;return r.createElement("div",{className:a()("".concat(n,"-content"),l),style:s},r.createElement("div",{className:"".concat(n,"-inner"),id:o,role:"tooltip",style:i},"function"==typeof t?t():t))}var _x={shiftX:64,adjustY:1},Px={adjustX:1,shiftY:!0},Ax=[0,0],Nx={left:{points:["cr","cl"],overflow:Px,offset:[-4,0],targetOffset:Ax},right:{points:["cl","cr"],overflow:Px,offset:[4,0],targetOffset:Ax},top:{points:["bc","tc"],overflow:_x,offset:[0,-4],targetOffset:Ax},bottom:{points:["tc","bc"],overflow:_x,offset:[0,4],targetOffset:Ax},topLeft:{points:["bl","tl"],overflow:_x,offset:[0,-4],targetOffset:Ax},leftTop:{points:["tr","tl"],overflow:Px,offset:[-4,0],targetOffset:Ax},topRight:{points:["br","tr"],overflow:_x,offset:[0,-4],targetOffset:Ax},rightTop:{points:["tl","tr"],overflow:Px,offset:[4,0],targetOffset:Ax},bottomRight:{points:["tr","br"],overflow:_x,offset:[0,4],targetOffset:Ax},rightBottom:{points:["bl","br"],overflow:Px,offset:[4,0],targetOffset:Ax},bottomLeft:{points:["tl","bl"],overflow:_x,offset:[0,4],targetOffset:Ax},leftBottom:{points:["br","bl"],overflow:Px,offset:[-4,0],targetOffset:Ax}},Tx=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow"],Rx=function(e,t){var n=e.overlayClassName,o=e.trigger,i=void 0===o?["hover"]:o,a=e.mouseEnterDelay,l=void 0===a?0:a,s=e.mouseLeaveDelay,c=void 0===s?.1:s,u=e.overlayStyle,d=e.prefixCls,f=void 0===d?"rc-tooltip":d,p=e.children,h=e.onVisibleChange,g=e.afterVisibleChange,m=e.transitionName,v=e.animation,y=e.motion,b=e.placement,x=void 0===b?"right":b,w=e.align,S=void 0===w?{}:w,E=e.destroyTooltipOnHide,C=void 0!==E&&E,k=e.defaultVisible,O=e.getTooltipContainer,M=e.overlayInnerStyle,I=(e.arrowContent,e.overlay),$=e.id,_=e.showArrow,P=void 0===_||_,A=ha(e,Tx),N=(0,r.useRef)(null);(0,r.useImperativeHandle)(t,(function(){return N.current}));var T=De({},A);return"visible"in e&&(T.popupVisible=e.visible),r.createElement(ly,Xt({popupClassName:n,prefixCls:f,popup:function(){return r.createElement($x,{key:"content",prefixCls:f,id:$,overlayInnerStyle:M},I)},action:i,builtinPlacements:Nx,popupPlacement:x,ref:N,popupAlign:S,getPopupContainer:O,onPopupVisibleChange:h,afterPopupVisibleChange:g,popupTransitionName:m,popupAnimation:v,popupMotion:y,defaultPopupVisible:k,autoDestroy:C,mouseLeaveDelay:c,popupStyle:u,mouseEnterDelay:l,arrow:P},T),p)};const Lx=(0,r.forwardRef)(Rx);function Dx(e){const{sizePopupArrow:t,borderRadiusXS:n,borderRadiusOuter:r}=e,o=t/2,i=o,a=1*r/Math.sqrt(2),l=o-r*(1-1/Math.sqrt(2)),s=o-n*(1/Math.sqrt(2)),c=r*(Math.sqrt(2)-1)+n*(1/Math.sqrt(2)),u=2*o-s,d=c,f=2*o-a,p=l,h=2*o-0,g=i,m=o*Math.sqrt(2)+r*(Math.sqrt(2)-2),v=r*(Math.sqrt(2)-1);return{arrowShadowWidth:m,arrowPath:`path('M 0 ${i} A ${r} ${r} 0 0 0 ${a} ${l} L ${s} ${c} A ${n} ${n} 0 0 1 ${u} ${d} L ${f} ${p} A ${r} ${r} 0 0 0 ${h} ${g} Z')`,arrowPolygon:`polygon(${v}px 100%, 50% ${v}px, ${2*o-v}px 100%, ${v}px 100%)`}}const jx=(e,t,n)=>{const{sizePopupArrow:r,arrowPolygon:o,arrowPath:i,arrowShadowWidth:a,borderRadiusXS:l,calc:s}=e;return{pointerEvents:"none",width:r,height:r,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:r,height:s(r).div(2).equal(),background:t,clipPath:{_multi_value_:!0,value:[o,i]},content:'""'},"&::after":{content:'""',position:"absolute",width:a,height:a,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${Mt(l)} 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:n,zIndex:0,background:"transparent"}}},Fx=8;function Bx(e){const{contentRadius:t,limitVerticalRadius:n}=e,r=t>12?t+2:12;return{arrowOffsetHorizontal:r,arrowOffsetVertical:n?Fx:r}}function zx(e,t){return e?t:{}}function Hx(e,t,n){const{componentCls:r,boxShadowPopoverArrow:o,arrowOffsetVertical:i,arrowOffsetHorizontal:a}=e,{arrowDistance:l=0,arrowPlacement:s={left:!0,right:!0,top:!0,bottom:!0}}=n||{};return{[r]:Object.assign(Object.assign(Object.assign(Object.assign({[`${r}-arrow`]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},jx(e,t,o)),{"&:before":{background:t}})]},zx(!!s.top,{[[`&-placement-top ${r}-arrow`,`&-placement-topLeft ${r}-arrow`,`&-placement-topRight ${r}-arrow`].join(",")]:{bottom:l,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top ${r}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},[`&-placement-topLeft ${r}-arrow`]:{left:{_skip_check_:!0,value:a}},[`&-placement-topRight ${r}-arrow`]:{right:{_skip_check_:!0,value:a}}})),zx(!!s.bottom,{[[`&-placement-bottom ${r}-arrow`,`&-placement-bottomLeft ${r}-arrow`,`&-placement-bottomRight ${r}-arrow`].join(",")]:{top:l,transform:"translateY(-100%)"},[`&-placement-bottom ${r}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},[`&-placement-bottomLeft ${r}-arrow`]:{left:{_skip_check_:!0,value:a}},[`&-placement-bottomRight ${r}-arrow`]:{right:{_skip_check_:!0,value:a}}})),zx(!!s.left,{[[`&-placement-left ${r}-arrow`,`&-placement-leftTop ${r}-arrow`,`&-placement-leftBottom ${r}-arrow`].join(",")]:{right:{_skip_check_:!0,value:l},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left ${r}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop ${r}-arrow`]:{top:i},[`&-placement-leftBottom ${r}-arrow`]:{bottom:i}})),zx(!!s.right,{[[`&-placement-right ${r}-arrow`,`&-placement-rightTop ${r}-arrow`,`&-placement-rightBottom ${r}-arrow`].join(",")]:{left:{_skip_check_:!0,value:l},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right ${r}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop ${r}-arrow`]:{top:i},[`&-placement-rightBottom ${r}-arrow`]:{bottom:i}}))}}const Ux={left:{points:["cr","cl"]},right:{points:["cl","cr"]},top:{points:["bc","tc"]},bottom:{points:["tc","bc"]},topLeft:{points:["bl","tl"]},leftTop:{points:["tr","tl"]},topRight:{points:["br","tr"]},rightTop:{points:["tl","tr"]},bottomRight:{points:["tr","br"]},rightBottom:{points:["bl","br"]},bottomLeft:{points:["tl","bl"]},leftBottom:{points:["br","bl"]}},Wx={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},Vx=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function Xx(e){const{arrowWidth:t,autoAdjustOverflow:n,arrowPointAtCenter:r,offset:o,borderRadius:i,visibleFirst:a}=e,l=t/2,s={};return Object.keys(Ux).forEach((e=>{const c=r&&Wx[e]||Ux[e],u=Object.assign(Object.assign({},c),{offset:[0,0],dynamicInset:!0});switch(s[e]=u,Vx.has(e)&&(u.autoArrow=!1),e){case"top":case"topLeft":case"topRight":u.offset[1]=-l-o;break;case"bottom":case"bottomLeft":case"bottomRight":u.offset[1]=l+o;break;case"left":case"leftTop":case"leftBottom":u.offset[0]=-l-o;break;case"right":case"rightTop":case"rightBottom":u.offset[0]=l+o}const d=Bx({contentRadius:i,limitVerticalRadius:!0});if(r)switch(e){case"topLeft":case"bottomLeft":u.offset[0]=-d.arrowOffsetHorizontal-l;break;case"topRight":case"bottomRight":u.offset[0]=d.arrowOffsetHorizontal+l;break;case"leftTop":case"rightTop":u.offset[1]=-d.arrowOffsetHorizontal-l;break;case"leftBottom":case"rightBottom":u.offset[1]=d.arrowOffsetHorizontal+l}u.overflow=function(e,t,n,r){if(!1===r)return{adjustX:!1,adjustY:!1};const o=r&&"object"==typeof r?r:{},i={};switch(e){case"top":case"bottom":i.shiftX=2*t.arrowOffsetHorizontal+n,i.shiftY=!0,i.adjustY=!0;break;case"left":case"right":i.shiftY=2*t.arrowOffsetVertical+n,i.shiftX=!0,i.adjustX=!0}const a=Object.assign(Object.assign({},i),o);return a.shiftX||(a.adjustX=!0),a.shiftY||(a.adjustY=!0),a}(e,d,t,n),a&&(u.htmlRegion="visibleFirst")})),s}const qx=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"];function Gx(e,t){return qx.reduce(((n,r)=>{const o=e[`${r}1`],i=e[`${r}3`],a=e[`${r}6`],l=e[`${r}7`];return Object.assign(Object.assign({},n),t(r,{lightColor:o,lightBorderColor:i,darkColor:a,textColor:l}))}),{})}const Yx=e=>{const{componentCls:t,tooltipMaxWidth:n,tooltipColor:r,tooltipBg:o,tooltipBorderRadius:i,zIndexPopup:a,controlHeight:l,boxShadowSecondary:s,paddingSM:c,paddingXS:u}=e;return[{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},xr(e)),{position:"absolute",zIndex:a,display:"block",width:"max-content",maxWidth:n,visibility:"visible",transformOrigin:"var(--arrow-x, 50%) var(--arrow-y, 50%)","&-hidden":{display:"none"},"--antd-arrow-background-color":o,[`${t}-inner`]:{minWidth:l,minHeight:l,padding:`${Mt(e.calc(c).div(2).equal())} ${Mt(u)}`,color:r,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:o,borderRadius:i,boxShadow:s,boxSizing:"border-box"},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${t}-inner`]:{borderRadius:e.min(i,Fx)}},[`${t}-content`]:{position:"relative"}}),Gx(e,((e,n)=>{let{darkColor:r}=n;return{[`&${t}-${e}`]:{[`${t}-inner`]:{backgroundColor:r},[`${t}-arrow`]:{"--antd-arrow-background-color":r}}}}))),{"&-rtl":{direction:"rtl"}})},Hx(e,"var(--antd-arrow-background-color)"),{[`${t}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow}}]},Kx=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+70},Bx({contentRadius:e.borderRadius,limitVerticalRadius:!0})),Dx(Ko(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))),Zx=function(e){const t=oi("Tooltip",(e=>{const{borderRadius:t,colorTextLightSolid:n,colorBgSpotlight:r}=e,o=Ko(e,{tooltipMaxWidth:250,tooltipColor:n,tooltipBorderRadius:t,tooltipBg:r});return[Yx(o),Ph(e,"zoom-big-fast")]}),Kx,{resetStyle:!1,injectStyle:!(arguments.length>1&&void 0!==arguments[1])||arguments[1]});return t(e)},Jx=qx.map((e=>`${e}-inverse`)),Qx=["success","processing","error","default","warning"];function ew(e){return arguments.length>1&&void 0!==arguments[1]&&!arguments[1]?qx.includes(e):[].concat(he(Jx),he(qx)).includes(e)}function tw(e,t){const n=ew(t),r=a()({[`${e}-${t}`]:t&&n}),o={},i={};return t&&!n&&(o.background=t,i["--antd-arrow-background-color"]=t),{className:r,overlayStyle:o,arrowStyle:i}}const nw=r.forwardRef(((e,t)=>{var n,o;const{prefixCls:i,openClassName:l,getTooltipContainer:s,overlayClassName:c,color:u,overlayInnerStyle:d,children:f,afterOpenChange:p,afterVisibleChange:h,destroyTooltipOnHide:g,arrow:m=!0,title:v,overlay:y,builtinPlacements:b,arrowPointAtCenter:x=!1,autoAdjustOverflow:w=!0}=e,S=!!m,[,E]=No(),{getPopupContainer:C,getPrefixCls:k,direction:O}=r.useContext(Ce),M=Os("Tooltip"),I=r.useRef(null),$=()=>{var e;null===(e=I.current)||void 0===e||e.forceAlign()};r.useImperativeHandle(t,(()=>({forceAlign:$,forcePopupAlign:()=>{M.deprecated(!1,"forcePopupAlign","forceAlign"),$()}})));const[_,P]=dr(!1,{value:null!==(n=e.open)&&void 0!==n?n:e.visible,defaultValue:null!==(o=e.defaultOpen)&&void 0!==o?o:e.defaultVisible}),A=!v&&!y&&0!==v,N=r.useMemo((()=>{var e,t;let n=x;return"object"==typeof m&&(n=null!==(t=null!==(e=m.pointAtCenter)&&void 0!==e?e:m.arrowPointAtCenter)&&void 0!==t?t:x),b||Xx({arrowPointAtCenter:n,autoAdjustOverflow:w,arrowWidth:S?E.sizePopupArrow:0,borderRadius:E.borderRadius,offset:E.marginXXS,visibleFirst:!0})}),[x,m,b,E]),T=r.useMemo((()=>0===v?v:y||v||""),[y,v]),R=r.createElement(vu,null,"function"==typeof T?T():T),{getPopupContainer:L,placement:D="top",mouseEnterDelay:j=.1,mouseLeaveDelay:F=.1,overlayStyle:B,rootClassName:z}=e,H=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o{var n,r;P(!A&&t),A||(null===(n=e.onOpenChange)||void 0===n||n.call(e,t),null===(r=e.onVisibleChange)||void 0===r||r.call(e,t))},afterVisibleChange:null!=p?p:h,overlayInnerStyle:ee,arrowContent:r.createElement("span",{className:`${U}-arrow-content`}),motion:{motionName:Zc(W,"zoom-big-fast",e.transitionName),motionDeadline:1e3},destroyTooltipOnHide:!!g}),X?Il(q,{className:Y}):q);return K(r.createElement(_s.Provider,{value:re},oe))}));nw._InternalPanelDoNotUseOrYouWillBeFired=e=>{const{prefixCls:t,className:n,placement:o="top",title:i,color:l,overlayInnerStyle:s}=e,{getPrefixCls:c}=r.useContext(Ce),u=c("tooltip",t),[d,f]=Zx(u),p=tw(u,l),h=p.arrowStyle,g=Object.assign(Object.assign({},s),p.overlayStyle),m=a()(f,u,`${u}-pure`,`${u}-placement-${o}`,n,p.className);return d(r.createElement("div",{className:m,style:h},r.createElement("div",{className:`${u}-arrow`}),r.createElement($x,Object.assign({},e,{className:f,prefixCls:u,overlayInnerStyle:g}),i)))};const rw=nw,ow=e=>{const{componentCls:t,popoverColor:n,titleMinWidth:r,fontWeightStrong:o,innerPadding:i,boxShadowSecondary:a,colorTextHeading:l,borderRadiusLG:s,zIndexPopup:c,titleMarginBottom:u,colorBgElevated:d,popoverBg:f,titleBorderBottom:p,innerContentPadding:h,titlePadding:g}=e;return[{[t]:Object.assign(Object.assign({},xr(e)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:c,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text",transformOrigin:"var(--arrow-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":d,"&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${t}-content`]:{position:"relative"},[`${t}-inner`]:{backgroundColor:f,backgroundClip:"padding-box",borderRadius:s,boxShadow:a,padding:i},[`${t}-title`]:{minWidth:r,marginBottom:u,color:l,fontWeight:o,borderBottom:p,padding:g},[`${t}-inner-content`]:{color:n,padding:h}})},Hx(e,"var(--antd-arrow-background-color)"),{[`${t}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow,display:"inline-block",[`${t}-content`]:{display:"inline-block"}}}]},iw=e=>{const{componentCls:t}=e;return{[t]:qx.map((n=>{const r=e[`${n}6`];return{[`&${t}-${n}`]:{"--antd-arrow-background-color":r,[`${t}-inner`]:{backgroundColor:r},[`${t}-arrow`]:{background:"transparent"}}}}))}},aw=oi("Popover",(e=>{const{colorBgElevated:t,colorText:n}=e,r=Ko(e,{popoverBg:t,popoverColor:n});return[ow(r),iw(r),Ph(r,"zoom-big")]}),(e=>{const{lineWidth:t,controlHeight:n,fontHeight:r,padding:o,wireframe:i,zIndexPopupBase:a,borderRadiusLG:l,marginXS:s,lineType:c,colorSplit:u,paddingSM:d}=e,f=n-r,p=f/2,h=f/2-t,g=o;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:a+30},Dx(e)),Bx({contentRadius:l,limitVerticalRadius:!0})),{innerPadding:i?0:12,titleMarginBottom:i?0:s,titlePadding:i?`${p}px ${g}px ${h}px`:0,titleBorderBottom:i?`${t}px ${c} ${u}`:"none",innerContentPadding:i?`${d}px ${g}px`:0})}),{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]});const lw=e=>{const{hashId:t,prefixCls:n,className:o,style:i,placement:l="top",title:s,content:c,children:u}=e;return r.createElement("div",{className:a()(t,n,`${n}-pure`,`${n}-placement-${l}`,o),style:i},r.createElement("div",{className:`${n}-arrow`}),r.createElement($x,Object.assign({},e,{className:t,prefixCls:n}),u||((e,t,n)=>{if(t||n)return r.createElement(r.Fragment,null,t&&r.createElement("div",{className:`${e}-title`},Ix(t)),r.createElement("div",{className:`${e}-inner-content`},Ix(n)))})(n,s,c)))},sw=e=>{const{prefixCls:t}=e,n=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o{let{title:t,content:n,prefixCls:o}=e;return r.createElement(r.Fragment,null,t&&r.createElement("div",{className:`${o}-title`},Ix(t)),r.createElement("div",{className:`${o}-inner-content`},Ix(n)))},uw=r.forwardRef(((e,t)=>{const{prefixCls:n,title:o,content:i,overlayClassName:l,placement:s="top",trigger:c="hover",mouseEnterDelay:u=.1,mouseLeaveDelay:d=.1,overlayStyle:f={}}=e,p=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o{const{size:t,shape:n}=r.useContext(Sx),o=r.useMemo((()=>({size:e.size||t,shape:e.shape||n})),[e.size,e.shape,t,n]);return r.createElement(Sx.Provider,{value:o},e.children)},pw=Mx;pw.Group=e=>{const{getPrefixCls:t,direction:n}=r.useContext(Ce),{prefixCls:o,className:i,rootClassName:l,style:s,maxCount:u,maxStyle:d,size:f,shape:p,maxPopoverPlacement:h="top",maxPopoverTrigger:g="hover",children:m}=e,v=t("avatar",o),y=`${v}-group`,b=Ql(v),[x,w]=kx(v,b),S=a()(y,{[`${y}-rtl`]:"rtl"===n},b,i,l,w),E=c(m).map(((e,t)=>Il(e,{key:`avatar-key-${t}`}))),C=E.length;if(u&&u{const{componentCls:t,backTopFontSize:n,backTopSize:r,zIndexPopup:o}=e;return{[t]:Object.assign(Object.assign({},xr(e)),{position:"fixed",insetInlineEnd:e.backTopInlineEnd,insetBlockEnd:e.backTopBlockEnd,zIndex:o,width:40,height:40,cursor:"pointer","&:empty":{display:"none"},[`${t}-content`]:{width:r,height:r,overflow:"hidden",color:e.backTopColor,textAlign:"center",backgroundColor:e.backTopBackground,borderRadius:r,transition:`all ${e.motionDurationMid}`,"&:hover":{backgroundColor:e.backTopHoverBackground,transition:`all ${e.motionDurationMid}`}},[`${t}-icon`]:{fontSize:n,lineHeight:Mt(r)}})}},bw=e=>{const{componentCls:t,screenMD:n,screenXS:r,backTopInlineEndMD:o,backTopInlineEndXS:i}=e;return{[`@media (max-width: ${Mt(n)})`]:{[t]:{insetInlineEnd:o}},[`@media (max-width: ${Mt(r)})`]:{[t]:{insetInlineEnd:i}}}},xw=oi("BackTop",(e=>{const{fontSizeHeading3:t,colorTextDescription:n,colorTextLightSolid:r,colorText:o,controlHeightLG:i,calc:a}=e,l=Ko(e,{backTopBackground:n,backTopColor:r,backTopHoverBackground:o,backTopFontSize:t,backTopSize:i,backTopBlockEnd:a(i).mul(1.25).equal(),backTopInlineEnd:a(i).mul(2.5).equal(),backTopInlineEndMD:a(i).mul(1.5).equal(),backTopInlineEndXS:a(i).mul(.5).equal()});return[yw(l),bw(l)]}),(e=>({zIndexPopup:e.zIndexBase+10}))),ww=e=>{const{prefixCls:t,className:n,rootClassName:o,visibilityHeight:i=400,target:l,onClick:s,duration:c=450}=e,[u,d]=r.useState(0===i),f=r.useRef(null),p=()=>f.current&&f.current.ownerDocument?f.current.ownerDocument:window,h=Se((e=>{const t=Zl(e.target,!0);d(t>=i)}));r.useEffect((()=>{const e=(l||p)();return h({target:e}),null==e||e.addEventListener("scroll",h),()=>{h.cancel(),null==e||e.removeEventListener("scroll",h)}}),[l]);const{getPrefixCls:g,direction:m}=r.useContext(Ce),v=g("back-top",t),y=g(),[b,x]=xw(v),w=a()(x,v,{[`${v}-rtl`]:"rtl"===m},n,o),S=fe(e,["prefixCls","className","rootClassName","children","visibilityHeight","target"]),E=r.createElement("div",{className:`${v}-content`},r.createElement("div",{className:`${v}-icon`},r.createElement(vw,null)));return b(r.createElement("div",Object.assign({},S,{className:w,onClick:e=>{Jl(0,{getContainer:l||p,duration:c}),null==s||s(e)},ref:f}),r.createElement(bl,{visible:u,motionName:`${y}-fade`},(t=>{let{className:n}=t;return Il(e.children||E,(e=>{let{className:t}=e;return{className:a()(n,t)}}))}))))},Sw=new Kn("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),Ew=new Kn("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),Cw=new Kn("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),kw=new Kn("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),Ow=new Kn("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),Mw=new Kn("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),Iw=e=>{const{fontHeight:t,lineWidth:n,marginXS:r,colorBorderBg:o}=e;return Ko(e,{badgeFontHeight:t,badgeShadowSize:n,badgeTextColor:e.colorBgContainer,badgeColor:e.colorError,badgeColorHover:e.colorErrorHover,badgeShadowColor:o,badgeProcessingDuration:"1.2s",badgeRibbonOffset:r,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"})},$w=e=>{const{fontSize:t,lineHeight:n,fontSizeSM:r,lineWidth:o}=e;return{indicatorZIndex:"auto",indicatorHeight:Math.round(t*n)-2*o,indicatorHeightSM:t,dotSize:r/2,textFontSize:r,textFontSizeSM:r,textFontWeight:"normal",statusSize:r/2}},_w=oi("Badge",(e=>(e=>{const{componentCls:t,iconCls:n,antCls:r,badgeShadowSize:o,motionDurationSlow:i,textFontSize:a,textFontSizeSM:l,statusSize:s,dotSize:c,textFontWeight:u,indicatorHeight:d,indicatorHeightSM:f,marginXS:p,calc:h}=e,g=`${r}-scroll-number`,m=Gx(e,((e,n)=>{let{darkColor:r}=n;return{[`&${t} ${t}-color-${e}`]:{background:r,[`&:not(${t}-count)`]:{color:r}}}}));return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},xr(e)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,[`${t}-count`]:{zIndex:e.indicatorZIndex,minWidth:d,height:d,color:e.badgeTextColor,fontWeight:u,fontSize:a,lineHeight:Mt(d),whiteSpace:"nowrap",textAlign:"center",background:e.badgeColor,borderRadius:h(d).div(2).equal(),boxShadow:`0 0 0 ${Mt(o)} ${e.badgeShadowColor}`,transition:`background ${e.motionDurationMid}`,a:{color:e.badgeTextColor},"a:hover":{color:e.badgeTextColor},"a:hover &":{background:e.badgeColorHover}},[`${t}-count-sm`]:{minWidth:f,height:f,fontSize:l,lineHeight:Mt(f),borderRadius:h(f).div(2).equal()},[`${t}-multiple-words`]:{padding:`0 ${Mt(e.paddingXS)}`,bdi:{unicodeBidi:"plaintext"}},[`${t}-dot`]:{zIndex:e.indicatorZIndex,width:c,minWidth:c,height:c,background:e.badgeColor,borderRadius:"100%",boxShadow:`0 0 0 ${Mt(o)} ${e.badgeShadowColor}`},[`${t}-dot${g}`]:{transition:`background ${i}`},[`${t}-count, ${t}-dot, ${g}-custom-component`]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",[`&${n}-spin`]:{animationName:Mw,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&${t}-status`]:{lineHeight:"inherit",verticalAlign:"baseline",[`${t}-status-dot`]:{position:"relative",top:-1,display:"inline-block",width:s,height:s,verticalAlign:"middle",borderRadius:"50%"},[`${t}-status-success`]:{backgroundColor:e.colorSuccess},[`${t}-status-processing`]:{overflow:"visible",color:e.colorPrimary,backgroundColor:e.colorPrimary,"&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:o,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:Sw,animationDuration:e.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},[`${t}-status-default`]:{backgroundColor:e.colorTextPlaceholder},[`${t}-status-error`]:{backgroundColor:e.colorError},[`${t}-status-warning`]:{backgroundColor:e.colorWarning},[`${t}-status-text`]:{marginInlineStart:p,color:e.colorText,fontSize:e.fontSize}}}),m),{[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:Ew,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`${t}-zoom-leave`]:{animationName:Cw,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`&${t}-not-a-wrapper`]:{[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:kw,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`${t}-zoom-leave`]:{animationName:Ow,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`&:not(${t}-status)`]:{verticalAlign:"middle"},[`${g}-custom-component, ${t}-count`]:{transform:"none"},[`${g}-custom-component, ${g}`]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[`${g}`]:{overflow:"hidden",[`${g}-only`]:{position:"relative",display:"inline-block",height:d,transition:`all ${e.motionDurationSlow} ${e.motionEaseOutBack}`,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",[`> p${g}-only-unit`]:{height:d,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},[`${g}-symbol`]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",[`${t}-count, ${t}-dot, ${g}-custom-component`]:{transform:"translate(-50%, -50%)"}}})}})(Iw(e))),$w),Pw=ni(["Badge","Ribbon"],(e=>(e=>{const{antCls:t,badgeFontHeight:n,marginXS:r,badgeRibbonOffset:o,calc:i}=e,a=`${t}-ribbon`,l=`${t}-ribbon-wrapper`,s=Gx(e,((e,t)=>{let{darkColor:n}=t;return{[`&${a}-color-${e}`]:{background:n,color:n}}}));return{[`${l}`]:{position:"relative"},[`${a}`]:Object.assign(Object.assign(Object.assign(Object.assign({},xr(e)),{position:"absolute",top:r,padding:`0 ${Mt(e.paddingXS)}`,color:e.colorPrimary,lineHeight:Mt(n),whiteSpace:"nowrap",backgroundColor:e.colorPrimary,borderRadius:e.borderRadiusSM,[`${a}-text`]:{color:e.colorTextLightSolid},[`${a}-corner`]:{position:"absolute",top:"100%",width:o,height:o,color:"currentcolor",border:`${Mt(i(o).div(2).equal())} solid`,transform:e.badgeRibbonCornerTransform,transformOrigin:"top",filter:e.badgeRibbonCornerFilter}}),s),{[`&${a}-placement-end`]:{insetInlineEnd:i(o).mul(-1).equal(),borderEndEndRadius:0,[`${a}-corner`]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},[`&${a}-placement-start`]:{insetInlineStart:i(o).mul(-1).equal(),borderEndStartRadius:0,[`${a}-corner`]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}})(Iw(e))),$w);function Aw(e){let t,{prefixCls:n,value:o,current:i,offset:l=0}=e;return l&&(t={position:"absolute",top:`${l}00%`,left:0}),r.createElement("span",{style:t,className:a()(`${n}-only-unit`,{current:i})},o)}function Nw(e,t,n){let r=e,o=0;for(;(r+10)%10!==t;)r+=n,o+=n;return o}function Tw(e){const{prefixCls:t,count:n,value:o}=e,i=Number(o),a=Math.abs(n),[l,s]=r.useState(i),[c,u]=r.useState(a),d=()=>{s(i),u(a)};let f,p;if(r.useEffect((()=>{const e=setTimeout((()=>{d()}),1e3);return()=>{clearTimeout(e)}}),[i]),l===i||Number.isNaN(i)||Number.isNaN(l))f=[r.createElement(Aw,Object.assign({},e,{key:i,current:!0}))],p={transition:"none"};else{f=[];const t=i+10,n=[];for(let e=i;e<=t;e+=1)n.push(e);const o=n.findIndex((e=>e%10===l));f=n.map(((t,n)=>{const i=t%10;return r.createElement(Aw,Object.assign({},e,{key:t,value:i,offset:n-o,current:n===o}))})),p={transform:`translateY(${-Nw(l,i,c{const{prefixCls:n,count:o,className:i,motionClassName:l,style:s,title:c,show:u,component:d="sup",children:f}=e,p=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);or.createElement(Tw,{prefixCls:g,count:Number(o),value:t,key:e.length-n}))))}return s&&s.borderColor&&(m.style=Object.assign(Object.assign({},s),{boxShadow:`0 0 0 1px ${s.borderColor} inset`})),f?Il(f,(e=>({className:a()(`${g}-custom-component`,null==e?void 0:e.className,l)}))):r.createElement(d,Object.assign({},m,{ref:t}),v)})),Lw=Rw;const Dw=(e,t)=>{var n,o,i,l,s;const{prefixCls:c,scrollNumberPrefixCls:u,children:d,status:f,text:p,color:h,count:g=null,overflowCount:m=99,dot:v=!1,size:y="default",title:b,offset:x,style:w,className:S,rootClassName:E,classNames:C,styles:k,showZero:O=!1}=e,M=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);om?`${m}+`:g,R="0"===T||0===T,L=(null!=f||null!=h)&&(null===g||R&&!O),D=v&&!R,j=D?"":T,F=(0,r.useMemo)((()=>(null==j||""===j||R&&!O)&&!D),[j,R,O,D]),B=(0,r.useRef)(g);F||(B.current=g);const z=B.current,H=(0,r.useRef)(j);F||(H.current=j);const U=H.current,W=(0,r.useRef)(D);F||(W.current=D);const V=(0,r.useMemo)((()=>{if(!x)return Object.assign(Object.assign({},null==_?void 0:_.style),w);const e={marginTop:x[1]};return"rtl"===$?e.left=parseInt(x[0],10):e.right=-parseInt(x[0],10),Object.assign(Object.assign(Object.assign({},e),null==_?void 0:_.style),w)}),[$,x,w,null==_?void 0:_.style]),X=null!=b?b:"string"==typeof z||"number"==typeof z?z:void 0,q=F||!p?null:r.createElement("span",{className:`${P}-status-text`},p),G=z&&"object"==typeof z?Il(z,(e=>({style:Object.assign(Object.assign({},V),e.style)}))):void 0,Y=ew(h,!1),K=a()(null==C?void 0:C.indicator,null===(n=null==_?void 0:_.classNames)||void 0===n?void 0:n.indicator,{[`${P}-status-dot`]:L,[`${P}-status-${f}`]:!!f,[`${P}-color-${h}`]:Y}),Z={};h&&!Y&&(Z.color=h,Z.background=h);const J=a()(P,{[`${P}-status`]:L,[`${P}-not-a-wrapper`]:!d,[`${P}-rtl`]:"rtl"===$},S,E,null==_?void 0:_.className,null===(o=null==_?void 0:_.classNames)||void 0===o?void 0:o.root,null==C?void 0:C.root,N);if(!d&&L){const e=V.color;return A(r.createElement("span",Object.assign({},M,{className:J,style:Object.assign(Object.assign(Object.assign({},null==k?void 0:k.root),null===(i=null==_?void 0:_.styles)||void 0===i?void 0:i.root),V)}),r.createElement("span",{className:K,style:Object.assign(Object.assign(Object.assign({},null==k?void 0:k.indicator),null===(l=null==_?void 0:_.styles)||void 0===l?void 0:l.indicator),Z)}),p&&r.createElement("span",{style:{color:e},className:`${P}-status-text`},p)))}return A(r.createElement("span",Object.assign({ref:t},M,{className:J,style:Object.assign(Object.assign({},null===(s=null==_?void 0:_.styles)||void 0===s?void 0:s.root),null==k?void 0:k.root)}),d,r.createElement(bl,{visible:!F,motionName:`${P}-zoom`,motionAppear:!1,motionDeadline:1e3},(e=>{let{className:t,ref:n}=e;var o,i;const l=I("scroll-number",u),s=W.current,c=a()(null==C?void 0:C.indicator,null===(o=null==_?void 0:_.classNames)||void 0===o?void 0:o.indicator,{[`${P}-dot`]:s,[`${P}-count`]:!s,[`${P}-count-sm`]:"small"===y,[`${P}-multiple-words`]:!s&&U&&U.toString().length>1,[`${P}-status-${f}`]:!!f,[`${P}-color-${h}`]:Y});let d=Object.assign(Object.assign(Object.assign({},null==k?void 0:k.indicator),null===(i=null==_?void 0:_.styles)||void 0===i?void 0:i.indicator),V);return h&&!Y&&(d=d||{},d.background=h),r.createElement(Lw,{prefixCls:l,show:!F,motionClassName:t,className:c,count:U,title:X,style:d,key:"scrollNumber",ref:n},G)})),q))},jw=r.forwardRef(Dw);jw.Ribbon=e=>{const{className:t,prefixCls:n,style:o,color:i,children:l,text:s,placement:c="end",rootClassName:u}=e,{getPrefixCls:d,direction:f}=r.useContext(Ce),p=d("ribbon",n),[h,g]=Pw(p),m=ew(i,!1),v=a()(p,`${p}-placement-${c}`,{[`${p}-rtl`]:"rtl"===f,[`${p}-color-${i}`]:m},t),y={},b={};return i&&!m&&(y.background=i,b.color=i),h(r.createElement("div",{className:a()(`${p}-wrapper`,u,g)},l,r.createElement("div",{className:a()(v,g),style:Object.assign(Object.assign({},y),o)},r.createElement("span",{className:`${p}-text`},s),r.createElement("div",{className:`${p}-corner`,style:b}))))};const Fw=jw,Bw={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"};var zw=function(e,t){return r.createElement(Xi,hi({},e,{ref:t,icon:Bw}))};const Hw=r.forwardRef(zw);var Uw=ds.ESC,Ww=ds.TAB;const Vw=(0,r.forwardRef)((function(e,t){var n=e.overlay,o=e.arrow,i=e.prefixCls,a=(0,r.useMemo)((function(){return"function"==typeof n?n():n}),[n]),l=da(t,null==a?void 0:a.ref);return r.createElement(r.Fragment,null,o&&r.createElement("div",{className:"".concat(i,"-arrow")}),r.cloneElement(a,{ref:pa(a)?l:void 0}))}));var Xw={adjustX:1,adjustY:1},qw=[0,0];const Gw={topLeft:{points:["bl","tl"],overflow:Xw,offset:[0,-4],targetOffset:qw},top:{points:["bc","tc"],overflow:Xw,offset:[0,-4],targetOffset:qw},topRight:{points:["br","tr"],overflow:Xw,offset:[0,-4],targetOffset:qw},bottomLeft:{points:["tl","bl"],overflow:Xw,offset:[0,4],targetOffset:qw},bottom:{points:["tc","bc"],overflow:Xw,offset:[0,4],targetOffset:qw},bottomRight:{points:["tr","br"],overflow:Xw,offset:[0,4],targetOffset:qw}};var Yw=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function Kw(e,t){var n,o=e.arrow,i=void 0!==o&&o,l=e.prefixCls,s=void 0===l?"rc-dropdown":l,c=e.transitionName,u=e.animation,d=e.align,f=e.placement,p=void 0===f?"bottomLeft":f,h=e.placements,g=void 0===h?Gw:h,m=e.getPopupContainer,v=e.showAction,y=e.hideAction,b=e.overlayClassName,x=e.overlayStyle,w=e.visible,S=e.trigger,E=void 0===S?["hover"]:S,C=e.autoFocus,k=e.overlay,O=e.children,M=e.onVisibleChange,I=ha(e,Yw),$=Ne(r.useState(),2),_=$[0],P=$[1],A="visible"in e?w:_,N=r.useRef(null),T=r.useRef(null),R=r.useRef(null);r.useImperativeHandle(t,(function(){return N.current}));var L=function(e){P(e),null==M||M(e)};!function(e){var t=e.visible,n=e.triggerRef,o=e.onVisibleChange,i=e.autoFocus,a=e.overlayRef,l=r.useRef(!1),s=function(){var e,r;t&&(null===(e=n.current)||void 0===e||null===(r=e.focus)||void 0===r||r.call(e),null==o||o(!1))},c=function(){var e;return!(null===(e=a.current)||void 0===e||!e.focus||(a.current.focus(),l.current=!0,0))},u=function(e){switch(e.keyCode){case Uw:s();break;case Ww:var t=!1;l.current||(t=c()),t?e.preventDefault():s()}};r.useEffect((function(){return t?(window.addEventListener("keydown",u),i&&ol(c,3),function(){window.removeEventListener("keydown",u),l.current=!1}):function(){l.current=!1}}),[t])}({visible:A,triggerRef:R,onVisibleChange:L,autoFocus:C,overlayRef:T});var D,j,F,B=function(){return r.createElement(Vw,{ref:T,overlay:k,prefixCls:s,arrow:i})},z=r.cloneElement(O,{className:a()(null===(n=O.props)||void 0===n?void 0:n.className,A&&(D=e.openClassName,void 0!==D?D:"".concat(s,"-open"))),ref:pa(O)?da(R,O.ref):void 0}),H=y;return H||-1===E.indexOf("contextMenu")||(H=["click"]),r.createElement(ly,Xt({builtinPlacements:g},I,{prefixCls:s,ref:N,popupClassName:a()(b,Ie({},"".concat(s,"-show-arrow"),i)),popupStyle:x,action:E,showAction:v,hideAction:H,popupPlacement:p,popupAlign:d,popupTransitionName:c,popupAnimation:u,popupVisible:A,stretch:(j=e.minOverlayWidthMatchTrigger,F=e.alignPoint,("minOverlayWidthMatchTrigger"in e?j:!F)?"minWidth":""),popup:"function"==typeof k?B:B(),onPopupVisibleChange:L,onPopupClick:function(t){var n=e.onOverlayClick;P(!1),n&&n(t)},getPopupContainer:m}),z)}const Zw=r.forwardRef(Kw);var Jw=r.createContext(null);function Qw(e,t){return void 0===e?null:"".concat(e,"-").concat(t)}function eS(e){return Qw(r.useContext(Jw),e)}var tS=["children","locked"],nS=r.createContext(null);function rS(e){var t=e.children,n=e.locked,o=ha(e,tS),i=r.useContext(nS),a=ca((function(){return e=o,t=De({},i),Object.keys(e).forEach((function(n){var r=e[n];void 0!==r&&(t[n]=r)})),t;var e,t}),[i,o],(function(e,t){return!(n||e[0]===t[0]&&kf(e[1],t[1],!0))}));return r.createElement(nS.Provider,{value:a},t)}var oS=[],iS=r.createContext(null);function aS(){return r.useContext(iS)}var lS=r.createContext(oS);function sS(e){var t=r.useContext(lS);return r.useMemo((function(){return void 0!==e?[].concat(Re(t),[e]):t}),[t,e])}var cS=r.createContext(null);const uS=r.createContext({}),dS=function(e){if(!e)return!1;if(e instanceof Element){if(e.offsetParent)return!0;if(e.getBBox){var t=e.getBBox(),n=t.width,r=t.height;if(n||r)return!0}if(e.getBoundingClientRect){var o=e.getBoundingClientRect(),i=o.width,a=o.height;if(i||a)return!0}}return!1};function fS(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(dS(e)){var n=e.nodeName.toLowerCase(),r=["input","select","textarea","button"].includes(n)||e.isContentEditable||"a"===n&&!!e.getAttribute("href"),o=e.getAttribute("tabindex"),i=Number(o),a=null;return o&&!Number.isNaN(i)?a=i:r&&null===a&&(a=0),r&&e.disabled&&(a=null),null!==a&&(a>=0||t&&a<0)}return!1}var pS=ds.LEFT,hS=ds.RIGHT,gS=ds.UP,mS=ds.DOWN,vS=ds.ENTER,yS=ds.ESC,bS=ds.HOME,xS=ds.END,wS=[gS,mS,pS,hS];function SS(e,t){return function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=Re(e.querySelectorAll("*")).filter((function(e){return fS(e,t)}));return fS(e,t)&&n.unshift(e),n}(e,!0).filter((function(e){return t.has(e)}))}function ES(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;if(!e)return null;var o=SS(e,t),i=o.length,a=o.findIndex((function(e){return n===e}));return r<0?-1===a?a=i-1:a-=1:r>0&&(a+=1),o[a=(a+i)%i]}var CS=function(e,t){var n=new Set,r=new Map,o=new Map;return e.forEach((function(e){var i=document.querySelector("[data-menu-id='".concat(Qw(t,e),"']"));i&&(n.add(i),o.set(i,e),r.set(e,i))})),{elements:n,key2element:r,element2key:o}};var kS="__RC_UTIL_PATH_SPLIT__",OS=function(e){return e.join(kS)},MS="rc-menu-more";function IS(e){var t=r.useRef(e);t.current=e;var n=r.useCallback((function(){for(var e,n=arguments.length,r=new Array(n),o=0;o1&&(y.motionAppear=!1);var b=y.onVisibleChanged;return y.onVisibleChanged=function(e){return p.current||e||m(!0),null==b?void 0:b(e)},g?null:r.createElement(rS,{mode:a,locked:!p.current},r.createElement(bl,Xt({visible:v},y,{forceRender:c,removeOnLeave:!1,leavedClassName:"".concat(s,"-hidden")}),(function(e){var n=e.className,o=e.style;return r.createElement(XS,{id:t,className:n,style:o},i)})))}var tE=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],nE=["active"],rE=function(e){var t,n=e.style,o=e.className,i=e.title,l=e.eventKey,s=(e.warnKey,e.disabled),c=e.internalPopupClose,u=e.children,d=e.itemIcon,f=e.expandIcon,p=e.popupClassName,h=e.popupOffset,g=e.popupStyle,m=e.onClick,v=e.onMouseEnter,y=e.onMouseLeave,b=e.onTitleClick,x=e.onTitleMouseEnter,w=e.onTitleMouseLeave,S=ha(e,tE),E=eS(l),C=r.useContext(nS),k=C.prefixCls,O=C.mode,M=C.openKeys,I=C.disabled,$=C.overflowDisabled,_=C.activeKey,P=C.selectedKeys,A=C.itemIcon,N=C.expandIcon,T=C.onItemClick,R=C.onOpenChange,L=C.onActive,D=r.useContext(uS)._internalRenderSubMenuItem,j=r.useContext(cS).isSubPathKey,F=sS(),B="".concat(k,"-submenu"),z=I||s,H=r.useRef(),U=r.useRef(),W=null!=d?d:A,V=null!=f?f:N,X=M.includes(l),q=!$&&X,G=j(P,l),Y=PS(l,z,x,w),K=Y.active,Z=ha(Y,nE),J=Ne(r.useState(!1),2),Q=J[0],ee=J[1],te=function(e){z||ee(e)},ne=r.useMemo((function(){return K||"inline"!==O&&(Q||j([_],l))}),[O,K,_,Q,l,j]),re=AS(F.length),oe=IS((function(e){null==m||m(RS(e)),T(e)})),ie=E&&"".concat(E,"-popup"),ae=r.createElement("div",Xt({role:"menuitem",style:re,className:"".concat(B,"-title"),tabIndex:z?null:-1,ref:H,title:"string"==typeof i?i:null,"data-menu-id":$&&E?null:E,"aria-expanded":q,"aria-haspopup":!0,"aria-controls":ie,"aria-disabled":z,onClick:function(e){z||(null==b||b({key:l,domEvent:e}),"inline"===O&&R(l,!X))},onFocus:function(){L(l)}},Z),i,r.createElement(NS,{icon:"horizontal"!==O?V:void 0,props:De(De({},e),{},{isOpen:q,isSubMenu:!0})},r.createElement("i",{className:"".concat(B,"-arrow")}))),le=r.useRef(O);if("inline"!==O&&F.length>1?le.current="vertical":le.current=O,!$){var se=le.current;ae=r.createElement(QS,{mode:se,prefixCls:B,visible:!c&&q&&"inline"!==O,popupClassName:p,popupOffset:h,popupStyle:g,popup:r.createElement(rS,{mode:"horizontal"===se?"vertical":se},r.createElement(XS,{id:ie,ref:U},u)),disabled:z,onVisibleChange:function(e){"inline"!==O&&R(l,e)}},ae)}var ce=r.createElement(mm.Item,Xt({role:"none"},S,{component:"li",style:n,className:a()(B,"".concat(B,"-").concat(O),o,(t={},Ie(t,"".concat(B,"-open"),q),Ie(t,"".concat(B,"-active"),ne),Ie(t,"".concat(B,"-selected"),G),Ie(t,"".concat(B,"-disabled"),z),t)),onMouseEnter:function(e){te(!0),null==v||v({key:l,domEvent:e})},onMouseLeave:function(e){te(!1),null==y||y({key:l,domEvent:e})}}),ae,!$&&r.createElement(eE,{id:ie,open:q,keyPath:F},u));return D&&(ce=D(ce,e,{selected:G,active:ne,open:q,disabled:z})),r.createElement(rS,{onItemClick:oe,mode:"horizontal"===O?"vertical":O,itemIcon:W,expandIcon:V},ce)};function oE(e){var t,n=e.eventKey,o=e.children,i=sS(n),a=qS(o,i),l=aS();return r.useEffect((function(){if(l)return l.registerPath(n,i),function(){l.unregisterPath(n,i)}}),[i]),t=l?a:r.createElement(rE,e,a),r.createElement(lS.Provider,{value:i},t)}var iE=["className","title","eventKey","children"],aE=["children"],lE=function(e){var t=e.className,n=e.title,o=(e.eventKey,e.children),i=ha(e,iE),l=r.useContext(nS).prefixCls,s="".concat(l,"-item-group");return r.createElement("li",Xt({role:"presentation"},i,{onClick:function(e){return e.stopPropagation()},className:a()(s,t)}),r.createElement("div",{role:"presentation",className:"".concat(s,"-title"),title:"string"==typeof n?n:void 0},n),r.createElement("ul",{role:"group",className:"".concat(s,"-list")},o))};function sE(e){var t=e.children,n=ha(e,aE),o=qS(t,sS(n.eventKey));return aS()?o:r.createElement(lE,Cy(n,["warnKey"]),o)}function cE(e){var t=e.className,n=e.style,o=r.useContext(nS).prefixCls;return aS()?null:r.createElement("li",{role:"separator",className:a()("".concat(o,"-item-divider"),t),style:n})}var uE=["label","children","key","type"];function dE(e){return(e||[]).map((function(e,t){if(e&&"object"===Oe(e)){var n=e,o=n.label,i=n.children,a=n.key,l=n.type,s=ha(n,uE),c=null!=a?a:"tmp-".concat(t);return i||"group"===l?"group"===l?r.createElement(sE,Xt({key:c},s,{title:o}),dE(i)):r.createElement(oE,Xt({key:c},s,{title:o}),dE(i)):"divider"===l?r.createElement(cE,Xt({key:c},s)):r.createElement(HS,Xt({key:c},s),o)}return null})).filter((function(e){return e}))}function fE(e,t,n){var r=e;return t&&(r=dE(t)),qS(r,n)}var pE=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem"],hE=[],gE=r.forwardRef((function(e,t){var n,o,i=e,l=i.prefixCls,s=void 0===l?"rc-menu":l,c=i.rootClassName,u=i.style,d=i.className,f=i.tabIndex,p=void 0===f?0:f,h=i.items,g=i.children,m=i.direction,v=i.id,y=i.mode,b=void 0===y?"vertical":y,x=i.inlineCollapsed,S=i.disabled,E=i.disabledOverflow,C=i.subMenuOpenDelay,k=void 0===C?.1:C,O=i.subMenuCloseDelay,M=void 0===O?.1:O,I=i.forceSubMenuRender,$=i.defaultOpenKeys,_=i.openKeys,P=i.activeKey,A=i.defaultActiveFirst,N=i.selectable,T=void 0===N||N,R=i.multiple,L=void 0!==R&&R,D=i.defaultSelectedKeys,j=i.selectedKeys,F=i.onSelect,B=i.onDeselect,z=i.inlineIndent,H=void 0===z?24:z,U=i.motion,W=i.defaultMotions,V=i.triggerSubMenuAction,X=void 0===V?"hover":V,q=i.builtinPlacements,G=i.itemIcon,Y=i.expandIcon,K=i.overflowedIndicator,Z=void 0===K?"...":K,J=i.overflowedIndicatorPopupClassName,Q=i.getPopupContainer,ee=i.onClick,te=i.onOpenChange,ne=i.onKeyDown,re=(i.openAnimation,i.openTransitionName,i._internalRenderMenuItem),oe=i._internalRenderSubMenuItem,ie=ha(i,pE),ae=r.useMemo((function(){return fE(g,h,hE)}),[g,h]),le=Ne(r.useState(!1),2),se=le[0],ce=le[1],ue=r.useRef(),de=function(e){var t=Ne(Dg(e,{value:e}),2),n=t[0],o=t[1];return r.useEffect((function(){_S+=1;var e="".concat($S,"-").concat(_S);o("rc-menu-uuid-".concat(e))}),[]),n}(v),fe="rtl"===m,pe=Dg($,{value:_,postState:function(e){return e||hE}}),he=Ne(pe,2),ge=he[0],me=he[1],ve=function(e){function t(){me(e),null==te||te(e)}arguments.length>1&&void 0!==arguments[1]&&arguments[1]?(0,w.flushSync)(t):t()},ye=Ne(r.useState(ge),2),be=ye[0],xe=ye[1],we=r.useRef(!1),Se=Ne(r.useMemo((function(){return"inline"!==b&&"vertical"!==b||!x?[b,!1]:["vertical",x]}),[b,x]),2),Ee=Se[0],Ce=Se[1],ke="inline"===Ee,Oe=Ne(r.useState(Ee),2),Me=Oe[0],$e=Oe[1],_e=Ne(r.useState(Ce),2),Pe=_e[0],Ae=_e[1];r.useEffect((function(){$e(Ee),Ae(Ce),we.current&&(ke?me(be):ve(hE))}),[Ee,Ce]);var Te=Ne(r.useState(0),2),Le=Te[0],je=Te[1],Fe=Le>=ae.length-1||"horizontal"!==Me||E;r.useEffect((function(){ke&&xe(ge)}),[ge]),r.useEffect((function(){return we.current=!0,function(){we.current=!1}}),[]);var Be=function(){var e=Ne(r.useState({}),2)[1],t=(0,r.useRef)(new Map),n=(0,r.useRef)(new Map),o=Ne(r.useState([]),2),i=o[0],a=o[1],l=(0,r.useRef)(0),s=(0,r.useRef)(!1),c=(0,r.useCallback)((function(r,o){var i=OS(o);n.current.set(i,r),t.current.set(r,i),l.current+=1;var a,c=l.current;a=function(){c===l.current&&(s.current||e({}))},Promise.resolve().then(a)}),[]),u=(0,r.useCallback)((function(e,r){var o=OS(r);n.current.delete(o),t.current.delete(e)}),[]),d=(0,r.useCallback)((function(e){a(e)}),[]),f=(0,r.useCallback)((function(e,n){var r=(t.current.get(e)||"").split(kS);return n&&i.includes(r[0])&&r.unshift(MS),r}),[i]),p=(0,r.useCallback)((function(e,t){return e.some((function(e){return f(e,!0).includes(t)}))}),[f]),h=(0,r.useCallback)((function(e){var r="".concat(t.current.get(e)).concat(kS),o=new Set;return Re(n.current.keys()).forEach((function(e){e.startsWith(r)&&o.add(n.current.get(e))})),o}),[]);return r.useEffect((function(){return function(){s.current=!0}}),[]),{registerPath:c,unregisterPath:u,refreshOverflowKeys:d,isSubPathKey:p,getKeyPath:f,getKeys:function(){var e=Re(t.current.keys());return i.length&&e.push(MS),e},getSubPathKeys:h}}(),ze=Be.registerPath,He=Be.unregisterPath,Ue=Be.refreshOverflowKeys,We=Be.isSubPathKey,Ve=Be.getKeyPath,Xe=Be.getKeys,qe=Be.getSubPathKeys,Ge=r.useMemo((function(){return{registerPath:ze,unregisterPath:He}}),[ze,He]),Ye=r.useMemo((function(){return{isSubPathKey:We}}),[We]);r.useEffect((function(){Ue(Fe?hE:ae.slice(Le+1).map((function(e){return e.key})))}),[Le,Fe]);var Ke=Ne(Dg(P||A&&(null===(n=ae[0])||void 0===n?void 0:n.key),{value:P}),2),Ze=Ke[0],Je=Ke[1],Qe=IS((function(e){Je(e)})),et=IS((function(){Je(void 0)}));(0,r.useImperativeHandle)(t,(function(){return{list:ue.current,focus:function(e){var t,n,r=Xe(),o=CS(r,de),i=o.elements,a=o.key2element,l=o.element2key,s=SS(ue.current,i),c=null!=Ze?Ze:s[0]?l.get(s[0]):null===(t=ae.find((function(e){return!e.props.disabled})))||void 0===t?void 0:t.key,u=a.get(c);c&&u&&(null==u||null===(n=u.focus)||void 0===n||n.call(u,e))}}}));var tt=Dg(D||[],{value:j,postState:function(e){return Array.isArray(e)?e:null==e?hE:[e]}}),nt=Ne(tt,2),rt=nt[0],ot=nt[1],it=IS((function(e){null==ee||ee(RS(e)),function(e){if(T){var t,n=e.key,r=rt.includes(n);t=L?r?rt.filter((function(e){return e!==n})):[].concat(Re(rt),[n]):[n],ot(t);var o=De(De({},e),{},{selectedKeys:t});r?null==B||B(o):null==F||F(o)}!L&&ge.length&&"inline"!==Me&&ve(hE)}(e)})),at=IS((function(e,t){var n=ge.filter((function(t){return t!==e}));if(t)n.push(e);else if("inline"!==Me){var r=qe(e);n=n.filter((function(e){return!r.has(e)}))}kf(ge,n,!0)||ve(n,!0)})),lt=function(e,t,n,o,i,a,l,s,c,u){var d=r.useRef(),f=r.useRef();f.current=t;var p=function(){ol.cancel(d.current)};return r.useEffect((function(){return function(){p()}}),[]),function(r){var h=r.which;if([].concat(wS,[vS,yS,bS,xS]).includes(h)){var g=a(),m=CS(g,o),v=m,y=v.elements,b=v.key2element,x=v.element2key,w=function(e,t){for(var n=e||document.activeElement;n;){if(t.has(n))return n;n=n.parentElement}return null}(b.get(t),y),S=x.get(w),E=function(e,t,n,r){var o,i,a,l,s="prev",c="next",u="children",d="parent";if("inline"===e&&r===vS)return{inlineTrigger:!0};var f=(Ie(o={},gS,s),Ie(o,mS,c),o),p=(Ie(i={},pS,n?c:s),Ie(i,hS,n?s:c),Ie(i,mS,u),Ie(i,vS,u),i),h=(Ie(a={},gS,s),Ie(a,mS,c),Ie(a,vS,u),Ie(a,yS,d),Ie(a,pS,n?u:d),Ie(a,hS,n?d:u),a);switch(null===(l={inline:f,horizontal:p,vertical:h,inlineSub:f,horizontalSub:h,verticalSub:h}["".concat(e).concat(t?"":"Sub")])||void 0===l?void 0:l[r]){case s:return{offset:-1,sibling:!0};case c:return{offset:1,sibling:!0};case d:return{offset:-1,sibling:!1};case u:return{offset:1,sibling:!1};default:return null}}(e,1===l(S,!0).length,n,h);if(!E&&h!==bS&&h!==xS)return;(wS.includes(h)||[bS,xS].includes(h))&&r.preventDefault();var C=function(e){if(e){var t=e,n=e.querySelector("a");null!=n&&n.getAttribute("href")&&(t=n);var r=x.get(e);s(r),p(),d.current=ol((function(){f.current===r&&t.focus()}))}};if([bS,xS].includes(h)||E.sibling||!w){var k,O,M=SS(k=w&&"inline"!==e?function(e){for(var t=e;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement}return null}(w):i.current,y);O=h===bS?M[0]:h===xS?M[M.length-1]:ES(k,y,w,E.offset),C(O)}else if(E.inlineTrigger)c(S);else if(E.offset>0)c(S,!0),p(),d.current=ol((function(){m=CS(g,o);var e=w.getAttribute("aria-controls"),t=ES(document.getElementById(e),m.elements);C(t)}),5);else if(E.offset<0){var I=l(S,!0),$=I[I.length-2],_=b.get($);c($,!1),C(_)}}null==u||u(r)}}(Me,Ze,fe,de,ue,Xe,Ve,Je,(function(e,t){var n=null!=t?t:!ge.includes(e);at(e,n)}),ne);r.useEffect((function(){ce(!0)}),[]);var st=r.useMemo((function(){return{_internalRenderMenuItem:re,_internalRenderSubMenuItem:oe}}),[re,oe]),ct="horizontal"!==Me||E?ae:ae.map((function(e,t){return r.createElement(rS,{key:e.key,overflowDisabled:t>Le},e)})),ut=r.createElement(mm,Xt({id:v,ref:ue,prefixCls:"".concat(s,"-overflow"),component:"ul",itemComponent:HS,className:a()(s,"".concat(s,"-root"),"".concat(s,"-").concat(Me),d,(o={},Ie(o,"".concat(s,"-inline-collapsed"),Pe),Ie(o,"".concat(s,"-rtl"),fe),o),c),dir:m,style:u,role:"menu",tabIndex:p,data:ct,renderRawItem:function(e){return e},renderRawRest:function(e){var t=e.length,n=t?ae.slice(-t):null;return r.createElement(oE,{eventKey:MS,title:Z,disabled:Fe,internalPopupClose:0===t,popupClassName:J},n)},maxCount:"horizontal"!==Me||E?mm.INVALIDATE:mm.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(e){je(e)},onKeyDown:lt},ie));return r.createElement(uS.Provider,{value:st},r.createElement(Jw.Provider,{value:de},r.createElement(rS,{prefixCls:s,rootClassName:c,mode:Me,openKeys:ge,rtl:fe,disabled:S,motion:se?U:null,defaultMotions:se?W:null,activeKey:Ze,onActive:Qe,onInactive:et,selectedKeys:rt,inlineIndent:H,subMenuOpenDelay:k,subMenuCloseDelay:M,forceSubMenuRender:I,builtinPlacements:q,triggerSubMenuAction:X,getPopupContainer:Q,itemIcon:G,expandIcon:Y,onItemClick:it,onOpenChange:at},r.createElement(cS.Provider,{value:Ye},ut),r.createElement("div",{style:{display:"none"},"aria-hidden":!0},r.createElement(iS.Provider,{value:Ge},ae)))))})),mE=gE;mE.Item=HS,mE.SubMenu=oE,mE.ItemGroup=sE,mE.Divider=cE;const vE=mE,yE={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"};var bE=function(e,t){return r.createElement(Xi,hi({},e,{ref:t,icon:yE}))};const xE=r.forwardRef(bE),wE={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"};var SE=function(e,t){return r.createElement(Xi,hi({},e,{ref:t,icon:wE}))};const EE=r.forwardRef(SE),CE=r.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}});const kE={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},OE=r.createContext({}),ME=(()=>{let e=0;return function(){return e+=1,`${arguments.length>0&&void 0!==arguments[0]?arguments[0]:""}${e}`}})(),IE=r.forwardRef(((e,t)=>{const{prefixCls:n,className:o,trigger:i,children:l,defaultCollapsed:s=!1,theme:c="dark",style:u={},collapsible:d=!1,reverseArrow:f=!1,width:p=200,collapsedWidth:h=80,zeroWidthTriggerStyle:g,breakpoint:m,onCollapse:v,onBreakpoint:y}=e,b=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o{"collapsed"in e&&S(e.collapsed)}),[e.collapsed]);const k=(t,n)=>{"collapsed"in e||S(t),null==v||v(t,n)},O=(0,r.useRef)();O.current=e=>{C(e.matches),null==y||y(e.matches),w!==e.matches&&k(e.matches,"responsive")},(0,r.useEffect)((()=>{function e(e){return O.current(e)}let t;if("undefined"!=typeof window){const{matchMedia:n}=window;if(n&&m&&m in kE){t=n(`(max-width: ${kE[m]})`);try{t.addEventListener("change",e)}catch(n){t.addListener(e)}e(t)}}return()=>{try{null==t||t.removeEventListener("change",e)}catch(n){null==t||t.removeListener(e)}}}),[m]),(0,r.useEffect)((()=>{const e=ME("ant-sider-");return x.addSider(e),()=>x.removeSider(e)}),[]);const M=()=>{k(!w,"clickTrigger")},{getPrefixCls:I}=(0,r.useContext)(Ce),$=r.useMemo((()=>({siderCollapsed:w})),[w]);return r.createElement(OE.Provider,{value:$},(()=>{const e=I("layout-sider",n),s=fe(b,["collapsed"]),m=w?h:p,v=(O=m,!isNaN(parseFloat(O))&&isFinite(O)?`${m}px`:String(m)),y=0===parseFloat(String(h||0))?r.createElement("span",{onClick:M,className:a()(`${e}-zero-width-trigger`,`${e}-zero-width-trigger-${f?"right":"left"}`),style:g},i||r.createElement(xE,null)):null,x={expanded:f?r.createElement(Hw,null):r.createElement(EE,null),collapsed:f?r.createElement(EE,null):r.createElement(Hw,null)}[w?"collapsed":"expanded"],S=null!==i?y||r.createElement("div",{className:`${e}-trigger`,onClick:M,style:{width:v}},i||x):null,C=Object.assign(Object.assign({},u),{flex:`0 0 ${v}`,maxWidth:v,minWidth:v,width:v}),k=a()(e,`${e}-${c}`,{[`${e}-collapsed`]:!!w,[`${e}-has-trigger`]:d&&null!==i&&!y,[`${e}-below`]:!!E,[`${e}-zero-width`]:0===parseFloat(v)},o);var O;return r.createElement("aside",Object.assign({className:k},s,{style:C,ref:t}),r.createElement("div",{className:`${e}-children`},l),d||E&&y?S:null)})())})),$E=IE;const _E=e=>{const{prefixCls:t,className:n,dashed:o}=e,i=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o{var t;const{className:n,children:o,icon:i,title:l,danger:s}=e,{prefixCls:u,firstLevel:d,direction:f,disableMenuItemTitleTooltip:p,inlineCollapsed:h}=r.useContext(PE),{siderCollapsed:g}=r.useContext(OE);let m=l;void 0===l?m=d?o:"":!1===l&&(m="");const v={title:m};g||h||(v.title=null,v.open=!1);const y=c(o).length;let b=r.createElement(HS,Object.assign({},fe(e,["title","icon","danger"]),{className:a()({[`${u}-item-danger`]:s,[`${u}-item-only-child`]:1===(i?y+1:y)},n),title:"string"==typeof l?l:void 0}),Il(i,{className:a()(kl(i)?null===(t=i.props)||void 0===t?void 0:t.className:"",`${u}-item-icon`)}),(e=>{const t=r.createElement("span",{className:`${u}-title-content`},o);return(!i||kl(o)&&"span"===o.type)&&o&&e&&d&&"string"==typeof o?r.createElement("div",{className:`${u}-inline-collapsed-noicon`},o.charAt(0)):t})(h));return p||(b=r.createElement(rw,Object.assign({},v,{placement:"rtl"===f?"left":"right",overlayClassName:`${u}-inline-collapsed-tooltip`}),b)),b},NE=e=>{var t;const{popupClassName:n,icon:o,title:i,theme:l}=e,s=r.useContext(PE),{prefixCls:c,inlineCollapsed:u,theme:d}=s,f=sS();let p;if(o){const e=kl(i)&&"span"===i.type;p=r.createElement(r.Fragment,null,Il(o,{className:a()(kl(o)?null===(t=o.props)||void 0===t?void 0:t.className:"",`${c}-item-icon`)}),e?i:r.createElement("span",{className:`${c}-title-content`},i))}else p=u&&!f.length&&i&&"string"==typeof i?r.createElement("div",{className:`${c}-inline-collapsed-noicon`},i.charAt(0)):r.createElement("span",{className:`${c}-title-content`},i);const h=r.useMemo((()=>Object.assign(Object.assign({},s),{firstLevel:!1})),[s]),[g]=Rs("Menu");return r.createElement(PE.Provider,{value:h},r.createElement(oE,Object.assign({},fe(e,["icon"]),{title:p,popupClassName:a()(c,n,`${c}-${l||d}`),popupStyle:{zIndex:g}})))},TE={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"};var RE=function(e,t){return r.createElement(Xi,hi({},e,{ref:t,icon:TE}))};const LE=r.forwardRef(RE);var DE=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o{if(e&&"object"==typeof e){const n=e,{label:o,children:i,key:a,type:l}=n,s=DE(n,["label","children","key","type"]),c=null!=a?a:`tmp-${t}`;return i||"group"===l?"group"===l?r.createElement(sE,Object.assign({key:c},s,{title:o}),jE(i)):r.createElement(NE,Object.assign({key:c},s,{title:o}),jE(i)):"divider"===l?r.createElement(_E,Object.assign({key:c},s)):r.createElement(AE,Object.assign({key:c},s),o)}return null})).filter((e=>e))}function FE(e){return r.useMemo((()=>e?jE(e):e),[e])}const BE=r.createContext(null),zE=r.forwardRef(((e,t)=>{const{children:n}=e,o=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);oObject.assign(Object.assign({},i),o)),[i,o.prefixCls,o.mode,o.selectable,o.rootClassName]),l=function(e){return!!(0,r.isValidElement)(e)&&!(0,s.isFragment)(e)&&I(e)}(n),c=M(t,l?n.ref:null);return r.createElement(BE.Provider,{value:a},r.createElement(vu,null,l?r.cloneElement(n,{ref:c}):n))})),HE=BE,UE=e=>({[e.componentCls]:{[`${e.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${e.motionDurationMid} ${e.motionEaseInOut},\n opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}},[`${e.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${e.motionDurationMid} ${e.motionEaseInOut},\n opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}}}),WE=e=>{const{componentCls:t,motionDurationSlow:n,horizontalLineHeight:r,colorSplit:o,lineWidth:i,lineType:a,itemPaddingInline:l}=e;return{[`${t}-horizontal`]:{lineHeight:r,border:0,borderBottom:`${Mt(i)} ${a} ${o}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${t}-item, ${t}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:l},[`> ${t}-item:hover,\n > ${t}-item-active,\n > ${t}-submenu ${t}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${t}-item, ${t}-submenu-title`]:{transition:[`border-color ${n}`,`background ${n}`].join(",")},[`${t}-submenu-arrow`]:{display:"none"}}}},VE=e=>{let{componentCls:t,menuArrowOffset:n,calc:r}=e;return{[`${t}-rtl`]:{direction:"rtl"},[`${t}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${t}-rtl${t}-vertical,\n ${t}-submenu-rtl ${t}-vertical`]:{[`${t}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${Mt(r(n).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${Mt(n)})`}}}}},XE=e=>Object.assign({},Er(e)),qE=(e,t)=>{const{componentCls:n,itemColor:r,itemSelectedColor:o,groupTitleColor:i,itemBg:a,subMenuItemBg:l,itemSelectedBg:s,activeBarHeight:c,activeBarWidth:u,activeBarBorderWidth:d,motionDurationSlow:f,motionEaseInOut:p,motionEaseOut:h,itemPaddingInline:g,motionDurationMid:m,itemHoverColor:v,lineType:y,colorSplit:b,itemDisabledColor:x,dangerItemColor:w,dangerItemHoverColor:S,dangerItemSelectedColor:E,dangerItemActiveBg:C,dangerItemSelectedBg:k,itemHoverBg:O,itemActiveBg:M,menuSubMenuBg:I,horizontalItemSelectedColor:$,horizontalItemSelectedBg:_,horizontalItemBorderRadius:P,horizontalItemHoverBg:A,popupBg:N}=e;return{[`${n}-${t}, ${n}-${t} > ${n}`]:{color:r,background:a,[`&${n}-root:focus-visible`]:Object.assign({},XE(e)),[`${n}-item-group-title`]:{color:i},[`${n}-submenu-selected`]:{[`> ${n}-submenu-title`]:{color:o}},[`${n}-item-disabled, ${n}-submenu-disabled`]:{color:`${x} !important`},[`${n}-item:not(${n}-item-selected):not(${n}-submenu-selected)`]:{[`&:hover, > ${n}-submenu-title:hover`]:{color:v}},[`&:not(${n}-horizontal)`]:{[`${n}-item:not(${n}-item-selected)`]:{"&:hover":{backgroundColor:O},"&:active":{backgroundColor:M}},[`${n}-submenu-title`]:{"&:hover":{backgroundColor:O},"&:active":{backgroundColor:M}}},[`${n}-item-danger`]:{color:w,[`&${n}-item:hover`]:{[`&:not(${n}-item-selected):not(${n}-submenu-selected)`]:{color:S}},[`&${n}-item:active`]:{background:C}},[`${n}-item a`]:{"&, &:hover":{color:"inherit"}},[`${n}-item-selected`]:{color:o,[`&${n}-item-danger`]:{color:E},"a, a:hover":{color:"inherit"}},[`& ${n}-item-selected`]:{backgroundColor:s,[`&${n}-item-danger`]:{backgroundColor:k}},[`${n}-item, ${n}-submenu-title`]:{[`&:not(${n}-item-disabled):focus-visible`]:Object.assign({},XE(e))},[`&${n}-submenu > ${n}`]:{backgroundColor:I},[`&${n}-popup > ${n}`]:{backgroundColor:N},[`&${n}-horizontal`]:Object.assign(Object.assign({},"dark"===t?{borderBottom:0}:{}),{[`> ${n}-item, > ${n}-submenu`]:{top:d,marginTop:e.calc(d).mul(-1).equal(),marginBottom:0,borderRadius:P,"&::after":{position:"absolute",insetInline:g,bottom:0,borderBottom:`${Mt(c)} solid transparent`,transition:`border-color ${f} ${p}`,content:'""'},"&:hover, &-active, &-open":{background:A,"&::after":{borderBottomWidth:c,borderBottomColor:$}},"&-selected":{color:$,backgroundColor:_,"&:hover":{backgroundColor:_},"&::after":{borderBottomWidth:c,borderBottomColor:$}}}}),[`&${n}-root`]:{[`&${n}-inline, &${n}-vertical`]:{borderInlineEnd:`${Mt(d)} ${y} ${b}`}},[`&${n}-inline`]:{[`${n}-sub${n}-inline`]:{background:l},[`${n}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${Mt(u)} solid ${o}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${m} ${h}`,`opacity ${m} ${h}`].join(","),content:'""'},[`&${n}-item-danger`]:{"&::after":{borderInlineEndColor:E}}},[`${n}-selected, ${n}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${m} ${p}`,`opacity ${m} ${p}`].join(",")}}}}}},GE=e=>{const{componentCls:t,itemHeight:n,itemMarginInline:r,padding:o,menuArrowSize:i,marginXS:a,itemMarginBlock:l,itemWidth:s}=e,c=e.calc(i).add(o).add(a).equal();return{[`${t}-item`]:{position:"relative",overflow:"hidden"},[`${t}-item, ${t}-submenu-title`]:{height:n,lineHeight:Mt(n),paddingInline:o,overflow:"hidden",textOverflow:"ellipsis",marginInline:r,marginBlock:l,width:s},[`> ${t}-item,\n > ${t}-submenu > ${t}-submenu-title`]:{height:n,lineHeight:Mt(n)},[`${t}-item-group-list ${t}-submenu-title,\n ${t}-submenu-title`]:{paddingInlineEnd:c}}},YE=e=>{const{componentCls:t,iconCls:n,itemHeight:r,colorTextLightSolid:o,dropdownWidth:i,controlHeightLG:a,motionDurationMid:l,motionEaseOut:s,paddingXL:c,itemMarginInline:u,fontSizeLG:d,motionDurationSlow:f,paddingXS:p,boxShadowSecondary:h,collapsedWidth:g,collapsedIconSize:m}=e,v={height:r,lineHeight:Mt(r),listStylePosition:"inside",listStyleType:"disc"};return[{[t]:{"&-inline, &-vertical":Object.assign({[`&${t}-root`]:{boxShadow:"none"}},GE(e))},[`${t}-submenu-popup`]:{[`${t}-vertical`]:Object.assign(Object.assign({},GE(e)),{boxShadow:h})}},{[`${t}-submenu-popup ${t}-vertical${t}-sub`]:{minWidth:i,maxHeight:`calc(100vh - ${Mt(e.calc(a).mul(2.5).equal())})`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${t}-inline`]:{width:"100%",[`&${t}-root`]:{[`${t}-item, ${t}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${f}`,`background ${f}`,`padding ${l} ${s}`].join(","),[`> ${t}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${t}-sub${t}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${t}-submenu > ${t}-submenu-title`]:v,[`& ${t}-item-group-title`]:{paddingInlineStart:c}},[`${t}-item`]:v}},{[`${t}-inline-collapsed`]:{width:g,[`&${t}-root`]:{[`${t}-item, ${t}-submenu ${t}-submenu-title`]:{[`> ${t}-inline-collapsed-noicon`]:{fontSize:d,textAlign:"center"}}},[`> ${t}-item,\n > ${t}-item-group > ${t}-item-group-list > ${t}-item,\n > ${t}-item-group > ${t}-item-group-list > ${t}-submenu > ${t}-submenu-title,\n > ${t}-submenu > ${t}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${Mt(e.calc(d).div(2).equal())} - ${Mt(u)})`,textOverflow:"clip",[`\n ${t}-submenu-arrow,\n ${t}-submenu-expand-icon\n `]:{opacity:0},[`${t}-item-icon, ${n}`]:{margin:0,fontSize:m,lineHeight:Mt(r),"+ span":{display:"inline-block",opacity:0}}},[`${t}-item-icon, ${n}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${t}-item-icon, ${n}`]:{display:"none"},"a, a:hover":{color:o}},[`${t}-item-group-title`]:Object.assign(Object.assign({},br),{paddingInline:p})}}]},KE=e=>{const{componentCls:t,motionDurationSlow:n,motionDurationMid:r,motionEaseInOut:o,motionEaseOut:i,iconCls:a,iconSize:l,iconMarginInlineEnd:s}=e;return{[`${t}-item, ${t}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${n}`,`background ${n}`,`padding ${n} ${o}`].join(","),[`${t}-item-icon, ${a}`]:{minWidth:l,fontSize:l,transition:[`font-size ${r} ${i}`,`margin ${n} ${o}`,`color ${n}`].join(","),"+ span":{marginInlineStart:s,opacity:1,transition:[`opacity ${n} ${o}`,`margin ${n}`,`color ${n}`].join(",")}},[`${t}-item-icon`]:Object.assign({},{display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),[`&${t}-item-only-child`]:{[`> ${a}, > ${t}-item-icon`]:{marginInlineEnd:0}}},[`${t}-item-disabled, ${t}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${t}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},ZE=e=>{const{componentCls:t,motionDurationSlow:n,motionEaseInOut:r,borderRadius:o,menuArrowSize:i,menuArrowOffset:a}=e;return{[`${t}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:e.margin,width:i,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${n} ${r}, opacity ${n}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:e.calc(i).mul(.6).equal(),height:e.calc(i).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:o,transition:[`background ${n} ${r}`,`transform ${n} ${r}`,`top ${n} ${r}`,`color ${n} ${r}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(${Mt(e.calc(a).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${Mt(a)})`}}}}},JE=e=>{const{antCls:t,componentCls:n,fontSize:r,motionDurationSlow:o,motionDurationMid:i,motionEaseInOut:a,paddingXS:l,padding:s,colorSplit:c,lineWidth:u,zIndexPopup:d,borderRadiusLG:f,subMenuItemBorderRadius:p,menuArrowSize:h,menuArrowOffset:g,lineType:m,menuPanelMaskInset:v,groupTitleLineHeight:y,groupTitleFontSize:b}=e;return[{"":{[`${n}`]:Object.assign(Object.assign({},{"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),{"&-hidden":{display:"none"}})},[`${n}-submenu-hidden`]:{display:"none"}},{[n]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},xr(e)),{"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),{marginBottom:0,paddingInlineStart:0,fontSize:r,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${o} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${n}-item`]:{flex:"none"}},[`${n}-item, ${n}-submenu, ${n}-submenu-title`]:{borderRadius:e.itemBorderRadius},[`${n}-item-group-title`]:{padding:`${Mt(l)} ${Mt(s)}`,fontSize:b,lineHeight:y,transition:`all ${o}`},[`&-horizontal ${n}-submenu`]:{transition:[`border-color ${o} ${a}`,`background ${o} ${a}`].join(",")},[`${n}-submenu, ${n}-submenu-inline`]:{transition:[`border-color ${o} ${a}`,`background ${o} ${a}`,`padding ${i} ${a}`].join(",")},[`${n}-submenu ${n}-sub`]:{cursor:"initial",transition:[`background ${o} ${a}`,`padding ${o} ${a}`].join(",")},[`${n}-title-content`]:{transition:`color ${o}`,[`> ${t}-typography-ellipsis-single-line`]:{display:"inline",verticalAlign:"unset"}},[`${n}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${n}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:c,borderStyle:m,borderWidth:0,borderTopWidth:u,marginBlock:u,padding:0,"&-dashed":{borderStyle:"dashed"}}}),KE(e)),{[`${n}-item-group`]:{[`${n}-item-group-list`]:{margin:0,padding:0,[`${n}-item, ${n}-submenu-title`]:{paddingInline:`${Mt(e.calc(r).mul(2).equal())} ${Mt(s)}`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:d,borderRadius:f,boxShadow:"none",transformOrigin:"0 0",[`&${n}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:`${Mt(v)} 0 0`,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'}},"&-placement-rightTop::before":{top:0,insetInlineStart:v},"\n &-placement-leftTop,\n &-placement-bottomRight,\n ":{transformOrigin:"100% 0"},"\n &-placement-leftBottom,\n &-placement-topRight,\n ":{transformOrigin:"100% 100%"},"\n &-placement-rightBottom,\n &-placement-topLeft,\n ":{transformOrigin:"0 100%"},"\n &-placement-bottomLeft,\n &-placement-rightTop,\n ":{transformOrigin:"0 0"},"\n &-placement-leftTop,\n &-placement-leftBottom\n ":{paddingInlineEnd:e.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:e.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:e.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:e.paddingXS},[`> ${n}`]:Object.assign(Object.assign(Object.assign({borderRadius:f},KE(e)),ZE(e)),{[`${n}-item, ${n}-submenu > ${n}-submenu-title`]:{borderRadius:p},[`${n}-submenu-title::after`]:{transition:`transform ${o} ${a}`}})}}),ZE(e)),{[`&-inline-collapsed ${n}-submenu-arrow,\n &-inline ${n}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${Mt(g)})`},"&::after":{transform:`rotate(45deg) translateX(${Mt(e.calc(g).mul(-1).equal())})`}},[`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]:{transform:`translateY(${Mt(e.calc(h).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${Mt(e.calc(g).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${Mt(g)})`}}})},{[`${t}-layout-header`]:{[n]:{lineHeight:"inherit"}}}]},QE=e=>{const{colorPrimary:t,colorError:n,colorTextDisabled:r,colorErrorBg:o,colorText:i,colorTextDescription:a,colorBgContainer:l,colorFillAlter:s,colorFillContent:c,lineWidth:u,lineWidthBold:d,controlItemBgActive:f,colorBgTextHover:p,controlHeightLG:h,lineHeight:g,colorBgElevated:m,marginXXS:v,padding:y,fontSize:b,controlHeightSM:x,fontSizeLG:w,colorTextLightSolid:S,colorErrorHover:E}=e,C=new po(S).setAlpha(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:e.zIndexPopupBase+50,radiusItem:e.borderRadiusLG,itemBorderRadius:e.borderRadiusLG,radiusSubMenuItem:e.borderRadiusSM,subMenuItemBorderRadius:e.borderRadiusSM,colorItemText:i,itemColor:i,colorItemTextHover:i,itemHoverColor:i,colorItemTextHoverHorizontal:t,horizontalItemHoverColor:t,colorGroupTitle:a,groupTitleColor:a,colorItemTextSelected:t,itemSelectedColor:t,colorItemTextSelectedHorizontal:t,horizontalItemSelectedColor:t,colorItemBg:l,itemBg:l,colorItemBgHover:p,itemHoverBg:p,colorItemBgActive:c,itemActiveBg:f,colorSubItemBg:s,subMenuItemBg:s,colorItemBgSelected:f,itemSelectedBg:f,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:0,colorActiveBarHeight:d,activeBarHeight:d,colorActiveBarBorderSize:u,activeBarBorderWidth:u,colorItemTextDisabled:r,itemDisabledColor:r,colorDangerItemText:n,dangerItemColor:n,colorDangerItemTextHover:n,dangerItemHoverColor:n,colorDangerItemTextSelected:n,dangerItemSelectedColor:n,colorDangerItemBgActive:o,dangerItemActiveBg:o,colorDangerItemBgSelected:o,dangerItemSelectedBg:o,itemMarginInline:e.marginXXS,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:h,groupTitleLineHeight:g,collapsedWidth:2*h,popupBg:m,itemMarginBlock:v,itemPaddingInline:y,horizontalLineHeight:1.15*h+"px",iconSize:b,iconMarginInlineEnd:x-b,collapsedIconSize:w,groupTitleFontSize:b,darkItemDisabledColor:new po(S).setAlpha(.25).toRgbString(),darkItemColor:C,darkDangerItemColor:n,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:S,darkItemSelectedBg:t,darkDangerItemSelectedBg:n,darkItemHoverBg:"transparent",darkGroupTitleColor:C,darkItemHoverColor:S,darkDangerItemHoverColor:E,darkDangerItemSelectedColor:S,darkDangerItemActiveBg:n,itemWidth:""}},eC=e=>Object.assign(Object.assign({},e),{itemWidth:e.activeBarWidth?`calc(100% + ${e.activeBarBorderWidth}px)`:`calc(100% - ${2*e.itemMarginInline}px)`}),tC=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;const n=oi("Menu",(e=>{const{colorBgElevated:t,colorPrimary:n,colorTextLightSolid:r,controlHeightLG:o,fontSize:i,darkItemColor:a,darkDangerItemColor:l,darkItemBg:s,darkSubMenuItemBg:c,darkItemSelectedColor:u,darkItemSelectedBg:d,darkDangerItemSelectedBg:f,darkItemHoverBg:p,darkGroupTitleColor:h,darkItemHoverColor:g,darkItemDisabledColor:m,darkDangerItemHoverColor:v,darkDangerItemSelectedColor:y,darkDangerItemActiveBg:b}=e,x=e.calc(i).div(7).mul(5).equal(),w=Ko(e,{menuArrowSize:x,menuHorizontalHeight:e.calc(o).mul(1.15).equal(),menuArrowOffset:e.calc(x).mul(.25).equal(),menuPanelMaskInset:-7,menuSubMenuBg:t,calc:e.calc}),S=Ko(w,{itemColor:a,itemHoverColor:g,groupTitleColor:h,itemSelectedColor:u,itemBg:s,popupBg:s,subMenuItemBg:c,itemActiveBg:"transparent",itemSelectedBg:d,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:p,itemDisabledColor:m,dangerItemColor:l,dangerItemHoverColor:v,dangerItemSelectedColor:y,dangerItemActiveBg:b,dangerItemSelectedBg:f,menuSubMenuBg:c,horizontalItemSelectedColor:r,horizontalItemSelectedBg:n});return[JE(w),WE(w),YE(w),qE(w,"light"),qE(S,"dark"),VE(w),UE(w),Mb(w,"slide-up"),Mb(w,"slide-down"),Ph(w,"zoom-big")]}),QE,{deprecatedTokens:[["colorGroupTitle","groupTitleColor"],["radiusItem","itemBorderRadius"],["radiusSubMenuItem","subMenuItemBorderRadius"],["colorItemText","itemColor"],["colorItemTextHover","itemHoverColor"],["colorItemTextHoverHorizontal","horizontalItemHoverColor"],["colorItemTextSelected","itemSelectedColor"],["colorItemTextSelectedHorizontal","horizontalItemSelectedColor"],["colorItemTextDisabled","itemDisabledColor"],["colorDangerItemText","dangerItemColor"],["colorDangerItemTextHover","dangerItemHoverColor"],["colorDangerItemTextSelected","dangerItemSelectedColor"],["colorDangerItemBgActive","dangerItemActiveBg"],["colorDangerItemBgSelected","dangerItemSelectedBg"],["colorItemBg","itemBg"],["colorItemBgHover","itemHoverBg"],["colorSubItemBg","subMenuItemBg"],["colorItemBgActive","itemActiveBg"],["colorItemBgSelectedHorizontal","horizontalItemSelectedBg"],["colorActiveBarWidth","activeBarWidth"],["colorActiveBarHeight","activeBarHeight"],["colorActiveBarBorderSize","activeBarBorderWidth"],["colorItemBgSelected","itemSelectedBg"]],format:eC,injectStyle:!(arguments.length>2&&void 0!==arguments[2])||arguments[2],unitless:{groupTitleLineHeight:!0}});return n(e,t)};const nC=(0,r.forwardRef)(((e,t)=>{var n,o;const i=r.useContext(HE),l=i||{},{getPrefixCls:s,getPopupContainer:c,direction:u,menu:d}=r.useContext(Ce),f=s(),{prefixCls:p,className:h,style:g,theme:m="light",expandIcon:v,_internalDisableMenuItemTitleTooltip:y,inlineCollapsed:b,siderCollapsed:x,items:w,children:S,rootClassName:E,mode:C,selectable:k,onClick:O,overflowedIndicatorPopupClassName:M}=e,I=fe(function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);ovoid 0!==x?x:b),[b,x]),T={horizontal:{motionName:`${f}-slide-up`},inline:Jc(f),other:{motionName:`${f}-zoom-big`}},R=s("menu",p||l.prefixCls),L=Ql(R),[D,j]=tC(R,L,!i),F=a()(`${R}-${m}`,null==d?void 0:d.className,h);let B;if("function"==typeof v)B=v;else if(null===v||!1===v)B=null;else if(null===l.expandIcon||!1===l.expandIcon)B=null;else{const e=null!=v?v:l.expandIcon;B=Il(e,{className:a()(`${R}-submenu-expand-icon`,kl(e)?null===(o=e.props)||void 0===o?void 0:o.className:"")})}const z=r.useMemo((()=>({prefixCls:R,inlineCollapsed:N||!1,direction:u,firstLevel:!0,theme:m,mode:P,disableMenuItemTitleTooltip:y})),[R,N,u,y,m]);return D(r.createElement(HE.Provider,{value:null},r.createElement(PE.Provider,{value:z},r.createElement(vE,Object.assign({getPopupContainer:c,overflowedIndicator:r.createElement(LE,null),overflowedIndicatorPopupClassName:a()(R,`${R}-${m}`,M),mode:P,selectable:A,onClick:_},I,{inlineCollapsed:N,style:Object.assign(Object.assign({},null==d?void 0:d.style),g),className:F,prefixCls:R,direction:u,defaultMotions:T,expandIcon:B,ref:t,rootClassName:a()(E,j,l.rootClassName,L)}),$))))})),rC=nC,oC=(0,r.forwardRef)(((e,t)=>{const n=(0,r.useRef)(null),o=r.useContext(OE);return(0,r.useImperativeHandle)(t,(()=>({menu:n.current,focus:e=>{var t;null===(t=n.current)||void 0===t||t.focus(e)}}))),r.createElement(rC,Object.assign({ref:n},e,o))}));oC.Item=AE,oC.SubMenu=NE,oC.Divider=_E,oC.ItemGroup=sE;const iC=oC,aC=e=>{const{componentCls:t,menuCls:n,colorError:r,colorTextLightSolid:o}=e,i=`${n}-item`;return{[`${t}, ${t}-menu-submenu`]:{[`${n} ${i}`]:{[`&${i}-danger:not(${i}-disabled)`]:{color:r,"&:hover":{color:o,backgroundColor:r}}}}}},lC=e=>{const{componentCls:t,menuCls:n,zIndexPopup:r,dropdownArrowDistance:o,sizePopupArrow:i,antCls:a,iconCls:l,motionDurationMid:s,paddingBlock:c,fontSize:u,dropdownEdgeChildPadding:d,colorTextDisabled:f,fontSizeIcon:p,controlPaddingHorizontal:h,colorBgElevated:g}=e;return[{[t]:Object.assign(Object.assign({},xr(e)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:r,display:"block","&::before":{position:"absolute",insetBlock:e.calc(i).div(2).sub(o).equal(),zIndex:-9999,opacity:1e-4,content:'""'},[`&-trigger${a}-btn`]:{[`& > ${l}-down, & > ${a}-btn-icon > ${l}-down`]:{fontSize:p}},[`${t}-wrap`]:{position:"relative",[`${a}-btn > ${l}-down`]:{fontSize:p},[`${l}-down::before`]:{transition:`transform ${s}`}},[`${t}-wrap-open`]:{[`${l}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${a}-slide-down-enter${a}-slide-down-enter-active${t}-placement-bottomLeft,\n &${a}-slide-down-appear${a}-slide-down-appear-active${t}-placement-bottomLeft,\n &${a}-slide-down-enter${a}-slide-down-enter-active${t}-placement-bottom,\n &${a}-slide-down-appear${a}-slide-down-appear-active${t}-placement-bottom,\n &${a}-slide-down-enter${a}-slide-down-enter-active${t}-placement-bottomRight,\n &${a}-slide-down-appear${a}-slide-down-appear-active${t}-placement-bottomRight`]:{animationName:yb},[`&${a}-slide-up-enter${a}-slide-up-enter-active${t}-placement-topLeft,\n &${a}-slide-up-appear${a}-slide-up-appear-active${t}-placement-topLeft,\n &${a}-slide-up-enter${a}-slide-up-enter-active${t}-placement-top,\n &${a}-slide-up-appear${a}-slide-up-appear-active${t}-placement-top,\n &${a}-slide-up-enter${a}-slide-up-enter-active${t}-placement-topRight,\n &${a}-slide-up-appear${a}-slide-up-appear-active${t}-placement-topRight`]:{animationName:xb},[`&${a}-slide-down-leave${a}-slide-down-leave-active${t}-placement-bottomLeft,\n &${a}-slide-down-leave${a}-slide-down-leave-active${t}-placement-bottom,\n &${a}-slide-down-leave${a}-slide-down-leave-active${t}-placement-bottomRight`]:{animationName:bb},[`&${a}-slide-up-leave${a}-slide-up-leave-active${t}-placement-topLeft,\n &${a}-slide-up-leave${a}-slide-up-leave-active${t}-placement-top,\n &${a}-slide-up-leave${a}-slide-up-leave-active${t}-placement-topRight`]:{animationName:wb}})},Hx(e,g,{arrowPlacement:{top:!0,bottom:!0}}),{[`${t} ${n}`]:{position:"relative",margin:0},[`${n}-submenu-popup`]:{position:"absolute",zIndex:r,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${t}, ${t}-menu-submenu`]:{[n]:Object.assign(Object.assign({padding:d,listStyleType:"none",backgroundColor:g,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary},Cr(e)),{[`${n}-item-group-title`]:{padding:`${Mt(c)} ${Mt(h)}`,color:e.colorTextDescription,transition:`all ${s}`},[`${n}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${n}-item-icon`]:{minWidth:u,marginInlineEnd:e.marginXS,fontSize:e.fontSizeSM},[`${n}-title-content`]:{flex:"auto","> a":{color:"inherit",transition:`all ${s}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}},[`${n}-item, ${n}-submenu-title`]:Object.assign(Object.assign({clear:"both",margin:0,padding:`${Mt(c)} ${Mt(h)}`,color:e.colorText,fontWeight:"normal",fontSize:u,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${s}`,borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover}},Cr(e)),{"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:f,cursor:"not-allowed","&:hover":{color:f,backgroundColor:g,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${Mt(e.marginXXS)} 0`,overflow:"hidden",lineHeight:0,backgroundColor:e.colorSplit},[`${t}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:e.paddingXS,[`${t}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:e.colorTextDescription,fontSize:p,fontStyle:"normal"}}}),[`${n}-item-group-list`]:{margin:`0 ${Mt(e.marginXS)}`,padding:0,listStyle:"none"},[`${n}-submenu-title`]:{paddingInlineEnd:e.calc(h).add(e.fontSizeSM).equal()},[`${n}-submenu-vertical`]:{position:"relative"},[`${n}-submenu${n}-submenu-disabled ${t}-menu-submenu-title`]:{[`&, ${t}-menu-submenu-arrow-icon`]:{color:f,backgroundColor:g,cursor:"not-allowed"}},[`${n}-submenu-selected ${t}-menu-submenu-title`]:{color:e.colorPrimary}})}},[Mb(e,"slide-up"),Mb(e,"slide-down"),Rb(e,"move-up"),Rb(e,"move-down"),Ph(e,"zoom-big")]]},sC=oi("Dropdown",(e=>{const{marginXXS:t,sizePopupArrow:n,paddingXXS:r,componentCls:o}=e,i=Ko(e,{menuCls:`${o}-menu`,dropdownArrowDistance:e.calc(n).div(2).add(t).equal(),dropdownEdgeChildPadding:r});return[lC(i),aC(i)]}),(e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2},Bx({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0})),Dx(e)))),cC=e=>{const{menu:t,arrow:n,prefixCls:o,children:i,trigger:l,disabled:s,dropdownRender:c,getPopupContainer:u,overlayClassName:d,rootClassName:f,overlayStyle:p,open:h,onOpenChange:g,visible:m,onVisibleChange:v,mouseEnterDelay:y=.15,mouseLeaveDelay:b=.1,autoAdjustOverflow:x=!0,placement:w="",overlay:S,transitionName:E}=e,{getPopupContainer:C,getPrefixCls:k,direction:O,dropdown:M}=r.useContext(Ce);Os("Dropdown");const I=r.useMemo((()=>{const e=k();return void 0!==E?E:w.includes("top")?`${e}-slide-down`:`${e}-slide-up`}),[k,w,E]),$=r.useMemo((()=>w?w.includes("Center")?w.slice(0,w.indexOf("Center")):w:"rtl"===O?"bottomRight":"bottomLeft"),[w,O]),_=k("dropdown",o),P=Ql(_),[A,N]=sC(_,P),[,T]=No(),R=r.Children.only(i),L=Il(R,{className:a()(`${_}-trigger`,{[`${_}-rtl`]:"rtl"===O},R.props.className),disabled:s}),D=s?[]:l;let j;D&&D.includes("contextMenu")&&(j=!0);const[F,B]=dr(!1,{value:null!=h?h:m}),z=Jn((e=>{null==g||g(e,{source:"trigger"}),null==v||v(e),B(e)})),H=a()(d,f,N,P,null==M?void 0:M.className,{[`${_}-rtl`]:"rtl"===O}),U=Xx({arrowPointAtCenter:"object"==typeof n&&n.pointAtCenter,autoAdjustOverflow:x,offset:T.marginXXS,arrowWidth:n?T.sizePopupArrow:0,borderRadius:T.borderRadius}),W=r.useCallback((()=>{(null==t?void 0:t.selectable)&&(null==t?void 0:t.multiple)||(null==g||g(!1,{source:"menu"}),B(!1))}),[null==t?void 0:t.selectable,null==t?void 0:t.multiple]),[V,X]=Rs("Dropdown",null==p?void 0:p.zIndex);let q=r.createElement(Zw,Object.assign({alignPoint:j},fe(e,["rootClassName"]),{mouseEnterDelay:y,mouseLeaveDelay:b,visible:F,builtinPlacements:U,arrow:!!n,overlayClassName:H,prefixCls:_,getPopupContainer:u||C,transitionName:I,trigger:D,overlay:()=>{let e;return e=(null==t?void 0:t.items)?r.createElement(iC,Object.assign({},t)):"function"==typeof S?S():S,c&&(e=c(e)),e=r.Children.only("string"==typeof e?r.createElement("span",null,e):e),r.createElement(zE,{prefixCls:`${_}-menu`,rootClassName:P,expandIcon:r.createElement("span",{className:`${_}-menu-submenu-arrow`},r.createElement(Hw,{className:`${_}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:W,validator:e=>{let{mode:t}=e}},e)},placement:$,onVisibleChange:z,overlayStyle:Object.assign(Object.assign(Object.assign({},null==M?void 0:M.style),p),{zIndex:V})}),L);return V&&(q=r.createElement(_s.Provider,{value:X},q)),A(q)},uC=Tg(cC,"dropdown",(e=>e),(function(e){return Object.assign(Object.assign({},e),{align:{overflow:{adjustX:!1,adjustY:!1}}})}));cC._InternalPanelDoNotUseOrYouWillBeFired=e=>r.createElement(uC,Object.assign({},e),r.createElement("span",null));const dC=cC,fC=e=>{let{children:t}=e;const{getPrefixCls:n}=r.useContext(Ce),o=n("breadcrumb");return r.createElement("li",{className:`${o}-separator`,"aria-hidden":"true"},""===t?t:t||"/")};fC.__ANT_BREADCRUMB_SEPARATOR=!0;const pC=fC;var hC=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o{const{prefixCls:t,separator:n="/",children:o,menu:i,overlay:a,dropdownProps:l,href:s}=e,c=(e=>{if(i||a){const n=Object.assign({},l);if(i){const e=i||{},{items:t}=e,o=mC(e,["items"]);n.menu=Object.assign(Object.assign({},o),{items:null==t?void 0:t.map(((e,t)=>{var{key:n,title:o,label:i,path:a}=e,l=mC(e,["key","title","label","path"]);let c=null!=i?i:o;return a&&(c=r.createElement("a",{href:`${s}${a}`},c)),Object.assign(Object.assign({},l),{key:null!=n?n:t,label:c})}))})}else a&&(n.overlay=a);return r.createElement(dC,Object.assign({placement:"bottom"},n),r.createElement("span",{className:`${t}-overlay-link`},e,r.createElement(ex,null)))}return e})(o);return null!=c?r.createElement(r.Fragment,null,r.createElement("li",null,c),n&&r.createElement(pC,null,n)):null},yC=e=>{const{prefixCls:t,children:n,href:o}=e,i=mC(e,["prefixCls","children","href"]),{getPrefixCls:a}=r.useContext(Ce),l=a("breadcrumb",t);return r.createElement(vC,Object.assign({},i,{prefixCls:l}),gC(l,i,n,o))};yC.__ANT_BREADCRUMB_ITEM=!0;const bC=yC,xC=oi("Breadcrumb",(e=>(e=>{const{componentCls:t,iconCls:n,calc:r}=e;return{[t]:Object.assign(Object.assign({},xr(e)),{color:e.itemColor,fontSize:e.fontSize,[n]:{fontSize:e.iconFontSize},ol:{display:"flex",flexWrap:"wrap",margin:0,padding:0,listStyle:"none"},a:Object.assign({color:e.linkColor,transition:`color ${e.motionDurationMid}`,padding:`0 ${Mt(e.paddingXXS)}`,borderRadius:e.borderRadiusSM,height:e.fontHeight,display:"inline-block",marginInline:r(e.marginXXS).mul(-1).equal(),"&:hover":{color:e.linkHoverColor,backgroundColor:e.colorBgTextHover}},Cr(e)),"li:last-child":{color:e.lastItemColor},[`${t}-separator`]:{marginInline:e.separatorMargin,color:e.separatorColor},[`${t}-link`]:{[`\n > ${n} + span,\n > ${n} + a\n `]:{marginInlineStart:e.marginXXS}},[`${t}-overlay-link`]:{borderRadius:e.borderRadiusSM,height:e.fontHeight,display:"inline-block",padding:`0 ${Mt(e.paddingXXS)}`,marginInline:r(e.marginXXS).mul(-1).equal(),[`> ${n}`]:{marginInlineStart:e.marginXXS,fontSize:e.fontSizeIcon},"&:hover":{color:e.linkHoverColor,backgroundColor:e.colorBgTextHover,a:{color:e.linkHoverColor}},a:{"&:hover":{backgroundColor:"transparent"}}},[`&${e.componentCls}-rtl`]:{direction:"rtl"}})}})(Ko(e,{}))),(e=>({itemColor:e.colorTextDescription,lastItemColor:e.colorText,iconFontSize:e.fontSize,linkColor:e.colorTextDescription,linkHoverColor:e.colorText,separatorColor:e.colorTextDescription,separatorMargin:e.marginXS})));var wC=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o{var{breadcrumbName:t}=e,n=wC(e,["breadcrumbName"]);return Object.assign(Object.assign({},n),{title:t})}))}),o}const EC=e=>{const{prefixCls:t,separator:n="/",style:o,className:i,rootClassName:l,routes:s,items:u,children:d,itemRender:f,params:p={}}=e,h=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);oe||(t?t.map(SC):null)),[e,t])}(u,s),E=function(e,t){return(n,r,o,i,a)=>{if(t)return t(n,r,o,i);const l=function(e,t){if(void 0===e.title||null===e.title)return null;const n=Object.keys(t).join("|");return"object"==typeof e.title?e.title:String(e.title).replace(new RegExp(`:(${n})`,"g"),((e,n)=>t[n]||e))}(n,r);return gC(e,n,l,a)}}(b,f);if(S&&S.length>0){const e=[],t=u||s;y=S.map(((o,i)=>{const{path:a,key:l,type:s,menu:c,overlay:u,onClick:d,className:f,separator:h,dropdownProps:g}=o,m=((e,t)=>{if(void 0===t)return t;let n=(t||"").replace(/^\//,"");return Object.keys(e).forEach((t=>{n=n.replace(`:${t}`,e[t])})),n})(p,a);void 0!==m&&e.push(m);const v=null!=l?l:i;if("separator"===s)return r.createElement(pC,{key:v},h);const y={},x=i===S.length-1;c?y.menu=c:u&&(y.overlay=u);let{href:w}=o;return e.length&&void 0!==m&&(w=`#/${e.join("/")}`),r.createElement(vC,Object.assign({key:v},y,Cl(o,{data:!0,aria:!0}),{className:f,dropdownProps:g,href:w,separator:x?"":n,onClick:d,prefixCls:b}),E(o,p,t,e,w))}))}else if(d){const e=c(d).length;y=c(d).map(((t,r)=>t?Il(t,{separator:r===e-1?"":n,key:r}):t))}const C=a()(b,null==v?void 0:v.className,{[`${b}-rtl`]:"rtl"===m},i,l,w),k=Object.assign(Object.assign({},null==v?void 0:v.style),o);return x(r.createElement("nav",Object.assign({className:C,style:k},h),r.createElement("ol",null,y)))};EC.Item=bC,EC.Separator=pC;const CC=EC;var kC=n(4290),OC=n.n(kC),MC={},IC=[];function $C(e,t){}function _C(e,t){}function PC(e,t,n){t||MC[n]||(e(!1,n),MC[n]=!0)}function AC(e,t){PC($C,e,t)}function NC(e,t){PC(_C,e,t)}AC.preMessage=function(e){IC.push(e)},AC.resetWarned=function(){MC={}},AC.noteOnce=NC;const TC=AC;var RC=n(6068),LC=n.n(RC),DC=n(8599),jC=n.n(DC),FC=n(148),BC=n.n(FC),zC=n(1231),HC=n.n(zC),UC=n(1373),WC=n.n(UC),VC=n(9486),XC=n.n(VC);OC().extend(XC()),OC().extend(WC()),OC().extend(LC()),OC().extend(jC()),OC().extend(BC()),OC().extend(HC()),OC().extend((function(e,t){var n=t.prototype,r=n.format;n.format=function(e){var t=(e||"").replace("Wo","wo");return r.bind(this)(t)}}));var qC={bn_BD:"bn-bd",by_BY:"be",en_GB:"en-gb",en_US:"en",fr_BE:"fr",fr_CA:"fr-ca",hy_AM:"hy-am",kmr_IQ:"ku",nl_BE:"nl-be",pt_BR:"pt-br",zh_CN:"zh-cn",zh_HK:"zh-hk",zh_TW:"zh-tw"},GC=function(e){return qC[e]||e.split("_")[0]},YC=function(){NC(!1,"Not match any format. Please help to fire a issue about this.")},KC={getNow:function(){return OC()()},getFixedDate:function(e){return OC()(e,["YYYY-M-DD","YYYY-MM-DD"])},getEndDate:function(e){return e.endOf("month")},getWeekDay:function(e){var t=e.locale("en");return t.weekday()+t.localeData().firstDayOfWeek()},getYear:function(e){return e.year()},getMonth:function(e){return e.month()},getDate:function(e){return e.date()},getHour:function(e){return e.hour()},getMinute:function(e){return e.minute()},getSecond:function(e){return e.second()},addYear:function(e,t){return e.add(t,"year")},addMonth:function(e,t){return e.add(t,"month")},addDate:function(e,t){return e.add(t,"day")},setYear:function(e,t){return e.year(t)},setMonth:function(e,t){return e.month(t)},setDate:function(e,t){return e.date(t)},setHour:function(e,t){return e.hour(t)},setMinute:function(e,t){return e.minute(t)},setSecond:function(e,t){return e.second(t)},isAfter:function(e,t){return e.isAfter(t)},isValidate:function(e){return e.isValid()},locale:{getWeekFirstDay:function(e){return OC()().locale(GC(e)).localeData().firstDayOfWeek()},getWeekFirstDate:function(e,t){return t.locale(GC(e)).weekday(0)},getWeek:function(e,t){return t.locale(GC(e)).week()},getShortWeekDays:function(e){return OC()().locale(GC(e)).localeData().weekdaysMin()},getShortMonths:function(e){return OC()().locale(GC(e)).localeData().monthsShort()},format:function(e,t,n){return t.locale(GC(e)).format(n)},parse:function(e,t,n){for(var r=GC(e),o=0;o