@vmscloud/moz-ui-grid-vue 0.1.41 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (183) hide show
  1. package/README.md +1 -13
  2. package/dist/chunks/{index-BDQ0HlwR.js → index-2qnzL9Zm.js} +183 -32
  3. package/dist/chunks/index-BLDAzbGv.cjs +14 -0
  4. package/dist/compat/MozGridVue.vue.d.ts +1 -1
  5. package/dist/compat/MozPivotVue.vue.d.ts +1 -1
  6. package/dist/excel/ClientExcelUploadPopup.d.ts +48 -0
  7. package/dist/excel/ClientExcelUploadPopup.vue.d.ts +5 -0
  8. package/dist/excel/icons.d.ts +3 -0
  9. package/dist/{legacy/composables → excel}/useClientExcelExport.d.ts +2 -2
  10. package/dist/{legacy/composables → excel}/useClientExcelStore.d.ts +1 -1
  11. package/dist/index.cjs +76 -25
  12. package/dist/index.d.ts +27 -9
  13. package/dist/index.js +684 -89162
  14. package/dist/locale/index.d.ts +49 -0
  15. package/dist/{legacy/store → store}/index.d.ts +28 -28
  16. package/dist/store.cjs +1 -1
  17. package/dist/store.js +4 -4
  18. package/dist/{legacy/stories → stories}/_helpers/localDataLoader.d.ts +1 -1
  19. package/dist/style.css +1 -1
  20. package/dist/types/injection-keys.d.ts +2 -5
  21. package/dist/types/modules.d.ts +87 -0
  22. package/dist/{legacy/types → types}/pivot-props.d.ts +1 -1
  23. package/dist/{legacy/types → types}/props.d.ts +1 -1
  24. package/dist/utils/excel/ExcelImportUtil.cjs +1 -1
  25. package/dist/utils/excel/ExcelImportUtil.js +1 -1
  26. package/dist/utils/excel/ExcelQueueManager.cjs +1 -1
  27. package/dist/utils/excel/ExcelQueueManager.js +1 -1
  28. package/dist/utils/excel/ExcelTaskRunner.cjs +1 -1
  29. package/dist/{legacy/utils → utils}/excel/ExcelTaskRunner.d.ts +1 -1
  30. package/dist/utils/excel/ExcelTaskRunner.js +1 -1
  31. package/dist/utils/excel/ExcelTimeoutManager.cjs +1 -1
  32. package/dist/utils/excel/ExcelTimeoutManager.js +2 -4
  33. package/dist/{legacy/utils → utils}/index.d.ts +1 -1
  34. package/dist/utils/toast.d.ts +12 -0
  35. package/docs/manual/reference_vue.md +18 -27
  36. package/package.json +4 -5
  37. package/dist/chunks/index-D5KJLBGW.cjs +0 -14
  38. package/dist/legacy/components/common/Dragging.d.ts +0 -17
  39. package/dist/legacy/components/common/Dragging.vue.d.ts +0 -49
  40. package/dist/legacy/components/common/custom-cell/FormulaEngine.d.ts +0 -256
  41. package/dist/legacy/components/common/custom-cell/FormulaInput.vue.d.ts +0 -33
  42. package/dist/legacy/components/common/custom-cell/GridCustomCell.vue.d.ts +0 -23
  43. package/dist/legacy/components/common/custom-cell/useFormulaAutocomplete.d.ts +0 -44
  44. package/dist/legacy/components/common/excel/ClientExcelUploadPopup.vue.d.ts +0 -201
  45. package/dist/legacy/components/common/excel/assets/IconDropZone.vue.d.ts +0 -2
  46. package/dist/legacy/components/common/excel/assets/IconFileUpload.vue.d.ts +0 -2
  47. package/dist/legacy/components/common/filter/GridFilter.vue.d.ts +0 -23
  48. package/dist/legacy/components/common/footer/GridFooter.vue.d.ts +0 -29
  49. package/dist/legacy/components/common/sort/GridSort.vue.d.ts +0 -23
  50. package/dist/legacy/components/common/toolbar/GridSearchInput.vue.d.ts +0 -33
  51. package/dist/legacy/components/grid/MozGridVue.vue.d.ts +0 -2041
  52. package/dist/legacy/components/grid/MozGridVueCore.vue.d.ts +0 -118
  53. package/dist/legacy/components/grid/bulk-editor/GridBulkEditor.vue.d.ts +0 -10
  54. package/dist/legacy/components/grid/column-settings/AlignPicker.vue.d.ts +0 -10
  55. package/dist/legacy/components/grid/column-settings/ColorSwatchPicker.vue.d.ts +0 -11
  56. package/dist/legacy/components/grid/column-settings/ColumnListItem.vue.d.ts +0 -17
  57. package/dist/legacy/components/grid/column-settings/ColumnOptionsPanel.vue.d.ts +0 -32
  58. package/dist/legacy/components/grid/column-settings/FontSizePicker.vue.d.ts +0 -10
  59. package/dist/legacy/components/grid/column-settings/FontStyleToggles.vue.d.ts +0 -15
  60. package/dist/legacy/components/grid/column-settings/MaskPresetPicker.vue.d.ts +0 -14
  61. package/dist/legacy/components/grid/context-menu/GridContextMenu.vue.d.ts +0 -208
  62. package/dist/legacy/components/grid/group-panel/GroupPanel.vue.d.ts +0 -18
  63. package/dist/legacy/components/grid/toolbar/ColumnPicker.vue.d.ts +0 -17
  64. package/dist/legacy/components/grid/toolbar/ColumnSettings.vue.d.ts +0 -30
  65. package/dist/legacy/components/grid/toolbar/GridOptionModal.vue.d.ts +0 -211
  66. package/dist/legacy/components/grid/toolbar/GridToolBox.vue.d.ts +0 -69
  67. package/dist/legacy/components/pivot/MozPivotVue.vue.d.ts +0 -1868
  68. package/dist/legacy/components/pivot/PivotContextMenu.vue.d.ts +0 -634
  69. package/dist/legacy/components/pivot/PivotFieldChip.vue.d.ts +0 -16
  70. package/dist/legacy/components/pivot/PivotFieldDropZone.vue.d.ts +0 -26
  71. package/dist/legacy/components/pivot/PivotFieldPanel.vue.d.ts +0 -28
  72. package/dist/legacy/components/pivot/PivotOptionModal.vue.d.ts +0 -534
  73. package/dist/legacy/components/pivot/PivotToolBox.vue.d.ts +0 -79
  74. package/dist/legacy/components/pivot/chart/EChart.vue.d.ts +0 -13
  75. package/dist/legacy/components/pivot/chart/MozPivotChart.types.d.ts +0 -16
  76. package/dist/legacy/components/pivot/chart/MozPivotChart.vue.d.ts +0 -14
  77. package/dist/legacy/components/pivot/chart/PivotChartDetail.vue.d.ts +0 -13
  78. package/dist/legacy/components/pivot/chart/PivotChartMini.vue.d.ts +0 -18
  79. package/dist/legacy/components/pivot/chart/PivotChartMultiple.vue.d.ts +0 -18
  80. package/dist/legacy/components/pivot/chart/PivotChartToolbar.vue.d.ts +0 -38
  81. package/dist/legacy/components/pivot/chart/chartUtils.d.ts +0 -45
  82. package/dist/legacy/components/pivot/chart/useChartData.d.ts +0 -35
  83. package/dist/legacy/composables/useCellTooltip.d.ts +0 -8
  84. package/dist/legacy/composables/useColumnFormatter.d.ts +0 -45
  85. package/dist/legacy/composables/useColumnSettings.d.ts +0 -35
  86. package/dist/legacy/composables/useContextMenu.d.ts +0 -71
  87. package/dist/legacy/composables/useGridBulkEditor.d.ts +0 -36
  88. package/dist/legacy/composables/useGridChanges.d.ts +0 -28
  89. package/dist/legacy/composables/useGridColumns.d.ts +0 -37
  90. package/dist/legacy/composables/useGridCustomCell.d.ts +0 -34
  91. package/dist/legacy/composables/useGridEvents.d.ts +0 -14
  92. package/dist/legacy/composables/useGridFilter.d.ts +0 -38
  93. package/dist/legacy/composables/useGridInstance.d.ts +0 -16
  94. package/dist/legacy/composables/useGridSelect.d.ts +0 -18
  95. package/dist/legacy/composables/useGridSelection.d.ts +0 -18
  96. package/dist/legacy/composables/useGridSort.d.ts +0 -38
  97. package/dist/legacy/composables/useGridUndoRedo.d.ts +0 -28
  98. package/dist/legacy/composables/useGridValidation.d.ts +0 -28
  99. package/dist/legacy/composables/useMaskPresets.d.ts +0 -38
  100. package/dist/legacy/composables/useSearchHighlight.d.ts +0 -12
  101. package/dist/legacy/icons/IconAdd.vue.d.ts +0 -11
  102. package/dist/legacy/icons/IconArrowDownWithTail.vue.d.ts +0 -11
  103. package/dist/legacy/icons/IconArrowLeft.vue.d.ts +0 -11
  104. package/dist/legacy/icons/IconArrowLeftWithTail.vue.d.ts +0 -11
  105. package/dist/legacy/icons/IconArrowRight.vue.d.ts +0 -11
  106. package/dist/legacy/icons/IconArrowUpCenter.vue.d.ts +0 -11
  107. package/dist/legacy/icons/IconArrowUpWithTail.vue.d.ts +0 -11
  108. package/dist/legacy/icons/IconChart.vue.d.ts +0 -11
  109. package/dist/legacy/icons/IconClose.vue.d.ts +0 -13
  110. package/dist/legacy/icons/IconColorPicker.vue.d.ts +0 -11
  111. package/dist/legacy/icons/IconCustomCell.vue.d.ts +0 -11
  112. package/dist/legacy/icons/IconDecide.vue.d.ts +0 -11
  113. package/dist/legacy/icons/IconDownload.vue.d.ts +0 -11
  114. package/dist/legacy/icons/IconDragHandler.vue.d.ts +0 -11
  115. package/dist/legacy/icons/IconFilter.vue.d.ts +0 -11
  116. package/dist/legacy/icons/IconInfoFilled.vue.d.ts +0 -11
  117. package/dist/legacy/icons/IconRedo.vue.d.ts +0 -9
  118. package/dist/legacy/icons/IconReset.vue.d.ts +0 -9
  119. package/dist/legacy/icons/IconResetGridToolbar.vue.d.ts +0 -11
  120. package/dist/legacy/icons/IconSearch.vue.d.ts +0 -11
  121. package/dist/legacy/icons/IconSetting.vue.d.ts +0 -11
  122. package/dist/legacy/icons/IconSettingFilled.vue.d.ts +0 -11
  123. package/dist/legacy/icons/IconSort.vue.d.ts +0 -11
  124. package/dist/legacy/icons/IconToastWarning.vue.d.ts +0 -11
  125. package/dist/legacy/icons/IconUndo.vue.d.ts +0 -9
  126. package/dist/legacy/icons/index.d.ts +0 -25
  127. package/dist/legacy/index.d.ts +0 -69
  128. package/dist/legacy/shared/colorPresets.d.ts +0 -36
  129. package/dist/legacy/stories/Autofit.stories.d.ts +0 -9
  130. package/dist/legacy/stories/CRUD.stories.d.ts +0 -9
  131. package/dist/legacy/stories/CellAttributes.stories.d.ts +0 -19
  132. package/dist/legacy/stories/CellMask.stories.d.ts +0 -19
  133. package/dist/legacy/stories/ClientExcel.stories.d.ts +0 -8
  134. package/dist/legacy/stories/Clipboard.stories.d.ts +0 -12
  135. package/dist/legacy/stories/ColumnVisibility.stories.d.ts +0 -12
  136. package/dist/legacy/stories/ColumnWidths.stories.d.ts +0 -11
  137. package/dist/legacy/stories/CustomSortFilter.stories.d.ts +0 -7
  138. package/dist/legacy/stories/DynamicRowHeight.stories.d.ts +0 -13
  139. package/dist/legacy/stories/Editors.stories.d.ts +0 -9
  140. package/dist/legacy/stories/EmptyState.stories.d.ts +0 -10
  141. package/dist/legacy/stories/FormatRow.stories.d.ts +0 -20
  142. package/dist/legacy/stories/Grouping.stories.d.ts +0 -14
  143. package/dist/legacy/stories/HeaderGroup.stories.d.ts +0 -11
  144. package/dist/legacy/stories/LargeData.stories.d.ts +0 -19
  145. package/dist/legacy/stories/MasterDetail.stories.d.ts +0 -17
  146. package/dist/legacy/stories/Merge.stories.d.ts +0 -10
  147. package/dist/legacy/stories/MultiRow.stories.d.ts +0 -12
  148. package/dist/legacy/stories/MultiRowCrud.stories.d.ts +0 -11
  149. package/dist/legacy/stories/MultiRowGroup.stories.d.ts +0 -11
  150. package/dist/legacy/stories/Pinning.stories.d.ts +0 -44
  151. package/dist/legacy/stories/Pivot.stories.d.ts +0 -23
  152. package/dist/legacy/stories/PivotAdvanced.stories.d.ts +0 -20
  153. package/dist/legacy/stories/PivotChart.stories.d.ts +0 -23
  154. package/dist/legacy/stories/PivotNonNumeric.stories.d.ts +0 -27
  155. package/dist/legacy/stories/Preset.stories.d.ts +0 -11
  156. package/dist/legacy/stories/ReactiveAPI.stories.d.ts +0 -8
  157. package/dist/legacy/stories/ReactiveSafety.stories.d.ts +0 -28
  158. package/dist/legacy/stories/Repro.stories.d.ts +0 -36
  159. package/dist/legacy/stories/RowAPI.stories.d.ts +0 -12
  160. package/dist/legacy/stories/SelectionModes.stories.d.ts +0 -35
  161. package/dist/legacy/stories/Streaming.stories.d.ts +0 -12
  162. package/dist/legacy/stories/Tree.stories.d.ts +0 -13
  163. package/dist/legacy/stories/WorkerMode.stories.d.ts +0 -15
  164. package/dist/legacy/utils/dialog/dialog.d.ts +0 -19
  165. /package/dist/{legacy/store → store}/UploadRefreshRegistry.d.ts +0 -0
  166. /package/dist/{legacy/store → store}/excelStore.d.ts +0 -0
  167. /package/dist/{legacy/stores → stores}/index.d.ts +0 -0
  168. /package/dist/{legacy/stores → stores}/projectInfo/projectInfo.contract.d.ts +0 -0
  169. /package/dist/{legacy/stories → stories}/_helpers/sampleData.d.ts +0 -0
  170. /package/dist/{legacy/types → types}/FileParameter.d.ts +0 -0
  171. /package/dist/{legacy/types → types}/StreamingParameter.d.ts +0 -0
  172. /package/dist/{legacy/types → types}/excel.types.d.ts +0 -0
  173. /package/dist/{legacy/types → types}/index.d.ts +0 -0
  174. /package/dist/{legacy/types → types}/toolbar.d.ts +0 -0
  175. /package/dist/{legacy/utils → utils}/async/debounce.d.ts +0 -0
  176. /package/dist/{legacy/utils → utils}/crypto/crypto.d.ts +0 -0
  177. /package/dist/{legacy/utils → utils}/excel/ExcelGuard.d.ts +0 -0
  178. /package/dist/{legacy/utils → utils}/excel/ExcelImportUtil.d.ts +0 -0
  179. /package/dist/{legacy/utils → utils}/excel/ExcelQueueManager.d.ts +0 -0
  180. /package/dist/{legacy/utils → utils}/excel/ExcelTimeoutManager.d.ts +0 -0
  181. /package/dist/{legacy/utils → utils}/file.d.ts +0 -0
  182. /package/dist/{legacy/utils → utils}/http/rest.d.ts +0 -0
  183. /package/dist/{legacy/utils → utils}/id/generator.d.ts +0 -0
package/dist/index.cjs CHANGED
@@ -1,26 +1,77 @@
1
- "use strict";var e=Object.defineProperty,t=(t,n,o)=>((t,n,o)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[n]=o)(t,"symbol"!=typeof n?n+"":n,o);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),o=require("@vmscloud/moz-ui-grid-wrapper"),i=require("dayjs"),r=require("@vmscloud/moz-ui-components"),a=require("./chunks/notification.contract-oFkBaE2U.cjs"),l=require("es-toolkit"),s=require("@vmscloud/moz-ui-grid-core"),u=require("./chunks/index-D5KJLBGW.cjs");class c{constructor({id:e,type:o,exportDef:i,importDef:r,strict:a,dependencies:l,manualLifeCycle:s}){t(this,"uniqueId"),t(this,"_id"),t(this,"_type"),t(this,"_default"),t(this,"_importDef"),t(this,"_exportDef"),t(this,"_pendingDef"),t(this,"_pending"),t(this,"dispose",()=>{}),t(this,"setApplied",()=>{}),t(this,"strict"),t(this,"dependencies"),this.uniqueId="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}),this._id=e,this._type=o,this._importDef=r,this._exportDef=i,this._default=i(),this._pending=!1,this._pendingDef=null,this.strict=a??!1,this.dependencies=l??null,s||n.onBeforeUnmount(()=>{this.dispose()})}get pending(){return this._pending}set pending(e){if(this._pending=e,!e&&this._pendingDef)try{this._importDef(this._pendingDef),this.setApplied(!0)}catch(t){}finally{this._pendingDef=null}}get id(){return this._id}get type(){return this._type}get default(){return this._default}set default(e){this._default=e}get current(){return this._exportDef()}set current(e){this.pending?this._pendingDef=e:(this._importDef(e),this.setApplied(!0))}setDefaultToCurrent(){this._default=this._exportDef()}}const d=()=>n.inject("user-layout-module",{register:()=>{},currentPreset:n.ref(null)});function h(e){const{register:t}=d(),o=new c({id:e.name.value,type:e.type,importDef:async t=>{var n,i,r,a;const l=e.gridInstance.value;if(l){if(!t){const t=o.default;return void(t&&(await l.applyConfig(t),t.customCellConfig&&(null==(n=e.setCustomCellState)||n.call(e,t.customCellConfig)),t.columnFormatConfig&&(null==(i=e.setColumnFormatState)||i.call(e,t.columnFormatConfig))))}await l.applyConfig(t),t.customCellConfig&&(null==(r=e.setCustomCellState)||r.call(e,t.customCellConfig)),t.columnFormatConfig&&(null==(a=e.setColumnFormatState)||a.call(e,t.columnFormatConfig))}},exportDef:()=>{var t,n;const o=e.gridInstance.value;return o?{...o.getConfig(),customCellConfig:(null==(t=e.getCustomCellState)?void 0:t.call(e))??null,columnFormatConfig:(null==(n=e.getColumnFormatState)?void 0:n.call(e))??null}:null}});let i=!1;n.watch(e.gridInstance,r=>{if(!r||i)return;if(!e.name.value)return;const a=r.on("data:loaded",()=>{i||(o.setDefaultToCurrent(),n.nextTick(()=>{t(o),i=!0,a()}))})})}const p=(e,t)=>{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n},f={width:"100",height:"100",viewBox:"0 0 100 100",fill:"none",xmlns:"http://www.w3.org/2000/svg"};const g=p({},[["render",function(e,t){return n.openBlock(),n.createElementBlock("svg",f,[...t[0]||(t[0]=[n.createStaticVNode('<path d="M50 94.1176C74.3655 94.1176 94.1176 74.3655 94.1176 50C94.1176 25.6345 74.3655 5.88232 50 5.88232C25.6345 5.88232 5.88235 25.6345 5.88235 50C5.88235 74.3655 25.6345 94.1176 50 94.1176Z" fill="#E1E9FF"></path><g clip-path="url(#clip0_1922_1233)"><path d="M58.9869 37.4184H55.3921V33.8236H58.9869V37.4184ZM62.5817 44.6079H66.1765V41.0132H62.5817V44.6079ZM62.5817 51.7975H66.1765V48.2027H62.5817V51.7975ZM48.2026 66.1766H51.7974V62.5818H48.2026V66.1766ZM41.0131 37.4184H44.6078V33.8236H41.0131V37.4184ZM33.8235 58.987H37.4183V55.3922H33.8235V58.987ZM37.4183 66.1766V62.5818H33.8235C33.8235 64.5589 35.4412 66.1766 37.4183 66.1766ZM62.5817 33.8236V37.4184H66.1765C66.1765 35.4413 64.5588 33.8236 62.5817 33.8236ZM48.2026 37.4184H51.7974V33.8236H48.2026V37.4184ZM33.8235 44.6079H37.4183V41.0132H33.8235V44.6079ZM41.0131 66.1766H44.6078V62.5818H41.0131V66.1766ZM33.8235 51.7975H37.4183V48.2027H33.8235V51.7975ZM33.8235 37.4184H37.4183V33.8236C35.4412 33.8236 33.8235 35.4413 33.8235 37.4184ZM62.0604 59.5083L64.6487 56.92C65.2238 56.3449 64.8104 55.3922 64.0196 55.3922H57.1895C56.201 55.3922 55.3921 56.2011 55.3921 57.1896V64.0017C55.3921 64.8105 56.3627 65.206 56.9199 64.6308L59.5082 62.0426L63.1029 65.6373C63.8039 66.3383 64.9363 66.3383 65.6372 65.6373C66.3382 64.9364 66.3382 63.804 65.6372 63.103L62.0604 59.5083Z" fill="#4568E0"></path></g><defs><clipPath id="clip0_1922_1233"><rect width="43.1373" height="43.1373" fill="white" transform="translate(28.4314 28.4314)"></rect></clipPath></defs>',3)])])}]]),v={xmlns:"http://www.w3.org/2000/svg",width:"89",height:"89",viewBox:"0 0 89 89",fill:"none"};const m=p({},[["render",function(e,t){return n.openBlock(),n.createElementBlock("svg",v,[...t[0]||(t[0]=[n.createStaticVNode('<circle cx="44.1176" cy="44.1176" r="44.1176" fill="#E1E9FF"></circle><g transform="translate(29.5, 29.5)"><g clip-path="url(#clip0)"><path d="M16.755 0H6C4.35 0 3 1.35 3 3V27C3 28.65 4.35 30 6 30H24C25.65 30 27 28.65 27 27V10.245C27 9.45 26.685 8.685 26.115 8.13L18.87 0.885C18.315 0.315 17.55 0 16.755 0ZM21 19.5C21 23.01 17.985 25.815 14.415 25.47C11.295 25.17 9 22.38 9 19.245V11.46C9 9.495 10.41 7.71 12.36 7.515C14.61 7.29 16.5 9.045 16.5 11.25V18C16.5 18.825 15.825 19.5 15 19.5C14.175 19.5 13.5 18.825 13.5 18V11.25C13.5 10.83 13.17 10.5 12.75 10.5C12.33 10.5 12 10.83 12 11.25V19.335C12 20.835 13.02 22.215 14.49 22.455C16.38 22.77 18 21.315 18 19.5V15C18 14.175 18.675 13.5 19.5 13.5C20.325 13.5 21 14.175 21 15V19.5ZM18 7.5V3L24 9H19.5C18.675 9 18 8.325 18 7.5Z" fill="#4568E0"></path></g></g><defs><clipPath id="clip0"><rect width="30" height="30" fill="white"></rect></clipPath></defs>',3)])])}]]);let y=null;function x(){if(y)return y;const e=n.ref(!1),t=n.shallowRef(null),o=n.ref({}),i={showPopup:e,activeGrid:t,defaultImportOptions:o,show:(n,i={})=>{t.value=n,o.value=i,e.value=!0},hide:()=>{e.value=!1}};return y=i,i}const _={class:"moz-client-excel-body"},w={class:"moz-client-excel-options"},b={class:"option-row"},S={key:0,class:"option-row",style:{flex:"1"}},C={key:2,style:{color:"#dc5a5a"}},M={key:3,class:"moz-drop-zone-text",style:{"text-align":"center",color:"#6a7184","font-weight":"400"}},T={class:"moz-drop-zone-line"},I={class:"moz-drop-zone-line"},k={style:{color:"#4568e0"}},D={key:1,class:"moz-drop-zone-line"},N={style:{color:"#4568e0"}},E={key:1,class:"moz-drop-zone-line"},A={style:{color:"#4568e0"}},L={style:{color:"#4568e0"}},V=n.defineComponent({__name:"ClientExcelUploadPopup",setup(e){const t=r.useMozLocale(),o=x(),{showPopup:l,activeGrid:s,defaultImportOptions:u}=o,c=a.useGridNotificationStore(),d=n.ref({mode:"replace",conflictStrategy:"update",autoCommit:!1}),h=n.computed(()=>[{key:"replace",label:t.value.Grid.importModeReplace??"덮어쓰기"},{key:"append",label:t.value.Grid.importModeAppend??"추가"},{key:"upsert",label:t.value.Grid.importModeUpsert??"추가/갱신"}]),p=n.computed(()=>[{key:"error",label:t.value.Grid.conflictError??"오류"},{key:"skip",label:t.value.Grid.conflictSkip??"건너뛰기"},{key:"update",label:t.value.Grid.conflictUpdate??"갱신"}]),f=n.ref(!1),v=n.computed(()=>"replace"===d.value.mode),y=n.reactive({width:540,height:440,isDropZoneActive:!1,isLoading:!1}),V=n.ref(null),O=n.ref(!1),P=n.ref(),B=n.ref(null);n.watch([l],()=>{if(l.value){O.value=!0,R();const e=u.value;e.mode&&(d.value.mode=e.mode),e.conflictStrategy&&(d.value.conflictStrategy=e.conflictStrategy),"boolean"==typeof e.autoCommit&&(d.value.autoCommit=e.autoCommit)}else O.value=!1});const R=()=>{f.value=!1,B.value&&(B.value.value=""),V.value=null,y.isLoading=!1},z=()=>{var e;null==(e=B.value)||e.click()},F=e=>{const t=e.target;t.files&&t.files.length>0&&U(t.files[0])},G=e=>{e.preventDefault(),y.isDropZoneActive=!0},H=e=>{e.preventDefault(),y.isDropZoneActive=!1},W=e=>{var t;e.preventDefault(),y.isDropZoneActive=!1,(null==(t=e.dataTransfer)?void 0:t.files.length)&&U(e.dataTransfer.files[0])},U=e=>{if(!e||!e.name.endsWith("xlsx"))return f.value=!0,void(V.value=null);f.value=!1,V.value=e},Y=()=>{const e=s.value,t=V.value;if(!e||!t)return;const n=d.value.mode,i=d.value.conflictStrategy,r=d.value.autoCommit;O.value=!1,o.hide(),R(),Z(e,t,{mode:n,conflictStrategy:i,autoCommit:r})},Z=async(e,n,o)=>{const r="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}),a=n.name;c&&c.eventMessages.unshift({noti_type:"progress",header_key:t.value.Grid.clientExcelImportProgress??"엑셀 가져오기",noti_datetime:i().format("YYYY-MM-DD HH:mm:ss"),noti_sender_id:"",prop_value:{session_id:r,file_name:a,status:"in_progress",progress_per:0,operation_type:"upload",remain_time:-1}});try{const t=e.changes;if((null==t?void 0:t.hasChanges)&&await t.discardAll(),await e.io.fromExcel(n,{mode:o.mode,conflictStrategy:o.conflictStrategy,autoCommit:o.autoCommit,onProgress:e=>{if(!c)return;const t=c.eventMessages.find(e=>{var t;return(null==(t=e.prop_value)?void 0:t.session_id)===r});if(!(null==t?void 0:t.prop_value))return;let n="number"==typeof e.percent?e.percent:void 0;void 0===n&&"number"==typeof e.rowsProcessed&&"number"==typeof e.totalRows&&e.totalRows>0&&(n=e.rowsProcessed/e.totalRows*100),"number"==typeof n&&(t.prop_value.progress_per=Math.min(99,Math.max(0,Math.floor(n))))}}),c){const e=c.eventMessages.find(e=>{var t;return(null==(t=e.prop_value)?void 0:t.session_id)===r});(null==e?void 0:e.prop_value)&&(e.prop_value.status="completed",e.prop_value.progress_per=100),setTimeout(()=>{const e=c.eventMessages.findIndex(e=>{var t;return(null==(t=e.prop_value)?void 0:t.session_id)===r});-1!==e&&c.eventMessages.splice(e,1)},2e3)}}catch(l){if(c){const e=c.eventMessages.find(e=>{var t;return(null==(t=e.prop_value)?void 0:t.session_id)===r});(null==e?void 0:e.prop_value)&&(e.prop_value.status="error",e.prop_value.error_message=l instanceof Error?l.message:String(l),e.prop_value.progress_per=0,e.prop_value.remain_time=-1)}}},X=()=>{R(),o.hide()};return(e,o)=>n.withDirectives((n.openBlock(),n.createElementBlock("div",null,[n.createVNode(n.unref(r.Popup),{ref_key:"popupElement",ref:P,visible:O.value,"onUpdate:visible":o[2]||(o[2]=e=>O.value=e),"close-on-outside-click":!0,width:y.width,height:y.height,"on-cancel":X,title:n.unref(t).Grid.clientExcelImport??"엑셀 가져오기 (파일)","contents-padding":16,"use-v-show":!1},{footer:n.withCtx(()=>[n.createVNode(n.unref(r.Button),{text:n.unref(t).Grid.check,disabled:!V.value,onClick:Y,style:{"min-width":"80px"}},null,8,["text","disabled"]),n.createVNode(n.unref(r.Button),{type:"outline",onClick:X,style:{"min-width":"80px"}},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(t).Grid.cancel),1)]),_:1})]),default:n.withCtx(()=>[n.createElementVNode("div",_,[n.createElementVNode("div",w,[n.createElementVNode("div",b,[n.createVNode(n.unref(r.Radio),{label:n.unref(t).Grid.importMode??"모드",modelValue:d.value.mode,"onUpdate:modelValue":o[0]||(o[0]=e=>d.value.mode=e),itemsSource:h.value,valueExpr:"key",displayExpr:"label"},null,8,["label","modelValue","itemsSource"])]),"replace"!==d.value.mode?(n.openBlock(),n.createElementBlock("div",S,[n.createVNode(n.unref(r.Select),{label:n.unref(t).Grid.conflictStrategy??"충돌 처리",modelValue:d.value.conflictStrategy,"onUpdate:modelValue":o[1]||(o[1]=e=>d.value.conflictStrategy=e),itemsSource:p.value,keyProp:"key",displayProp:"label",width:"100%"},null,8,["label","modelValue","itemsSource"])])):n.createCommentVNode("",!0)]),n.createElementVNode("input",{ref_key:"fileInputRef",ref:B,type:"file",accept:".xlsx",style:{display:"none"},onChange:F},null,544),n.createElementVNode("div",{class:n.normalizeClass(["moz-drop-zone",{active:y.isDropZoneActive}]),onDragover:n.withModifiers(G,["prevent"]),onDragleave:n.withModifiers(H,["prevent"]),onDrop:n.withModifiers(W,["prevent"]),onClick:z},[V.value?(n.openBlock(),n.createBlock(m,{key:0,style:{"margin-bottom":"10px"}})):(n.openBlock(),n.createBlock(g,{key:1,style:{"margin-bottom":"10px"}})),f.value?(n.openBlock(),n.createElementBlock("span",C,n.toDisplayString(n.unref(t).Grid.excelInvalidExcel),1)):(n.openBlock(),n.createElementBlock("span",M,[V.value?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[v.value?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createElementVNode("div",T,n.toDisplayString(n.unref(t).Grid.overwriteSelected),1),n.createElementVNode("span",I,[n.createElementVNode("span",k,n.toDisplayString(V.value.name),1)])],64)):(n.openBlock(),n.createElementBlock("span",D,[n.createElementVNode("span",N,n.toDisplayString(V.value.name),1)]))],64)):(n.openBlock(),n.createElementBlock("span",E,[n.createTextVNode(n.toDisplayString(n.unref(t).Grid.dropHerePrefix),1),n.createElementVNode("span",A,n.toDisplayString(n.unref(t).Grid.click),1),n.createTextVNode(n.toDisplayString(n.unref(t).Grid.dropHereMiddle),1),n.createElementVNode("span",L,n.toDisplayString(n.unref(t).Grid.drag),1),n.createTextVNode(n.toDisplayString(n.unref(t).Grid.dropHereSuffix),1)]))]))],34)])]),_:1},8,["visible","width","height","title"])],512)),[[n.vShow,!y.isLoading]])}});class O{constructor(){t(this,"instances",new Map),t(this,"appContext",null)}setAppContext(e){this.appContext=e}mount(e,t,o,i={}){const r=this.instances.get(e);if(r)return void Object.assign(r.props,i);const a=n.reactive({...i}),l=n.createApp({render:()=>n.h(o,a)});this.appContext&&(l._context.provides={...this.appContext.provides},l._context.components={...this.appContext.components},l._context.directives={...this.appContext.directives},l._context.config.globalProperties={...this.appContext.config.globalProperties}),this.instances.set(e,{app:l,props:a}),l.mount(t)}mountInstance(e,t,o){const i=n.reactive({...o}),r=n.createApp({render:()=>t(i)});return this.appContext&&(r._context.provides={...this.appContext.provides},r._context.components={...this.appContext.components},r._context.directives={...this.appContext.directives},r._context.config.globalProperties={...this.appContext.config.globalProperties}),r.mount(e),{update:e=>{Object.assign(i,e)},destroy:()=>{r.unmount()}}}updateProps(e,t){const n=this.instances.get(e);n&&Object.assign(n.props,t)}unmount(e){const t=this.instances.get(e);t&&(t.app.unmount(),this.instances.delete(e))}unmountByPrefix(e){for(const t of this.instances.keys())t.startsWith(e)&&this.unmount(t)}unmountAll(){for(const[,e]of this.instances)e.app.unmount();this.instances.clear()}get size(){return this.instances.size}has(e){return this.instances.has(e)}}function P(){const e=n.getCurrentInstance();if(!e)throw new Error("[MozGridVue] useAppContext는 setup() 내에서만 호출할 수 있습니다.");return e.appContext}function B(){const e=n.reactive([]);function t(e,t){return t?`${e}:${t}`:e}return{register(n){const o=e.findIndex(e=>t(e.type,e.fieldId)===t(n.type,n.fieldId));o>=0?e[o]=n:e.push(n)},unregister(n,o){const i=t(n,o),r=e.findIndex(e=>t(e.type,e.fieldId)===i);r>=0&&e.splice(r,1)},get(n,o){const i=t(n,o);return e.find(e=>t(e.type,e.fieldId)===i)},getAll:t=>e.filter(e=>e.type===t)}}function R(e,t,n){return e.map(e=>{const o={...e},i=t.get("cell",e.id);if(null==i?void 0:i.slot){const t=i.slot;o.cellRenderer=function(e,t,n){const o=e=>({value:e.value,rowData:e.rowData,columnId:e.columnId,rowId:e.rowId}),i=(e,i)=>{const r=n.mountInstance(e,e=>t(e),o(i));return{update:e=>(r.update(o(e)),!0),destroy(){r.destroy()}}};return i.__cellRendererKind="lifecycle",i}(e.id,t,n)}const r=t.get("header",e.id);if(null==r?void 0:r.slot){const t=r.slot;o.headerRenderer=function(e,t,n){return o=>{const i=document.createElement("div");i.style.display="contents";const r=`header:${e}`,a={columnId:o.columnId,header:o.header};return n.mount(r,i,{render:()=>t(a)},a),i}}(e.id,t,n)}const a=t.get("editor",e.id);if(null==a?void 0:a.slot){const t=a.slot;o.editor=function(e,t,n){return{type:"custom",renderer:o=>{const i=document.createElement("div");i.style.display="contents";const r=`editor:${e}`,a={value:o.value,rowData:o.rowData,columnId:e,onCommit:o.onCommit,onCancel:o.onCancel};return n.mount(r,i,{render:()=>t(a)},a),i},destroy:()=>{n.unmount(`editor:${e}`)}}}(e.id,t,n)}return o})}const z=Symbol("moz-grid-instance"),F=Symbol("moz-grid-container"),G=Symbol("moz-grid-renderer"),H=Symbol("moz-grid-template-registry"),W=Symbol("moz-grid-filter-module"),U=Symbol("moz-grid-sort-module"),Y=Symbol("moz-grid-custom-cell-module"),Z=Symbol("moz-grid-bulk-editor-module"),X=n.defineComponent({__name:"MozGrid",props:n.mergeModels({height:{default:"100%"},contextMenuConfig:{},emptyState:{},locale:{},sourceFields:{},useMultipleChart:{type:Boolean},chartIncludeGrandTotal:{type:Boolean},chartMap:{},useToolBox:{type:Boolean,default:!0},useToolBoxSetting:{type:Boolean,default:!0},useExtendFooter:{type:Boolean,default:!0},useSummaryFooter:{type:Boolean,default:!1},useSort:{type:Boolean,default:!0},useCustomCell:{type:Boolean,default:!0},useContextMenu:{type:Boolean,default:!0},usePivot:{type:Boolean},usePivotBar:{type:Boolean,default:!0},useChart:{type:Boolean},loading:{type:Boolean},useBuiltinTooltip:{type:Boolean,default:!0},name:{}},{coreConfig:{default:()=>({})},coreConfigModifiers:{}}),emits:n.mergeModels(["ready","data:loaded","row:click","row:dblclick","row:pinned","row:unpinned","row:reordered","cell:click","cell:dblclick","cell:change","cell:beforeEdit","cell:editCommitting","cell:editCommitted","cell:tooltip","selection:changed","column:resize","column:reorder","column:pin","column:visibility","sort:changed","header:click","header:sortClick","header:filterClick","filter:changed","scroll","undo:stateChange","clipboard:copy","clipboard:paste","validation:changed","columnGroup:toggle","rowGroup:toggle","rowGroup:batchToggle","contextmenu"],["update:coreConfig"]),setup(e,{expose:t,emit:i}){const r=n.useModel(e,"coreConfig"),l=e,s=i,u=n.ref(),c=n.useSlots(),d=P(),p=new O,f=B(),g=n.shallowRef(null),v=x(),m=n.ref();let y=null;const _=n.ref({disabled:!0,hasItem:!1}),w=a.useGridNotificationStore(),b=e=>String(e).padStart(2,"0"),S=()=>{const e=new Date;return`${e.getFullYear()}-${b(e.getMonth()+1)}-${b(e.getDate())} ${b(e.getHours())}:${b(e.getMinutes())}:${b(e.getSeconds())}`},C=()=>`mzc-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,M=e=>null==w?void 0:w.eventMessages.find(t=>{var n;return(null==(n=t.prop_value)?void 0:n.session_id)===e}),T=e=>{if(!w)return;const t=w.eventMessages.findIndex(t=>{var n;return(null==(n=t.prop_value)?void 0:n.session_id)===e});-1!==t&&w.eventMessages.splice(t,1)};let I=null;const k={onExportStart:e=>{w&&(I=C(),w.eventMessages.unshift({noti_type:"progress",header_key:"text-file_download",noti_datetime:S(),noti_sender_id:"",prop_value:{session_id:I,file_name:e,status:"in_progress",progress_per:0,operation_type:"download",remain_time:-1}}))},onExportProgress:e=>{if(!I)return;const t=M(I);if(!(null==t?void 0:t.prop_value))return;let n="number"==typeof e.percent?e.percent:void 0;void 0===n&&"number"==typeof e.rowsProcessed&&"number"==typeof e.totalRows&&e.totalRows>0&&(n=e.rowsProcessed/e.totalRows*100),"number"==typeof n&&(t.prop_value.progress_per=Math.min(99,Math.max(0,Math.floor(n))))},onExportComplete:e=>{if(!I)return;const t=I,n=M(t);(null==n?void 0:n.prop_value)&&((null==e?void 0:e.fileName)&&(n.prop_value.file_name=e.fileName),n.prop_value.status="completed",n.prop_value.progress_per=100),setTimeout(()=>T(t),2e3),I=null},onExportError:e=>{if(!I)return;const t=M(I);(null==t?void 0:t.prop_value)&&(t.prop_value.status="error",t.prop_value.error_message=e.message,t.prop_value.progress_per=0,t.prop_value.remain_time=-1),I=null},onExportCancel:()=>{I&&(T(I),I=null)},onImportComplete:()=>{if(!w)return;const e=C();w.eventMessages.unshift({noti_type:"progress",header_key:"text-file_upload",noti_datetime:S(),noti_sender_id:"",prop_value:{session_id:e,file_name:"",status:"completed",progress_per:100,operation_type:"upload",remain_time:-1}}),setTimeout(()=>T(e),2e3)},onImportError:e=>{w&&w.eventMessages.unshift({noti_type:"progress",header_key:"text-file_upload",noti_datetime:S(),noti_sender_id:"",prop_value:{session_id:C(),file_name:"",status:"error",error_message:e.message,progress_per:0,operation_type:"upload",remain_time:-1}})},onClientImportOpen:()=>{var e;if(!g.value)return;const t=(null==(e=l.contextMenuConfig)?void 0:e.clientImportOptions)??{};v.show(g.value,t)}};n.provide(H,f),n.provide(G,p),n.provide(z,g),n.provide(F,m);const D=n.computed(()=>{const e=l.height??"100%";return{height:"number"==typeof e?`${e}px`:e,width:"100%"}});function N(e){return t=>{const n={render:()=>{var t,n;return("tool-items"===e?null==(t=c[e])?void 0:t.call(c,_.value):null==(n=c[e])?void 0:n.call(c))??null}},o=`slot:${e}`;return p.mount(o,t,n,{}),()=>p.unmount(o)}}let E,A;function L(){const e={...r.value},t=function(){const e=r.value.fields;return e===E||(E=e,A=e?R(e,f,p):void 0),A}();return t&&(e.fields=t),void 0!==l.locale&&(e.locale=l.locale),e}const W=["row:click","row:dblclick","row:pinned","row:unpinned","row:reordered","cell:click","cell:dblclick","cell:change","cell:beforeEdit","cell:editCommitting","cell:editCommitted","cell:tooltip","selection:changed","column:resize","column:reorder","column:pin","column:visibility","sort:changed","header:click","header:sortClick","header:filterClick","filter:changed","scroll","undo:stateChange","clipboard:copy","clipboard:paste","validation:changed","columnGroup:toggle","rowGroup:toggle","rowGroup:batchToggle","contextmenu"];let U=[];function Y(){for(const e of U)try{e()}catch{}U=[]}function Z(){if(!u.value)return null;p.setAppContext(d);const e=new o.GridChrome(u.value,L(),function(){const e=["tool-left","tool-items","option-popup","tool-bottom","notification","footer","empty-state"],t={};for(const n of e)c[n]&&(t[n]=N(n));return{useToolBox:l.useToolBox,useToolBoxSetting:l.useToolBoxSetting,useExtendFooter:l.useExtendFooter,useSummaryFooter:l.useSummaryFooter,useSort:l.useSort,useCustomCell:l.useCustomCell,useContextMenu:l.useContextMenu,useBuiltinTooltip:l.useBuiltinTooltip,usePivot:l.usePivot,usePivotBar:l.usePivotBar,useChart:l.useChart,useMultipleChart:l.useMultipleChart,chartIncludeGrandTotal:l.chartIncludeGrandTotal,chartMap:l.chartMap,loading:l.loading,locale:l.locale,sourceFields:l.sourceFields,contextMenuConfig:l.contextMenuConfig,emptyState:l.emptyState,slots:t,onToolItemsPropsChange:e=>{_.value=e},excelHooks:k}}());y=e,g.value=e.grid,m.value=u.value;const t=s;e.on("data:loaded",()=>s("data:loaded"));for(const n of W)e.on(n,e=>t(n,e));return U.push(e.onConfigChange(()=>{r.value=e.getCoreConfig(r.value),e.syncAppliedConfig(L())})),e}function X(){if(!y)return;const{reinitRequired:e}=y.reconcileCoreConfig(L());e&&async function(){if(!y)return;const e=y.captureReinitState();Y(),y.destroy(),y=null,p.unmountAll();const t=Z();if(!t)return;await t.ready(),await t.restoreReinitState(e),_.value=t.getToolItemsProps(),s("ready",t.grid,t)}()}n.onMounted(async()=>{await async function(){const e=Z();e&&(await e.ready(),_.value=e.getToolItemsProps(),s("ready",e.grid,e))}(),n.watch(()=>{const e=r.value;e.data,e.fields;const t={_locale:l.locale};for(const n in e)"data"!==n&&"fields"!==n&&(t[n]=e[n]);return t},()=>X(),{deep:!0}),n.watch(()=>({useToolBox:l.useToolBox,useToolBoxSetting:l.useToolBoxSetting,useExtendFooter:l.useExtendFooter,useSummaryFooter:l.useSummaryFooter,useSort:l.useSort,useCustomCell:l.useCustomCell,useContextMenu:l.useContextMenu,useBuiltinTooltip:l.useBuiltinTooltip,usePivot:l.usePivot,usePivotBar:l.usePivotBar}),e=>null==y?void 0:y.setUIOptions(e)),n.watch(()=>l.loading,e=>null==y?void 0:y.setUIOptions({loading:e}),{immediate:!0}),n.watch(()=>l.sourceFields,e=>null==y?void 0:y.setSourceFields(e),{immediate:!0}),n.watch(()=>l.contextMenuConfig,e=>null==y?void 0:y.setContextMenuConfig(e),{deep:!0})}),n.onBeforeUnmount(()=>{Y(),null==y||y.destroy(),y=null,g.value=null,p.unmountAll()}),h({name:n.toRef(l,"name"),type:"pivot"===r.value.mode?"mozPivotGrid":"mozFlatGrid",gridInstance:g,getCustomCellState:()=>(null==y?void 0:y.customCell.getCustomCell())??null,setCustomCellState:e=>{e&&y&&y.customCell.setCustomCell(e)},getColumnFormatState:()=>(null==y?void 0:y.columnFormat.getConfig())??null,setColumnFormatState:e=>{e&&y&&y.columnFormat.setConfig(e)}});return t(new Proxy({},{get(e,t){if("chrome"===t)return y;const n=y;if(!n)return;const o=n[t];return"function"==typeof o?o.bind(n):o},has:(e,t)=>"chrome"===t||!!y&&t in y})),(e,t)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createElementVNode("div",{ref_key:"hostRef",ref:u,class:"moz-grid-chrome",style:n.normalizeStyle(D.value)},null,4),n.renderSlot(e.$slots,"default",{},void 0,!0),g.value?(n.openBlock(),n.createBlock(V,{key:0})):n.createCommentVNode("",!0)],64))}}),j=p(X,[["__scopeId","data-v-8f519055"]]),$=n.defineComponent({name:"CellTemplate",props:{field:{type:String,required:!0}},setup(e){const t=n.inject(H),o=n.useSlots();return t?(n.onMounted(()=>{o.default&&t.register({type:"cell",fieldId:e.field,slot:o.default})}),n.onBeforeUnmount(()=>{t.unregister("cell",e.field)}),()=>null):()=>null}}),q=n.defineComponent({name:"HeaderTemplate",props:{field:{type:String,required:!0}},setup(e){const t=n.inject(H),o=n.useSlots();return t?(n.onMounted(()=>{o.default&&t.register({type:"header",fieldId:e.field,slot:o.default})}),n.onBeforeUnmount(()=>{t.unregister("header",e.field)}),()=>null):()=>null}}),K=n.defineComponent({name:"CellEditor",props:{field:{type:String,required:!0}},setup(e){const t=n.inject(H),o=n.useSlots();return t?(n.onMounted(()=>{o.default&&t.register({type:"editor",fieldId:e.field,slot:o.default})}),n.onBeforeUnmount(()=>{t.unregister("editor",e.field)}),()=>null):()=>null}}),J=n.defineComponent({name:"DetailTemplate",props:{minHeight:{type:Number,default:100},maxHeight:{type:Number},singleExpand:{type:Boolean,default:!1},keepDetailRows:{type:Boolean,default:!0}},setup(e){const t=n.inject(z),o=n.inject(G),i=n.useSlots();return t&&o?(n.onMounted(()=>{const n=t.value;if(!n||!i.default)return;const r=i.default;n.masterDetail.setConfig({minHeight:e.minHeight,maxHeight:e.maxHeight,singleExpand:e.singleExpand,keepMasterDetailRows:e.keepDetailRows,renderer:(e,t,n)=>{const i=`detail:${n}`,a={parentData:t,dataIndex:n};return o.mount(i,e,{render:()=>r(a)},a),()=>{o.unmount(i)}}})}),n.onBeforeUnmount(()=>{null==o||o.unmountByPrefix("detail:")}),()=>null):()=>null}}),Q=n.defineComponent({name:"GroupTemplate",setup(){const e=n.inject(z),t=n.inject(G),o=n.useSlots();return e&&t?(n.onMounted(()=>{const n=e.value;if(!n||!o.default)return;const i=o.default;n.formatRow.addHandler("_groupTemplate",e=>{if("group-row"!==e.type)return;const n=e.ctx,o=n.element;if(!o)return;const r=`group:${n.viewIndex}`,a={groupKey:n.column,groupValue:n.value,level:n.level,count:n.itemCount,isExpanded:!n.collapsed};t.mount(r,o,{render:()=>i(a)},a)})}),n.onBeforeUnmount(()=>{var n;null==t||t.unmountByPrefix("group:"),null==(n=e.value)||n.formatRow.removeHandler("_groupTemplate")}),()=>null):()=>null}});let ee=!1;function te(e){return e?(Object.prototype.hasOwnProperty.call(e,"formatHeaderRow")||Object.defineProperty(e,"formatHeaderRow",{configurable:!0,get:()=>(ee||(ee=!0),e.formatHeader)}),e):null}const ne=n.defineComponent({__name:"MozGridVue",props:{name:{},useToolBox:{type:Boolean,default:!0},useToolBoxSetting:{type:Boolean,default:!0},useExtendFooter:{type:Boolean,default:!0},useSummaryFooter:{type:Boolean,default:!1},useSort:{type:Boolean,default:!0},useCustomCell:{type:Boolean,default:!0},contextMenuConfig:{default:()=>({})},useContextMenu:{type:Boolean,default:!0},loading:{type:Boolean},emptyState:{},fields:{},data:{},mode:{},pivotRowFields:{},pivotColumnFields:{},pivotValueFields:{},height:{default:"100%"},keyFields:{},theme:{},rowHeight:{},headerHeight:{},showHeader:{type:Boolean,default:!0},resizableColumns:{type:Boolean,default:!0},reorderableColumns:{type:Boolean,default:!0},showRowHeader:{type:[Boolean,Object]},rowHeader:{type:[Boolean,Object]},rowSelection:{},cellSelection:{default:()=>({mode:"range"})},cellSelectionImpliesRows:{type:Boolean},editable:{type:Boolean,default:!1},tooltipMode:{default:"overflow"},alternatingRows:{type:Boolean,default:!0},autoFitColumns:{type:Boolean},dynamicRowHeights:{type:Boolean,default:!1},reorderableRows:{type:Boolean,default:!1},locale:{},engine:{},useWorker:{type:Boolean},loader:{},preventKeyEdit:{type:Boolean,default:!0},showStatusBar:{type:Boolean},showDragHandleColumn:{type:Boolean},undoStack:{},formatRow:{},translations:{},rowStyle:{},headerStyle:{},rowHeightChangeThreshold:{},group:{},columnGroups:{},rowTemplate:{}},emits:["ready","data:loaded","row:click","row:dblclick","row:pinned","row:unpinned","row:reordered","cell:click","cell:dblclick","cell:change","cell:beforeEdit","cell:editCommitting","cell:editCommitted","cell:tooltip","selection:changed","column:resize","column:reorder","column:pin","column:visibility","sort:changed","filter:changed","undo:stateChange","clipboard:copy","clipboard:paste","validation:changed","columnGroup:toggle","scroll","contextmenu"],setup(e,{expose:t,emit:i}){const r=e,a=i,l=n.computed(()=>{const e={...r};for(const t of o.WRAPPER_EXTRA_KEYS)delete e[t];return delete e.name,delete e.locale,e}),s=n.computed(()=>{const e=r,t={};for(const n of o.WRAPPER_EXTRA_KEYS)void 0!==e[n]&&(t[n]=e[n]);return void 0!==e.locale&&(t.locale=e.locale),t}),u=Object.fromEntries(["ready","data:loaded","row:click","row:dblclick","row:pinned","row:unpinned","row:reordered","cell:click","cell:dblclick","cell:change","cell:beforeEdit","cell:editCommitting","cell:editCommitted","cell:tooltip","selection:changed","column:resize","column:reorder","column:pin","column:visibility","sort:changed","filter:changed","undo:stateChange","clipboard:copy","clipboard:paste","validation:changed","columnGroup:toggle","scroll","contextmenu"].map(e=>[e,(...t)=>a(e,...t)]));u.ready=e=>a("ready",te(e));const c=n.ref(null);function d(){return c.value??null}const h={};return Object.defineProperties(h,{grid:{enumerable:!0,get:()=>{var e;return te(null==(e=d())?void 0:e.grid)}},core:{enumerable:!0,get:()=>h},filterModule:{enumerable:!0,get:()=>{var e;return null==(e=d())?void 0:e.filter}},sortModule:{enumerable:!0,get:()=>{var e;return null==(e=d())?void 0:e.sort}},customCellModule:{enumerable:!0,get:()=>{var e;return null==(e=d())?void 0:e.customCell}},bulkEditorModule:{enumerable:!0,get:()=>{var e;return null==(e=d())?void 0:e.bulkEditor}}}),h.refresh=async()=>{var e,t;return null==(t=null==(e=d())?void 0:e.grid)?void 0:t.refresh()},h.loadData=async e=>{var t,n;return null==(n=null==(t=d())?void 0:t.grid)?void 0:n.loadData(e)},h.sort=async e=>{var t,n;return null==(n=null==(t=d())?void 0:t.grid)?void 0:n.sort(e)},h.filter=async e=>{var t,n;return null==(n=null==(t=d())?void 0:t.grid)?void 0:n.filter(e)},t(h),(e,t)=>(n.openBlock(),n.createBlock(j,n.mergeProps({ref_key:"mozRef",ref:c,coreConfig:l.value},s.value,{name:r.name},n.toHandlers(n.unref(u))),n.createSlots({default:n.withCtx(()=>[n.renderSlot(e.$slots,"default")]),_:2},[e.$slots["tool-left"]?{name:"tool-left",fn:n.withCtx(()=>[n.renderSlot(e.$slots,"tool-left")]),key:"0"}:void 0,e.$slots["tool-items"]?{name:"tool-items",fn:n.withCtx(t=>[n.renderSlot(e.$slots,"tool-items",n.normalizeProps(n.guardReactiveProps(t)))]),key:"1"}:void 0,e.$slots.notification?{name:"notification",fn:n.withCtx(()=>[n.renderSlot(e.$slots,"notification")]),key:"2"}:void 0,e.$slots.footer?{name:"footer",fn:n.withCtx(()=>[n.renderSlot(e.$slots,"footer")]),key:"3"}:void 0,e.$slots.customState?{name:"empty-state",fn:n.withCtx(()=>[n.renderSlot(e.$slots,"customState")]),key:"4"}:void 0]),1040,["coreConfig","name"]))}}),oe=n.defineComponent({__name:"MozPivotVue",props:{name:{},data:{},rowFields:{},columnFields:{},valueFields:{},height:{default:"100%"},showRowSubTotals:{type:Boolean,default:!1},showRowGrandTotals:{type:Boolean,default:!0},showColumnSubTotals:{type:Boolean,default:!1},showColumnGrandTotals:{type:Boolean,default:!0},trackSourceRows:{type:Boolean,default:!1},showHeader:{type:Boolean,default:!0},alternatingRows:{type:Boolean,default:!1},tooltipMode:{default:"overflow"},rowSelection:{},cellSelection:{default:()=>({mode:"range"})},cellSelectionImpliesRows:{type:Boolean},useToolBox:{type:Boolean,default:!0},useToolBoxSetting:{type:Boolean,default:!0},useFilter:{type:Boolean,default:!0},useSort:{type:Boolean,default:!0},useCustomCell:{type:Boolean,default:!0},useExtendFooter:{type:Boolean,default:!0},useSummaryFooter:{type:Boolean,default:!1},useContextMenu:{type:Boolean,default:!0},contextMenuConfig:{},useChart:{type:Boolean,default:!1},fields:{},availableFields:{},useMultipleChart:{type:Boolean,default:!0},chartIncludeGrandTotal:{type:Boolean,default:!1},chartMap:{},loading:{type:Boolean},emptyState:{}},emits:["ready","data:loaded","filter:changed","pivot:configured","pivot:toggled","update:rowFields","update:columnFields","update:valueFields"],setup(e,{expose:t,emit:i}){const r=e,a=i,l=n.computed(()=>{const e={...r};for(const t of o.WRAPPER_EXTRA_KEYS)delete e[t];return delete e.name,delete e.locale,delete e.availableFields,delete e.useFilter,e.mode="pivot",e}),s=n.computed(()=>{const e=r,t={};for(const n of o.WRAPPER_EXTRA_KEYS)void 0!==e[n]&&(t[n]=e[n]);return void 0!==e.locale&&(t.locale=e.locale),t.sourceFields=e.sourceFields??e.availableFields??e.fields,t}),u=Object.fromEntries(["ready","data:loaded","filter:changed","pivot:toggled"].map(e=>[e,(...t)=>a(e,...t)]));function c(e){var t,n,o;const i=e;a("update:rowFields",i.rowFields??[]),a("update:columnFields",i.columnFields??[]),a("update:valueFields",i.valueFields??[]);const r=null==(o=null==(n=null==(t=h())?void 0:t.pivot)?void 0:n.getRawConfig)?void 0:o.call(n);r&&a("pivot:configured",r)}u.ready=e=>a("ready",te(e));const d=n.ref(null);function h(){return d.value??null}function p(){var e,t;return null==(t=null==(e=h())?void 0:e.grid)?void 0:t.pivot}const f=n.computed({get:()=>{var e,t;return(null==(t=null==(e=h())?void 0:e.chart)?void 0:t.visible)??!1},set:e=>{var t,n;return null==(n=null==(t=h())?void 0:t.chart)?void 0:n.setVisible(e)}}),g={};return Object.defineProperties(g,{grid:{enumerable:!0,get:()=>{var e;return te(null==(e=h())?void 0:e.grid)}},core:{enumerable:!0,get:()=>g},pivotApi:{enumerable:!0,get:()=>p()??null},filterModule:{enumerable:!0,get:()=>{var e;return null==(e=h())?void 0:e.filter}},sortModule:{enumerable:!0,get:()=>{var e;return null==(e=h())?void 0:e.sort}},customCellModule:{enumerable:!0,get:()=>{var e;return null==(e=h())?void 0:e.customCell}},showChart:{enumerable:!0,get:()=>f.value,set:e=>{f.value=e}}}),g.refresh=async()=>{var e,t;return null==(t=null==(e=h())?void 0:e.grid)?void 0:t.refresh()},g.setConfig=async e=>{var t;return null==(t=p())?void 0:t.setConfig(e)},g.getResult=()=>{var e;return(null==(e=p())?void 0:e.getResult())??null},g.expandAll=async()=>{var e;return null==(e=p())?void 0:e.expandAllRows()},g.collapseAll=async()=>{var e;return null==(e=p())?void 0:e.collapseAllRows()},g.expandToLevel=async e=>{var t;return null==(t=p())?void 0:t.expandRowToLevel(e)},g.toggleChart=()=>{f.value=!f.value},t(g),(e,t)=>(n.openBlock(),n.createBlock(j,n.mergeProps({ref_key:"mozRef",ref:d,coreConfig:l.value},s.value,{name:r.name,"onUpdate:coreConfig":c},n.toHandlers(n.unref(u))),n.createSlots({default:n.withCtx(()=>[n.renderSlot(e.$slots,"default")]),_:2},[e.$slots["tool-left"]?{name:"tool-left",fn:n.withCtx(()=>[n.renderSlot(e.$slots,"tool-left")]),key:"0"}:void 0,e.$slots["tool-items"]?{name:"tool-items",fn:n.withCtx(t=>[n.renderSlot(e.$slots,"tool-items",n.normalizeProps(n.guardReactiveProps(t)))]),key:"1"}:void 0,e.$slots.footer?{name:"footer",fn:n.withCtx(()=>[n.renderSlot(e.$slots,"footer")]),key:"2"}:void 0,e.$slots.customState?{name:"empty-state",fn:n.withCtx(()=>[n.renderSlot(e.$slots,"customState")]),key:"3"}:void 0]),1040,["coreConfig","name"]))}}),ie=["keyFields","theme","rowHeight","headerHeight","showHeader","resizableColumns","reorderableColumns","showRowHeader","rowHeader","rowSelection","cellSelection","cellSelectionImpliesRows","editable","tooltipMode","alternatingRows","autoFitColumns","dynamicRowHeights","reorderableRows","locale","engine","useWorker","loader","preventKeyEdit","showStatusBar","showDragHandleColumn","undoStack","formatRow","translations","rowStyle","headerStyle","rowHeightChangeThreshold"],re=["group","columnGroups","rowTemplate"],ae=["data:loaded","row:click","row:dblclick","row:pinned","row:unpinned","row:reordered","cell:click","cell:dblclick","cell:change","cell:beforeEdit","cell:editCommitting","cell:editCommitted","cell:tooltip","selection:changed","column:resize","column:reorder","column:pin","column:visibility","sort:changed","filter:changed","scroll","undo:stateChange","clipboard:copy","clipboard:paste","validation:changed","columnGroup:toggle","contextmenu"];function le(){const e=n.ref(!1),t=n.ref(null),o=n.ref([]);let i=null,r=null,a=null,l=!1;function u(){a&&c(a.getSnapshot().filters??[])}function c(e){const t=function(){var e,t;const n=null==(e=null==i?void 0:i.getFields)?void 0:e.call(i);if(n&&n.length>0)return n;const o=null==(t=null==i?void 0:i.getPivotFields)?void 0:t.call(i);return o?[...o.rowFields,...o.columnFields,...o.valueFields,...o.filterFields]:n??[]}();o.value=e.map((e,n)=>{var o;return{sequence:e.sequence??n,header:(null==(o=t.find(t=>t.id===e.id))?void 0:o.header)??e.id,binding:e.id,comparison:ue(e.operator),logical:(e.logical??"and").toUpperCase(),type:void 0,variable:e.filterValue,variable2:s.filterField(e,"filterValue2")}})}function d(e){o.value=[...e],h()}function h(e){if(e&&(o.value=[...e]),!i)return;const t=o.value.filter(e=>"∅"===e.comparison||"●"===e.comparison||void 0!==e.variable&&null!==e.variable&&""!==e.variable);if(0===t.length)return void i.filter([]);const n=t.map((e,t)=>({id:e.binding,sequence:e.sequence??t,operator:se(e.comparison),filterValue:e.variable,filterValue2:e.variable2,logical:(e.logical??"AND").toLowerCase()}));l=!0,i.filter(n).finally(()=>{l=!1,u()})}function p(){o.value=[],l=!0,null==i||i.filter([]).finally(()=>{l=!1,u()})}return{showFilter:e,hitColumn:t,filterList:o,showFilterHandler:function(n){n&&(t.value=n),e.value=!0},hideFilterHandler:function(){e.value=!1},setGrid:function(e){null==r||r(),i=e,a=e.select(e=>e.viewState),r=a.subscribe(()=>{l||c(a.getSnapshot().filters??[])})},setFilter:d,addFilter:function(e){const t=o.value.reduce((e,t)=>Math.max(e,t.sequence),0),n=e.map((e,n)=>({...e,sequence:t+n+1}));o.value=[...o.value,...n],h()},getFilter:function(){return[...o.value]},applyFilter:h,clearFilter:p,searchGrid:function(e){if(!e||!i)return void p();const t=i.getFields();if(!t)return;const n=t.filter(e=>"string"===e.dataType&&!e.hidden).map((t,n)=>({sequence:n,header:t.header,binding:t.id,comparison:"%",logical:"OR",type:"string",variable:e}));d(n)},destroy:function(){null==r||r(),r=null,i=null,o.value=[],e.value=!1}}}function se(e){return{"=":"eq","≠":"neq","%":"contains","!%":"notContains",">":"gt","≥":"gte","<":"lt","≤":"lte","∅":"isNull","●":"isNotNull"}[e]??"eq"}function ue(e){return{eq:"=",neq:"≠",contains:"%",notContains:"!%",gt:">",gte:"≥",lt:"<",lte:"≤",isNull:"∅",isNotNull:"●"}[e]??"="}function ce(){const e=n.ref(!1),t=n.ref([]);let o=null,i=null,r=null,a=!1;function l(){r&&s(r.getSnapshot().sorts??[])}function s(e){const n=function(){var e,t;const n=null==(e=null==o?void 0:o.getFields)?void 0:e.call(o);if(n&&n.length>0)return n;const i=null==(t=null==o?void 0:o.getPivotFields)?void 0:t.call(o);return i?[...i.rowFields,...i.columnFields,...i.valueFields,...i.filterFields]:n??[]}();t.value=e.map((e,t)=>{var o;return{sequence:e.sequence??t,header:(null==(o=n.find(t=>t.id===e.id))?void 0:o.header)??e.id,binding:e.id,ascending:"asc"===e.direction,...e.byValue?{byValue:e.byValue}:{}}})}function u(e){if(e&&(t.value=[...e]),!o)return;const n=[...t.value].sort((e,t)=>e.sequence-t.sequence).map(e=>({id:e.binding,sequence:e.sequence,direction:e.ascending?"asc":"desc",...e.byValue?{byValue:e.byValue}:{}}));a=!0,o.sort(n).finally(()=>{a=!1,l()})}return{showSort:e,sortList:t,showSortHandler:function(){e.value=!0},hideSortHandler:function(){e.value=!1},setGrid:function(e){null==i||i(),o=e,r=e.select(e=>e.viewState),i=r.subscribe(()=>{a||s(r.getSnapshot().sorts??[])})},setSort:function(e){t.value=[...e],u()},addSort:function(e){const n=t.value.reduce((e,t)=>Math.max(e,t.sequence),0),o=e.map((e,t)=>({...e,sequence:n+t+1}));t.value=[...t.value,...o],u()},addSortDirectly:function(e,n=!0){const o=t.value.find(t=>t.binding===e.id);if(o)o.ascending=!o.ascending,t.value=[...t.value];else{const o=t.value.reduce((e,t)=>Math.max(e,t.sequence),0);t.value=[...t.value,{sequence:o+1,header:e.header,binding:e.id,ascending:n}]}u()},removeSort:function(e){t.value=t.value.filter(t=>t.binding!==e),u()},getSort:function(){return[...t.value]},applySort:u,clearSort:function(){t.value=[],a=!0,null==o||o.sort([]).finally(()=>{a=!1,l()})},destroy:function(){null==i||i(),i=null,o=null,t.value=[],e.value=!1}}}const de=1,he=2,pe=3,fe=4,ge=class e{constructor(e){t(this,"input"),t(this,"position"),t(this,"tokens"),this.input=e,this.position=0,this.tokens=[]}tokenize(){for(this.tokens=[],this.position=0;this.position<this.input.length&&(this.skipWhitespace(),!(this.position>=this.input.length));){const e=this.input[this.position];if("["!==e)if("$"!==e)if('"'!==e&&"'"!==e)if("#"!==e){if(this.isDigit(e)||"."===e&&this.isDigit(this.peek(1)))this.readNumber();else if(this.isAlpha(e)||"_"===e)this.readIdentifier();else if(!this.readOperator())if("("!==e)if(")"!==e){if(","!==e)throw new Error(`알 수 없는 문자: '${e}' (위치: ${this.position})`);this.addToken("COMMA",","),this.position++}else this.addToken("RPAREN",")"),this.position++;else this.addToken("LPAREN","("),this.position++}else this.readDateLiteral();else this.readString(e);else this.readBindingRef();else this.readColumnRef()}return this.addToken("EOF",null),this.tokens}skipWhitespace(){for(;this.position<this.input.length&&/\s/.test(this.input[this.position]);)this.position++}peek(e=0){const t=this.position+e;return t<this.input.length?this.input[t]:""}isDigit(e){return/[0-9]/.test(e)}isAlpha(e){return/[a-zA-Z가-힣ㄱ-ㅎㅏ-ㅣ]/.test(e)}isAlphaNumeric(e){return/[a-zA-Z0-9가-힣ㄱ-ㅎㅏ-ㅣ_]/.test(e)}addToken(e,t){this.tokens.push({type:e,value:t,position:this.position})}readColumnRef(){const e=this.position;this.position++;let t="";for(;this.position<this.input.length&&"]"!==this.input[this.position];)t+=this.input[this.position],this.position++;if("]"!==this.input[this.position])throw new Error(`닫는 대괄호 ']'가 없습니다 (위치: ${e})`);this.position++,this.tokens.push({type:"COLUMN_REF",value:t.trim(),position:e})}readBindingRef(){const e=this.position;this.position++;let t="";for(;this.position<this.input.length&&this.isAlphaNumeric(this.input[this.position]);)t+=this.input[this.position],this.position++;if(0===t.length)throw new Error(`바인딩 참조 이름이 비어있습니다 (위치: ${e})`);this.tokens.push({type:"BINDING_REF",value:t,position:e})}readString(e){const t=this.position;this.position++;let n="";for(;this.position<this.input.length;){const o=this.input[this.position];if(o===e)return this.position++,void this.tokens.push({type:"STRING",value:n,position:t});if("\\"===o&&this.position+1<this.input.length){this.position++;const e=this.input[this.position];switch(e){case"n":n+="\n";break;case"t":n+="\t";break;case"\\":n+="\\";break;case'"':n+='"';break;case"'":n+="'";break;default:n+=e}}else n+=o;this.position++}throw new Error(`문자열이 닫히지 않았습니다 (위치: ${t})`)}readDateLiteral(){const e=this.position;this.position++;let t="";for(;this.position<this.input.length&&"#"!==this.input[this.position];)t+=this.input[this.position],this.position++;if("#"!==this.input[this.position])throw new Error(`날짜 리터럴이 닫히지 않았습니다 (위치: ${e}). #날짜# 형식을 사용하세요.`);this.position++;const n=t.trim(),o=new Date(n);if(isNaN(o.getTime()))throw new Error(`유효하지 않은 날짜 형식입니다: '${n}' (위치: ${e})`);this.tokens.push({type:"DATE",value:{date:o,original:n},position:e})}readNumber(){const e=this.position;let t="",n=!1;for(;this.position<this.input.length;){const e=this.input[this.position];if(this.isDigit(e))t+=e,this.position++;else{if("."!==e||n)break;n=!0,t+=e,this.position++}}if(this.position<this.input.length&&this.isAlpha(this.input[this.position])){for(;this.position<this.input.length&&this.isAlphaNumeric(this.input[this.position]);)t+=this.input[this.position],this.position++;return void this.tokens.push({type:"STRING",value:t,position:e})}const o=n?parseFloat(t):parseInt(t,10);this.tokens.push({type:"NUMBER",value:o,position:e})}readIdentifier(){const t=this.position;let n="";for(;this.position<this.input.length&&this.isAlphaNumeric(this.input[this.position]);)n+=this.input[this.position],this.position++;const o=n.toUpperCase();if("NOT"===o&&"_"===this.peek()){this.position++;let n="";for(;this.position<this.input.length&&this.isAlphaNumeric(this.input[this.position]);)n+=this.input[this.position],this.position++;const i=`${o}_${n.toUpperCase()}`;if(e.KEYWORDS[i])return void this.tokens.push({type:e.KEYWORDS[i],value:i,position:t})}if("IS"===o&&"_"===this.peek()){this.position++;let n="";for(;this.position<this.input.length&&this.isAlphaNumeric(this.input[this.position]);)n+=this.input[this.position],this.position++;let i=`${o}_${n.toUpperCase()}`;if("IS_NOT"===i&&"_"===this.peek()){this.position++;let e="";for(;this.position<this.input.length&&this.isAlphaNumeric(this.input[this.position]);)e+=this.input[this.position],this.position++;i=`IS_NOT_${e.toUpperCase()}`}if(e.KEYWORDS[i])return void this.tokens.push({type:e.KEYWORDS[i],value:i,position:t})}if(("STARTS"===o||"ENDS"===o)&&"_"===this.peek()){this.position++;let n="";for(;this.position<this.input.length&&this.isAlphaNumeric(this.input[this.position]);)n+=this.input[this.position],this.position++;const i=`${o}_${n.toUpperCase()}`;if(e.KEYWORDS[i])return void this.tokens.push({type:e.KEYWORDS[i],value:i,position:t})}if(e.KEYWORDS[o]){const n=e.KEYWORDS[o];let i=o;return"BOOLEAN"===n?i="TRUE"===o:"NULL"===n&&(i=null),void this.tokens.push({type:n,value:i,position:t})}if(!e.FUNCTIONS.has(o))throw new Error(`알 수 없는 식별자: '${n}' (위치: ${t}). 문자열은 따옴표("" 또는 '')로 감싸세요.`);this.tokens.push({type:"FUNCTION",value:o,position:t})}readOperator(){this.position;const e=this.input[this.position],t=this.peek(1);if("="===e&&"="===t)return this.addToken("EQ","=="),this.position+=2,!0;if("!"===e&&"="===t)return this.addToken("NEQ","!="),this.position+=2,!0;if("<"===e&&">"===t)return this.addToken("NEQ","<>"),this.position+=2,!0;if("<"===e&&"="===t)return this.addToken("LTE","<="),this.position+=2,!0;if(">"===e&&"="===t)return this.addToken("GTE",">="),this.position+=2,!0;if("&"===e&&"&"===t)return this.addToken("AND","&&"),this.position+=2,!0;if("|"===e&&"|"===t)return this.addToken("OR","||"),this.position+=2,!0;switch(e){case"=":return this.addToken("EQ","="),this.position++,!0;case"≠":return this.addToken("NEQ","≠"),this.position++,!0;case"<":return this.addToken("LT","<"),this.position++,!0;case">":return this.addToken("GT",">"),this.position++,!0;case"≤":return this.addToken("LTE","≤"),this.position++,!0;case"≥":return this.addToken("GTE","≥"),this.position++,!0;case"+":return this.addToken("PLUS","+"),this.position++,!0;case"-":return this.addToken("MINUS","-"),this.position++,!0;case"*":return this.addToken("MULTIPLY","*"),this.position++,!0;case"/":return this.addToken("DIVIDE","/"),this.position++,!0;case"%":return this.addToken("MODULO","%"),this.position++,!0;case"!":return this.addToken("NOT","!"),this.position++,!0}return!1}};t(ge,"KEYWORDS",{AND:"AND",OR:"OR",NOT:"NOT",TRUE:"BOOLEAN",FALSE:"BOOLEAN",NULL:"NULL",CONTAINS:"CONTAINS",NOT_CONTAINS:"NOT_CONTAINS",STARTS_WITH:"STARTS_WITH",ENDS_WITH:"ENDS_WITH",LIKE:"LIKE",IS_EMPTY:"IS_EMPTY",IS_NOT_EMPTY:"IS_NOT_EMPTY"}),t(ge,"FUNCTIONS",new Set(["ABS","ROUND","FLOOR","CEIL","MIN","MAX","LEN","UPPER","LOWER","TRIM","LEFT","RIGHT","NOW","TODAY","DAYS","IF","COALESCE","CONCAT"]));let ve=ge;class me{constructor(e){t(this,"tokens"),t(this,"position"),this.tokens=e,this.position=0}parse(){const e=this.parseExpression();if("EOF"!==this.current().type)throw new Error(`예상치 못한 토큰: ${this.current().value} (위치: ${this.current().position})`);return e}current(){return this.tokens[this.position]||{type:"EOF",value:null,position:-1}}advance(){const e=this.current();return"EOF"!==e.type&&this.position++,e}expect(e){const t=this.current();if(t.type!==e)throw new Error(`예상: ${e}, 실제: ${t.type} (위치: ${t.position})`);return this.advance()}parseExpression(){return this.parseOrExpr()}parseOrExpr(){let e=this.parseAndExpr();for(;"OR"===this.current().type;){this.advance();e={type:"BinaryOp",operator:"OR",left:e,right:this.parseAndExpr()}}return e}parseAndExpr(){let e=this.parseNotExpr();for(;"AND"===this.current().type;){this.advance();e={type:"BinaryOp",operator:"AND",left:e,right:this.parseNotExpr()}}return e}parseNotExpr(){if("NOT"===this.current().type){this.advance();return{type:"UnaryOp",operator:"NOT",operand:this.parseNotExpr()}}return this.parseComparison()}parseComparison(){let e=this.parseStringOp();if(["EQ","NEQ","LT","GT","LTE","GTE"].includes(this.current().type)){const t=this.advance(),n=this.parseStringOp();e={type:"BinaryOp",operator:t.value,left:e,right:n}}return e}parseStringOp(){let e=this.parseAdditive();if(["CONTAINS","NOT_CONTAINS","STARTS_WITH","ENDS_WITH","LIKE"].includes(this.current().type)){const t=this.advance(),n=this.parseAdditive();e={type:"BinaryOp",operator:t.value,left:e,right:n}}if("IS_EMPTY"===this.current().type||"IS_NOT_EMPTY"===this.current().type){e={type:"PostfixOp",operator:this.advance().value,operand:e}}return e}parseAdditive(){let e=this.parseMultiplicative();for(;"PLUS"===this.current().type||"MINUS"===this.current().type;){const t=this.advance(),n=this.parseMultiplicative();e={type:"BinaryOp",operator:t.value,left:e,right:n}}return e}parseMultiplicative(){let e=this.parseUnary();for(;"MULTIPLY"===this.current().type||"DIVIDE"===this.current().type||"MODULO"===this.current().type;){const t=this.advance(),n=this.parseUnary();e={type:"BinaryOp",operator:t.value,left:e,right:n}}return e}parseUnary(){if("MINUS"===this.current().type){this.advance();return{type:"UnaryOp",operator:"-",operand:this.parseUnary()}}return"PLUS"===this.current().type?(this.advance(),this.parseUnary()):this.parsePrimary()}parsePrimary(){const e=this.current();switch(e.type){case"NUMBER":return this.advance(),{type:"Literal",value:e.value,dataType:"number"};case"STRING":return this.advance(),{type:"Literal",value:e.value,dataType:"string"};case"BOOLEAN":return this.advance(),{type:"Literal",value:e.value,dataType:"boolean"};case"NULL":return this.advance(),{type:"Literal",value:null,dataType:"null"};case"DATE":return this.advance(),{type:"Literal",value:e.value,dataType:"date"};case"COLUMN_REF":return this.advance(),{type:"ColumnRef",name:e.value,isBinding:!1};case"BINDING_REF":return this.advance(),{type:"ColumnRef",name:e.value,isBinding:!0};case"FUNCTION":return this.parseFunctionCall();case"LPAREN":this.advance();const t=this.parseExpression();return this.expect("RPAREN"),t;default:throw new Error(`예상치 못한 토큰: ${e.type} '${e.value}' (위치: ${e.position})`)}}parseFunctionCall(){const e=this.advance();this.expect("LPAREN");const t=[];if("RPAREN"!==this.current().type)for(t.push(this.parseExpression());"COMMA"===this.current().type;)this.advance(),t.push(this.parseExpression());return this.expect("RPAREN"),{type:"FunctionCall",name:e.value,args:t}}}class ye{constructor(e){t(this,"columnMap"),t(this,"bindingSet"),t(this,"columnTypeMap"),this.columnMap=new Map,this.bindingSet=new Set,this.columnTypeMap=new Map;for(const t of e)t.header&&t.binding&&(this.columnMap.set(t.header,t.binding),this.bindingSet.add(t.binding),void 0!==t.dataType&&(this.columnTypeMap.set(t.header,t.dataType),this.columnTypeMap.set(t.binding,t.dataType)))}getColumnDataType(e){return e.isBinding,this.columnTypeMap.get(e.name)}coerceValueByColumnType(e,t){if(null==e)return e;if(void 0===t)return e;switch(t){case de:return String(e);case he:if("number"==typeof e)return e;if("string"==typeof e){const t=parseFloat(e.replace(/,/g,""));return isNaN(t)?e:t}return e;case fe:if(e instanceof Date)return e;if("string"==typeof e){const t=new Date(e);return isNaN(t.getTime())?e:t}return e;case pe:if("boolean"==typeof e)return e;if("string"==typeof e){const t=e.toLowerCase();if("true"===t||"1"===t||"yes"===t)return!0;if("false"===t||"0"===t||"no"===t)return!1}return Boolean(e);default:return e}}evaluate(e,t){switch(e.type){case"Literal":return"date"===e.dataType&&e.value&&"object"==typeof e.value&&"date"in e.value?e.value.date:e.value;case"ColumnRef":return this.evaluateColumnRef(e,t);case"BinaryOp":return this.evaluateBinaryOp(e,t);case"UnaryOp":return this.evaluateUnaryOp(e,t);case"PostfixOp":return this.evaluatePostfixOp(e,t);case"FunctionCall":return this.evaluateFunctionCall(e,t);default:throw new Error(`알 수 없는 AST 노드 타입: ${e.type}`)}}evaluateColumnRef(e,t){let n;return n=e.isBinding?e.name:this.columnMap.get(e.name)||e.name,n in t?t[n]:e.name in t?t[e.name]:null}evaluateBinaryOp(e,t){let n=this.evaluate(e.left,t),o=this.evaluate(e.right,t);if(["<",">","<=","≤",">=","≥"].includes(e.operator)){const t="ColumnRef"===e.left.type?this.getColumnDataType(e.left):void 0,i="ColumnRef"===e.right.type?this.getColumnDataType(e.right):void 0;if(t===de||i===de)return!1;if(!("ColumnRef"===e.left.type&&"ColumnRef"===e.right.type)){if(t===he&&"string"==typeof o)return!1;if(i===he&&"string"==typeof n)return!1}}if(["=","==","!=","≠","<>","<",">","<=","≤",">=","≥","CONTAINS","NOT_CONTAINS","STARTS_WITH","ENDS_WITH","LIKE"].includes(e.operator)){if("ColumnRef"===e.left.type){const t=this.getColumnDataType(e.left);o=this.coerceValueByColumnType(o,t)}if("ColumnRef"===e.right.type){const t=this.getColumnDataType(e.right);n=this.coerceValueByColumnType(n,t)}}switch(e.operator){case"AND":return this.toBoolean(n)&&this.toBoolean(o);case"OR":return this.toBoolean(n)||this.toBoolean(o);case"=":case"==":return this.isEqual(n,o);case"!=":case"≠":case"<>":return!this.isEqual(n,o);case"<":return this.compare(n,o)<0;case">":return this.compare(n,o)>0;case"<=":case"≤":return this.compare(n,o)<=0;case">=":case"≥":return this.compare(n,o)>=0;case"+":return"string"==typeof n||"string"==typeof o?String(n??"")+String(o??""):this.toNumber(n)+this.toNumber(o);case"-":return this.toNumber(n)-this.toNumber(o);case"*":return this.toNumber(n)*this.toNumber(o);case"/":const t=this.toNumber(o);return 0===t?null:this.toNumber(n)/t;case"%":return this.toNumber(n)%this.toNumber(o);case"CONTAINS":{const e=this.toStringForComparison(o);return""!==e&&this.toStringForComparison(n).toLowerCase().includes(e.toLowerCase())}case"NOT_CONTAINS":{const e=this.toStringForComparison(o);return""!==e&&!this.toStringForComparison(n).toLowerCase().includes(e.toLowerCase())}case"STARTS_WITH":{const e=this.toStringForComparison(o);return""!==e&&this.toStringForComparison(n).toLowerCase().startsWith(e.toLowerCase())}case"ENDS_WITH":{const e=this.toStringForComparison(o);return""!==e&&this.toStringForComparison(n).toLowerCase().endsWith(e.toLowerCase())}case"LIKE":{const e=this.toStringForComparison(o);return""!==e&&this.matchLike(this.toStringForComparison(n),e)}default:throw new Error(`알 수 없는 이항 연산자: ${e.operator}`)}}evaluateUnaryOp(e,t){const n=this.evaluate(e.operand,t);switch(e.operator){case"NOT":case"!":return!this.toBoolean(n);case"-":return-this.toNumber(n);default:throw new Error(`알 수 없는 단항 연산자: ${e.operator}`)}}evaluatePostfixOp(e,t){const n=this.evaluate(e.operand,t);switch(e.operator){case"IS_EMPTY":return this.isEmpty(n);case"IS_NOT_EMPTY":return!this.isEmpty(n);default:throw new Error(`알 수 없는 후위 연산자: ${e.operator}`)}}evaluateFunctionCall(e,t){const n=e.args.map(e=>this.evaluate(e,t));switch(e.name){case"ABS":return Math.abs(this.toNumber(n[0]));case"ROUND":const t=n.length>1?this.toNumber(n[1]):0,o=Math.pow(10,t);return Math.round(this.toNumber(n[0])*o)/o;case"FLOOR":return Math.floor(this.toNumber(n[0]));case"CEIL":return Math.ceil(this.toNumber(n[0]));case"MIN":return Math.min(...n.map(e=>this.toNumber(e)));case"MAX":return Math.max(...n.map(e=>this.toNumber(e)));case"LEN":return String(n[0]??"").length;case"UPPER":return String(n[0]??"").toUpperCase();case"LOWER":return String(n[0]??"").toLowerCase();case"TRIM":return String(n[0]??"").trim();case"LEFT":return String(n[0]??"").substring(0,this.toNumber(n[1]));case"RIGHT":const i=String(n[0]??""),r=this.toNumber(n[1]);return i.substring(i.length-r);case"NOW":return new Date;case"TODAY":const a=new Date;return a.setHours(0,0,0,0),a;case"DAYS":const l=this.toDate(n[0]),s=this.toDate(n[1]);return l&&s?Math.floor((l.getTime()-s.getTime())/864e5):null;case"IF":return this.toBoolean(n[0])?n[1]:n[2];case"COALESCE":for(const e of n)if(!this.isEmpty(e))return e;return null;case"CONCAT":return n.map(e=>String(e??"")).join("");default:throw new Error(`알 수 없는 함수: ${e.name}`)}}toBoolean(e){return null!=e&&("boolean"==typeof e?e:"number"==typeof e?0!==e:"string"!=typeof e||e.length>0&&"false"!==e.toLowerCase())}toNumber(e){if(null==e)return 0;if("number"==typeof e)return e;if("boolean"==typeof e)return e?1:0;const t=String(e).replace(/,/g,""),n=parseFloat(t);return isNaN(n)?0:n}toDate(e){if(null==e)return null;if(e instanceof Date)return e;if("number"==typeof e)return null;if("string"==typeof e){const t=e.trim();if(/^\d+$/.test(t))return null;if(/^\d+\.\d+$/.test(t))return null}const t=new Date(e);return isNaN(t.getTime())?null:t}formatDateString(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}toDateString(e){if(null==e)return"";if(e instanceof Date)return this.formatDateString(e);const t=this.toDate(e);return t?this.formatDateString(t):String(e)}toStringForComparison(e){if(null==e)return"";if(e instanceof Date)return this.formatDateString(e);const t=this.toDate(e);return t?this.formatDateString(t):String(e)}isEmpty(e){return null==e||"string"==typeof e&&0===e.trim().length}isEqual(e,t){if(null==e)return null==t;if(null==t)return!1;const n="string"==typeof e&&""===e.trim(),o="string"==typeof t&&""===t.trim();if("number"==typeof e&&o||"number"==typeof t&&n)return!1;if(e instanceof Date||t instanceof Date){const n=this.toDate(e),o=this.toDate(t);if(n&&o)return this.formatDateString(n)===this.formatDateString(o);const i=this.toDateString(e),r=this.toDateString(t);return i.toLowerCase()===r.toLowerCase()}const i=this.toDate(e),r=this.toDate(t);if(i&&r)return this.formatDateString(i)===this.formatDateString(r);if(typeof e==typeof t)return e===t;const a=parseFloat(String(e).replace(/,/g,"")),l=parseFloat(String(t).replace(/,/g,""));return n||o||isNaN(a)||isNaN(l)?String(e).toLowerCase()===String(t).toLowerCase():a===l}compare(e,t){if(null==e)return null==t?0:-1;if(null==t)return 1;const n="string"==typeof e&&""===e.trim(),o="string"==typeof t&&""===t.trim(),i="number"==typeof e||"string"==typeof e&&""!==e.trim()&&!isNaN(parseFloat(e)),r="number"==typeof t||"string"==typeof t&&""!==t.trim()&&!isNaN(parseFloat(t));if(i&&o||r&&n)return NaN;const a=this.toDate(e),l=this.toDate(t);if(a&&l)return a.getTime()-l.getTime();if("number"==typeof e&&"number"==typeof t)return e-t;const s=parseFloat(String(e).replace(/,/g,"")),u=parseFloat(String(t).replace(/,/g,""));return isNaN(s)||isNaN(u)?String(e).localeCompare(String(t)):s-u}matchLike(e,t){const n=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/%/g,".*").replace(/_/g,".");return new RegExp(`^${n}$`,"i").test(e)}}class xe{constructor(e=[]){t(this,"columns"),this.columns=e}setColumns(e){this.columns=e}parse(e){try{if(!e||0===e.trim().length)return{success:!1,error:"수식이 비어있습니다."};const t=new ve(e).tokenize(),n=new me(t);return{success:!0,ast:n.parse()}}catch(t){return{success:!1,error:t.message,errorPosition:this.extractPosition(t.message)}}}validate(e){const t=this.parse(e);if(!t.success)return{...t,error:this.toFriendlyErrorMessage(t.error??"수식이 올바르지 않습니다.")};try{return this.validateColumnRefs(t.ast),this.validateOperatorTypes(t.ast),t}catch(n){return{success:!1,error:this.toFriendlyErrorMessage((null==n?void 0:n.message)??"알 수 없는 수식 오류가 발생했습니다.")}}}evaluate(e,t){const n=this.parse(e);if(!n.success)return{success:!1,error:n.error};try{const e=new ye(this.columns);return{success:!0,value:e.evaluate(n.ast,t)}}catch(o){return{success:!1,error:o.message}}}evaluateAST(e,t){try{const n=new ye(this.columns);return{success:!0,value:n.evaluate(e,t)}}catch(n){return{success:!1,error:n.message}}}getReferencedColumns(e){const t=this.parse(e);if(!t.success)return[];const n=new Set;return this.collectColumnRefs(t.ast,n),Array.from(n)}validateColumnRefs(e){switch(e.type){case"ColumnRef":break;case"BinaryOp":this.validateColumnRefs(e.left),this.validateColumnRefs(e.right);break;case"UnaryOp":case"PostfixOp":this.validateColumnRefs(e.operand);break;case"FunctionCall":for(const t of e.args)this.validateColumnRefs(t)}}inferNodeType(e){if("Literal"===e.type)switch(e.dataType){case"number":return"number";case"string":return"string";case"date":return"date";case"boolean":return"boolean";default:return"unknown"}if("ColumnRef"===e.type){const t=this.columns.find(t=>e.isBinding?t.binding===e.name:t.header===e.name);switch(null==t?void 0:t.dataType){case he:return"number";case de:return"string";case fe:return"date";case pe:return"boolean";default:return"unknown"}}return"unknown"}validateOperatorTypes(e){const t=e=>{if("BinaryOp"===e.type){const n=e.operator.toUpperCase(),o=["=","==","!=","≠","<>","<",">","<=","≤",">=","≥"],i=["CONTAINS","NOT_CONTAINS","STARTS_WITH","ENDS_WITH","LIKE"];if(o.includes(n)||i.includes(n)){const t=this.inferNodeType(e.left),r=this.inferNodeType(e.right);if("unknown"===t&&"unknown"===r);else if(i.includes(n)){if("string"!==t&&"date"!==t&&"string"!==r&&"date"!==r)throw new Error("문자열 연산자는 문자열 또는 날짜 값에만 사용할 수 있습니다. (CONTAINS, STARTS_WITH 등)")}else if(o.includes(n)&&["<",">","<=","≤",">=","≥"].includes(n)){const e=e=>"number"===e,n=e=>"date"===e,o=e(t)&&e(r),i=n(t)&&n(r);if(!o&&!i)throw new Error("크기 비교 연산자는 숫자 또는 날짜 값끼리만 사용할 수 있습니다. (<, >, <=, >=)")}}return t(e.left),void t(e.right)}if("UnaryOp"!==e.type)if("PostfixOp"!==e.type){if("FunctionCall"===e.type)for(const n of e.args)t(n)}else t(e.operand);else t(e.operand)};t(e)}collectColumnRefs(e,t){switch(e.type){case"ColumnRef":t.add(e.name);break;case"BinaryOp":this.collectColumnRefs(e.left,t),this.collectColumnRefs(e.right,t);break;case"UnaryOp":case"PostfixOp":this.collectColumnRefs(e.operand,t);break;case"FunctionCall":for(const n of e.args)this.collectColumnRefs(n,t)}}extractPosition(e){const t=e.match(/위치:\s*(\d+)/);return t?parseInt(t[1],10):void 0}toFriendlyErrorMessage(e){const t=e.match(/위치:\s*(\d+)/),n=t?Number(t[1]):void 0,o=void 0!==n?` (오류 위치: ${n})`:"";return e.includes("예상치 못한 토큰")&&e.includes("EOF")?`수식이 중간에 끝났습니다. 연산자 뒤에는 값이나 컬럼 조건이 더 필요합니다.${o}`:e.includes("예상치 못한 토큰")?`수식에 잘못된 기호나 토큰이 있습니다. 괄호, 연산자, 따옴표 위치를 다시 확인해 주세요.${o}`:e.includes("문자열이 닫히지 않았습니다")?`문자열 형식이 올바르지지 않았습니다. "값" 또는 '값' 처럼 양쪽 따옴표를 모두 입력해 주세요.${o}`:e.includes("날짜 리터럴이 닫히지 않았습니다")?`날짜 형식이 올바르지 않았습니다. #2025-01-01# 형식으로 앞뒤에 #을 모두 입력해 주세요.${o}`:e.includes("유효하지 않은 날짜 형식입니다")?`날짜는 #YYYY-MM-DD# 또는 #YYYY-MM-DD HH:mm:ss# 형식으로 입력해 주세요.${o}`:e.includes("알 수 없는 식별자")?`컬럼은 [컬럼명], 문자열은 "값" 또는 '값' 형식으로 입력해 주세요.${o}`:e}}function _e(){const e=n.ref(!1),t=n.ref(null),o=n.shallowRef({ruleSets:[]});let i=null;const r=new xe,a=new Map;function l(){var e,t;if(i)try{const n=null==(e=i.getFields)?void 0:e.call(i);let o=n&&n.length>0?n:[];if(0===o.length){const e=null==(t=i.getPivotFields)?void 0:t.call(i);e&&(o=[...e.rowFields,...e.columnFields,...e.valueFields,...e.filterFields])}const a={String:1,Number:2,Boolean:3,Date:4},l={string:a.String,number:a.Number,boolean:a.Boolean,date:a.Date},s=o.map(e=>({header:e.header??e.id,binding:e.id,dataType:l[e.dataType]??a.String}));r.setColumns(s)}catch{}}function u(){if(!i)return;const e=o.value.ruleSets.filter(e=>!1!==e.enabled).sort((e,t)=>e.priority-t.priority);i.formatRow.addHandler("_customCell",t=>{var n,o;if("data"!==t.type)return;const r=(null==(o=null==(n=null==i?void 0:i.pivot)?void 0:n.getConfig)?void 0:o.call(n))??null;r?function(e,t,n){var o;const i=n.rowFields,r=n.columnFields,a=n.valueFields,l=r.length,u=new Map;for(const c of a)u.set(s.getValueFieldKey(c,a),c.field);for(const s of Object.keys(t.cells)){const e=t.cells[s];(null==e?void 0:e.element)&&(e.element.style.backgroundColor="",e.element.style.color="")}for(const[d,h]of Object.entries(t.cells)){if(!(null==h?void 0:h.element))continue;const{path:n,valueField:a}=s.parsePivotcolumnId(d,l),p=u.get(a);if(!p)continue;const f={};for(const e of i)f[e.field]=t.data[e.field];for(let e=0;e<r.length;e++)f[r[e].field]=n[e];let g,v;f[p]=h.value;for(const t of e){if((null==(o=t.targetColumns)?void 0:o.length)&&!t.targetColumns.includes(p))continue;c(t,f)&&(t.backgroundColor&&(g=t.backgroundColor),t.textColor&&(v=t.textColor))}g&&(h.element.style.backgroundColor=g),v&&(h.element.style.color=v)}}(e,t.ctx,r):function(e,t){var n;const o=t.data;for(const i of Object.keys(t.cells)){const e=t.cells[i];(null==e?void 0:e.element)&&(e.element.style.backgroundColor="",e.element.style.color="")}for(const i of e){if(!c(i,o))continue;const e=(null==(n=i.targetColumns)?void 0:n.length)?i.targetColumns:Object.keys(t.cells);for(const n of e){const e=t.cells[n];(null==e?void 0:e.element)&&(i.backgroundColor&&(e.element.style.backgroundColor=i.backgroundColor),i.textColor&&(e.element.style.color=i.textColor))}}}(e,t.ctx)},{priority:10}),i.refresh()}function c(e,t){if("formula"===e.mode)return!(!e.formula||0===e.formula.trim().length)&&function(e,t){if(!e||0===e.trim().length)return!1;try{let n=a.get(e);if(void 0===n){const t=r.parse(e);if(!t.success||!t.ast)return a.set(e,null),!1;n=t.ast,a.set(e,n)}if(!n)return!1;if("ColumnRef"===n.type||"Literal"===n.type)return!1;const o=r.evaluateAST(n,t);return!!o.success&&Boolean(o.value)}catch{return!1}}(e.formula,t);if(!e.rules||0===e.rules.length)return!1;let n=we(e.rules[0],t);for(let o=1;o<e.rules.length;o++){const i=e.rules[o],r=we(i,t);n="OR"===i.logical?n||r:n&&r}return n}return{showCustomCell:e,hitColumn:t,config:o,showCustomCellHandler:function(n){n&&(t.value=n),e.value=!0},hideCustomCellHandler:function(){e.value=!1},setGrid:function(e){i=e,l()},setCustomCell:function(e){o.value={ruleSets:[...e.ruleSets]},a.clear(),l(),u()},getCustomCell:function(){return{ruleSets:[...o.value.ruleSets]}},applyCellStyle:u,clearCustomCell:function(){o.value={ruleSets:[]},a.clear(),u()},destroy:function(){i=null,o.value={ruleSets:[]},e.value=!1}}}function we(e,t){return function(e,t,n){switch(n){case"∅":return null==e||""===e;case"●":return null!=e&&""!==e;case"=":return String(e)===String(t);case"≠":return String(e)!==String(t);case"%":return String(e??"").toLowerCase().includes(String(t??"").toLowerCase());case"!%":return!String(e??"").toLowerCase().includes(String(t??"").toLowerCase());case">":return Number(e)>Number(t);case"≥":return Number(e)>=Number(t);case"<":return Number(e)<Number(t);case"≤":return Number(e)<=Number(t);default:return!1}}(t[e.binding],e.variable,e.comparison)}function be(){const e=n.ref(!1),t=n.ref(null),o=n.ref(""),i=n.ref("");let r=null,a=null;function l(){e.value=!1}return{showBulkEditor:e,hitColumn:t,bulkEditorValue:o,currentCellValue:i,show:function(n,a,l){r=n,a&&(t.value=a),void 0!==l&&(i.value=l,o.value=l),e.value=!0},hide:l,modifyValue:function(e){o.value=e},executeEdit:async function(){if(!r||!t.value)return 0;const e=t.value.id,n=o.value;if(a){const t=await a(e,n);return l(),t}const i=await r.changes.bulkUpdate(e,n,"all");return l(),i},setBulkUpdateHandler:function(e){a=e},destroy:function(){r=null,t.value=null,o.value="",e.value=!1,a=null}}}let Se=!1;function Ce(e){!function(){if(Se)return;Se=!0;const e=document.createElement("style");e.textContent="\n.ps-search-hl {\n background-color: #d1ee12;\n color: inherit;\n border-radius: 1px;\n}\n.ps-search-match-current .ps-search-hl {\n background-color: #76c690;\n color: #fff;\n}",document.head.appendChild(e)}();let t=null;n.watch(()=>e.value,e=>{null==t||t(),t=null,e&&(t=e.on("search:highlighted",()=>{!function(e){const t=e.getSearchState(),n=e.container;if(!n)return;const o=new Set;if(n.querySelectorAll("mark.ps-search-hl").forEach(e=>{const t=e.parentElement;t&&o.add(t)}),o.forEach(e=>{e.textContent=e.textContent??""}),!t.keyword)return;const i=t.keyword.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),r=new RegExp(`(${i})`,"gi"),a=Array.from(n.querySelectorAll(".ps-search-match .ps-cell-content"));for(const l of a){if(l.children.length>0)continue;const e=(l.textContent??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),t=e.replace(r,'<mark class="ps-search-hl">$&</mark>');t!==e&&(l.innerHTML=t)}}(e)}))},{immediate:!0}),n.onBeforeUnmount(()=>{null==t||t(),t=null})}let Me=null,Te=null,Ie=null,ke=null;function De(){Ie&&ke&&(Ie.removeEventListener("pointerleave",ke),Ie.removeEventListener("pointercancel",ke)),Ie=null,ke=null}function Ne(){Te&&(clearTimeout(Te),Te=null),De(),Me&&(Me.style.opacity="0",Te=setTimeout(()=>{Me&&(Me.style.visibility="hidden")},120))}function Ee(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function Ae(e){const t=function(e){return e.hasError&&e.errors&&e.errors.length>0?e.errors.map(e=>Ee(e)).join("<br />"):Ee(e.formattedValue??"")}(e);if(!t)return void Ne();Te&&(clearTimeout(Te),Te=null);const n=(Me||(Me=document.createElement("div"),Me.className="moz-grid-tooltip",Me.setAttribute("role","tooltip"),Me.style.opacity="0",Me.style.visibility="hidden",document.body.appendChild(Me)),Me);n.classList.toggle("moz-grid-tooltip--error",e.hasError),n.innerHTML=t,e.element.title&&(e.element.title=""),n.style.visibility="hidden",n.style.opacity="0",requestAnimationFrame(()=>{Me&&(!function(e,t){const n=e.getBoundingClientRect();let o=t.left,i=t.bottom+2;const r=window.innerWidth-n.width-4;o>r&&(o=r),o<4&&(o=4),i+n.height>window.innerHeight-4&&(i=t.top-n.height-2),i<4&&(i=4),e.style.left=`${Math.round(o)}px`,e.style.top=`${Math.round(i)}px`}(Me,e.cellRect),Me.style.visibility="visible",Me.style.opacity="1")}),De(),Ie=e.element,ke=()=>Ne(),Ie.addEventListener("pointerleave",ke),Ie.addEventListener("pointercancel",ke)}function Le(e){const t=[];function o(){for(var e;t.length>0;)try{null==(e=t.pop())||e()}catch{}Ne()}n.watch(e,e=>{o(),e&&function(e){t.push(e.on("cell:tooltip",e=>Ae(e))),t.push(e.on("scroll",()=>Ne())),t.push(e.on("cell:click",()=>Ne())),t.push(e.on("selection:changed",()=>Ne())),t.push(e.on("contextmenu",()=>Ne()))}(e)},{immediate:!0}),n.onBeforeUnmount(()=>{o()})}const Ve=n.defineComponent({__name:"MozGridVueCore",props:{fields:{},data:{},mode:{default:"flat"},pivotRowFields:{},pivotColumnFields:{},pivotValueFields:{},height:{default:"100%"},keyFields:{},theme:{},rowHeight:{default:32},headerHeight:{default:32},showHeader:{type:Boolean,default:!0},resizableColumns:{type:Boolean,default:!0},reorderableColumns:{type:Boolean,default:!0},showRowHeader:{type:[Boolean,Object]},rowHeader:{type:[Boolean,Object]},rowSelection:{},cellSelection:{default:()=>({mode:"range"})},cellSelectionImpliesRows:{type:Boolean},editable:{type:Boolean,default:!1},tooltipMode:{default:"overflow"},alternatingRows:{type:Boolean,default:!0},autoFitColumns:{type:Boolean},dynamicRowHeights:{type:Boolean,default:!1},reorderableRows:{type:Boolean,default:!1},locale:{},engine:{},useWorker:{type:Boolean},loader:{},preventKeyEdit:{type:Boolean},showStatusBar:{type:Boolean},showDragHandleColumn:{type:Boolean},undoStack:{},formatRow:{},translations:{},rowStyle:{},headerStyle:{},rowHeightChangeThreshold:{},group:{},columnGroups:{},rowTemplate:{}},emits:["ready","data:loaded","row:click","row:dblclick","row:pinned","row:unpinned","row:reordered","cell:click","cell:dblclick","cell:change","cell:beforeEdit","cell:editCommitting","cell:editCommitted","cell:tooltip","selection:changed","column:resize","column:reorder","column:pin","column:visibility","sort:changed","filter:changed","scroll","undo:stateChange","clipboard:copy","clipboard:paste","validation:changed","columnGroup:toggle","contextmenu"],setup(e,{expose:t,emit:i}){const r=e,a=i,l=n.ref(),u=n.shallowRef(null),c=new O,d=B(),h=[],p=le(),f=ce(),g=_e(),v=be();Ce(u),Le(u);const m=P();c.setAppContext(m),n.provide(z,u),n.provide(G,c),n.provide(H,d),n.provide(W,p),n.provide(U,f),n.provide(Y,g),n.provide(Z,v),n.provide(F,l);const y=n.ref(!1);async function x(){if(!l.value)return;const e=function(){const e={};"pivot"===r.mode?(e.mode="pivot",e.rowFields=r.pivotRowFields??[],e.columnFields=r.pivotColumnFields??[],e.valueFields=r.pivotValueFields??[]):e.fields=R(r.fields,d,c);for(const t of ie){const n=r[t];void 0!==n&&(e[t]=n)}if("pivot"!==r.mode)for(const t of re){const n=r[t];void 0!==n&&(e[t]=n)}return e.migrateConfig=o.createConfigMigrator(o.gridFormulaColumns(()=>u.value)),e}(),t=new s.PureSheet(l.value,e);n.markRaw(t),function(e){for(const t of ae){const n=e.on(t,e=>{a(t,e)});h.push(n)}}(t),p.setGrid(t),f.setGrid(t),g.setGrid(t),await t.waitForReady(),u.value=t,y.value=!0,r.data&&r.data.length>0&&await t.loadData(n.toRaw(r.data)),a("ready",t)}function _(){y.value=!1,function(){for(const e of h)e();h.length=0}(),c.unmountAll(),p.destroy(),f.destroy(),g.destroy(),v.destroy(),u.value&&(u.value.destroy(),u.value=null)}return n.watch(l,async e=>{e&&!u.value&&await x()}),n.watch(()=>r.data,async e=>{if(u.value&&y.value&&e)try{await u.value.loadData(n.toRaw(e))}catch(t){}}),n.watch(()=>r.fields,async e=>{if(!u.value||!y.value)return;const t=R(e,d,c);await u.value.updateFields(t)}),n.onBeforeUnmount(()=>{_()}),n.onActivated(async()=>{var e;await n.nextTick(),null==(e=u.value)||e.notifyResize()}),t({grid:u,containerRef:l,setContainer:function(e){l.value=e??void 0},filterModule:p,sortModule:f,customCellModule:g,bulkEditorModule:v,refresh:async()=>{var e;return null==(e=u.value)?void 0:e.refresh()},loadData:async e=>{var t;return null==(t=u.value)?void 0:t.loadData(n.toRaw(e))},sort:async e=>{var t;return null==(t=u.value)?void 0:t.sort(e)},filter:async e=>{var t;return null==(t=u.value)?void 0:t.filter(e)},destroy:_}),(e,t)=>n.renderSlot(e.$slots,"default")}}),Oe=["width","height"],Pe=["stroke"],Be=["stroke"],Re=["width","height"],ze={"clip-path":"url(#clip0_734_2114)"},Fe=["fill"],Ge=["fill"],He={id:"clip0_734_2114"},We=["fill"],Ue=n.defineComponent({__name:"IconAdd",props:{size:{default:"12"},color:{default:"#8998b5"},disabled:{type:Boolean,default:!1}},setup(e){const t=e,{size:o,color:i}=n.toRefs(t),r=n.computed(()=>({10:{width:10,height:10},12:{width:12,height:12},14:{width:14,height:14},16:{width:16,height:16},18:{width:18,height:18},20:{width:20,height:20},22:{width:22,height:22},30:{width:30,height:30}}[o.value]??{width:12,height:12}));return(t,o)=>r.value.width<=13?(n.openBlock(),n.createElementBlock("svg",{key:0,xmlns:"http://www.w3.org/2000/svg",width:r.value.width,height:r.value.height,viewBox:"0 0 12 12"},[n.createElementVNode("path",{"data-name":"선 117",transform:"translate(6 1.424)",stroke:e.disabled?"#a7b1bc":n.unref(i),style:{strokeLinecap:"round",strokeWidth:"1.75px",fill:"none"},d:"M0 0v9.152"},null,8,Pe),n.createElementVNode("path",{"data-name":"선 118",transform:"translate(1.424 6)",stroke:e.disabled?"#a7b1bc":n.unref(i),style:{strokeLinecap:"round",strokeWidth:"1.75px",fill:"none"},d:"M0 0h9.152"},null,8,Be)],8,Oe)):r.value.width>=14?(n.openBlock(),n.createElementBlock("svg",{key:1,xmlns:"http://www.w3.org/2000/svg",width:r.value.width,height:r.value.height,viewBox:"0 0 14 14",fill:"none"},[n.createElementVNode("g",ze,[n.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.99998 1.1C7.49703 1.1 7.89998 1.50294 7.89998 2V12C7.89998 12.4971 7.49703 12.9 6.99998 12.9C6.50292 12.9 6.09998 12.4971 6.09998 12V2C6.09998 1.50294 6.50292 1.1 6.99998 1.1Z",fill:e.disabled?"#a7b1bc":n.unref(i)},null,8,Fe),n.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1.09998 7C1.09998 6.50294 1.50292 6.1 1.99998 6.1H12C12.497 6.1 12.9 6.50294 12.9 7C12.9 7.49705 12.497 7.9 12 7.9H1.99998C1.50292 7.9 1.09998 7.49705 1.09998 7Z",fill:e.disabled?"#a7b1bc":n.unref(i)},null,8,Ge)]),n.createElementVNode("defs",null,[n.createElementVNode("clipPath",He,[n.createElementVNode("rect",{width:"14",height:"14",fill:e.disabled?"#a7b1bc":n.unref(i)},null,8,We)])])],8,Re)):n.createCommentVNode("",!0)}}),Ye=["width","height"],Ze=["fill"],Xe=n.defineComponent({__name:"IconArrowDownWithTail",props:{size:{default:"30"},color:{default:"#8998b5"},disabled:{type:Boolean,default:!1}},setup(e){const t=e,{size:o,color:i}=n.toRefs(t);return(e,t)=>(n.openBlock(),n.createElementBlock("svg",{width:n.unref(o),height:n.unref(o),viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[n.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.30934 11.7139C5.69078 12.0954 6.30922 12.0954 6.69066 11.7139L11.7139 6.69066C12.0954 6.30922 12.0954 5.69078 11.7139 5.30934C11.3325 4.9279 10.714 4.9279 10.3326 5.30934L6.97674 8.66519V0.9767C6.97674 0.4373 6.53944 0 6 0C5.46056 0 5.02326 0.4373 5.02326 0.9767V8.66519L1.66741 5.30934C1.28596 4.9279 0.667524 4.9279 0.286082 5.30934C-0.0953606 5.69078 -0.0953606 6.30922 0.286082 6.69066L5.30934 11.7139Z",fill:n.unref(i)},null,8,Ze)],8,Ye))}}),je=["width","height"],$e=["stroke"],qe=n.defineComponent({__name:"IconArrowLeft",props:{size:{default:"14"},color:{default:"#A7B1BC"},thin:{type:Boolean,default:!1}},setup(e){const t=e,{size:o,color:i}=n.toRefs(t),r=n.computed(()=>({10:{width:10,height:10},12:{width:12,height:12},14:{width:14,height:14},16:{width:16,height:16},18:{width:18,height:18},20:{width:20,height:20},22:{width:22,height:22},30:{width:30,height:30}}[o.value]??{width:12,height:12}));return(e,t)=>(n.openBlock(),n.createElementBlock("svg",{width:r.value.width,height:r.value.height,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[n.createElementVNode("path",{d:"M9.02197 2.91599L4.97803 7.05222L9.02197 11.0849",stroke:n.unref(i),"stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},null,8,$e)],8,je))}}),Ke=["width","height"],Je=["fill"],Qe=["width","height"],et=["fill"],tt=n.defineComponent({__name:"IconArrowLeftWithTail",props:{size:{default:"12"},color:{default:"#8998b5"},disabled:{type:Boolean,default:!1}},setup(e){const t=e,{size:o,color:i}=n.toRefs(t),r=n.computed(()=>({10:{width:10,height:10},12:{width:12,height:12},14:{width:14,height:14},16:{width:16,height:16},18:{width:18,height:18},20:{width:20,height:20},22:{width:22,height:22},30:{width:30,height:30}}[o.value]??{width:12,height:12}));return(t,o)=>r.value.width<=13?(n.openBlock(),n.createElementBlock("svg",{key:0,width:r.value.width,height:r.value.height,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[n.createElementVNode("path",{d:"M3.05618 7.9173L7.46067 12.4415C7.64045 12.6261 7.72659 12.8416 7.7191 13.0878C7.71161 13.334 7.61798 13.5494 7.4382 13.7341C7.25843 13.9034 7.04869 13.9918 6.80899 13.9995C6.56929 14.0072 6.35955 13.9187 6.17978 13.7341L0.247191 7.64031C0.157303 7.54798 0.093633 7.44795 0.0561798 7.34024C0.0187266 7.23252 0 7.11711 0 6.994C0 6.87089 0.0187266 6.75548 0.0561798 6.64776C0.093633 6.54004 0.157303 6.44002 0.247191 6.34769L6.17978 0.253908C6.34457 0.0846358 6.55056 0 6.79775 0C7.04494 0 7.25843 0.0846358 7.4382 0.253908C7.61798 0.438568 7.70787 0.657851 7.70787 0.911759C7.70787 1.16567 7.61798 1.38495 7.4382 1.56961L3.05618 6.0707H13.1011C13.3558 6.0707 13.5693 6.15918 13.7416 6.33615C13.9139 6.51311 14 6.7324 14 6.994C14 7.2556 13.9139 7.47488 13.7416 7.65185C13.5693 7.82882 13.3558 7.9173 13.1011 7.9173H3.05618Z",fill:e.disabled?"#a7b1bc":n.unref(i)},null,8,Je)],8,Ke)):r.value.width>=14?(n.openBlock(),n.createElementBlock("svg",{key:1,width:r.value.width,height:r.value.height,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[n.createElementVNode("path",{d:"M3.05618 7.9173L7.46067 12.4415C7.64045 12.6261 7.72659 12.8416 7.7191 13.0878C7.71161 13.334 7.61798 13.5494 7.4382 13.7341C7.25843 13.9034 7.04869 13.9918 6.80899 13.9995C6.56929 14.0072 6.35955 13.9187 6.17978 13.7341L0.247191 7.64031C0.157303 7.54798 0.093633 7.44795 0.0561798 7.34024C0.0187266 7.23252 0 7.11711 0 6.994C0 6.87089 0.0187266 6.75548 0.0561798 6.64776C0.093633 6.54004 0.157303 6.44002 0.247191 6.34769L6.17978 0.253908C6.34457 0.0846358 6.55056 0 6.79775 0C7.04494 0 7.25843 0.0846358 7.4382 0.253908C7.61798 0.438568 7.70787 0.657851 7.70787 0.911759C7.70787 1.16567 7.61798 1.38495 7.4382 1.56961L3.05618 6.0707H13.1011C13.3558 6.0707 13.5693 6.15918 13.7416 6.33615C13.9139 6.51311 14 6.7324 14 6.994C14 7.2556 13.9139 7.47488 13.7416 7.65185C13.5693 7.82882 13.3558 7.9173 13.1011 7.9173H3.05618Z",fill:e.disabled?"#a7b1bc":n.unref(i)},null,8,et)],8,Qe)):n.createCommentVNode("",!0)}}),nt=["width","height"],ot=["fill"],it=["width","height"],rt=["fill"],at=n.defineComponent({__name:"IconArrowRight",props:{size:{default:"10"},color:{default:"#8998b5"},disabled:{type:Boolean,default:!1}},setup(e){const t=e,{size:o,color:i}=n.toRefs(t),r=n.computed(()=>({10:{width:10,height:10},12:{width:12,height:12},14:{width:14,height:14},16:{width:16,height:16},18:{width:18,height:18},20:{width:20,height:20},22:{width:22,height:22},30:{width:30,height:30}}[o.value]??{width:12,height:12}));return(t,o)=>r.value.width<=10?(n.openBlock(),n.createElementBlock("svg",{key:0,xmlns:"http://www.w3.org/2000/svg",width:r.value.width,height:r.value.height,viewBox:"0 0 10 10",fill:"none"},[n.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.72661 8.48896C3.41073 8.18004 3.40509 7.67354 3.71401 7.35766L6.04911 4.96997L3.72108 2.64854C3.40822 2.33656 3.4075 1.83003 3.71948 1.51717C4.03145 1.2043 4.53798 1.20359 4.85085 1.51556L7.73988 4.39642C8.0506 4.70626 8.05375 5.20855 7.74695 5.52226L4.85791 8.47636C4.54899 8.79224 4.04249 8.79788 3.72661 8.48896Z",fill:e.disabled?"#a7b1bc":n.unref(i)},null,8,ot)],8,nt)):r.value.width>10?(n.openBlock(),n.createElementBlock("svg",{key:1,width:r.value.width,height:r.value.height,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[n.createElementVNode("path",{id:"패스 3253 (Stroke)","fill-rule":"evenodd","clip-rule":"evenodd",d:"M9.66551 6.42279C10.0106 6.77571 10.007 7.34071 9.65753 7.68925L5.61353 11.7223C5.26158 12.0732 4.69173 12.0725 4.34073 11.7205C3.98974 11.3686 3.99052 10.7987 4.34247 10.4477L7.75547 7.04401L4.33448 3.54519C3.98699 3.18979 3.9934 2.61998 4.3488 2.27248C4.7042 1.92498 5.27401 1.93139 5.62151 2.28679L9.66551 6.42279Z",fill:e.disabled?"#a7b1bc":n.unref(i)},null,8,rt)],8,it)):n.createCommentVNode("",!0)}}),lt=["width","height"],st=["stroke"],ut=["width","height"],ct=["stroke"],dt=n.defineComponent({__name:"IconArrowUpCenter",props:{size:{default:"12"},color:{default:"#8998b5"},thin:{type:Boolean,default:!1}},setup(e){const t=e,{size:o,color:i}=n.toRefs(t),r=n.computed(()=>({10:{width:10,height:10},12:{width:12,height:12},14:{width:14,height:14},16:{width:16,height:16},18:{width:18,height:18},20:{width:20,height:20},22:{width:22,height:22},30:{width:30,height:30}}[o.value]??{width:12,height:12}));return(t,o)=>e.thin?e.thin?(n.openBlock(),n.createElementBlock("svg",{key:1,width:r.value.width,height:r.value.height,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[n.createElementVNode("path",{d:"M12.6679 10.3144L7.94084 5.70239L3.33203 10.3144",stroke:n.unref(i),"stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,8,ct)],8,ut)):n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("svg",{key:0,xmlns:"http://www.w3.org/2000/svg",width:r.value.width,height:r.value.height,viewBox:"0 0 12 12",fill:"none"},[n.createElementVNode("path",{d:"M9.50095 7.73636L5.95563 4.27734L2.49902 7.73636",stroke:n.unref(i),"stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},null,8,st)],8,lt))}}),ht=["width","height"],pt=["fill"],ft=n.defineComponent({__name:"IconArrowUpWithTail",props:{size:{default:"30"},color:{default:"#8998b5"},disabled:{type:Boolean,default:!1}},setup(e){const t=e,{size:o,color:i}=n.toRefs(t);return(e,t)=>(n.openBlock(),n.createElementBlock("svg",{width:n.unref(o),height:n.unref(o),viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[n.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.30934 0.286082C5.69078 -0.0953606 6.30922 -0.0953606 6.69066 0.286082L11.7139 5.30934C12.0954 5.69078 12.0954 6.30922 11.7139 6.69066C11.3325 7.0721 10.714 7.0721 10.3326 6.69066L6.97674 3.33481V11.0233C6.97674 11.5627 6.53944 12 6 12C5.46056 12 5.02326 11.5627 5.02326 11.0233V3.33481L1.66741 6.69066C1.28596 7.0721 0.667524 7.0721 0.286082 6.69066C-0.0953606 6.30922 -0.0953606 5.69078 0.286082 5.30934L5.30934 0.286082Z",fill:n.unref(i)},null,8,pt)],8,ht))}}),gt=["width","height"],vt=["fill"],mt=["fill"],yt=n.defineComponent({__name:"IconChart",props:{size:{default:"14"},color:{default:"#8998b5"},disabled:{type:Boolean,default:!1}},setup(e){const t=e,{size:o,color:i}=n.toRefs(t),r=n.computed(()=>({10:{width:10,height:10},12:{width:12,height:12},14:{width:14,height:14},16:{width:16,height:16},18:{width:18,height:18},20:{width:20,height:20},22:{width:22,height:22},30:{width:30,height:30}}[o.value]??{width:12,height:12}));return(e,t)=>(n.openBlock(),n.createElementBlock("svg",{width:r.value.width,height:r.value.height,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[n.createElementVNode("path",{d:"M0.370756 9.33698C0.231288 9.19751 0.164459 9.03189 0.170271 8.84012C0.176082 8.64835 0.24291 8.48854 0.370756 8.3607L4.04923 4.62993C4.31654 4.36262 4.64778 4.22896 5.04293 4.22896C5.43809 4.22896 5.76933 4.36262 6.03665 4.62993L7.8323 6.44301L11.4585 2.85171H10.3427C10.1451 2.85171 9.97952 2.78488 9.84587 2.65123C9.71221 2.51757 9.64538 2.35195 9.64538 2.15437C9.64538 1.95679 9.71221 1.79117 9.84587 1.65752C9.97952 1.52386 10.1451 1.45703 10.3427 1.45703H13.1321C13.3297 1.45703 13.4953 1.52386 13.6289 1.65752C13.7626 1.79117 13.8294 1.95679 13.8294 2.15437V4.94373C13.8294 5.14131 13.7626 5.30693 13.6289 5.44059C13.4953 5.57424 13.3297 5.64107 13.1321 5.64107C12.9345 5.64107 12.7689 5.57424 12.6352 5.44059C12.5016 5.30693 12.4347 5.14131 12.4347 4.94373V3.82799L8.82601 7.43672C8.55869 7.70404 8.22746 7.83769 7.8323 7.83769C7.43714 7.83769 7.1059 7.70404 6.83859 7.43672L5.04293 5.64107L1.34703 9.33698C1.21919 9.46482 1.05647 9.52874 0.858894 9.52874C0.661314 9.52874 0.498602 9.46482 0.370756 9.33698Z",fill:n.unref(i)},null,8,vt),n.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.862305 12.5426V12.543H0.884766H13.1146H13.2129V12.5363C13.5612 12.4884 13.8294 12.1896 13.8294 11.8281C13.8294 11.4667 13.5612 11.1679 13.2129 11.12V11.1191H13.2065C13.1764 11.1153 13.1457 11.1133 13.1146 11.1133C13.0834 11.1133 13.0527 11.1153 13.0226 11.1191H0.976719C0.946614 11.1153 0.915923 11.1133 0.884766 11.1133C0.489968 11.1133 0.169922 11.4333 0.169922 11.8281C0.169922 12.2154 0.477901 12.5308 0.862305 12.5426Z",fill:n.unref(i)},null,8,mt)],8,gt))}}),xt=["width","height"],_t=["stroke"],wt=["stroke"],bt=["width","height"],St=["stroke"],Ct=["stroke"],Mt=["width","height"],Tt=["stroke"],It=["stroke"],kt=["width","height"],Dt={id:"icon_close"},Nt=["fill"],Et=["fill"],At=n.defineComponent({__name:"IconClose",props:{size:{default:"10"},color:{default:"#8998b5"},disabled:{type:Boolean,default:!1},thin:{type:Boolean,default:!1}},setup(e){const t=e,{size:o,color:i,thin:r}=n.toRefs(t),a=n.computed(()=>({10:{width:10,height:10},12:{width:12,height:12},14:{width:14,height:14},16:{width:16,height:16},18:{width:18,height:18},20:{width:20,height:20},22:{width:22,height:22},30:{width:30,height:30}}[o.value]??{width:12,height:12}));return(t,o)=>a.value.width<=10?(n.openBlock(),n.createElementBlock("svg",{key:0,width:a.value.width,height:a.value.height,viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[n.createElementVNode("path",{d:"M8.5 1.5L1.49999 8.50001",stroke:n.unref(i),"stroke-width":"1.75","stroke-linecap":"round"},null,8,_t),n.createElementVNode("path",{d:"M1.5 1.5L8.50001 8.50001",stroke:n.unref(i),"stroke-width":"1.75","stroke-linecap":"round"},null,8,wt)],8,xt)):a.value.width<=13&&a.value.width>=11&&!n.unref(r)?(n.openBlock(),n.createElementBlock("svg",{key:1,width:a.value.width,height:a.value.height,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[n.createElementVNode("path",{d:"M1.71436 1.71428L10.8069 10.7926",stroke:n.unref(i),"stroke-width":"2","stroke-linecap":"round"},null,8,St),n.createElementVNode("path",{d:"M10.8069 1.71428L1.71436 10.7926",stroke:n.unref(i),"stroke-width":"2","stroke-linecap":"round"},null,8,Ct)],8,bt)):a.value.width<=13&&a.value.width>=11&&n.unref(r)?(n.openBlock(),n.createElementBlock("svg",{key:2,width:a.value.width,height:a.value.height,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[n.createElementVNode("path",{d:"M10.2 1.7998L1.79994 10.1998",stroke:n.unref(i),"stroke-width":"1.6","stroke-linecap":"round"},null,8,Tt),n.createElementVNode("path",{d:"M1.79993 1.7998L10.1999 10.1998",stroke:n.unref(i),"stroke-width":"1.6","stroke-linecap":"round"},null,8,It)],8,Mt)):a.value.width>=14?(n.openBlock(),n.createElementBlock("svg",{key:3,width:a.value.width,height:a.value.height,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[n.createElementVNode("g",Dt,[n.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1.29234 1.29345C1.68256 0.902618 2.31572 0.902121 2.70655 1.29234L13.3146 11.8837C13.7054 12.2739 13.7059 12.9071 13.3157 13.2979C12.9254 13.6887 12.2923 13.6892 11.9014 13.299L1.29345 2.70766C0.902618 2.31744 0.902121 1.68428 1.29234 1.29345Z",fill:e.disabled?"#a7b1bc":n.unref(i)},null,8,Nt),n.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.3157 1.29345C13.7059 1.68428 13.7054 2.31744 13.3146 2.70766L2.70655 13.299C2.31572 13.6892 1.68256 13.6887 1.29234 13.2979C0.902121 12.9071 0.902618 12.2739 1.29345 11.8837L11.9014 1.29234C12.2923 0.902121 12.9254 0.902618 13.3157 1.29345Z",fill:e.disabled?"#a7b1bc":n.unref(i)},null,8,Et)])],8,kt)):n.createCommentVNode("",!0)}}),Lt=["width","height"],Vt=["fill"],Ot=n.defineComponent({__name:"IconCustomCell",props:{size:{default:"16"},color:{default:"#8998B5"},disabled:{type:Boolean,default:!1}},setup(e){const t=e,{size:o,color:i}=n.toRefs(t);return(e,t)=>(n.openBlock(),n.createElementBlock("svg",{width:n.unref(o),height:n.unref(o),viewBox:"-0.3 -0.5 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[n.createElementVNode("path",{d:"M10.7413 0.764771C11.7612 -0.255002 13.4148 -0.254833 14.4347 0.764771C15.4546 1.78472 15.4546 3.43916 14.4347 4.45911L12.8624 6.03137L14.0929 7.26282C14.7351 7.905 14.7351 8.9468 14.0929 9.58899L13.0675 10.6144C12.5962 11.0857 11.9101 11.2099 11.3243 10.9894L7.59583 14.7189C6.95371 15.361 5.91183 15.3608 5.26965 14.7189L0.481567 9.93079C-0.160579 9.28859 -0.160616 8.24678 0.481567 7.60461L4.21106 3.87512C3.99088 3.28958 4.11412 2.6041 4.58508 2.13293L5.61145 1.10657C6.25363 0.464545 7.29549 0.464475 7.93762 1.10657L9.16809 2.33801L10.7413 0.764771ZM1.43958 8.56262C1.32625 8.67594 1.32628 8.85945 1.43958 8.97278L2.32825 9.86145L3.21692 8.97278C3.48129 8.7084 3.91049 8.70852 4.17493 8.97278C4.43935 9.23721 4.43935 9.66636 4.17493 9.93079L3.28625 10.8195L4.38 11.9132L6.29504 9.99915C6.55947 9.73472 6.98863 9.73472 7.25305 9.99915C7.51733 10.2636 7.51743 10.6928 7.25305 10.9572L5.33801 12.8712L6.22766 13.7609C6.341 13.874 6.52456 13.8741 6.63782 13.7609L10.2618 10.1359L5.0636 4.93762L1.43958 8.56262ZM13.4777 1.72278C12.9866 1.23172 12.1904 1.23177 11.6993 1.72278L9.68176 3.74036C9.39848 4.0235 8.93868 4.0235 8.6554 3.74036L6.97961 2.06458C6.86634 1.95135 6.68278 1.95142 6.56946 2.06458L5.54309 3.09094C5.43002 3.20427 5.4299 3.38784 5.54309 3.5011L11.6993 9.65637C11.8127 9.7697 11.9962 9.7697 12.1095 9.65637L13.1349 8.63098C13.2482 8.51765 13.2482 8.33415 13.1349 8.22083L11.4591 6.54504C11.176 6.26178 11.1761 5.80195 11.4591 5.51868L13.4777 3.5011C13.9686 3.01006 13.9685 2.21385 13.4777 1.72278Z",fill:n.unref(i)},null,8,Vt)],8,Lt))}}),Pt=["width","height"],Bt=["fill","stroke"],Rt=["stroke"],zt=n.defineComponent({__name:"IconDownload",props:{size:{default:"12"},color:{default:"#8998b5"},disabled:{type:Boolean,default:!1}},setup(e){const t=e,{size:o,color:i}=n.toRefs(t),r=n.computed(()=>({10:{width:10,height:10},12:{width:12,height:12},14:{width:14,height:14},16:{width:16,height:16},18:{width:18,height:18},20:{width:20,height:20},22:{width:22,height:22},30:{width:30,height:30}}[o.value]??{width:12,height:12}));return(t,o)=>(n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:r.value.width,height:r.value.height,viewBox:"0 0 12 12",fill:"none"},[n.createElementVNode("path",{d:"M6.24497 8.37401L8.19097 6.42801C8.24107 6.3796 8.27555 6.31731 8.28995 6.24915C8.30435 6.18098 8.29802 6.11007 8.27178 6.04553C8.24553 5.981 8.20057 5.9258 8.14269 5.88703C8.0848 5.84826 8.01664 5.82771 7.94697 5.82801H6.69697V0.947009C6.69697 0.761358 6.62322 0.58331 6.49194 0.452035C6.36067 0.320759 6.18262 0.247009 5.99697 0.247009C5.81132 0.247009 5.63327 0.320759 5.50199 0.452035C5.37072 0.58331 5.29697 0.761358 5.29697 0.947009V5.82801H4.05397C3.98489 5.82717 3.91715 5.84709 3.85951 5.88519C3.80188 5.92329 3.75702 5.97782 3.73073 6.04171C3.70444 6.1056 3.69794 6.17591 3.71207 6.24353C3.7262 6.31116 3.7603 6.37299 3.80997 6.42101L5.75697 8.36701C5.78841 8.39976 5.82603 8.42595 5.86767 8.44405C5.9093 8.46215 5.95411 8.47181 5.99951 8.47246C6.0449 8.47311 6.08997 8.46474 6.13211 8.44784C6.17424 8.43094 6.21261 8.40585 6.24497 8.37401Z",fill:e.disabled?"#a7b1bc":n.unref(i),stroke:e.disabled?"#a7b1bc":n.unref(i),"stroke-width":"0.2"},null,8,Bt),o[0]||(o[0]=n.createElementVNode("path",{d:"M0.748 10.505C0.334891 10.505 0 10.8397 0 11.2525C0 11.6653 0.334891 12 0.748 12H11.252C11.6651 12 12 11.6653 12 11.2525C12 10.8397 11.6651 10.505 11.252 10.505H0.748Z",fill:"white"},null,-1)),n.createElementVNode("path",{d:"M0.748024 11.155C0.693901 11.155 0.650024 11.1987 0.650024 11.2525C0.650024 11.3064 0.693901 11.35 0.748024 11.35H11.252C11.3061 11.35 11.35 11.3064 11.35 11.2525C11.35 11.1987 11.3061 11.155 11.252 11.155H0.748024Z",stroke:e.disabled?"#a7b1bc":n.unref(i),"stroke-width":"1.3"},null,8,Rt)],8,Pt))}}),Ft=["width","height"],Gt=["fill"],Ht=["fill"],Wt=["fill"],Ut=["fill"],Yt=["fill"],Zt=["fill"],Xt=n.defineComponent({__name:"IconDragHandler",props:{size:{default:"10"},color:{default:"#8998b5"},disabled:{type:Boolean,default:!1}},setup(e){const t=e,{size:o,color:i}=n.toRefs(t),r=n.computed(()=>({10:{width:10,height:10},12:{width:12,height:12},14:{width:14,height:14},16:{width:16,height:16},18:{width:18,height:18},20:{width:20,height:20},22:{width:22,height:22},30:{width:30,height:30}}[o.value]??{width:12,height:12}));return(e,t)=>(n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:r.value.width,height:r.value.height,viewBox:"0 0 10 10",fill:"none"},[n.createElementVNode("g",null,[n.createElementVNode("path",{d:"M7.69601 1.776C7.69601 1.97002 7.63848 2.15969 7.53068 2.32101C7.42289 2.48234 7.26968 2.60807 7.09042 2.68232C6.91117 2.75657 6.71392 2.776 6.52363 2.73815C6.33333 2.7003 6.15853 2.60687 6.02134 2.46967C5.88414 2.33247 5.79071 2.15768 5.75286 1.96738C5.71501 1.77709 5.73443 1.57984 5.80868 1.40059C5.88293 1.22133 6.00867 1.06812 6.17 0.960326C6.33132 0.852533 6.52099 0.794998 6.71501 0.794998C6.97519 0.794998 7.22471 0.898353 7.40868 1.08233C7.59265 1.2663 7.69601 1.51582 7.69601 1.776Z",fill:n.unref(i)},null,8,Gt),n.createElementVNode("path",{d:"M4.264 1.776C4.264 1.97002 4.20647 2.15969 4.09867 2.32101C3.99088 2.48234 3.83767 2.60807 3.65841 2.68232C3.47916 2.75657 3.28191 2.776 3.09162 2.73815C2.90132 2.7003 2.72653 2.60687 2.58933 2.46967C2.45214 2.33247 2.3587 2.15768 2.32085 1.96738C2.283 1.77709 2.30243 1.57984 2.37668 1.40059C2.45093 1.22133 2.57666 1.06812 2.73799 0.960326C2.89931 0.852533 3.08898 0.794998 3.283 0.794998C3.54318 0.794998 3.7927 0.898353 3.97667 1.08233C4.16065 1.2663 4.264 1.51582 4.264 1.776Z",fill:n.unref(i)},null,8,Ht),n.createElementVNode("path",{d:"M7.69601 5C7.69601 5.19406 7.63845 5.38377 7.53061 5.54512C7.42277 5.70646 7.2695 5.8322 7.09019 5.90642C6.91088 5.98064 6.71358 6.00001 6.52326 5.96207C6.33293 5.92414 6.15814 5.83061 6.02098 5.69332C5.88383 5.55602 5.79048 5.38113 5.75274 5.19077C5.715 5.00041 5.73457 4.80313 5.80897 4.62389C5.88337 4.44465 6.00927 4.29151 6.17072 4.18384C6.33218 4.07617 6.52194 4.0188 6.71601 4.019C6.97619 4.019 7.22571 4.12235 7.40968 4.30633C7.59365 4.4903 7.69601 4.73982 7.69601 5Z",fill:n.unref(i)},null,8,Wt),n.createElementVNode("path",{d:"M4.264 5C4.264 5.19406 4.20644 5.38377 4.0986 5.54512C3.99077 5.70646 3.8375 5.8322 3.65818 5.90642C3.47887 5.98064 3.28157 6.00001 3.09125 5.96207C2.90093 5.92414 2.72613 5.83061 2.58898 5.69332C2.45182 5.55602 2.35847 5.38113 2.32073 5.19077C2.28299 5.00041 2.30256 4.80313 2.37696 4.62389C2.45137 4.44465 2.57726 4.29151 2.73872 4.18384C2.90017 4.07617 3.08994 4.0188 3.284 4.019C3.54418 4.019 3.7937 4.12235 3.97767 4.30633C4.16165 4.4903 4.264 4.73982 4.264 5Z",fill:n.unref(i)},null,8,Ut),n.createElementVNode("path",{d:"M7.69601 8.225C7.69601 8.41903 7.63848 8.60869 7.53068 8.77002C7.42289 8.93134 7.26968 9.05708 7.09042 9.13133C6.91117 9.20558 6.71392 9.22501 6.52363 9.18715C6.33333 9.1493 6.15853 9.05587 6.02134 8.91867C5.88414 8.78148 5.79071 8.60668 5.75286 8.41639C5.71501 8.22609 5.73443 8.02884 5.80868 7.84959C5.88293 7.67034 6.00867 7.51713 6.17 7.40933C6.33132 7.30154 6.52099 7.244 6.71501 7.244C6.84384 7.244 6.9714 7.26938 7.09042 7.31868C7.20944 7.36798 7.31759 7.44024 7.40868 7.53133C7.49978 7.62243 7.57204 7.73057 7.62134 7.84959C7.67064 7.96861 7.69601 8.09618 7.69601 8.225Z",fill:n.unref(i)},null,8,Yt),n.createElementVNode("path",{d:"M4.264 8.225C4.264 8.41903 4.20647 8.60869 4.09867 8.77002C3.99088 8.93134 3.83767 9.05708 3.65841 9.13133C3.47916 9.20558 3.28191 9.22501 3.09162 9.18715C2.90132 9.1493 2.72653 9.05587 2.58933 8.91867C2.45214 8.78148 2.3587 8.60668 2.32085 8.41639C2.283 8.22609 2.30243 8.02884 2.37668 7.84959C2.45093 7.67034 2.57666 7.51713 2.73799 7.40933C2.89931 7.30154 3.08898 7.244 3.283 7.244C3.41183 7.244 3.53939 7.26938 3.65841 7.31868C3.77744 7.36798 3.88558 7.44024 3.97667 7.53133C4.06777 7.62243 4.14003 7.73057 4.18933 7.84959C4.23863 7.96861 4.264 8.09618 4.264 8.225Z",fill:n.unref(i)},null,8,Zt)])],8,Ft))}}),jt=["width","height"],$t=["stroke"],qt=n.defineComponent({__name:"IconFilter",props:{size:{default:"14"},color:{default:"#8998b5"},disabled:{type:Boolean,default:!1}},setup(e){const t=e,{size:o,color:i}=n.toRefs(t),r=n.computed(()=>({10:{width:10,height:10},12:{width:12,height:12},14:{width:14,height:14},16:{width:16,height:16},18:{width:18,height:18},20:{width:20,height:20},22:{width:22,height:22},30:{width:30,height:30}}[o.value]??{width:12,height:12}));return(e,t)=>(n.openBlock(),n.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:r.value.width,height:r.value.height,viewBox:"0 0 14 14",fill:"none"},[n.createElementVNode("path",{d:"M1.8459 2.72595C3.18952 4.45891 5.6739 7.67072 5.6739 7.67072V11.6819C5.6739 11.8588 5.74385 12.0284 5.86848 12.1539C5.99312 12.2794 6.16232 12.3504 6.33916 12.3516H7.67078C7.84762 12.3504 8.01683 12.2794 8.14146 12.1539C8.2661 12.0284 8.33605 11.8588 8.33605 11.6819V7.67072C8.33605 7.67072 10.8128 4.45891 12.1531 2.72595C12.2297 2.62769 12.2772 2.51 12.2903 2.38616C12.3034 2.26232 12.2816 2.13728 12.2274 2.02518C12.1731 1.91308 12.0886 1.81839 11.9834 1.75181C11.8781 1.68523 11.7564 1.64943 11.6318 1.64844H2.37157C2.24667 1.64862 2.12433 1.68384 2.01846 1.75009C1.91258 1.81635 1.82742 1.91098 1.77266 2.02323C1.71789 2.13549 1.69573 2.26085 1.70867 2.38508C1.72162 2.5093 1.76917 2.6274 1.8459 2.72595Z",stroke:n.unref(i),"stroke-width":"1.4","stroke-linejoin":"round"},null,8,$t)],8,jt))}}),Kt=["width","height"],Jt=["fill"],Qt=n.defineComponent({__name:"IconInfoFilled",props:{size:{default:"14"},color:{default:"#8998b5"},disabled:{type:Boolean,default:!1}},setup(e){const t=e,{size:o,color:i}=n.toRefs(t),r=n.computed(()=>({10:{width:10,height:10},12:{width:12,height:12},14:{width:14,height:14},16:{width:16,height:16},18:{width:18,height:18},20:{width:20,height:20},22:{width:22,height:22},30:{width:30,height:30}}[o.value]??{width:12,height:12}));return(e,t)=>(n.openBlock(),n.createElementBlock("svg",{width:r.value.width,height:r.value.height,viewBox:"0 0 14 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[n.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 14.5C10.866 14.5 14 11.366 14 7.5C14 3.63401 10.866 0.5 7 0.5C3.13401 0.5 0 3.63401 0 7.5C0 11.366 3.13401 14.5 7 14.5ZM6.53369 4.36582C6.53369 4.03445 6.80232 3.76582 7.13369 3.76582H7.33369C7.66506 3.76582 7.93369 4.03445 7.93369 4.36582V8.29915C7.93369 8.63052 7.66506 8.89915 7.33369 8.89915H7.13369C6.80232 8.89915 6.53369 8.63053 6.53369 8.29915V4.36582ZM6.53369 10.4327C6.53369 10.1013 6.80232 9.83272 7.13369 9.83272H7.33369C7.66506 9.83272 7.93369 10.1013 7.93369 10.4327V10.6327C7.93369 10.9641 7.66506 11.2327 7.33369 11.2327H7.13369C6.80232 11.2327 6.53369 10.9641 6.53369 10.6327V10.4327Z",fill:n.unref(i)},null,8,Jt)],8,Kt))}}),en=["width","height"],tn=["fill","stroke"],nn=n.defineComponent({__name:"IconReset",props:{size:{default:"12"},color:{default:"#4568e0"}},setup(e){const t=e,{size:o,color:i}=n.toRefs(t),r=n.computed(()=>({10:{width:10,height:10},12:{width:12,height:12},14:{width:14,height:14},16:{width:16,height:16},18:{width:18,height:18},20:{width:20,height:20},22:{width:22,height:22},30:{width:30,height:30}}[o.value]??{width:12,height:12}));return(e,t)=>(n.openBlock(),n.createElementBlock("svg",{width:r.value.width,height:r.value.height,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[n.createElementVNode("path",{d:"M11.7155 5.409C11.8354 6.44637 11.6393 7.49581 11.153 8.41951C10.6667 9.34321 9.91289 10.098 8.99057 10.5847C8.06826 11.0715 7.02056 11.2674 5.98506 11.1468C4.94957 11.0262 3.97468 10.5947 3.18843 9.909C3.13112 9.8593 3.08476 9.79818 3.05232 9.72955C3.01987 9.66091 3.00205 9.58626 2.99998 9.51035C2.99792 9.43444 3.01166 9.35892 3.04032 9.28862C3.06898 9.21832 3.11195 9.15476 3.16647 9.102C3.26796 9.00379 3.40278 8.94766 3.54387 8.94488C3.68495 8.9421 3.82187 8.99287 3.92714 9.087C4.57369 9.64424 5.37883 9.98362 6.22857 10.0571C7.07831 10.1306 7.92961 9.93449 8.66193 9.49652C9.39425 9.05854 9.9705 8.40091 10.3091 7.61672C10.6477 6.83254 10.7315 5.96152 10.5486 5.127C10.3868 4.36605 10.0085 3.66832 9.45928 3.11818C8.9101 2.56804 8.2136 2.18904 7.45397 2.027C6.85996 1.89578 6.24414 1.8996 5.65181 2.0382C5.05947 2.17679 4.50568 2.44663 4.03116 2.82787C3.55664 3.20911 3.17346 3.69205 2.9098 4.24118C2.64615 4.79031 2.50872 5.39166 2.50763 6.001H3.27628C3.34943 6.0001 3.42117 6.02122 3.4822 6.06163C3.54323 6.10203 3.59075 6.15986 3.61861 6.22762C3.64646 6.29539 3.65337 6.36997 3.63843 6.44171C3.62349 6.51345 3.5874 6.57904 3.53483 6.63L2.21214 7.963C2.17808 7.99826 2.13728 8.0263 2.09218 8.04545C2.04707 8.0646 1.99859 8.07447 1.9496 8.07447C1.90062 8.07447 1.85213 8.0646 1.80703 8.04545C1.76193 8.0263 1.72113 7.99826 1.68706 7.963L0.364376 6.63C0.313354 6.57786 0.278872 6.51176 0.265274 6.44003C0.251676 6.36829 0.259568 6.29414 0.287958 6.22689C0.316347 6.15964 0.363965 6.1023 0.424814 6.06211C0.485663 6.02191 0.557024 6.00065 0.629911 6.001H1.40056C1.40075 4.67758 1.90621 3.40433 2.81334 2.44221C3.72047 1.48008 4.96058 0.901932 6.27954 0.826241C7.59849 0.750551 8.8964 1.18305 9.90728 2.03511C10.9182 2.88717 11.5654 4.09426 11.7165 5.409H11.7155Z",fill:n.unref(i),stroke:n.unref(i),"stroke-width":"0.5"},null,8,tn)],8,en))}}),on=["width","height"],rn=["fill"],an=["fill"],ln=n.defineComponent({__name:"IconResetGridToolbar",props:{size:{default:"14"},color:{default:"#8998b5"},disabled:{type:Boolean,default:!1}},setup(e){const t=e,{size:o,color:i}=n.toRefs(t),r=n.computed(()=>({10:{width:10,height:10},12:{width:12,height:12},14:{width:14,height:14},16:{width:16,height:16},18:{width:18,height:18},20:{width:20,height:20},22:{width:22,height:22},30:{width:30,height:30}}[o.value]??{width:12,height:12}));return(e,t)=>(n.openBlock(),n.createElementBlock("svg",{width:r.value.width,height:r.value.height,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[n.createElementVNode("path",{d:"M14.1999 8C14.1999 5.10051 11.8494 2.75 8.94989 2.75C6.0504 2.75 3.69989 5.1005 3.69989 8C3.69989 8.29896 3.72445 8.5916 3.77216 8.87598C3.84069 9.28446 3.5654 9.6707 3.15692 9.73926C2.74842 9.80779 2.36218 9.53252 2.29364 9.12402C2.23223 8.75798 2.19989 8.38246 2.19989 8C2.19989 4.27208 5.22197 1.25 8.94989 1.25C12.6779 1.25 15.6999 4.27207 15.6999 8C15.6999 11.7279 12.6779 14.75 8.94989 14.75C7.39031 14.75 5.95244 14.2201 4.80927 13.3311C4.48231 13.0768 4.42313 12.6053 4.67743 12.2783C4.93176 11.9515 5.40325 11.8922 5.73017 12.1465C6.61941 12.8381 7.73538 13.25 8.94989 13.25C11.8494 13.25 14.1999 10.8995 14.1999 8Z",fill:n.unref(i)},null,8,rn),n.createElementVNode("path",{d:"M4.46967 7.46973C4.76256 7.17683 5.23732 7.17683 5.53022 7.46973C5.82311 7.76262 5.82311 8.23738 5.53022 8.53027L3.67182 10.3887C3.30083 10.7597 2.69906 10.7597 2.32807 10.3887L0.46967 8.53027C0.176777 8.23738 0.176777 7.76262 0.46967 7.46973C0.762563 7.17683 1.23732 7.17683 1.53022 7.46973L2.99994 8.93945L4.46967 7.46973Z",fill:n.unref(i)},null,8,an)],8,on))}}),sn=["width","height"],un=["fill"],cn=["width","height"],dn=["fill"],hn=n.defineComponent({__name:"IconSearch",props:{size:{default:"12"},color:{default:"#8998b5"},disabled:{type:Boolean,default:!1}},setup(e){const t=e,{size:o,color:i}=n.toRefs(t),r=n.computed(()=>({10:{width:10,height:10},12:{width:12,height:12},14:{width:14,height:14},16:{width:16,height:16},18:{width:18,height:18},20:{width:20,height:20},22:{width:22,height:22},30:{width:30,height:30}}[o.value]??{width:12,height:12}));return(t,o)=>r.value.width<=13?(n.openBlock(),n.createElementBlock("svg",{key:0,xmlns:"http://www.w3.org/2000/svg",width:r.value.width,height:r.value.height,viewBox:"0 0 12 12",fill:"none"},[n.createElementVNode("path",{d:"M10.293 11.375L7.71099 8.79103C6.76581 9.4655 5.60162 9.76002 4.44941 9.61616C3.29719 9.4723 2.24116 8.90058 1.49082 8.01442C0.740489 7.12825 0.350682 5.99242 0.398745 4.83225C0.446808 3.67209 0.929227 2.57239 1.75029 1.75133C2.57135 0.930264 3.67106 0.447845 4.83122 0.399783C5.99138 0.35172 7.12722 0.741526 8.01338 1.49186C8.89954 2.2422 9.47126 3.29823 9.61512 4.45044C9.75898 5.60265 9.46446 6.76684 8.78999 7.71203L11.373 10.294C11.5163 10.4374 11.5969 10.6318 11.5969 10.8345C11.5969 11.0373 11.5163 11.2317 11.373 11.375C11.2296 11.5184 11.0352 11.5989 10.8325 11.5989C10.6298 11.5989 10.4363 11.5184 10.293 11.375ZM1.92899 5.02703C1.92899 5.64015 2.1108 6.2395 2.45144 6.7493C2.79207 7.25909 3.27622 7.65642 3.84267 7.89106C4.40912 8.12569 5.03243 8.18708 5.63377 8.06746C6.23511 7.94785 6.78748 7.6526 7.22102 7.21906C7.65457 6.78552 7.94981 6.23315 8.06943 5.63181C8.18904 5.03047 8.12765 4.40716 7.89302 3.84071C7.65839 3.27426 7.26105 2.79011 6.75126 2.44947C6.24147 2.10884 5.64211 1.92703 5.02899 1.92703C4.20682 1.92703 3.41832 2.25364 2.83696 2.835C2.2556 3.41636 1.92899 4.20486 1.92899 5.02703Z",fill:e.disabled?"#a7b1bc":n.unref(i)},null,8,un)],8,sn)):r.value.width>=14?(n.openBlock(),n.createElementBlock("svg",{key:1,xmlns:"http://www.w3.org/2000/svg",width:r.value.width,height:r.value.height,viewBox:"0 0 14 14",fill:"none"},[n.createElementVNode("path",{d:"M5.84944 0.402344C2.83893 0.402344 0.398438 2.84284 0.398438 5.85334C0.398438 8.86385 2.83893 11.3043 5.84944 11.3043C7.0308 11.3043 8.12438 10.9285 9.01716 10.29L12.0619 13.3347C12.4134 13.6862 12.9832 13.6862 13.3347 13.3347C13.6862 12.9832 13.6862 12.4134 13.3347 12.0619L10.2893 9.01651C10.9259 8.12457 11.3004 7.03269 11.3004 5.85334C11.3004 2.84284 8.85994 0.402344 5.84944 0.402344ZM2.19844 5.85334C2.19844 3.83695 3.83305 2.20234 5.84944 2.20234C7.86583 2.20234 9.50044 3.83695 9.50044 5.85334C9.50044 7.86974 7.86583 9.50434 5.84944 9.50434C3.83305 9.50434 2.19844 7.86974 2.19844 5.85334Z",fill:e.disabled?"#a7b1bc":n.unref(i)},null,8,dn)],8,cn)):n.createCommentVNode("",!0)}}),pn=["width","height"],fn=["fill"],gn=["stroke"],vn=n.defineComponent({__name:"IconSetting",props:{size:{default:"14"},color:{default:"#8998b5"},disabled:{type:Boolean,default:!1}},setup(e){const t=e,{size:o,color:i}=n.toRefs(t),r=n.computed(()=>({10:{width:10,height:10},12:{width:12,height:12},14:{width:14,height:14},16:{width:16,height:16},18:{width:18,height:18},20:{width:20,height:20},22:{width:22,height:22},30:{width:30,height:30}}[o.value]??{width:12,height:12}));return(e,t)=>(n.openBlock(),n.createElementBlock("svg",{width:r.value.width,height:r.value.height,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[n.createElementVNode("path",{d:"M7.72475 13.9199H6.33338C5.91819 13.9199 5.80747 13.812 5.10579 12.0442L4.79116 11.9136C3.13038 12.6845 2.9297 12.7186 2.61969 12.4072L1.63429 11.4214C1.34135 11.1234 1.34089 10.9693 2.09562 9.22499L1.96737 8.91405C0.261842 8.28895 0.0800781 8.1607 0.0800781 7.72475V6.332C0.0800781 5.9168 0.188952 5.80747 1.95768 5.10671L2.08732 4.79347C1.32566 3.14514 1.28599 2.92555 1.59646 2.61738L2.57817 1.63475C2.87111 1.34043 3.02658 1.33904 4.77501 2.09285L5.08641 1.9646C5.71243 0.261842 5.83976 0.0800781 6.27525 0.0800781H7.66662C8.08181 0.0800781 8.19253 0.188952 8.89421 1.95768L9.20792 2.08732C10.8512 1.32566 11.0703 1.2883 11.3762 1.59231L12.3629 2.57632C12.6587 2.87204 12.6591 3.02612 11.9044 4.77455L12.034 5.08826C13.7386 5.71151 13.9199 5.83838 13.9199 6.27479V7.66662C13.9199 8.08181 13.812 8.19207 12.0419 8.89468L11.9127 9.20792C11.9127 9.20792 12.7163 11.0721 12.4068 11.3808L11.4214 12.3657C11.1243 12.6568 10.9697 12.6591 9.22637 11.9044L8.91313 12.0349C8.28849 13.7382 8.1607 13.9199 7.72475 13.9199ZM6.66738 12.7606H7.38198C7.52038 12.4441 7.73628 11.8809 7.91158 11.3983C7.93915 11.3228 7.98207 11.2537 8.03766 11.1956C8.09324 11.1375 8.16027 11.0915 8.23451 11.0606L9.01047 10.7404C9.08213 10.7103 9.1592 10.6951 9.23695 10.6958C9.3147 10.6965 9.39148 10.7131 9.46257 10.7446C9.94466 10.9531 10.513 11.1879 10.8387 11.3083L11.3462 10.8032C11.2179 10.483 10.9739 9.9322 10.7571 9.46534C10.723 9.3927 10.7044 9.31378 10.7024 9.23358C10.7004 9.15337 10.7151 9.07363 10.7455 8.9994L11.0643 8.22344C11.0941 8.15147 11.138 8.0862 11.1935 8.03152C11.2489 7.97684 11.3148 7.93386 11.3872 7.90513C11.8762 7.71183 12.446 7.47563 12.7611 7.33031V6.61802C12.4437 6.47962 11.8822 6.26603 11.3997 6.09072C11.324 6.06324 11.2548 6.02036 11.1965 5.96477C11.1382 5.90919 11.0921 5.84211 11.0611 5.76779L10.7414 4.99092C10.7119 4.91906 10.6971 4.84202 10.698 4.76435C10.6989 4.68668 10.7153 4.60999 10.7464 4.53881C10.955 4.05673 11.1898 3.48837 11.3102 3.16221L10.8027 2.65706C10.4826 2.78531 9.93174 3.02889 9.46488 3.24617C9.39225 3.28039 9.31325 3.29897 9.23298 3.30072C9.15272 3.30247 9.07298 3.28734 8.99893 3.25632L8.22298 2.93616C8.15107 2.90646 8.08589 2.86256 8.03135 2.80707C7.97681 2.75158 7.93404 2.68565 7.90559 2.61323C7.71275 2.12468 7.47655 1.55679 7.33169 1.2417H6.61802C6.47962 1.5591 6.26464 2.12145 6.08888 2.604C6.06138 2.67948 6.01847 2.74841 5.96287 2.80639C5.90727 2.86437 5.84021 2.91014 5.76595 2.94077L4.9923 3.2637C4.92039 3.29345 4.84323 3.30844 4.76541 3.30781C4.68759 3.30718 4.6107 3.29092 4.53928 3.26001C4.05673 3.04642 3.48791 2.8116 3.16267 2.69166L2.65521 3.19912C2.78254 3.52205 3.02704 4.07103 3.24341 4.53697C3.27724 4.60954 3.29561 4.68836 3.29736 4.76841C3.29911 4.84846 3.28419 4.92801 3.25355 5.00199L2.9357 5.77564C2.90614 5.84779 2.86229 5.91323 2.80679 5.96801C2.7513 6.02279 2.6853 6.06578 2.61277 6.09441C2.12422 6.28725 1.55633 6.52253 1.24032 6.66738V7.38244C1.55679 7.52084 2.12007 7.73674 2.60308 7.91205C2.67856 7.93954 2.74749 7.98246 2.80547 8.03805C2.86345 8.09365 2.90921 8.16072 2.93985 8.23497L3.26001 9.00862C3.28986 9.08052 3.30488 9.15771 3.30417 9.23556C3.30345 9.31341 3.28702 9.39031 3.25586 9.46165C3.04642 9.94374 2.8116 10.5121 2.6912 10.8382L3.19866 11.3457C3.51882 11.2165 4.06964 10.9734 4.53651 10.7566C4.60923 10.7222 4.68835 10.7035 4.76877 10.7016C4.84918 10.6996 4.9291 10.7146 5.00337 10.7455L5.78025 11.0685C5.85202 11.0982 5.91704 11.1421 5.97143 11.1976C6.02581 11.2531 6.06842 11.319 6.09672 11.3914C6.28955 11.879 6.52575 12.4469 6.67061 12.7615M7 9.61158C6.48363 9.6114 5.9789 9.45811 5.54964 9.17111C5.12038 8.88411 4.78585 8.47627 4.58834 7.99916C4.39084 7.52205 4.33924 6.9971 4.44006 6.49066C4.54087 5.98423 4.78959 5.51906 5.15475 5.15396C5.51991 4.78886 5.98512 4.54023 6.49158 4.43951C6.99803 4.33878 7.52297 4.39047 8.00005 4.58806C8.47712 4.78565 8.8849 5.12025 9.17183 5.54956C9.45876 5.97888 9.61195 6.48363 9.61204 7C9.61119 7.69245 9.3357 8.35629 8.84602 8.84588C8.35634 9.33548 7.69245 9.61085 7 9.61158ZM7 5.54866C6.71279 5.54893 6.43211 5.63436 6.19345 5.79415C5.95479 5.95393 5.76886 6.18089 5.65919 6.44634C5.54951 6.71178 5.521 7.00379 5.57726 7.28543C5.63353 7.56708 5.77205 7.82571 5.9753 8.02864C6.17855 8.23157 6.4374 8.36967 6.71914 8.42549C7.00087 8.48131 7.29283 8.45234 7.5581 8.34224C7.82337 8.23214 8.05004 8.04585 8.20944 7.80694C8.36884 7.56803 8.45383 7.28721 8.45364 7C8.45291 6.61491 8.29945 6.24583 8.02693 5.97374C7.75441 5.70166 7.38509 5.54878 7 5.54866Z",fill:n.unref(i)},null,8,fn),n.createElementVNode("path",{d:"M6.66738 12.7606H7.38198C7.52038 12.4441 7.73628 11.8809 7.91158 11.3983C7.93915 11.3227 7.98207 11.2537 8.03766 11.1956C8.09324 11.1375 8.16027 11.0915 8.23451 11.0606L9.01047 10.7404C9.08213 10.7103 9.1592 10.6951 9.23695 10.6958C9.3147 10.6965 9.39148 10.7131 9.46257 10.7446C9.94466 10.9531 10.513 11.1879 10.8387 11.3083L11.3462 10.8032C11.2179 10.483 10.9739 9.9322 10.7571 9.46534C10.723 9.3927 10.7044 9.31378 10.7024 9.23358C10.7004 9.15337 10.7151 9.07363 10.7455 8.9994L11.0643 8.22344C11.0941 8.15147 11.138 8.0862 11.1935 8.03152C11.2489 7.97684 11.3148 7.93386 11.3872 7.90513C11.8762 7.71183 12.446 7.47563 12.7611 7.33031V6.61802C12.4437 6.47962 11.8822 6.26603 11.3997 6.09072C11.324 6.06325 11.2548 6.02036 11.1965 5.96477C11.1382 5.90919 11.0921 5.84211 11.0611 5.76779L10.7414 4.99092C10.7119 4.91906 10.6971 4.84202 10.698 4.76435C10.6989 4.68668 10.7153 4.60999 10.7464 4.53881C10.955 4.05673 11.1898 3.48837 11.3102 3.16221L10.8027 2.65706C10.4826 2.78531 9.93174 3.02889 9.46488 3.24617C9.39225 3.28039 9.31325 3.29897 9.23298 3.30072C9.15272 3.30247 9.07298 3.28734 8.99893 3.25632L8.22298 2.93616C8.15107 2.90646 8.08589 2.86256 8.03135 2.80707C7.97681 2.75158 7.93404 2.68565 7.90559 2.61323C7.71275 2.12468 7.47655 1.55679 7.33169 1.2417H6.61802C6.47962 1.5591 6.26464 2.12146 6.08888 2.604C6.06138 2.67948 6.01847 2.74841 5.96287 2.80639C5.90727 2.86437 5.84021 2.91014 5.76595 2.94077L4.9923 3.2637C4.92039 3.29345 4.84323 3.30844 4.76541 3.30781C4.68759 3.30718 4.6107 3.29092 4.53928 3.26001C4.05673 3.04642 3.48791 2.8116 3.16267 2.69166L2.65521 3.19912C2.78254 3.52205 3.02704 4.07103 3.24341 4.53697C3.27724 4.60954 3.29561 4.68836 3.29736 4.76841C3.29911 4.84846 3.28419 4.92801 3.25355 5.00199L2.9357 5.77564C2.90614 5.84779 2.86229 5.91323 2.80679 5.96801C2.7513 6.02279 2.6853 6.06578 2.61277 6.09441C2.12422 6.28725 1.55633 6.52253 1.24032 6.66738V7.38244C1.55679 7.52084 2.12007 7.73674 2.60308 7.91205C2.67856 7.93954 2.74749 7.98246 2.80547 8.03805C2.86345 8.09365 2.90921 8.16072 2.93985 8.23497L3.26001 9.00862C3.28986 9.08052 3.30488 9.15771 3.30417 9.23556C3.30345 9.31341 3.28702 9.39031 3.25586 9.46165C3.04642 9.94373 2.8116 10.5121 2.6912 10.8382L3.19866 11.3457C3.51882 11.2165 4.06964 10.9734 4.53651 10.7566C4.60923 10.7222 4.68835 10.7035 4.76877 10.7016C4.84918 10.6996 4.9291 10.7146 5.00337 10.7455L5.78025 11.0685C5.85202 11.0982 5.91704 11.1421 5.97143 11.1976C6.02581 11.2531 6.06842 11.319 6.09672 11.3914C6.28955 11.879 6.52575 12.4469 6.67061 12.7615M7.72475 13.9199H6.33338C5.91819 13.9199 5.80747 13.812 5.10579 12.0442L4.79116 11.9136C3.13038 12.6845 2.9297 12.7186 2.61969 12.4072L1.63429 11.4214C1.34135 11.1234 1.34089 10.9693 2.09562 9.22499L1.96737 8.91405C0.261842 8.28895 0.0800781 8.1607 0.0800781 7.72475V6.332C0.0800781 5.9168 0.188952 5.80747 1.95768 5.10671L2.08732 4.79347C1.32566 3.14514 1.28599 2.92555 1.59646 2.61738L2.57817 1.63475C2.87111 1.34043 3.02658 1.33904 4.77501 2.09285L5.08641 1.9646C5.71243 0.261842 5.83976 0.0800781 6.27525 0.0800781H7.66662C8.08181 0.0800781 8.19253 0.188952 8.89421 1.95768L9.20792 2.08732C10.8512 1.32566 11.0703 1.2883 11.3762 1.59231L12.3629 2.57632C12.6587 2.87204 12.6591 3.02612 11.9044 4.77455L12.034 5.08826C13.7386 5.71151 13.9199 5.83838 13.9199 6.27479V7.66662C13.9199 8.08181 13.812 8.19207 12.0419 8.89468L11.9127 9.20792C11.9127 9.20792 12.7163 11.0721 12.4068 11.3808L11.4214 12.3657C11.1243 12.6568 10.9697 12.6591 9.22637 11.9044L8.91313 12.0349C8.28849 13.7382 8.1607 13.9199 7.72475 13.9199ZM7 9.61158C6.48363 9.6114 5.9789 9.45811 5.54964 9.17111C5.12038 8.88411 4.78585 8.47627 4.58834 7.99916C4.39084 7.52205 4.33924 6.9971 4.44006 6.49066C4.54087 5.98423 4.78959 5.51906 5.15475 5.15396C5.51991 4.78886 5.98512 4.54023 6.49158 4.4395C6.99803 4.33878 7.52297 4.39047 8.00005 4.58806C8.47712 4.78565 8.8849 5.12025 9.17183 5.54956C9.45876 5.97888 9.61195 6.48363 9.61204 7C9.61118 7.69245 9.3357 8.35629 8.84602 8.84588C8.35634 9.33548 7.69245 9.61085 7 9.61158ZM7 5.54866C6.71279 5.54893 6.43211 5.63436 6.19345 5.79415C5.95479 5.95393 5.76886 6.18089 5.65919 6.44634C5.54951 6.71178 5.521 7.00379 5.57726 7.28543C5.63353 7.56708 5.77205 7.82571 5.9753 8.02864C6.17855 8.23157 6.4374 8.36967 6.71914 8.42549C7.00087 8.48131 7.29283 8.45234 7.5581 8.34224C7.82337 8.23214 8.05004 8.04585 8.20944 7.80694C8.36884 7.56803 8.45383 7.28721 8.45364 7C8.45291 6.61491 8.29945 6.24583 8.02693 5.97374C7.75441 5.70166 7.38509 5.54878 7 5.54866Z",stroke:n.unref(i),"stroke-width":"0.1"},null,8,gn)],8,pn))}}),mn=["width","height"],yn=["fill"],xn=n.defineComponent({__name:"IconSettingFilled",props:{size:{default:"14"},color:{default:"#8998b5"},disabled:{type:Boolean,default:!1}},setup(e){const t=e,{size:o,color:i}=n.toRefs(t),r=n.computed(()=>({10:{width:10,height:10},12:{width:12,height:12},14:{width:14,height:14},16:{width:16,height:16},18:{width:18,height:18},20:{width:20,height:20},22:{width:22,height:22},30:{width:30,height:30}}[o.value]??{width:12,height:12}));return(e,t)=>(n.openBlock(),n.createElementBlock("svg",{width:r.value.width,height:r.value.height,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[n.createElementVNode("path",{d:"M9.8564 6.00202C9.8564 5.88744 9.8564 5.77689 9.84091 5.66232L10.7975 4.9588C10.8971 4.88463 10.9655 4.77774 10.99 4.6581C11.0145 4.53845 10.9935 4.41421 10.9308 4.30855L9.969 2.69247C9.90739 2.58652 9.8077 2.50647 9.68909 2.46769C9.57048 2.42892 9.44132 2.43417 9.32644 2.48242L8.22107 2.9377C8.03145 2.80728 7.83024 2.6936 7.61983 2.598L7.47107 1.44223C7.456 1.32086 7.39596 1.20901 7.30221 1.12761C7.20846 1.04621 7.08743 1.00084 6.96178 1.00001H5.04339C4.91681 0.999065 4.79427 1.04337 4.69905 1.12452C4.60383 1.20567 4.54255 1.31801 4.52686 1.44022L4.3781 2.59599C4.16769 2.69159 3.96648 2.80527 3.77686 2.93569L2.67769 2.48041C2.56281 2.43216 2.43366 2.42691 2.31505 2.46568C2.19644 2.50446 2.09674 2.58451 2.03513 2.69046L1.06922 4.31157C1.00651 4.41722 0.985451 4.54146 1.00997 4.66111C1.03449 4.78076 1.10292 4.88764 1.20248 4.96182L2.15909 5.66533C2.14876 5.77488 2.1436 5.88543 2.1436 6.00001C2.1436 6.11458 2.1436 6.22513 2.15909 6.33971L1.20248 7.04322C1.10292 7.1174 1.03449 7.22428 1.00997 7.34393C0.985451 7.46358 1.00651 7.58782 1.06922 7.69347L2.031 9.30955C2.09261 9.4155 2.1923 9.49556 2.31091 9.53433C2.42953 9.57311 2.55868 9.56786 2.67356 9.5196L3.77893 9.06433C3.96855 9.19474 4.16976 9.30843 4.38017 9.40402L4.52893 10.5598C4.54447 10.6808 4.6047 10.7922 4.69841 10.8732C4.79211 10.9542 4.91288 10.9992 5.03822 11H6.95661C7.08195 10.9992 7.20273 10.9542 7.29643 10.8732C7.39013 10.7922 7.45037 10.6808 7.46591 10.5598L7.61467 9.40402C7.82507 9.30843 8.02629 9.19474 8.21591 9.06433L9.32128 9.5196C9.43615 9.56786 9.56531 9.57311 9.68392 9.53433C9.80253 9.49556 9.90223 9.4155 9.96384 9.30955L10.9256 7.69347C10.9883 7.58782 11.0094 7.46358 10.9849 7.34393C10.9603 7.22428 10.8919 7.1174 10.7924 7.04322L9.83574 6.33971C9.8502 6.2277 9.8571 6.1149 9.8564 6.00202ZM6.02066 7.75277C5.66474 7.75277 5.31681 7.65009 5.02087 7.45771C4.72493 7.26534 4.49427 6.99191 4.35806 6.672C4.22186 6.35209 4.18622 6.00008 4.25566 5.66046C4.32509 5.32085 4.49649 5.0089 4.74816 4.76405C4.99984 4.5192 5.32049 4.35246 5.66958 4.28491C6.01866 4.21735 6.3805 4.25202 6.70933 4.38453C7.03816 4.51704 7.31922 4.74144 7.51696 5.02935C7.7147 5.31726 7.82025 5.65575 7.82025 6.00202C7.8197 6.46618 7.62992 6.91118 7.29256 7.2394C6.95519 7.56761 6.49777 7.75224 6.02066 7.75277Z",fill:n.unref(i)},null,8,yn)],8,mn))}}),_n=["width","height"],wn={id:"icon_sorting"},bn=["fill"],Sn=n.defineComponent({__name:"IconSort",props:{size:{default:"14"},color:{default:"#8998b5"},disabled:{type:Boolean,default:!1}},setup(e){const t=e,{size:o,color:i}=n.toRefs(t),r=n.computed(()=>({10:{width:10,height:10},12:{width:12,height:12},14:{width:14,height:14},16:{width:16,height:16},18:{width:18,height:18},20:{width:20,height:20},22:{width:22,height:22},30:{width:30,height:30}}[o.value]??{width:12,height:12}));return(e,t)=>(n.openBlock(),n.createElementBlock("svg",{width:r.value.width,height:r.value.height,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[n.createElementVNode("g",wn,[n.createElementVNode("path",{id:"Vector",d:"M4.77237 7.68506C4.56199 7.68506 4.38563 7.61939 4.24331 7.48803C4.10099 7.35667 4.02983 7.1939 4.02983 6.99972V2.76769L2.63757 4.05272C2.50143 4.17836 2.33127 4.24119 2.12707 4.24119C1.92287 4.24119 1.74652 4.17836 1.59801 4.05272C1.4495 3.91565 1.37524 3.75288 1.37524 3.5644C1.37524 3.37593 1.4495 3.21316 1.59801 3.07609L4.25259 0.625971C4.32685 0.557436 4.40729 0.508891 4.49392 0.480334C4.58055 0.451778 4.67337 0.4375 4.77237 0.4375C4.87138 0.4375 4.9642 0.451778 5.05083 0.480334C5.13746 0.508891 5.2179 0.557436 5.29215 0.625971L7.9653 3.09323C8.11381 3.2303 8.18497 3.39021 8.17879 3.57297C8.1726 3.75573 8.09525 3.91565 7.94674 4.05272C7.79823 4.17836 7.62497 4.24404 7.42696 4.24975C7.22895 4.25546 7.05569 4.18979 6.90718 4.05272L5.51492 2.76769V6.99972C5.51492 7.1939 5.44376 7.35667 5.30143 7.48803C5.15911 7.61939 4.98276 7.68506 4.77237 7.68506ZM9.22763 13.5619C9.12862 13.5619 9.0358 13.5477 8.94917 13.5191C8.86254 13.4905 8.7821 13.442 8.70785 13.3735L6.0347 10.9062C5.88619 10.7691 5.81503 10.6092 5.82121 10.4265C5.8274 10.2437 5.90475 10.0838 6.05326 9.94672C6.20177 9.82107 6.37503 9.75539 6.57304 9.74968C6.77105 9.74397 6.94431 9.80965 7.09282 9.94672L8.48508 11.2317V6.99972C8.48508 6.80553 8.55624 6.64276 8.69857 6.5114C8.84089 6.38005 9.01724 6.31437 9.22763 6.31437C9.43801 6.31437 9.61437 6.38005 9.75669 6.5114C9.89901 6.64276 9.97017 6.80553 9.97017 6.99972V11.2317L11.3624 9.94672C11.4986 9.82107 11.6687 9.75824 11.8729 9.75824C12.0771 9.75824 12.2535 9.82107 12.402 9.94672C12.5505 10.0838 12.6248 10.2466 12.6248 10.435C12.6248 10.6235 12.5505 10.7863 12.402 10.9233L9.74741 13.3735C9.67315 13.442 9.59271 13.4905 9.50608 13.5191C9.41945 13.5477 9.32663 13.5619 9.22763 13.5619Z",fill:n.unref(i)},null,8,bn)])],8,_n))}}),Cn=["width","height"],Mn={id:"Icon_warning_w"},Tn={mask:"url(#mask0_6027_4463)"},In={id:"그룹 3580"},kn=["fill"],Dn=n.defineComponent({__name:"IconToastWarning",props:{size:{default:"30"},color:{default:"#fa9e23"},disabled:{type:Boolean,default:!1}},setup(e){const t=e,{size:o,color:i}=n.toRefs(t),r=n.computed(()=>({10:{width:10,height:10},12:{width:12,height:12},14:{width:14,height:14},16:{width:16,height:16},18:{width:18,height:18},20:{width:20,height:20},22:{width:22,height:22},30:{width:30,height:30}}[o.value]??{width:12,height:12}));return(e,t)=>(n.openBlock(),n.createElementBlock("svg",{width:r.value.width,height:r.value.height,viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[n.createElementVNode("g",Mn,[t[0]||(t[0]=n.createElementVNode("mask",{id:"mask0_6027_4463",style:{"mask-type":"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"30",height:"30"},[n.createElementVNode("g",{id:"clip-path"},[n.createElementVNode("path",{id:"사각형 2018",d:"M30 0H0V30H30V0Z",fill:"#FFF"})])],-1)),n.createElementVNode("g",Tn,[n.createElementVNode("g",In,[n.createElementVNode("path",{id:"패스 1570",d:"M29.5313 23.2669L17.9663 3.29813C17.6654 2.77759 17.2329 2.34536 16.7122 2.04487C16.1914 1.74437 15.6008 1.58618 14.9995 1.58618C14.3983 1.58618 13.8077 1.74437 13.2869 2.04487C12.7662 2.34536 12.3337 2.77759 12.0328 3.29813L0.468764 23.2669C0.166554 23.7878 0.00699555 24.3793 0.00616779 24.9815C0.00534002 25.5838 0.163272 26.1757 0.464049 26.6975C0.764826 27.2193 1.19782 27.6526 1.71941 27.9537C2.24099 28.2549 2.83274 28.4132 3.43501 28.4128H26.565C27.1673 28.4132 27.759 28.2549 28.2806 27.9537C28.8022 27.6526 29.2352 27.2193 29.536 26.6975C29.8368 26.1757 29.9947 25.5838 29.9939 24.9815C29.993 24.3793 29.8335 23.7878 29.5313 23.2669ZM16.4841 23.6044C16.4841 23.702 16.4648 23.7986 16.4273 23.8887C16.3899 23.9788 16.335 24.0606 16.2658 24.1294C16.1967 24.1982 16.1146 24.2527 16.0243 24.2897C15.934 24.3267 15.8373 24.3455 15.7397 24.345H14.2556C14.0593 24.3448 13.8711 24.2666 13.7322 24.1278C13.5934 23.989 13.5153 23.8007 13.515 23.6044V22.1203C13.515 21.9235 13.5929 21.7348 13.7317 21.5953C13.8705 21.4558 14.0589 21.3769 14.2556 21.3759H15.7406C15.8384 21.3758 15.9353 21.395 16.0256 21.4324C16.116 21.4697 16.1981 21.5245 16.2673 21.5937C16.3364 21.6628 16.3912 21.7449 16.4286 21.8353C16.466 21.9257 16.4851 22.0225 16.485 22.1203L16.4841 23.6044ZM16.4841 18.6431C16.4841 18.7407 16.4648 18.8373 16.4273 18.9274C16.3899 19.0175 16.335 19.0993 16.2658 19.1682C16.1967 19.237 16.1146 19.2915 16.0243 19.3285C15.934 19.3655 15.8373 19.3842 15.7397 19.3838H14.2556C14.0593 19.3835 13.8711 19.3054 13.7322 19.1666C13.5934 19.0277 13.5153 18.8395 13.515 18.6431V10.0013C13.515 9.80448 13.5929 9.61571 13.7317 9.47622C13.8705 9.33673 14.0589 9.25787 14.2556 9.25688H15.7406C15.8384 9.25675 15.9353 9.27592 16.0256 9.31329C16.116 9.35065 16.1981 9.40548 16.2673 9.47462C16.3364 9.54377 16.3912 9.62588 16.4286 9.71625C16.466 9.80661 16.4851 9.90346 16.485 10.0013L16.4841 18.6431Z",fill:n.unref(i)},null,8,kn)])])])],8,Cn))}}),Nn=["width","height"],En=["stroke"],An=["stroke"],Ln=n.defineComponent({__name:"IconUndo",props:{size:{default:"16"},color:{default:"#8998B5"}},setup(e){const t=e,{size:o,color:i}=n.toRefs(t),r=n.computed(()=>({10:{width:10,height:10},12:{width:12,height:12},14:{width:14,height:14},16:{width:16,height:16},18:{width:18,height:18},20:{width:20,height:20},22:{width:22,height:22},30:{width:30,height:30}}[o.value]??{width:16,height:16}));return(e,t)=>(n.openBlock(),n.createElementBlock("svg",{width:r.value.width,height:r.value.height,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[n.createElementVNode("path",{d:"M4.5 7.5L2 5L4.5 2.5",stroke:n.unref(i),"stroke-width":"1.4","stroke-linecap":"round","stroke-linejoin":"round"},null,8,En),n.createElementVNode("path",{d:"M2 5H10C12.2091 5 14 6.79086 14 9C14 11.2091 12.2091 13 10 13H5",stroke:n.unref(i),"stroke-width":"1.4","stroke-linecap":"round","stroke-linejoin":"round"},null,8,An)],8,Nn))}}),Vn=["width","height"],On=["stroke"],Pn=["stroke"],Bn=n.defineComponent({__name:"IconRedo",props:{size:{default:"16"},color:{default:"#8998B5"}},setup(e){const t=e,{size:o,color:i}=n.toRefs(t),r=n.computed(()=>({10:{width:10,height:10},12:{width:12,height:12},14:{width:14,height:14},16:{width:16,height:16},18:{width:18,height:18},20:{width:20,height:20},22:{width:22,height:22},30:{width:30,height:30}}[o.value]??{width:16,height:16}));return(e,t)=>(n.openBlock(),n.createElementBlock("svg",{width:r.value.width,height:r.value.height,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[n.createElementVNode("path",{d:"M11.5 7.5L14 5L11.5 2.5",stroke:n.unref(i),"stroke-width":"1.4","stroke-linecap":"round","stroke-linejoin":"round"},null,8,On),n.createElementVNode("path",{d:"M14 5H6C3.79086 5 2 6.79086 2 9C2 11.2091 3.79086 13 6 13H11",stroke:n.unref(i),"stroke-width":"1.4","stroke-linecap":"round","stroke-linejoin":"round"},null,8,Pn)],8,Vn))}}),Rn=["width","height"],zn=["fill","stroke"],Fn=n.defineComponent({__name:"IconDecide",props:{size:{default:"12"},color:{default:"#357E63"},disabled:{type:Boolean,default:!1}},setup(e){const t=e,{size:o,color:i}=n.toRefs(t);return n.computed(()=>({10:{width:10,height:10},12:{width:12,height:12},14:{width:14,height:14},16:{width:16,height:16},18:{width:18,height:18},20:{width:20,height:20},22:{width:22,height:22},30:{width:30,height:30}}[o.value]??{width:12,height:12})),(e,t)=>(n.openBlock(),n.createElementBlock("svg",{width:n.unref(o),height:n.unref(o),viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[n.createElementVNode("path",{d:"M10.973 2.72801L5.61697 8.08401C5.56746 8.13369 5.50862 8.1731 5.44384 8.19999C5.37907 8.22689 5.30961 8.24073 5.23947 8.24073C5.16933 8.24073 5.09988 8.22689 5.0351 8.19999C4.97032 8.1731 4.91149 8.13369 4.86197 8.08401L3.34697 6.56801C3.2973 6.51849 3.25788 6.45966 3.23099 6.39488C3.20409 6.3301 3.19025 6.26065 3.19025 6.19051C3.19025 6.12037 3.20409 6.05092 3.23099 5.98614C3.25788 5.92136 3.2973 5.86252 3.34697 5.81301C3.39649 5.76333 3.45532 5.72391 3.5201 5.69702C3.58488 5.67013 3.65433 5.65628 3.72447 5.65628C3.79461 5.65628 3.86407 5.67013 3.92884 5.69702C3.99362 5.72391 4.05246 5.76333 4.10197 5.81301L5.24097 6.94801L10.212 1.97301C10.2615 1.92333 10.3203 1.88391 10.3851 1.85702C10.4499 1.83013 10.5193 1.81628 10.5895 1.81628C10.6596 1.81628 10.7291 1.83013 10.7938 1.85702C10.8586 1.88391 10.9175 1.92333 10.967 1.97301C11.0175 2.02185 11.0578 2.08028 11.0856 2.14488C11.1133 2.20948 11.1278 2.27896 11.1284 2.34925C11.129 2.41954 11.1155 2.48924 11.0888 2.55427C11.0621 2.61931 11.0227 2.67837 10.973 2.72801ZM8.01697 1.04301C7.00993 0.633602 5.90211 0.540446 4.84084 0.775929C3.77956 1.01141 2.81511 1.56438 2.07573 2.36129C1.33635 3.15821 0.857074 4.16131 0.701629 5.23723C0.546185 6.31314 0.721939 7.41089 1.20552 8.38449C1.6891 9.3581 2.4576 10.1614 3.40883 10.6877C4.36005 11.2139 5.44893 11.4381 6.53068 11.3305C7.61242 11.2229 8.63578 10.7885 9.46467 10.0852C10.2936 9.38181 10.8887 8.44281 11.171 7.39301C11.3744 6.65713 11.4126 5.88539 11.283 5.13301C11.2658 5.03617 11.2225 4.94587 11.1577 4.87188C11.0929 4.7979 11.0091 4.74305 10.9154 4.71328C10.8216 4.68352 10.7216 4.67996 10.6259 4.703C10.5303 4.72605 10.4429 4.77481 10.373 4.84401C10.3122 4.90597 10.2673 4.98169 10.242 5.06474C10.2168 5.14778 10.2119 5.2357 10.228 5.32101C10.3588 6.0922 10.2622 6.88481 9.94997 7.60201C9.65203 8.32184 9.16641 8.94855 8.54376 9.41678C7.9211 9.885 7.18422 10.1776 6.40997 10.264C5.74684 10.329 5.07767 10.2385 4.45562 9.99974C3.83356 9.76093 3.27576 9.38038 2.82649 8.8883C2.37723 8.39622 2.04888 7.80617 1.86753 7.16501C1.68617 6.52384 1.6568 5.84923 1.78176 5.19473C1.90671 4.54023 2.18254 3.92388 2.58734 3.39462C2.99214 2.86537 3.51477 2.43778 4.11372 2.14582C4.71266 1.85385 5.37143 1.70556 6.03771 1.71271C6.70399 1.71986 7.35943 1.88226 7.95197 2.18701C8.0535 2.23932 8.16909 2.25782 8.28187 2.23984C8.39466 2.22185 8.49875 2.1683 8.57897 2.08701C8.63892 2.02756 8.684 1.95481 8.71056 1.87468C8.73713 1.79454 8.74442 1.70927 8.73186 1.62579C8.71929 1.5423 8.68722 1.46296 8.63824 1.39419C8.58926 1.32543 8.52476 1.26918 8.44997 1.23001C8.30597 1.17001 8.16097 1.10001 8.01697 1.04301Z",fill:n.unref(i),stroke:n.unref(i),"stroke-width":"0.28"},null,8,zn)],8,Rn))}}),Gn=["width","height"],Hn={id:"mask0_39347_6416",style:{"mask-type":"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"12",height:"12"},Wn=["width","height","fill"],Un={mask:"url(#mask0_39347_6416)"},Yn=["fill"],Zn=n.defineComponent({__name:"IconColorPicker",props:{size:{default:"12"},color:{default:"#8998B5"},disabled:{type:Boolean,default:!1}},setup(e){const t=e,{size:o,color:i}=n.toRefs(t);return n.computed(()=>({10:{width:10,height:10},12:{width:12,height:12},14:{width:14,height:14},16:{width:16,height:16},18:{width:18,height:18},20:{width:20,height:20},22:{width:22,height:22},30:{width:30,height:30}}[o.value]??{width:12,height:12})),(e,t)=>(n.openBlock(),n.createElementBlock("svg",{width:n.unref(o),height:n.unref(o),viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[n.createElementVNode("mask",Hn,[n.createElementVNode("rect",{width:n.unref(o),height:n.unref(o),fill:n.unref(i)},null,8,Wn)]),n.createElementVNode("g",Un,[n.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.79979 0.548815C9.53158 -0.182973 10.7191 -0.182578 11.4512 0.548815C12.1828 1.28072 12.1828 2.4673 11.4512 3.19921L10.9111 3.74022L10.9853 3.81444C11.7166 4.54633 11.7167 5.73301 10.9853 6.46483C10.3069 7.1432 9.23845 7.19156 8.50292 6.61229L4.55956 10.5596C4.2497 10.8693 3.8396 11.0608 3.40331 11.1006L2.79589 11.1543L2.35546 11.5967C1.81683 12.135 0.942983 12.1349 0.404285 11.5967C-0.134114 11.058 -0.134107 10.1842 0.404285 9.64549L0.843738 9.20409L0.900379 8.59764C0.940129 8.16138 1.13181 7.75224 1.44139 7.44237L5.38671 3.4951C4.80955 2.75973 4.85778 1.69336 5.53514 1.01561C6.26705 0.283878 7.45458 0.283953 8.18651 1.01561L8.25975 1.08885L8.79979 0.548815ZM2.22655 8.22655C2.10059 8.35279 2.02119 8.51977 2.00487 8.69725L1.93261 9.50389C1.92086 9.63312 1.86389 9.75489 1.77245 9.84667L1.18944 10.4297C1.08421 10.5349 1.08442 10.7062 1.18944 10.8115C1.29474 10.9163 1.46513 10.9164 1.5703 10.8115L2.15233 10.2285C2.24413 10.1368 2.36686 10.0792 2.49608 10.0674L3.30272 9.99413C3.4804 9.97787 3.64717 9.90037 3.77343 9.7744L7.708 5.83885L6.16014 4.29198L2.22655 8.22655ZM10.667 1.33397C10.3685 1.03576 9.88442 1.03576 9.58593 1.33397L8.65428 2.26561C8.43725 2.48243 8.08421 2.48233 7.86718 2.26561L7.40136 1.80077C7.10287 1.50256 6.61879 1.50256 6.3203 1.80077C6.02233 2.09926 6.02224 2.5834 6.3203 2.88182L9.11913 5.68065C9.41759 5.97866 9.90174 5.97868 10.2002 5.68065C10.4984 5.38222 10.4983 4.89814 10.2002 4.5996L9.73436 4.13378C9.51765 3.91678 9.5179 3.56465 9.73436 3.34764L10.667 2.41503C10.965 2.1166 10.965 1.63245 10.667 1.33397Z",fill:n.unref(i)},null,8,Yn)])],8,Gn))}});function Xn(){const e=n.inject(z);if(!e)throw new Error("[MozGridVue] useGridInstance는 MozGridVue 내부에서만 사용할 수 있습니다.");return{grid:e}}function jn(e,t,o){const i=o??Xn().grid,r=n.shallowRef(t);let a=null;function l(){a&&(a(),a=null)}return n.watch(()=>i.value,n=>{n?function(t){l();const n=t.select(e);r.value=n.getSnapshot(),a=n.subscribe(()=>{r.value=n.getSnapshot()})}(n):(l(),r.value=t)},{immediate:!0}),n.onScopeDispose(()=>{l()}),r}const $n={class:"grid-search-moz-input"},qn={key:0},Kn={key:0,class:"require-mark"},Jn={class:"moz-input-grid-search-input-wrapper"},Qn=["placeholder","disabled"],eo={style:{height:"100%",width:"26px",display:"flex","align-items":"center"}},to={key:0,class:"grid-search-count-popup"},no={key:0,class:"grid-search-loading"},oo=n.defineComponent({__name:"GridSearchInput",props:{label:{default:null},isRequired:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1},isReadOnly:{type:Boolean,default:!1},modelValue:{default:""},placeholder:{default:""}},emits:["update:modelValue","search","navigate"],setup(e,{expose:t,emit:o}){const i=e,{label:a,placeholder:s,isDisabled:u}=n.toRefs(i),c=o,d=n.inject(z,n.ref(null)),h=n.ref(0),p=n.ref(0),f=n.ref(!1);function g(){const e=d.value;if(!(null==e?void 0:e.getSearchState))return h.value=0,void(p.value=0);const t=e.getSearchState();h.value=t.total,p.value=t.total>0?t.currentIndex+1:0}const v=r.useMozLocale(),m=jn(e=>e.isSearching,!1,d);let y=null;n.watch(m,e=>{e?y||(y=setInterval(g,200)):(y&&(clearInterval(y),y=null),g())});const x=e=>{c("update:modelValue",e),S(e)},_=n.computed({get:()=>i.modelValue,set:x}),w=e=>{const t=e.target;x(t.value)},b=e=>{f.value=!1;const t=e.target;x(t.value)},S=l.debounce(async e=>{var t;const n=d.value;if(!e)return h.value=0,p.value=0,null==(t=null==n?void 0:n.clearSearch)||t.call(n),void c("search","");(null==n?void 0:n.search)&&(await n.search(e),g()),c("search",e)},200),C=n.ref("next"),M=()=>{const e=d.value;if(!(null==e?void 0:e.findNext))return;if(m.value&&p.value>=h.value)return;C.value="next";const t=e.findNext();g(),t&&c("navigate",{row:t.rowIndex,col:0})},T=()=>{const e=d.value;if(!(null==e?void 0:e.findPrev))return;if(m.value&&p.value<=1)return;C.value="prev";const t=e.findPrev();g(),t&&c("navigate",{row:t.rowIndex,col:0})};let I=null,k=null;const D=e=>{e.isComposing||0===h.value||(e.preventDefault(),I||k||("next"===C.value?M():T(),I=setTimeout(()=>{I=null,k=setInterval(()=>{"next"===C.value?M():T()},40)},400)))},N=()=>{I&&(clearTimeout(I),I=null),k&&(clearInterval(k),k=null)},E=()=>{var e,t;""!==_.value&&(_.value=""),h.value=0,p.value=0,null==(t=null==(e=d.value)?void 0:e.clearSearch)||t.call(e)};let A=null;return n.watch(()=>d.value,e=>{A&&(A(),A=null),e&&(A=e.on("data:loaded",E))},{immediate:!0}),n.onBeforeUnmount(()=>{A&&(A(),A=null),y&&(clearInterval(y),y=null),I&&(clearTimeout(I),I=null),k&&(clearInterval(k),k=null)}),t({resetSearch:E}),(e,t)=>(n.openBlock(),n.createElementBlock("div",$n,[n.unref(a)?(n.openBlock(),n.createElementBlock("label",qn,[n.createTextVNode(n.toDisplayString(n.unref(a))+" ",1),1==e.$props.isRequired?(n.openBlock(),n.createElementBlock("span",Kn,"*")):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0),n.createElementVNode("div",{class:n.normalizeClass({"moz-input-grid-search":!0,"no-label":!n.unref(a)})},[n.createVNode(n.unref(r.Button),{type:"icon-accent",class:"search-button spin dec",onClick:T,disabled:0===h.value||n.unref(u)},{icon:n.withCtx(()=>[n.createVNode(n.unref(qe),{color:"currentColor"})]),_:1},8,["disabled"]),n.createElementVNode("div",Jn,[n.withDirectives(n.createElementVNode("input",{placeholder:n.unref(s),"onUpdate:modelValue":t[0]||(t[0]=e=>_.value=e),onInput:w,onCompositionstart:t[1]||(t[1]=e=>f.value=!0),onCompositionend:b,onKeydown:n.withKeys(D,["enter"]),onKeyup:n.withKeys(N,["enter"]),autocomplete:"off",disabled:n.unref(u)},null,40,Qn),[[n.vModelText,_.value]]),n.createElementVNode("div",eo,[n.createVNode(n.unref(hn),{size:"12",color:n.unref(u)?"#a7b1bc":"#8998b5"},null,8,["color"])]),h.value>0||n.unref(m)?(n.openBlock(),n.createElementBlock("span",to,[n.unref(m)?(n.openBlock(),n.createElementBlock("span",no,[t[2]||(t[2]=n.createElementVNode("span",{class:"grid-search-spinner"},null,-1)),n.createTextVNode(" "+n.toDisplayString(n.unref(v).Grid.searching??"검색 중..."),1)])):n.createCommentVNode("",!0),n.createTextVNode(" "+n.toDisplayString(p.value)+" / "+n.toDisplayString(h.value),1)])):n.createCommentVNode("",!0)]),n.createVNode(n.unref(r.Button),{type:"icon-accent",class:"search-button spin inc",onClick:M,disabled:0===h.value||n.unref(u)},{icon:n.withCtx(()=>[n.createVNode(n.unref(qe),{color:"currentColor"})]),_:1},8,["disabled"])],2)]))}}),io=p(oo,[["__scopeId","data-v-17b36a9d"]]),ro={class:"extend-flex-grid-tool-container"},ao={class:"extend-flex-grid-tool-top-wrapper"},lo={class:"extend-grid-tool-left-section"},so={class:"extend-grid-tool-setup-wrapper"},uo={class:"extend-grid-tool-badge-wrapper"},co={key:0,class:"extend-grid-tool-items-wrapper toolbox-setting"},ho={key:0,class:"extend-grid-tool-separator"},po=n.defineComponent({__name:"GridToolBox",props:n.mergeModels({sortCount:{},filterCount:{},customCellCount:{},gridSetupModal:{},isActiveGridModal:{type:Boolean},isActiveFieldModal:{type:Boolean},onSortClick:{type:Function},onFilterClick:{type:Function},onCustomCellClick:{type:Function},onSaveLayoutClick:{type:Function},onFieldSettingClick:{type:Function},onSettingClick:{type:Function},onResetAllClick:{type:Function},itemsLength:{},useToolBoxSetting:{type:Boolean},useToolBoxLayout:{type:Boolean},useSort:{type:Boolean},useCustomCell:{type:Boolean},editable:{type:Boolean},useExportCsv:{type:Boolean},useGroupLevelControl:{type:Boolean},maxGroupLevel:{}},{expanded:{type:Boolean,default:!0},expandedModifiers:{}}),emits:n.mergeModels(["changeSearchValue","pivotChartChange"],["update:expanded"]),setup(e,{emit:t}){const o=e,{onSettingClick:i,onFieldSettingClick:a,useSort:s,useCustomCell:u}=n.toRefs(o),c=n.inject(z,n.ref(null)),d=n.inject(W,void 0),h=n.inject(U,void 0),p=n.inject(Y,void 0),f=n.computed(()=>o.itemsLength??0),g=n.computed(()=>o.filterCount??(null==d?void 0:d.filterList.value.length)??0),v=n.computed(()=>o.sortCount??(null==h?void 0:h.sortList.value.length)??0),m=n.computed(()=>o.customCellCount??(null==p?void 0:p.config.value.ruleSets.length)??0),y=n.computed(()=>o.onFilterClick??(()=>null==d?void 0:d.showFilterHandler())),x=n.computed(()=>o.onSortClick??(()=>null==h?void 0:h.showSortHandler())),_=n.computed(()=>o.onCustomCellClick??(()=>null==p?void 0:p.showCustomCellHandler())),w=n.computed(()=>o.onResetAllClick??(()=>{null==d||d.clearFilter(),null==h||h.clearSort(),null==p||p.clearCustomCell()})),b=r.useMozLocale(),S=n.useModel(e,"expanded"),C=n.ref(""),M=t,T=(e,t=!1)=>f.value||t?e?"#4568E0":"#8998B5":"#A7B1BC",I=n.ref(!1),k=n.computed(()=>f.value?0===g.value&&0===v.value&&0===m.value?"#A7B1BC":I.value?"#4568E0":"#8998B5":"#A7B1BC"),D=()=>{f.value&&(g.value>0||v.value>0||m.value>0)&&(I.value=!0)},N=()=>{I.value=!1},E=n.ref(!1),A=n.ref(!1);let L=null;function V(){var e,t;const n=c.value;n&&(E.value=(null==(e=n.undoManager)?void 0:e.canUndo)??!1,A.value=(null==(t=n.undoManager)?void 0:t.canRedo)??!1)}n.watch(()=>c.value,e=>{L&&(L(),L=null),e&&(L=e.on("undo:stateChange",V),V())},{immediate:!0});const O=()=>{var e,t;null==(t=null==(e=c.value)?void 0:e.undoManager)||t.undo()},P=()=>{var e,t;null==(t=null==(e=c.value)?void 0:e.undoManager)||t.redo()};async function B(){const e=c.value;if(!e)return;const t=await e.getExportData({scope:"all"});if(!t)return;const{headers:n,rows:o}=t,i=n.map(e=>e.id),r=[];r.push(n.map(e=>R(e.header)).join(","));for(const c of o){const e=c;r.push(i.map(t=>R(e[t])).join(","))}const a="\ufeff"+r.join("\r\n"),l=new Blob([a],{type:"text/csv;charset=utf-8;"}),s=URL.createObjectURL(l),u=document.createElement("a");u.href=s,u.download=`export_${(new Date).toISOString().slice(0,10)}.csv`,u.click(),URL.revokeObjectURL(s)}function R(e){const t=null==e?"":String(e);return t.includes(",")||t.includes('"')||t.includes("\n")?`"${t.replace(/"/g,'""')}"`:t}n.onBeforeUnmount(()=>{L&&(L(),L=null)});const F=n.computed(()=>{const e=o.maxGroupLevel??5,t=b.value.Grid,n=[{itemValue:"expand",itemName:t.expandAll??"모두 펼치기"},{itemValue:"collapse",itemName:t.collapseAll??"모두 접기"}];for(let o=1;o<=e;o++)n.push({itemValue:`level-${o}`,itemName:(t.levelN??"레벨 {n}").replace("{n}",String(o))});return n}),G=n.ref("expand");return n.watch(G,e=>{var t,n,o;const i=c.value;if(!i)return;const r=i.rowGroup??i.tree;if(r)if("expand"===e)null==(t=r.expandAll)||t.call(r);else if("collapse"===e)null==(n=r.collapseAll)||n.call(r);else if(e.startsWith("level-")){const t=parseInt(e.replace("level-",""),10);null==(o=r.expandToLevel)||o.call(r,t)}}),n.watch(C,l.debounce(e=>{M("changeSearchValue",e)},200)),(t,o)=>{const l=n.resolveDirective("tooltip");return n.openBlock(),n.createElementBlock(n.Fragment,null,[n.withDirectives(n.createElementVNode("div",ro,[n.createElementVNode("div",ao,[n.createElementVNode("div",lo,[n.renderSlot(t.$slots,"tool-left",{},void 0,!0)]),n.createElementVNode("div",so,[n.createElementVNode("div",uo,[n.renderSlot(t.$slots,"tool-items",{props:{disabled:!f.value,hasItem:!!g.value}},void 0,!0),e.useToolBoxSetting?(n.openBlock(),n.createElementBlock("div",co,[n.withDirectives((n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["extend-grid-tool-items-wrapper",{disabled:!f.value}])},[n.createElementVNode("div",{class:n.normalizeClass({"extend-grid-tool-badge-item-wrapper":!0,"extend-grid-tool-disabled":!1,"is-active":e.isActiveGridModal}),onClick:o[0]||(o[0]=(...e)=>n.unref(i)&&n.unref(i)(...e))},[void 0!==n.unref(i)?(n.openBlock(),n.createBlock(n.unref(vn),{key:0,color:T(e.isActiveGridModal,!0),class:n.normalizeClass({"extend-grid-tool-disabled":!1}),width:16,height:16},null,8,["color"])):n.createCommentVNode("",!0)],2)],2)),[[l,{text:n.unref(b).Grid.layoutSetting,position:["center","toBottom, 4px"]}]]),n.renderSlot(t.$slots,"optionPopup",{},void 0,!0)])):n.createCommentVNode("",!0),n.withDirectives((n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["extend-grid-tool-items-wrapper toolbox-filter",{disabled:!f.value}])},[n.createElementVNode("div",{class:n.normalizeClass({"extend-grid-tool-badge-item-wrapper":!0,"extend-grid-tool-disabled":!f.value,"has-item":g.value}),onClick:o[1]||(o[1]=(...e)=>y.value&&y.value(...e))},[n.createVNode(n.unref(qt),{color:T(g.value),size:"16"},null,8,["color"])],2)],2)),[[l,{text:n.unref(b).Grid.filter,position:["center","toBottom, 4px"]}]]),e.useSort?n.withDirectives((n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(["extend-grid-tool-items-wrapper toolbox-sort",{disabled:!f.value}])},[n.createElementVNode("div",{class:n.normalizeClass({"extend-grid-tool-badge-item-wrapper":!0,"extend-grid-tool-disabled":!f.value,"has-item":v.value}),onClick:o[2]||(o[2]=(...e)=>x.value&&x.value(...e))},[n.createVNode(n.unref(Sn),{color:T(v.value),width:16,height:16},null,8,["color"])],2)],2)),[[l,{text:n.unref(b).Grid.sort,position:["center","toBottom, 4px"]}]]):n.createCommentVNode("",!0),!1!==e.useCustomCell?n.withDirectives((n.openBlock(),n.createElementBlock("div",{key:2,class:n.normalizeClass(["extend-grid-tool-items-wrapper toolbox-custom-cell",{disabled:!f.value}])},[n.createElementVNode("div",{class:n.normalizeClass({"extend-grid-tool-badge-item-wrapper":!0,"extend-grid-tool-disabled":!f.value,"has-item":m.value}),onClick:o[3]||(o[3]=(...e)=>_.value&&_.value(...e))},[n.createVNode(n.unref(Ot),{color:T(m.value),width:16,height:16},null,8,["color"])],2)],2)),[[l,{text:n.unref(b).Grid.customCellStyle,position:["center","toBottom, 4px"]}]]):n.createCommentVNode("",!0),n.withDirectives((n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["extend-grid-tool-items-wrapper toolbox-reset-all",{disabled:!(f.value&&(g.value||v.value||m.value))}])},[n.createElementVNode("div",{class:n.normalizeClass({"extend-grid-tool-badge-item-wrapper":!0,"extend-grid-tool-disabled":!(f.value&&(g.value||v.value||m.value))}),onClick:o[4]||(o[4]=(...e)=>w.value&&w.value(...e)),onMousedown:D,onMouseup:N,onMouseleave:N},[n.createVNode(n.unref(ln),{color:k.value,width:16,height:16},null,8,["color"])],34)],2)),[[l,{text:n.unref(b).Grid.reset,position:["center","toBottom, 4px"]}]]),e.editable?(n.openBlock(),n.createElementBlock(n.Fragment,{key:3},[n.withDirectives((n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["extend-grid-tool-items-wrapper toolbox-undo",{disabled:!E.value}])},[n.createElementVNode("div",{class:n.normalizeClass({"extend-grid-tool-badge-item-wrapper":!0,"extend-grid-tool-disabled":!E.value}),onClick:O},[n.createVNode(n.unref(Ln),{color:E.value?"#8998B5":"#A7B1BC",size:"16"},null,8,["color"])],2)],2)),[[l,{text:n.unref(b).Grid.undo??"실행 취소",position:["center","toBottom, 4px"]}]]),n.withDirectives((n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["extend-grid-tool-items-wrapper toolbox-redo",{disabled:!A.value}])},[n.createElementVNode("div",{class:n.normalizeClass({"extend-grid-tool-badge-item-wrapper":!0,"extend-grid-tool-disabled":!A.value}),onClick:P},[n.createVNode(n.unref(Bn),{color:A.value?"#8998B5":"#A7B1BC",size:"16"},null,8,["color"])],2)],2)),[[l,{text:n.unref(b).Grid.redo??"다시 실행",position:["center","toBottom, 4px"]}]])],64)):n.createCommentVNode("",!0),e.useExportCsv?n.withDirectives((n.openBlock(),n.createElementBlock("div",{key:4,class:n.normalizeClass(["extend-grid-tool-items-wrapper toolbox-export",{disabled:!f.value}])},[n.createElementVNode("div",{class:n.normalizeClass({"extend-grid-tool-badge-item-wrapper":!0,"extend-grid-tool-disabled":!f.value}),onClick:B},[n.createVNode(n.unref(zt),{color:f.value?"#8998B5":"#A7B1BC",size:"16"},null,8,["color"])],2)],2)),[[l,{text:n.unref(b).Grid.exportCsv??"CSV 내보내기",position:["center","toBottom, 4px"]}]]):n.createCommentVNode("",!0),e.useGroupLevelControl?(n.openBlock(),n.createBlock(n.unref(r.Select),{key:5,modelValue:G.value,"onUpdate:modelValue":o[5]||(o[5]=e=>G.value=e),itemsSource:F.value,keyProp:"itemValue",displayProp:"itemName",width:110,class:"toolbox-group-level"},null,8,["modelValue","itemsSource"])):n.createCommentVNode("",!0),n.renderSlot(t.$slots,"tool-items-right",{props:{disabled:!f.value}},void 0,!0)]),void 0!==n.unref(a)||void 0!==n.unref(i)?(n.openBlock(),n.createElementBlock("div",ho)):n.createCommentVNode("",!0),n.createVNode(io,{placeholder:n.unref(b).Grid.searchFilter,class:n.normalizeClass({"extend-grid-tool-search":!0}),modelValue:C.value,"onUpdate:modelValue":o[6]||(o[6]=e=>C.value=e),showSearchIcon:!0,isDisabled:!f.value},null,8,["placeholder","modelValue","isDisabled"]),n.createElementVNode("div",{class:"extend-grid-tool-toggle-icon-wrapper",onClick:o[7]||(o[7]=()=>{S.value=!S.value})},[n.createVNode(n.unref(dt))])])]),n.renderSlot(t.$slots,"tool-bottom",{},void 0,!0)],512),[[n.vShow,S.value]]),n.withDirectives(n.createElementVNode("div",{class:"extend-grid-tool-toggle",onClick:o[8]||(o[8]=()=>{S.value=!S.value})},[n.createVNode(n.unref(dt),{style:{transform:"rotate(180deg)"}})],512),[[n.vShow,!S.value]])],64)}}}),fo=p(po,[["__scopeId","data-v-6803b520"]]),go={class:"pivot-grid-context-menu-title-wrapper"},vo={class:"pivot-grid-context-menu-title"},mo={style:{display:"flex",gap:"10px","align-items":"center"}},yo={key:0,class:"context-menu-separator"},xo=["onClick"],_o=["onClick"],wo=p(n.defineComponent({__name:"GridOptionModal",props:n.mergeModels({useViewSelectColumn:{type:Boolean,default:!0},customMenu:{}},{toolbarVisible:{type:Boolean,default:!0},toolbarVisibleModifiers:{},footerVisible:{type:Boolean,default:!0},footerVisibleModifiers:{},groupPanelVisible:{type:Boolean,default:!1},groupPanelVisibleModifiers:{}}),emits:n.mergeModels(["click-column-picker"],["update:toolbarVisible","update:footerVisible","update:groupPanelVisible"]),setup(e,{expose:t,emit:o}){const i=e,{useViewSelectColumn:a,customMenu:l}=n.toRefs(i),s=o,u=r.useMozLocale(),c=n.useModel(e,"toolbarVisible"),d=n.useModel(e,"footerVisible"),h=n.useModel(e,"groupPanelVisible"),p=n.ref(),f=n.ref([{template:"mainSetting",hover:!1},{template:"gridSetting",hover:!1}]);t({state:n.computed(()=>{var e;return null==(e=p.value)?void 0:e.state}),close:()=>{var e;null==(e=p.value)||e.close()},open:()=>{c.value=!0,n.nextTick(()=>{var e;null==(e=p.value)||e.toggle()})},toggle:()=>{var e;(null==(e=p.value)?void 0:e.state)||(c.value=!0),n.nextTick(()=>{var e;null==(e=p.value)||e.toggle()})}});const g=n.computed(()=>l.value.filter(e=>!0===e.isVisibleOnGridOption));return(e,t)=>(n.openBlock(),n.createBlock(n.unref(r.ContextMenu),{ref_key:"contextMenuRef",ref:p,fixPosition:{top:0,left:0,useTeleport:!0},minWidth:"263px",itemSource:f.value,class:"pivot-grid-context-menu"},{mainSetting:n.withCtx(({props:e})=>[n.createElementVNode("div",go,[n.createElementVNode("span",vo,n.toDisplayString(n.unref(u).Grid.layoutSetting),1),n.createElementVNode("div",mo,[n.createVNode(n.unref(r.Button),{class:"pivot-grid-context-menu-button",type:"icon",onClick:e.close},{default:n.withCtx(()=>[n.createVNode(n.unref(At),{size:"12"})]),_:1},8,["onClick"])])]),t[7]||(t[7]=n.createElementVNode("div",{class:"context-menu-separator"},null,-1)),n.createElementVNode("div",null,[n.createElementVNode("div",{class:"context-menu-item",onClick:t[1]||(t[1]=()=>c.value=!c.value)},[n.createElementVNode("span",null,n.toDisplayString(n.unref(u).Grid.viewToolbar),1),n.createVNode(n.unref(r.Toggle),{modelValue:c.value,"onUpdate:modelValue":t[0]||(t[0]=e=>c.value=e)},null,8,["modelValue"])]),n.createElementVNode("div",{class:"context-menu-item",onClick:t[3]||(t[3]=()=>d.value=!d.value)},[n.createElementVNode("span",null,n.toDisplayString(n.unref(u).Grid.viewFooter),1),n.createVNode(n.unref(r.Toggle),{modelValue:d.value,"onUpdate:modelValue":t[2]||(t[2]=e=>d.value=e)},null,8,["modelValue"])]),n.createElementVNode("div",{class:"context-menu-item",onClick:t[5]||(t[5]=()=>h.value=!h.value)},[n.createElementVNode("span",null,n.toDisplayString(n.unref(u).Grid.viewGroupPanel),1),n.createVNode(n.unref(r.Toggle),{modelValue:h.value,"onUpdate:modelValue":t[4]||(t[4]=e=>h.value=e)},null,8,["modelValue"])]),n.unref(a)?(n.openBlock(),n.createElementBlock("div",yo)):n.createCommentVNode("",!0),n.unref(a)?(n.openBlock(),n.createElementBlock("div",{key:1,class:"context-menu-item",onClick:()=>{s("click-column-picker"),e.close()}},n.toDisplayString(n.unref(u).Grid.columnPicker),9,xo)):n.createCommentVNode("",!0),g.value.length>0?(n.openBlock(),n.createElementBlock(n.Fragment,{key:2},[t[6]||(t[6]=n.createElementVNode("div",{class:"context-menu-separator"},null,-1)),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(g.value,t=>(n.openBlock(),n.createElementBlock("div",{key:t.header,class:"context-menu-item",onClick:()=>{t.clicked&&(t.clicked(),e.close())}},n.toDisplayString(t.header),9,_o))),128))],64)):n.createCommentVNode("",!0)])]),_:1},8,["itemSource"]))}}),[["__scopeId","data-v-b4015119"]]),bo=class e{constructor(){t(this,"listeners"),this.listeners=new Map}static getInstance(){return e.instance||(e.instance=new e),e.instance}subscribe(e,t,n){this.listeners.has(e)||this.listeners.set(e,new Map);const o=this.listeners.get(e);o.has(t)||o.set(t,[]);return o.get(t).push(n),()=>{const i=this.listeners.get(e);if(i){const e=o.get(t);e&&i.set(t,e.filter(e=>e!==n))}}}emit(e,t){const n=this.listeners.get(t.name);if(!n)return;(n.get(e)||[]).forEach(e=>e(t))}};t(bo,"instance");const So=bo.getInstance(),Co=["draggable","onDragstart","onDrop"],Mo=p(n.defineComponent({__name:"Dragging",props:n.mergeModels({name:{},copy:{type:Boolean,default:!1},sortable:{type:Boolean,default:!0},itemKey:{default:"id"},direction:{default:"vertical"},dragHandle:{default:void 0},onBeforeItemDrop:{type:Function,default:()=>!0},onItemDrop:{type:Function,default:()=>{}}},{modelValue:{required:!0},modelModifiers:{}}),emits:n.mergeModels(["drag"],["update:modelValue"]),setup(e,{emit:t}){const o=e,{name:i,copy:r,sortable:a,itemKey:l,direction:s,dragHandle:u,onBeforeItemDrop:c,onItemDrop:d}=n.toRefs(o),h=t,p=n.useModel(e,"modelValue"),f="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}),g=n.ref(null),v=n.ref(null);function m(e,t){return e[l.value]??t}let y;function x(e){if(!u.value)return;e.currentTarget.draggable=!1}n.onMounted(()=>{y=So.subscribe(i.value,"remove-item",e=>{r.value||e.sourceComponentId!==f||(p.value=p.value.filter(t=>t[l.value]!==e.item[l.value]))})}),n.onUnmounted(()=>{null==y||y()});const _=["on-drag-over","on-drag-over-top","on-drag-over-bottom","on-drag-over-left","on-drag-over-right"];function w(e){e.classList.remove(..._)}function b(e){var t;e.preventDefault();const o=null==(t=e.dataTransfer)?void 0:t.getData("application/json");if(o){const e=JSON.parse(o),t=e.componentId;if(!c.value(e.item))return;if(e.name!==i.value)return;if(t===f)e.item&&a.value&&g.value&&null!==v.value&&(p.value.splice(v.value,1),p.value.splice(p.value.length,0,g.value));else if(e.item){So.emit("remove-item",{name:e.name,sourceComponentId:t,itemKey:l.value,item:e.item});p.value.some(t=>t[l.value]===e.item[l.value])||(p.value=[...p.value,e.item])}n.nextTick(()=>{d.value(e.item),h("drag",e.item)})}g.value=null,v.value=null}return(e,t)=>(n.openBlock(),n.createBlock(n.TransitionGroup,{name:"list",tag:"div",class:"dragging-container",onDragover:t[5]||(t[5]=n.withModifiers(()=>{},["prevent"])),onDrop:b},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(p.value,(o,r)=>(n.openBlock(),n.createElementBlock("div",{key:m(o,r),class:n.normalizeClass(["drag-item",{"drag-handle-mode":!!n.unref(u)}]),draggable:!n.unref(u),onMousedown:t[0]||(t[0]=e=>function(e){if(!u.value)return;const t=e.currentTarget,n=t.querySelector(u.value);n&&n.contains(e.target)&&(t.draggable=!0)}(e)),onMouseup:t[1]||(t[1]=e=>x(e)),onDragend:t[2]||(t[2]=e=>x(e)),onDragstart:e=>function(e,t,n){var o;e.stopImmediatePropagation(),e.stopPropagation(),g.value=t,v.value=n;const r={name:i.value,componentId:f,item:t};null==(o=e.dataTransfer)||o.setData("application/json",JSON.stringify(r))}(e,o,r),onDragover:t[3]||(t[3]=n.withModifiers(e=>function(e){if(!a.value)return;e.preventDefault();const t=null==e?void 0:e.currentTarget;if(null==t?void 0:t.classList.contains("drag-item")){w(t);const n=t.getBoundingClientRect();if("horizontal"===s.value){const o=e.clientX,i=n.left+n.width/2;t.classList.add(o<i?"on-drag-over-left":"on-drag-over-right")}else{const o=e.clientY,i=n.top+n.height/2;t.classList.add(o<i?"on-drag-over-top":"on-drag-over-bottom")}}}(e),["prevent"])),onDragleave:t[4]||(t[4]=n.withModifiers(e=>function(e){if(e.stopImmediatePropagation(),e.stopPropagation(),!a.value)return;e.preventDefault();const t=null==e?void 0:e.currentTarget;(null==t?void 0:t.classList.contains("drag-item"))&&w(t)}(e),["prevent"])),onDrop:e=>function(e,t){var o;e.preventDefault(),e.stopImmediatePropagation(),e.stopPropagation();const r=null==e?void 0:e.currentTarget;(null==r?void 0:r.classList.contains("drag-item"))&&w(r);const u=null==(o=e.dataTransfer)?void 0:o.getData("application/json");if(u){const o=JSON.parse(u),m=o.componentId;if(!c.value(o.item))return;let y=t;if(r){const n=r.getBoundingClientRect();"horizontal"===s.value?e.clientX>=n.left+n.width/2&&(y=t+1):e.clientY>=n.top+n.height/2&&(y=t+1)}o.name===i.value&&(m===f?a.value&&g.value&&null!==v.value&&(v.value<y&&(y-=1),p.value.splice(v.value,1),p.value.splice(y,0,g.value)):o.item&&(So.emit("remove-item",{name:o.name,sourceComponentId:m,itemKey:l.value,item:o.item}),p.value.some(e=>e[l.value]===o.item[l.value])||p.value.splice(y,0,o.item))),n.nextTick(()=>{d.value(o.item),h("drag",o.item)})}g.value=null,v.value=null}(e,r)},[n.renderSlot(e.$slots,"default",{item:o,index:r},void 0,!0)],42,Co))),128))]),_:3}))}}),[["__scopeId","data-v-1b0d68de"]]),To={class:"moz-filter-handler"},Io={key:1,class:"spacer"},ko={class:"filter-operation-row"},Do={class:"symbol highlight-container"},No={class:"desc"},Eo={class:"filter-operation-row"},Ao={class:"symbol highlight-container"},Lo={class:"desc"},Vo={class:"filter-operation-row"},Oo={class:"symbol highlight-container"},Po={class:"desc"},Bo=["onClick"],Ro={class:"moz-filter-footer"},zo={class:"moz-filter-footer-actions"},Fo=n.defineComponent({__name:"GridFilter",props:{gridKey:{type:String,default:""},dateFormat:{type:String,default:"YYYY-MM-DD"}},setup(e){const t=e,{gridKey:o,dateFormat:a}=n.toRefs(t),s=n.inject(W),u=n.inject(z),{showFilter:c,hitColumn:d}=s,h=r.useMozLocale(),p=n.computed(()=>({wide:565,normal:480,diff:85})),f=n.computed(()=>S.value.length>1?p.value.wide:p.value.normal),g=n.computed(()=>{const e=S.value.length>13?13:S.value.length;return 125+30*e+8*(e-1)}),v=n.ref([]),m=n.computed(()=>new Map([["=",h.value.Grid.symbolEqual],["≠",h.value.Grid.symbolNotEqual],["%",h.value.Grid.symbolContains],["!%",h.value.Grid.symbolNotContains],["<",h.value.Grid.symbolLessThan],[">",h.value.Grid.symbolGreaterThan],["≤",h.value.Grid.symbolLessOrEqual],["≥",h.value.Grid.symbolGreaterOrEqual],["∅",h.value.Grid.symbolEmpty],["●",h.value.Grid.symbolNotEmpty]])),y=n.computed(()=>[{symbol:"%",desc:m.value.get("%")||""},{symbol:"!%",desc:m.value.get("!%")||""},{symbol:"=",desc:m.value.get("=")||""},{symbol:"≠",desc:m.value.get("≠")||""},{symbol:"∅",desc:m.value.get("∅")||""},{symbol:"●",desc:m.value.get("●")||""}]),x=n.computed(()=>[{symbol:"=",desc:m.value.get("=")||""},{symbol:"≠",desc:m.value.get("≠")||""},{symbol:"<",desc:m.value.get("<")||""},{symbol:">",desc:m.value.get(">")||""},{symbol:"≤",desc:m.value.get("≤")||""},{symbol:"≥",desc:m.value.get("≥")||""},{symbol:"∅",desc:m.value.get("∅")||""},{symbol:"●",desc:m.value.get("●")||""}]),_=n.computed(()=>[{symbol:"=",desc:m.value.get("=")||""},{symbol:"≠",desc:m.value.get("≠")||""},{symbol:"∅",desc:m.value.get("∅")||""},{symbol:"●",desc:m.value.get("●")||""}]),w=n.ref([{key:"AND",value:"AND"},{key:"OR",value:"OR"}]);function b(e){return"∅"===e||"●"===e}const S=n.ref([]),C=n.ref(!1),M=n.ref(),T=n.shallowRef([]),I=n.ref(!1),k=n.computed(()=>{const e=null==u?void 0:u.value;if(!e)return!1;return e.select(e=>e.totalRowCount).getSnapshot()<1e5}),D=e=>{I.value&&s.applyFilter(e)},N=e=>{M.value=e??void 0},E=()=>{c.value&&D(S.value)},A=e=>{c.value&&(e.comparisonObj||(e.comparisonObj=G(e).comparisonObj),e.comparison=e.comparisonObj.symbol,D(S.value))},L=l.debounce(()=>{c.value&&D(S.value)},100),V=()=>{S.value.forEach((e,t)=>{e.sequence=t}),D([...S.value])},O=()=>{s.setFilter([]),S.value=[],H()},P=()=>{const e=S.value.length>0?Math.max(...S.value.map(e=>e.sequence))+1:0,t=d.value||T.value&&T.value[0];t&&(S.value.push(B(e,t)),D(S.value),setTimeout(()=>{var e,t;null==(t=null==(e=document.getElementById(`filter-variable-input-flex-${S.value.length-1}-${o.value}`))?void 0:e.querySelector("input"))||t.focus()},0)),S.value.length>1&&M.value&&setTimeout(()=>{M.value.scrollTop=M.value.scrollHeight},0)},B=(e,t)=>{const n=("array"===t.dataType?"string":t.dataType)||"string";return{sequence:e,header:t.header||"",binding:t.id||"",logical:"AND",comparison:R(n),comparisonObj:F(n),type:n,variable:null}},R=e=>{let t;if("string"===e)t="%";else t="=";return t},F=e=>{let t;switch(e){case"string":default:t=y.value[0];break;case"number":case"date":t=x.value[0];break;case"boolean":t=_.value[0]}return t},G=e=>{let t;switch(e.type){case"string":default:t=y.value.find(t=>t.symbol===e.comparison);break;case"number":t=x.value.find(t=>t.symbol===e.comparison);break;case"boolean":t=_.value.find(t=>t.symbol===e.comparison)}const n=e;return n.comparisonObj=t||F(e.type||"string"),n},H=()=>{I.value||(S.value.length>0?s.applyFilter(JSON.parse(JSON.stringify(S.value))):s.setFilter([])),c.value=!1},U=()=>{const e=null==u?void 0:u.value;if(!e)return;const t=e.getPivotFields();let n=e.getFields()??(t?[...t.rowFields,...t.columnFields,...t.valueFields,...t.filterFields]:null);T.value=(n??[]).filter(e=>!e.hidden&&e.header&&e.header.length>0),v.value=T.value.map(e=>({header:e.header}))},Y=()=>{const e=s.getFilter();if(e&&e.length>0){if(S.value=e.map(e=>("date"===e.type&&(e.dummy||(e.dummy=i(e.variable))),e.comparisonObj?e:G(e))),d.value){const e=S.value.length>0?Math.max(...S.value.map(e=>e.sequence))+1:0;S.value.push(B(e,d.value))}}else S.value=[]};return n.watch([T],()=>{Y()},{immediate:!0}),n.watch([c],()=>{var e;if(c.value){if(I.value=k.value,U(),0===(null==(e=T.value)?void 0:e.length))return;Y(),C.value=!0,n.nextTick(()=>{var e;const t=null==(e=document.getElementById(`filter-variable-input-flex-${S.value.length-1}-${o.value}`))?void 0:e.querySelector("input");null==t||t.blur(),n.nextTick(()=>{null==t||t.focus()})})}else C.value=!1}),n.watch([C],()=>{U()}),(e,t)=>{const l=n.resolveDirective("tooltip");return n.openBlock(),n.createBlock(n.unref(r.Popup),{visible:C.value,"onUpdate:visible":t[2]||(t[2]=e=>C.value=e),title:n.unref(h).Grid.filterPopup,width:f.value,height:g.value,onCancel:H,onInit:N,class:"moz-filter-popup",resizeable:!1,top:250,"contents-padding":"16px 16px 0 16px",showFooterBorder:!1},{footer:n.withCtx(()=>[n.createElementVNode("div",Ro,[n.createVNode(n.unref(r.CheckBox),{modelValue:I.value,"onUpdate:modelValue":t[1]||(t[1]=e=>I.value=e),label:n.unref(h).Grid.immediateApply??"바로 적용"},null,8,["modelValue","label"]),n.createElementVNode("div",zo,[n.createVNode(n.unref(r.Button),{type:"text",onClick:O},{icon:n.withCtx(()=>[n.createVNode(n.unref(nn),{color:"#4568e0"})]),default:n.withCtx(()=>[n.createElementVNode("span",null,n.toDisplayString(n.unref(h).Grid.resetFilter),1)]),_:1}),n.createVNode(n.unref(r.Button),{type:"text",onClick:P},{icon:n.withCtx(()=>[n.createVNode(n.unref(Ue),{color:"#4568e0"})]),default:n.withCtx(()=>[n.createElementVNode("span",null,n.toDisplayString(n.unref(h).Grid.addFilter),1)]),_:1})])])]),default:n.withCtx(()=>[n.createVNode(Mo,{modelValue:S.value,"onUpdate:modelValue":t[0]||(t[0]=e=>S.value=e),name:"moz-grid-filter",itemKey:"sequence",sortable:!0,dragHandle:".moz-filter-handler",onItemDrop:V,class:"moz-filters-wrapper"},{default:n.withCtx(({item:e,index:t})=>[n.createElementVNode("div",{class:n.normalizeClass(["moz-filter-row",{"minify-width":S.value.length<=1}])},[n.createElementVNode("div",To,[n.createVNode(n.unref(Xt),{size:"12"})]),0!==t?(n.openBlock(),n.createBlock(n.unref(r.Select),{key:0,modelValue:e.logical,"onUpdate:modelValue":t=>e.logical=t,itemsSource:w.value,keyProp:"key",displayProp:"value",onChange:E,width:"100%"},null,8,["modelValue","onUpdate:modelValue","itemsSource"])):n.createCommentVNode("",!0),0===t&&S.value.length>1?(n.openBlock(),n.createElementBlock("div",Io)):n.createCommentVNode("",!0),n.createVNode(n.unref(r.Select),{modelValue:e.header,"onUpdate:modelValue":t=>e.header=t,itemsSource:v.value,keyProp:"header",displayProp:"header",onChange:()=>((e,t)=>{var n;if(!c.value)return;const i=null==(n=T.value)?void 0:n.find(t=>t.header===e.header);e.binding=(null==i?void 0:i.id)||"",e.type=("array"===(null==i?void 0:i.dataType)?"string":null==i?void 0:i.dataType)||"string",e.variable=null,"number"===e.type||"date"===e.type?S.value[t].comparisonObj=x.value[0]:"boolean"===e.type?S.value[t].comparisonObj=_.value[0]:S.value[t].comparisonObj=y.value[0],S.value[t].comparison=S.value[t].comparisonObj.symbol,setTimeout(()=>{var t,n;D(S.value),null==(n=null==(t=document.getElementById(`filter-variable-input-flex-${e.sequence}-${o.value}`))?void 0:t.querySelector("input"))||n.focus()})})(e,t),width:"100%"},null,8,["modelValue","onUpdate:modelValue","itemsSource","onChange"]),"number"===e.type||"date"===e.type?(n.openBlock(),n.createBlock(n.unref(r.Select),{key:2,modelValue:e.comparisonObj,"onUpdate:modelValue":t=>e.comparisonObj=t,itemsSource:x.value,keyProp:"symbol",displayProp:"symbol",onChange:()=>A(e),width:"100%",useObjBinding:!0,useFilter:!1,listWidth:172},{"list-item":n.withCtx(({item:e,highlightText:t})=>[n.createElementVNode("table",null,[n.createElementVNode("tbody",null,[n.createElementVNode("tr",ko,[n.createElementVNode("td",Do,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(t,({part:e,highlight:t},o)=>(n.openBlock(),n.createElementBlock("span",{key:o,class:n.normalizeClass({highlight:t})},n.toDisplayString(e),3))),128))]),n.withDirectives((n.openBlock(),n.createElementBlock("td",No,[n.createTextVNode(n.toDisplayString(e.desc),1)])),[[l,{text:e.desc,onlyEllipsis:!0}]])])])])]),_:1},8,["modelValue","onUpdate:modelValue","itemsSource","onChange"])):"boolean"===e.type?(n.openBlock(),n.createBlock(n.unref(r.Select),{key:3,modelValue:e.comparisonObj,"onUpdate:modelValue":t=>e.comparisonObj=t,itemsSource:_.value,keyProp:"symbol",displayProp:"symbol",onChange:()=>A(e),width:"100%",useObjBinding:!0,useFilter:!1,listWidth:172},{"list-item":n.withCtx(({item:e,highlightText:t})=>[n.createElementVNode("table",null,[n.createElementVNode("tbody",null,[n.createElementVNode("tr",Eo,[n.createElementVNode("td",Ao,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(t,({part:e,highlight:t},o)=>(n.openBlock(),n.createElementBlock("span",{key:o,class:n.normalizeClass({highlight:t})},n.toDisplayString(e),3))),128))]),n.withDirectives((n.openBlock(),n.createElementBlock("td",Lo,[n.createTextVNode(n.toDisplayString(e.desc),1)])),[[l,{text:e.desc,onlyEllipsis:!0}]])])])])]),_:1},8,["modelValue","onUpdate:modelValue","itemsSource","onChange"])):(n.openBlock(),n.createBlock(n.unref(r.Select),{key:4,modelValue:e.comparisonObj,"onUpdate:modelValue":t=>e.comparisonObj=t,itemsSource:y.value,keyProp:"symbol",displayProp:"symbol",onChange:()=>A(e),width:"100%",useObjBinding:!0,useFilter:!1,listWidth:172},{"list-item":n.withCtx(({item:e,highlightText:t})=>[n.createElementVNode("table",null,[n.createElementVNode("tbody",null,[n.createElementVNode("tr",Vo,[n.createElementVNode("td",Oo,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(t,({part:e,highlight:t},o)=>(n.openBlock(),n.createElementBlock("span",{key:o,class:n.normalizeClass({highlight:t})},n.toDisplayString(e),3))),128))]),n.withDirectives((n.openBlock(),n.createElementBlock("td",Po,[n.createTextVNode(n.toDisplayString(e.desc),1)])),[[l,{text:e.desc,onlyEllipsis:!0}]])])])])]),_:1},8,["modelValue","onUpdate:modelValue","itemsSource","onChange"])),"number"===e.type?(n.openBlock(),n.createBlock(n.unref(r.NumberInput),{key:5,id:`filter-variable-input-flex-${e.sequence}-${n.unref(o)}`,modelValue:e.variable,"onUpdate:modelValue":t=>e.variable=t,disabled:b(e.comparison),step:1,onKeyup:n.withKeys(H,["enter"]),width:"100%",onChange:n.unref(L),onInput:n.unref(L),onPaste:n.unref(L),onCut:n.unref(L)},null,8,["id","modelValue","onUpdate:modelValue","disabled","onChange","onInput","onPaste","onCut"])):"boolean"===e.type?(n.openBlock(),n.createBlock(n.unref(r.Select),{key:6,id:`filter-variable-input-flex-${e.sequence}-${n.unref(o)}`,modelValue:e.variable,"onUpdate:modelValue":t=>e.variable=t,disabled:b(e.comparison),itemsSource:[{key:!0,value:"TRUE"},{key:!0,value:"FALSE"}],displayProp:"value",keyProp:"key",onKeyup:n.withKeys(H,["enter"]),width:"100%",onChange:n.unref(L),onInput:n.unref(L),onPaste:n.unref(L),onCut:n.unref(L)},null,8,["id","modelValue","onUpdate:modelValue","disabled","onChange","onInput","onPaste","onCut"])):"date"===e.type?(n.openBlock(),n.createBlock(n.unref(r.DateInput),{key:7,id:`filter-variable-input-flex-${e.sequence}-${n.unref(o)}`,modelValue:e.dummy,"onUpdate:modelValue":t=>e.dummy=t,disabled:b(e.comparison),onInput:t=>{e.variable=t.target.value,n.unref(L)()},onKeyup:n.withKeys(H,["enter"]),onChange:t=>{t&&(e.variable=t.format("YYYY-MM-DD")),n.unref(L)()},onPaste:t=>{t&&(e.variable=t.format("YYYY-MM-DD")),n.unref(L)()},onCut:t=>{e.variable=t.format("YYYY-MM-DD"),n.unref(L)()},onBlur:()=>{n.unref(i)(e.variable).isValid()&&(e.dummy=n.unref(i)(e.variable))},format:n.unref(a),width:"100%"},null,8,["id","modelValue","onUpdate:modelValue","disabled","onInput","onChange","onPaste","onCut","onBlur","format"])):(n.openBlock(),n.createBlock(n.unref(r.Input),{key:8,id:`filter-variable-input-flex-${e.sequence}-${n.unref(o)}`,modelValue:e.variable,"onUpdate:modelValue":t=>e.variable=t,disabled:b(e.comparison),onKeyup:n.withKeys(H,["enter"]),width:"100%",onChange:n.unref(L),onInput:t=>{const o=t.target;e.variable=null==o?void 0:o.value,n.unref(L)()},onPaste:n.unref(L),onCut:n.unref(L)},null,8,["id","modelValue","onUpdate:modelValue","disabled","onChange","onInput","onPaste","onCut"])),n.createElementVNode("span",{class:"remove-row",onClick:t=>(e=>{var t;const n=null==(t=S.value)?void 0:t.findIndex(t=>e.sequence===t.sequence);n<0||(S.value.splice(n,1),D(JSON.parse(JSON.stringify(S.value))),0===S.value.length&&H())})(e),tabindex:"0"},[n.createVNode(n.unref(At))],8,Bo)],2)]),_:1},8,["modelValue"])]),_:1},8,["visible","title","width","height"])}}}),Go=p(Fo,[["__scopeId","data-v-9890c576"]]),Ho={class:"moz-sort-handler"},Wo=["onClick"],Uo={class:"moz-sort-footer"},Yo={class:"moz-sort-footer-actions"},Zo=p(n.defineComponent({__name:"GridSort",props:{width:{type:Number,default:410},height:{type:Number,default:112}},setup(e){const t=e,{width:o,height:i}=n.toRefs(t),a=n.inject(U),l=n.inject(z),s=n.computed(()=>(null==a?void 0:a.showSort.value)??!1),u=n.computed({get:()=>s.value,set:e=>{e||S()}}),c=r.useMozLocale(),d=n.computed(()=>M.value&&T.value.length>0?t.width+130:t.width),h=n.shallowRef([]),p=n.ref([]),f=n.ref([]),g=n.ref(!1),v=n.computed(()=>{const e=null==l?void 0:l.value;if(!e)return!1;return e.select(e=>e.totalRowCount).getSnapshot()<1e5}),m=e=>{g.value&&(null==a||a.applySort(e))},y=()=>{null==a||a.clearSort(),f.value=[],S()},x=()=>{if(!h.value||0===h.value.length)return;let e=0;f.value.length>0&&(e=f.value[f.value.length-1].sequence+1);const t=h.value.filter(e=>!f.value.some(t=>t.binding===e.id))[0];t&&(f.value.push(_(e,t)),m(f.value),setTimeout(()=>{var e;null==(e=document.getElementById("sort-ascending-input-"+(f.value.length-1)))||e.focus()},0))},_=(e,t)=>({sequence:e,header:t.header??"",binding:t.id??"",ascending:!0,ascendingStr:c.value.Grid.ascending,byValue:""}),w=e=>e.map(e=>(e.ascendingStr=e.ascending?c.value.Grid.ascending:c.value.Grid.descending,e));let b=!1;const S=()=>{b||(b=!0,g.value||(f.value.length>0?null==a||a.applySort([...f.value]):null==a||a.clearSort()),null==a||a.hideSortHandler(),b=!1)},C=()=>{f.value.forEach((e,t)=>{e.sequence=t}),m([...f.value])},M=n.ref(!1),T=n.ref([]),I=n.computed(()=>[{value:"",label:c.value.Grid.sortByLabel??"레이블"},...T.value.map(e=>({value:e.field,label:e.header??e.field}))]),k=()=>{s.value&&m(f.value)};function D(){!function(){var e,t;const n=null==l?void 0:l.value;if(!n)return M.value=!1,void(T.value=[]);try{const o=null==(e=n.pivot)?void 0:e.getMode();if(M.value="pivot"===o,!M.value)return void(T.value=[]);const i=null==(t=n.pivot)?void 0:t.getConfig(),r=null==i?void 0:i.valueFields;r&&r.length>0?T.value=r.map(e=>({field:e.field,header:e.header})):T.value=[]}catch{M.value=!1,T.value=[]}}();const e=null==l?void 0:l.value;if(!e)return h.value=[],void(p.value=[]);const t=e.getPivotFields();let n=e.getFields()??(t?[...t.rowFields,...t.columnFields,...t.valueFields,...t.filterFields]:null);if(!n||0===n.length)return h.value=[],void(p.value=[]);h.value=n.filter(e=>"_RID"!==e.id&&e.header&&e.header.length>0),p.value=h.value.map(e=>({header:e.header??""})).filter(e=>e.header.length>0)}return n.watch([h],()=>{const e=(null==a?void 0:a.getSort())??[];e.length>0&&(f.value=w(e))},{immediate:!0}),n.watch([s],()=>{if(s.value){g.value=v.value;(null==l?void 0:l.value)&&0!==h.value.length||D(),setTimeout(()=>{if(!(null==l?void 0:l.value))return;const e=(null==a?void 0:a.getSort())??[];if(e.length>0?f.value=w(e):f.value=[],f.value.length>0){const e=document.getElementById("sort-ascending-input-"+(f.value.length-1));null==e||e.blur(),setTimeout(()=>{null==e||e.focus()},0)}},10)}}),n.watch([s],()=>{D()}),(e,t)=>(n.openBlock(),n.createBlock(n.unref(r.Popup),{visible:u.value,"onUpdate:visible":t[2]||(t[2]=e=>u.value=e),title:n.unref(c).Grid.sortingPopup,width:d.value,"max-height":500,onCancel:()=>{u.value=!1},contentsPadding:"16px 16px 0 16px",showFooterBorder:!1,top:250},{footer:n.withCtx(()=>[n.createElementVNode("div",Uo,[n.createVNode(n.unref(r.CheckBox),{modelValue:g.value,"onUpdate:modelValue":t[1]||(t[1]=e=>g.value=e),label:n.unref(c).Grid.immediateApply??"바로 적용"},null,8,["modelValue","label"]),n.createElementVNode("div",Yo,[n.createVNode(n.unref(r.Button),{type:"text",onClick:y},{icon:n.withCtx(()=>[n.withDirectives(n.createVNode(n.unref(nn),{color:"#4568e0"},null,512),[[n.vShow,0!==f.value.length]])]),default:n.withCtx(()=>[n.withDirectives(n.createElementVNode("span",null,n.toDisplayString(n.unref(c).Grid.resetSort),513),[[n.vShow,0!==f.value.length]])]),_:1}),n.withDirectives(n.createVNode(n.unref(r.Button),{type:"text",onClick:x},{icon:n.withCtx(()=>[n.createVNode(n.unref(Ue),{color:"#4568e0"})]),default:n.withCtx(()=>[n.createElementVNode("span",null,n.toDisplayString(n.unref(c).Grid.addSort),1)]),_:1},512),[[n.vShow,f.value.length<p.value.length]])])])]),default:n.withCtx(()=>[n.createVNode(Mo,{modelValue:f.value,"onUpdate:modelValue":t[0]||(t[0]=e=>f.value=e),name:"moz-grid-sort",itemKey:"binding",sortable:!0,dragHandle:".moz-sort-handler",onItemDrop:C,class:"moz-sort-container"},{default:n.withCtx(({item:e,index:t})=>[n.createElementVNode("div",{class:n.normalizeClass(["moz-sort-row",{"moz-sort-row--pivot":M.value&&T.value.length>0}])},[n.createElementVNode("div",Ho,[n.createVNode(n.unref(Xt),{size:"12"})]),n.createVNode(n.unref(r.Select),{width:210,modelValue:e.header,"onUpdate:modelValue":t=>e.header=t,itemsSource:p.value.filter(e=>!f.value.slice(0,t).some(t=>t.header===e.header)),"display-prop":"header","key-prop":"header",onChange:()=>(e=>{var t;if(!s.value)return;const n=null==(t=h.value)?void 0:t.find(t=>t.header===e.header);e.binding=(null==n?void 0:n.id)??"",e.ascending=!0,setTimeout(()=>{var t;m(f.value),null==(t=document.getElementById(`sort-ascending-input-${e.sequence}`))||t.focus()})})(e)},null,8,["modelValue","onUpdate:modelValue","itemsSource","onChange"]),n.createVNode(n.unref(r.Select),{width:100,id:`sort-ascending-input-${e.sequence}`,modelValue:e.ascendingStr,"onUpdate:modelValue":t=>e.ascendingStr=t,itemsSource:[{value:n.unref(c).Grid.ascending},{value:n.unref(c).Grid.descending}],"key-prop":"value","display-prop":"value",onChange:()=>(e=>{s.value&&(e.ascending=e.ascendingStr===c.value.Grid.ascending,m(f.value))})(e),onKeyup:n.withKeys(S,["enter"])},null,8,["id","modelValue","onUpdate:modelValue","itemsSource","onChange"]),M.value&&T.value.length>0?(n.openBlock(),n.createBlock(n.unref(r.Select),{key:0,width:120,modelValue:e.byValue,"onUpdate:modelValue":t=>e.byValue=t,itemsSource:I.value,"key-prop":"value","display-prop":"label",onChange:k},null,8,["modelValue","onUpdate:modelValue","itemsSource"])):n.createCommentVNode("",!0),n.createElementVNode("span",{class:"remove-row",onClick:t=>(e=>{var t;const n=null==(t=f.value)?void 0:t.findIndex(t=>e.sequence===t.sequence);n<0||(f.value.splice(n,1),m([...f.value]),0===f.value.length&&S())})(e)},[n.createVNode(n.unref(At))],8,Wo)],2)]),_:1},8,["modelValue"])]),_:1},8,["visible","title","width","onCancel"]))}}),[["__scopeId","data-v-76b573a3"]]),Xo=1,jo=2,$o=3,qo=4,Ko=new Set(["+","-","*","/"]),Jo=new Set(["=","!=","<",">","<=",">="]),Qo=new Set(["CONTAINS","NOT_CONTAINS","STARTS_WITH","ENDS_WITH","LIKE"]),ei=new Set(["IS_EMPTY","IS_NOT_EMPTY"]),ti=new Set(["AND","OR","NOT"]),ni=["ㄱ","ㄲ","ㄴ","ㄷ","ㄸ","ㄹ","ㅁ","ㅂ","ㅃ","ㅅ","ㅆ","ㅇ","ㅈ","ㅉ","ㅊ","ㅋ","ㅌ","ㅍ","ㅎ"],oi=[{type:"operator",value:"=",displayText:"=",description:"같음"},{type:"operator",value:"!=",displayText:"!=",description:"같지 않음"},{type:"operator",value:"<",displayText:"<",description:"미만"},{type:"operator",value:">",displayText:">",description:"초과"},{type:"operator",value:"<=",displayText:"<=",description:"이하"},{type:"operator",value:">=",displayText:">=",description:"이상"},{type:"operator",value:"+",displayText:"+",description:"더하기"},{type:"operator",value:"-",displayText:"-",description:"빼기"},{type:"operator",value:"*",displayText:"*",description:"곱하기"},{type:"operator",value:"/",displayText:"/",description:"나누기"},{type:"operator",value:"CONTAINS",displayText:"CONTAINS",description:"포함"},{type:"operator",value:"NOT_CONTAINS",displayText:"NOT_CONTAINS",description:"포함하지 않음"},{type:"operator",value:"STARTS_WITH",displayText:"STARTS_WITH",description:"시작"},{type:"operator",value:"ENDS_WITH",displayText:"ENDS_WITH",description:"끝남"},{type:"operator",value:"IS_EMPTY",displayText:"IS_EMPTY",description:"비어있음"},{type:"operator",value:"IS_NOT_EMPTY",displayText:"IS_NOT_EMPTY",description:"비어있지 않음"},{type:"operator",value:"LIKE",displayText:"LIKE",description:"SQL 패턴 매칭"}],ii=[{type:"logical",value:"AND",displayText:"AND",description:"그리고"},{type:"logical",value:"OR",displayText:"OR",description:"또는"}];function ri(e){const t=e.toUpperCase();return e.startsWith("[")&&e.endsWith("]")?"ColumnRef":Ko.has(e)?"ArithmeticOp":Jo.has(e)?"ComparisonOp":Qo.has(t)?"StringOp":ei.has(t)?"PostfixOp":ti.has(t)?"LogicalOp":/^-?\d+(\.\d+)?$/.test(e)?"Number":e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'")?"String":e.startsWith("#")&&e.endsWith("#")?"Date":"TRUE"===t||"FALSE"===t?"Boolean":"("===e?"OpenParen":")"===e?"CloseParen":"Unknown"}function ai(e){const{columns:t}=e,o=n.ref(""),i=n.ref("start"),r=n.ref(0),a=n.ref(""),l=e=>{let t="";for(const n of e){const e=n.charCodeAt(0);if(e>=44032&&e<=55203){const n=Math.floor((e-44032)/588);t+=ni[n]??""}else/[ㄱ-ㅎ]/.test(n)&&(t+=n)}return t},s=e=>{if(!e||0===e.trim().length)return!0;const n=e.toLowerCase().trim();return t.value.some(e=>e.header.toLowerCase().startsWith(n)||e.header.toLowerCase().includes(n))},u=(e,n)=>{if(!e||n<0)return!1;const o=e.substring(n).trim();if(0===o.length)return!0;const i=o.toLowerCase();return t.value.some(e=>{const t=e.header.toLowerCase();return t===i||t.startsWith(i)||t.includes(i)})},c=(e,t,n)=>{const o=e.lastIndexOf("["),i=e.lastIndexOf("]");if(-1!==o&&(-1===i||o>i)){return{token:e.substring(o+1),startPosition:o}}if(-1!==o&&-1!==i&&o<i&&t>o&&t<=i+1){return{token:e.substring(o+1),startPosition:o}}const r=(e=>{const t=e.toUpperCase(),n=t.lastIndexOf(" AND "),o=t.lastIndexOf(" OR "),i=Math.max(n,o);if(-1===i)return null;const r="AND"===t.substring(i+1,i+4)?5:4;return e.substring(i+r)})(e);if(null!==r&&s(r)){return{token:r,startPosition:e.length-r.length}}if(-1!==i){const t=e.substring(i+1),n=t.lastIndexOf(" ");if(-1!==n){const t=i+1+n,o=e.lastIndexOf(" ",t-1),r=-1===o?i+1:o+1,a=e.substring(r);if(a.length>0&&u(e,r)){return{token:a,startPosition:r}}return{token:e.substring(t+1),startPosition:t+1}}return{token:t,startPosition:i+1}}const a=e.lastIndexOf(" ");if(-1===a)return{token:e,startPosition:0};e.substring(a+1);let l=a+1;const c=e.lastIndexOf(" ",a-1),d=-1===c?0:c+1;e.substring(d).length>0&&u(e,d)&&(l=d);return{token:e.substring(l),startPosition:l}},d=(e,t,n,o=0)=>{const i=e.trimEnd(),r=e.length>i.length;if(0===i.length)return"start";const a=e.lastIndexOf("\n"),l=-1===a?0:a+1,u=t===l,c=0===e.substring(l).trim().length;if(u||c)return"start";const d=i.lastIndexOf("["),p=i.lastIndexOf("]");if(-1!==d&&(-1===p||d>p))return"in_column";if(-1!==d&&-1!==p&&d<p&&t>d&&t<=p+1)return"in_column";const g=n.length>t?n.substring(0,t+1):e,v=function(e,t){const n=[],o=void 0!==t?Math.min(e.length,t):e.length;let i=0;for(;i<o;){const t=e[i];if(/\s/.test(t))i++;else{if("["===t){const t=i;for(i++;i<o&&"]"!==e[i];)i++;i<o&&i++;const r=e.substring(t,i);n.push({type:"ColumnRef",value:r,start:t,end:i});continue}if('"'===t||"'"===t){const r=t,a=i;for(i++;i<o&&e[i]!==r;)"\\"===e[i]&&i+1<o?i+=2:i++;i<o&&i++;const l=e.substring(a,i);n.push({type:"String",value:l,start:a,end:i});continue}if("#"===t){const t=i;for(i++;i<o&&"#"!==e[i];)i++;i<o&&i++;const r=e.substring(t,i);n.push({type:"Date",value:r,start:t,end:i});continue}if("("!==t&&")"!==t){if(i+1<o){const t=e.substring(i,i+2);if(Jo.has(t)){n.push({type:"ComparisonOp",value:t,start:i,end:i+2}),i+=2;continue}}if(Ko.has(t)||Jo.has(t))n.push({type:Ko.has(t)?"ArithmeticOp":"ComparisonOp",value:t,start:i,end:i+1}),i++;else{if(/[a-zA-Z0-9_\-.]/.test(t)){const t=i;for(;i<o&&/[a-zA-Z0-9_\-.]/.test(e[i]);)i++;const r=e.substring(t,i),a=ri(r);n.push({type:a,value:r,start:t,end:i});continue}i++}}else n.push({type:"("===t?"OpenParen":"CloseParen",value:t,start:i,end:i+1}),i++}}return n}(g,g.length);if(0===v.length)return"start";const m=v[v.length-1],y=function(e,t){for(const n of e)if(n.start<=t&&n.end>=t)return n;return null}(v,Math.min(t,g.length-1)),x=function(e,t){for(let n=e.length-1;n>=0;n--)if(e[n].end<=t)return e[n];return null}(v,t);if(r&&x)return h(x,v);if(y){if(f(y.value))return"in_operator";if(v.length>=2){const e=v[v.length-2];if("ArithmeticOp"===e.type||"ComparisonOp"===e.type||"StringOp"===e.type)return"in_value"}if(s(y.value))return"start"}return h(m,v)},h=(e,t)=>{const n=t.indexOf(e);switch(e.type){case"ColumnRef":if(n>=1){const e=t[n-1];if("ArithmeticOp"===e.type)return"after_arithmetic_expr";if("ComparisonOp"===e.type)return"after_value";if("StringOp"===e.type)return"after_value"}return"after_column";case"ArithmeticOp":return"after_arithmetic_op";case"ComparisonOp":return"after_comparison_op";case"StringOp":return"after_string_op";case"PostfixOp":return"after_postfix_op";case"LogicalOp":default:return"start";case"Number":case"String":case"Date":case"Boolean":if(n>=1){if("ArithmeticOp"===t[n-1].type)return"after_arithmetic_expr"}return"after_value"}},p=e=>{const t=[];let n="",o=!1,i=!1,r="";for(let a=0;a<e.length;a++){const l=e[a];i?(n+=l,l===r&&(i=!1,t.push(n),n="")):'"'!==l&&"'"!==l?"["!==l?"]"!==l?o?n+=l:/\s/.test(l)?n&&(t.push(n),n=""):n+=l:(n+=l,o=!1,t.push(n),n=""):(n&&t.push(n),n=l,o=!0):(n&&t.push(n),n=l,i=!0,r=l)}return n&&t.push(n),t},f=e=>{const t=e.toUpperCase();return oi.some(e=>e.value.toUpperCase().startsWith(t)&&e.value.toUpperCase()!==t&&t.length>0)},g=n.computed(()=>t.value.map(e=>({type:"column",value:e.header,displayText:e.header,description:`${e.binding}`,insertText:`[${e.header}]`}))),v=e=>e.startsWith("[")&&e.endsWith("]")?e.substring(1,e.length-1):null,m=e=>{const n=e.trim();if(n.startsWith("[")&&n.endsWith("]")){const e=v(n);if(e){const n=t.value.find(t=>t.header===e);return{type:"column",dataType:null==n?void 0:n.dataType}}}return/^-?\d+(\.\d+)?$/.test(n)?{type:"number"}:n.startsWith('"')&&n.endsWith('"')||n.startsWith("'")&&n.endsWith("'")?{type:"string"}:n.startsWith("#")&&n.endsWith("#")?{type:"date"}:"true"===n.toLowerCase()||"false"===n.toLowerCase()?{type:"boolean"}:(e=>{const t=e.toUpperCase();return oi.some(e=>e.value.toUpperCase()===t)})(n)?{type:"operator"}:["AND","OR","NOT"].includes(n.toUpperCase())?{type:"logical"}:{type:"unknown"}},y=()=>{const e=p(a.value||"");for(let n=e.length-1;n>=0;n--){const o=v(e[n]);if(o){const e=t.value.find(e=>e.header===o);if(e)return e.dataType}}},x=()=>{const e=p(a.value||"");if(0===e.length)return null;let t=e.length-1;if(o.value&&e[t]===o.value&&(t=e.length-2),t<0)return null;const n=e[t];return{...m(n),token:n}},_=n.computed(()=>{const e=(o.value??"").trim(),n=e.toLowerCase(),r=e?l(e):"";if((e.startsWith('"')||e.startsWith("'")||e.startsWith("#"))&&["after_comparison_op","after_string_op","in_value"].includes(i.value))return[];let a=[];switch(i.value){case"start":a=[...g.value,{type:"logical",value:"NOT",displayText:"NOT",description:"부정"}];break;case"in_column":a=t.value.map(e=>({type:"column",value:e.header,displayText:e.header,description:`${e.binding}`,insertText:`[${e.header}]`}));break;case"after_column":case"in_operator":a=(e=>{if(!e)return oi;const t=[];for(const n of oi){const o=n.value.toUpperCase();switch(e){case Xo:(["=","!="].includes(o)||["CONTAINS","NOT_CONTAINS","STARTS_WITH","ENDS_WITH","LIKE"].includes(o)||["IS_EMPTY","IS_NOT_EMPTY"].includes(o))&&t.push(n);break;case jo:(["=","!=","<",">","<=",">="].includes(o)||["+","-","*","/"].includes(o)||["IS_EMPTY","IS_NOT_EMPTY"].includes(o))&&t.push(n);break;case qo:(["=","!=","<",">","<=",">="].includes(o)||["IS_EMPTY","IS_NOT_EMPTY"].includes(o))&&t.push(n);break;case $o:(["=","!="].includes(o)||["IS_EMPTY","IS_NOT_EMPTY"].includes(o))&&t.push(n);break;default:t.push(n)}}return t.length>0?t:oi})(y());break;case"after_arithmetic_op":a=[{type:"value",value:"123",displayText:"숫자",description:"숫자 값"},...g.value];break;case"after_comparison_op":{const e=y(),t=[];e&&e!==Xo||t.push({type:"value",value:'"텍스트"',displayText:'"문자열"',description:"따옴표 필수",insertText:'""'}),e&&e!==jo||t.push({type:"value",value:"123",displayText:"숫자",description:"숫자 값"}),e&&e!==qo||t.push({type:"value",value:"#2025-01-01#",displayText:"#날짜#",description:"날짜 값 (필수 형식)"}),e&&e!==$o||(t.push({type:"value",value:"true",displayText:"true",description:"참"}),t.push({type:"value",value:"false",displayText:"false",description:"거짓"})),a=[...t,...g.value]}break;case"after_string_op":a=[{type:"value",value:'"텍스트"',displayText:'"문자열"',description:"따옴표 필수",insertText:'""'},...g.value];break;case"after_postfix_op":case"after_value":a=[...ii];break;case"after_arithmetic_expr":a=[...oi.filter(e=>{const t=e.value.toUpperCase();return["+","-","*","/","=","!=","<",">","<=",">="].includes(t)}),...ii];break;case"after_operator":{const e=x(),t=y();let n="any";if("operator"===(null==e?void 0:e.type)){const o=e.token.toUpperCase();["CONTAINS","NOT_CONTAINS","STARTS_WITH","ENDS_WITH","LIKE"].includes(o)?n="string":["+","-","*","/"].includes(o)?n="number":["=","!=","<",">","<=",">="].includes(o)&&(t===Xo?n="string":t===jo?n="number":t===qo?n="date":t===$o&&(n="boolean"))}const o=[];"any"!==n&&"string"!==n||o.push({type:"value",value:'"텍스트"',displayText:'"문자열"',description:"따옴표 필수",insertText:'""'}),"any"!==n&&"number"!==n||o.push({type:"value",value:"123",displayText:"숫자",description:"숫자 값"}),"any"!==n&&"date"!==n||o.push({type:"value",value:"#2025-01-01#",displayText:"#날짜#",description:"날짜 값 (필수 형식)"}),"any"!==n&&"boolean"!==n||(o.push({type:"value",value:"true",displayText:"true",description:"참"}),o.push({type:"value",value:"false",displayText:"false",description:"거짓"})),a=[...o,...g.value]}break;case"in_value":{const e=x(),t=y();let n="any";if("operator"===(null==e?void 0:e.type)){const o=e.token.toUpperCase();["CONTAINS","NOT_CONTAINS","STARTS_WITH","ENDS_WITH","LIKE"].includes(o)?n="string":["+","-","*","/"].includes(o)?n="number":["=","!=","<",">","<=",">="].includes(o)&&(t===Xo?n="string":t===jo?n="number":t===qo?n="date":t===$o&&(n="boolean"))}const o=[];"any"!==n&&"string"!==n||o.push({type:"value",value:'"텍스트"',displayText:'"문자열"',description:"따옴표 필수",insertText:'""'}),"any"!==n&&"number"!==n||o.push({type:"value",value:"123",displayText:"숫자",description:"숫자 값"}),"any"!==n&&"date"!==n||o.push({type:"value",value:"#2025-01-01#",displayText:"#날짜#",description:"날짜 값 (필수 형식)"}),"any"!==n&&"boolean"!==n||(o.push({type:"value",value:"true",displayText:"true",description:"참"}),o.push({type:"value",value:"false",displayText:"false",description:"거짓"})),a=[...o,...g.value]}break;default:a=[...g.value]}let s=a;return n&&!["after_column","after_value","after_arithmetic_expr","after_postfix_op"].includes(i.value)&&(s=a.filter(e=>{const t=e.value.toLowerCase(),o=e.displayText.toLowerCase(),i=(e.description||"").toLowerCase();if("column"===e.type){const o=e.displayText,a=o.toLowerCase().includes(n)||t.includes(n)||!!i&&i.includes(n);let s=!1;if(r){const e=l(o);e&&(s=e.startsWith(r)||e.includes(r))}return a||s}return t.includes(n)||o.includes(n)||!!i&&i.includes(n)})),0===s.length?[...g.value,{type:"logical",value:"NOT",displayText:"NOT",description:"부정"}]:s});return{currentToken:o,contextState:i,tokenStartPosition:r,analyzeContext:(e,t)=>{const n=e.substring(0,t),l=e.substring(0,Math.min(t+1,e.length));a.value=n;const s=c(l,t);o.value=s.token,r.value=s.startPosition,i.value=d(n,t,e,s.startPosition)},getSuggestions:_,getInsertText:(e,t,n)=>{if("in_column"===i.value){const o=t.lastIndexOf("[");if(-1!==o){const i=t.substring(n),r=i.startsWith("]");let a=e.value;e.insertText&&e.insertText.startsWith("[")&&e.insertText.endsWith("]")&&(a=e.insertText.substring(1,e.insertText.length-1));const l=t.substring(0,o+1);return{newText:`${l+a}]${r?i.substring(1):i}`,newCursorPosition:l.length+a.length+1}}}if("start"===i.value&&"column"===e.type){const o=e.insertText||`[${e.value}]`,i=t.substring(0,n),r=i.lastIndexOf("\n"),a=-1===r?0:r+1,l=i.substring(a).toUpperCase(),s=l.lastIndexOf(" AND "),u=l.lastIndexOf(" OR "),c=l.lastIndexOf(" NOT "),d=Math.max(s,u,c);let h=a;if(-1!==d){h=a+d+(d===s?" AND ":d===u?" OR ":" NOT ").length}const p=t.substring(0,h),f=t.substring(n),g=f.length>0&&!f.startsWith(" ");return{newText:p+o+(g?" ":"")+f,newCursorPosition:p.length+o.length+(g?1:0)}}const a=e.insertText||e.value,l=(o.value||"").trim(),s=Jo.has(l)||Ko.has(l)||["!=","<=",">="].includes(l),u=["after_comparison_op","after_operator","in_value","after_arithmetic_op","after_string_op"].includes(i.value)&&s&&("column"===e.type||"value"===e.type);let c=r.value;u&&(c=r.value+o.value.length);const d=t.substring(0,c),h=u?t.substring(c):t.substring(n),p=h.length>0&&!h.startsWith(" "),f=d+a+(p?" ":"")+h;let g=d.length+a.length+(p?1:0);if("value"===e.type){const t=e.insertText??e.value;('""'===t||"string"==typeof t&&t.length>=2&&t.startsWith("#")&&t.endsWith("#"))&&(g=d.length+1)}return{newText:f,newCursorPosition:g}},columnSuggestions:g}}const li={class:"formula-input-wrapper"},si=["innerHTML"],ui=["placeholder","disabled","rows"],ci={class:"suggestions-header"},di=["onClick","onMouseenter"],hi={class:"suggestion-text"},pi={key:0,class:"suggestion-description"},fi=n.defineComponent({__name:"FormulaInput",props:n.mergeModels({placeholder:{default:'예: [컬럼명] > 100 AND [컬럼명2] = "텍스트"'},disabled:{type:Boolean,default:!1},rows:{default:3},columns:{},hasError:{type:Boolean,default:!1},showSuggestionsOnFocus:{type:Boolean,default:!0}},{modelValue:{default:""},modelModifiers:{}}),emits:n.mergeModels(["change"],["update:modelValue"]),setup(e,{emit:t}){const o=e,i=t,r=n.useModel(e,"modelValue"),a=n.ref(null),l=n.ref(null),s=n.ref(null),u=n.ref(null),c=n.ref(null),d=n.ref(!1),h=n.ref(!1),p=n.ref(0),f=n.ref(0),g=n.ref({top:0,left:0});n.ref("auto");const v=n.ref(!1),m=n.ref(!1),y=n.ref(""),x=e=>e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;"),_=n.computed(()=>{const e=m.value?y.value:r.value||"";if(!e)return"";const t=(e=>{const t=[];let n=0;const o=new Set(["!=","<=",">=","=","<",">"]),i=new Set(["+","-","*","/"]),r=new Set(["AND","OR","NOT"]),a=new Set(["CONTAINS","NOT_CONTAINS","STARTS_WITH","ENDS_WITH","LIKE"]),l=new Set(["IS_EMPTY","IS_NOT_EMPTY"]);for(;n<e.length;){const s=e[n];if(/\s/.test(s)){let o="";for(;n<e.length&&/\s/.test(e[n]);)o+=e[n],n++;t.push({type:"text",value:o});continue}if("["===s){let o="[";for(n++;n<e.length&&"]"!==e[n];)o+=e[n],n++;n<e.length&&(o+="]",n++),t.push({type:"column",value:o});continue}if('"'===s||"'"===s){const o=s;let i=o;for(n++;n<e.length&&e[n]!==o;)"\\"===e[n]&&n+1<e.length?(i+=e[n]+e[n+1],n+=2):(i+=e[n],n++);n<e.length&&(i+=o,n++),t.push({type:"string",value:i});continue}if("#"===s){let o="#";for(n++;n<e.length&&"#"!==e[n];)o+=e[n],n++;n<e.length&&(o+="#",n++),t.push({type:"date",value:o});continue}if("("!==s&&")"!==s){if(n+1<e.length){const i=e.substring(n,n+2);if(o.has(i)){t.push({type:"comparison",value:i}),n+=2;continue}}if(i.has(s))t.push({type:"arithmetic",value:s}),n++;else if(o.has(s))t.push({type:"comparison",value:s}),n++;else{if(/[a-zA-Z0-9_\-.]/.test(s)){let o="";for(;n<e.length&&/[a-zA-Z0-9_\-.]/.test(e[n]);)o+=e[n],n++;const i=o.toUpperCase();r.has(i)?t.push({type:"logical",value:o}):a.has(i)?t.push({type:"stringOp",value:o}):l.has(i)?t.push({type:"postfixOp",value:o}):"TRUE"===i||"FALSE"===i?t.push({type:"boolean",value:o}):/^-?\d+(\.\d+)?$/.test(o)?t.push({type:"number",value:o}):t.push({type:"text",value:o});continue}t.push({type:"text",value:s}),n++}}else t.push({type:"paren",value:s}),n++}return t})(e);let n="";for(const o of t){const e=x(o.value);switch(o.type){case"column":n+=`<span class="hl-column">${e}</span>`;break;case"number":n+=`<span class="hl-number">${e}</span>`;break;case"string":n+=`<span class="hl-string">${e}</span>`;break;case"date":n+=`<span class="hl-date">${e}</span>`;break;case"boolean":n+=`<span class="hl-boolean">${e}</span>`;break;case"logical":n+=`<span class="hl-logical">${e}</span>`;break;case"comparison":n+=`<span class="hl-comparison">${e}</span>`;break;case"arithmetic":n+=`<span class="hl-arithmetic">${e}</span>`;break;case"stringOp":n+=`<span class="hl-string-op">${e}</span>`;break;case"postfixOp":n+=`<span class="hl-postfix-op">${e}</span>`;break;case"paren":n+=`<span class="hl-paren">${e}</span>`;break;default:n+=e}}return`${n}\n`}),w=n.computed(()=>o.columns),{analyzeContext:b,getSuggestions:S,getInsertText:C,contextState:M,currentToken:T}=ai({columns:w}),I=n.computed(()=>S.value),k=n.computed(()=>{switch(M.value){case"start":case"in_column":return"컬럼 선택";case"after_column":case"in_operator":case"after_arithmetic_expr":return"연산자 선택";case"after_arithmetic_op":return"숫자/컬럼 입력";case"after_comparison_op":return"값/컬럼 입력";case"after_string_op":return"문자열 입력";case"after_postfix_op":case"after_value":return"논리 연산자";case"after_operator":return"값 입력";case"in_value":return"값 입력 중";default:return""}}),D=n.computed(()=>({position:"fixed",top:`${g.value.top}px`,left:`${g.value.left}px`,zIndex:9999})),N=()=>{l.value&&(f.value=l.value.selectionStart,b(r.value||"",f.value),p.value=0,requestAnimationFrame(()=>{E(),h.value=I.value.length>0}))},E=()=>{if(!l.value)return;const e=l.value.getBoundingClientRect(),t=A();let n=e.top+t.top+20,o=e.left+t.left;const i=window.innerHeight,r=window.innerWidth;n+300>i&&(n=e.top+t.top-300-5),o+350>r&&(o=r-350-10),n=Math.max(10,n),o=Math.max(10,o),g.value={top:n,left:o}},A=()=>{if(!l.value)return{top:0,left:0};const e=l.value,t=e.selectionStart,n=document.createElement("div"),o=getComputedStyle(e);["fontFamily","fontSize","fontWeight","fontStyle","letterSpacing","textTransform","wordSpacing","textIndent","whiteSpace","wordWrap","wordBreak","lineHeight","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","border","borderWidth","boxSizing"].forEach(e=>{n.style[e]=o[e]}),n.style.position="absolute",n.style.visibility="hidden",n.style.width=`${e.clientWidth}px`,n.style.height="auto",n.style.overflow="hidden";const i=e.value.substring(0,t);n.textContent=i;const r=document.createElement("span");r.textContent="|",n.appendChild(r),document.body.appendChild(n);const a=r.getBoundingClientRect(),s=n.getBoundingClientRect();return document.body.removeChild(n),{top:a.top-s.top-e.scrollTop,left:a.left-s.left-e.scrollLeft}},L=()=>{if(!l.value)return;const e=l.value.value;r.value=e,m.value&&(y.value=e),f.value=l.value.selectionStart,b(e,f.value),p.value=0,h.value?E():o.showSuggestionsOnFocus&&N(),i("change",e)},V=e=>{if(!l.value)return;const t=l.value,o=t.selectionStart,a=t.selectionEnd,s=r.value;if("["===e.key&&!e.ctrlKey&&!e.metaKey&&!e.altKey){e.preventDefault();const l=s.substring(0,o),u=s.substring(a);if(u.startsWith("]"))return void n.nextTick(()=>{t.focus(),t.setSelectionRange(o+1,o+1),f.value=o+1});const c=`${l}[]${u}`;return r.value=c,void n.nextTick(()=>{t.focus(),t.setSelectionRange(o+1,o+1),f.value=o+1,b(c,o+1),i("change",c)})}if(!('"'!==e.key&&"'"!==e.key||e.ctrlKey||e.metaKey||e.altKey)){e.preventDefault();const l=e.key,u=s.substring(0,o),c=s.substring(a);if(c.startsWith(l))return void n.nextTick(()=>{t.focus(),t.setSelectionRange(o+1,o+1),f.value=o+1});const d=u+l+l+c;return r.value=d,void n.nextTick(()=>{t.focus(),t.setSelectionRange(o+1,o+1),f.value=o+1,b(d,o+1),i("change",d)})}if("Space"!==e.code||e.ctrlKey||e.metaKey||e.altKey||requestAnimationFrame(()=>{l.value&&(f.value=l.value.selectionStart,b(r.value||"",f.value),p.value=0,h.value?E():N())}),h.value&&0!==I.value.length)switch(e.key){case"ArrowDown":e.preventDefault(),p.value=(p.value+1)%I.value.length,B();break;case"ArrowUp":e.preventDefault(),p.value=(p.value-1+I.value.length)%I.value.length,B();break;case"Enter":case"Tab":I.value.length>0&&(e.preventDefault(),P(I.value[p.value]));break;case"Escape":e.preventDefault(),e.stopPropagation(),h.value=!1}else e.ctrlKey&&"Space"===e.code&&(e.preventDefault(),O())},O=()=>{l.value&&N()},P=e=>{if(!l.value)return;const{newText:t,newCursorPosition:o}=C(e,r.value,f.value);r.value=t,h.value=!1,n.nextTick(()=>{l.value&&(v.value=!0,l.value.focus(),l.value.setSelectionRange(o,o),f.value=o),i("change",r.value)})},B=()=>{if(!u.value)return;const e=u.value.children[p.value];e&&e.scrollIntoView({block:"nearest"})},R=e=>{const t=T.value.toLowerCase();if(!t)return[{text:e,highlight:!1}];const n=[],o=e.toLowerCase();let i=0,r=o.indexOf(t);for(;-1!==r;)r>i&&n.push({text:e.substring(i,r),highlight:!1}),n.push({text:e.substring(r,r+t.length),highlight:!0}),i=r+t.length,r=o.indexOf(t,i);return i<e.length&&n.push({text:e.substring(i),highlight:!1}),n.length>0?n:[{text:e,highlight:!1}]},z=()=>{if(d.value=!0,!l.value)return;const e=l.value.selectionStart;f.value=e,b(r.value||"",e),p.value=0,v.value?v.value=!1:o.showSuggestionsOnFocus&&N()},F=()=>{d.value=!1,h.value=!1},G=()=>{if(!l.value)return;const e=l.value.selectionStart;e!==f.value&&(f.value=e,b(r.value||"",e)),o.showSuggestionsOnFocus?N():h.value&&(p.value=0,requestAnimationFrame(()=>E()))},H=()=>{h.value&&requestAnimationFrame(()=>E()),Z()},W=()=>{m.value=!0,l.value&&(y.value=l.value.value)},U=e=>{l.value&&(y.value=l.value.value,f.value=l.value.selectionStart,b(y.value,f.value),o.showSuggestionsOnFocus&&requestAnimationFrame(()=>{l.value&&(E(),h.value=I.value.length>0)}))},Y=()=>{m.value=!1,y.value="",n.nextTick(()=>{l.value&&(f.value=l.value.selectionStart,b(r.value,f.value),i("change",r.value))})},Z=()=>{l.value&&c.value&&(c.value.scrollTop=l.value.scrollTop,c.value.scrollLeft=l.value.scrollLeft)},X=e=>{var t,n;if(!h.value)return;const o=e.target;(null==(t=a.value)?void 0:t.contains(o))||(null==(n=s.value)?void 0:n.contains(o))||(h.value=!1)},j=()=>{h.value&&E()};return n.onMounted(()=>{document.addEventListener("mousedown",X),window.addEventListener("resize",j),window.addEventListener("scroll",j,!0)}),n.onBeforeUnmount(()=>{document.removeEventListener("mousedown",X),window.removeEventListener("resize",j),window.removeEventListener("scroll",j,!0)}),n.watch(()=>o.columns,()=>{l.value&&d.value&&b(r.value,f.value)}),n.watch(r,()=>{n.nextTick(()=>{Z()})}),(t,o)=>(n.openBlock(),n.createElementBlock("div",{ref_key:"containerRef",ref:a,class:n.normalizeClass(["formula-input-container",{"is-focused":d.value,"is-invalid":e.hasError}])},[n.createElementVNode("div",li,[n.createElementVNode("div",{ref_key:"highlightOverlayRef",ref:c,class:n.normalizeClass(["formula-highlight-overlay",{disabled:e.disabled}]),innerHTML:_.value},null,10,si),n.withDirectives(n.createElementVNode("textarea",{ref_key:"textareaRef",ref:l,"onUpdate:modelValue":o[0]||(o[0]=e=>r.value=e),class:"formula-textarea",placeholder:e.placeholder,disabled:e.disabled,rows:e.rows,spellcheck:"false",autocomplete:"off",autocorrect:"off",autocapitalize:"off",onInput:L,onKeydown:V,onFocus:z,onBlur:F,onScroll:H,onClick:G,onCompositionstart:W,onCompositionupdate:U,onCompositionend:Y},null,40,ui),[[n.vModelText,r.value]])]),(n.openBlock(),n.createBlock(n.Teleport,{to:"body"},[h.value&&I.value.length>0?(n.openBlock(),n.createElementBlock("div",{key:0,ref_key:"dropdownRef",ref:s,class:"formula-suggestions-dropdown",style:n.normalizeStyle(D.value),onMousedown:o[1]||(o[1]=n.withModifiers(()=>{},["prevent"]))},[n.createElementVNode("div",ci,[n.createElementVNode("span",{class:n.normalizeClass(["context-badge",n.unref(M)])},n.toDisplayString(k.value),3)]),n.createElementVNode("div",{class:"suggestions-list",ref_key:"suggestionsListRef",ref:u},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(I.value,(e,t)=>(n.openBlock(),n.createElementBlock("div",{key:e.value+t,class:n.normalizeClass(["suggestion-item",{"is-selected":t===p.value,[`type-${e.type}`]:!0}]),onClick:t=>P(e),onMouseenter:e=>p.value=t},[n.createElementVNode("span",hi,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(R(e.displayText),(e,t)=>(n.openBlock(),n.createElementBlock("span",{key:t,class:n.normalizeClass({highlight:e.highlight})},n.toDisplayString(e.text),3))),128))]),e.description?(n.openBlock(),n.createElementBlock("span",pi,n.toDisplayString(e.description),1)):n.createCommentVNode("",!0)],42,di))),128))],512),o[2]||(o[2]=n.createElementVNode("div",{class:"suggestions-footer"},[n.createElementVNode("span",{class:"hint"},"↑↓ 탐색"),n.createElementVNode("span",{class:"hint"},"Enter 선택"),n.createElementVNode("span",{class:"hint"},"Esc 닫기")],-1))],36)):n.createCommentVNode("",!0)]))],2))}}),gi=p(fi,[["__scopeId","data-v-135d55ba"]]),vi=[{name:"red-light",hex:"#FFEBE1",rgb:"rgb(255, 235, 225)",rgbLabel:"RGB (255, 235, 225)"},{name:"blue-light",hex:"#D8E8FB",rgb:"rgb(216, 232, 251)",rgbLabel:"RGB (216, 232, 251)"},{name:"green-light",hex:"#D8FBE9",rgb:"rgb(216, 251, 233)",rgbLabel:"RGB (216, 251, 233)"},{name:"yellow-light",hex:"#FCF5D0",rgb:"rgb(252, 245, 208)",rgbLabel:"RGB (252, 245, 208)"},{name:"purple-light",hex:"#E5E1FF",rgb:"rgb(229, 225, 255)",rgbLabel:"RGB (229, 225, 255)"},{name:"pink-light",hex:"#FFE1F0",rgb:"rgb(255, 225, 240)",rgbLabel:"RGB (255, 225, 240)"},{name:"orange-light",hex:"#FFE8D6",rgb:"rgb(255, 232, 214)",rgbLabel:"RGB (255, 232, 214)"},{name:"teal-light",hex:"#D0F0EE",rgb:"rgb(208, 240, 238)",rgbLabel:"RGB (208, 240, 238)"},{name:"lime-light",hex:"#ECF7D0",rgb:"rgb(236, 247, 208)",rgbLabel:"RGB (236, 247, 208)"},{name:"brown-light",hex:"#EFE3D5",rgb:"rgb(239, 227, 213)",rgbLabel:"RGB (239, 227, 213)"},{name:"gray-light",hex:"#EAEBEE",rgb:"rgb(234, 235, 238)",rgbLabel:"RGB (234, 235, 238)"},{name:"indigo-light",hex:"#DDDFFC",rgb:"rgb(221, 223, 252)",rgbLabel:"RGB (221, 223, 252)"}],mi=[{name:"red",hex:"#F28270",rgb:"rgb(242, 130, 112)",rgbLabel:"RGB (242, 130, 112)"},{name:"blue",hex:"#618FF9",rgb:"rgb(97, 143, 249)",rgbLabel:"RGB (97, 143, 249)"},{name:"green",hex:"#229889",rgb:"rgb(34, 152, 137)",rgbLabel:"RGB (34, 152, 137)"},{name:"yellow",hex:"#AC991B",rgb:"rgb(172, 153, 27)",rgbLabel:"RGB (172, 153, 27)"},{name:"purple",hex:"#A768D6",rgb:"rgb(167, 104, 214)",rgbLabel:"RGB (167, 104, 214)"},{name:"pink",hex:"#DA4D88",rgb:"rgb(218, 77, 136)",rgbLabel:"RGB (218, 77, 136)"},{name:"orange",hex:"#E07A2C",rgb:"rgb(224, 122, 44)",rgbLabel:"RGB (224, 122, 44)"},{name:"teal",hex:"#0F9590",rgb:"rgb(15, 149, 144)",rgbLabel:"RGB (15, 149, 144)"},{name:"lime",hex:"#6F9A14",rgb:"rgb(111, 154, 20)",rgbLabel:"RGB (111, 154, 20)"},{name:"brown",hex:"#8B5E34",rgb:"rgb(139, 94, 52)",rgbLabel:"RGB (139, 94, 52)"},{name:"gray",hex:"#6F6F75",rgb:"rgb(111, 111, 117)",rgbLabel:"RGB (111, 111, 117)"},{name:"indigo",hex:"#4F4FCE",rgb:"rgb(79, 79, 206)",rgbLabel:"RGB (79, 79, 206)"}];vi.map(e=>e.hex),mi.map(e=>e.hex);const yi={class:"moz-custom-cell-wrapper"},xi={class:"rule-sets-container"},_i={class:"rule-set-header"},wi={class:"rule-set-title"},bi={class:"priority-badge"},Si={class:"rule-set-actions"},Ci={class:"rule-set-content"},Mi={key:0,class:"formula-section"},Ti={class:"formula-input-wrapper"},Ii={class:"formula-validation-slot"},ki={key:0,class:"formula-error"},Di={key:1,class:"formula-valid"},Ni={class:"decide-icon"},Ei={key:2,class:"formula-hint"},Ai={class:"formula-help"},Li={class:"formula-help-title"},Vi={key:1,class:"rules-section"},Oi={key:1,class:"spacer"},Pi={class:"custom-cell-operation-row"},Bi={class:"symbol highlight-container"},Ri={class:"desc"},zi={class:"custom-cell-operation-row"},Fi={class:"symbol highlight-container"},Gi={class:"desc"},Hi={class:"custom-cell-operation-row"},Wi={class:"symbol highlight-container"},Ui={class:"desc"},Yi=["onClick"],Zi=["onClick"],Xi={class:"rule-set-styling"},ji={class:"color-section-row"},$i={class:"color-pickers"},qi={class:"color-picker-item"},Ki={class:"color-picker-dropdown-wrapper"},Ji=["onClick"],Qi={class:"moz-ui-custom-cell-footer"},er={class:"button-section"},tr={class:"color-dropdown-section"},nr={class:"color-default-presets"},or=["onClick"],ir=["value"],rr={class:"color-dropdown-section"},ar={class:"color-default-presets"},lr=["onClick"],sr=["value"],ur=n.defineComponent({__name:"GridCustomCell",props:{gridKey:{type:String,default:""},dateFormat:{type:String,default:"YYYY-MM-DD"}},setup(e){const t=1,o=2,a=3,s=4,u=e=>{if("number"==typeof e)return e;switch(e){case"number":return o;case"boolean":return a;case"date":return s;default:return t}},c=e=>"∅"===e||"●"===e,d=e,{gridKey:h,dateFormat:p}=n.toRefs(d),f=n.inject(z,n.ref(null)),g=n.inject(Y),{showCustomCell:v,hitColumn:m}=g,y=new xe,x=e=>{var t,n;const o=null==(t=e.getFields)?void 0:t.call(e);if(o&&o.length>0)return o;const i=null==(n=e.getPivotFields)?void 0:n.call(e);return i?[...i.rowFields,...i.columnFields,...i.valueFields,...i.filterFields]:[]},_=r.useMozLocale();n.computed(()=>500),n.computed(()=>{const e=D.value.reduce((e,t)=>e+t.rules.length,0),t=D.value.length;return Math.min(150+190*t+35*e,1200)});const w=n.ref(),b=n.ref([]),S=n.computed(()=>w.value?w.value.filter(e=>e.binding&&"_RID"!==e.binding).map(e=>({header:e.header||e.binding,binding:e.binding,dataType:e.dataType})):[]),C=n.computed(()=>new Map([["=",_.value.Grid.symbolEqual],["≠",_.value.Grid.symbolNotEqual],["%",_.value.Grid.symbolContains],["!%",_.value.Grid.symbolNotContains],["<",_.value.Grid.symbolLessThan],[">",_.value.Grid.symbolGreaterThan],["≤",_.value.Grid.symbolLessOrEqual],["≥",_.value.Grid.symbolGreaterOrEqual],["∅",_.value.Grid.symbolEmpty],["●",_.value.Grid.symbolNotEmpty]])),M=n.computed(()=>[{symbol:"%",desc:C.value.get("%")||""},{symbol:"!%",desc:C.value.get("!%")||""},{symbol:"=",desc:C.value.get("=")||""},{symbol:"≠",desc:C.value.get("≠")||""},{symbol:"∅",desc:C.value.get("∅")||""},{symbol:"●",desc:C.value.get("●")||""}]),T=n.computed(()=>[{symbol:"=",desc:C.value.get("=")||""},{symbol:"≠",desc:C.value.get("≠")||""},{symbol:"<",desc:C.value.get("<")||""},{symbol:">",desc:C.value.get(">")||""},{symbol:"≤",desc:C.value.get("≤")||""},{symbol:"≥",desc:C.value.get("≥")||""},{symbol:"∅",desc:C.value.get("∅")||""},{symbol:"●",desc:C.value.get("●")||""}]),I=n.computed(()=>[{symbol:"=",desc:C.value.get("=")||""},{symbol:"≠",desc:C.value.get("≠")||""},{symbol:"∅",desc:C.value.get("∅")||""},{symbol:"●",desc:C.value.get("●")||""}]),k=n.ref([{key:"AND",value:"AND"},{key:"OR",value:"OR"}]),D=n.ref([]),N=n.ref(!1),E=n.ref(),A=n.ref(!1),L=n.computed(()=>{const e=null==f?void 0:f.value;if(!e)return!1;return e.select(e=>e.totalRowCount).getSnapshot()<1e5}),V=e=>{"Escape"===e.key&&(e.stopPropagation(),e.preventDefault())};n.watch(N,e=>{e?document.addEventListener("keydown",V):document.removeEventListener("keydown",V)}),n.onBeforeUnmount(()=>{document.removeEventListener("keydown",V)});const O=e=>vi[e%vi.length].hex,P=e=>mi[e%mi.length].hex,B=n.ref(null),R=n.ref(new Map),F=n.ref(new Map),G=n.computed(()=>{if(!B.value)return{};const e=`${B.value.setIndex}-color`,t=R.value.get(e);if(!t)return{};const n=t.getBoundingClientRect();return{position:"fixed",top:`${n.bottom+4}px`,left:`${n.left}px`,zIndex:10001}}),H=(e,t)=>{const n=`${e}-${t}`;return F.value.has(n)?F.value.get(n):"background"===t?"#4568e0":"#e2e7fa"},W=(e,t,n)=>{const o=D.value[e];return(("background"===t?o.backgroundColor:o.textColor)||"").toLowerCase()===n.toLowerCase()},U=(e,t)=>{const n=e.replace("#","").trim();if(6!==n.length)return`rgba(69, 104, 224, ${t})`;return`rgba(${Number.parseInt(n.slice(0,2),16)}, ${Number.parseInt(n.slice(2,4),16)}, ${Number.parseInt(n.slice(4,6),16)}, ${t})`},Z=(e,t)=>{const n=D.value[e];return("background"===t?n.backgroundColor:n.textColor)||""},X=(e,t)=>{const n=Z(e,t);return!!n&&!ye(n,t)},j=(e,t)=>"text"===e?U(t,.5):(e=>{const t=vi.findIndex(t=>t.hex.toLowerCase()===e.toLowerCase());if(t<0)return U(e,.5);const n=mi[t%mi.length].hex;return U(n,.5)})(t),$=(e,t,n)=>{if(W(e,t,n))return{borderColor:j(t,n),borderWidth:"2px"}},q=(e,t)=>{if(!X(e,t))return;const n=Z(e,t);return{borderColor:j(t,n),borderWidth:"2px"}},K=()=>{B.value=null},J=(e,t,n)=>{"background"===t?D.value[e].backgroundColor=n:D.value[e].textColor=n,le()},Q=(e,t,n)=>{const o=`${e}-${t}`;F.value.set(o,n),"background"===t?D.value[e].backgroundColor=n:D.value[e].textColor=n,le()},ee=e=>{E.value=e??void 0};let te=0;const ne=()=>(te++,`rule-set-${Date.now()}-${te}`),oe=()=>{const e=m.value||w.value&&w.value[0];if(!e)return;const t=D.value.length,n={id:ne(),name:`${_.value.Grid.formulaConditionSet} (${t+1})`,priority:t,mode:"formula",rules:[ce(0,e)],formula:"",formulaError:"",backgroundColor:O(t),textColor:P(t),targetColumns:me(),enabled:!0};D.value.push(n),le()},ie=l.debounce(e=>{const t=D.value[e];if(t){if(t.formula&&t.formula.trim().length>0){const e=(e=>{const t=null==f?void 0:f.value;if(t)try{const e=x(t),n={string:1,number:2,boolean:3,date:4};y.setColumns(e.map(e=>({header:e.header??e.id,binding:e.id,dataType:n[e.dataType]??1})))}catch{}return y.validate(e)})(t.formula);e.success?t.formulaError="":t.formulaError=e.error||"유효하지 않은 수식"}else t.formulaError="";le()}},150),re=e=>{if(D.value.splice(e,1),0===D.value.length)return g.setCustomCell({ruleSets:[]}),void ve();D.value.forEach((e,t)=>{e.priority=t}),le()},ae=(e,t)=>{v.value&&(e.comparisonObj||(e.comparisonObj=pe(e).comparisonObj),e.comparison=e.comparisonObj.symbol,le())},le=l.debounce(()=>{v.value&&A.value&&ue()},100),se=()=>{g.setCustomCell({ruleSets:[]});const e=m.value||w.value&&w.value[0];e&&(D.value=[{id:ne(),name:`${_.value.Grid.formulaConditionSet} (1)`,priority:0,mode:"formula",rules:[ce(0,e)],formula:"",formulaError:"",backgroundColor:O(0),textColor:P(0),targetColumns:me(),enabled:!0}])},ue=()=>{const e={ruleSets:JSON.parse(JSON.stringify(D.value))};g.setCustomCell(e)},ce=(e,n)=>({sequence:e,header:n.header||"",binding:n.binding||"",logical:"AND",comparison:de(n.dataType||t),comparisonObj:he(n.dataType||t),type:n.dataType||t,variable:null}),de=e=>e===t?"%":"=",he=e=>{switch(e){case t:return M.value[0];case o:case s:return T.value[0];case a:return I.value[0];default:return M.value[0]}},pe=e=>{let n;switch(e.type){case t:n=M.value.find(t=>t.symbol===e.comparison);break;case o:n=T.value.find(t=>t.symbol===e.comparison);break;case a:n=I.value.find(t=>t.symbol===e.comparison);break;default:n=M.value.find(t=>t.symbol===e.comparison)}const i=e;return i.comparisonObj=n||he(e.type||t),i},fe=e=>{const t=e.rules.map(e=>{const t=e;return t.type!==s||t.dummy||(t.dummy=i(t.variable)),t.comparisonObj?t:pe(t)});return{...e,name:e.name??"",rules:t,mode:e.mode||"formula",formula:e.formula||"",formulaError:"",targetColumns:e.targetColumns&&e.targetColumns.length>0?e.targetColumns:me()}},ge=()=>{D.value=D.value.filter(e=>"formula"===e.mode?!(!e.formula||!e.formula.trim()):(e.rules=e.rules.filter(e=>!(e=>{if(c(e.comparison))return!1;const t=e.variable;return null==t||""===t})(e)),e.rules.length>0)),D.value.forEach((e,t)=>{e.priority=t})},ve=()=>{ge(),ue(),v.value=!1},me=()=>{var e;return(null==(e=b.value)?void 0:e.map(e=>e.binding).filter(e=>e))||[]},ye=(e,t)=>("background"===t?vi:mi).some(t=>t.hex.toLowerCase()===e.toLowerCase()),_e=()=>{var e;const t=null==f?void 0:f.value;if(!t)return;try{const e=x(t);w.value=e.map(e=>({header:e.header??e.id,binding:e.id,dataType:u(e.dataType)}))}catch{w.value=[]}const n=null==(e=w.value)?void 0:e.map(e=>"_RID"===e.binding?{header:"",binding:""}:e.header?{header:e.header,binding:e.binding}:{header:"",binding:""}).filter(e=>{var t;return(null==(t=e.header)?void 0:t.length)>0});b.value=(null==n?void 0:n.length)?n:[]};return n.watch([v],()=>{if(v.value){if(_e(),!(null==f?void 0:f.value)||0===b.value.length)return;A.value=L.value,(()=>{const e=g.getCustomCell();if(e&&e.ruleSets&&e.ruleSets.length>0)D.value=e.ruleSets.map(fe),e.ruleSets.forEach((e,t)=>{if(e.backgroundColor&&!ye(e.backgroundColor,"background")){const n=`${t}-background`;F.value.set(n,e.backgroundColor)}if(e.textColor&&!ye(e.textColor,"text")){const n=`${t}-text`;F.value.set(n,e.textColor)}});else{const e=m.value||w.value&&w.value[0];if(e){const t=me();D.value=[{id:ne(),name:`${_.value.Grid.formulaConditionSet} (1)`,priority:0,mode:"formula",rules:[ce(0,e)],formula:"",formulaError:"",backgroundColor:O(0),textColor:P(0),targetColumns:t.length>0?t:[],enabled:!0}]}}})(),N.value=!0}else N.value=!1}),n.watch([N],()=>{if(N.value&&_e(),N.value&&b.value.length>0){const e=me();D.value.forEach(t=>{t.targetColumns&&0!==t.targetColumns.length||(t.targetColumns=e)})}}),(e,l)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createVNode(n.unref(r.Popup),{visible:N.value,"onUpdate:visible":l[1]||(l[1]=e=>N.value=e),title:n.unref(_).Grid.customCellStyle,height:720,onCancel:ve,onInit:ee,class:"moz-custom-cell-popup",resizeable:!1},{footer:n.withCtx(()=>[n.createElementVNode("div",Qi,[n.createVNode(n.unref(r.CheckBox),{modelValue:A.value,"onUpdate:modelValue":l[0]||(l[0]=e=>A.value=e),label:n.unref(_).Grid.immediateApply??"바로 적용"},null,8,["modelValue","label"]),n.createElementVNode("div",er,[n.createElementVNode("div",{class:"reset-all-rule-button",onClick:se},[n.createVNode(n.unref(nn),{width:12,height:12,color:"#4568e0"}),n.createElementVNode("div",null,n.toDisplayString(n.unref(_).Grid.resetCustomCell),1)]),n.createElementVNode("div",{class:"add-rule-group-button",onClick:oe},[n.createVNode(n.unref(Ue),{width:12,height:12,color:"#4568e0"}),n.createElementVNode("div",null,n.toDisplayString(n.unref(_).Grid.addFormulaConditionSet),1)])])])]),default:n.withCtx(()=>[n.createElementVNode("div",yi,[n.createElementVNode("div",xi,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(D.value,(e,u)=>(n.openBlock(),n.createElementBlock("div",{key:e.id,class:"rule-set-section"},[n.createElementVNode("div",_i,[n.createElementVNode("div",wi,[n.createElementVNode("span",bi,n.toDisplayString(u+1),1),n.createVNode(n.unref(r.Input),{modelValue:e.name,"onUpdate:modelValue":t=>e.name=t,placeholder:n.unref(_).Grid.customCellRuleNamePlaceholder,width:"100%",onInput:n.unref(le)},null,8,["modelValue","onUpdate:modelValue","placeholder","onInput"])]),l[6]||(l[6]=n.createElementVNode("div",{class:"rule-set-divider"},null,-1)),n.createElementVNode("div",Si,[n.createVNode(n.unref(r.Button),{type:"text",size:"small",onClick:e=>(e=>{if(0===e)return;const t=D.value[e];D.value[e]=D.value[e-1],D.value[e-1]=t,D.value.forEach((e,t)=>{e.priority=t}),le()})(u),disabled:0===u},{default:n.withCtx(()=>[n.createVNode(n.unref(ft),{width:"12",height:"12",color:0===u?"#d3d5e5":"#8998B5"},null,8,["color"])]),_:2},1032,["onClick","disabled"]),n.createVNode(n.unref(r.Button),{type:"text",size:"small",onClick:e=>(e=>{if(e===D.value.length-1)return;const t=D.value[e];D.value[e]=D.value[e+1],D.value[e+1]=t,D.value.forEach((e,t)=>{e.priority=t}),le()})(u),disabled:u===D.value.length-1},{default:n.withCtx(()=>[n.createVNode(n.unref(Xe),{width:"12",height:"12",color:u===D.value.length-1?"#d3d5e5":"#8998B5"},null,8,["color"])]),_:2},1032,["onClick","disabled"]),n.createVNode(n.unref(r.Button),{type:"text",size:"small",onClick:e=>re(u)},{default:n.withCtx(()=>[n.createVNode(n.unref(At),{width:"12",height:"12",color:"#8998B5"})]),_:1},8,["onClick"])])]),n.createElementVNode("div",Ci,["formula"===e.mode?(n.openBlock(),n.createElementBlock("div",Mi,[n.createElementVNode("div",Ti,[n.createVNode(gi,{modelValue:e.formula,"onUpdate:modelValue":t=>e.formula=t,columns:S.value,"has-error":!!e.formulaError,placeholder:"예: [수요수량] > [재고수량] AND [우선순위] < 3",rows:3,onChange:e=>n.unref(ie)(u)},null,8,["modelValue","onUpdate:modelValue","columns","has-error","onChange"]),n.createElementVNode("div",Ii,[e.formulaError?(n.openBlock(),n.createElementBlock("div",ki,n.toDisplayString(e.formulaError),1)):e.formula&&e.formula.trim()?(n.openBlock(),n.createElementBlock("div",Di,[n.createElementVNode("div",Ni,[n.createVNode(n.unref(Fn))]),l[7]||(l[7]=n.createElementVNode("span",null,n.toDisplayString("유효한 수식"),-1))])):(n.openBlock(),n.createElementBlock("div",Ei,"컬럼을 선택하거나 값을 입력해 수식을 작성하세요."))])]),n.createElementVNode("div",Ai,[n.createElementVNode("div",Li,[n.createVNode(n.unref(Qt),{width:12,height:12}),l[8]||(l[8]=n.createElementVNode("div",null,"수식 도움말",-1))]),l[9]||(l[9]=n.createElementVNode("div",{class:"formula-help-content"},[n.createElementVNode("div",{class:"formula-help-item"},[n.createElementVNode("span",{class:"formula-help-label"},n.toDisplayString("컬럼 참조")),n.createElementVNode("code",null,"[컬럼명]")]),n.createElementVNode("div",{class:"formula-help-item"},[n.createElementVNode("span",{class:"formula-help-label"},n.toDisplayString("비교")),n.createElementVNode("code",null,"=, !=, <, >, <=, >=")]),n.createElementVNode("div",{class:"formula-help-item"},[n.createElementVNode("span",{class:"formula-help-label"},n.toDisplayString("산술")),n.createElementVNode("code",null,"+, -, *, /")]),n.createElementVNode("div",{class:"formula-help-item"},[n.createElementVNode("span",{class:"formula-help-label"},n.toDisplayString("논리")),n.createElementVNode("code",null,"AND, OR, NOT")]),n.createElementVNode("div",{class:"formula-help-item"},[n.createElementVNode("span",{class:"formula-help-label"},n.toDisplayString("문자열")),n.createElementVNode("code",null,"CONTAINS, STARTS_WITH, ENDS_WITH")]),n.createElementVNode("div",{class:"formula-help-item"},[n.createElementVNode("span",{class:"formula-help-label"},n.toDisplayString("NULL 체크")),n.createElementVNode("code",null,"IS_EMPTY, IS_NOT_EMPTY")]),n.createElementVNode("div",{class:"formula-help-item"},[n.createElementVNode("span",{class:"formula-help-label"},n.toDisplayString("값")),n.createElementVNode("code",null,'"문자열", 123, #2025-01-01#')])],-1))])])):(n.openBlock(),n.createElementBlock("div",Vi,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.rules,(l,d)=>(n.openBlock(),n.createElementBlock("div",{key:l.sequence,class:n.normalizeClass(["moz-custom-cell-row",{"minify-width":e.rules.length<=1}])},[0!==d?(n.openBlock(),n.createBlock(n.unref(r.Select),{key:0,modelValue:l.logical,"onUpdate:modelValue":e=>l.logical=e,itemsSource:k.value,keyProp:"key",displayProp:"value",onChange:n.unref(le),width:"100%"},null,8,["modelValue","onUpdate:modelValue","itemsSource","onChange"])):n.createCommentVNode("",!0),0===d&&e.rules.length>1?(n.openBlock(),n.createElementBlock("div",Oi)):n.createCommentVNode("",!0),n.createVNode(n.unref(r.Select),{modelValue:l.header,"onUpdate:modelValue":e=>l.header=e,itemsSource:b.value,keyProp:"header",displayProp:"header",onChange:()=>((e,n,i)=>{var r;if(!v.value)return;const l=null==(r=w.value)?void 0:r.find(t=>t.header===e.header);e.binding=(null==l?void 0:l.binding)||"",e.type=(null==l?void 0:l.dataType)||t,e.variable=null;const u=D.value[i];u&&(e.type===o||e.type===s?u.rules[n].comparisonObj=T.value[0]:e.type===a?u.rules[n].comparisonObj=I.value[0]:u.rules[n].comparisonObj=M.value[0],u.rules[n].comparison=u.rules[n].comparisonObj.symbol,setTimeout(()=>{le()}))})(l,d,u),width:"100%"},null,8,["modelValue","onUpdate:modelValue","itemsSource","onChange"]),l.type===o||l.type===s?(n.openBlock(),n.createBlock(n.unref(r.Select),{key:2,modelValue:l.comparisonObj,"onUpdate:modelValue":e=>l.comparisonObj=e,itemsSource:T.value,keyProp:"symbol",displayProp:"symbol",onChange:()=>ae(l),width:"100%",useObjBinding:!0,useFilter:!1,listWidth:172},{"list-item":n.withCtx(({item:e,highlightText:t})=>[n.createElementVNode("table",null,[n.createElementVNode("tbody",null,[n.createElementVNode("tr",Pi,[n.createElementVNode("td",Bi,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(t,({part:e,highlight:t},o)=>(n.openBlock(),n.createElementBlock("span",{key:o,class:n.normalizeClass({highlight:t})},n.toDisplayString(e),3))),128))]),n.createElementVNode("td",Ri,n.toDisplayString(e.desc),1)])])])]),_:1},8,["modelValue","onUpdate:modelValue","itemsSource","onChange"])):l.type===a?(n.openBlock(),n.createBlock(n.unref(r.Select),{key:3,modelValue:l.comparisonObj,"onUpdate:modelValue":e=>l.comparisonObj=e,itemsSource:I.value,keyProp:"symbol",displayProp:"symbol",onChange:()=>ae(l),width:"100%",useObjBinding:!0,useFilter:!1,listWidth:172},{"list-item":n.withCtx(({item:e,highlightText:t})=>[n.createElementVNode("table",null,[n.createElementVNode("tbody",null,[n.createElementVNode("tr",zi,[n.createElementVNode("td",Fi,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(t,({part:e,highlight:t},o)=>(n.openBlock(),n.createElementBlock("span",{key:o,class:n.normalizeClass({highlight:t})},n.toDisplayString(e),3))),128))]),n.createElementVNode("td",Gi,n.toDisplayString(e.desc),1)])])])]),_:1},8,["modelValue","onUpdate:modelValue","itemsSource","onChange"])):(n.openBlock(),n.createBlock(n.unref(r.Select),{key:4,modelValue:l.comparisonObj,"onUpdate:modelValue":e=>l.comparisonObj=e,itemsSource:M.value,keyProp:"symbol",displayProp:"symbol",onChange:()=>ae(l),width:"100%",useObjBinding:!0,useFilter:!1,listWidth:172},{"list-item":n.withCtx(({item:e,highlightText:t})=>[n.createElementVNode("table",null,[n.createElementVNode("tbody",null,[n.createElementVNode("tr",Hi,[n.createElementVNode("td",Wi,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(t,({part:e,highlight:t},o)=>(n.openBlock(),n.createElementBlock("span",{key:o,class:n.normalizeClass({highlight:t})},n.toDisplayString(e),3))),128))]),n.createElementVNode("td",Ui,n.toDisplayString(e.desc),1)])])])]),_:1},8,["modelValue","onUpdate:modelValue","itemsSource","onChange"])),l.type===o?(n.openBlock(),n.createBlock(n.unref(r.NumberInput),{key:5,id:`custom-cell-variable-input-flex-${u}-${l.sequence}-${n.unref(h)}`,modelValue:l.variable,"onUpdate:modelValue":e=>l.variable=e,disabled:c(l.comparison),step:1,onKeyup:n.withKeys(ve,["enter"]),width:0===d&&e.rules.length<=1?"256px":"173px",onChange:n.unref(le),onInput:n.unref(le),onPaste:n.unref(le),onCut:n.unref(le)},null,8,["id","modelValue","onUpdate:modelValue","disabled","width","onChange","onInput","onPaste","onCut"])):l.type===a?(n.openBlock(),n.createBlock(n.unref(r.Select),{key:6,id:`custom-cell-variable-input-flex-${u}-${l.sequence}-${n.unref(h)}`,modelValue:l.variable,"onUpdate:modelValue":e=>l.variable=e,disabled:c(l.comparison),itemsSource:[{key:!0,value:"TRUE"},{key:!1,value:"FALSE"}],displayProp:"value",keyProp:"key",onKeyup:n.withKeys(ve,["enter"]),width:0===d&&e.rules.length<=1?"256px":"173px",onChange:n.unref(le),onInput:n.unref(le),onPaste:n.unref(le),onCut:n.unref(le)},null,8,["id","modelValue","onUpdate:modelValue","disabled","width","onChange","onInput","onPaste","onCut"])):l.type===s?(n.openBlock(),n.createBlock(n.unref(r.DateInput),{key:7,id:`custom-cell-variable-input-flex-${u}-${l.sequence}-${n.unref(h)}`,modelValue:l.dummy,"onUpdate:modelValue":e=>l.dummy=e,disabled:c(l.comparison),onInput:e=>{l.variable=e.target.value,n.unref(le)()},onKeyup:n.withKeys(ve,["enter"]),onChange:e=>{e&&(l.variable=e.format("YYYY-MM-DD")),n.unref(le)()},onPaste:e=>{e&&(l.variable=e.format("YYYY-MM-DD")),n.unref(le)()},onCut:e=>{l.variable=e.format("YYYY-MM-DD"),n.unref(le)()},onBlur:()=>{n.unref(i)(l.variable).isValid()&&(l.dummy=n.unref(i)(l.variable))},format:n.unref(p),width:0===d&&e.rules.length<=1?"256px":"173px"},null,8,["id","modelValue","onUpdate:modelValue","disabled","onInput","onChange","onPaste","onCut","onBlur","format","width"])):(n.openBlock(),n.createBlock(n.unref(r.Input),{key:8,id:`custom-cell-variable-input-flex-${u}-${l.sequence}-${n.unref(h)}`,modelValue:l.variable,"onUpdate:modelValue":e=>l.variable=e,disabled:c(l.comparison),onKeyup:n.withKeys(ve,["enter"]),width:0===d&&e.rules.length<=1?"256px":"173px",onChange:n.unref(le),onInput:e=>{const t=e.target;l.variable=null==t?void 0:t.value,n.unref(le)()},onPaste:n.unref(le),onCut:n.unref(le)},null,8,["id","modelValue","onUpdate:modelValue","disabled","width","onChange","onInput","onPaste","onCut"])),n.createElementVNode("span",{class:"remove-row",onClick:e=>((e,t)=>{const n=D.value[e];n&&(n.rules.splice(t,1),0!==n.rules.length?le():D.value.length>1?re(e):se())})(u,d),tabindex:"0"},[n.createVNode(n.unref(At))],8,Yi)],2))),128)),n.createElementVNode("div",{type:"text",onClick:e=>(e=>{const t=D.value[e];if(!t)return;let n=0;t.rules.length>0&&(n=t.rules[t.rules.length-1].sequence+1);const o=m.value||w.value&&w.value[0];o&&(t.rules.push(ce(n,o)),le())})(u),class:"add-rule-button"},[n.createVNode(n.unref(Ue),{width:12,height:12,color:"#4568e0"}),n.createElementVNode("span",null,n.toDisplayString(n.unref(_).Grid.addFormulaCondition),1)],8,Zi)])),n.createElementVNode("div",Xi,[n.createElementVNode("div",ji,[l[10]||(l[10]=n.createElementVNode("div",{class:"color-section-row-label"},"적용 컬럼",-1)),n.createVNode(n.unref(r.MultiSelect),{modelValue:e.targetColumns,"onUpdate:modelValue":t=>e.targetColumns=t,itemsSource:b.value,keyProp:"binding",displayProp:"header",onChange:n.unref(le),useFilter:!0,useSelectAll:!0,width:"100%",onClose:()=>{var t;0===(null==(t=null==e?void 0:e.targetColumns)?void 0:t.length)&&(e.targetColumns=me())}},null,8,["modelValue","onUpdate:modelValue","itemsSource","onChange","onClose"])]),n.createElementVNode("div",$i,[l[12]||(l[12]=n.createElementVNode("div",{class:"color-picker-item-divider"},null,-1)),n.createElementVNode("div",qi,[l[11]||(l[11]=n.createElementVNode("span",null,n.toDisplayString("색상"),-1)),n.createElementVNode("div",Ki,[n.createElementVNode("div",{class:"color-preview-trigger color-combined-trigger",ref_for:!0,ref:e=>((e,t)=>{const n=`${t}-color`;e&&e instanceof HTMLElement?R.value.set(n,e):R.value.delete(n)})(e,u),style:n.normalizeStyle({backgroundColor:e.backgroundColor}),onClick:e=>(e=>{var t;(null==(t=B.value)?void 0:t.setIndex)===e?B.value=null:B.value={setIndex:e}})(u)},[n.createElementVNode("span",{class:"color-combined-trigger-a",style:n.normalizeStyle({color:e.textColor})},"A",4)],12,Ji)])])])])])]))),128))])])]),_:1},8,["visible","title"]),(n.openBlock(),n.createBlock(n.Teleport,{to:"body"},[null!==B.value?(n.openBlock(),n.createElementBlock("div",{key:0,class:"color-dropdown-overlay",onClick:K})):n.createCommentVNode("",!0),null!==B.value?(n.openBlock(),n.createElementBlock("div",{key:1,class:"color-dropdown-teleport",style:n.normalizeStyle(G.value)},[n.createElementVNode("div",tr,[l[13]||(l[13]=n.createElementVNode("div",{class:"color-dropdown-title"},"텍스트 색상",-1)),n.createElementVNode("div",nr,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(mi),e=>(n.openBlock(),n.createElementBlock("div",{key:e.name,class:n.normalizeClass(["color-option",{"selected-color":W(B.value.setIndex,"text",e.hex)}]),onClick:t=>J(B.value.setIndex,"text",e.hex)},[n.createElementVNode("div",{class:"color-swatch color-swatch-text",style:n.normalizeStyle([{color:e.hex},{"--border-color":j("text",e.hex)},$(B.value.setIndex,"text",e.hex)])}," A ",4)],10,or))),128)),n.createElementVNode("label",{class:n.normalizeClass(["color-option color-custom-swatch",{"selected-color":X(B.value.setIndex,"text")}]),onClick:l[3]||(l[3]=n.withModifiers(()=>{},["stop"]))},[n.createElementVNode("input",{type:"color",class:"color-custom-input",value:H(B.value.setIndex,"text"),onInput:l[2]||(l[2]=e=>Q(B.value.setIndex,"text",e.target.value))},null,40,ir),n.createElementVNode("div",{class:"color-swatch color-swatch-custom",style:n.normalizeStyle(q(B.value.setIndex,"text"))},[n.createVNode(n.unref(Zn),{color:X(B.value.setIndex,"text")?void 0:"#8998B5"},null,8,["color"])],4)],2)])]),n.createElementVNode("div",rr,[l[14]||(l[14]=n.createElementVNode("div",{class:"color-dropdown-title"},"배경 색상",-1)),n.createElementVNode("div",ar,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(vi),e=>(n.openBlock(),n.createElementBlock("div",{key:e.name,class:n.normalizeClass(["color-option",{"selected-color":W(B.value.setIndex,"background",e.hex)}]),onClick:t=>J(B.value.setIndex,"background",e.hex)},[n.createElementVNode("div",{class:"color-swatch",style:n.normalizeStyle([{backgroundColor:e.hex},{"--border-color":j("background",e.hex)},$(B.value.setIndex,"background",e.hex)])},null,4)],10,lr))),128)),n.createElementVNode("label",{class:n.normalizeClass(["color-option color-custom-swatch",{"selected-color":X(B.value.setIndex,"background")}]),onClick:l[5]||(l[5]=n.withModifiers(()=>{},["stop"]))},[n.createElementVNode("input",{type:"color",class:"color-custom-input",value:H(B.value.setIndex,"background"),onInput:l[4]||(l[4]=e=>Q(B.value.setIndex,"background",e.target.value))},null,40,sr),n.createElementVNode("div",{class:"color-swatch color-swatch-custom",style:n.normalizeStyle(q(B.value.setIndex,"background"))},[n.createVNode(n.unref(Zn),{color:X(B.value.setIndex,"background")?void 0:"#8998B5"},null,8,["color"])],4)],2)])])],4)):n.createCommentVNode("",!0)]))],64))}}),cr={class:"editor-input-container"},dr=n.defineComponent({__name:"GridBulkEditor",props:{customProps:{default:()=>({})}},setup(e){const t=e,{customProps:o}=n.toRefs(t),a=n.inject(Z),{showBulkEditor:l,hitColumn:s,bulkEditorValue:u,currentCellValue:c}=a??{showBulkEditor:n.ref(!1),hitColumn:n.ref(null),bulkEditorValue:n.ref(""),currentCellValue:n.ref("")},d=r.useMozLocale(),h=n.ref(!1),p=n.ref(),f=n.ref([]),g=n.ref(!1),v=n.ref([{label:"True",value:!0},{label:"False",value:!1}]),m=n.computed(()=>{var e,t,n;const i=s.value;if(!((null==i?void 0:i.id)&&o.value[i.id]&&(null==(e=o.value[i.id])?void 0:e.rules)&&(null==(n=null==(t=o.value[i.id])?void 0:t.rules)?void 0:n.length)))return!0;return o.value[i.id].rules.every(e=>e.validator(p.value))});const y=async()=>{var e,t,n,o;if(!a)return;const i=s.value,r=(null==i?void 0:i.dataType)??"string";"date"===r?(null==(e=null==i?void 0:i.id)?void 0:e.endsWith("time"))?a.modifyValue(p.value):a.modifyValue((null==(t=p.value)?void 0:t.$d)??p.value):"boolean"===r?a.modifyValue((null==(n=p.value)?void 0:n.value)??p.value):"string"===r&&g.value?a.modifyValue((null==(o=p.value)?void 0:o.value)??p.value):a.modifyValue(p.value),a.hide(),await a.executeEdit()},x=()=>{a&&a.hide()};return n.watch([l],()=>{var e;const t=s.value;l.value?h.value=!0:h.value=!1,!function(e){if(!e)return!1;const t=e.editor;return!!(t&&"dropdown"===t.type&&Array.isArray(t.options)&&t.options.length>0)}(t)?g.value=!1:g.value=!0;const n=(null==t?void 0:t.dataType)??"string";var o;if("number"===n&&("string"==typeof c.value?p.value=(o=c.value,parseInt(o.replace(/,/g,""),10)):p.value=c.value),"string"!==n||g.value||(p.value=String(c.value)),"date"===n){const n=i(c.value&&!Number.isNaN(Date.parse(String(c.value)))?c.value:new Date);(null==(e=null==t?void 0:t.id)?void 0:e.endsWith("time"))?p.value=n.format("YYYY-MM-DD HH:mm:ss"):p.value=n}if("string"===n&&g.value){f.value=function(e){if(!e)return[];const t=e.editor;return t&&Array.isArray(t.options)?t.options.map(e=>({label:String(e.label??e.value),value:e.value})):[]}(t);const e=f.value.filter(e=>e.value===c.value);e.length?p.value=e[0]:p.value=f.value[0]}if("boolean"===n){const e=v.value.filter(e=>e.value===c.value);p.value=e.length?e[0]:v.value[0]}}),(e,t)=>(n.openBlock(),n.createBlock(n.unref(r.Popup),{title:n.unref(s)?n.unref(s).header:void 0,visible:h.value,"onUpdate:visible":t[6]||(t[6]=e=>h.value=e),width:300,onCancel:x,class:"demand-popup",closeOnOutsideClick:!1},{footer:n.withCtx(()=>[n.createVNode(n.unref(r.Button),{text:n.unref(d).Grid.check,disabled:!m.value,onClick:y},null,8,["text","disabled"]),n.createVNode(n.unref(r.Button),{text:n.unref(d).Grid.cancel,type:"outline",onClick:x},null,8,["text"])]),default:n.withCtx(()=>{var e,i,a,l,u,c,d;return[n.createElementVNode("div",cr,["string"!==(null==(e=n.unref(s))?void 0:e.dataType)||g.value?"number"===(null==(i=n.unref(s))?void 0:i.dataType)?(n.openBlock(),n.createBlock(n.unref(r.NumberInput),n.mergeProps({key:1,class:"editor-input",modelValue:p.value,"onUpdate:modelValue":t[1]||(t[1]=e=>p.value=e),step:5},n.unref(o)[n.unref(s).id],{width:"100%"}),null,16,["modelValue"])):"string"===(null==(a=n.unref(s))?void 0:a.dataType)&&g.value?(n.openBlock(),n.createBlock(n.unref(r.Select),n.mergeProps({key:2,class:"editor-input",modelValue:p.value,"onUpdate:modelValue":t[2]||(t[2]=e=>p.value=e),itemsSource:f.value,displayProp:"label",keyProp:"value",useObjBinding:!0},n.unref(o)[n.unref(s).id]),null,16,["modelValue","itemsSource"])):"boolean"===(null==(l=n.unref(s))?void 0:l.dataType)?(n.openBlock(),n.createBlock(n.unref(r.Select),n.mergeProps({key:3,class:"editor-input",modelValue:p.value,"onUpdate:modelValue":t[3]||(t[3]=e=>p.value=e),itemsSource:v.value,displayProp:"label",keyProp:"value",useObjBinding:!0},n.unref(o)[n.unref(s).id]),null,16,["modelValue","itemsSource"])):"date"===(null==(u=n.unref(s))?void 0:u.dataType)&&(null==(c=n.unref(s).id)?void 0:c.endsWith("time"))?(n.openBlock(),n.createBlock(n.unref(r.Input),n.mergeProps({key:4,type:"datetime",class:"editor-input",modelValue:p.value,"onUpdate:modelValue":t[4]||(t[4]=e=>p.value=e)},n.unref(o)[n.unref(s).id]),null,16,["modelValue"])):"date"===(null==(d=n.unref(s))?void 0:d.dataType)?(n.openBlock(),n.createBlock(n.unref(r.DateInput),n.mergeProps({key:5,class:"editor-input",modelValue:p.value,"onUpdate:modelValue":t[5]||(t[5]=e=>p.value=e)},n.unref(o)[n.unref(s).id],{width:"100%"}),null,16,["modelValue"])):n.createCommentVNode("",!0):(n.openBlock(),n.createBlock(n.unref(r.Input),n.mergeProps({key:0,class:"editor-input",modelValue:p.value,"onUpdate:modelValue":t[0]||(t[0]=e=>p.value=e)},n.unref(o)[n.unref(s).id]),null,16,["modelValue"]))])]}),_:1},8,["title","visible"]))}}),hr={class:"moz-ui-grid-footer-container"},pr={key:0,class:"grid-footer-aggregates"},fr={class:"grid-footer-aggregates-item"},gr={class:"grid-footer-aggregates-item"},vr={class:"grid-footer-aggregates-item"},mr={class:"grid-footer-aggregates-item"},yr={class:"grid-footer-aggregates-item"},xr=n.defineComponent({__name:"GridFooter",props:{filteredRowCount:{default:-1},totalRowCount:{default:-1},showAggregates:{type:Boolean,default:!1}},setup(e){const t=e,o=r.useMozLocale(),i=n.computed(()=>({AVERAGE:o.value.Grid.aggregateAverage??"평균",COUNT:o.value.Grid.aggregateCount??"개수",MIN:o.value.Grid.aggregateMin??"최소",MAX:o.value.Grid.aggregateMax??"최대",SUM:o.value.Grid.aggregateSum??"합계"})),a=n.inject(z,n.ref(null)),l=jn(e=>e.totalRowCount,0,a),s=jn(e=>e.visibleRowCount,0,a),u=n.ref(null);let c=null;function d(){c&&(c(),c=null)}n.watch(()=>a.value,e=>{e?function(e){var t;d();const n=null==(t=e.on)?void 0:t.call(e,"selection:changed",()=>{var t,n;const o=null==(n=null==(t=e.rows)?void 0:t.selectionAggregates)?void 0:n.call(t);o&&o.total.count>0?u.value=o.total:u.value=null});n&&(c=n)}(e):d()},{immediate:!0}),n.onBeforeUnmount(()=>d());const h=n.computed(()=>t.filteredRowCount>=0?t.filteredRowCount:s.value),p=n.computed(()=>t.totalRowCount>=0?t.totalRowCount:l.value),f=e=>isNaN(e)?e:e.toLocaleString(void 0,{maximumFractionDigits:2});function g(e){return e.toLocaleString()}const v=n.computed(()=>p.value===h.value?o.value.Grid.footerTotalRowCount.replace("{totalRowCount}",g(p.value)):o.value.Grid.footerFilteredRowCount.replace("{totalRowCount}",g(p.value)).replace("{filterdRowCount}",g(h.value))||"");return(e,t)=>(n.openBlock(),n.createElementBlock("div",hr,[n.createElementVNode("div",null,n.toDisplayString(v.value),1),u.value?(n.openBlock(),n.createElementBlock("div",pr,[n.createElementVNode("span",fr,n.toDisplayString(i.value.AVERAGE)+": "+n.toDisplayString(f(u.value.avg)),1),n.createElementVNode("span",gr,n.toDisplayString(i.value.COUNT)+": "+n.toDisplayString(u.value.count.toLocaleString()),1),n.createElementVNode("span",vr,n.toDisplayString(i.value.MIN)+": "+n.toDisplayString(f(u.value.min)),1),n.createElementVNode("span",mr,n.toDisplayString(i.value.MAX)+": "+n.toDisplayString(f(u.value.max)),1),n.createElementVNode("span",yr,n.toDisplayString(i.value.SUM)+": "+n.toDisplayString(f(u.value.sum)),1)])):n.createCommentVNode("",!0),n.renderSlot(e.$slots,"footer")]))}}),_r={useViewSelectColumn:!0,useFixedColumn:!0,useGroupColumn:!1,useContextMenu:!0,useSort:!0,useFilter:!0,useCustomCell:!1,useBulkEditColumn:!1,useDataCopy:!0,useDataWithHeaderCopy:!0,useAutoSizeColumns:!0,useExportCsv:!1,useRowPinning:!1,useExportImport:!1,useExportExcel:!1,onImportExcel:()=>{},onImportExcelAppend:()=>{},onExportOriginalData:()=>{},useClientExcelImport:!1,useClientExcelExport:!1,useExportOriginal:!1,clientImportOptions:{},clientExportOptions:{},exportFileName:"export",onClientImportComplete:()=>{},onClientExportComplete:()=>{},customMenu:[]};function wr(e={},t={}){const o=n.ref(!1),i=n.ref({x:0,y:0}),r=n.ref([]),a=n.ref(null);let l=null,s={..._r,...e};const u=[],c=[];function d(){o.value=!1,a.value=null}function h(e,t){for(const n of c)n(e,t)}function p(e){if(!t.filterModule)return!1;return t.filterModule.getFilter().some(t=>t.binding===e)}function f(e){if(!t.sortModule)return!1;return t.sortModule.getSort().some(t=>t.binding===e)}function g(e){return!e.field||!!e.field.readonly}function v(e){const n=a.value;if(n){switch(e){case"ADD_FLT":!function(e){var n;if(!t.filterModule||!e.field)return;if(null!==(null==(n=null==l?void 0:l.getPivotFields)?void 0:n.call(l))){const n=l.getPivotFields(),o=[...n.rowFields,...n.columnFields,...n.valueFields,...n.filterFields].find(t=>t.id===e.field.id);if(o)return void t.filterModule.showFilterHandler(o)}t.filterModule.showFilterHandler(e.field)}(n);break;case"SEL_FLT":!function(e){var n;if(!t.filterModule||!e.field)return;const o=null===e.cellValue||void 0===e.cellValue||""===e.cellValue,i=o?"∅":"=",r=t.filterModule.getFilter();let a=0;r.length>0&&(a=Math.max(...r.map(e=>e.sequence))+1);const s=null!==(null==(n=null==l?void 0:l.getPivotFields)?void 0:n.call(l))?e.field.id:e.columnId,u={sequence:a,header:e.field.header??"",binding:s,logical:"AND",comparison:i,type:e.field.dataType??"string",variable:e.cellValue};l&&t.filterModule.setGrid(l);t.filterModule.addFilter([u])}(n);break;case"RST_COL_FLT":m(n);break;case"RST_COL_SORT":y(n);break;case"RST_COL_ALL":!function(e){m(e),y(e)}(n);break;case"CUSTOM_CELL":!function(e){if(!t.customCellModule||!e.field)return;t.customCellModule.showCustomCellHandler(e.field)}(n);break;case"DATA_COPY":!function(){if(!l)return;l.clipboard.copy().catch(()=>{})}();break;case"DATA_HEADER_COPY":!function(){if(!l)return;l.clipboard.copy({includeHeaders:!0}).catch(()=>{})}();break;case"PIN_UNPIN":!function(e){if(!l||!e.columnId)return;try{const t=l.columns.getState().find(t=>t.id===e.columnId);t&&"none"!==t.pinned?l.columns.unpin(e.columnId):l.columns.pinLeft(e.columnId)}catch{}}(n);break;case"AUTO_SIZE_COLUMNS":!function(){var e;if(!l)return;try{l.columns.autoFitAll(!1)}catch{null==(e=l.refresh)||e.call(l)}}();break;case"COLUMN_VIEW_SELECT":h("COLUMN_VIEW_SELECT",n);break;case"MOVE_TO_FIRST":!function(e){if(!l||!e.columnId)return;try{const t=[...l.columns.getState()].sort((e,t)=>e.order-t.order).map(e=>e.id),n=t.indexOf(e.columnId);n>0&&(t.splice(n,1),t.unshift(e.columnId),l.columns.setOrder(t))}catch{}}(n);break;case"GROUP_PANEL":h("GROUP_PANEL",n);break;case"BULK_EDIT":!function(e){if(!t.bulkEditorModule||!l||!e.field)return;t.bulkEditorModule.show(l,e.field,e.cellValue)}(n);break;case"GROUP_TOGGLE":!function(e){if(!l||!e.groupId)return;try{l.headers.toggle(e.groupId)}catch{}}(n);break;case"GROUP_COLLAPSE_ALL":!function(){if(!l)return;try{l.headers.collapseAll()}catch{}}();break;case"GROUP_EXPAND_ALL":!function(){if(!l)return;try{l.headers.expandAll()}catch{}}();break;default:{const t=x(e,[...s.customMenu??[],...u]);(null==t?void 0:t.handler)&&t.handler();break}}d()}}function m(e){if(!t.filterModule)return;const n=t.filterModule.getFilter().filter(t=>t.binding!==e.columnId);t.filterModule.setFilter(n)}function y(e){t.sortModule&&t.sortModule.removeSort(e.columnId)}function x(e,t){for(const n of t){if(n.id===e)return n;if(n.children&&n.children.length>0){const t=x(e,n.children);if(t)return t}}}function _(e){var t,n;if(!e||0===e.length)return e;const o=[...e];for(;o.length>0&&(null==(t=o[0])?void 0:t.separator);)o.shift();for(;o.length>0&&(null==(n=o[o.length-1])?void 0:n.separator);)o.pop();for(let i=0;i<o.length-1;i++)o[i].separator&&o[i+1].separator&&(o.splice(i,1),i--);return o}return{visible:o,position:i,menuItems:r,context:a,show:function(e,n){e.preventDefault(),a.value=n,i.value={x:e.clientX,y:e.clientY},r.value=function(e){var n,o,i,r,a;if("header"===e.area&&e.groupId)return function(e){var t,n;const o=[],i=(null==(n=null==(t=null==l?void 0:l.headers)?void 0:t.isCollapsed)?void 0:n.call(t,e.groupId))??!1;o.push({id:"GROUP_TOGGLE",label:i?"그룹 펼치기":"그룹 접기",handler:()=>v("GROUP_TOGGLE")}),o.push({id:"GROUP_COLLAPSE_ALL",label:"모든 그룹 접기",handler:()=>v("GROUP_COLLAPSE_ALL")}),o.push({id:"GROUP_EXPAND_ALL",label:"모든 그룹 펼치기",handler:()=>v("GROUP_EXPAND_ALL")}),o.push({id:"sep-group-actions",label:"",separator:!0}),s.useViewSelectColumn&&o.push({id:"COLUMN_VIEW_SELECT",label:"열 표시/숨김 설정",handler:()=>v("COLUMN_VIEW_SELECT")});s.useAutoSizeColumns&&o.push({id:"AUTO_SIZE_COLUMNS",label:"열 너비 자동 조정",handler:()=>v("AUTO_SIZE_COLUMNS")});return _(o)}(e);const c=[];s.customMenu&&s.customMenu.length>0&&(c.push(...s.customMenu),c.push({id:"sep-custom",label:"",separator:!0}));u.length>0&&(c.push(...u),c.push({id:"sep-registered",label:"",separator:!0}));if(s.useFilter||s.useSort){const a=[];s.useFilter&&t.filterModule&&(a.push({id:"ADD_FLT",label:`'${(null==(n=e.field)?void 0:n.header)??""}' 열에 필터 추가`,handler:()=>v("ADD_FLT")}),a.push({id:"SEL_FLT",label:"선택 값으로 필터",disabled:e.rowIndex<0&&void 0===e.rowId||!e.cellValue,handler:()=>v("SEL_FLT")}),a.push({id:"RST_COL_FLT",label:`'${(null==(o=e.field)?void 0:o.header)??""}' 열 필터 초기화`,disabled:!p(e.columnId),handler:()=>v("RST_COL_FLT")})),s.useSort&&t.sortModule&&a.push({id:"RST_COL_SORT",label:`'${(null==(i=e.field)?void 0:i.header)??""}' 열 정렬 초기화`,disabled:!f(e.columnId),handler:()=>v("RST_COL_SORT")}),s.useFilter&&s.useSort&&t.filterModule&&t.sortModule&&a.push({id:"RST_COL_ALL",label:`'${(null==(r=e.field)?void 0:r.header)??""}' 열 필터/정렬 초기화`,disabled:!p(e.columnId)&&!f(e.columnId),handler:()=>v("RST_COL_ALL")}),a.length>0&&(c.push({id:"FILTER_AND_SORT",label:"필터 및 정렬",children:a}),c.push({id:"sep-filter-sort",label:"",separator:!0}))}s.useCustomCell&&t.customCellModule&&c.push({id:"CUSTOM_CELL",label:"셀 스타일 지정",handler:()=>v("CUSTOM_CELL")});s.useDataCopy&&c.push({id:"DATA_COPY",label:"선택 데이터 복사",handler:()=>v("DATA_COPY")});s.useDataWithHeaderCopy&&c.push({id:"DATA_HEADER_COPY",label:"헤더 포함 복사",handler:()=>v("DATA_HEADER_COPY")});(s.useDataCopy||s.useDataWithHeaderCopy)&&c.push({id:"sep-copy",label:"",separator:!0});s.useFixedColumn&&c.push({id:"PIN_UNPIN",label:"컬럼 고정/해제",handler:()=>v("PIN_UNPIN")});s.useAutoSizeColumns&&c.push({id:"AUTO_SIZE_COLUMNS",label:"열 너비 자동 조정",handler:()=>v("AUTO_SIZE_COLUMNS")});s.useBulkEditColumn&&t.bulkEditorModule&&(c.push({id:"sep-bulk",label:"",separator:!0}),c.push({id:"BULK_EDIT",label:`데이터 일괄변경 [${(null==(a=e.field)?void 0:a.header)??""}]`,disabled:g(e),handler:()=>v("BULK_EDIT")}));return _(c)}(n),o.value=!0},hide:d,registerItems:function(e){for(const t of e){const e=u.findIndex(e=>e.id===t.id);e>=0?u[e]=t:u.push(t)}},unregisterItems:function(e){for(const t of e){const e=u.findIndex(e=>e.id===t);e>=0&&u.splice(e,1)}},updateConfig:function(e){s={...s,...e}},executeCommand:v,onCommand:function(e){c.push(e)},destroy:function(){l=null,o.value=!1,r.value=[],a.value=null,u.length=0,c.length=0},setGrid:function(e){l=e}}}function br(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}async function Sr(e,t,n){var o;const r=`${t.exportFileName??"export"}_${i().format("YYYYMMDD")}.xlsx`,a=br();n&&n.eventMessages.unshift({noti_type:"progress",header_key:"text-file_download",noti_datetime:i().format("YYYY-MM-DD HH:mm:ss"),noti_sender_id:"",prop_value:{session_id:a,file_name:r,status:"in_progress",progress_per:0,operation_type:"download",remain_time:-1}});try{if(await e.io.saveExcelToFile({scope:"all",includeHeaders:!0,suggestedName:r,fallbackToDownload:!0,sheetSplit:"auto",onProgress:e=>{if(!n)return;const t=n.eventMessages.find(e=>{var t;return(null==(t=e.prop_value)?void 0:t.session_id)===a});if(!(null==t?void 0:t.prop_value))return;let o="number"==typeof e.percent?e.percent:void 0;void 0===o&&"number"==typeof e.rowsProcessed&&"number"==typeof e.totalRows&&e.totalRows>0&&(o=e.rowsProcessed/e.totalRows*100),"number"==typeof o&&(t.prop_value.progress_per=Math.min(99,Math.max(0,Math.floor(o))))},...t.clientExportOptions??{}}),n){const e=n.eventMessages.find(e=>{var t;return(null==(t=e.prop_value)?void 0:t.session_id)===a});(null==e?void 0:e.prop_value)&&(e.prop_value.status="completed",e.prop_value.progress_per=100),setTimeout(()=>{const e=n.eventMessages.findIndex(e=>{var t;return(null==(t=e.prop_value)?void 0:t.session_id)===a});-1!==e&&n.eventMessages.splice(e,1)},2e3)}null==(o=t.onClientExportComplete)||o.call(t,new Blob)}catch(l){if(l instanceof DOMException&&"AbortError"===l.name){if(n){const e=n.eventMessages.findIndex(e=>{var t;return(null==(t=e.prop_value)?void 0:t.session_id)===a});-1!==e&&n.eventMessages.splice(e,1)}return}if(n){const e=n.eventMessages.find(e=>{var t;return(null==(t=e.prop_value)?void 0:t.session_id)===a});(null==e?void 0:e.prop_value)&&(e.prop_value.status="error",e.prop_value.error_message=l instanceof Error?l.message:String(l),e.prop_value.progress_per=0,e.prop_value.remain_time=-1)}}}function Cr(e){const t=null==e?"":String(e);return t.includes(",")||t.includes('"')||t.includes("\n")?`"${t.replace(/"/g,'""')}"`:t}async function Mr(e){let t,n;if("pivot"===e.pivot.getMode()){const o=await e.pivot.getDataMatrix();if(!o)return;t=o.headers,n=o.rows}else{const o=await e.getExportData({scope:"all"});if(!o)return;const{headers:i,rows:r}=o,a=i.map(e=>e.id);t=i.map(e=>e.header),n=r.map(e=>a.map(t=>e[t]))}const o=[];o.push(t.map(Cr).join(","));for(const s of n)o.push(s.map(Cr).join(","));const i="\ufeff"+o.join("\r\n"),r=new Blob([i],{type:"text/csv;charset=utf-8;"}),a=URL.createObjectURL(r),l=document.createElement("a");l.href=a,l.download=`export_${(new Date).toISOString().slice(0,10)}.csv`,l.click(),URL.revokeObjectURL(a)}const Tr={class:"grid-context-menu-aggregate__label"},Ir={class:"grid-context-menu-aggregate__value"},kr=n.defineComponent({__name:"GridContextMenu",props:{config:{default:()=>({})}},setup(e,{expose:t}){const o=e,i=n.inject(z),l=n.inject(W,void 0),s=n.inject(U,void 0),u=n.inject(Y,void 0),c=n.inject(Z,void 0),d=r.useMozLocale(),h=n.computed(()=>d.value.Grid),p=x(),f=a.useGridNotificationStore();async function g(){const e=null==i?void 0:i.value;e&&await Mr(e)}const v=wr(o.config,{filterModule:l,sortModule:s,customCellModule:u,bulkEditorModule:c}),{context:m}=v,y=n.ref(null),_=n.ref([]);let w=null;function b(){w&&(w(),w=null)}function S(e){return{text:e.label,disabled:e.disabled??!1,function:e.handler?()=>{var t,n;null==(t=e.handler)||t.call(e),null==(n=y.value)||n.close()}:void 0,children:e.children?e.children.map(S):void 0}}function C(e){if(!l)return!1;return l.getFilter().some(t=>t.binding===e)}function M(e){if(!s)return!1;return s.getSort().some(t=>t.binding===e)}function T(e,t){var n,o,r,a;const l=null==i?void 0:i.value;l&&e.rowData&&void 0!==e.rowId&&("top"===t?null==(o=null==(n=l.rows)?void 0:n.pinTopById)||o.call(n,e.rowId):null==(a=null==(r=l.rows)?void 0:r.pinBottomById)||a.call(r,e.rowId))}function I(e){const t=h.value;return{sum:t.contextSum??"합계",avg:t.contextAvg??"평균",min:t.contextMin??"최소",max:t.contextMax??"최대",count:t.contextCount??"개수",first:t.contextFirst??"첫번째",last:t.contextLast??"마지막"}[e]??e}function k(e){var t,n,o,i;if(!e||0===e.length)return e;const r=[...e];for(;r.length>0&&(null==(t=r[0])?void 0:t.separator);)r.shift();for(;r.length>0&&(null==(n=r[r.length-1])?void 0:n.separator);)r.pop();for(let a=0;a<r.length-1;a++)(null==(o=r[a])?void 0:o.separator)&&(null==(i=r[a+1])?void 0:i.separator)&&(r.splice(a,1),a--);return r}return n.watch(()=>null==i?void 0:i.value,e=>{e&&(v.setGrid(e),function(e){b(),w=e.on("contextmenu",t=>{if(t.originalEvent.preventDefault(),"header"===t.area&&t.groupId){const e={area:"header",rowIndex:-1,columnId:"",groupId:t.groupId,field:null,cellValue:null,rowData:null};return void(e&&(v.show(t.originalEvent,e),n.nextTick(()=>function(){if(!y.value)return;const e=()=>function(){const e=[],t=h.value;e.push({text:t.contextGroupToggle??"그룹 접기/펼치기",function:()=>{var e;v.executeCommand("GROUP_TOGGLE"),null==(e=y.value)||e.close()}}),e.push({text:t.contextGroupCollapseAll??"모든 그룹 접기",function:()=>{var e;v.executeCommand("GROUP_COLLAPSE_ALL"),null==(e=y.value)||e.close()}}),e.push({text:t.contextGroupExpandAll??"모든 그룹 펼치기",function:()=>{var e;v.executeCommand("GROUP_EXPAND_ALL"),null==(e=y.value)||e.close()}}),e.push({separator:!0}),e.push({text:h.value.contextColumnPicker,function:()=>{var e;v.executeCommand("COLUMN_VIEW_SELECT"),null==(e=y.value)||e.close()}}),!1!==o.config.useAutoSizeColumns&&e.push({text:h.value.contextAutoSizeColumns,function:()=>{var e;v.executeCommand("AUTO_SIZE_COLUMNS"),null==(e=y.value)||e.close()}});return k(e)}();y.value.open(e)}())))}if("cell"!==t.area||t.structural)return;if(void 0===t.rowIndex&&void 0===t.rowId)return;const r=function(e,t){var n,o;const i=e.columnId??"",r=e.rowIndex??-1,a=e.rowId;if(!i)return null;if(r<0&&void 0===a)return null;const l=(null==(n=t.getFields)?void 0:n.call(t))??[],s=l.find(e=>e.id===i)??null;let u=e.value??null,c=null;try{if(void 0!==a){const e=null==(o=t.rows)?void 0:o.getById(a);c=(null==e?void 0:e.data)??null}}catch{}return{rowIndex:r,rowId:a,columnId:i,field:s,cellValue:u,rowData:c}}(t,e);r&&(v.show(t.originalEvent,r),n.nextTick(()=>{!function(e){var t,n;try{const o=null==(n=null==(t=e.rows)?void 0:t.selectionAggregates)?void 0:n.call(t);_.value=(null==o?void 0:o.columns)??[]}catch{_.value=[]}}(e),function(){if(!y.value)return;const e=m.value;if(!e)return;const t=()=>function(e){var t,n,r,a,d,m,x,w;const b=[],I=o.config,D=!1!==I.useFilter,N=!1!==I.useSort;if(D||N){const o=[];D&&l&&(o.push({text:h.value.contextAddFilter.replace("{column}",(null==(t=e.field)?void 0:t.header)??""),function:()=>{var e;v.executeCommand("ADD_FLT"),null==(e=y.value)||e.close()}}),o.push({text:h.value.contextSelectFilter,disabled:()=>e.rowIndex<0&&void 0===e.rowId||null===e.cellValue||void 0===e.cellValue||""===e.cellValue,function:()=>{var e;v.executeCommand("SEL_FLT"),null==(e=y.value)||e.close()}}),o.push({text:h.value.contextResetColumnFilter.replace("{column}",(null==(n=e.field)?void 0:n.header)??""),disabled:()=>!C(e.columnId),function:()=>{var e;v.executeCommand("RST_COL_FLT"),null==(e=y.value)||e.close()}})),N&&s&&o.push({text:h.value.contextResetColumnSort.replace("{column}",(null==(r=e.field)?void 0:r.header)??""),disabled:()=>!M(e.columnId),function:()=>{var e;v.executeCommand("RST_COL_SORT"),null==(e=y.value)||e.close()}}),D&&N&&l&&s&&o.push({text:h.value.contextResetColumnAll.replace("{column}",(null==(a=e.field)?void 0:a.header)??""),disabled:()=>!C(e.columnId)&&!M(e.columnId),function:()=>{var e;v.executeCommand("RST_COL_ALL"),null==(e=y.value)||e.close()}}),o.length>0&&b.push({order:10,item:{text:h.value.contextFilterAndSort,children:o}})}I.useCustomCell&&u&&b.push({order:15,item:{text:h.value.customCellStyle,function:()=>{var e;v.executeCommand("CUSTOM_CELL"),null==(e=y.value)||e.close()}}});!1!==I.useDataCopy&&b.push({order:20,item:{text:h.value.contextDataCopy,function:()=>{var e;v.executeCommand("DATA_COPY"),null==(e=y.value)||e.close()}}});!1!==I.useDataWithHeaderCopy&&b.push({order:21,item:{text:h.value.contextDataWithHeaderCopy,function:()=>{var e;v.executeCommand("DATA_HEADER_COPY"),null==(e=y.value)||e.close()}}});const E=(null==(x=null==(m=null==(d=null==i?void 0:i.value)?void 0:d.headers)?void 0:m.hasGroups)?void 0:x.call(m))??!1;!1===I.useFixedColumn||E||b.push({order:30,item:{text:h.value.contextPin,function:()=>{var e;v.executeCommand("PIN_UNPIN"),null==(e=y.value)||e.close()}}});b.push({order:31,item:{text:h.value.contextColumnPicker,function:()=>{var e;v.executeCommand("COLUMN_VIEW_SELECT"),null==(e=y.value)||e.close()}}}),E||b.push({order:32,item:{text:h.value.contextMoveColumnFirst,function:()=>{var e;v.executeCommand("MOVE_TO_FIRST"),null==(e=y.value)||e.close()}}});E&&(b.push({order:33,item:{text:h.value.contextGroupCollapseAll??"모든 그룹 접기",function:()=>{var e;v.executeCommand("GROUP_COLLAPSE_ALL"),null==(e=y.value)||e.close()}}}),b.push({order:34,item:{text:h.value.contextGroupExpandAll??"모든 그룹 펼치기",function:()=>{var e;v.executeCommand("GROUP_EXPAND_ALL"),null==(e=y.value)||e.close()}}}));!1!==I.useGroupColumn&&b.push({order:35,item:{text:h.value.contextGroupPanel,function:()=>{var e;v.executeCommand("GROUP_PANEL"),null==(e=y.value)||e.close()}}});I.useExportCsv&&b.push({order:40,item:{text:h.value.contextExportCsv??"CSV 내보내기",function:()=>{var e;g(),null==(e=y.value)||e.close()}}});{const t=[];I.useClientExcelImport&&t.push({text:h.value.contextImportExcelFileClient??"파일에서 가져오기 (클라이언트)",function:()=>{var e;const t=null==i?void 0:i.value;t&&p.show(t,I.clientImportOptions??{}),null==(e=y.value)||e.close()}}),I.useExportImport&&I.onImportExcel&&t.push({text:h.value.contextImportExcelOverwriteServer??"엑셀 가져오기 - 덮어쓰기 (서버)",function:()=>{var t,n;null==(t=I.onImportExcel)||t.call(I,{grid:null==i?void 0:i.value,field:e.field}),null==(n=y.value)||n.close()}}),I.useExportImport&&I.onImportExcelAppend&&t.push({text:h.value.contextImportExcelAppendServer??"엑셀 가져오기 - 추가 (서버)",function:()=>{var t,n;null==(t=I.onImportExcelAppend)||t.call(I,{grid:null==i?void 0:i.value,field:e.field}),null==(n=y.value)||n.close()}}),t.length>0&&b.push({order:41,item:{text:h.value.contextImport??"가져오기",children:t}})}{const e=[];I.useClientExcelExport&&(e.push({text:h.value.contextExportXlsxClient??"XLSX (클라이언트)",function:async()=>{var e;await async function(e){const t=null==i?void 0:i.value;t&&"excel"===e&&await Sr(t,o.config,f)}("excel"),null==(e=y.value)||e.close()}}),e.push({text:h.value.contextExportCsvClient??"CSV (클라이언트)",function:()=>{var e;g(),null==(e=y.value)||e.close()}})),(I.useExportExcel||I.onExportOriginalData)&&I.onExportOriginalData?(e.push({text:h.value.contextExportXlsxServer??"XLSX (서버)",function:()=>{var e,t;null==(e=I.onExportOriginalData)||e.call(I,"excel"),null==(t=y.value)||t.close()}}),e.push({text:h.value.contextExportCsvServer??"CSV (서버)",function:()=>{var e,t;null==(e=I.onExportOriginalData)||e.call(I,"csv"),null==(t=y.value)||t.close()}})):I.useExportExcel&&!I.useClientExcelExport&&e.push({text:h.value.contextExportCsv??"CSV 내보내기",function:()=>{var e;g(),null==(e=y.value)||e.close()}}),e.length>0&&b.push({order:42,item:{text:h.value.contextExport??"내보내기",children:e}})}I.useBulkEditColumn&&c&&b.push({order:45,item:{text:h.value.contextBulkEdit.replace("{name}",(null==(w=e.field)?void 0:w.header)??""),disabled:()=>function(e){return!e.field||!!e.field.readonly}(e),function:()=>{var e;v.executeCommand("BULK_EDIT"),null==(e=y.value)||e.close()}}});!1!==I.useAutoSizeColumns&&b.push({order:60,item:{text:h.value.contextAutoSizeColumns,function:()=>{var e;v.executeCommand("AUTO_SIZE_COLUMNS"),null==(e=y.value)||e.close()}}});I.useRowPinning&&e.rowData&&(b.push({order:70,item:{text:h.value.contextPinTop??"행 상단 고정",function:()=>{var t;T(e,"top"),null==(t=y.value)||t.close()}}}),b.push({order:71,item:{text:h.value.contextPinBottom??"행 하단 고정",function:()=>{var t;T(e,"bottom"),null==(t=y.value)||t.close()}}}),b.push({order:72,item:{text:h.value.contextUnpin??"고정 해제",function:()=>{var t;!function(e){var t,n;const o=null==i?void 0:i.value;if(!o)return;const r=e.rowId;void 0!==r&&(null==(n=null==(t=o.rows)?void 0:t.unpinById)||n.call(t,String(r)))}(e),null==(t=y.value)||t.close()}}}));if(I.customMenu&&I.customMenu.length>0)for(const o of I.customMenu)b.push({order:o.order??50,item:{text:o.label,disabled:o.disabled??!1,function:o.handler?()=>{var e,t;null==(e=o.handler)||e.call(o),null==(t=y.value)||t.close()}:void 0,children:o.children?o.children.map(S):void 0}});b.sort((e,t)=>e.order-t.order);const A=[];let L=-1;for(const o of b){const e=Math.floor(o.order/10),t=Math.floor(L/10);L>=0&&e!==t&&A.push({separator:!0}),A.push(o.item),L=o.order}_.value.length>0&&(A.push({separator:!0}),A.push({text:"",hover:!1,template:"aggregate-columns"}));return k(A)}(e);y.value.open(t)}()}))})}(e))},{immediate:!0}),t({contextMenu:v}),n.onBeforeUnmount(()=>{b(),v.destroy()}),(e,t)=>(n.openBlock(),n.createBlock(n.unref(r.ContextMenu),{ref_key:"contextMenuRef",ref:y,"min-width":"200px"},{"aggregate-columns":n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(_.value,(e,t)=>{return n.openBlock(),n.createElementBlock("div",{key:t,class:n.normalizeClass(["grid-context-menu-aggregate",{"grid-context-menu-aggregate--compact":_.value.length>=2}])},[n.createElementVNode("span",Tr,n.toDisplayString(e.header)+" "+n.toDisplayString(I(e.aggregate)),1),n.createElementVNode("span",Ir,n.toDisplayString((o=e.value,i=e.formattedValue,i||(isNaN(o)?String(o):o.toLocaleString(void 0,{maximumFractionDigits:2})))),1)],2);var o,i}),128))]),_:1},512))}}),Dr=p(kr,[["__scopeId","data-v-f216629c"]]);function Nr(e,t){const o=jn(e=>e.columnStates,[],e),i=n.ref(0),r=[];function a(){for(const e of r)e();r.length=0}n.watch(()=>e.value,e=>{if(a(),e){const t=()=>{i.value++};r.push(e.on("column:update",t)),r.push(e.on("column:reset",t)),r.push(e.on("column:resize",t)),r.push(e.on("column:pin",t)),r.push(e.on("column:reorder",t)),r.push(e.on("column:visibility",t))}},{immediate:!0}),n.onBeforeUnmount(()=>{a()});const l=n.computed(()=>{i.value;const t=e.value;return t&&0!==o.value.length?[...o.value].filter(e=>!e.id.startsWith("_")).sort((e,t)=>e.order-t.order).map(e=>t.columns.getById(e.id)).filter(e=>null!==e):[]}),s=n.ref(null),u=n.computed(()=>s.value?l.value.find(e=>e.id===s.value)??null:null);n.watch(t.isOpen,e=>{var t;e&&!s.value&&l.value.length>0&&(s.value=(null==(t=l.value[0])?void 0:t.id)??null)}),n.watch(l,e=>{var t;s.value&&!e.find(e=>e.id===s.value)&&(s.value=(null==(t=e[0])?void 0:t.id)??null)});const c=n.computed(()=>0!==l.value.length&&l.value.every(e=>e.visible)),d=n.computed(()=>l.value.some(e=>e.visible)),h=n.computed(()=>d.value&&!c.value);const p=n.ref(null),f=n.ref(null);const g=n.ref([]);n.watch(t.isOpen,t=>{t&&e.value&&0===g.value.length&&(g.value=l.value.map(e=>({id:e.id,visible:e.visible,order:e.order,pinned:e.pinned,width:e.width})))});const v=n.computed(()=>0!==g.value.length&&g.value.some(e=>{const t=l.value.find(t=>t.id===e.id);return!t||(t.visible!==e.visible||t.order!==e.order||t.pinned!==e.pinned||t.width!==e.width)}));return{columns:l,selectedId:s,selectedColumn:u,isAllVisible:c,isIndeterminate:h,setAllVisible:function(t){const n=e.value;if(n)for(const e of l.value)n.columns.setHidden(e.id,!t)},toggleVisibility:function(t,n){var o;null==(o=e.value)||o.columns.setHidden(t,!n)},dragSrcIndex:p,dropTargetIndex:f,onDragStart:function(e,t){p.value=t,e.dataTransfer&&(e.dataTransfer.setData("text/plain",String(t)),e.dataTransfer.effectAllowed="move")},onDragOver:function(e,t){if(null===p.value)return;if(e.preventDefault(),!t)return;const n=t.querySelectorAll(".mzc-col-list-item");let o=0,i=1/0;for(let r=0;r<n.length;r++){const t=n[r].getBoundingClientRect(),a=t.top+t.height/2,l=Math.abs(e.clientY-a);l<i&&(i=l,o=r)}f.value=o},onDrop:function(t){t.preventDefault();const n=e.value;if(n&&null!==p.value&&null!==f.value&&p.value!==f.value){const e=p.value,t=f.value,o=l.value.map(e=>e.id),[i]=o.splice(e,1);i&&(o.splice(t,0,i),n.columns.setOrder(o))}p.value=null,f.value=null},onDragEnd:function(){p.value=null,f.value=null},hasChanges:v,reset:function(){const t=e.value;t&&(t.columns.resetAll(),g.value=l.value.map(e=>({id:e.id,visible:e.visible,order:e.order,pinned:e.pinned,width:e.width})))}}}function Er(){return[{label:"없음",presets:[{id:"none",label:"마스크 없음",description:"원본 값 그대로 표시",mask:null}]},{label:"숫자",presets:[{id:"number-thousand",label:"천 단위 구분 (1,234)",description:"예: 1234 → 1,234",mask:{type:"numeric",pattern:"#,###"}},{id:"number-decimal-2",label:"소수 2자리 (#,##0.00)",description:"예: 1234.5 → 1,234.50",mask:{type:"numeric",pattern:"#,##0.00"}},{id:"currency-krw",label:"원화 (₩1,234)",description:"예: 1234 → ₩1,234",mask:{type:"numeric",pattern:"#,###",prefix:"₩"}},{id:"currency-usd",label:"달러 ($1,234.00)",description:"예: 1234.5 → $1,234.50",mask:{type:"numeric",pattern:"#,##0.00",prefix:"$"}},{id:"percent",label:"퍼센트 (12%)",description:"예: 12 → 12%",mask:{type:"numeric",pattern:"#,##0",suffix:"%"}}]},{label:"날짜",presets:[{id:"date-iso",label:"YYYY-MM-DD",description:"예: 2026-05-26",mask:{type:"date",pattern:"YYYY-MM-DD"}},{id:"date-ko",label:"YYYY년 MM월 DD일",description:"예: 2026년 05월 26일",mask:{type:"date",pattern:"YYYY년 MM월 DD일"}},{id:"datetime-iso",label:"YYYY-MM-DD HH:mm",description:"예: 2026-05-26 14:30",mask:{type:"date",pattern:"YYYY-MM-DD HH:mm"}},{id:"date-us",label:"MM/DD/YYYY",description:"예: 05/26/2026",mask:{type:"date",pattern:"MM/DD/YYYY"}}]},{label:"문자열",presets:[{id:"phone-kr",label:"전화번호 (010-1234-5678)",description:"예: 01012345678 → 010-1234-5678",mask:{type:"string",pattern:"000-0000-0000"}},{id:"rrn",label:"주민등록번호 (000000-0000000)",description:"예: 9501011234567 → 950101-1234567",mask:{type:"string",pattern:"000000-0000000"}},{id:"biz-num",label:"사업자등록번호 (000-00-00000)",description:"예: 1234567890 → 123-45-67890",mask:{type:"string",pattern:"000-00-00000"}}]}]}function Ar(e,t){const n=t?JSON.stringify(t):null;for(const o of e)for(const e of o.presets){if((e.mask?JSON.stringify(e.mask):null)===n)return e}return null}function Lr(e){return!e||!(e.backgroundColor||e.color||e.fontWeight&&"normal"!==e.fontWeight||e.fontStyle&&"normal"!==e.fontStyle||e.textDecoration&&"none"!==e.textDecoration||e.fontSize||e.textAlign||e.classes&&0!==e.classes.length)}function Vr(e,t={}){const o=n.ref({cell:{},header:{}}),i=t.storage??("undefined"!=typeof localStorage?localStorage:null);function r(){if(i&&t.storageKey)try{const e=i.getItem(t.storageKey);if(!e)return;const n=JSON.parse(e);o.value={cell:n.cell??{},header:n.header??{}}}catch{}}n.watch(o,()=>{var n;!function(){if(i&&t.storageKey)try{i.setItem(t.storageKey,JSON.stringify(o.value))}catch{}}(),null==(n=e.value)||n.refresh()},{deep:!0});let a=null;function l(){if(a){try{a.grid.formatRow.removeHandler("mzc-user-cell-fmt"),a.grid.formatHeader.removeHandler("mzc-user-header-fmt")}catch{}a=null}}return n.watch(()=>e.value,(e,t)=>{t&&l(),e&&(!function(e){e.formatRow.addHandler("mzc-user-cell-fmt",e=>{if("data"!==e.type)return;const t=o.value.cell;if(Object.keys(t).length>0)for(const[n,o]of Object.entries(e.ctx.cells)){const e=t[n];e&&!Lr(e)?Or(o.element,e,!1):null!=o.element.dataset.mzcUserFmt&&Or(o.element,{},!1)}else for(const n of Object.values(e.ctx.cells))null!=n.element.dataset.mzcUserFmt&&Or(n.element,{},!1)},{priority:5}),e.formatHeader.addHandler("mzc-user-header-fmt",e=>{const t=o.value.header;for(const[n,o]of Object.entries(e.cells)){const e=t[n];e&&!Lr(e)?Or(o.element,e,!0):null!=o.element.dataset.mzcUserFmt&&Or(o.element,{},!0)}},{priority:80}),a={grid:e}}(e),r())},{immediate:!0}),n.onBeforeUnmount(()=>{l()}),{config:o,getCellFmt:function(e){return o.value.cell[e]||(o.value.cell[e]={}),o.value.cell[e]},getHeaderFmt:function(e){return o.value.header[e]||(o.value.header[e]={}),o.value.header[e]},clearStyle:function(e){delete o.value.cell[e],delete o.value.header[e]},clearAll:function(){o.value={cell:{},header:{}}},hasAnyFormat:function(){return Object.keys(o.value.cell).length>0||Object.keys(o.value.header).length>0},getConfig:function(){return JSON.parse(JSON.stringify(o.value))},setConfig:function(e){o.value={cell:{...e.cell},header:{...e.header}}},restoreFromStorage:r}}function Or(e,t,n){if(e.style.backgroundColor=t.backgroundColor??"",e.style.color=t.color??"",e.style.fontWeight=t.fontWeight&&"normal"!==t.fontWeight?t.fontWeight:"",e.style.fontStyle=t.fontStyle&&"normal"!==t.fontStyle?t.fontStyle:"",e.style.textDecoration=t.textDecoration&&"none"!==t.textDecoration?t.textDecoration:"",e.style.fontSize=t.fontSize??"",n){const n=t.textAlign;e.style.textAlign=n??"",e.style.justifyContent=n?"left"===n?"flex-start":"right"===n?"flex-end":"center":""}const o=e.dataset.mzcUserClasses;if(o)for(const i of o.split(/\s+/).filter(Boolean))e.classList.remove(i);if(t.classes&&t.classes.length>0){for(const n of t.classes)e.classList.add(n);e.dataset.mzcUserClasses=t.classes.join(" ")}else delete e.dataset.mzcUserClasses;Lr(t)?delete e.dataset.mzcUserFmt:e.dataset.mzcUserFmt="1"}const Pr=["title"],Br=["title"],Rr=p(n.defineComponent({__name:"ColumnListItem",props:{column:{},isSelected:{type:Boolean},isDragging:{type:Boolean},isDropTarget:{type:Boolean}},emits:["select","toggle-visibility","dragstart"],setup(e,{emit:t}){const o=t;return(t,i)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["mzc-col-list-item",{selected:e.isSelected,dragging:e.isDragging,"drop-target":e.isDropTarget}]),draggable:"true",onClick:i[2]||(i[2]=e=>o("select")),onDragstart:i[3]||(i[3]=e=>o("dragstart",e))},[i[4]||(i[4]=n.createElementVNode("span",{class:"drag-handle","aria-hidden":"true"},"⠿",-1)),n.createVNode(n.unref(r.CheckBox),{modelValue:e.column.visible,"onUpdate:modelValue":i[0]||(i[0]=e=>o("toggle-visibility",e)),onClick:i[1]||(i[1]=n.withModifiers(()=>{},["stop"]))},null,8,["modelValue"]),n.createElementVNode("span",{class:"col-header",title:e.column.header},n.toDisplayString(e.column.header),9,Pr),"none"!==e.column.pinned?(n.openBlock(),n.createElementBlock("span",{key:0,class:"pin-badge",title:`${e.column.pinned} 고정`}," 📌 ",8,Br)):n.createCommentVNode("",!0)],34))}}),[["__scopeId","data-v-d591b042"]]),zr={class:"align-picker",role:"radiogroup","aria-label":"정렬"},Fr=["title","aria-pressed","onClick"],Gr=["data-align"],Hr=p(n.defineComponent({__name:"AlignPicker",props:{modelValue:{}},emits:["update:modelValue"],setup(e,{emit:t}){const o=t,i=[{value:"left",title:"왼쪽 정렬"},{value:"center",title:"가운데 정렬"},{value:"right",title:"오른쪽 정렬"}];return(t,r)=>(n.openBlock(),n.createElementBlock("div",zr,[(n.openBlock(),n.createElementBlock(n.Fragment,null,n.renderList(i,t=>n.createElementVNode("button",{key:t.value,type:"button",class:n.normalizeClass(["align-picker-btn",{active:e.modelValue===t.value}]),title:t.title,"aria-pressed":e.modelValue===t.value,onClick:e=>{return n=t.value,void o("update:modelValue",n);var n}},[n.createElementVNode("span",{class:"align-picker-icon","data-align":t.value},[...r[0]||(r[0]=[n.createElementVNode("span",{class:"line line-1"},null,-1),n.createElementVNode("span",{class:"line line-2"},null,-1),n.createElementVNode("span",{class:"line line-3"},null,-1)])],8,Gr)],10,Fr)),64))]))}}),[["__scopeId","data-v-b69b3af0"]]),Wr={class:"mask-preset-picker"},Ur={key:0,class:"mask-preset-hint"},Yr=p(n.defineComponent({__name:"MaskPresetPicker",props:{modelValue:{},presetGroups:{}},emits:["update:modelValue"],setup(e,{emit:t}){const o=e,i=t,a=n.computed(()=>Ar(o.presetGroups,o.modelValue??void 0)),l=n.computed(()=>{const e=[];for(const t of o.presetGroups)for(const n of t.presets)e.push({id:n.id,text:"없음"===t.label?n.label:`[${t.label}] ${n.label}`});return e}),s=n.computed({get:()=>{var e;return(null==(e=a.value)?void 0:e.id)??"none"},set:e=>{for(const t of o.presetGroups)for(const n of t.presets)if(n.id===e)return void i("update:modelValue",n.mask)}});return(e,t)=>{var o;return n.openBlock(),n.createElementBlock("div",Wr,[n.createVNode(n.unref(r.Select),{modelValue:s.value,"onUpdate:modelValue":t[0]||(t[0]=e=>s.value=e),itemsSource:l.value,keyProp:"id",displayProp:"text",width:"100%",useFilter:!1},null,8,["modelValue","itemsSource"]),(null==(o=a.value)?void 0:o.description)?(n.openBlock(),n.createElementBlock("div",Ur,n.toDisplayString(a.value.description),1)):n.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-43179547"]]),Zr={class:"color-default-presets"},Xr=["title","onClick"],jr=["value"],$r=p(n.defineComponent({__name:"ColorSwatchPicker",props:{modelValue:{},type:{}},emits:["update:modelValue"],setup(e,{emit:t}){const o=e,i=t,r=n.computed(()=>"background"===o.type?vi:mi);function a(e){return!!o.modelValue&&o.modelValue.toLowerCase()===e.toLowerCase()}const l=n.computed(()=>{return!!o.modelValue&&(e=o.modelValue,!r.value.some(t=>t.hex.toLowerCase()===e.toLowerCase()));var e}),s=n.computed(()=>{const e=o.modelValue;return e&&/^#[0-9a-fA-F]{6}$/.test(e)?e:"#000000"});function u(e,t){const n=e.replace("#","").trim();if(6!==n.length)return`rgba(69, 104, 224, ${t})`;return`rgba(${Number.parseInt(n.slice(0,2),16)}, ${Number.parseInt(n.slice(2,4),16)}, ${Number.parseInt(n.slice(4,6),16)}, ${t})`}function c(e){return"text"===o.type?u(e,.5):function(e){const t=vi.findIndex(t=>t.hex.toLowerCase()===e.toLowerCase());if(t<0)return u(e,.5);const n=mi[t%mi.length];return u(n?n.hex:e,.5)}(e)}function d(e){if(a(e))return{borderColor:c(e),borderWidth:"2px"}}function h(){if(l.value&&o.modelValue)return{borderColor:c(o.modelValue),borderWidth:"2px"}}return(t,o)=>(n.openBlock(),n.createElementBlock("div",Zr,[n.createElementVNode("div",{class:n.normalizeClass(["color-option color-option-none",{"selected-color":!e.modelValue}]),title:"색상 없음",onClick:o[0]||(o[0]=e=>i("update:modelValue",void 0))},[...o[3]||(o[3]=[n.createElementVNode("div",{class:"color-swatch color-swatch-none"},[n.createElementVNode("span",{class:"color-swatch-none-mark"})],-1)])],2),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.value,t=>(n.openBlock(),n.createElementBlock("div",{key:t.name,class:n.normalizeClass(["color-option",{"selected-color":a(t.hex)}]),title:t.hex,onClick:e=>i("update:modelValue",t.hex)},["background"===e.type?(n.openBlock(),n.createElementBlock("div",{key:0,class:"color-swatch",style:n.normalizeStyle([{backgroundColor:t.hex},{"--border-color":c(t.hex)},d(t.hex)])},null,4)):(n.openBlock(),n.createElementBlock("div",{key:1,class:"color-swatch color-swatch-text",style:n.normalizeStyle([{color:t.hex},{"--border-color":c(t.hex)},d(t.hex)])},"A",4))],10,Xr))),128)),n.createElementVNode("label",{class:n.normalizeClass(["color-option color-custom-swatch",{"selected-color":l.value}]),title:"사용자 정의 색",onClick:o[2]||(o[2]=n.withModifiers(()=>{},["stop"]))},[n.createElementVNode("input",{type:"color",class:"color-custom-input",value:s.value,onInput:o[1]||(o[1]=e=>i("update:modelValue",e.target.value))},null,40,jr),n.createElementVNode("div",{class:"color-swatch color-swatch-custom",style:n.normalizeStyle(h())},[n.createVNode(Zn,{color:"#8998B5"})],4)],2)]))}}),[["__scopeId","data-v-56550540"]]),qr={class:"font-style-toggles",role:"group","aria-label":"글자 스타일"},Kr=["aria-pressed"],Jr=["aria-pressed"],Qr=["aria-pressed"],ea=p(n.defineComponent({__name:"FontStyleToggles",props:{fontWeight:{},fontStyle:{},textDecoration:{}},emits:["update:fontWeight","update:fontStyle","update:textDecoration"],setup(e,{emit:t}){const o=e,i=t,r=n.computed(()=>"bold"===o.fontWeight),a=n.computed(()=>"italic"===o.fontStyle),l=n.computed(()=>"underline"===o.textDecoration);function s(){i("update:fontWeight",r.value?"normal":"bold")}function u(){i("update:fontStyle",a.value?"normal":"italic")}function c(){i("update:textDecoration",l.value?"none":"underline")}return(e,t)=>(n.openBlock(),n.createElementBlock("div",qr,[n.createElementVNode("button",{type:"button",class:n.normalizeClass(["style-toggle",{active:r.value}]),"aria-pressed":r.value,title:"굵게",onClick:s},[...t[0]||(t[0]=[n.createElementVNode("span",{class:"style-toggle-label bold-label"},"B",-1)])],10,Kr),n.createElementVNode("button",{type:"button",class:n.normalizeClass(["style-toggle",{active:a.value}]),"aria-pressed":a.value,title:"기울임",onClick:u},[...t[1]||(t[1]=[n.createElementVNode("span",{class:"style-toggle-label italic-label"},"I",-1)])],10,Jr),n.createElementVNode("button",{type:"button",class:n.normalizeClass(["style-toggle",{active:l.value}]),"aria-pressed":l.value,title:"밑줄",onClick:c},[...t[2]||(t[2]=[n.createElementVNode("span",{class:"style-toggle-label underline-label"},"U",-1)])],10,Qr)]))}}),[["__scopeId","data-v-8b8e48a7"]]),ta=p(n.defineComponent({__name:"FontSizePicker",props:{modelValue:{}},emits:["update:modelValue"],setup(e,{emit:t}){const o=e,i=t,a=[8,9,10,11,12,14,16,18,20,24,26,28,36],l=n.computed(()=>[{id:"",text:"기본"},...a.map(e=>({id:`${e}px`,text:`${e}px`}))]),s=n.computed({get:()=>o.modelValue??"",set:e=>{i("update:modelValue",""===e?void 0:e)}});return(e,t)=>(n.openBlock(),n.createBlock(n.unref(r.Select),{modelValue:s.value,"onUpdate:modelValue":t[0]||(t[0]=e=>s.value=e),itemsSource:l.value,keyProp:"id",displayProp:"text",width:148,useFilter:!1},null,8,["modelValue","itemsSource"]))}}),[["__scopeId","data-v-051cc7c3"]]),na={key:0,class:"options-panel-empty"},oa={key:1,class:"options-panel"},ia={class:"options-panel-header"},ra=["title"],aa={class:"col-type"},la={class:"options-group"},sa={class:"options-section"},ua={class:"inline-controls-row"},ca={class:"inline-control"},da={class:"inline-control"},ha={class:"options-group options-group-header"},pa={class:"inline-controls-row"},fa={class:"inline-control"},ga={class:"inline-control"},va={class:"inline-control"},ma={class:"color-section"},ya={class:"color-section"},xa={class:"options-group options-group-cell"},_a={class:"options-section"},wa={class:"inline-controls-row"},ba={class:"inline-control"},Sa={class:"inline-control"},Ca={class:"inline-control"},Ma={class:"color-section"},Ta={class:"color-section"},Ia={class:"options-panel-footer"},ka=p(n.defineComponent({__name:"ColumnOptionsPanel",props:{column:{},presetGroups:{},cellFmt:{},headerFmt:{}},emits:["update-header","update-align","update-mask","update-pinned","update-width","reset-column"],setup(e,{emit:t}){const o=[{value:"left",label:"왼쪽"},{value:"none",label:"없음"},{value:"right",label:"오른쪽"}],i=e,a=t,l=n.ref(""),s=n.ref(0);n.watch(()=>i.column,e=>{e&&(l.value=e.header??e.id,s.value=Math.round(100*e.width)/100)},{immediate:!0});const u=n.computed(()=>{var e;const t=null==(e=i.column)?void 0:e.type;return"number"===t?"right":"boolean"===t?"center":"left"});function c(){if(!i.column)return;const e=l.value.trim()||i.column.id;a("update-header",i.column.id,e)}function d(e){i.column&&a("update-align",i.column.id,e)}function h(e){i.column&&a("update-mask",i.column.id,e)}function p(){if(!i.column)return;const e=Number(s.value);!Number.isFinite(e)||e<40?s.value=i.column.width:a("update-width",i.column.id,e)}const f={},g={},v=n.computed(()=>i.cellFmt??f),m=n.computed(()=>i.headerFmt??g),y=n.computed({get:()=>{var e;return m.value.textAlign??(null==(e=i.column)?void 0:e.align)??u.value},set:e=>{m.value.textAlign=e}});return(t,f)=>e.column?(n.openBlock(),n.createElementBlock("div",oa,[n.createElementVNode("header",ia,[n.createElementVNode("div",{class:"col-id",title:e.column.id},n.toDisplayString(e.column.id),9,ra),n.createElementVNode("div",aa,n.toDisplayString(e.column.type??"string"),1)]),n.createElementVNode("div",la,[f[21]||(f[21]=n.createElementVNode("div",{class:"options-group-title"},"공통",-1)),n.createElementVNode("section",sa,[f[18]||(f[18]=n.createElementVNode("label",{class:"options-label"},"헤더 라벨",-1)),n.createVNode(n.unref(r.Input),{modelValue:l.value,"onUpdate:modelValue":f[0]||(f[0]=e=>l.value=e),placeholder:e.column.id,width:"100%",onBlur:c,onEnter:c},null,8,["modelValue","placeholder"])]),n.createElementVNode("div",ua,[n.createElementVNode("div",ca,[f[19]||(f[19]=n.createElementVNode("span",{class:"inline-control-label"},"고정",-1)),n.createVNode(n.unref(r.Radio),{modelValue:e.column.pinned,itemsSource:o,variant:"segment","onUpdate:modelValue":f[1]||(f[1]=e=>{return t=e,void(i.column&&a("update-pinned",i.column.id,t));var t})},null,8,["modelValue"])]),n.createElementVNode("div",da,[f[20]||(f[20]=n.createElementVNode("span",{class:"inline-control-label"},"너비 (px)",-1)),n.createVNode(n.unref(r.NumberInput),{modelValue:s.value,"onUpdate:modelValue":f[2]||(f[2]=e=>s.value=e),min:40,step:10,width:160,onChange:p},null,8,["modelValue"])])])]),n.createElementVNode("div",ha,[f[27]||(f[27]=n.createElementVNode("div",{class:"options-group-title"},"헤더",-1)),n.createElementVNode("div",pa,[n.createElementVNode("div",fa,[f[22]||(f[22]=n.createElementVNode("span",{class:"inline-control-label"},"정렬",-1)),n.createVNode(Hr,{modelValue:y.value,"onUpdate:modelValue":f[3]||(f[3]=e=>y.value=e)},null,8,["modelValue"])]),n.createElementVNode("div",ga,[f[23]||(f[23]=n.createElementVNode("span",{class:"inline-control-label"},"글자 스타일",-1)),n.createVNode(ea,{fontWeight:m.value.fontWeight,"onUpdate:fontWeight":f[4]||(f[4]=e=>m.value.fontWeight=e),fontStyle:m.value.fontStyle,"onUpdate:fontStyle":f[5]||(f[5]=e=>m.value.fontStyle=e),textDecoration:m.value.textDecoration,"onUpdate:textDecoration":f[6]||(f[6]=e=>m.value.textDecoration=e)},null,8,["fontWeight","fontStyle","textDecoration"])]),n.createElementVNode("div",va,[f[24]||(f[24]=n.createElementVNode("span",{class:"inline-control-label"},"글자 크기",-1)),n.createVNode(ta,{modelValue:m.value.fontSize,"onUpdate:modelValue":f[7]||(f[7]=e=>m.value.fontSize=e)},null,8,["modelValue"])])]),n.createElementVNode("div",ma,[f[25]||(f[25]=n.createElementVNode("div",{class:"color-section-title"},"배경 색상",-1)),n.createVNode($r,{modelValue:m.value.backgroundColor,"onUpdate:modelValue":f[8]||(f[8]=e=>m.value.backgroundColor=e),type:"background"},null,8,["modelValue"])]),n.createElementVNode("div",ya,[f[26]||(f[26]=n.createElementVNode("div",{class:"color-section-title"},"텍스트 색상",-1)),n.createVNode($r,{modelValue:m.value.color,"onUpdate:modelValue":f[9]||(f[9]=e=>m.value.color=e),type:"text"},null,8,["modelValue"])])]),n.createElementVNode("div",xa,[f[34]||(f[34]=n.createElementVNode("div",{class:"options-group-title"},"셀",-1)),n.createElementVNode("section",_a,[f[28]||(f[28]=n.createElementVNode("label",{class:"options-label"},"표시 형식 (마스크)",-1)),n.createVNode(Yr,{modelValue:e.column.mask,"preset-groups":e.presetGroups,"onUpdate:modelValue":h},null,8,["modelValue","preset-groups"])]),n.createElementVNode("div",wa,[n.createElementVNode("div",ba,[f[29]||(f[29]=n.createElementVNode("span",{class:"inline-control-label"},"정렬",-1)),n.createVNode(Hr,{modelValue:e.column.align??u.value,"onUpdate:modelValue":d},null,8,["modelValue"])]),n.createElementVNode("div",Sa,[f[30]||(f[30]=n.createElementVNode("span",{class:"inline-control-label"},"글자 스타일",-1)),n.createVNode(ea,{fontWeight:v.value.fontWeight,"onUpdate:fontWeight":f[10]||(f[10]=e=>v.value.fontWeight=e),fontStyle:v.value.fontStyle,"onUpdate:fontStyle":f[11]||(f[11]=e=>v.value.fontStyle=e),textDecoration:v.value.textDecoration,"onUpdate:textDecoration":f[12]||(f[12]=e=>v.value.textDecoration=e)},null,8,["fontWeight","fontStyle","textDecoration"])]),n.createElementVNode("div",Ca,[f[31]||(f[31]=n.createElementVNode("span",{class:"inline-control-label"},"글자 크기",-1)),n.createVNode(ta,{modelValue:v.value.fontSize,"onUpdate:modelValue":f[13]||(f[13]=e=>v.value.fontSize=e)},null,8,["modelValue"])])]),n.createElementVNode("div",Ma,[f[32]||(f[32]=n.createElementVNode("div",{class:"color-section-title"},"배경 색상",-1)),n.createVNode($r,{modelValue:v.value.backgroundColor,"onUpdate:modelValue":f[14]||(f[14]=e=>v.value.backgroundColor=e),type:"background"},null,8,["modelValue"])]),n.createElementVNode("div",Ta,[f[33]||(f[33]=n.createElementVNode("div",{class:"color-section-title"},"텍스트 색상",-1)),n.createVNode($r,{modelValue:v.value.color,"onUpdate:modelValue":f[15]||(f[15]=e=>v.value.color=e),type:"text"},null,8,["modelValue"])])]),n.createElementVNode("footer",Ia,[n.createElementVNode("button",{type:"button",class:"reset-btn",onClick:f[16]||(f[16]=e=>a("reset-column"))}," 이 컬럼 초기화 ")])])):(n.openBlock(),n.createElementBlock("div",na,[...f[17]||(f[17]=[n.createElementVNode("p",null,[n.createTextVNode("좌측에서 컬럼을 선택하면"),n.createElementVNode("br"),n.createTextVNode("여기에 옵션이 표시됩니다.")],-1)])]))}}),[["__scopeId","data-v-56659903"]]),Da={class:"column-settings-actions"},Na=["disabled"],Ea={class:"column-settings-body"},Aa={key:0,class:"column-options-pane"},La=p(n.defineComponent({__name:"ColumnSettings",props:{isShow:{type:Boolean,default:!1},keyFields:{default:()=>[]},storageKey:{default:void 0},useColumnOptions:{type:Boolean,default:!0}},setup(e,{expose:t}){const o=e,{isShow:i,useColumnOptions:a}=n.toRefs(o),l=r.useMozLocale(),s=n.computed(()=>a.value?840:360),u=n.inject(z,n.ref(null)),c=n.ref(!1),d=n.ref(),h=n.computed(()=>c.value),{columns:p,selectedId:f,selectedColumn:g,isAllVisible:v,isIndeterminate:m,setAllVisible:y,toggleVisibility:x,dragSrcIndex:_,dropTargetIndex:w,onDragStart:b,onDragOver:S,onDrop:C,onDragEnd:M,hasChanges:T,reset:I}=Nr(u,{isOpen:h}),k=n.computed({get:()=>v.value,set:e=>y(e)});function D(e){y(e)}const N=[{label:"없음",presets:[{id:"none",label:"마스크 없음",description:"원본 값 그대로 표시",mask:null}]},{label:"숫자",presets:[{id:"number-thousand",label:"천 단위 구분 (1,234)",description:"예: 1234 → 1,234",mask:{type:"numeric",pattern:"#,###"}},{id:"number-decimal-2",label:"소수 2자리 (#,##0.00)",description:"예: 1234.5 → 1,234.50",mask:{type:"numeric",pattern:"#,##0.00"}},{id:"currency-krw",label:"원화 (₩1,234)",description:"예: 1234 → ₩1,234",mask:{type:"numeric",pattern:"#,###",prefix:"₩"}},{id:"currency-usd",label:"달러 ($1,234.00)",description:"예: 1234.5 → $1,234.50",mask:{type:"numeric",pattern:"#,##0.00",prefix:"$"}},{id:"percent",label:"퍼센트 (12%)",description:"예: 12 → 12%",mask:{type:"numeric",pattern:"#,##0",suffix:"%"}}]},{label:"날짜",presets:[{id:"date-iso",label:"YYYY-MM-DD",description:"예: 2026-05-26",mask:{type:"date",pattern:"YYYY-MM-DD"}},{id:"date-ko",label:"YYYY년 MM월 DD일",description:"예: 2026년 05월 26일",mask:{type:"date",pattern:"YYYY년 MM월 DD일"}},{id:"datetime-iso",label:"YYYY-MM-DD HH:mm",description:"예: 2026-05-26 14:30",mask:{type:"date",pattern:"YYYY-MM-DD HH:mm"}},{id:"date-us",label:"MM/DD/YYYY",description:"예: 05/26/2026",mask:{type:"date",pattern:"MM/DD/YYYY"}}]},{label:"문자열",presets:[{id:"phone-kr",label:"전화번호 (010-1234-5678)",description:"예: 01012345678 → 010-1234-5678",mask:{type:"string",pattern:"000-0000-0000"}},{id:"rrn",label:"주민등록번호 (000000-0000000)",description:"예: 9501011234567 → 950101-1234567",mask:{type:"string",pattern:"000000-0000000"}},{id:"biz-num",label:"사업자등록번호 (000-00-00000)",description:"예: 1234567890 → 123-45-67890",mask:{type:"string",pattern:"000-00-00000"}}]}],E=Vr(u,{storageKey:o.storageKey});function A(e){S(e,d.value)}function L(e,t){var n;null==(n=u.value)||n.columns.update(e,{header:t})}function V(e,t){var n;null==(n=u.value)||n.columns.update(e,{align:t})}function O(e,t){var n;null==(n=u.value)||n.columns.update(e,{mask:t??void 0})}function P(e,t){const n=u.value;n&&("left"===t?n.columns.pinLeft(e):"right"===t?n.columns.pinRight(e):n.columns.unpin(e))}function B(e,t){var n;null==(n=u.value)||n.columns.setWidth(e,t)}const R=n.computed(()=>f.value?E.getCellFmt(f.value):null),F=n.computed(()=>f.value?E.getHeaderFmt(f.value):null);function G(){if(!f.value)return;const e=u.value;e&&(e.columns.reset(f.value),E.clearStyle(f.value))}function H(){I(),E.clearAll()}return n.watch(i,e=>{c.value=!!e}),t({show:function(){c.value=!0},hide:function(){c.value=!1}}),(e,t)=>(n.openBlock(),n.createBlock(n.unref(r.Popup),{visible:c.value,"onUpdate:visible":t[3]||(t[3]=e=>c.value=e),title:"컬럼 옵션",preset:"no-footer",width:s.value,onCancel:()=>c.value=!1},{default:n.withCtx(()=>[n.createElementVNode("div",Da,[n.createVNode(n.unref(r.CheckBox),{modelValue:k.value,"onUpdate:modelValue":t[0]||(t[0]=e=>k.value=e),indeterminate:n.unref(m),label:n.unref(l).Grid.selectAll,onChange:D},null,8,["modelValue","indeterminate","label"]),n.createElementVNode("button",{type:"button",class:n.normalizeClass(["reset-all-button",{disabled:!n.unref(T)}]),disabled:!n.unref(T),onClick:H},n.toDisplayString(n.unref(l).Grid.reset),11,Na)]),n.createElementVNode("div",Ea,[n.createElementVNode("div",{ref_key:"listRef",ref:d,class:"column-list-panel",onDragover:A,onDrop:t[1]||(t[1]=(...e)=>n.unref(C)&&n.unref(C)(...e)),onDragend:t[2]||(t[2]=(...e)=>n.unref(M)&&n.unref(M)(...e))},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(p),(e,t)=>(n.openBlock(),n.createBlock(Rr,{key:e.id,column:e,"is-selected":n.unref(f)===e.id,"is-dragging":n.unref(_)===t,"is-drop-target":n.unref(w)===t&&null!==n.unref(_)&&n.unref(_)!==t,onSelect:t=>f.value=e.id,onToggleVisibility:t=>n.unref(x)(e.id,t),onDragstart:e=>n.unref(b)(e,t)},null,8,["column","is-selected","is-dragging","is-drop-target","onSelect","onToggleVisibility","onDragstart"]))),128))],544),n.unref(a)?(n.openBlock(),n.createElementBlock("div",Aa,[n.createVNode(ka,{column:n.unref(g),"preset-groups":n.unref(N),"cell-fmt":R.value,"header-fmt":F.value,onUpdateHeader:L,onUpdateAlign:V,onUpdateMask:O,onUpdatePinned:P,onUpdateWidth:B,onResetColumn:G},null,8,["column","preset-groups","cell-fmt","header-fmt"])])):n.createCommentVNode("",!0)])]),_:1},8,["visible","width","onCancel"]))}}),[["__scopeId","data-v-30577646"]]),Va={class:"column-picker-actions"},Oa=["onDragstart"],Pa=n.defineComponent({__name:"ColumnPicker",props:{isShow:{type:Boolean,default:!1},dataKey:{default:()=>[]},keyFields:{default:()=>[]}},setup(e,{expose:t}){const o=r.useMozLocale(),i=e,{isShow:a}=n.toRefs(i),l=n.inject(z,n.ref(null)),s=n.ref(!1),u=n.ref([]),c=jn(e=>e.columnStates,[],l),d=n.computed(()=>{const e=null==l?void 0:l.value;if(!e||0===c.value.length)return[];const t=e.columns.getMap();return[...c.value].filter(e=>!e.id.startsWith("_")).sort((e,t)=>e.order-t.order).map(e=>{const n=t.find(t=>t.id===e.id);return{id:e.id,visible:e.visible,order:e.order,header:(null==n?void 0:n.header)??e.id}})}),h=n.computed(()=>d.value),p=n.ref(!1),f=()=>{if(0===h.value.length)return void(p.value=!1);const e=h.value.filter(e=>e.visible).length;p.value=e===h.value.length},g=n.ref(!1),v=()=>{if(!(null==l?void 0:l.value)||0===u.value.length)return void(g.value=!1);const e=l.value.columns.getMap();g.value=u.value.some(t=>{const n=e.find(e=>e.id===t.id);return!n||(n.visible!==t.visible||n.order!==t.order)})},m=e=>["column-picker-item",{"is-dragging":x.value===e},{"drop-target":_.value===e&&null!==x.value&&x.value!==e}];n.watch(()=>s.value,e=>{if(e&&(null==l?void 0:l.value)){const e=l.value.columns.getMap();u.value=e.filter(e=>!e.id.startsWith("_")).map(e=>({id:e.id,visible:e.visible,order:e.order})),f(),v()}});const y=e=>{(null==l?void 0:l.value)&&(h.value.forEach(t=>{var n;null==(n=l.value)||n.columns.setHidden(t.id,!e)}),f(),v())},x=n.ref(null),_=n.ref(null),w=n.ref(),b=e=>{if(null===x.value)return;e.preventDefault();const t=w.value;if(!t)return;const n=t.querySelectorAll(".column-picker-item");let o=0,i=1/0;for(let r=0;r<n.length;r++){const t=n[r].getBoundingClientRect(),a=t.left+t.width/2,l=t.top+t.height/2,s=Math.hypot(e.clientX-a,e.clientY-l);s<i&&(i=s,o=r)}_.value=o},S=e=>{if(e.preventDefault(),null===x.value||null===_.value)return;const t=x.value,n=_.value;if(t!==n&&(null==l?void 0:l.value)){const e=d.value.map(e=>e.id),[o]=e.splice(t,1);e.splice(n,0,o),l.value.columns.setOrder(e)}x.value=null,_.value=null,v()},C=()=>{x.value=null,_.value=null};return n.watch([a],()=>{a.value?s.value=!0:s.value=!1}),t({show:()=>{s.value=!0},hide:()=>{s.value=!1}}),(e,t)=>(n.openBlock(),n.createBlock(n.unref(r.Popup),{visible:s.value,"onUpdate:visible":t[2]||(t[2]=e=>s.value=e),title:n.unref(o).Grid.contextColumnPicker,preset:"no-footer",onCancel:()=>s.value=!1},{default:n.withCtx(()=>[n.createElementVNode("div",Va,[n.createVNode(n.unref(r.CheckBox),{modelValue:p.value,"onUpdate:modelValue":t[0]||(t[0]=e=>p.value=e),label:n.unref(o).Grid.selectAll,onChange:y},null,8,["modelValue","label"]),n.createElementVNode("div",{class:n.normalizeClass(["reset-button",{disabled:!g.value}]),onClick:t[1]||(t[1]=e=>g.value&&(()=>{if(!(null==l?void 0:l.value))return;u.value.forEach(e=>{var t;null==(t=l.value)||t.columns.setHidden(e.id,!e.visible)});const e=[...u.value].sort((e,t)=>e.order-t.order).map(e=>e.id);l.value.columns.setOrder(e),f(),v()})())},n.toDisplayString(n.unref(o).Grid.reset),3)]),n.createElementVNode("div",{ref_key:"listRef",ref:w,class:"column-picker",onDragover:b,onDrop:S,onDragend:C},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(d.value,(e,o)=>(n.openBlock(),n.createElementBlock("div",{key:e.id,class:n.normalizeClass(m(o)),draggable:"true",onDragstart:e=>((e,t)=>{x.value=t,e.dataTransfer&&(e.dataTransfer.setData("text/plain",String(t)),e.dataTransfer.effectAllowed="move")})(e,o)},[t[3]||(t[3]=n.createElementVNode("span",{class:"column-picker-drag-handle"},"⠿",-1)),n.createVNode(n.unref(r.CheckBox),{modelValue:e.visible,label:e.header,"onUpdate:modelValue":t=>((e,t)=>{const n=null==l?void 0:l.value;n&&(n.columns.setHidden(e,!t),f(),v())})(e.id,t)},null,8,["modelValue","label","onUpdate:modelValue"])],42,Oa))),128))],544)]),_:1},8,["visible","title","onCancel"]))}}),Ba=p(Pa,[["__scopeId","data-v-0431327e"]]),Ra={class:"extend-pivot-grid-tool-container"},za={class:"extend-grid-tool-left-section"},Fa={class:"extend-grid-tool-setup-wrapper"},Ga={class:"extend-grid-tool-badge-wrapper"},Ha={key:0,class:"extend-grid-tool-items-wrapper"},Wa={key:0,class:"extend-grid-tool-separator"},Ua=p(n.defineComponent({__name:"PivotToolBox",props:{useToolBoxSetting:{type:Boolean,default:!0},useFilter:{type:Boolean,default:!0},useSort:{type:Boolean,default:!0},useCustomCell:{type:Boolean,default:!0},useChart:{type:Boolean,default:!1},chartActive:{type:Boolean,default:!1},itemsLength:{default:0},optionModalState:{type:Boolean,default:!1},filterCount:{},sortCount:{},customCellCount:{}},emits:["click:setting","click:filter","click:sort","click:customCell","click:resetAll","click:chart","change-search-value"],setup(e,{expose:t,emit:o}){const i=e,{itemsLength:a,useToolBoxSetting:l,useFilter:s,useSort:u,useCustomCell:c}=n.toRefs(i),d=o,h=n.inject(W,void 0),p=n.inject(U,void 0),f=n.inject(Y,void 0),g=r.useMozLocale(),v=n.ref(!0),m=n.ref(""),y=n.computed(()=>i.filterCount??(null==h?void 0:h.filterList.value.length)??0),x=n.computed(()=>i.sortCount??(null==p?void 0:p.sortList.value.length)??0),_=n.computed(()=>i.customCellCount??(null==f?void 0:f.config.value.ruleSets.length)??0),w=()=>{d("click:setting")},b=()=>{0!==a.value&&(null==h||h.showFilterHandler(),d("click:filter"))},S=()=>{0!==a.value&&(null==p||p.showSortHandler(),d("click:sort"))},C=()=>{0!==a.value&&(null==f||f.showCustomCellHandler(),d("click:customCell"))},M=()=>{null==h||h.clearFilter(),null==p||p.clearSort(),null==f||f.clearCustomCell(),d("click:resetAll")},T=(e,t=!1)=>a.value||t?e?"#4568E0":"#8998B5":"#A7B1BC",I=n.ref(!1),k=n.computed(()=>a.value?0===y.value&&0===x.value&&0===_.value?"#A7B1BC":I.value?"#4568E0":"#8998B5":"#A7B1BC"),D=()=>{a.value&&(y.value>0||x.value>0||_.value>0)&&(I.value=!0)},N=()=>{I.value=!1};return n.watch(m,e=>{d("change-search-value",e)}),t({isToolBoxExpanded:v}),(t,o)=>{const i=n.resolveDirective("tooltip");return n.openBlock(),n.createElementBlock(n.Fragment,null,[n.withDirectives(n.createElementVNode("div",Ra,[n.createElementVNode("div",za,[n.renderSlot(t.$slots,"tool-left",{},void 0,!0)]),n.createElementVNode("div",Fa,[n.createElementVNode("div",Ga,[n.renderSlot(t.$slots,"tool-items",{props:{disabled:!n.unref(a),hasItem:!!n.unref(a)}},void 0,!0),n.unref(l)?(n.openBlock(),n.createElementBlock("div",Ha,[n.withDirectives((n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["extend-grid-tool-items-wrapper",{disabled:!n.unref(a)}]),style:{position:"relative"}},[n.createElementVNode("div",{class:n.normalizeClass({"extend-grid-tool-badge-item-wrapper":!0,"extend-grid-tool-disabled":!1,"is-active":e.optionModalState,"pivot-grid-setting-btn":!0}),onClick:w},[n.createVNode(n.unref(vn),{color:T(e.optionModalState,!0),class:n.normalizeClass({"extend-grid-tool-disabled":!1}),width:16,height:16},null,8,["color"])],2)],2)),[[i,{text:n.unref(g).Grid.layoutSetting,position:["center","toBottom, 4px"]}]]),n.renderSlot(t.$slots,"optionPopup",{},void 0,!0)])):n.createCommentVNode("",!0),n.unref(s)?n.withDirectives((n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(["extend-grid-tool-items-wrapper",{disabled:!n.unref(a)}])},[n.createElementVNode("div",{class:n.normalizeClass({"extend-grid-tool-badge-item-wrapper":!0,"extend-grid-tool-disabled":!n.unref(a),"has-item":y.value}),onClick:b},[n.createVNode(n.unref(qt),{color:T(y.value),size:"16"},null,8,["color"])],2)],2)),[[i,{text:n.unref(g).Grid.filter,position:["center","toBottom, 4px"]}]]):n.createCommentVNode("",!0),n.unref(u)?n.withDirectives((n.openBlock(),n.createElementBlock("div",{key:2,class:n.normalizeClass(["extend-grid-tool-items-wrapper",{disabled:!n.unref(a)}])},[n.createElementVNode("div",{class:n.normalizeClass({"extend-grid-tool-badge-item-wrapper":!0,"extend-grid-tool-disabled":!n.unref(a),"has-item":x.value}),onClick:S},[n.createVNode(n.unref(Sn),{color:T(x.value),width:16,height:16},null,8,["color"])],2)],2)),[[i,{text:n.unref(g).Grid.sort,position:["center","toBottom, 4px"]}]]):n.createCommentVNode("",!0),n.unref(c)?n.withDirectives((n.openBlock(),n.createElementBlock("div",{key:3,class:n.normalizeClass(["extend-grid-tool-items-wrapper",{disabled:!n.unref(a)}])},[n.createElementVNode("div",{class:n.normalizeClass({"extend-grid-tool-badge-item-wrapper":!0,"extend-grid-tool-disabled":!n.unref(a),"has-item":_.value}),onClick:C},[n.createVNode(n.unref(Ot),{color:T(_.value),width:16,height:16},null,8,["color"])],2)],2)),[[i,{text:n.unref(g).Grid.customCellStyle,position:["center","toBottom, 4px"]}]]):n.createCommentVNode("",!0),e.useChart?n.withDirectives((n.openBlock(),n.createElementBlock("div",{key:4,class:n.normalizeClass(["extend-grid-tool-items-wrapper",{disabled:!n.unref(a)}])},[n.createElementVNode("div",{class:n.normalizeClass({"extend-grid-tool-badge-item-wrapper":!0,"extend-grid-tool-disabled":!n.unref(a),"is-active":e.chartActive}),onClick:o[0]||(o[0]=e=>d("click:chart"))},[n.createVNode(n.unref(yt),{color:T(e.chartActive),class:n.normalizeClass({"extend-grid-tool-disabled":!n.unref(a)}),width:16,height:16},null,8,["color","class"])],2)],2)),[[i,{text:"차트",position:["center","toBottom, 4px"]}]]):n.createCommentVNode("",!0),n.unref(s)||n.unref(u)?n.withDirectives((n.openBlock(),n.createElementBlock("div",{key:5,class:n.normalizeClass(["extend-grid-tool-items-wrapper toolbox-reset-all",{disabled:!y.value&&!x.value&&!_.value||!n.unref(a)}])},[n.createElementVNode("div",{class:n.normalizeClass({"extend-grid-tool-badge-item-wrapper":!0,"extend-grid-tool-disabled":!y.value&&!x.value&&!_.value||!n.unref(a)}),onClick:M,onMousedown:D,onMouseup:N,onMouseleave:N},[n.createVNode(n.unref(ln),{color:k.value,width:16,height:16},null,8,["color"])],34)],2)),[[i,{text:n.unref(g).Grid.reset,position:["center","toBottom, 4px"]}]]):n.createCommentVNode("",!0),n.renderSlot(t.$slots,"tool-items-right",{props:{disabled:!n.unref(a),hasItem:!!n.unref(a)}},void 0,!0)]),n.unref(l)?(n.openBlock(),n.createElementBlock("div",Wa)):n.createCommentVNode("",!0),n.createVNode(io,{placeholder:n.unref(g).Grid.searchFilter,class:n.normalizeClass({"extend-grid-tool-search":!0}),modelValue:m.value,"onUpdate:modelValue":o[1]||(o[1]=e=>m.value=e),showSearchIcon:!0,isDisabled:!n.unref(a)},null,8,["placeholder","modelValue","isDisabled"]),n.createElementVNode("div",{class:"extend-grid-tool-toggle-icon-wrapper",onClick:o[2]||(o[2]=()=>{v.value=!v.value})},[n.createVNode(n.unref(dt))])])],512),[[n.vShow,v.value]]),n.withDirectives(n.createElementVNode("div",{class:"extend-grid-tool-toggle",onClick:o[3]||(o[3]=()=>{v.value=!v.value})},[n.createVNode(n.unref(dt),{style:{transform:"rotate(180deg)"}})],512),[[n.vShow,!v.value]])],64)}}}),[["__scopeId","data-v-8b425c4f"]]),Ya={class:"pivot-grid-context-menu-title-wrapper"},Za={class:"pivot-grid-context-menu-title"},Xa={style:{display:"flex",gap:"6px","align-items":"center"}},ja={style:{width:"1px",height:"10px","background-color":"rgba(186, 198, 212, 1)"}},$a={key:0},qa=["onClick"],Ka={key:1,class:"pivot-grid-option-section"},Ja={class:"pivot-grid-option-item"},Qa={class:"pivot-grid-option-item"},el={key:0,class:"pivot-grid-option-item"},tl={key:1,class:"context-menu-separator"},nl={key:2,class:"pivot-grid-option-item"},ol={key:3,class:"context-menu-separator"},il={key:2,class:"pivot-grid-option-section"},rl={class:"pivot-grid-option-item"},al={class:"pivot-grid-option-item"},ll={class:"pivot-grid-option-item"},sl={key:0,class:"pivot-grid-option-item"},ul={class:"pivot-grid-option-item"},cl=n.defineComponent({__name:"PivotOptionModal",props:n.mergeModels({valueFields:{default:()=>[]},rowFields:{default:()=>[]},columnFields:{default:()=>[]},showRowSubTotals:{type:Boolean,default:!1},showRowGrandTotals:{type:Boolean,default:!0},showColumnSubTotals:{type:Boolean,default:!1},showColumnGrandTotals:{type:Boolean,default:!0},rowSubTotalFields:{},columnSubTotalFields:{},totalsBeforeData:{type:Boolean,default:!1},showZeros:{type:Boolean,default:!1},rowCollapsible:{type:Boolean,default:!0},columnCollapsible:{type:Boolean,default:!0}},{footerVisible:{type:Boolean,default:!0},footerVisibleModifiers:{}}),emits:n.mergeModels(["click:fieldPanel","update:gridSettings","update:valueField"],["update:footerVisible"]),setup(e,{expose:t,emit:o}){var i,a,l,u,c;const d=e,h=o,p=r.useMozLocale(),f=n.computed(()=>p.value.GridPivot),g={top:-2,left:0,useTeleport:!0},v=n.ref(),m=n.ref([{template:"mainSetting",hover:!1}]),y=n.useModel(e,"footerVisible"),x=n.ref("Main");function _(e,t){return e&&t?"subtotals":t?"grandTotals":"none"}function w(e){switch(e){case"none":return{sub:!1,grand:!1};case"grandTotals":return{sub:!1,grand:!0};case"subtotals":return{sub:!0,grand:!0}}}const b=n.ref(_(d.showRowSubTotals,d.showRowGrandTotals)),S=n.ref(_(d.showColumnSubTotals,d.showColumnGrandTotals)),C=n.computed(()=>d.rowFields.slice(0,-1).map(e=>e.field)),M=n.ref(void 0===d.rowSubTotalFields?[...C.value]:[...d.rowSubTotalFields]),T=n.computed(()=>C.value.length>0&&M.value.length===C.value.length),I=n.computed(()=>d.columnFields.slice(0,-1).map(e=>e.field)),k=n.ref(void 0===d.columnSubTotalFields?[...I.value]:[...d.columnSubTotalFields]),D=n.computed(()=>I.value.length>0&&k.value.length===I.value.length),N=n.ref(d.totalsBeforeData),E=n.ref(d.showZeros),A=n.ref(d.rowCollapsible),L=n.ref(d.columnCollapsible);n.watch(()=>[d.showRowSubTotals,d.showRowGrandTotals],()=>{b.value=_(d.showRowSubTotals,d.showRowGrandTotals)}),n.watch(()=>[d.showColumnSubTotals,d.showColumnGrandTotals],()=>{S.value=_(d.showColumnSubTotals,d.showColumnGrandTotals)}),n.watch([()=>d.rowSubTotalFields,C],()=>{M.value=void 0===d.rowSubTotalFields?[...C.value]:[...d.rowSubTotalFields]}),n.watch([()=>d.columnSubTotalFields,I],()=>{k.value=void 0===d.columnSubTotalFields?[...I.value]:[...d.columnSubTotalFields]}),n.watch(()=>d.totalsBeforeData,e=>{N.value=e}),n.watch(()=>d.showZeros,e=>{E.value=e}),n.watch(()=>d.rowCollapsible,e=>{A.value=e}),n.watch(()=>d.columnCollapsible,e=>{L.value=e}),n.watch([b,S,M,k,N,E,A,L],()=>{if(function(){const e=void 0===d.rowSubTotalFields?C.value:d.rowSubTotalFields,t=void 0===d.columnSubTotalFields?I.value:d.columnSubTotalFields;return b.value===_(d.showRowSubTotals,d.showRowGrandTotals)&&S.value===_(d.showColumnSubTotals,d.showColumnGrandTotals)&&N.value===d.totalsBeforeData&&E.value===d.showZeros&&A.value===d.rowCollapsible&&L.value===d.columnCollapsible&&M.value.join(" ")===e.join(" ")&&k.value.join(" ")===t.join(" ")}())return;const e=w(b.value),t=w(S.value);h("update:gridSettings",{showRowSubTotals:e.sub,showRowGrandTotals:e.grand,showColumnSubTotals:t.sub,showColumnGrandTotals:t.grand,rowSubTotalFields:T.value?void 0:[...M.value],columnSubTotalFields:D.value?void 0:[...k.value],totalsBeforeData:N.value,showZeros:E.value,rowCollapsible:A.value,columnCollapsible:L.value})},{deep:!0});const V=n.computed(()=>d.valueFields.length>0);function O(e){return s.getValueFieldKey(e,d.valueFields)}const P=n.ref(d.valueFields[0]?O(d.valueFields[0]):""),B=n.ref((null==(i=d.valueFields[0])?void 0:i.aggregate)??"sum"),R=n.ref((null==(a=d.valueFields[0])?void 0:a.showValueAs)??"none"),z=n.ref(Q(d.valueFields[0])),F=n.ref((null==(u=null==(l=d.valueFields[0])?void 0:l.decimalFormat)?void 0:u.mode)??"round"),G=n.ref((null==(c=d.valueFields[0])?void 0:c.showOriginalValue)??!1);function H(e){var t;e&&(P.value=O(e),B.value=e.aggregate??"sum",R.value=e.showValueAs??"none",z.value=Q(e),F.value=(null==(t=e.decimalFormat)?void 0:t.mode)??"round",G.value=e.showOriginalValue??!1)}function W(){const e=d.valueFields.find(e=>O(e)===P.value);e&&H(e)}n.watch(()=>d.valueFields,e=>{if(0===e.length)return;H(e.find(e=>O(e)===P.value)??e[0])},{deep:!0}),n.watch([B,R,z,F,G],()=>{if(!P.value)return;const e=d.valueFields.find(e=>O(e)===P.value);if(e&&function(e){var t;return B.value===(e.aggregate??"sum")&&R.value===(e.showValueAs??"none")&&z.value===Q(e)&&F.value===((null==(t=e.decimalFormat)?void 0:t.mode)??"round")&&G.value===(e.showOriginalValue??!1)}(e))return;const t=K[z.value],n={aggregate:B.value,showValueAs:R.value,showOriginalValue:"none"!==R.value&&G.value};t&&(t.decimalFormat?n.decimalFormat={...t.decimalFormat,mode:F.value}:n.decimalFormat=t.decimalFormat,n.useThousandsSeparator=t.useThousandsSeparator,t.formatter?n.mask={type:"function",formatter:t.formatter}:n.mask=void 0),h("update:valueField",{field:P.value,changes:n})});const U=n.computed(()=>{const e=f.value;return[{itemValue:"none",itemName:e.none??"없음"},{itemValue:"grandTotals",itemName:e.grandtotal??"합계"},{itemValue:"subtotals",itemName:e.subtotal??"부분합"}]}),Y=n.computed(()=>d.rowFields.slice(0,-1).map(e=>({itemValue:e.field,itemName:e.header??e.field}))),Z=n.computed(()=>d.columnFields.slice(0,-1).map(e=>({itemValue:e.field,itemName:e.header??e.field}))),X=n.computed(()=>d.valueFields.map(e=>({itemValue:O(e),itemName:e.header??e.field}))),j=n.computed(()=>{const e=f.value;return[{itemValue:"sum",itemName:e.sum??"합계"},{itemValue:"count",itemName:e.count??"개수"},{itemValue:"avg",itemName:e.average??"평균"},{itemValue:"max",itemName:e.max??"최대값"},{itemValue:"min",itemName:e.min??"최소값"},{itemValue:"range",itemName:e.range??"범위"},{itemValue:"stdev",itemName:e.std??"표준 편차"},{itemValue:"variance",itemName:e.var??"분산"},{itemValue:"stdevPop",itemName:e.stdPop??"모집단 표준 편차"},{itemValue:"variancePop",itemName:e.varPop??"모집단 분산"},{itemValue:"countNumbers",itemName:e.cntAll??"숫자 개수"},{itemValue:"first",itemName:e.showFirstValue??"첫번째 값"},{itemValue:"last",itemName:e.showLastValue??"마지막 값"}]}),$=n.computed(()=>{const e=f.value;return[{itemValue:"none",itemName:e.noCalculation??"계산 없음"},{itemValue:"differenceFromPrevRow",itemName:e.diffRow??"이전 행과의 차이"},{itemValue:"percentDifferenceFromPrevRow",itemName:e.diffRowPct??"이전 행과의 차이(%)"},{itemValue:"differenceFromPrevCol",itemName:e.diffCol??"이전 열과의 차이"},{itemValue:"percentDifferenceFromPrevCol",itemName:e.diffColPct??"이전 열과의 차이(%)"},{itemValue:"percentOfGrandTotal",itemName:e.grandtotalPct??"총 합계(%)"},{itemValue:"percentOfRowTotal",itemName:e.rowTotalPct??"행 합계(%)"},{itemValue:"percentOfColumnTotal",itemName:e.colTotalPct??"열 합계(%)"},{itemValue:"percentOfPrevRow",itemName:e.prevRowPct??"이전 행(%)"},{itemValue:"percentOfPrevCol",itemName:e.prevColPct??"이전 열(%)"},{itemValue:"runningTotal",itemName:e.runTot??"누적 합계"},{itemValue:"percentOfRunningTotal",itemName:e.runTotPct??"누적 합계(%)"},{itemValue:"percentOfParentRow",itemName:e.parentRowPct??"상위 행 그룹(%)"},{itemValue:"percentOfParentCol",itemName:e.parentColPct??"상위 열 그룹(%)"},{itemValue:"rankAsc",itemName:e.rankAsc??"오름차순 순위"},{itemValue:"rankDesc",itemName:e.rankDesc??"내림차순 순위"},{itemValue:"index",itemName:e.index??"인덱스"}]}),q=n.computed(()=>{const e=f.value;return[{itemValue:"round",itemName:e.roundingRound??"반올림"},{itemValue:"floor",itemName:e.roundingFloor??"내림"},{itemValue:"ceil",itemName:e.roundingCeil??"올림"},{itemValue:"truncate",itemName:e.roundingTruncate??"절삭"}]}),K={general:{decimalFormat:void 0,useThousandsSeparator:!0},integer:{decimalFormat:{maximumFractionDigits:0},useThousandsSeparator:!0},float:{decimalFormat:{minimumFractionDigits:2,maximumFractionDigits:2},useThousandsSeparator:!0},currency:{decimalFormat:{maximumFractionDigits:0},useThousandsSeparator:!0,formatter:e=>null!=e?`₩${Number(e).toLocaleString()}`:""},percentage:{decimalFormat:{maximumFractionDigits:0},useThousandsSeparator:!1,formatter:e=>null!=e?`${Number(e)}%`:""},percentageDot2:{decimalFormat:{minimumFractionDigits:2,maximumFractionDigits:2},useThousandsSeparator:!1,formatter:e=>null!=e?`${Number(e).toFixed(2)}%`:""},thousands:{decimalFormat:{minimumFractionDigits:2,maximumFractionDigits:2},useThousandsSeparator:!0,formatter:e=>null!=e?`${(Number(e)/1e3).toFixed(2)}K`:""},millions:{decimalFormat:{minimumFractionDigits:2,maximumFractionDigits:2},useThousandsSeparator:!0,formatter:e=>null!=e?`${(Number(e)/1e6).toFixed(2)}M`:""},billions:{decimalFormat:{minimumFractionDigits:2,maximumFractionDigits:2},useThousandsSeparator:!0,formatter:e=>null!=e?`${(Number(e)/1e9).toFixed(2)}B`:""}},J=n.computed(()=>{const e=f.value;return[{itemValue:"general",itemName:e.generalFormat??"일반"},{itemValue:"integer",itemName:e.int??"정수"},{itemValue:"float",itemName:e.float??"소수"},{itemValue:"currency",itemName:e.currency??"통화"},{itemValue:"percentage",itemName:e.percentage??"백분율"},{itemValue:"percentageDot2",itemName:e.percentageDot2??"백분율(소수점 2)"},{itemValue:"thousands",itemName:e.thousands??"천 단위"},{itemValue:"millions",itemName:e.millions??"백만 단위"},{itemValue:"billions",itemName:e.billions??"10억 단위"}]});function Q(e){var t,n,o;if(!e)return"general";if("function"===(null==(t=e.mask)?void 0:t.type))return"general";const i=null==(n=e.decimalFormat)?void 0:n.maximumFractionDigits,r=(null==(o=e.decimalFormat)?void 0:o.minimumFractionDigits)??0;return 0===i&&!1!==e.useThousandsSeparator?"integer":null!=i&&r===i&&!1!==e.useThousandsSeparator?"float":"general"}const ee=()=>{x.value="Main"};return t({state:n.computed(()=>{var e;return null==(e=v.value)?void 0:e.state}),close:()=>{var e;null==(e=v.value)||e.close()},toggle:()=>{var e;null==(e=v.value)||e.state,n.nextTick(()=>{var e;null==(e=v.value)||e.toggle()})},open:()=>{n.nextTick(()=>{var e;null==(e=v.value)||e.toggle()})}}),(e,t)=>(n.openBlock(),n.createBlock(n.unref(r.ContextMenu),{ref_key:"contextMenuRef",ref:v,fixPosition:g,minWidth:"290px",itemSource:m.value,onClose:ee,class:"pivot-grid-context-menu"},{mainSetting:n.withCtx(({props:o})=>[n.createElementVNode("div",Ya,[n.createElementVNode("div",Za,n.toDisplayString("Main"===x.value?n.unref(p).Grid.layoutSetting??"레이아웃 설정":"")+" "+n.toDisplayString("Grid"===x.value?f.value.gridSetting??"그리드 설정":"")+" "+n.toDisplayString("Field"===x.value?f.value.fieldSetting??"값 필드 설정":""),1),n.createElementVNode("div",Xa,[n.withDirectives(n.createVNode(n.unref(r.Button),{class:"pivot-grid-context-menu-button",type:"icon",onClick:t[0]||(t[0]=()=>x.value="Main")},{default:n.withCtx(()=>[n.createVNode(n.unref(tt),{size:"12"})]),_:1},512),[[n.vShow,"Main"!==x.value]]),n.withDirectives(n.createElementVNode("div",ja,null,512),[[n.vShow,"Main"!==x.value]]),n.createVNode(n.unref(r.Button),{class:"pivot-grid-context-menu-button",type:"icon",onClick:o.close},{default:n.withCtx(()=>[n.createVNode(n.unref(At),{size:"12"})]),_:1},8,["onClick"])])]),t[28]||(t[28]=n.createElementVNode("div",{class:"context-menu-separator"},null,-1)),"Main"===x.value?(n.openBlock(),n.createElementBlock("div",$a,[n.createElementVNode("div",{class:"context-menu-item pivot-field-panel-btn",onClick:e=>function(e){e.close(),h("click:fieldPanel")}(o)},[n.createElementVNode("span",null,n.toDisplayString(f.value.setting??"필드 설정"),1),t[24]||(t[24]=n.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 16 16",fill:"none"},[n.createElementVNode("path",{d:"M3 4h10M3 8h10M3 12h10",stroke:"#8998B5","stroke-width":"1.4","stroke-linecap":"round"}),n.createElementVNode("circle",{cx:"6",cy:"4",r:"1.5",fill:"#4568E0"}),n.createElementVNode("circle",{cx:"10",cy:"8",r:"1.5",fill:"#4568E0"}),n.createElementVNode("circle",{cx:"6",cy:"12",r:"1.5",fill:"#4568E0"})],-1))],8,qa),t[25]||(t[25]=n.createElementVNode("div",{class:"context-menu-separator"},null,-1)),n.createElementVNode("div",{class:"context-menu-item",onClick:t[2]||(t[2]=()=>y.value=!y.value)},[n.createElementVNode("span",null,n.toDisplayString(n.unref(p).Grid.viewFooter),1),n.createVNode(n.unref(r.Toggle),{modelValue:y.value,"onUpdate:modelValue":t[1]||(t[1]=e=>y.value=e)},null,8,["modelValue"])]),n.renderSlot(e.$slots,"custom-options",{props:{...o}}),t[26]||(t[26]=n.createElementVNode("div",{class:"context-menu-separator"},null,-1)),n.createElementVNode("div",{class:"context-menu-item",onClick:t[3]||(t[3]=()=>x.value="Grid")},[n.createElementVNode("span",null,n.toDisplayString(f.value.gridSetting??"그리드 설정"),1),n.createVNode(n.unref(at),{size:"14"})]),V.value?(n.openBlock(),n.createElementBlock("div",{key:0,class:"context-menu-item",onClick:t[4]||(t[4]=()=>x.value="Field")},[n.createElementVNode("span",null,n.toDisplayString(f.value.fieldSetting??"값 필드 설정"),1),n.createVNode(n.unref(at),{size:"14"})])):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0),"Grid"===x.value?(n.openBlock(),n.createElementBlock("div",Ka,[n.createElementVNode("div",Ja,[n.createTextVNode(n.toDisplayString(f.value.showRowTotals??"행 합계 표시")+" ",1),n.createVNode(n.unref(r.Select),{width:160,modelValue:b.value,"onUpdate:modelValue":t[5]||(t[5]=e=>b.value=e),itemsSource:U.value,keyProp:"itemValue",displayProp:"itemName"},null,8,["modelValue","itemsSource"])]),n.createElementVNode("div",Qa,[n.createTextVNode(n.toDisplayString(f.value.showColumnTotals??"열 합계 표시")+" ",1),n.createVNode(n.unref(r.Select),{width:160,modelValue:S.value,"onUpdate:modelValue":t[6]||(t[6]=e=>S.value=e),itemsSource:U.value,keyProp:"itemValue",displayProp:"itemName"},null,8,["modelValue","itemsSource"])]),t[27]||(t[27]=n.createElementVNode("div",{class:"context-menu-separator"},null,-1)),"subtotals"===b.value&&Y.value.length>0?(n.openBlock(),n.createElementBlock("div",el,[n.createTextVNode(n.toDisplayString(f.value.subtotalCriteria??"소계 기준")+" ",1),n.createVNode(n.unref(r.MultiSelect),{modelValue:M.value,"onUpdate:modelValue":t[7]||(t[7]=e=>M.value=e),width:160,useSelectAll:!1,itemsSource:Y.value,keyProp:"itemValue",displayProp:"itemName"},null,8,["modelValue","itemsSource"])])):n.createCommentVNode("",!0),"subtotals"===b.value&&Y.value.length>0?(n.openBlock(),n.createElementBlock("div",tl)):n.createCommentVNode("",!0),"subtotals"===S.value&&Z.value.length>0?(n.openBlock(),n.createElementBlock("div",nl,[n.createTextVNode(n.toDisplayString(f.value.columnSubtotalCriteria??"열 소계 기준")+" ",1),n.createVNode(n.unref(r.MultiSelect),{modelValue:k.value,"onUpdate:modelValue":t[8]||(t[8]=e=>k.value=e),width:160,useSelectAll:!1,itemsSource:Z.value,keyProp:"itemValue",displayProp:"itemName"},null,8,["modelValue","itemsSource"])])):n.createCommentVNode("",!0),"subtotals"===S.value&&Z.value.length>0?(n.openBlock(),n.createElementBlock("div",ol)):n.createCommentVNode("",!0),n.createElementVNode("div",{class:"context-menu-item",onClick:t[10]||(t[10]=()=>N.value=!N.value)},[n.createTextVNode(n.toDisplayString(f.value.totalsBeforeData??"합계 데이터 앞에 표시")+" ",1),n.createVNode(n.unref(r.Toggle),{modelValue:N.value,"onUpdate:modelValue":t[9]||(t[9]=e=>N.value=e)},null,8,["modelValue"])]),n.createElementVNode("div",{class:"context-menu-item",onClick:t[12]||(t[12]=()=>E.value=!E.value)},[n.createTextVNode(n.toDisplayString(f.value.showZeros??"0값 표시")+" ",1),n.createVNode(n.unref(r.Toggle),{modelValue:E.value,"onUpdate:modelValue":t[11]||(t[11]=e=>E.value=e)},null,8,["modelValue"])]),n.createElementVNode("div",{class:"context-menu-item",onClick:t[14]||(t[14]=()=>A.value=!A.value)},[n.createTextVNode(n.toDisplayString(f.value.rowCollapsible??"행 확장/축소 허용")+" ",1),n.createVNode(n.unref(r.Toggle),{modelValue:A.value,"onUpdate:modelValue":t[13]||(t[13]=e=>A.value=e)},null,8,["modelValue"])]),n.createElementVNode("div",{class:"context-menu-item",onClick:t[16]||(t[16]=()=>L.value=!L.value)},[n.createTextVNode(n.toDisplayString(f.value.columnCollapsible??"열 확장/축소 허용")+" ",1),n.createVNode(n.unref(r.Toggle),{modelValue:L.value,"onUpdate:modelValue":t[15]||(t[15]=e=>L.value=e)},null,8,["modelValue"])])])):n.createCommentVNode("",!0),"Field"===x.value?(n.openBlock(),n.createElementBlock("div",il,[n.createElementVNode("div",rl,[n.createTextVNode(n.toDisplayString(f.value.fieldName??"필드 이름")+" ",1),n.createVNode(n.unref(r.Select),{modelValue:P.value,"onUpdate:modelValue":t[17]||(t[17]=e=>P.value=e),itemsSource:X.value,displayProp:"itemName",keyProp:"itemValue",width:120,onChange:W},null,8,["modelValue","itemsSource"])]),n.createElementVNode("div",al,[n.createTextVNode(n.toDisplayString(f.value.fieldAggregate??"집계")+" ",1),n.createVNode(n.unref(r.Select),{modelValue:B.value,"onUpdate:modelValue":t[18]||(t[18]=e=>B.value=e),itemsSource:j.value,displayProp:"itemName",keyProp:"itemValue",width:120},null,8,["modelValue","itemsSource"])]),n.createElementVNode("div",ll,[n.createTextVNode(n.toDisplayString(f.value.fieldFormat??"형식")+" ",1),n.createVNode(n.unref(r.Select),{modelValue:z.value,"onUpdate:modelValue":t[19]||(t[19]=e=>z.value=e),itemsSource:J.value,displayProp:"itemName",keyProp:"itemValue",width:120},null,8,["modelValue","itemsSource"])]),"general"!==z.value?(n.openBlock(),n.createElementBlock("div",sl,[n.createTextVNode(n.toDisplayString(f.value.roundingMode??"반올림 모드")+" ",1),n.createVNode(n.unref(r.Select),{modelValue:F.value,"onUpdate:modelValue":t[20]||(t[20]=e=>F.value=e),itemsSource:q.value,displayProp:"itemName",keyProp:"itemValue",width:120},null,8,["modelValue","itemsSource"])])):n.createCommentVNode("",!0),n.createElementVNode("div",ul,[n.createTextVNode(n.toDisplayString(f.value.fieldShowAs??"표시 방식")+" ",1),n.createVNode(n.unref(r.Select),{modelValue:R.value,"onUpdate:modelValue":t[21]||(t[21]=e=>R.value=e),itemsSource:$.value,displayProp:"itemName",keyProp:"itemValue",width:120},null,8,["modelValue","itemsSource"])]),"none"!==R.value?(n.openBlock(),n.createElementBlock("div",{key:1,class:"context-menu-item",onClick:t[23]||(t[23]=()=>G.value=!G.value)},[n.createTextVNode(n.toDisplayString(f.value.showOriginalValue??"원본값 병기")+" ",1),n.createVNode(n.unref(r.Toggle),{modelValue:G.value,"onUpdate:modelValue":t[22]||(t[22]=e=>G.value=e)},null,8,["modelValue"])])):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0)]),_:3},8,["itemSource"]))}}),dl={key:0,class:"pivot-field-chip pivot-field-chip--value"},hl={class:"pivot-field-chip__left"},pl={key:0,class:"pivot-field-chip__summary"},fl={class:"pivot-field-chip__label"},gl={key:1,class:"pivot-field-chip"},vl={class:"pivot-field-chip__label"},ml=n.defineComponent({__name:"PivotFieldChip",props:{field:{},header:{},area:{},aggregate:{},settingsActive:{type:Boolean}},emits:["remove","open-settings"],setup(e,{emit:t}){const o={sum:"Sum",avg:"Avg",count:"Cnt",min:"Min",max:"Max"},i=e,r=t,a=n.computed(()=>i.aggregate?o[i.aggregate]??i.aggregate:"");return(t,o)=>"value"===e.area?(n.openBlock(),n.createElementBlock("div",dl,[n.createElementVNode("div",hl,[n.createVNode(n.unref(Xt),{color:"#4568e0",style:{"margin-right":"2px"}}),e.aggregate?(n.openBlock(),n.createElementBlock("span",pl,n.toDisplayString(a.value),1)):n.createCommentVNode("",!0),n.createElementVNode("span",fl,n.toDisplayString(e.header||e.field),1)]),n.createElementVNode("div",{class:"pivot-field-chip__settings",onClick:o[0]||(o[0]=n.withModifiers(e=>r("open-settings"),["stop"]))},[n.createVNode(n.unref(xn),{color:e.settingsActive?"#4568e0":"#8998b5",size:"12"},null,8,["color"])])])):(n.openBlock(),n.createElementBlock("div",gl,[n.createVNode(n.unref(Xt),{size:"10"}),n.createElementVNode("span",vl,n.toDisplayString(e.header||e.field),1),n.createElementVNode("span",{class:"pivot-field-chip__remove",onClick:o[1]||(o[1]=n.withModifiers(e=>r("remove"),["stop"]))},[n.createVNode(n.unref(At),{size:"10"})])]))}}),yl={class:"pivot-drop-zone"},xl={class:"pivot-drop-zone__label"},_l={class:"pivot-drop-zone__content"},wl=n.defineComponent({__name:"PivotFieldDropZone",props:n.mergeModels({area:{},label:{},settingsActiveField:{}},{fields:{required:!0},fieldsModifiers:{}}),emits:n.mergeModels(["field-removed","aggregate-changed","item-dropped","open-settings"],["update:fields"]),setup(e,{emit:t}){const o=n.useModel(e,"fields"),i=t;function r(e){i("item-dropped",e)}return(t,a)=>(n.openBlock(),n.createElementBlock("div",yl,[n.createElementVNode("div",xl,n.toDisplayString(e.label),1),n.createElementVNode("div",_l,[n.createVNode(Mo,{modelValue:o.value,"onUpdate:modelValue":a[0]||(a[0]=e=>o.value=e),name:"pivot-fields",itemKey:"field",sortable:!0,direction:"vertical",onItemDrop:r,class:"pivot-drop-zone__area"},{default:n.withCtx(({item:t})=>[n.createVNode(ml,{field:t.field,header:t.header,area:e.area,aggregate:"aggregate"in t?t.aggregate:void 0,"settings-active":e.settingsActiveField===t.field,onRemove:e=>{return n=t.field,o.value=o.value.filter(e=>e.field!==n),void i("field-removed",n);var n},onOpenSettings:e=>i("open-settings",t)},null,8,["field","header","area","aggregate","settings-active","onRemove","onOpenSettings"])]),_:1},8,["modelValue"])])]))}}),bl={class:"pivot-field-panel"},Sl={class:"pivot-field-panel__heading"},Cl={class:"pivot-field-panel__field-items"},Ml=["onDragstart"],Tl={class:"pivot-field-panel__field-type"},Il={class:"pivot-field-panel__zones"},kl={class:"pivot-field-panel__heading"},Dl={class:"pivot-field-panel__footer"},Nl={class:"pivot-value-field-option-item"},El=n.defineComponent({__name:"PivotFieldPanel",props:{availableFields:{},rowFields:{default:()=>[]},columnFields:{default:()=>[]},valueFields:{default:()=>[]},filterFields:{default:()=>[]},totalRowCount:{default:0}},emits:["update:config"],setup(e,{expose:t,emit:o}){const i=e,a=o,l=r.useMozLocale(),s=n.computed(()=>l.value),u=n.ref(!1),c=n.ref(""),d=n.computed(()=>i.totalRowCount<1e5),h=n.ref(d.value),p=n.ref(!1),f=n.ref(null);function g(e){var t;return(null==(t=i.availableFields.find(t=>t.field===e))?void 0:t.dataType)??null}function v(e){switch(e){case"number":default:return["sum","avg","min","max","count","countAll","countNumbers","first","last","range","stdev","stdevPop","variance","variancePop"];case"date":return["min","max","count","countAll","first","last"];case"string":return["count","countAll","min","max","first","last"];case"boolean":case"array":return["count","countAll","first","last"]}}function m(e){return"number"===e?"sum":"count"}const y=n.computed(()=>{const e=s.value.GridPivot;return{sum:e.sum,count:e.count,countAll:e.cntAll??"전체 개수",countNumbers:"숫자 개수",avg:e.average,min:e.min,max:e.max,range:e.range??"범위",stdev:e.std??"표준 편차",stdevPop:e.stdPop??"모표준 편차",variance:e.var??"분산",variancePop:e.varPop??"모분산",first:e.showFirstValue??"첫 번째 값",last:e.showLastValue??"마지막 값"}}),x=n.computed(()=>{const e=f.value;if(!e)return"";const t=g(e.field),n=v(t),o=e.aggregate;return o&&n.includes(o)?o:m(t)}),_=n.computed(()=>{const e=y.value;return v(f.value?g(f.value.field):null).map(t=>({value:t,label:e[t]??t}))}),w=n.reactive({rowFields:[],columnFields:[],valueFields:[],filterFields:[]});function b(){w.rowFields=[...i.rowFields],w.columnFields=[...i.columnFields],w.valueFields=[...i.valueFields],w.filterFields=[...i.filterFields]}n.watch(()=>[i.rowFields,i.columnFields,i.valueFields,i.filterFields],()=>b(),{immediate:!0});const S=n.computed(()=>{const e=c.value.toLowerCase();return e?i.availableFields.filter(t=>t.field.toLowerCase().includes(e)||t.header.toLowerCase().includes(e)):i.availableFields}),C=n.computed(()=>w.rowFields.length>=1&&w.valueFields.length>=1);function M(e){return null!==function(e){return w.rowFields.some(t=>t.field===e)?"row":w.columnFields.some(t=>t.field===e)?"column":w.valueFields.some(t=>t.field===e)?"value":w.filterFields.some(t=>t.field===e)?"filter":null}(e)}function T(){h.value&&I()}function I(){a("update:config",{rowFields:[...w.rowFields],columnFields:[...w.columnFields],valueFields:[...w.valueFields],filterFields:[...w.filterFields]})}function k(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move")}function D(e){var t,n;const o=null==(t=e.dataTransfer)?void 0:t.getData("application/json");if(!o)return;let i;try{i=JSON.parse(o)}catch{return}if("pivot-fields"!==i.name)return;const r=null==(n=i.item)?void 0:n.field;r&&M(r)&&(N(r),T())}function N(e){w.rowFields=w.rowFields.filter(t=>t.field!==e),w.columnFields=w.columnFields.filter(t=>t.field!==e),w.valueFields=w.valueFields.filter(t=>t.field!==e),w.filterFields=w.filterFields.filter(t=>t.field!==e)}function E(e,t){const n=t.field;if("row"!==e&&(w.rowFields=w.rowFields.filter(e=>e.field!==n)),"column"!==e&&(w.columnFields=w.columnFields.filter(e=>e.field!==n)),"value"!==e&&(w.valueFields=w.valueFields.filter(e=>e.field!==n)),"filter"!==e&&(w.filterFields=w.filterFields.filter(e=>e.field!==n)),"value"===e){const e=w.valueFields.find(e=>e.field===n);if(e){const t=g(n),o=v(t),i=e.aggregate;i&&o.includes(i)||(e.aggregate=m(t))}}if("filter"===e){const e=w.filterFields.find(e=>e.field===n);e&&!("values"in e)&&(e.values=[])}T()}function A(e){N(e),T()}function L(e){f.value===e&&p.value?p.value=!1:(f.value=e,n.nextTick(()=>{p.value=!0}))}function V(){u.value=!1,p.value=!1}return n.watch(()=>w.valueFields,e=>{if(!f.value)return;e.some(e=>e.field===f.value.field)||(p.value=!1,f.value=null)},{deep:!0}),t({show:function(){b(),h.value=d.value,u.value=!0},hide:V}),(e,t)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createVNode(n.unref(r.Popup),{visible:u.value,"onUpdate:visible":t[8]||(t[8]=e=>u.value=e),title:s.value.GridPivot.setting,width:520,height:670,onCancel:V},{footer:n.withCtx(()=>[n.createElementVNode("div",Dl,[n.createVNode(n.unref(r.CheckBox),{modelValue:h.value,"onUpdate:modelValue":t[7]||(t[7]=e=>h.value=e),label:s.value.Grid.immediateApply},null,8,["modelValue","label"]),h.value?n.createCommentVNode("",!0):(n.openBlock(),n.createBlock(n.unref(r.Button),{key:0,size:"small",disabled:!C.value,onClick:I},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(s.value.GridPivot.update),1)]),_:1},8,["disabled"]))])]),default:n.withCtx(()=>{var e;return[n.createElementVNode("div",bl,[n.createElementVNode("div",{class:"pivot-field-panel__list",onDragover:n.withModifiers(k,["prevent"]),onDrop:n.withModifiers(D,["prevent"])},[n.createElementVNode("div",Sl,n.toDisplayString(s.value.GridPivot.selectFieldForReport),1),n.createElementVNode("div",Cl,[n.createVNode(n.unref(r.Input),{modelValue:c.value,"onUpdate:modelValue":t[0]||(t[0]=e=>c.value=e),placeholder:s.value.GridPivot.searchFieldPlaceholder,size:"small",style:{"margin-bottom":"4px"}},null,8,["modelValue","placeholder"]),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(S.value,e=>(n.openBlock(),n.createElementBlock("div",{key:e.field,class:"pivot-field-panel__field-item",draggable:"true",onDragstart:t=>function(e,t){if(e.dataTransfer){const n=i.availableFields.find(e=>e.field===t),o={name:"pivot-fields",componentId:"pivot-available-fields",item:{field:t,header:(null==n?void 0:n.header)??t}};e.dataTransfer.setData("application/json",JSON.stringify(o)),e.dataTransfer.effectAllowed="move"}}(t,e.field)},[n.createVNode(n.unref(r.CheckBox),{modelValue:M(e.field),"onUpdate:modelValue":t=>function(e,t){if(t){const t=i.availableFields.find(t=>t.field===e);"number"===(null==t?void 0:t.dataType)?w.valueFields.push({field:e,header:t.header,aggregate:"sum"}):w.rowFields.push({field:e,header:null==t?void 0:t.header})}else N(e);T()}(e.field,t),label:e.header},null,8,["modelValue","onUpdate:modelValue","label"]),n.createElementVNode("span",Tl,n.toDisplayString(e.dataType),1)],40,Ml))),128))])],32),n.createElementVNode("div",Il,[n.createElementVNode("div",kl,n.toDisplayString(s.value.GridPivot.dragFieldsBetweenAreas),1),n.createVNode(wl,{area:"row",label:s.value.GridPivot.row,fields:w.rowFields,"onUpdate:fields":t[1]||(t[1]=e=>w.rowFields=e),placeholder:s.value.GridPivot.dropZoneRowPlaceholder,onFieldRemoved:A,onItemDropped:t[2]||(t[2]=e=>E("row",e))},null,8,["label","fields","placeholder"]),n.createVNode(wl,{area:"column",label:s.value.GridPivot.column,fields:w.columnFields,"onUpdate:fields":t[3]||(t[3]=e=>w.columnFields=e),placeholder:s.value.GridPivot.dropZoneColumnPlaceholder,onFieldRemoved:A,onItemDropped:t[4]||(t[4]=e=>E("column",e))},null,8,["label","fields","placeholder"]),n.createVNode(wl,{area:"value",label:s.value.GridPivot.value,fields:w.valueFields,"onUpdate:fields":t[5]||(t[5]=e=>w.valueFields=e),placeholder:s.value.GridPivot.dropZoneValuePlaceholder,"settings-active-field":p.value?null==(e=f.value)?void 0:e.field:void 0,onFieldRemoved:A,onItemDropped:t[6]||(t[6]=e=>E("value",e)),onOpenSettings:L},null,8,["label","fields","placeholder","settings-active-field"])])])]}),_:1},8,["visible","title"]),f.value?(n.openBlock(),n.createBlock(n.unref(r.Popup),{key:0,class:"pivot-value-field-option-modal",visible:p.value,"onUpdate:visible":t[10]||(t[10]=e=>p.value=e),useVShow:!0,closeOnOutsideClick:!1,title:`${s.value.GridPivot.fieldSetting} : ${f.value.header??f.value.field}`,width:300,preset:"no-footer"},{default:n.withCtx(()=>[n.createElementVNode("div",Nl,[n.createElementVNode("span",null,n.toDisplayString(s.value.GridPivot.valueSummaryCriteria),1),n.createVNode(n.unref(r.Select),{modelValue:x.value,itemsSource:_.value,keyProp:"value",displayProp:"label",width:"100%","onUpdate:modelValue":t[9]||(t[9]=e=>function(e){const t=f.value;if(!t)return;const n=w.valueFields.findIndex(e=>e.field===t.field);if(n<0)return;const o=g(t.field),i=v(o).includes(e)?e:m(o),r={...w.valueFields[n],aggregate:i};w.valueFields[n]=r,f.value=r,T()}(String(e??"")))},null,8,["modelValue","itemsSource"])])]),_:1},8,["visible","title"])):n.createCommentVNode("",!0)],64))}}),Al={class:"pivot-context-menu-aggregate__label"},Ll={class:"pivot-context-menu-aggregate__value"},Vl=n.defineComponent({__name:"PivotContextMenu",props:{config:{default:()=>({})}},setup(e,{expose:t}){const o=e,i=n.inject(z),l=n.inject(W,void 0),s=x(),u=a.useGridNotificationStore(),c=r.useMozLocale(),d=n.computed(()=>c.value.Grid),h=n.ref(null),p=n.ref([]),f=n.ref(null);let g=null;function v(){g&&(g(),g=null)}function m(e,t){e.clipboard.copy({includeHeaders:t}).catch(()=>{})}return n.watch(()=>null==i?void 0:i.value,e=>{e&&function(e){v(),g=e.on("contextmenu",t=>{t.originalEvent.preventDefault();const r=function(e,t){var n,o;const i=e.area??"cell";if("cell"!==i)return null;const r=e.rowIndex??-1,a=e.colIndex??-1,l=e.columnId??"",s=null==(n=t.getPivotFields)?void 0:n.call(t),u=s?[...s.rowFields,...s.columnFields,...s.valueFields,...s.filterFields]:[],c=(null==(o=t.getFields)?void 0:o.call(t))??u;let d=c.find(e=>e.id===l)??null;if(!d&&s){const e=t.columns.getAll().find(e=>e.id===l);if(e){const t=e.pivotValueField;d=(t?u.find(e=>e.id===t):null)??{id:e.id,header:e.header??e.label??e.id,dataType:e.type??"string",hidden:e.hidden??!1}}}else if(!d){const e=t.columns.getAll().find(e=>e.id===l);e&&(d={id:e.id,header:e.header??e.label??e.id,dataType:e.type??"string",hidden:e.hidden??!1})}const h=e.value??null;let p=null!=h?String(h):"";p.length>20&&(p=`${p.substring(0,20)}...`);return{rowIndex:r,colIndex:a,area:i,columnId:l,field:d,cellValue:h,displayValue:p}}(t,e);r&&(f.value=r,n.nextTick(()=>{!function(e){var t,n;try{const o=null==(n=null==(t=e.rows)?void 0:t.selectionAggregates)?void 0:n.call(t);p.value=(null==o?void 0:o.columns)??[]}catch{p.value=[]}}(e),function(){if(!h.value||!f.value)return;const e=f.value,t=()=>function(e){var t,n,r,a,c,g;const v=[],y=null==i?void 0:i.value;if(!y)return v;const x=y.select(e=>({t:e.totalRowCount,v:e.visibleRowCount})).getSnapshot(),_=x.t>0||x.v>0,w=(null==(t=e.field)?void 0:t.header)??"";if(l){v.push({text:(null==(r=null==(n=d.value.contextAddFilter)?void 0:n.replace)?void 0:r.call(n,"{column}",w))??`${w} 열에 필터 추가`,disabled:!e.field||!_,function:()=>{var t;e.field&&(l.showFilterHandler(e.field),null==(t=h.value)||t.close())}}),v.push({text:d.value.contextSelectFilter??"선택값으로 필터링",disabled:!e.field||!_||null===e.cellValue||void 0===e.cellValue||""===e.displayValue,function:()=>{var t;e.field&&(!function(e){var t;if(!l||!e.field)return;const n=e.cellValue,o=null==n||""===n?"∅":"=",i=(null==(t=l.getFilter)?void 0:t.call(l))??[],r={sequence:i.length>0?Math.max(...i.map(e=>e.sequence??0))+1:0,header:e.field.header??"",binding:e.field.id??"",logical:"AND",comparison:o,variable:n};l.addFilter([r])}(e),null==(t=h.value)||t.close())}});const t=(null==(a=e.field)?void 0:a.id)??e.columnId;v.push({text:(null==(g=null==(c=d.value.contextResetColumnFilter)?void 0:c.replace)?void 0:g.call(c,"{column}",w))??`${w} 필터 초기화`,disabled:()=>!function(e){var t;if(!l)return!1;const n=(null==(t=l.getFilter)?void 0:t.call(l))??[];return n.some(t=>t.binding===e)}(t),function:()=>{var e;!function(e){var t;if(!l)return;const n=(null==(t=l.getFilter)?void 0:t.call(l))??[],o=n.filter(t=>t.binding!==e);l.setFilter(o)}(t),null==(e=h.value)||e.close()}}),v.push({separator:!0})}v.push({text:d.value.contextDataCopy??"데이터 복사",disabled:!_,function:()=>{var e;m(y,!1),null==(e=h.value)||e.close()}}),v.push({text:d.value.contextDataWithHeaderCopy??"헤더를 포함한 데이터 복사",disabled:!_,function:()=>{var e;m(y,!0),null==(e=h.value)||e.close()}});const b=o.config;{const e=[];b.useClientExcelImport&&e.push({text:d.value.contextImportExcelFileClient??"파일에서 가져오기 (클라이언트)",function:()=>{var e;y&&s.show(y,b.clientImportOptions??{}),null==(e=h.value)||e.close()}}),b.useExportImport&&b.onImportExcel&&e.push({text:d.value.contextImportExcelOverwriteServer??"엑셀 가져오기 - 덮어쓰기 (서버)",function:()=>{var e,t,n;null==(t=b.onImportExcel)||t.call(b,{grid:null==i?void 0:i.value,field:null==(e=f.value)?void 0:e.field}),null==(n=h.value)||n.close()}}),b.useExportImport&&b.onImportExcelAppend&&e.push({text:d.value.contextImportExcelAppendServer??"엑셀 가져오기 - 추가 (서버)",function:()=>{var e,t,n;null==(t=b.onImportExcelAppend)||t.call(b,{grid:null==i?void 0:i.value,field:null==(e=f.value)?void 0:e.field}),null==(n=h.value)||n.close()}}),e.length>0&&(v.push({separator:!0}),v.push({text:d.value.contextImport??"가져오기",children:e}))}{const e=[];b.useClientExcelExport&&(e.push({text:d.value.contextExportXlsxClient??"XLSX (클라이언트)",function:async()=>{var e;y&&await Sr(y,b,u),null==(e=h.value)||e.close()}}),e.push({text:d.value.contextExportCsvClient??"CSV (클라이언트)",function:async()=>{var e;y&&await Mr(y),null==(e=h.value)||e.close()}})),(b.useExportExcel||b.onExportOriginalData)&&b.onExportOriginalData&&(e.push({text:d.value.contextExportXlsxServer??"XLSX (서버)",function:()=>{var e,t;null==(e=b.onExportOriginalData)||e.call(b,"excel"),null==(t=h.value)||t.close()}}),e.push({text:d.value.contextExportCsvServer??"CSV (서버)",function:()=>{var e,t;null==(e=b.onExportOriginalData)||e.call(b,"csv"),null==(t=h.value)||t.close()}})),e.length>0&&v.push({text:d.value.contextExport??"내보내기",children:e})}if(b.customMenu&&b.customMenu.length>0){const e=[...b.customMenu].sort((e,t)=>(e.order??50)-(t.order??50)),t=[];for(const n of e)t.push({text:n.label,disabled:n.disabled??!1,function:n.handler?()=>{var e,t;null==(e=n.handler)||e.call(n),null==(t=h.value)||t.close()}:void 0});t.push({separator:!0}),v.unshift(...t)}p.value.length>0&&(v.push({separator:!0}),v.push({text:"",hover:!1,template:"aggregate-columns"}));return function(e){var t,n,o,i;if(!e||0===e.length)return e;const r=[...e];for(;r.length>0&&(null==(t=r[0])?void 0:t.separator);)r.shift();for(;r.length>0&&(null==(n=r[r.length-1])?void 0:n.separator);)r.pop();for(let a=0;a<r.length-1;a++)(null==(o=r[a])?void 0:o.separator)&&(null==(i=r[a+1])?void 0:i.separator)&&(r.splice(a,1),a--);return r}(v)}(e);h.value.open(t)}()}))})}(e)},{immediate:!0}),n.onBeforeUnmount(()=>{v()}),t({contextMenuRef:h}),(e,t)=>(n.openBlock(),n.createBlock(n.unref(r.ContextMenu),{ref_key:"contextMenuRef",ref:h,"min-width":"200px"},{"aggregate-columns":n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(p.value,(e,t)=>{return n.openBlock(),n.createElementBlock("div",{key:t,class:n.normalizeClass(["pivot-context-menu-aggregate",{"pivot-context-menu-aggregate--compact":p.value.length>=2}])},[n.createElementVNode("span",Al,n.toDisplayString(e.header)+" "+n.toDisplayString((r=e.aggregate,{sum:"합계",avg:"평균",min:"최소",max:"최대",count:"개수",first:"첫번째",last:"마지막"}[r]??r)),1),n.createElementVNode("span",Ll,n.toDisplayString((o=e.value,i=e.formattedValue,i||(isNaN(o)?String(o):o.toLocaleString(void 0,{maximumFractionDigits:2})))),1)],2);var o,i,r}),128))]),_:1},512))}}),Ol=p(Vl,[["__scopeId","data-v-1e5abe10"]]),Pl={class:"moz-chart-controller"},Bl={class:"moz-chart-input-wrapper"},Rl={class:"moz-actions"},zl={key:1,class:"moz-spacer"},Fl=n.defineComponent({__name:"PivotChartToolbar",props:{chartType:{},rowFields:{},columnFields:{},valueFields:{},selectedRowField:{},selectedColumnField:{},selectedValueFields:{},showBack:{type:Boolean,default:!1}},emits:["update:chartType","update:selectedRowField","update:selectedColumnField","update:selectedValueFields","back","close"],setup(e,{emit:t}){const o=r.useMozLocale(),i=e,a=t,l=n.computed(()=>{var e,t,n,i;return[{key:"bar",value:(null==(e=o.value.GridPivot)?void 0:e.barChart)??"막대 차트"},{key:"line",value:(null==(t=o.value.GridPivot)?void 0:t.lineChart)??"꺾은선 차트"},{key:"lineSymbols",value:(null==(n=o.value.GridPivot)?void 0:n.lineSymbolChart)??"기호 꺾은선 차트"},{key:"area",value:(null==(i=o.value.GridPivot)?void 0:i.areaChart)??"영역 차트"}]}),s=n.computed(()=>i.rowFields.map(e=>({key:e.field,value:e.header??e.field}))),u=n.computed(()=>[{key:"all",value:"전체"},...i.columnFields.map((e,t)=>({key:String(t),value:e.header??e.field}))]),c=n.computed(()=>i.valueFields.map(e=>({key:e.field,value:e.header??e.field}))),d=n.ref(i.chartType);n.watch(()=>i.chartType,e=>{d.value=e}),n.watch(d,e=>a("update:chartType",e));const h=n.ref(i.selectedRowField);n.watch(()=>i.selectedRowField,e=>{h.value=e}),n.watch(h,e=>a("update:selectedRowField",e));const p=n.ref(i.selectedColumnField);n.watch(()=>i.selectedColumnField,e=>{p.value=e}),n.watch(p,e=>a("update:selectedColumnField",e));const f=n.ref([...i.selectedValueFields]);function g(){f.value.length||(f.value=c.value.map(e=>e.key)),a("update:selectedValueFields",[...f.value])}return n.watch(()=>i.selectedValueFields,e=>{f.value=[...e]}),(t,i)=>{var v,m,y,x;return n.openBlock(),n.createElementBlock("div",Pl,[n.createElementVNode("div",Bl,[n.createVNode(n.unref(r.Select),{modelValue:d.value,"onUpdate:modelValue":i[0]||(i[0]=e=>d.value=e),"items-source":l.value,"display-prop":"value","key-prop":"key",label:(null==(v=n.unref(o).GridPivot)?void 0:v.chartType)??"차트 유형",width:200,"use-filter":!1,class:"moz-chart-select"},null,8,["modelValue","items-source","label"]),e.columnFields.length>1?(n.openBlock(),n.createBlock(n.unref(r.Select),{key:0,modelValue:p.value,"onUpdate:modelValue":i[1]||(i[1]=e=>p.value=e),"items-source":u.value,"display-prop":"value","key-prop":"key",label:(null==(m=n.unref(o).GridPivot)?void 0:m.chartXAxis)??"X축 범주",width:200,"use-filter":!1,class:"moz-chart-select"},null,8,["modelValue","items-source","label"])):n.createCommentVNode("",!0),e.rowFields.length>1?(n.openBlock(),n.createBlock(n.unref(r.Select),{key:1,modelValue:h.value,"onUpdate:modelValue":i[2]||(i[2]=e=>h.value=e),"items-source":s.value,"display-prop":"value","key-prop":"key",label:(null==(y=n.unref(o).GridPivot)?void 0:y.chartYAxis)??"Y축 범주",width:200,"use-filter":!1,class:"moz-chart-select"},null,8,["modelValue","items-source","label"])):n.createCommentVNode("",!0),e.valueFields.length>1?(n.openBlock(),n.createBlock(n.unref(r.MultiSelect),{key:2,modelValue:f.value,"onUpdate:modelValue":i[3]||(i[3]=e=>f.value=e),"items-source":c.value,"display-prop":"value","key-prop":"key",label:(null==(x=n.unref(o).GridPivot)?void 0:x.categoryName)??"카테고리","use-select-all":!0,"use-filter":!0,"header-format":"{count:n0} ITEMS",width:200,onClose:g,class:"moz-chart-select"},null,8,["modelValue","items-source","label"])):n.createCommentVNode("",!0)]),n.createElementVNode("div",Rl,[e.showBack?(n.openBlock(),n.createBlock(n.unref(r.Button),{key:0,type:"icon",class:"moz-chart-button",onClick:i[4]||(i[4]=e=>a("back"))},{icon:n.withCtx(()=>[n.createVNode(n.unref(tt),{width:14,height:14,color:"#8998B5"})]),_:1})):n.createCommentVNode("",!0),e.showBack?(n.openBlock(),n.createElementBlock("div",zl)):n.createCommentVNode("",!0),n.createVNode(n.unref(r.Button),{type:"icon",class:"moz-chart-button",onClick:i[5]||(i[5]=e=>a("close"))},{icon:n.withCtx(()=>[n.createVNode(n.unref(At),{width:14,height:14,color:"#8998B5"})]),_:1})])])}}}),Gl=p(Fl,[["__scopeId","data-v-8e3c5832"]]);
2
- /*! *****************************************************************************
3
- Copyright (c) Microsoft Corporation.
1
+ "use strict";var e=Object.defineProperty,t=(t,o,l)=>((t,o,l)=>o in t?e(t,o,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[o]=l)(t,"symbol"!=typeof o?o+"":o,l);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),l=require("@vmscloud/moz-ui-grid-wrapper"),n=require("./chunks/notification.contract-oFkBaE2U.cjs"),r=require("lit-html"),i=require("lit-html/directives/class-map.js"),s=require("./chunks/index-BLDAzbGv.cjs"),a=require("dayjs"),u=require("@vmscloud/moz-ui-grid-core");class d{constructor({id:e,type:l,exportDef:n,importDef:r,strict:i,dependencies:s,manualLifeCycle:a}){t(this,"uniqueId"),t(this,"_id"),t(this,"_type"),t(this,"_default"),t(this,"_importDef"),t(this,"_exportDef"),t(this,"_pendingDef"),t(this,"_pending"),t(this,"dispose",()=>{}),t(this,"setApplied",()=>{}),t(this,"strict"),t(this,"dependencies"),this.uniqueId="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}),this._id=e,this._type=l,this._importDef=r,this._exportDef=n,this._default=n(),this._pending=!1,this._pendingDef=null,this.strict=i??!1,this.dependencies=s??null,a||o.onBeforeUnmount(()=>{this.dispose()})}get pending(){return this._pending}set pending(e){if(this._pending=e,!e&&this._pendingDef)try{this._importDef(this._pendingDef),this.setApplied(!0)}catch(t){}finally{this._pendingDef=null}}get id(){return this._id}get type(){return this._type}get default(){return this._default}set default(e){this._default=e}get current(){return this._exportDef()}set current(e){this.pending?this._pendingDef=e:(this._importDef(e),this.setApplied(!0))}setDefaultToCurrent(){this._default=this._exportDef()}}const c=()=>o.inject("user-layout-module",{register:()=>{},currentPreset:o.ref(null)});let p=null;function m(){if(p)return p;const e=o.ref(!1),t=o.shallowRef(null),l=o.ref({}),n={showPopup:e,activeGrid:t,defaultImportOptions:l,show:(o,n={})=>{t.value=o,l.value=n,e.value=!0},hide:()=>{e.value=!1}};return p=n,n}function f(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}function g(e){const t=null==e?"":String(e);return t.includes(",")||t.includes('"')||t.includes("\n")?`"${t.replace(/"/g,'""')}"`:t}const h={mode:"replace",conflictStrategy:"update",autoCommit:!1};function v(){const e=new Date,t=e=>String(e).padStart(2,"0");return`${e.getFullYear()}-${t(e.getMonth()+1)}-${t(e.getDate())} ${t(e.getHours())}:${t(e.getMinutes())}:${t(e.getSeconds())}`}class x{constructor(e){t(this,"popup",null),t(this,"grid",null),t(this,"options",{...h}),t(this,"file",null),t(this,"invalid",!1),t(this,"dropActive",!1),t(this,"replacing",!1),this.deps=e}get isOpen(){var e;return(null==(e=this.popup)?void 0:e.isOpen)??!1}get state(){return{file:this.file,invalid:this.invalid,options:{...this.options}}}open(e,t={}){if(this.popup){this.replacing=!0;try{this.popup.close()}finally{this.replacing=!1}}this.grid=e,this.resetState(),this.options={...h},t.mode&&(this.options.mode=t.mode),t.conflictStrategy&&(this.options.conflictStrategy=t.conflictStrategy),"boolean"==typeof t.autoCommit&&(this.options.autoCommit=t.autoCommit);const o=s.getGridVueLocale(),n=new l.Popup({title:o.clientExcelImport,width:540,height:440,closeOnOutsideClick:!0,contentsPadding:"16px",className:"mzc-client-excel-popup",draggable:!0,resizeable:!1,onClose:()=>this.handleClosed(n)});this.popup=n,n.open(()=>this.body(),()=>this.footer())}close(){var e;null==(e=this.popup)||e.close()}destroy(){this.close()}handleClosed(e){this.popup===e&&(this.popup=null),this.resetState(),this.replacing||this.deps.onHidden()}resetState(){this.file=null,this.invalid=!1,this.dropActive=!1}update(){var e;null==(e=this.popup)||e.update()}setFile(e){e&&e.name.toLowerCase().endsWith(".xlsx")?(this.invalid=!1,this.file=e):(this.invalid=!0,this.file=null),this.update()}body(){const e=s.getGridVueLocale(),{mode:t,conflictStrategy:o}=this.options,n=this.file,a=[{value:"replace",label:e.importModeReplace},{value:"append",label:e.importModeAppend},{value:"upsert",label:e.importModeUpsert}],u=[{value:"error",label:e.conflictError},{value:"skip",label:e.conflictSkip},{value:"update",label:e.conflictUpdate}],d=e=>{var t,o;null==(o=null==(t=e.currentTarget.parentElement)?void 0:t.querySelector('input[type="file"]'))||o.click()},c=n?r.html`
2
+ ${"replace"===t?r.html`<span class="mzc-client-excel-dropzone__line">${e.overwriteSelected}</span>`:r.nothing}
3
+ <span class="mzc-client-excel-dropzone__line"><span class="mzc-client-excel-dropzone__accent">${n.name}</span></span>
4
+ `:r.html`
5
+ <span class="mzc-client-excel-dropzone__line">
6
+ ${e.dropHerePrefix}<span class="mzc-client-excel-dropzone__accent">${e.click}</span>${e.dropHereMiddle}<span class="mzc-client-excel-dropzone__accent">${e.drag}</span>${e.dropHereSuffix}
7
+ </span>
8
+ `;return r.html`
9
+ <div class="mzc-client-excel-body">
10
+ <div class="mzc-client-excel-options">
11
+ <div class="mzc-client-excel-option">
12
+ <span class="mzc-client-excel-option__label">${e.importMode}</span>
13
+ ${l.radio({variant:"borderless",value:t,options:a,ariaLabel:e.importMode,onChange:e=>{this.options.mode=e,this.update()}})}
14
+ </div>
15
+ ${"replace"!==t?r.html`
16
+ <div class="mzc-client-excel-option mzc-client-excel-option--grow">
17
+ <span class="mzc-client-excel-option__label">${e.conflictStrategy}</span>
18
+ ${l.select({value:o,options:u,width:"100%",ariaLabel:e.conflictStrategy,onChange:e=>{this.options.conflictStrategy=e,this.update()}})}
19
+ </div>
20
+ `:r.nothing}
21
+ </div>
4
22
 
5
- Permission to use, copy, modify, and/or distribute this software for any
6
- purpose with or without fee is hereby granted.
7
-
8
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
- PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */
16
- var Hl=function(e,t){return(Hl=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function Wl(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Hl(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Ul=function(){return function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}}(),Yl=new(function(){return function(){this.browser=new Ul,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow="undefined"!=typeof window}}());"object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?(Yl.wxa=!0,Yl.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?Yl.worker=!0:!Yl.hasGlobalWindow||"Deno"in window?(Yl.node=!0,Yl.svgSupported=!0):function(e,t){var n=t.browser,o=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),r=e.match(/Edge?\/([\d.]+)/),a=/micromessenger/i.test(e);o&&(n.firefox=!0,n.version=o[1]);i&&(n.ie=!0,n.version=i[1]);r&&(n.edge=!0,n.version=r[1],n.newEdge=+r[1].split(".")[0]>18);a&&(n.weChat=!0);t.svgSupported="undefined"!=typeof SVGRect,t.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,t.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported="undefined"!=typeof document;var l=document.documentElement.style;t.transform3dSupported=(n.ie&&"transition"in l||n.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in l)&&!("OTransition"in l),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}(navigator.userAgent,Yl);var Zl="sans-serif",Xl="12px "+Zl;var jl=function(e){var t={};if("undefined"==typeof JSON)return t;for(var n=0;n<e.length;n++){var o=String.fromCharCode(n+32),i=(e.charCodeAt(n)-20)/100;t[o]=i}return t}("007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N"),$l={createCanvas:function(){return"undefined"!=typeof document&&document.createElement("canvas")},measureText:function(){var e,t;return function(n,o){if(!e){var i=$l.createCanvas();e=i&&i.getContext("2d")}if(e)return t!==o&&(t=e.font=o||Xl),e.measureText(n);n=n||"";var r=/((?:\d+)?\.?\d*)px/.exec(o=o||Xl),a=r&&+r[1]||12,l=0;if(o.indexOf("mono")>=0)l=a*n.length;else for(var s=0;s<n.length;s++){var u=jl[n[s]];l+=null==u?a:u*a}return{width:l}}}(),loadImage:function(e,t,n){var o=new Image;return o.onload=t,o.onerror=n,o.src=e,o}},ql=_s(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(e,t){return e["[object "+t+"]"]=!0,e},{}),Kl=_s(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(e,t){return e["[object "+t+"Array]"]=!0,e},{}),Jl=Object.prototype.toString,Ql=Array.prototype,es=Ql.forEach,ts=Ql.filter,ns=Ql.slice,os=Ql.map,is=function(){}.constructor,rs=is?is.prototype:null,as="__proto__",ls=2311;function ss(){return ls++}function us(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]}function cs(e){if(null==e||"object"!=typeof e)return e;var t=e,n=Jl.call(e);if("[object Array]"===n){if(!Zs(e)){t=[];for(var o=0,i=e.length;o<i;o++)t[o]=cs(e[o])}}else if(Kl[n]){if(!Zs(e)){var r=e.constructor;if(r.from)t=r.from(e);else{t=new r(e.length);for(o=0,i=e.length;o<i;o++)t[o]=e[o]}}}else if(!ql[n]&&!Zs(e)&&!Ls(e))for(var a in t={},e)e.hasOwnProperty(a)&&a!==as&&(t[a]=cs(e[a]));return t}function ds(e,t,n){if(!Ns(t)||!Ns(e))return n?cs(t):e;for(var o in t)if(t.hasOwnProperty(o)&&o!==as){var i=e[o],r=t[o];!Ns(r)||!Ns(i)||Ms(r)||Ms(i)||Ls(r)||Ls(i)||Es(r)||Es(i)||Zs(r)||Zs(i)?!n&&o in e||(e[o]=cs(t[o])):ds(i,r,n)}return e}function hs(e,t){for(var n=e[0],o=1,i=e.length;o<i;o++)n=ds(n,e[o],t);return n}function ps(e,t){if(Object.assign)Object.assign(e,t);else for(var n in t)t.hasOwnProperty(n)&&n!==as&&(e[n]=t[n]);return e}function fs(e,t,n){for(var o=bs(t),i=0,r=o.length;i<r;i++){var a=o[i];(n?null!=t[a]:null==e[a])&&(e[a]=t[a])}return e}function gs(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var n=0,o=e.length;n<o;n++)if(e[n]===t)return n}return-1}function vs(e,t,n){if(e="prototype"in e?e.prototype:e,t="prototype"in t?t.prototype:t,Object.getOwnPropertyNames)for(var o=Object.getOwnPropertyNames(t),i=0;i<o.length;i++){var r=o[i];"constructor"!==r&&(n?null!=t[r]:null==e[r])&&(e[r]=t[r])}else fs(e,t,n)}function ms(e){return!!e&&("string"!=typeof e&&"number"==typeof e.length)}function ys(e,t,n){if(e&&t)if(e.forEach&&e.forEach===es)e.forEach(t,n);else if(e.length===+e.length)for(var o=0,i=e.length;o<i;o++)t.call(n,e[o],o,e);else for(var r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e)}function xs(e,t,n){if(!e)return[];if(!t)return Fs(e);if(e.map&&e.map===os)return e.map(t,n);for(var o=[],i=0,r=e.length;i<r;i++)o.push(t.call(n,e[i],i,e));return o}function _s(e,t,n,o){if(e&&t){for(var i=0,r=e.length;i<r;i++)n=t.call(o,n,e[i],i,e);return n}}function ws(e,t,n){if(!e)return[];if(!t)return Fs(e);if(e.filter&&e.filter===ts)return e.filter(t,n);for(var o=[],i=0,r=e.length;i<r;i++)t.call(n,e[i],i,e)&&o.push(e[i]);return o}function bs(e){if(!e)return[];if(Object.keys)return Object.keys(e);var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}var Ss=rs&&Ts(rs.bind)?rs.call.bind(rs.bind):function(e,t){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];return function(){return e.apply(t,n.concat(ns.call(arguments)))}};function Cs(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(){return e.apply(this,t.concat(ns.call(arguments)))}}function Ms(e){return Array.isArray?Array.isArray(e):"[object Array]"===Jl.call(e)}function Ts(e){return"function"==typeof e}function Is(e){return"string"==typeof e}function ks(e){return"[object String]"===Jl.call(e)}function Ds(e){return"number"==typeof e}function Ns(e){var t=typeof e;return"function"===t||!!e&&"object"===t}function Es(e){return!!ql[Jl.call(e)]}function As(e){return!!Kl[Jl.call(e)]}function Ls(e){return"object"==typeof e&&"number"==typeof e.nodeType&&"object"==typeof e.ownerDocument}function Vs(e){return null!=e.colorStops}function Os(e){return"[object RegExp]"===Jl.call(e)}function Ps(e){return e!=e}function Bs(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,o=e.length;n<o;n++)if(null!=e[n])return e[n]}function Rs(e,t){return null!=e?e:t}function zs(e,t,n){return null!=e?e:null!=t?t:n}function Fs(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return ns.apply(e,t)}function Gs(e){if("number"==typeof e)return[e,e,e,e];var t=e.length;return 2===t?[e[0],e[1],e[0],e[1]]:3===t?[e[0],e[1],e[2],e[1]]:e}function Hs(e,t){if(!e)throw new Error(t)}function Ws(e){return null==e?null:"function"==typeof e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var Us="__ec_primitive__";function Ys(e){e[Us]=!0}function Zs(e){return e[Us]}var Xs=function(){function e(){this.data={}}return e.prototype.delete=function(e){var t=this.has(e);return t&&delete this.data[e],t},e.prototype.has=function(e){return this.data.hasOwnProperty(e)},e.prototype.get=function(e){return this.data[e]},e.prototype.set=function(e,t){return this.data[e]=t,this},e.prototype.keys=function(){return bs(this.data)},e.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},e}(),js="function"==typeof Map;var $s=function(){function e(t){var n=Ms(t);this.data=js?new Map:new Xs;var o=this;function i(e,t){n?o.set(e,t):o.set(t,e)}t instanceof e?t.each(i):t&&ys(t,i)}return e.prototype.hasKey=function(e){return this.data.has(e)},e.prototype.get=function(e){return this.data.get(e)},e.prototype.set=function(e,t){return this.data.set(e,t),t},e.prototype.each=function(e,t){this.data.forEach(function(n,o){e.call(t,n,o)})},e.prototype.keys=function(){var e=this.data.keys();return js?Array.from(e):e},e.prototype.removeKey=function(e){this.data.delete(e)},e}();function qs(e){return new $s(e)}function Ks(e,t){for(var n=new e.constructor(e.length+t.length),o=0;o<e.length;o++)n[o]=e[o];var i=e.length;for(o=0;o<t.length;o++)n[o+i]=t[o];return n}function Js(e,t){var n;if(Object.create)n=Object.create(e);else{var o=function(){};o.prototype=e,n=new o}return t&&ps(n,t),n}function Qs(e){var t=e.style;t.webkitUserSelect="none",t.userSelect="none",t.webkitTapHighlightColor="rgba(0,0,0,0)",t["-webkit-touch-callout"]="none"}function eu(e,t){return e.hasOwnProperty(t)}function tu(){}var nu=180/Math.PI;function ou(e,t){return null==e&&(e=0),null==t&&(t=0),[e,t]}function iu(e,t){return e[0]=t[0],e[1]=t[1],e}function ru(e){return[e[0],e[1]]}function au(e,t,n){return e[0]=t,e[1]=n,e}function lu(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function su(e,t,n,o){return e[0]=t[0]+n[0]*o,e[1]=t[1]+n[1]*o,e}function uu(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function cu(e){return Math.sqrt(function(e){return e[0]*e[0]+e[1]*e[1]}(e))}function du(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function hu(e,t){var n=cu(t);return 0===n?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e}function pu(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var fu=pu;var gu=function(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])};function vu(e,t,n,o){return e[0]=t[0]+o*(n[0]-t[0]),e[1]=t[1]+o*(n[1]-t[1]),e}function mu(e,t,n){var o=t[0],i=t[1];return e[0]=n[0]*o+n[2]*i+n[4],e[1]=n[1]*o+n[3]*i+n[5],e}function yu(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function xu(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}var _u=function(){return function(e,t){this.target=e,this.topTarget=t&&t.topTarget}}(),wu=function(){function e(e){this.handler=e,e.on("mousedown",this._dragStart,this),e.on("mousemove",this._drag,this),e.on("mouseup",this._dragEnd,this)}return e.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new _u(t,e),"dragstart",e.event))},e.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,o=e.offsetY,i=n-this._x,r=o-this._y;this._x=n,this._y=o,t.drift(i,r,e),this.handler.dispatchToElement(new _u(t,e),"drag",e.event);var a=this.handler.findHover(n,o,t).target,l=this._dropTarget;this._dropTarget=a,t!==a&&(l&&a!==l&&this.handler.dispatchToElement(new _u(l,e),"dragleave",e.event),a&&a!==l&&this.handler.dispatchToElement(new _u(a,e),"dragenter",e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new _u(t,e),"dragend",e.event),this._dropTarget&&this.handler.dispatchToElement(new _u(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null},e}(),bu=function(){function e(e){e&&(this._$eventProcessor=e)}return e.prototype.on=function(e,t,n,o){this._$handlers||(this._$handlers={});var i=this._$handlers;if("function"==typeof t&&(o=n,n=t,t=null),!n||!e)return this;var r=this._$eventProcessor;null!=t&&r&&r.normalizeQuery&&(t=r.normalizeQuery(t)),i[e]||(i[e]=[]);for(var a=0;a<i[e].length;a++)if(i[e][a].h===n)return this;var l={h:n,query:t,ctx:o||this,callAtLast:n.zrEventfulCallAtLast},s=i[e].length-1,u=i[e][s];return u&&u.callAtLast?i[e].splice(s,0,l):i[e].push(l),this},e.prototype.isSilent=function(e){var t=this._$handlers;return!t||!t[e]||!t[e].length},e.prototype.off=function(e,t){var n=this._$handlers;if(!n)return this;if(!e)return this._$handlers={},this;if(t){if(n[e]){for(var o=[],i=0,r=n[e].length;i<r;i++)n[e][i].h!==t&&o.push(n[e][i]);n[e]=o}n[e]&&0===n[e].length&&delete n[e]}else delete n[e];return this},e.prototype.trigger=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var o=this._$handlers[e],i=this._$eventProcessor;if(o)for(var r=t.length,a=o.length,l=0;l<a;l++){var s=o[l];if(!i||!i.filter||null==s.query||i.filter(e,s.query))switch(r){case 0:s.h.call(s.ctx);break;case 1:s.h.call(s.ctx,t[0]);break;case 2:s.h.call(s.ctx,t[0],t[1]);break;default:s.h.apply(s.ctx,t)}}return i&&i.afterTrigger&&i.afterTrigger(e),this},e.prototype.triggerWithContext=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var o=this._$handlers[e],i=this._$eventProcessor;if(o)for(var r=t.length,a=t[r-1],l=o.length,s=0;s<l;s++){var u=o[s];if(!i||!i.filter||null==u.query||i.filter(e,u.query))switch(r){case 0:u.h.call(a);break;case 1:u.h.call(a,t[0]);break;case 2:u.h.call(a,t[0],t[1]);break;default:u.h.apply(a,t.slice(1,r-1))}}return i&&i.afterTrigger&&i.afterTrigger(e),this},e}(),Su=Math.log(2);function Cu(e,t,n,o,i,r){var a=o+"-"+i,l=e.length;if(r.hasOwnProperty(a))return r[a];if(1===t){var s=Math.round(Math.log((1<<l)-1&~i)/Su);return e[n][s]}for(var u=o|1<<n,c=n+1;o&1<<c;)c++;for(var d=0,h=0,p=0;h<l;h++){var f=1<<h;f&i||(d+=(p%2?-1:1)*e[n][h]*Cu(e,t-1,c,u,i|f,r),p++)}return r[a]=d,d}function Mu(e,t){var n=[[e[0],e[1],1,0,0,0,-t[0]*e[0],-t[0]*e[1]],[0,0,0,e[0],e[1],1,-t[1]*e[0],-t[1]*e[1]],[e[2],e[3],1,0,0,0,-t[2]*e[2],-t[2]*e[3]],[0,0,0,e[2],e[3],1,-t[3]*e[2],-t[3]*e[3]],[e[4],e[5],1,0,0,0,-t[4]*e[4],-t[4]*e[5]],[0,0,0,e[4],e[5],1,-t[5]*e[4],-t[5]*e[5]],[e[6],e[7],1,0,0,0,-t[6]*e[6],-t[6]*e[7]],[0,0,0,e[6],e[7],1,-t[7]*e[6],-t[7]*e[7]]],o={},i=Cu(n,8,0,0,0,o);if(0!==i){for(var r=[],a=0;a<8;a++)for(var l=0;l<8;l++)null==r[l]&&(r[l]=0),r[l]+=((a+l)%2?-1:1)*Cu(n,7,0===a?1:0,1<<a,1<<l,o)/i*t[a];return function(e,t,n){var o=t*r[6]+n*r[7]+1;e[0]=(t*r[0]+n*r[1]+r[2])/o,e[1]=(t*r[3]+n*r[4]+r[5])/o}}}var Tu="___zrEVENTSAVED",Iu=[];function ku(e,t,n,o,i){if(t.getBoundingClientRect&&Yl.domSupported&&!Du(t)){var r=t[Tu]||(t[Tu]={}),a=function(e,t){var n=t.markers;if(n)return n;n=t.markers=[];for(var o=["left","right"],i=["top","bottom"],r=0;r<4;r++){var a=document.createElement("div"),l=r%2,s=(r>>1)%2;a.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",o[l]+":0",i[s]+":0",o[1-l]+":auto",i[1-s]+":auto",""].join("!important;"),e.appendChild(a),n.push(a)}return n}(t,r),l=function(e,t,n){for(var o=n?"invTrans":"trans",i=t[o],r=t.srcCoords,a=[],l=[],s=!0,u=0;u<4;u++){var c=e[u].getBoundingClientRect(),d=2*u,h=c.left,p=c.top;a.push(h,p),s=s&&r&&h===r[d]&&p===r[d+1],l.push(e[u].offsetLeft,e[u].offsetTop)}return s&&i?i:(t.srcCoords=a,t[o]=n?Mu(l,a):Mu(a,l))}(a,r,i);if(l)return l(e,n,o),!0}return!1}function Du(e){return"CANVAS"===e.nodeName.toUpperCase()}var Nu=/([&<>"'])/g,Eu={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Au(e){return null==e?"":(e+"").replace(Nu,function(e,t){return Eu[t]})}var Lu=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Vu=[],Ou=Yl.browser.firefox&&+Yl.browser.version.split(".")[0]<39;function Pu(e,t,n,o){return n=n||{},o?Bu(e,t,n):Ou&&null!=t.layerX&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):null!=t.offsetX?(n.zrX=t.offsetX,n.zrY=t.offsetY):Bu(e,t,n),n}function Bu(e,t,n){if(Yl.domSupported&&e.getBoundingClientRect){var o=t.clientX,i=t.clientY;if(Du(e)){var r=e.getBoundingClientRect();return n.zrX=o-r.left,void(n.zrY=i-r.top)}if(ku(Vu,e,o,i))return n.zrX=Vu[0],void(n.zrY=Vu[1])}n.zrX=n.zrY=0}function Ru(e){return e||window.event}function zu(e,t,n){if(null!=(t=Ru(t)).zrX)return t;var o=t.type;if(o&&o.indexOf("touch")>=0){var i="touchend"!==o?t.targetTouches[0]:t.changedTouches[0];i&&Pu(e,i,t,n)}else{Pu(e,t,t,n);var r=function(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,o=e.deltaY;if(null==n||null==o)return t;return 3*(0!==o?Math.abs(o):Math.abs(n))*(o>0?-1:o<0?1:n>0?-1:1)}(t);t.zrDelta=r?r/120:-(t.detail||0)/3}var a=t.button;return null==t.which&&void 0!==a&&Lu.test(t.type)&&(t.which=1&a?1:2&a?3:4&a?2:0),t}function Fu(e,t,n,o){e.addEventListener(t,n,o)}function Gu(e,t,n,o){e.removeEventListener(t,n,o)}var Hu=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function Wu(e){return 2===e.which||3===e.which}var Uu=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var o=e.touches;if(o){for(var i={points:[],touches:[],target:t,event:e},r=0,a=o.length;r<a;r++){var l=o[r],s=Pu(n,l,{});i.points.push([s.zrX,s.zrY]),i.touches.push(l)}this._track.push(i)}},e.prototype._recognize=function(e){for(var t in Zu)if(Zu.hasOwnProperty(t)){var n=Zu[t](this._track,e);if(n)return n}},e}();function Yu(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}var Zu={pinch:function(e,t){var n=e.length;if(n){var o,i=(e[n-1]||{}).points,r=(e[n-2]||{}).points||i;if(r&&r.length>1&&i&&i.length>1){var a=Yu(i)/Yu(r);!isFinite(a)&&(a=1),t.pinchScale=a;var l=[((o=i)[0][0]+o[1][0])/2,(o[0][1]+o[1][1])/2];return t.pinchX=l[0],t.pinchY=l[1],{type:"pinch",target:e[0].target,event:t}}}}};function Xu(){return[1,0,0,1,0,0]}function ju(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function $u(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function qu(e,t,n){var o=t[0]*n[0]+t[2]*n[1],i=t[1]*n[0]+t[3]*n[1],r=t[0]*n[2]+t[2]*n[3],a=t[1]*n[2]+t[3]*n[3],l=t[0]*n[4]+t[2]*n[5]+t[4],s=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=o,e[1]=i,e[2]=r,e[3]=a,e[4]=l,e[5]=s,e}function Ku(e,t,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+n[0],e[5]=t[5]+n[1],e}function Ju(e,t,n,o){void 0===o&&(o=[0,0]);var i=t[0],r=t[2],a=t[4],l=t[1],s=t[3],u=t[5],c=Math.sin(n),d=Math.cos(n);return e[0]=i*d+l*c,e[1]=-i*c+l*d,e[2]=r*d+s*c,e[3]=-r*c+d*s,e[4]=d*(a-o[0])+c*(u-o[1])+o[0],e[5]=d*(u-o[1])-c*(a-o[0])+o[1],e}function Qu(e,t,n){var o=n[0],i=n[1];return e[0]=t[0]*o,e[1]=t[1]*i,e[2]=t[2]*o,e[3]=t[3]*i,e[4]=t[4]*o,e[5]=t[5]*i,e}function ec(e,t){var n=t[0],o=t[2],i=t[4],r=t[1],a=t[3],l=t[5],s=n*a-r*o;return s?(s=1/s,e[0]=a*s,e[1]=-r*s,e[2]=-o*s,e[3]=n*s,e[4]=(o*l-a*i)*s,e[5]=(r*i-n*l)*s,e):null}var tc=function(){function e(e,t){this.x=e||0,this.y=t||0}return e.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(e,t){return this.x=e,this.y=t,this},e.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},e.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},e.prototype.scale=function(e){this.x*=e,this.y*=e},e.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},e.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},e.prototype.dot=function(e){return this.x*e.x+this.y*e.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},e.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},e.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(e){if(e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},e.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},e.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},e.set=function(e,t,n){e.x=t,e.y=n},e.copy=function(e,t){e.x=t.x,e.y=t.y},e.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},e.lenSquare=function(e){return e.x*e.x+e.y*e.y},e.dot=function(e,t){return e.x*t.x+e.y*t.y},e.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},e.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},e.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},e.scaleAndAdd=function(e,t,n,o){e.x=t.x+n.x*o,e.y=t.y+n.y*o},e.lerp=function(e,t,n,o){var i=1-o;e.x=i*t.x+o*n.x,e.y=i*t.y+o*n.y},e}(),nc=Math.min,oc=Math.max,ic=new tc,rc=new tc,ac=new tc,lc=new tc,sc=new tc,uc=new tc,cc=function(){function e(e,t,n,o){n<0&&(e+=n,n=-n),o<0&&(t+=o,o=-o),this.x=e,this.y=t,this.width=n,this.height=o}return e.prototype.union=function(e){var t=nc(e.x,this.x),n=nc(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=oc(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=oc(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=t,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(e){var t=this,n=e.width/t.width,o=e.height/t.height,i=[1,0,0,1,0,0];return Ku(i,i,[-t.x,-t.y]),Qu(i,i,[n,o]),Ku(i,i,[e.x,e.y]),i},e.prototype.intersect=function(t,n){if(!t)return!1;t instanceof e||(t=e.create(t));var o=this,i=o.x,r=o.x+o.width,a=o.y,l=o.y+o.height,s=t.x,u=t.x+t.width,c=t.y,d=t.y+t.height,h=!(r<s||u<i||l<c||d<a);if(n){var p=1/0,f=0,g=Math.abs(r-s),v=Math.abs(u-i),m=Math.abs(l-c),y=Math.abs(d-a),x=Math.min(g,v),_=Math.min(m,y);r<s||u<i?x>f&&(f=x,g<v?tc.set(uc,-g,0):tc.set(uc,v,0)):x<p&&(p=x,g<v?tc.set(sc,g,0):tc.set(sc,-v,0)),l<c||d<a?_>f&&(f=_,m<y?tc.set(uc,0,-m):tc.set(uc,0,y)):x<p&&(p=x,m<y?tc.set(sc,0,m):tc.set(sc,0,-y))}return n&&tc.copy(n,h?sc:uc),h},e.prototype.contain=function(e,t){var n=this;return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(t){e.copy(this,t)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return 0===this.width||0===this.height},e.create=function(t){return new e(t.x,t.y,t.width,t.height)},e.copy=function(e,t){e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height},e.applyTransform=function(t,n,o){if(o){if(o[1]<1e-5&&o[1]>-1e-5&&o[2]<1e-5&&o[2]>-1e-5){var i=o[0],r=o[3],a=o[4],l=o[5];return t.x=n.x*i+a,t.y=n.y*r+l,t.width=n.width*i,t.height=n.height*r,t.width<0&&(t.x+=t.width,t.width=-t.width),void(t.height<0&&(t.y+=t.height,t.height=-t.height))}ic.x=ac.x=n.x,ic.y=lc.y=n.y,rc.x=lc.x=n.x+n.width,rc.y=ac.y=n.y+n.height,ic.transform(o),lc.transform(o),rc.transform(o),ac.transform(o),t.x=nc(ic.x,rc.x,ac.x,lc.x),t.y=nc(ic.y,rc.y,ac.y,lc.y);var s=oc(ic.x,rc.x,ac.x,lc.x),u=oc(ic.y,rc.y,ac.y,lc.y);t.width=s-t.x,t.height=u-t.y}else t!==n&&e.copy(t,n)},e}(),dc="silent";function hc(){Hu(this.event)}var pc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handler=null,t}return Wl(t,e),t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(bu),fc=function(){return function(e,t){this.x=e,this.y=t}}(),gc=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],vc=new cc(0,0,0,0),mc=function(e){function t(t,n,o,i,r){var a=e.call(this)||this;return a._hovered=new fc(0,0),a.storage=t,a.painter=n,a.painterRoot=i,a._pointerSize=r,o=o||new pc,a.proxy=null,a.setHandlerProxy(o),a._draggingMgr=new wu(a),a}return Wl(t,e),t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(ys(gc,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var t=e.zrX,n=e.zrY,o=_c(this,t,n),i=this._hovered,r=i.target;r&&!r.__zr&&(r=(i=this.findHover(i.x,i.y)).target);var a=this._hovered=o?new fc(t,n):this.findHover(t,n),l=a.target,s=this.proxy;s.setCursor&&s.setCursor(l?l.cursor:"default"),r&&l!==r&&this.dispatchToElement(i,"mouseout",e),this.dispatchToElement(a,"mousemove",e),l&&l!==r&&this.dispatchToElement(a,"mouseover",e)},t.prototype.mouseout=function(e){var t=e.zrEventControl;"only_globalout"!==t&&this.dispatchToElement(this._hovered,"mouseout",e),"no_globalout"!==t&&this.trigger("globalout",{type:"globalout",event:e})},t.prototype.resize=function(){this._hovered=new fc(0,0)},t.prototype.dispatch=function(e,t){var n=this[e];n&&n.call(this,t)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},t.prototype.dispatchToElement=function(e,t,n){var o=(e=e||{}).target;if(!o||!o.silent){for(var i="on"+t,r=function(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:hc}}(t,e,n);o&&(o[i]&&(r.cancelBubble=!!o[i].call(o,r)),o.trigger(t,r),o=o.__hostTarget?o.__hostTarget:o.parent,!r.cancelBubble););r.cancelBubble||(this.trigger(t,r),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(e){"function"==typeof e[i]&&e[i].call(e,r),e.trigger&&e.trigger(t,r)}))}},t.prototype.findHover=function(e,t,n){var o=this.storage.getDisplayList(),i=new fc(e,t);if(xc(o,i,e,t,n),this._pointerSize&&!i.target){for(var r=[],a=this._pointerSize,l=a/2,s=new cc(e-l,t-l,a,a),u=o.length-1;u>=0;u--){var c=o[u];c===n||c.ignore||c.ignoreCoarsePointer||c.parent&&c.parent.ignoreCoarsePointer||(vc.copy(c.getBoundingRect()),c.transform&&vc.applyTransform(c.transform),vc.intersect(s)&&r.push(c))}if(r.length)for(var d=Math.PI/12,h=2*Math.PI,p=0;p<l;p+=4)for(var f=0;f<h;f+=d){if(xc(r,i,e+p*Math.cos(f),t+p*Math.sin(f),n),i.target)return i}}return i},t.prototype.processGesture=function(e,t){this._gestureMgr||(this._gestureMgr=new Uu);var n=this._gestureMgr;"start"===t&&n.clear();var o=n.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if("end"===t&&n.clear(),o){var i=o.type;e.gestureEvent=i;var r=new fc;r.target=o.target,this.dispatchToElement(r,i,o.event)}},t}(bu);function yc(e,t,n){if(e[e.rectHover?"rectContain":"contain"](t,n)){for(var o=e,i=void 0,r=!1;o;){if(o.ignoreClip&&(r=!0),!r){var a=o.getClipPath();if(a&&!a.contain(t,n))return!1}o.silent&&(i=!0);var l=o.__hostTarget;o=l||o.parent}return!i||dc}return!1}function xc(e,t,n,o,i){for(var r=e.length-1;r>=0;r--){var a=e[r],l=void 0;if(a!==i&&!a.ignore&&(l=yc(a,n,o))&&(!t.topTarget&&(t.topTarget=a),l!==dc)){t.target=a;break}}}function _c(e,t,n){var o=e.painter;return t<0||t>o.getWidth()||n<0||n>o.getHeight()}ys(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(e){mc.prototype[e]=function(t){var n,o,i=t.zrX,r=t.zrY,a=_c(this,i,r);if("mouseup"===e&&a||(o=(n=this.findHover(i,r)).target),"mousedown"===e)this._downEl=o,this._downPoint=[t.zrX,t.zrY],this._upEl=o;else if("mouseup"===e)this._upEl=o;else if("click"===e){if(this._downEl!==this._upEl||!this._downPoint||fu(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,e,t)}});function wc(e,t,n,o){var i=t+1;if(i===n)return 1;if(o(e[i++],e[t])<0){for(;i<n&&o(e[i],e[i-1])<0;)i++;!function(e,t,n){n--;for(;t<n;){var o=e[t];e[t++]=e[n],e[n--]=o}}(e,t,i)}else for(;i<n&&o(e[i],e[i-1])>=0;)i++;return i-t}function bc(e,t,n,o,i){for(o===t&&o++;o<n;o++){for(var r,a=e[o],l=t,s=o;l<s;)i(a,e[r=l+s>>>1])<0?s=r:l=r+1;var u=o-l;switch(u){case 3:e[l+3]=e[l+2];case 2:e[l+2]=e[l+1];case 1:e[l+1]=e[l];break;default:for(;u>0;)e[l+u]=e[l+u-1],u--}e[l]=a}}function Sc(e,t,n,o,i,r){var a=0,l=0,s=1;if(r(e,t[n+i])>0){for(l=o-i;s<l&&r(e,t[n+i+s])>0;)a=s,(s=1+(s<<1))<=0&&(s=l);s>l&&(s=l),a+=i,s+=i}else{for(l=i+1;s<l&&r(e,t[n+i-s])<=0;)a=s,(s=1+(s<<1))<=0&&(s=l);s>l&&(s=l);var u=a;a=i-s,s=i-u}for(a++;a<s;){var c=a+(s-a>>>1);r(e,t[n+c])>0?a=c+1:s=c}return s}function Cc(e,t,n,o,i,r){var a=0,l=0,s=1;if(r(e,t[n+i])<0){for(l=i+1;s<l&&r(e,t[n+i-s])<0;)a=s,(s=1+(s<<1))<=0&&(s=l);s>l&&(s=l);var u=a;a=i-s,s=i-u}else{for(l=o-i;s<l&&r(e,t[n+i+s])>=0;)a=s,(s=1+(s<<1))<=0&&(s=l);s>l&&(s=l),a+=i,s+=i}for(a++;a<s;){var c=a+(s-a>>>1);r(e,t[n+c])<0?s=c:a=c+1}return s}function Mc(e,t){var n,o,i=7,r=0,a=[];function l(l){var s=n[l],u=o[l],c=n[l+1],d=o[l+1];o[l]=u+d,l===r-3&&(n[l+1]=n[l+2],o[l+1]=o[l+2]),r--;var h=Cc(e[c],e,s,u,0,t);s+=h,0!==(u-=h)&&0!==(d=Sc(e[s+u-1],e,c,d,d-1,t))&&(u<=d?function(n,o,r,l){var s=0;for(s=0;s<o;s++)a[s]=e[n+s];var u=0,c=r,d=n;if(e[d++]=e[c++],0===--l){for(s=0;s<o;s++)e[d+s]=a[u+s];return}if(1===o){for(s=0;s<l;s++)e[d+s]=e[c+s];return void(e[d+l]=a[u])}var h,p,f,g=i;for(;;){h=0,p=0,f=!1;do{if(t(e[c],a[u])<0){if(e[d++]=e[c++],p++,h=0,0===--l){f=!0;break}}else if(e[d++]=a[u++],h++,p=0,1===--o){f=!0;break}}while((h|p)<g);if(f)break;do{if(0!==(h=Cc(e[c],a,u,o,0,t))){for(s=0;s<h;s++)e[d+s]=a[u+s];if(d+=h,u+=h,(o-=h)<=1){f=!0;break}}if(e[d++]=e[c++],0===--l){f=!0;break}if(0!==(p=Sc(a[u],e,c,l,0,t))){for(s=0;s<p;s++)e[d+s]=e[c+s];if(d+=p,c+=p,0===(l-=p)){f=!0;break}}if(e[d++]=a[u++],1===--o){f=!0;break}g--}while(h>=7||p>=7);if(f)break;g<0&&(g=0),g+=2}if((i=g)<1&&(i=1),1===o){for(s=0;s<l;s++)e[d+s]=e[c+s];e[d+l]=a[u]}else{if(0===o)throw new Error;for(s=0;s<o;s++)e[d+s]=a[u+s]}}(s,u,c,d):function(n,o,r,l){var s=0;for(s=0;s<l;s++)a[s]=e[r+s];var u=n+o-1,c=l-1,d=r+l-1,h=0,p=0;if(e[d--]=e[u--],0===--o){for(h=d-(l-1),s=0;s<l;s++)e[h+s]=a[s];return}if(1===l){for(p=(d-=o)+1,h=(u-=o)+1,s=o-1;s>=0;s--)e[p+s]=e[h+s];return void(e[d]=a[c])}var f=i;for(;;){var g=0,v=0,m=!1;do{if(t(a[c],e[u])<0){if(e[d--]=e[u--],g++,v=0,0===--o){m=!0;break}}else if(e[d--]=a[c--],v++,g=0,1===--l){m=!0;break}}while((g|v)<f);if(m)break;do{if(0!==(g=o-Cc(a[c],e,n,o,o-1,t))){for(o-=g,p=(d-=g)+1,h=(u-=g)+1,s=g-1;s>=0;s--)e[p+s]=e[h+s];if(0===o){m=!0;break}}if(e[d--]=a[c--],1===--l){m=!0;break}if(0!==(v=l-Sc(e[u],a,0,l,l-1,t))){for(l-=v,p=(d-=v)+1,h=(c-=v)+1,s=0;s<v;s++)e[p+s]=a[h+s];if(l<=1){m=!0;break}}if(e[d--]=e[u--],0===--o){m=!0;break}f--}while(g>=7||v>=7);if(m)break;f<0&&(f=0),f+=2}(i=f)<1&&(i=1);if(1===l){for(p=(d-=o)+1,h=(u-=o)+1,s=o-1;s>=0;s--)e[p+s]=e[h+s];e[d]=a[c]}else{if(0===l)throw new Error;for(h=d-(l-1),s=0;s<l;s++)e[h+s]=a[s]}}(s,u,c,d))}return n=[],o=[],{mergeRuns:function(){for(;r>1;){var e=r-2;if(e>=1&&o[e-1]<=o[e]+o[e+1]||e>=2&&o[e-2]<=o[e]+o[e-1])o[e-1]<o[e+1]&&e--;else if(o[e]>o[e+1])break;l(e)}},forceMergeRuns:function(){for(;r>1;){var e=r-2;e>0&&o[e-1]<o[e+1]&&e--,l(e)}},pushRun:function(e,t){n[r]=e,o[r]=t,r+=1}}}function Tc(e,t,n,o){n||(n=0),o||(o=e.length);var i=o-n;if(!(i<2)){var r=0;if(i<32)bc(e,n,o,n+(r=wc(e,n,o,t)),t);else{var a=Mc(e,t),l=function(e){for(var t=0;e>=32;)t|=1&e,e>>=1;return e+t}(i);do{if((r=wc(e,n,o,t))<l){var s=i;s>l&&(s=l),bc(e,n,n+s,n+r,t),r=s}a.pushRun(n,r),a.mergeRuns(),i-=r,n+=r}while(0!==i);a.forceMergeRuns()}}}var Ic=!1;function kc(){Ic||(Ic=!0)}function Dc(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var Nc,Ec=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Dc}return e.prototype.traverse=function(e,t){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,t)},e.prototype.getDisplayList=function(e,t){t=t||!1;var n=this._displayList;return!e&&n.length||this.updateDisplayList(t),n},e.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var t=this._roots,n=this._displayList,o=0,i=t.length;o<i;o++)this._updateAndAddDisplayable(t[o],null,e);n.length=this._displayListLen,Tc(n,Dc)},e.prototype._updateAndAddDisplayable=function(e,t,n){if(!e.ignore||n){e.beforeUpdate(),e.update(),e.afterUpdate();var o=e.getClipPath();if(e.ignoreClip)t=null;else if(o){t=t?t.slice():[];for(var i=o,r=e;i;)i.parent=r,i.updateTransform(),t.push(i),r=i,i=i.getClipPath()}if(e.childrenRef){for(var a=e.childrenRef(),l=0;l<a.length;l++){var s=a[l];e.__dirty&&(s.__dirty|=1),this._updateAndAddDisplayable(s,t,n)}e.__dirty=0}else{var u=e;t&&t.length?u.__clipPaths=t:u.__clipPaths&&u.__clipPaths.length>0&&(u.__clipPaths=[]),isNaN(u.z)&&(kc(),u.z=0),isNaN(u.z2)&&(kc(),u.z2=0),isNaN(u.zlevel)&&(kc(),u.zlevel=0),this._displayList[this._displayListLen++]=u}var c=e.getDecalElement&&e.getDecalElement();c&&this._updateAndAddDisplayable(c,t,n);var d=e.getTextGuideLine();d&&this._updateAndAddDisplayable(d,t,n);var h=e.getTextContent();h&&this._updateAndAddDisplayable(h,t,n)}},e.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},e.prototype.delRoot=function(e){if(e instanceof Array)for(var t=0,n=e.length;t<n;t++)this.delRoot(e[t]);else{var o=gs(this._roots,e);o>=0&&this._roots.splice(o,1)}},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}();Nc=Yl.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};var Ac={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return.5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return 0===e?0:Math.pow(1024,e-1)},exponentialOut:function(e){return 1===e?1:1-Math.pow(2,-10*e)},exponentialInOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=.4*Math.asin(1/n)/(2*Math.PI),-n*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/.4))},elasticOut:function(e){var t,n=.1;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/.4)+1)},elasticInOut:function(e){var t,n=.1,o=.4;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=o*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?n*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/o)*-.5:n*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/o)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-Ac.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?.5*Ac.bounceIn(2*e):.5*Ac.bounceOut(2*e-1)+.5}},Lc=Math.pow,Vc=Math.sqrt,Oc=1e-8,Pc=1e-4,Bc=Vc(3),Rc=1/3,zc=ou(),Fc=ou(),Gc=ou();function Hc(e){return e>-1e-8&&e<Oc}function Wc(e){return e>Oc||e<-1e-8}function Uc(e,t,n,o,i){var r=1-i;return r*r*(r*e+3*i*t)+i*i*(i*o+3*r*n)}function Yc(e,t,n,o,i){var r=1-i;return 3*(((t-e)*r+2*(n-t)*i)*r+(o-n)*i*i)}function Zc(e,t,n,o,i,r){var a=o+3*(t-n)-e,l=3*(n-2*t+e),s=3*(t-e),u=e-i,c=l*l-3*a*s,d=l*s-9*a*u,h=s*s-3*l*u,p=0;if(Hc(c)&&Hc(d)){if(Hc(l))r[0]=0;else(C=-s/l)>=0&&C<=1&&(r[p++]=C)}else{var f=d*d-4*c*h;if(Hc(f)){var g=d/c,v=-g/2;(C=-l/a+g)>=0&&C<=1&&(r[p++]=C),v>=0&&v<=1&&(r[p++]=v)}else if(f>0){var m=Vc(f),y=c*l+1.5*a*(-d+m),x=c*l+1.5*a*(-d-m);(C=(-l-((y=y<0?-Lc(-y,Rc):Lc(y,Rc))+(x=x<0?-Lc(-x,Rc):Lc(x,Rc))))/(3*a))>=0&&C<=1&&(r[p++]=C)}else{var _=(2*c*l-3*a*d)/(2*Vc(c*c*c)),w=Math.acos(_)/3,b=Vc(c),S=Math.cos(w),C=(-l-2*b*S)/(3*a),M=(v=(-l+b*(S+Bc*Math.sin(w)))/(3*a),(-l+b*(S-Bc*Math.sin(w)))/(3*a));C>=0&&C<=1&&(r[p++]=C),v>=0&&v<=1&&(r[p++]=v),M>=0&&M<=1&&(r[p++]=M)}}return p}function Xc(e,t,n,o,i){var r=6*n-12*t+6*e,a=9*t+3*o-3*e-9*n,l=3*t-3*e,s=0;if(Hc(a)){if(Wc(r))(c=-l/r)>=0&&c<=1&&(i[s++]=c)}else{var u=r*r-4*a*l;if(Hc(u))i[0]=-r/(2*a);else if(u>0){var c,d=Vc(u),h=(-r-d)/(2*a);(c=(-r+d)/(2*a))>=0&&c<=1&&(i[s++]=c),h>=0&&h<=1&&(i[s++]=h)}}return s}function jc(e,t,n,o,i,r){var a=(t-e)*i+e,l=(n-t)*i+t,s=(o-n)*i+n,u=(l-a)*i+a,c=(s-l)*i+l,d=(c-u)*i+u;r[0]=e,r[1]=a,r[2]=u,r[3]=d,r[4]=d,r[5]=c,r[6]=s,r[7]=o}function $c(e,t,n,o,i,r,a,l,s,u,c){var d,h,p,f,g,v=.005,m=1/0;zc[0]=s,zc[1]=u;for(var y=0;y<1;y+=.05)Fc[0]=Uc(e,n,i,a,y),Fc[1]=Uc(t,o,r,l,y),(f=gu(zc,Fc))<m&&(d=y,m=f);m=1/0;for(var x=0;x<32&&!(v<Pc);x++)h=d-v,p=d+v,Fc[0]=Uc(e,n,i,a,h),Fc[1]=Uc(t,o,r,l,h),f=gu(Fc,zc),h>=0&&f<m?(d=h,m=f):(Gc[0]=Uc(e,n,i,a,p),Gc[1]=Uc(t,o,r,l,p),g=gu(Gc,zc),p<=1&&g<m?(d=p,m=g):v*=.5);return c&&(c[0]=Uc(e,n,i,a,d),c[1]=Uc(t,o,r,l,d)),Vc(m)}function qc(e,t,n,o,i,r,a,l,s){for(var u=e,c=t,d=0,h=1/s,p=1;p<=s;p++){var f=p*h,g=Uc(e,n,i,a,f),v=Uc(t,o,r,l,f),m=g-u,y=v-c;d+=Math.sqrt(m*m+y*y),u=g,c=v}return d}function Kc(e,t,n,o){var i=1-o;return i*(i*e+2*o*t)+o*o*n}function Jc(e,t,n,o){return 2*((1-o)*(t-e)+o*(n-t))}function Qc(e,t,n){var o=e+n-2*t;return 0===o?.5:(e-t)/o}function ed(e,t,n,o,i){var r=(t-e)*o+e,a=(n-t)*o+t,l=(a-r)*o+r;i[0]=e,i[1]=r,i[2]=l,i[3]=l,i[4]=a,i[5]=n}function td(e,t,n,o,i,r,a,l,s){var u,c=.005,d=1/0;zc[0]=a,zc[1]=l;for(var h=0;h<1;h+=.05){Fc[0]=Kc(e,n,i,h),Fc[1]=Kc(t,o,r,h),(v=gu(zc,Fc))<d&&(u=h,d=v)}d=1/0;for(var p=0;p<32&&!(c<Pc);p++){var f=u-c,g=u+c;Fc[0]=Kc(e,n,i,f),Fc[1]=Kc(t,o,r,f);var v=gu(Fc,zc);if(f>=0&&v<d)u=f,d=v;else{Gc[0]=Kc(e,n,i,g),Gc[1]=Kc(t,o,r,g);var m=gu(Gc,zc);g<=1&&m<d?(u=g,d=m):c*=.5}}return s&&(s[0]=Kc(e,n,i,u),s[1]=Kc(t,o,r,u)),Vc(d)}function nd(e,t,n,o,i,r,a){for(var l=e,s=t,u=0,c=1/a,d=1;d<=a;d++){var h=d*c,p=Kc(e,n,i,h),f=Kc(t,o,r,h),g=p-l,v=f-s;u+=Math.sqrt(g*g+v*v),l=p,s=f}return u}var od=/cubic-bezier\(([0-9,\.e ]+)\)/;function id(e){var t=e&&od.exec(e);if(t){var n=t[1].split(","),o=+Ws(n[0]),i=+Ws(n[1]),r=+Ws(n[2]),a=+Ws(n[3]);if(isNaN(o+i+r+a))return;var l=[];return function(e){return e<=0?0:e>=1?1:Zc(0,o,r,1,e,l)&&Uc(0,i,a,1,l[0])}}}var rd=function(){function e(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||tu,this.ondestroy=e.ondestroy||tu,this.onrestart=e.onrestart||tu,e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),!this._paused){var n=this._life,o=e-this._startTime-this._pausedTime,i=o/n;i<0&&(i=0),i=Math.min(i,1);var r=this.easingFunc,a=r?r(i):i;if(this.onframe(a),1===i){if(!this.loop)return!0;var l=o%n;this._startTime=e-l,this._pausedTime=0,this.onrestart()}return!1}this._pausedTime+=t},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=Ts(e)?e:Ac[e]||id(e)},e}(),ad=function(){return function(e){this.value=e}}(),ld=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new ad(e);return this.insertEntry(t),t},e.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},e.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}(),sd=function(){function e(e){this._list=new ld,this._maxSize=10,this._map={},this._maxSize=e}return e.prototype.put=function(e,t){var n=this._list,o=this._map,i=null;if(null==o[e]){var r=n.len(),a=this._lastRemovedEntry;if(r>=this._maxSize&&r>0){var l=n.head;n.remove(l),delete o[l.key],i=l.value,this._lastRemovedEntry=l}a?a.value=t:a=new ad(t),a.key=e,n.insertEntry(a),o[e]=a}return i},e.prototype.get=function(e){var t=this._map[e],n=this._list;if(null!=t)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}(),ud={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function cd(e){return(e=Math.round(e))<0?0:e>255?255:e}function dd(e){return e<0?0:e>1?1:e}function hd(e){var t=e;return t.length&&"%"===t.charAt(t.length-1)?cd(parseFloat(t)/100*255):cd(parseInt(t,10))}function pd(e){var t=e;return t.length&&"%"===t.charAt(t.length-1)?dd(parseFloat(t)/100):dd(parseFloat(t))}function fd(e,t,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?e+(t-e)*n*6:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}function gd(e,t,n){return e+(t-e)*n}function vd(e,t,n,o,i){return e[0]=t,e[1]=n,e[2]=o,e[3]=i,e}function md(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var yd=new sd(20),xd=null;function _d(e,t){xd&&md(xd,t),xd=yd.put(e,xd||t.slice())}function wd(e,t){if(e){t=t||[];var n=yd.get(e);if(n)return md(t,n);var o=(e+="").replace(/ /g,"").toLowerCase();if(o in ud)return md(t,ud[o]),_d(e,t),t;var i,r=o.length;if("#"===o.charAt(0))return 4===r||5===r?(i=parseInt(o.slice(1,4),16))>=0&&i<=4095?(vd(t,(3840&i)>>4|(3840&i)>>8,240&i|(240&i)>>4,15&i|(15&i)<<4,5===r?parseInt(o.slice(4),16)/15:1),_d(e,t),t):void vd(t,0,0,0,1):7===r||9===r?(i=parseInt(o.slice(1,7),16))>=0&&i<=16777215?(vd(t,(16711680&i)>>16,(65280&i)>>8,255&i,9===r?parseInt(o.slice(7),16)/255:1),_d(e,t),t):void vd(t,0,0,0,1):void 0;var a=o.indexOf("("),l=o.indexOf(")");if(-1!==a&&l+1===r){var s=o.substr(0,a),u=o.substr(a+1,l-(a+1)).split(","),c=1;switch(s){case"rgba":if(4!==u.length)return 3===u.length?vd(t,+u[0],+u[1],+u[2],1):vd(t,0,0,0,1);c=pd(u.pop());case"rgb":return u.length>=3?(vd(t,hd(u[0]),hd(u[1]),hd(u[2]),3===u.length?c:pd(u[3])),_d(e,t),t):void vd(t,0,0,0,1);case"hsla":return 4!==u.length?void vd(t,0,0,0,1):(u[3]=pd(u[3]),bd(u,t),_d(e,t),t);case"hsl":return 3!==u.length?void vd(t,0,0,0,1):(bd(u,t),_d(e,t),t);default:return}}vd(t,0,0,0,1)}}function bd(e,t){var n=(parseFloat(e[0])%360+360)%360/360,o=pd(e[1]),i=pd(e[2]),r=i<=.5?i*(o+1):i+o-i*o,a=2*i-r;return vd(t=t||[],cd(255*fd(a,r,n+1/3)),cd(255*fd(a,r,n)),cd(255*fd(a,r,n-1/3)),1),4===e.length&&(t[3]=e[3]),t}function Sd(e,t){var n=wd(e);if(n){for(var o=0;o<3;o++)n[o]=t<0?n[o]*(1-t)|0:(255-n[o])*t+n[o]|0,n[o]>255?n[o]=255:n[o]<0&&(n[o]=0);return Id(n,4===n.length?"rgba":"rgb")}}function Cd(e,t,n){if(t&&t.length&&e>=0&&e<=1){n=n||[];var o=e*(t.length-1),i=Math.floor(o),r=Math.ceil(o),a=t[i],l=t[r],s=o-i;return n[0]=cd(gd(a[0],l[0],s)),n[1]=cd(gd(a[1],l[1],s)),n[2]=cd(gd(a[2],l[2],s)),n[3]=dd(gd(a[3],l[3],s)),n}}function Md(e,t,n,o){var i=wd(e);if(e)return i=function(e){if(e){var t,n,o=e[0]/255,i=e[1]/255,r=e[2]/255,a=Math.min(o,i,r),l=Math.max(o,i,r),s=l-a,u=(l+a)/2;if(0===s)t=0,n=0;else{n=u<.5?s/(l+a):s/(2-l-a);var c=((l-o)/6+s/2)/s,d=((l-i)/6+s/2)/s,h=((l-r)/6+s/2)/s;o===l?t=h-d:i===l?t=1/3+c-h:r===l&&(t=2/3+d-c),t<0&&(t+=1),t>1&&(t-=1)}var p=[360*t,n,u];return null!=e[3]&&p.push(e[3]),p}}(i),null!=t&&(i[0]=function(e){return(e=Math.round(e))<0?0:e>360?360:e}(t)),null!=n&&(i[1]=pd(n)),null!=o&&(i[2]=pd(o)),Id(bd(i),"rgba")}function Td(e,t){var n=wd(e);if(n&&null!=t)return n[3]=dd(t),Id(n,"rgba")}function Id(e,t){if(e&&e.length){var n=e[0]+","+e[1]+","+e[2];return"rgba"!==t&&"hsva"!==t&&"hsla"!==t||(n+=","+e[3]),t+"("+n+")"}}function kd(e,t){var n=wd(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var Dd=new sd(100);function Nd(e){if(Is(e)){var t=Dd.get(e);return t||(t=Sd(e,-.1),Dd.put(e,t)),t}if(Vs(e)){var n=ps({},e);return n.colorStops=xs(e.colorStops,function(e){return{offset:e.offset,color:Sd(e.color,-.1)}}),n}return e}var Ed=Math.round;function Ad(e){var t;if(e&&"transparent"!==e){if("string"==typeof e&&e.indexOf("rgba")>-1){var n=wd(e);n&&(e="rgb("+n[0]+","+n[1]+","+n[2]+")",t=n[3])}}else e="none";return{color:e,opacity:null==t?1:t}}var Ld=1e-4;function Vd(e){return e<Ld&&e>-1e-4}function Od(e){return Ed(1e3*e)/1e3}function Pd(e){return Ed(1e4*e)/1e4}var Bd={left:"start",right:"end",center:"middle",middle:"middle"};function Rd(e){return e&&!!e.image}function zd(e){return Rd(e)||function(e){return e&&!!e.svgElement}(e)}function Fd(e){return"linear"===e.type}function Gd(e){return"radial"===e.type}function Hd(e){return e&&("linear"===e.type||"radial"===e.type)}function Wd(e){return"url(#"+e+")"}function Ud(e){var t=e.getGlobalScale(),n=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(n)/Math.log(10)),1)}function Yd(e){var t=e.x||0,n=e.y||0,o=(e.rotation||0)*nu,i=Rs(e.scaleX,1),r=Rs(e.scaleY,1),a=e.skewX||0,l=e.skewY||0,s=[];return(t||n)&&s.push("translate("+t+"px,"+n+"px)"),o&&s.push("rotate("+o+")"),1===i&&1===r||s.push("scale("+i+","+r+")"),(a||l)&&s.push("skew("+Ed(a*nu)+"deg, "+Ed(l*nu)+"deg)"),s.join(" ")}var Zd=Yl.hasGlobalWindow&&Ts(window.btoa)?function(e){return window.btoa(unescape(encodeURIComponent(e)))}:"undefined"!=typeof Buffer?function(e){return Buffer.from(e).toString("base64")}:function(e){return"production"!==process.env.NODE_ENV&&us("Base64 isn't natively supported in the current environment."),null},Xd=Array.prototype.slice;function jd(e,t,n){return(t-e)*n+e}function $d(e,t,n,o){for(var i=t.length,r=0;r<i;r++)e[r]=jd(t[r],n[r],o);return e}function qd(e,t,n,o){for(var i=t.length,r=0;r<i;r++)e[r]=t[r]+n[r]*o;return e}function Kd(e,t,n,o){for(var i=t.length,r=i&&t[0].length,a=0;a<i;a++){e[a]||(e[a]=[]);for(var l=0;l<r;l++)e[a][l]=t[a][l]+n[a][l]*o}return e}function Jd(e,t){for(var n=e.length,o=t.length,i=n>o?t:e,r=Math.min(n,o),a=i[r-1]||{color:[0,0,0,0],offset:0},l=r;l<Math.max(n,o);l++)i.push({offset:a.offset,color:a.color.slice()})}function Qd(e,t,n){var o=e,i=t;if(o.push&&i.push){var r=o.length,a=i.length;if(r!==a)if(r>a)o.length=a;else for(var l=r;l<a;l++)o.push(1===n?i[l]:Xd.call(i[l]));var s=o[0]&&o[0].length;for(l=0;l<o.length;l++)if(1===n)isNaN(o[l])&&(o[l]=i[l]);else for(var u=0;u<s;u++)isNaN(o[l][u])&&(o[l][u]=i[l][u])}}function eh(e){if(ms(e)){var t=e.length;if(ms(e[0])){for(var n=[],o=0;o<t;o++)n.push(Xd.call(e[o]));return n}return Xd.call(e)}return e}function th(e){return e[0]=Math.floor(e[0])||0,e[1]=Math.floor(e[1])||0,e[2]=Math.floor(e[2])||0,e[3]=null==e[3]?1:e[3],"rgba("+e.join(",")+")"}function nh(e){return 4===e||5===e}function oh(e){return 1===e||2===e}var ih=[0,0,0,0],rh=function(){function e(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return e.prototype.isFinished=function(){return this._finished},e.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},e.prototype.needsAnimate=function(){return this.keyframes.length>=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var o=this.keyframes,i=o.length,r=!1,a=6,l=t;if(ms(t)){var s=function(e){return ms(e&&e[0])?2:1}(t);a=s,(1===s&&!Ds(t[0])||2===s&&!Ds(t[0][0]))&&(r=!0)}else if(Ds(t)&&!Ps(t))a=0;else if(Is(t))if(isNaN(+t)){var u=wd(t);u&&(l=u,a=3)}else a=0;else if(Vs(t)){var c=ps({},l);c.colorStops=xs(t.colorStops,function(e){return{offset:e.offset,color:wd(e.color)}}),Fd(t)?a=4:Gd(t)&&(a=5),l=c}0===i?this.valType=a:a===this.valType&&6!==a||(r=!0),this.discrete=this.discrete||r;var d={time:e,value:l,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=Ts(n)?n:Ac[n]||id(n)),o.push(d),d},e.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(e,t){return e.time-t.time});for(var o=this.valType,i=n.length,r=n[i-1],a=this.discrete,l=oh(o),s=nh(o),u=0;u<i;u++){var c=n[u],d=c.value,h=r.value;c.percent=c.time/e,a||(l&&u!==i-1?Qd(d,h,o):s&&Jd(d.colorStops,h.colorStops))}if(!a&&5!==o&&t&&this.needsAnimate()&&t.needsAnimate()&&o===t.valType&&!t._finished){this._additiveTrack=t;var p=n[0].value;for(u=0;u<i;u++)0===o?n[u].additiveValue=n[u].value-p:3===o?n[u].additiveValue=qd([],n[u].value,p,-1):oh(o)&&(n[u].additiveValue=1===o?qd([],n[u].value,p,-1):Kd([],n[u].value,p,-1))}},e.prototype.step=function(e,t){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n,o,i,r=null!=this._additiveTrack,a=r?"additiveValue":"value",l=this.valType,s=this.keyframes,u=s.length,c=this.propName,d=3===l,h=this._lastFr,p=Math.min;if(1===u)o=i=s[0];else{if(t<0)n=0;else if(t<this._lastFrP){for(n=p(h+1,u-1);n>=0&&!(s[n].percent<=t);n--);n=p(n,u-2)}else{for(n=h;n<u&&!(s[n].percent>t);n++);n=p(n-1,u-2)}i=s[n+1],o=s[n]}if(o&&i){this._lastFr=n,this._lastFrP=t;var f=i.percent-o.percent,g=0===f?1:p((t-o.percent)/f,1);i.easingFunc&&(g=i.easingFunc(g));var v=r?this._additiveValue:d?ih:e[c];if(!oh(l)&&!d||v||(v=this._additiveValue=[]),this.discrete)e[c]=g<1?o.rawValue:i.rawValue;else if(oh(l))1===l?$d(v,o[a],i[a],g):function(e,t,n,o){for(var i=t.length,r=i&&t[0].length,a=0;a<i;a++){e[a]||(e[a]=[]);for(var l=0;l<r;l++)e[a][l]=jd(t[a][l],n[a][l],o)}}(v,o[a],i[a],g);else if(nh(l)){var m=o[a],y=i[a],x=4===l;e[c]={type:x?"linear":"radial",x:jd(m.x,y.x,g),y:jd(m.y,y.y,g),colorStops:xs(m.colorStops,function(e,t){var n=y.colorStops[t];return{offset:jd(e.offset,n.offset,g),color:th($d([],e.color,n.color,g))}}),global:y.global},x?(e[c].x2=jd(m.x2,y.x2,g),e[c].y2=jd(m.y2,y.y2,g)):e[c].r=jd(m.r,y.r,g)}else if(d)$d(v,o[a],i[a],g),r||(e[c]=th(v));else{var _=jd(o[a],i[a],g);r?this._additiveValue=_:e[c]=_}r&&this._addToTarget(e)}}},e.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,o=this._additiveValue;0===t?e[n]=e[n]+o:3===t?(wd(e[n],ih),qd(ih,ih,o,1),e[n]=th(ih)):1===t?qd(e[n],e[n],o,1):2===t&&Kd(e[n],e[n],o,1)},e}(),ah=function(){function e(e,t,n,o){this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&o?us("Can' use additive animation on looped animation."):(this._additiveAnimators=o,this._allowDiscrete=n)}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(e){this._target=e},e.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,bs(t),n)},e.prototype.whenWithKeys=function(e,t,n,o){for(var i=this._tracks,r=0;r<n.length;r++){var a=n[r],l=i[a];if(!l){l=i[a]=new rh(a);var s=void 0,u=this._getAdditiveTrack(a);if(u){var c=u.keyframes,d=c[c.length-1];s=d&&d.value,3===u.valType&&s&&(s=th(s))}else s=this._target[a];if(null==s)continue;e>0&&l.addKeyframe(0,eh(s),o),this._trackKeys.push(a)}l.addKeyframe(e,eh(t[a]),o)}return this._maxTime=Math.max(this._maxTime,e),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n<t;n++)e[n].call(this)},e.prototype._abortedCallback=function(){this._setTracksFinished();var e=this.animation,t=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,t)for(var n=0;n<t.length;n++)t[n].call(this)},e.prototype._setTracksFinished=function(){for(var e=this._tracks,t=this._trackKeys,n=0;n<t.length;n++)e[t[n]].setFinished()},e.prototype._getAdditiveTrack=function(e){var t,n=this._additiveAnimators;if(n)for(var o=0;o<n.length;o++){var i=n[o].getTrack(e);i&&(t=i)}return t},e.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var t=this,n=[],o=this._maxTime||0,i=0;i<this._trackKeys.length;i++){var r=this._trackKeys[i],a=this._tracks[r],l=this._getAdditiveTrack(r),s=a.keyframes,u=s.length;if(a.prepare(o,l),a.needsAnimate())if(!this._allowDiscrete&&a.discrete){var c=s[u-1];c&&(t._target[a.propName]=c.rawValue),a.setFinished()}else n.push(a)}if(n.length||this._force){var d=new rd({life:o,loop:this._loop,delay:this._delay||0,onframe:function(e){t._started=2;var o=t._additiveAnimators;if(o){for(var i=!1,r=0;r<o.length;r++)if(o[r]._clip){i=!0;break}i||(t._additiveAnimators=null)}for(r=0;r<n.length;r++)n[r].step(t._target,e);var a=t._onframeCbs;if(a)for(r=0;r<a.length;r++)a[r](t._target,e)},ondestroy:function(){t._doneCallback()}});this._clip=d,this.animation&&this.animation.addClip(d),e&&d.setEasing(e)}else this._doneCallback();return this}},e.prototype.stop=function(e){if(this._clip){var t=this._clip;e&&t.onframe(1),this._abortedCallback()}},e.prototype.delay=function(e){return this._delay=e,this},e.prototype.during=function(e){return e&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(e)),this},e.prototype.done=function(e){return e&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(e)),this},e.prototype.aborted=function(e){return e&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(e)),this},e.prototype.getClip=function(){return this._clip},e.prototype.getTrack=function(e){return this._tracks[e]},e.prototype.getTracks=function(){var e=this;return xs(this._trackKeys,function(t){return e._tracks[t]})},e.prototype.stopTracks=function(e,t){if(!e.length||!this._clip)return!0;for(var n=this._tracks,o=this._trackKeys,i=0;i<e.length;i++){var r=n[e[i]];r&&!r.isFinished()&&(t?r.step(this._target,1):1===this._started&&r.step(this._target,0),r.setFinished())}var a=!0;for(i=0;i<o.length;i++)if(!n[o[i]].isFinished()){a=!1;break}return a&&this._abortedCallback(),a},e.prototype.saveTo=function(e,t,n){if(e){t=t||this._trackKeys;for(var o=0;o<t.length;o++){var i=t[o],r=this._tracks[i];if(r&&!r.isFinished()){var a=r.keyframes,l=a[n?0:a.length-1];l&&(e[i]=eh(l.rawValue))}}}},e.prototype.__changeFinalValue=function(e,t){t=t||bs(e);for(var n=0;n<t.length;n++){var o=t[n],i=this._tracks[o];if(i){var r=i.keyframes;if(r.length>1){var a=r.pop();i.addKeyframe(a.time,e[o]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},e}();function lh(){return(new Date).getTime()}var sh,uh,ch=function(e){function t(t){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t=t||{},n.stage=t.stage||{},n}return Wl(t,e),t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var t=e.getClip();t&&this.addClip(t)},t.prototype.removeClip=function(e){if(e.animation){var t=e.prev,n=e.next;t?t.next=n:this._head=n,n?n.prev=t:this._tail=t,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},t.prototype.update=function(e){for(var t=lh()-this._pausedTime,n=t-this._time,o=this._head;o;){var i=o.next;o.step(t,n)?(o.ondestroy(),this.removeClip(o),o=i):o=i}this._time=t,e||(this.trigger("frame",n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0,Nc(function t(){e._running&&(Nc(t),!e._paused&&e.update())})},t.prototype.start=function(){this._running||(this._time=lh(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=lh(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=lh()-this._pauseStart,this._paused=!1)},t.prototype.clear=function(){for(var e=this._head;e;){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null},t.prototype.isFinished=function(){return null==this._head},t.prototype.animate=function(e,t){t=t||{},this.start();var n=new ah(e,t.loop);return this.addAnimator(n),n},t}(bu),dh=Yl.domSupported,hh=(uh={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:sh=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:xs(sh,function(e){var t=e.replace("mouse","pointer");return uh.hasOwnProperty(t)?t:e})}),ph=["mousemove","mouseup"],fh=["pointermove","pointerup"],gh=!1;function vh(e){var t=e.pointerType;return"pen"===t||"touch"===t}function mh(e){e&&(e.zrByTouch=!0)}function yh(e,t){for(var n=t,o=!1;n&&9!==n.nodeType&&!(o=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return o}var xh=function(){return function(e,t){this.stopPropagation=tu,this.stopImmediatePropagation=tu,this.preventDefault=tu,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}}(),_h={mousedown:function(e){e=zu(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=zu(this.dom,e);var t=this.__mayPointerCapture;!t||e.zrX===t[0]&&e.zrY===t[1]||this.__togglePointerCapture(!0),this.trigger("mousemove",e)},mouseup:function(e){e=zu(this.dom,e),this.__togglePointerCapture(!1),this.trigger("mouseup",e)},mouseout:function(e){yh(this,(e=zu(this.dom,e)).toElement||e.relatedTarget)||(this.__pointerCapturing&&(e.zrEventControl="no_globalout"),this.trigger("mouseout",e))},wheel:function(e){gh=!0,e=zu(this.dom,e),this.trigger("mousewheel",e)},mousewheel:function(e){gh||(e=zu(this.dom,e),this.trigger("mousewheel",e))},touchstart:function(e){mh(e=zu(this.dom,e)),this.__lastTouchMoment=new Date,this.handler.processGesture(e,"start"),_h.mousemove.call(this,e),_h.mousedown.call(this,e)},touchmove:function(e){mh(e=zu(this.dom,e)),this.handler.processGesture(e,"change"),_h.mousemove.call(this,e)},touchend:function(e){mh(e=zu(this.dom,e)),this.handler.processGesture(e,"end"),_h.mouseup.call(this,e),+new Date-+this.__lastTouchMoment<300&&_h.click.call(this,e)},pointerdown:function(e){_h.mousedown.call(this,e)},pointermove:function(e){vh(e)||_h.mousemove.call(this,e)},pointerup:function(e){_h.mouseup.call(this,e)},pointerout:function(e){vh(e)||_h.mouseout.call(this,e)}};ys(["click","dblclick","contextmenu"],function(e){_h[e]=function(t){t=zu(this.dom,t),this.trigger(e,t)}});var wh={pointermove:function(e){vh(e)||wh.mousemove.call(this,e)},pointerup:function(e){wh.mouseup.call(this,e)},mousemove:function(e){this.trigger("mousemove",e)},mouseup:function(e){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",e),t&&(e.zrEventControl="only_globalout",this.trigger("mouseout",e))}};function bh(e,t){var n=t.domHandlers;Yl.pointerEventsSupported?ys(hh.pointer,function(o){Ch(t,o,function(t){n[o].call(e,t)})}):(Yl.touchEventsSupported&&ys(hh.touch,function(o){Ch(t,o,function(i){n[o].call(e,i),function(e){e.touching=!0,null!=e.touchTimer&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}(t)})}),ys(hh.mouse,function(o){Ch(t,o,function(i){i=Ru(i),t.touching||n[o].call(e,i)})}))}function Sh(e,t){function n(n){Ch(t,n,function(o){o=Ru(o),yh(e,o.target)||(o=function(e,t){return zu(e.dom,new xh(e,t),!0)}(e,o),t.domHandlers[n].call(e,o))},{capture:!0})}Yl.pointerEventsSupported?ys(fh,n):Yl.touchEventsSupported||ys(ph,n)}function Ch(e,t,n,o){e.mounted[t]=n,e.listenerOpts[t]=o,Fu(e.domTarget,t,n,o)}function Mh(e){var t=e.mounted;for(var n in t)t.hasOwnProperty(n)&&Gu(e.domTarget,n,t[n],e.listenerOpts[n]);e.mounted={}}var Th=function(){return function(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t}}(),Ih=function(e){function t(t,n){var o=e.call(this)||this;return o.__pointerCapturing=!1,o.dom=t,o.painterRoot=n,o._localHandlerScope=new Th(t,_h),dh&&(o._globalHandlerScope=new Th(document,wh)),bh(o,o._localHandlerScope),o}return Wl(t,e),t.prototype.dispose=function(){Mh(this._localHandlerScope),dh&&Mh(this._globalHandlerScope)},t.prototype.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||"default")},t.prototype.__togglePointerCapture=function(e){if(this.__mayPointerCapture=null,dh&&+this.__pointerCapturing^+e){this.__pointerCapturing=e;var t=this._globalHandlerScope;e?Sh(this,t):Mh(t)}},t}(bu),kh=1;Yl.hasGlobalWindow&&(kh=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Dh=kh,Nh="#333",Eh="#ccc",Ah=ju,Lh=5e-5;function Vh(e){return e>Lh||e<-5e-5}var Oh=[],Ph=[],Bh=[1,0,0,1,0,0],Rh=Math.abs,zh=function(){function e(){}var t;return e.prototype.getLocalTransform=function(t){return e.getLocalTransform(this,t)},e.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},e.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},e.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},e.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},e.prototype.needLocalTransform=function(){return Vh(this.rotation)||Vh(this.x)||Vh(this.y)||Vh(this.scaleX-1)||Vh(this.scaleY-1)||Vh(this.skewX)||Vh(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;t||e?(n=n||[1,0,0,1,0,0],t?this.getLocalTransform(n):Ah(n),e&&(t?qu(n,e,n):$u(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)):n&&(Ah(n),this.invTransform=null)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(null!=t&&1!==t){this.getGlobalScale(Oh);var n=Oh[0]<0?-1:1,o=Oh[1]<0?-1:1,i=((Oh[0]-n)*t+n)/Oh[0]||0,r=((Oh[1]-o)*t+o)/Oh[1]||0;e[0]*=i,e[1]*=i,e[2]*=r,e[3]*=r}this.invTransform=this.invTransform||[1,0,0,1,0,0],ec(this.invTransform,e)},e.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},e.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],o=Math.atan2(e[1],e[0]),i=Math.PI/2+o-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-o,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||[1,0,0,1,0,0],qu(Ph,e.invTransform,t),t=Ph);var n=this.originX,o=this.originY;(n||o)&&(Bh[4]=n,Bh[5]=o,qu(Ph,t,Bh),Ph[4]-=n,Ph[5]-=o,t=Ph),this.setLocalTransform(t)}},e.prototype.getGlobalScale=function(e){var t=this.transform;return e=e||[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},e.prototype.transformCoordToLocal=function(e,t){var n=[e,t],o=this.invTransform;return o&&mu(n,n,o),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],o=this.transform;return o&&mu(n,n,o),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&Rh(e[0]-1)>1e-10&&Rh(e[3]-1)>1e-10?Math.sqrt(Rh(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){Gh(this,e)},e.getLocalTransform=function(e,t){t=t||[];var n=e.originX||0,o=e.originY||0,i=e.scaleX,r=e.scaleY,a=e.anchorX,l=e.anchorY,s=e.rotation||0,u=e.x,c=e.y,d=e.skewX?Math.tan(e.skewX):0,h=e.skewY?Math.tan(-e.skewY):0;if(n||o||a||l){var p=n+a,f=o+l;t[4]=-p*i-d*f*r,t[5]=-f*r-h*p*i}else t[4]=t[5]=0;return t[0]=i,t[3]=r,t[1]=h*i,t[2]=d*r,s&&Ju(t,t,s),t[4]+=n+u,t[5]+=o+c,t},e.initDefaultProps=((t=e.prototype).scaleX=t.scaleY=t.globalScaleRatio=1,void(t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0)),e}(),Fh=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function Gh(e,t){for(var n=0;n<Fh.length;n++){var o=Fh[n];e[o]=t[o]}}var Hh={};function Wh(e,t){var n=Hh[t=t||Xl];n||(n=Hh[t]=new sd(500));var o=n.get(e);return null==o&&(o=$l.measureText(e,t).width,n.put(e,o)),o}function Uh(e,t,n,o){var i=Wh(e,t),r=jh(t),a=Zh(0,i,n),l=Xh(0,r,o);return new cc(a,l,i,r)}function Yh(e,t,n,o){var i=((e||"")+"").split("\n");if(1===i.length)return Uh(i[0],t,n,o);for(var r=new cc(0,0,0,0),a=0;a<i.length;a++){var l=Uh(i[a],t,n,o);0===a?r.copy(l):r.union(l)}return r}function Zh(e,t,n){return"right"===n?e-=t:"center"===n&&(e-=t/2),e}function Xh(e,t,n){return"middle"===n?e-=t/2:"bottom"===n&&(e-=t),e}function jh(e){return Wh("国",e)}function $h(e,t){return"string"==typeof e?e.lastIndexOf("%")>=0?parseFloat(e)/100*t:parseFloat(e):e}function qh(e,t,n){var o=t.position||"inside",i=null!=t.distance?t.distance:5,r=n.height,a=n.width,l=r/2,s=n.x,u=n.y,c="left",d="top";if(o instanceof Array)s+=$h(o[0],n.width),u+=$h(o[1],n.height),c=null,d=null;else switch(o){case"left":s-=i,u+=l,c="right",d="middle";break;case"right":s+=i+a,u+=l,d="middle";break;case"top":s+=a/2,u-=i,c="center",d="bottom";break;case"bottom":s+=a/2,u+=r+i,c="center";break;case"inside":s+=a/2,u+=l,c="center",d="middle";break;case"insideLeft":s+=i,u+=l,d="middle";break;case"insideRight":s+=a-i,u+=l,c="right",d="middle";break;case"insideTop":s+=a/2,u+=i,c="center";break;case"insideBottom":s+=a/2,u+=r-i,c="center",d="bottom";break;case"insideTopLeft":s+=i,u+=i;break;case"insideTopRight":s+=a-i,u+=i,c="right";break;case"insideBottomLeft":s+=i,u+=r-i,d="bottom";break;case"insideBottomRight":s+=a-i,u+=r-i,c="right",d="bottom"}return(e=e||{}).x=s,e.y=u,e.align=c,e.verticalAlign=d,e}var Kh="__zr_normal__",Jh=Fh.concat(["ignore"]),Qh=_s(Fh,function(e,t){return e[t]=!0,e},{ignore:!1}),ep={},tp=new cc(0,0,0,0),np=function(){function e(e){this.id=ss(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return e.prototype._init=function(e){this.attr(e)},e.prototype.drift=function(e,t,n){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0}var o=this.transform;o||(o=this.transform=[1,0,0,1,0,0]),o[4]+=e,o[5]+=t,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||(this.textConfig={});var n=this.textConfig,o=n.local,i=t.innerTransformable,r=void 0,a=void 0,l=!1;i.parent=o?this:null;var s=!1;if(i.copyTransform(t),null!=n.position){var u=tp;n.layoutRect?u.copy(n.layoutRect):u.copy(this.getBoundingRect()),o||u.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(ep,n,u):qh(ep,n,u),i.x=ep.x,i.y=ep.y,r=ep.align,a=ep.verticalAlign;var c=n.origin;if(c&&null!=n.rotation){var d=void 0,h=void 0;"center"===c?(d=.5*u.width,h=.5*u.height):(d=$h(c[0],u.width),h=$h(c[1],u.height)),s=!0,i.originX=-i.x+d+(o?0:u.x),i.originY=-i.y+h+(o?0:u.y)}}null!=n.rotation&&(i.rotation=n.rotation);var p=n.offset;p&&(i.x+=p[0],i.y+=p[1],s||(i.originX=-p[0],i.originY=-p[1]));var f=null==n.inside?"string"==typeof n.position&&n.position.indexOf("inside")>=0:n.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),v=void 0,m=void 0,y=void 0;f&&this.canBeInsideText()?(v=n.insideFill,m=n.insideStroke,null!=v&&"auto"!==v||(v=this.getInsideTextFill()),null!=m&&"auto"!==m||(m=this.getInsideTextStroke(v),y=!0)):(v=n.outsideFill,m=n.outsideStroke,null!=v&&"auto"!==v||(v=this.getOutsideFill()),null!=m&&"auto"!==m||(m=this.getOutsideStroke(v),y=!0)),(v=v||"#000")===g.fill&&m===g.stroke&&y===g.autoStroke&&r===g.align&&a===g.verticalAlign||(l=!0,g.fill=v,g.stroke=m,g.autoStroke=y,g.align=r,g.verticalAlign=a,t.setDefaultTextStyle(g)),t.__dirty|=1,l&&t.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return"#fff"},e.prototype.getInsideTextStroke=function(e){return"#000"},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Eh:Nh},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n="string"==typeof t&&wd(t);n||(n=[255,255,255,1]);for(var o=n[3],i=this.__zr.isDarkMode(),r=0;r<3;r++)n[r]=n[r]*o+(i?0:255)*(1-o);return n[3]=1,Id(n,"rgba")},e.prototype.traverse=function(e,t){},e.prototype.attrKV=function(e,t){"textConfig"===e?this.setTextConfig(t):"textContent"===e?this.setTextContent(t):"clipPath"===e?this.setClipPath(t):"extra"===e?(this.extra=this.extra||{},ps(this.extra,t)):this[e]=t},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(e,t){if("string"==typeof e)this.attrKV(e,t);else if(Ns(e))for(var n=bs(e),o=0;o<n.length;o++){var i=n[o];this.attrKV(i,e[i])}return this.markRedraw(),this},e.prototype.saveCurrentToNormalState=function(e){this._innerSaveToNormal(e);for(var t=this._normalState,n=0;n<this.animators.length;n++){var o=this.animators[n],i=o.__fromStateTransition;if(!(o.getLoop()||i&&i!==Kh)){var r=o.targetName,a=r?t[r]:t;o.saveTo(a)}}},e.prototype._innerSaveToNormal=function(e){var t=this._normalState;t||(t=this._normalState={}),e.textConfig&&!t.textConfig&&(t.textConfig=this.textConfig),this._savePrimaryToNormal(e,t,Jh)},e.prototype._savePrimaryToNormal=function(e,t,n){for(var o=0;o<n.length;o++){var i=n[o];null==e[i]||i in t||(t[i]=this[i])}},e.prototype.hasState=function(){return this.currentStates.length>0},e.prototype.getState=function(e){return this.states[e]},e.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},e.prototype.clearStates=function(e){this.useState(Kh,!1,e)},e.prototype.useState=function(e,t,n,o){var i=e===Kh;if(this.hasState()||!i){var r=this.currentStates,a=this.stateTransition;if(!(gs(r,e)>=0)||!t&&1!==r.length){var l;if(this.stateProxy&&!i&&(l=this.stateProxy(e)),l||(l=this.states&&this.states[e]),l||i){i||this.saveCurrentToNormalState(l);var s=!!(l&&l.hoverLayer||o);s&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,l,this._normalState,t,!n&&!this.__inHover&&a&&a.duration>0,a);var u=this._textContent,c=this._textGuide;return u&&u.useState(e,t,n,s),c&&c.useState(e,t,n,s),i?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!s&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2),l}us("State "+e+" not exists.")}}},e.prototype.useStates=function(e,t,n){if(e.length){var o=[],i=this.currentStates,r=e.length,a=r===i.length;if(a)for(var l=0;l<r;l++)if(e[l]!==i[l]){a=!1;break}if(a)return;for(l=0;l<r;l++){var s=e[l],u=void 0;this.stateProxy&&(u=this.stateProxy(s,e)),u||(u=this.states[s]),u&&o.push(u)}var c=o[r-1],d=!!(c&&c.hoverLayer||n);d&&this._toggleHoverLayerFlag(!0);var h=this._mergeStates(o),p=this.stateTransition;this.saveCurrentToNormalState(h),this._applyStateObj(e.join(","),h,this._normalState,!1,!t&&!this.__inHover&&p&&p.duration>0,p);var f=this._textContent,g=this._textGuide;f&&f.useStates(e,t,d),g&&g.useStates(e,t,d),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!d&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2)}else this.clearStates()},e.prototype.isSilent=function(){for(var e=this.silent,t=this.parent;!e&&t;){if(t.silent){e=!0;break}t=t.parent}return e},e.prototype._updateAnimationTargets=function(){for(var e=0;e<this.animators.length;e++){var t=this.animators[e];t.targetName&&t.changeTarget(this[t.targetName])}},e.prototype.removeState=function(e){var t=gs(this.currentStates,e);if(t>=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},e.prototype.replaceState=function(e,t,n){var o=this.currentStates.slice(),i=gs(o,e),r=gs(o,t)>=0;i>=0?r?o.splice(i,1):o[i]=t:n&&!r&&o.push(t),this.useStates(o)},e.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},e.prototype._mergeStates=function(e){for(var t,n={},o=0;o<e.length;o++){var i=e[o];ps(n,i),i.textConfig&&ps(t=t||{},i.textConfig)}return t&&(n.textConfig=t),n},e.prototype._applyStateObj=function(e,t,n,o,i,r){var a=!(t&&o);t&&t.textConfig?(this.textConfig=ps({},o?this.textConfig:n.textConfig),ps(this.textConfig,t.textConfig)):a&&n.textConfig&&(this.textConfig=n.textConfig);for(var l={},s=!1,u=0;u<Jh.length;u++){var c=Jh[u],d=i&&Qh[c];t&&null!=t[c]?d?(s=!0,l[c]=t[c]):this[c]=t[c]:a&&null!=n[c]&&(d?(s=!0,l[c]=n[c]):this[c]=n[c])}if(!i)for(u=0;u<this.animators.length;u++){var h=this.animators[u],p=h.targetName;h.getLoop()||h.__changeFinalValue(p?(t||n)[p]:t||n)}s&&this._transitionState(e,l,r)},e.prototype._attachComponent=function(e){if(!e.__zr||e.__hostTarget){if(e!==this){var t=this.__zr;t&&e.addSelfToZr(t),e.__zr=t,e.__hostTarget=this}else if("production"!==process.env.NODE_ENV)throw new Error("Recursive component attachment.")}else if("production"!==process.env.NODE_ENV)throw new Error("Text element has been added to zrender.")},e.prototype._detachComponent=function(e){e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__hostTarget=null},e.prototype.getClipPath=function(){return this._clipPath},e.prototype.setClipPath=function(e){this._clipPath&&this._clipPath!==e&&this.removeClipPath(),this._attachComponent(e),this._clipPath=e,this.markRedraw()},e.prototype.removeClipPath=function(){var e=this._clipPath;e&&(this._detachComponent(e),this._clipPath=null,this.markRedraw())},e.prototype.getTextContent=function(){return this._textContent},e.prototype.setTextContent=function(e){var t=this._textContent;if(t!==e){if(t&&t!==e&&this.removeTextContent(),"production"!==process.env.NODE_ENV&&e.__zr&&!e.__hostTarget)throw new Error("Text element has been added to zrender.");e.innerTransformable=new zh,this._attachComponent(e),this._textContent=e,this.markRedraw()}},e.prototype.setTextConfig=function(e){this.textConfig||(this.textConfig={}),ps(this.textConfig,e),this.markRedraw()},e.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},e.prototype.removeTextContent=function(){var e=this._textContent;e&&(e.innerTransformable=null,this._detachComponent(e),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},e.prototype.getTextGuideLine=function(){return this._textGuide},e.prototype.setTextGuideLine=function(e){this._textGuide&&this._textGuide!==e&&this.removeTextGuideLine(),this._attachComponent(e),this._textGuide=e,this.markRedraw()},e.prototype.removeTextGuideLine=function(){var e=this._textGuide;e&&(this._detachComponent(e),this._textGuide=null,this.markRedraw())},e.prototype.markRedraw=function(){this.__dirty|=1;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},e.prototype.dirty=function(){this.markRedraw()},e.prototype._toggleHoverLayerFlag=function(e){this.__inHover=e;var t=this._textContent,n=this._textGuide;t&&(t.__inHover=e),n&&(n.__inHover=e)},e.prototype.addSelfToZr=function(e){if(this.__zr!==e){this.__zr=e;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.addAnimator(t[n]);this._clipPath&&this._clipPath.addSelfToZr(e),this._textContent&&this._textContent.addSelfToZr(e),this._textGuide&&this._textGuide.addSelfToZr(e)}},e.prototype.removeSelfFromZr=function(e){if(this.__zr){this.__zr=null;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.removeAnimator(t[n]);this._clipPath&&this._clipPath.removeSelfFromZr(e),this._textContent&&this._textContent.removeSelfFromZr(e),this._textGuide&&this._textGuide.removeSelfFromZr(e)}},e.prototype.animate=function(e,t,n){var o=e?this[e]:this;if("production"===process.env.NODE_ENV||o){var i=new ah(o,t,n);return e&&(i.targetName=e),this.addAnimator(i,e),i}us('Property "'+e+'" is not existed in element '+this.id)},e.prototype.addAnimator=function(e,t){var n=this.__zr,o=this;e.during(function(){o.updateDuringAnimation(t)}).done(function(){var t=o.animators,n=gs(t,e);n>=0&&t.splice(n,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(e){this.markRedraw()},e.prototype.stopAnimation=function(e,t){for(var n=this.animators,o=n.length,i=[],r=0;r<o;r++){var a=n[r];e&&e!==a.scope?i.push(a):a.stop(t)}return this.animators=i,this},e.prototype.animateTo=function(e,t,n){op(this,e,t,n)},e.prototype.animateFrom=function(e,t,n){op(this,e,t,n,!0)},e.prototype._transitionState=function(e,t,n,o){for(var i=op(this,t,n,o),r=0;r<i.length;r++)i[r].__fromStateTransition=e},e.prototype.getBoundingRect=function(){return null},e.prototype.getPaintRect=function(){return null},e.initDefaultProps=function(){var t=e.prototype;t.type="element",t.name="",t.ignore=t.silent=t.isGroup=t.draggable=t.dragging=t.ignoreClip=t.__inHover=!1,t.__dirty=1;var n={};function o(e,t,o){n[e+t+o]||(n[e+t+o]=!0)}function i(e,n,i,r){function a(e,t){Object.defineProperty(t,0,{get:function(){return e[i]},set:function(t){e[i]=t}}),Object.defineProperty(t,1,{get:function(){return e[r]},set:function(t){e[r]=t}})}Object.defineProperty(t,e,{get:function(){("production"!==process.env.NODE_ENV&&o(e,i,r),this[n])||a(this,this[n]=[]);return this[n]},set:function(t){"production"!==process.env.NODE_ENV&&o(e,i,r),this[i]=t[0],this[r]=t[1],this[n]=t,a(this,t)}})}Object.defineProperty&&(i("position","_legacyPos","x","y"),i("scale","_legacyScale","scaleX","scaleY"),i("origin","_legacyOrigin","originX","originY"))}(),e}();function op(e,t,n,o,i){var r=[];ap(e,"",e,t,n=n||{},o,r,i);var a=r.length,l=!1,s=n.done,u=n.aborted,c=function(){l=!0,--a<=0&&(l?s&&s():u&&u())},d=function(){--a<=0&&(l?s&&s():u&&u())};a||s&&s(),r.length>0&&n.during&&r[0].during(function(e,t){n.during(t)});for(var h=0;h<r.length;h++){var p=r[h];c&&p.done(c),d&&p.aborted(d),n.force&&p.duration(n.duration),p.start(n.easing)}return r}function ip(e,t,n){for(var o=0;o<n;o++)e[o]=t[o]}function rp(e,t,n){if(ms(t[n]))if(ms(e[n])||(e[n]=[]),As(t[n])){var o=t[n].length;e[n].length!==o&&(e[n]=new t[n].constructor(o),ip(e[n],t[n],o))}else{var i=t[n],r=e[n],a=i.length;if(ms(i[0]))for(var l=i[0].length,s=0;s<a;s++)r[s]?ip(r[s],i[s],l):r[s]=Array.prototype.slice.call(i[s]);else ip(r,i,a);r.length=i.length}else e[n]=t[n]}function ap(e,t,n,o,i,r,a,l){for(var s=bs(o),u=i.duration,c=i.delay,d=i.additive,h=i.setToFinal,p=!Ns(r),f=e.animators,g=[],v=0;v<s.length;v++){var m=s[v],y=o[m];if(null!=y&&null!=n[m]&&(p||r[m]))if(!Ns(y)||ms(y)||Vs(y))g.push(m);else{if(t){l||(n[m]=y,e.updateDuringAnimation(t));continue}ap(e,m,n[m],y,i,r&&r[m],a,l)}else l||(n[m]=y,e.updateDuringAnimation(t),g.push(m))}var x=g.length;if(!d&&x)for(var _=0;_<f.length;_++){if((b=f[_]).targetName===t)if(b.stopTracks(g)){var w=gs(f,b);f.splice(w,1)}}if(i.force||(g=ws(g,function(e){return t=o[e],i=n[e],!(t===i||ms(t)&&ms(i)&&function(e,t){var n=e.length;if(n!==t.length)return!1;for(var o=0;o<n;o++)if(e[o]!==t[o])return!1;return!0}(t,i));var t,i}),x=g.length),x>0||i.force&&!a.length){var b,S=void 0,C=void 0,M=void 0;if(l){C={},h&&(S={});for(_=0;_<x;_++){C[m=g[_]]=n[m],h?S[m]=o[m]:n[m]=o[m]}}else if(h){M={};for(_=0;_<x;_++){M[m=g[_]]=eh(n[m]),rp(n,o,m)}}(b=new ah(n,!1,!1,d?ws(f,function(e){return e.targetName===t}):null)).targetName=t,i.scope&&(b.scope=i.scope),h&&S&&b.whenWithKeys(0,S,g),M&&b.whenWithKeys(0,M,g),b.whenWithKeys(null==u?500:u,l?C:o,g).delay(c||0),e.addAnimator(b,t),a.push(b)}}vs(np,bu),vs(np,zh);var lp=function(e){function t(t){var n=e.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(t),n}return Wl(t,e),t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(e){return this._children[e]},t.prototype.childOfName=function(e){for(var t=this._children,n=0;n<t.length;n++)if(t[n].name===e)return t[n]},t.prototype.childCount=function(){return this._children.length},t.prototype.add=function(e){if(e&&(e!==this&&e.parent!==this&&(this._children.push(e),this._doAdd(e)),"production"!==process.env.NODE_ENV&&e.__hostTarget))throw"This elemenet has been used as an attachment";return this},t.prototype.addBefore=function(e,t){if(e&&e!==this&&e.parent!==this&&t&&t.parent===this){var n=this._children,o=n.indexOf(t);o>=0&&(n.splice(o,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,t){var n=gs(this._children,e);return n>=0&&this.replaceAt(t,n),this},t.prototype.replaceAt=function(e,t){var n=this._children,o=n[t];if(e&&e!==this&&e.parent!==this&&e!==o){n[t]=e,o.parent=null;var i=this.__zr;i&&o.removeSelfFromZr(i),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__zr;t&&t!==e.__zr&&e.addSelfToZr(t),t&&t.refresh()},t.prototype.remove=function(e){var t=this.__zr,n=this._children,o=gs(n,e);return o<0||(n.splice(o,1),e.parent=null,t&&e.removeSelfFromZr(t),t&&t.refresh()),this},t.prototype.removeAll=function(){for(var e=this._children,t=this.__zr,n=0;n<e.length;n++){var o=e[n];t&&o.removeSelfFromZr(t),o.parent=null}return e.length=0,this},t.prototype.eachChild=function(e,t){for(var n=this._children,o=0;o<n.length;o++){var i=n[o];e.call(t,i,o)}return this},t.prototype.traverse=function(e,t){for(var n=0;n<this._children.length;n++){var o=this._children[n],i=e.call(t,o);o.isGroup&&!i&&o.traverse(e,t)}return this},t.prototype.addSelfToZr=function(t){e.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++){this._children[n].addSelfToZr(t)}},t.prototype.removeSelfFromZr=function(t){e.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++){this._children[n].removeSelfFromZr(t)}},t.prototype.getBoundingRect=function(e){for(var t=new cc(0,0,0,0),n=e||this._children,o=[],i=null,r=0;r<n.length;r++){var a=n[r];if(!a.ignore&&!a.invisible){var l=a.getBoundingRect(),s=a.getLocalTransform(o);s?(cc.applyTransform(t,l,s),(i=i||t.clone()).union(t)):(i=i||l.clone()).union(l)}}return i||t},t}(np);lp.prototype.type="group";
17
- /*!
18
- * ZRender, a high performance 2d drawing library.
19
- *
20
- * Copyright (c) 2013, Baidu Inc.
21
- * All rights reserved.
22
- *
23
- * LICENSE
24
- * https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
25
- */
26
- var sp={},up={};var cp,dp=function(){function e(e,t,n){var o=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n=n||{},this.dom=t,this.id=e;var i=new Ec,r=n.renderer||"canvas";if(sp[r]||(r=bs(sp)[0]),"production"!==process.env.NODE_ENV&&!sp[r])throw new Error("Renderer '"+r+"' is not imported. Please import it first.");n.useDirtyRect=null!=n.useDirtyRect&&n.useDirtyRect;var a=new sp[r](t,i,n,e),l=n.ssr||a.ssrOnly;this.storage=i,this.painter=a;var s,u=Yl.node||Yl.worker||l?null:new Ih(a.getViewportRoot(),a.root),c=n.useCoarsePointer;(null==c||"auto"===c?Yl.touchEventsSupported:!!c)&&(s=Rs(n.pointerSize,44)),this.handler=new mc(i,a,u,a.root,s),this.animation=new ch({stage:{update:l?null:function(){return o._flush(!0)}}}),l||this.animation.start()}return e.prototype.add=function(e){!this._disposed&&e&&(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},e.prototype.remove=function(e){!this._disposed&&e&&(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},e.prototype.configLayer=function(e,t){this._disposed||(this.painter.configLayer&&this.painter.configLayer(e,t),this.refresh())},e.prototype.setBackgroundColor=function(e){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=function(e){if(!e)return!1;if("string"==typeof e)return kd(e,1)<.4;if(e.colorStops){for(var t=e.colorStops,n=0,o=t.length,i=0;i<o;i++)n+=kd(t[i].color,1);return(n/=o)<.4}return!1}(e))},e.prototype.getBackgroundColor=function(){return this._backgroundColor},e.prototype.setDarkMode=function(e){this._darkMode=e},e.prototype.isDarkMode=function(){return this._darkMode},e.prototype.refreshImmediately=function(e){this._disposed||(e||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},e.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},e.prototype.flush=function(){this._disposed||this._flush(!1)},e.prototype._flush=function(e){var t,n=lh();this._needsRefresh&&(t=!0,this.refreshImmediately(e)),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately());var o=lh();t?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:o-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover())},e.prototype.resize=function(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},e.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},e.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},e.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},e.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t<e.length;t++)e[t]instanceof lp&&e[t].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},e.prototype.dispose=function(){var e;this._disposed||(this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,e=this.id,delete up[e])},e}();function hp(e,t){var n=new dp(ss(),e,t);return up[n.id]=n,n}var pp=1e-4;function fp(e,t,n,o){var i=t[0],r=t[1],a=n[0],l=n[1],s=r-i,u=l-a;if(0===s)return 0===u?a:(a+l)/2;if(o)if(s>0){if(e<=i)return a;if(e>=r)return l}else{if(e>=i)return a;if(e<=r)return l}else{if(e===i)return a;if(e===r)return l}return(e-i)/s*u+a}function gp(e,t){switch(e){case"center":case"middle":e="50%";break;case"left":case"top":e="0%";break;case"right":case"bottom":e="100%"}return Is(e)?(n=e,n.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(e)/100*t:parseFloat(e):null==e?NaN:+e;var n}function vp(e,t,n){return null==t&&(t=10),t=Math.min(Math.max(0,t),20),e=(+e).toFixed(t),n?e:+e}function mp(e){return e.sort(function(e,t){return e-t}),e}function yp(e){if(e=+e,isNaN(e))return 0;if(e>1e-14)for(var t=1,n=0;n<15;n++,t*=10)if(Math.round(e*t)/t===e)return n;return xp(e)}function xp(e){var t=e.toString().toLowerCase(),n=t.indexOf("e"),o=n>0?+t.slice(n+1):0,i=n>0?n:t.length,r=t.indexOf("."),a=r<0?0:i-1-r;return Math.max(0,a-o)}function _p(e,t){var n=Math.log,o=Math.LN10,i=Math.floor(n(e[1]-e[0])/o),r=Math.round(n(Math.abs(t[1]-t[0]))/o),a=Math.min(Math.max(-i+r,0),20);return isFinite(a)?a:20}function wp(e,t){var n=Math.max(yp(e),yp(t)),o=e+t;return n>20?o:vp(o,n)}var bp=9007199254740991;function Sp(e){var t=2*Math.PI;return(e%t+t)%t}function Cp(e){return e>-1e-4&&e<pp}var Mp=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function Tp(e){if(e instanceof Date)return e;if(Is(e)){var t=Mp.exec(e);if(!t)return new Date(NaN);if(t[8]){var n=+t[4]||0;return"Z"!==t[8].toUpperCase()&&(n-=+t[8].slice(0,3)),new Date(Date.UTC(+t[1],+(t[2]||1)-1,+t[3]||1,n,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))}return new Date(+t[1],+(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0)}return null==e?new Date(NaN):new Date(Math.round(e))}function Ip(e){if(0===e)return 0;var t=Math.floor(Math.log(e)/Math.LN10);return e/Math.pow(10,t)>=10&&t++,t}function kp(e,t){var n=Ip(e),o=Math.pow(10,n),i=e/o;return e=(i<1.5?1:i<2.5?2:i<4?3:i<7?5:10)*o,n>=-20?+e.toFixed(n<0?-n:0):e}function Dp(e,t){var n=(e.length-1)*t+1,o=Math.floor(n),i=+e[o-1],r=n-o;return r?i+r*(e[o]-i):i}function Np(e){e.sort(function(e,t){return l(e,t,0)?-1:1});for(var t=-1/0,n=1,o=0;o<e.length;){for(var i=e[o].interval,r=e[o].close,a=0;a<2;a++)i[a]<=t&&(i[a]=t,r[a]=a?1:1-n),t=i[a],n=r[a];i[0]===i[1]&&r[0]*r[1]!==1?e.splice(o,1):o++}return e;function l(e,t,n){return e.interval[n]<t.interval[n]||e.interval[n]===t.interval[n]&&(e.close[n]-t.close[n]===(n?-1:1)||!n&&l(e,t,1))}}function Ep(e){var t=parseFloat(e);return t==e&&(0!==t||!Is(e)||e.indexOf("x")<=0)?t:NaN}function Ap(e){return!isNaN(Ep(e))}function Lp(){return Math.round(9*Math.random())}function Vp(e,t){return 0===t?e:Vp(t,e%t)}function Op(e,t){return null==e?t:null==t?e:e*t/Vp(e,t)}var Pp={},Bp="undefined"!=typeof console&&console.warn&&console.log;function Rp(e,t,n){if(Bp&&n){if(Pp[t])return;Pp[t]=!0}}function zp(e,t){Rp(0,e,t)}function Fp(e,t){Rp(0,e,t)}function Gp(e){"production"!==process.env.NODE_ENV&&Rp(0,"DEPRECATED: "+e,!0)}function Hp(e,t,n){"production"!==process.env.NODE_ENV&&Gp((n?"["+n+"]":"")+e+" is deprecated, use "+t+" instead.")}function Wp(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n="";if("production"!==process.env.NODE_ENV){var o=function(e){return void 0===e?"undefined":e===1/0?"Infinity":e===-1/0?"-Infinity":Ps(e)?"NaN":e instanceof Date?"Date("+e.toISOString()+")":Ts(e)?"function () { ... }":Os(e)?e+"":null};n=xs(e,function(e){if(Is(e))return e;var t=o(e);if(null!=t)return t;if("undefined"==typeof JSON||!JSON.stringify)return"?";try{return JSON.stringify(e,function(e,t){var n=o(t);return null==n?t:n})}catch(n){return"?"}}).join(" ")}return n}function Up(e){throw new Error(e)}function Yp(e,t,n){return(t-e)*n+e}var Zp="series\0",Xp="\0_ec_\0";function jp(e){return e instanceof Array?e:null==e?[]:[e]}function $p(e,t,n){if(e){e[t]=e[t]||{},e.emphasis=e.emphasis||{},e.emphasis[t]=e.emphasis[t]||{};for(var o=0,i=n.length;o<i;o++){var r=n[o];!e.emphasis[t].hasOwnProperty(r)&&e[t].hasOwnProperty(r)&&(e.emphasis[t][r]=e[t][r])}}}var qp=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"];function Kp(e){return!Ns(e)||Ms(e)||e instanceof Date?e:e.value}function Jp(e){return Ns(e)&&!(e instanceof Array)}function Qp(e,t,n){var o="normalMerge"===n,i="replaceMerge"===n,r="replaceAll"===n;e=e||[],t=(t||[]).slice();var a=qs();ys(t,function(e,n){Ns(e)?"production"!==process.env.NODE_ENV&&(null==e.id||rf(e.id)||of(e.id),null==e.name||rf(e.name)||of(e.name)):t[n]=null});var l,s,u=function(e,t,n){var o=[];if("replaceAll"===n)return o;for(var i=0;i<e.length;i++){var r=e[i];r&&null!=r.id&&t.set(r.id,i),o.push({existing:"replaceMerge"===n||lf(r)?null:r,newOption:null,keyInfo:null,brandNew:null})}return o}(e,a,n);return(o||i)&&function(e,t,n,o){ys(o,function(i,r){if(i&&null!=i.id){var a=tf(i.id),l=n.get(a);if(null!=l){var s=e[l];Hs(!s.newOption,'Duplicated option on id "'+a+'".'),s.newOption=i,s.existing=t[l],o[r]=null}}})}(u,e,a,t),o&&function(e,t){ys(t,function(n,o){if(n&&null!=n.name)for(var i=0;i<e.length;i++){var r=e[i].existing;if(!e[i].newOption&&r&&(null==r.id||null==n.id)&&!lf(n)&&!lf(r)&&ef("name",r,n))return e[i].newOption=n,void(t[o]=null)}})}(u,t),o||i?function(e,t,n){ys(t,function(t){if(t){for(var o,i=0;(o=e[i])&&(o.newOption||lf(o.existing)||o.existing&&null!=t.id&&!ef("id",t,o.existing));)i++;o?(o.newOption=t,o.brandNew=n):e.push({newOption:t,brandNew:n,existing:null,keyInfo:null}),i++}})}(u,t,i):r&&function(e,t){ys(t,function(t){e.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})})}(u,t),l=u,s=qs(),ys(l,function(e){var t=e.existing;t&&s.set(t.id,e)}),ys(l,function(e){var t=e.newOption;Hs(!t||null==t.id||!s.get(t.id)||s.get(t.id)===e,"id duplicates: "+(t&&t.id)),t&&null!=t.id&&s.set(t.id,e),!e.keyInfo&&(e.keyInfo={})}),ys(l,function(e,t){var n=e.existing,o=e.newOption,i=e.keyInfo;if(Ns(o)){if(i.name=null!=o.name?tf(o.name):n?n.name:Zp+t,n)i.id=tf(n.id);else if(null!=o.id)i.id=tf(o.id);else{var r=0;do{i.id="\0"+i.name+"\0"+r++}while(s.get(i.id))}s.set(i.id,e)}}),u}function ef(e,t,n){var o=nf(t[e],null),i=nf(n[e],null);return null!=o&&null!=i&&o===i}function tf(e){if("production"!==process.env.NODE_ENV&&null==e)throw new Error;return nf(e,"")}function nf(e,t){return null==e?t:Is(e)?e:Ds(e)||ks(e)?e+"":t}function of(e){"production"!==process.env.NODE_ENV&&zp("`"+e+"` is invalid id or name. Must be a string or number.")}function rf(e){return ks(e)||Ap(e)}function af(e){var t=e.name;return!(!t||!t.indexOf(Zp))}function lf(e){return e&&null!=e.id&&0===tf(e.id).indexOf(Xp)}function sf(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?Ms(t.dataIndex)?xs(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex):null!=t.name?Ms(t.name)?xs(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name):void 0}function uf(){var e="__ec_inner_"+cf++;return function(t){return t[e]||(t[e]={})}}var cf=Lp();function df(e,t,n){var o=hf(t,n),i=o.mainTypeSpecified,r=o.queryOptionMap,a=o.others,l=n?n.defaultMainType:null;return!i&&l&&r.set(l,{}),r.each(function(t,o){var i=gf(e,o,t,{useDefault:l===o,enableAll:!n||null==n.enableAll||n.enableAll,enableNone:!n||null==n.enableNone||n.enableNone});a[o+"Models"]=i.models,a[o+"Model"]=i.models[0]}),a}function hf(e,t){var n;if(Is(e)){var o={};o[e+"Index"]=0,n=o}else n=e;var i=qs(),r={},a=!1;return ys(n,function(e,n){if("dataIndex"!==n&&"dataIndexInside"!==n){var o=n.match(/^(\w+)(Index|Id|Name)$/)||[],l=o[1],s=(o[2]||"").toLowerCase();if(l&&s&&!(t&&t.includeMainTypes&&gs(t.includeMainTypes,l)<0))a=a||!!l,(i.get(l)||i.set(l,{}))[s]=e}else r[n]=e}),{mainTypeSpecified:a,queryOptionMap:i,others:r}}var pf={useDefault:!0,enableAll:!1,enableNone:!1},ff={useDefault:!1,enableAll:!0,enableNone:!0};function gf(e,t,n,o){o=o||pf;var i=n.index,r=n.id,a=n.name,l={models:null,specified:null!=i||null!=r||null!=a};if(!l.specified){var s=void 0;return l.models=o.useDefault&&(s=e.getComponent(t))?[s]:[],l}return"none"===i||!1===i?(Hs(o.enableNone,'`"none"` or `false` is not a valid value on index option.'),l.models=[],l):("all"===i&&(Hs(o.enableAll,'`"all"` is not a valid value on index option.'),i=r=a=null),l.models=e.queryComponents({mainType:t,index:i,id:r,name:a}),l)}function vf(e,t,n){e.setAttribute?e.setAttribute(t,n):e[t]=n}function mf(e,t){var n=qs(),o=[];return ys(e,function(e){var i=t(e);(n.get(i)||(o.push(i),n.set(i,[]))).push(e)}),{keys:o,buckets:n}}function yf(e,t,n,o,i){var r=null==t||"auto"===t;if(null==o)return o;if(Ds(o))return vp(f=Yp(n||0,o,i),r?Math.max(yp(n||0),yp(o)):t);if(Is(o))return i<1?n:o;for(var a=[],l=n,s=o,u=Math.max(l?l.length:0,s.length),c=0;c<u;++c){var d=e.getDimensionInfo(c);if(d&&"ordinal"===d.type)a[c]=(i<1&&l?l:s)[c];else{var h=l&&l[c]?l[c]:0,p=s[c],f=Yp(h,p,i);a[c]=vp(f,r?Math.max(yp(h),yp(p)):t)}}return a}var xf="___EC__COMPONENT__CONTAINER___",_f="___EC__EXTENDED_CLASS___";function wf(e){var t={main:"",sub:""};if(e){var n=e.split(".");t.main=n[0]||"",t.sub=n[1]||""}return t}function bf(e,t){e.$constructor=e,e.extend=function(e){"production"!==process.env.NODE_ENV&&ys(t,function(t){e[t]});var n,o,i=this;return Ts(o=i)&&/^class\s/.test(Function.prototype.toString.call(o))?n=function(e){function t(){return e.apply(this,arguments)||this}return Wl(t,e),t}(i):(n=function(){(e.$constructor||i).apply(this,arguments)},function(e,t){var n=e.prototype;function o(){}for(var i in o.prototype=t.prototype,e.prototype=new o,n)n.hasOwnProperty(i)&&(e.prototype[i]=n[i]);e.prototype.constructor=e,e.superClass=t}(n,this)),ps(n.prototype,e),n[_f]=!0,n.extend=this.extend,n.superCall=Mf,n.superApply=Tf,n.superClass=i,n}}function Sf(e,t){e.extend=t.extend}var Cf=Math.round(10*Math.random());function Mf(e,t){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];return this.superClass.prototype[t].apply(e,n)}function Tf(e,t,n){return this.superClass.prototype[t].apply(e,n)}function If(e){var t={};e.registerClass=function(e){var n,o=e.type||e.prototype.type;if(o){Hs(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(n=o),'componentType "'+n+'" illegal'),e.prototype.type=o;var i=wf(o);if(i.sub){if(i.sub!==xf){var r=function(e){var n=t[e.main];n&&n[xf]||((n=t[e.main]={})[xf]=!0);return n}(i);r[i.sub]=e}}else"production"!==process.env.NODE_ENV&&t[i.main],t[i.main]=e}return e},e.getClass=function(e,n,o){var i=t[e];if(i&&i[xf]&&(i=n?i[n]:null),o&&!i)throw new Error(n?"Component "+e+"."+(n||"")+" is used but not imported.":e+".type should be specified.");return i},e.getClassesByMainType=function(e){var n=wf(e),o=[],i=t[n.main];return i&&i[xf]?ys(i,function(e,t){t!==xf&&o.push(e)}):o.push(i),o},e.hasClass=function(e){var n=wf(e);return!!t[n.main]},e.getAllClassMainTypes=function(){var e=[];return ys(t,function(t,n){e.push(n)}),e},e.hasSubTypes=function(e){var n=wf(e),o=t[n.main];return o&&o[xf]}}function kf(e,t){for(var n=0;n<e.length;n++)e[n][1]||(e[n][1]=e[n][0]);return t=t||!1,function(n,o,i){for(var r={},a=0;a<e.length;a++){var l=e[a][1];if(!(o&&gs(o,l)>=0||i&&gs(i,l)<0)){var s=n.getShallow(l,t);null!=s&&(r[e[a][0]]=s)}}return r}}var Df=kf([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),Nf=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return Df(this,e,t)},e}(),Ef=new sd(50);function Af(e){if("string"==typeof e){var t=Ef.get(e);return t&&t.image}return e}function Lf(e,t,n,o,i){if(e){if("string"==typeof e){if(t&&t.__zrImageSrc===e||!n)return t;var r=Ef.get(e),a={hostEl:n,cb:o,cbPayload:i};return r?!Of(t=r.image)&&r.pending.push(a):((t=$l.loadImage(e,Vf,Vf)).__zrImageSrc=e,Ef.put(e,t.__cachedImgObj={image:t,pending:[a]})),t}return e}return t}function Vf(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<e.pending.length;t++){var n=e.pending[t],o=n.cb;o&&o(this,n.cbPayload),n.hostEl.dirty()}e.pending.length=0}function Of(e){return e&&e.width&&e.height}var Pf=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function Bf(e,t,n,o,i,r){if(!n)return e.text="",void(e.isTruncated=!1);var a=(t+"").split("\n");r=Rf(n,o,i,r);for(var l=!1,s={},u=0,c=a.length;u<c;u++)zf(s,a[u],r),a[u]=s.textLine,l=l||s.isTruncated;e.text=a.join("\n"),e.isTruncated=l}function Rf(e,t,n,o){var i=ps({},o=o||{});i.font=t,n=Rs(n,"..."),i.maxIterations=Rs(o.maxIterations,2);var r=i.minChar=Rs(o.minChar,0);i.cnCharWidth=Wh("国",t);var a=i.ascCharWidth=Wh("a",t);i.placeholder=Rs(o.placeholder,"");for(var l=e=Math.max(0,e-1),s=0;s<r&&l>=a;s++)l-=a;var u=Wh(n,t);return u>l&&(n="",u=0),l=e-u,i.ellipsis=n,i.ellipsisWidth=u,i.contentWidth=l,i.containerWidth=e,i}function zf(e,t,n){var o=n.containerWidth,i=n.font,r=n.contentWidth;if(!o)return e.textLine="",void(e.isTruncated=!1);var a=Wh(t,i);if(a<=o)return e.textLine=t,void(e.isTruncated=!1);for(var l=0;;l++){if(a<=r||l>=n.maxIterations){t+=n.ellipsis;break}var s=0===l?Ff(t,r,n.ascCharWidth,n.cnCharWidth):a>0?Math.floor(t.length*r/a):0;a=Wh(t=t.substr(0,s),i)}""===t&&(t=n.placeholder),e.textLine=t,e.isTruncated=!0}function Ff(e,t,n,o){for(var i=0,r=0,a=e.length;r<a&&i<t;r++){var l=e.charCodeAt(r);i+=0<=l&&l<=127?n:o}return r}var Gf=function(){return function(){}}(),Hf=function(){return function(e){this.tokens=[],e&&(this.tokens=e)}}(),Wf=function(){return function(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}}();function Uf(e,t,n,o,i){var r,a,l=""===t,s=i&&n.rich[i]||{},u=e.lines,c=s.font||n.font,d=!1;if(o){var h=s.padding,p=h?h[1]+h[3]:0;if(null!=s.width&&"auto"!==s.width){var f=$h(s.width,o.width)+p;u.length>0&&f+o.accumWidth>o.width&&(r=t.split("\n"),d=!0),o.accumWidth=f}else{var g=Xf(t,c,o.width,o.breakAll,o.accumWidth);o.accumWidth=g.accumWidth+p,a=g.linesWidths,r=g.lines}}else r=t.split("\n");for(var v=0;v<r.length;v++){var m=r[v],y=new Gf;if(y.styleName=i,y.text=m,y.isLineHolder=!m&&!l,"number"==typeof s.width?y.width=s.width:y.width=a?a[v]:Wh(m,c),v||d)u.push(new Hf([y]));else{var x=(u[u.length-1]||(u[0]=new Hf)).tokens,_=x.length;1===_&&x[0].isLineHolder?x[0]=y:(m||!_||l)&&x.push(y)}}}var Yf=_s(",&?/;] ".split(""),function(e,t){return e[t]=!0,e},{});function Zf(e){return!function(e){var t=e.charCodeAt(0);return t>=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}(e)||!!Yf[e]}function Xf(e,t,n,o,i){for(var r=[],a=[],l="",s="",u=0,c=0,d=0;d<e.length;d++){var h=e.charAt(d);if("\n"!==h){var p=Wh(h,t),f=!o&&!Zf(h);(r.length?c+p>n:i+c+p>n)?c?(l||s)&&(f?(l||(l=s,s="",c=u=0),r.push(l),a.push(c-u),s+=h,l="",c=u+=p):(s&&(l+=s,s="",u=0),r.push(l),a.push(c),l=h,c=p)):f?(r.push(s),a.push(u),s=h,u=p):(r.push(h),a.push(p)):(c+=p,f?(s+=h,u+=p):(s&&(l+=s,s="",u=0),l+=h))}else s&&(l+=s,c+=u),r.push(l),a.push(c),l="",s="",u=0,c=0}return r.length||l||(l=e,s="",u=0),s&&(l+=s),l&&(r.push(l),a.push(c)),1===r.length&&(c+=i),{accumWidth:c,lines:r,linesWidths:a}}var jf="__zr_style_"+Math.round(10*Math.random()),$f={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},qf={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};$f[jf]=!0;var Kf=["z","z2","invisible"],Jf=["invisible"],Qf=function(e){function t(t){return e.call(this,t)||this}var n;return Wl(t,e),t.prototype._init=function(t){for(var n=bs(t),o=0;o<n.length;o++){var i=n[o];"style"===i?this.useStyle(t[i]):e.prototype.attrKV.call(this,i,t[i])}this.style||this.useStyle({})},t.prototype.beforeBrush=function(){},t.prototype.afterBrush=function(){},t.prototype.innerBeforeBrush=function(){},t.prototype.innerAfterBrush=function(){},t.prototype.shouldBePainted=function(e,t,n,o){var i=this.transform;if(this.ignore||this.invisible||0===this.style.opacity||this.culling&&function(e,t,n){eg.copy(e.getBoundingRect()),e.transform&&eg.applyTransform(e.transform);return tg.width=t,tg.height=n,!eg.intersect(tg)}(this,e,t)||i&&!i[0]&&!i[3])return!1;if(n&&this.__clipPaths)for(var r=0;r<this.__clipPaths.length;++r)if(this.__clipPaths[r].isZeroArea())return!1;if(o&&this.parent)for(var a=this.parent;a;){if(a.ignore)return!1;a=a.parent}return!0},t.prototype.contain=function(e,t){return this.rectContain(e,t)},t.prototype.traverse=function(e,t){e.call(t,this)},t.prototype.rectContain=function(e,t){var n=this.transformCoordToLocal(e,t);return this.getBoundingRect().contain(n[0],n[1])},t.prototype.getPaintRect=function(){var e=this._paintRect;if(!this._paintRect||this.__dirty){var t=this.transform,n=this.getBoundingRect(),o=this.style,i=o.shadowBlur||0,r=o.shadowOffsetX||0,a=o.shadowOffsetY||0;e=this._paintRect||(this._paintRect=new cc(0,0,0,0)),t?cc.applyTransform(e,n,t):e.copy(n),(i||r||a)&&(e.width+=2*i+Math.abs(r),e.height+=2*i+Math.abs(a),e.x=Math.min(e.x,e.x+r-i),e.y=Math.min(e.y,e.y+a-i));var l=this.dirtyRectTolerance;e.isZero()||(e.x=Math.floor(e.x-l),e.y=Math.floor(e.y-l),e.width=Math.ceil(e.width+1+2*l),e.height=Math.ceil(e.height+1+2*l))}return e},t.prototype.setPrevPaintRect=function(e){e?(this._prevPaintRect=this._prevPaintRect||new cc(0,0,0,0),this._prevPaintRect.copy(e)):this._prevPaintRect=null},t.prototype.getPrevPaintRect=function(){return this._prevPaintRect},t.prototype.animateStyle=function(e){return this.animate("style",e)},t.prototype.updateDuringAnimation=function(e){"style"===e?this.dirtyStyle():this.markRedraw()},t.prototype.attrKV=function(t,n){"style"!==t?e.prototype.attrKV.call(this,t,n):this.style?this.setStyle(n):this.useStyle(n)},t.prototype.setStyle=function(e,t){return"string"==typeof e?this.style[e]=t:ps(this.style,e),this.dirtyStyle(),this},t.prototype.dirtyStyle=function(e){e||this.markRedraw(),this.__dirty|=2,this._rect&&(this._rect=null)},t.prototype.dirty=function(){this.dirtyStyle()},t.prototype.styleChanged=function(){return!!(2&this.__dirty)},t.prototype.styleUpdated=function(){this.__dirty&=-3},t.prototype.createStyle=function(e){return Js($f,e)},t.prototype.useStyle=function(e){e[jf]||(e=this.createStyle(e)),this.__inHover?this.__hoverStyle=e:this.style=e,this.dirtyStyle()},t.prototype.isStyleObject=function(e){return e[jf]},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.style&&!n.style&&(n.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(t,n,Kf)},t.prototype._applyStateObj=function(t,n,o,i,r,a){e.prototype._applyStateObj.call(this,t,n,o,i,r,a);var l,s=!(n&&i);if(n&&n.style?r?i?l=n.style:(l=this._mergeStyle(this.createStyle(),o.style),this._mergeStyle(l,n.style)):(l=this._mergeStyle(this.createStyle(),i?this.style:o.style),this._mergeStyle(l,n.style)):s&&(l=o.style),l)if(r){var u=this.style;if(this.style=this.createStyle(s?{}:u),s)for(var c=bs(u),d=0;d<c.length;d++){(p=c[d])in l&&(l[p]=l[p],this.style[p]=u[p])}var h=bs(l);for(d=0;d<h.length;d++){var p=h[d];this.style[p]=this.style[p]}this._transitionState(t,{style:l},a,this.getAnimationStyleProps())}else this.useStyle(l);var f=this.__inHover?Jf:Kf;for(d=0;d<f.length;d++){p=f[d];n&&null!=n[p]?this[p]=n[p]:s&&null!=o[p]&&(this[p]=o[p])}},t.prototype._mergeStates=function(t){for(var n,o=e.prototype._mergeStates.call(this,t),i=0;i<t.length;i++){var r=t[i];r.style&&(n=n||{},this._mergeStyle(n,r.style))}return n&&(o.style=n),o},t.prototype._mergeStyle=function(e,t){return ps(e,t),e},t.prototype.getAnimationStyleProps=function(){return qf},t.initDefaultProps=((n=t.prototype).type="displayable",n.invisible=!1,n.z=0,n.z2=0,n.zlevel=0,n.culling=!1,n.cursor="pointer",n.rectHover=!1,n.incremental=!1,n._rect=null,n.dirtyRectTolerance=0,void(n.__dirty=3)),t}(np),eg=new cc(0,0,0,0),tg=new cc(0,0,0,0);var ng=Math.min,og=Math.max,ig=Math.sin,rg=Math.cos,ag=2*Math.PI,lg=ou(),sg=ou(),ug=ou();function cg(e,t,n){if(0!==e.length){for(var o=e[0],i=o[0],r=o[0],a=o[1],l=o[1],s=1;s<e.length;s++)o=e[s],i=ng(i,o[0]),r=og(r,o[0]),a=ng(a,o[1]),l=og(l,o[1]);t[0]=i,t[1]=a,n[0]=r,n[1]=l}}function dg(e,t,n,o,i,r){i[0]=ng(e,n),i[1]=ng(t,o),r[0]=og(e,n),r[1]=og(t,o)}var hg=[],pg=[];function fg(e,t,n,o,i,r,a,l,s,u){var c=Xc,d=Uc,h=c(e,n,i,a,hg);s[0]=1/0,s[1]=1/0,u[0]=-1/0,u[1]=-1/0;for(var p=0;p<h;p++){var f=d(e,n,i,a,hg[p]);s[0]=ng(f,s[0]),u[0]=og(f,u[0])}h=c(t,o,r,l,pg);for(p=0;p<h;p++){var g=d(t,o,r,l,pg[p]);s[1]=ng(g,s[1]),u[1]=og(g,u[1])}s[0]=ng(e,s[0]),u[0]=og(e,u[0]),s[0]=ng(a,s[0]),u[0]=og(a,u[0]),s[1]=ng(t,s[1]),u[1]=og(t,u[1]),s[1]=ng(l,s[1]),u[1]=og(l,u[1])}function gg(e,t,n,o,i,r,a,l){var s=Qc,u=Kc,c=og(ng(s(e,n,i),1),0),d=og(ng(s(t,o,r),1),0),h=u(e,n,i,c),p=u(t,o,r,d);a[0]=ng(e,i,h),a[1]=ng(t,r,p),l[0]=og(e,i,h),l[1]=og(t,r,p)}function vg(e,t,n,o,i,r,a,l,s){var u=yu,c=xu,d=Math.abs(i-r);if(d%ag<1e-4&&d>1e-4)return l[0]=e-n,l[1]=t-o,s[0]=e+n,void(s[1]=t+o);if(lg[0]=rg(i)*n+e,lg[1]=ig(i)*o+t,sg[0]=rg(r)*n+e,sg[1]=ig(r)*o+t,u(l,lg,sg),c(s,lg,sg),(i%=ag)<0&&(i+=ag),(r%=ag)<0&&(r+=ag),i>r&&!a?r+=ag:i<r&&a&&(i+=ag),a){var h=r;r=i,i=h}for(var p=0;p<r;p+=Math.PI/2)p>i&&(ug[0]=rg(p)*n+e,ug[1]=ig(p)*o+t,u(l,ug,l),c(s,ug,s))}var mg={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},yg=[],xg=[],_g=[],wg=[],bg=[],Sg=[],Cg=Math.min,Mg=Math.max,Tg=Math.cos,Ig=Math.sin,kg=Math.abs,Dg=Math.PI,Ng=2*Dg,Eg="undefined"!=typeof Float32Array,Ag=[];function Lg(e){return Math.round(e/Dg*1e8)/1e8%2*Dg}function Vg(e,t){var n=Lg(e[0]);n<0&&(n+=Ng);var o=n-e[0],i=e[1];i+=o,!t&&i-n>=Ng?i=n+Ng:t&&n-i>=Ng?i=n-Ng:!t&&n>i?i=n+(Ng-Lg(n-i)):t&&n<i&&(i=n-(Ng-Lg(i-n))),e[0]=n,e[1]=i}var Og=function(){function e(e){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,e&&(this._saveData=!1),this._saveData&&(this.data=[])}var t;return e.prototype.increaseVersion=function(){this._version++},e.prototype.getVersion=function(){return this._version},e.prototype.setScale=function(e,t,n){(n=n||0)>0&&(this._ux=kg(n/Dh/e)||0,this._uy=kg(n/Dh/t)||0)},e.prototype.setDPR=function(e){this.dpr=e},e.prototype.setContext=function(e){this._ctx=e},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(mg.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},e.prototype.lineTo=function(e,t){var n=kg(e-this._xi),o=kg(t-this._yi),i=n>this._ux||o>this._uy;if(this.addData(mg.L,e,t),this._ctx&&i&&this._ctx.lineTo(e,t),i)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var r=n*n+o*o;r>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=r)}return this},e.prototype.bezierCurveTo=function(e,t,n,o,i,r){return this._drawPendingPt(),this.addData(mg.C,e,t,n,o,i,r),this._ctx&&this._ctx.bezierCurveTo(e,t,n,o,i,r),this._xi=i,this._yi=r,this},e.prototype.quadraticCurveTo=function(e,t,n,o){return this._drawPendingPt(),this.addData(mg.Q,e,t,n,o),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,o),this._xi=n,this._yi=o,this},e.prototype.arc=function(e,t,n,o,i,r){this._drawPendingPt(),Ag[0]=o,Ag[1]=i,Vg(Ag,r),o=Ag[0];var a=(i=Ag[1])-o;return this.addData(mg.A,e,t,n,n,o,a,0,r?0:1),this._ctx&&this._ctx.arc(e,t,n,o,i,r),this._xi=Tg(i)*n+e,this._yi=Ig(i)*n+t,this},e.prototype.arcTo=function(e,t,n,o,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,o,i),this},e.prototype.rect=function(e,t,n,o){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,o),this.addData(mg.R,e,t,n,o),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(mg.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},e.prototype.fill=function(e){e&&e.fill(),this.toStatic()},e.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(e){var t=e.length;this.data&&this.data.length===t||!Eg||(this.data=new Float32Array(t));for(var n=0;n<t;n++)this.data[n]=e[n];this._len=t},e.prototype.appendPath=function(e){e instanceof Array||(e=[e]);for(var t=e.length,n=0,o=this._len,i=0;i<t;i++)n+=e[i].len();Eg&&this.data instanceof Float32Array&&(this.data=new Float32Array(o+n));for(i=0;i<t;i++)for(var r=e[i].data,a=0;a<r.length;a++)this.data[o++]=r[a];this._len=o},e.prototype.addData=function(e,t,n,o,i,r,a,l,s){if(this._saveData){var u=this.data;this._len+arguments.length>u.length&&(this._expandData(),u=this.data);for(var c=0;c<arguments.length;c++)u[this._len++]=arguments[c]}},e.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t<this._len;t++)e[t]=this.data[t];this.data=e}},e.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var e=this.data;e instanceof Array&&(e.length=this._len,Eg&&this._len>11&&(this.data=new Float32Array(e)))}},e.prototype.getBoundingRect=function(){_g[0]=_g[1]=bg[0]=bg[1]=Number.MAX_VALUE,wg[0]=wg[1]=Sg[0]=Sg[1]=-Number.MAX_VALUE;var e,t=this.data,n=0,o=0,i=0,r=0;for(e=0;e<this._len;){var a=t[e++],l=1===e;switch(l&&(i=n=t[e],r=o=t[e+1]),a){case mg.M:n=i=t[e++],o=r=t[e++],bg[0]=i,bg[1]=r,Sg[0]=i,Sg[1]=r;break;case mg.L:dg(n,o,t[e],t[e+1],bg,Sg),n=t[e++],o=t[e++];break;case mg.C:fg(n,o,t[e++],t[e++],t[e++],t[e++],t[e],t[e+1],bg,Sg),n=t[e++],o=t[e++];break;case mg.Q:gg(n,o,t[e++],t[e++],t[e],t[e+1],bg,Sg),n=t[e++],o=t[e++];break;case mg.A:var s=t[e++],u=t[e++],c=t[e++],d=t[e++],h=t[e++],p=t[e++]+h;e+=1;var f=!t[e++];l&&(i=Tg(h)*c+s,r=Ig(h)*d+u),vg(s,u,c,d,h,p,f,bg,Sg),n=Tg(p)*c+s,o=Ig(p)*d+u;break;case mg.R:dg(i=n=t[e++],r=o=t[e++],i+t[e++],r+t[e++],bg,Sg);break;case mg.Z:n=i,o=r}yu(_g,_g,bg),xu(wg,wg,Sg)}return 0===e&&(_g[0]=_g[1]=wg[0]=wg[1]=0),new cc(_g[0],_g[1],wg[0]-_g[0],wg[1]-_g[1])},e.prototype._calculateLength=function(){var e=this.data,t=this._len,n=this._ux,o=this._uy,i=0,r=0,a=0,l=0;this._pathSegLen||(this._pathSegLen=[]);for(var s=this._pathSegLen,u=0,c=0,d=0;d<t;){var h=e[d++],p=1===d;p&&(a=i=e[d],l=r=e[d+1]);var f=-1;switch(h){case mg.M:i=a=e[d++],r=l=e[d++];break;case mg.L:var g=e[d++],v=(x=e[d++])-r;(kg(D=g-i)>n||kg(v)>o||d===t-1)&&(f=Math.sqrt(D*D+v*v),i=g,r=x);break;case mg.C:var m=e[d++],y=e[d++],x=(g=e[d++],e[d++]),_=e[d++],w=e[d++];f=qc(i,r,m,y,g,x,_,w,10),i=_,r=w;break;case mg.Q:f=nd(i,r,m=e[d++],y=e[d++],g=e[d++],x=e[d++],10),i=g,r=x;break;case mg.A:var b=e[d++],S=e[d++],C=e[d++],M=e[d++],T=e[d++],I=e[d++],k=I+T;d+=1,p&&(a=Tg(T)*C+b,l=Ig(T)*M+S),f=Mg(C,M)*Cg(Ng,Math.abs(I)),i=Tg(k)*C+b,r=Ig(k)*M+S;break;case mg.R:a=i=e[d++],l=r=e[d++],f=2*e[d++]+2*e[d++];break;case mg.Z:var D=a-i;v=l-r;f=Math.sqrt(D*D+v*v),i=a,r=l}f>=0&&(s[c++]=f,u+=f)}return this._pathLen=u,u},e.prototype.rebuildPath=function(e,t){var n,o,i,r,a,l,s,u,c,d,h=this.data,p=this._ux,f=this._uy,g=this._len,v=t<1,m=0,y=0,x=0;if(!v||(this._pathSegLen||this._calculateLength(),s=this._pathSegLen,u=t*this._pathLen))e:for(var _=0;_<g;){var w=h[_++],b=1===_;switch(b&&(n=i=h[_],o=r=h[_+1]),w!==mg.L&&x>0&&(e.lineTo(c,d),x=0),w){case mg.M:n=i=h[_++],o=r=h[_++],e.moveTo(i,r);break;case mg.L:a=h[_++],l=h[_++];var S=kg(a-i),C=kg(l-r);if(S>p||C>f){if(v){if(m+(j=s[y++])>u){var M=(u-m)/j;e.lineTo(i*(1-M)+a*M,r*(1-M)+l*M);break e}m+=j}e.lineTo(a,l),i=a,r=l,x=0}else{var T=S*S+C*C;T>x&&(c=a,d=l,x=T)}break;case mg.C:var I=h[_++],k=h[_++],D=h[_++],N=h[_++],E=h[_++],A=h[_++];if(v){if(m+(j=s[y++])>u){jc(i,I,D,E,M=(u-m)/j,yg),jc(r,k,N,A,M,xg),e.bezierCurveTo(yg[1],xg[1],yg[2],xg[2],yg[3],xg[3]);break e}m+=j}e.bezierCurveTo(I,k,D,N,E,A),i=E,r=A;break;case mg.Q:I=h[_++],k=h[_++],D=h[_++],N=h[_++];if(v){if(m+(j=s[y++])>u){ed(i,I,D,M=(u-m)/j,yg),ed(r,k,N,M,xg),e.quadraticCurveTo(yg[1],xg[1],yg[2],xg[2]);break e}m+=j}e.quadraticCurveTo(I,k,D,N),i=D,r=N;break;case mg.A:var L=h[_++],V=h[_++],O=h[_++],P=h[_++],B=h[_++],R=h[_++],z=h[_++],F=!h[_++],G=O>P?O:P,H=kg(O-P)>.001,W=B+R,U=!1;if(v)m+(j=s[y++])>u&&(W=B+R*(u-m)/j,U=!0),m+=j;if(H&&e.ellipse?e.ellipse(L,V,O,P,z,B,W,F):e.arc(L,V,G,B,W,F),U)break e;b&&(n=Tg(B)*O+L,o=Ig(B)*P+V),i=Tg(W)*O+L,r=Ig(W)*P+V;break;case mg.R:n=i=h[_],o=r=h[_+1],a=h[_++],l=h[_++];var Y=h[_++],Z=h[_++];if(v){if(m+(j=s[y++])>u){var X=u-m;e.moveTo(a,l),e.lineTo(a+Cg(X,Y),l),(X-=Y)>0&&e.lineTo(a+Y,l+Cg(X,Z)),(X-=Z)>0&&e.lineTo(a+Mg(Y-X,0),l+Z),(X-=Y)>0&&e.lineTo(a,l+Mg(Z-X,0));break e}m+=j}e.rect(a,l,Y,Z);break;case mg.Z:if(v){var j;if(m+(j=s[y++])>u){M=(u-m)/j;e.lineTo(i*(1-M)+n*M,r*(1-M)+o*M);break e}m+=j}e.closePath(),i=n,r=o}}},e.prototype.clone=function(){var t=new e,n=this.data;return t.data=n.slice?n.slice():Array.prototype.slice.call(n),t._len=this._len,t},e.CMD=mg,e.initDefaultProps=((t=e.prototype)._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,void(t._version=0)),e}();function Pg(e,t,n,o,i,r,a){if(0===i)return!1;var l=i,s=0;if(a>t+l&&a>o+l||a<t-l&&a<o-l||r>e+l&&r>n+l||r<e-l&&r<n-l)return!1;if(e===n)return Math.abs(r-e)<=l/2;var u=(s=(t-o)/(e-n))*r-a+(e*o-n*t)/(e-n);return u*u/(s*s+1)<=l/2*l/2}function Bg(e,t,n,o,i,r,a,l,s,u,c){if(0===s)return!1;var d=s;return!(c>t+d&&c>o+d&&c>r+d&&c>l+d||c<t-d&&c<o-d&&c<r-d&&c<l-d||u>e+d&&u>n+d&&u>i+d&&u>a+d||u<e-d&&u<n-d&&u<i-d&&u<a-d)&&$c(e,t,n,o,i,r,a,l,u,c,null)<=d/2}function Rg(e,t,n,o,i,r,a,l,s){if(0===a)return!1;var u=a;return!(s>t+u&&s>o+u&&s>r+u||s<t-u&&s<o-u&&s<r-u||l>e+u&&l>n+u&&l>i+u||l<e-u&&l<n-u&&l<i-u)&&td(e,t,n,o,i,r,l,s,null)<=u/2}var zg=2*Math.PI;function Fg(e){return(e%=zg)<0&&(e+=zg),e}var Gg=2*Math.PI;function Hg(e,t,n,o,i,r,a,l,s){if(0===a)return!1;var u=a;l-=e,s-=t;var c=Math.sqrt(l*l+s*s);if(c-u>n||c+u<n)return!1;if(Math.abs(o-i)%Gg<1e-4)return!0;if(r){var d=o;o=Fg(i),i=Fg(d)}else o=Fg(o),i=Fg(i);o>i&&(i+=Gg);var h=Math.atan2(s,l);return h<0&&(h+=Gg),h>=o&&h<=i||h+Gg>=o&&h+Gg<=i}function Wg(e,t,n,o,i,r){if(r>t&&r>o||r<t&&r<o)return 0;if(o===t)return 0;var a=(r-t)/(o-t),l=o<t?1:-1;1!==a&&0!==a||(l=o<t?.5:-.5);var s=a*(n-e)+e;return s===i?1/0:s>i?l:0}var Ug=Og.CMD,Yg=2*Math.PI;var Zg=[-1,-1,-1],Xg=[-1,-1];function jg(){var e=Xg[0];Xg[0]=Xg[1],Xg[1]=e}function $g(e,t,n,o,i,r,a,l,s,u){if(u>t&&u>o&&u>r&&u>l||u<t&&u<o&&u<r&&u<l)return 0;var c=Zc(t,o,r,l,u,Zg);if(0===c)return 0;for(var d=0,h=-1,p=void 0,f=void 0,g=0;g<c;g++){var v=Zg[g],m=0===v||1===v?.5:1;Uc(e,n,i,a,v)<s||(h<0&&(h=Xc(t,o,r,l,Xg),Xg[1]<Xg[0]&&h>1&&jg(),p=Uc(t,o,r,l,Xg[0]),h>1&&(f=Uc(t,o,r,l,Xg[1]))),2===h?v<Xg[0]?d+=p<t?m:-m:v<Xg[1]?d+=f<p?m:-m:d+=l<f?m:-m:v<Xg[0]?d+=p<t?m:-m:d+=l<p?m:-m)}return d}function qg(e,t,n,o,i,r,a,l){if(l>t&&l>o&&l>r||l<t&&l<o&&l<r)return 0;var s=function(e,t,n,o,i){var r=e-2*t+n,a=2*(t-e),l=e-o,s=0;if(Hc(r))Wc(a)&&(c=-l/a)>=0&&c<=1&&(i[s++]=c);else{var u=a*a-4*r*l;if(Hc(u))(c=-a/(2*r))>=0&&c<=1&&(i[s++]=c);else if(u>0){var c,d=Vc(u),h=(-a-d)/(2*r);(c=(-a+d)/(2*r))>=0&&c<=1&&(i[s++]=c),h>=0&&h<=1&&(i[s++]=h)}}return s}(t,o,r,l,Zg);if(0===s)return 0;var u=Qc(t,o,r);if(u>=0&&u<=1){for(var c=0,d=Kc(t,o,r,u),h=0;h<s;h++){var p=0===Zg[h]||1===Zg[h]?.5:1;Kc(e,n,i,Zg[h])<a||(Zg[h]<u?c+=d<t?p:-p:c+=r<d?p:-p)}return c}p=0===Zg[0]||1===Zg[0]?.5:1;return Kc(e,n,i,Zg[0])<a?0:r<t?p:-p}function Kg(e,t,n,o,i,r,a,l){if((l-=t)>n||l<-n)return 0;var s=Math.sqrt(n*n-l*l);Zg[0]=-s,Zg[1]=s;var u=Math.abs(o-i);if(u<1e-4)return 0;if(u>=Yg-1e-4){o=0,i=Yg;var c=r?1:-1;return a>=Zg[0]+e&&a<=Zg[1]+e?c:0}if(o>i){var d=o;o=i,i=d}o<0&&(o+=Yg,i+=Yg);for(var h=0,p=0;p<2;p++){var f=Zg[p];if(f+e>a){var g=Math.atan2(l,f);c=r?1:-1;g<0&&(g=Yg+g),(g>=o&&g<=i||g+Yg>=o&&g+Yg<=i)&&(g>Math.PI/2&&g<1.5*Math.PI&&(c=-c),h+=c)}}return h}function Jg(e,t,n,o,i){for(var r,a,l,s,u=e.data,c=e.len(),d=0,h=0,p=0,f=0,g=0,v=0;v<c;){var m=u[v++],y=1===v;switch(m===Ug.M&&v>1&&(n||(d+=Wg(h,p,f,g,o,i))),y&&(f=h=u[v],g=p=u[v+1]),m){case Ug.M:h=f=u[v++],p=g=u[v++];break;case Ug.L:if(n){if(Pg(h,p,u[v],u[v+1],t,o,i))return!0}else d+=Wg(h,p,u[v],u[v+1],o,i)||0;h=u[v++],p=u[v++];break;case Ug.C:if(n){if(Bg(h,p,u[v++],u[v++],u[v++],u[v++],u[v],u[v+1],t,o,i))return!0}else d+=$g(h,p,u[v++],u[v++],u[v++],u[v++],u[v],u[v+1],o,i)||0;h=u[v++],p=u[v++];break;case Ug.Q:if(n){if(Rg(h,p,u[v++],u[v++],u[v],u[v+1],t,o,i))return!0}else d+=qg(h,p,u[v++],u[v++],u[v],u[v+1],o,i)||0;h=u[v++],p=u[v++];break;case Ug.A:var x=u[v++],_=u[v++],w=u[v++],b=u[v++],S=u[v++],C=u[v++];v+=1;var M=!!(1-u[v++]);r=Math.cos(S)*w+x,a=Math.sin(S)*b+_,y?(f=r,g=a):d+=Wg(h,p,r,a,o,i);var T=(o-x)*b/w+x;if(n){if(Hg(x,_,b,S,S+C,M,t,T,i))return!0}else d+=Kg(x,_,b,S,S+C,M,T,i);h=Math.cos(S+C)*w+x,p=Math.sin(S+C)*b+_;break;case Ug.R:if(f=h=u[v++],g=p=u[v++],r=f+u[v++],a=g+u[v++],n){if(Pg(f,g,r,g,t,o,i)||Pg(r,g,r,a,t,o,i)||Pg(r,a,f,a,t,o,i)||Pg(f,a,f,g,t,o,i))return!0}else d+=Wg(r,g,r,a,o,i),d+=Wg(f,a,f,g,o,i);break;case Ug.Z:if(n){if(Pg(h,p,f,g,t,o,i))return!0}else d+=Wg(h,p,f,g,o,i);h=f,p=g}}return n||(l=p,s=g,Math.abs(l-s)<1e-4)||(d+=Wg(h,p,f,g,o,i)||0),0!==d}var Qg=fs({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},$f),ev={style:fs({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},qf.style)},tv=Fh.concat(["invisible","culling","z","z2","zlevel","parent"]),nv=function(e){function t(t){return e.call(this,t)||this}var n;return Wl(t,e),t.prototype.update=function(){var n=this;e.prototype.update.call(this);var o=this.style;if(o.decal){var i=this._decalEl=this._decalEl||new t;i.buildPath===t.prototype.buildPath&&(i.buildPath=function(e){n.buildPath(e,n.shape)}),i.silent=!0;var r=i.style;for(var a in o)r[a]!==o[a]&&(r[a]=o[a]);r.fill=o.fill?o.decal:null,r.decal=null,r.shadowColor=null,o.strokeFirst&&(r.stroke=null);for(var l=0;l<tv.length;++l)i[tv[l]]=this[tv[l]];i.__dirty|=1}else this._decalEl&&(this._decalEl=null)},t.prototype.getDecalElement=function(){return this._decalEl},t.prototype._init=function(t){var n=bs(t);this.shape=this.getDefaultShape();var o=this.getDefaultStyle();o&&this.useStyle(o);for(var i=0;i<n.length;i++){var r=n[i],a=t[r];"style"===r?this.style?ps(this.style,a):this.useStyle(a):"shape"===r?ps(this.shape,a):e.prototype.attrKV.call(this,r,a)}this.style||this.useStyle({})},t.prototype.getDefaultStyle=function(){return null},t.prototype.getDefaultShape=function(){return{}},t.prototype.canBeInsideText=function(){return this.hasFill()},t.prototype.getInsideTextFill=function(){var e=this.style.fill;if("none"!==e){if(Is(e)){var t=kd(e,0);return t>.5?Nh:t>.2?"#eee":Eh}if(e)return Eh}return Nh},t.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(Is(t)){var n=this.__zr;if(!(!n||!n.isDarkMode())===kd(e,0)<.4)return t}},t.prototype.buildPath=function(e,t,n){},t.prototype.pathUpdated=function(){this.__dirty&=-5},t.prototype.getUpdatedPathProxy=function(e){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},t.prototype.createPathProxy=function(){this.path=new Og(!1)},t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return!(null==t||"none"===t||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style.fill;return null!=e&&"none"!==e},t.prototype.getBoundingRect=function(){var e=this._rect,t=this.style,n=!e;if(n){var o=!1;this.path||(o=!0,this.createPathProxy());var i=this.path;(o||4&this.__dirty)&&(i.beginPath(),this.buildPath(i,this.shape,!1),this.pathUpdated()),e=i.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var r=this._rectStroke||(this._rectStroke=e.clone());if(this.__dirty||n){r.copy(e);var a=t.strokeNoScale?this.getLineScale():1,l=t.lineWidth;if(!this.hasFill()){var s=this.strokeContainThreshold;l=Math.max(l,null==s?4:s)}a>1e-10&&(r.width+=l/a,r.height+=l/a,r.x-=l/a/2,r.y-=l/a/2)}return r}return e},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),o=this.getBoundingRect(),i=this.style;if(e=n[0],t=n[1],o.contain(e,t)){var r=this.path;if(this.hasStroke()){var a=i.lineWidth,l=i.strokeNoScale?this.getLineScale():1;if(l>1e-10&&(this.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),function(e,t,n,o){return Jg(e,t,!0,n,o)}(r,a/l,e,t)))return!0}if(this.hasFill())return function(e,t,n){return Jg(e,0,!1,t,n)}(r,e,t)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate("shape",e)},t.prototype.updateDuringAnimation=function(e){"style"===e?this.dirtyStyle():"shape"===e?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(t,n){"shape"===t?this.setShape(n):e.prototype.attrKV.call(this,t,n)},t.prototype.setShape=function(e,t){var n=this.shape;return n||(n=this.shape={}),"string"==typeof e?n[e]=t:ps(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(4&this.__dirty)},t.prototype.createStyle=function(e){return Js(Qg,e)},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=ps({},this.shape))},t.prototype._applyStateObj=function(t,n,o,i,r,a){e.prototype._applyStateObj.call(this,t,n,o,i,r,a);var l,s=!(n&&i);if(n&&n.shape?r?i?l=n.shape:(l=ps({},o.shape),ps(l,n.shape)):(l=ps({},i?this.shape:o.shape),ps(l,n.shape)):s&&(l=o.shape),l)if(r){this.shape=ps({},this.shape);for(var u={},c=bs(l),d=0;d<c.length;d++){var h=c[d];"object"==typeof l[h]?this.shape[h]=l[h]:u[h]=l[h]}this._transitionState(t,{shape:u},a)}else this.shape=l,this.dirtyShape()},t.prototype._mergeStates=function(t){for(var n,o=e.prototype._mergeStates.call(this,t),i=0;i<t.length;i++){var r=t[i];r.shape&&(n=n||{},this._mergeStyle(n,r.shape))}return n&&(o.shape=n),o},t.prototype.getAnimationStyleProps=function(){return ev},t.prototype.isZeroArea=function(){return!1},t.extend=function(e){var n=function(t){function n(n){var o=t.call(this,n)||this;return e.init&&e.init.call(o,n),o}return Wl(n,t),n.prototype.getDefaultStyle=function(){return cs(e.style)},n.prototype.getDefaultShape=function(){return cs(e.shape)},n}(t);for(var o in e)"function"==typeof e[o]&&(n.prototype[o]=e[o]);return n},t.initDefaultProps=((n=t.prototype).type="path",n.strokeContainThreshold=5,n.segmentIgnoreThreshold=0,n.subPixelOptimize=!1,n.autoBatch=!1,void(n.__dirty=7)),t}(Qf),ov=fs({strokeFirst:!0,font:Xl,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},Qg),iv=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Wl(t,e),t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return null!=t&&"none"!==t&&e.lineWidth>0},t.prototype.hasFill=function(){var e=this.style.fill;return null!=e&&"none"!==e},t.prototype.createStyle=function(e){return Js(ov,e)},t.prototype.setBoundingRect=function(e){this._rect=e},t.prototype.getBoundingRect=function(){var e=this.style;if(!this._rect){var t=e.text;null!=t?t+="":t="";var n=Yh(t,e.font,e.textAlign,e.textBaseline);if(n.x+=e.x||0,n.y+=e.y||0,this.hasStroke()){var o=e.lineWidth;n.x-=o/2,n.y-=o/2,n.width+=o,n.height+=o}this._rect=n}return this._rect},t.initDefaultProps=void(t.prototype.dirtyRectTolerance=10),t}(Qf);iv.prototype.type="tspan";var rv=fs({x:0,y:0},$f),av={style:fs({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},qf.style)};var lv=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Wl(t,e),t.prototype.createStyle=function(e){return Js(rv,e)},t.prototype._getSize=function(e){var t=this.style,n=t[e];if(null!=n)return n;var o,i=(o=t.image)&&"string"!=typeof o&&o.width&&o.height?t.image:this.__image;if(!i)return 0;var r="width"===e?"height":"width",a=t[r];return null==a?i[e]:i[e]/i[r]*a},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return av},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||(this._rect=new cc(e.x||0,e.y||0,this.getWidth(),this.getHeight())),this._rect},t}(Qf);lv.prototype.type="image";var sv=Math.round;function uv(e,t,n){if(t){var o=t.x1,i=t.x2,r=t.y1,a=t.y2;e.x1=o,e.x2=i,e.y1=r,e.y2=a;var l=n&&n.lineWidth;return l?(sv(2*o)===sv(2*i)&&(e.x1=e.x2=dv(o,l,!0)),sv(2*r)===sv(2*a)&&(e.y1=e.y2=dv(r,l,!0)),e):e}}function cv(e,t,n){if(t){var o=t.x,i=t.y,r=t.width,a=t.height;e.x=o,e.y=i,e.width=r,e.height=a;var l=n&&n.lineWidth;return l?(e.x=dv(o,l,!0),e.y=dv(i,l,!0),e.width=Math.max(dv(o+r,l,!1)-e.x,0===r?0:1),e.height=Math.max(dv(i+a,l,!1)-e.y,0===a?0:1),e):e}}function dv(e,t,n){if(!t)return e;var o=sv(2*e);return(o+sv(t))%2==0?o/2:(o+(n?1:-1))/2}var hv=function(){return function(){this.x=0,this.y=0,this.width=0,this.height=0}}(),pv={},fv=function(e){function t(t){return e.call(this,t)||this}return Wl(t,e),t.prototype.getDefaultShape=function(){return new hv},t.prototype.buildPath=function(e,t){var n,o,i,r;if(this.subPixelOptimize){var a=cv(pv,t,this.style);n=a.x,o=a.y,i=a.width,r=a.height,a.r=t.r,t=a}else n=t.x,o=t.y,i=t.width,r=t.height;t.r?function(e,t){var n,o,i,r,a,l=t.x,s=t.y,u=t.width,c=t.height,d=t.r;u<0&&(l+=u,u=-u),c<0&&(s+=c,c=-c),"number"==typeof d?n=o=i=r=d:d instanceof Array?1===d.length?n=o=i=r=d[0]:2===d.length?(n=i=d[0],o=r=d[1]):3===d.length?(n=d[0],o=r=d[1],i=d[2]):(n=d[0],o=d[1],i=d[2],r=d[3]):n=o=i=r=0,n+o>u&&(n*=u/(a=n+o),o*=u/a),i+r>u&&(i*=u/(a=i+r),r*=u/a),o+i>c&&(o*=c/(a=o+i),i*=c/a),n+r>c&&(n*=c/(a=n+r),r*=c/a),e.moveTo(l+n,s),e.lineTo(l+u-o,s),0!==o&&e.arc(l+u-o,s+o,o,-Math.PI/2,0),e.lineTo(l+u,s+c-i),0!==i&&e.arc(l+u-i,s+c-i,i,0,Math.PI/2),e.lineTo(l+r,s+c),0!==r&&e.arc(l+r,s+c-r,r,Math.PI/2,Math.PI),e.lineTo(l,s+n),0!==n&&e.arc(l+n,s+n,n,Math.PI,1.5*Math.PI)}(e,t):e.rect(n,o,i,r)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(nv);fv.prototype.type="rect";var gv={fill:"#000"},vv={style:fs({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},qf.style)},mv=function(e){function t(t){var n=e.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=gv,n.attr(t),n}return Wl(t,e),t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t<this._children.length;t++){var n=this._children[t];n.zlevel=this.zlevel,n.z=this.z,n.z2=this.z2,n.culling=this.culling,n.cursor=this.cursor,n.invisible=this.invisible}},t.prototype.updateTransform=function(){var t=this.innerTransformable;t?(t.updateTransform(),t.transform&&(this.transform=t.transform)):e.prototype.updateTransform.call(this)},t.prototype.getLocalTransform=function(t){var n=this.innerTransformable;return n?n.getLocalTransform(t):e.prototype.getLocalTransform.call(this,t)},t.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),e.prototype.getComputedTransform.call(this)},t.prototype._updateSubTexts=function(){var e;this._childCursor=0,Cv(e=this.style),ys(e.rich,Cv),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},t.prototype.addSelfToZr=function(t){e.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=t},t.prototype.removeSelfFromZr=function(t){e.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=null},t.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var e=new cc(0,0,0,0),t=this._children,n=[],o=null,i=0;i<t.length;i++){var r=t[i],a=r.getBoundingRect(),l=r.getLocalTransform(n);l?(e.copy(a),e.applyTransform(l),(o=o||e.clone()).union(e)):(o=o||a.clone()).union(a)}this._rect=o||e}return this._rect},t.prototype.setDefaultTextStyle=function(e){this._defaultStyle=e||gv},t.prototype.setTextContent=function(e){if("production"!==process.env.NODE_ENV)throw new Error("Can't attach text on another text")},t.prototype._mergeStyle=function(e,t){if(!t)return e;var n=t.rich,o=e.rich||n&&{};return ps(e,t),n&&o?(this._mergeRich(o,n),e.rich=o):o&&(e.rich=o),e},t.prototype._mergeRich=function(e,t){for(var n=bs(t),o=0;o<n.length;o++){var i=n[o];e[i]=e[i]||{},ps(e[i],t[i])}},t.prototype.getAnimationStyleProps=function(){return vv},t.prototype._getOrCreateChild=function(e){var t=this._children[this._childCursor];return t&&t instanceof e||(t=new e),this._children[this._childCursor++]=t,t.__zr=this.__zr,t.parent=this,t},t.prototype._updatePlainTexts=function(){var e=this.style,t=e.font||Xl,n=e.padding,o=function(e,t){null!=e&&(e+="");var n,o=t.overflow,i=t.padding,r=t.font,a="truncate"===o,l=jh(r),s=Rs(t.lineHeight,l),u=!!t.backgroundColor,c="truncate"===t.lineOverflow,d=!1,h=t.width,p=(n=null==h||"break"!==o&&"breakAll"!==o?e?e.split("\n"):[]:e?Xf(e,t.font,h,"breakAll"===o,0).lines:[]).length*s,f=Rs(t.height,p);if(p>f&&c){var g=Math.floor(f/s);d=d||n.length>g,n=n.slice(0,g)}if(e&&a&&null!=h)for(var v=Rf(h,r,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),m={},y=0;y<n.length;y++)zf(m,n[y],v),n[y]=m.textLine,d=d||m.isTruncated;var x=f,_=0;for(y=0;y<n.length;y++)_=Math.max(Wh(n[y],r),_);null==h&&(h=_);var w=_;return i&&(x+=i[0]+i[2],w+=i[1]+i[3],h+=i[1]+i[3]),u&&(w=h),{lines:n,height:f,outerWidth:w,outerHeight:x,lineHeight:s,calculatedLineHeight:l,contentWidth:_,contentHeight:p,width:h,isTruncated:d}}(kv(e),e),i=Dv(e),r=!!e.backgroundColor,a=o.outerHeight,l=o.outerWidth,s=o.contentWidth,u=o.lines,c=o.lineHeight,d=this._defaultStyle;this.isTruncated=!!o.isTruncated;var h=e.x||0,p=e.y||0,f=e.align||d.align||"left",g=e.verticalAlign||d.verticalAlign||"top",v=h,m=Xh(p,o.contentHeight,g);if(i||n){var y=Zh(h,l,f),x=Xh(p,a,g);i&&this._renderBackground(e,e,y,x,l,a)}m+=c/2,n&&(v=Iv(h,f,n),"top"===g?m+=n[0]:"bottom"===g&&(m-=n[2]));for(var _=0,w=!1,b=(Tv("fill"in e?e.fill:(w=!0,d.fill))),S=(Mv("stroke"in e?e.stroke:r||d.autoStroke&&!w?null:(_=2,d.stroke))),C=e.textShadowBlur>0,M=null!=e.width&&("truncate"===e.overflow||"break"===e.overflow||"breakAll"===e.overflow),T=o.calculatedLineHeight,I=0;I<u.length;I++){var k=this._getOrCreateChild(iv),D=k.createStyle();k.useStyle(D),D.text=u[I],D.x=v,D.y=m,D.textAlign=f,D.textBaseline="middle",D.opacity=e.opacity,D.strokeFirst=!0,C&&(D.shadowBlur=e.textShadowBlur||0,D.shadowColor=e.textShadowColor||"transparent",D.shadowOffsetX=e.textShadowOffsetX||0,D.shadowOffsetY=e.textShadowOffsetY||0),D.stroke=S,D.fill=b,S&&(D.lineWidth=e.lineWidth||_,D.lineDash=e.lineDash,D.lineDashOffset=e.lineDashOffset||0),D.font=t,bv(D,e),m+=c,M&&k.setBoundingRect(new cc(Zh(D.x,s,D.textAlign),Xh(D.y,T,D.textBaseline),s,T))}},t.prototype._updateRichTexts=function(){var e=this.style,t=function(e,t){var n=new Wf;if(null!=e&&(e+=""),!e)return n;for(var o,i=t.width,r=t.height,a=t.overflow,l="break"!==a&&"breakAll"!==a||null==i?null:{width:i,accumWidth:0,breakAll:"breakAll"===a},s=Pf.lastIndex=0;null!=(o=Pf.exec(e));){var u=o.index;u>s&&Uf(n,e.substring(s,u),t,l),Uf(n,o[2],t,l,o[1]),s=Pf.lastIndex}s<e.length&&Uf(n,e.substring(s,e.length),t,l);var c=[],d=0,h=0,p=t.padding,f="truncate"===a,g="truncate"===t.lineOverflow,v={};function m(e,t,n){e.width=t,e.lineHeight=n,d+=n,h=Math.max(h,t)}e:for(var y=0;y<n.lines.length;y++){for(var x=n.lines[y],_=0,w=0,b=0;b<x.tokens.length;b++){var S=(V=x.tokens[b]).styleName&&t.rich[V.styleName]||{},C=V.textPadding=S.padding,M=C?C[1]+C[3]:0,T=V.font=S.font||t.font;V.contentHeight=jh(T);var I=Rs(S.height,V.contentHeight);if(V.innerHeight=I,C&&(I+=C[0]+C[2]),V.height=I,V.lineHeight=zs(S.lineHeight,t.lineHeight,I),V.align=S&&S.align||t.align,V.verticalAlign=S&&S.verticalAlign||"middle",g&&null!=r&&d+V.lineHeight>r){var k=n.lines.length;b>0?(x.tokens=x.tokens.slice(0,b),m(x,w,_),n.lines=n.lines.slice(0,y+1)):n.lines=n.lines.slice(0,y),n.isTruncated=n.isTruncated||n.lines.length<k;break e}var D=S.width,N=null==D||"auto"===D;if("string"==typeof D&&"%"===D.charAt(D.length-1))V.percentWidth=D,c.push(V),V.contentWidth=Wh(V.text,T);else{if(N){var E=S.backgroundColor,A=E&&E.image;A&&Of(A=Af(A))&&(V.width=Math.max(V.width,A.width*I/A.height))}var L=f&&null!=i?i-w:null;null!=L&&L<V.width?!N||L<M?(V.text="",V.width=V.contentWidth=0):(Bf(v,V.text,L-M,T,t.ellipsis,{minChar:t.truncateMinChar}),V.text=v.text,n.isTruncated=n.isTruncated||v.isTruncated,V.width=V.contentWidth=Wh(V.text,T)):V.contentWidth=Wh(V.text,T)}V.width+=M,w+=V.width,S&&(_=Math.max(_,V.lineHeight))}m(x,w,_)}for(n.outerWidth=n.width=Rs(i,h),n.outerHeight=n.height=Rs(r,d),n.contentHeight=d,n.contentWidth=h,p&&(n.outerWidth+=p[1]+p[3],n.outerHeight+=p[0]+p[2]),y=0;y<c.length;y++){var V,O=(V=c[y]).percentWidth;V.width=parseInt(O,10)/100*n.width}return n}(kv(e),e),n=t.width,o=t.outerWidth,i=t.outerHeight,r=e.padding,a=e.x||0,l=e.y||0,s=this._defaultStyle,u=e.align||s.align,c=e.verticalAlign||s.verticalAlign;this.isTruncated=!!t.isTruncated;var d=Zh(a,o,u),h=Xh(l,i,c),p=d,f=h;r&&(p+=r[3],f+=r[0]);var g=p+n;Dv(e)&&this._renderBackground(e,e,d,h,o,i);for(var v=!!e.backgroundColor,m=0;m<t.lines.length;m++){for(var y=t.lines[m],x=y.tokens,_=x.length,w=y.lineHeight,b=y.width,S=0,C=p,M=g,T=_-1,I=void 0;S<_&&(!(I=x[S]).align||"left"===I.align);)this._placeToken(I,e,w,f,C,"left",v),b-=I.width,C+=I.width,S++;for(;T>=0&&"right"===(I=x[T]).align;)this._placeToken(I,e,w,f,M,"right",v),b-=I.width,M-=I.width,T--;for(C+=(n-(C-p)-(g-M)-b)/2;S<=T;)I=x[S],this._placeToken(I,e,w,f,C+I.width/2,"center",v),C+=I.width,S++;f+=w}},t.prototype._placeToken=function(e,t,n,o,i,r,a){var l=t.rich[e.styleName]||{};l.text=e.text;var s=e.verticalAlign,u=o+n/2;"top"===s?u=o+e.height/2:"bottom"===s&&(u=o+n-e.height/2),!e.isLineHolder&&Dv(l)&&this._renderBackground(l,t,"right"===r?i-e.width:"center"===r?i-e.width/2:i,u-e.height/2,e.width,e.height);var c=!!l.backgroundColor,d=e.textPadding;d&&(i=Iv(i,r,d),u-=e.height/2-d[0]-e.innerHeight/2);var h=this._getOrCreateChild(iv),p=h.createStyle();h.useStyle(p);var f=this._defaultStyle,g=!1,v=0,m=Tv("fill"in l?l.fill:"fill"in t?t.fill:(g=!0,f.fill)),y=Mv("stroke"in l?l.stroke:"stroke"in t?t.stroke:c||a||f.autoStroke&&!g?null:(v=2,f.stroke)),x=l.textShadowBlur>0||t.textShadowBlur>0;p.text=e.text,p.x=i,p.y=u,x&&(p.shadowBlur=l.textShadowBlur||t.textShadowBlur||0,p.shadowColor=l.textShadowColor||t.textShadowColor||"transparent",p.shadowOffsetX=l.textShadowOffsetX||t.textShadowOffsetX||0,p.shadowOffsetY=l.textShadowOffsetY||t.textShadowOffsetY||0),p.textAlign=r,p.textBaseline="middle",p.font=e.font||Xl,p.opacity=zs(l.opacity,t.opacity,1),bv(p,l),y&&(p.lineWidth=zs(l.lineWidth,t.lineWidth,v),p.lineDash=Rs(l.lineDash,t.lineDash),p.lineDashOffset=t.lineDashOffset||0,p.stroke=y),m&&(p.fill=m);var _=e.contentWidth,w=e.contentHeight;h.setBoundingRect(new cc(Zh(p.x,_,p.textAlign),Xh(p.y,w,p.textBaseline),_,w))},t.prototype._renderBackground=function(e,t,n,o,i,r){var a,l,s,u=e.backgroundColor,c=e.borderWidth,d=e.borderColor,h=u&&u.image,p=u&&!h,f=e.borderRadius,g=this;if(p||e.lineHeight||c&&d){(a=this._getOrCreateChild(fv)).useStyle(a.createStyle()),a.style.fill=null;var v=a.shape;v.x=n,v.y=o,v.width=i,v.height=r,v.r=f,a.dirtyShape()}if(p)(s=a.style).fill=u||null,s.fillOpacity=Rs(e.fillOpacity,1);else if(h){(l=this._getOrCreateChild(lv)).onload=function(){g.dirtyStyle()};var m=l.style;m.image=u.image,m.x=n,m.y=o,m.width=i,m.height=r}c&&d&&((s=a.style).lineWidth=c,s.stroke=d,s.strokeOpacity=Rs(e.strokeOpacity,1),s.lineDash=e.borderDash,s.lineDashOffset=e.borderDashOffset||0,a.strokeContainThreshold=0,a.hasFill()&&a.hasStroke()&&(s.strokeFirst=!0,s.lineWidth*=2));var y=(a||l).style;y.shadowBlur=e.shadowBlur||0,y.shadowColor=e.shadowColor||"transparent",y.shadowOffsetX=e.shadowOffsetX||0,y.shadowOffsetY=e.shadowOffsetY||0,y.opacity=zs(e.opacity,t.opacity,1)},t.makeFont=function(e){var t="";return Sv(e)&&(t=[e.fontStyle,e.fontWeight,wv(e.fontSize),e.fontFamily||"sans-serif"].join(" ")),t&&Ws(t)||e.textFont||e.font},t}(Qf),yv={left:!0,right:1,center:1},xv={top:1,bottom:1,middle:1},_v=["fontStyle","fontWeight","fontSize","fontFamily"];function wv(e){return"string"!=typeof e||-1===e.indexOf("px")&&-1===e.indexOf("rem")&&-1===e.indexOf("em")?isNaN(+e)?"12px":e+"px":e}function bv(e,t){for(var n=0;n<_v.length;n++){var o=_v[n],i=t[o];null!=i&&(e[o]=i)}}function Sv(e){return null!=e.fontSize||e.fontFamily||e.fontWeight}function Cv(e){if(e){e.font=mv.makeFont(e);var t=e.align;"middle"===t&&(t="center"),e.align=null==t||yv[t]?t:"left";var n=e.verticalAlign;"center"===n&&(n="middle"),e.verticalAlign=null==n||xv[n]?n:"top",e.padding&&(e.padding=Gs(e.padding))}}function Mv(e,t){return null==e||t<=0||"transparent"===e||"none"===e?null:e.image||e.colorStops?"#000":e}function Tv(e){return null==e||"none"===e?null:e.image||e.colorStops?"#000":e}function Iv(e,t,n){return"right"===t?e-n[1]:"center"===t?e+n[3]/2-n[1]/2:e+n[3]}function kv(e){var t=e.text;return null!=t&&(t+=""),t}function Dv(e){return!!(e.backgroundColor||e.lineHeight||e.borderWidth&&e.borderColor)}var Nv=uf(),Ev=function(e,t,n,o){if(o){var i=Nv(o);i.dataIndex=n,i.dataType=t,i.seriesIndex=e,i.ssrType="chart","group"===o.type&&o.traverse(function(o){var i=Nv(o);i.seriesIndex=e,i.dataIndex=n,i.dataType=t,i.ssrType="chart"})}},Av=1,Lv={},Vv=uf(),Ov=uf(),Pv=["emphasis","blur","select"],Bv=["normal","emphasis","blur","select"],Rv=10,zv="highlight",Fv="downplay",Gv="select",Hv="unselect",Wv="toggleSelect";function Uv(e){return null!=e&&"none"!==e}function Yv(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function Zv(e){Yv(e,"emphasis",2)}function Xv(e){2===e.hoverState&&Yv(e,"normal",0)}function jv(e){Yv(e,"blur",1)}function $v(e){1===e.hoverState&&Yv(e,"normal",0)}function qv(e){e.selected=!0}function Kv(e){e.selected=!1}function Jv(e,t,n){t(e,n)}function Qv(e,t,n){Jv(e,t,n),e.isGroup&&e.traverse(function(e){Jv(e,t,n)})}function em(e,t){switch(t){case"emphasis":e.hoverState=2;break;case"normal":e.hoverState=0;break;case"blur":e.hoverState=1;break;case"select":e.selected=!0}}function tm(e,t){var n=this.states[e];if(this.style){if("emphasis"===e)return function(e,t,n,o){var i=n&&gs(n,"select")>=0,r=!1;if(e instanceof nv){var a=Vv(e),l=i&&a.selectFill||a.normalFill,s=i&&a.selectStroke||a.normalStroke;if(Uv(l)||Uv(s)){var u=(o=o||{}).style||{};"inherit"===u.fill?(r=!0,o=ps({},o),(u=ps({},u)).fill=l):!Uv(u.fill)&&Uv(l)?(r=!0,o=ps({},o),(u=ps({},u)).fill=Nd(l)):!Uv(u.stroke)&&Uv(s)&&(r||(o=ps({},o),u=ps({},u)),u.stroke=Nd(s)),o.style=u}}if(o&&null==o.z2){r||(o=ps({},o));var c=e.z2EmphasisLift;o.z2=e.z2+(null!=c?c:Rv)}return o}(this,0,t,n);if("blur"===e)return function(e,t,n){var o=gs(e.currentStates,t)>=0,i=e.style.opacity,r=o?null:function(e,t,n,o){for(var i=e.style,r={},a=0;a<t.length;a++){var l=t[a],s=i[l];r[l]=null==s?o&&o[l]:s}for(a=0;a<e.animators.length;a++){var u=e.animators[a];u.__fromStateTransition&&u.__fromStateTransition.indexOf(n)<0&&"style"===u.targetName&&u.saveTo(r,t)}return r}(e,["opacity"],t,{opacity:1}),a=(n=n||{}).style||{};return null==a.opacity&&(n=ps({},n),a=ps({opacity:o?i:.1*r.opacity},a),n.style=a),n}(this,e,n);if("select"===e)return function(e,t,n){if(n&&null==n.z2){n=ps({},n);var o=e.z2SelectLift;n.z2=e.z2+(null!=o?o:9)}return n}(this,0,n)}return n}function nm(e){e.stateProxy=tm;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=tm),n&&(n.stateProxy=tm)}function om(e,t){!dm(e,t)&&!e.__highByOuter&&Qv(e,Zv)}function im(e,t){!dm(e,t)&&!e.__highByOuter&&Qv(e,Xv)}function rm(e,t){e.__highByOuter|=1<<(t||0),Qv(e,Zv)}function am(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&Qv(e,Xv)}function lm(e){Qv(e,jv)}function sm(e){Qv(e,$v)}function um(e){Qv(e,qv)}function cm(e){Qv(e,Kv)}function dm(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function hm(e){var t=e.getModel(),n=[],o=[];t.eachComponent(function(t,i){var r=Ov(i),a="series"===t,l=a?e.getViewOfSeriesModel(i):e.getViewOfComponentModel(i);!a&&o.push(l),r.isBlured&&(l.group.traverse(function(e){$v(e)}),a&&n.push(i)),r.isBlured=!1}),ys(o,function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)})}function pm(e,t,n,o){var i=o.getModel();function r(e,t){for(var n=0;n<t.length;n++){var o=e.getItemGraphicEl(t[n]);o&&sm(o)}}if(n=n||"coordinateSystem",null!=e&&t&&"none"!==t){var a=i.getSeriesByIndex(e),l=a.coordinateSystem;l&&l.master&&(l=l.master);var s=[];i.eachSeries(function(e){var i=a===e,u=e.coordinateSystem;if(u&&u.master&&(u=u.master),!("series"===n&&!i||"coordinateSystem"===n&&!(u&&l?u===l:i)||"series"===t&&i)){if(o.getViewOfSeriesModel(e).group.traverse(function(e){e.__highByOuter&&i&&"self"===t||jv(e)}),ms(t))r(e.getData(),t);else if(Ns(t))for(var c=bs(t),d=0;d<c.length;d++)r(e.getData(c[d]),t[c[d]]);s.push(e),Ov(e).isBlured=!0}}),i.eachComponent(function(e,t){if("series"!==e){var n=o.getViewOfComponentModel(t);n&&n.toggleBlurSeries&&n.toggleBlurSeries(s,!0,i)}})}}function fm(e,t,n){if(null!=e&&null!=t){var o=n.getModel().getComponent(e,t);if(o){Ov(o).isBlured=!0;var i=n.getViewOfComponentModel(o);i&&i.focusBlurEnabled&&i.group.traverse(function(e){jv(e)})}}}function gm(e,t,n,o){var i={focusSelf:!1,dispatchers:null};if(null==e||"series"===e||null==t||null==n)return i;var r=o.getModel().getComponent(e,t);if(!r)return i;var a=o.getViewOfComponentModel(r);if(!a||!a.findHighDownDispatchers)return i;for(var l,s=a.findHighDownDispatchers(n),u=0;u<s.length;u++)if("production"===process.env.NODE_ENV||Mm(s[u])||Fp("param should be highDownDispatcher"),"self"===Nv(s[u]).focus){l=!0;break}return{focusSelf:l,dispatchers:s}}function vm(e){ys(e.getAllData(),function(t){var n=t.data,o=t.type;n.eachItemGraphicEl(function(t,n){e.isSelected(n,o)?um(t):cm(t)})})}function mm(e){var t=[];return e.eachSeries(function(e){ys(e.getAllData(),function(n){n.data;var o=n.type,i=e.getSelectedDataIndices();if(i.length>0){var r={dataIndex:i,seriesIndex:e.seriesIndex};null!=o&&(r.dataType=o),t.push(r)}})}),t}function ym(e,t,n){Cm(e,!0),Qv(e,nm),_m(e,t,n)}function xm(e,t,n,o){o?function(e){Cm(e,!1)}(e):ym(e,t,n)}function _m(e,t,n){var o=Nv(e);null!=t?(o.focus=t,o.blurScope=n):o.focus&&(o.focus=null)}var wm=["emphasis","blur","select"],bm={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Sm(e,t,n,o){n=n||"itemStyle";for(var i=0;i<wm.length;i++){var r=wm[i],a=t.getModel([r,n]);e.ensureState(r).style=o?o(a):a[bm[n]]()}}function Cm(e,t){var n=!1===t,o=e;e.highDownSilentOnTouch&&(o.__highDownSilentOnTouch=e.highDownSilentOnTouch),n&&!o.__highDownDispatcher||(o.__highByOuter=o.__highByOuter||0,o.__highDownDispatcher=!n)}function Mm(e){return!(!e||!e.__highDownDispatcher)}function Tm(e){var t=e.type;return t===Gv||t===Hv||t===Wv}function Im(e){var t=e.type;return t===zv||t===Fv}var km=Og.CMD,Dm=[[],[],[]],Nm=Math.sqrt,Em=Math.atan2;function Am(e,t){if(t){var n,o,i,r,a,l,s=e.data,u=e.len(),c=km.M,d=km.C,h=km.L,p=km.R,f=km.A,g=km.Q;for(i=0,r=0;i<u;){switch(n=s[i++],r=i,o=0,n){case c:case h:o=1;break;case d:o=3;break;case g:o=2;break;case f:var v=t[4],m=t[5],y=Nm(t[0]*t[0]+t[1]*t[1]),x=Nm(t[2]*t[2]+t[3]*t[3]),_=Em(-t[1]/x,t[0]/y);s[i]*=y,s[i++]+=v,s[i]*=x,s[i++]+=m,s[i++]*=y,s[i++]*=x,s[i++]+=_,s[i++]+=_,r=i+=2;break;case p:l[0]=s[i++],l[1]=s[i++],mu(l,l,t),s[r++]=l[0],s[r++]=l[1],l[0]+=s[i++],l[1]+=s[i++],mu(l,l,t),s[r++]=l[0],s[r++]=l[1]}for(a=0;a<o;a++){var w=Dm[a];w[0]=s[i++],w[1]=s[i++],mu(w,w,t),s[r++]=w[0],s[r++]=w[1]}}e.increaseVersion()}}var Lm=Math.sqrt,Vm=Math.sin,Om=Math.cos,Pm=Math.PI;function Bm(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function Rm(e,t){return(e[0]*t[0]+e[1]*t[1])/(Bm(e)*Bm(t))}function zm(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(Rm(e,t))}function Fm(e,t,n,o,i,r,a,l,s,u,c){var d=s*(Pm/180),h=Om(d)*(e-n)/2+Vm(d)*(t-o)/2,p=-1*Vm(d)*(e-n)/2+Om(d)*(t-o)/2,f=h*h/(a*a)+p*p/(l*l);f>1&&(a*=Lm(f),l*=Lm(f));var g=(i===r?-1:1)*Lm((a*a*(l*l)-a*a*(p*p)-l*l*(h*h))/(a*a*(p*p)+l*l*(h*h)))||0,v=g*a*p/l,m=g*-l*h/a,y=(e+n)/2+Om(d)*v-Vm(d)*m,x=(t+o)/2+Vm(d)*v+Om(d)*m,_=zm([1,0],[(h-v)/a,(p-m)/l]),w=[(h-v)/a,(p-m)/l],b=[(-1*h-v)/a,(-1*p-m)/l],S=zm(w,b);if(Rm(w,b)<=-1&&(S=Pm),Rm(w,b)>=1&&(S=0),S<0){var C=Math.round(S/Pm*1e6)/1e6;S=2*Pm+C%2*Pm}c.addData(u,y,x,a,l,_,S,d,r)}var Gm=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Hm=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;var Wm=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Wl(t,e),t.prototype.applyTransform=function(e){},t}(nv);function Um(e){return null!=e.setData}function Ym(e,t){var n=function(e){var t=new Og;if(!e)return t;var n,o=0,i=0,r=o,a=i,l=Og.CMD,s=e.match(Gm);if(!s)return t;for(var u=0;u<s.length;u++){for(var c=s[u],d=c.charAt(0),h=void 0,p=c.match(Hm)||[],f=p.length,g=0;g<f;g++)p[g]=parseFloat(p[g]);for(var v=0;v<f;){var m=void 0,y=void 0,x=void 0,_=void 0,w=void 0,b=void 0,S=void 0,C=o,M=i,T=void 0,I=void 0;switch(d){case"l":o+=p[v++],i+=p[v++],h=l.L,t.addData(h,o,i);break;case"L":o=p[v++],i=p[v++],h=l.L,t.addData(h,o,i);break;case"m":o+=p[v++],i+=p[v++],h=l.M,t.addData(h,o,i),r=o,a=i,d="l";break;case"M":o=p[v++],i=p[v++],h=l.M,t.addData(h,o,i),r=o,a=i,d="L";break;case"h":o+=p[v++],h=l.L,t.addData(h,o,i);break;case"H":o=p[v++],h=l.L,t.addData(h,o,i);break;case"v":i+=p[v++],h=l.L,t.addData(h,o,i);break;case"V":i=p[v++],h=l.L,t.addData(h,o,i);break;case"C":h=l.C,t.addData(h,p[v++],p[v++],p[v++],p[v++],p[v++],p[v++]),o=p[v-2],i=p[v-1];break;case"c":h=l.C,t.addData(h,p[v++]+o,p[v++]+i,p[v++]+o,p[v++]+i,p[v++]+o,p[v++]+i),o+=p[v-2],i+=p[v-1];break;case"S":m=o,y=i,T=t.len(),I=t.data,n===l.C&&(m+=o-I[T-4],y+=i-I[T-3]),h=l.C,C=p[v++],M=p[v++],o=p[v++],i=p[v++],t.addData(h,m,y,C,M,o,i);break;case"s":m=o,y=i,T=t.len(),I=t.data,n===l.C&&(m+=o-I[T-4],y+=i-I[T-3]),h=l.C,C=o+p[v++],M=i+p[v++],o+=p[v++],i+=p[v++],t.addData(h,m,y,C,M,o,i);break;case"Q":C=p[v++],M=p[v++],o=p[v++],i=p[v++],h=l.Q,t.addData(h,C,M,o,i);break;case"q":C=p[v++]+o,M=p[v++]+i,o+=p[v++],i+=p[v++],h=l.Q,t.addData(h,C,M,o,i);break;case"T":m=o,y=i,T=t.len(),I=t.data,n===l.Q&&(m+=o-I[T-4],y+=i-I[T-3]),o=p[v++],i=p[v++],h=l.Q,t.addData(h,m,y,o,i);break;case"t":m=o,y=i,T=t.len(),I=t.data,n===l.Q&&(m+=o-I[T-4],y+=i-I[T-3]),o+=p[v++],i+=p[v++],h=l.Q,t.addData(h,m,y,o,i);break;case"A":x=p[v++],_=p[v++],w=p[v++],b=p[v++],S=p[v++],Fm(C=o,M=i,o=p[v++],i=p[v++],b,S,x,_,w,h=l.A,t);break;case"a":x=p[v++],_=p[v++],w=p[v++],b=p[v++],S=p[v++],Fm(C=o,M=i,o+=p[v++],i+=p[v++],b,S,x,_,w,h=l.A,t)}}"z"!==d&&"Z"!==d||(h=l.Z,t.addData(h),o=r,i=a),n=h}return t.toStatic(),t}(e),o=ps({},t);return o.buildPath=function(e){if(Um(e)){e.setData(n.data),(t=e.getContext())&&e.rebuildPath(t,1)}else{var t=e;n.rebuildPath(t,1)}},o.applyTransform=function(e){Am(n,e),this.dirtyShape()},o}function Zm(e,t){return new Wm(Ym(e,t))}function Xm(e,t){t=t||{};var n=new nv;return e.shape&&n.setShape(e.shape),n.setStyle(e.style),t.bakeTransform?Am(n.path,e.getComputedTransform()):t.toLocal?n.setLocalTransform(e.getComputedTransform()):n.copyTransform(e),n.buildPath=e.buildPath,n.applyTransform=n.applyTransform,n.z=e.z,n.z2=e.z2,n.zlevel=e.zlevel,n}var jm=function(){return function(){this.cx=0,this.cy=0,this.r=0}}(),$m=function(e){function t(t){return e.call(this,t)||this}return Wl(t,e),t.prototype.getDefaultShape=function(){return new jm},t.prototype.buildPath=function(e,t){e.moveTo(t.cx+t.r,t.cy),e.arc(t.cx,t.cy,t.r,0,2*Math.PI)},t}(nv);$m.prototype.type="circle";var qm=function(){return function(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}}(),Km=function(e){function t(t){return e.call(this,t)||this}return Wl(t,e),t.prototype.getDefaultShape=function(){return new qm},t.prototype.buildPath=function(e,t){var n=.5522848,o=t.cx,i=t.cy,r=t.rx,a=t.ry,l=r*n,s=a*n;e.moveTo(o-r,i),e.bezierCurveTo(o-r,i-s,o-l,i-a,o,i-a),e.bezierCurveTo(o+l,i-a,o+r,i-s,o+r,i),e.bezierCurveTo(o+r,i+s,o+l,i+a,o,i+a),e.bezierCurveTo(o-l,i+a,o-r,i+s,o-r,i),e.closePath()},t}(nv);Km.prototype.type="ellipse";var Jm=Math.PI,Qm=2*Jm,ey=Math.sin,ty=Math.cos,ny=Math.acos,oy=Math.atan2,iy=Math.abs,ry=Math.sqrt,ay=Math.max,ly=Math.min,sy=1e-4;function uy(e,t,n,o,i,r,a){var l=e-n,s=t-o,u=(a?r:-r)/ry(l*l+s*s),c=u*s,d=-u*l,h=e+c,p=t+d,f=n+c,g=o+d,v=(h+f)/2,m=(p+g)/2,y=f-h,x=g-p,_=y*y+x*x,w=i-r,b=h*g-f*p,S=(x<0?-1:1)*ry(ay(0,w*w*_-b*b)),C=(b*x-y*S)/_,M=(-b*y-x*S)/_,T=(b*x+y*S)/_,I=(-b*y+x*S)/_,k=C-v,D=M-m,N=T-v,E=I-m;return k*k+D*D>N*N+E*E&&(C=T,M=I),{cx:C,cy:M,x0:-c,y0:-d,x1:C*(i/w-1),y1:M*(i/w-1)}}function cy(e,t){var n,o=ay(t.r,0),i=ay(t.r0||0,0),r=o>0;if(r||i>0){if(r||(o=i,i=0),i>o){var a=o;o=i,i=a}var l=t.startAngle,s=t.endAngle;if(!isNaN(l)&&!isNaN(s)){var u=t.cx,c=t.cy,d=!!t.clockwise,h=iy(s-l),p=h>Qm&&h%Qm;if(p>sy&&(h=p),o>sy)if(h>Qm-sy)e.moveTo(u+o*ty(l),c+o*ey(l)),e.arc(u,c,o,l,s,!d),i>sy&&(e.moveTo(u+i*ty(s),c+i*ey(s)),e.arc(u,c,i,s,l,d));else{var f=void 0,g=void 0,v=void 0,m=void 0,y=void 0,x=void 0,_=void 0,w=void 0,b=void 0,S=void 0,C=void 0,M=void 0,T=void 0,I=void 0,k=void 0,D=void 0,N=o*ty(l),E=o*ey(l),A=i*ty(s),L=i*ey(s),V=h>sy;if(V){var O=t.cornerRadius;O&&(f=(n=function(e){var t;if(Ms(e)){var n=e.length;if(!n)return e;t=1===n?[e[0],e[0],0,0]:2===n?[e[0],e[0],e[1],e[1]]:3===n?e.concat(e[2]):e}else t=[e,e,e,e];return t}(O))[0],g=n[1],v=n[2],m=n[3]);var P=iy(o-i)/2;if(y=ly(P,v),x=ly(P,m),_=ly(P,f),w=ly(P,g),C=b=ay(y,x),M=S=ay(_,w),(b>sy||S>sy)&&(T=o*ty(s),I=o*ey(s),k=i*ty(l),D=i*ey(l),h<Jm)){var B=function(e,t,n,o,i,r,a,l){var s=n-e,u=o-t,c=a-i,d=l-r,h=d*s-c*u;if(!(h*h<sy))return[e+(h=(c*(t-r)-d*(e-i))/h)*s,t+h*u]}(N,E,k,D,T,I,A,L);if(B){var R=N-B[0],z=E-B[1],F=T-B[0],G=I-B[1],H=1/ey(ny((R*F+z*G)/(ry(R*R+z*z)*ry(F*F+G*G)))/2),W=ry(B[0]*B[0]+B[1]*B[1]);C=ly(b,(o-W)/(H+1)),M=ly(S,(i-W)/(H-1))}}}if(V)if(C>sy){var U=ly(v,C),Y=ly(m,C),Z=uy(k,D,N,E,o,U,d),X=uy(T,I,A,L,o,Y,d);e.moveTo(u+Z.cx+Z.x0,c+Z.cy+Z.y0),C<b&&U===Y?e.arc(u+Z.cx,c+Z.cy,C,oy(Z.y0,Z.x0),oy(X.y0,X.x0),!d):(U>0&&e.arc(u+Z.cx,c+Z.cy,U,oy(Z.y0,Z.x0),oy(Z.y1,Z.x1),!d),e.arc(u,c,o,oy(Z.cy+Z.y1,Z.cx+Z.x1),oy(X.cy+X.y1,X.cx+X.x1),!d),Y>0&&e.arc(u+X.cx,c+X.cy,Y,oy(X.y1,X.x1),oy(X.y0,X.x0),!d))}else e.moveTo(u+N,c+E),e.arc(u,c,o,l,s,!d);else e.moveTo(u+N,c+E);if(i>sy&&V)if(M>sy){U=ly(f,M),Z=uy(A,L,T,I,i,-(Y=ly(g,M)),d),X=uy(N,E,k,D,i,-U,d);e.lineTo(u+Z.cx+Z.x0,c+Z.cy+Z.y0),M<S&&U===Y?e.arc(u+Z.cx,c+Z.cy,M,oy(Z.y0,Z.x0),oy(X.y0,X.x0),!d):(Y>0&&e.arc(u+Z.cx,c+Z.cy,Y,oy(Z.y0,Z.x0),oy(Z.y1,Z.x1),!d),e.arc(u,c,i,oy(Z.cy+Z.y1,Z.cx+Z.x1),oy(X.cy+X.y1,X.cx+X.x1),d),U>0&&e.arc(u+X.cx,c+X.cy,U,oy(X.y1,X.x1),oy(X.y0,X.x0),!d))}else e.lineTo(u+A,c+L),e.arc(u,c,i,s,l,d);else e.lineTo(u+A,c+L)}else e.moveTo(u,c);e.closePath()}}}var dy=function(){return function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0,this.cornerRadius=0}}(),hy=function(e){function t(t){return e.call(this,t)||this}return Wl(t,e),t.prototype.getDefaultShape=function(){return new dy},t.prototype.buildPath=function(e,t){cy(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(nv);hy.prototype.type="sector";var py=function(){return function(){this.cx=0,this.cy=0,this.r=0,this.r0=0}}(),fy=function(e){function t(t){return e.call(this,t)||this}return Wl(t,e),t.prototype.getDefaultShape=function(){return new py},t.prototype.buildPath=function(e,t){var n=t.cx,o=t.cy,i=2*Math.PI;e.moveTo(n+t.r,o),e.arc(n,o,t.r,0,i,!1),e.moveTo(n+t.r0,o),e.arc(n,o,t.r0,0,i,!0)},t}(nv);function gy(e,t,n){var o=t.smooth,i=t.points;if(i&&i.length>=2){if(o){var r=function(e,t,n,o){var i,r,a,l,s=[],u=[],c=[],d=[];if(o){a=[1/0,1/0],l=[-1/0,-1/0];for(var h=0,p=e.length;h<p;h++)yu(a,a,e[h]),xu(l,l,e[h]);yu(a,a,o[0]),xu(l,l,o[1])}for(h=0,p=e.length;h<p;h++){var f=e[h];if(n)i=e[h?h-1:p-1],r=e[(h+1)%p];else{if(0===h||h===p-1){s.push(ru(e[h]));continue}i=e[h-1],r=e[h+1]}uu(u,r,i),du(u,u,t);var g=pu(f,i),v=pu(f,r),m=g+v;0!==m&&(g/=m,v/=m),du(c,u,-g),du(d,u,v);var y=lu([],f,c),x=lu([],f,d);o&&(xu(y,y,a),yu(y,y,l),xu(x,x,a),yu(x,x,l)),s.push(y),s.push(x)}return n&&s.push(s.shift()),s}(i,o,n,t.smoothConstraint);e.moveTo(i[0][0],i[0][1]);for(var a=i.length,l=0;l<(n?a:a-1);l++){var s=r[2*l],u=r[2*l+1],c=i[(l+1)%a];e.bezierCurveTo(s[0],s[1],u[0],u[1],c[0],c[1])}}else{e.moveTo(i[0][0],i[0][1]);l=1;for(var d=i.length;l<d;l++)e.lineTo(i[l][0],i[l][1])}n&&e.closePath()}}fy.prototype.type="ring";var vy=function(){return function(){this.points=null,this.smooth=0,this.smoothConstraint=null}}(),my=function(e){function t(t){return e.call(this,t)||this}return Wl(t,e),t.prototype.getDefaultShape=function(){return new vy},t.prototype.buildPath=function(e,t){gy(e,t,!0)},t}(nv);my.prototype.type="polygon";var yy=function(){return function(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}}(),xy=function(e){function t(t){return e.call(this,t)||this}return Wl(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new yy},t.prototype.buildPath=function(e,t){gy(e,t,!1)},t}(nv);xy.prototype.type="polyline";var _y={},wy=function(){return function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}}(),by=function(e){function t(t){return e.call(this,t)||this}return Wl(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new wy},t.prototype.buildPath=function(e,t){var n,o,i,r;if(this.subPixelOptimize){var a=uv(_y,t,this.style);n=a.x1,o=a.y1,i=a.x2,r=a.y2}else n=t.x1,o=t.y1,i=t.x2,r=t.y2;var l=t.percent;0!==l&&(e.moveTo(n,o),l<1&&(i=n*(1-l)+i*l,r=o*(1-l)+r*l),e.lineTo(i,r))},t.prototype.pointAt=function(e){var t=this.shape;return[t.x1*(1-e)+t.x2*e,t.y1*(1-e)+t.y2*e]},t}(nv);by.prototype.type="line";var Sy=[],Cy=function(){return function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1}}();function My(e,t,n){var o=e.cpx2,i=e.cpy2;return null!=o||null!=i?[(n?Yc:Uc)(e.x1,e.cpx1,e.cpx2,e.x2,t),(n?Yc:Uc)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(n?Jc:Kc)(e.x1,e.cpx1,e.x2,t),(n?Jc:Kc)(e.y1,e.cpy1,e.y2,t)]}var Ty=function(e){function t(t){return e.call(this,t)||this}return Wl(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new Cy},t.prototype.buildPath=function(e,t){var n=t.x1,o=t.y1,i=t.x2,r=t.y2,a=t.cpx1,l=t.cpy1,s=t.cpx2,u=t.cpy2,c=t.percent;0!==c&&(e.moveTo(n,o),null==s||null==u?(c<1&&(ed(n,a,i,c,Sy),a=Sy[1],i=Sy[2],ed(o,l,r,c,Sy),l=Sy[1],r=Sy[2]),e.quadraticCurveTo(a,l,i,r)):(c<1&&(jc(n,a,s,i,c,Sy),a=Sy[1],s=Sy[2],i=Sy[3],jc(o,l,u,r,c,Sy),l=Sy[1],u=Sy[2],r=Sy[3]),e.bezierCurveTo(a,l,s,u,i,r)))},t.prototype.pointAt=function(e){return My(this.shape,e,!1)},t.prototype.tangentAt=function(e){var t=My(this.shape,e,!0);return hu(t,t)},t}(nv);Ty.prototype.type="bezier-curve";var Iy=function(){return function(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0}}(),ky=function(e){function t(t){return e.call(this,t)||this}return Wl(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new Iy},t.prototype.buildPath=function(e,t){var n=t.cx,o=t.cy,i=Math.max(t.r,0),r=t.startAngle,a=t.endAngle,l=t.clockwise,s=Math.cos(r),u=Math.sin(r);e.moveTo(s*i+n,u*i+o),e.arc(n,o,i,r,a,!l)},t}(nv);ky.prototype.type="arc";var Dy=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="compound",t}return Wl(t,e),t.prototype._updatePathDirty=function(){for(var e=this.shape.paths,t=this.shapeChanged(),n=0;n<e.length;n++)t=t||e[n].shapeChanged();t&&this.dirtyShape()},t.prototype.beforeBrush=function(){this._updatePathDirty();for(var e=this.shape.paths||[],t=this.getGlobalScale(),n=0;n<e.length;n++)e[n].path||e[n].createPathProxy(),e[n].path.setScale(t[0],t[1],e[n].segmentIgnoreThreshold)},t.prototype.buildPath=function(e,t){for(var n=t.paths||[],o=0;o<n.length;o++)n[o].buildPath(e,n[o].shape,!0)},t.prototype.afterBrush=function(){for(var e=this.shape.paths||[],t=0;t<e.length;t++)e[t].pathUpdated()},t.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),nv.prototype.getBoundingRect.call(this)},t}(nv),Ny=function(){function e(e){this.colorStops=e||[]}return e.prototype.addColorStop=function(e,t){this.colorStops.push({offset:e,color:t})},e}(),Ey=function(e){function t(t,n,o,i,r,a){var l=e.call(this,r)||this;return l.x=null==t?0:t,l.y=null==n?0:n,l.x2=null==o?1:o,l.y2=null==i?0:i,l.type="linear",l.global=a||!1,l}return Wl(t,e),t}(Ny),Ay=function(e){function t(t,n,o,i,r){var a=e.call(this,i)||this;return a.x=null==t?.5:t,a.y=null==n?.5:n,a.r=null==o?.5:o,a.type="radial",a.global=r||!1,a}return Wl(t,e),t}(Ny),Ly=[0,0],Vy=[0,0],Oy=new tc,Py=new tc,By=function(){function e(e,t){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new tc;for(n=0;n<2;n++)this._axes[n]=new tc;e&&this.fromBoundingRect(e,t)}return e.prototype.fromBoundingRect=function(e,t){var n=this._corners,o=this._axes,i=e.x,r=e.y,a=i+e.width,l=r+e.height;if(n[0].set(i,r),n[1].set(a,r),n[2].set(a,l),n[3].set(i,l),t)for(var s=0;s<4;s++)n[s].transform(t);tc.sub(o[0],n[1],n[0]),tc.sub(o[1],n[3],n[0]),o[0].normalize(),o[1].normalize();for(s=0;s<2;s++)this._origin[s]=o[s].dot(n[0])},e.prototype.intersect=function(e,t){var n=!0,o=!t;return Oy.set(1/0,1/0),Py.set(0,0),!this._intersectCheckOneSide(this,e,Oy,Py,o,1)&&(n=!1,o)||!this._intersectCheckOneSide(e,this,Oy,Py,o,-1)&&(n=!1,o)||o||tc.copy(t,n?Oy:Py),n},e.prototype._intersectCheckOneSide=function(e,t,n,o,i,r){for(var a=!0,l=0;l<2;l++){var s=this._axes[l];if(this._getProjMinMaxOnAxis(l,e._corners,Ly),this._getProjMinMaxOnAxis(l,t._corners,Vy),Ly[1]<Vy[0]||Ly[0]>Vy[1]){if(a=!1,i)return a;var u=Math.abs(Vy[0]-Ly[1]),c=Math.abs(Ly[0]-Vy[1]);Math.min(u,c)>o.len()&&(u<c?tc.scale(o,s,-u*r):tc.scale(o,s,c*r))}else if(n){u=Math.abs(Vy[0]-Ly[1]),c=Math.abs(Ly[0]-Vy[1]);Math.min(u,c)<n.len()&&(u<c?tc.scale(n,s,u*r):tc.scale(n,s,-c*r))}}return a},e.prototype._getProjMinMaxOnAxis=function(e,t,n){for(var o=this._axes[e],i=this._origin,r=t[0].dot(o)+i[e],a=r,l=r,s=1;s<t.length;s++){var u=t[s].dot(o)+i[e];a=Math.min(u,a),l=Math.max(u,l)}n[0]=a,n[1]=l},e}(),Ry=[],zy=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.notClear=!0,t.incremental=!0,t._displayables=[],t._temporaryDisplayables=[],t._cursor=0,t}return Wl(t,e),t.prototype.traverse=function(e,t){e.call(t,this)},t.prototype.useStyle=function(){this.style={}},t.prototype.getCursor=function(){return this._cursor},t.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},t.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},t.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},t.prototype.addDisplayable=function(e,t){t?this._temporaryDisplayables.push(e):this._displayables.push(e),this.markRedraw()},t.prototype.addDisplayables=function(e,t){t=t||!1;for(var n=0;n<e.length;n++)this.addDisplayable(e[n],t)},t.prototype.getDisplayables=function(){return this._displayables},t.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},t.prototype.eachPendingDisplayable=function(e){for(var t=this._cursor;t<this._displayables.length;t++)e&&e(this._displayables[t]);for(t=0;t<this._temporaryDisplayables.length;t++)e&&e(this._temporaryDisplayables[t])},t.prototype.update=function(){this.updateTransform();for(var e=this._cursor;e<this._displayables.length;e++){(t=this._displayables[e]).parent=this,t.update(),t.parent=null}for(e=0;e<this._temporaryDisplayables.length;e++){var t;(t=this._temporaryDisplayables[e]).parent=this,t.update(),t.parent=null}},t.prototype.getBoundingRect=function(){if(!this._rect){for(var e=new cc(1/0,1/0,-1/0,-1/0),t=0;t<this._displayables.length;t++){var n=this._displayables[t],o=n.getBoundingRect().clone();n.needLocalTransform()&&o.applyTransform(n.getLocalTransform(Ry)),e.union(o)}this._rect=e}return this._rect},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t);if(this.getBoundingRect().contain(n[0],n[1]))for(var o=0;o<this._displayables.length;o++){if(this._displayables[o].contain(e,t))return!0}return!1},t}(Qf),Fy=uf();function Gy(e,t,n,o,i){var r;if(t&&t.ecModel){var a=t.ecModel.getUpdatePayload();r=a&&a.animation}var l="update"===e;if(t&&t.isAnimationEnabled()){var s=void 0,u=void 0,c=void 0;return o?(s=Rs(o.duration,200),u=Rs(o.easing,"cubicOut"),c=0):(s=t.getShallow(l?"animationDurationUpdate":"animationDuration"),u=t.getShallow(l?"animationEasingUpdate":"animationEasing"),c=t.getShallow(l?"animationDelayUpdate":"animationDelay")),r&&(null!=r.duration&&(s=r.duration),null!=r.easing&&(u=r.easing),null!=r.delay&&(c=r.delay)),Ts(c)&&(c=c(n,i)),Ts(s)&&(s=s(n)),{duration:s||0,delay:c,easing:u}}return null}function Hy(e,t,n,o,i,r,a){var l,s=!1;Ts(i)?(a=r,r=i,i=null):Ns(i)&&(r=i.cb,a=i.during,s=i.isFrom,l=i.removeOpt,i=i.dataIndex);var u="leave"===e;u||t.stopAnimation("leave");var c=Gy(e,o,i,u?l||{}:null,o&&o.getAnimationDelayParams?o.getAnimationDelayParams(t,i):null);if(c&&c.duration>0){var d={duration:c.duration,delay:c.delay||0,easing:c.easing,done:r,force:!!r||!!a,setToFinal:!u,scope:e,during:a};s?t.animateFrom(n,d):t.animateTo(n,d)}else t.stopAnimation(),!s&&t.attr(n),a&&a(1),r&&r()}function Wy(e,t,n,o,i,r){Hy("update",e,t,n,o,i,r)}function Uy(e,t,n,o,i,r){Hy("enter",e,t,n,o,i,r)}function Yy(e){if(!e.__zr)return!0;for(var t=0;t<e.animators.length;t++){if("leave"===e.animators[t].scope)return!0}return!1}function Zy(e,t,n,o,i,r){Yy(e)||Hy("leave",e,t,n,o,i,r)}function Xy(e,t,n,o){e.removeTextContent(),e.removeTextGuideLine(),Zy(e,{style:{opacity:0}},t,n,o)}function jy(e,t,n){function o(){e.parent&&e.parent.remove(e)}e.isGroup?e.traverse(function(e){e.isGroup||Xy(e,t,n,o)}):Xy(e,t,n,o)}function $y(e){Fy(e).oldStyle=e.style}var qy=Math.max,Ky=Math.min,Jy={};var Qy=function(e,t){var n=Ym(e,t);return function(e){function t(t){var o=e.call(this,t)||this;return o.applyTransform=n.applyTransform,o.buildPath=n.buildPath,o}return Wl(t,e),t}(Wm)};function ex(e,t){Jy[e]=t}function tx(e){if(Jy.hasOwnProperty(e))return Jy[e]}function nx(e,t,n,o){var i=Zm(e,t);return n&&("center"===o&&(n=ix(n,i.getBoundingRect())),ax(i,n)),i}function ox(e,t,n){var o=new lv({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(e){if("center"===n){var i={width:e.width,height:e.height};o.setStyle(ix(t,i))}}});return o}function ix(e,t){var n,o=t.width/t.height,i=e.height*o;return n=i<=e.width?e.height:(i=e.width)/o,{x:e.x+e.width/2-i/2,y:e.y+e.height/2-n/2,width:i,height:n}}var rx=function(e,t){for(var n=[],o=e.length,i=0;i<o;i++){var r=e[i];n.push(r.getUpdatedPathProxy(!0))}var a=new nv(t);return a.createPathProxy(),a.buildPath=function(e){if(Um(e)){e.appendPath(n);var t=e.getContext();t&&e.rebuildPath(t,1)}},a};function ax(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}function lx(e,t){return uv(e,e,{lineWidth:t}),e}var sx=dv;function ux(e,t){for(var n=ju([]);e&&e!==t;)qu(n,e.getLocalTransform(),n),e=e.parent;return n}function cx(e,t,n){return t&&!ms(t)&&(t=zh.getLocalTransform(t)),n&&(t=ec([],t)),mu([],e,t)}function dx(e,t,n){var o=0===t[4]||0===t[5]||0===t[0]?1:Math.abs(2*t[4]/t[0]),i=0===t[4]||0===t[5]||0===t[2]?1:Math.abs(2*t[4]/t[2]),r=["left"===e?-o:"right"===e?o:0,"top"===e?-i:"bottom"===e?i:0];return r=cx(r,t,n),Math.abs(r[0])>Math.abs(r[1])?r[0]>0?"right":"left":r[1]>0?"bottom":"top"}function hx(e){return!e.isGroup}function px(e,t,n){if(e&&t){var o,i=(o={},e.traverse(function(e){hx(e)&&e.anid&&(o[e.anid]=e)}),o);t.traverse(function(e){if(hx(e)&&e.anid){var t=i[e.anid];if(t){var o=r(e);e.attr(r(t)),Wy(e,o,n,Nv(e).dataIndex)}}})}function r(e){var t={x:e.x,y:e.y,rotation:e.rotation};return function(e){return null!=e.shape}(e)&&(t.shape=ps({},e.shape)),t}}function fx(e,t){return xs(e,function(e){var n=e[0];n=qy(n,t.x),n=Ky(n,t.x+t.width);var o=e[1];return o=qy(o,t.y),[n,o=Ky(o,t.y+t.height)]})}function gx(e,t,n){var o=ps({rectHover:!0},t),i=o.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},e)return 0===e.indexOf("image://")?(i.image=e.slice(8),fs(i,n),new lv(o)):nx(e.replace("path://",""),o,n,"center")}function vx(e,t,n,o,i){for(var r=0,a=i[i.length-1];r<i.length;r++){var l=i[r];if(mx(e,t,n,o,l[0],l[1],a[0],a[1]))return!0;a=l}}function mx(e,t,n,o,i,r,a,l){var s,u=n-e,c=o-t,d=a-i,h=l-r,p=yx(d,h,u,c);if((s=p)<=1e-6&&s>=-1e-6)return!1;var f=e-i,g=t-r,v=yx(f,g,u,c)/p;if(v<0||v>1)return!1;var m=yx(f,g,d,h)/p;return!(m<0||m>1)}function yx(e,t,n,o){return e*o-n*t}function xx(e){var t=e.itemTooltipOption,n=e.componentModel,o=e.itemName,i=Is(t)?{formatter:t}:t,r=n.mainType,a=n.componentIndex,l={componentType:r,name:o,$vars:["name"]};l[r+"Index"]=a;var s=e.formatterParamsExtra;s&&ys(bs(s),function(e){eu(l,e)||(l[e]=s[e],l.$vars.push(e))});var u=Nv(e.el);u.componentMainType=r,u.componentIndex=a,u.tooltipConfig={name:o,option:fs({content:o,encodeHTMLContent:!0,formatterParams:l},i)}}function _x(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function bx(e,t){if(e)if(Ms(e))for(var n=0;n<e.length;n++)_x(e[n],t);else _x(e,t)}ex("circle",$m),ex("ellipse",Km),ex("sector",hy),ex("ring",fy),ex("polygon",my),ex("polyline",xy),ex("rect",fv),ex("line",by),ex("bezierCurve",Ty),ex("arc",ky);const Sx=Object.freeze(Object.defineProperty({__proto__:null,Arc:ky,BezierCurve:Ty,BoundingRect:cc,Circle:$m,CompoundPath:Dy,Ellipse:Km,Group:lp,Image:lv,IncrementalDisplayable:zy,Line:by,LinearGradient:Ey,OrientedBoundingRect:By,Path:nv,Point:tc,Polygon:my,Polyline:xy,RadialGradient:Ay,Rect:fv,Ring:fy,Sector:hy,Text:mv,applyTransform:cx,clipPointsByRect:fx,clipRectByRect:function(e,t){var n=qy(e.x,t.x),o=Ky(e.x+e.width,t.x+t.width),i=qy(e.y,t.y),r=Ky(e.y+e.height,t.y+t.height);if(o>=n&&r>=i)return{x:n,y:i,width:o-n,height:r-i}},createIcon:gx,extendPath:function(e,t){return Qy(e,t)},extendShape:function(e){return nv.extend(e)},getShapeClass:tx,getTransform:ux,groupTransition:px,initProps:Uy,isElementRemoved:Yy,lineLineIntersect:mx,linePolygonIntersect:vx,makeImage:ox,makePath:nx,mergePath:rx,registerShape:ex,removeElement:Zy,removeElementWithFadeOut:jy,resizePath:ax,setTooltipConfig:xx,subPixelOptimize:sx,subPixelOptimizeLine:lx,subPixelOptimizeRect:function(e){return cv(e.shape,e.shape,e.style),e},transformDirection:dx,traverseElements:bx,updateProps:Wy},Symbol.toStringTag,{value:"Module"}));var Cx={};function Mx(e,t){for(var n=0;n<Pv.length;n++){var o=Pv[n],i=t[o],r=e.ensureState(o);r.style=r.style||{},r.style.text=i}var a=e.currentStates.slice();e.clearStates(!0),e.setStyle({text:t.normal}),e.useStates(a,!0)}function Tx(e,t,n){var o,i=e.labelFetcher,r=e.labelDataIndex,a=e.labelDimIndex,l=t.normal;i&&(o=i.getFormattedLabel(r,"normal",null,a,l&&l.get("formatter"),null!=n?{interpolatedValue:n}:null)),null==o&&(o=Ts(e.defaultText)?e.defaultText(r,e,n):e.defaultText);for(var s={normal:o},u=0;u<Pv.length;u++){var c=Pv[u],d=t[c];s[c]=Rs(i?i.getFormattedLabel(r,c,null,a,d&&d.get("formatter")):null,o)}return s}function Ix(e,t,n,o){n=n||Cx;for(var i=e instanceof mv,r=!1,a=0;a<Bv.length;a++){if((h=t[Bv[a]])&&h.getShallow("show")){r=!0;break}}var l=i?e:e.getTextContent();if(r){i||(l||(l=new mv,e.setTextContent(l)),e.stateProxy&&(l.stateProxy=e.stateProxy));var s=Tx(n,t),u=t.normal,c=!!u.getShallow("show"),d=Dx(u,o&&o.normal,n,!1,!i);d.text=s.normal,i||e.setTextConfig(Nx(u,n,!1));for(a=0;a<Pv.length;a++){var h,p=Pv[a];if(h=t[p]){var f=l.ensureState(p),g=!!Rs(h.getShallow("show"),c);if(g!==c&&(f.ignore=!g),f.style=Dx(h,o&&o[p],n,!0,!i),f.style.text=s[p],!i)e.ensureState(p).textConfig=Nx(h,n,!0)}}l.silent=!!u.getShallow("silent"),null!=l.style.x&&(d.x=l.style.x),null!=l.style.y&&(d.y=l.style.y),l.ignore=!c,l.useStyle(d),l.dirty(),n.enableTextSetter&&(Px(l).setLabelText=function(e){var o=Tx(n,t,e);Mx(l,o)})}else l&&(l.ignore=!0);e.dirty()}function kx(e,t){t=t||"label";for(var n={normal:e.getModel(t)},o=0;o<Pv.length;o++){var i=Pv[o];n[i]=e.getModel([i,t])}return n}function Dx(e,t,n,o,i){var r={};return function(e,t,n,o,i){n=n||Cx;var r,a=t.ecModel,l=a&&a.option.textStyle,s=function(e){var t;for(;e&&e!==e.ecModel;){var n=(e.option||Cx).rich;if(n){t=t||{};for(var o=bs(n),i=0;i<o.length;i++){t[o[i]]=1}}e=e.parentModel}return t}(t);if(s)for(var u in r={},s)if(s.hasOwnProperty(u)){var c=t.getModel(["rich",u]);Vx(r[u]={},c,l,n,o,i,!1,!0)}r&&(e.rich=r);var d=t.get("overflow");d&&(e.overflow=d);var h=t.get("minMargin");null!=h&&(e.margin=h);Vx(e,t,l,n,o,i,!0,!1)}(r,e,n,o,i),t&&ps(r,t),r}function Nx(e,t,n){t=t||{};var o,i={},r=e.getShallow("rotate"),a=Rs(e.getShallow("distance"),n?null:5),l=e.getShallow("offset");return"outside"===(o=e.getShallow("position")||(n?null:"inside"))&&(o=t.defaultOutsidePosition||"top"),null!=o&&(i.position=o),null!=l&&(i.offset=l),null!=r&&(r*=Math.PI/180,i.rotation=r),null!=a&&(i.distance=a),i.outsideFill="inherit"===e.get("color")?t.inheritColor||null:"auto",i}var Ex=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],Ax=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],Lx=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function Vx(e,t,n,o,i,r,a,l){n=!i&&n||Cx;var s=o&&o.inheritColor,u=t.getShallow("color"),c=t.getShallow("textBorderColor"),d=Rs(t.getShallow("opacity"),n.opacity);"inherit"!==u&&"auto"!==u||("production"!==process.env.NODE_ENV&&"auto"===u&&Hp("color: 'auto'","color: 'inherit'"),u=s||null),"inherit"!==c&&"auto"!==c||("production"!==process.env.NODE_ENV&&"auto"===c&&Hp("color: 'auto'","color: 'inherit'"),c=s||null),r||(u=u||n.color,c=c||n.textBorderColor),null!=u&&(e.fill=u),null!=c&&(e.stroke=c);var h=Rs(t.getShallow("textBorderWidth"),n.textBorderWidth);null!=h&&(e.lineWidth=h);var p=Rs(t.getShallow("textBorderType"),n.textBorderType);null!=p&&(e.lineDash=p);var f=Rs(t.getShallow("textBorderDashOffset"),n.textBorderDashOffset);null!=f&&(e.lineDashOffset=f),i||null!=d||l||(d=o&&o.defaultOpacity),null!=d&&(e.opacity=d),i||r||null==e.fill&&o.inheritColor&&(e.fill=o.inheritColor);for(var g=0;g<Ex.length;g++){var v=Ex[g];null!=(y=Rs(t.getShallow(v),n[v]))&&(e[v]=y)}for(g=0;g<Ax.length;g++){v=Ax[g];null!=(y=t.getShallow(v))&&(e[v]=y)}if(null==e.verticalAlign){var m=t.getShallow("baseline");null!=m&&(e.verticalAlign=m)}if(!a||!o.disableBox){for(g=0;g<Lx.length;g++){var y;v=Lx[g];null!=(y=t.getShallow(v))&&(e[v]=y)}var x=t.getShallow("borderType");null!=x&&(e.borderDash=x),"auto"!==e.backgroundColor&&"inherit"!==e.backgroundColor||!s||("production"!==process.env.NODE_ENV&&"auto"===e.backgroundColor&&Hp("backgroundColor: 'auto'","backgroundColor: 'inherit'"),e.backgroundColor=s),"auto"!==e.borderColor&&"inherit"!==e.borderColor||!s||("production"!==process.env.NODE_ENV&&"auto"===e.borderColor&&Hp("borderColor: 'auto'","borderColor: 'inherit'"),e.borderColor=s)}}function Ox(e,t){var n=t&&t.getModel("textStyle");return Ws([e.fontStyle||n&&n.getShallow("fontStyle")||"",e.fontWeight||n&&n.getShallow("fontWeight")||"",(e.fontSize||n&&n.getShallow("fontSize")||12)+"px",e.fontFamily||n&&n.getShallow("fontFamily")||"sans-serif"].join(" "))}var Px=uf();function Bx(e,t,n,o){if(e){var i=Px(e);i.prevValue=i.value,i.value=n;var r=t.normal;i.valueAnimation=r.get("valueAnimation"),i.valueAnimation&&(i.precision=r.get("precision"),i.defaultInterpolatedText=o,i.statesModels=t)}}function Rx(e,t,n,o,i){var r=Px(e);if(r.valueAnimation&&r.prevValue!==r.value){var a=r.defaultInterpolatedText,l=Rs(r.interpolatedValue,r.prevValue),s=r.value;e.percent=0,(null==r.prevValue?Uy:Wy)(e,{percent:1},o,t,null,function(o){var u=yf(n,r.precision,l,s,o);r.interpolatedValue=1===o?null:u;var c=Tx({labelDataIndex:t,labelFetcher:i,defaultText:a?a(u):u+""},r.statesModels,u);Mx(e,c)})}}var zx,Fx,Gx=["textStyle","color"],Hx=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],Wx=new mv,Ux=function(){function e(){}return e.prototype.getTextColor=function(e){var t=this.ecModel;return this.getShallow("color")||(!e&&t?t.get(Gx):null)},e.prototype.getFont=function(){return Ox({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},e.prototype.getTextRect=function(e){for(var t={text:e,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},n=0;n<Hx.length;n++)t[Hx[n]]=this.getShallow(Hx[n]);return Wx.useStyle(t),Wx.update(),Wx.getBoundingRect()},e}(),Yx=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],Zx=kf(Yx),Xx=function(){function e(){}return e.prototype.getLineStyle=function(e){return Zx(this,e)},e}(),jx=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],$x=kf(jx),qx=function(){function e(){}return e.prototype.getItemStyle=function(e,t){return $x(this,e,t)},e}(),Kx=function(){function e(e,t,n){this.parentModel=t,this.ecModel=n,this.option=e}return e.prototype.init=function(e,t,n){},e.prototype.mergeOption=function(e,t){ds(this.option,e,!0)},e.prototype.get=function(e,t){return null==e?this.option:this._doGet(this.parsePath(e),!t&&this.parentModel)},e.prototype.getShallow=function(e,t){var n=this.option,o=null==n?n:n[e];if(null==o&&!t){var i=this.parentModel;i&&(o=i.getShallow(e))}return o},e.prototype.getModel=function(t,n){var o=null!=t,i=o?this.parsePath(t):null;return new e(o?this._doGet(i):this.option,n=n||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(i)),this.ecModel)},e.prototype.isEmpty=function(){return null==this.option},e.prototype.restoreData=function(){},e.prototype.clone=function(){return new(0,this.constructor)(cs(this.option))},e.prototype.parsePath=function(e){return"string"==typeof e?e.split("."):e},e.prototype.resolveParentPath=function(e){return e},e.prototype.isAnimationEnabled=function(){if(!Yl.node&&this.option){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},e.prototype._doGet=function(e,t){var n=this.option;if(!e)return n;for(var o=0;o<e.length&&(!e[o]||null!=(n=n&&"object"==typeof n?n[e[o]]:null));o++);return null==n&&t&&(n=t._doGet(this.resolveParentPath(e),t.parentModel)),n},e}();bf(Kx),zx=Kx,Fx=["__\0is_clz",Cf++].join("_"),zx.prototype[Fx]=!0,"production"!==process.env.NODE_ENV&&Hs(!zx.isInstance,'The method "is" can not be defined.'),zx.isInstance=function(e){return!(!e||!e[Fx])},vs(Kx,Xx),vs(Kx,qx),vs(Kx,Nf),vs(Kx,Ux);var Jx=Math.round(10*Math.random());function Qx(e){return[e||"",Jx++].join("_")}function e_(e,t){return ds(ds({},e,!0),t,!0)}var t_="ZH",n_="EN",o_=n_,i_={},r_={},a_=Yl.domSupported&&(document.documentElement.lang||navigator.language||navigator.browserLanguage||o_).toUpperCase().indexOf(t_)>-1?t_:o_;function l_(e,t){e=e.toUpperCase(),r_[e]=new Kx(t),i_[e]=t}function s_(e){return r_[e]}l_(n_,{time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}}),l_(t_,{time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}});var u_=1e3,c_=6e4,d_=36e5,h_=864e5,p_=31536e6,f_={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},g_="{yyyy}-{MM}-{dd}",v_={year:"{yyyy}",month:"{yyyy}-{MM}",day:g_,hour:g_+" "+f_.hour,minute:g_+" "+f_.minute,second:g_+" "+f_.second,millisecond:f_.none},m_=["year","month","day","hour","minute","second","millisecond"],y_=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function x_(e,t){return"0000".substr(0,t-(e+="").length)+e}function __(e){switch(e){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return e}}function w_(e){return e===__(e)}function b_(e,t,n,o){var i=Tp(e),r=i[M_(n)](),a=i[T_(n)]()+1,l=Math.floor((a-1)/3)+1,s=i[I_(n)](),u=i["get"+(n?"UTC":"")+"Day"](),c=i[k_(n)](),d=(c-1)%12+1,h=i[D_(n)](),p=i[N_(n)](),f=i[E_(n)](),g=c>=12?"pm":"am",v=g.toUpperCase(),m=(o instanceof Kx?o:s_(o||a_)||r_[o_]).getModel("time"),y=m.get("month"),x=m.get("monthAbbr"),_=m.get("dayOfWeek"),w=m.get("dayOfWeekAbbr");return(t||"").replace(/{a}/g,g+"").replace(/{A}/g,v+"").replace(/{yyyy}/g,r+"").replace(/{yy}/g,x_(r%100+"",2)).replace(/{Q}/g,l+"").replace(/{MMMM}/g,y[a-1]).replace(/{MMM}/g,x[a-1]).replace(/{MM}/g,x_(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,x_(s,2)).replace(/{d}/g,s+"").replace(/{eeee}/g,_[u]).replace(/{ee}/g,w[u]).replace(/{e}/g,u+"").replace(/{HH}/g,x_(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,x_(d+"",2)).replace(/{h}/g,d+"").replace(/{mm}/g,x_(h,2)).replace(/{m}/g,h+"").replace(/{ss}/g,x_(p,2)).replace(/{s}/g,p+"").replace(/{SSS}/g,x_(f,3)).replace(/{S}/g,f+"")}function S_(e,t){var n=Tp(e),o=n[T_(t)]()+1,i=n[I_(t)](),r=n[k_(t)](),a=n[D_(t)](),l=n[N_(t)](),s=0===n[E_(t)](),u=s&&0===l,c=u&&0===a,d=c&&0===r,h=d&&1===i;return h&&1===o?"year":h?"month":d?"day":c?"hour":u?"minute":s?"second":"millisecond"}function C_(e,t,n){var o=Ds(e)?Tp(e):e;switch(t=t||S_(e,n)){case"year":return o[M_(n)]();case"half-year":return o[T_(n)]()>=6?1:0;case"quarter":return Math.floor((o[T_(n)]()+1)/4);case"month":return o[T_(n)]();case"day":return o[I_(n)]();case"half-day":return o[k_(n)]()/24;case"hour":return o[k_(n)]();case"minute":return o[D_(n)]();case"second":return o[N_(n)]();case"millisecond":return o[E_(n)]()}}function M_(e){return e?"getUTCFullYear":"getFullYear"}function T_(e){return e?"getUTCMonth":"getMonth"}function I_(e){return e?"getUTCDate":"getDate"}function k_(e){return e?"getUTCHours":"getHours"}function D_(e){return e?"getUTCMinutes":"getMinutes"}function N_(e){return e?"getUTCSeconds":"getSeconds"}function E_(e){return e?"getUTCMilliseconds":"getMilliseconds"}function A_(e){return e?"setUTCFullYear":"setFullYear"}function L_(e){return e?"setUTCMonth":"setMonth"}function V_(e){return e?"setUTCDate":"setDate"}function O_(e){return e?"setUTCHours":"setHours"}function P_(e){return e?"setUTCMinutes":"setMinutes"}function B_(e){return e?"setUTCSeconds":"setSeconds"}function R_(e){return e?"setUTCMilliseconds":"setMilliseconds"}function z_(e){if(!Ap(e))return Is(e)?e:"-";var t=(e+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function F_(e,t){return e=(e||"").toLowerCase().replace(/-(.)/g,function(e,t){return t.toUpperCase()}),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var G_=Gs;function H_(e,t,n){function o(e){return e&&Ws(e)?e:"-"}function i(e){return!(null==e||isNaN(e)||!isFinite(e))}var r="time"===t,a=e instanceof Date;if(r||a){var l=r?Tp(e):e;if(!isNaN(+l))return b_(l,"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}",n);if(a)return"-"}if("ordinal"===t)return ks(e)?o(e):Ds(e)&&i(e)?e+"":"-";var s=Ep(e);return i(s)?z_(s):ks(e)?o(e):"boolean"==typeof e?e+"":"-"}var W_=["a","b","c","d","e","f","g"],U_=function(e,t){return"{"+e+(null==t?"":t)+"}"};function Y_(e,t,n){Ms(t)||(t=[t]);var o=t.length;if(!o)return"";for(var i=t[0].$vars||[],r=0;r<i.length;r++){var a=W_[r];e=e.replace(U_(a),U_(a,0))}for(var l=0;l<o;l++)for(var s=0;s<i.length;s++){var u=t[l][i[s]];e=e.replace(U_(W_[s],l),n?Au(u):u)}return e}function Z_(e,t){return t=t||"transparent",Is(e)?e:Ns(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}function X_(e,t){if("_blank"===t||"blank"===t){var n=window.open();n.opener=null,n.location.href=e}else window.open(e,t)}var j_=ys,$_=["left","right","top","bottom","width","height"],q_=[["width","left","right"],["height","top","bottom"]];function K_(e,t,n,o,i){var r=0,a=0;null==o&&(o=1/0),null==i&&(i=1/0);var l=0;t.eachChild(function(s,u){var c,d,h=s.getBoundingRect(),p=t.childAt(u+1),f=p&&p.getBoundingRect();if("horizontal"===e){var g=h.width+(f?-f.x+h.x:0);(c=r+g)>o||s.newline?(r=0,c=g,a+=l+n,l=h.height):l=Math.max(l,h.height)}else{var v=h.height+(f?-f.y+h.y:0);(d=a+v)>i||s.newline?(r+=l+n,a=0,d=v,l=h.width):l=Math.max(l,h.width)}s.newline||(s.x=r,s.y=a,s.markRedraw(),"horizontal"===e?r=c+n:a=d+n)})}var J_=K_;function Q_(e,t,n){n=G_(n||0);var o=t.width,i=t.height,r=gp(e.left,o),a=gp(e.top,i),l=gp(e.right,o),s=gp(e.bottom,i),u=gp(e.width,o),c=gp(e.height,i),d=n[2]+n[0],h=n[1]+n[3],p=e.aspect;switch(isNaN(u)&&(u=o-l-h-r),isNaN(c)&&(c=i-s-d-a),null!=p&&(isNaN(u)&&isNaN(c)&&(p>o/i?u=.8*o:c=.8*i),isNaN(u)&&(u=p*c),isNaN(c)&&(c=u/p)),isNaN(r)&&(r=o-l-u-h),isNaN(a)&&(a=i-s-c-d),e.left||e.right){case"center":r=o/2-u/2-n[3];break;case"right":r=o-u-h}switch(e.top||e.bottom){case"middle":case"center":a=i/2-c/2-n[0];break;case"bottom":a=i-c-d}r=r||0,a=a||0,isNaN(u)&&(u=o-h-r-(l||0)),isNaN(c)&&(c=i-d-a-(s||0));var f=new cc(r+n[3],a+n[0],u,c);return f.margin=n,f}function ew(e,t,n,o,i,r){var a,l=!i||!i.hv||i.hv[0],s=!i||!i.hv||i.hv[1],u=i&&i.boundingMode||"all";if((r=r||e).x=e.x,r.y=e.y,!l&&!s)return!1;if("raw"===u)a="group"===e.type?new cc(0,0,+t.width||0,+t.height||0):e.getBoundingRect();else if(a=e.getBoundingRect(),e.needLocalTransform()){var c=e.getLocalTransform();(a=a.clone()).applyTransform(c)}var d=Q_(fs({width:a.width,height:a.height},t),n,o),h=l?d.x-a.x:0,p=s?d.y-a.y:0;return"raw"===u?(r.x=h,r.y=p):(r.x+=h,r.y+=p),r===e&&e.markRedraw(),!0}function tw(e){var t=e.layoutMode||e.constructor.layoutMode;return Ns(t)?t:t?{type:t}:null}function nw(e,t,n){var o=n&&n.ignoreSize;!Ms(o)&&(o=[o,o]);var i=a(q_[0],0),r=a(q_[1],1);function a(n,i){var r={},a=0,u={},c=0;if(j_(n,function(t){u[t]=e[t]}),j_(n,function(e){l(t,e)&&(r[e]=u[e]=t[e]),s(r,e)&&a++,s(u,e)&&c++}),o[i])return s(t,n[1])?u[n[2]]=null:s(t,n[2])&&(u[n[1]]=null),u;if(2!==c&&a){if(a>=2)return r;for(var d=0;d<n.length;d++){var h=n[d];if(!l(r,h)&&l(e,h)){r[h]=e[h];break}}return r}return u}function l(e,t){return e.hasOwnProperty(t)}function s(e,t){return null!=e[t]&&"auto"!==e[t]}function u(e,t,n){j_(e,function(e){t[e]=n[e]})}u(q_[0],e,i),u(q_[1],e,r)}function ow(e){return iw({},e)}function iw(e,t){return t&&e&&j_($_,function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e}Cs(K_,"vertical"),Cs(K_,"horizontal");var rw=uf(),aw=function(e){function t(t,n,o){var i=e.call(this,t,n,o)||this;return i.uid=Qx("ec_cpt_model"),i}var n;return Wl(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=tw(this),o=n?ow(e):{};ds(e,t.getTheme().get(this.mainType)),ds(e,this.getDefaultOption()),n&&nw(e,o,n)},t.prototype.mergeOption=function(e,t){ds(this.option,e,!0);var n=tw(this);n&&nw(this.option,e,n)},t.prototype.optionUpdated=function(e,t){},t.prototype.getDefaultOption=function(){var e=this.constructor;if(!function(e){return!(!e||!e[_f])}(e))return e.defaultOption;var t=rw(this);if(!t.defaultOption){for(var n=[],o=e;o;){var i=o.prototype.defaultOption;i&&n.push(i),o=o.superClass}for(var r={},a=n.length-1;a>=0;a--)r=ds(r,n[a],!0);t.defaultOption=r}return t.defaultOption},t.prototype.getReferringComponents=function(e,t){var n=e+"Index",o=e+"Id";return gf(this.ecModel,e,{index:this.get(n,!0),id:this.get(o,!0)},t)},t.prototype.getBoxLayoutParams=function(){var e=this;return{left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")}},t.prototype.getZLevelKey=function(){return""},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=((n=t.prototype).type="component",n.id="",n.name="",n.mainType="",n.subType="",void(n.componentIndex=0)),t}(Kx);Sf(aw,Kx),If(aw),function(e){var t={};e.registerSubTypeDefaulter=function(e,n){var o=wf(e);t[o.main]=n},e.determineSubType=function(n,o){var i=o.type;if(!i){var r=wf(n).main;e.hasSubTypes(n)&&t[r]&&(i=t[r](o))}return i}}(aw),function(e,t){function n(e,t){return e[t]||(e[t]={predecessor:[],successor:[]}),e[t]}e.topologicalTravel=function(e,o,i,r){if(e.length){var a=function(e){var o={},i=[];return ys(e,function(r){var a=n(o,r),l=function(e,t){var n=[];return ys(e,function(e){gs(t,e)>=0&&n.push(e)}),n}(a.originalDeps=t(r),e);a.entryCount=l.length,0===a.entryCount&&i.push(r),ys(l,function(e){gs(a.predecessor,e)<0&&a.predecessor.push(e);var t=n(o,e);gs(t.successor,e)<0&&t.successor.push(r)})}),{graph:o,noEntryList:i}}(o),l=a.graph,s=a.noEntryList,u={};for(ys(e,function(e){u[e]=!0});s.length;){var c=s.pop(),d=l[c],h=!!u[c];h&&(i.call(r,c,d.originalDeps.slice()),delete u[c]),ys(d.successor,h?f:p)}ys(u,function(){var t="";throw"production"!==process.env.NODE_ENV&&(t=Wp("Circular dependency may exists: ",u,e,o)),new Error(t)})}function p(e){l[e].entryCount--,0===l[e].entryCount&&s.push(e)}function f(e){u[e]=!0,p(e)}}}(aw,function(e){var t=[];ys(aw.getClassesByMainType(e),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=xs(t,function(e){return wf(e).main}),"dataset"!==e&&gs(t,"dataset")<=0&&t.unshift("dataset");return t});var lw="";"undefined"!=typeof navigator&&(lw=navigator.platform||"");var sw="rgba(0, 0, 0, 0.2)";const uw={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:sw,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:sw,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:sw,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:sw,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:sw,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:sw,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:lw.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var cw=qs(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),dw="original",hw="arrayRows",pw="objectRows",fw="keyedColumns",gw="typedArray",vw="unknown",mw="column",yw="row",xw=1,_w=2,ww=3,bw=uf();function Sw(e,t,n){var o={},i=Mw(t);if(!i||!e)return o;var r,a,l=[],s=[],u=t.ecModel,c=bw(u).datasetMap,d=i.uid+"_"+n.seriesLayoutBy;ys(e=e.slice(),function(t,n){var i=Ns(t)?t:e[n]={name:t};"ordinal"===i.type&&null==r&&(r=n,a=f(i)),o[i.name]=[]});var h=c.get(d)||c.set(d,{categoryWayDim:a,valueWayDim:0});function p(e,t,n){for(var o=0;o<n;o++)e.push(t+o)}function f(e){var t=e.dimsDef;return t?t.length:1}return ys(e,function(e,t){var n=e.name,i=f(e);if(null==r){var a=h.valueWayDim;p(o[n],a,i),p(s,a,i),h.valueWayDim+=i}else if(r===t)p(o[n],0,i),p(l,0,i);else{a=h.categoryWayDim;p(o[n],a,i),p(s,a,i),h.categoryWayDim+=i}}),l.length&&(o.itemName=l),s.length&&(o.seriesName=s),o}function Cw(e,t,n){var o={};if(!Mw(e))return o;var i,r=t.sourceFormat,a=t.dimensionsDefine;r!==pw&&r!==fw||ys(a,function(e,t){"name"===(Ns(e)?e.name:e)&&(i=t)});var l=function(){for(var e={},o={},l=[],s=0,u=Math.min(5,n);s<u;s++){var c=Iw(t.data,r,t.seriesLayoutBy,a,t.startIndex,s);l.push(c);var d=c===ww;if(d&&null==e.v&&s!==i&&(e.v=s),(null==e.n||e.n===e.v||!d&&l[e.n]===ww)&&(e.n=s),h(e)&&l[e.n]!==ww)return e;d||(c===_w&&null==o.v&&s!==i&&(o.v=s),null!=o.n&&o.n!==o.v||(o.n=s))}function h(e){return null!=e.v&&null!=e.n}return h(e)?e:h(o)?o:null}();if(l){o.value=[l.v];var s=null!=i?i:l.n;o.itemName=[s],o.seriesName=[s]}return o}function Mw(e){if(!e.get("data",!0))return gf(e.ecModel,"dataset",{index:e.get("datasetIndex",!0),id:e.get("datasetId",!0)},pf).models[0]}function Tw(e,t){return Iw(e.data,e.sourceFormat,e.seriesLayoutBy,e.dimensionsDefine,e.startIndex,t)}function Iw(e,t,n,o,i,r){var a,l,s;if(As(e))return ww;if(o){var u=o[r];Ns(u)?(l=u.name,s=u.type):Is(u)&&(l=u)}if(null!=s)return"ordinal"===s?xw:ww;if(t===hw){var c=e;if(n===yw){for(var d=c[r],h=0;h<(d||[]).length&&h<5;h++)if(null!=(a=y(d[i+h])))return a}else for(h=0;h<c.length&&h<5;h++){var p=c[i+h];if(p&&null!=(a=y(p[r])))return a}}else if(t===pw){var f=e;if(!l)return ww;for(h=0;h<f.length&&h<5;h++){if((v=f[h])&&null!=(a=y(v[l])))return a}}else if(t===fw){if(!l)return ww;if(!(d=e[l])||As(d))return ww;for(h=0;h<d.length&&h<5;h++)if(null!=(a=y(d[h])))return a}else if(t===dw){var g=e;for(h=0;h<g.length&&h<5;h++){var v,m=Kp(v=g[h]);if(!Ms(m))return ww;if(null!=(a=y(m[r])))return a}}function y(e){var t=Is(e);return null!=e&&Number.isFinite(Number(e))&&""!==e?t?_w:ww:t&&"-"!==e?xw:void 0}return ww}var kw=qs();var Dw,Nw,Ew,Aw=uf(),Lw=uf(),Vw=function(){function e(){}return e.prototype.getColorFromPalette=function(e,t,n){var o=jp(this.get("color",!0)),i=this.get("colorLayer",!0);return Pw(this,Aw,o,i,e,t,n)},e.prototype.clearColorPalette=function(){var e,t;(t=Aw)(e=this).paletteIdx=0,t(e).paletteNameMap={}},e}();function Ow(e,t,n,o){var i=jp(e.get(["aria","decal","decals"]));return Pw(e,Lw,i,null,t,n,o)}function Pw(e,t,n,o,i,r,a){var l=t(r=r||e),s=l.paletteIdx||0,u=l.paletteNameMap=l.paletteNameMap||{};if(u.hasOwnProperty(i))return u[i];var c=null!=a&&o?function(e,t){for(var n=e.length,o=0;o<n;o++)if(e[o].length>t)return e[o];return e[n-1]}(o,a):n;if((c=c||n)&&c.length){var d=c[s];return i&&(u[i]=d),l.paletteIdx=(s+1)%c.length,d}}var Bw="\0_ec_inner",Rw={grid:"GridComponent",polar:"PolarComponent",geo:"GeoComponent",singleAxis:"SingleAxisComponent",parallel:"ParallelComponent",calendar:"CalendarComponent",graphic:"GraphicComponent",toolbox:"ToolboxComponent",tooltip:"TooltipComponent",axisPointer:"AxisPointerComponent",brush:"BrushComponent",title:"TitleComponent",timeline:"TimelineComponent",markPoint:"MarkPointComponent",markLine:"MarkLineComponent",markArea:"MarkAreaComponent",legend:"LegendComponent",dataZoom:"DataZoomComponent",visualMap:"VisualMapComponent",xAxis:"GridComponent",yAxis:"GridComponent",angleAxis:"PolarComponent",radiusAxis:"PolarComponent"},zw={line:"LineChart",bar:"BarChart",pie:"PieChart",scatter:"ScatterChart",radar:"RadarChart",map:"MapChart",tree:"TreeChart",treemap:"TreemapChart",graph:"GraphChart",gauge:"GaugeChart",funnel:"FunnelChart",parallel:"ParallelChart",sankey:"SankeyChart",boxplot:"BoxplotChart",candlestick:"CandlestickChart",effectScatter:"EffectScatterChart",lines:"LinesChart",heatmap:"HeatmapChart",pictorialBar:"PictorialBarChart",themeRiver:"ThemeRiverChart",sunburst:"SunburstChart",custom:"CustomChart"},Fw={};var Gw=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Wl(t,e),t.prototype.init=function(e,t,n,o,i,r){o=o||{},this.option=null,this._theme=new Kx(o),this._locale=new Kx(i),this._optionManager=r},t.prototype.setOption=function(e,t,n){"production"!==process.env.NODE_ENV&&(Hs(null!=e,"option is null/undefined"),Hs(1!==e[Bw],"please use chart.getOption()"));var o=Uw(t);this._optionManager.setOption(e,n,o),this._resetOption(null,o)},t.prototype.resetOption=function(e,t){return this._resetOption(e,Uw(t))},t.prototype._resetOption=function(e,t){var n=!1,o=this._optionManager;if(!e||"recreate"===e){var i=o.mountOption("recreate"===e);"production"!==process.env.NODE_ENV&&ys(i,function(e,t){if(!aw.hasClass(t)){var n=Rw[t];n&&!Fw[n]&&(Fp("Component "+t+" is used but not imported.\nimport { "+n+" } from 'echarts/components';\necharts.use(["+n+"]);"),Fw[n]=!0)}}),this.option&&"recreate"!==e?(this.restoreData(),this._mergeOption(i,t)):Ew(this,i),n=!0}if("timeline"!==e&&"media"!==e||this.restoreData(),!e||"recreate"===e||"timeline"===e){var r=o.getTimelineOption(this);r&&(n=!0,this._mergeOption(r,t))}if(!e||"recreate"===e||"media"===e){var a=o.getMediaOption(this);a.length&&ys(a,function(e){n=!0,this._mergeOption(e,t)},this)}return n},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,t){var n=this.option,o=this._componentsMap,i=this._componentsCount,r=[],a=qs(),l=t&&t.replaceMergeMainTypeMap;bw(this).datasetMap=qs(),ys(e,function(e,t){null!=e&&(aw.hasClass(t)?t&&(r.push(t),a.set(t,!0)):n[t]=null==n[t]?cs(e):ds(n[t],e,!0))}),l&&l.each(function(e,t){aw.hasClass(t)&&!a.get(t)&&(r.push(t),a.set(t,!0))}),aw.topologicalTravel(r,aw.getAllClassMainTypes(),function(t){var r=function(e,t,n){var o=kw.get(t);if(!o)return n;var i=o(e);if(!i)return n;if("production"!==process.env.NODE_ENV)for(var r=0;r<i.length;r++)Hs(lf(i[r]));return n.concat(i)}(this,t,jp(e[t])),a=o.get(t),s=a?l&&l.get(t)?"replaceMerge":"normalMerge":"replaceAll",u=Qp(a,r,s);(function(e,t,n){ys(e,function(e){var o=e.newOption;Ns(o)&&(e.keyInfo.mainType=t,e.keyInfo.subType=function(e,t,n,o){return t.type?t.type:n?n.subType:o.determineSubType(e,t)}(t,o,e.existing,n))})})(u,t,aw),n[t]=null,o.set(t,null),i.set(t,0);var c,d,h=[],p=[],f=0;ys(u,function(e,n){var o=e.existing,i=e.newOption;if(i){var r="series"===t,a=aw.getClass(t,e.keyInfo.subType,!r);if(!a){if("production"!==process.env.NODE_ENV){var l=e.keyInfo.subType,s=zw[l];Fw[l]||(Fw[l]=!0,Fp(s?"Series "+l+" is used but not imported.\nimport { "+s+" } from 'echarts/charts';\necharts.use(["+s+"]);":"Unknown series "+l))}return}if("tooltip"===t){if(c)return void("production"!==process.env.NODE_ENV&&(d||(zp("Currently only one tooltip component is allowed."),d=!0)));c=!0}if(o&&o.constructor===a)o.name=e.keyInfo.name,o.mergeOption(i,this),o.optionUpdated(i,!1);else{var u=ps({componentIndex:n},e.keyInfo);ps(o=new a(i,this,this,u),u),e.brandNew&&(o.__requireNewView=!0),o.init(i,this,this),o.optionUpdated(null,!0)}}else o&&(o.mergeOption({},this),o.optionUpdated({},!1));o?(h.push(o.option),p.push(o),f++):(h.push(void 0),p.push(void 0))},this),n[t]=h,o.set(t,p),i.set(t,f),"series"===t&&Dw(this)},this),this._seriesIndices||Dw(this)},t.prototype.getOption=function(){var e=cs(this.option);return ys(e,function(t,n){if(aw.hasClass(n)){for(var o=jp(t),i=o.length,r=!1,a=i-1;a>=0;a--)o[a]&&!lf(o[a])?r=!0:(o[a]=null,!r&&i--);o.length=i,e[n]=o}}),delete e[Bw],e},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,t){var n=this._componentsMap.get(e);if(n){var o=n[t||0];if(o)return o;if(null==t)for(var i=0;i<n.length;i++)if(n[i])return n[i]}},t.prototype.queryComponents=function(e){var t=e.mainType;if(!t)return[];var n,o=e.index,i=e.id,r=e.name,a=this._componentsMap.get(t);return a&&a.length?(null!=o?(n=[],ys(jp(o),function(e){a[e]&&n.push(a[e])})):n=null!=i?Hw("id",i,a):null!=r?Hw("name",r,a):ws(a,function(e){return!!e}),Ww(n,e)):[]},t.prototype.findComponents=function(e){var t,n,o,i,r,a=e.query,l=e.mainType,s=(n=l+"Index",o=l+"Id",i=l+"Name",!(t=a)||null==t[n]&&null==t[o]&&null==t[i]?null:{mainType:l,index:t[n],id:t[o],name:t[i]}),u=s?this.queryComponents(s):ws(this._componentsMap.get(l),function(e){return!!e});return r=Ww(u,e),e.filter?ws(r,e.filter):r},t.prototype.eachComponent=function(e,t,n){var o=this._componentsMap;if(Ts(e)){var i=t,r=e;o.each(function(e,t){for(var n=0;e&&n<e.length;n++){var o=e[n];o&&r.call(i,t,o,o.componentIndex)}})}else for(var a=Is(e)?o.get(e):Ns(e)?this.findComponents(e):null,l=0;a&&l<a.length;l++){var s=a[l];s&&t.call(n,s,s.componentIndex)}},t.prototype.getSeriesByName=function(e){var t=nf(e,null);return ws(this._componentsMap.get("series"),function(e){return!!e&&null!=t&&e.name===t})},t.prototype.getSeriesByIndex=function(e){return this._componentsMap.get("series")[e]},t.prototype.getSeriesByType=function(e){return ws(this._componentsMap.get("series"),function(t){return!!t&&t.subType===e})},t.prototype.getSeries=function(){return ws(this._componentsMap.get("series"),function(e){return!!e})},t.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},t.prototype.eachSeries=function(e,t){Nw(this),ys(this._seriesIndices,function(n){var o=this._componentsMap.get("series")[n];e.call(t,o,n)},this)},t.prototype.eachRawSeries=function(e,t){ys(this._componentsMap.get("series"),function(n){n&&e.call(t,n,n.componentIndex)})},t.prototype.eachSeriesByType=function(e,t,n){Nw(this),ys(this._seriesIndices,function(o){var i=this._componentsMap.get("series")[o];i.subType===e&&t.call(n,i,o)},this)},t.prototype.eachRawSeriesByType=function(e,t,n){return ys(this.getSeriesByType(e),t,n)},t.prototype.isSeriesFiltered=function(e){return Nw(this),null==this._seriesIndicesMap.get(e.componentIndex)},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(e,t){Nw(this);var n=[];ys(this._seriesIndices,function(o){var i=this._componentsMap.get("series")[o];e.call(t,i,o)&&n.push(o)},this),this._seriesIndices=n,this._seriesIndicesMap=qs(n)},t.prototype.restoreData=function(e){Dw(this);var t=this._componentsMap,n=[];t.each(function(e,t){aw.hasClass(t)&&n.push(t)}),aw.topologicalTravel(n,aw.getAllClassMainTypes(),function(n){ys(t.get(n),function(t){!t||"series"===n&&function(e,t){if(t){var n=t.seriesIndex,o=t.seriesId,i=t.seriesName;return null!=n&&e.componentIndex!==n||null!=o&&e.id!==o||null!=i&&e.name!==i}}(t,e)||t.restoreData()})})},t.internalField=(Dw=function(e){var t=e._seriesIndices=[];ys(e._componentsMap.get("series"),function(e){e&&t.push(e.componentIndex)}),e._seriesIndicesMap=qs(t)},Nw=function(e){if("production"!==process.env.NODE_ENV&&!e._seriesIndices)throw new Error("Option should contains series.")},void(Ew=function(e,t){e.option={},e.option[Bw]=1,e._componentsMap=qs({series:[]}),e._componentsCount=qs();var n,o,i,r=t.aria;Ns(r)&&null==r.enabled&&(r.enabled=!0),n=t,o=e._theme.option,i=n.color&&!n.colorLayer,ys(o,function(e,t){"colorLayer"===t&&i||aw.hasClass(t)||("object"==typeof e?n[t]=n[t]?ds(n[t],e,!1):cs(e):null==n[t]&&(n[t]=e))}),ds(t,uw,!1),e._mergeOption(t,null)})),t}(Kx);function Hw(e,t,n){if(Ms(t)){var o=qs();return ys(t,function(e){null!=e&&(null!=nf(e,null)&&o.set(e,!0))}),ws(n,function(t){return t&&o.get(t[e])})}var i=nf(t,null);return ws(n,function(t){return t&&null!=i&&t[e]===i})}function Ww(e,t){return t.hasOwnProperty("subType")?ws(e,function(e){return e&&e.subType===t.subType}):e}function Uw(e){var t=qs();return e&&ys(jp(e.replaceMerge),function(e){"production"!==process.env.NODE_ENV&&Hs(aw.hasClass(e),'"'+e+'" is not valid component main type in "replaceMerge"'),t.set(e,!0)}),{replaceMergeMainTypeMap:t}}vs(Gw,Vw);var Yw=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],Zw=function(){return function(e){ys(Yw,function(t){this[t]=Ss(e[t],e)},this)}}(),Xw={},jw=function(){function e(){this._coordinateSystems=[]}return e.prototype.create=function(e,t){var n=[];ys(Xw,function(o,i){var r=o.create(e,t);n=n.concat(r||[])}),this._coordinateSystems=n},e.prototype.update=function(e,t){ys(this._coordinateSystems,function(n){n.update&&n.update(e,t)})},e.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},e.register=function(e,t){Xw[e]=t},e.get=function(e){return Xw[e]},e}(),$w=/^(min|max)?(.+)$/,qw=function(){function e(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return e.prototype.setOption=function(e,t,n){e&&(ys(jp(e.series),function(e){e&&e.data&&As(e.data)&&Ys(e.data)}),ys(jp(e.dataset),function(e){e&&e.source&&As(e.source)&&Ys(e.source)})),e=cs(e);var o=this._optionBackup,i=function(e,t,n){var o,i,r=[],a=e.baseOption,l=e.timeline,s=e.options,u=e.media,c=!!e.media,d=!!(s||l||a&&a.timeline);a?(i=a).timeline||(i.timeline=l):((d||c)&&(e.options=e.media=null),i=e);c&&(Ms(u)?ys(u,function(e){"production"!==process.env.NODE_ENV&&e&&!e.option&&Ns(e.query)&&Ns(e.query.option)&&Fp("Illegal media option. Must be like { media: [ { query: {}, option: {} } ] }"),e&&e.option&&(e.query?r.push(e):o||(o=e))}):"production"!==process.env.NODE_ENV&&Fp("Illegal media option. Must be an array. Like { media: [ {...}, {...} ] }"));function h(e){ys(t,function(t){t(e,n)})}return h(i),ys(s,function(e){return h(e)}),ys(r,function(e){return h(e.option)}),{baseOption:i,timelineOptions:s||[],mediaDefault:o,mediaList:r}}(e,t,!o);this._newBaseOption=i.baseOption,o?(i.timelineOptions.length&&(o.timelineOptions=i.timelineOptions),i.mediaList.length&&(o.mediaList=i.mediaList),i.mediaDefault&&(o.mediaDefault=i.mediaDefault)):this._optionBackup=i},e.prototype.mountOption=function(e){var t=this._optionBackup;return this._timelineOptions=t.timelineOptions,this._mediaList=t.mediaList,this._mediaDefault=t.mediaDefault,this._currentMediaIndices=[],cs(e?t.baseOption:this._newBaseOption)},e.prototype.getTimelineOption=function(e){var t,n=this._timelineOptions;if(n.length){var o=e.getComponent("timeline");o&&(t=cs(n[o.getCurrentIndex()]))}return t},e.prototype.getMediaOption=function(e){var t,n,o=this._api.getWidth(),i=this._api.getHeight(),r=this._mediaList,a=this._mediaDefault,l=[],s=[];if(!r.length&&!a)return s;for(var u=0,c=r.length;u<c;u++)Kw(r[u].query,o,i)&&l.push(u);return!l.length&&a&&(l=[-1]),l.length&&(t=l,n=this._currentMediaIndices,t.join(",")!==n.join(","))&&(s=xs(l,function(e){return cs(-1===e?a.option:r[e].option)})),this._currentMediaIndices=l,s},e}();function Kw(e,t,n){var o={width:t,height:n,aspectratio:t/n},i=!0;return ys(e,function(e,t){var n=t.match($w);if(n&&n[1]&&n[2]){var r=n[1],a=n[2].toLowerCase();(function(e,t,n){return"min"===n?e>=t:"max"===n?e<=t:e===t})(o[a],e,r)||(i=!1)}}),i}var Jw=ys,Qw=Ns,eb=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function tb(e){var t=e&&e.itemStyle;if(t)for(var n=0,o=eb.length;n<o;n++){var i=eb[n],r=t.normal,a=t.emphasis;r&&r[i]&&("production"!==process.env.NODE_ENV&&Hp("itemStyle.normal."+i,i),e[i]=e[i]||{},e[i].normal?ds(e[i].normal,r[i]):e[i].normal=r[i],r[i]=null),a&&a[i]&&("production"!==process.env.NODE_ENV&&Hp("itemStyle.emphasis."+i,"emphasis."+i),e[i]=e[i]||{},e[i].emphasis?ds(e[i].emphasis,a[i]):e[i].emphasis=a[i],a[i]=null)}}function nb(e,t,n){if(e&&e[t]&&(e[t].normal||e[t].emphasis)){var o=e[t].normal,i=e[t].emphasis;o&&("production"!==process.env.NODE_ENV&&Gp("'normal' hierarchy in "+t+" has been removed since 4.0. All style properties are configured in "+t+" directly now."),n?(e[t].normal=e[t].emphasis=null,fs(e[t],o)):e[t]=o),i&&("production"!==process.env.NODE_ENV&&Gp(t+".emphasis has been changed to emphasis."+t+" since 4.0"),e.emphasis=e.emphasis||{},e.emphasis[t]=i,i.focus&&(e.emphasis.focus=i.focus),i.blurScope&&(e.emphasis.blurScope=i.blurScope))}}function ob(e){nb(e,"itemStyle"),nb(e,"lineStyle"),nb(e,"areaStyle"),nb(e,"label"),nb(e,"labelLine"),nb(e,"upperLabel"),nb(e,"edgeLabel")}function ib(e,t){var n=Qw(e)&&e[t],o=Qw(n)&&n.textStyle;if(o){"production"!==process.env.NODE_ENV&&Gp("textStyle hierarchy in "+t+" has been removed since 4.0. All textStyle properties are configured in "+t+" directly now.");for(var i=0,r=qp.length;i<r;i++){var a=qp[i];o.hasOwnProperty(a)&&(n[a]=o[a])}}}function rb(e){e&&(ob(e),ib(e,"label"),e.emphasis&&ib(e.emphasis,"label"))}function ab(e){return Ms(e)?e:e?[e]:[]}function lb(e){return(Ms(e)?e[0]:e)||{}}function sb(e,t){Jw(ab(e.series),function(e){Qw(e)&&function(e){if(Qw(e)){tb(e),ob(e),ib(e,"label"),ib(e,"upperLabel"),ib(e,"edgeLabel"),e.emphasis&&(ib(e.emphasis,"label"),ib(e.emphasis,"upperLabel"),ib(e.emphasis,"edgeLabel"));var t=e.markPoint;t&&(tb(t),rb(t));var n=e.markLine;n&&(tb(n),rb(n));var o=e.markArea;o&&rb(o);var i=e.data;if("graph"===e.type){i=i||e.nodes;var r=e.links||e.edges;if(r&&!As(r))for(var a=0;a<r.length;a++)rb(r[a]);ys(e.categories,function(e){ob(e)})}if(i&&!As(i))for(a=0;a<i.length;a++)rb(i[a]);if((t=e.markPoint)&&t.data){var l=t.data;for(a=0;a<l.length;a++)rb(l[a])}if((n=e.markLine)&&n.data){var s=n.data;for(a=0;a<s.length;a++)Ms(s[a])?(rb(s[a][0]),rb(s[a][1])):rb(s[a])}"gauge"===e.type?(ib(e,"axisLabel"),ib(e,"title"),ib(e,"detail")):"treemap"===e.type?(nb(e.breadcrumb,"itemStyle"),ys(e.levels,function(e){ob(e)})):"tree"===e.type&&ob(e.leaves)}}(e)});var n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),Jw(n,function(t){Jw(ab(e[t]),function(e){e&&(ib(e,"axisLabel"),ib(e.axisPointer,"label"))})}),Jw(ab(e.parallel),function(e){var t=e&&e.parallelAxisDefault;ib(t,"axisLabel"),ib(t&&t.axisPointer,"label")}),Jw(ab(e.calendar),function(e){nb(e,"itemStyle"),ib(e,"dayLabel"),ib(e,"monthLabel"),ib(e,"yearLabel")}),Jw(ab(e.radar),function(e){ib(e,"name"),e.name&&null==e.axisName&&(e.axisName=e.name,delete e.name,"production"!==process.env.NODE_ENV&&Gp("name property in radar component has been changed to axisName")),null!=e.nameGap&&null==e.axisNameGap&&(e.axisNameGap=e.nameGap,delete e.nameGap,"production"!==process.env.NODE_ENV&&Gp("nameGap property in radar component has been changed to axisNameGap")),"production"!==process.env.NODE_ENV&&Jw(e.indicator,function(e){e.text&&Hp("text","name","radar.indicator")})}),Jw(ab(e.geo),function(e){Qw(e)&&(rb(e),Jw(ab(e.regions),function(e){rb(e)}))}),Jw(ab(e.timeline),function(e){rb(e),nb(e,"label"),nb(e,"itemStyle"),nb(e,"controlStyle",!0);var t=e.data;Ms(t)&&ys(t,function(e){Ns(e)&&(nb(e,"label"),nb(e,"itemStyle"))})}),Jw(ab(e.toolbox),function(e){nb(e,"iconStyle"),Jw(e.feature,function(e){nb(e,"iconStyle")})}),ib(lb(e.axisPointer),"label"),ib(lb(e.tooltip).axisPointer,"label")}function ub(e){e&&ys(cb,function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])})}var cb=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],db=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],hb=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function pb(e){var t=e&&e.itemStyle;if(t)for(var n=0;n<hb.length;n++){var o=hb[n][1],i=hb[n][0];null!=t[o]&&(t[i]=t[o],"production"!==process.env.NODE_ENV&&Hp(o,i))}}function fb(e){e&&"edge"===e.alignTo&&null!=e.margin&&null==e.edgeDistance&&("production"!==process.env.NODE_ENV&&Hp("label.margin","label.edgeDistance","pie"),e.edgeDistance=e.margin)}function gb(e){e&&e.downplay&&!e.blur&&(e.blur=e.downplay,"production"!==process.env.NODE_ENV&&Hp("downplay","blur","sunburst"))}function vb(e,t){if(e)for(var n=0;n<e.length;n++)t(e[n]),e[n]&&vb(e[n].children,t)}function mb(e,t){sb(e,t),e.series=jp(e.series),ys(e.series,function(e){if(Ns(e)){var t=e.type;if("line"===t)null!=e.clipOverflow&&(e.clip=e.clipOverflow,"production"!==process.env.NODE_ENV&&Hp("clipOverflow","clip","line"));else if("pie"===t||"gauge"===t){if(null!=e.clockWise&&(e.clockwise=e.clockWise,"production"!==process.env.NODE_ENV&&Hp("clockWise","clockwise")),fb(e.label),(i=e.data)&&!As(i))for(var n=0;n<i.length;n++)fb(i[n]);null!=e.hoverOffset&&(e.emphasis=e.emphasis||{},(e.emphasis.scaleSize=null)&&("production"!==process.env.NODE_ENV&&Hp("hoverOffset","emphasis.scaleSize"),e.emphasis.scaleSize=e.hoverOffset))}else if("gauge"===t){var o=function(e,t){for(var n=t.split(","),o=e,i=0;i<n.length&&null!=(o=o&&o[n[i]]);i++);return o}(e,"pointer.color");null!=o&&function(e,t,n){for(var o,i=t.split(","),r=e,a=0;a<i.length-1;a++)null==r[o=i[a]]&&(r[o]={}),r=r[o];null==r[i[a]]&&(r[i[a]]=n)}(e,"itemStyle.color",o)}else if("bar"===t){var i;if(pb(e),pb(e.backgroundStyle),pb(e.emphasis),(i=e.data)&&!As(i))for(n=0;n<i.length;n++)"object"==typeof i[n]&&(pb(i[n]),pb(i[n]&&i[n].emphasis))}else if("sunburst"===t){var r=e.highlightPolicy;r&&(e.emphasis=e.emphasis||{},e.emphasis.focus||(e.emphasis.focus=r,"production"!==process.env.NODE_ENV&&Hp("highlightPolicy","emphasis.focus","sunburst"))),gb(e),vb(e.data,gb)}else"graph"===t||"sankey"===t?function(e){e&&null!=e.focusNodeAdjacency&&(e.emphasis=e.emphasis||{},null==e.emphasis.focus&&("production"!==process.env.NODE_ENV&&Hp("focusNodeAdjacency","emphasis: { focus: 'adjacency'}","graph/sankey"),e.emphasis.focus="adjacency"))}(e):"map"===t&&(e.mapType&&!e.map&&("production"!==process.env.NODE_ENV&&Hp("mapType","map","map"),e.map=e.mapType),e.mapLocation&&("production"!==process.env.NODE_ENV&&Gp("`mapLocation` is not used anymore."),fs(e,e.mapLocation)));null!=e.hoverAnimation&&(e.emphasis=e.emphasis||{},e.emphasis&&null==e.emphasis.scale&&("production"!==process.env.NODE_ENV&&Hp("hoverAnimation","emphasis.scale"),e.emphasis.scale=e.hoverAnimation)),ub(e)}}),e.dataRange&&(e.visualMap=e.dataRange),ys(db,function(t){var n=e[t];n&&(Ms(n)||(n=[n]),ys(n,function(e){ub(e)}))})}function yb(e){ys(e,function(t,n){var o=[],i=[NaN,NaN],r=[t.stackResultDimension,t.stackedOverDimension],a=t.data,l=t.isStackedByIndex,s=t.seriesModel.get("stackStrategy")||"samesign";a.modify(r,function(r,u,c){var d,h,p=a.get(t.stackedDimension,c);if(isNaN(p))return i;l?h=a.getRawIndex(c):d=a.get(t.stackedByDimension,c);for(var f=NaN,g=n-1;g>=0;g--){var v=e[g];if(l||(h=v.data.rawIndexOf(v.stackedByDimension,d)),h>=0){var m=v.data.getByRawIndex(v.stackResultDimension,h);if("all"===s||"positive"===s&&m>0||"negative"===s&&m<0||"samesign"===s&&p>=0&&m>0||"samesign"===s&&p<=0&&m<0){p=wp(p,m),f=m;break}}}return o[0]=p,o[1]=f,o})})}var xb,_b,wb,bb,Sb,Cb=function(){return function(e){this.data=e.data||(e.sourceFormat===fw?{}:[]),this.sourceFormat=e.sourceFormat||vw,this.seriesLayoutBy=e.seriesLayoutBy||mw,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var n=0;n<t.length;n++){var o=t[n];null==o.type&&Tw(this,n)===xw&&(o.type="ordinal")}}}();function Mb(e){return e instanceof Cb}function Tb(e,t,n){n=n||kb(e);var o=t.seriesLayoutBy,i=function(e,t,n,o,i){var r,a;if(!e)return{dimensionsDefine:Db(i),startIndex:a,dimensionsDetectedCount:r};if(t===hw){var l=e;"auto"===o||null==o?Nb(function(e){null!=e&&"-"!==e&&(Is(e)?null==a&&(a=1):a=0)},n,l,10):a=Ds(o)?o:o?1:0,i||1!==a||(i=[],Nb(function(e,t){i[t]=null!=e?e+"":""},n,l,1/0)),r=i?i.length:n===yw?l.length:l[0]?l[0].length:null}else if(t===pw)i||(i=function(e){var t,n=0;for(;n<e.length&&!(t=e[n++]););if(t)return bs(t)}(e));else if(t===fw)i||(i=[],ys(e,function(e,t){i.push(t)}));else if(t===dw){var s=Kp(e[0]);r=Ms(s)&&s.length||1}else t===gw&&"production"!==process.env.NODE_ENV&&Hs(!!i,"dimensions must be given if data is TypedArray.");return{startIndex:a,dimensionsDefine:Db(i),dimensionsDetectedCount:r}}(e,n,o,t.sourceHeader,t.dimensions);return new Cb({data:e,sourceFormat:n,seriesLayoutBy:o,dimensionsDefine:i.dimensionsDefine,startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,metaRawOption:cs(t)})}function Ib(e){return new Cb({data:e,sourceFormat:As(e)?gw:dw})}function kb(e){var t=vw;if(As(e))t=gw;else if(Ms(e)){0===e.length&&(t=hw);for(var n=0,o=e.length;n<o;n++){var i=e[n];if(null!=i){if(Ms(i)||As(i)){t=hw;break}if(Ns(i)){t=pw;break}}}}else if(Ns(e))for(var r in e)if(eu(e,r)&&ms(e[r])){t=fw;break}return t}function Db(e){if(e){var t=qs();return xs(e,function(e,n){var o={name:(e=Ns(e)?e:{name:e}).name,displayName:e.displayName,type:e.type};if(null==o.name)return o;o.name+="",null==o.displayName&&(o.displayName=o.name);var i=t.get(o.name);return i?o.name+="-"+i.count++:t.set(o.name,{count:1}),o})}}function Nb(e,t,n,o){if(t===yw)for(var i=0;i<n.length&&i<o;i++)e(n[i]?n[i][0]:null,i);else{var r=n[0]||[];for(i=0;i<r.length&&i<o;i++)e(r[i],i)}}function Eb(e){var t=e.sourceFormat;return t===pw||t===fw}var Ab=function(){function e(e,t){var n=Mb(e)?e:Ib(e);this._source=n;var o=this._data=n.data;if(n.sourceFormat===gw){if("production"!==process.env.NODE_ENV&&null==t)throw new Error("Typed array data must specify dimension size");this._offset=0,this._dimSize=t,this._data=o}Sb(this,o,n)}var t;return e.prototype.getSource=function(){return this._source},e.prototype.count=function(){return 0},e.prototype.getItem=function(e,t){},e.prototype.appendData=function(e){},e.prototype.clean=function(){},e.protoInitialize=((t=e.prototype).pure=!1,void(t.persistent=!0)),e.internalField=function(){var e;Sb=function(e,i,r){var a=r.sourceFormat,l=r.seriesLayoutBy,s=r.startIndex,u=r.dimensionsDefine,c=bb[Hb(a,l)];if("production"!==process.env.NODE_ENV&&Hs(c,"Invalide sourceFormat: "+a),ps(e,c),a===gw)e.getItem=t,e.count=o,e.fillStorage=n;else{var d=Ob(a,l);e.getItem=Ss(d,null,i,s,u);var h=Rb(a,l);e.count=Ss(h,null,i,s,u)}};var t=function(e,t){e-=this._offset,t=t||[];for(var n=this._data,o=this._dimSize,i=o*e,r=0;r<o;r++)t[r]=n[i+r];return t},n=function(e,t,n,o){for(var i=this._data,r=this._dimSize,a=0;a<r;a++){for(var l=o[a],s=null==l[0]?1/0:l[0],u=null==l[1]?-1/0:l[1],c=t-e,d=n[a],h=0;h<c;h++){var p=i[h*r+a];d[e+h]=p,p<s&&(s=p),p>u&&(u=p)}l[0]=s,l[1]=u}},o=function(){return this._data?this._data.length/this._dimSize:0};function i(e){for(var t=0;t<e.length;t++)this._data.push(e[t])}(e={})[hw+"_"+mw]={pure:!0,appendData:i},e[hw+"_"+yw]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[pw]={pure:!0,appendData:i},e[fw]={pure:!0,appendData:function(e){var t=this._data;ys(e,function(e,n){for(var o=t[n]||(t[n]=[]),i=0;i<(e||[]).length;i++)o.push(e[i])})}},e[dw]={appendData:i},e[gw]={persistent:!1,pure:!0,appendData:function(e){"production"!==process.env.NODE_ENV&&Hs(As(e),"Added data must be TypedArray if data in initialization is TypedArray"),this._data=e},clean:function(){this._offset+=this.count(),this._data=null}},bb=e}(),e}(),Lb=function(e,t,n,o){return e[o]},Vb=((xb={})[hw+"_"+mw]=function(e,t,n,o){return e[o+t]},xb[hw+"_"+yw]=function(e,t,n,o,i){o+=t;for(var r=i||[],a=e,l=0;l<a.length;l++){var s=a[l];r[l]=s?s[o]:null}return r},xb[pw]=Lb,xb[fw]=function(e,t,n,o,i){for(var r=i||[],a=0;a<n.length;a++){var l=n[a].name;if("production"!==process.env.NODE_ENV&&null==l)throw new Error;var s=e[l];r[a]=s?s[o]:null}return r},xb[dw]=Lb,xb);function Ob(e,t){var n=Vb[Hb(e,t)];return"production"!==process.env.NODE_ENV&&Hs(n,'Do not support get item on "'+e+'", "'+t+'".'),n}var Pb=function(e,t,n){return e.length},Bb=((_b={})[hw+"_"+mw]=function(e,t,n){return Math.max(0,e.length-t)},_b[hw+"_"+yw]=function(e,t,n){var o=e[0];return o?Math.max(0,o.length-t):0},_b[pw]=Pb,_b[fw]=function(e,t,n){var o=n[0].name;if("production"!==process.env.NODE_ENV&&null==o)throw new Error;var i=e[o];return i?i.length:0},_b[dw]=Pb,_b);function Rb(e,t){var n=Bb[Hb(e,t)];return"production"!==process.env.NODE_ENV&&Hs(n,'Do not support count on "'+e+'", "'+t+'".'),n}var zb=function(e,t,n){return e[t]},Fb=((wb={})[hw]=zb,wb[pw]=function(e,t,n){return e[n]},wb[fw]=zb,wb[dw]=function(e,t,n){var o=Kp(e);return o instanceof Array?o[t]:o},wb[gw]=zb,wb);function Gb(e){var t=Fb[e];return"production"!==process.env.NODE_ENV&&Hs(t,'Do not support get value on "'+e+'".'),t}function Hb(e,t){return e===hw?e+"_"+t:e}function Wb(e,t,n){if(e){var o=e.getRawDataItem(t);if(null!=o){var i=e.getStore(),r=i.getSource().sourceFormat;if(null!=n){var a=e.getDimensionIndex(n),l=i.getDimensionProperty(a);return Gb(r)(o,a,l)}var s=o;return r===dw&&(s=Kp(o)),s}}}var Ub=/\{@(.+?)\}/g,Yb=function(){function e(){}return e.prototype.getDataParams=function(e,t){var n=this.getData(t),o=this.getRawValue(e,t),i=n.getRawIndex(e),r=n.getName(e),a=n.getRawDataItem(e),l=n.getItemVisual(e,"style"),s=l&&l[n.getItemVisual(e,"drawType")||"fill"],u=l&&l.stroke,c=this.mainType,d="series"===c,h=n.userOutput&&n.userOutput.get();return{componentType:c,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:d?this.subType:null,seriesIndex:this.seriesIndex,seriesId:d?this.id:null,seriesName:d?this.name:null,name:r,dataIndex:i,data:a,dataType:t,value:o,color:s,borderColor:u,dimensionNames:h?h.fullDimensions:null,encode:h?h.encode:null,$vars:["seriesName","name","value"]}},e.prototype.getFormattedLabel=function(e,t,n,o,i,r){t=t||"normal";var a=this.getData(n),l=this.getDataParams(e,n);(r&&(l.value=r.interpolatedValue),null!=o&&Ms(l.value)&&(l.value=l.value[o]),i)||(i=a.getItemModel(e).get("normal"===t?["label","formatter"]:[t,"label","formatter"]));return Ts(i)?(l.status=t,l.dimensionIndex=o,i(l)):Is(i)?Y_(i,l).replace(Ub,function(t,n){var o=n.length,i=n;"["===i.charAt(0)&&"]"===i.charAt(o-1)&&(i=+i.slice(1,o-1),"production"!==process.env.NODE_ENV&&isNaN(i)&&Fp("Invalide label formatter: @"+n+", only support @[0], @[1], @[2], ..."));var l=Wb(a,e,i);if(r&&Ms(r.interpolatedValue)){var s=a.getDimensionIndex(i);s>=0&&(l=r.interpolatedValue[s])}return null!=l?l+"":""}):void 0},e.prototype.getRawValue=function(e,t){return Wb(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function Zb(e){var t,n;return Ns(e)?e.type?n=e:process.env.NODE_ENV:t=e,{text:t,frag:n}}function Xb(e){return new jb(e)}var jb=function(){function e(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return e.prototype.perform=function(e){var t,n=this._upstream,o=e&&e.skip;if(this._dirty&&n){var i=this.context;i.data=i.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!o&&(t=this._plan(this.context));var r,a=c(this._modBy),l=this._modDataCount||0,s=c(e&&e.modBy),u=e&&e.modDataCount||0;function c(e){return!(e>=1)&&(e=1),e}a===s&&l===u||(t="reset"),(this._dirty||"reset"===t)&&(this._dirty=!1,r=this._doReset(o)),this._modBy=s,this._modDataCount=u;var d=e&&e.step;if(n?("production"!==process.env.NODE_ENV&&Hs(null!=n._outputDueEnd),this._dueEnd=n._outputDueEnd):("production"!==process.env.NODE_ENV&&Hs(!this._progress||this._count),this._dueEnd=this._count?this._count(this.context):1/0),this._progress){var h=this._dueIndex,p=Math.min(null!=d?this._dueIndex+d:1/0,this._dueEnd);if(!o&&(r||h<p)){var f=this._progress;if(Ms(f))for(var g=0;g<f.length;g++)this._doProgress(f[g],h,p,s,u);else this._doProgress(f,h,p,s,u)}this._dueIndex=p;var v=null!=this._settedOutputEnd?this._settedOutputEnd:p;"production"!==process.env.NODE_ENV&&Hs(v>=this._outputDueEnd),this._outputDueEnd=v}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()},e.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},e.prototype._doProgress=function(e,t,n,o,i){$b.reset(t,n,o,i),this._callingProgress=e,this._callingProgress({start:t,end:n,count:n-t,next:$b.next},this.context)},e.prototype._doReset=function(e){var t,n;this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null,!e&&this._reset&&((t=this._reset(this.context))&&t.progress&&(n=t.forceFirstProgress,t=t.progress),Ms(t)&&!t.length&&(t=null)),this._progress=t,this._modBy=this._modDataCount=null;var o=this._downstream;return o&&o.dirty(),n},e.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},e.prototype.pipe=function(e){"production"!==process.env.NODE_ENV&&Hs(e&&!e._disposed&&e!==this),(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},e.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},e.prototype.getUpstream=function(){return this._upstream},e.prototype.getDownstream=function(){return this._downstream},e.prototype.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e},e}(),$b=function(){var e,t,n,o,i,r={reset:function(s,u,c,d){t=s,e=u,n=c,o=d,i=Math.ceil(o/n),r.next=n>1&&o>0?l:a}};return r;function a(){return t<e?t++:null}function l(){var r=t%i*n+Math.ceil(t/i),a=t>=e?null:r<o?r:t;return t++,a}}();function qb(e,t){var n=t&&t.type;return"ordinal"===n?e:("time"!==n||Ds(e)||null==e||"-"===e||(e=+Tp(e)),null==e||""===e?NaN:Number(e))}var Kb=qs({number:function(e){return parseFloat(e)},time:function(e){return+Tp(e)},trim:function(e){return Is(e)?Ws(e):e}});function Jb(e){return Kb.get(e)}var Qb={lt:function(e,t){return e<t},lte:function(e,t){return e<=t},gt:function(e,t){return e>t},gte:function(e,t){return e>=t}},eS=function(){function e(e,t){if(!Ds(t)){var n="";"production"!==process.env.NODE_ENV&&(n='rvalue of "<", ">", "<=", ">=" can only be number in filter.'),Up(n)}this._opFn=Qb[e],this._rvalFloat=Ep(t)}return e.prototype.evaluate=function(e){return Ds(e)?this._opFn(e,this._rvalFloat):this._opFn(Ep(e),this._rvalFloat)},e}(),tS=function(){function e(e,t){var n="desc"===e;this._resultLT=n?1:-1,null==t&&(t=n?"min":"max"),this._incomparable="min"===t?-1/0:1/0}return e.prototype.evaluate=function(e,t){var n=Ds(e)?e:Ep(e),o=Ds(t)?t:Ep(t),i=isNaN(n),r=isNaN(o);if(i&&(n=this._incomparable),r&&(o=this._incomparable),i&&r){var a=Is(e),l=Is(t);a&&(n=l?e:0),l&&(o=a?t:0)}return n<o?this._resultLT:n>o?-this._resultLT:0},e}(),nS=function(){function e(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=Ep(t)}return e.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n===this._rvalTypeof||"number"!==n&&"number"!==this._rvalTypeof||(t=Ep(e)===this._rvalFloat)}return this._isEQ?t:!t},e}();function oS(e,t){return"eq"===e||"ne"===e?new nS("eq"===e,t):eu(Qb,e)?new eS(e,t):null}var iS=function(){function e(){}return e.prototype.getRawData=function(){throw new Error("not supported")},e.prototype.getRawDataItem=function(e){throw new Error("not supported")},e.prototype.cloneRawData=function(){},e.prototype.getDimensionInfo=function(e){},e.prototype.cloneAllDimensionInfo=function(){},e.prototype.count=function(){},e.prototype.retrieveValue=function(e,t){},e.prototype.retrieveValueFromItem=function(e,t){},e.prototype.convertValue=function(e,t){return qb(e,t)},e}();function rS(e){var t=e.sourceFormat;if(!dS(t)){var n="";"production"!==process.env.NODE_ENV&&(n="`getRawData` is not supported in source format "+t),Up(n)}return e.data}function aS(e){var t=e.sourceFormat,n=e.data;if(!dS(t)){var o="";"production"!==process.env.NODE_ENV&&(o="`cloneRawData` is not supported in source format "+t),Up(o)}if(t===hw){for(var i=[],r=0,a=n.length;r<a;r++)i.push(n[r].slice());return i}if(t===pw){for(i=[],r=0,a=n.length;r<a;r++)i.push(ps({},n[r]));return i}}function lS(e,t,n){if(null!=n)return Ds(n)||!isNaN(n)&&!eu(t,n)?e[n]:eu(t,n)?t[n]:void 0}function sS(e){return cs(e)}var uS=qs();function cS(e,t,n,o){var i="";t.length||("production"!==process.env.NODE_ENV&&(i="Must have at least one upstream dataset."),Up(i)),Ns(e)||("production"!==process.env.NODE_ENV&&(i="transform declaration must be an object rather than "+typeof e+"."),Up(i));var r=e.type,a=uS.get(r);a||("production"!==process.env.NODE_ENV&&(i='Can not find transform on type "'+r+'".'),Up(i));var l,s=xs(t,function(e){return function(e,t){var n=new iS,o=e.data,i=n.sourceFormat=e.sourceFormat,r=e.startIndex,a="";e.seriesLayoutBy!==mw&&("production"!==process.env.NODE_ENV&&(a='`seriesLayoutBy` of upstream dataset can only be "column" in data transform.'),Up(a));var l=[],s={},u=e.dimensionsDefine;if(u)ys(u,function(e,t){var n=e.name,o={index:t,name:n,displayName:e.displayName};if(l.push(o),null!=n){var i="";eu(s,n)&&("production"!==process.env.NODE_ENV&&(i='dimension name "'+n+'" duplicated.'),Up(i)),s[n]=o}});else for(var c=0;c<e.dimensionsDetectedCount;c++)l.push({index:c});var d=Ob(i,mw);t.__isBuiltIn&&(n.getRawDataItem=function(e){return d(o,r,l,e)},n.getRawData=Ss(rS,null,e)),n.cloneRawData=Ss(aS,null,e);var h=Rb(i,mw);n.count=Ss(h,null,o,r,l);var p=Gb(i);n.retrieveValue=function(e,t){var n=d(o,r,l,e);return f(n,t)};var f=n.retrieveValueFromItem=function(e,t){if(null!=e){var n=l[t];return n?p(e,t,n.name):void 0}};return n.getDimensionInfo=Ss(lS,null,l,s),n.cloneAllDimensionInfo=Ss(sS,null,l),n}(e,a)}),u=jp(a.transform({upstream:s[0],upstreamList:s,config:cs(e.config)}));if("production"!==process.env.NODE_ENV&&e.print){var c=xs(u,function(e){var t=null!=o?" === pipe index: "+o:"";return["=== dataset index: "+n.datasetIndex+t+" ===","- transform result data:",Wp(e.data),"- transform result dimensions:",Wp(e.dimensions)].join("\n")}).join("\n");Rp(0,c,l)}return xs(u,function(e,n){var o,i="";Ns(e)||("production"!==process.env.NODE_ENV&&(i="A transform should not return some empty results."),Up(i)),e.data||("production"!==process.env.NODE_ENV&&(i="Transform result data should be not be null or undefined"),Up(i)),dS(kb(e.data))||("production"!==process.env.NODE_ENV&&(i="Transform result data should be array rows or object rows."),Up(i));var r=t[0];if(r&&0===n&&!e.dimensions){var a=r.startIndex;a&&(e.data=r.data.slice(0,a).concat(e.data)),o={seriesLayoutBy:mw,sourceHeader:a,dimensions:r.metaRawOption.dimensions}}else o={seriesLayoutBy:mw,sourceHeader:0,dimensions:e.dimensions};return Tb(e.data,o,null)})}function dS(e){return e===hw||e===pw}var hS,pS="undefined",fS=typeof Uint32Array===pS?Array:Uint32Array,gS=typeof Uint16Array===pS?Array:Uint16Array,vS=typeof Int32Array===pS?Array:Int32Array,mS=typeof Float64Array===pS?Array:Float64Array,yS={float:mS,int:vS,ordinal:Array,number:Array,time:mS};function xS(e){return e>65535?fS:gS}function _S(){return[1/0,-1/0]}function wS(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function bS(e,t,n,o,i){var r=yS[n||"float"];if(i){var a=e[t],l=a&&a.length;if(l!==o){for(var s=new r(o),u=0;u<l;u++)s[u]=a[u];e[t]=s}}else e[t]=new r(o)}var SS=function(){function e(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=qs()}return e.prototype.initData=function(e,t,n){"production"!==process.env.NODE_ENV&&Hs(Ts(e.getItem)&&Ts(e.count),"Invalid data provider."),this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var o=e.getSource(),i=this.defaultDimValueGetter=hS[o.sourceFormat];this._dimValueGetter=n||i,this._rawExtent=[];var r=Eb(o);this._dimensions=xs(t,function(e){return"production"!==process.env.NODE_ENV&&r&&Hs(null!=e.property),{type:e.type,property:e.property}}),this._initDataFromProvider(0,e.count())},e.prototype.getProvider=function(){return this._provider},e.prototype.getSource=function(){return this._provider.getSource()},e.prototype.ensureCalculationDimension=function(e,t){var n=this._calcDimNameToIdx,o=this._dimensions,i=n.get(e);if(null!=i){if(o[i].type===t)return i}else i=o.length;return o[i]={type:t},n.set(e,i),this._chunks[i]=new yS[t||"float"](this._rawCount),this._rawExtent[i]=[1/0,-1/0],i},e.prototype.collectOrdinalMeta=function(e,t){var n=this._chunks[e],o=this._dimensions[e],i=this._rawExtent,r=o.ordinalOffset||0,a=n.length;0===r&&(i[e]=[1/0,-1/0]);for(var l=i[e],s=r;s<a;s++){var u=n[s]=t.parseAndCollect(n[s]);isNaN(u)||(l[0]=Math.min(u,l[0]),l[1]=Math.max(u,l[1]))}o.ordinalMeta=t,o.ordinalOffset=a,o.type="ordinal"},e.prototype.getOrdinalMeta=function(e){return this._dimensions[e].ordinalMeta},e.prototype.getDimensionProperty=function(e){var t=this._dimensions[e];return t&&t.property},e.prototype.appendData=function(e){"production"!==process.env.NODE_ENV&&Hs(!this._indices,"appendData can only be called on raw data.");var t=this._provider,n=this.count();t.appendData(e);var o=t.count();return t.persistent||(o+=n),n<o&&this._initDataFromProvider(n,o,!0),[n,o]},e.prototype.appendValues=function(e,t){for(var n=this._chunks,o=this._dimensions,i=o.length,r=this._rawExtent,a=this.count(),l=a+Math.max(e.length,t||0),s=0;s<i;s++){bS(n,s,(p=o[s]).type,l,!0)}for(var u=[],c=a;c<l;c++)for(var d=c-a,h=0;h<i;h++){var p=o[h],f=hS.arrayRows.call(this,e[d]||u,p.property,d,h);n[h][c]=f;var g=r[h];f<g[0]&&(g[0]=f),f>g[1]&&(g[1]=f)}return this._rawCount=this._count=l,{start:a,end:l}},e.prototype._initDataFromProvider=function(e,t,n){for(var o=this._provider,i=this._chunks,r=this._dimensions,a=r.length,l=this._rawExtent,s=xs(r,function(e){return e.property}),u=0;u<a;u++){var c=r[u];l[u]||(l[u]=_S()),bS(i,u,c.type,t,n)}if(o.fillStorage)o.fillStorage(e,t,i,l);else for(var d=[],h=e;h<t;h++){d=o.getItem(h,d);for(var p=0;p<a;p++){var f=i[p],g=this._dimValueGetter(d,s[p],h,p);f[h]=g;var v=l[p];g<v[0]&&(v[0]=g),g>v[1]&&(v[1]=g)}}!o.persistent&&o.clean&&o.clean(),this._rawCount=this._count=t,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(e,t){if(!(t>=0&&t<this._count))return NaN;var n=this._chunks[e];return n?n[this.getRawIndex(t)]:NaN},e.prototype.getValues=function(e,t){var n=[],o=[];if(null==t){t=e,e=[];for(var i=0;i<this._dimensions.length;i++)o.push(i)}else o=e;i=0;for(var r=o.length;i<r;i++)n.push(this.get(o[i],t));return n},e.prototype.getByRawIndex=function(e,t){if(!(t>=0&&t<this._rawCount))return NaN;var n=this._chunks[e];return n?n[t]:NaN},e.prototype.getSum=function(e){var t=0;if(this._chunks[e])for(var n=0,o=this.count();n<o;n++){var i=this.get(e,n);isNaN(i)||(t+=i)}return t},e.prototype.getMedian=function(e){var t=[];this.each([e],function(e){isNaN(e)||t.push(e)});var n=t.sort(function(e,t){return e-t}),o=this.count();return 0===o?0:o%2==1?n[(o-1)/2]:(n[o/2]+n[o/2-1])/2},e.prototype.indexOfRawIndex=function(e){if(e>=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(null!=n&&n<this._count&&n===e)return e;for(var o=0,i=this._count-1;o<=i;){var r=(o+i)/2|0;if(t[r]<e)o=r+1;else{if(!(t[r]>e))return r;i=r-1}}return-1},e.prototype.indicesOfNearest=function(e,t,n){var o=this._chunks[e],i=[];if(!o)return i;null==n&&(n=1/0);for(var r=1/0,a=-1,l=0,s=0,u=this.count();s<u;s++){var c=t-o[this.getRawIndex(s)],d=Math.abs(c);d<=n&&((d<r||d===r&&c>=0&&a<0)&&(r=d,a=c,l=0),c===a&&(i[l++]=s))}return i.length=l,i},e.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,o=this._count;if(n===Array){e=new n(o);for(var i=0;i<o;i++)e[i]=t[i]}else e=new n(t.buffer,0,o)}else{e=new(n=xS(this._rawCount))(this.count());for(i=0;i<e.length;i++)e[i]=i}return e},e.prototype.filter=function(e,t){if(!this._count)return this;for(var n=this.clone(),o=n.count(),i=new(xS(n._rawCount))(o),r=[],a=e.length,l=0,s=e[0],u=n._chunks,c=0;c<o;c++){var d=void 0,h=n.getRawIndex(c);if(0===a)d=t(c);else if(1===a){d=t(u[s][h],c)}else{for(var p=0;p<a;p++)r[p]=u[e[p]][h];r[p]=c,d=t.apply(null,r)}d&&(i[l++]=h)}return l<o&&(n._indices=i),n._count=l,n._extent=[],n._updateGetRawIdx(),n},e.prototype.selectRange=function(e){var t=this.clone(),n=t._count;if(!n)return this;var o=bs(e),i=o.length;if(!i)return this;var r=t.count(),a=new(xS(t._rawCount))(r),l=0,s=o[0],u=e[s][0],c=e[s][1],d=t._chunks,h=!1;if(!t._indices){var p=0;if(1===i){for(var f=d[o[0]],g=0;g<n;g++){((x=f[g])>=u&&x<=c||isNaN(x))&&(a[l++]=p),p++}h=!0}else if(2===i){f=d[o[0]];var v=d[o[1]],m=e[o[1]][0],y=e[o[1]][1];for(g=0;g<n;g++){var x=f[g],_=v[g];(x>=u&&x<=c||isNaN(x))&&(_>=m&&_<=y||isNaN(_))&&(a[l++]=p),p++}h=!0}}if(!h)if(1===i)for(g=0;g<r;g++){var w=t.getRawIndex(g);((x=d[o[0]][w])>=u&&x<=c||isNaN(x))&&(a[l++]=w)}else for(g=0;g<r;g++){for(var b=!0,S=(w=t.getRawIndex(g),0);S<i;S++){var C=o[S];((x=d[C][w])<e[C][0]||x>e[C][1])&&(b=!1)}b&&(a[l++]=t.getRawIndex(g))}return l<r&&(t._indices=a),t._count=l,t._extent=[],t._updateGetRawIdx(),t},e.prototype.map=function(e,t){var n=this.clone(e);return this._updateDims(n,e,t),n},e.prototype.modify=function(e,t){this._updateDims(this,e,t)},e.prototype._updateDims=function(e,t,n){for(var o=e._chunks,i=[],r=t.length,a=e.count(),l=[],s=e._rawExtent,u=0;u<t.length;u++)s[t[u]]=_S();for(var c=0;c<a;c++){for(var d=e.getRawIndex(c),h=0;h<r;h++)l[h]=o[t[h]][d];l[r]=c;var p=n&&n.apply(null,l);if(null!=p){"object"!=typeof p&&(i[0]=p,p=i);for(u=0;u<p.length;u++){var f=t[u],g=p[u],v=s[f],m=o[f];m&&(m[d]=g),g<v[0]&&(v[0]=g),g>v[1]&&(v[1]=g)}}}},e.prototype.lttbDownSample=function(e,t){var n,o,i,r=this.clone([e],!0),a=r._chunks[e],l=this.count(),s=0,u=Math.floor(1/t),c=this.getRawIndex(0),d=new(xS(this._rawCount))(Math.min(2*(Math.ceil(l/u)+2),l));d[s++]=c;for(var h=1;h<l-1;h+=u){for(var p=Math.min(h+u,l-1),f=Math.min(h+2*u,l),g=(f+p)/2,v=0,m=p;m<f;m++){var y=a[M=this.getRawIndex(m)];isNaN(y)||(v+=y)}v/=f-p;var x=h,_=Math.min(h+u,l),w=h-1,b=a[c];n=-1,i=x;var S=-1,C=0;for(m=x;m<_;m++){var M;y=a[M=this.getRawIndex(m)];isNaN(y)?(C++,S<0&&(S=M)):(o=Math.abs((w-g)*(y-b)-(w-m)*(v-b)))>n&&(n=o,i=M)}C>0&&C<_-x&&(d[s++]=Math.min(S,i),i=Math.max(S,i)),d[s++]=i,c=i}return d[s++]=this.getRawIndex(l-1),r._count=s,r._indices=d,r.getRawIndex=this._getRawIdx,r},e.prototype.minmaxDownSample=function(e,t){for(var n=this.clone([e],!0),o=n._chunks,i=Math.floor(1/t),r=o[e],a=this.count(),l=new(xS(this._rawCount))(2*Math.ceil(a/i)),s=0,u=0;u<a;u+=i){var c=u,d=r[this.getRawIndex(c)],h=u,p=r[this.getRawIndex(h)],f=i;u+i>a&&(f=a-u);for(var g=0;g<f;g++){var v=r[this.getRawIndex(u+g)];v<d&&(d=v,c=u+g),v>p&&(p=v,h=u+g)}var m=this.getRawIndex(c),y=this.getRawIndex(h);c<h?(l[s++]=m,l[s++]=y):(l[s++]=y,l[s++]=m)}return n._count=s,n._indices=l,n._updateGetRawIdx(),n},e.prototype.downSample=function(e,t,n,o){for(var i=this.clone([e],!0),r=i._chunks,a=[],l=Math.floor(1/t),s=r[e],u=this.count(),c=i._rawExtent[e]=[1/0,-1/0],d=new(xS(this._rawCount))(Math.ceil(u/l)),h=0,p=0;p<u;p+=l){l>u-p&&(l=u-p,a.length=l);for(var f=0;f<l;f++){var g=this.getRawIndex(p+f);a[f]=s[g]}var v=n(a),m=this.getRawIndex(Math.min(p+o(a,v)||0,u-1));s[m]=v,v<c[0]&&(c[0]=v),v>c[1]&&(c[1]=v),d[h++]=m}return i._count=h,i._indices=d,i._updateGetRawIdx(),i},e.prototype.each=function(e,t){if(this._count)for(var n=e.length,o=this._chunks,i=0,r=this.count();i<r;i++){var a=this.getRawIndex(i);switch(n){case 0:t(i);break;case 1:t(o[e[0]][a],i);break;case 2:t(o[e[0]][a],o[e[1]][a],i);break;default:for(var l=0,s=[];l<n;l++)s[l]=o[e[l]][a];s[l]=i,t.apply(null,s)}}},e.prototype.getDataExtent=function(e){var t=this._chunks[e],n=[1/0,-1/0];if(!t)return n;var o,i=this.count();if(!this._indices)return this._rawExtent[e].slice();if(o=this._extent[e])return o.slice();for(var r=(o=n)[0],a=o[1],l=0;l<i;l++){var s=t[this.getRawIndex(l)];s<r&&(r=s),s>a&&(a=s)}return o=[r,a],this._extent[e]=o,o},e.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],o=this._chunks,i=0;i<o.length;i++)n.push(o[i][t]);return n},e.prototype.clone=function(t,n){var o=new e,i=this._chunks,r=t&&_s(t,function(e,t){return e[t]=!0,e},{});if(r)for(var a=0;a<i.length;a++)o._chunks[a]=r[a]?wS(i[a]):i[a];else o._chunks=i;return this._copyCommonProps(o),n||(o._indices=this._cloneIndices()),o._updateGetRawIdx(),o},e.prototype._copyCommonProps=function(e){e._count=this._count,e._rawCount=this._rawCount,e._provider=this._provider,e._dimensions=this._dimensions,e._extent=cs(this._extent),e._rawExtent=cs(this._rawExtent)},e.prototype._cloneIndices=function(){if(this._indices){var e=this._indices.constructor,t=void 0;if(e===Array){var n=this._indices.length;t=new e(n);for(var o=0;o<n;o++)t[o]=this._indices[o]}else t=new e(this._indices);return t}return null},e.prototype._getRawIdxIdentity=function(e){return e},e.prototype._getRawIdx=function(e){return e<this._count&&e>=0?this._indices[e]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function e(e,t,n,o){return qb(e[o],this._dimensions[o])}hS={arrayRows:e,objectRows:function(e,t,n,o){return qb(e[t],this._dimensions[o])},keyedColumns:e,original:function(e,t,n,o){var i=e&&(null==e.value?e:e.value);return qb(i instanceof Array?i[o]:i,this._dimensions[o])},typedArray:function(e,t,n,o){return e[o]}}}(),e}(),CS=function(){function e(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return e.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},e.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var e,t,n=this._sourceHost,o=this._getUpstreamSourceManagers(),i=!!o.length;if(TS(n)){var r=n,a=void 0,l=void 0,s=void 0;if(i){var u=o[0];u.prepareSource(),a=(s=u.getSource()).data,l=s.sourceFormat,t=[u._getVersionSign()]}else l=As(a=r.get("data",!0))?gw:dw,t=[];var c=this._getSourceMetaRawOption()||{},d=s&&s.metaRawOption||{},h=Rs(c.seriesLayoutBy,d.seriesLayoutBy)||null,p=Rs(c.sourceHeader,d.sourceHeader),f=Rs(c.dimensions,d.dimensions);e=h!==d.seriesLayoutBy||!!p!=!!d.sourceHeader||f?[Tb(a,{seriesLayoutBy:h,sourceHeader:p,dimensions:f},l)]:[]}else{var g=n;if(i){var v=this._applyTransform(o);e=v.sourceList,t=v.upstreamSignList}else{e=[Tb(g.get("source",!0),this._getSourceMetaRawOption(),null)],t=[]}}"production"!==process.env.NODE_ENV&&Hs(e&&t),this._setLocalSource(e,t)},e.prototype._applyTransform=function(e){var t,n=this._sourceHost,o=n.get("transform",!0),i=n.get("fromTransformResult",!0);if("production"!==process.env.NODE_ENV&&Hs(null!=i||null!=o),null!=i){var r="";1!==e.length&&("production"!==process.env.NODE_ENV&&(r="When using `fromTransformResult`, there should be only one upstream dataset"),IS(r))}var a,l=[],s=[];return ys(e,function(e){e.prepareSource();var t=e.getSource(i||0),n="";null==i||t||("production"!==process.env.NODE_ENV&&(n="Can not retrieve result by `fromTransformResult`: "+i),IS(n)),l.push(t),s.push(e._getVersionSign())}),o?t=function(e,t,n){var o=jp(e),i=o.length,r="";i||("production"!==process.env.NODE_ENV&&(r="If `transform` declared, it should at least contain one transform."),Up(r));for(var a=0,l=i;a<l;a++)t=cS(o[a],t,n,1===i?null:a),a!==l-1&&(t.length=Math.max(t.length,1));return t}(o,l,{datasetIndex:n.componentIndex}):null!=i&&(t=[(a=l[0],new Cb({data:a.data,sourceFormat:a.sourceFormat,seriesLayoutBy:a.seriesLayoutBy,dimensionsDefine:cs(a.dimensionsDefine),startIndex:a.startIndex,dimensionsDetectedCount:a.dimensionsDetectedCount}))]),{sourceList:t,upstreamSignList:s}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t<e.length;t++){var n=e[t];if(n._isDirty()||this._upstreamSignList[t]!==n._getVersionSign())return!0}},e.prototype.getSource=function(e){e=e||0;var t=this._sourceList[e];if(!t){var n=this._getUpstreamSourceManagers();return n[0]&&n[0].getSource(e)}return t},e.prototype.getSharedDataStore=function(e){"production"!==process.env.NODE_ENV&&Hs(TS(this._sourceHost),"Can only call getDataStore on series source manager.");var t=e.makeStoreSchema();return this._innerGetDataStore(t.dimensions,e.source,t.hash)},e.prototype._innerGetDataStore=function(e,t,n){var o=this._storeList,i=o[0];i||(i=o[0]={});var r=i[n];if(!r){var a=this._getUpstreamSourceManagers()[0];TS(this._sourceHost)&&a?r=a._innerGetDataStore(e,t,n):(r=new SS).initData(new Ab(t,e.length),e),i[n]=r}return r},e.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(TS(e)){var t=Mw(e);return t?[t.getSourceManager()]:[]}return xs(function(e){return e.get("transform",!0)||e.get("fromTransformResult",!0)?gf(e.ecModel,"dataset",{index:e.get("fromDatasetIndex",!0),id:e.get("fromDatasetId",!0)},pf).models:[]}(e),function(e){return e.getSourceManager()})},e.prototype._getSourceMetaRawOption=function(){var e,t,n,o=this._sourceHost;if(TS(o))e=o.get("seriesLayoutBy",!0),t=o.get("sourceHeader",!0),n=o.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var i=o;e=i.get("seriesLayoutBy",!0),t=i.get("sourceHeader",!0),n=i.get("dimensions",!0)}return{seriesLayoutBy:e,sourceHeader:t,dimensions:n}},e}();function MS(e){e.option.transform&&Ys(e.option.transform)}function TS(e){return"series"===e.mainType}function IS(e){throw new Error(e)}function kS(e){var t=e.lineHeight;return null==t?"line-height:1":"line-height:"+Au(t+"")+"px"}function DS(e,t){var n=e.color||"#6e7079",o=e.fontSize||12,i=e.fontWeight||"400",r=e.color||"#464646",a=e.fontSize||14,l=e.fontWeight||"900";return"html"===t?{nameStyle:"font-size:"+Au(o+"")+"px;color:"+Au(n)+";font-weight:"+Au(i+""),valueStyle:"font-size:"+Au(a+"")+"px;color:"+Au(r)+";font-weight:"+Au(l+"")}:{nameStyle:{fontSize:o,fill:n,fontWeight:i},valueStyle:{fontSize:a,fill:r,fontWeight:l}}}var NS=[0,10,20,30],ES=["","\n","\n\n","\n\n\n"];function AS(e,t){return t.type=e,t}function LS(e){return"section"===e.type}function VS(e){return LS(e)?PS:BS}function OS(e){if(LS(e)){var t=0,n=e.blocks.length,o=n>1||n>0&&!e.noHeader;return ys(e.blocks,function(e){var n=OS(e);n>=t&&(t=n+ +(o&&(!n||LS(e)&&!e.noHeader)))}),t}return 0}function PS(e,t,n,o){var i,r=t.noHeader,a=(i=OS(t),{html:NS[i],richText:ES[i]}),l=[],s=t.blocks||[];Hs(!s||Ms(s)),s=s||[];var u=e.orderMode;if(t.sortBlocks&&u){s=s.slice();var c={valueAsc:"asc",valueDesc:"desc"};if(eu(c,u)){var d=new tS(c[u],null);s.sort(function(e,t){return d.evaluate(e.sortParam,t.sortParam)})}else"seriesDesc"===u&&s.reverse()}ys(s,function(n,i){var r=t.valueFormatter,s=VS(n)(r?ps(ps({},e),{valueFormatter:r}):e,n,i>0?a.html:0,o);null!=s&&l.push(s)});var h="richText"===e.renderMode?l.join(a.richText):zS(o,l.join(""),r?n:a.html);if(r)return h;var p=H_(t.header,"ordinal",e.useUTC),f=DS(o,e.renderMode).nameStyle,g=kS(o);return"richText"===e.renderMode?FS(e,p,f)+a.richText+h:zS(o,'<div style="'+f+";"+g+';">'+Au(p)+"</div>"+h,n)}function BS(e,t,n,o){var i=e.renderMode,r=t.noName,a=t.noValue,l=!t.markerType,s=t.name,u=e.useUTC,c=t.valueFormatter||e.valueFormatter||function(e){return xs(e=Ms(e)?e:[e],function(e,t){return H_(e,Ms(p)?p[t]:p,u)})};if(!r||!a){var d=l?"":e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",i),h=r?"":H_(s,"ordinal",u),p=t.valueType,f=a?[]:c(t.value,t.dataIndex),g=!l||!r,v=!l&&r,m=DS(o,i),y=m.nameStyle,x=m.valueStyle;return"richText"===i?(l?"":d)+(r?"":FS(e,h,y))+(a?"":function(e,t,n,o,i){var r=[i],a=o?10:20;return n&&r.push({padding:[0,0,0,a],align:"right"}),e.markupStyleCreator.wrapRichTextStyle(Ms(t)?t.join(" "):t,r)}(e,f,g,v,x)):zS(o,(l?"":d)+(r?"":function(e,t,n){return'<span style="'+n+";"+(t?"margin-left:2px":"")+'">'+Au(e)+"</span>"}(h,!l,y))+(a?"":function(e,t,n,o){var i=n?"10px":"20px",r=t?"float:right;margin-left:"+i:"";return e=Ms(e)?e:[e],'<span style="'+r+";"+o+'">'+xs(e,function(e){return Au(e)}).join("&nbsp;&nbsp;")+"</span>"}(f,g,v,x)),n)}}function RS(e,t,n,o,i,r){if(e)return VS(e)({useUTC:i,renderMode:n,orderMode:o,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,r)}function zS(e,t,n){return'<div style="'+("margin: "+n+"px 0 0")+";"+kS(e)+';">'+t+'<div style="clear:both"></div></div>'}function FS(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function GS(e,t){return Z_(e.getData().getItemVisual(t,"style")[e.visualDrawType])}function HS(e,t){var n=e.get("padding");return null!=n?n:"richText"===t?[8,10]:10}var WS=function(){function e(){this.richTextStyles={},this._nextStyleNameId=Lp()}return e.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,t,n){var o="richText"===n?this._generateStyleName():null,i=function(e,t){var n=Is(e)?{color:e,extraCssText:t}:e||{},o=n.color,i=n.type;t=n.extraCssText;var r=n.renderMode||"html";return o?"html"===r?"subItem"===i?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+Au(o)+";"+(t||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+Au(o)+";"+(t||"")+'"></span>':{renderMode:r,content:"{"+(n.markerId||"markerX")+"|} ",style:"subItem"===i?{width:4,height:4,borderRadius:2,backgroundColor:o}:{width:10,height:10,borderRadius:5,backgroundColor:o}}:""}({color:t,type:e,renderMode:n,markerId:o});return Is(i)?i:("production"!==process.env.NODE_ENV&&Hs(o),this.richTextStyles[o]=i.style,i.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};Ms(t)?ys(t,function(e){return ps(n,e)}):ps(n,t);var o=this._generateStyleName();return this.richTextStyles[o]=n,"{"+o+"|"+e+"}"},e}();function US(e){var t,n,o,i,r=e.series,a=e.dataIndex,l=e.multipleSeries,s=r.getData(),u=s.mapDimensionsAll("defaultedTooltip"),c=u.length,d=r.getRawValue(a),h=Ms(d),p=GS(r,a);if(c>1||h&&!c){var f=function(e,t,n,o,i){var r=t.getData(),a=_s(e,function(e,t,n){var o=r.getDimensionInfo(n);return e||o&&!1!==o.tooltip&&null!=o.displayName},!1),l=[],s=[],u=[];function c(e,t){var n=r.getDimensionInfo(t);n&&!1!==n.otherDims.tooltip&&(a?u.push(AS("nameValue",{markerType:"subItem",markerColor:i,name:n.displayName,value:e,valueType:n.type})):(l.push(e),s.push(n.type)))}return o.length?ys(o,function(e){c(Wb(r,n,e),e)}):ys(e,c),{inlineValues:l,inlineValueTypes:s,blocks:u}}(d,r,a,u,p);t=f.inlineValues,n=f.inlineValueTypes,o=f.blocks,i=f.inlineValues[0]}else if(c){var g=s.getDimensionInfo(u[0]);i=t=Wb(s,a,u[0]),n=g.type}else i=t=h?d[0]:d;var v=af(r),m=v&&r.name||"",y=s.getName(a),x=l?m:y;return AS("section",{header:m,noHeader:l||!v,sortParam:i,blocks:[AS("nameValue",{markerType:"item",markerColor:p,name:x,noName:!Ws(x),value:t,valueType:n,dataIndex:a})].concat(o||[])})}var YS=uf();function ZS(e,t){return e.getName(t)||e.getId(t)}var XS="__universalTransitionEnabled",jS=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}var n;return Wl(t,e),t.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=Xb({count:qS,reset:KS}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(YS(this).sourceManager=new CS(this)).prepareSource();var o=this.getInitialData(e,n);QS(o,this),this.dataTask.context.data=o,"production"!==process.env.NODE_ENV&&Hs(o,"getInitialData returned invalid data."),YS(this).dataBeforeProcessed=o,$S(this),this._initSelectedMapFromData(o)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=tw(this),o=n?ow(e):{},i=this.subType;aw.hasClass(i)&&(i+="Series"),ds(e,t.getTheme().get(this.subType)),ds(e,this.getDefaultOption()),$p(e,"label",["show"]),this.fillDataTextStyle(e.data),n&&nw(e,o,n)},t.prototype.mergeOption=function(e,t){e=ds(this.option,e,!0),this.fillDataTextStyle(e.data);var n=tw(this);n&&nw(this.option,e,n);var o=YS(this).sourceManager;o.dirty(),o.prepareSource();var i=this.getInitialData(e,t);QS(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,YS(this).dataBeforeProcessed=i,$S(this),this._initSelectedMapFromData(i)},t.prototype.fillDataTextStyle=function(e){if(e&&!As(e))for(var t=["show"],n=0;n<e.length;n++)e[n]&&e[n].label&&$p(e[n],"label",t)},t.prototype.getInitialData=function(e,t){},t.prototype.appendData=function(e){this.getRawData().appendData(e.data)},t.prototype.getData=function(e){var t=tC(this);if(t){var n=t.context.data;return null!=e&&n.getLinkedData?n.getLinkedData(e):n}return YS(this).data},t.prototype.getAllData=function(){var e=this.getData();return e&&e.getLinkedDataAll?e.getLinkedDataAll():[{data:e}]},t.prototype.setData=function(e){var t=tC(this);if(t){var n=t.context;n.outputData=e,t!==this.dataTask&&(n.data=e)}YS(this).data=e},t.prototype.getEncode=function(){var e=this.get("encode",!0);if(e)return qs(e)},t.prototype.getSourceManager=function(){return YS(this).sourceManager},t.prototype.getSource=function(){return this.getSourceManager().getSource()},t.prototype.getRawData=function(){return YS(this).dataBeforeProcessed},t.prototype.getColorBy=function(){return this.get("colorBy")||"series"},t.prototype.isColorBySeries=function(){return"series"===this.getColorBy()},t.prototype.getBaseAxis=function(){var e=this.coordinateSystem;return e&&e.getBaseAxis&&e.getBaseAxis()},t.prototype.formatTooltip=function(e,t,n){return US({series:this,dataIndex:e,multipleSeries:t})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(Yl.node&&(!e||!e.ssr))return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),!!t},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,t,n){var o=this.ecModel,i=Vw.prototype.getColorFromPalette.call(this,e,t,n);return i||(i=o.getColorFromPalette(e,t,n)),i},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(e,t){this._innerSelect(this.getData(t),e)},t.prototype.unselect=function(e,t){var n=this.option.selectedMap;if(n){var o=this.option.selectedMode,i=this.getData(t);if("series"===o||"all"===n)return this.option.selectedMap={},void(this._selectedDataIndicesMap={});for(var r=0;r<e.length;r++){var a=ZS(i,e[r]);n[a]=!1,this._selectedDataIndicesMap[a]=-1}}},t.prototype.toggleSelect=function(e,t){for(var n=[],o=0;o<e.length;o++)n[0]=e[o],this.isSelected(e[o],t)?this.unselect(n,t):this.select(n,t)},t.prototype.getSelectedDataIndices=function(){if("all"===this.option.selectedMap)return[].slice.call(this.getData().getIndices());for(var e=this._selectedDataIndicesMap,t=bs(e),n=[],o=0;o<t.length;o++){var i=e[t[o]];i>=0&&n.push(i)}return n},t.prototype.isSelected=function(e,t){var n=this.option.selectedMap;if(!n)return!1;var o=this.getData(t);return("all"===n||n[ZS(o,e)])&&!o.getItemModel(e).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[XS])return!0;var e=this.option.universalTransition;return!!e&&(!0===e||e&&e.enabled)},t.prototype._innerSelect=function(e,t){var n,o,i=this.option,r=i.selectedMode,a=t.length;if(r&&a)if("series"===r)i.selectedMap="all";else if("multiple"===r){Ns(i.selectedMap)||(i.selectedMap={});for(var l=i.selectedMap,s=0;s<a;s++){var u=t[s];l[d=ZS(e,u)]=!0,this._selectedDataIndicesMap[d]=e.getRawIndex(u)}}else if("single"===r||!0===r){var c=t[a-1],d=ZS(e,c);i.selectedMap=((n={})[d]=!0,n),this._selectedDataIndicesMap=((o={})[d]=e.getRawIndex(c),o)}},t.prototype._initSelectedMapFromData=function(e){if(!this.option.selectedMap){var t=[];e.hasItemOption&&e.each(function(n){var o=e.getRawDataItem(n);o&&o.selected&&t.push(n)}),t.length>0&&this._innerSelect(e,t)}},t.registerClass=function(e){return aw.registerClass(e)},t.protoInitialize=((n=t.prototype).type="series.__base__",n.seriesIndex=0,n.ignoreStyleOnData=!1,n.hasSymbolVisual=!1,n.defaultSymbol="circle",n.visualStyleAccessPath="itemStyle",void(n.visualDrawType="fill")),t}(aw);function $S(e){var t=e.name;af(e)||(e.name=function(e){var t=e.getRawData(),n=t.mapDimensionsAll("seriesName"),o=[];return ys(n,function(e){var n=t.getDimensionInfo(e);n.displayName&&o.push(n.displayName)}),o.join(" ")}(e)||t)}function qS(e){return e.model.getRawData().count()}function KS(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),JS}function JS(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function QS(e,t){ys(Ks(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(n){e.wrapMethod(n,Cs(eC,t))})}function eC(e,t){var n=tC(e);return n&&n.setOutputEnd((t||this).count()),t}function tC(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var o=n.currentTask;if(o){var i=o.agentStubMap;i&&(o=i.get(e.uid))}return o}}vs(jS,Yb),vs(jS,Vw),Sf(jS,aw);var nC=function(){function e(){this.group=new lp,this.uid=Qx("viewComponent")}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,o){},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,o){},e.prototype.updateLayout=function(e,t,n,o){},e.prototype.updateVisual=function(e,t,n,o){},e.prototype.toggleBlurSeries=function(e,t,n){},e.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},e}();function oC(){var e=uf();return function(t){var n=e(t),o=t.pipelineContext,i=!!n.large,r=!!n.progressiveRender,a=n.large=!(!o||!o.large),l=n.progressiveRender=!(!o||!o.progressiveRender);return!(i===a&&r===l)&&"reset"}}bf(nC),If(nC);var iC=uf(),rC=oC(),aC=function(){function e(){this.group=new lp,this.uid=Qx("viewChart"),this.renderTask=Xb({plan:uC,reset:cC}),this.renderTask.context={view:this}}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,o){if("production"!==process.env.NODE_ENV)throw new Error("render method must been implemented")},e.prototype.highlight=function(e,t,n,o){var i=e.getData(o&&o.dataType);i?sC(i,o,"emphasis"):"production"!==process.env.NODE_ENV&&Fp("Unknown dataType "+o.dataType)},e.prototype.downplay=function(e,t,n,o){var i=e.getData(o&&o.dataType);i?sC(i,o,"normal"):"production"!==process.env.NODE_ENV&&Fp("Unknown dataType "+o.dataType)},e.prototype.remove=function(e,t){this.group.removeAll()},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,o){this.render(e,t,n,o)},e.prototype.updateLayout=function(e,t,n,o){this.render(e,t,n,o)},e.prototype.updateVisual=function(e,t,n,o){this.render(e,t,n,o)},e.prototype.eachRendered=function(e){bx(this.group,e)},e.markUpdateMethod=function(e,t){iC(e).updateMethod=t},e.protoInitialize=void(e.prototype.type="chart"),e}();function lC(e,t,n){e&&Mm(e)&&("emphasis"===t?rm:am)(e,n)}function sC(e,t,n){var o=sf(e,t),i=t&&null!=t.highlightKey?function(e){var t=Lv[e];return null==t&&Av<=32&&(t=Lv[e]=Av++),t}(t.highlightKey):null;null!=o?ys(jp(o),function(t){lC(e.getItemGraphicEl(t),n,i)}):e.eachItemGraphicEl(function(e){lC(e,n,i)})}function uC(e){return rC(e.model)}function cC(e){var t=e.model,n=e.ecModel,o=e.api,i=e.payload,r=t.pipelineContext.progressiveRender,a=e.view,l=i&&iC(i).updateMethod,s=r?"incrementalPrepareRender":l&&a[l]?l:"render";return"render"!==s&&a[s](t,n,o,i),dC[s]}bf(aC,["dispose"]),If(aC);var dC={incrementalPrepareRender:{progress:function(e,t){t.view.incrementalRender(e,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(e,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},hC="\0__throttleOriginMethod",pC="\0__throttleRate",fC="\0__throttleType";function gC(e,t,n){var o,i,r,a,l,s=0,u=0,c=null;function d(){u=(new Date).getTime(),c=null,e.apply(r,a||[])}t=t||0;var h=function(){for(var e=[],h=0;h<arguments.length;h++)e[h]=arguments[h];o=(new Date).getTime(),r=this,a=e;var p=l||t,f=l||n;l=null,i=o-(f?s:u)-p,clearTimeout(c),f?c=setTimeout(d,p):i>=0?d():c=setTimeout(d,-i),s=o};return h.clear=function(){c&&(clearTimeout(c),c=null)},h.debounceNextCall=function(e){l=e},h}function vC(e,t,n,o){var i=e[t];if(i){var r=i[hC]||i,a=i[fC];if(i[pC]!==n||a!==o){if(null==n||!o)return e[t]=r;(i=e[t]=gC(r,n,"debounce"===o))[hC]=r,i[fC]=o,i[pC]=n}return i}}function mC(e,t){var n=e[t];n&&n[hC]&&(n.clear&&n.clear(),e[t]=n[hC])}var yC=uf(),xC={itemStyle:kf(jx,!0),lineStyle:kf(Yx,!0)},_C={lineStyle:"stroke",itemStyle:"fill"};function wC(e,t){var n=e.visualStyleMapper||xC[t];return n||xC.itemStyle}function bC(e,t){var n=e.visualDrawType||_C[t];return n||"fill"}var SC={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),o=e.visualStyleAccessPath||"itemStyle",i=e.getModel(o),r=wC(e,o)(i),a=i.getShallow("decal");a&&(n.setVisual("decal",a),a.dirty=!0);var l=bC(e,o),s=r[l],u=Ts(s)?s:null,c="auto"===r.fill||"auto"===r.stroke;if(!r[l]||u||c){var d=e.getColorFromPalette(e.name,null,t.getSeriesCount());r[l]||(r[l]=d,n.setVisual("colorFromPalette",!0)),r.fill="auto"===r.fill||Ts(r.fill)?d:r.fill,r.stroke="auto"===r.stroke||Ts(r.stroke)?d:r.stroke}if(n.setVisual("style",r),n.setVisual("drawType",l),!t.isSeriesFiltered(e)&&u)return n.setVisual("colorFromPalette",!1),{dataEach:function(t,n){var o=e.getDataParams(n),i=ps({},r);i[l]=u(o),t.setItemVisual(n,"style",i)}}}},CC=new Kx,MC={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData&&!t.isSeriesFiltered(e)){var n=e.getData(),o=e.visualStyleAccessPath||"itemStyle",i=wC(e,o),r=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[o]){CC.option=n[o];var a=i(CC);ps(e.ensureUniqueItemVisual(t,"style"),a),CC.option.decal&&(e.setItemVisual(t,"decal",CC.option.decal),CC.option.decal.dirty=!0),r in a&&e.setItemVisual(t,"colorFromPalette",!1)}}:null}}}},TC={performRawSeries:!0,overallReset:function(e){var t=qs();e.eachSeries(function(e){var n=e.getColorBy();if(!e.isColorBySeries()){var o=e.type+"-"+n,i=t.get(o);i||(i={},t.set(o,i)),yC(e).scope=i}}),e.eachSeries(function(t){if(!t.isColorBySeries()&&!e.isSeriesFiltered(t)){var n=t.getRawData(),o={},i=t.getData(),r=yC(t).scope,a=t.visualStyleAccessPath||"itemStyle",l=bC(t,a);i.each(function(e){var t=i.getRawIndex(e);o[t]=e}),n.each(function(e){var a=o[e];if(i.getItemVisual(a,"colorFromPalette")){var s=i.ensureUniqueItemVisual(a,"style"),u=n.getName(e)||e+"",c=n.count();s[l]=t.getColorFromPalette(u,r,c)}})}})}},IC=Math.PI;var kC=function(){function e(e,t,n,o){this._stageTaskMap=qs(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),o=this._visualHandlers=o.slice(),this._allHandlers=n.concat(o)}return e.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(e){var t=e.overallTask;t&&t.dirty()})},e.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),o=n.context,i=!t&&n.progressiveEnabled&&(!o||o.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,r=o&&o.modDataCount;return{step:i,modBy:null!=r?Math.ceil(r/i):null,modDataCount:r}}},e.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},e.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid),o=e.getData().count(),i=n.progressiveEnabled&&t.incrementalPrepareRender&&o>=n.threshold,r=e.get("large")&&o>=e.get("largeThreshold"),a="mod"===e.get("progressiveChunkMode")?o:null;e.pipelineContext=n.context={progressiveRender:i,modDataCount:a,large:r}},e.prototype.restorePipelines=function(e){var t=this,n=t._pipelineMap=qs();e.eachSeries(function(e){var o=e.getProgressive(),i=e.uid;n.set(i,{id:i,head:null,tail:null,threshold:e.getProgressiveThreshold(),progressiveEnabled:o&&!(e.preventIncremental&&e.preventIncremental()),blockIndex:-1,step:Math.round(o||700),count:0}),t._pipe(e,e.dataTask)})},e.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;ys(this._allHandlers,function(o){var i=e.get(o.uid)||e.set(o.uid,{}),r="";"production"!==process.env.NODE_ENV&&(r='"reset" and "overallReset" must not be both specified.'),Hs(!(o.reset&&o.overallReset),r),o.reset&&this._createSeriesStageTask(o,i,t,n),o.overallReset&&this._createOverallStageTask(o,i,t,n)},this)},e.prototype.prepareView=function(e,t,n,o){var i=e.renderTask,r=i.context;r.model=t,r.ecModel=n,r.api=o,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},e.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},e.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},e.prototype._performStageTasks=function(e,t,n,o){o=o||{};var i=!1,r=this;function a(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}ys(e,function(e,l){if(!o.visualType||o.visualType===e.visualType){var s=r._stageTaskMap.get(e.uid),u=s.seriesTaskMap,c=s.overallTask;if(c){var d,h=c.agentStubMap;h.each(function(e){a(o,e)&&(e.dirty(),d=!0)}),d&&c.dirty(),r.updatePayload(c,n);var p=r.getPerformArgs(c,o.block);h.each(function(e){e.perform(p)}),c.perform(p)&&(i=!0)}else u&&u.each(function(l,s){a(o,l)&&l.dirty();var u=r.getPerformArgs(l,o.block);u.skip=!e.performRawSeries&&t.isSeriesFiltered(l.context.model),r.updatePayload(l,n),l.perform(u)&&(i=!0)})}}),this.unfinished=i||this.unfinished},e.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(e){t=e.dataTask.perform()||t}),this.unfinished=t||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},e.prototype.updatePayload=function(e,t){"remain"!==t&&(e.context.payload=t)},e.prototype._createSeriesStageTask=function(e,t,n,o){var i=this,r=t.seriesTaskMap,a=t.seriesTaskMap=qs(),l=e.seriesType,s=e.getTargetSeries;function u(t){var l=t.uid,s=a.set(l,r&&r.get(l)||Xb({plan:LC,reset:VC,count:BC}));s.context={model:t,ecModel:n,api:o,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(t,s)}e.createOnAllSeries?n.eachRawSeries(u):l?n.eachRawSeriesByType(l,u):s&&s(n,o).each(u)},e.prototype._createOverallStageTask=function(e,t,n,o){var i=this,r=t.overallTask=t.overallTask||Xb({reset:DC});r.context={ecModel:n,api:o,overallReset:e.overallReset,scheduler:i};var a=r.agentStubMap,l=r.agentStubMap=qs(),s=e.seriesType,u=e.getTargetSeries,c=!0,d=!1,h="";function p(e){var t=e.uid,n=l.set(t,a&&a.get(t)||(d=!0,Xb({reset:NC,onDirty:AC})));n.context={model:e,overallProgress:c},n.agent=r,n.__block=c,i._pipe(e,n)}"production"!==process.env.NODE_ENV&&(h='"createOnAllSeries" is not supported for "overallReset", because it will block all streams.'),Hs(!e.createOnAllSeries,h),s?n.eachRawSeriesByType(s,p):u?u(n,o).each(p):(c=!1,ys(n.getSeries(),p)),d&&r.dirty()},e.prototype._pipe=function(e,t){var n=e.uid,o=this._pipelineMap.get(n);!o.head&&(o.head=t),o.tail&&o.tail.pipe(t),o.tail=t,t.__idxInPipeline=o.count++,t.__pipeline=o},e.wrapStageHandler=function(e,t){return Ts(e)&&(e={overallReset:e,seriesType:RC(e)}),e.uid=Qx("stageHandler"),t&&(e.visualType=t),e},e}();function DC(e){e.overallReset(e.ecModel,e.api,e.payload)}function NC(e){return e.overallProgress&&EC}function EC(){this.agent.dirty(),this.getDownstream().dirty()}function AC(){this.agent&&this.agent.dirty()}function LC(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function VC(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=jp(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?xs(t,function(e,t){return PC(t)}):OC}var OC=PC(0);function PC(e){return function(t,n){var o=n.data,i=n.resetDefines[e];if(i&&i.dataEach)for(var r=t.start;r<t.end;r++)i.dataEach(o,r);else i&&i.progress&&i.progress(t,o)}}function BC(e){return e.data.count()}function RC(e){zC=null;try{e(FC,GC)}catch(t){}return zC}var zC,FC={},GC={};function HC(e,t){for(var n in t.prototype)e[n]=tu}HC(FC,Gw),HC(GC,Zw),FC.eachSeriesByType=FC.eachRawSeriesByType=function(e){zC=e},FC.eachComponent=function(e){"series"===e.mainType&&e.subType&&(zC=e.subType)};var WC=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"];const UC={color:WC,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],WC]};var YC="#B9B8CE",ZC="#100C2A",XC=function(){return{axisLine:{lineStyle:{color:YC}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},jC=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],$C={darkMode:!0,color:jC,backgroundColor:ZC,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:YC},pageTextStyle:{color:YC}},textStyle:{color:YC},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:YC}},dataZoom:{borderColor:"#71708A",textStyle:{color:YC},brushStyle:{color:"rgba(135,163,206,0.3)"},handleStyle:{color:"#353450",borderColor:"#C5CBE3"},moveHandleStyle:{color:"#B0B6C3",opacity:.3},fillerColor:"rgba(135,163,206,0.2)",emphasis:{handleStyle:{borderColor:"#91B7F2",color:"#4D587D"},moveHandleStyle:{color:"#636D9A",opacity:.7}},dataBackground:{lineStyle:{color:"#71708A",width:1},areaStyle:{color:"#71708A"}},selectedDataBackground:{lineStyle:{color:"#87A3CE"},areaStyle:{color:"#87A3CE"}}},visualMap:{textStyle:{color:YC}},timeline:{lineStyle:{color:YC},label:{color:YC},controlStyle:{color:YC,borderColor:YC}},calendar:{itemStyle:{color:ZC},dayLabel:{color:YC},monthLabel:{color:YC},yearLabel:{color:YC}},timeAxis:XC(),logAxis:XC(),valueAxis:XC(),categoryAxis:XC(),line:{symbol:"circle"},graph:{color:jC},gauge:{title:{color:YC},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:YC},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};$C.categoryAxis.splitLine.show=!1;var qC=function(){function e(){}return e.prototype.normalizeQuery=function(e){var t={},n={},o={};if(Is(e)){var i=wf(e);t.mainType=i.main||null,t.subType=i.sub||null}else{var r=["Index","Name","Id"],a={name:1,dataIndex:1,dataType:1};ys(e,function(e,i){for(var l=!1,s=0;s<r.length;s++){var u=r[s],c=i.lastIndexOf(u);if(c>0&&c===i.length-u.length){var d=i.slice(0,c);"data"!==d&&(t.mainType=d,t[u.toLowerCase()]=e,l=!0)}}a.hasOwnProperty(i)&&(n[i]=e,l=!0),l||(o[i]=e)})}return{cptQuery:t,dataQuery:n,otherQuery:o}},e.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var o=n.targetEl,i=n.packedEvent,r=n.model,a=n.view;if(!r||!a)return!0;var l=t.cptQuery,s=t.dataQuery;return u(l,r,"mainType")&&u(l,r,"subType")&&u(l,r,"index","componentIndex")&&u(l,r,"name")&&u(l,r,"id")&&u(s,i,"name")&&u(s,i,"dataIndex")&&u(s,i,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(e,t.otherQuery,o,i));function u(e,t,n,o){return null==e[n]||t[o||n]===e[n]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),KC=["symbol","symbolSize","symbolRotate","symbolOffset"],JC=KC.concat(["symbolKeepAspect"]),QC={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData();if(e.legendIcon&&n.setVisual("legendIcon",e.legendIcon),e.hasSymbolVisual){for(var o={},i={},r=!1,a=0;a<KC.length;a++){var l=KC[a],s=e.get(l);Ts(s)?(r=!0,i[l]=s):o[l]=s}if(o.symbol=o.symbol||e.defaultSymbol,n.setVisual(ps({legendIcon:e.legendIcon||o.symbol,symbolKeepAspect:e.get("symbolKeepAspect")},o)),!t.isSeriesFiltered(e)){var u=bs(i);return{dataEach:r?function(t,n){for(var o=e.getRawValue(n),r=e.getDataParams(n),a=0;a<u.length;a++){var l=u[a];t.setItemVisual(n,l,i[l](o,r))}}:null}}}}},eM={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(e.hasSymbolVisual&&!t.isSeriesFiltered(e))return{dataEach:e.getData().hasItemOption?function(e,t){for(var n=e.getItemModel(t),o=0;o<JC.length;o++){var i=JC[o],r=n.getShallow(i,!0);null!=r&&e.setItemVisual(t,i,r)}}:null}}};function tM(e,t,n){switch(n){case"color":return e.getItemVisual(t,"style")[e.getVisual("drawType")];case"opacity":return e.getItemVisual(t,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return e.getItemVisual(t,n);default:process.env.NODE_ENV}}function nM(e,t){switch(t){case"color":return e.getVisual("style")[e.getVisual("drawType")];case"opacity":return e.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return e.getVisual(t);default:process.env.NODE_ENV}}function oM(e,t,n,o){switch(n){case"color":e.ensureUniqueItemVisual(t,"style")[e.getVisual("drawType")]=o,e.setItemVisual(t,"colorFromPalette",!1);break;case"opacity":e.ensureUniqueItemVisual(t,"style").opacity=o;break;case"symbol":case"symbolSize":case"liftZ":e.setItemVisual(t,n,o);break;default:process.env.NODE_ENV}}function iM(e,t){function n(t,n){var o=[];return t.eachComponent({mainType:"series",subType:e,query:n},function(e){o.push(e.seriesIndex)}),o}ys([[e+"ToggleSelect","toggleSelect"],[e+"Select","select"],[e+"UnSelect","unselect"]],function(e){t(e[0],function(t,o,i){t=ps({},t),"production"!==process.env.NODE_ENV&&Hp(t.type,e[1]),i.dispatchAction(ps(t,{type:e[1],seriesIndex:n(o,t)}))})})}function rM(e,t,n,o,i){var r=e+t;n.isSilent(r)||("production"!==process.env.NODE_ENV&&Gp("event "+r+" is deprecated."),o.eachComponent({mainType:"series",subType:"pie"},function(e){for(var t=e.seriesIndex,o=e.option.selectedMap,a=i.selected,l=0;l<a.length;l++)if(a[l].seriesIndex===t){var s=e.getData(),u=sf(s,i.fromActionPayload);n.trigger(r,{type:r,seriesId:e.id,name:Ms(u)?s.getName(u[0]):s.getName(u),selected:Is(o)?o:ps({},o)})}}))}function aM(e,t,n){for(var o;e&&(!t(e)||(o=e,!n));)e=e.__hostTarget||e.parent;return o}var lM=Math.round(9*Math.random()),sM="function"==typeof Object.defineProperty,uM=function(){function e(){this._id="__ec_inner_"+lM++}return e.prototype.get=function(e){return this._guard(e)[this._id]},e.prototype.set=function(e,t){var n=this._guard(e);return sM?Object.defineProperty(n,this._id,{value:t,enumerable:!1,configurable:!0}):n[this._id]=t,this},e.prototype.delete=function(e){return!!this.has(e)&&(delete this._guard(e)[this._id],!0)},e.prototype.has=function(e){return!!this._guard(e)[this._id]},e.prototype._guard=function(e){if(e!==Object(e))throw TypeError("Value of WeakMap is not a non-null object.");return e},e}(),cM=nv.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,o=t.cy,i=t.width/2,r=t.height/2;e.moveTo(n,o-r),e.lineTo(n+i,o+r),e.lineTo(n-i,o+r),e.closePath()}}),dM=nv.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,o=t.cy,i=t.width/2,r=t.height/2;e.moveTo(n,o-r),e.lineTo(n+i,o),e.lineTo(n,o+r),e.lineTo(n-i,o),e.closePath()}}),hM=nv.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.x,o=t.y,i=t.width/5*3,r=Math.max(i,t.height),a=i/2,l=a*a/(r-a),s=o-r+a+l,u=Math.asin(l/a),c=Math.cos(u)*a,d=Math.sin(u),h=Math.cos(u),p=.6*a,f=.7*a;e.moveTo(n-c,s+l),e.arc(n,s,a,Math.PI-u,2*Math.PI+u),e.bezierCurveTo(n+c-d*p,s+l+h*p,n,o-f,n,o),e.bezierCurveTo(n,o-f,n-c+d*p,s+l+h*p,n-c,s+l),e.closePath()}}),pM=nv.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.height,o=t.width,i=t.x,r=t.y,a=o/3*2;e.moveTo(i,r),e.lineTo(i+a,r+n),e.lineTo(i,r+n/4*3),e.lineTo(i-a,r+n),e.lineTo(i,r),e.closePath()}}),fM={line:function(e,t,n,o,i){i.x1=e,i.y1=t+o/2,i.x2=e+n,i.y2=t+o/2},rect:function(e,t,n,o,i){i.x=e,i.y=t,i.width=n,i.height=o},roundRect:function(e,t,n,o,i){i.x=e,i.y=t,i.width=n,i.height=o,i.r=Math.min(n,o)/4},square:function(e,t,n,o,i){var r=Math.min(n,o);i.x=e,i.y=t,i.width=r,i.height=r},circle:function(e,t,n,o,i){i.cx=e+n/2,i.cy=t+o/2,i.r=Math.min(n,o)/2},diamond:function(e,t,n,o,i){i.cx=e+n/2,i.cy=t+o/2,i.width=n,i.height=o},pin:function(e,t,n,o,i){i.x=e+n/2,i.y=t+o/2,i.width=n,i.height=o},arrow:function(e,t,n,o,i){i.x=e+n/2,i.y=t+o/2,i.width=n,i.height=o},triangle:function(e,t,n,o,i){i.cx=e+n/2,i.cy=t+o/2,i.width=n,i.height=o}},gM={};ys({line:by,rect:fv,roundRect:fv,square:fv,circle:$m,diamond:dM,pin:hM,arrow:pM,triangle:cM},function(e,t){gM[t]=new e});var vM=nv.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var o=qh(e,t,n),i=this.shape;return i&&"pin"===i.symbolType&&"inside"===t.position&&(o.y=n.y+.4*n.height),o},buildPath:function(e,t,n){var o=t.symbolType;if("none"!==o){var i=gM[o];i||(i=gM[o="rect"]),fM[o](t.x,t.y,t.width,t.height,i.shape),i.buildPath(e,i.shape,n)}}});function mM(e,t){if("image"!==this.type){var n=this.style;this.__isEmptyBrush?(n.stroke=e,n.fill=t||"#fff",n.lineWidth=2):"line"===this.shape.symbolType?n.stroke=e:n.fill=e,this.markRedraw()}}function yM(e,t,n,o,i,r,a){var l,s=0===e.indexOf("empty");return s&&(e=e.substr(5,1).toLowerCase()+e.substr(6)),(l=0===e.indexOf("image://")?ox(e.slice(8),new cc(t,n,o,i),a?"center":"cover"):0===e.indexOf("path://")?nx(e.slice(7),{},new cc(t,n,o,i),a?"center":"cover"):new vM({shape:{symbolType:e,x:t,y:n,width:o,height:i}})).__isEmptyBrush=s,l.setColor=mM,r&&l.setColor(r),l}function xM(e){return Ms(e)||(e=[+e,+e]),[e[0]||0,e[1]||0]}function _M(e,t){if(null!=e)return Ms(e)||(e=[e,e]),[gp(e[0],t[0])||0,gp(Rs(e[1],e[0]),t[1])||0]}function wM(e){return isFinite(e)}function bM(e,t,n){for(var o="radial"===t.type?function(e,t,n){var o=n.width,i=n.height,r=Math.min(o,i),a=null==t.x?.5:t.x,l=null==t.y?.5:t.y,s=null==t.r?.5:t.r;return t.global||(a=a*o+n.x,l=l*i+n.y,s*=r),a=wM(a)?a:.5,l=wM(l)?l:.5,s=s>=0&&wM(s)?s:.5,e.createRadialGradient(a,l,0,a,l,s)}(e,t,n):function(e,t,n){var o=null==t.x?0:t.x,i=null==t.x2?1:t.x2,r=null==t.y?0:t.y,a=null==t.y2?0:t.y2;return t.global||(o=o*n.width+n.x,i=i*n.width+n.x,r=r*n.height+n.y,a=a*n.height+n.y),o=wM(o)?o:0,i=wM(i)?i:1,r=wM(r)?r:0,a=wM(a)?a:0,e.createLinearGradient(o,r,i,a)}(e,t,n),i=t.colorStops,r=0;r<i.length;r++)o.addColorStop(i[r].offset,i[r].color);return o}function SM(e){return parseInt(e,10)}function CM(e,t,n){var o=["width","height"][t],i=["clientWidth","clientHeight"][t],r=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=n[o]&&"auto"!==n[o])return parseFloat(n[o]);var l=document.defaultView.getComputedStyle(e);return(e[i]||SM(l[o])||SM(e.style[o]))-(SM(l[r])||0)-(SM(l[a])||0)|0}function MM(e){var t,n,o=e.style,i=o.lineDash&&o.lineWidth>0&&(t=o.lineDash,n=o.lineWidth,t&&"solid"!==t&&n>0?"dashed"===t?[4*n,2*n]:"dotted"===t?[n]:Ds(t)?[t]:Ms(t)?t:null:null),r=o.lineDashOffset;if(i){var a=o.strokeNoScale&&e.getLineScale?e.getLineScale():1;a&&1!==a&&(i=xs(i,function(e){return e/a}),r/=a)}return[i,r]}var TM=new Og(!0);function IM(e){var t=e.stroke;return!(null==t||"none"===t||!(e.lineWidth>0))}function kM(e){return"string"==typeof e&&"none"!==e}function DM(e){var t=e.fill;return null!=t&&"none"!==t}function NM(e,t){if(null!=t.fillOpacity&&1!==t.fillOpacity){var n=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=n}else e.fill()}function EM(e,t){if(null!=t.strokeOpacity&&1!==t.strokeOpacity){var n=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=n}else e.stroke()}function AM(e,t,n){var o=Lf(t.image,t.__image,n);if(Of(o)){var i=e.createPattern(o,t.repeat||"repeat");if("function"==typeof DOMMatrix&&i&&i.setTransform){var r=new DOMMatrix;r.translateSelf(t.x||0,t.y||0),r.rotateSelf(0,0,(t.rotation||0)*nu),r.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(r)}return i}}var LM=["shadowBlur","shadowOffsetX","shadowOffsetY"],VM=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function OM(e,t,n,o,i){var r=!1;if(!o&&t===(n=n||{}))return!1;if(o||t.opacity!==n.opacity){RM(e,i),r=!0;var a=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(a)?$f.opacity:a}(o||t.blend!==n.blend)&&(r||(RM(e,i),r=!0),e.globalCompositeOperation=t.blend||$f.blend);for(var l=0;l<LM.length;l++){var s=LM[l];(o||t[s]!==n[s])&&(r||(RM(e,i),r=!0),e[s]=e.dpr*(t[s]||0))}return(o||t.shadowColor!==n.shadowColor)&&(r||(RM(e,i),r=!0),e.shadowColor=t.shadowColor||$f.shadowColor),r}function PM(e,t,n,o,i){var r=zM(t,i.inHover),a=o?null:n&&zM(n,i.inHover)||{};if(r===a)return!1;var l=OM(e,r,a,o,i);if((o||r.fill!==a.fill)&&(l||(RM(e,i),l=!0),kM(r.fill)&&(e.fillStyle=r.fill)),(o||r.stroke!==a.stroke)&&(l||(RM(e,i),l=!0),kM(r.stroke)&&(e.strokeStyle=r.stroke)),(o||r.opacity!==a.opacity)&&(l||(RM(e,i),l=!0),e.globalAlpha=null==r.opacity?1:r.opacity),t.hasStroke()){var s=r.lineWidth/(r.strokeNoScale&&t.getLineScale?t.getLineScale():1);e.lineWidth!==s&&(l||(RM(e,i),l=!0),e.lineWidth=s)}for(var u=0;u<VM.length;u++){var c=VM[u],d=c[0];(o||r[d]!==a[d])&&(l||(RM(e,i),l=!0),e[d]=r[d]||c[1])}return l}function BM(e,t){var n=t.transform,o=e.dpr||1;n?e.setTransform(o*n[0],o*n[1],o*n[2],o*n[3],o*n[4],o*n[5]):e.setTransform(o,0,0,o,0,0)}function RM(e,t){t.batchFill&&e.fill(),t.batchStroke&&e.stroke(),t.batchFill="",t.batchStroke=""}function zM(e,t){return t&&e.__hoverStyle||e.style}function FM(e,t){GM(e,t,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function GM(e,t,n,o){var i=t.transform;if(!t.shouldBePainted(n.viewWidth,n.viewHeight,!1,!1))return t.__dirty&=-2,void(t.__isRendered=!1);var r=t.__clipPaths,a=n.prevElClipPaths,l=!1,s=!1;if(a&&!function(e,t){if(e===t||!e&&!t)return!1;if(!e||!t||e.length!==t.length)return!0;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!0;return!1}(r,a)||(a&&a.length&&(RM(e,n),e.restore(),s=l=!0,n.prevElClipPaths=null,n.allClipped=!1,n.prevEl=null),r&&r.length&&(RM(e,n),e.save(),function(e,t,n){for(var o=!1,i=0;i<e.length;i++){var r=e[i];o=o||r.isZeroArea(),BM(t,r),t.beginPath(),r.buildPath(t,r.shape),t.clip()}n.allClipped=o}(r,e,n),l=!0),n.prevElClipPaths=r),n.allClipped)t.__isRendered=!1;else{t.beforeBrush&&t.beforeBrush(),t.innerBeforeBrush();var u=n.prevEl;u||(s=l=!0);var c,d,h=t instanceof nv&&t.autoBatch&&function(e){var t=DM(e),n=IM(e);return!(e.lineDash||!(+t^+n)||t&&"string"!=typeof e.fill||n&&"string"!=typeof e.stroke||e.strokePercent<1||e.strokeOpacity<1||e.fillOpacity<1)}(t.style);l||(c=i,d=u.transform,c&&d?c[0]!==d[0]||c[1]!==d[1]||c[2]!==d[2]||c[3]!==d[3]||c[4]!==d[4]||c[5]!==d[5]:c||d)?(RM(e,n),BM(e,t)):h||RM(e,n);var p=zM(t,n.inHover);t instanceof nv?(1!==n.lastDrawType&&(s=!0,n.lastDrawType=1),PM(e,t,u,s,n),h&&(n.batchFill||n.batchStroke)||e.beginPath(),function(e,t,n,o){var i,r=IM(n),a=DM(n),l=n.strokePercent,s=l<1,u=!t.path;t.silent&&!s||!u||t.createPathProxy();var c=t.path||TM,d=t.__dirty;if(!o){var h=n.fill,p=n.stroke,f=a&&!!h.colorStops,g=r&&!!p.colorStops,v=a&&!!h.image,m=r&&!!p.image,y=void 0,x=void 0,_=void 0,w=void 0,b=void 0;(f||g)&&(b=t.getBoundingRect()),f&&(y=d?bM(e,h,b):t.__canvasFillGradient,t.__canvasFillGradient=y),g&&(x=d?bM(e,p,b):t.__canvasStrokeGradient,t.__canvasStrokeGradient=x),v&&(_=d||!t.__canvasFillPattern?AM(e,h,t):t.__canvasFillPattern,t.__canvasFillPattern=_),m&&(w=d||!t.__canvasStrokePattern?AM(e,p,t):t.__canvasStrokePattern,t.__canvasStrokePattern=_),f?e.fillStyle=y:v&&(_?e.fillStyle=_:a=!1),g?e.strokeStyle=x:m&&(w?e.strokeStyle=w:r=!1)}var S,C,M=t.getGlobalScale();c.setScale(M[0],M[1],t.segmentIgnoreThreshold),e.setLineDash&&n.lineDash&&(S=(i=MM(t))[0],C=i[1]);var T=!0;(u||4&d)&&(c.setDPR(e.dpr),s?c.setContext(null):(c.setContext(e),T=!1),c.reset(),t.buildPath(c,t.shape,o),c.toStatic(),t.pathUpdated()),T&&c.rebuildPath(e,s?l:1),S&&(e.setLineDash(S),e.lineDashOffset=C),o||(n.strokeFirst?(r&&EM(e,n),a&&NM(e,n)):(a&&NM(e,n),r&&EM(e,n))),S&&e.setLineDash([])}(e,t,p,h),h&&(n.batchFill=p.fill||"",n.batchStroke=p.stroke||"")):t instanceof iv?(3!==n.lastDrawType&&(s=!0,n.lastDrawType=3),PM(e,t,u,s,n),function(e,t,n){var o,i=n.text;if(null!=i&&(i+=""),i){e.font=n.font||Xl,e.textAlign=n.textAlign,e.textBaseline=n.textBaseline;var r=void 0,a=void 0;e.setLineDash&&n.lineDash&&(r=(o=MM(t))[0],a=o[1]),r&&(e.setLineDash(r),e.lineDashOffset=a),n.strokeFirst?(IM(n)&&e.strokeText(i,n.x,n.y),DM(n)&&e.fillText(i,n.x,n.y)):(DM(n)&&e.fillText(i,n.x,n.y),IM(n)&&e.strokeText(i,n.x,n.y)),r&&e.setLineDash([])}}(e,t,p)):t instanceof lv?(2!==n.lastDrawType&&(s=!0,n.lastDrawType=2),function(e,t,n,o,i){OM(e,zM(t,i.inHover),n&&zM(n,i.inHover),o,i)}(e,t,u,s,n),function(e,t,n){var o=t.__image=Lf(n.image,t.__image,t,t.onload);if(o&&Of(o)){var i=n.x||0,r=n.y||0,a=t.getWidth(),l=t.getHeight(),s=o.width/o.height;if(null==a&&null!=l?a=l*s:null==l&&null!=a?l=a/s:null==a&&null==l&&(a=o.width,l=o.height),n.sWidth&&n.sHeight){var u=n.sx||0,c=n.sy||0;e.drawImage(o,u,c,n.sWidth,n.sHeight,i,r,a,l)}else if(n.sx&&n.sy){var d=a-(u=n.sx),h=l-(c=n.sy);e.drawImage(o,u,c,d,h,i,r,a,l)}else e.drawImage(o,i,r,a,l)}}(e,t,p)):t.getTemporalDisplayables&&(4!==n.lastDrawType&&(s=!0,n.lastDrawType=4),function(e,t,n){var o=t.getDisplayables(),i=t.getTemporalDisplayables();e.save();var r,a,l={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:n.viewWidth,viewHeight:n.viewHeight,inHover:n.inHover};for(r=t.getCursor(),a=o.length;r<a;r++){(c=o[r]).beforeBrush&&c.beforeBrush(),c.innerBeforeBrush(),GM(e,c,l,r===a-1),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),l.prevEl=c}for(var s=0,u=i.length;s<u;s++){var c;(c=i[s]).beforeBrush&&c.beforeBrush(),c.innerBeforeBrush(),GM(e,c,l,s===u-1),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),l.prevEl=c}t.clearTemporalDisplayables(),t.notClear=!0,e.restore()}(e,t,n)),h&&o&&RM(e,n),t.innerAfterBrush(),t.afterBrush&&t.afterBrush(),n.prevEl=t,t.__dirty=0,t.__isRendered=!0}}var HM=new uM,WM=new sd(100),UM=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function YM(e,t){if("none"===e)return null;var n=t.getDevicePixelRatio(),o=t.getZr(),i="svg"===o.painter.type;e.dirty&&HM.delete(e);var r=HM.get(e);if(r)return r;var a=fs(e,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});"none"===a.backgroundColor&&(a.backgroundColor=null);var l={repeat:"repeat"};return function(e){for(var t,r=[n],l=!0,s=0;s<UM.length;++s){var u=a[UM[s]];if(null!=u&&!Ms(u)&&!Is(u)&&!Ds(u)&&"boolean"!=typeof u){l=!1;break}r.push(u)}if(l){t=r.join(",")+(i?"-svg":"");var c=WM.get(t);c&&(i?e.svgElement=c:e.image=c)}var d,h=XM(a.dashArrayX),p=function(e){if(!e||"object"==typeof e&&0===e.length)return[0,0];if(Ds(e)){var t=Math.ceil(e);return[t,t]}var n=xs(e,function(e){return Math.ceil(e)});return e.length%2?n.concat(n):n}(a.dashArrayY),f=ZM(a.symbol),g=(_=h,xs(_,function(e){return jM(e)})),v=jM(p),m=!i&&$l.createCanvas(),y=i&&{tag:"g",attrs:{},key:"dcl",children:[]},x=function(){for(var e=1,t=0,n=g.length;t<n;++t)e=Op(e,g[t]);var o=1;for(t=0,n=f.length;t<n;++t)o=Op(o,f[t].length);e*=o;var i=v*g.length*f.length;if("production"!==process.env.NODE_ENV){var r=function(e){};e>a.maxTileWidth&&r("maxTileWidth"),i>a.maxTileHeight&&r("maxTileHeight")}return{width:Math.max(1,Math.min(e,a.maxTileWidth)),height:Math.max(1,Math.min(i,a.maxTileHeight))}}();var _;m&&(m.width=x.width*n,m.height=x.height*n,d=m.getContext("2d"));(function(){d&&(d.clearRect(0,0,m.width,m.height),a.backgroundColor&&(d.fillStyle=a.backgroundColor,d.fillRect(0,0,m.width,m.height)));for(var e=0,t=0;t<p.length;++t)e+=p[t];if(e<=0)return;var r=-v,l=0,s=0,u=0;for(;r<x.height;){if(l%2==0){for(var c=s/2%f.length,g=0,_=0,w=0;g<2*x.width;){var b=0;for(t=0;t<h[u].length;++t)b+=h[u][t];if(b<=0)break;if(_%2==0){var S=.5*(1-a.symbolSize),C=g+h[u][_]*S,M=r+p[l]*S,T=h[u][_]*a.symbolSize,I=p[l]*a.symbolSize,k=w/2%f[c].length;D(C,M,T,I,f[c][k])}g+=h[u][_],++w,++_===h[u].length&&(_=0)}++u===h.length&&(u=0)}r+=p[l],++s,++l===p.length&&(l=0)}function D(e,t,r,l,s){var u=i?1:n,c=yM(s,e*u,t*u,r*u,l*u,a.color,a.symbolKeepAspect);if(i){var h=o.painter.renderOneToVNode(c);h&&y.children.push(h)}else FM(d,c)}})(),l&&WM.put(t,m||y);e.image=m,e.svgElement=y,e.svgWidth=x.width,e.svgHeight=x.height}(l),l.rotation=a.rotation,l.scaleX=l.scaleY=i?1:1/n,HM.set(e,l),e.dirty=!1,l}function ZM(e){if(!e||0===e.length)return[["rect"]];if(Is(e))return[[e]];for(var t=!0,n=0;n<e.length;++n)if(!Is(e[n])){t=!1;break}if(t)return ZM([e]);var o=[];for(n=0;n<e.length;++n)Is(e[n])?o.push([e[n]]):o.push(e[n]);return o}function XM(e){if(!e||0===e.length)return[[0,0]];if(Ds(e))return[[i=Math.ceil(e),i]];for(var t=!0,n=0;n<e.length;++n)if(!Ds(e[n])){t=!1;break}if(t)return XM([e]);var o=[];for(n=0;n<e.length;++n)if(Ds(e[n])){var i=Math.ceil(e[n]);o.push([i,i])}else{(i=xs(e[n],function(e){return Math.ceil(e)})).length%2==1?o.push(i.concat(i)):o.push(i)}return o}function jM(e){for(var t=0,n=0;n<e.length;++n)t+=e[n];return e.length%2==1?2*t:t}var $M=new bu,qM={};var KM=2e3,JM=4500,QM={PROCESSOR:{FILTER:1e3,SERIES_FILTER:800,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,PROGRESSIVE_LAYOUT:1100,GLOBAL:KM,CHART:3e3,POST_CHART_LAYOUT:4600,COMPONENT:4e3,BRUSH:5e3,CHART_ITEM:JM,ARIA:6e3,DECAL:7e3}},eT="__flagInMainProcess",tT="__pendingUpdate",nT="__needsUpdateStatus",oT=/^[a-zA-Z0-9_]+$/,iT="__connectUpdateStatus";function rT(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(!this.isDisposed())return lT(this,e,t);ET(this.id)}}function aT(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return lT(this,e,t)}}function lT(e,t,n){return n[0]=n[0]&&n[0].toLowerCase(),bu.prototype[t].apply(e,n)}var sT,uT,cT,dT,hT,pT,fT,gT,vT,mT,yT,xT,_T,wT,bT,ST,CT,MT,TT=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Wl(t,e),t}(bu),IT=TT.prototype;IT.on=aT("on"),IT.off=aT("off");var kT=function(e){function t(t,n,o){var i=e.call(this,new qC)||this;i._chartsViews=[],i._chartsMap={},i._componentsViews=[],i._componentsMap={},i._pendingActions=[],o=o||{},Is(n)&&(n=BT[n]),i._dom=t;var r="canvas",a="auto",l=!1;if("production"!==process.env.NODE_ENV){var s=Yl.hasGlobalWindow?window:global;s&&(r=Rs(s.__ECHARTS__DEFAULT__RENDERER__,r),a=Rs(s.__ECHARTS__DEFAULT__COARSE_POINTER,a),l=Rs(s.__ECHARTS__DEFAULT__USE_DIRTY_RECT__,l))}o.ssr&&(cp=function(e){var t=Nv(e),n=t.dataIndex;if(null!=n){var o=qs();return o.set("series_index",t.seriesIndex),o.set("data_index",n),t.ssrType&&o.set("ssr_type",t.ssrType),o}});var u=i._zr=hp(t,{renderer:o.renderer||r,devicePixelRatio:o.devicePixelRatio,width:o.width,height:o.height,ssr:o.ssr,useDirtyRect:Rs(o.useDirtyRect,l),useCoarsePointer:Rs(o.useCoarsePointer,a),pointerSize:o.pointerSize});i._ssr=o.ssr,i._throttledZrFlush=gC(Ss(u.flush,u),17),(n=cs(n))&&mb(n,!0),i._theme=n,i._locale=function(e){if(Is(e)){var t=i_[e.toUpperCase()]||{};return e===t_||e===n_?cs(t):ds(cs(t),cs(i_[o_]),!1)}return ds(cs(e),cs(i_[o_]),!1)}(o.locale||a_),i._coordSysMgr=new jw;var c=i._api=bT(i);function d(e,t){return e.__prio-t.__prio}return Tc(PT,d),Tc(VT,d),i._scheduler=new kC(i,c,VT,PT),i._messageCenter=new TT,i._initEvents(),i.resize=Ss(i.resize,i),u.animation.on("frame",i._onframe,i),mT(u,i),yT(u,i),Ys(i),i}return Wl(t,e),t.prototype._onframe=function(){if(!this._disposed){MT(this);var e=this._scheduler;if(this[tT]){var t=this[tT].silent;this[eT]=!0;try{sT(this),dT.update.call(this,null,this[tT].updateParams)}catch(a){throw this[eT]=!1,this[tT]=null,a}this._zr.flush(),this[eT]=!1,this[tT]=null,gT.call(this,t),vT.call(this,t)}else if(e.unfinished){var n=1,o=this._model,i=this._api;e.unfinished=!1;do{var r=+new Date;e.performSeriesTasks(o),e.performDataProcessorTasks(o),pT(this,o),e.performVisualTasks(o),wT(this,this._model,i,"remain",{}),n-=+new Date-r}while(n>0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,t,n){if(this[eT])"production"!==process.env.NODE_ENV&&Fp("`setOption` should not be called during main process.");else if(this._disposed)ET(this.id);else{var o,i,r;if(Ns(t)&&(n=t.lazyUpdate,o=t.silent,i=t.replaceMerge,r=t.transition,t=t.notMerge),this[eT]=!0,!this._model||t){var a=new qw(this._api),l=this._theme,s=this._model=new Gw;s.scheduler=this._scheduler,s.ssr=this._ssr,s.init(null,null,null,l,this._locale,a)}this._model.setOption(e,{replaceMerge:i},OT);var u={seriesTransition:r,optionChanged:!0};if(n)this[tT]={silent:o,updateParams:u},this[eT]=!1,this.getZr().wakeUp();else{try{sT(this),dT.update.call(this,null,u)}catch(c){throw this[tT]=null,this[eT]=!1,c}this._ssr||this._zr.flush(),this[tT]=null,this[eT]=!1,gT.call(this,o),vT.call(this,o)}}},t.prototype.setTheme=function(){Gp("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Yl.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return"production"!==process.env.NODE_ENV&&Hp("getRenderedCanvas","renderToCanvas"),this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){e=e||{};var t=this._zr.painter;if("production"!==process.env.NODE_ENV&&"canvas"!==t.type)throw new Error("renderToCanvas can only be used in the canvas renderer.");return t.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get("backgroundColor"),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){e=e||{};var t=this._zr.painter;if("production"!==process.env.NODE_ENV&&"svg"!==t.type)throw new Error("renderToSVGString can only be used in the svg renderer.");return t.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){if(Yl.svgSupported){var e=this._zr;return ys(e.storage.getDisplayList(),function(e){e.stopAnimation(null,!0)}),e.painter.toDataURL()}},t.prototype.getDataURL=function(e){if(!this._disposed){var t=(e=e||{}).excludeComponents,n=this._model,o=[],i=this;ys(t,function(e){n.eachComponent({mainType:e},function(e){var t=i._componentsMap[e.__viewId];t.group.ignore||(o.push(t),t.group.ignore=!0)})});var r="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.renderToCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return ys(o,function(e){e.group.ignore=!1}),r}ET(this.id)},t.prototype.getConnectedDataURL=function(e){if(!this._disposed){var t="svg"===e.type,n=this.group,o=Math.min,i=Math.max,r=1/0;if(FT[n]){var a=r,l=r,s=-1/0,u=-1/0,c=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();ys(zT,function(r,d){if(r.group===n){var h=t?r.getZr().painter.getSvgDom().innerHTML:r.renderToCanvas(cs(e)),p=r.getDom().getBoundingClientRect();a=o(p.left,a),l=o(p.top,l),s=i(p.right,s),u=i(p.bottom,u),c.push({dom:h,left:p.left,top:p.top})}});var h=(s*=d)-(a*=d),p=(u*=d)-(l*=d),f=$l.createCanvas(),g=hp(f,{renderer:t?"svg":"canvas"});if(g.resize({width:h,height:p}),t){var v="";return ys(c,function(e){var t=e.left-a,n=e.top-l;v+='<g transform="translate('+t+","+n+')">'+e.dom+"</g>"}),g.painter.getSvgRoot().innerHTML=v,e.connectedBackgroundColor&&g.painter.setBackgroundColor(e.connectedBackgroundColor),g.refreshImmediately(),g.painter.toDataURL()}return e.connectedBackgroundColor&&g.add(new fv({shape:{x:0,y:0,width:h,height:p},style:{fill:e.connectedBackgroundColor}})),ys(c,function(e){var t=new lv({style:{x:e.left*d-a,y:e.top*d-l,image:e.dom}});g.add(t)}),g.refreshImmediately(),f.toDataURL("image/"+(e&&e.type||"png"))}return this.getDataURL(e)}ET(this.id)},t.prototype.convertToPixel=function(e,t){return hT(this,"convertToPixel",e,t)},t.prototype.convertFromPixel=function(e,t){return hT(this,"convertFromPixel",e,t)},t.prototype.containPixel=function(e,t){var n;if(!this._disposed)return ys(df(this._model,e),function(e,o){o.indexOf("Models")>=0&&ys(e,function(e){var i=e.coordinateSystem;if(i&&i.containPoint)n=n||!!i.containPoint(t);else if("seriesModels"===o){var r=this._chartsMap[e.__viewId];r&&r.containPoint?n=n||r.containPoint(t,e):"production"!==process.env.NODE_ENV&&zp(o+": "+(r?"The found component do not support containPoint.":"No view mapping to the found component."))}else"production"!==process.env.NODE_ENV&&zp(o+": containPoint is not supported")},this)},this),!!n;ET(this.id)},t.prototype.getVisual=function(e,t){var n=df(this._model,e,{defaultMainType:"series"}),o=n.seriesModel;"production"!==process.env.NODE_ENV&&(o||zp("There is no specified series model"));var i=o.getData(),r=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?i.indexOfRawIndex(n.dataIndex):null;return null!=r?tM(i,r,t):nM(i,t)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e,t,n,o=this;ys(NT,function(e){var t=function(t){var n,i=o.getModel(),r=t.target,a="globalout"===e;if(a?n={}:r&&aM(r,function(e){var t=Nv(e);if(t&&null!=t.dataIndex){var o=t.dataModel||i.getSeriesByIndex(t.seriesIndex);return n=o&&o.getDataParams(t.dataIndex,t.dataType,r)||{},!0}if(t.eventData)return n=ps({},t.eventData),!0},!0),n){var l=n.componentType,s=n.componentIndex;"markLine"!==l&&"markPoint"!==l&&"markArea"!==l||(l="series",s=n.seriesIndex);var u=l&&null!=s&&i.getComponent(l,s),c=u&&o["series"===u.mainType?"_chartsMap":"_componentsMap"][u.__viewId];"production"!==process.env.NODE_ENV&&(a||u&&c||zp("model or view can not be found by params")),n.event=t,n.type=e,o._$eventProcessor.eventInfo={targetEl:r,packedEvent:n,model:u,view:c},o.trigger(e,n)}};t.zrEventfulCallAtLast=!0,o._zr.on(e,t,o)}),ys(LT,function(e,t){o._messageCenter.on(t,function(e){this.trigger(t,e)},o)}),ys(["selectchanged"],function(e){o._messageCenter.on(e,function(t){this.trigger(e,t)},o)}),e=this._messageCenter,t=this,n=this._api,e.on("selectchanged",function(e){var o=n.getModel();e.isFromClick?(rM("map","selectchanged",t,o,e),rM("pie","selectchanged",t,o,e)):"select"===e.fromAction?(rM("map","selected",t,o,e),rM("pie","selected",t,o,e)):"unselect"===e.fromAction&&(rM("map","unselected",t,o,e),rM("pie","unselected",t,o,e))})},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){this._disposed?ET(this.id):this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed)ET(this.id);else{this._disposed=!0,this.getDom()&&vf(this.getDom(),HT,"");var e=this,t=e._api,n=e._model;ys(e._componentsViews,function(e){e.dispose(n,t)}),ys(e._chartsViews,function(e){e.dispose(n,t)}),e._zr.dispose(),e._dom=e._model=e._chartsMap=e._componentsMap=e._chartsViews=e._componentsViews=e._scheduler=e._api=e._zr=e._throttledZrFlush=e._theme=e._coordSysMgr=e._messageCenter=null,delete zT[e.id]}},t.prototype.resize=function(e){if(this[eT])"production"!==process.env.NODE_ENV&&Fp("`resize` should not be called during main process.");else if(this._disposed)ET(this.id);else{this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var n=t.resetOption("media"),o=e&&e.silent;this[tT]&&(null==o&&(o=this[tT].silent),n=!0,this[tT]=null),this[eT]=!0;try{n&&sT(this),dT.update.call(this,{type:"resize",animation:ps({duration:0},e&&e.animation)})}catch(i){throw this[eT]=!1,i}this[eT]=!1,gT.call(this,o),vT.call(this,o)}}},t.prototype.showLoading=function(e,t){if(this._disposed)ET(this.id);else if(Ns(e)&&(t=e,e=""),e=e||"default",this.hideLoading(),RT[e]){var n=RT[e](this._api,t),o=this._zr;this._loadingFX=n,o.add(n)}else"production"!==process.env.NODE_ENV&&zp("Loading effects "+e+" not exists.")},t.prototype.hideLoading=function(){this._disposed?ET(this.id):(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},t.prototype.makeActionFromEvent=function(e){var t=ps({},e);return t.type=LT[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed)ET(this.id);else if(Ns(t)||(t={silent:!!t}),AT[e.type]&&this._model)if(this[eT])this._pendingActions.push(e);else{var n=t.silent;fT.call(this,e,n);var o=t.flush;o?this._zr.flush():!1!==o&&Yl.browser.weChat&&this._throttledZrFlush(),gT.call(this,n),vT.call(this,n)}},t.prototype.updateLabelLayout=function(){$M.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed)ET(this.id);else{var t=e.seriesIndex,n=this.getModel().getSeriesByIndex(t);"production"!==process.env.NODE_ENV&&Hs(e.data&&n),n.appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},t.internalField=function(){function e(e){e.clearColorPalette(),e.eachSeries(function(e){e.clearColorPalette()})}function t(e){for(var t=[],n=e.currentStates,o=0;o<n.length;o++){var i=n[o];"emphasis"!==i&&"blur"!==i&&"select"!==i&&t.push(i)}e.selected&&e.states.select&&t.push("select"),2===e.hoverState&&e.states.emphasis?t.push("emphasis"):1===e.hoverState&&e.states.blur&&t.push("blur"),e.useStates(t)}function n(e,t){if(!e.preventAutoZ){var n=e.get("z")||0,i=e.get("zlevel")||0;t.eachRendered(function(e){return o(e,n,i,-1/0),!0})}}function o(e,t,n,i){var r=e.getTextContent(),a=e.getTextGuideLine();if(e.isGroup)for(var l=e.childrenRef(),s=0;s<l.length;s++)i=Math.max(o(l[s],t,n,i),i);else e.z=t,e.zlevel=n,i=Math.max(e.z2,i);if(r&&(r.z=t,r.zlevel=n,isFinite(i)&&(r.z2=i+2)),a){var u=e.textGuideLineConfig;a.z=t,a.zlevel=n,isFinite(i)&&(a.z2=i+(u&&u.showAbove?1:-1))}return i}function i(e,t){t.eachRendered(function(e){if(!Yy(e)){var t=e.getTextContent(),n=e.getTextGuideLine();e.stateTransition&&(e.stateTransition=null),t&&t.stateTransition&&(t.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),e.hasState()?(e.prevStates=e.currentStates,e.clearStates()):e.prevStates&&(e.prevStates=null)}})}function r(e,n){var o=e.getModel("stateAnimation"),i=e.isAnimationEnabled(),r=o.get("duration"),a=r>0?{duration:r,delay:o.get("delay"),easing:o.get("easing")}:null;n.eachRendered(function(e){if(e.states&&e.states.emphasis){if(Yy(e))return;if(e instanceof nv&&function(e){var t=Vv(e);t.normalFill=e.style.fill,t.normalStroke=e.style.stroke;var n=e.states.select||{};t.selectFill=n.style&&n.style.fill||null,t.selectStroke=n.style&&n.style.stroke||null}(e),e.__dirty){var n=e.prevStates;n&&e.useStates(n)}if(i){e.stateTransition=a;var o=e.getTextContent(),r=e.getTextGuideLine();o&&(o.stateTransition=a),r&&(r.stateTransition=a)}e.__dirty&&t(e)}})}sT=function(e){var t=e._scheduler;t.restorePipelines(e._model),t.prepareStageTasks(),uT(e,!0),uT(e,!1),t.plan()},uT=function(e,t){for(var n=e._model,o=e._scheduler,i=t?e._componentsViews:e._chartsViews,r=t?e._componentsMap:e._chartsMap,a=e._zr,l=e._api,s=0;s<i.length;s++)i[s].__alive=!1;function u(e){var s=e.__requireNewView;e.__requireNewView=!1;var u="_ec_"+e.id+"_"+e.type,c=!s&&r[u];if(!c){var d=wf(e.type),h=t?nC.getClass(d.main,d.sub):aC.getClass(d.sub);"production"!==process.env.NODE_ENV&&Hs(h,d.sub+" does not exist."),(c=new h).init(n,l),r[u]=c,i.push(c),a.add(c.group)}e.__viewId=c.__id=u,c.__alive=!0,c.__model=e,c.group.__ecComponentInfo={mainType:e.mainType,index:e.componentIndex},!t&&o.prepareView(c,e,n,l)}t?n.eachComponent(function(e,t){"series"!==e&&u(t)}):n.eachSeries(u);for(s=0;s<i.length;){var c=i[s];c.__alive?s++:(!t&&c.renderTask.dispose(),a.remove(c.group),c.dispose(n,l),i.splice(s,1),r[c.__id]===c&&delete r[c.__id],c.__id=c.group.__ecComponentInfo=null)}},cT=function(e,t,n,o,i){var r=e._model;if(r.setUpdatePayload(n),o){var a={};a[o+"Id"]=n[o+"Id"],a[o+"Index"]=n[o+"Index"],a[o+"Name"]=n[o+"Name"];var l={mainType:o,query:a};i&&(l.subType=i);var s,u=n.excludeSeriesId;null!=u&&(s=qs(),ys(jp(u),function(e){var t=nf(e,null);null!=t&&s.set(t,!0)})),r&&r.eachComponent(l,function(t){if(!(s&&null!=s.get(t.id)))if(Im(n))if(t instanceof jS)n.type!==zv||n.notBlur||t.get(["emphasis","disabled"])||function(e,t,n){var o=e.seriesIndex,i=e.getData(t.dataType);if(i){var r=sf(i,t);r=(Ms(r)?r[0]:r)||0;var a=i.getItemGraphicEl(r);if(!a)for(var l=i.count(),s=0;!a&&s<l;)a=i.getItemGraphicEl(s++);if(a){var u=Nv(a);pm(o,u.focus,u.blurScope,n)}else{var c=e.get(["emphasis","focus"]),d=e.get(["emphasis","blurScope"]);null!=c&&pm(o,c,d,n)}}else"production"!==process.env.NODE_ENV&&Fp("Unknown dataType "+t.dataType)}(t,n,e._api);else{var o=gm(t.mainType,t.componentIndex,n.name,e._api),i=o.focusSelf,r=o.dispatchers;n.type===zv&&i&&!n.notBlur&&fm(t.mainType,t.componentIndex,e._api),r&&ys(r,function(e){n.type===zv?rm(e):am(e)})}else Tm(n)&&t instanceof jS&&(!function(e,t){if(Tm(t)){var n=t.dataType,o=sf(e.getData(n),t);Ms(o)||(o=[o]),e[t.type===Wv?"toggleSelect":t.type===Gv?"select":"unselect"](o,n)}}(t,n,e._api),vm(t),CT(e))},e),r&&r.eachComponent(l,function(t){s&&null!=s.get(t.id)||c(e["series"===o?"_chartsMap":"_componentsMap"][t.__viewId])},e)}else ys([].concat(e._componentsViews).concat(e._chartsViews),c);function c(o){o&&o.__alive&&o[t]&&o[t](o.__model,r,e._api,n)}},dT={prepareAndUpdate:function(e){sT(this),dT.update.call(this,e,{optionChanged:null!=e.newOption})},update:function(t,n){var o=this._model,i=this._api,r=this._zr,a=this._coordSysMgr,l=this._scheduler;if(o){o.setUpdatePayload(t),l.restoreData(o,t),l.performSeriesTasks(o),a.create(o,i),l.performDataProcessorTasks(o,t),pT(this,o),a.update(o,i),e(o),l.performVisualTasks(o,t),xT(this,o,i,t,n);var s=o.get("backgroundColor")||"transparent",u=o.get("darkMode");r.setBackgroundColor(s),null!=u&&"auto"!==u&&r.setDarkMode(u),$M.trigger("afterupdate",o,i)}},updateTransform:function(t){var n=this,o=this._model,i=this._api;if(o){o.setUpdatePayload(t);var r=[];o.eachComponent(function(e,a){if("series"!==e){var l=n.getViewOfComponentModel(a);if(l&&l.__alive)if(l.updateTransform){var s=l.updateTransform(a,o,i,t);s&&s.update&&r.push(l)}else r.push(l)}});var a=qs();o.eachSeries(function(e){var r=n._chartsMap[e.__viewId];if(r.updateTransform){var l=r.updateTransform(e,o,i,t);l&&l.update&&a.set(e.uid,1)}else a.set(e.uid,1)}),e(o),this._scheduler.performVisualTasks(o,t,{setDirty:!0,dirtyMap:a}),wT(this,o,i,t,{},a),$M.trigger("afterupdate",o,i)}},updateView:function(t){var n=this._model;n&&(n.setUpdatePayload(t),aC.markUpdateMethod(t,"updateView"),e(n),this._scheduler.performVisualTasks(n,t,{setDirty:!0}),xT(this,n,this._api,t,{}),$M.trigger("afterupdate",n,this._api))},updateVisual:function(t){var n=this,o=this._model;o&&(o.setUpdatePayload(t),o.eachSeries(function(e){e.getData().clearAllVisual()}),aC.markUpdateMethod(t,"updateVisual"),e(o),this._scheduler.performVisualTasks(o,t,{visualType:"visual",setDirty:!0}),o.eachComponent(function(e,i){if("series"!==e){var r=n.getViewOfComponentModel(i);r&&r.__alive&&r.updateVisual(i,o,n._api,t)}}),o.eachSeries(function(e){n._chartsMap[e.__viewId].updateVisual(e,o,n._api,t)}),$M.trigger("afterupdate",o,this._api))},updateLayout:function(e){dT.update.call(this,e)}},hT=function(e,t,n,o){if(e._disposed)ET(e.id);else{for(var i,r=e._model,a=e._coordSysMgr.getCoordinateSystems(),l=df(r,n),s=0;s<a.length;s++){var u=a[s];if(u[t]&&null!=(i=u[t](r,l,o)))return i}"production"!==process.env.NODE_ENV&&zp("No coordinate system that supports "+t+" found by the given finder.")}},pT=function(e,t){var n=e._chartsMap,o=e._scheduler;t.eachSeries(function(e){o.updateStreamModes(e,n[e.__viewId])})},fT=function(e,t){var n=this,o=this.getModel(),i=e.type,r=e.escapeConnect,a=AT[i],l=a.actionInfo,s=(l.update||"update").split(":"),u=s.pop(),c=null!=s[0]&&wf(s[0]);this[eT]=!0;var d=[e],h=!1;e.batch&&(h=!0,d=xs(e.batch,function(t){return(t=fs(ps({},t),e)).batch=null,t}));var p,f=[],g=Tm(e),v=Im(e);if(v&&hm(this._api),ys(d,function(t){if((p=(p=a.action(t,n._model,n._api))||ps({},t)).type=l.event||p.type,f.push(p),v){var o=hf(e),i=o.queryOptionMap,r=o.mainTypeSpecified?i.keys()[0]:"series";cT(n,u,t,r),CT(n)}else g?(cT(n,u,t,"series"),CT(n)):c&&cT(n,u,t,c.main,c.sub)}),"none"!==u&&!v&&!g&&!c)try{this[tT]?(sT(this),dT.update.call(this,e),this[tT]=null):dT[u].call(this,e)}catch(x){throw this[eT]=!1,x}if(p=h?{type:l.event||i,escapeConnect:r,batch:f}:f[0],this[eT]=!1,!t){var m=this._messageCenter;if(m.trigger(p.type,p),g){var y={type:"selectchanged",escapeConnect:r,selected:mm(o),isFromClick:e.isFromClick||!1,fromAction:e.type,fromActionPayload:e};m.trigger(y.type,y)}}},gT=function(e){for(var t=this._pendingActions;t.length;){var n=t.shift();fT.call(this,n,e)}},vT=function(e){!e&&this.trigger("updated")},mT=function(e,t){e.on("rendered",function(n){t.trigger("rendered",n),!e.animation.isFinished()||t[tT]||t._scheduler.unfinished||t._pendingActions.length||t.trigger("finished")})},yT=function(e,t){e.on("mouseover",function(e){var n=aM(e.target,Mm);n&&(!function(e,t,n){"production"===process.env.NODE_ENV||Mm(e)||Fp("param should be highDownDispatcher");var o=Nv(e),i=gm(o.componentMainType,o.componentIndex,o.componentHighDownName,n),r=i.dispatchers,a=i.focusSelf;r?(a&&fm(o.componentMainType,o.componentIndex,n),ys(r,function(e){return om(e,t)})):(pm(o.seriesIndex,o.focus,o.blurScope,n),"self"===o.focus&&fm(o.componentMainType,o.componentIndex,n),om(e,t))}(n,e,t._api),CT(t))}).on("mouseout",function(e){var n=aM(e.target,Mm);n&&(!function(e,t,n){"production"===process.env.NODE_ENV||Mm(e)||Fp("param should be highDownDispatcher"),hm(n);var o=Nv(e),i=gm(o.componentMainType,o.componentIndex,o.componentHighDownName,n).dispatchers;i?ys(i,function(e){return im(e,t)}):im(e,t)}(n,e,t._api),CT(t))}).on("click",function(e){var n=aM(e.target,function(e){return null!=Nv(e).dataIndex},!0);if(n){var o=n.selected?"unselect":"select",i=Nv(n);t._api.dispatchAction({type:o,dataType:i.dataType,dataIndexInside:i.dataIndex,seriesIndex:i.seriesIndex,isFromClick:!0})}})},xT=function(e,t,n,o,i){!function(e){var t=[],n=[],o=!1;if(e.eachComponent(function(e,i){var r=i.get("zlevel")||0,a=i.get("z")||0,l=i.getZLevelKey();o=o||!!l,("series"===e?n:t).push({zlevel:r,z:a,idx:i.componentIndex,type:e,key:l})}),o){var i,r,a=t.concat(n);Tc(a,function(e,t){return e.zlevel===t.zlevel?e.z-t.z:e.zlevel-t.zlevel}),ys(a,function(t){var n=e.getComponent(t.type,t.idx),o=t.zlevel,a=t.key;null!=i&&(o=Math.max(i,o)),a?(o===i&&a!==r&&o++,r=a):r&&(o===i&&o++,r=""),i=o,n.setZLevel(o)})}}(t),_T(e,t,n,o,i),ys(e._chartsViews,function(e){e.__alive=!1}),wT(e,t,n,o,i),ys(e._chartsViews,function(e){e.__alive||e.remove(t,n)})},_T=function(e,t,o,a,l,s){ys(s||e._componentsViews,function(e){var l=e.__model;i(l,e),e.render(l,t,o,a),n(l,e),r(l,e)})},wT=function(e,t,o,a,l,s){var u=e._scheduler;l=ps(l||{},{updatedSeries:t.getSeries()}),$M.trigger("series:beforeupdate",t,o,l);var c=!1;t.eachSeries(function(t){var n=e._chartsMap[t.__viewId];n.__alive=!0;var o=n.renderTask;u.updatePayload(o,a),i(t,n),s&&s.get(t.uid)&&o.dirty(),o.perform(u.getPerformArgs(o))&&(c=!0),n.group.silent=!!t.get("silent"),function(e,t){var n=e.get("blendMode")||null;t.eachRendered(function(e){e.isGroup||(e.style.blend=n)})}(t,n),vm(t)}),u.unfinished=c||u.unfinished,$M.trigger("series:layoutlabels",t,o,l),$M.trigger("series:transition",t,o,l),t.eachSeries(function(t){var o=e._chartsMap[t.__viewId];n(t,o),r(t,o)}),function(e,t){var n=e._zr,o=n.storage,i=0;o.traverse(function(e){e.isGroup||i++}),i>t.get("hoverLayerThreshold")&&!Yl.node&&!Yl.worker&&t.eachSeries(function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.eachRendered(function(e){e.states.emphasis&&(e.states.emphasis.hoverLayer=!0)})}})}(e,t),$M.trigger("series:afterupdate",t,o,l)},CT=function(e){e[nT]=!0,e.getZr().wakeUp()},MT=function(e){e[nT]&&(e.getZr().storage.traverse(function(e){Yy(e)||t(e)}),e[nT]=!1)},bT=function(e){return new(function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return Wl(n,t),n.prototype.getCoordinateSystems=function(){return e._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(t){for(;t;){var n=t.__ecComponentInfo;if(null!=n)return e._model.getComponent(n.mainType,n.index);t=t.parent}},n.prototype.enterEmphasis=function(t,n){rm(t,n),CT(e)},n.prototype.leaveEmphasis=function(t,n){am(t,n),CT(e)},n.prototype.enterBlur=function(t){lm(t),CT(e)},n.prototype.leaveBlur=function(t){sm(t),CT(e)},n.prototype.enterSelect=function(t){um(t),CT(e)},n.prototype.leaveSelect=function(t){cm(t),CT(e)},n.prototype.getModel=function(){return e.getModel()},n.prototype.getViewOfComponentModel=function(t){return e.getViewOfComponentModel(t)},n.prototype.getViewOfSeriesModel=function(t){return e.getViewOfSeriesModel(t)},n}(Zw))(e)},ST=function(e){function t(e,t){for(var n=0;n<e.length;n++){e[n][iT]=t}}ys(LT,function(n,o){e._messageCenter.on(o,function(n){if(FT[e.group]&&0!==e[iT]){if(n&&n.escapeConnect)return;var o=e.makeActionFromEvent(n),i=[];ys(zT,function(t){t!==e&&t.group===e.group&&i.push(t)}),t(i,0),ys(i,function(e){1!==e[iT]&&e.dispatchAction(o)}),t(i,2)}})})}}(),t}(bu),DT=kT.prototype;DT.on=rT("on"),DT.off=rT("off"),DT.one=function(e,t,n){var o=this;Gp("ECharts#one is deprecated."),this.on.call(this,e,function n(){for(var i=[],r=0;r<arguments.length;r++)i[r]=arguments[r];t&&t.apply&&t.apply(this,i),o.off(e,n)},n)};var NT=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function ET(e){"production"!==process.env.NODE_ENV&&zp("Instance "+e+" has been disposed")}var AT={},LT={},VT=[],OT=[],PT=[],BT={},RT={},zT={},FT={},GT=+new Date-0,HT="_echarts_instance_";function WT(e,t,n){if("production"!==process.env.NODE_ENV&&!e)throw new Error("Initialize failed: invalid dom.");var o=function(e){return zT[function(e,t){return e.getAttribute?e.getAttribute(t):e[t]}(e,HT)]}(e);if(o)return"production"!==process.env.NODE_ENV&&zp("There is a chart instance already initialized on the dom."),o;"production"!==process.env.NODE_ENV&&(!Ls(e)||"CANVAS"===e.nodeName.toUpperCase()||(e.clientWidth||n)&&(e.clientHeight||n)||zp("Can't get DOM width or height. Please check dom.clientWidth and dom.clientHeight. They should not be 0.For example, you may need to call this in the callback of window.onload."));var i=new kT(e,t,n);return i.id="ec_"+GT++,zT[i.id]=i,vf(e,HT,i.id),ST(i),$M.trigger("afterinit",i),i}function UT(e,t){BT[e]=t}function YT(e){gs(OT,e)<0&&OT.push(e)}function ZT(e,t){KT(VT,e,t,2e3)}function XT(e,t){$M.on(e,t)}function jT(e,t,n){Ts(t)&&(n=t,t="");var o=Ns(e)?e.type:[e,e={event:t}][0];e.event=(e.event||o).toLowerCase(),t=e.event,LT[t]||(Hs(oT.test(o)&&oT.test(t)),AT[o]||(AT[o]={action:n,actionInfo:e}),LT[t]=o)}function $T(e,t){KT(PT,e,t,3e3,"visual")}var qT=[];function KT(e,t,n,o,i){if((Ts(t)||Ns(t))&&(n=t,t=o),"production"!==process.env.NODE_ENV){if(isNaN(t)||null==t)throw new Error("Illegal priority");ys(e,function(e){Hs(e.__raw!==n)})}if(!(gs(qT,n)>=0)){qT.push(n);var r=kC.wrapStageHandler(n,i);r.__prio=t,r.__raw=n,e.push(r)}}function JT(e,t){RT[e]=t}var QT=function(e){var t=(e=cs(e)).type,n="";t||("production"!==process.env.NODE_ENV&&(n="Must have a `type` when `registerTransform`."),Up(n));var o=t.split(":");2!==o.length&&("production"!==process.env.NODE_ENV&&(n='Name must include namespace like "ns:regression".'),Up(n));var i=!1;"echarts"===o[0]&&(t=o[1],i=!0),e.__isBuiltIn=i,uS.set(t,e)};$T(KM,SC),$T(JM,MC),$T(JM,TC),$T(KM,QC),$T(JM,eM),$T(7e3,function(e,t){e.eachRawSeries(function(n){if(!e.isSeriesFiltered(n)){var o=n.getData();o.hasItemVisual()&&o.each(function(e){var n=o.getItemVisual(e,"decal");n&&(o.ensureUniqueItemVisual(e,"style").decal=YM(n,t))});var i=o.getVisual("decal");if(i)o.getVisual("style").decal=YM(i,t)}})}),YT(mb),ZT(900,function(e){var t=qs();e.eachSeries(function(e){var n=e.get("stack");if(n){var o=t.get(n)||t.set(n,[]),i=e.getData(),r={stackResultDimension:i.getCalculationInfo("stackResultDimension"),stackedOverDimension:i.getCalculationInfo("stackedOverDimension"),stackedDimension:i.getCalculationInfo("stackedDimension"),stackedByDimension:i.getCalculationInfo("stackedByDimension"),isStackedByIndex:i.getCalculationInfo("isStackedByIndex"),data:i,seriesModel:e};if(!r.stackedDimension||!r.isStackedByIndex&&!r.stackedByDimension)return;o.length&&i.setCalculationInfo("stackedOnSeries",o[o.length-1].seriesModel),o.push(r)}}),t.each(yb)}),JT("default",function(e,t){fs(t=t||{},{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var n=new lp,o=new fv({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(o);var i,r=new mv({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new fv({style:{fill:"none"},textContent:r,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});return n.add(a),t.showSpinner&&((i=new ky({shape:{startAngle:-IC/2,endAngle:-IC/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*IC/2}).start("circularInOut"),i.animateShape(!0).when(1e3,{startAngle:3*IC/2}).delay(300).start("circularInOut"),n.add(i)),n.resize=function(){var n=r.getBoundingRect().width,l=t.showSpinner?t.spinnerRadius:0,s=(e.getWidth()-2*l-(t.showSpinner&&n?10:0)-n)/2-(t.showSpinner&&n?0:5+n/2)+(t.showSpinner?0:n/2)+(n?0:l),u=e.getHeight()/2;t.showSpinner&&i.setShape({cx:s,cy:u}),a.setShape({x:s-l,y:u-l,width:2*l,height:2*l}),o.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n}),jT({type:zv,event:zv,update:zv},tu),jT({type:Fv,event:Fv,update:Fv},tu),jT({type:Gv,event:Gv,update:Gv},tu),jT({type:Hv,event:Hv,update:Hv},tu),jT({type:Wv,event:Wv,update:Wv},tu),UT("light",UC),UT("dark",$C);var eI=[],tI={registerPreprocessor:YT,registerProcessor:ZT,registerPostInit:function(e){XT("afterinit",e)},registerPostUpdate:function(e){XT("afterupdate",e)},registerUpdateLifecycle:XT,registerAction:jT,registerCoordinateSystem:function(e,t){jw.register(e,t)},registerLayout:function(e,t){KT(PT,e,t,1e3,"layout")},registerVisual:$T,registerTransform:QT,registerLoading:JT,registerMap:function(e,t,n){var o,i=(o="registerMap","production"!==process.env.NODE_ENV&&(qM[o]||Fp("Implementation of "+o+" doesn't exists.")),qM[o]);i&&i(e,t,n)},registerImpl:function(e,t){"production"!==process.env.NODE_ENV&&qM[e]&&Fp("Already has an implementation of "+e+"."),qM[e]=t},PRIORITY:QM,ComponentModel:aw,ComponentView:nC,SeriesModel:jS,ChartView:aC,registerComponentModel:function(e){aw.registerClass(e)},registerComponentView:function(e){nC.registerClass(e)},registerSeriesModel:function(e){jS.registerClass(e)},registerChartView:function(e){aC.registerClass(e)},registerSubTypeDefaulter:function(e,t){aw.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){var n;n=t,sp[e]=n}};function nI(e){Ms(e)?ys(e,function(e){nI(e)}):gs(eI,e)>=0||(eI.push(e),Ts(e)&&(e={install:e}),e.install(tI))}function oI(e){return null==e?0:e.length||1}function iI(e){return e}var rI=function(){function e(e,t,n,o,i,r){this._old=e,this._new=t,this._oldKeyGetter=n||iI,this._newKeyGetter=o||iI,this.context=i,this._diffModeMultiple="multiple"===r}return e.prototype.add=function(e){return this._add=e,this},e.prototype.update=function(e){return this._update=e,this},e.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},e.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},e.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},e.prototype.remove=function(e){return this._remove=e,this},e.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},e.prototype._executeOneToOne=function(){var e=this._old,t=this._new,n={},o=new Array(e.length),i=new Array(t.length);this._initIndexMap(e,null,o,"_oldKeyGetter"),this._initIndexMap(t,n,i,"_newKeyGetter");for(var r=0;r<e.length;r++){var a=o[r],l=n[a],s=oI(l);if(s>1){var u=l.shift();1===l.length&&(n[a]=l[0]),this._update&&this._update(u,r)}else 1===s?(n[a]=null,this._update&&this._update(l,r)):this._remove&&this._remove(r)}this._performRestAdd(i,n)},e.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},o={},i=[],r=[];this._initIndexMap(e,n,i,"_oldKeyGetter"),this._initIndexMap(t,o,r,"_newKeyGetter");for(var a=0;a<i.length;a++){var l=i[a],s=n[l],u=o[l],c=oI(s),d=oI(u);if(c>1&&1===d)this._updateManyToOne&&this._updateManyToOne(u,s),o[l]=null;else if(1===c&&d>1)this._updateOneToMany&&this._updateOneToMany(u,s),o[l]=null;else if(1===c&&1===d)this._update&&this._update(u,s),o[l]=null;else if(c>1&&d>1)this._updateManyToMany&&this._updateManyToMany(u,s),o[l]=null;else if(c>1)for(var h=0;h<c;h++)this._remove&&this._remove(s[h]);else this._remove&&this._remove(s)}this._performRestAdd(r,o)},e.prototype._performRestAdd=function(e,t){for(var n=0;n<e.length;n++){var o=e[n],i=t[o],r=oI(i);if(r>1)for(var a=0;a<r;a++)this._add&&this._add(i[a]);else 1===r&&this._add&&this._add(i);t[o]=null}},e.prototype._initIndexMap=function(e,t,n,o){for(var i=this._diffModeMultiple,r=0;r<e.length;r++){var a="_ec_"+this[o](e[r],r);if(i||(n[r]=a),t){var l=t[a],s=oI(l);0===s?(t[a]=r,i&&n.push(a)):1===s?t[a]=[l,r]:l.push(r)}}},e}(),aI=function(){function e(e,t){this._encode=e,this._schema=t}return e.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},e.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},e}();function lI(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}function sI(e){return"category"===e?"ordinal":"time"===e?"time":"float"}var uI=function(){return function(e){this.otherDims={},null!=e&&ps(this,e)}}(),cI=uf(),dI={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},hI=function(){function e(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return e.prototype.isDimensionOmitted=function(){return this._dimOmitted},e.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||(this._dimNameMap=gI(this.source)))},e.prototype.getSourceDimensionIndex=function(e){return Rs(this._dimNameMap.get(e),-1)},e.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},e.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=Eb(this.source),n=!vI(e),o="",i=[],r=0,a=0;r<e;r++){var l=void 0,s=void 0,u=void 0,c=this.dimensions[a];if(c&&c.storeDimIndex===r)l=t?c.name:null,s=c.type,u=c.ordinalMeta,a++;else{var d=this.getSourceDimension(r);d&&(l=t?d.name:null,s=d.type)}i.push({property:l,type:s,ordinalMeta:u}),!t||null==l||c&&c.isCalculationCoord||(o+=n?l.replace(/\`/g,"`1").replace(/\$/g,"`2"):l),o+="$",o+=dI[s]||"f",u&&(o+=u.uid),o+="$"}var h=this.source;return{dimensions:i,hash:[h.seriesLayoutBy,h.startIndex,o].join("$$")}},e.prototype.makeOutputDimensionNames=function(){for(var e=[],t=0,n=0;t<this._fullDimCount;t++){var o=void 0,i=this.dimensions[n];if(i&&i.storeDimIndex===t)i.isCalculationCoord||(o=i.name),n++;else{var r=this.getSourceDimension(t);r&&(o=r.name)}e.push(o)}return e},e.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},e}();function pI(e){return e instanceof hI}function fI(e){for(var t=qs(),n=0;n<(e||[]).length;n++){var o=e[n],i=Ns(o)?o.name:o;null!=i&&null==t.get(i)&&t.set(i,n)}return t}function gI(e){var t=cI(e);return t.dimNameMap||(t.dimNameMap=fI(e.dimensionsDefine))}function vI(e){return e>30}var mI,yI,xI,_I,wI,bI,SI,CI=Ns,MI=xs,TI="undefined"==typeof Int32Array?Array:Int32Array,II=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],kI=["_approximateExtent"],DI=function(){function e(e,t){var n;this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var o=!1;pI(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(o=!0,n=e),n=n||["x","y"];for(var i={},r=[],a={},l=!1,s={},u=0;u<n.length;u++){var c=n[u],d=Is(c)?new uI({name:c}):c instanceof uI?c:new uI(c),h=d.name;d.type=d.type||"float",d.coordDim||(d.coordDim=h,d.coordDimIndex=0);var p=d.otherDims=d.otherDims||{};r.push(h),i[h]=d,null!=s[h]&&(l=!0),d.createInvertedIndices&&(a[h]=[]),0===p.itemName&&(this._nameDimIdx=u),0===p.itemId&&(this._idDimIdx=u),"production"!==process.env.NODE_ENV&&Hs(o||d.storeDimIndex>=0),o&&(d.storeDimIndex=u)}if(this.dimensions=r,this._dimInfos=i,this._initGetDimensionInfo(l),this.hostModel=t,this._invertedIndicesMap=a,this._dimOmitted){var f=this._dimIdxToName=qs();ys(r,function(e){f.set(i[e].storeDimIndex,e)})}}return e.prototype.getDimension=function(e){var t=this._recognizeDimIndex(e);if(null==t)return e;if(t=e,!this._dimOmitted)return this.dimensions[t];var n=this._dimIdxToName.get(t);if(null!=n)return n;var o=this._schema.getSourceDimension(t);return o?o.name:void 0},e.prototype.getDimensionIndex=function(e){var t=this._recognizeDimIndex(e);if(null!=t)return t;if(null==e)return-1;var n=this._getDimInfo(e);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1},e.prototype._recognizeDimIndex=function(e){if(Ds(e)||null!=e&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e},e.prototype._getStoreDimIndex=function(e){var t=this.getDimensionIndex(e);if("production"!==process.env.NODE_ENV&&null==t)throw new Error("Unknown dimension "+e);return t},e.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},e.prototype._initGetDimensionInfo=function(e){var t=this._dimInfos;this._getDimInfo=e?function(e){return t.hasOwnProperty(e)?t[e]:void 0}:function(e){return t[e]}},e.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},e.prototype.mapDimension=function(e,t){var n=this._dimSummary;if(null==t)return n.encodeFirstDimNotExtra[e];var o=n.encode[e];return o?o[t]:null},e.prototype.mapDimensionsAll=function(e){return(this._dimSummary.encode[e]||[]).slice()},e.prototype.getStore=function(){return this._store},e.prototype.initData=function(e,t,n){var o,i=this;if(e instanceof SS&&(o=e),!o){var r=this.dimensions,a=Mb(e)||ms(e)?new Ab(e,r.length):e;o=new SS;var l=MI(r,function(e){return{type:i._dimInfos[e].type,property:e}});o.initData(a,l,n)}this._store=o,this._nameList=(t||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,o.count()),this._dimSummary=function(e,t){var n={},o=n.encode={},i=qs(),r=[],a=[],l={};ys(e.dimensions,function(t){var n,s=e.getDimensionInfo(t),u=s.coordDim;if(u){"production"!==process.env.NODE_ENV&&Hs(null==cw.get(u));var c=s.coordDimIndex;lI(o,u)[c]=t,s.isExtraCoord||(i.set(u,1),"ordinal"!==(n=s.type)&&"time"!==n&&(r[0]=t),lI(l,u)[c]=e.getDimensionIndex(s.name)),s.defaultTooltip&&a.push(t)}cw.each(function(e,t){var n=lI(o,t),i=s.otherDims[t];null!=i&&!1!==i&&(n[i]=s.name)})});var s=[],u={};i.each(function(e,t){var n=o[t];u[t]=n[0],s=s.concat(n)}),n.dataDimsOnCoord=s,n.dataDimIndicesOnCoord=xs(s,function(t){return e.getDimensionInfo(t).storeDimIndex}),n.encodeFirstDimNotExtra=u;var c=o.label;c&&c.length&&(r=c.slice());var d=o.tooltip;return d&&d.length?a=d.slice():a.length||(a=r.slice()),o.defaultedLabel=r,o.defaultedTooltip=a,n.userOutput=new aI(l,t),n}(this,this._schema),this.userOutput=this._dimSummary.userOutput},e.prototype.appendData=function(e){var t=this._store.appendData(e);this._doInit(t[0],t[1])},e.prototype.appendValues=function(e,t){var n=this._store.appendValues(e,t&&t.length),o=n.start,i=n.end,r=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),t)for(var a=o;a<i;a++){var l=a-o;this._nameList[a]=t[l],r&&SI(this,a)}},e.prototype._updateOrdinalMeta=function(){for(var e=this._store,t=this.dimensions,n=0;n<t.length;n++){var o=this._dimInfos[t[n]];o.ordinalMeta&&e.collectOrdinalMeta(o.storeDimIndex,o.ordinalMeta)}},e.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return null==this._idDimIdx&&e.getSource().sourceFormat!==gw&&!e.fillStorage},e.prototype._doInit=function(e,t){if(!(e>=t)){var n=this._store.getProvider();this._updateOrdinalMeta();var o=this._nameList,i=this._idList;if(n.getSource().sourceFormat===dw&&!n.pure)for(var r=[],a=e;a<t;a++){var l=n.getItem(a,r);if(!this.hasItemOption&&Jp(l)&&(this.hasItemOption=!0),l){var s=l.name;null==o[a]&&null!=s&&(o[a]=nf(s,null));var u=l.id;null==i[a]&&null!=u&&(i[a]=nf(u,null))}}if(this._shouldMakeIdFromName())for(a=e;a<t;a++)SI(this,a);mI(this)}},e.prototype.getApproximateExtent=function(e){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e))},e.prototype.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},e.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},e.prototype.setCalculationInfo=function(e,t){CI(e)?ps(this._calculationInfo,e):this._calculationInfo[e]=t},e.prototype.getName=function(e){var t=this.getRawIndex(e),n=this._nameList[t];return null==n&&null!=this._nameDimIdx&&(n=xI(this,this._nameDimIdx,t)),null==n&&(n=""),n},e.prototype._getCategory=function(e,t){var n=this._store.get(e,t),o=this._store.getOrdinalMeta(e);return o?o.categories[n]:n},e.prototype.getId=function(e){return yI(this,this.getRawIndex(e))},e.prototype.count=function(){return this._store.count()},e.prototype.get=function(e,t){var n=this._store,o=this._dimInfos[e];if(o)return n.get(o.storeDimIndex,t)},e.prototype.getByRawIndex=function(e,t){var n=this._store,o=this._dimInfos[e];if(o)return n.getByRawIndex(o.storeDimIndex,t)},e.prototype.getIndices=function(){return this._store.getIndices()},e.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e))},e.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},e.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},e.prototype.getValues=function(e,t){var n=this,o=this._store;return Ms(e)?o.getValues(MI(e,function(e){return n._getStoreDimIndex(e)}),t):o.getValues(e)},e.prototype.hasValue=function(e){for(var t=this._dimSummary.dataDimIndicesOnCoord,n=0,o=t.length;n<o;n++)if(isNaN(this._store.get(t[n],e)))return!1;return!0},e.prototype.indexOfName=function(e){for(var t=0,n=this._store.count();t<n;t++)if(this.getName(t)===e)return t;return-1},e.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},e.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},e.prototype.rawIndexOf=function(e,t){var n=e&&this._invertedIndicesMap[e];if("production"!==process.env.NODE_ENV&&!n)throw new Error("Do not supported yet");var o=n&&n[t];return null==o||isNaN(o)?-1:o},e.prototype.indicesOfNearest=function(e,t,n){return this._store.indicesOfNearest(this._getStoreDimIndex(e),t,n)},e.prototype.each=function(e,t,n){Ts(e)&&(n=t,t=e,e=[]);var o=n||this,i=MI(_I(e),this._getStoreDimIndex,this);this._store.each(i,o?Ss(t,o):t)},e.prototype.filterSelf=function(e,t,n){Ts(e)&&(n=t,t=e,e=[]);var o=n||this,i=MI(_I(e),this._getStoreDimIndex,this);return this._store=this._store.filter(i,o?Ss(t,o):t),this},e.prototype.selectRange=function(e){var t=this,n={};return ys(bs(e),function(o){var i=t._getStoreDimIndex(o);n[i]=e[o]}),this._store=this._store.selectRange(n),this},e.prototype.mapArray=function(e,t,n){Ts(e)&&(n=t,t=e,e=[]),n=n||this;var o=[];return this.each(e,function(){o.push(t&&t.apply(this,arguments))},n),o},e.prototype.map=function(e,t,n,o){var i=n||o||this,r=MI(_I(e),this._getStoreDimIndex,this),a=bI(this);return a._store=this._store.map(r,i?Ss(t,i):t),a},e.prototype.modify=function(e,t,n,o){var i=this,r=n||o||this;"production"!==process.env.NODE_ENV&&ys(_I(e),function(e){i.getDimensionInfo(e).isCalculationCoord});var a=MI(_I(e),this._getStoreDimIndex,this);this._store.modify(a,r?Ss(t,r):t)},e.prototype.downSample=function(e,t,n,o){var i=bI(this);return i._store=this._store.downSample(this._getStoreDimIndex(e),t,n,o),i},e.prototype.minmaxDownSample=function(e,t){var n=bI(this);return n._store=this._store.minmaxDownSample(this._getStoreDimIndex(e),t),n},e.prototype.lttbDownSample=function(e,t){var n=bI(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(e),t),n},e.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},e.prototype.getItemModel=function(e){var t=this.hostModel,n=this.getRawDataItem(e);return new Kx(n,t,t&&t.ecModel)},e.prototype.diff=function(e){var t=this;return new rI(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(t){return yI(e,t)},function(e){return yI(t,e)})},e.prototype.getVisual=function(e){var t=this._visual;return t&&t[e]},e.prototype.setVisual=function(e,t){this._visual=this._visual||{},CI(e)?ps(this._visual,e):this._visual[e]=t},e.prototype.getItemVisual=function(e,t){var n=this._itemVisuals[e],o=n&&n[t];return null==o?this.getVisual(t):o},e.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},e.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,o=n[e];o||(o=n[e]={});var i=o[t];return null==i&&(Ms(i=this.getVisual(t))?i=i.slice():CI(i)&&(i=ps({},i)),o[t]=i),i},e.prototype.setItemVisual=function(e,t,n){var o=this._itemVisuals[e]||{};this._itemVisuals[e]=o,CI(t)?ps(o,t):o[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){CI(e)?ps(this._layout,e):this._layout[e]=t},e.prototype.getLayout=function(e){return this._layout[e]},e.prototype.getItemLayout=function(e){return this._itemLayouts[e]},e.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?ps(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){var n=this.hostModel&&this.hostModel.seriesIndex;Ev(n,this.dataType,e,t),this._graphicEls[e]=t},e.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},e.prototype.eachItemGraphicEl=function(e,t){ys(this._graphicEls,function(n,o){n&&e&&e.call(t,n,o)})},e.prototype.cloneShallow=function(t){return t||(t=new e(this._schema?this._schema:MI(this.dimensions,this._getDimInfo,this),this.hostModel)),wI(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];Ts(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(Fs(arguments)))})},e.internalField=(mI=function(e){var t=e._invertedIndicesMap;ys(t,function(n,o){var i=e._dimInfos[o],r=i.ordinalMeta,a=e._store;if(r){n=t[o]=new TI(r.categories.length);for(var l=0;l<n.length;l++)n[l]=-1;for(l=0;l<a.count();l++)n[a.get(i.storeDimIndex,l)]=l}})},xI=function(e,t,n){return nf(e._getCategory(t,n),null)},yI=function(e,t){var n=e._idList[t];return null==n&&null!=e._idDimIdx&&(n=xI(e,e._idDimIdx,t)),null==n&&(n="e\0\0"+t),n},_I=function(e){return Ms(e)||(e=null!=e?[e]:[]),e},bI=function(t){var n=new e(t._schema?t._schema:MI(t.dimensions,t._getDimInfo,t),t.hostModel);return wI(n,t),n},wI=function(e,t){ys(II.concat(t.__wrappedMethods||[]),function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e.__wrappedMethods=t.__wrappedMethods,ys(kI,function(n){e[n]=cs(t[n])}),e._calculationInfo=ps({},t._calculationInfo)},void(SI=function(e,t){var n=e._nameList,o=e._idList,i=e._nameDimIdx,r=e._idDimIdx,a=n[t],l=o[t];if(null==a&&null!=i&&(n[t]=a=xI(e,i,t)),null==l&&null!=r&&(o[t]=l=xI(e,r,t)),null==l&&null!=a){var s=e._nameRepeatCount,u=s[a]=(s[a]||0)+1;l=a,u>1&&(l+="__ec__"+u),o[t]=l}})),e}();function NI(e,t){Mb(e)||(e=Ib(e));var n=(t=t||{}).coordDimensions||[],o=t.dimensionsDefine||e.dimensionsDefine||[],i=qs(),r=[],a=function(e,t,n,o){var i=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,o||0);return ys(t,function(e){var t;Ns(e)&&(t=e.dimsDef)&&(i=Math.max(i,t.length))}),i}(e,n,o,t.dimensionsCount),l=t.canOmitUnusedDimensions&&vI(a),s=o===e.dimensionsDefine,u=s?gI(e):fI(o),c=t.encodeDefine;!c&&t.encodeDefaulter&&(c=t.encodeDefaulter(e,a));for(var d=qs(c),h=new vS(a),p=0;p<h.length;p++)h[p]=-1;function f(e){var t=h[e];if(t<0){var n=o[e],i=Ns(n)?n:{name:n},a=new uI,l=i.name;null!=l&&null!=u.get(l)&&(a.name=a.displayName=l),null!=i.type&&(a.type=i.type),null!=i.displayName&&(a.displayName=i.displayName);var s=r.length;return h[e]=s,a.storeDimIndex=e,r.push(a),a}return r[t]}if(!l)for(p=0;p<a;p++)f(p);d.each(function(e,t){var n=jp(e).slice();if(1===n.length&&!Is(n[0])&&n[0]<0)d.set(t,!1);else{var o=d.set(t,[]);ys(n,function(e,n){var i=Is(e)?u.get(e):e;null!=i&&i<a&&(o[n]=i,v(f(i),t,n))})}});var g=0;function v(e,t,n){null!=cw.get(t)?e.otherDims[t]=n:(e.coordDim=t,e.coordDimIndex=n,i.set(t,!0))}ys(n,function(e){var t,n,o,i;if(Is(e))t=e,i={};else{t=(i=e).name;var r=i.ordinalMeta;i.ordinalMeta=null,(i=ps({},i)).ordinalMeta=r,n=i.dimsDef,o=i.otherDims,i.name=i.coordDim=i.coordDimIndex=i.dimsDef=i.otherDims=null}var l=d.get(t);if(!1!==l){if(!(l=jp(l)).length)for(var u=0;u<(n&&n.length||1);u++){for(;g<a&&null!=f(g).coordDim;)g++;g<a&&l.push(g++)}ys(l,function(e,r){var a=f(e);if(s&&null!=i.type&&(a.type=i.type),v(fs(a,i),t,r),null==a.name&&n){var l=n[r];!Ns(l)&&(l={name:l}),a.name=a.displayName=l.name,a.defaultTooltip=l.defaultTooltip}o&&fs(a.otherDims,o)})}});var m=t.generateCoord,y=t.generateCoordCount,x=null!=y;y=m?y||1:0;var _=m||"value";function w(e){null==e.name&&(e.name=e.coordDim)}if(l)ys(r,function(e){w(e)}),r.sort(function(e,t){return e.storeDimIndex-t.storeDimIndex});else for(var b=0;b<a;b++){var S=f(b);null==S.coordDim&&(S.coordDim=EI(_,i,x),S.coordDimIndex=0,(!m||y<=0)&&(S.isExtraCoord=!0),y--),w(S),null!=S.type||Tw(e,b)!==xw&&(!S.isExtraCoord||null==S.otherDims.itemName&&null==S.otherDims.seriesName)||(S.type="ordinal")}return function(e){for(var t=qs(),n=0;n<e.length;n++){var o=e[n],i=o.name,r=t.get(i)||0;r>0&&(o.name=i+(r-1)),r++,t.set(i,r)}}(r),new hI({source:e,dimensions:r,fullDimensionCount:a,dimensionOmitted:l})}function EI(e,t,n){if(n||t.hasKey(e)){for(var o=0;t.hasKey(e+o);)o++;e+=o}return t.set(e,!0),e}var AI=function(){return function(e){this.coordSysDims=[],this.axisMap=qs(),this.categoryAxisMap=qs(),this.coordSysName=e}}();var LI={cartesian2d:function(e,t,n,o){var i=e.getReferringComponents("xAxis",pf).models[0],r=e.getReferringComponents("yAxis",pf).models[0];if("production"!==process.env.NODE_ENV){if(!i)throw new Error('xAxis "'+Bs(e.get("xAxisIndex"),e.get("xAxisId"),0)+'" not found');if(!r)throw new Error('yAxis "'+Bs(e.get("xAxisIndex"),e.get("yAxisId"),0)+'" not found')}t.coordSysDims=["x","y"],n.set("x",i),n.set("y",r),VI(i)&&(o.set("x",i),t.firstCategoryDimIndex=0),VI(r)&&(o.set("y",r),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},singleAxis:function(e,t,n,o){var i=e.getReferringComponents("singleAxis",pf).models[0];if("production"!==process.env.NODE_ENV&&!i)throw new Error("singleAxis should be specified.");t.coordSysDims=["single"],n.set("single",i),VI(i)&&(o.set("single",i),t.firstCategoryDimIndex=0)},polar:function(e,t,n,o){var i=e.getReferringComponents("polar",pf).models[0],r=i.findAxisModel("radiusAxis"),a=i.findAxisModel("angleAxis");if("production"!==process.env.NODE_ENV){if(!a)throw new Error("angleAxis option not found");if(!r)throw new Error("radiusAxis option not found")}t.coordSysDims=["radius","angle"],n.set("radius",r),n.set("angle",a),VI(r)&&(o.set("radius",r),t.firstCategoryDimIndex=0),VI(a)&&(o.set("angle",a),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},geo:function(e,t,n,o){t.coordSysDims=["lng","lat"]},parallel:function(e,t,n,o){var i=e.ecModel,r=i.getComponent("parallel",e.get("parallelIndex")),a=t.coordSysDims=r.dimensions.slice();ys(r.parallelAxisIndex,function(e,r){var l=i.getComponent("parallelAxis",e),s=a[r];n.set(s,l),VI(l)&&(o.set(s,l),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=r))})}};function VI(e){return"category"===e.get("type")}function OI(e,t,n){var o,i,r,a=(n=n||{}).byIndex,l=n.stackedCoordDimension;!function(e){return!pI(e.schema)}(t)?(i=t.schema,o=i.dimensions,r=t.store):o=t;var s,u,c,d,h=!(!e||!e.get("stack"));if(ys(o,function(e,t){Is(e)&&(o[t]=e={name:e}),h&&!e.isExtraCoord&&(a||s||!e.ordinalMeta||(s=e),u||"ordinal"===e.type||"time"===e.type||l&&l!==e.coordDim||(u=e))}),!u||a||s||(a=!0),u){c="__\0ecstackresult_"+e.id,d="__\0ecstackedover_"+e.id,s&&(s.createInvertedIndices=!0);var p=u.coordDim,f=u.type,g=0;ys(o,function(e){e.coordDim===p&&g++});var v={name:c,coordDim:p,coordDimIndex:g,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:o.length},m={name:d,coordDim:d,coordDimIndex:g+1,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:o.length+1};i?(r&&(v.storeDimIndex=r.ensureCalculationDimension(d,f),m.storeDimIndex=r.ensureCalculationDimension(c,f)),i.appendCalculationDimension(v),i.appendCalculationDimension(m)):(o.push(v),o.push(m))}return{stackedDimension:u&&u.name,stackedByDimension:s&&s.name,isStackedByIndex:a,stackedOverDimension:d,stackResultDimension:c}}function PI(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}function BI(e,t){return PI(e,t)?e.getCalculationInfo("stackResultDimension"):t}function RI(e,t,n){n=n||{};var o,i=t.getSourceManager(),r=!1;e?(r=!0,o=Ib(e)):r=(o=i.getSource()).sourceFormat===dw;var a=function(e){var t=e.get("coordinateSystem"),n=new AI(t),o=LI[t];if(o)return o(e,n,n.axisMap,n.categoryAxisMap),n}(t),l=function(e,t){var n,o=e.get("coordinateSystem"),i=jw.get(o);return t&&t.coordSysDims&&(n=xs(t.coordSysDims,function(e){var n={name:e},o=t.axisMap.get(e);if(o){var i=o.get("type");n.type=sI(i)}return n})),n||(n=i&&(i.getDimensionsInfo?i.getDimensionsInfo():i.dimensions.slice())||["x","y"]),n}(t,a),s=n.useEncodeDefaulter,u=Ts(s)?s:s?Cs(Sw,l,t):null,c=NI(o,{coordDimensions:l,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!r}),d=function(e,t,n){var o,i;return n&&ys(e,function(e,r){var a=e.coordDim,l=n.categoryAxisMap.get(a);l&&(null==o&&(o=r),e.ordinalMeta=l.getOrdinalMeta(),t&&(e.createInvertedIndices=!0)),null!=e.otherDims.itemName&&(i=!0)}),i||null==o||(e[o].otherDims.itemName=0),o}(c.dimensions,n.createInvertedIndices,a),h=r?null:i.getSharedDataStore(c),p=OI(t,{schema:c,store:h}),f=new DI(c,t);f.setCalculationInfo(p);var g=null!=d&&function(e){if(e.sourceFormat===dw){var t=function(e){var t=0;for(;t<e.length&&null==e[t];)t++;return e[t]}(e.data||[]);return!Ms(Kp(t))}}(o)?function(e,t,n,o){return o===d?n:this.defaultDimValueGetter(e,t,n,o)}:null;return f.hasItemOption=!1,f.initData(r?o:h,null,g),f}var zI=function(){function e(e){this._setting=e||{},this._extent=[1/0,-1/0]}return e.prototype.getSetting=function(e){return this._setting[e]},e.prototype.unionExtent=function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1])},e.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(t)||(n[1]=t)},e.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(e){this._isBlank=e},e}();If(zI);var FI=0,GI=function(){function e(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++FI}return e.createByAxisModel=function(t){var n=t.option,o=n.data,i=o&&xs(o,HI);return new e({categories:i,needCollect:!i,deduplication:!1!==n.dedplication})},e.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},e.prototype.parseAndCollect=function(e){var t,n=this._needCollect;if(!Is(e)&&!n)return e;if(n&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,t;var o=this._getOrCreateMap();return null==(t=o.get(e))&&(n?(t=this.categories.length,this.categories[t]=e,o.set(e,t)):t=NaN),t},e.prototype._getOrCreateMap=function(){return this._map||(this._map=qs(this.categories))},e}();function HI(e){return Ns(e)&&null!=e.value?e.value:e+""}function WI(e){return"interval"===e.type||"log"===e.type}function UI(e,t,n,o){var i={},r=e[1]-e[0],a=i.interval=kp(r/t);null!=n&&a<n&&(a=i.interval=n),null!=o&&a>o&&(a=i.interval=o);var l=i.intervalPrecision=ZI(a);return function(e,t){!isFinite(e[0])&&(e[0]=t[0]),!isFinite(e[1])&&(e[1]=t[1]),XI(e,0,t),XI(e,1,t),e[0]>e[1]&&(e[0]=e[1])}(i.niceTickExtent=[vp(Math.ceil(e[0]/a)*a,l),vp(Math.floor(e[1]/a)*a,l)],e),i}function YI(e){var t=Math.pow(10,Ip(e)),n=e/t;return n?2===n?n=3:3===n?n=5:n*=2:n=1,vp(n*t)}function ZI(e){return yp(e)+2}function XI(e,t,n){e[t]=Math.max(Math.min(e[t],n[1]),n[0])}function jI(e,t){return e>=t[0]&&e<=t[1]}function $I(e,t){return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])}function qI(e,t){return e*(t[1]-t[0])+t[0]}var KI=function(e){function t(t){var n=e.call(this,t)||this;n.type="ordinal";var o=n.getSetting("ordinalMeta");return o||(o=new GI({})),Ms(o)&&(o=new GI({categories:xs(o,function(e){return Ns(e)?e.value:e})})),n._ordinalMeta=o,n._extent=n.getSetting("extent")||[0,o.categories.length-1],n}return Wl(t,e),t.prototype.parse=function(e){return null==e?NaN:Is(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return jI(e=this.parse(e),this._extent)&&null!=this._ordinalMeta.categories[e]},t.prototype.normalize=function(e){return $I(e=this._getTickNumber(this.parse(e)),this._extent)},t.prototype.scale=function(e){return e=Math.round(qI(e,this._extent)),this.getRawOrdinalNumber(e)},t.prototype.getTicks=function(){for(var e=[],t=this._extent,n=t[0];n<=t[1];)e.push({value:n}),n++;return e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(null!=e){for(var t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],o=this._ticksByOrdinalNumber=[],i=0,r=this._ordinalMeta.categories.length,a=Math.min(r,t.length);i<a;++i){var l=t[i];n[i]=l,o[l]=i}for(var s=0;i<r;++i){for(;null!=o[s];)s++;n.push(s),o[s]=i}}else this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null},t.prototype._getTickNumber=function(e){var t=this._ticksByOrdinalNumber;return t&&e>=0&&e<t.length?t[e]:e},t.prototype.getRawOrdinalNumber=function(e){var t=this._ordinalNumbersByTick;return t&&e>=0&&e<t.length?t[e]:e},t.prototype.getLabel=function(e){if(!this.isBlank()){var t=this.getRawOrdinalNumber(e.value),n=this._ordinalMeta.categories[t];return null==n?"":n+""}},t.prototype.count=function(){return this._extent[1]-this._extent[0]+1},t.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},t.prototype.isInExtentRange=function(e){return e=this._getTickNumber(e),this._extent[0]<=e&&this._extent[1]>=e},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t}(zI);zI.registerClass(KI);var JI=vp,QI=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return Wl(t,e),t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return jI(e,this._extent)},t.prototype.normalize=function(e){return $I(e,this._extent)},t.prototype.scale=function(e){return qI(e,this._extent)},t.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=parseFloat(e)),isNaN(t)||(n[1]=parseFloat(t))},t.prototype.unionExtent=function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1]),this.setExtent(t[0],t[1])},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=ZI(e)},t.prototype.getTicks=function(e){var t=this._interval,n=this._extent,o=this._niceExtent,i=this._intervalPrecision,r=[];if(!t)return r;n[0]<o[0]&&(e?r.push({value:JI(o[0]-t,i)}):r.push({value:n[0]}));for(var a=o[0];a<=o[1]&&(r.push({value:a}),(a=JI(a+t,i))!==r[r.length-1].value);)if(r.length>1e4)return[];var l=r.length?r[r.length-1].value:o[1];return n[1]>l&&(e?r.push({value:JI(l+t,i)}):r.push({value:n[1]})),r},t.prototype.getMinorTicks=function(e){for(var t=this.getTicks(!0),n=[],o=this.getExtent(),i=1;i<t.length;i++){for(var r=t[i],a=t[i-1],l=0,s=[],u=(r.value-a.value)/e;l<e-1;){var c=JI(a.value+(l+1)*u);c>o[0]&&c<o[1]&&s.push(c),l++}n.push(s)}return n},t.prototype.getLabel=function(e,t){if(null==e)return"";var n=t&&t.precision;return null==n?n=yp(e.value)||0:"auto"===n&&(n=this._intervalPrecision),z_(JI(e.value,n,!0))},t.prototype.calcNiceTicks=function(e,t,n){e=e||5;var o=this._extent,i=o[1]-o[0];if(isFinite(i)){i<0&&(i=-i,o.reverse());var r=UI(o,e,t,n);this._intervalPrecision=r.intervalPrecision,this._interval=r.interval,this._niceExtent=r.niceTickExtent}},t.prototype.calcNiceExtent=function(e){var t=this._extent;if(t[0]===t[1])if(0!==t[0]){var n=Math.abs(t[0]);e.fixMax||(t[1]+=n/2),t[0]-=n/2}else t[1]=1;var o=t[1]-t[0];isFinite(o)||(t[0]=0,t[1]=1),this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval);var i=this._interval;e.fixMin||(t[0]=JI(Math.floor(t[0]/i)*i)),e.fixMax||(t[1]=JI(Math.ceil(t[1]/i)*i))},t.prototype.setNiceExtent=function(e,t){this._niceExtent=[e,t]},t.type="interval",t}(zI);zI.registerClass(QI);var ek="undefined"!=typeof Float32Array,tk=ek?Float32Array:Array;function nk(e){return Ms(e)?ek?new Float32Array(e):e:new tk(e)}var ok="__ec_stack_";function ik(e){return e.get("stack")||ok+e.seriesIndex}function rk(e){return e.dim+e.index}function ak(e,t){var n=[];return t.eachSeriesByType(e,function(e){dk(e)&&n.push(e)}),n}function lk(e){var t=function(e){var t={};ys(e,function(e){var n=e.coordinateSystem.getBaseAxis();if("time"===n.type||"value"===n.type)for(var o=e.getData(),i=n.dim+"_"+n.index,r=o.getDimensionIndex(o.mapDimension(n.dim)),a=o.getStore(),l=0,s=a.count();l<s;++l){var u=a.get(r,l);t[i]?t[i].push(u):t[i]=[u]}});var n={};for(var o in t)if(t.hasOwnProperty(o)){var i=t[o];if(i){i.sort(function(e,t){return e-t});for(var r=null,a=1;a<i.length;++a){var l=i[a]-i[a-1];l>0&&(r=null===r?l:Math.min(r,l))}n[o]=r}}return n}(e),n=[];return ys(e,function(e){var o,i=e.coordinateSystem.getBaseAxis(),r=i.getExtent();if("category"===i.type)o=i.getBandWidth();else if("value"===i.type||"time"===i.type){var a=i.dim+"_"+i.index,l=t[a],s=Math.abs(r[1]-r[0]),u=i.scale.getExtent(),c=Math.abs(u[1]-u[0]);o=l?s/c*l:s}else{var d=e.getData();o=Math.abs(r[1]-r[0])/d.count()}var h=gp(e.get("barWidth"),o),p=gp(e.get("barMaxWidth"),o),f=gp(e.get("barMinWidth")||(hk(e)?.5:1),o),g=e.get("barGap"),v=e.get("barCategoryGap");n.push({bandWidth:o,barWidth:h,barMaxWidth:p,barMinWidth:f,barGap:g,barCategoryGap:v,axisKey:rk(i),stackId:ik(e)})}),sk(n)}function sk(e){var t={};ys(e,function(e,n){var o=e.axisKey,i=e.bandWidth,r=t[o]||{bandWidth:i,remainedWidth:i,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},a=r.stacks;t[o]=r;var l=e.stackId;a[l]||r.autoWidthCount++,a[l]=a[l]||{width:0,maxWidth:0};var s=e.barWidth;s&&!a[l].width&&(a[l].width=s,s=Math.min(r.remainedWidth,s),r.remainedWidth-=s);var u=e.barMaxWidth;u&&(a[l].maxWidth=u);var c=e.barMinWidth;c&&(a[l].minWidth=c);var d=e.barGap;null!=d&&(r.gap=d);var h=e.barCategoryGap;null!=h&&(r.categoryGap=h)});var n={};return ys(t,function(e,t){n[t]={};var o=e.stacks,i=e.bandWidth,r=e.categoryGap;if(null==r){var a=bs(o).length;r=Math.max(35-4*a,15)+"%"}var l=gp(r,i),s=gp(e.gap,1),u=e.remainedWidth,c=e.autoWidthCount,d=(u-l)/(c+(c-1)*s);d=Math.max(d,0),ys(o,function(e){var t=e.maxWidth,n=e.minWidth;if(e.width){o=e.width;t&&(o=Math.min(o,t)),n&&(o=Math.max(o,n)),e.width=o,u-=o+s*o,c--}else{var o=d;t&&t<o&&(o=Math.min(t,u)),n&&n>o&&(o=n),o!==d&&(e.width=o,u-=o+s*o,c--)}}),d=(u-l)/(c+(c-1)*s),d=Math.max(d,0);var h,p=0;ys(o,function(e,t){e.width||(e.width=d),h=e,p+=e.width*(1+s)}),h&&(p-=h.width*s);var f=-p/2;ys(o,function(e,o){n[t][o]=n[t][o]||{bandWidth:i,offset:f,width:e.width},f+=e.width*(1+s)})}),n}function uk(e,t){var n=ak(e,t),o=lk(n);ys(n,function(e){var t=e.getData(),n=e.coordinateSystem.getBaseAxis(),i=ik(e),r=o[rk(n)][i],a=r.offset,l=r.width;t.setLayout({bandWidth:r.bandWidth,offset:a,size:l})})}function ck(e){return{seriesType:e,plan:oC(),reset:function(e){if(dk(e)){var t=e.getData(),n=e.coordinateSystem,o=n.getBaseAxis(),i=n.getOtherAxis(o),r=t.getDimensionIndex(t.mapDimension(i.dim)),a=t.getDimensionIndex(t.mapDimension(o.dim)),l=e.get("showBackground",!0),s=t.mapDimension(i.dim),u=t.getCalculationInfo("stackResultDimension"),c=PI(t,s)&&!!t.getCalculationInfo("stackedOnSeries"),d=i.isHorizontal(),h=function(e,t){var n=t.model.get("startValue");n||(n=0);return t.toGlobalCoord(t.dataToCoord("log"===t.type?n>0?n:1:n))}(0,i),p=hk(e),f=e.get("barMinHeight")||0,g=u&&t.getDimensionIndex(u),v=t.getLayout("size"),m=t.getLayout("offset");return{progress:function(e,t){for(var o,i=e.count,s=p&&nk(3*i),u=p&&l&&nk(3*i),y=p&&nk(i),x=n.master.getRect(),_=d?x.width:x.height,w=t.getStore(),b=0;null!=(o=e.next());){var S=w.get(c?g:r,o),C=w.get(a,o),M=h,T=void 0;c&&(T=+S-w.get(r,o));var I=void 0,k=void 0,D=void 0,N=void 0;if(d){var E=n.dataToPoint([S,C]);if(c)M=n.dataToPoint([T,C])[0];I=M,k=E[1]+m,D=E[0]-M,N=v,Math.abs(D)<f&&(D=(D<0?-1:1)*f)}else{E=n.dataToPoint([C,S]);if(c)M=n.dataToPoint([C,T])[1];I=E[0]+m,k=M,D=v,N=E[1]-M,Math.abs(N)<f&&(N=(N<=0?-1:1)*f)}p?(s[b]=I,s[b+1]=k,s[b+2]=d?D:N,u&&(u[b]=d?x.x:I,u[b+1]=d?k:x.y,u[b+2]=_),y[o]=o):t.setItemLayout(o,{x:I,y:k,width:D,height:N}),b+=3}p&&t.setLayout({largePoints:s,largeDataIndices:y,largeBackgroundPoints:u,valueAxisHorizontal:d})}}}}}}function dk(e){return e.coordinateSystem&&"cartesian2d"===e.coordinateSystem.type}function hk(e){return e.pipelineContext&&e.pipelineContext.large}var pk=function(e){function t(t){var n=e.call(this,t)||this;return n.type="time",n}return Wl(t,e),t.prototype.getLabel=function(e){var t=this.getSetting("useUTC");return b_(e.value,v_[function(e){switch(e){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}(__(this._minLevelUnit))]||v_.second,t,this.getSetting("locale"))},t.prototype.getFormattedLabel=function(e,t,n){var o=this.getSetting("useUTC");return function(e,t,n,o,i){var r=null;if(Is(n))r=n;else if(Ts(n))r=n(e.value,t,{level:e.level});else{var a=ps({},f_);if(e.level>0)for(var l=0;l<m_.length;++l)a[m_[l]]="{primary|"+a[m_[l]]+"}";var s=n?!1===n.inherit?n:fs(n,a):a,u=S_(e.value,i);if(s[u])r=s[u];else if(s.inherit){for(l=y_.indexOf(u)-1;l>=0;--l)if(s[u]){r=s[u];break}r=r||a.none}if(Ms(r)){var c=null==e.level?0:e.level>=0?e.level:r.length+e.level;r=r[c=Math.min(c,r.length-1)]}}return b_(new Date(e.value),r,i,o)}(e,t,n,this.getSetting("locale"),o)},t.prototype.getTicks=function(){var e=this._interval,t=this._extent,n=[];if(!e)return n;n.push({value:t[0],level:0});var o=this.getSetting("useUTC"),i=function(e,t,n,o){var i=1e4,r=y_,a=0;function l(e,t,n,i,r,a,l){for(var s=new Date(t),u=t,c=s[i]();u<n&&u<=o[1];)l.push({value:u}),c+=e,s[r](c),u=s.getTime();l.push({value:u,notAdd:!0})}function s(e,i,r){var a=[],s=!i.length;if(!function(e,t,n,o){var i=Tp(t),r=Tp(n),a=function(e){return C_(i,e,o)===C_(r,e,o)},l=function(){return a("year")},s=function(){return l()&&a("month")},u=function(){return s()&&a("day")},c=function(){return u()&&a("hour")},d=function(){return c()&&a("minute")},h=function(){return d()&&a("second")},p=function(){return h()&&a("millisecond")};switch(e){case"year":return l();case"month":return s();case"day":return u();case"hour":return c();case"minute":return d();case"second":return h();case"millisecond":return p()}}(__(e),o[0],o[1],n)){s&&(i=[{value:_k(new Date(o[0]),e,n)},{value:o[1]}]);for(var u=0;u<i.length-1;u++){var c=i[u].value,d=i[u+1].value;if(c!==d){var h=void 0,p=void 0,f=void 0,g=!1;switch(e){case"year":h=Math.max(1,Math.round(t/h_/365)),p=M_(n),f=A_(n);break;case"half-year":case"quarter":case"month":h=vk(t),p=T_(n),f=L_(n);break;case"week":case"half-week":case"day":h=gk(t),p=I_(n),f=V_(n),g=!0;break;case"half-day":case"quarter-day":case"hour":h=mk(t),p=k_(n),f=O_(n);break;case"minute":h=yk(t,!0),p=D_(n),f=P_(n);break;case"second":h=yk(t,!1),p=N_(n),f=B_(n);break;case"millisecond":h=xk(t),p=E_(n),f=R_(n)}l(h,c,d,p,f,g,a),"year"===e&&r.length>1&&0===u&&r.unshift({value:r[0].value-h})}}for(u=0;u<a.length;u++)r.push(a[u]);return a}}for(var u=[],c=[],d=0,h=0,p=0;p<r.length&&a++<i;++p){var f=__(r[p]);if(w_(r[p]))if(s(r[p],u[u.length-1]||[],c),f!==(r[p+1]?__(r[p+1]):null)){if(c.length){h=d,c.sort(function(e,t){return e.value-t.value});for(var g=[],v=0;v<c.length;++v){var m=c[v].value;0!==v&&c[v-1].value===m||(g.push(c[v]),m>=o[0]&&m<=o[1]&&d++)}var y=(o[1]-o[0])/t;if(d>1.5*y&&h>y/1.5)break;if(u.push(g),d>y||e===r[p])break}c=[]}}"production"!==process.env.NODE_ENV&&a>=i&&zp("Exceed safe limit.");var x=ws(xs(u,function(e){return ws(e,function(e){return e.value>=o[0]&&e.value<=o[1]&&!e.notAdd})}),function(e){return e.length>0}),_=[],w=x.length-1;for(p=0;p<x.length;++p)for(var b=x[p],S=0;S<b.length;++S)_.push({value:b[S].value,level:w-p});_.sort(function(e,t){return e.value-t.value});var C=[];for(p=0;p<_.length;++p)0!==p&&_[p].value===_[p-1].value||C.push(_[p]);return C}(this._minLevelUnit,this._approxInterval,o,t);return(n=n.concat(i)).push({value:t[1],level:0}),n},t.prototype.calcNiceExtent=function(e){var t=this._extent;if(t[0]===t[1]&&(t[0]-=h_,t[1]+=h_),t[1]===-1/0&&t[0]===1/0){var n=new Date;t[1]=+new Date(n.getFullYear(),n.getMonth(),n.getDate()),t[0]=t[1]-h_}this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval)},t.prototype.calcNiceTicks=function(e,t,n){e=e||10;var o=this._extent,i=o[1]-o[0];this._approxInterval=i/e,null!=t&&this._approxInterval<t&&(this._approxInterval=t),null!=n&&this._approxInterval>n&&(this._approxInterval=n);var r=fk.length,a=Math.min(function(e,t,n,o){for(;n<o;){var i=n+o>>>1;e[i][1]<t?n=i+1:o=i}return n}(fk,this._approxInterval,0,r),r-1);this._interval=fk[a][1],this._minLevelUnit=fk[Math.max(a-1,0)][0]},t.prototype.parse=function(e){return Ds(e)?e:+Tp(e)},t.prototype.contain=function(e){return jI(this.parse(e),this._extent)},t.prototype.normalize=function(e){return $I(this.parse(e),this._extent)},t.prototype.scale=function(e){return qI(e,this._extent)},t.type="time",t}(QI),fk=[["second",u_],["minute",c_],["hour",d_],["quarter-day",216e5],["half-day",432e5],["day",10368e4],["half-week",3024e5],["week",6048e5],["month",26784e5],["quarter",8208e6],["half-year",p_/2],["year",p_]];function gk(e,t){return(e/=h_)>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function vk(e){return(e/=2592e6)>6?6:e>3?3:e>2?2:1}function mk(e){return(e/=d_)>12?12:e>6?6:e>3.5?4:e>2?2:1}function yk(e,t){return(e/=t?c_:u_)>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function xk(e){return kp(e)}function _k(e,t,n){var o=new Date(e);switch(__(t)){case"year":case"month":o[L_(n)](0);case"day":o[V_(n)](1);case"hour":o[O_(n)](0);case"minute":o[P_(n)](0);case"second":o[B_(n)](0),o[R_(n)](0)}return o.getTime()}zI.registerClass(pk);var wk=zI.prototype,bk=QI.prototype,Sk=vp,Ck=Math.floor,Mk=Math.ceil,Tk=Math.pow,Ik=Math.log,kk=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="log",t.base=10,t._originalScale=new QI,t._interval=0,t}return Wl(t,e),t.prototype.getTicks=function(e){var t=this._originalScale,n=this._extent,o=t.getExtent();return xs(bk.getTicks.call(this,e),function(e){var t=e.value,i=vp(Tk(this.base,t));return i=t===n[0]&&this._fixMin?Nk(i,o[0]):i,{value:i=t===n[1]&&this._fixMax?Nk(i,o[1]):i}},this)},t.prototype.setExtent=function(e,t){var n=Ik(this.base);e=Ik(Math.max(0,e))/n,t=Ik(Math.max(0,t))/n,bk.setExtent.call(this,e,t)},t.prototype.getExtent=function(){var e=this.base,t=wk.getExtent.call(this);t[0]=Tk(e,t[0]),t[1]=Tk(e,t[1]);var n=this._originalScale.getExtent();return this._fixMin&&(t[0]=Nk(t[0],n[0])),this._fixMax&&(t[1]=Nk(t[1],n[1])),t},t.prototype.unionExtent=function(e){this._originalScale.unionExtent(e);var t=this.base;e[0]=Ik(e[0])/Ik(t),e[1]=Ik(e[1])/Ik(t),wk.unionExtent.call(this,e)},t.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},t.prototype.calcNiceTicks=function(e){e=e||10;var t=this._extent,n=t[1]-t[0];if(!(n===1/0||n<=0)){var o,i=(o=n,Math.pow(10,Ip(o)));for(e/n*i<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var r=[vp(Mk(t[0]/i)*i),vp(Ck(t[1]/i)*i)];this._interval=i,this._niceExtent=r}},t.prototype.calcNiceExtent=function(e){bk.calcNiceExtent.call(this,e),this._fixMin=e.fixMin,this._fixMax=e.fixMax},t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return jI(e=Ik(e)/Ik(this.base),this._extent)},t.prototype.normalize=function(e){return $I(e=Ik(e)/Ik(this.base),this._extent)},t.prototype.scale=function(e){return e=qI(e,this._extent),Tk(this.base,e)},t.type="log",t}(zI),Dk=kk.prototype;function Nk(e,t){return Sk(e,yp(t))}Dk.getMinorTicks=bk.getMinorTicks,Dk.getLabel=bk.getLabel,zI.registerClass(kk);var Ek=function(){function e(e,t,n){this._prepareParams(e,t,n)}return e.prototype._prepareParams=function(e,t,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var o=this._isOrdinal="ordinal"===e.type;this._needCrossZero="interval"===e.type&&t.getNeedCrossZero&&t.getNeedCrossZero();var i=t.get("min",!0);null==i&&(i=t.get("startValue",!0));var r=this._modelMinRaw=i;Ts(r)?this._modelMinNum=Ok(e,r({min:n[0],max:n[1]})):"dataMin"!==r&&(this._modelMinNum=Ok(e,r));var a=this._modelMaxRaw=t.get("max",!0);if(Ts(a)?this._modelMaxNum=Ok(e,a({min:n[0],max:n[1]})):"dataMax"!==a&&(this._modelMaxNum=Ok(e,a)),o)this._axisDataLen=t.getCategories().length;else{var l=t.get("boundaryGap"),s=Ms(l)?l:[l||0,l||0];"boolean"==typeof s[0]||"boolean"==typeof s[1]?(process.env.NODE_ENV,this._boundaryGapInner=[0,0]):this._boundaryGapInner=[$h(s[0],1),$h(s[1],1)]}},e.prototype.calculate=function(){var e=this._isOrdinal,t=this._dataMin,n=this._dataMax,o=this._axisDataLen,i=this._boundaryGapInner,r=e?null:n-t||Math.abs(t),a="dataMin"===this._modelMinRaw?t:this._modelMinNum,l="dataMax"===this._modelMaxRaw?n:this._modelMaxNum,s=null!=a,u=null!=l;null==a&&(a=e?o?0:NaN:t-i[0]*r),null==l&&(l=e?o?o-1:NaN:n+i[1]*r),(null==a||!isFinite(a))&&(a=NaN),(null==l||!isFinite(l))&&(l=NaN);var c=Ps(a)||Ps(l)||e&&!o;this._needCrossZero&&(a>0&&l>0&&!s&&(a=0),a<0&&l<0&&!u&&(l=0));var d=this._determinedMin,h=this._determinedMax;return null!=d&&(a=d,s=!0),null!=h&&(l=h,u=!0),{min:a,max:l,minFixed:s,maxFixed:u,isBlank:c}},e.prototype.modifyDataMinMax=function(e,t){"production"!==process.env.NODE_ENV&&Hs(!this.frozen),this[Lk[e]]=t},e.prototype.setDeterminedMinMax=function(e,t){var n=Ak[e];"production"!==process.env.NODE_ENV&&Hs(!this.frozen&&null==this[n]),this[n]=t},e.prototype.freeze=function(){this.frozen=!0},e}(),Ak={min:"_determinedMin",max:"_determinedMax"},Lk={min:"_dataMin",max:"_dataMax"};function Vk(e,t,n){var o=e.rawExtentInfo;return o||(o=new Ek(e,t,n),e.rawExtentInfo=o,o)}function Ok(e,t){return null==t?null:Ps(t)?NaN:e.parse(t)}function Pk(e,t){var n=e.type,o=Vk(e,t,e.getExtent()).calculate();e.setBlank(o.isBlank);var i=o.min,r=o.max,a=t.ecModel;if(a&&"time"===n){var l=ak("bar",a),s=!1;if(ys(l,function(e){s=s||e.getBaseAxis()===t.axis}),s){var u=lk(l),c=function(e,t,n,o){var i=n.axis.getExtent(),r=Math.abs(i[1]-i[0]),a=function(e,t){if(e&&t)return e[rk(t)]}(o,n.axis);if(void 0===a)return{min:e,max:t};var l=1/0;ys(a,function(e){l=Math.min(e.offset,l)});var s=-1/0;ys(a,function(e){s=Math.max(e.offset+e.width,s)}),l=Math.abs(l),s=Math.abs(s);var u=l+s,c=t-e,d=c/(1-(l+s)/r)-c;return t+=d*(s/u),e-=d*(l/u),{min:e,max:t}}(i,r,t,u);i=c.min,r=c.max}}return{extent:[i,r],fixMin:o.minFixed,fixMax:o.maxFixed}}function Bk(e,t){var n=t,o=Pk(e,n),i=o.extent,r=n.get("splitNumber");e instanceof kk&&(e.base=n.get("logBase"));var a=e.type,l=n.get("interval"),s="interval"===a||"time"===a;e.setExtent(i[0],i[1]),e.calcNiceExtent({splitNumber:r,fixMin:o.fixMin,fixMax:o.fixMax,minInterval:s?n.get("minInterval"):null,maxInterval:s?n.get("maxInterval"):null}),null!=l&&e.setInterval&&e.setInterval(l)}function Rk(e,t){if(t=t||e.get("type"))switch(t){case"category":return new KI({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:[1/0,-1/0]});case"time":return new pk({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new(zI.getClass(t)||QI)}}function zk(e){var t=e.getLabelModel().get("formatter"),n="category"===e.type?e.scale.getExtent()[0]:null;return"time"===e.scale.type?function(t){return function(n,o){return e.scale.getFormattedLabel(n,o,t)}}(t):Is(t)?function(t){return function(n){var o=e.scale.getLabel(n);return t.replace("{value}",null!=o?o:"")}}(t):Ts(t)?function(t){return function(o,i){return null!=n&&(i=o.value-n),t(Fk(e,o),i,null!=o.level?{level:o.level}:null)}}(t):function(t){return e.scale.getLabel(t)}}function Fk(e,t){return"category"===e.type?e.scale.getLabel(t):t.value}function Gk(e,t){var n=t*Math.PI/180,o=e.width,i=e.height,r=o*Math.abs(Math.cos(n))+Math.abs(i*Math.sin(n)),a=o*Math.abs(Math.sin(n))+Math.abs(i*Math.cos(n));return new cc(e.x,e.y,r,a)}function Hk(e){var t=e.get("interval");return null==t?"auto":t}function Wk(e){return"category"===e.type&&0===Hk(e.getLabelModel())}function Uk(e,t){var n={};return ys(e.mapDimensionsAll(t),function(t){n[BI(e,t)]=!0}),bs(n)}var Yk=function(){function e(){}return e.prototype.getNeedCrossZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}();function Zk(e,t){return Math.abs(e-t)<1e-8}function Xk(e,t,n){var o=0,i=e[0];if(!i)return!1;for(var r=1;r<e.length;r++){var a=e[r];o+=Wg(i[0],i[1],a[0],a[1],t,n),i=a}var l=e[0];return Zk(i[0],l[0])&&Zk(i[1],l[1])||(o+=Wg(i[0],i[1],l[0],l[1],t,n)),0!==o}var jk=[];function $k(e,t){for(var n=0;n<e.length;n++)mu(e[n],e[n],t)}function qk(e,t,n,o){for(var i=0;i<e.length;i++){var r=e[i];o&&(r=o.project(r)),r&&isFinite(r[0])&&isFinite(r[1])&&(yu(t,t,r),xu(n,n,r))}}var Kk=function(){function e(e){this.name=e}return e.prototype.setCenter=function(e){this._center=e},e.prototype.getCenter=function(){var e=this._center;return e||(e=this._center=this.calcCenter()),e},e}(),Jk=function(){return function(e,t){this.type="polygon",this.exterior=e,this.interiors=t}}(),Qk=function(){return function(e){this.type="linestring",this.points=e}}(),eD=function(e){function t(t,n,o){var i=e.call(this,t)||this;return i.type="geoJSON",i.geometries=n,i._center=o&&[o[0],o[1]],i}return Wl(t,e),t.prototype.calcCenter=function(){for(var e,t=this.geometries,n=0,o=0;o<t.length;o++){var i=t[o],r=i.exterior,a=r&&r.length;a>n&&(e=i,n=a)}if(e)return function(e){for(var t=0,n=0,o=0,i=e.length,r=e[i-1][0],a=e[i-1][1],l=0;l<i;l++){var s=e[l][0],u=e[l][1],c=r*u-s*a;t+=c,n+=(r+s)*c,o+=(a+u)*c,r=s,a=u}return t?[n/t/3,o/t/3,t]:[e[0][0]||0,e[0][1]||0]}(e.exterior);var l=this.getBoundingRect();return[l.x+l.width/2,l.y+l.height/2]},t.prototype.getBoundingRect=function(e){var t=this._rect;if(t&&!e)return t;var n=[1/0,1/0],o=[-1/0,-1/0];return ys(this.geometries,function(t){"polygon"===t.type?qk(t.exterior,n,o,e):ys(t.points,function(t){qk(t,n,o,e)})}),isFinite(n[0])&&isFinite(n[1])&&isFinite(o[0])&&isFinite(o[1])||(n[0]=n[1]=o[0]=o[1]=0),t=new cc(n[0],n[1],o[0]-n[0],o[1]-n[1]),e||(this._rect=t),t},t.prototype.contain=function(e){var t=this.getBoundingRect(),n=this.geometries;if(!t.contain(e[0],e[1]))return!1;e:for(var o=0,i=n.length;o<i;o++){var r=n[o];if("polygon"===r.type){var a=r.exterior,l=r.interiors;if(Xk(a,e[0],e[1])){for(var s=0;s<(l?l.length:0);s++)if(Xk(l[s],e[0],e[1]))continue e;return!0}}}return!1},t.prototype.transformTo=function(e,t,n,o){var i=this.getBoundingRect(),r=i.width/i.height;n?o||(o=n/r):n=r*o;for(var a=new cc(e,t,n,o),l=i.calculateTransform(a),s=this.geometries,u=0;u<s.length;u++){var c=s[u];"polygon"===c.type?($k(c.exterior,l),ys(c.interiors,function(e){$k(e,l)})):ys(c.points,function(e){$k(e,l)})}(i=this._rect).copy(a),this._center=[i.x+i.width/2,i.y+i.height/2]},t.prototype.cloneShallow=function(e){null==e&&(e=this.name);var n=new t(e,this.geometries,this._center);return n._rect=this._rect,n.transformTo=null,n},t}(Kk),tD=function(e){function t(t,n){var o=e.call(this,t)||this;return o.type="geoSVG",o._elOnlyForCalculate=n,o}return Wl(t,e),t.prototype.calcCenter=function(){for(var e=this._elOnlyForCalculate,t=e.getBoundingRect(),n=[t.x+t.width/2,t.y+t.height/2],o=ju(jk),i=e;i&&!i.isGeoSVGGraphicRoot;)qu(o,i.getLocalTransform(),o),i=i.parent;return ec(o,o),mu(n,n,o),n},t}(Kk);function nD(e,t,n){for(var o=0;o<e.length;o++)e[o]=oD(e[o],t[o],n)}function oD(e,t,n){for(var o=[],i=t[0],r=t[1],a=0;a<e.length;a+=2){var l=e.charCodeAt(a)-64,s=e.charCodeAt(a+1)-64;l=l>>1^-(1&l),s=s>>1^-(1&s),i=l+=i,r=s+=r,o.push([l/n,s/n])}return o}function iD(e,t){return xs(ws((e=function(e){if(!e.UTF8Encoding)return e;var t=e,n=t.UTF8Scale;return null==n&&(n=1024),ys(t.features,function(e){var t=e.geometry,o=t.encodeOffsets,i=t.coordinates;if(o)switch(t.type){case"LineString":t.coordinates=oD(i,o,n);break;case"Polygon":case"MultiLineString":nD(i,o,n);break;case"MultiPolygon":ys(i,function(e,t){return nD(e,o[t],n)})}}),t.UTF8Encoding=!1,t}(e)).features,function(e){return e.geometry&&e.properties&&e.geometry.coordinates.length>0}),function(e){var n=e.properties,o=e.geometry,i=[];switch(o.type){case"Polygon":var r=o.coordinates;i.push(new Jk(r[0],r.slice(1)));break;case"MultiPolygon":ys(o.coordinates,function(e){e[0]&&i.push(new Jk(e[0],e.slice(1)))});break;case"LineString":i.push(new Qk([o.coordinates]));break;case"MultiLineString":i.push(new Qk(o.coordinates))}var a=new eD(n[t||"name"],i,n.cp);return a.properties=n,a})}var rD=uf();function aD(e,t){var n=xs(t,function(t){return e.scale.parse(t)});return"time"===e.type&&n.length>0&&(n.sort(),n.unshift(n[0]),n.push(n[n.length-1])),n}function lD(e){var t=e.getLabelModel().get("customValues");if(t){var n=zk(e),o=e.scale.getExtent();return{labels:xs(ws(aD(e,t),function(e){return e>=o[0]&&e<=o[1]}),function(t){var o={value:t};return{formattedLabel:n(o),rawLabel:e.scale.getLabel(o),tickValue:t}})}}return"category"===e.type?function(e){var t=e.getLabelModel(),n=uD(e,t);return!t.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}(e):function(e){var t=e.scale.getTicks(),n=zk(e);return{labels:xs(t,function(t,o){return{level:t.level,formattedLabel:n(t,o),rawLabel:e.scale.getLabel(t),tickValue:t.value}})}}(e)}function sD(e,t){var n=e.getTickModel().get("customValues");if(n){var o=e.scale.getExtent();return{ticks:ws(aD(e,n),function(e){return e>=o[0]&&e<=o[1]})}}return"category"===e.type?function(e,t){var n,o,i=cD(e,"ticks"),r=Hk(t),a=dD(i,r);if(a)return a;t.get("show")&&!e.scale.isBlank()||(n=[]);if(Ts(r))n=fD(e,r,!0);else if("auto"===r){var l=uD(e,e.getLabelModel());o=l.labelCategoryInterval,n=xs(l.labels,function(e){return e.tickValue})}else n=pD(e,o=r,!0);return hD(i,r,{ticks:n,tickCategoryInterval:o})}(e,t):{ticks:xs(e.scale.getTicks(),function(e){return e.value})}}function uD(e,t){var n,o,i=cD(e,"labels"),r=Hk(t),a=dD(i,r);return a||(Ts(r)?n=fD(e,r):(o="auto"===r?function(e){var t=rD(e).autoInterval;return null!=t?t:rD(e).autoInterval=e.calculateCategoryInterval()}(e):r,n=pD(e,o)),hD(i,r,{labels:n,labelCategoryInterval:o}))}function cD(e,t){return rD(e)[t]||(rD(e)[t]=[])}function dD(e,t){for(var n=0;n<e.length;n++)if(e[n].key===t)return e[n].value}function hD(e,t,n){return e.push({key:t,value:n}),n}function pD(e,t,n){var o=zk(e),i=e.scale,r=i.getExtent(),a=e.getLabelModel(),l=[],s=Math.max((t||0)+1,1),u=r[0],c=i.count();0!==u&&s>1&&c/s>2&&(u=Math.round(Math.ceil(u/s)*s));var d=Wk(e),h=a.get("showMinLabel")||d,p=a.get("showMaxLabel")||d;h&&u!==r[0]&&g(r[0]);for(var f=u;f<=r[1];f+=s)g(f);function g(e){var t={value:e};l.push(n?e:{formattedLabel:o(t),rawLabel:i.getLabel(t),tickValue:e})}return p&&f-s!==r[1]&&g(r[1]),l}function fD(e,t,n){var o=e.scale,i=zk(e),r=[];return ys(o.getTicks(),function(e){var a=o.getLabel(e),l=e.value;t(e.value,a)&&r.push(n?l:{formattedLabel:i(e),rawLabel:a,tickValue:l})}),r}var gD=[0,1],vD=function(){function e(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return e.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),o=Math.max(t[0],t[1]);return e>=n&&e<=o},e.prototype.containData=function(e){return this.scale.contain(e)},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.getPixelPrecision=function(e){return _p(e||this.scale.getExtent(),this._extent)},e.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},e.prototype.dataToCoord=function(e,t){var n=this._extent,o=this.scale;return e=o.normalize(e),this.onBand&&"ordinal"===o.type&&mD(n=n.slice(),o.count()),fp(e,gD,n,t)},e.prototype.coordToData=function(e,t){var n=this._extent,o=this.scale;this.onBand&&"ordinal"===o.type&&mD(n=n.slice(),o.count());var i=fp(e,n,gD,t);return this.scale.scale(i)},e.prototype.pointToData=function(e,t){},e.prototype.getTicksCoords=function(e){var t=(e=e||{}).tickModel||this.getTickModel(),n=xs(sD(this,t).ticks,function(e){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(e):e),tickValue:e}},this);return function(e,t,n,o){var i=t.length;if(!e.onBand||n||!i)return;var r,a,l=e.getExtent();if(1===i)t[0].coord=l[0],r=t[1]={coord:l[1],tickValue:t[0].tickValue};else{var s=t[i-1].tickValue-t[0].tickValue,u=(t[i-1].coord-t[0].coord)/s;ys(t,function(e){e.coord-=u/2});var c=e.scale.getExtent();a=1+c[1]-t[i-1].tickValue,r={coord:t[i-1].coord+u*a,tickValue:c[1]+1},t.push(r)}var d=l[0]>l[1];h(t[0].coord,l[0])&&(o?t[0].coord=l[0]:t.shift());o&&h(l[0],t[0].coord)&&t.unshift({coord:l[0]});h(l[1],r.coord)&&(o?r.coord=l[1]:t.pop());o&&h(r.coord,l[1])&&t.push({coord:l[1]});function h(e,t){return e=vp(e),t=vp(t),d?e>t:e<t}}(this,n,t.get("alignWithLabel"),e.clamp),n},e.prototype.getMinorTicksCoords=function(){if("ordinal"===this.scale.type)return[];var e=this.model.getModel("minorTick").get("splitNumber");return e>0&&e<100||(e=5),xs(this.scale.getMinorTicks(e),function(e){return xs(e,function(e){return{coord:this.dataToCoord(e),tickValue:e}},this)},this)},e.prototype.getViewLabels=function(){return lD(this).labels},e.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},e.prototype.getTickModel=function(){return this.model.getModel("axisTick")},e.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),n=t[1]-t[0]+(this.onBand?1:0);0===n&&(n=1);var o=Math.abs(e[1]-e[0]);return Math.abs(o)/n},e.prototype.calculateCategoryInterval=function(){return function(e){var t=function(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}(e),n=zk(e),o=(t.axisRotate-t.labelRotate)/180*Math.PI,i=e.scale,r=i.getExtent(),a=i.count();if(r[1]-r[0]<1)return 0;var l=1;a>40&&(l=Math.max(1,Math.floor(a/40)));for(var s=r[0],u=e.dataToCoord(s+1)-e.dataToCoord(s),c=Math.abs(u*Math.cos(o)),d=Math.abs(u*Math.sin(o)),h=0,p=0;s<=r[1];s+=l){var f,g,v=Yh(n({value:s}),t.font,"center","top");f=1.3*v.width,g=1.3*v.height,h=Math.max(h,f,7),p=Math.max(p,g,7)}var m=h/c,y=p/d;isNaN(m)&&(m=1/0),isNaN(y)&&(y=1/0);var x=Math.max(0,Math.floor(Math.min(m,y))),_=rD(e.model),w=e.getExtent(),b=_.lastAutoInterval,S=_.lastTickCount;return null!=b&&null!=S&&Math.abs(b-x)<=1&&Math.abs(S-a)<=1&&b>x&&_.axisExtent0===w[0]&&_.axisExtent1===w[1]?x=b:(_.lastTickCount=a,_.lastAutoInterval=x,_.axisExtent0=w[0],_.axisExtent1=w[1]),x}(this)},e}();function mD(e,t){var n=(e[1]-e[0])/t/2;e[0]+=n,e[1]-=n}var yD=2*Math.PI,xD=Og.CMD,_D=["top","right","bottom","left"];function wD(e,t,n,o,i){var r=n.width,a=n.height;switch(e){case"top":o.set(n.x+r/2,n.y-t),i.set(0,-1);break;case"bottom":o.set(n.x+r/2,n.y+a+t),i.set(0,1);break;case"left":o.set(n.x-t,n.y+a/2),i.set(-1,0);break;case"right":o.set(n.x+r+t,n.y+a/2),i.set(1,0)}}function bD(e,t,n,o,i,r,a,l,s){a-=e,l-=t;var u=Math.sqrt(a*a+l*l),c=(a/=u)*n+e,d=(l/=u)*n+t;if(Math.abs(o-i)%yD<1e-4)return s[0]=c,s[1]=d,u-n;if(r){var h=o;o=Fg(i),i=Fg(h)}else o=Fg(o),i=Fg(i);o>i&&(i+=yD);var p=Math.atan2(l,a);if(p<0&&(p+=yD),p>=o&&p<=i||p+yD>=o&&p+yD<=i)return s[0]=c,s[1]=d,u-n;var f=n*Math.cos(o)+e,g=n*Math.sin(o)+t,v=n*Math.cos(i)+e,m=n*Math.sin(i)+t,y=(f-a)*(f-a)+(g-l)*(g-l),x=(v-a)*(v-a)+(m-l)*(m-l);return y<x?(s[0]=f,s[1]=g,Math.sqrt(y)):(s[0]=v,s[1]=m,Math.sqrt(x))}function SD(e,t,n,o,i,r,a,l){var s=i-e,u=r-t,c=n-e,d=o-t,h=Math.sqrt(c*c+d*d),p=(s*(c/=h)+u*(d/=h))/h;l&&(p=Math.min(Math.max(p,0),1)),p*=h;var f=a[0]=e+p*c,g=a[1]=t+p*d;return Math.sqrt((f-i)*(f-i)+(g-r)*(g-r))}function CD(e,t,n,o,i,r,a){n<0&&(e+=n,n=-n),o<0&&(t+=o,o=-o);var l=e+n,s=t+o,u=a[0]=Math.min(Math.max(i,e),l),c=a[1]=Math.min(Math.max(r,t),s);return Math.sqrt((u-i)*(u-i)+(c-r)*(c-r))}var MD=[];function TD(e,t,n){var o=CD(t.x,t.y,t.width,t.height,e.x,e.y,MD);return n.set(MD[0],MD[1]),o}function ID(e,t,n){for(var o,i,r=0,a=0,l=0,s=0,u=1/0,c=t.data,d=e.x,h=e.y,p=0;p<c.length;){var f=c[p++];1===p&&(l=r=c[p],s=a=c[p+1]);var g=u;switch(f){case xD.M:r=l=c[p++],a=s=c[p++];break;case xD.L:g=SD(r,a,c[p],c[p+1],d,h,MD,!0),r=c[p++],a=c[p++];break;case xD.C:g=$c(r,a,c[p++],c[p++],c[p++],c[p++],c[p],c[p+1],d,h,MD),r=c[p++],a=c[p++];break;case xD.Q:g=td(r,a,c[p++],c[p++],c[p],c[p+1],d,h,MD),r=c[p++],a=c[p++];break;case xD.A:var v=c[p++],m=c[p++],y=c[p++],x=c[p++],_=c[p++],w=c[p++];p+=1;var b=!!(1-c[p++]);o=Math.cos(_)*y+v,i=Math.sin(_)*x+m,p<=1&&(l=o,s=i),g=bD(v,m,x,_,_+w,b,(d-v)*x/y+v,h,MD),r=Math.cos(_+w)*y+v,a=Math.sin(_+w)*x+m;break;case xD.R:g=CD(l=r=c[p++],s=a=c[p++],c[p++],c[p++],d,h,MD);break;case xD.Z:g=SD(r,a,l,s,d,h,MD,!0),r=l,a=s}g<u&&(u=g,n.set(MD[0],MD[1]))}return u}var kD=new tc,DD=new tc,ND=new tc,ED=new tc,AD=new tc;function LD(e,t){if(e){var n=e.getTextGuideLine(),o=e.getTextContent();if(o&&n){var i=e.textGuideLineConfig||{},r=[[0,0],[0,0],[0,0]],a=i.candidates||_D,l=o.getBoundingRect().clone();l.applyTransform(o.getComputedTransform());var s=1/0,u=i.anchor,c=e.getComputedTransform(),d=c&&ec([],c),h=t.get("length2")||0;u&&ND.copy(u);for(var p=0;p<a.length;p++){wD(a[p],0,l,kD,ED),tc.scaleAndAdd(DD,kD,ED,h),DD.transform(d);var f=e.getBoundingRect(),g=u?u.distance(DD):e instanceof nv?ID(DD,e.path,ND):TD(DD,f,ND);g<s&&(s=g,DD.transform(c),ND.transform(c),ND.toArray(r[0]),DD.toArray(r[1]),kD.toArray(r[2]))}PD(r,t.get("minTurnAngle")),n.setShape({points:r})}}}var VD=[],OD=new tc;function PD(e,t){if(t<=180&&t>0){t=t/180*Math.PI,kD.fromArray(e[0]),DD.fromArray(e[1]),ND.fromArray(e[2]),tc.sub(ED,kD,DD),tc.sub(AD,ND,DD);var n=ED.len(),o=AD.len();if(!(n<.001||o<.001)){ED.scale(1/n),AD.scale(1/o);var i=ED.dot(AD);if(Math.cos(t)<i){var r=SD(DD.x,DD.y,ND.x,ND.y,kD.x,kD.y,VD,!1);OD.fromArray(VD),OD.scaleAndAdd(AD,r/Math.tan(Math.PI-t));var a=ND.x!==DD.x?(OD.x-DD.x)/(ND.x-DD.x):(OD.y-DD.y)/(ND.y-DD.y);if(isNaN(a))return;a<0?tc.copy(OD,DD):a>1&&tc.copy(OD,ND),OD.toArray(e[1])}}}}function BD(e,t,n){if(n<=180&&n>0){n=n/180*Math.PI,kD.fromArray(e[0]),DD.fromArray(e[1]),ND.fromArray(e[2]),tc.sub(ED,DD,kD),tc.sub(AD,ND,DD);var o=ED.len(),i=AD.len();if(!(o<.001||i<.001))if(ED.scale(1/o),AD.scale(1/i),ED.dot(t)<Math.cos(n)){var r=SD(DD.x,DD.y,ND.x,ND.y,kD.x,kD.y,VD,!1);OD.fromArray(VD);var a=Math.PI/2,l=a+Math.acos(AD.dot(t))-n;if(l>=a)tc.copy(OD,ND);else{OD.scaleAndAdd(AD,r/Math.tan(Math.PI/2-l));var s=ND.x!==DD.x?(OD.x-DD.x)/(ND.x-DD.x):(OD.y-DD.y)/(ND.y-DD.y);if(isNaN(s))return;s<0?tc.copy(OD,DD):s>1&&tc.copy(OD,ND)}OD.toArray(e[1])}}}function RD(e,t,n,o){var i="normal"===n,r=i?e:e.ensureState(n);r.ignore=t;var a=o.get("smooth");a&&!0===a&&(a=.3),r.shape=r.shape||{},a>0&&(r.shape.smooth=a);var l=o.getModel("lineStyle").getLineStyle();i?e.useStyle(l):r.style=l}function zD(e,t){var n=t.smooth,o=t.points;if(o)if(e.moveTo(o[0][0],o[0][1]),n>0&&o.length>=3){var i=fu(o[0],o[1]),r=fu(o[1],o[2]);if(!i||!r)return e.lineTo(o[1][0],o[1][1]),void e.lineTo(o[2][0],o[2][1]);var a=Math.min(i,r)*n,l=vu([],o[1],o[0],a/i),s=vu([],o[1],o[2],a/r),u=vu([],l,s,.5);e.bezierCurveTo(l[0],l[1],l[0],l[1],u[0],u[1]),e.bezierCurveTo(s[0],s[1],s[0],s[1],o[2][0],o[2][1])}else for(var c=1;c<o.length;c++)e.lineTo(o[c][0],o[c][1])}function FD(e,t,n){var o=e.getTextGuideLine(),i=e.getTextContent();if(i){for(var r=t.normal,a=r.get("show"),l=i.ignore,s=0;s<Bv.length;s++){var u=Bv[s],c=t[u],d="normal"===u;if(c){var h=c.get("show");if((d?l:Rs(i.states[u]&&i.states[u].ignore,l))||!Rs(h,a)){var p=d?o:o&&o.states[u];p&&(p.ignore=!0),o&&RD(o,!0,u,c);continue}o||(o=new xy,e.setTextGuideLine(o),d||!l&&a||RD(o,!0,"normal",t.normal),e.stateProxy&&(o.stateProxy=e.stateProxy)),RD(o,!1,u,c)}}if(o){fs(o.style,n),o.style.fill=null;var f=r.get("showAbove");(e.textGuideLineConfig=e.textGuideLineConfig||{}).showAbove=f||!1,o.buildPath=zD}}else o&&e.removeTextGuideLine()}function GD(e,t){t=t||"labelLine";for(var n={normal:e.getModel(t)},o=0;o<Pv.length;o++){var i=Pv[o];n[i]=e.getModel([i,t])}return n}function HD(e){for(var t=[],n=0;n<e.length;n++){var o=e[n];if(!o.defaultAttr.ignore){var i=o.label,r=i.getComputedTransform(),a=i.getBoundingRect(),l=!r||r[1]<1e-5&&r[2]<1e-5,s=i.style.margin||0,u=a.clone();u.applyTransform(r),u.x-=s/2,u.y-=s/2,u.width+=s,u.height+=s;var c=l?new By(a,r):null;t.push({label:i,labelLine:o.labelLine,rect:u,localRect:a,obb:c,priority:o.priority,defaultAttr:o.defaultAttr,layoutOption:o.computedLayoutOption,axisAligned:l,transform:r})}}return t}function WD(e,t,n,o,i,r){var a=e.length;if(!(a<2)){e.sort(function(e,n){return e.rect[t]-n.rect[t]});for(var l,s=0,u=!1,c=0;c<a;c++){var d=e[c],h=d.rect;(l=h[t]-s)<0&&(h[t]-=l,d.label[t]-=l,u=!0),s=h[t]+h[n]}var p,f,g=e[0],v=e[a-1];return m(),p<0&&_(-p,.8),f<0&&_(f,.8),m(),y(p,f,1),y(f,p,-1),m(),p<0&&w(-p),f<0&&w(f),u}function m(){p=g.rect[t]-o,f=i-v.rect[t]-v.rect[n]}function y(e,t,n){if(e<0){var o=Math.min(t,-e);if(o>0){x(o*n,0,a);var i=o+e;i<0&&_(-i*n,1)}else _(-e*n,1)}}function x(n,o,i){0!==n&&(u=!0);for(var r=o;r<i;r++){var a=e[r];a.rect[t]+=n,a.label[t]+=n}}function _(o,i){for(var r=[],l=0,s=1;s<a;s++){var u=e[s-1].rect,c=Math.max(e[s].rect[t]-u[t]-u[n],0);r.push(c),l+=c}if(l){var d=Math.min(Math.abs(o)/l,i);if(o>0)for(s=0;s<a-1;s++){x(r[s]*d,0,s+1)}else for(s=a-1;s>0;s--){x(-(r[s-1]*d),s,a)}}}function w(e){var t=e<0?-1:1;e=Math.abs(e);for(var n=Math.ceil(e/(a-1)),o=0;o<a-1;o++)if(t>0?x(n,0,o+1):x(-n,a-o-1,a),(e-=n)<=0)return}}function UD(e,t,n,o){return WD(e,"y","height",t,n)}function YD(e){var t=[];e.sort(function(e,t){return t.priority-e.priority});var n=new cc(0,0,0,0);function o(e){if(!e.ignore){var t=e.ensureState("emphasis");null==t.ignore&&(t.ignore=!1)}e.ignore=!0}for(var i=0;i<e.length;i++){var r=e[i],a=r.axisAligned,l=r.localRect,s=r.transform,u=r.label,c=r.labelLine;n.copy(r.rect),n.width-=.1,n.height-=.1,n.x+=.05,n.y+=.05;for(var d=r.obb,h=!1,p=0;p<t.length;p++){var f=t[p];if(n.intersect(f.rect)){if(a&&f.axisAligned){h=!0;break}if(f.obb||(f.obb=new By(f.localRect,f.transform)),d||(d=new By(l,s)),d.intersect(f.obb)){h=!0;break}}}h?(o(u),c&&o(c)):(u.attr("ignore",r.defaultAttr.ignore),c&&c.attr("ignore",r.defaultAttr.labelGuideIgnore),t.push(r))}}function ZD(e){if(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n].slice());return t}}function XD(e,t){var n=e.label,o=t&&t.getTextGuideLine();return{dataIndex:e.dataIndex,dataType:e.dataType,seriesIndex:e.seriesModel.seriesIndex,text:e.label.style.text,rect:e.hostRect,labelRect:e.rect,align:n.style.align,verticalAlign:n.style.verticalAlign,labelLinePoints:ZD(o&&o.shape.points)}}var jD=["align","verticalAlign","width","height","fontSize"],$D=new zh,qD=uf(),KD=uf();function JD(e,t,n){for(var o=0;o<n.length;o++){var i=n[o];null!=t[i]&&(e[i]=t[i])}}var QD=["x","y","rotation"],eN=function(){function e(){this._labelList=[],this._chartViewList=[]}return e.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},e.prototype._addLabel=function(e,t,n,o,i){var r=o.style,a=o.__hostTarget.textConfig||{},l=o.getComputedTransform(),s=o.getBoundingRect().plain();cc.applyTransform(s,s,l),l?$D.setLocalTransform(l):($D.x=$D.y=$D.rotation=$D.originX=$D.originY=0,$D.scaleX=$D.scaleY=1),$D.rotation=Fg($D.rotation);var u,c=o.__hostTarget;if(c){u=c.getBoundingRect().plain();var d=c.getComputedTransform();cc.applyTransform(u,u,d)}var h=u&&c.getTextGuideLine();this._labelList.push({label:o,labelLine:h,seriesModel:n,dataIndex:e,dataType:t,layoutOption:i,computedLayoutOption:null,rect:s,hostRect:u,priority:u?u.width*u.height:0,defaultAttr:{ignore:o.ignore,labelGuideIgnore:h&&h.ignore,x:$D.x,y:$D.y,scaleX:$D.scaleX,scaleY:$D.scaleY,rotation:$D.rotation,style:{x:r.x,y:r.y,align:r.align,verticalAlign:r.verticalAlign,width:r.width,height:r.height,fontSize:r.fontSize},cursor:o.cursor,attachedPos:a.position,attachedRot:a.rotation}})},e.prototype.addLabelsOfSeries=function(e){var t=this;this._chartViewList.push(e);var n=e.__model,o=n.get("labelLayout");(Ts(o)||bs(o).length)&&e.group.traverse(function(e){if(e.ignore)return!0;var i=e.getTextContent(),r=Nv(e);i&&!i.disableLabelLayout&&t._addLabel(r.dataIndex,r.dataType,n,i,o)})},e.prototype.updateLayoutConfig=function(e){var t=e.getWidth(),n=e.getHeight();function o(e,t){return function(){LD(e,t)}}for(var i=0;i<this._labelList.length;i++){var r=this._labelList[i],a=r.label,l=a.__hostTarget,s=r.defaultAttr,u=void 0;u=(u=Ts(r.layoutOption)?r.layoutOption(XD(r,l)):r.layoutOption)||{},r.computedLayoutOption=u;var c=Math.PI/180;l&&l.setTextConfig({local:!1,position:null!=u.x||null!=u.y?null:s.attachedPos,rotation:null!=u.rotate?u.rotate*c:s.attachedRot,offset:[u.dx||0,u.dy||0]});var d=!1;if(null!=u.x?(a.x=gp(u.x,t),a.setStyle("x",0),d=!0):(a.x=s.x,a.setStyle("x",s.style.x)),null!=u.y?(a.y=gp(u.y,n),a.setStyle("y",0),d=!0):(a.y=s.y,a.setStyle("y",s.style.y)),u.labelLinePoints){var h=l.getTextGuideLine();h&&(h.setShape({points:u.labelLinePoints}),d=!1)}qD(a).needsUpdateLabelLine=d,a.rotation=null!=u.rotate?u.rotate*c:s.rotation,a.scaleX=s.scaleX,a.scaleY=s.scaleY;for(var p=0;p<jD.length;p++){var f=jD[p];a.setStyle(f,null!=u[f]?u[f]:s.style[f])}if(u.draggable){if(a.draggable=!0,a.cursor="move",l){var g=r.seriesModel;if(null!=r.dataIndex)g=r.seriesModel.getData(r.dataType).getItemModel(r.dataIndex);a.on("drag",o(l,g.getModel("labelLine")))}}else a.off("drag"),a.cursor=s.cursor}},e.prototype.layout=function(e){var t=e.getWidth(),n=e.getHeight(),o=HD(this._labelList),i=ws(o,function(e){return"shiftX"===e.layoutOption.moveOverlap}),r=ws(o,function(e){return"shiftY"===e.layoutOption.moveOverlap});WD(i,"x","width",0,t),UD(r,0,n),YD(ws(o,function(e){return e.layoutOption.hideOverlap}))},e.prototype.processLabelsOverall=function(){var e=this;ys(this._chartViewList,function(t){var n=t.__model,o=t.ignoreLabelLineUpdate,i=n.isAnimationEnabled();t.group.traverse(function(t){if(t.ignore&&!t.forceLabelAnimation)return!0;var r=!o,a=t.getTextContent();!r&&a&&(r=qD(a).needsUpdateLabelLine),r&&e._updateLabelLine(t,n),i&&e._animateLabels(t,n)})})},e.prototype._updateLabelLine=function(e,t){var n=e.getTextContent(),o=Nv(e),i=o.dataIndex;if(n&&null!=i){var r=t.getData(o.dataType),a=r.getItemModel(i),l={},s=r.getItemVisual(i,"style");if(s){var u=r.getVisual("drawType");l.stroke=s[u]}var c=a.getModel("labelLine");FD(e,GD(a),l),LD(e,c)}},e.prototype._animateLabels=function(e,t){var n=e.getTextContent(),o=e.getTextGuideLine();if(n&&(e.forceLabelAnimation||!n.ignore&&!n.invisible&&!e.disableLabelAnimation&&!Yy(e))){var i=(p=qD(n)).oldLayout,r=Nv(e),a=r.dataIndex,l={x:n.x,y:n.y,rotation:n.rotation},s=t.getData(r.dataType);if(i){n.attr(i);var u=e.prevStates;u&&(gs(u,"select")>=0&&n.attr(p.oldLayoutSelect),gs(u,"emphasis")>=0&&n.attr(p.oldLayoutEmphasis)),Wy(n,l,t,a)}else if(n.attr(l),!Px(n).valueAnimation){var c=Rs(n.style.opacity,1);n.style.opacity=0,Uy(n,{style:{opacity:c}},t,a)}if(p.oldLayout=l,n.states.select){var d=p.oldLayoutSelect={};JD(d,l,QD),JD(d,n.states.select,QD)}if(n.states.emphasis){var h=p.oldLayoutEmphasis={};JD(h,l,QD),JD(h,n.states.emphasis,QD)}Rx(n,a,s,t,t)}if(o&&!o.ignore&&!o.invisible){i=(p=KD(o)).oldLayout;var p,f={points:o.shape.points};i?(o.attr({shape:i}),Wy(o,{shape:f},t)):(o.setShape(f),o.style.strokePercent=0,Uy(o,{style:{strokePercent:1}},t)),p.oldLayout=f}},e}(),tN=uf();var nN=Math.sin,oN=Math.cos,iN=Math.PI,rN=2*Math.PI,aN=180/iN,lN=function(){function e(){}return e.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},e.prototype.moveTo=function(e,t){this._add("M",e,t)},e.prototype.lineTo=function(e,t){this._add("L",e,t)},e.prototype.bezierCurveTo=function(e,t,n,o,i,r){this._add("C",e,t,n,o,i,r)},e.prototype.quadraticCurveTo=function(e,t,n,o){this._add("Q",e,t,n,o)},e.prototype.arc=function(e,t,n,o,i,r){this.ellipse(e,t,n,n,0,o,i,r)},e.prototype.ellipse=function(e,t,n,o,i,r,a,l){var s=a-r,u=!l,c=Math.abs(s),d=Vd(c-rN)||(u?s>=rN:-s>=rN),h=s>0?s%rN:s%rN+rN,p=!1;p=!!d||!Vd(c)&&h>=iN==!!u;var f=e+n*oN(r),g=t+o*nN(r);this._start&&this._add("M",f,g);var v=Math.round(i*aN);if(d){var m=1/this._p,y=(u?1:-1)*(rN-m);this._add("A",n,o,v,1,+u,e+n*oN(r+y),t+o*nN(r+y)),m>.01&&this._add("A",n,o,v,0,+u,f,g)}else{var x=e+n*oN(a),_=t+o*nN(a);this._add("A",n,o,v,+p,+u,x,_)}},e.prototype.rect=function(e,t,n,o){this._add("M",e,t),this._add("l",n,0),this._add("l",0,o),this._add("l",-n,0),this._add("Z")},e.prototype.closePath=function(){this._d.length>0&&this._add("Z")},e.prototype._add=function(e,t,n,o,i,r,a,l,s){for(var u=[],c=this._p,d=1;d<arguments.length;d++){var h=arguments[d];if(isNaN(h))return void(this._invalid=!0);u.push(Math.round(h*c)/c)}this._d.push(e+u.join(" ")),this._start="Z"===e},e.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},e.prototype.getStr=function(){return this._str},e}(),sN="none",uN=Math.round;var cN=["lineCap","miterLimit","lineJoin"],dN=xs(cN,function(e){return"stroke-"+e.toLowerCase()});function hN(e,t,n,o){var i=null==t.opacity?1:t.opacity;if(n instanceof lv)e("opacity",i);else{if(function(e){var t=e.fill;return null!=t&&t!==sN}(t)){var r=Ad(t.fill);e("fill",r.color);var a=null!=t.fillOpacity?t.fillOpacity*r.opacity*i:r.opacity*i;a<1&&e("fill-opacity",a)}else e("fill",sN);if(function(e){var t=e.stroke;return null!=t&&t!==sN}(t)){var l=Ad(t.stroke);e("stroke",l.color);var s=t.strokeNoScale?n.getLineScale():1,u=s?(t.lineWidth||0)/s:0,c=null!=t.strokeOpacity?t.strokeOpacity*l.opacity*i:l.opacity*i,d=t.strokeFirst;if(1!==u&&e("stroke-width",u),d&&e("paint-order",d?"stroke":"fill"),c<1&&e("stroke-opacity",c),t.lineDash){var h=MM(n),p=h[0],f=h[1];p&&(f=uN(f||0),e("stroke-dasharray",p.join(",")),(f||o)&&e("stroke-dashoffset",f))}for(var g=0;g<cN.length;g++){var v=cN[g];if(t[v]!==Qg[v]){var m=t[v]||Qg[v];m&&e(dN[g],m)}}}}}var pN="http://www.w3.org/2000/svg",fN="http://www.w3.org/1999/xlink",gN="ecmeta_";function vN(e){return document.createElementNS(pN,e)}function mN(e,t,n,o,i){return{tag:e,attrs:n||{},children:o,text:i,key:t}}function yN(e,t){var n=(t=t||{}).newline?"\n":"";return function e(t){var o=t.children,i=t.tag,r=t.attrs,a=t.text;return function(e,t){var n=[];if(t)for(var o in t){var i=t[o],r=o;!1!==i&&(!0!==i&&null!=i&&(r+='="'+i+'"'),n.push(r))}return"<"+e+" "+n.join(" ")+">"}(i,r)+("style"!==i?Au(a):a||"")+(o?""+n+xs(o,function(t){return e(t)}).join(n)+n:"")+("</"+i+">")}(e)}function xN(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function _N(e,t,n,o){return mN("svg","root",{width:e,height:t,xmlns:pN,"xmlns:xlink":fN,version:"1.1",baseProfile:"full",viewBox:!!o&&"0 0 "+e+" "+t},n)}var wN=0;function bN(){return wN++}var SN={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},CN="transform-origin";function MN(e,t,n){var o=ps({},e.shape);ps(o,t),e.buildPath(n,o);var i=new lN;return i.reset(Ud(e)),n.rebuildPath(i,1),i.generateStr(),i.getStr()}function TN(e,t){var n=t.originX,o=t.originY;(n||o)&&(e[CN]=n+"px "+o+"px")}var IN={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function kN(e,t){var n=t.zrId+"-ani-"+t.cssAnimIdx++;return t.cssAnims[n]=e,n}function DN(e){return Is(e)?SN[e]?"cubic-bezier("+SN[e]+")":id(e)?e:"":""}function NN(e,t,n,o){var i=e.animators,r=i.length,a=[];if(e instanceof Dy){var l=function(e,t,n){var o,i,r=e.shape.paths,a={};if(ys(r,function(e){var t=xN(n.zrId);t.animation=!0,NN(e,{},t,!0);var r=t.cssAnims,l=t.cssNodes,s=bs(r),u=s.length;if(u){var c=r[i=s[u-1]];for(var d in c){var h=c[d];a[d]=a[d]||{d:""},a[d].d+=h.d||""}for(var p in l){var f=l[p].animation;f.indexOf(i)>=0&&(o=f)}}}),o){t.d=!1;var l=kN(a,n);return o.replace(i,l)}}(e,t,n);if(l)a.push(l);else if(!r)return}else if(!r)return;for(var s={},u=0;u<r;u++){var c=i[u],d=[c.getMaxTime()/1e3+"s"],h=DN(c.getClip().easing),p=c.getDelay();h?d.push(h):d.push("linear"),p&&d.push(p/1e3+"s"),c.getLoop()&&d.push("infinite");var f=d.join(" ");s[f]=s[f]||[f,[]],s[f][1].push(c)}function g(i){var r,a=i[1],l=a.length,s={},u={},c={},d="animation-timing-function";function h(e,t,n){for(var o=e.getTracks(),i=e.getMaxTime(),r=0;r<o.length;r++){var a=o[r];if(a.needsAnimate()){var l=a.keyframes,s=a.propName;if(n&&(s=n(s)),s)for(var u=0;u<l.length;u++){var c=l[u],h=Math.round(c.time/i*100)+"%",p=DN(c.easing),f=c.rawValue;(Is(f)||Ds(f))&&(t[h]=t[h]||{},t[h][s]=c.rawValue,p&&(t[h][d]=p))}}}}for(var p=0;p<l;p++){(S=(b=a[p]).targetName)?"shape"===S&&h(b,u):!o&&h(b,s)}for(var f in s){var g={};Gh(g,e),ps(g,s[f]);var v=Yd(g),m=s[f][d];c[f]=v?{transform:v}:{},TN(c[f],g),m&&(c[f][d]=m)}var y=!0;for(var f in u){c[f]=c[f]||{};var x=!r;m=u[f][d];x&&(r=new Og);var _=r.len();r.reset(),c[f].d=MN(e,u[f],r);var w=r.len();if(!x&&_!==w){y=!1;break}m&&(c[f][d]=m)}if(!y)for(var f in c)delete c[f].d;if(!o)for(p=0;p<l;p++){var b,S;"style"===(S=(b=a[p]).targetName)&&h(b,c,function(e){return IN[e]})}var C,M=bs(c),T=!0;for(p=1;p<M.length;p++){var I=M[p-1],k=M[p];if(c[I][CN]!==c[k][CN]){T=!1;break}C=c[I][CN]}if(T&&C){for(var f in c)c[f][CN]&&delete c[f][CN];t[CN]=C}if(ws(M,function(e){return bs(c[e]).length>0}).length)return kN(c,n)+" "+i[0]+" both"}for(var v in s){(l=g(s[v]))&&a.push(l)}if(a.length){var m=n.zrId+"-cls-"+bN();n.cssNodes["."+m]={animation:a.join(",")},t.class=m}}function EN(e,t,n,o){var i=JSON.stringify(e),r=n.cssStyleCache[i];r||(r=n.zrId+"-cls-"+bN(),n.cssStyleCache[i]=r,n.cssNodes["."+r+":hover"]=e),t.class=t.class?t.class+" "+r:r}var AN=Math.round;function LN(e){return e&&Is(e.src)}function VN(e){return e&&Ts(e.toDataURL)}function ON(e,t,n,o){hN(function(i,r){var a="fill"===i||"stroke"===i;a&&Hd(r)?ZN(t,e,i,o):a&&zd(r)?XN(n,e,i,o):e[i]=r,a&&o.ssr&&"none"===r&&(e["pointer-events"]="visible")},t,n,!1),function(e,t,n){var o=e.style;if(function(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}(o)){var i=function(e){var t=e.style,n=e.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(",")}(e),r=n.shadowCache,a=r[i];if(!a){var l=e.getGlobalScale(),s=l[0],u=l[1];if(!s||!u)return;var c=o.shadowOffsetX||0,d=o.shadowOffsetY||0,h=o.shadowBlur,p=Ad(o.shadowColor),f=p.opacity,g=p.color,v=h/2/s+" "+h/2/u;a=n.zrId+"-s"+n.shadowIdx++,n.defs[a]=mN("filter",a,{id:a,x:"-100%",y:"-100%",width:"300%",height:"300%"},[mN("feDropShadow","",{dx:c/s,dy:d/u,stdDeviation:v,"flood-color":g,"flood-opacity":f})]),r[i]=a}t.filter=Wd(a)}}(n,e,o)}function PN(e,t){var n=function(e){if("function"==typeof cp)return cp(e)}(t);n&&(n.each(function(t,n){null!=t&&(e[(gN+n).toLowerCase()]=t+"")}),t.isSilent()&&(e[gN+"silent"]="true"))}function BN(e){return Vd(e[0]-1)&&Vd(e[1])&&Vd(e[2])&&Vd(e[3]-1)}function RN(e,t,n){if(t&&(!function(e){return Vd(e[4])&&Vd(e[5])}(t)||!BN(t))){var o=1e4;e.transform=BN(t)?"translate("+AN(t[4]*o)/o+" "+AN(t[5]*o)/o+")":function(e){return"matrix("+Od(e[0])+","+Od(e[1])+","+Od(e[2])+","+Od(e[3])+","+Pd(e[4])+","+Pd(e[5])+")"}(t)}}function zN(e,t,n){for(var o=e.points,i=[],r=0;r<o.length;r++)i.push(AN(o[r][0]*n)/n),i.push(AN(o[r][1]*n)/n);t.points=i.join(" ")}function FN(e){return!e.smooth}var GN,HN,WN={circle:[(GN=["cx","cy","r"],HN=xs(GN,function(e){return"string"==typeof e?[e,e]:e}),function(e,t,n){for(var o=0;o<HN.length;o++){var i=HN[o],r=e[i[0]];null!=r&&(t[i[1]]=AN(r*n)/n)}})],polyline:[zN,FN],polygon:[zN,FN]};function UN(e,t){var n=e.style,o=e.shape,i=WN[e.type],r={},a=t.animation,l="path",s=e.style.strokePercent,u=t.compress&&Ud(e)||4;if(!i||t.willUpdate||i[1]&&!i[1](o)||a&&function(e){for(var t=e.animators,n=0;n<t.length;n++)if("shape"===t[n].targetName)return!0;return!1}(e)||s<1){var c=!e.path||e.shapeChanged();e.path||e.createPathProxy();var d=e.path;c&&(d.beginPath(),e.buildPath(d,e.shape),e.pathUpdated());var h=d.getVersion(),p=e,f=p.__svgPathBuilder;p.__svgPathVersion===h&&f&&s===p.__svgPathStrokePercent||(f||(f=p.__svgPathBuilder=new lN),f.reset(u),d.rebuildPath(f,s),f.generateStr(),p.__svgPathVersion=h,p.__svgPathStrokePercent=s),r.d=f.getStr()}else{l=e.type;var g=Math.pow(10,u);i[0](o,r,g)}return RN(r,e.transform),ON(r,n,e,t),PN(r,e),t.animation&&NN(e,r,t),t.emphasis&&function(e,t,n){if(!e.ignore)if(e.isSilent())EN(u={"pointer-events":"none"},t,n);else{var o=e.states.emphasis&&e.states.emphasis.style?e.states.emphasis.style:{},i=o.fill;if(!i){var r=e.style&&e.style.fill,a=e.states.select&&e.states.select.style&&e.states.select.style.fill,l=e.currentStates.indexOf("select")>=0&&a||r;l&&(i=Nd(l))}var s=o.lineWidth;s&&(s/=!o.strokeNoScale&&e.transform?e.transform[0]:1);var u={cursor:"pointer"};i&&(u.fill=i),o.stroke&&(u.stroke=o.stroke),s&&(u["stroke-width"]=s),EN(u,t,n)}}(e,r,t),mN(l,e.id+"",r)}function YN(e,t){return e instanceof nv?UN(e,t):e instanceof lv?function(e,t){var n=e.style,o=n.image;if(o&&!Is(o)&&(LN(o)?o=o.src:VN(o)&&(o=o.toDataURL())),o){var i=n.x||0,r=n.y||0,a={href:o,width:n.width,height:n.height};return i&&(a.x=i),r&&(a.y=r),RN(a,e.transform),ON(a,n,e,t),PN(a,e),t.animation&&NN(e,a,t),mN("image",e.id+"",a)}}(e,t):e instanceof iv?function(e,t){var n=e.style,o=n.text;if(null!=o&&(o+=""),o&&!isNaN(n.x)&&!isNaN(n.y)){var i=n.font||Xl,r=n.x||0,a=function(e,t,n){return"top"===n?e+=t/2:"bottom"===n&&(e-=t/2),e}(n.y||0,jh(i),n.textBaseline),l={"dominant-baseline":"central","text-anchor":Bd[n.textAlign]||n.textAlign};if(Sv(n)){var s="",u=n.fontStyle,c=wv(n.fontSize);if(!parseFloat(c))return;var d=n.fontFamily||Zl,h=n.fontWeight;s+="font-size:"+c+";font-family:"+d+";",u&&"normal"!==u&&(s+="font-style:"+u+";"),h&&"normal"!==h&&(s+="font-weight:"+h+";"),l.style=s}else l.style="font: "+i;return o.match(/\s/)&&(l["xml:space"]="preserve"),r&&(l.x=r),a&&(l.y=a),RN(l,e.transform),ON(l,n,e,t),PN(l,e),t.animation&&NN(e,l,t),mN("text",e.id+"",l,void 0,o)}}(e,t):void 0}function ZN(e,t,n,o){var i,r=e[n],a={gradientUnits:r.global?"userSpaceOnUse":"objectBoundingBox"};if(Fd(r))i="linearGradient",a.x1=r.x,a.y1=r.y,a.x2=r.x2,a.y2=r.y2;else{if(!Gd(r))return void("production"!==process.env.NODE_ENV&&us("Illegal gradient type."));i="radialGradient",a.cx=Rs(r.x,.5),a.cy=Rs(r.y,.5),a.r=Rs(r.r,.5)}for(var l=r.colorStops,s=[],u=0,c=l.length;u<c;++u){var d=100*Pd(l[u].offset)+"%",h=Ad(l[u].color),p=h.color,f=h.opacity,g={offset:d};g["stop-color"]=p,f<1&&(g["stop-opacity"]=f),s.push(mN("stop",u+"",g))}var v=yN(mN(i,"",a,s)),m=o.gradientCache,y=m[v];y||(y=o.zrId+"-g"+o.gradientIdx++,m[v]=y,a.id=y,o.defs[y]=mN(i,y,a,s)),t[n]=Wd(y)}function XN(e,t,n,o){var i,r=e.style[n],a=e.getBoundingRect(),l={},s=r.repeat,u="no-repeat"===s,c="repeat-x"===s,d="repeat-y"===s;if(Rd(r)){var h=r.imageWidth,p=r.imageHeight,f=void 0,g=r.image;if(Is(g)?f=g:LN(g)?f=g.src:VN(g)&&(f=g.toDataURL()),"undefined"==typeof Image){var v="Image width/height must been given explictly in svg-ssr renderer.";Hs(h,v),Hs(p,v)}else if(null==h||null==p){var m=function(e,t){if(e){var n=e.elm,o=h||t.width,i=p||t.height;"pattern"===e.tag&&(c?(i=1,o/=a.width):d&&(o=1,i/=a.height)),e.attrs.width=o,e.attrs.height=i,n&&(n.setAttribute("width",o),n.setAttribute("height",i))}},y=Lf(f,null,e,function(e){u||m(b,e),m(i,e)});y&&y.width&&y.height&&(h=h||y.width,p=p||y.height)}i=mN("image","img",{href:f,width:h,height:p}),l.width=h,l.height=p}else r.svgElement&&(i=cs(r.svgElement),l.width=r.svgWidth,l.height=r.svgHeight);if(i){var x,_;u?x=_=1:c?(_=1,x=l.width/a.width):d?(x=1,_=l.height/a.height):l.patternUnits="userSpaceOnUse",null==x||isNaN(x)||(l.width=x),null==_||isNaN(_)||(l.height=_);var w=Yd(r);w&&(l.patternTransform=w);var b=mN("pattern","",l,[i]),S=yN(b),C=o.patternCache,M=C[S];M||(M=o.zrId+"-p"+o.patternIdx++,C[S]=M,l.id=M,b=o.defs[M]=mN("pattern",M,l,[i])),t[n]=Wd(M)}}function jN(e,t,n){var o=n.clipPathCache,i=n.defs,r=o[e.id];if(!r){var a={id:r=n.zrId+"-c"+n.clipPathIdx++};o[e.id]=r,i[r]=mN("clipPath",r,a,[UN(e,n)])}t["clip-path"]=Wd(r)}function $N(e){return document.createTextNode(e)}function qN(e,t,n){e.insertBefore(t,n)}function KN(e,t){e.removeChild(t)}function JN(e,t){e.appendChild(t)}function QN(e){return e.parentNode}function eE(e){return e.nextSibling}function tE(e,t){e.textContent=t}var nE=mN("","");function oE(e){return void 0===e}function iE(e){return void 0!==e}function rE(e,t,n){for(var o={},i=t;i<=n;++i){var r=e[i].key;void 0!==r&&("production"!==process.env.NODE_ENV&&o[r],o[r]=i)}return o}function aE(e,t){var n=e.key===t.key;return e.tag===t.tag&&n}function lE(e){var t,n=e.children,o=e.tag;if(iE(o)){var i=e.elm=vN(o);if(cE(nE,e),Ms(n))for(t=0;t<n.length;++t){var r=n[t];null!=r&&JN(i,lE(r))}else iE(e.text)&&!Ns(e.text)&&JN(i,$N(e.text))}else e.elm=$N(e.text);return e.elm}function sE(e,t,n,o,i){for(;o<=i;++o){var r=n[o];null!=r&&qN(e,lE(r),t)}}function uE(e,t,n,o){for(;n<=o;++n){var i=t[n];if(null!=i)if(iE(i.tag))KN(QN(i.elm),i.elm);else KN(e,i.elm)}}function cE(e,t){var n,o=t.elm,i=e&&e.attrs||{},r=t.attrs||{};if(i!==r){for(n in r){var a=r[n];i[n]!==a&&(!0===a?o.setAttribute(n,""):!1===a?o.removeAttribute(n):"style"===n?o.style.cssText=a:120!==n.charCodeAt(0)?o.setAttribute(n,a):"xmlns:xlink"===n||"xmlns"===n?o.setAttributeNS("http://www.w3.org/2000/xmlns/",n,a):58===n.charCodeAt(3)?o.setAttributeNS("http://www.w3.org/XML/1998/namespace",n,a):58===n.charCodeAt(5)?o.setAttributeNS(fN,n,a):o.setAttribute(n,a))}for(n in i)n in r||o.removeAttribute(n)}}function dE(e,t){var n=t.elm=e.elm,o=e.children,i=t.children;e!==t&&(cE(e,t),oE(t.text)?iE(o)&&iE(i)?o!==i&&function(e,t,n){for(var o,i,r,a=0,l=0,s=t.length-1,u=t[0],c=t[s],d=n.length-1,h=n[0],p=n[d];a<=s&&l<=d;)null==u?u=t[++a]:null==c?c=t[--s]:null==h?h=n[++l]:null==p?p=n[--d]:aE(u,h)?(dE(u,h),u=t[++a],h=n[++l]):aE(c,p)?(dE(c,p),c=t[--s],p=n[--d]):aE(u,p)?(dE(u,p),qN(e,u.elm,eE(c.elm)),u=t[++a],p=n[--d]):aE(c,h)?(dE(c,h),qN(e,c.elm,u.elm),c=t[--s],h=n[++l]):(oE(o)&&(o=rE(t,a,s)),oE(i=o[h.key])||(r=t[i]).tag!==h.tag?qN(e,lE(h),u.elm):(dE(r,h),t[i]=void 0,qN(e,r.elm,u.elm)),h=n[++l]);(a<=s||l<=d)&&(a>s?sE(e,null==n[d+1]?null:n[d+1].elm,n,l,d):uE(e,t,a,s))}(n,o,i):iE(i)?(iE(e.text)&&tE(n,""),sE(n,null,i,0,i.length-1)):iE(o)?uE(n,o,0,o.length-1):iE(e.text)&&tE(n,""):e.text!==t.text&&(iE(o)&&uE(n,o,0,o.length-1),tE(n,t.text)))}var hE=0,pE=function(){function e(e,t,n){if(this.type="svg",this.refreshHover=fE("refreshHover"),this.configLayer=fE("configLayer"),this.storage=t,this._opts=n=ps({},n),this.root=e,this._id="zr"+hE++,this._oldVNode=_N(n.width,n.height),e&&!n.ssr){var o=this._viewport=document.createElement("div");o.style.cssText="position:relative;overflow:hidden";var i=this._svgDom=this._oldVNode.elm=vN("svg");cE(null,this._oldVNode),o.appendChild(i),e.appendChild(o)}this.resize(n.width,n.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",function(e,t){if(aE(e,t))dE(e,t);else{var n=e.elm,o=QN(n);lE(t),null!==o&&(qN(o,t.elm,eE(n)),uE(o,[e],0,0))}}(this._oldVNode,e),this._oldVNode=e}},e.prototype.renderOneToVNode=function(e){return YN(e,xN(this._id))},e.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),n=this._width,o=this._height,i=xN(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress,i.emphasis=e.emphasis,i.ssr=this._opts.ssr;var r=[],a=this._bgVNode=function(e,t,n,o){var i;if(n&&"none"!==n)if(i=mN("rect","bg",{width:e,height:t,x:"0",y:"0"}),Hd(n))ZN({fill:n},i.attrs,"fill",o);else if(zd(n))XN({style:{fill:n},dirty:tu,getBoundingRect:function(){return{width:e,height:t}}},i.attrs,"fill",o);else{var r=Ad(n),a=r.color,l=r.opacity;i.attrs.fill=a,l<1&&(i.attrs["fill-opacity"]=l)}return i}(n,o,this._backgroundColor,i);a&&r.push(a);var l=e.compress?null:this._mainVNode=mN("g","main",{},[]);this._paintList(t,i,l?l.children:r),l&&r.push(l);var s=xs(bs(i.defs),function(e){return i.defs[e]});if(s.length&&r.push(mN("defs","defs",{},s)),e.animation){var u=function(e,t,n){var o=(n=n||{}).newline?"\n":"",i=" {"+o,r=o+"}",a=xs(bs(e),function(t){return t+i+xs(bs(e[t]),function(n){return n+":"+e[t][n]+";"}).join(o)+r}).join(o),l=xs(bs(t),function(e){return"@keyframes "+e+i+xs(bs(t[e]),function(n){return n+i+xs(bs(t[e][n]),function(o){var i=t[e][n][o];return"d"===o&&(i='path("'+i+'")'),o+":"+i+";"}).join(o)+r}).join(o)+r}).join(o);return a||l?["<![CDATA[",a,l,"]]>"].join(o):""}(i.cssNodes,i.cssAnims,{newline:!0});if(u){var c=mN("style","stl",{},[],u);r.push(c)}}return _N(n,o,r,e.useViewBox)},e.prototype.renderToString=function(e){return e=e||{},yN(this.renderToVNode({animation:Rs(e.cssAnimation,!0),emphasis:Rs(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:Rs(e.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(e,t,n){for(var o,i,r=e.length,a=[],l=0,s=0,u=0;u<r;u++){var c=e[u];if(!c.invisible){var d=c.__clipPaths,h=d&&d.length||0,p=i&&i.length||0,f=void 0;for(f=Math.max(h-1,p-1);f>=0&&(!d||!i||d[f]!==i[f]);f--);for(var g=p-1;g>f;g--)o=a[--l-1];for(var v=f+1;v<h;v++){var m={};jN(d[v],m,t);var y=mN("g","clip-g-"+s++,m,[]);(o?o.children:n).push(y),a[l++]=y,o=y}i=d;var x=YN(c,t);x&&(o?o.children:n).push(x)}}},e.prototype.resize=function(e,t){var n=this._opts,o=this.root,i=this._viewport;if(null!=e&&(n.width=e),null!=t&&(n.height=t),o&&i&&(i.style.display="none",e=CM(o,0,n),t=CM(o,1,n),i.style.display=""),this._width!==e||this._height!==t){if(this._width=e,this._height=t,i){var r=i.style;r.width=e+"px",r.height=t+"px"}if(zd(this._backgroundColor))this.refresh();else{var a=this._svgDom;a&&(a.setAttribute("width",e),a.setAttribute("height",t));var l=this._bgVNode&&this._bgVNode.elm;l&&(l.setAttribute("width",e),l.setAttribute("height",t))}}},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},e.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},e.prototype.toDataURL=function(e){var t=this.renderToString(),n="data:image/svg+xml;";return e?(t=Zd(t))&&n+"base64,"+t:n+"charset=UTF-8,"+encodeURIComponent(t)},e}();function fE(e){return function(){"production"!==process.env.NODE_ENV&&us('In SVG mode painter not support method "'+e+'"')}}function gE(e,t,n){var o=$l.createCanvas(),i=t.getWidth(),r=t.getHeight(),a=o.style;return a&&(a.position="absolute",a.left="0",a.top="0",a.width=i+"px",a.height=r+"px",o.setAttribute("data-zr-dom-id",e)),o.width=i*n,o.height=r*n,o}var vE=function(e){function t(t,n,o){var i,r=e.call(this)||this;r.motionBlur=!1,r.lastFrameAlpha=.7,r.dpr=1,r.virtual=!1,r.config={},r.incremental=!1,r.zlevel=0,r.maxRepaintRectCount=5,r.__dirty=!0,r.__firstTimePaint=!0,r.__used=!1,r.__drawIndex=0,r.__startIndex=0,r.__endIndex=0,r.__prevStartIndex=null,r.__prevEndIndex=null,o=o||Dh,"string"==typeof t?i=gE(t,n,o):Ns(t)&&(t=(i=t).id),r.id=t,r.dom=i;var a=i.style;return a&&(Qs(i),i.onselectstart=function(){return!1},a.padding="0",a.margin="0",a.borderWidth="0"),r.painter=n,r.dpr=o,r}return Wl(t,e),t.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},t.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},t.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var e=this.dpr;this.domBack=gE("back-"+this.id,this.painter,e),this.ctxBack=this.domBack.getContext("2d"),1!==e&&this.ctxBack.scale(e,e)},t.prototype.createRepaintRects=function(e,t,n,o){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var i,r=[],a=this.maxRepaintRectCount,l=!1,s=new cc(0,0,0,0);function u(e){if(e.isFinite()&&!e.isZero())if(0===r.length){(t=new cc(0,0,0,0)).copy(e),r.push(t)}else{for(var t,n=!1,o=1/0,i=0,u=0;u<r.length;++u){var c=r[u];if(c.intersect(e)){var d=new cc(0,0,0,0);d.copy(c),d.union(e),r[u]=d,n=!0;break}if(l){s.copy(e),s.union(c);var h=e.width*e.height,p=c.width*c.height,f=s.width*s.height-h-p;f<o&&(o=f,i=u)}}if(l&&(r[i].union(e),n=!0),!n)(t=new cc(0,0,0,0)).copy(e),r.push(t);l||(l=r.length>=a)}}for(var c=this.__startIndex;c<this.__endIndex;++c){if(p=e[c]){var d=p.shouldBePainted(n,o,!0,!0);(f=p.__isRendered&&(1&p.__dirty||!d)?p.getPrevPaintRect():null)&&u(f);var h=d&&(1&p.__dirty||!p.__isRendered)?p.getPaintRect():null;h&&u(h)}}for(c=this.__prevStartIndex;c<this.__prevEndIndex;++c){var p,f;d=(p=t[c])&&p.shouldBePainted(n,o,!0,!0);if(p&&(!d||!p.__zr)&&p.__isRendered)(f=p.getPrevPaintRect())&&u(f)}do{i=!1;for(c=0;c<r.length;)if(r[c].isZero())r.splice(c,1);else{for(var g=c+1;g<r.length;)r[c].intersect(r[g])?(i=!0,r[c].union(r[g]),r.splice(g,1)):g++;c++}}while(i);return this._paintRects=r,r},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(e,t){var n=this.dpr,o=this.dom,i=o.style,r=this.domBack;i&&(i.width=e+"px",i.height=t+"px"),o.width=e*n,o.height=t*n,r&&(r.width=e*n,r.height=t*n,1!==n&&this.ctxBack.scale(n,n))},t.prototype.clear=function(e,t,n){var o=this.dom,i=this.ctx,r=o.width,a=o.height;t=t||this.clearColor;var l=this.motionBlur&&!e,s=this.lastFrameAlpha,u=this.dpr,c=this;l&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(o,0,0,r/u,a/u));var d=this.domBack;function h(e,n,o,r){if(i.clearRect(e,n,o,r),t&&"transparent"!==t){var a=void 0;if(Vs(t))a=(t.global||t.__width===o&&t.__height===r)&&t.__canvasGradient||bM(i,t,{x:0,y:0,width:o,height:r}),t.__canvasGradient=a,t.__width=o,t.__height=r;else null!=t.image&&(t.scaleX=t.scaleX||u,t.scaleY=t.scaleY||u,a=AM(i,t,{dirty:function(){c.setUnpainted(),c.painter.refresh()}}));i.save(),i.fillStyle=a||t,i.fillRect(e,n,o,r),i.restore()}l&&(i.save(),i.globalAlpha=s,i.drawImage(d,e,n,o,r),i.restore())}!n||l?h(0,0,r,a):n.length&&ys(n,function(e){h(e.x*u,e.y*u,e.width*u,e.height*u)})},t}(bu),mE=1e5,yE=314159,xE=.01;var _E=function(){function e(e,t,n,o){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var i=!e.nodeName||"CANVAS"===e.nodeName.toUpperCase();this._opts=n=ps({},n||{}),this.dpr=n.devicePixelRatio||Dh,this._singleCanvas=i,this.root=e,e.style&&(Qs(e),e.innerHTML=""),this.storage=t;var r=this._zlevelList;this._prevDisplayList=[];var a=this._layers;if(i){var l=e,s=l.width,u=l.height;null!=n.width&&(s=n.width),null!=n.height&&(u=n.height),this.dpr=n.devicePixelRatio||1,l.width=s*this.dpr,l.height=u*this.dpr,this._width=s,this._height=u;var c=new vE(l,this,this.dpr);c.__builtin__=!0,c.initContext(),a[314159]=c,c.zlevel=yE,r.push(yE),this._domRoot=e}else{this._width=CM(e,0,n),this._height=CM(e,1,n);var d=this._domRoot=function(e,t){var n=document.createElement("div");return n.style.cssText=["position:relative","width:"+e+"px","height:"+t+"px","padding:0","margin:0","border-width:0"].join(";")+";",n}(this._width,this._height);e.appendChild(d)}}return e.prototype.getType=function(){return"canvas"},e.prototype.isSingleCanvas=function(){return this._singleCanvas},e.prototype.getViewportRoot=function(){return this._domRoot},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.refresh=function(e){var t=this.storage.getDisplayList(!0),n=this._prevDisplayList,o=this._zlevelList;this._redrawId=Math.random(),this._paintList(t,n,e,this._redrawId);for(var i=0;i<o.length;i++){var r=o[i],a=this._layers[r];if(!a.__builtin__&&a.refresh){var l=0===i?this._backgroundColor:null;a.refresh(l)}}return this._opts.useDirtyRect&&(this._prevDisplayList=t.slice()),this},e.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},e.prototype._paintHoverList=function(e){var t=e.length,n=this._hoverlayer;if(n&&n.clear(),t){for(var o,i={inHover:!0,viewWidth:this._width,viewHeight:this._height},r=0;r<t;r++){var a=e[r];a.__inHover&&(n||(n=this._hoverlayer=this.getLayer(mE)),o||(o=n.ctx).save(),GM(o,a,i,r===t-1))}o&&o.restore()}},e.prototype.getHoverLayer=function(){return this.getLayer(mE)},e.prototype.paintOne=function(e,t){FM(e,t)},e.prototype._paintList=function(e,t,n,o){if(this._redrawId===o){n=n||!1,this._updateLayerStatus(e);var i=this._doPaintList(e,t,n),r=i.finished,a=i.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),a&&this._paintHoverList(e),r)this.eachLayer(function(e){e.afterBrush&&e.afterBrush()});else{var l=this;Nc(function(){l._paintList(e,t,n,o)})}}},e.prototype._compositeManually=function(){var e=this.getLayer(yE).ctx,t=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,t,n),this.eachBuiltinLayer(function(o){o.virtual&&e.drawImage(o.dom,0,0,t,n)})},e.prototype._doPaintList=function(e,t,n){for(var o=this,i=[],r=this._opts.useDirtyRect,a=0;a<this._zlevelList.length;a++){var l=this._zlevelList[a],s=this._layers[l];s.__builtin__&&s!==this._hoverlayer&&(s.__dirty||n)&&i.push(s)}for(var u=!0,c=!1,d=function(a){var l,s=i[a],d=s.ctx,p=r&&s.createRepaintRects(e,t,h._width,h._height),f=n?s.__startIndex:s.__drawIndex,g=!n&&s.incremental&&Date.now,v=g&&Date.now(),m=s.zlevel===h._zlevelList[0]?h._backgroundColor:null;if(s.__startIndex===s.__endIndex)s.clear(!1,m,p);else if(f===s.__startIndex){var y=e[f];y.incremental&&y.notClear&&!n||s.clear(!1,m,p)}-1===f&&(f=s.__startIndex);var x=function(t){var n={inHover:!1,allClipped:!1,prevEl:null,viewWidth:o._width,viewHeight:o._height};for(l=f;l<s.__endIndex;l++){var i=e[l];if(i.__inHover&&(c=!0),o._doPaintEl(i,s,r,t,n,l===s.__endIndex-1),g)if(Date.now()-v>15)break}n.prevElClipPaths&&d.restore()};if(p)if(0===p.length)l=s.__endIndex;else for(var _=h.dpr,w=0;w<p.length;++w){var b=p[w];d.save(),d.beginPath(),d.rect(b.x*_,b.y*_,b.width*_,b.height*_),d.clip(),x(b),d.restore()}else d.save(),x(),d.restore();s.__drawIndex=l,s.__drawIndex<s.__endIndex&&(u=!1)},h=this,p=0;p<i.length;p++)d(p);return Yl.wxa&&ys(this._layers,function(e){e&&e.ctx&&e.ctx.draw&&e.ctx.draw()}),{finished:u,needsRefreshHover:c}},e.prototype._doPaintEl=function(e,t,n,o,i,r){var a=t.ctx;if(n){var l=e.getPaintRect();(!o||l&&l.intersect(o))&&(GM(a,e,i,r),e.setPrevPaintRect(l))}else GM(a,e,i,r)},e.prototype.getLayer=function(e,t){this._singleCanvas&&!this._needsManuallyCompositing&&(e=yE);var n=this._layers[e];return n||((n=new vE("zr_"+e,this,this.dpr)).zlevel=e,n.__builtin__=!0,this._layerConfig[e]?ds(n,this._layerConfig[e],!0):this._layerConfig[e-xE]&&ds(n,this._layerConfig[e-xE],!0),t&&(n.virtual=t),this.insertLayer(e,n),n.initContext()),n},e.prototype.insertLayer=function(e,t){var n=this._layers,o=this._zlevelList,i=o.length,r=this._domRoot,a=null,l=-1;if(n[e])"production"!==process.env.NODE_ENV&&us("ZLevel "+e+" has been used already");else if(function(e){return!!e&&(!!e.__builtin__||"function"==typeof e.resize&&"function"==typeof e.refresh)}(t)){if(i>0&&e>o[0]){for(l=0;l<i-1&&!(o[l]<e&&o[l+1]>e);l++);a=n[o[l]]}if(o.splice(l+1,0,e),n[e]=t,!t.virtual)if(a){var s=a.dom;s.nextSibling?r.insertBefore(t.dom,s.nextSibling):r.appendChild(t.dom)}else r.firstChild?r.insertBefore(t.dom,r.firstChild):r.appendChild(t.dom);t.painter||(t.painter=this)}else"production"!==process.env.NODE_ENV&&us("Layer of zlevel "+e+" is not valid")},e.prototype.eachLayer=function(e,t){for(var n=this._zlevelList,o=0;o<n.length;o++){var i=n[o];e.call(t,this._layers[i],i)}},e.prototype.eachBuiltinLayer=function(e,t){for(var n=this._zlevelList,o=0;o<n.length;o++){var i=n[o],r=this._layers[i];r.__builtin__&&e.call(t,r,i)}},e.prototype.eachOtherLayer=function(e,t){for(var n=this._zlevelList,o=0;o<n.length;o++){var i=n[o],r=this._layers[i];r.__builtin__||e.call(t,r,i)}},e.prototype.getLayers=function(){return this._layers},e.prototype._updateLayerStatus=function(e){function t(e){r&&(r.__endIndex!==e&&(r.__dirty=!0),r.__endIndex=e)}if(this.eachBuiltinLayer(function(e,t){e.__dirty=e.__used=!1}),this._singleCanvas)for(var n=1;n<e.length;n++){if((l=e[n]).zlevel!==e[n-1].zlevel||l.incremental){this._needsManuallyCompositing=!0;break}}var o,i,r=null,a=0;for(i=0;i<e.length;i++){var l,s=(l=e[i]).zlevel,u=void 0;o!==s&&(o=s,a=0),l.incremental?((u=this.getLayer(s+.001,this._needsManuallyCompositing)).incremental=!0,a=1):u=this.getLayer(s+(a>0?xE:0),this._needsManuallyCompositing),u.__builtin__||us("ZLevel "+s+" has been used by unkown layer "+u.id),u!==r&&(u.__used=!0,u.__startIndex!==i&&(u.__dirty=!0),u.__startIndex=i,u.incremental?u.__drawIndex=-1:u.__drawIndex=i,t(i),r=u),1&l.__dirty&&!l.__inHover&&(u.__dirty=!0,u.incremental&&u.__drawIndex<0&&(u.__drawIndex=i))}t(i),this.eachBuiltinLayer(function(e,t){!e.__used&&e.getElementCount()>0&&(e.__dirty=!0,e.__startIndex=e.__endIndex=e.__drawIndex=0),e.__dirty&&e.__drawIndex<0&&(e.__drawIndex=e.__startIndex)})},e.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},e.prototype._clearLayer=function(e){e.clear()},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e,ys(this._layers,function(e){e.setUnpainted()})},e.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?ds(n[e],t,!0):n[e]=t;for(var o=0;o<this._zlevelList.length;o++){var i=this._zlevelList[o];if(i===e||i===e+xE)ds(this._layers[i],n[e],!0)}}},e.prototype.delLayer=function(e){var t=this._layers,n=this._zlevelList,o=t[e];o&&(o.dom.parentNode.removeChild(o.dom),delete t[e],n.splice(gs(n,e),1))},e.prototype.resize=function(e,t){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var o=this._opts,i=this.root;if(null!=e&&(o.width=e),null!=t&&(o.height=t),e=CM(i,0,o),t=CM(i,1,o),n.style.display="",this._width!==e||t!==this._height){for(var r in n.style.width=e+"px",n.style.height=t+"px",this._layers)this._layers.hasOwnProperty(r)&&this._layers[r].resize(e,t);this.refresh(!0)}this._width=e,this._height=t}else{if(null==e||null==t)return;this._width=e,this._height=t,this.getLayer(yE).resize(e,t)}return this},e.prototype.clearLayer=function(e){var t=this._layers[e];t&&t.clear()},e.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},e.prototype.getRenderedCanvas=function(e){if(e=e||{},this._singleCanvas&&!this._compositeManually)return this._layers[314159].dom;var t=new vE("image",this,e.pixelRatio||this.dpr);t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor);var n=t.ctx;if(e.pixelRatio<=this.dpr){this.refresh();var o=t.dom.width,i=t.dom.height;this.eachLayer(function(e){e.__builtin__?n.drawImage(e.dom,0,0,o,i):e.renderToCanvas&&(n.save(),e.renderToCanvas(n),n.restore())})}else for(var r={inHover:!1,viewWidth:this._width,viewHeight:this._height},a=this.storage.getDisplayList(!0),l=0,s=a.length;l<s;l++){var u=a[l];GM(n,u,r,l===s-1)}return t.dom},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e}();var wE=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return Wl(t,e),t.prototype.getInitialData=function(e){if("production"!==process.env.NODE_ENV){var t=e.coordinateSystem;if("polar"!==t&&"cartesian2d"!==t)throw new Error("Line not support coordinateSystem besides cartesian and polar")}return RI(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var t=new lp,n=yM("line",0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);t.add(n),n.setStyle(e.lineStyle);var o=this.getData().getVisual("symbol"),i=this.getData().getVisual("symbolRotate"),r="none"===o?"circle":o,a=.8*e.itemHeight,l=yM(r,(e.itemWidth-a)/2,(e.itemHeight-a)/2,a,a,e.itemStyle.fill);t.add(l),l.setStyle(e.itemStyle);var s="inherit"===e.iconRotate?i:e.iconRotate||0;return l.rotation=s*Math.PI/180,l.setOrigin([e.itemWidth/2,e.itemHeight/2]),r.indexOf("empty")>-1&&(l.style.stroke=l.style.fill,l.style.fill="#fff",l.style.lineWidth=2),t},t.type="series.line",t.dependencies=["grid","polar"],t.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},t}(jS);function bE(e,t){var n=e.mapDimensionsAll("defaultedLabel"),o=n.length;if(1===o){var i=Wb(e,t,n[0]);return null!=i?i+"":null}if(o){for(var r=[],a=0;a<n.length;a++)r.push(Wb(e,t,n[a]));return r.join(" ")}}function SE(e,t){var n=e.mapDimensionsAll("defaultedLabel");if(!Ms(t))return t+"";for(var o=[],i=0;i<n.length;i++){var r=e.getDimensionIndex(n[i]);r>=0&&o.push(t[r])}return o.join(" ")}var CE=function(e){function t(t,n,o,i){var r=e.call(this)||this;return r.updateData(t,n,o,i),r}return Wl(t,e),t.prototype._createSymbol=function(e,t,n,o,i){this.removeAll();var r=yM(e,-1,-1,2,2,null,i);r.attr({z2:100,culling:!0,scaleX:o[0]/2,scaleY:o[1]/2}),r.drift=ME,this._symbolType=e,this.add(r)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){rm(this.childAt(0))},t.prototype.downplay=function(){am(this.childAt(0))},t.prototype.setZ=function(e,t){var n=this.childAt(0);n.zlevel=e,n.z=t},t.prototype.setDraggable=function(e,t){var n=this.childAt(0);n.draggable=e,n.cursor=!t&&e?"move":n.cursor},t.prototype.updateData=function(e,n,o,i){this.silent=!1;var r=e.getItemVisual(n,"symbol")||"circle",a=e.hostModel,l=t.getSymbolSize(e,n),s=r!==this._symbolType,u=i&&i.disableAnimation;if(s){var c=e.getItemVisual(n,"symbolKeepAspect");this._createSymbol(r,e,n,l,c)}else{(h=this.childAt(0)).silent=!1;var d={scaleX:l[0]/2,scaleY:l[1]/2};u?h.attr(d):Wy(h,d,a,n),$y(h)}if(this._updateCommon(e,n,l,o,i),s){var h=this.childAt(0);if(!u){d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:h.style.opacity}};h.scaleX=h.scaleY=0,h.style.opacity=0,Uy(h,d,a,n)}}u&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,t,n,o,i){var r,a,l,s,u,c,d,h,p,f=this.childAt(0),g=e.hostModel;if(o&&(r=o.emphasisItemStyle,a=o.blurItemStyle,l=o.selectItemStyle,s=o.focus,u=o.blurScope,d=o.labelStatesModels,h=o.hoverScale,p=o.cursorStyle,c=o.emphasisDisabled),!o||e.hasItemOption){var v=o&&o.itemModel?o.itemModel:e.getItemModel(t),m=v.getModel("emphasis");r=m.getModel("itemStyle").getItemStyle(),l=v.getModel(["select","itemStyle"]).getItemStyle(),a=v.getModel(["blur","itemStyle"]).getItemStyle(),s=m.get("focus"),u=m.get("blurScope"),c=m.get("disabled"),d=kx(v),h=m.getShallow("scale"),p=v.getShallow("cursor")}var y=e.getItemVisual(t,"symbolRotate");f.attr("rotation",(y||0)*Math.PI/180||0);var x=_M(e.getItemVisual(t,"symbolOffset"),n);x&&(f.x=x[0],f.y=x[1]),p&&f.attr("cursor",p);var _=e.getItemVisual(t,"style"),w=_.fill;if(f instanceof lv){var b=f.style;f.useStyle(ps({image:b.image,x:b.x,y:b.y,width:b.width,height:b.height},_))}else f.__isEmptyBrush?f.useStyle(ps({},_)):f.useStyle(_),f.style.decal=null,f.setColor(w,i&&i.symbolInnerColor),f.style.strokeNoScale=!0;var S=e.getItemVisual(t,"liftZ"),C=this._z2;null!=S?null==C&&(this._z2=f.z2,f.z2+=S):null!=C&&(f.z2=C,this._z2=null);var M=i&&i.useNameLabel;Ix(f,d,{labelFetcher:g,labelDataIndex:t,defaultText:function(t){return M?e.getName(t):bE(e,t)},inheritColor:w,defaultOpacity:_.opacity}),this._sizeX=n[0]/2,this._sizeY=n[1]/2;var T=f.ensureState("emphasis");T.style=r,f.ensureState("select").style=l,f.ensureState("blur").style=a;var I=null==h||!0===h?Math.max(1.1,3/this._sizeY):isFinite(h)&&h>0?+h:1;T.scaleX=this._sizeX*I,T.scaleY=this._sizeY*I,this.setSymbolScale(1),xm(this,s,u,c)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,t,n){var o=this.childAt(0),i=Nv(this).dataIndex,r=n&&n.animation;if(this.silent=o.silent=!0,n&&n.fadeLabel){var a=o.getTextContent();a&&Zy(a,{style:{opacity:0}},t,{dataIndex:i,removeOpt:r,cb:function(){o.removeTextContent()}})}else o.removeTextContent();Zy(o,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:i,cb:e,removeOpt:r})},t.getSymbolSize=function(e,t){return xM(e.getItemVisual(t,"symbolSize"))},t}(lp);function ME(e,t){this.parent.drift(e,t)}function TE(e,t,n,o){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(o.isIgnore&&o.isIgnore(n))&&!(o.clipShape&&!o.clipShape.contain(t[0],t[1]))&&"none"!==e.getItemVisual(n,"symbol")}function IE(e){return null==e||Ns(e)||(e={isIgnore:e}),e||{}}function kE(e){var t=e.hostModel,n=t.getModel("emphasis");return{emphasisItemStyle:n.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:n.get("focus"),blurScope:n.get("blurScope"),emphasisDisabled:n.get("disabled"),hoverScale:n.get("scale"),labelStatesModels:kx(t),cursorStyle:t.get("cursor")}}var DE=function(){function e(e){this.group=new lp,this._SymbolCtor=e||CE}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=IE(t);var n=this.group,o=e.hostModel,i=this._data,r=this._SymbolCtor,a=t.disableAnimation,l=kE(e),s={disableAnimation:a},u=t.getSymbolPoint||function(t){return e.getItemLayout(t)};i||n.removeAll(),e.diff(i).add(function(o){var i=u(o);if(TE(e,i,o,t)){var a=new r(e,o,l,s);a.setPosition(i),e.setItemGraphicEl(o,a),n.add(a)}}).update(function(c,d){var h=i.getItemGraphicEl(d),p=u(c);if(TE(e,p,c,t)){var f=e.getItemVisual(c,"symbol")||"circle",g=h&&h.getSymbolType&&h.getSymbolType();if(!h||g&&g!==f)n.remove(h),(h=new r(e,c,l,s)).setPosition(p);else{h.updateData(e,c,l,s);var v={x:p[0],y:p[1]};a?h.attr(v):Wy(h,v,o)}n.add(h),e.setItemGraphicEl(c,h)}else n.remove(h)}).remove(function(e){var t=i.getItemGraphicEl(e);t&&t.fadeOut(function(){n.remove(t)},o)}).execute(),this._getSymbolPoint=u,this._data=e},e.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl(function(t,n){var o=e._getSymbolPoint(n);t.setPosition(o),t.markRedraw()})},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=kE(e),this._data=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n){function o(e){e.isGroup||(e.incremental=!0,e.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[],n=IE(n);for(var i=e.start;i<e.end;i++){var r=t.getItemLayout(i);if(TE(t,r,i,n)){var a=new this._SymbolCtor(t,i,this._seriesScope);a.traverse(o),a.setPosition(r),this.group.add(a),t.setItemGraphicEl(i,a),this._progressiveEls.push(a)}}},e.prototype.eachRendered=function(e){bx(this._progressiveEls||this.group,e)},e.prototype.remove=function(e){var t=this.group,n=this._data;n&&e?n.eachItemGraphicEl(function(e){e.fadeOut(function(){t.remove(e)},n.hostModel)}):t.removeAll()},e}();function NE(e,t,n){var o=e.getBaseAxis(),i=e.getOtherAxis(o),r=function(e,t){var n=0,o=e.scale.getExtent();"start"===t?n=o[0]:"end"===t?n=o[1]:Ds(t)&&!isNaN(t)?n=t:o[0]>0?n=o[0]:o[1]<0&&(n=o[1]);return n}(i,n),a=o.dim,l=i.dim,s=t.mapDimension(l),u=t.mapDimension(a),c="x"===l||"radius"===l?1:0,d=xs(e.dimensions,function(e){return t.mapDimension(e)}),h=!1,p=t.getCalculationInfo("stackResultDimension");return PI(t,d[0])&&(h=!0,d[0]=p),PI(t,d[1])&&(h=!0,d[1]=p),{dataDimsForPoint:d,valueStart:r,valueAxisDim:l,baseAxisDim:a,stacked:!!h,valueDim:s,baseDim:u,baseDataOffset:c,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function EE(e,t,n,o){var i=NaN;e.stacked&&(i=n.get(n.getCalculationInfo("stackedOverDimension"),o)),isNaN(i)&&(i=e.valueStart);var r=e.baseDataOffset,a=[];return a[r]=n.get(e.baseDim,o),a[1-r]=i,t.dataToPoint(a)}var AE=Math.min,LE=Math.max;function VE(e,t){return isNaN(e)||isNaN(t)}function OE(e,t,n,o,i,r,a,l,s){for(var u,c,d,h,p,f,g=n,v=0;v<o;v++){var m=t[2*g],y=t[2*g+1];if(g>=i||g<0)break;if(VE(m,y)){if(s){g+=r;continue}break}if(g===n)e[r>0?"moveTo":"lineTo"](m,y),d=m,h=y;else{var x=m-u,_=y-c;if(x*x+_*_<.5){g+=r;continue}if(a>0){for(var w=g+r,b=t[2*w],S=t[2*w+1];b===m&&S===y&&v<o;)v++,g+=r,b=t[2*(w+=r)],S=t[2*w+1],x=(m=t[2*g])-u,_=(y=t[2*g+1])-c;var C=v+1;if(s)for(;VE(b,S)&&C<o;)C++,b=t[2*(w+=r)],S=t[2*w+1];var M=.5,T=0,I=0,k=void 0,D=void 0;if(C>=o||VE(b,S))p=m,f=y;else{T=b-u,I=S-c;var N=m-u,E=b-m,A=y-c,L=S-y,V=void 0,O=void 0;if("x"===l){var P=T>0?1:-1;p=m-P*(V=Math.abs(N))*a,f=y,k=m+P*(O=Math.abs(E))*a,D=y}else if("y"===l){var B=I>0?1:-1;p=m,f=y-B*(V=Math.abs(A))*a,k=m,D=y+B*(O=Math.abs(L))*a}else V=Math.sqrt(N*N+A*A),p=m-T*a*(1-(M=(O=Math.sqrt(E*E+L*L))/(O+V))),f=y-I*a*(1-M),D=y+I*a*M,k=AE(k=m+T*a*M,LE(b,m)),D=AE(D,LE(S,y)),k=LE(k,AE(b,m)),f=y-(I=(D=LE(D,AE(S,y)))-y)*V/O,p=AE(p=m-(T=k-m)*V/O,LE(u,m)),f=AE(f,LE(c,y)),k=m+(T=m-(p=LE(p,AE(u,m))))*O/V,D=y+(I=y-(f=LE(f,AE(c,y))))*O/V}e.bezierCurveTo(d,h,p,f,m,y),d=k,h=D}else e.lineTo(m,y)}u=m,c=y,g+=r}return v}var PE=function(){return function(){this.smooth=0,this.smoothConstraint=!0}}(),BE=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-polyline",n}return Wl(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new PE},t.prototype.buildPath=function(e,t){var n=t.points,o=0,i=n.length/2;if(t.connectNulls){for(;i>0&&VE(n[2*i-2],n[2*i-1]);i--);for(;o<i&&VE(n[2*o],n[2*o+1]);o++);}for(;o<i;)o+=OE(e,n,o,i,i,1,t.smooth,t.smoothMonotone,t.connectNulls)+1},t.prototype.getPointOn=function(e,t){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var n,o,i=this.path.data,r=Og.CMD,a="x"===t,l=[],s=0;s<i.length;){var u=void 0,c=void 0,d=void 0,h=void 0,p=void 0,f=void 0,g=void 0;switch(i[s++]){case r.M:n=i[s++],o=i[s++];break;case r.L:if(u=i[s++],c=i[s++],(g=a?(e-n)/(u-n):(e-o)/(c-o))<=1&&g>=0){var v=a?(c-o)*g+o:(u-n)*g+n;return a?[e,v]:[v,e]}n=u,o=c;break;case r.C:u=i[s++],c=i[s++],d=i[s++],h=i[s++],p=i[s++],f=i[s++];var m=a?Zc(n,u,d,p,e,l):Zc(o,c,h,f,e,l);if(m>0)for(var y=0;y<m;y++){var x=l[y];if(x<=1&&x>=0){v=a?Uc(o,c,h,f,x):Uc(n,u,d,p,x);return a?[e,v]:[v,e]}}n=p,o=f}}},t}(nv),RE=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Wl(t,e),t}(PE),zE=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-polygon",n}return Wl(t,e),t.prototype.getDefaultShape=function(){return new RE},t.prototype.buildPath=function(e,t){var n=t.points,o=t.stackedOnPoints,i=0,r=n.length/2,a=t.smoothMonotone;if(t.connectNulls){for(;r>0&&VE(n[2*r-2],n[2*r-1]);r--);for(;i<r&&VE(n[2*i],n[2*i+1]);i++);}for(;i<r;){var l=OE(e,n,i,r,r,1,t.smooth,a,t.connectNulls);OE(e,o,i+l-1,l,r,-1,t.stackedOnSmooth,a,t.connectNulls),i+=l+1,e.closePath()}},t}(nv);function FE(e,t,n,o,i){var r=e.getArea(),a=r.x,l=r.y,s=r.width,u=r.height,c=n.get(["lineStyle","width"])||0;a-=c/2,l-=c/2,s+=c,u+=c,s=Math.ceil(s),a!==Math.floor(a)&&(a=Math.floor(a),s++);var d=new fv({shape:{x:a,y:l,width:s,height:u}});if(t){var h=e.getBaseAxis(),p=h.isHorizontal(),f=h.inverse;p?(f&&(d.shape.x+=s),d.shape.width=0):(f||(d.shape.y+=u),d.shape.height=0);var g=Ts(i)?function(e){i(e,d)}:null;Uy(d,{shape:{width:s,height:u,x:a,y:l}},n,null,o,g)}return d}function GE(e,t,n){var o=e.getArea(),i=vp(o.r0,1),r=vp(o.r,1),a=new hy({shape:{cx:vp(e.cx,1),cy:vp(e.cy,1),r0:i,r:r,startAngle:o.startAngle,endAngle:o.endAngle,clockwise:o.clockwise}});t&&("angle"===e.getBaseAxis().dim?a.shape.endAngle=o.startAngle:a.shape.r=i,Uy(a,{shape:{endAngle:o.endAngle,r:r}},n));return a}function HE(e,t,n,o,i){return e?"polar"===e.type?GE(e,t,n):"cartesian2d"===e.type?FE(e,t,n,o,i):null:null}function WE(e,t){return e.type===t}function UE(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return;return!0}}function YE(e){for(var t=1/0,n=1/0,o=-1/0,i=-1/0,r=0;r<e.length;){var a=e[r++],l=e[r++];isNaN(a)||(t=Math.min(a,t),o=Math.max(a,o)),isNaN(l)||(n=Math.min(l,n),i=Math.max(l,i))}return[[t,n],[o,i]]}function ZE(e,t){var n=YE(e),o=n[0],i=n[1],r=YE(t),a=r[0],l=r[1];return Math.max(Math.abs(o[0]-a[0]),Math.abs(o[1]-a[1]),Math.abs(i[0]-l[0]),Math.abs(i[1]-l[1]))}function XE(e){return Ds(e)?e:e?.5:0}function jE(e,t,n,o,i){var r=n.getBaseAxis(),a="x"===r.dim||"radius"===r.dim?0:1,l=[],s=0,u=[],c=[],d=[],h=[];if(i){for(s=0;s<e.length;s+=2){var p=t||e;isNaN(p[s])||isNaN(p[s+1])||h.push(e[s],e[s+1])}e=h}for(s=0;s<e.length-2;s+=2)switch(d[0]=e[s+2],d[1]=e[s+3],c[0]=e[s],c[1]=e[s+1],l.push(c[0],c[1]),o){case"end":u[a]=d[a],u[1-a]=c[1-a],l.push(u[0],u[1]);break;case"middle":var f=(c[a]+d[a])/2,g=[];u[a]=g[a]=f,u[1-a]=c[1-a],g[1-a]=d[1-a],l.push(u[0],u[1]),l.push(g[0],g[1]);break;default:u[a]=c[a],u[1-a]=d[1-a],l.push(u[0],u[1])}return l.push(e[s++],e[s++]),l}function $E(e,t){var n,o,i=[],r=e.length;function a(e,t,n){var o=e.coord;return{coord:n,color:function(e,t,n){if(t&&t.length&&e>=0&&e<=1){var o=e*(t.length-1),i=Math.floor(o),r=Math.ceil(o),a=wd(t[i]),l=wd(t[r]),s=o-i,u=Id([cd(gd(a[0],l[0],s)),cd(gd(a[1],l[1],s)),cd(gd(a[2],l[2],s)),dd(gd(a[3],l[3],s))],"rgba");return n?{color:u,leftIndex:i,rightIndex:r,value:o}:u}}((n-o)/(t.coord-o),[e.color,t.color])}}for(var l=0;l<r;l++){var s=e[l],u=s.coord;if(u<0)n=s;else{if(u>t){o?i.push(a(o,s,t)):n&&i.push(a(n,s,0),a(n,s,t));break}n&&(i.push(a(n,s,0)),n=null),i.push(s),o=s}}return i}function qE(e,t,n){var o=e.get("showAllSymbol"),i="auto"===o;if(!o||i){var r=n.getAxesByScale("ordinal")[0];if(r&&(!i||!function(e,t){var n=e.getExtent(),o=Math.abs(n[1]-n[0])/e.scale.count();isNaN(o)&&(o=0);for(var i=t.count(),r=Math.max(1,Math.round(i/5)),a=0;a<i;a+=r)if(1.5*CE.getSymbolSize(t,a)[e.isHorizontal()?1:0]>o)return!1;return!0}(r,t))){var a=t.mapDimension(r.dim),l={};return ys(r.getViewLabels(),function(e){var t=r.scale.getRawOrdinalNumber(e.tickValue);l[t]=1}),function(e){return!l.hasOwnProperty(t.get(a,e))}}}}function KE(e,t){return isNaN(e)||isNaN(t)}function JE(e,t){return[e[2*t],e[2*t+1]]}function QE(e){if(e.get(["endLabel","show"]))return!0;for(var t=0;t<Pv.length;t++)if(e.get([Pv[t],"endLabel","show"]))return!0;return!1}function eA(e,t,n,o){if(WE(t,"cartesian2d")){var i=o.getModel("endLabel"),r=i.get("valueAnimation"),a=o.getData(),l={lastFrameIndex:0},s=QE(o)?function(n,o){e._endLabelOnDuring(n,o,a,l,r,i,t)}:null,u=t.getBaseAxis().isHorizontal(),c=FE(t,n,o,function(){var t=e._endLabel;t&&n&&null!=l.originalX&&t.attr({x:l.originalX,y:l.originalY})},s);if(!o.get("clip",!0)){var d=c.shape,h=Math.max(d.width,d.height);u?(d.y-=h,d.height+=2*h):(d.x-=h,d.width+=2*h)}return s&&s(1,c),c}return"production"!==process.env.NODE_ENV&&o.get(["endLabel","show"]),GE(t,n,o)}var tA=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Wl(t,e),t.prototype.init=function(){var e=new lp,t=new DE;this.group.add(t.group),this._symbolDraw=t,this._lineGroup=e,this._changePolyState=Ss(this._changePolyState,this)},t.prototype.render=function(e,t,n){var o=e.coordinateSystem,i=this.group,r=e.getData(),a=e.getModel("lineStyle"),l=e.getModel("areaStyle"),s=r.getLayout("points")||[],u="polar"===o.type,c=this._coordSys,d=this._symbolDraw,h=this._polyline,p=this._polygon,f=this._lineGroup,g=!t.ssr&&e.get("animation"),v=!l.isEmpty(),m=l.get("origin"),y=NE(o,r,m),x=v&&function(e,t,n){if(!n.valueDim)return[];for(var o=t.count(),i=nk(2*o),r=0;r<o;r++){var a=EE(n,e,t,r);i[2*r]=a[0],i[2*r+1]=a[1]}return i}(o,r,y),_=e.get("showSymbol"),w=e.get("connectNulls"),b=_&&!u&&qE(e,r,o),S=this._data;S&&S.eachItemGraphicEl(function(e,t){e.__temp&&(i.remove(e),S.setItemGraphicEl(t,null))}),_||d.remove(),i.add(f);var C,M=!u&&e.get("step");o&&o.getArea&&e.get("clip",!0)&&(null!=(C=o.getArea()).width?(C.x-=.1,C.y-=.1,C.width+=.2,C.height+=.2):C.r0&&(C.r0-=.5,C.r+=.5)),this._clipShapeForSymbol=C;var T=function(e,t,n){var o=e.getVisual("visualMeta");if(o&&o.length&&e.count())if("cartesian2d"===t.type){for(var i,r,a=o.length-1;a>=0;a--){var l=e.getDimensionInfo(o[a].dimension);if("x"===(i=l&&l.coordDim)||"y"===i){r=o[a];break}}if(r){var s=t.getAxis(i),u=xs(r.stops,function(e){return{coord:s.toGlobalCoord(s.dataToCoord(e.value)),color:e.color}}),c=u.length,d=r.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),d.reverse());var h=$E(u,"x"===i?n.getWidth():n.getHeight()),p=h.length;if(!p&&c)return u[0].coord<0?d[1]?d[1]:u[c-1].color:d[0]?d[0]:u[0].color;var f=h[0].coord-10,g=h[p-1].coord+10,v=g-f;if(v<.001)return"transparent";ys(h,function(e){e.offset=(e.coord-f)/v}),h.push({offset:p?h[p-1].offset:.5,color:d[1]||"transparent"}),h.unshift({offset:p?h[0].offset:.5,color:d[0]||"transparent"});var m=new Ey(0,0,0,0,h,!0);return m[i]=f,m[i+"2"]=g,m}process.env.NODE_ENV}else process.env.NODE_ENV}(r,o,n)||r.getVisual("style")[r.getVisual("drawType")];if(h&&c.type===o.type&&M===this._step){v&&!p?p=this._newPolygon(s,x):p&&!v&&(f.remove(p),p=this._polygon=null),u||this._initOrUpdateEndLabel(e,o,Z_(T));var I=f.getClipPath();if(I)Uy(I,{shape:eA(this,o,!1,e).shape},e);else f.setClipPath(eA(this,o,!0,e));_&&d.updateData(r,{isIgnore:b,clipShape:C,disableAnimation:!0,getSymbolPoint:function(e){return[s[2*e],s[2*e+1]]}}),UE(this._stackedOnPoints,x)&&UE(this._points,s)||(g?this._doUpdateAnimation(r,x,o,n,M,m,w):(M&&(x&&(x=jE(x,s,o,M,w)),s=jE(s,null,o,M,w)),h.setShape({points:s}),p&&p.setShape({points:s,stackedOnPoints:x})))}else _&&d.updateData(r,{isIgnore:b,clipShape:C,disableAnimation:!0,getSymbolPoint:function(e){return[s[2*e],s[2*e+1]]}}),g&&this._initSymbolLabelAnimation(r,o,C),M&&(x&&(x=jE(x,s,o,M,w)),s=jE(s,null,o,M,w)),h=this._newPolyline(s),v?p=this._newPolygon(s,x):p&&(f.remove(p),p=this._polygon=null),u||this._initOrUpdateEndLabel(e,o,Z_(T)),f.setClipPath(eA(this,o,!0,e));var k=e.getModel("emphasis"),D=k.get("focus"),N=k.get("blurScope"),E=k.get("disabled");(h.useStyle(fs(a.getLineStyle(),{fill:"none",stroke:T,lineJoin:"bevel"})),Sm(h,e,"lineStyle"),h.style.lineWidth>0&&"bolder"===e.get(["emphasis","lineStyle","width"]))&&(h.getState("emphasis").style.lineWidth=+h.style.lineWidth+1);Nv(h).seriesIndex=e.seriesIndex,xm(h,D,N,E);var A=XE(e.get("smooth")),L=e.get("smoothMonotone");if(h.setShape({smooth:A,smoothMonotone:L,connectNulls:w}),p){var V=r.getCalculationInfo("stackedOnSeries"),O=0;p.useStyle(fs(l.getAreaStyle(),{fill:T,opacity:.7,lineJoin:"bevel",decal:r.getVisual("style").decal})),V&&(O=XE(V.get("smooth"))),p.setShape({smooth:A,stackedOnSmooth:O,smoothMonotone:L,connectNulls:w}),Sm(p,e,"areaStyle"),Nv(p).seriesIndex=e.seriesIndex,xm(p,D,N,E)}var P=this._changePolyState;r.eachItemGraphicEl(function(e){e&&(e.onHoverStateChange=P)}),this._polyline.onHoverStateChange=P,this._data=r,this._coordSys=o,this._stackedOnPoints=x,this._points=s,this._step=M,this._valueOrigin=m,e.get("triggerLineEvent")&&(this.packEventData(e,h),p&&this.packEventData(e,p))},t.prototype.packEventData=function(e,t){Nv(t).eventData={componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line"}},t.prototype.highlight=function(e,t,n,o){var i=e.getData(),r=sf(i,o);if(this._changePolyState("emphasis"),!(r instanceof Array)&&null!=r&&r>=0){var a=i.getLayout("points"),l=i.getItemGraphicEl(r);if(!l){var s=a[2*r],u=a[2*r+1];if(isNaN(s)||isNaN(u))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(s,u))return;var c=e.get("zlevel")||0,d=e.get("z")||0;(l=new CE(i,r)).x=s,l.y=u,l.setZ(c,d);var h=l.getSymbolPath().getTextContent();h&&(h.zlevel=c,h.z=d,h.z2=this._polyline.z2+1),l.__temp=!0,i.setItemGraphicEl(r,l),l.stopSymbolAnimation(!0),this.group.add(l)}l.highlight()}else aC.prototype.highlight.call(this,e,t,n,o)},t.prototype.downplay=function(e,t,n,o){var i=e.getData(),r=sf(i,o);if(this._changePolyState("normal"),null!=r&&r>=0){var a=i.getItemGraphicEl(r);a&&(a.__temp?(i.setItemGraphicEl(r,null),this.group.remove(a)):a.downplay())}else aC.prototype.downplay.call(this,e,t,n,o)},t.prototype._changePolyState=function(e){var t=this._polygon;em(this._polyline,e),t&&em(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new BE({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(t),this._polyline=t,t},t.prototype._newPolygon=function(e,t){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new zE({shape:{points:e,stackedOnPoints:t},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,t,n){var o,i,r=t.getBaseAxis(),a=r.inverse;"cartesian2d"===t.type?(o=r.isHorizontal(),i=!1):"polar"===t.type&&(o="angle"===r.dim,i=!0);var l=e.hostModel,s=l.get("animationDuration");Ts(s)&&(s=s(null));var u=l.get("animationDelay")||0,c=Ts(u)?u(null):u;e.eachItemGraphicEl(function(e,r){var l=e;if(l){var d=[e.x,e.y],h=void 0,p=void 0,f=void 0;if(n)if(i){var g=n,v=t.pointToCoord(d);o?(h=g.startAngle,p=g.endAngle,f=-v[1]/180*Math.PI):(h=g.r0,p=g.r,f=v[0])}else{var m=n;o?(h=m.x,p=m.x+m.width,f=e.x):(h=m.y+m.height,p=m.y,f=e.y)}var y=p===h?0:(f-h)/(p-h);a&&(y=1-y);var x=Ts(u)?u(r):s*y+c,_=l.getSymbolPath(),w=_.getTextContent();l.attr({scaleX:0,scaleY:0}),l.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:x}),w&&w.animateFrom({style:{opacity:0}},{duration:300,delay:x}),_.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,t,n){var o=e.getModel("endLabel");if(QE(e)){var i=e.getData(),r=this._polyline,a=i.getLayout("points");if(!a)return r.removeTextContent(),void(this._endLabel=null);var l=this._endLabel;l||((l=this._endLabel=new mv({z2:200})).ignoreClip=!0,r.setTextContent(this._endLabel),r.disableLabelAnimation=!0);var s=function(e){for(var t=e.length/2;t>0&&KE(e[2*t-2],e[2*t-1]);t--);return t-1}(a);s>=0&&(Ix(r,kx(e,"endLabel"),{inheritColor:n,labelFetcher:e,labelDataIndex:s,defaultText:function(e,t,n){return null!=n?SE(i,n):bE(i,e)},enableTextSetter:!0},function(e,t){var n=t.getBaseAxis(),o=n.isHorizontal(),i=n.inverse,r=o?i?"right":"left":"center",a=o?"middle":i?"top":"bottom";return{normal:{align:e.get("align")||r,verticalAlign:e.get("verticalAlign")||a}}}(o,t)),r.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(e,t,n,o,i,r,a){var l=this._endLabel,s=this._polyline;if(l){e<1&&null==o.originalX&&(o.originalX=l.x,o.originalY=l.y);var u=n.getLayout("points"),c=n.hostModel,d=c.get("connectNulls"),h=r.get("precision"),p=r.get("distance")||0,f=a.getBaseAxis(),g=f.isHorizontal(),v=f.inverse,m=t.shape,y=v?g?m.x:m.y+m.height:g?m.x+m.width:m.y,x=(g?p:0)*(v?-1:1),_=(g?0:-p)*(v?-1:1),w=g?"x":"y",b=function(e,t,n){for(var o,i,r=e.length/2,a="x"===n?0:1,l=0,s=-1,u=0;u<r;u++)if(i=e[2*u+a],!isNaN(i)&&!isNaN(e[2*u+1-a]))if(0!==u){if(o<=t&&i>=t||o>=t&&i<=t){s=u;break}l=u,o=i}else o=i;return{range:[l,s],t:(t-o)/(i-o)}}(u,y,w),S=b.range,C=S[1]-S[0],M=void 0;if(C>=1){if(C>1&&!d){var T=JE(u,S[0]);l.attr({x:T[0]+x,y:T[1]+_}),i&&(M=c.getRawValue(S[0]))}else{(T=s.getPointOn(y,w))&&l.attr({x:T[0]+x,y:T[1]+_});var I=c.getRawValue(S[0]),k=c.getRawValue(S[1]);i&&(M=yf(n,h,I,k,b.t))}o.lastFrameIndex=S[0]}else{var D=1===e||o.lastFrameIndex>0?S[0]:0;T=JE(u,D);i&&(M=c.getRawValue(D)),l.attr({x:T[0]+x,y:T[1]+_})}if(i){var N=Px(l);"function"==typeof N.setLabelText&&N.setLabelText(M)}}},t.prototype._doUpdateAnimation=function(e,t,n,o,i,r,a){var l=this._polyline,s=this._polygon,u=e.hostModel,c=function(e,t,n,o,i,r,a){for(var l=function(e,t){var n=[];return t.diff(e).add(function(e){n.push({cmd:"+",idx:e})}).update(function(e,t){n.push({cmd:"=",idx:t,idx1:e})}).remove(function(e){n.push({cmd:"-",idx:e})}).execute(),n}(e,t),s=[],u=[],c=[],d=[],h=[],p=[],f=[],g=NE(i,t,a),v=e.getLayout("points")||[],m=t.getLayout("points")||[],y=0;y<l.length;y++){var x=l[y],_=!0,w=void 0,b=void 0;switch(x.cmd){case"=":w=2*x.idx,b=2*x.idx1;var S=v[w],C=v[w+1],M=m[b],T=m[b+1];(isNaN(S)||isNaN(C))&&(S=M,C=T),s.push(S,C),u.push(M,T),c.push(n[w],n[w+1]),d.push(o[b],o[b+1]),f.push(t.getRawIndex(x.idx1));break;case"+":var I=x.idx,k=g.dataDimsForPoint,D=i.dataToPoint([t.get(k[0],I),t.get(k[1],I)]);b=2*I,s.push(D[0],D[1]),u.push(m[b],m[b+1]);var N=EE(g,i,t,I);c.push(N[0],N[1]),d.push(o[b],o[b+1]),f.push(t.getRawIndex(I));break;case"-":_=!1}_&&(h.push(x),p.push(p.length))}p.sort(function(e,t){return f[e]-f[t]});var E=s.length,A=nk(E),L=nk(E),V=nk(E),O=nk(E),P=[];for(y=0;y<p.length;y++){var B=p[y],R=2*y,z=2*B;A[R]=s[z],A[R+1]=s[z+1],L[R]=u[z],L[R+1]=u[z+1],V[R]=c[z],V[R+1]=c[z+1],O[R]=d[z],O[R+1]=d[z+1],P[y]=h[B]}return{current:A,next:L,stackedOnCurrent:V,stackedOnNext:O,status:P}}(this._data,e,this._stackedOnPoints,t,this._coordSys,0,this._valueOrigin),d=c.current,h=c.stackedOnCurrent,p=c.next,f=c.stackedOnNext;if(i&&(h=jE(c.stackedOnCurrent,c.current,n,i,a),d=jE(c.current,null,n,i,a),f=jE(c.stackedOnNext,c.next,n,i,a),p=jE(c.next,null,n,i,a)),ZE(d,p)>3e3||s&&ZE(h,f)>3e3)return l.stopAnimation(),l.setShape({points:p}),void(s&&(s.stopAnimation(),s.setShape({points:p,stackedOnPoints:f})));l.shape.__points=c.current,l.shape.points=d;var g={shape:{points:p}};c.current!==d&&(g.shape.__points=c.next),l.stopAnimation(),Wy(l,g,u),s&&(s.setShape({points:d,stackedOnPoints:h}),s.stopAnimation(),Wy(s,{shape:{stackedOnPoints:f}},u),l.shape.points!==s.shape.points&&(s.shape.points=l.shape.points));for(var v=[],m=c.status,y=0;y<m.length;y++){if("="===m[y].cmd){var x=e.getItemGraphicEl(m[y].idx1);x&&v.push({el:x,ptIdx:y})}}l.animators&&l.animators.length&&l.animators[0].during(function(){s&&s.dirtyShape();for(var e=l.shape.__points,t=0;t<v.length;t++){var n=v[t].el,o=2*v[t].ptIdx;n.x=e[o],n.y=e[o+1],n.markRedraw()}})},t.prototype.remove=function(e){var t=this.group,n=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),n&&n.eachItemGraphicEl(function(e,o){e.__temp&&(t.remove(e),n.setItemGraphicEl(o,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},t.type="line",t}(aC);function nA(e,t){return{seriesType:e,plan:oC(),reset:function(e){var n=e.getData(),o=e.coordinateSystem,i=e.pipelineContext,r=t||i.large;if(o){var a=xs(o.dimensions,function(e){return n.mapDimension(e)}).slice(0,2),l=a.length,s=n.getCalculationInfo("stackResultDimension");PI(n,a[0])&&(a[0]=s),PI(n,a[1])&&(a[1]=s);var u=n.getStore(),c=n.getDimensionIndex(a[0]),d=n.getDimensionIndex(a[1]);return l&&{progress:function(e,t){for(var n=e.end-e.start,i=r&&nk(n*l),a=[],s=[],h=e.start,p=0;h<e.end;h++){var f=void 0;if(1===l){var g=u.get(c,h);f=o.dataToPoint(g,null,s)}else a[0]=u.get(c,h),a[1]=u.get(d,h),f=o.dataToPoint(a,null,s);r?(i[p++]=f[0],i[p++]=f[1]):t.setItemLayout(h,f.slice())}r&&t.setLayout("points",i)}}}}}}var oA={average:function(e){for(var t=0,n=0,o=0;o<e.length;o++)isNaN(e[o])||(t+=e[o],n++);return 0===n?NaN:t/n},sum:function(e){for(var t=0,n=0;n<e.length;n++)t+=e[n]||0;return t},max:function(e){for(var t=-1/0,n=0;n<e.length;n++)e[n]>t&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n<e.length;n++)e[n]<t&&(t=e[n]);return isFinite(t)?t:NaN},nearest:function(e){return e[0]}},iA=function(e){return Math.round(e.length/2)};function rA(e){return{seriesType:e,reset:function(e,t,n){var o=e.getData(),i=e.get("sampling"),r=e.coordinateSystem,a=o.count();if(a>10&&"cartesian2d"===r.type&&i){var l=r.getBaseAxis(),s=r.getOtherAxis(l),u=l.getExtent(),c=n.getDevicePixelRatio(),d=Math.abs(u[1]-u[0])*(c||1),h=Math.round(a/d);if(isFinite(h)&&h>1){"lttb"===i?e.setData(o.lttbDownSample(o.mapDimension(s.dim),1/h)):"minmax"===i&&e.setData(o.minmaxDownSample(o.mapDimension(s.dim),1/h));var p=void 0;Is(i)?p=oA[i]:Ts(i)&&(p=i),p&&e.setData(o.downSample(o.mapDimension(s.dim),1/h,p,iA))}}}}}var aA=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.prototype.getInitialData=function(e,t){return RI(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,t,n){var o=this.coordinateSystem;if(o&&o.clampData){var i=o.clampData(e),r=o.dataToPoint(i);if(n)ys(o.getAxes(),function(e,n){if("category"===e.type&&null!=t){var o=e.getTicksCoords(),a=e.getTickModel().get("alignWithLabel"),l=i[n],s="x1"===t[n]||"y1"===t[n];if(s&&!a&&(l+=1),o.length<2)return;if(2===o.length)return void(r[n]=e.toGlobalCoord(e.getExtent()[s?1:0]));for(var u=void 0,c=void 0,d=1,h=0;h<o.length;h++){var p=o[h].coord,f=h===o.length-1?o[h-1].tickValue+d:o[h].tickValue;if(f===l){c=p;break}if(f<l)u=p;else if(null!=u&&f>l){c=(p+u)/2;break}1===h&&(d=f-o[0].tickValue)}null==c&&(u?u&&(c=o[o.length-1].coord):c=o[0].coord),r[n]=e.toGlobalCoord(c)}});else{var a=this.getData(),l=a.getLayout("offset"),s=a.getLayout("size"),u=o.getBaseAxis().isHorizontal()?0:1;r[u]+=l+s/2}return r}return[NaN,NaN]},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},t}(jS);jS.registerClass(aA);var lA=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.prototype.getInitialData=function(){return RI(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},t.prototype.getProgressiveThreshold=function(){var e=this.get("progressiveThreshold"),t=this.get("largeThreshold");return t>e&&(e=t),e},t.prototype.brushSelector=function(e,t,n){return n.rect(t.getItemLayout(e))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=e_(aA.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),t}(aA),sA=function(){return function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0}}(),uA=function(e){function t(t){var n=e.call(this,t)||this;return n.type="sausage",n}return Wl(t,e),t.prototype.getDefaultShape=function(){return new sA},t.prototype.buildPath=function(e,t){var n=t.cx,o=t.cy,i=Math.max(t.r0||0,0),r=Math.max(t.r,0),a=.5*(r-i),l=i+a,s=t.startAngle,u=t.endAngle,c=t.clockwise,d=2*Math.PI,h=c?u-s<d:s-u<d;h||(s=u-(c?d:-d));var p=Math.cos(s),f=Math.sin(s),g=Math.cos(u),v=Math.sin(u);h?(e.moveTo(p*i+n,f*i+o),e.arc(p*l+n,f*l+o,a,-Math.PI+s,s,!c)):e.moveTo(p*r+n,f*r+o),e.arc(n,o,r,s,u,!c),e.arc(g*l+n,v*l+o,a,u-2*Math.PI,u-Math.PI,!c),0!==i&&e.arc(n,o,i,u,s,c)},t}(nv);function cA(e,t,n){return t*Math.sin(e)*(n?-1:1)}function dA(e,t,n){return t*Math.cos(e)*(n?1:-1)}function hA(e,t,n){var o=e.get("borderRadius");if(null==o)return n?{cornerRadius:0}:null;Ms(o)||(o=[o,o,o,o]);var i=Math.abs(t.r||0-t.r0||0);return{cornerRadius:xs(o,function(e){return $h(e,i)})}}var pA=Math.max,fA=Math.min;var gA=function(e){function t(){var n=e.call(this)||this;return n.type=t.type,n._isFirstFrame=!0,n}return Wl(t,e),t.prototype.render=function(e,t,n,o){this._model=e,this._removeOnRenderedListener(n),this._updateDrawMode(e);var i=e.get("coordinateSystem");"cartesian2d"===i||"polar"===i?(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(e,t,n):this._renderNormal(e,t,n,o)):"production"!==process.env.NODE_ENV&&zp("Only cartesian2d and polar supported for bar.")},t.prototype.incrementalPrepareRender=function(e){this._clear(),this._updateDrawMode(e),this._updateLargeClip(e)},t.prototype.incrementalRender=function(e,t){this._progressiveEls=[],this._incrementalRenderLarge(e,t)},t.prototype.eachRendered=function(e){bx(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var t=e.pipelineContext.large;null!=this._isLargeDraw&&t===this._isLargeDraw||(this._isLargeDraw=t,this._clear())},t.prototype._renderNormal=function(e,t,n,o){var i,r=this.group,a=e.getData(),l=this._data,s=e.coordinateSystem,u=s.getBaseAxis();"cartesian2d"===s.type?i=u.isHorizontal():"polar"===s.type&&(i="angle"===u.dim);var c=e.isAnimationEnabled()?e:null,d=function(e,t){var n=e.get("realtimeSort",!0),o=t.getBaseAxis();"production"!==process.env.NODE_ENV&&n&&("category"!==o.type&&zp("`realtimeSort` will not work because this bar series is not based on a category axis."),"cartesian2d"!==t.type&&zp("`realtimeSort` will not work because this bar series is not on cartesian2d."));if(n&&"category"===o.type&&"cartesian2d"===t.type)return{baseAxis:o,otherAxis:t.getOtherAxis(o)}}(e,s);d&&this._enableRealtimeSort(d,a,n);var h=e.get("clip",!0)||d,p=function(e,t){var n=e.getArea&&e.getArea();if(WE(e,"cartesian2d")){var o=e.getBaseAxis();if("category"!==o.type||!o.onBand){var i=t.getLayout("bandWidth");o.isHorizontal()?(n.x-=i,n.width+=2*i):(n.y-=i,n.height+=2*i)}}return n}(s,a);r.removeClipPath();var f=e.get("roundCap",!0),g=e.get("showBackground",!0),v=e.getModel("backgroundStyle"),m=v.get("borderRadius")||0,y=[],x=this._backgroundEls,_=o&&o.isInitSort,w=o&&"changeAxisOrder"===o.type;function b(e){var t=SA[s.type](a,e),n=function(e,t,n){var o="polar"===e.type?hy:fv;return new o({shape:NA(t,n,e),silent:!0,z2:0})}(s,i,t);return n.useStyle(v.getItemStyle()),"cartesian2d"===s.type?n.setShape("r",m):n.setShape("cornerRadius",m),y[e]=n,n}a.diff(l).add(function(t){var n=a.getItemModel(t),o=SA[s.type](a,t,n);if(g&&b(t),a.hasValue(t)&&bA[s.type](o)){var l=!1;h&&(l=vA[s.type](p,o));var v=mA[s.type](e,a,t,o,i,c,u.model,!1,f);d&&(v.forceLabelAnimation=!0),MA(v,a,t,n,o,e,i,"polar"===s.type),_?v.attr({shape:o}):d?yA(d,c,v,o,t,i,!1,!1):Uy(v,{shape:o},e,t),a.setItemGraphicEl(t,v),r.add(v),v.ignore=l}}).update(function(t,n){var o=a.getItemModel(t),S=SA[s.type](a,t,o);if(g){var C=void 0;0===x.length?C=b(n):((C=x[n]).useStyle(v.getItemStyle()),"cartesian2d"===s.type?C.setShape("r",m):C.setShape("cornerRadius",m),y[t]=C);var M=SA[s.type](a,t);Wy(C,{shape:NA(i,M,s)},c,t)}var T=l.getItemGraphicEl(n);if(a.hasValue(t)&&bA[s.type](S)){var I=!1;if(h&&(I=vA[s.type](p,S))&&r.remove(T),T?$y(T):T=mA[s.type](e,a,t,S,i,c,u.model,!!T,f),d&&(T.forceLabelAnimation=!0),w){var k=T.getTextContent();if(k){var D=Px(k);null!=D.prevValue&&(D.prevValue=D.value)}}else MA(T,a,t,o,S,e,i,"polar"===s.type);_?T.attr({shape:S}):d?yA(d,c,T,S,t,i,!0,w):Wy(T,{shape:S},e,t,null),a.setItemGraphicEl(t,T),T.ignore=I,r.add(T)}else r.remove(T)}).remove(function(t){var n=l.getItemGraphicEl(t);n&&jy(n,e,t)}).execute();var S=this._backgroundGroup||(this._backgroundGroup=new lp);S.removeAll();for(var C=0;C<y.length;++C)S.add(y[C]);r.add(S),this._backgroundEls=y,this._data=a},t.prototype._renderLarge=function(e,t,n){this._clear(),kA(e,this.group),this._updateLargeClip(e)},t.prototype._incrementalRenderLarge=function(e,t){this._removeBackground(),kA(t,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(e){var t=e.get("clip",!0)&&HE(e.coordinateSystem,!1,e),n=this.group;t?n.setClipPath(t):n.removeClipPath()},t.prototype._enableRealtimeSort=function(e,t,n){var o=this;if(t.count()){var i=e.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(t,e,n),this._isFirstFrame=!1;else{var r=function(e){var n=t.getItemGraphicEl(e),o=n&&n.shape;return o&&Math.abs(i.isHorizontal()?o.height:o.width)||0};this._onRendered=function(){o._updateSortWithinSameData(t,r,i,n)},n.getZr().on("rendered",this._onRendered)}}},t.prototype._dataSort=function(e,t,n){var o=[];return e.each(e.mapDimension(t.dim),function(e,t){var i=n(t);i=null==i?NaN:i,o.push({dataIndex:t,mappedValue:i,ordinalNumber:e})}),o.sort(function(e,t){return t.mappedValue-e.mappedValue}),{ordinalNumbers:xs(o,function(e){return e.ordinalNumber})}},t.prototype._isOrderChangedWithinSameData=function(e,t,n){for(var o=n.scale,i=e.mapDimension(n.dim),r=Number.MAX_VALUE,a=0,l=o.getOrdinalMeta().categories.length;a<l;++a){var s=e.rawIndexOf(i,o.getRawOrdinalNumber(a)),u=s<0?Number.MIN_VALUE:t(e.indexOfRawIndex(s));if(u>r)return!0;r=u}return!1},t.prototype._isOrderDifferentInView=function(e,t){for(var n=t.scale,o=n.getExtent(),i=Math.max(0,o[0]),r=Math.min(o[1],n.getOrdinalMeta().categories.length-1);i<=r;++i)if(e.ordinalNumbers[i]!==n.getRawOrdinalNumber(i))return!0},t.prototype._updateSortWithinSameData=function(e,t,n,o){if(this._isOrderChangedWithinSameData(e,t,n)){var i=this._dataSort(e,n,t);this._isOrderDifferentInView(i,n)&&(this._removeOnRenderedListener(o),o.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:i}))}},t.prototype._dispatchInitSort=function(e,t,n){var o=t.baseAxis,i=this._dataSort(e,o,function(n){return e.get(e.mapDimension(t.otherAxis.dim),n)});n.dispatchAction({type:"changeAxisOrder",componentType:o.dim+"Axis",isInitSort:!0,axisId:o.index,sortInfo:i})},t.prototype.remove=function(e,t){this._clear(this._model),this._removeOnRenderedListener(t)},t.prototype.dispose=function(e,t){this._removeOnRenderedListener(t)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(e){var t=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(t){jy(t,e,Nv(t).dataIndex)})):t.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t}(aC),vA={cartesian2d:function(e,t){var n=t.width<0?-1:1,o=t.height<0?-1:1;n<0&&(t.x+=t.width,t.width=-t.width),o<0&&(t.y+=t.height,t.height=-t.height);var i=e.x+e.width,r=e.y+e.height,a=pA(t.x,e.x),l=fA(t.x+t.width,i),s=pA(t.y,e.y),u=fA(t.y+t.height,r),c=l<a,d=u<s;return t.x=c&&a>i?l:a,t.y=d&&s>r?u:s,t.width=c?0:l-a,t.height=d?0:u-s,n<0&&(t.x+=t.width,t.width=-t.width),o<0&&(t.y+=t.height,t.height=-t.height),c||d},polar:function(e,t){var n=t.r0<=t.r?1:-1;if(n<0){var o=t.r;t.r=t.r0,t.r0=o}var i=fA(t.r,e.r),r=pA(t.r0,e.r0);t.r=i,t.r0=r;var a=i-r<0;if(n<0){o=t.r;t.r=t.r0,t.r0=o}return a}},mA={cartesian2d:function(e,t,n,o,i,r,a,l,s){var u=new fv({shape:ps({},o),z2:1});(u.__dataIndex=n,u.name="item",r)&&(u.shape[i?"height":"width"]=0);return u},polar:function(e,t,n,o,i,r,a,l,s){var u=!i&&s?uA:hy,c=new u({shape:o,z2:1});c.name="item";var d,h,p=CA(i);if(c.calculateTextPosition=(d=p,h=({isRoundCap:u===uA}||{}).isRoundCap,function(e,t,n){var o=t.position;if(!o||o instanceof Array)return qh(e,t,n);var i=d(o),r=null!=t.distance?t.distance:5,a=this.shape,l=a.cx,s=a.cy,u=a.r,c=a.r0,p=(u+c)/2,f=a.startAngle,g=a.endAngle,v=(f+g)/2,m=h?Math.abs(u-c)/2:0,y=Math.cos,x=Math.sin,_=l+u*y(f),w=s+u*x(f),b="left",S="top";switch(i){case"startArc":_=l+(c-r)*y(v),w=s+(c-r)*x(v),b="center",S="top";break;case"insideStartArc":_=l+(c+r)*y(v),w=s+(c+r)*x(v),b="center",S="bottom";break;case"startAngle":_=l+p*y(f)+cA(f,r+m,!1),w=s+p*x(f)+dA(f,r+m,!1),b="right",S="middle";break;case"insideStartAngle":_=l+p*y(f)+cA(f,-r+m,!1),w=s+p*x(f)+dA(f,-r+m,!1),b="left",S="middle";break;case"middle":_=l+p*y(v),w=s+p*x(v),b="center",S="middle";break;case"endArc":_=l+(u+r)*y(v),w=s+(u+r)*x(v),b="center",S="bottom";break;case"insideEndArc":_=l+(u-r)*y(v),w=s+(u-r)*x(v),b="center",S="top";break;case"endAngle":_=l+p*y(g)+cA(g,r+m,!0),w=s+p*x(g)+dA(g,r+m,!0),b="left",S="middle";break;case"insideEndAngle":_=l+p*y(g)+cA(g,-r+m,!0),w=s+p*x(g)+dA(g,-r+m,!0),b="right",S="middle";break;default:return qh(e,t,n)}return(e=e||{}).x=_,e.y=w,e.align=b,e.verticalAlign=S,e}),r){var f=i?"r":"endAngle",g={};c.shape[f]=i?o.r0:o.startAngle,g[f]=o[f],(l?Wy:Uy)(c,{shape:g},r)}return c}};function yA(e,t,n,o,i,r,a,l){var s,u;r?(u={x:o.x,width:o.width},s={y:o.y,height:o.height}):(u={y:o.y,height:o.height},s={x:o.x,width:o.width}),l||(a?Wy:Uy)(n,{shape:s},t,i,null),(a?Wy:Uy)(n,{shape:u},t?e.baseAxis.model:null,i)}function xA(e,t){for(var n=0;n<t.length;n++)if(!isFinite(e[t[n]]))return!0;return!1}var _A=["x","y","width","height"],wA=["cx","cy","r","startAngle","endAngle"],bA={cartesian2d:function(e){return!xA(e,_A)},polar:function(e){return!xA(e,wA)}},SA={cartesian2d:function(e,t,n){var o=e.getItemLayout(t),i=n?function(e,t){var n=e.get(["itemStyle","borderColor"]);if(!n||"none"===n)return 0;var o=e.get(["itemStyle","borderWidth"])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),r=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(o,i,r)}(n,o):0,r=o.width>0?1:-1,a=o.height>0?1:-1;return{x:o.x+r*i/2,y:o.y+a*i/2,width:o.width-r*i,height:o.height-a*i}},polar:function(e,t,n){var o=e.getItemLayout(t);return{cx:o.cx,cy:o.cy,r0:o.r0,r:o.r,startAngle:o.startAngle,endAngle:o.endAngle,clockwise:o.clockwise}}};function CA(e){return function(e){var t=e?"Arc":"Angle";return function(e){switch(e){case"start":case"insideStart":case"end":case"insideEnd":return e+t;default:return e}}}(e)}function MA(e,t,n,o,i,r,a,l){var s=t.getItemVisual(n,"style");if(l){if(!r.get("roundCap")){var u=e.shape;ps(u,hA(o.getModel("itemStyle"),u,!0)),e.setShape(u)}}else{var c=o.get(["itemStyle","borderRadius"])||0;e.setShape("r",c)}e.useStyle(s);var d=o.getShallow("cursor");d&&e.attr("cursor",d);var h=l?a?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":a?i.height>=0?"bottom":"top":i.width>=0?"right":"left",p=kx(o);Ix(e,p,{labelFetcher:r,labelDataIndex:n,defaultText:bE(r.getData(),n),inheritColor:s.fill,defaultOpacity:s.opacity,defaultOutsidePosition:h});var f=e.getTextContent();if(l&&f){var g=o.get(["label","position"]);e.textConfig.inside="middle"===g||null,function(e,t,n,o){if(Ds(o))e.setTextConfig({rotation:o});else if(Ms(t))e.setTextConfig({rotation:0});else{var i,r=e.shape,a=r.clockwise?r.startAngle:r.endAngle,l=r.clockwise?r.endAngle:r.startAngle,s=(a+l)/2,u=n(t);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":i=s;break;case"startAngle":case"insideStartAngle":i=a;break;case"endAngle":case"insideEndAngle":i=l;break;default:return void e.setTextConfig({rotation:0})}var c=1.5*Math.PI-i;"middle"===u&&c>Math.PI/2&&c<1.5*Math.PI&&(c-=Math.PI),e.setTextConfig({rotation:c})}}(e,"outside"===g?h:g,CA(a),o.get(["label","rotate"]))}Bx(f,p,r.getRawValue(n),function(e){return SE(t,e)});var v=o.getModel(["emphasis"]);xm(e,v.get("focus"),v.get("blurScope"),v.get("disabled")),Sm(e,o),function(e){return null!=e.startAngle&&null!=e.endAngle&&e.startAngle===e.endAngle}(i)&&(e.style.fill="none",e.style.stroke="none",ys(e.states,function(e){e.style&&(e.style.fill=e.style.stroke="none")}))}var TA=function(){return function(){}}(),IA=function(e){function t(t){var n=e.call(this,t)||this;return n.type="largeBar",n}return Wl(t,e),t.prototype.getDefaultShape=function(){return new TA},t.prototype.buildPath=function(e,t){for(var n=t.points,o=this.baseDimIdx,i=1-this.baseDimIdx,r=[],a=[],l=this.barWidth,s=0;s<n.length;s+=3)a[o]=l,a[i]=n[s+2],r[o]=n[s+o],r[i]=n[s+i],e.rect(r[0],r[1],a[0],a[1])},t}(nv);function kA(e,t,n,o){var i=e.getData(),r=i.getLayout("valueAxisHorizontal")?1:0,a=i.getLayout("largeDataIndices"),l=i.getLayout("size"),s=e.getModel("backgroundStyle"),u=i.getLayout("largeBackgroundPoints");if(u){var c=new IA({shape:{points:u},incremental:!!o,silent:!0,z2:0});c.baseDimIdx=r,c.largeDataIndices=a,c.barWidth=l,c.useStyle(s.getItemStyle()),t.add(c),n&&n.push(c)}var d=new IA({shape:{points:i.getLayout("largePoints")},incremental:!!o,ignoreCoarsePointer:!0,z2:1});d.baseDimIdx=r,d.largeDataIndices=a,d.barWidth=l,t.add(d),d.useStyle(i.getVisual("style")),d.style.stroke=null,Nv(d).seriesIndex=e.seriesIndex,e.get("silent")||(d.on("mousedown",DA),d.on("mousemove",DA)),n&&n.push(d)}var DA=gC(function(e){var t=function(e,t,n){for(var o=e.baseDimIdx,i=1-o,r=e.shape.points,a=e.largeDataIndices,l=[],s=[],u=e.barWidth,c=0,d=r.length/3;c<d;c++){var h=3*c;if(s[o]=u,s[i]=r[h+2],l[o]=r[h+o],l[i]=r[h+i],s[i]<0&&(l[i]+=s[i],s[i]=-s[i]),t>=l[0]&&t<=l[0]+s[0]&&n>=l[1]&&n<=l[1]+s[1])return a[c]}return-1}(this,e.offsetX,e.offsetY);Nv(this).dataIndex=t>=0?t:null},30,!1);function NA(e,t,n){if(WE(n,"cartesian2d")){var o=t,i=n.getArea();return{x:e?o.x:i.x,y:e?i.y:o.y,width:e?o.width:i.width,height:e?i.height:o.height}}var r=t;return{cx:(i=n.getArea()).cx,cy:i.cy,r0:e?i.r0:r.r0,r:e?i.r:r.r,startAngle:e?r.startAngle:0,endAngle:e?r.endAngle:2*Math.PI}}var EA=2*Math.PI,AA=Math.PI/180;function LA(e,t){return Q_(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function VA(e,t){var n=LA(e,t),o=e.get("center"),i=e.get("radius");Ms(i)||(i=[0,i]);var r,a,l=gp(n.width,t.getWidth()),s=gp(n.height,t.getHeight()),u=Math.min(l,s),c=gp(i[0],u/2),d=gp(i[1],u/2),h=e.coordinateSystem;if(h){var p=h.dataToPoint(o);r=p[0]||0,a=p[1]||0}else Ms(o)||(o=[o,o]),r=gp(o[0],l)+n.x,a=gp(o[1],s)+n.y;return{cx:r,cy:a,r0:c,r:d}}function OA(e,t,n){t.eachSeriesByType(e,function(e){var t=e.getData(),o=t.mapDimension("value"),i=LA(e,n),r=VA(e,n),a=r.cx,l=r.cy,s=r.r,u=r.r0,c=-e.get("startAngle")*AA,d=e.get("endAngle"),h=e.get("padAngle")*AA;d="auto"===d?c-EA:-d*AA;var p=e.get("minAngle")*AA+h,f=0;t.each(o,function(e){!isNaN(e)&&f++});var g=t.getSum(o),v=Math.PI/(g||f)*2,m=e.get("clockwise"),y=e.get("roseType"),x=e.get("stillShowZeroSum"),_=t.getDataExtent(o);_[0]=0;var w=m?1:-1,b=[c,d],S=w*h/2;Vg(b,!m),c=b[0],d=b[1];var C=PA(e);C.startAngle=c,C.endAngle=d,C.clockwise=m;var M=Math.abs(d-c),T=M,I=0,k=c;if(t.setLayout({viewRect:i,r:s}),t.each(o,function(e,n){var o;if(isNaN(e))t.setItemLayout(n,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:m,cx:a,cy:l,r0:u,r:y?NaN:s});else{(o="area"!==y?0===g&&x?v:e*v:M/f)<p?(o=p,T-=p):I+=e;var i=k+w*o,r=0,c=0;h>o?c=r=k+w*o/2:(r=k+S,c=i-S),t.setItemLayout(n,{angle:o,startAngle:r,endAngle:c,clockwise:m,cx:a,cy:l,r0:u,r:y?fp(e,_,[u,s]):s}),k=i}}),T<EA&&f)if(T<=.001){var D=M/f;t.each(o,function(e,n){if(!isNaN(e)){var o=t.getItemLayout(n);o.angle=D;var i=0,r=0;D<h?r=i=c+w*(n+.5)*D:(i=c+w*n*D+S,r=c+w*(n+1)*D-S),o.startAngle=i,o.endAngle=r}})}else v=T/I,k=c,t.each(o,function(e,n){if(!isNaN(e)){var o=t.getItemLayout(n),i=o.angle===p?p:e*v,r=0,a=0;i<h?a=r=k+w*i/2:(r=k+S,a=k+w*i-S),o.startAngle=r,o.endAngle=a,k+=w*i}})})}var PA=uf();function BA(e){return{seriesType:e,reset:function(e,t){var n=t.findComponents({mainType:"legend"});if(n&&n.length){var o=e.getData();o.filterSelf(function(e){for(var t=o.getName(e),i=0;i<n.length;i++)if(!n[i].isSelected(t))return!1;return!0})}}}}var RA=Math.PI/180;function zA(e,t,n,o,i,r,a,l,s,u){if(!(e.length<2)){for(var c=e.length,d=0;d<c;d++)if("outer"===e[d].position&&"labelLine"===e[d].labelAlignTo){var h=e[d].label.x-u;e[d].linePoints[1][0]+=h,e[d].label.x=u}UD(e,s,s+a)&&function(e){for(var r={list:[],maxY:0},a={list:[],maxY:0},l=0;l<e.length;l++)if("none"===e[l].labelAlignTo){var s=e[l],u=s.label.y>n?a:r,c=Math.abs(s.label.y-n);if(c>=u.maxY){var d=s.label.x-t-s.len2*i,h=o+s.len,f=Math.abs(d)<h?Math.sqrt(c*c/(1-d*d/h/h)):h;u.rB=f,u.maxY=c}u.list.push(s)}p(r),p(a)}(e)}function p(e){for(var r=e.rB,a=r*r,l=0;l<e.list.length;l++){var s=e.list[l],u=Math.abs(s.label.y-n),c=o+s.len,d=c*c,h=Math.sqrt(Math.abs((1-u*u/a)*d)),p=t+(h+s.len2)*i,f=p-s.label.x;FA(s,s.targetTextWidth-f*i,!0),s.label.x=p}}}function FA(e,t,n){if(void 0===n&&(n=!1),null==e.labelStyleWidth){var o=e.label,i=o.style,r=e.rect,a=i.backgroundColor,l=i.padding,s=l?l[1]+l[3]:0,u=i.overflow,c=r.width+(a?0:s);if(t<c||n){var d=r.height;if(u&&u.match("break")){o.setStyle("backgroundColor",null),o.setStyle("width",t-s);var h=o.getBoundingRect();o.setStyle("width",Math.ceil(h.width)),o.setStyle("backgroundColor",a)}else{var p=t-s,f=t<c?p:n?p>e.unconstrainedWidth?null:p:null;o.setStyle("width",f)}var g=o.getBoundingRect();r.width=g.width;var v=(o.style.margin||0)+2.1;r.height=g.height+v,r.y-=(r.height-d)/2}}}function GA(e){return"center"===e.position}function HA(e){var t,n,o=e.getData(),i=[],r=!1,a=(e.get("minShowLabelAngle")||0)*RA,l=o.getLayout("viewRect"),s=o.getLayout("r"),u=l.width,c=l.x,d=l.y,h=l.height;function p(e){e.ignore=!0}o.each(function(e){var l=o.getItemGraphicEl(e),d=l.shape,h=l.getTextContent(),f=l.getTextGuideLine(),g=o.getItemModel(e),v=g.getModel("label"),m=v.get("position")||g.get(["emphasis","label","position"]),y=v.get("distanceToLabelLine"),x=v.get("alignTo"),_=gp(v.get("edgeDistance"),u),w=v.get("bleedMargin"),b=g.getModel("labelLine"),S=b.get("length");S=gp(S,u);var C=b.get("length2");if(C=gp(C,u),Math.abs(d.endAngle-d.startAngle)<a)return ys(h.states,p),h.ignore=!0,void(f&&(ys(f.states,p),f.ignore=!0));if(function(e){if(!e.ignore)return!0;for(var t in e.states)if(!1===e.states[t].ignore)return!0;return!1}(h)){var M,T,I,k,D=(d.startAngle+d.endAngle)/2,N=Math.cos(D),E=Math.sin(D);t=d.cx,n=d.cy;var A="inside"===m||"inner"===m;if("center"===m)M=d.cx,T=d.cy,k="center";else{var L=(A?(d.r+d.r0)/2*N:d.r*N)+t,V=(A?(d.r+d.r0)/2*E:d.r*E)+n;if(M=L+3*N,T=V+3*E,!A){var O=L+N*(S+s-d.r),P=V+E*(S+s-d.r),B=O+(N<0?-1:1)*C;M="edge"===x?N<0?c+_:c+u-_:B+(N<0?-y:y),T=P,I=[[L,V],[O,P],[B,P]]}k=A?"center":"edge"===x?N>0?"right":"left":N>0?"left":"right"}var R=Math.PI,z=0,F=v.get("rotate");if(Ds(F))z=F*(R/180);else if("center"===m)z=0;else if("radial"===F||!0===F){z=N<0?-D+R:-D}else if("tangential"===F&&"outside"!==m&&"outer"!==m){var G=Math.atan2(N,E);G<0&&(G=2*R+G),E>0&&(G=R+G),z=G-R}if(r=!!z,h.x=M,h.y=T,h.rotation=z,h.setStyle({verticalAlign:"middle"}),A){h.setStyle({align:k});var H=h.states.select;H&&(H.x+=h.x,H.y+=h.y)}else{var W=h.getBoundingRect().clone();W.applyTransform(h.getComputedTransform());var U=(h.style.margin||0)+2.1;W.y-=U/2,W.height+=U,i.push({label:h,labelLine:f,position:m,len:S,len2:C,minTurnAngle:b.get("minTurnAngle"),maxSurfaceAngle:b.get("maxSurfaceAngle"),surfaceNormal:new tc(N,E),linePoints:I,textAlign:k,labelDistance:y,labelAlignTo:x,edgeDistance:_,bleedMargin:w,rect:W,unconstrainedWidth:W.width,labelStyleWidth:h.style.width})}l.setTextConfig({inside:A})}}),!r&&e.get("avoidLabelOverlap")&&function(e,t,n,o,i,r,a,l){for(var s=[],u=[],c=Number.MAX_VALUE,d=-Number.MAX_VALUE,h=0;h<e.length;h++){var p=e[h].label;GA(e[h])||(p.x<t?(c=Math.min(c,p.x),s.push(e[h])):(d=Math.max(d,p.x),u.push(e[h])))}for(h=0;h<e.length;h++)if(!GA(v=e[h])&&v.linePoints){if(null!=v.labelStyleWidth)continue;p=v.label;var f=v.linePoints,g=void 0;g="edge"===v.labelAlignTo?p.x<t?f[2][0]-v.labelDistance-a-v.edgeDistance:a+i-v.edgeDistance-f[2][0]-v.labelDistance:"labelLine"===v.labelAlignTo?p.x<t?c-a-v.bleedMargin:a+i-d-v.bleedMargin:p.x<t?p.x-a-v.bleedMargin:a+i-p.x-v.bleedMargin,v.targetTextWidth=g,FA(v,g)}for(zA(u,t,n,o,1,0,r,0,l,d),zA(s,t,n,o,-1,0,r,0,l,c),h=0;h<e.length;h++){var v;if(!GA(v=e[h])&&v.linePoints){p=v.label,f=v.linePoints;var m="edge"===v.labelAlignTo,y=p.style.padding,x=y?y[1]+y[3]:0,_=p.style.backgroundColor?0:x,w=v.rect.width+_,b=f[1][0]-f[2][0];m?p.x<t?f[2][0]=a+v.edgeDistance+w+v.labelDistance:f[2][0]=a+i-v.edgeDistance-w-v.labelDistance:(p.x<t?f[2][0]=p.x+v.labelDistance:f[2][0]=p.x-v.labelDistance,f[1][0]=f[2][0]+b),f[1][1]=f[2][1]=p.y}}}(i,t,n,s,u,h,c,d);for(var f=0;f<i.length;f++){var g=i[f],v=g.label,m=g.labelLine,y=isNaN(v.x)||isNaN(v.y);if(v){v.setStyle({align:g.textAlign}),y&&(ys(v.states,p),v.ignore=!0);var x=v.states.select;x&&(x.x+=v.x,x.y+=v.y)}if(m){var _=g.linePoints;y||!_?(ys(m.states,p),m.ignore=!0):(PD(_,g.minTurnAngle),BD(_,g.surfaceNormal,g.maxSurfaceAngle),m.setShape({points:_}),v.__hostTarget.textGuideLineConfig={anchor:new tc(_[0][0],_[0][1])})}}}var WA=function(e){function t(t,n,o){var i=e.call(this)||this;i.z2=2;var r=new mv;return i.setTextContent(r),i.updateData(t,n,o,!0),i}return Wl(t,e),t.prototype.updateData=function(e,t,n,o){var i=this,r=e.hostModel,a=e.getItemModel(t),l=a.getModel("emphasis"),s=e.getItemLayout(t),u=ps(hA(a.getModel("itemStyle"),s,!0),s);if(isNaN(u.startAngle))i.setShape(u);else{if(o){i.setShape(u);var c=r.getShallow("animationType");r.ecModel.ssr?(Uy(i,{scaleX:0,scaleY:0},r,{dataIndex:t,isFrom:!0}),i.originX=u.cx,i.originY=u.cy):"scale"===c?(i.shape.r=s.r0,Uy(i,{shape:{r:s.r}},r,t)):null!=n?(i.setShape({startAngle:n,endAngle:n}),Uy(i,{shape:{startAngle:s.startAngle,endAngle:s.endAngle}},r,t)):(i.shape.endAngle=s.startAngle,Wy(i,{shape:{endAngle:s.endAngle}},r,t))}else $y(i),Wy(i,{shape:u},r,t);i.useStyle(e.getItemVisual(t,"style")),Sm(i,a);var d=(s.startAngle+s.endAngle)/2,h=r.get("selectedOffset"),p=Math.cos(d)*h,f=Math.sin(d)*h,g=a.getShallow("cursor");g&&i.attr("cursor",g),this._updateLabel(r,e,t),i.ensureState("emphasis").shape=ps({r:s.r+(l.get("scale")&&l.get("scaleSize")||0)},hA(l.getModel("itemStyle"),s)),ps(i.ensureState("select"),{x:p,y:f,shape:hA(a.getModel(["select","itemStyle"]),s)}),ps(i.ensureState("blur"),{shape:hA(a.getModel(["blur","itemStyle"]),s)});var v=i.getTextGuideLine(),m=i.getTextContent();v&&ps(v.ensureState("select"),{x:p,y:f}),ps(m.ensureState("select"),{x:p,y:f}),xm(this,l.get("focus"),l.get("blurScope"),l.get("disabled"))}},t.prototype._updateLabel=function(e,t,n){var o=this,i=t.getItemModel(n),r=i.getModel("labelLine"),a=t.getItemVisual(n,"style"),l=a&&a.fill,s=a&&a.opacity;Ix(o,kx(i),{labelFetcher:t.hostModel,labelDataIndex:n,inheritColor:l,defaultOpacity:s,defaultText:e.getFormattedLabel(n,"normal")||t.getName(n)});var u=o.getTextContent();o.setTextConfig({position:null,rotation:null}),u.attr({z2:10});var c=e.get(["label","position"]);if("outside"!==c&&"outer"!==c)o.removeTextGuideLine();else{var d=this.getTextGuideLine();d||(d=new xy,this.setTextGuideLine(d)),FD(this,GD(i),{stroke:l,opacity:zs(r.get(["lineStyle","opacity"]),s,1)})}},t}(hy),UA=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.ignoreLabelLineUpdate=!0,t}return Wl(t,e),t.prototype.render=function(e,t,n,o){var i,r=e.getData(),a=this._data,l=this.group;if(!a&&r.count()>0){for(var s=r.getItemLayout(0),u=1;isNaN(s&&s.startAngle)&&u<r.count();++u)s=r.getItemLayout(u);s&&(i=s.startAngle)}if(this._emptyCircleSector&&l.remove(this._emptyCircleSector),0===r.count()&&e.get("showEmptyCircle")){var c=PA(e),d=new hy({shape:ps(VA(e,n),c)});d.useStyle(e.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=d,l.add(d)}r.diff(a).add(function(e){var t=new WA(r,e,i);r.setItemGraphicEl(e,t),l.add(t)}).update(function(e,t){var n=a.getItemGraphicEl(t);n.updateData(r,e,i),n.off("click"),l.add(n),r.setItemGraphicEl(e,n)}).remove(function(t){jy(a.getItemGraphicEl(t),e,t)}).execute(),HA(e),"expansion"!==e.get("animationTypeUpdate")&&(this._data=r)},t.prototype.dispose=function(){},t.prototype.containPoint=function(e,t){var n=t.getData().getItemLayout(0);if(n){var o=e[0]-n.cx,i=e[1]-n.cy,r=Math.sqrt(o*o+i*i);return r<=n.r&&r>=n.r0}},t.type="pie",t}(aC);function YA(e,t,n){t=Ms(t)&&{coordDimensions:t}||ps({encodeDefine:e.getEncode()},t);var o=e.getSource(),i=NI(o,t).dimensions,r=new DI(i,e);return r.initData(o,n),r}var ZA=function(){function e(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return e.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},e.prototype.containName=function(e){return this._getRawData().indexOfName(e)>=0},e.prototype.indexOfName=function(e){return this._getDataWithEncodedVisual().indexOfName(e)},e.prototype.getItemVisual=function(e,t){return this._getDataWithEncodedVisual().getItemVisual(e,t)},e}(),XA=uf(),jA=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Wl(t,e),t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new ZA(Ss(this.getData,this),Ss(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return YA(this,{coordDimensions:["value"],encodeDefaulter:Cs(Cw,this)})},t.prototype.getDataParams=function(t){var n=this.getData(),o=XA(n),i=o.seats;if(!i){var r=[];n.each(n.mapDimension("value"),function(e){r.push(e)}),i=o.seats=function(e,t){var n=_s(e,function(e,t){return e+(isNaN(t)?0:t)},0);if(0===n)return[];for(var o=Math.pow(10,t),i=xs(e,function(e){return(isNaN(e)?0:e)/n*o*100}),r=100*o,a=xs(i,function(e){return Math.floor(e)}),l=_s(a,function(e,t){return e+t},0),s=xs(i,function(e,t){return e-a[t]});l<r;){for(var u=Number.NEGATIVE_INFINITY,c=null,d=0,h=s.length;d<h;++d)s[d]>u&&(u=s[d],c=d);++a[c],s[c]=0,++l}return xs(a,function(e){return e/o})}(r,n.hostModel.get("percentPrecision"))}var a=e.prototype.getDataParams.call(this,t);return a.percent=i[t]||0,a.$vars.push("percent"),a},t.prototype._defaultLabelLine=function(e){$p(e,"labelLine",["show"]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.type="series.pie",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},t}(jS);var $A=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return Wl(t,e),t.prototype.getInitialData=function(e,t){return RI(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){var e=this.option.progressive;return null==e?this.option.large?5e3:this.get("progressive"):e},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return null==e?this.option.large?1e4:this.get("progressiveThreshold"):e},t.prototype.brushSelector=function(e,t,n){return n.point(t.getItemLayout(e))},t.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},t.type="series.scatter",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},t}(jS),qA=function(){return function(){}}(),KA=function(e){function t(t){var n=e.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return Wl(t,e),t.prototype.getDefaultShape=function(){return new qA},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.buildPath=function(e,t){var n,o=t.points,i=t.size,r=this.symbolProxy,a=r.shape,l=e.getContext?e.getContext():e,s=l&&i[0]<4,u=this.softClipShape;if(s)this._ctx=l;else{for(this._ctx=null,n=this._off;n<o.length;){var c=o[n++],d=o[n++];isNaN(c)||isNaN(d)||(u&&!u.contain(c,d)||(a.x=c-i[0]/2,a.y=d-i[1]/2,a.width=i[0],a.height=i[1],r.buildPath(e,a,!0)))}this.incremental&&(this._off=n,this.notClear=!0)}},t.prototype.afterBrush=function(){var e,t=this.shape,n=t.points,o=t.size,i=this._ctx,r=this.softClipShape;if(i){for(e=this._off;e<n.length;){var a=n[e++],l=n[e++];isNaN(a)||isNaN(l)||(r&&!r.contain(a,l)||i.fillRect(a-o[0]/2,l-o[1]/2,o[0],o[1]))}this.incremental&&(this._off=e,this.notClear=!0)}},t.prototype.findDataIndex=function(e,t){for(var n=this.shape,o=n.points,i=n.size,r=Math.max(i[0],4),a=Math.max(i[1],4),l=o.length/2-1;l>=0;l--){var s=2*l,u=o[s]-r/2,c=o[s+1]-a/2;if(e>=u&&t>=c&&e<=u+r&&t<=c+a)return l}return-1},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),o=this.getBoundingRect();return e=n[0],t=n[1],o.contain(e,t)?(this.hoverDataIdx=this.findDataIndex(e,t))>=0:(this.hoverDataIdx=-1,!1)},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var t=this.shape,n=t.points,o=t.size,i=o[0],r=o[1],a=1/0,l=1/0,s=-1/0,u=-1/0,c=0;c<n.length;){var d=n[c++],h=n[c++];a=Math.min(d,a),s=Math.max(d,s),l=Math.min(h,l),u=Math.max(h,u)}e=this._rect=new cc(a-i/2,l-r/2,s-a+i,u-l+r)}return e},t}(nv),JA=function(){function e(){this.group=new lp}return e.prototype.updateData=function(e,t){this._clear();var n=this._create();n.setShape({points:e.getLayout("points")}),this._setCommon(n,e,t)},e.prototype.updateLayout=function(e){var t=e.getLayout("points");this.group.eachChild(function(e){if(null!=e.startIndex){var n=2*(e.endIndex-e.startIndex),o=4*e.startIndex*2;t=new Float32Array(t.buffer,o,n)}e.setShape("points",t),e.reset()})},e.prototype.incrementalPrepareUpdate=function(e){this._clear()},e.prototype.incrementalUpdate=function(e,t,n){var o=this._newAdded[0],i=t.getLayout("points"),r=o&&o.shape.points;if(r&&r.length<2e4){var a=r.length,l=new Float32Array(a+i.length);l.set(r),l.set(i,a),o.endIndex=e.end,o.setShape({points:l})}else{this._newAdded=[];var s=this._create();s.startIndex=e.start,s.endIndex=e.end,s.incremental=!0,s.setShape({points:i}),this._setCommon(s,t,n)}},e.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},e.prototype._create=function(){var e=new KA({cursor:"default"});return e.ignoreCoarsePointer=!0,this.group.add(e),this._newAdded.push(e),e},e.prototype._setCommon=function(e,t,n){var o=t.hostModel;n=n||{};var i=t.getVisual("symbolSize");e.setShape("size",i instanceof Array?i:[i,i]),e.softClipShape=n.clipShape||null,e.symbolProxy=yM(t.getVisual("symbol"),0,0,0,0),e.setColor=e.symbolProxy.setColor;var r=e.shape.size[0]<4;e.useStyle(o.getModel("itemStyle").getItemStyle(r?["color","shadowBlur","shadowColor"]:["color"]));var a=t.getVisual("style"),l=a&&a.fill;l&&e.setColor(l);var s=Nv(e);s.seriesIndex=o.seriesIndex,e.on("mousemove",function(t){s.dataIndex=null;var n=e.hoverDataIdx;n>=0&&(s.dataIndex=n+(e.startIndex||0))})},e.prototype.remove=function(){this._clear()},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),QA=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.prototype.render=function(e,t,n){var o=e.getData();this._updateSymbolDraw(o,e).updateData(o,{clipShape:this._getClipShape(e)}),this._finished=!0},t.prototype.incrementalPrepareRender=function(e,t,n){var o=e.getData();this._updateSymbolDraw(o,e).incrementalPrepareUpdate(o),this._finished=!1},t.prototype.incrementalRender=function(e,t,n){this._symbolDraw.incrementalUpdate(e,t.getData(),{clipShape:this._getClipShape(t)}),this._finished=e.end===t.getData().count()},t.prototype.updateTransform=function(e,t,n){var o=e.getData();if(this.group.dirty(),!this._finished||o.count()>1e4)return{update:!0};var i=nA("").reset(e,t,n);i.progress&&i.progress({start:0,end:o.count(),count:o.count()},o),this._symbolDraw.updateLayout(o)},t.prototype.eachRendered=function(e){this._symbolDraw&&this._symbolDraw.eachRendered(e)},t.prototype._getClipShape=function(e){if(e.get("clip",!0)){var t=e.coordinateSystem;return t&&t.getArea&&t.getArea(.1)}},t.prototype._updateSymbolDraw=function(e,t){var n=this._symbolDraw,o=t.pipelineContext.large;return n&&o===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=o?new JA:new DE,this._isLargeDraw=o,this.group.removeAll()),this.group.add(n.group),n},t.prototype.remove=function(e,t){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type="scatter",t}(aC),eL=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Wl(t,e),t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},t}(aw),tL=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Wl(t,e),t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",pf).models[0]},t.type="cartesian2dAxis",t}(aw);vs(tL,Yk);var nL={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},oL=ds({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},nL),iL=ds({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},nL);const rL={category:oL,value:iL,time:ds({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},iL),log:fs({logBase:10},iL)};var aL={value:1,category:1,time:1,log:1};function lL(e,t,n,o){ys(aL,function(i,r){var a=ds(ds({},rL[r],!0),o,!0),l=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t+"Axis."+r,n}return Wl(n,e),n.prototype.mergeDefaultAndTheme=function(e,t){var n=tw(this),o=n?ow(e):{};ds(e,t.getTheme().get(r+"Axis")),ds(e,this.getDefaultOption()),e.type=sL(e),n&&nw(e,o,n)},n.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=GI.createByAxisModel(this))},n.prototype.getCategories=function(e){var t=this.option;if("category"===t.type)return e?t.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.type=t+"Axis."+r,n.defaultOption=a,n}(n);e.registerComponentModel(l)}),e.registerSubTypeDefaulter(t+"Axis",sL)}function sL(e){return e.type||(e.data?"category":"value")}var uL=function(){function e(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return e.prototype.getAxis=function(e){return this._axes[e]},e.prototype.getAxes=function(){return xs(this._dimList,function(e){return this._axes[e]},this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),ws(this.getAxes(),function(t){return t.scale.type===e})},e.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},e}(),cL=["x","y"];function dL(e){return"interval"===e.type||"time"===e.type}var hL=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=cL,t}return Wl(t,e),t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,t=this.getAxis("y").scale;if(dL(e)&&dL(t)){var n=e.getExtent(),o=t.getExtent(),i=this.dataToPoint([n[0],o[0]]),r=this.dataToPoint([n[1],o[1]]),a=n[1]-n[0],l=o[1]-o[0];if(a&&l){var s=(r[0]-i[0])/a,u=(r[1]-i[1])/l,c=i[0]-n[0]*s,d=i[1]-o[0]*u,h=this._transform=[s,0,0,u,c,d];this._invTransform=ec([],h)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(e){var t=this.getAxis("x"),n=this.getAxis("y");return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},t.prototype.containZone=function(e,t){var n=this.dataToPoint(e),o=this.dataToPoint(t),i=this.getArea(),r=new cc(n[0],n[1],o[0]-n[0],o[1]-n[1]);return i.intersect(r)},t.prototype.dataToPoint=function(e,t,n){n=n||[];var o=e[0],i=e[1];if(this._transform&&null!=o&&isFinite(o)&&null!=i&&isFinite(i))return mu(n,e,this._transform);var r=this.getAxis("x"),a=this.getAxis("y");return n[0]=r.toGlobalCoord(r.dataToCoord(o,t)),n[1]=a.toGlobalCoord(a.dataToCoord(i,t)),n},t.prototype.clampData=function(e,t){var n=this.getAxis("x").scale,o=this.getAxis("y").scale,i=n.getExtent(),r=o.getExtent(),a=n.parse(e[0]),l=o.parse(e[1]);return(t=t||[])[0]=Math.min(Math.max(Math.min(i[0],i[1]),a),Math.max(i[0],i[1])),t[1]=Math.min(Math.max(Math.min(r[0],r[1]),l),Math.max(r[0],r[1])),t},t.prototype.pointToData=function(e,t){var n=[];if(this._invTransform)return mu(n,e,this._invTransform);var o=this.getAxis("x"),i=this.getAxis("y");return n[0]=o.coordToData(o.toLocalCoord(e[0]),t),n[1]=i.coordToData(i.toLocalCoord(e[1]),t),n},t.prototype.getOtherAxis=function(e){return this.getAxis("x"===e.dim?"y":"x")},t.prototype.getArea=function(e){e=e||0;var t=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),o=Math.min(t[0],t[1])-e,i=Math.min(n[0],n[1])-e,r=Math.max(t[0],t[1])-o+e,a=Math.max(n[0],n[1])-i+e;return new cc(o,i,r,a)},t}(uL),pL=function(e){function t(t,n,o,i,r){var a=e.call(this,t,n,o)||this;return a.index=0,a.type=i||"value",a.position=r||"bottom",a}return Wl(t,e),t.prototype.isHorizontal=function(){var e=this.position;return"top"===e||"bottom"===e},t.prototype.getGlobalExtent=function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},t.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e["x"===this.dim?0:1]),t)},t.prototype.setCategorySortInfo=function(e){if("category"!==this.type)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(vD);function fL(e,t,n){n=n||{};var o=e.coordinateSystem,i=t.axis,r={},a=i.getAxesOnZeroOf()[0],l=i.position,s=a?"onZero":l,u=i.dim,c=o.getRect(),d=[c.x,c.x+c.width,c.y,c.y+c.height],h={left:0,right:1,top:0,bottom:1,onZero:2},p=t.get("offset")||0,f="x"===u?[d[2]-p,d[3]+p]:[d[0]-p,d[1]+p];if(a){var g=a.toGlobalCoord(a.dataToCoord(0));f[h.onZero]=Math.max(Math.min(g,f[1]),f[0])}r.position=["y"===u?f[h[s]]:d[0],"x"===u?f[h[s]]:d[3]],r.rotation=Math.PI/2*("x"===u?0:1);r.labelDirection=r.tickDirection=r.nameDirection={top:-1,bottom:1,left:-1,right:1}[l],r.labelOffset=a?f[h[l]]-f[h.onZero]:0,t.get(["axisTick","inside"])&&(r.tickDirection=-r.tickDirection),Bs(n.labelInside,t.get(["axisLabel","inside"]))&&(r.labelDirection=-r.labelDirection);var v=t.get(["axisLabel","rotate"]);return r.labelRotate="top"===s?-v:v,r.z2=1,r}function gL(e){return"cartesian2d"===e.get("coordinateSystem")}function vL(e){var t={xAxisModel:null,yAxisModel:null};return ys(t,function(n,o){var i=o.replace(/Model$/,""),r=e.getReferringComponents(i,pf).models[0];if("production"!==process.env.NODE_ENV&&!r)throw new Error(i+' "'+zs(e.get(i+"Index"),e.get(i+"Id"),0)+'" not found');t[o]=r}),t}var mL=Math.log;function yL(e,t,n){var o=QI.prototype,i=o.getTicks.call(n),r=o.getTicks.call(n,!0),a=i.length-1,l=o.getInterval.call(n),s=Pk(e,t),u=s.extent,c=s.fixMin,d=s.fixMax;if("log"===e.type){var h=mL(e.base);u=[mL(u[0])/h,mL(u[1])/h]}e.setExtent(u[0],u[1]),e.calcNiceExtent({splitNumber:a,fixMin:c,fixMax:d});var p=o.getExtent.call(e);c&&(u[0]=p[0]),d&&(u[1]=p[1]);var f=o.getInterval.call(e),g=u[0],v=u[1];if(c&&d)f=(v-g)/a;else if(c)for(v=u[0]+f*a;v<u[1]&&isFinite(v)&&isFinite(u[1]);)f=YI(f),v=u[0]+f*a;else if(d)for(g=u[1]-f*a;g>u[0]&&isFinite(g)&&isFinite(u[0]);)f=YI(f),g=u[1]-f*a;else{e.getTicks().length-1>a&&(f=YI(f));var m=f*a;(g=vp((v=Math.ceil(u[1]/f)*f)-m))<0&&u[0]>=0?(g=0,v=vp(m)):v>0&&u[1]<=0&&(v=0,g=-vp(m))}var y,x,_,w=(i[0].value-r[0].value)/l,b=(i[a].value-r[a].value)/l;if(o.setExtent.call(e,g+f*w,v+f*b),o.setInterval.call(e,f),(w||b)&&o.setNiceExtent.call(e,g+f,v-f),"production"!==process.env.NODE_ENV){var S=o.getTicks.call(e);S[1]&&(y=f,x=Math.pow(10,Ip(Math.abs(y))),0!==(_=Math.abs(y/x))&&1!==_&&2!==_&&3!==_&&5!==_||xp(S[1].value)>xp(f))&&zp("The ticks may be not readable when set min: "+t.get("min")+", max: "+t.get("max")+" and alignTicks: true")}}var xL=function(){function e(e,t,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=cL,this._initCartesian(e,t,n),this.model=e}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(e,t){var n=this._axesMap;function o(e){var t,n=bs(e),o=n.length;if(o){for(var i=[],r=o-1;r>=0;r--){var a=e[+n[r]],l=a.model,s=a.scale;WI(s)&&l.get("alignTicks")&&null==l.get("interval")?i.push(a):(Bk(s,l),WI(s)&&(t=a))}i.length&&(t||Bk((t=i.pop()).scale,t.model),ys(i,function(e){yL(e.scale,e.model,t.scale)}))}}this._updateScale(e,this.model),o(n.x),o(n.y);var i={};ys(n.x,function(e){wL(n,"y",e,i)}),ys(n.y,function(e){wL(n,"x",e,i)}),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var o=e.getBoxLayoutParams(),i=!n&&e.get("containLabel"),r=Q_(o,{width:t.getWidth(),height:t.getHeight()});this._rect=r;var a=this._axesList;function l(){ys(a,function(e){var t=e.isHorizontal(),n=t?[0,r.width]:[0,r.height],o=e.inverse?1:0;e.setExtent(n[o],n[1-o]),function(e,t){var n=e.getExtent(),o=n[0]+n[1];e.toGlobalCoord="x"===e.dim?function(e){return e+t}:function(e){return o-e+t},e.toLocalCoord="x"===e.dim?function(e){return e-t}:function(e){return o-e+t}}(e,t?r.x:r.y)})}l(),i&&(ys(a,function(e){if(!e.model.get(["axisLabel","inside"])){var t=function(e){var t=e.model,n=e.scale;if(t.get(["axisLabel","show"])&&!n.isBlank()){var o,i,r=n.getExtent();i=n instanceof KI?n.count():(o=n.getTicks()).length;var a,l=e.getLabelModel(),s=zk(e),u=1;i>40&&(u=Math.ceil(i/40));for(var c=0;c<i;c+=u){var d=s(o?o[c]:{value:r[0]+c},c),h=Gk(l.getTextRect(d),l.get("rotate")||0);a?a.union(h):a=h}return a}}(e);if(t){var n=e.isHorizontal()?"height":"width",o=e.model.get(["axisLabel","margin"]);r[n]-=t[n]+o,"top"===e.position?r.y+=t.height+o:"left"===e.position&&(r.x+=t.width+o)}}}),l()),ys(this._coordsList,function(e){e.calcAffineTransform()})},e.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(null!=n)return n[t||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(e,t){if(null!=e&&null!=t){var n="x"+e+"y"+t;return this._coordsMap[n]}Ns(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var o=0,i=this._coordsList;o<i.length;o++)if(i[o].getAxis("x").index===e||i[o].getAxis("y").index===t)return i[o]},e.prototype.getCartesians=function(){return this._coordsList.slice()},e.prototype.convertToPixel=function(e,t,n){var o=this._findConvertTarget(t);return o.cartesian?o.cartesian.dataToPoint(n):o.axis?o.axis.toGlobalCoord(o.axis.dataToCoord(n)):null},e.prototype.convertFromPixel=function(e,t,n){var o=this._findConvertTarget(t);return o.cartesian?o.cartesian.pointToData(n):o.axis?o.axis.coordToData(o.axis.toLocalCoord(n)):null},e.prototype._findConvertTarget=function(e){var t,n,o=e.seriesModel,i=e.xAxisModel||o&&o.getReferringComponents("xAxis",pf).models[0],r=e.yAxisModel||o&&o.getReferringComponents("yAxis",pf).models[0],a=e.gridModel,l=this._coordsList;if(o)gs(l,t=o.coordinateSystem)<0&&(t=null);else if(i&&r)t=this.getCartesian(i.componentIndex,r.componentIndex);else if(i)n=this.getAxis("x",i.componentIndex);else if(r)n=this.getAxis("y",r.componentIndex);else if(a){a.coordinateSystem===this&&(t=this._coordsList[0])}return{cartesian:t,axis:n}},e.prototype.containPoint=function(e){var t=this._coordsList[0];if(t)return t.containPoint(e)},e.prototype._initCartesian=function(e,t,n){var o=this,i=this,r={left:!1,right:!1,top:!1,bottom:!1},a={x:{},y:{}},l={x:0,y:0};if(t.eachComponent("xAxis",s("x"),this),t.eachComponent("yAxis",s("y"),this),!l.x||!l.y)return this._axesMap={},void(this._axesList=[]);function s(t){return function(n,o){if(_L(n,e)){var s=n.get("position");"x"===t?"top"!==s&&"bottom"!==s&&(s=r.bottom?"top":"bottom"):"left"!==s&&"right"!==s&&(s=r.left?"right":"left"),r[s]=!0;var u=new pL(t,Rk(n),[0,0],n.get("type"),s),c="category"===u.type;u.onBand=c&&n.get("boundaryGap"),u.inverse=n.get("inverse"),n.axis=u,u.model=n,u.grid=i,u.index=o,i._axesList.push(u),a[t][o]=u,l[t]++}}}this._axesMap=a,ys(a.x,function(t,n){ys(a.y,function(i,r){var a="x"+n+"y"+r,l=new hL(a);l.master=o,l.model=e,o._coordsMap[a]=l,o._coordsList.push(l),l.addAxis(t),l.addAxis(i)})})},e.prototype._updateScale=function(e,t){function n(e,t){ys(Uk(e,t.dim),function(n){t.scale.unionExtentFromData(e,n)})}ys(this._axesList,function(e){if(e.scale.setExtent(1/0,-1/0),"category"===e.type){var t=e.model.get("categorySortInfo");e.scale.setSortInfo(t)}}),e.eachSeries(function(e){if(gL(e)){var o=vL(e),i=o.xAxisModel,r=o.yAxisModel;if(!_L(i,t)||!_L(r,t))return;var a=this.getCartesian(i.componentIndex,r.componentIndex),l=e.getData(),s=a.getAxis("x"),u=a.getAxis("y");n(l,s),n(l,u)}},this)},e.prototype.getTooltipAxes=function(e){var t=[],n=[];return ys(this.getCartesians(),function(o){var i=null!=e&&"auto"!==e?o.getAxis(e):o.getBaseAxis(),r=o.getOtherAxis(i);gs(t,i)<0&&t.push(i),gs(n,r)<0&&n.push(r)}),{baseAxes:t,otherAxes:n}},e.create=function(t,n){var o=[];return t.eachComponent("grid",function(i,r){var a=new e(i,t,n);a.name="grid_"+r,a.resize(i,n,!0),i.coordinateSystem=a,o.push(a)}),t.eachSeries(function(e){if(gL(e)){var t=vL(e),n=t.xAxisModel,o=t.yAxisModel,i=n.getCoordSysModel();if("production"!==process.env.NODE_ENV){if(!i)throw new Error('Grid "'+zs(n.get("gridIndex"),n.get("gridId"),0)+'" not found');if(n.getCoordSysModel()!==o.getCoordSysModel())throw new Error("xAxis and yAxis must use the same grid")}var r=i.coordinateSystem;e.coordinateSystem=r.getCartesian(n.componentIndex,o.componentIndex)}}),o},e.dimensions=cL,e}();function _L(e,t){return e.getCoordSysModel()===t}function wL(e,t,n,o){n.getAxesOnZeroOf=function(){return i?[i]:[]};var i,r=e[t],a=n.model,l=a.get(["axisLine","onZero"]),s=a.get(["axisLine","onZeroAxisIndex"]);if(l){if(null!=s)bL(r[s])&&(i=r[s]);else for(var u in r)if(r.hasOwnProperty(u)&&bL(r[u])&&!o[c(r[u])]){i=r[u];break}i&&(o[c(i)]=!0)}function c(e){return e.dim+"_"+e.index}}function bL(e){return e&&"category"!==e.type&&"time"!==e.type&&function(e){var t=e.scale.getExtent(),n=t[0],o=t[1];return!(n>0&&o>0||n<0&&o<0)}(e)}var SL=Math.PI,CL=function(){function e(e,t){this.group=new lp,this.opt=t,this.axisModel=e,fs(t,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new lp({x:t.position[0],y:t.position[1],rotation:t.rotation});n.updateTransform(),this._transformGroup=n}return e.prototype.hasBuilder=function(e){return!!ML[e]},e.prototype.add=function(e){ML[e](this.opt,this.axisModel,this.group,this._transformGroup)},e.prototype.getGroup=function(){return this.group},e.innerTextLayout=function(e,t,n){var o,i,r=Sp(t-e);return Cp(r)?(i=n>0?"top":"bottom",o="center"):Cp(r-SL)?(i=n>0?"bottom":"top",o="center"):(i="middle",o=r>0&&r<SL?n>0?"right":"left":n>0?"left":"right"),{rotation:r,textAlign:o,textVerticalAlign:i}},e.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},e.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},e}(),ML={axisLine:function(e,t,n,o){var i=t.get(["axisLine","show"]);if("auto"===i&&e.handleAutoShown&&(i=e.handleAutoShown("axisLine")),i){var r=t.axis.getExtent(),a=o.transform,l=[r[0],0],s=[r[1],0],u=l[0]>s[0];a&&(mu(l,l,a),mu(s,s,a));var c=ps({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),d=new by({shape:{x1:l[0],y1:l[1],x2:s[0],y2:s[1]},style:c,strokeContainThreshold:e.strokeContainThreshold||5,silent:!0,z2:1});lx(d.shape,d.style.lineWidth),d.anid="line",n.add(d);var h=t.get(["axisLine","symbol"]);if(null!=h){var p=t.get(["axisLine","symbolSize"]);Is(h)&&(h=[h,h]),(Is(p)||Ds(p))&&(p=[p,p]);var f=_M(t.get(["axisLine","symbolOffset"])||0,p),g=p[0],v=p[1];ys([{rotate:e.rotation+Math.PI/2,offset:f[0],r:0},{rotate:e.rotation-Math.PI/2,offset:f[1],r:Math.sqrt((l[0]-s[0])*(l[0]-s[0])+(l[1]-s[1])*(l[1]-s[1]))}],function(t,o){if("none"!==h[o]&&null!=h[o]){var i=yM(h[o],-g/2,-v/2,g,v,c.stroke,!0),r=t.r+t.offset,a=u?s:l;i.attr({rotation:t.rotate,x:a[0]+r*Math.cos(e.rotation),y:a[1]-r*Math.sin(e.rotation),silent:!0,z2:11}),n.add(i)}})}}},axisTickLabel:function(e,t,n,o){var i=function(e,t,n,o){var i=n.axis,r=n.getModel("axisTick"),a=r.get("show");"auto"===a&&o.handleAutoShown&&(a=o.handleAutoShown("axisTick"));if(!a||i.scale.isBlank())return;for(var l=r.getModel("lineStyle"),s=o.tickDirection*r.get("length"),u=DL(i.getTicksCoords(),t.transform,s,fs(l.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),c=0;c<u.length;c++)e.add(u[c]);return u}(n,o,t,e),r=function(e,t,n,o){var i=n.axis,r=Bs(o.axisLabelShow,n.get(["axisLabel","show"]));if(!r||i.scale.isBlank())return;var a=n.getModel("axisLabel"),l=a.get("margin"),s=i.getViewLabels(),u=(Bs(o.labelRotate,a.get("rotate"))||0)*SL/180,c=CL.innerTextLayout(o.rotation,u,o.labelDirection),d=n.getCategories&&n.getCategories(!0),h=[],p=CL.isLabelSilent(n),f=n.get("triggerEvent");return ys(s,function(r,u){var g="ordinal"===i.scale.type?i.scale.getRawOrdinalNumber(r.tickValue):r.tickValue,v=r.formattedLabel,m=r.rawLabel,y=a;if(d&&d[g]){var x=d[g];Ns(x)&&x.textStyle&&(y=new Kx(x.textStyle,a,n.ecModel))}var _=y.getTextColor()||n.get(["axisLine","lineStyle","color"]),w=i.dataToCoord(g),b=y.getShallow("align",!0)||c.textAlign,S=Rs(y.getShallow("alignMinLabel",!0),b),C=Rs(y.getShallow("alignMaxLabel",!0),b),M=y.getShallow("verticalAlign",!0)||y.getShallow("baseline",!0)||c.textVerticalAlign,T=Rs(y.getShallow("verticalAlignMinLabel",!0),M),I=Rs(y.getShallow("verticalAlignMaxLabel",!0),M),k=new mv({x:w,y:o.labelOffset+o.labelDirection*l,rotation:c.rotation,silent:p,z2:10+(r.level||0),style:Dx(y,{text:v,align:0===u?S:u===s.length-1?C:b,verticalAlign:0===u?T:u===s.length-1?I:M,fill:Ts(_)?_("category"===i.type?m:"value"===i.type?g+"":g,u):_})});if(k.anid="label_"+g,xx({el:k,componentModel:n,itemName:v,formatterParamsExtra:{isTruncated:function(){return k.isTruncated},value:m,tickIndex:u}}),f){var D=CL.makeAxisEventDataBase(n);D.targetType="axisLabel",D.value=m,D.tickIndex=u,"category"===i.type&&(D.dataIndex=g),Nv(k).eventData=D}t.add(k),k.updateTransform(),h.push(k),e.add(k),k.decomposeTransform()}),h}(n,o,t,e);(function(e,t,n){if(Wk(e.axis))return;var o=e.get(["axisLabel","showMinLabel"]),i=e.get(["axisLabel","showMaxLabel"]);t=t||[],n=n||[];var r=t[0],a=t[1],l=t[t.length-1],s=t[t.length-2],u=n[0],c=n[1],d=n[n.length-1],h=n[n.length-2];!1===o?(TL(r),TL(u)):IL(r,a)&&(o?(TL(a),TL(c)):(TL(r),TL(u)));!1===i?(TL(l),TL(d)):IL(s,l)&&(i?(TL(s),TL(h)):(TL(l),TL(d)))}(t,r,i),function(e,t,n,o){var i=n.axis,r=n.getModel("minorTick");if(!r.get("show")||i.scale.isBlank())return;var a=i.getMinorTicksCoords();if(!a.length)return;for(var l=r.getModel("lineStyle"),s=o*r.get("length"),u=fs(l.getLineStyle(),fs(n.getModel("axisTick").getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])})),c=0;c<a.length;c++)for(var d=DL(a[c],t.transform,s,u,"minorticks_"+c),h=0;h<d.length;h++)e.add(d[h])}(n,o,t,e.tickDirection),t.get(["axisLabel","hideOverlap"]))&&YD(HD(xs(r,function(e){return{label:e,priority:e.z2,defaultAttr:{ignore:e.ignore}}})))},axisName:function(e,t,n,o){var i=Bs(e.axisName,t.get("name"));if(i){var r,a,l=t.get("nameLocation"),s=e.nameDirection,u=t.getModel("nameTextStyle"),c=t.get("nameGap")||0,d=t.axis.getExtent(),h=d[0]>d[1]?-1:1,p=["start"===l?d[0]-h*c:"end"===l?d[1]+h*c:(d[0]+d[1])/2,kL(l)?e.labelOffset+s*c:0],f=t.get("nameRotate");null!=f&&(f=f*SL/180),kL(l)?r=CL.innerTextLayout(e.rotation,null!=f?f:e.rotation,s):(r=function(e,t,n,o){var i,r,a=Sp(n-e),l=o[0]>o[1],s="start"===t&&!l||"start"!==t&&l;Cp(a-SL/2)?(r=s?"bottom":"top",i="center"):Cp(a-1.5*SL)?(r=s?"top":"bottom",i="center"):(r="middle",i=a<1.5*SL&&a>SL/2?s?"left":"right":s?"right":"left");return{rotation:a,textAlign:i,textVerticalAlign:r}}(e.rotation,l,f||0,d),null!=(a=e.axisNameAvailableWidth)&&(a=Math.abs(a/Math.sin(r.rotation)),!isFinite(a)&&(a=null)));var g=u.getFont(),v=t.get("nameTruncate",!0)||{},m=v.ellipsis,y=Bs(e.nameTruncateMaxWidth,v.maxWidth,a),x=new mv({x:p[0],y:p[1],rotation:r.rotation,silent:CL.isLabelSilent(t),style:Dx(u,{text:i,font:g,overflow:"truncate",width:y,ellipsis:m,fill:u.getTextColor()||t.get(["axisLine","lineStyle","color"]),align:u.get("align")||r.textAlign,verticalAlign:u.get("verticalAlign")||r.textVerticalAlign}),z2:1});if(xx({el:x,componentModel:t,itemName:i}),x.__fullText=i,x.anid="name",t.get("triggerEvent")){var _=CL.makeAxisEventDataBase(t);_.targetType="axisName",_.name=i,Nv(x).eventData=_}o.add(x),x.updateTransform(),n.add(x),x.decomposeTransform()}}};function TL(e){e&&(e.ignore=!0)}function IL(e,t){var n=e&&e.getBoundingRect().clone(),o=t&&t.getBoundingRect().clone();if(n&&o){var i=ju([]);return Ju(i,i,-e.rotation),n.applyTransform(qu([],i,e.getLocalTransform())),o.applyTransform(qu([],i,t.getLocalTransform())),n.intersect(o)}}function kL(e){return"middle"===e||"center"===e}function DL(e,t,n,o,i){for(var r=[],a=[],l=[],s=0;s<e.length;s++){var u=e[s].coord;a[0]=u,a[1]=0,l[0]=u,l[1]=n,t&&(mu(a,a,t),mu(l,l,t));var c=new by({shape:{x1:a[0],y1:a[1],x2:l[0],y2:l[1]},style:o,z2:2,autoBatch:!0,silent:!0});lx(c.shape,c.style.lineWidth),c.anid=i+"_"+e[s].tickValue,r.push(c)}return r}function NL(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return function(e,t,n){var o=t.getComponent("tooltip"),i=t.getComponent("axisPointer"),r=i.get("link",!0)||[],a=[];ys(n.getCoordinateSystems(),function(n){if(n.axisPointerEnabled){var l=VL(n.model),s=e.coordSysAxesInfo[l]={};e.coordSysMap[l]=n;var u=n.model.getModel("tooltip",o);if(ys(n.getAxes(),Cs(p,!1,null)),n.getTooltipAxes&&o&&u.get("show")){var c="axis"===u.get("trigger"),d="cross"===u.get(["axisPointer","type"]),h=n.getTooltipAxes(u.get(["axisPointer","axis"]));(c||d)&&ys(h.baseAxes,Cs(p,!d||"cross",c)),d&&ys(h.otherAxes,Cs(p,"cross",!1))}}function p(o,l,c){var d=c.model.getModel("axisPointer",i),h=d.get("show");if(h&&("auto"!==h||o||LL(d))){null==l&&(l=d.get("triggerTooltip")),d=o?function(e,t,n,o,i,r){var a=t.getModel("axisPointer"),l={};ys(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(e){l[e]=cs(a.get(e))}),l.snap="category"!==e.type&&!!r,"cross"===a.get("type")&&(l.type="line");var s=l.label||(l.label={});if(null==s.show&&(s.show=!1),"cross"===i){var u=a.get(["label","show"]);if(s.show=null==u||u,!r){var c=l.lineStyle=a.get("crossStyle");c&&fs(s,c.textStyle)}}return e.model.getModel("axisPointer",new Kx(l,n,o))}(c,u,i,t,o,l):d;var p=d.get("snap"),f=d.get("triggerEmphasis"),g=VL(c.model),v=l||p||"category"===c.type,m=e.axesInfo[g]={key:g,axis:c,coordSys:n,axisPointerModel:d,triggerTooltip:l,triggerEmphasis:f,involveSeries:v,snap:p,useHandle:LL(d),seriesModels:[],linkGroup:null};s[g]=m,e.seriesInvolved=e.seriesInvolved||v;var y=function(e,t){for(var n=t.model,o=t.dim,i=0;i<e.length;i++){var r=e[i]||{};if(EL(r[o+"AxisId"],n.id)||EL(r[o+"AxisIndex"],n.componentIndex)||EL(r[o+"AxisName"],n.name))return i}}(r,c);if(null!=y){var x=a[y]||(a[y]={axesInfo:{}});x.axesInfo[g]=m,x.mapper=r[y].mapper,m.linkGroup=x}}}})}(n,e,t),n.seriesInvolved&&function(e,t){t.eachSeries(function(t){var n=t.coordinateSystem,o=t.get(["tooltip","trigger"],!0),i=t.get(["tooltip","show"],!0);n&&"none"!==o&&!1!==o&&"item"!==o&&!1!==i&&!1!==t.get(["axisPointer","show"],!0)&&ys(e.coordSysAxesInfo[VL(n.model)],function(e){var o=e.axis;n.getAxis(o.dim)===o&&(e.seriesModels.push(t),null==e.seriesDataCount&&(e.seriesDataCount=0),e.seriesDataCount+=t.getData().count())})})}(n,e),n}function EL(e,t){return"all"===e||Ms(e)&&gs(e,t)>=0||e===t}function AL(e){var t=(e.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[VL(e)]}function LL(e){return!!e.get(["handle","show"])}function VL(e){return e.type+"||"+e.id}var OL={},PL=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.prototype.render=function(t,n,o,i){this.axisPointerClass&&function(e){var t=AL(e);if(t){var n=t.axisPointerModel,o=t.axis.scale,i=n.option,r=n.get("status"),a=n.get("value");null!=a&&(a=o.parse(a));var l=LL(n);null==r&&(i.status=l?"show":"hide");var s=o.getExtent().slice();s[0]>s[1]&&s.reverse(),(null==a||a>s[1])&&(a=s[1]),a<s[0]&&(a=s[0]),i.value=a,l&&(i.status=t.axis.scale.isBlank()?"hide":"show")}}(t),e.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(t,o,!0)},t.prototype.updateAxisPointer=function(e,t,n,o){this._doUpdateAxisPointerClass(e,n,!1)},t.prototype.remove=function(e,t){var n=this._axisPointer;n&&n.remove(t)},t.prototype.dispose=function(t,n){this._disposeAxisPointer(n),e.prototype.dispose.apply(this,arguments)},t.prototype._doUpdateAxisPointerClass=function(e,n,o){var i=t.getAxisPointerClass(this.axisPointerClass);if(i){var r=function(e){var t=AL(e);return t&&t.axisPointerModel}(e);r?(this._axisPointer||(this._axisPointer=new i)).render(e,r,n,o):this._disposeAxisPointer(n)}},t.prototype._disposeAxisPointer=function(e){this._axisPointer&&this._axisPointer.dispose(e),this._axisPointer=null},t.registerAxisPointerClass=function(e,t){if("production"!==process.env.NODE_ENV&&OL[e])throw new Error("axisPointer "+e+" exists");OL[e]=t},t.getAxisPointerClass=function(e){return e&&OL[e]},t.type="axis",t}(nC),BL=uf();function RL(e,t,n,o){var i=n.axis;if(!i.scale.isBlank()){var r=n.getModel("splitArea"),a=r.getModel("areaStyle"),l=a.get("color"),s=o.coordinateSystem.getRect(),u=i.getTicksCoords({tickModel:r,clamp:!0});if(u.length){var c=l.length,d=BL(e).splitAreaColors,h=qs(),p=0;if(d)for(var f=0;f<u.length;f++){var g=d.get(u[f].tickValue);if(null!=g){p=(g+(c-1)*f)%c;break}}var v=i.toGlobalCoord(u[0].coord),m=a.getAreaStyle();l=Ms(l)?l:[l];for(f=1;f<u.length;f++){var y=i.toGlobalCoord(u[f].coord),x=void 0,_=void 0,w=void 0,b=void 0;i.isHorizontal()?(x=v,_=s.y,w=y-x,b=s.height,v=x+w):(x=s.x,_=v,w=s.width,v=_+(b=y-_));var S=u[f-1].tickValue;null!=S&&h.set(S,p),t.add(new fv({anid:null!=S?"area_"+S:null,shape:{x:x,y:_,width:w,height:b},style:fs({fill:l[p]},m),autoBatch:!0,silent:!0})),p=(p+1)%c}BL(e).splitAreaColors=h}}}function zL(e){BL(e).splitAreaColors=null}var FL=["axisLine","axisTickLabel","axisName"],GL=["splitArea","splitLine","minorSplitLine"],HL=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass="CartesianAxisPointer",n}return Wl(t,e),t.prototype.render=function(t,n,o,i){this.group.removeAll();var r=this._axisGroup;if(this._axisGroup=new lp,this.group.add(this._axisGroup),t.get("show")){var a=t.getCoordSysModel(),l=fL(a,t),s=new CL(t,ps({handleAutoShown:function(e){for(var n=a.coordinateSystem.getCartesians(),o=0;o<n.length;o++)if(WI(n[o].getOtherAxis(t.axis).scale))return!0;return!1}},l));ys(FL,s.add,s),this._axisGroup.add(s.getGroup()),ys(GL,function(e){t.get([e,"show"])&&WL[e](this,this._axisGroup,t,a)},this),i&&"changeAxisOrder"===i.type&&i.isInitSort||px(r,this._axisGroup,t),e.prototype.render.call(this,t,n,o,i)}},t.prototype.remove=function(){zL(this)},t.type="cartesianAxis",t}(PL),WL={splitLine:function(e,t,n,o){var i=n.axis;if(!i.scale.isBlank()){var r=n.getModel("splitLine"),a=r.getModel("lineStyle"),l=a.get("color"),s=!1!==r.get("showMinLine"),u=!1!==r.get("showMaxLine");l=Ms(l)?l:[l];for(var c=o.coordinateSystem.getRect(),d=i.isHorizontal(),h=0,p=i.getTicksCoords({tickModel:r}),f=[],g=[],v=a.getLineStyle(),m=0;m<p.length;m++){var y=i.toGlobalCoord(p[m].coord);if((0!==m||s)&&(m!==p.length-1||u)){var x=p[m].tickValue;d?(f[0]=y,f[1]=c.y,g[0]=y,g[1]=c.y+c.height):(f[0]=c.x,f[1]=y,g[0]=c.x+c.width,g[1]=y);var _=h++%l.length,w=new by({anid:null!=x?"line_"+x:null,autoBatch:!0,shape:{x1:f[0],y1:f[1],x2:g[0],y2:g[1]},style:fs({stroke:l[_]},v),silent:!0});lx(w.shape,v.lineWidth),t.add(w)}}}},minorSplitLine:function(e,t,n,o){var i=n.axis,r=n.getModel("minorSplitLine").getModel("lineStyle"),a=o.coordinateSystem.getRect(),l=i.isHorizontal(),s=i.getMinorTicksCoords();if(s.length)for(var u=[],c=[],d=r.getLineStyle(),h=0;h<s.length;h++)for(var p=0;p<s[h].length;p++){var f=i.toGlobalCoord(s[h][p].coord);l?(u[0]=f,u[1]=a.y,c[0]=f,c[1]=a.y+a.height):(u[0]=a.x,u[1]=f,c[0]=a.x+a.width,c[1]=f);var g=new by({anid:"minor_line_"+s[h][p].tickValue,autoBatch:!0,shape:{x1:u[0],y1:u[1],x2:c[0],y2:c[1]},style:d,silent:!0});lx(g.shape,d.lineWidth),t.add(g)}},splitArea:function(e,t,n,o){RL(e,t,n,o)}},UL=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.type="xAxis",t}(HL),YL=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=UL.type,t}return Wl(t,e),t.type="yAxis",t}(HL),ZL=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="grid",t}return Wl(t,e),t.prototype.render=function(e,t){this.group.removeAll(),e.get("show")&&this.group.add(new fv({shape:e.coordinateSystem.getRect(),style:fs({fill:e.get("backgroundColor")},e.getItemStyle()),silent:!0,z2:-1}))},t.type="grid",t}(nC),XL={offset:0};function jL(e){e.registerComponentView(ZL),e.registerComponentModel(eL),e.registerCoordinateSystem("cartesian2d",xL),lL(e,"x",tL,XL),lL(e,"y",tL,XL),e.registerComponentView(UL),e.registerComponentView(YL),e.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}function $L(e){e.eachSeriesByType("radar",function(e){var t=e.getData(),n=[],o=e.coordinateSystem;if(o){var i=o.getIndicatorAxes();ys(i,function(e,r){t.each(t.mapDimension(i[r].dim),function(e,t){n[t]=n[t]||[];var i=o.dataToPoint(e,r);n[t][r]=qL(i)?i:KL(o)})}),t.each(function(e){var i=function(e,t,n){if(e&&t)for(var o=0,i=e.length;o<i;o++)if(t.call(n,e[o],o,e))return e[o]}(n[e],function(e){return qL(e)})||KL(o);n[e].push(i.slice()),t.setItemLayout(e,n[e])})}})}function qL(e){return!isNaN(e[0])&&!isNaN(e[1])}function KL(e){return[e.cx,e.cy]}function JL(e){var t=e.polar;if(t){Ms(t)||(t=[t]);var n=[];ys(t,function(t,o){t.indicator?(t.type&&!t.shape&&(t.shape=t.type),e.radar=e.radar||[],Ms(e.radar)||(e.radar=[e.radar]),e.radar.push(t)):n.push(t)}),e.polar=n}ys(e.series,function(e){e&&"radar"===e.type&&e.polarIndex&&(e.radarIndex=e.polarIndex)})}var QL=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.prototype.render=function(e,t,n){var o=e.coordinateSystem,i=this.group,r=e.getData(),a=this._data;function l(e,t){var n=e.getItemVisual(t,"symbol")||"circle";if("none"!==n){var o=xM(e.getItemVisual(t,"symbolSize")),i=yM(n,-1,-1,2,2),r=e.getItemVisual(t,"symbolRotate")||0;return i.attr({style:{strokeNoScale:!0},z2:100,scaleX:o[0]/2,scaleY:o[1]/2,rotation:r*Math.PI/180||0}),i}}function s(t,n,o,i,r,a){o.removeAll();for(var s=0;s<n.length-1;s++){var u=l(i,r);u&&(u.__dimIdx=s,t[s]?(u.setPosition(t[s]),Sx[a?"initProps":"updateProps"](u,{x:n[s][0],y:n[s][1]},e,r)):u.setPosition(n[s]),o.add(u))}}function u(e){return xs(e,function(e){return[o.cx,o.cy]})}r.diff(a).add(function(t){var n=r.getItemLayout(t);if(n){var o=new my,i=new xy,a={shape:{points:n}};o.shape.points=u(n),i.shape.points=u(n),Uy(o,a,e,t),Uy(i,a,e,t);var l=new lp,c=new lp;l.add(i),l.add(o),l.add(c),s(i.shape.points,n,c,r,t,!0),r.setItemGraphicEl(t,l)}}).update(function(t,n){var o=a.getItemGraphicEl(n),i=o.childAt(0),l=o.childAt(1),u=o.childAt(2),c={shape:{points:r.getItemLayout(t)}};c.shape.points&&(s(i.shape.points,c.shape.points,u,r,t,!1),$y(l),$y(i),Wy(i,c,e),Wy(l,c,e),r.setItemGraphicEl(t,o))}).remove(function(e){i.remove(a.getItemGraphicEl(e))}).execute(),r.eachItemGraphicEl(function(e,t){var n=r.getItemModel(t),o=e.childAt(0),a=e.childAt(1),l=e.childAt(2),s=r.getItemVisual(t,"style"),u=s.fill;i.add(e),o.useStyle(fs(n.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:u})),Sm(o,n,"lineStyle"),Sm(a,n,"areaStyle");var c=n.getModel("areaStyle"),d=c.isEmpty()&&c.parentModel.isEmpty();a.ignore=d,ys(["emphasis","select","blur"],function(e){var t=n.getModel([e,"areaStyle"]),o=t.isEmpty()&&t.parentModel.isEmpty();a.ensureState(e).ignore=o&&d}),a.useStyle(fs(c.getAreaStyle(),{fill:u,opacity:.7,decal:s.decal}));var h=n.getModel("emphasis"),p=h.getModel("itemStyle").getItemStyle();l.eachChild(function(e){if(e instanceof lv){var o=e.style;e.useStyle(ps({image:o.image,x:o.x,y:o.y,width:o.width,height:o.height},s))}else e.useStyle(s),e.setColor(u),e.style.strokeNoScale=!0;e.ensureState("emphasis").style=cs(p);var i=r.getStore().get(r.getDimensionIndex(e.__dimIdx),t);(null==i||isNaN(i))&&(i=""),Ix(e,kx(n),{labelFetcher:r.hostModel,labelDataIndex:t,labelDimIndex:e.__dimIdx,defaultText:i,inheritColor:u,defaultOpacity:s.opacity})}),xm(e,h.get("focus"),h.get("blurScope"),h.get("disabled"))}),this._data=r},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.type="radar",t}(aC),eV=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return Wl(t,e),t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new ZA(Ss(this.getData,this),Ss(this.getRawData,this))},t.prototype.getInitialData=function(e,t){return YA(this,{generateCoord:"indicator_",generateCoordCount:1/0})},t.prototype.formatTooltip=function(e,t,n){var o=this.getData(),i=this.coordinateSystem.getIndicatorAxes(),r=this.getData().getName(e),a=""===r?this.name:r,l=GS(this,e);return AS("section",{header:a,sortBlocks:!0,blocks:xs(i,function(t){var n=o.get(o.mapDimension(t.dim),e);return AS("nameValue",{markerType:"subItem",markerColor:l,name:t.name,value:n,sortParam:n})})})},t.prototype.getTooltipPosition=function(e){if(null!=e)for(var t=this.getData(),n=this.coordinateSystem,o=t.getValues(xs(n.dimensions,function(e){return t.mapDimension(e)}),e),i=0,r=o.length;i<r;i++)if(!isNaN(o[i])){var a=n.getIndicatorAxes();return n.coordToPoint(a[i].dataToCoord(o[i]),i)}},t.type="series.radar",t.dependencies=["radar"],t.defaultOption={z:2,colorBy:"data",coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid",join:"round"},label:{position:"top"},symbolSize:8},t}(jS),tV=rL.value;function nV(e,t){return fs({show:t},e)}var oV=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.prototype.optionUpdated=function(){var e=this.get("boundaryGap"),t=this.get("splitNumber"),n=this.get("scale"),o=this.get("axisLine"),i=this.get("axisTick"),r=this.get("axisLabel"),a=this.get("axisName"),l=this.get(["axisName","show"]),s=this.get(["axisName","formatter"]),u=this.get("axisNameGap"),c=this.get("triggerEvent"),d=xs(this.get("indicator")||[],function(d){null!=d.max&&d.max>0&&!d.min?d.min=0:null!=d.min&&d.min<0&&!d.max&&(d.max=0);var h=a;null!=d.color&&(h=fs({color:d.color},a));var p=ds(cs(d),{boundaryGap:e,splitNumber:t,scale:n,axisLine:o,axisTick:i,axisLabel:r,name:d.text,showName:l,nameLocation:"end",nameGap:u,nameTextStyle:h,triggerEvent:c},!1);if(Is(s)){var f=p.name;p.name=s.replace("{value}",null!=f?f:"")}else Ts(s)&&(p.name=s(p.name,p));var g=new Kx(p,null,this.ecModel);return vs(g,Yk.prototype),g.mainType="radar",g.componentIndex=this.componentIndex,g},this);this._indicatorModels=d},t.prototype.getIndicatorModels=function(){return this._indicatorModels},t.type="radar",t.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:ds({lineStyle:{color:"#bbb"}},tV.axisLine),axisLabel:nV(tV.axisLabel,!1),axisTick:nV(tV.axisTick,!1),splitLine:nV(tV.splitLine,!0),splitArea:nV(tV.splitArea,!0),indicator:[]},t}(aw),iV=["axisLine","axisTickLabel","axisName"],rV=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.prototype.render=function(e,t,n){this.group.removeAll(),this._buildAxes(e),this._buildSplitLineAndArea(e)},t.prototype._buildAxes=function(e){var t=e.coordinateSystem;ys(xs(t.getIndicatorAxes(),function(e){var n=e.model.get("showName")?e.name:"";return new CL(e.model,{axisName:n,position:[t.cx,t.cy],rotation:e.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}),function(e){ys(iV,e.add,e),this.group.add(e.getGroup())},this)},t.prototype._buildSplitLineAndArea=function(e){var t=e.coordinateSystem,n=t.getIndicatorAxes();if(n.length){var o=e.get("shape"),i=e.getModel("splitLine"),r=e.getModel("splitArea"),a=i.getModel("lineStyle"),l=r.getModel("areaStyle"),s=i.get("show"),u=r.get("show"),c=a.get("color"),d=l.get("color"),h=Ms(c)?c:[c],p=Ms(d)?d:[d],f=[],g=[];if("circle"===o)for(var v=n[0].getTicksCoords(),m=t.cx,y=t.cy,x=0;x<v.length;x++){if(s)f[I(f,h,x)].push(new $m({shape:{cx:m,cy:y,r:v[x].coord}}));if(u&&x<v.length-1)g[I(g,p,x)].push(new fy({shape:{cx:m,cy:y,r0:v[x].coord,r:v[x+1].coord}}))}else{var _,w=xs(n,function(e,n){var o=e.getTicksCoords();return _=null==_?o.length-1:Math.min(o.length-1,_),xs(o,function(e){return t.coordToPoint(e.coord,n)})}),b=[];for(x=0;x<=_;x++){for(var S=[],C=0;C<n.length;C++)S.push(w[C][x]);if(S[0]?S.push(S[0].slice()):process.env.NODE_ENV,s)f[I(f,h,x)].push(new xy({shape:{points:S}}));if(u&&b)g[I(g,p,x-1)].push(new my({shape:{points:S.concat(b)}}));b=S.slice().reverse()}}var M=a.getLineStyle(),T=l.getAreaStyle();ys(g,function(e,t){this.group.add(rx(e,{style:fs({stroke:"none",fill:p[t%p.length]},T),silent:!0}))},this),ys(f,function(e,t){this.group.add(rx(e,{style:fs({fill:"none",stroke:h[t%h.length]},M),silent:!0}))},this)}function I(e,t,n){var o=n%t.length;return e[o]=e[o]||[],o}},t.type="radar",t}(nC),aV=function(e){function t(t,n,o){var i=e.call(this,t,n,o)||this;return i.type="value",i.angle=0,i.name="",i}return Wl(t,e),t}(vD),lV=function(){function e(e,t,n){this.dimensions=[],this._model=e,this._indicatorAxes=xs(e.getIndicatorModels(),function(e,t){var n="indicator_"+t,o=new aV(n,new QI);return o.name=e.get("name"),o.model=e,e.axis=o,this.dimensions.push(n),o},this),this.resize(e,n)}return e.prototype.getIndicatorAxes=function(){return this._indicatorAxes},e.prototype.dataToPoint=function(e,t){var n=this._indicatorAxes[t];return this.coordToPoint(n.dataToCoord(e),t)},e.prototype.coordToPoint=function(e,t){var n=this._indicatorAxes[t].angle;return[this.cx+e*Math.cos(n),this.cy-e*Math.sin(n)]},e.prototype.pointToData=function(e){var t=e[0]-this.cx,n=e[1]-this.cy,o=Math.sqrt(t*t+n*n);t/=o,n/=o;for(var i,r=Math.atan2(-n,t),a=1/0,l=-1,s=0;s<this._indicatorAxes.length;s++){var u=this._indicatorAxes[s],c=Math.abs(r-u.angle);c<a&&(i=u,l=s,a=c)}return[l,+(i&&i.coordToData(o))]},e.prototype.resize=function(e,t){var n=e.get("center"),o=t.getWidth(),i=t.getHeight(),r=Math.min(o,i)/2;this.cx=gp(n[0],o),this.cy=gp(n[1],i),this.startAngle=e.get("startAngle")*Math.PI/180;var a=e.get("radius");(Is(a)||Ds(a))&&(a=[0,a]),this.r0=gp(a[0],r),this.r=gp(a[1],r),ys(this._indicatorAxes,function(e,t){e.setExtent(this.r0,this.r);var n=this.startAngle+t*Math.PI*2/this._indicatorAxes.length;n=Math.atan2(Math.sin(n),Math.cos(n)),e.angle=n},this)},e.prototype.update=function(e,t){var n=this._indicatorAxes,o=this._model;ys(n,function(e){e.scale.setExtent(1/0,-1/0)}),e.eachSeriesByType("radar",function(t,i){if("radar"===t.get("coordinateSystem")&&e.getComponent("radar",t.get("radarIndex"))===o){var r=t.getData();ys(n,function(e){e.scale.unionExtentFromData(r,r.mapDimension(e.dim))})}},this);var i=o.get("splitNumber"),r=new QI;r.setExtent(0,i),r.setInterval(1),ys(n,function(e,t){yL(e.scale,e.model,r)})},e.prototype.convertToPixel=function(e,t,n){return null},e.prototype.convertFromPixel=function(e,t,n){return null},e.prototype.containPoint=function(e){return!1},e.create=function(t,n){var o=[];return t.eachComponent("radar",function(i){var r=new e(i,t,n);o.push(r),i.coordinateSystem=r}),t.eachSeriesByType("radar",function(e){"radar"===e.get("coordinateSystem")&&(e.coordinateSystem=o[e.get("radarIndex")||0])}),o},e.dimensions=[],e}();function sV(e){e.registerCoordinateSystem("radar",lV),e.registerComponentModel(oV),e.registerComponentView(rV),e.registerVisual({seriesType:"radar",reset:function(e){var t=e.getData();t.each(function(e){t.setItemVisual(e,"legendIcon","roundRect")}),t.setVisual("legendIcon","roundRect")}})}var uV="\0_ec_interaction_mutex";function cV(e,t){return!!dV(e)[t]}function dV(e){return e[uV]||(e[uV]={})}jT({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},tu);var hV=function(e){function t(t){var n=e.call(this)||this;n._zr=t;var o=Ss(n._mousedownHandler,n),i=Ss(n._mousemoveHandler,n),r=Ss(n._mouseupHandler,n),a=Ss(n._mousewheelHandler,n),l=Ss(n._pinchHandler,n);return n.enable=function(e,n){this.disable(),this._opt=fs(cs(n)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==e&&(e=!0),!0!==e&&"move"!==e&&"pan"!==e||(t.on("mousedown",o),t.on("mousemove",i),t.on("mouseup",r)),!0!==e&&"scale"!==e&&"zoom"!==e||(t.on("mousewheel",a),t.on("pinch",l))},n.disable=function(){t.off("mousedown",o),t.off("mousemove",i),t.off("mouseup",r),t.off("mousewheel",a),t.off("pinch",l)},n}return Wl(t,e),t.prototype.isDragging=function(){return this._dragging},t.prototype.isPinching=function(){return this._pinching},t.prototype.setPointerChecker=function(e){this.pointerChecker=e},t.prototype.dispose=function(){this.disable()},t.prototype._mousedownHandler=function(e){if(!Wu(e)){for(var t=e.target;t;){if(t.draggable)return;t=t.__hostTarget||t.parent}var n=e.offsetX,o=e.offsetY;this.pointerChecker&&this.pointerChecker(e,n,o)&&(this._x=n,this._y=o,this._dragging=!0)}},t.prototype._mousemoveHandler=function(e){if(this._dragging&&gV("moveOnMouseMove",e,this._opt)&&"pinch"!==e.gestureEvent&&!cV(this._zr,"globalPan")){var t=e.offsetX,n=e.offsetY,o=this._x,i=this._y,r=t-o,a=n-i;this._x=t,this._y=n,this._opt.preventDefaultMouseMove&&Hu(e.event),fV(this,"pan","moveOnMouseMove",e,{dx:r,dy:a,oldX:o,oldY:i,newX:t,newY:n,isAvailableBehavior:null})}},t.prototype._mouseupHandler=function(e){Wu(e)||(this._dragging=!1)},t.prototype._mousewheelHandler=function(e){var t=gV("zoomOnMouseWheel",e,this._opt),n=gV("moveOnMouseWheel",e,this._opt),o=e.wheelDelta,i=Math.abs(o),r=e.offsetX,a=e.offsetY;if(0!==o&&(t||n)){if(t){var l=i>3?1.4:i>1?1.2:1.1;pV(this,"zoom","zoomOnMouseWheel",e,{scale:o>0?l:1/l,originX:r,originY:a,isAvailableBehavior:null})}if(n){var s=Math.abs(o);pV(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:(o>0?1:-1)*(s>3?.4:s>1?.15:.05),originX:r,originY:a,isAvailableBehavior:null})}}},t.prototype._pinchHandler=function(e){cV(this._zr,"globalPan")||pV(this,"zoom",null,e,{scale:e.pinchScale>1?1.1:1/1.1,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})},t}(bu);function pV(e,t,n,o,i){e.pointerChecker&&e.pointerChecker(o,i.originX,i.originY)&&(Hu(o.event),fV(e,t,n,o,i))}function fV(e,t,n,o,i){i.isAvailableBehavior=Ss(gV,null,n,o),e.trigger(t,i)}function gV(e,t,n){var o=n[e];return!e||o&&(!Is(o)||t.event[o+"Key"])}function vV(e,t,n){var o=e.target;o.x+=t,o.y+=n,o.dirty()}function mV(e,t,n,o){var i=e.target,r=e.zoomLimit,a=e.zoom=e.zoom||1;if(a*=t,r){var l=r.min||0,s=r.max||1/0;a=Math.max(Math.min(s,a),l)}var u=a/e.zoom;e.zoom=a,i.x-=(n-i.x)*(u-1),i.y-=(o-i.y)*(u-1),i.scaleX*=u,i.scaleY*=u,i.dirty()}var yV,xV={axisPointer:1,tooltip:1,brush:1};function _V(e,t,n){var o=t.getComponentByElement(e.topTarget),i=o&&o.coordinateSystem;return o&&o!==n&&!xV.hasOwnProperty(o.mainType)&&i&&i.model!==n}function wV(e){Is(e)&&(e=(new DOMParser).parseFromString(e,"text/xml"));var t=e;for(9===t.nodeType&&(t=t.firstChild);"svg"!==t.nodeName.toLowerCase()||1!==t.nodeType;)t=t.nextSibling;return t}var bV={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},SV=bs(bV),CV={"alignment-baseline":"textBaseline","stop-color":"stopColor"},MV=bs(CV),TV=function(){function e(){this._defs={},this._root=null}return e.prototype.parse=function(e,t){t=t||{};var n=wV(e);if("production"!==process.env.NODE_ENV&&!n)throw new Error("Illegal svg");this._defsUsePending=[];var o=new lp;this._root=o;var i=[],r=n.getAttribute("viewBox")||"",a=parseFloat(n.getAttribute("width")||t.width),l=parseFloat(n.getAttribute("height")||t.height);isNaN(a)&&(a=null),isNaN(l)&&(l=null),AV(n,o,null,!0,!1);for(var s,u,c=n.firstChild;c;)this._parseNode(c,o,i,null,!1,!1),c=c.nextSibling;if(function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o[0].style[o[1]]=e[o[2]]}}(this._defs,this._defsUsePending),this._defsUsePending=[],r){var d=PV(r);d.length>=4&&(s={x:parseFloat(d[0]||0),y:parseFloat(d[1]||0),width:parseFloat(d[2]),height:parseFloat(d[3])})}if(s&&null!=a&&null!=l&&(u=GV(s,{x:0,y:0,width:a,height:l}),!t.ignoreViewBox)){var h=o;(o=new lp).add(h),h.scaleX=h.scaleY=u.scale,h.x=u.x,h.y=u.y}return t.ignoreRootClip||null==a||null==l||o.setClipPath(new fv({shape:{x:0,y:0,width:a,height:l}})),{root:o,width:a,height:l,viewBoxRect:s,viewBoxTransform:u,named:i}},e.prototype._parseNode=function(e,t,n,o,i,r){var a,l=e.nodeName.toLowerCase(),s=o;if("defs"===l&&(i=!0),"text"===l&&(r=!0),"defs"===l||"switch"===l)a=t;else{if(!i){var u=yV[l];if(u&&eu(yV,l)){a=u.call(this,e,t);var c=e.getAttribute("name");if(c){var d={name:c,namedFrom:null,svgNodeTagLower:l,el:a};n.push(d),"g"===l&&(s=d)}else o&&n.push({name:o.name,namedFrom:o,svgNodeTagLower:l,el:a});t.add(a)}}var h=IV[l];if(h&&eu(IV,l)){var p=h.call(this,e),f=e.getAttribute("id");f&&(this._defs[f]=p)}}if(a&&a.isGroup)for(var g=e.firstChild;g;)1===g.nodeType?this._parseNode(g,a,n,s,i,r):3===g.nodeType&&r&&this._parseText(g,a),g=g.nextSibling},e.prototype._parseText=function(e,t){var n=new iv({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});NV(t,n),AV(e,n,this._defsUsePending,!1,!1),function(e,t){var n=t.__selfStyle;if(n){var o=n.textBaseline,i=o;o&&"auto"!==o?"baseline"===o?i="alphabetic":"before-edge"===o||"text-before-edge"===o?i="top":"after-edge"===o||"text-after-edge"===o?i="bottom":"central"!==o&&"mathematical"!==o||(i="middle"):i="alphabetic",e.style.textBaseline=i}var r=t.__inheritedStyle;if(r){var a=r.textAlign,l=a;a&&("middle"===a&&(l="center"),e.style.textAlign=l)}}(n,t);var o=n.style,i=o.fontSize;i&&i<9&&(o.fontSize=9,n.scaleX*=i/9,n.scaleY*=i/9);var r=(o.fontSize||o.fontFamily)&&[o.fontStyle,o.fontWeight,(o.fontSize||12)+"px",o.fontFamily||"sans-serif"].join(" ");o.font=r;var a=n.getBoundingRect();return this._textX+=a.width,t.add(n),n},e.internalField=void(yV={g:function(e,t){var n=new lp;return NV(t,n),AV(e,n,this._defsUsePending,!1,!1),n},rect:function(e,t){var n=new fv;return NV(t,n),AV(e,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(e.getAttribute("x")||"0"),y:parseFloat(e.getAttribute("y")||"0"),width:parseFloat(e.getAttribute("width")||"0"),height:parseFloat(e.getAttribute("height")||"0")}),n.silent=!0,n},circle:function(e,t){var n=new $m;return NV(t,n),AV(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),r:parseFloat(e.getAttribute("r")||"0")}),n.silent=!0,n},line:function(e,t){var n=new by;return NV(t,n),AV(e,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(e.getAttribute("x1")||"0"),y1:parseFloat(e.getAttribute("y1")||"0"),x2:parseFloat(e.getAttribute("x2")||"0"),y2:parseFloat(e.getAttribute("y2")||"0")}),n.silent=!0,n},ellipse:function(e,t){var n=new Km;return NV(t,n),AV(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),rx:parseFloat(e.getAttribute("rx")||"0"),ry:parseFloat(e.getAttribute("ry")||"0")}),n.silent=!0,n},polygon:function(e,t){var n,o=e.getAttribute("points");o&&(n=EV(o));var i=new my({shape:{points:n||[]},silent:!0});return NV(t,i),AV(e,i,this._defsUsePending,!1,!1),i},polyline:function(e,t){var n,o=e.getAttribute("points");o&&(n=EV(o));var i=new xy({shape:{points:n||[]},silent:!0});return NV(t,i),AV(e,i,this._defsUsePending,!1,!1),i},image:function(e,t){var n=new lv;return NV(t,n),AV(e,n,this._defsUsePending,!1,!1),n.setStyle({image:e.getAttribute("xlink:href")||e.getAttribute("href"),x:+e.getAttribute("x"),y:+e.getAttribute("y"),width:+e.getAttribute("width"),height:+e.getAttribute("height")}),n.silent=!0,n},text:function(e,t){var n=e.getAttribute("x")||"0",o=e.getAttribute("y")||"0",i=e.getAttribute("dx")||"0",r=e.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(i),this._textY=parseFloat(o)+parseFloat(r);var a=new lp;return NV(t,a),AV(e,a,this._defsUsePending,!1,!0),a},tspan:function(e,t){var n=e.getAttribute("x"),o=e.getAttribute("y");null!=n&&(this._textX=parseFloat(n)),null!=o&&(this._textY=parseFloat(o));var i=e.getAttribute("dx")||"0",r=e.getAttribute("dy")||"0",a=new lp;return NV(t,a),AV(e,a,this._defsUsePending,!1,!0),this._textX+=parseFloat(i),this._textY+=parseFloat(r),a},path:function(e,t){var n=Zm(e.getAttribute("d")||"");return NV(t,n),AV(e,n,this._defsUsePending,!1,!1),n.silent=!0,n}}),e}(),IV={lineargradient:function(e){var t=parseInt(e.getAttribute("x1")||"0",10),n=parseInt(e.getAttribute("y1")||"0",10),o=parseInt(e.getAttribute("x2")||"10",10),i=parseInt(e.getAttribute("y2")||"0",10),r=new Ey(t,n,o,i);return kV(e,r),DV(e,r),r},radialgradient:function(e){var t=parseInt(e.getAttribute("cx")||"0",10),n=parseInt(e.getAttribute("cy")||"0",10),o=parseInt(e.getAttribute("r")||"0",10),i=new Ay(t,n,o);return kV(e,i),DV(e,i),i}};function kV(e,t){"userSpaceOnUse"===e.getAttribute("gradientUnits")&&(t.global=!0)}function DV(e,t){for(var n=e.firstChild;n;){if(1===n.nodeType&&"stop"===n.nodeName.toLocaleLowerCase()){var o=n.getAttribute("offset"),i=void 0;i=o&&o.indexOf("%")>0?parseInt(o,10)/100:o?parseFloat(o):0;var r={};FV(n,r,r);var a=r.stopColor||n.getAttribute("stop-color")||"#000000";t.colorStops.push({offset:i,color:a})}n=n.nextSibling}}function NV(e,t){e&&e.__inheritedStyle&&(t.__inheritedStyle||(t.__inheritedStyle={}),fs(t.__inheritedStyle,e.__inheritedStyle))}function EV(e){for(var t=PV(e),n=[],o=0;o<t.length;o+=2){var i=parseFloat(t[o]),r=parseFloat(t[o+1]);n.push([i,r])}return n}function AV(e,t,n,o,i){var r=t,a=r.__inheritedStyle=r.__inheritedStyle||{},l={};1===e.nodeType&&(function(e,t){var n=e.getAttribute("transform");if(n){n=n.replace(/,/g," ");var o=[],i=null;n.replace(BV,function(e,t,n){return o.push(t,n),""});for(var r=o.length-1;r>0;r-=2){var a=o[r],l=o[r-1],s=PV(a);switch(i=i||Xu(),l){case"translate":Ku(i,i,[parseFloat(s[0]),parseFloat(s[1]||"0")]);break;case"scale":Qu(i,i,[parseFloat(s[0]),parseFloat(s[1]||s[0])]);break;case"rotate":Ju(i,i,-parseFloat(s[0])*RV,[parseFloat(s[1]||"0"),parseFloat(s[2]||"0")]);break;case"skewX":qu(i,[1,0,Math.tan(parseFloat(s[0])*RV),1,0,0],i);break;case"skewY":qu(i,[1,Math.tan(parseFloat(s[0])*RV),0,1,0,0],i);break;case"matrix":i[0]=parseFloat(s[0]),i[1]=parseFloat(s[1]),i[2]=parseFloat(s[2]),i[3]=parseFloat(s[3]),i[4]=parseFloat(s[4]),i[5]=parseFloat(s[5])}}t.setLocalTransform(i)}}(e,t),FV(e,a,l),o||function(e,t,n){for(var o=0;o<SV.length;o++){var i=SV[o];null!=(r=e.getAttribute(i))&&(t[bV[i]]=r)}for(o=0;o<MV.length;o++){var r;i=MV[o];null!=(r=e.getAttribute(i))&&(n[CV[i]]=r)}}(e,a,l)),r.style=r.style||{},null!=a.fill&&(r.style.fill=VV(r,"fill",a.fill,n)),null!=a.stroke&&(r.style.stroke=VV(r,"stroke",a.stroke,n)),ys(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(e){null!=a[e]&&(r.style[e]=parseFloat(a[e]))}),ys(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign"],function(e){null!=a[e]&&(r.style[e]=a[e])}),i&&(r.__selfStyle=l),a.lineDash&&(r.style.lineDash=xs(PV(a.lineDash),function(e){return parseFloat(e)})),"hidden"!==a.visibility&&"collapse"!==a.visibility||(r.invisible=!0),"none"===a.display&&(r.ignore=!0)}var LV=/^url\(\s*#(.*?)\)/;function VV(e,t,n,o){var i=n&&n.match(LV);if(!i)return"none"===n&&(n=null),n;var r=Ws(i[1]);o.push([e,t,r])}var OV=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function PV(e){return e.match(OV)||[]}var BV=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,RV=Math.PI/180;var zV=/([^\s:;]+)\s*:\s*([^:;]+)/g;function FV(e,t,n){var o,i=e.getAttribute("style");if(i)for(zV.lastIndex=0;null!=(o=zV.exec(i));){var r=o[1],a=eu(bV,r)?bV[r]:null;a&&(t[a]=o[2]);var l=eu(CV,r)?CV[r]:null;l&&(n[l]=o[2])}}function GV(e,t){var n=t.width/e.width,o=t.height/e.height,i=Math.min(n,o);return{scale:i,x:-(e.x+e.width/2)*i+(t.x+t.width/2),y:-(e.y+e.height/2)*i+(t.y+t.height/2)}}var HV=qs(["rect","circle","line","ellipse","polygon","polyline","path","text","tspan","g"]),WV=function(){function e(e,t){this.type="geoSVG",this._usedGraphicMap=qs(),this._freedGraphics=[],this._mapName=e,this._parsedXML=wV(t)}return e.prototype.load=function(){var e=this._firstGraphic;if(!e){e=this._firstGraphic=this._buildGraphic(this._parsedXML),this._freedGraphics.push(e),this._boundingRect=this._firstGraphic.boundingRect.clone();var t=function(e){var t=[],n=qs();return ys(e,function(e){if(null==e.namedFrom){var o=new tD(e.name,e.el);t.push(o),n.set(e.name,o)}}),{regions:t,regionsMap:n}}(e.named),n=t.regions,o=t.regionsMap;this._regions=n,this._regionsMap=o}return{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}},e.prototype._buildGraphic=function(e){var t,n,o,i;try{Hs(null!=(n=(t=e&&(o=e,i={ignoreViewBox:!0,ignoreRootClip:!0},(new TV).parse(o,i))||{}).root))}catch(m){throw new Error("Invalid svg format\n"+m.message)}var r=new lp;r.add(n),r.isGeoSVGGraphicRoot=!0;var a=t.width,l=t.height,s=t.viewBoxRect,u=this._boundingRect;if(!u){var c=void 0,d=void 0,h=void 0,p=void 0;if(null!=a?(c=0,h=a):s&&(c=s.x,h=s.width),null!=l?(d=0,p=l):s&&(d=s.y,p=s.height),null==c||null==d){var f=n.getBoundingRect();null==c&&(c=f.x,h=f.width),null==d&&(d=f.y,p=f.height)}u=this._boundingRect=new cc(c,d,h,p)}if(s){var g=GV(s,u);n.scaleX=n.scaleY=g.scale,n.x=g.x,n.y=g.y}r.setClipPath(new fv({shape:u.plain()}));var v=[];return ys(t.named,function(e){var t;null!=HV.get(e.svgNodeTagLower)&&(v.push(e),(t=e.el).silent=!1,t.isGroup&&t.traverse(function(e){e.silent=!1}))}),{root:r,boundingRect:u,named:v}},e.prototype.useGraphic=function(e){var t=this._usedGraphicMap,n=t.get(e);return n||(n=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),t.set(e,n),n)},e.prototype.freeGraphic=function(e){var t=this._usedGraphicMap,n=t.get(e);n&&(t.removeKey(e),this._freedGraphics.push(n))},e}();for(var UV=[126,25],YV="南海诸岛",ZV=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],XV=0;XV<ZV.length;XV++)for(var jV=0;jV<ZV[XV].length;jV++)ZV[XV][jV][0]/=10.5,ZV[XV][jV][1]/=-14,ZV[XV][jV][0]+=UV[0],ZV[XV][jV][1]+=UV[1];var $V={"南海诸岛":[32,80],"广东":[0,-10],"香港":[10,5],"澳门":[-10,10],"天津":[5,5]};var qV=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];var KV=function(){function e(e,t,n){var o;this.type="geoJSON",this._parsedMap=qs(),this._mapName=e,this._specialAreas=n,this._geoJSON=Is(o=t)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(o):new Function("return ("+o+");")():o}return e.prototype.load=function(e,t){t=t||"name";var n=this._parsedMap.get(t);if(!n){var o=this._parseToRegions(t);n=this._parsedMap.set(t,{regions:o,boundingRect:JV(o)})}var i=qs(),r=[];return ys(n.regions,function(t){var n=t.name;e&&eu(e,n)&&(t=t.cloneShallow(n=e[n])),r.push(t),i.set(n,t)}),{regions:r,boundingRect:n.boundingRect||new cc(0,0,0,0),regionsMap:i}},e.prototype._parseToRegions=function(e){var t,n=this._mapName,o=this._geoJSON;try{t=o?iD(o,e):[]}catch(i){throw new Error("Invalid geoJson format\n"+i.message)}return function(e,t){if("china"===e){for(var n=0;n<t.length;n++)if(t[n].name===YV)return;t.push(new eD(YV,xs(ZV,function(e){return{type:"polygon",exterior:e}}),UV))}}(n,t),ys(t,function(e){var t=e.name;!function(e,t){if("china"===e){var n=$V[t.name];if(n){var o=t.getCenter();o[0]+=n[0]/10.5,o[1]+=-n[1]/14,t.setCenter(o)}}}(n,e),function(e,t){"china"===e&&"台湾"===t.name&&t.geometries.push({type:"polygon",exterior:qV[0]})}(n,e);var o=this._specialAreas&&this._specialAreas[t];o&&e.transformTo(o.left,o.top,o.width,o.height)},this),t},e.prototype.getMapForUser=function(){return{geoJson:this._geoJSON,geoJSON:this._geoJSON,specialAreas:this._specialAreas}},e}();function JV(e){for(var t,n=0;n<e.length;n++){var o=e[n].getBoundingRect();(t=t||o.clone()).union(o)}return t}var QV=qs();const eO=function(e,t,n){if(t.svg){var o=new WV(e,t.svg);QV.set(e,o)}else{var i=t.geoJson||t.geoJSON;i&&!t.features?n=t.specialAreas:i=t;o=new KV(e,i,n);QV.set(e,o)}},tO=function(e){return QV.get(e)},nO=function(e){var t=QV.get(e);return t&&"geoJSON"===t.type&&t.getMapForUser()},oO=function(e,t,n){var o=QV.get(e);if(o)return o.load(t,n);process.env.NODE_ENV};var iO=["rect","circle","line","ellipse","polygon","polyline","path"],rO=qs(iO),aO=qs(iO.concat(["g"])),lO=qs(iO.concat(["g"])),sO=uf();function uO(e){var t=e.getItemStyle(),n=e.get("areaColor");return null!=n&&(t.fill=n),t}function cO(e){var t=e.style;t&&(t.stroke=t.stroke||t.fill,t.fill=null)}var dO=function(){function e(e){var t=new lp;this.uid=Qx("ec_map_draw"),this._controller=new hV(e.getZr()),this._controllerHost={target:t},this.group=t,t.add(this._regionsGroup=new lp),t.add(this._svgGroup=new lp)}return e.prototype.draw=function(e,t,n,o,i){var r="geo"===e.mainType,a=e.getData&&e.getData();r&&t.eachComponent({mainType:"series",subType:"map"},function(t){a||t.getHostGeoModel()!==e||(a=t.getData())});var l=e.coordinateSystem,s=this._regionsGroup,u=this.group,c=l.getTransformInfo(),d=c.raw,h=c.roam;!s.childAt(0)||i?(u.x=h.x,u.y=h.y,u.scaleX=h.scaleX,u.scaleY=h.scaleY,u.dirty()):Wy(u,h,e);var p=a&&a.getVisual("visualMeta")&&a.getVisual("visualMeta").length>0,f={api:n,geo:l,mapOrGeoModel:e,data:a,isVisualEncodedByVisualMap:p,isGeo:r,transformInfoRaw:d};"geoJSON"===l.resourceType?this._buildGeoJSON(f):"geoSVG"===l.resourceType&&this._buildSVG(f),this._updateController(e,t,n),this._updateMapSelectHandler(e,s,n,o)},e.prototype._buildGeoJSON=function(e){var t=this._regionsGroupByName=qs(),n=qs(),o=this._regionsGroup,i=e.transformInfoRaw,r=e.mapOrGeoModel,a=e.data,l=e.geo.projection,s=l&&l.stream;function u(e,t){return t&&(e=t(e)),e&&[e[0]*i.scaleX+i.x,e[1]*i.scaleY+i.y]}function c(e){for(var t=[],n=!s&&l&&l.project,o=0;o<e.length;++o){var i=u(e[o],n);i&&t.push(i)}return t}function d(e){return{shape:{points:c(e)}}}o.removeAll(),ys(e.geo.regions,function(i){var c=i.name,h=t.get(c),p=n.get(c)||{},f=p.dataIdx,g=p.regionModel;if(!h){h=t.set(c,new lp),o.add(h),f=a?a.indexOfName(c):null;var v=(g=e.isGeo?r.getRegionModel(c):a?a.getItemModel(f):null).get("silent",!0);null!=v&&(h.silent=v),n.set(c,{dataIdx:f,regionModel:g})}var m=[],y=[];ys(i.geometries,function(e){if("polygon"===e.type){var t=[e.exterior].concat(e.interiors||[]);s&&(t=mO(t,s)),ys(t,function(e){m.push(new my(d(e)))})}else{var n=e.points;s&&(n=mO(n,s,!0)),ys(n,function(e){y.push(new xy(d(e)))})}});var x=u(i.getCenter(),l&&l.project);function _(t,n){if(t.length){var o=new Dy({culling:!0,segmentIgnoreThreshold:1,shape:{paths:t}});h.add(o),hO(e,o,f,g),pO(e,o,c,g,r,f,x),n&&(cO(o),ys(o.states,cO))}}_(m),_(y,!0)}),t.each(function(t,o){var i=n.get(o),a=i.dataIdx,l=i.regionModel;fO(e,t,o,l,r,a),gO(e,t,o,l,r),vO(e,t,o,l,r)},this)},e.prototype._buildSVG=function(e){var t=e.geo.map,n=e.transformInfoRaw;this._svgGroup.x=n.x,this._svgGroup.y=n.y,this._svgGroup.scaleX=n.scaleX,this._svgGroup.scaleY=n.scaleY,this._svgResourceChanged(t)&&(this._freeSVG(),this._useSVG(t));var o=this._svgDispatcherMap=qs(),i=!1;ys(this._svgGraphicRecord.named,function(t){var n=t.name,r=e.mapOrGeoModel,a=e.data,l=t.svgNodeTagLower,s=t.el,u=a?a.indexOfName(n):null,c=r.getRegionModel(n);null!=rO.get(l)&&s instanceof Qf&&hO(e,s,u,c),s instanceof Qf&&(s.culling=!0);var d=c.get("silent",!0);(null!=d&&(s.silent=d),s.z2EmphasisLift=0,t.namedFrom)||(null!=lO.get(l)&&pO(e,s,n,c,r,u,null),fO(e,s,n,c,r,u),gO(e,s,n,c,r),null!=aO.get(l)&&("self"===vO(e,s,n,c,r)&&(i=!0),(o.get(n)||o.set(n,[])).push(s)))},this),this._enableBlurEntireSVG(i,e)},e.prototype._enableBlurEntireSVG=function(e,t){if(e&&t.isGeo){var n=t.mapOrGeoModel.getModel(["blur","itemStyle"]).getItemStyle().opacity;this._svgGraphicRecord.root.traverse(function(e){if(!e.isGroup){nm(e);var t=e.ensureState("blur").style||{};null==t.opacity&&null!=n&&(t.opacity=n),e.ensureState("emphasis")}})}},e.prototype.remove=function(){this._regionsGroup.removeAll(),this._regionsGroupByName=null,this._svgGroup.removeAll(),this._freeSVG(),this._controller.dispose(),this._controllerHost=null},e.prototype.findHighDownDispatchers=function(e,t){if(null==e)return[];var n=t.coordinateSystem;if("geoJSON"===n.resourceType){var o=this._regionsGroupByName;if(o){var i=o.get(e);return i?[i]:[]}}else if("geoSVG"===n.resourceType)return this._svgDispatcherMap&&this._svgDispatcherMap.get(e)||[]},e.prototype._svgResourceChanged=function(e){return this._svgMapName!==e},e.prototype._useSVG=function(e){var t=tO(e);if(t&&"geoSVG"===t.type){var n=t.useGraphic(this.uid);this._svgGroup.add(n.root),this._svgGraphicRecord=n,this._svgMapName=e}},e.prototype._freeSVG=function(){var e=this._svgMapName;if(null!=e){var t=tO(e);t&&"geoSVG"===t.type&&t.freeGraphic(this.uid),this._svgGraphicRecord=null,this._svgDispatcherMap=null,this._svgGroup.removeAll(),this._svgMapName=null}},e.prototype._updateController=function(e,t,n){var o=e.coordinateSystem,i=this._controller,r=this._controllerHost;r.zoomLimit=e.get("scaleLimit"),r.zoom=o.getZoom(),i.enable(e.get("roam")||!1);var a=e.mainType;function l(){var t={type:"geoRoam",componentType:a};return t[a+"Id"]=e.id,t}i.off("pan").on("pan",function(e){this._mouseDownFlag=!1,vV(r,e.dx,e.dy),n.dispatchAction(ps(l(),{dx:e.dx,dy:e.dy,animation:{duration:0}}))},this),i.off("zoom").on("zoom",function(e){this._mouseDownFlag=!1,mV(r,e.scale,e.originX,e.originY),n.dispatchAction(ps(l(),{totalZoom:r.zoom,zoom:e.scale,originX:e.originX,originY:e.originY,animation:{duration:0}}))},this),i.setPointerChecker(function(t,i,r){return o.containPoint([i,r])&&!_V(t,n,e)})},e.prototype.resetForLabelLayout=function(){this.group.traverse(function(e){var t=e.getTextContent();t&&(t.ignore=sO(t).ignore)})},e.prototype._updateMapSelectHandler=function(e,t,n,o){var i=this;t.off("mousedown"),t.off("click"),e.get("selectedMode")&&(t.on("mousedown",function(){i._mouseDownFlag=!0}),t.on("click",function(e){i._mouseDownFlag&&(i._mouseDownFlag=!1)}))},e}();function hO(e,t,n,o){var i=o.getModel("itemStyle"),r=o.getModel(["emphasis","itemStyle"]),a=o.getModel(["blur","itemStyle"]),l=o.getModel(["select","itemStyle"]),s=uO(i),u=uO(r),c=uO(l),d=uO(a),h=e.data;if(h){var p=h.getItemVisual(n,"style"),f=h.getItemVisual(n,"decal");e.isVisualEncodedByVisualMap&&p.fill&&(s.fill=p.fill),f&&(s.decal=YM(f,e.api))}t.setStyle(s),t.style.strokeNoScale=!0,t.ensureState("emphasis").style=u,t.ensureState("select").style=c,t.ensureState("blur").style=d,nm(t)}function pO(e,t,n,o,i,r,a){var l=e.data,s=e.isGeo,u=l&&isNaN(l.get(l.mapDimension("value"),r)),c=l&&l.getItemLayout(r);if(s||u||c&&c.showLabel){var d=s?n:r,h=void 0;(!l||r>=0)&&(h=i);var p=a?{normal:{align:"center",verticalAlign:"middle"}}:null;Ix(t,kx(o),{labelFetcher:h,labelDataIndex:d,defaultText:n},p);var f=t.getTextContent();if(f&&(sO(f).ignore=f.ignore,t.textConfig&&a)){var g=t.getBoundingRect().clone();t.textConfig.layoutRect=g,t.textConfig.position=[(a[0]-g.x)/g.width*100+"%",(a[1]-g.y)/g.height*100+"%"]}t.disableLabelAnimation=!0}else t.removeTextContent(),t.removeTextConfig(),t.disableLabelAnimation=null}function fO(e,t,n,o,i,r){e.data?e.data.setItemGraphicEl(r,t):Nv(t).eventData={componentType:"geo",componentIndex:i.componentIndex,geoIndex:i.componentIndex,name:n,region:o&&o.option||{}}}function gO(e,t,n,o,i){e.data||xx({el:t,componentModel:i,itemName:n,itemTooltipOption:o.get("tooltip")})}function vO(e,t,n,o,i){t.highDownSilentOnTouch=!!i.get("selectedMode");var r=o.getModel("emphasis"),a=r.get("focus");return xm(t,a,r.get("blurScope"),r.get("disabled")),e.isGeo&&function(e,t,n){var o=Nv(e);o.componentMainType=t.mainType,o.componentIndex=t.componentIndex,o.componentHighDownName=n}(t,i,n),a}function mO(e,t,n){var o,i=[];function r(){o=[]}function a(){o.length&&(i.push(o),o=[])}var l=t({polygonStart:r,polygonEnd:a,lineStart:r,lineEnd:a,point:function(e,t){isFinite(e)&&isFinite(t)&&o.push([e,t])},sphere:function(){}});return!n&&l.polygonStart(),ys(e,function(e){l.lineStart();for(var t=0;t<e.length;t++)l.point(e[t][0],e[t][1]);l.lineEnd()}),!n&&l.polygonEnd(),i}var yO=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.prototype.render=function(e,t,n,o){if(!o||"mapToggleSelect"!==o.type||o.from!==this.uid){var i=this.group;if(i.removeAll(),!e.getHostGeoModel()){if(this._mapDraw&&o&&"geoRoam"===o.type&&this._mapDraw.resetForLabelLayout(),o&&"geoRoam"===o.type&&"series"===o.componentType&&o.seriesId===e.id)(r=this._mapDraw)&&i.add(r.group);else if(e.needsDrawMap){var r=this._mapDraw||new dO(n);i.add(r.group),r.draw(e,t,n,this,o),this._mapDraw=r}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;e.get("showLegendSymbol")&&t.getComponent("legend")&&this._renderSymbols(e,t,n)}}},t.prototype.remove=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},t.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},t.prototype._renderSymbols=function(e,t,n){var o=e.originalData,i=this.group;o.each(o.mapDimension("value"),function(t,n){if(!isNaN(t)){var r=o.getItemLayout(n);if(r&&r.point){var a=r.point,l=r.offset,s=new $m({style:{fill:e.getData().getVisual("style").fill},shape:{cx:a[0]+9*l,cy:a[1],r:3},silent:!0,z2:8+(l?0:11)});if(!l){var u=e.mainSeries.getData(),c=o.getName(n),d=u.indexOfName(c),h=o.getItemModel(n),p=h.getModel("label"),f=u.getItemGraphicEl(d);Ix(s,kx(h),{labelFetcher:{getFormattedLabel:function(t,n){return e.getFormattedLabel(d,n)}},defaultText:c}),s.disableLabelAnimation=!0,p.get("position")||s.setTextConfig({position:"bottom"}),f.onHoverStateChange=function(e){em(s,e)}}i.add(s)}}})},t.type="map",t}(aC),xO=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.needsDrawMap=!1,n.seriesGroup=[],n.getTooltipPosition=function(e){if(null!=e){var t=this.getData().getName(e),n=this.coordinateSystem,o=n.getRegion(t);return o&&n.dataToPoint(o.getCenter())}},n}return Wl(t,e),t.prototype.getInitialData=function(e){for(var t=YA(this,{coordDimensions:["value"],encodeDefaulter:Cs(Cw,this)}),n=qs(),o=[],i=0,r=t.count();i<r;i++){var a=t.getName(i);n.set(a,i)}return ys(oO(this.getMapType(),this.option.nameMap,this.option.nameProperty).regions,function(e){var i,r=e.name,a=n.get(r),l=e.properties&&e.properties.echartsStyle;null==a?(i={name:r},o.push(i)):i=t.getRawDataItem(a),l&&ds(i,l)}),t.appendData(o),t},t.prototype.getHostGeoModel=function(){var e=this.option.geoIndex;return null!=e?this.ecModel.getComponent("geo",e):null},t.prototype.getMapType=function(){return(this.getHostGeoModel()||this).option.map},t.prototype.getRawValue=function(e){var t=this.getData();return t.get(t.mapDimension("value"),e)},t.prototype.getRegionModel=function(e){var t=this.getData();return t.getItemModel(t.indexOfName(e))},t.prototype.formatTooltip=function(e,t,n){for(var o=this.getData(),i=this.getRawValue(e),r=o.getName(e),a=this.seriesGroup,l=[],s=0;s<a.length;s++){var u=a[s].originalData.indexOfName(r),c=o.mapDimension("value");isNaN(a[s].originalData.get(c,u))||l.push(a[s].name)}return AS("section",{header:l.join(", "),noHeader:!l.length,blocks:[AS("nameValue",{name:r,value:i})]})},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.getLegendIcon=function(e){var t=e.icon||"roundRect",n=yM(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill);return n.setStyle(e.itemStyle),n.style.stroke="none",t.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2),n},t.type="series.map",t.dependencies=["geo"],t.layoutMode="box",t.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},t}(jS);function _O(e){var t={};e.eachSeriesByType("map",function(e){var n=e.getHostGeoModel(),o=n?"o"+n.id:"i"+e.getMapType();(t[o]=t[o]||[]).push(e)}),ys(t,function(e,t){for(var n,o,i,r=(n=xs(e,function(e){return e.getData()}),o=e[0].get("mapValueCalculation"),i={},ys(n,function(e){e.each(e.mapDimension("value"),function(t,n){var o="ec-"+e.getName(n);i[o]=i[o]||[],isNaN(t)||i[o].push(t)})}),n[0].map(n[0].mapDimension("value"),function(e,t){for(var r="ec-"+n[0].getName(t),a=0,l=1/0,s=-1/0,u=i[r].length,c=0;c<u;c++)l=Math.min(l,i[r][c]),s=Math.max(s,i[r][c]),a+=i[r][c];return 0===u?NaN:"min"===o?l:"max"===o?s:"average"===o?a/u:a})),a=0;a<e.length;a++)e[a].originalData=e[a].getData();for(a=0;a<e.length;a++)e[a].seriesGroup=e,e[a].needsDrawMap=0===a&&!e[a].getHostGeoModel(),e[a].setData(r.cloneShallow()),e[a].mainSeries=e[0]})}function wO(e){var t={};e.eachSeriesByType("map",function(n){var o=n.getMapType();if(!n.getHostGeoModel()&&!t[o]){var i={};ys(n.seriesGroup,function(t){var n=t.coordinateSystem,o=t.originalData;t.get("showLegendSymbol")&&e.getComponent("legend")&&o.each(o.mapDimension("value"),function(e,t){var r=o.getName(t),a=n.getRegion(r);if(a&&!isNaN(e)){var l=i[r]||0,s=n.dataToPoint(a.getCenter());i[r]=l+1,o.setItemLayout(t,{point:s,offset:l})}})});var r=n.getData();r.each(function(e){var t=r.getName(e),n=r.getItemLayout(e)||{};n.showLabel=!i[t],r.setItemLayout(e,n)}),t[o]=!0}})}var bO=mu,SO=function(e){function t(t){var n=e.call(this)||this;return n.type="view",n.dimensions=["x","y"],n._roamTransformable=new zh,n._rawTransformable=new zh,n.name=t,n}return Wl(t,e),t.prototype.setBoundingRect=function(e,t,n,o){return this._rect=new cc(e,t,n,o),this._rect},t.prototype.getBoundingRect=function(){return this._rect},t.prototype.setViewRect=function(e,t,n,o){this._transformTo(e,t,n,o),this._viewRect=new cc(e,t,n,o)},t.prototype._transformTo=function(e,t,n,o){var i=this.getBoundingRect(),r=this._rawTransformable;r.transform=i.calculateTransform(new cc(e,t,n,o));var a=r.parent;r.parent=null,r.decomposeTransform(),r.parent=a,this._updateTransform()},t.prototype.setCenter=function(e,t){e&&(this._center=[gp(e[0],t.getWidth()),gp(e[1],t.getHeight())],this._updateCenterAndZoom())},t.prototype.setZoom=function(e){e=e||1;var t=this.zoomLimit;t&&(null!=t.max&&(e=Math.min(t.max,e)),null!=t.min&&(e=Math.max(t.min,e))),this._zoom=e,this._updateCenterAndZoom()},t.prototype.getDefaultCenter=function(){var e=this.getBoundingRect();return[e.x+e.width/2,e.y+e.height/2]},t.prototype.getCenter=function(){return this._center||this.getDefaultCenter()},t.prototype.getZoom=function(){return this._zoom||1},t.prototype.getRoamTransform=function(){return this._roamTransformable.getLocalTransform()},t.prototype._updateCenterAndZoom=function(){var e=this._rawTransformable.getLocalTransform(),t=this._roamTransformable,n=this.getDefaultCenter(),o=this.getCenter(),i=this.getZoom();o=mu([],o,e),n=mu([],n,e),t.originX=o[0],t.originY=o[1],t.x=n[0]-o[0],t.y=n[1]-o[1],t.scaleX=t.scaleY=i,this._updateTransform()},t.prototype._updateTransform=function(){var e=this._roamTransformable,t=this._rawTransformable;t.parent=e,e.updateTransform(),t.updateTransform(),$u(this.transform||(this.transform=[]),t.transform||[1,0,0,1,0,0]),this._rawTransform=t.getLocalTransform(),this.invTransform=this.invTransform||[],ec(this.invTransform,this.transform),this.decomposeTransform()},t.prototype.getTransformInfo=function(){var e=this._rawTransformable,t=this._roamTransformable,n=new zh;return n.transform=t.transform,n.decomposeTransform(),{roam:{x:n.x,y:n.y,scaleX:n.scaleX,scaleY:n.scaleY},raw:{x:e.x,y:e.y,scaleX:e.scaleX,scaleY:e.scaleY}}},t.prototype.getViewRect=function(){return this._viewRect},t.prototype.getViewRectAfterRoam=function(){var e=this.getBoundingRect().clone();return e.applyTransform(this.transform),e},t.prototype.dataToPoint=function(e,t,n){var o=t?this._rawTransform:this.transform;return n=n||[],o?bO(n,e,o):iu(n,e)},t.prototype.pointToData=function(e){var t=this.invTransform;return t?bO([],e,t):[e[0],e[1]]},t.prototype.convertToPixel=function(e,t,n){var o=CO(t);return o===this?o.dataToPoint(n):null},t.prototype.convertFromPixel=function(e,t,n){var o=CO(t);return o===this?o.pointToData(n):null},t.prototype.containPoint=function(e){return this.getViewRectAfterRoam().contain(e[0],e[1])},t.dimensions=["x","y"],t}(zh);function CO(e){var t=e.seriesModel;return t?t.coordinateSystem:null}var MO={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},TO=["lng","lat"],IO=function(e){function t(t,n,o){var i=e.call(this,t)||this;i.dimensions=TO,i.type="geo",i._nameCoordMap=qs(),i.map=n;var r,a=o.projection,l=oO(n,o.nameMap,o.nameProperty),s=tO(n),u=i.resourceType=s?s.type:null,c=i.regions=l.regions,d=MO[s.type];if(i._regionsMap=l.regionsMap,i.regions=l.regions,"production"!==process.env.NODE_ENV&&a&&("geoSVG"===u&&("production"!==process.env.NODE_ENV&&zp("Map "+n+" with SVG source can't use projection. Only GeoJSON source supports projection."),a=null),a.project&&a.unproject||("production"!==process.env.NODE_ENV&&zp("project and unproject must be both provided in the projeciton."),a=null)),i.projection=a,a)for(var h=0;h<c.length;h++){var p=c[h].getBoundingRect(a);(r=r||p.clone()).union(p)}else r=l.boundingRect;return i.setBoundingRect(r.x,r.y,r.width,r.height),i.aspectScale=a?1:Rs(o.aspectScale,d.aspectScale),i._invertLongitute=!a&&d.invertLongitute,i}return Wl(t,e),t.prototype._transformTo=function(e,t,n,o){var i=this.getBoundingRect(),r=this._invertLongitute;i=i.clone(),r&&(i.y=-i.y-i.height);var a=this._rawTransformable;a.transform=i.calculateTransform(new cc(e,t,n,o));var l=a.parent;a.parent=null,a.decomposeTransform(),a.parent=l,r&&(a.scaleY=-a.scaleY),this._updateTransform()},t.prototype.getRegion=function(e){return this._regionsMap.get(e)},t.prototype.getRegionByCoord=function(e){for(var t=this.regions,n=0;n<t.length;n++){var o=t[n];if("geoJSON"===o.type&&o.contain(e))return t[n]}},t.prototype.addGeoCoord=function(e,t){this._nameCoordMap.set(e,t)},t.prototype.getGeoCoord=function(e){var t=this._regionsMap.get(e);return this._nameCoordMap.get(e)||t&&t.getCenter()},t.prototype.dataToPoint=function(e,t,n){if(Is(e)&&(e=this.getGeoCoord(e)),e){var o=this.projection;return o&&(e=o.project(e)),e&&this.projectedToPoint(e,t,n)}},t.prototype.pointToData=function(e){var t=this.projection;return t&&(e=t.unproject(e)),e&&this.pointToProjected(e)},t.prototype.pointToProjected=function(t){return e.prototype.pointToData.call(this,t)},t.prototype.projectedToPoint=function(t,n,o){return e.prototype.dataToPoint.call(this,t,n,o)},t.prototype.convertToPixel=function(e,t,n){var o=kO(t);return o===this?o.dataToPoint(n):null},t.prototype.convertFromPixel=function(e,t,n){var o=kO(t);return o===this?o.pointToData(n):null},t}(SO);function kO(e){var t=e.geoModel,n=e.seriesModel;return t?t.coordinateSystem:n?n.coordinateSystem||(n.getReferringComponents("geo",pf).models[0]||{}).coordinateSystem:null}function DO(e,t){var n=e.get("boundingCoords");if(null!=n){var o=n[0],i=n[1];if(isFinite(o[0])&&isFinite(o[1])&&isFinite(i[0])&&isFinite(i[1])){var r=this.projection;if(r){var a=o[0],l=o[1],s=i[0],u=i[1];o=[1/0,1/0],i=[-1/0,-1/0];var c=function(e,t,n,a){for(var l=n-e,s=a-t,u=0;u<=100;u++){var c=u/100,d=r.project([e+l*c,t+s*c]);yu(o,o,d),xu(i,i,d)}};c(a,l,s,l),c(s,l,s,u),c(s,u,a,u),c(a,u,s,l)}this.setBoundingRect(o[0],o[1],i[0]-o[0],i[1]-o[1])}else process.env.NODE_ENV}var d,h,p,f=this.getBoundingRect(),g=e.get("layoutCenter"),v=e.get("layoutSize"),m=t.getWidth(),y=t.getHeight(),x=f.width/f.height*this.aspectScale,_=!1;if(g&&v&&(d=[gp(g[0],m),gp(g[1],y)],h=gp(v,Math.min(m,y)),isNaN(d[0])||isNaN(d[1])||isNaN(h)?process.env.NODE_ENV:_=!0),_)p={},x>1?(p.width=h,p.height=h/x):(p.height=h,p.width=h*x),p.y=d[1]-p.height/2,p.x=d[0]-p.width/2;else{var w=e.getBoxLayoutParams();w.aspect=x,p=Q_(w,{width:m,height:y})}this.setViewRect(p.x,p.y,p.width,p.height),this.setCenter(e.get("center"),t),this.setZoom(e.get("zoom"))}vs(IO,SO);var NO=function(){function e(){this.dimensions=TO}return e.prototype.create=function(e,t){var n=[];function o(e){return{nameProperty:e.get("nameProperty"),aspectScale:e.get("aspectScale"),projection:e.get("projection")}}e.eachComponent("geo",function(e,i){var r=e.get("map"),a=new IO(r+i,r,ps({nameMap:e.get("nameMap")},o(e)));a.zoomLimit=e.get("scaleLimit"),n.push(a),e.coordinateSystem=a,a.model=e,a.resize=DO,a.resize(e,t)}),e.eachSeries(function(e){if("geo"===e.get("coordinateSystem")){var t=e.get("geoIndex")||0;e.coordinateSystem=n[t]}});var i={};return e.eachSeriesByType("map",function(e){if(!e.getHostGeoModel()){var t=e.getMapType();i[t]=i[t]||[],i[t].push(e)}}),ys(i,function(e,i){var r=xs(e,function(e){return e.get("nameMap")}),a=new IO(i,i,ps({nameMap:hs(r)},o(e[0])));a.zoomLimit=Bs.apply(null,xs(e,function(e){return e.get("scaleLimit")})),n.push(a),a.resize=DO,a.resize(e[0],t),ys(e,function(e){e.coordinateSystem=a,function(e,t){ys(t.get("geoCoord"),function(t,n){e.addGeoCoord(n,t)})}(a,e)})}),n},e.prototype.getFilledRegions=function(e,t,n,o){for(var i=(e||[]).slice(),r=qs(),a=0;a<i.length;a++)r.set(i[a].name,i[a]);return ys(oO(t,n,o).regions,function(e){var t=e.name,n=r.get(t),o=e.properties&&e.properties.echartsStyle;n||(n={name:t},i.push(n)),o&&ds(n,o)}),i},e}(),EO=new NO,AO=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.prototype.init=function(e,t,n){var o=tO(e.map);if(o&&"geoJSON"===o.type){var i=e.itemStyle=e.itemStyle||{};"color"in i||(i.color="#eee")}this.mergeDefaultAndTheme(e,n),$p(e,"label",["show"])},t.prototype.optionUpdated=function(){var e=this,t=this.option;t.regions=EO.getFilledRegions(t.regions,t.map,t.nameMap,t.nameProperty);var n={};this._optionModelMap=_s(t.regions||[],function(t,o){var i=o.name;return i&&(t.set(i,new Kx(o,e,e.ecModel)),o.selected&&(n[i]=!0)),t},qs()),t.selectedMap||(t.selectedMap=n)},t.prototype.getRegionModel=function(e){return this._optionModelMap.get(e)||new Kx(null,this,this.ecModel)},t.prototype.getFormattedLabel=function(e,t){var n=this.getRegionModel(e),o="normal"===t?n.get(["label","formatter"]):n.get(["emphasis","label","formatter"]),i={name:e};return Ts(o)?(i.status=t,o(i)):Is(o)?o.replace("{a}",null!=e?e:""):void 0},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.select=function(e){var t=this.option,n=t.selectedMode;n&&("multiple"!==n&&(t.selectedMap=null),(t.selectedMap||(t.selectedMap={}))[e]=!0)},t.prototype.unSelect=function(e){var t=this.option.selectedMap;t&&(t[e]=!1)},t.prototype.toggleSelected=function(e){this[this.isSelected(e)?"unSelect":"select"](e)},t.prototype.isSelected=function(e){var t=this.option.selectedMap;return!(!t||!t[e])},t.type="geo",t.layoutMode="box",t.defaultOption={z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},t}(aw);function LO(e,t){return e.pointToProjected?e.pointToProjected(t):e.pointToData(t)}function VO(e,t,n,o){var i=e.getZoom(),r=e.getCenter(),a=t.zoom,l=e.projectedToPoint?e.projectedToPoint(r):e.dataToPoint(r);if(null!=t.dx&&null!=t.dy&&(l[0]-=t.dx,l[1]-=t.dy,e.setCenter(LO(e,l),o)),null!=a){if(n){var s=n.min||0,u=n.max||1/0;a=Math.max(Math.min(i*a,u),s)/i}e.scaleX*=a,e.scaleY*=a;var c=(t.originX-e.x)*(a-1),d=(t.originY-e.y)*(a-1);e.x-=c,e.y-=d,e.updateTransform(),e.setCenter(LO(e,l),o),e.setZoom(a*i)}return{center:e.getCenter(),zoom:e.getZoom()}}var OO=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.focusBlurEnabled=!0,n}return Wl(t,e),t.prototype.init=function(e,t){this._api=t},t.prototype.render=function(e,t,n,o){if(this._model=e,!e.get("show"))return this._mapDraw&&this._mapDraw.remove(),void(this._mapDraw=null);this._mapDraw||(this._mapDraw=new dO(n));var i=this._mapDraw;i.draw(e,t,n,this,o),i.group.on("click",this._handleRegionClick,this),i.group.silent=e.get("silent"),this.group.add(i.group),this.updateSelectStatus(e,t,n)},t.prototype._handleRegionClick=function(e){var t;aM(e.target,function(e){return null!=(t=Nv(e).eventData)},!0),t&&this._api.dispatchAction({type:"geoToggleSelect",geoId:this._model.id,name:t.name})},t.prototype.updateSelectStatus=function(e,t,n){var o=this;this._mapDraw.group.traverse(function(e){var t=Nv(e).eventData;if(t)return o._model.isSelected(t.name)?n.enterSelect(e):n.leaveSelect(e),!0})},t.prototype.findHighDownDispatchers=function(e){return this._mapDraw&&this._mapDraw.findHighDownDispatchers(e,this._model)},t.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove()},t.type="geo",t}(nC);function PO(e,t,n){eO(e,t,n)}function BO(e){function t(t,n){n.update="geo:updateSelectStatus",e.registerAction(n,function(e,n){var o={},i=[];return n.eachComponent({mainType:"geo",query:e},function(n){n[t](e.name),ys(n.coordinateSystem.regions,function(e){o[e.name]=n.isSelected(e.name)||!1});var r=[];ys(o,function(e,t){o[t]&&r.push(t)}),i.push({geoIndex:n.componentIndex,name:r})}),{selected:o,allSelected:i,name:e.name}})}e.registerCoordinateSystem("geo",EO),e.registerComponentModel(AO),e.registerComponentView(OO),e.registerImpl("registerMap",PO),e.registerImpl("getMap",function(e){return nO(e)}),t("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),t("select",{type:"geoSelect",event:"geoselected"}),t("unSelect",{type:"geoUnSelect",event:"geounselected"}),e.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(e,t,n){var o=e.componentType||"series";t.eachComponent({mainType:o,query:e},function(t){var i=t.coordinateSystem;if("geo"===i.type){var r=VO(i,e,t.get("scaleLimit"),n);t.setCenter&&t.setCenter(r.center),t.setZoom&&t.setZoom(r.zoom),"series"===o&&ys(t.seriesGroup,function(e){e.setCenter(r.center),e.setZoom(r.zoom)})}})})}function RO(e,t){var n=e.isExpand?e.children:[],o=e.parentNode.children,i=e.hierNode.i?o[e.hierNode.i-1]:null;if(n.length){!function(e){var t=e.children,n=t.length,o=0,i=0;for(;--n>=0;){var r=t[n];r.hierNode.prelim+=o,r.hierNode.modifier+=o,i+=r.hierNode.change,o+=r.hierNode.shift+i}}(e);var r=(n[0].hierNode.prelim+n[n.length-1].hierNode.prelim)/2;i?(e.hierNode.prelim=i.hierNode.prelim+t(e,i),e.hierNode.modifier=e.hierNode.prelim-r):e.hierNode.prelim=r}else i&&(e.hierNode.prelim=i.hierNode.prelim+t(e,i));e.parentNode.hierNode.defaultAncestor=function(e,t,n,o){if(t){for(var i=e,r=e,a=r.parentNode.children[0],l=t,s=i.hierNode.modifier,u=r.hierNode.modifier,c=a.hierNode.modifier,d=l.hierNode.modifier;l=HO(l),r=WO(r),l&&r;){i=HO(i),a=WO(a),i.hierNode.ancestor=e;var h=l.hierNode.prelim+d-r.hierNode.prelim-u+o(l,r);h>0&&(YO(UO(l,e,n),e,h),u+=h,s+=h),d+=l.hierNode.modifier,u+=r.hierNode.modifier,s+=i.hierNode.modifier,c+=a.hierNode.modifier}l&&!HO(i)&&(i.hierNode.thread=l,i.hierNode.modifier+=d-s),r&&!WO(a)&&(a.hierNode.thread=r,a.hierNode.modifier+=u-c,n=e)}return n}(e,i,e.parentNode.hierNode.defaultAncestor||o[0],t)}function zO(e){var t=e.hierNode.prelim+e.parentNode.hierNode.modifier;e.setLayout({x:t},!0),e.hierNode.modifier+=e.parentNode.hierNode.modifier}function FO(e){return arguments.length?e:ZO}function GO(e,t){return e-=Math.PI/2,{x:t*Math.cos(e),y:t*Math.sin(e)}}function HO(e){var t=e.children;return t.length&&e.isExpand?t[t.length-1]:e.hierNode.thread}function WO(e){var t=e.children;return t.length&&e.isExpand?t[0]:e.hierNode.thread}function UO(e,t,n){return e.hierNode.ancestor.parentNode===t.parentNode?e.hierNode.ancestor:n}function YO(e,t,n){var o=n/(t.hierNode.i-e.hierNode.i);t.hierNode.change-=o,t.hierNode.shift+=n,t.hierNode.modifier+=n,t.hierNode.prelim+=n,e.hierNode.change+=o}function ZO(e,t){return e.parentNode===t.parentNode?1:2}var XO=function(){return function(){this.parentPoint=[],this.childPoints=[]}}(),jO=function(e){function t(t){return e.call(this,t)||this}return Wl(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new XO},t.prototype.buildPath=function(e,t){var n=t.childPoints,o=n.length,i=t.parentPoint,r=n[0],a=n[o-1];if(1===o)return e.moveTo(i[0],i[1]),void e.lineTo(r[0],r[1]);var l=t.orient,s="TB"===l||"BT"===l?0:1,u=1-s,c=gp(t.forkPosition,1),d=[];d[s]=i[s],d[u]=i[u]+(a[u]-i[u])*c,e.moveTo(i[0],i[1]),e.lineTo(d[0],d[1]),e.moveTo(r[0],r[1]),d[s]=r[s],e.lineTo(d[0],d[1]),d[s]=a[s],e.lineTo(d[0],d[1]),e.lineTo(a[0],a[1]);for(var h=1;h<o-1;h++){var p=n[h];e.moveTo(p[0],p[1]),d[s]=p[s],e.lineTo(d[0],d[1])}},t}(nv),$O=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._mainGroup=new lp,n}return Wl(t,e),t.prototype.init=function(e,t){this._controller=new hV(t.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},t.prototype.render=function(e,t,n){var o=e.getData(),i=e.layoutInfo,r=this._mainGroup;"radial"===e.get("layout")?(r.x=i.x+i.width/2,r.y=i.y+i.height/2):(r.x=i.x,r.y=i.y),this._updateViewCoordSys(e,n),this._updateController(e,t,n);var a=this._data;o.diff(a).add(function(t){qO(o,t)&&KO(o,t,null,r,e)}).update(function(t,n){var i=a.getItemGraphicEl(n);qO(o,t)?KO(o,t,i,r,e):i&&eP(a,n,i,r,e)}).remove(function(t){var n=a.getItemGraphicEl(t);n&&eP(a,t,n,r,e)}).execute(),this._nodeScaleRatio=e.get("nodeScaleRatio"),this._updateNodeAndLinkScale(e),!0===e.get("expandAndCollapse")&&o.eachItemGraphicEl(function(t,o){t.off("click").on("click",function(){n.dispatchAction({type:"treeExpandAndCollapse",seriesId:e.id,dataIndex:o})})}),this._data=o},t.prototype._updateViewCoordSys=function(e,t){var n=e.getData(),o=[];n.each(function(e){var t=n.getItemLayout(e);!t||isNaN(t.x)||isNaN(t.y)||o.push([+t.x,+t.y])});var i=[],r=[];cg(o,i,r);var a=this._min,l=this._max;r[0]-i[0]===0&&(i[0]=a?a[0]:i[0]-1,r[0]=l?l[0]:r[0]+1),r[1]-i[1]===0&&(i[1]=a?a[1]:i[1]-1,r[1]=l?l[1]:r[1]+1);var s=e.coordinateSystem=new SO;s.zoomLimit=e.get("scaleLimit"),s.setBoundingRect(i[0],i[1],r[0]-i[0],r[1]-i[1]),s.setCenter(e.get("center"),t),s.setZoom(e.get("zoom")),this.group.attr({x:s.x,y:s.y,scaleX:s.scaleX,scaleY:s.scaleY}),this._min=i,this._max=r},t.prototype._updateController=function(e,t,n){var o=this,i=this._controller,r=this._controllerHost,a=this.group;i.setPointerChecker(function(t,o,i){var r=a.getBoundingRect();return r.applyTransform(a.transform),r.contain(o,i)&&!_V(t,n,e)}),i.enable(e.get("roam")),r.zoomLimit=e.get("scaleLimit"),r.zoom=e.coordinateSystem.getZoom(),i.off("pan").off("zoom").on("pan",function(t){vV(r,t.dx,t.dy),n.dispatchAction({seriesId:e.id,type:"treeRoam",dx:t.dx,dy:t.dy})}).on("zoom",function(t){mV(r,t.scale,t.originX,t.originY),n.dispatchAction({seriesId:e.id,type:"treeRoam",zoom:t.scale,originX:t.originX,originY:t.originY}),o._updateNodeAndLinkScale(e),n.updateLabelLayout()})},t.prototype._updateNodeAndLinkScale=function(e){var t=e.getData(),n=this._getNodeGlobalScale(e);t.eachItemGraphicEl(function(e,t){e.setSymbolScale(n)})},t.prototype._getNodeGlobalScale=function(e){var t=e.coordinateSystem;if("view"!==t.type)return 1;var n=this._nodeScaleRatio,o=t.scaleX||1;return((t.getZoom()-1)*n+1)/o},t.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype.remove=function(){this._mainGroup.removeAll(),this._data=null},t.type="tree",t}(aC);function qO(e,t){var n=e.getItemLayout(t);return n&&!isNaN(n.x)&&!isNaN(n.y)}function KO(e,t,n,o,i){var r=!n,a=e.tree.getNodeByDataIndex(t),l=a.getModel(),s=a.getVisual("style").fill,u=!1===a.isExpand&&0!==a.children.length?s:"#fff",c=e.tree.root,d=a.parentNode===c?a:a.parentNode||a,h=e.getItemGraphicEl(d.dataIndex),p=d.getLayout(),f=h?{x:h.__oldX,y:h.__oldY,rawX:h.__radialOldRawX,rawY:h.__radialOldRawY}:p,g=a.getLayout();r?((n=new CE(e,t,null,{symbolInnerColor:u,useNameLabel:!0})).x=f.x,n.y=f.y):n.updateData(e,t,null,{symbolInnerColor:u,useNameLabel:!0}),n.__radialOldRawX=n.__radialRawX,n.__radialOldRawY=n.__radialRawY,n.__radialRawX=g.rawX,n.__radialRawY=g.rawY,o.add(n),e.setItemGraphicEl(t,n),n.__oldX=n.x,n.__oldY=n.y,Wy(n,{x:g.x,y:g.y},i);var v=n.getSymbolPath();if("radial"===i.get("layout")){var m=c.children[0],y=m.getLayout(),x=m.children.length,_=void 0,w=void 0;if(g.x===y.x&&!0===a.isExpand&&m.children.length){var b={x:(m.children[0].getLayout().x+m.children[x-1].getLayout().x)/2,y:(m.children[0].getLayout().y+m.children[x-1].getLayout().y)/2};(_=Math.atan2(b.y-y.y,b.x-y.x))<0&&(_=2*Math.PI+_),(w=b.x<y.x)&&(_-=Math.PI)}else(_=Math.atan2(g.y-y.y,g.x-y.x))<0&&(_=2*Math.PI+_),0===a.children.length||0!==a.children.length&&!1===a.isExpand?(w=g.x<y.x)&&(_-=Math.PI):(w=g.x>y.x)||(_-=Math.PI);var S=w?"left":"right",C=l.getModel("label"),M=C.get("rotate"),T=M*(Math.PI/180),I=v.getTextContent();I&&(v.setTextConfig({position:C.get("position")||S,rotation:null==M?-_:T,origin:"center"}),I.setStyle("verticalAlign","middle"))}var k=l.get(["emphasis","focus"]),D="relative"===k?Ks(a.getAncestorsIndices(),a.getDescendantIndices()):"ancestor"===k?a.getAncestorsIndices():"descendant"===k?a.getDescendantIndices():null;D&&(Nv(n).focus=D),function(e,t,n,o,i,r,a,l){var s=t.getModel(),u=e.get("edgeShape"),c=e.get("layout"),d=e.getOrient(),h=e.get(["lineStyle","curveness"]),p=e.get("edgeForkPosition"),f=s.getModel("lineStyle").getLineStyle(),g=o.__edge;if("curve"===u)t.parentNode&&t.parentNode!==n&&(g||(g=o.__edge=new Ty({shape:tP(c,d,h,i,i)})),Wy(g,{shape:tP(c,d,h,r,a)},e));else if("polyline"===u)if("orthogonal"===c){if(t!==n&&t.children&&0!==t.children.length&&!0===t.isExpand){for(var v=t.children,m=[],y=0;y<v.length;y++){var x=v[y].getLayout();m.push([x.x,x.y])}g||(g=o.__edge=new jO({shape:{parentPoint:[a.x,a.y],childPoints:[[a.x,a.y]],orient:d,forkPosition:p}})),Wy(g,{shape:{parentPoint:[a.x,a.y],childPoints:m}},e)}}else if("production"!==process.env.NODE_ENV)throw new Error("The polyline edgeShape can only be used in orthogonal layout");g&&("polyline"!==u||t.isExpand)&&(g.useStyle(fs({strokeNoScale:!0,fill:null},f)),Sm(g,s,"lineStyle"),nm(g),l.add(g))}(i,a,c,n,f,p,g,o),n.__edge&&(n.onHoverStateChange=function(t){if("blur"!==t){var o=a.parentNode&&e.getItemGraphicEl(a.parentNode.dataIndex);o&&1===o.hoverState||em(n.__edge,t)}})}function JO(e,t,n,o,i){var r=QO(t.tree.root,e),a=r.source,l=r.sourceLayout,s=t.getItemGraphicEl(e.dataIndex);if(s){var u=t.getItemGraphicEl(a.dataIndex).__edge,c=s.__edge||(!1===a.isExpand||1===a.children.length?u:void 0),d=o.get("edgeShape"),h=o.get("layout"),p=o.get("orient"),f=o.get(["lineStyle","curveness"]);c&&("curve"===d?Zy(c,{shape:tP(h,p,f,l,l),style:{opacity:0}},o,{cb:function(){n.remove(c)},removeOpt:i}):"polyline"===d&&"orthogonal"===o.get("layout")&&Zy(c,{shape:{parentPoint:[l.x,l.y],childPoints:[[l.x,l.y]]},style:{opacity:0}},o,{cb:function(){n.remove(c)},removeOpt:i}))}}function QO(e,t){for(var n,o=t.parentNode===e?t:t.parentNode||t;null==(n=o.getLayout());)o=o.parentNode===e?o:o.parentNode||o;return{source:o,sourceLayout:n}}function eP(e,t,n,o,i){var r=e.tree.getNodeByDataIndex(t),a=QO(e.tree.root,r).sourceLayout,l={duration:i.get("animationDurationUpdate"),easing:i.get("animationEasingUpdate")};Zy(n,{x:a.x+1,y:a.y+1},i,{cb:function(){o.remove(n),e.setItemGraphicEl(t,null)},removeOpt:l}),n.fadeOut(null,e.hostModel,{fadeLabel:!0,animation:l}),r.children.forEach(function(t){JO(t,e,o,i,l)}),JO(r,e,o,i,l)}function tP(e,t,n,o,i){var r,a,l,s,u,c,d,h;if("radial"===e){u=o.rawX,d=o.rawY,c=i.rawX,h=i.rawY;var p=GO(u,d),f=GO(u,d+(h-d)*n),g=GO(c,h+(d-h)*n),v=GO(c,h);return{x1:p.x||0,y1:p.y||0,x2:v.x||0,y2:v.y||0,cpx1:f.x||0,cpy1:f.y||0,cpx2:g.x||0,cpy2:g.y||0}}return u=o.x,d=o.y,c=i.x,h=i.y,"LR"!==t&&"RL"!==t||(r=u+(c-u)*n,a=d,l=c+(u-c)*n,s=h),"TB"!==t&&"BT"!==t||(r=u,a=d+(h-d)*n,l=c,s=h+(d-h)*n),{x1:u,y1:d,x2:c,y2:h,cpx1:r,cpy1:a,cpx2:l,cpy2:s}}var nP=uf();function oP(e){var t=e.mainData,n=e.datas;n||(n={main:t},e.datasAttr={main:"data"}),e.datas=e.mainData=null,uP(t,n,e),ys(n,function(n){ys(t.TRANSFERABLE_METHODS,function(t){n.wrapMethod(t,Cs(iP,e))})}),t.wrapMethod("cloneShallow",Cs(aP,e)),ys(t.CHANGABLE_METHODS,function(n){t.wrapMethod(n,Cs(rP,e))}),Hs(n[t.dataType]===t)}function iP(e,t){if(nP(o=this).mainData===o){var n=ps({},nP(this).datas);n[this.dataType]=t,uP(t,n,e)}else cP(t,this.dataType,nP(this).mainData,e);var o;return t}function rP(e,t){return e.struct&&e.struct.update(),t}function aP(e,t){return ys(nP(t).datas,function(n,o){n!==t&&cP(n.cloneShallow(),o,t,e)}),t}function lP(e){var t=nP(this).mainData;return null==e||null==t?t:nP(t).datas[e]}function sP(){var e=nP(this).mainData;return null==e?[{data:e}]:xs(bs(nP(e).datas),function(t){return{type:t,data:nP(e).datas[t]}})}function uP(e,t,n){nP(e).datas={},ys(t,function(t,o){cP(t,o,e,n)})}function cP(e,t,n,o){nP(n).datas[t]=e,nP(e).mainData=n,e.dataType=t,o.struct&&(e[o.structAttr]=o.struct,o.struct[o.datasAttr[t]]=e),e.getLinkedData=lP,e.getLinkedDataAll=sP}var dP=function(){function e(e,t){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=e||"",this.hostTree=t}return e.prototype.isRemoved=function(){return this.dataIndex<0},e.prototype.eachNode=function(e,t,n){Ts(e)&&(n=t,t=e,e=null),Is(e=e||{})&&(e={order:e});var o,i=e.order||"preorder",r=this[e.attr||"children"];"preorder"===i&&(o=t.call(n,this));for(var a=0;!o&&a<r.length;a++)r[a].eachNode(e,t,n);"postorder"===i&&t.call(n,this)},e.prototype.updateDepthAndHeight=function(e){var t=0;this.depth=e;for(var n=0;n<this.children.length;n++){var o=this.children[n];o.updateDepthAndHeight(e+1),o.height>t&&(t=o.height)}this.height=t+1},e.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,n=this.children,o=n.length;t<o;t++){var i=n[t].getNodeById(e);if(i)return i}},e.prototype.contains=function(e){if(e===this)return!0;for(var t=0,n=this.children,o=n.length;t<o;t++){var i=n[t].contains(e);if(i)return i}},e.prototype.getAncestors=function(e){for(var t=[],n=e?this:this.parentNode;n;)t.push(n),n=n.parentNode;return t.reverse(),t},e.prototype.getAncestorsIndices=function(){for(var e=[],t=this;t;)e.push(t.dataIndex),t=t.parentNode;return e.reverse(),e},e.prototype.getDescendantIndices=function(){var e=[];return this.eachNode(function(t){e.push(t.dataIndex)}),e},e.prototype.getValue=function(e){var t=this.hostTree.data;return t.getStore().get(t.getDimensionIndex(e||"value"),this.dataIndex)},e.prototype.setLayout=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},e.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(e)},e.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},e.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},e.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},e.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},e.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},e.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t<e.length;++t)if(e[t]===this)return t;return-1}return-1},e.prototype.isAncestorOf=function(e){for(var t=e.parentNode;t;){if(t===this)return!0;t=t.parentNode}return!1},e.prototype.isDescendantOf=function(e){return e!==this&&e.isAncestorOf(this)},e}(),hP=function(){function e(e){this.type="tree",this._nodes=[],this.hostModel=e}return e.prototype.eachNode=function(e,t,n){this.root.eachNode(e,t,n)},e.prototype.getNodeByDataIndex=function(e){var t=this.data.getRawIndex(e);return this._nodes[t]},e.prototype.getNodeById=function(e){return this.root.getNodeById(e)},e.prototype.update=function(){for(var e=this.data,t=this._nodes,n=0,o=t.length;n<o;n++)t[n].dataIndex=-1;for(n=0,o=e.count();n<o;n++)t[e.getRawIndex(n)].dataIndex=n},e.prototype.clearLayouts=function(){this.data.clearItemLayouts()},e.createTree=function(t,n,o){var i=new e(n),r=[],a=1;!function e(t,n){var o=t.value;a=Math.max(a,Ms(o)?o.length:1),r.push(t);var l=new dP(nf(t.name,""),i);n?function(e,t){var n=t.children;if(e.parentNode===t)return;n.push(e),e.parentNode=t}(l,n):i.root=l,i._nodes.push(l);var s=t.children;if(s)for(var u=0;u<s.length;u++)e(s[u],l)}(t),i.root.updateDepthAndHeight(0);var l=NI(r,{coordDimensions:["value"],dimensionsCount:a}).dimensions,s=new DI(l,n);return s.initData(r),o&&o(s),oP({mainData:s,struct:i,structAttr:"tree"}),i.update(),i},e}();function pP(e,t,n){if(e&&gs(t,e.type)>=0){var o=n.getData().tree.root,i=e.targetNode;if(Is(i)&&(i=o.getNodeById(i)),i&&o.contains(i))return{node:i};var r=e.targetNodeId;if(null!=r&&(i=o.getNodeById(r)))return{node:i}}}function fP(e){for(var t=[];e;)(e=e.parentNode)&&t.push(e);return t.reverse()}function gP(e,t){return gs(fP(e),t)>=0}function vP(e,t){for(var n=[];e;){var o=e.dataIndex;n.push({name:e.name,dataIndex:o,value:t.getRawValue(o)}),e=e.parentNode}return n.reverse(),n}var mP=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}return Wl(t,e),t.prototype.getInitialData=function(e){var t={name:e.name,children:e.data},n=e.leaves||{},o=new Kx(n,this,this.ecModel),i=hP.createTree(t,this,function(e){e.wrapMethod("getItemModel",function(e,t){var n=i.getNodeByDataIndex(t);return n&&n.children.length&&n.isExpand||(e.parentModel=o),e})});var r=0;i.eachNode("preorder",function(e){e.depth>r&&(r=e.depth)});var a=e.expandAndCollapse&&e.initialTreeDepth>=0?e.initialTreeDepth:r;return i.root.eachNode("preorder",function(e){var t=e.hostTree.data.getRawDataItem(e.dataIndex);e.isExpand=t&&null!=t.collapsed?!t.collapsed:e.depth<=a}),i.data},t.prototype.getOrient=function(){var e=this.get("orient");return"horizontal"===e?e="LR":"vertical"===e&&(e="TB"),e},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.formatTooltip=function(e,t,n){for(var o=this.getData().tree,i=o.root.children[0],r=o.getNodeByDataIndex(e),a=r.getValue(),l=r.name;r&&r!==i;)l=r.parentNode.name+"."+l,r=r.parentNode;return AS("nameValue",{name:l,value:a,noValue:isNaN(a)||null==a})},t.prototype.getDataParams=function(t){var n=e.prototype.getDataParams.apply(this,arguments),o=this.getData().tree.getNodeByDataIndex(t);return n.treeAncestors=vP(o,this),n.collapsed=!o.isExpand,n},t.type="series.tree",t.layoutMode="box",t.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},t}(jS);function yP(e,t){for(var n,o=[e];n=o.pop();)if(t(n),n.isExpand){var i=n.children;if(i.length)for(var r=i.length-1;r>=0;r--)o.push(i[r])}}function xP(e,t){e.eachSeriesByType("tree",function(e){!function(e,t){var n=function(e,t){return Q_(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}(e,t);e.layoutInfo=n;var o=e.get("layout"),i=0,r=0,a=null;"radial"===o?(i=2*Math.PI,r=Math.min(n.height,n.width)/2,a=FO(function(e,t){return(e.parentNode===t.parentNode?1:2)/e.depth})):(i=n.width,r=n.height,a=FO());var l=e.getData().tree.root,s=l.children[0];if(s){!function(e){var t=e;t.hierNode={defaultAncestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var n,o,i=[t];n=i.pop();)if(o=n.children,n.isExpand&&o.length)for(var r=o.length-1;r>=0;r--){var a=o[r];a.hierNode={defaultAncestor:null,ancestor:a,prelim:0,modifier:0,change:0,shift:0,i:r,thread:null},i.push(a)}}(l),function(e,t,n){for(var o,i=[e],r=[];o=i.pop();)if(r.push(o),o.isExpand){var a=o.children;if(a.length)for(var l=0;l<a.length;l++)i.push(a[l])}for(;o=r.pop();)t(o,n)}(s,RO,a),l.hierNode.modifier=-s.hierNode.prelim,yP(s,zO);var u=s,c=s,d=s;yP(s,function(e){var t=e.getLayout().x;t<u.getLayout().x&&(u=e),t>c.getLayout().x&&(c=e),e.depth>d.depth&&(d=e)});var h=u===c?1:a(u,c)/2,p=h-u.getLayout().x,f=0,g=0,v=0,m=0;if("radial"===o)f=i/(c.getLayout().x+h+p),g=r/(d.depth-1||1),yP(s,function(e){v=(e.getLayout().x+p)*f,m=(e.depth-1)*g;var t=GO(v,m);e.setLayout({x:t.x,y:t.y,rawX:v,rawY:m},!0)});else{var y=e.getOrient();"RL"===y||"LR"===y?(g=r/(c.getLayout().x+h+p),f=i/(d.depth-1||1),yP(s,function(e){m=(e.getLayout().x+p)*g,v="LR"===y?(e.depth-1)*f:i-(e.depth-1)*f,e.setLayout({x:v,y:m},!0)})):"TB"!==y&&"BT"!==y||(f=i/(c.getLayout().x+h+p),g=r/(d.depth-1||1),yP(s,function(e){v=(e.getLayout().x+p)*f,m="TB"===y?(e.depth-1)*g:r-(e.depth-1)*g,e.setLayout({x:v,y:m},!0)}))}}}(e,t)})}function _P(e){e.eachSeriesByType("tree",function(e){var t=e.getData();t.tree.eachNode(function(e){var n=e.getModel().getModel("itemStyle").getItemStyle();ps(t.ensureUniqueItemVisual(e.dataIndex,"style"),n)})})}var wP=["treemapZoomToNode","treemapRender","treemapMove"];function bP(e){var t=e.getData().tree,n={};t.eachNode(function(t){for(var o=t;o&&o.depth>1;)o=o.parentNode;var i=Ow(e.ecModel,o.name||o.dataIndex+"",n);t.setVisual("decal",i)})}var SP=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.preventUsingHoverLayer=!0,n}return Wl(t,e),t.prototype.getInitialData=function(e,t){var n={name:e.name,children:e.data};CP(n);var o=e.levels||[],i=this.designatedVisualItemStyle={},r=new Kx({itemStyle:i},this,t);o=e.levels=function(e,t){var n,o,i=jp(t.get("color")),r=jp(t.get(["aria","decal","decals"]));if(!i)return;e=e||[],ys(e,function(e){var t=new Kx(e),i=t.get("color"),r=t.get("decal");(t.get(["itemStyle","color"])||i&&"none"!==i)&&(n=!0),(t.get(["itemStyle","decal"])||r&&"none"!==r)&&(o=!0)});var a=e[0]||(e[0]={});n||(a.color=i.slice());!o&&r&&(a.decal=r.slice());return e}(o,t);var a=xs(o||[],function(e){return new Kx(e,r,t)},this),l=hP.createTree(n,this,function(e){e.wrapMethod("getItemModel",function(e,t){var n=l.getNodeByDataIndex(t),o=n?a[n.depth]:null;return e.parentModel=o||r,e})});return l.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.formatTooltip=function(e,t,n){var o=this.getData(),i=this.getRawValue(e);return AS("nameValue",{name:o.getName(e),value:i})},t.prototype.getDataParams=function(t){var n=e.prototype.getDataParams.apply(this,arguments),o=this.getData().tree.getNodeByDataIndex(t);return n.treeAncestors=vP(o,this),n.treePathInfo=n.treeAncestors,n},t.prototype.setLayoutInfo=function(e){this.layoutInfo=this.layoutInfo||{},ps(this.layoutInfo,e)},t.prototype.mapIdToIndex=function(e){var t=this._idIndexMap;t||(t=this._idIndexMap=qs(),this._idIndexMapCount=0);var n=t.get(e);return null==n&&t.set(e,n=this._idIndexMapCount++),n},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var t=this.getRawData().tree.root;e&&(e===t||t.contains(e))||(this._viewRoot=t)},t.prototype.enableAriaDecal=function(){bP(this)},t.type="series.treemap",t.layoutMode="box",t.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,scaleLimit:null,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},t}(jS);function CP(e){var t=0;ys(e.children,function(e){CP(e);var n=e.value;Ms(n)&&(n=n[0]),t+=n});var n=e.value;Ms(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=t),n<0&&(n=0),Ms(e.value)?e.value[0]=n:e.value=n}var MP=function(){function e(e){this.group=new lp,e.add(this.group)}return e.prototype.render=function(e,t,n,o){var i=e.getModel("breadcrumb"),r=this.group;if(r.removeAll(),i.get("show")&&n){var a=i.getModel("itemStyle"),l=i.getModel("emphasis"),s=a.getModel("textStyle"),u=l.getModel(["itemStyle","textStyle"]),c={pos:{left:i.get("left"),right:i.get("right"),top:i.get("top"),bottom:i.get("bottom")},box:{width:t.getWidth(),height:t.getHeight()},emptyItemWidth:i.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(n,c,s),this._renderContent(e,c,a,l,s,u,o),ew(r,c.pos,c.box)}},e.prototype._prepare=function(e,t,n){for(var o=e;o;o=o.parentNode){var i=nf(o.getModel().get("name"),""),r=n.getTextRect(i),a=Math.max(r.width+16,t.emptyItemWidth);t.totalWidth+=a+8,t.renderList.push({node:o,text:i,width:a})}},e.prototype._renderContent=function(e,t,n,o,i,r,a){for(var l,s,u,c,d,h,p,f,g,v=0,m=t.emptyItemWidth,y=e.get(["breadcrumb","height"]),x=(l=t.pos,s=t.box,c=s.width,d=s.height,h=gp(l.left,c),p=gp(l.top,d),f=gp(l.right,c),g=gp(l.bottom,d),(isNaN(h)||isNaN(parseFloat(l.left)))&&(h=0),(isNaN(f)||isNaN(parseFloat(l.right)))&&(f=c),(isNaN(p)||isNaN(parseFloat(l.top)))&&(p=0),(isNaN(g)||isNaN(parseFloat(l.bottom)))&&(g=d),u=G_(u||0),{width:Math.max(f-h-u[1]-u[3],0),height:Math.max(g-p-u[0]-u[2],0)}),_=t.totalWidth,w=t.renderList,b=o.getModel("itemStyle").getItemStyle(),S=w.length-1;S>=0;S--){var C=w[S],M=C.node,T=C.width,I=C.text;_>x.width&&(_-=T-m,T=m,I=null);var k=new my({shape:{points:TP(v,0,T,y,S===w.length-1,0===S)},style:fs(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new mv({style:Dx(i,{text:I})}),textConfig:{position:"inside"},z2:1e5,onclick:Cs(a,M)});k.disableLabelAnimation=!0,k.getTextContent().ensureState("emphasis").style=Dx(r,{text:I}),k.ensureState("emphasis").style=b,xm(k,o.get("focus"),o.get("blurScope"),o.get("disabled")),this.group.add(k),IP(k,e,M),v+=T+8}},e.prototype.remove=function(){this.group.removeAll()},e}();function TP(e,t,n,o,i,r){var a=[[i?e:e-5,t],[e+n,t],[e+n,t+o],[i?e:e-5,t+o]];return!r&&a.splice(2,0,[e+n+5,t+o/2]),!i&&a.push([e,t+o/2]),a}function IP(e,t,n){Nv(e).eventData={componentType:"series",componentSubType:"treemap",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:n&&n.dataIndex,name:n&&n.name},treePathInfo:n&&vP(n,t)}}var kP=function(){function e(){this._storage=[],this._elExistsMap={}}return e.prototype.add=function(e,t,n,o,i){return!this._elExistsMap[e.id]&&(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:n,delay:o,easing:i}),!0)},e.prototype.finished=function(e){return this._finishedCallback=e,this},e.prototype.start=function(){for(var e=this,t=this._storage.length,n=function(){--t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},o=0,i=this._storage.length;o<i;o++){var r=this._storage[o];r.el.animateTo(r.target,{duration:r.duration,delay:r.delay,easing:r.easing,setToFinal:!0,done:n,aborted:n})}return this},e}();var DP=lp,NP=fv,EP="label",AP="upperLabel",LP=kf([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),VP=function(e){var t=LP(e);return t.stroke=t.fill=t.lineWidth=null,t},OP=uf(),PP=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._state="ready",n._storage={nodeGroup:[],background:[],content:[]},n}return Wl(t,e),t.prototype.render=function(e,t,n,o){if(!(gs(t.findComponents({mainType:"series",subType:"treemap",query:o}),e)<0)){this.seriesModel=e,this.api=n,this.ecModel=t;var i=pP(o,["treemapZoomToNode","treemapRootToNode"],e),r=o&&o.type,a=e.layoutInfo,l=!this._oldTree,s=this._storage,u="treemapRootToNode"===r&&i&&s?{rootNodeGroup:s.nodeGroup[i.node.getRawIndex()],direction:o.direction}:null,c=this._giveContainerGroup(a),d=e.get("animation"),h=this._doRender(c,e,u);!d||l||r&&"treemapZoomToNode"!==r&&"treemapRootToNode"!==r?h.renderFinally():this._doAnimation(c,h,e,u),this._resetController(n),this._renderBreadcrumb(e,n,i)}},t.prototype._giveContainerGroup=function(e){var t=this._containerGroup;return t||(t=this._containerGroup=new DP,this._initEvents(t),this.group.add(t)),t.x=e.x,t.y=e.y,t},t.prototype._doRender=function(e,t,n){var o=t.getData().tree,i=this._oldTree,r={nodeGroup:[],background:[],content:[]},a={nodeGroup:[],background:[],content:[]},l=this._storage,s=[];function u(e,o,i,u){return function(e,t,n,o,i,r,a,l,s,u){if(!a)return;var c=a.getLayout(),d=e.getData(),h=a.getModel();if(d.setItemGraphicEl(a.dataIndex,null),!c||!c.isInView)return;var p=c.width,f=c.height,g=c.borderWidth,v=c.invisible,m=a.getRawIndex(),y=l&&l.getRawIndex(),x=a.viewChildren,_=c.upperHeight,w=x&&x.length,b=h.getModel("itemStyle"),S=h.getModel(["emphasis","itemStyle"]),C=h.getModel(["blur","itemStyle"]),M=h.getModel(["select","itemStyle"]),T=b.get("borderRadius")||0,I=G("nodeGroup",DP);if(!I)return;if(s.add(I),I.x=c.x||0,I.y=c.y||0,I.markRedraw(),OP(I).nodeWidth=p,OP(I).nodeHeight=f,c.isAboveViewRoot)return I;var k=G("background",NP,u,20);k&&P(I,k,w&&c.upperLabelHeight);var D=h.getModel("emphasis"),N=D.get("focus"),E=D.get("blurScope"),A=D.get("disabled"),L="ancestor"===N?a.getAncestorsIndices():"descendant"===N?a.getDescendantIndices():N;if(w)Mm(I)&&Cm(I,!1),k&&(Cm(k,!A),d.setItemGraphicEl(a.dataIndex,k),_m(k,L,E));else{var V=G("content",NP,u,30);V&&B(I,V),k.disableMorphing=!0,k&&Mm(k)&&Cm(k,!1),Cm(I,!A),d.setItemGraphicEl(a.dataIndex,I);var O=h.getShallow("cursor");O&&V.attr("cursor",O),_m(I,L,E)}return I;function P(t,n,o){var i=Nv(n);if(i.dataIndex=a.dataIndex,i.seriesIndex=e.seriesIndex,n.setShape({x:0,y:0,width:p,height:f,r:T}),v)R(n);else{n.invisible=!1;var r=a.getVisual("style"),l=r.stroke,s=VP(b);s.fill=l;var u=LP(S);u.fill=S.get("borderColor");var c=LP(C);c.fill=C.get("borderColor");var d=LP(M);if(d.fill=M.get("borderColor"),o){var h=p-2*g;z(n,l,r.opacity,{x:g,y:0,width:h,height:_})}else n.removeTextContent();n.setStyle(s),n.ensureState("emphasis").style=u,n.ensureState("blur").style=c,n.ensureState("select").style=d,nm(n)}t.add(n)}function B(t,n){var o=Nv(n);o.dataIndex=a.dataIndex,o.seriesIndex=e.seriesIndex;var i=Math.max(p-2*g,0),r=Math.max(f-2*g,0);if(n.culling=!0,n.setShape({x:g,y:g,width:i,height:r,r:T}),v)R(n);else{n.invisible=!1;var l=a.getVisual("style"),s=l.fill,u=VP(b);u.fill=s,u.decal=l.decal;var c=LP(S),d=LP(C),h=LP(M);z(n,s,l.opacity,null),n.setStyle(u),n.ensureState("emphasis").style=c,n.ensureState("blur").style=d,n.ensureState("select").style=h,nm(n)}t.add(n)}function R(e){!e.invisible&&r.push(e)}function z(t,n,o,i){var r=h.getModel(i?AP:EP),l=nf(h.get("name"),null),s=r.getShallow("show");Ix(t,kx(h,i?AP:EP),{defaultText:s?l:null,inheritColor:n,defaultOpacity:o,labelFetcher:e,labelDataIndex:a.dataIndex});var u=t.getTextContent();if(u){var d=u.style,p=Gs(d.padding||0);i&&(t.setTextConfig({layoutRect:i}),u.disableLabelLayout=!0),u.beforeUpdate=function(){var e=Math.max((i?i.width:t.shape.width)-p[1]-p[3],0),n=Math.max((i?i.height:t.shape.height)-p[0]-p[2],0);d.width===e&&d.height===n||u.setStyle({width:e,height:n})},d.truncateMinChar=2,d.lineOverflow="truncate",F(d,i,c);var f=u.getState("emphasis");F(f?f.style:null,i,c)}}function F(t,n,o){var i=t?t.text:null;if(!n&&o.isLeafRoot&&null!=i){var r=e.get("drillDownIcon",!0);t.text=r?r+" "+i:i}}function G(e,o,r,a){var l=null!=y&&n[e][y],s=i[e];return l?(n[e][y]=null,H(s,l)):v||((l=new o)instanceof Qf&&(l.z2=function(e,t){return 100*e+t}(r,a)),W(s,l)),t[e][m]=l}function H(e,t){var n=e[m]={};t instanceof DP?(n.oldX=t.x,n.oldY=t.y):n.oldShape=ps({},t.shape)}function W(e,t){var n=e[m]={},r=a.parentNode,l=t instanceof lp;if(r&&(!o||"drillDown"===o.direction)){var s=0,u=0,c=i.background[r.getRawIndex()];!o&&c&&c.oldShape&&(s=c.oldShape.width,u=c.oldShape.height),l?(n.oldX=0,n.oldY=u):n.oldShape={x:s,y:u,width:0,height:0}}n.fadein=!l}}(t,a,l,n,r,s,e,o,i,u)}!function e(t,n,o,i,r){i?(n=t,ys(t,function(e,t){!e.isRemoved()&&l(t,t)})):new rI(n,t,a,a).add(l).update(l).remove(Cs(l,null)).execute();function a(e){return e.getId()}function l(a,l){var s=null!=a?t[a]:null,c=null!=l?n[l]:null,d=u(s,c,o,r);d&&e(s&&s.viewChildren||[],c&&c.viewChildren||[],d,i,r+1)}}(o.root?[o.root]:[],i&&i.root?[i.root]:[],e,o===i||!i,0);var c,d,h=(d={nodeGroup:[],background:[],content:[]},(c=l)&&ys(c,function(e,t){var n=d[t];ys(e,function(e){e&&(n.push(e),OP(e).willDelete=!0)})}),d);if(this._oldTree=o,this._storage=a,this._controllerHost){var p=this.seriesModel.layoutInfo,f=o.root.getLayout();f.width===p.width&&f.height===p.height&&(this._controllerHost.zoom=1)}return{lastsForAnimation:r,willDeleteEls:h,renderFinally:function(){ys(h,function(e){ys(e,function(e){e.parent&&e.parent.remove(e)})}),ys(s,function(e){e.invisible=!0,e.dirty()})}}},t.prototype._doAnimation=function(e,t,n,o){var i=n.get("animationDurationUpdate"),r=n.get("animationEasing"),a=(Ts(i)?0:i)||0,l=(Ts(r)?null:r)||"cubicOut",s=new kP;ys(t.willDeleteEls,function(e,t){ys(e,function(e,n){if(!e.invisible){var i,r=e.parent,u=OP(r);if(o&&"drillDown"===o.direction)i=r===o.rootNodeGroup?{shape:{x:0,y:0,width:u.nodeWidth,height:u.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var c=0,d=0;u.willDelete||(c=u.nodeWidth/2,d=u.nodeHeight/2),i="nodeGroup"===t?{x:c,y:d,style:{opacity:0}}:{shape:{x:c,y:d,width:0,height:0},style:{opacity:0}}}i&&s.add(e,i,a,0,l)}})}),ys(this._storage,function(e,n){ys(e,function(e,o){var i=t.lastsForAnimation[n][o],r={};i&&(e instanceof lp?null!=i.oldX&&(r.x=e.x,r.y=e.y,e.x=i.oldX,e.y=i.oldY):(i.oldShape&&(r.shape=ps({},e.shape),e.setShape(i.oldShape)),i.fadein?(e.setStyle("opacity",0),r.style={opacity:1}):1!==e.style.opacity&&(r.style={opacity:1})),s.add(e,r,a,0,l))})},this),this._state="animating",s.finished(Ss(function(){this._state="ready",t.renderFinally()},this)).start()},t.prototype._resetController=function(e){var t=this._controller,n=this._controllerHost;n||(this._controllerHost={target:this.group},n=this._controllerHost),t||((t=this._controller=new hV(e.getZr())).enable(this.seriesModel.get("roam")),n.zoomLimit=this.seriesModel.get("scaleLimit"),n.zoom=this.seriesModel.get("zoom"),t.on("pan",Ss(this._onPan,this)),t.on("zoom",Ss(this._onZoom,this)));var o=new cc(0,0,e.getWidth(),e.getHeight());t.setPointerChecker(function(e,t,n){return o.contain(t,n)})},t.prototype._clearController=function(){var e=this._controller;this._controllerHost=null,e&&(e.dispose(),e=null)},t.prototype._onPan=function(e){if("animating"!==this._state&&(Math.abs(e.dx)>3||Math.abs(e.dy)>3)){var t=this.seriesModel.getData().tree.root;if(!t)return;var n=t.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+e.dx,y:n.y+e.dy,width:n.width,height:n.height}})}},t.prototype._onZoom=function(e){var t=e.originX,n=e.originY,o=e.scale;if("animating"!==this._state){var i=this.seriesModel.getData().tree.root;if(!i)return;var r=i.getLayout();if(!r)return;var a,l=new cc(r.x,r.y,r.width,r.height),s=this._controllerHost;a=s.zoomLimit;var u=s.zoom=s.zoom||1;if(u*=o,a){var c=a.min||0,d=a.max||1/0;u=Math.max(Math.min(d,u),c)}var h=u/s.zoom;s.zoom=u;var p=this.seriesModel.layoutInfo,f=[1,0,0,1,0,0];Ku(f,f,[-(t-=p.x),-(n-=p.y)]),Qu(f,f,[h,h]),Ku(f,f,[t,n]),l.applyTransform(f),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:l.x,y:l.y,width:l.width,height:l.height}})}},t.prototype._initEvents=function(e){var t=this;e.on("click",function(e){if("ready"===t._state){var n=t.seriesModel.get("nodeClick",!0);if(n){var o=t.findTarget(e.offsetX,e.offsetY);if(o){var i=o.node;if(i.getLayout().isLeafRoot)t._rootToNode(o);else if("zoomToNode"===n)t._zoomToNode(o);else if("link"===n){var r=i.hostTree.data.getItemModel(i.dataIndex),a=r.get("link",!0),l=r.get("target",!0)||"blank";a&&X_(a,l)}}}}},this)},t.prototype._renderBreadcrumb=function(e,t,n){var o=this;n||(n=null!=e.get("leafDepth",!0)?{node:e.getViewRoot()}:this.findTarget(t.getWidth()/2,t.getHeight()/2))||(n={node:e.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new MP(this.group))).render(e,t,n.node,function(t){"animating"!==o._state&&(gP(e.getViewRoot(),t)?o._rootToNode({node:t}):o._zoomToNode({node:t}))})},t.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage={nodeGroup:[],background:[],content:[]},this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},t.prototype.dispose=function(){this._clearController()},t.prototype._zoomToNode=function(e){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype._rootToNode=function(e){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype.findTarget=function(e,t){var n;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},function(o){var i=this._storage.background[o.getRawIndex()];if(i){var r=i.transformCoordToLocal(e,t),a=i.shape;if(!(a.x<=r[0]&&r[0]<=a.x+a.width&&a.y<=r[1]&&r[1]<=a.y+a.height))return!1;n={node:o,offsetX:r[0],offsetY:r[1]}}},this),n},t.type="treemap",t}(aC);var BP=ys,RP=Ns,zP=-1,FP=function(){function e(t){var n=t.mappingMethod,o=t.type,i=this.option=cs(t);this.type=o,this.mappingMethod=n,this._normalizeData=qP[n];var r=e.visualHandlers[o];this.applyVisual=r.applyVisual,this.getColorMapper=r.getColorMapper,this._normalizedToVisual=r._normalizedToVisual[n],"piecewise"===n?(GP(i),function(e){var t=e.pieceList;e.hasSpecialVisual=!1,ys(t,function(t,n){t.originIndex=n,null!=t.visual&&(e.hasSpecialVisual=!0)})}(i)):"category"===n?i.categories?function(e){var t=e.categories,n=e.categoryMap={},o=e.visual;if(BP(t,function(e,t){n[e]=t}),!Ms(o)){var i=[];Ns(o)?BP(o,function(e,t){var o=n[t];i[null!=o?o:zP]=e}):i[-1]=o,o=$P(e,i)}for(var r=t.length-1;r>=0;r--)null==o[r]&&(delete n[t[r]],t.pop())}(i):GP(i,!0):(Hs("linear"!==n||i.dataExtent),GP(i))}return e.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},e.prototype.getNormalizer=function(){return Ss(this._normalizeData,this)},e.listVisualTypes=function(){return bs(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(e,t,n){Ns(e)?ys(e,t,n):t.call(n,e)},e.mapVisual=function(t,n,o){var i,r=Ms(t)?[]:Ns(t)?{}:(i=!0,null);return e.eachVisual(t,function(e,t){var a=n.call(o,e,t);i?r=a:r[t]=a}),r},e.retrieveVisuals=function(t){var n,o={};return t&&BP(e.visualHandlers,function(e,i){t.hasOwnProperty(i)&&(o[i]=t[i],n=!0)}),n?o:null},e.prepareVisualTypes=function(e){if(Ms(e))e=e.slice();else{if(!RP(e))return[];var t=[];BP(e,function(e,n){t.push(n)}),e=t}return e.sort(function(e,t){return"color"===t&&"color"!==e&&0===e.indexOf("color")?1:-1}),e},e.dependsOn=function(e,t){return"color"===t?!(!e||0!==e.indexOf(t)):e===t},e.findPieceIndex=function(e,t,n){for(var o,i=1/0,r=0,a=t.length;r<a;r++){var l=t[r].value;if(null!=l){if(l===e||Is(l)&&l===e+"")return r;n&&d(l,r)}}for(r=0,a=t.length;r<a;r++){var s=t[r],u=s.interval,c=s.close;if(u){if(u[0]===-1/0){if(KP(c[1],e,u[1]))return r}else if(u[1]===1/0){if(KP(c[0],u[0],e))return r}else if(KP(c[0],u[0],e)&&KP(c[1],e,u[1]))return r;n&&d(u[0],r),n&&d(u[1],r)}}if(n)return e===1/0?t.length-1:e===-1/0?0:o;function d(t,n){var r=Math.abs(t-e);r<i&&(i=r,o=n)}},e.visualHandlers={color:{applyVisual:UP("color"),getColorMapper:function(){var e=this.option;return Ss("category"===e.mappingMethod?function(e,t){return!t&&(e=this._normalizeData(e)),YP.call(this,e)}:function(t,n,o){var i=!!o;return!n&&(t=this._normalizeData(t)),o=Cd(t,e.parsedVisual,o),i?o:Id(o,"rgba")},this)},_normalizedToVisual:{linear:function(e){return Id(Cd(e,this.option.parsedVisual),"rgba")},category:YP,piecewise:function(e,t){var n=jP.call(this,t);return null==n&&(n=Id(Cd(e,this.option.parsedVisual),"rgba")),n},fixed:ZP}},colorHue:HP(function(e,t){return Md(e,t)}),colorSaturation:HP(function(e,t){return Md(e,null,t)}),colorLightness:HP(function(e,t){return Md(e,null,null,t)}),colorAlpha:HP(function(e,t){return Td(e,t)}),decal:{applyVisual:UP("decal"),_normalizedToVisual:{linear:null,category:YP,piecewise:null,fixed:null}},opacity:{applyVisual:UP("opacity"),_normalizedToVisual:XP([0,1])},liftZ:{applyVisual:UP("liftZ"),_normalizedToVisual:{linear:ZP,category:ZP,piecewise:ZP,fixed:ZP}},symbol:{applyVisual:function(e,t,n){n("symbol",this.mapValueToVisual(e))},_normalizedToVisual:{linear:WP,category:YP,piecewise:function(e,t){var n=jP.call(this,t);return null==n&&(n=WP.call(this,e)),n},fixed:ZP}},symbolSize:{applyVisual:UP("symbolSize"),_normalizedToVisual:XP([0,1])}},e}();function GP(e,t){var n=e.visual,o=[];Ns(n)?BP(n,function(e){o.push(e)}):null!=n&&o.push(n);t||1!==o.length||{color:1,symbol:1}.hasOwnProperty(e.type)||(o[1]=o[0]),$P(e,o)}function HP(e){return{applyVisual:function(t,n,o){var i=this.mapValueToVisual(t);o("color",e(n("color"),i))},_normalizedToVisual:XP([0,1])}}function WP(e){var t=this.option.visual;return t[Math.round(fp(e,[0,1],[0,t.length-1],!0))]||{}}function UP(e){return function(t,n,o){o(e,this.mapValueToVisual(t))}}function YP(e){var t=this.option.visual;return t[this.option.loop&&e!==zP?e%t.length:e]}function ZP(){return this.option.visual[0]}function XP(e){return{linear:function(t){return fp(t,e,this.option.visual,!0)},category:YP,piecewise:function(t,n){var o=jP.call(this,n);return null==o&&(o=fp(t,e,this.option.visual,!0)),o},fixed:ZP}}function jP(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var o=n[FP.findPieceIndex(e,n)];if(o&&o.visual)return o.visual[this.type]}}function $P(e,t){return e.visual=t,"color"===e.type&&(e.parsedVisual=xs(t,function(e){var t=wd(e);return t||"production"===process.env.NODE_ENV||zp("'"+e+"' is an illegal color, fallback to '#000000'",!0),t||[0,0,0,1]})),t}var qP={linear:function(e){return fp(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=FP.findPieceIndex(e,t,!0);if(null!=n)return fp(n,[0,t.length-1],[0,1],!0)},category:function(e){var t=this.option.categories?this.option.categoryMap[e]:e;return null==t?zP:t},fixed:tu};function KP(e,t,n){return e?t<=n:t<n}var JP=uf();const QP={seriesType:"treemap",reset:function(e){var t=e.getData().tree.root;t.isRemoved()||eB(t,{},e.getViewRoot().getAncestors(),e)}};function eB(e,t,n,o){var i=e.getModel(),r=e.getLayout(),a=e.hostTree.data;if(r&&!r.invisible&&r.isInView){var l,s=i.getModel("itemStyle"),u=function(e,t,n){var o=ps({},t),i=n.designatedVisualItemStyle;return ys(["color","colorAlpha","colorSaturation"],function(n){i[n]=t[n];var r=e.get(n);i[n]=null,null!=r&&(o[n]=r)}),o}(s,t,o),c=a.ensureUniqueItemVisual(e.dataIndex,"style"),d=s.get("borderColor"),h=s.get("borderColorSaturation");null!=h&&(d=function(e,t){return null!=t?Md(t,null,null,e):null}(h,l=tB(u))),c.stroke=d;var p=e.viewChildren;if(p&&p.length){var f=function(e,t,n,o,i,r){if(!r||!r.length)return;var a=oB(t,"color")||null!=i.color&&"none"!==i.color&&(oB(t,"colorAlpha")||oB(t,"colorSaturation"));if(!a)return;var l=t.get("visualMin"),s=t.get("visualMax"),u=n.dataExtent.slice();null!=l&&l<u[0]&&(u[0]=l),null!=s&&s>u[1]&&(u[1]=s);var c=t.get("colorMappingBy"),d={type:a.name,dataExtent:u,visual:a.range};"color"!==d.type||"index"!==c&&"id"!==c?d.mappingMethod="linear":(d.mappingMethod="category",d.loop=!0);var h=new FP(d);return JP(h).drColorMappingBy=c,h}(0,i,r,0,u,p);ys(p,function(e,t){if(e.depth>=n.length||e===n[e.depth]){var r=function(e,t,n,o,i,r){var a=ps({},t);if(i){var l=i.type,s="color"===l&&JP(i).drColorMappingBy,u="index"===s?o:"id"===s?r.mapIdToIndex(n.getId()):n.getValue(e.get("visualDimension"));a[l]=i.mapValueToVisual(u)}return a}(i,u,e,t,f,o);eB(e,r,n,o)}})}else l=tB(u),c.fill=l}}function tB(e){var t=nB(e,"color");if(t){var n=nB(e,"colorAlpha"),o=nB(e,"colorSaturation");return o&&(t=Md(t,null,null,o)),n&&(t=Td(t,n)),t}}function nB(e,t){var n=e[t];if(null!=n&&"none"!==n)return n}function oB(e,t){var n=e.get(t);return Ms(n)&&n.length?{name:t,range:n}:null}var iB=Math.max,rB=Math.min,aB=Bs,lB=ys,sB=["itemStyle","borderWidth"],uB=["itemStyle","gapWidth"],cB=["upperLabel","show"],dB=["upperLabel","height"];const hB={seriesType:"treemap",reset:function(e,t,n,o){var i=n.getWidth(),r=n.getHeight(),a=e.option,l=Q_(e.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()}),s=a.size||[],u=gp(aB(l.width,s[0]),i),c=gp(aB(l.height,s[1]),r),d=o&&o.type,h=pP(o,["treemapZoomToNode","treemapRootToNode"],e),p="treemapRender"===d||"treemapMove"===d?o.rootRect:null,f=e.getViewRoot(),g=fP(f);if("treemapMove"!==d){var v="treemapZoomToNode"===d?function(e,t,n,o,i){var r,a=(t||{}).node,l=[o,i];if(!a||a===n)return l;var s=o*i,u=s*e.option.zoomToNodeRatio;for(;r=a.parentNode;){for(var c=0,d=r.children,h=0,p=d.length;h<p;h++)c+=d[h].getValue();var f=a.getValue();if(0===f)return l;u*=c/f;var g=r.getModel(),v=g.get(sB);(u+=4*v*v+(3*v+Math.max(v,mB(g)))*Math.pow(u,.5))>bp&&(u=bp),a=r}u<s&&(u=s);var m=Math.pow(u/s,.5);return[o*m,i*m]}(e,h,f,u,c):p?[p.width,p.height]:[u,c],m=a.sort;m&&"asc"!==m&&"desc"!==m&&(m="desc");var y={squareRatio:a.squareRatio,sort:m,leafDepth:a.leafDepth};f.hostTree.clearLayouts();var x={x:0,y:0,width:v[0],height:v[1],area:v[0]*v[1]};f.setLayout(x),pB(f,y,!1,0),x=f.getLayout(),lB(g,function(e,t){var n=(g[t+1]||f).getValue();e.setLayout(ps({dataExtent:[n,n],borderWidth:0,upperHeight:0},x))})}var _=e.getData().tree.root;_.setLayout(function(e,t,n){if(t)return{x:t.x,y:t.y};var o={x:0,y:0};if(!n)return o;var i=n.node,r=i.getLayout();if(!r)return o;var a=[r.width/2,r.height/2],l=i;for(;l;){var s=l.getLayout();a[0]+=s.x,a[1]+=s.y,l=l.parentNode}return{x:e.width/2-a[0],y:e.height/2-a[1]}}(l,p,h),!0),e.setLayoutInfo(l),vB(_,new cc(-l.x,-l.y,i,r),g,f,0)}};function pB(e,t,n,o){var i,r;if(!e.isRemoved()){var a=e.getLayout();i=a.width,r=a.height;var l=e.getModel(),s=l.get(sB),u=l.get(uB)/2,c=mB(l),d=Math.max(s,c),h=s-u,p=d-u;e.setLayout({borderWidth:s,upperHeight:d,upperLabelHeight:c},!0);var f=(i=iB(i-2*h,0))*(r=iB(r-h-p,0)),g=function(e,t,n,o,i,r){var a=e.children||[],l=o.sort;"asc"!==l&&"desc"!==l&&(l=null);var s=null!=o.leafDepth&&o.leafDepth<=r;if(i&&!s)return e.viewChildren=[];a=ws(a,function(e){return!e.isRemoved()}),function(e,t){t&&e.sort(function(e,n){var o="asc"===t?e.getValue()-n.getValue():n.getValue()-e.getValue();return 0===o?"asc"===t?e.dataIndex-n.dataIndex:n.dataIndex-e.dataIndex:o})}(a,l);var u=function(e,t,n){for(var o=0,i=0,r=t.length;i<r;i++)o+=t[i].getValue();var a,l=e.get("visualDimension");t&&t.length?"value"===l&&n?(a=[t[t.length-1].getValue(),t[0].getValue()],"asc"===n&&a.reverse()):(a=[1/0,-1/0],lB(t,function(e){var t=e.getValue(l);t<a[0]&&(a[0]=t),t>a[1]&&(a[1]=t)})):a=[NaN,NaN];return{sum:o,dataExtent:a}}(t,a,l);if(0===u.sum)return e.viewChildren=[];if(u.sum=function(e,t,n,o,i){if(!o)return n;for(var r=e.get("visibleMin"),a=i.length,l=a,s=a-1;s>=0;s--){var u=i["asc"===o?a-s-1:s].getValue();u/n*t<r&&(l=s,n-=u)}return"asc"===o?i.splice(0,a-l):i.splice(l,a-l),n}(t,n,u.sum,l,a),0===u.sum)return e.viewChildren=[];for(var c=0,d=a.length;c<d;c++){var h=a[c].getValue()/u.sum*n;a[c].setLayout({area:h})}s&&(a.length&&e.setLayout({isLeafRoot:!0},!0),a.length=0);return e.viewChildren=a,e.setLayout({dataExtent:u.dataExtent},!0),a}(e,l,f,t,n,o);if(g.length){var v={x:h,y:p,width:i,height:r},m=rB(i,r),y=1/0,x=[];x.area=0;for(var _=0,w=g.length;_<w;){var b=g[_];x.push(b),x.area+=b.getLayout().area;var S=fB(x,m,t.squareRatio);S<=y?(_++,y=S):(x.area-=x.pop().getLayout().area,gB(x,m,v,u,!1),m=rB(v.width,v.height),x.length=x.area=0,y=1/0)}if(x.length&&gB(x,m,v,u,!0),!n){var C=l.get("childrenVisibleMin");null!=C&&f<C&&(n=!0)}for(_=0,w=g.length;_<w;_++)pB(g[_],t,n,o+1)}}}function fB(e,t,n){for(var o=0,i=1/0,r=0,a=void 0,l=e.length;r<l;r++)(a=e[r].getLayout().area)&&(a<i&&(i=a),a>o&&(o=a));var s=e.area*e.area,u=t*t*n;return s?iB(u*o/s,s/(u*i)):1/0}function gB(e,t,n,o,i){var r=t===n.width?0:1,a=1-r,l=["x","y"],s=["width","height"],u=n[l[r]],c=t?e.area/t:0;(i||c>n[s[a]])&&(c=n[s[a]]);for(var d=0,h=e.length;d<h;d++){var p=e[d],f={},g=c?p.getLayout().area/c:0,v=f[s[a]]=iB(c-2*o,0),m=n[l[r]]+n[s[r]]-u,y=d===h-1||m<g?m:g,x=f[s[r]]=iB(y-2*o,0);f[l[a]]=n[l[a]]+rB(o,v/2),f[l[r]]=u+rB(o,x/2),u+=y,p.setLayout(f,!0)}n[l[a]]+=c,n[s[a]]-=c}function vB(e,t,n,o,i){var r=e.getLayout(),a=n[i],l=a&&a===e;if(!(a&&!l||i===n.length&&e!==o)){e.setLayout({isInView:!0,invisible:!l&&!t.intersect(r),isAboveViewRoot:l},!0);var s=new cc(t.x-r.x,t.y-r.y,t.width,t.height);lB(e.viewChildren||[],function(e){vB(e,s,n,o,i+1)})}}function mB(e){return e.get(cB)?e.get(dB):0}function yB(e){var t=e.findComponents({mainType:"legend"});t&&t.length&&e.eachSeriesByType("graph",function(e){var n=e.getCategoriesData(),o=e.getGraph().data,i=n.mapArray(n.getName);o.filterSelf(function(e){var n=o.getItemModel(e).getShallow("category");if(null!=n){Ds(n)&&(n=i[n]);for(var r=0;r<t.length;r++)if(!t[r].isSelected(n))return!1}return!0})})}function xB(e){var t={};e.eachSeriesByType("graph",function(e){var n=e.getCategoriesData(),o=e.getData(),i={};n.each(function(o){var r=n.getName(o);i["ec-"+r]=o;var a=n.getItemModel(o),l=a.getModel("itemStyle").getItemStyle();l.fill||(l.fill=e.getColorFromPalette(r,t)),n.setItemVisual(o,"style",l);for(var s=["symbol","symbolSize","symbolKeepAspect"],u=0;u<s.length;u++){var c=a.getShallow(s[u],!0);null!=c&&n.setItemVisual(o,s[u],c)}}),n.count()&&o.each(function(e){var t=o.getItemModel(e).getShallow("category");if(null!=t){Is(t)&&(t=i["ec-"+t]);var r=n.getItemVisual(t,"style");ps(o.ensureUniqueItemVisual(e,"style"),r);for(var a=["symbol","symbolSize","symbolKeepAspect"],l=0;l<a.length;l++)o.setItemVisual(e,a[l],n.getItemVisual(t,a[l]))}})})}function _B(e){return e instanceof Array||(e=[e,e]),e}function wB(e){e.eachSeriesByType("graph",function(e){var t=e.getGraph(),n=e.getEdgeData(),o=_B(e.get("edgeSymbol")),i=_B(e.get("edgeSymbolSize"));n.setVisual("fromSymbol",o&&o[0]),n.setVisual("toSymbol",o&&o[1]),n.setVisual("fromSymbolSize",i&&i[0]),n.setVisual("toSymbolSize",i&&i[1]),n.setVisual("style",e.getModel("lineStyle").getLineStyle()),n.each(function(e){var o=n.getItemModel(e),i=t.getEdgeByIndex(e),r=_B(o.getShallow("symbol",!0)),a=_B(o.getShallow("symbolSize",!0)),l=o.getModel("lineStyle").getLineStyle(),s=n.ensureUniqueItemVisual(e,"style");switch(ps(s,l),s.stroke){case"source":var u=i.node1.getVisual("style");s.stroke=u&&u.fill;break;case"target":u=i.node2.getVisual("style");s.stroke=u&&u.fill}r[0]&&i.setVisual("fromSymbol",r[0]),r[1]&&i.setVisual("toSymbol",r[1]),a[0]&&i.setVisual("fromSymbolSize",a[0]),a[1]&&i.setVisual("toSymbolSize",a[1])})})}var bB="--\x3e",SB=function(e){return e.get("autoCurveness")||null},CB=function(e,t){var n=SB(e),o=20,i=[];if(Ds(n))o=n;else if(Ms(n))return void(e.__curvenessList=n);t>o&&(o=t);var r=o%2?o+2:o+3;i=[];for(var a=0;a<r;a++)i.push((a%2?a+1:a)/10*(a%2?-1:1));e.__curvenessList=i},MB=function(e,t,n){var o=[e.id,e.dataIndex].join("."),i=[t.id,t.dataIndex].join(".");return[n.uid,o,i].join(bB)},TB=function(e){var t=e.split(bB);return[t[0],t[2],t[1]].join(bB)},IB=function(e,t){var n=t.__edgeMap;return n[e]?n[e].length:0};function kB(e,t,n,o){var i=SB(t),r=Ms(i);if(!i)return null;var a=function(e,t){var n=MB(e.node1,e.node2,t);return t.__edgeMap[n]}(e,t);if(!a)return null;for(var l=-1,s=0;s<a.length;s++)if(a[s]===n){l=s;break}var u=function(e,t){return IB(MB(e.node1,e.node2,t),t)+IB(MB(e.node2,e.node1,t),t)}(e,t);CB(t,u),e.lineStyle=e.lineStyle||{};var c=MB(e.node1,e.node2,t),d=t.__curvenessList,h=r||u%2?0:1;if(a.isForward)return d[h+l];var p=TB(c),f=IB(p,t),g=d[l+f+h];return o?r?i&&0===i[0]?(f+h)%2?g:-g:((f%2?0:1)+h)%2?g:-g:(f+h)%2?g:-g:d[l+f+h]}function DB(e){var t=e.coordinateSystem;if(!t||"view"===t.type){var n=e.getGraph();n.eachNode(function(e){var t=e.getModel();e.setLayout([+t.get("x"),+t.get("y")])}),NB(n,e)}}function NB(e,t){e.eachEdge(function(e,n){var o=zs(e.getModel().get(["lineStyle","curveness"]),-kB(e,t,n,!0),0),i=ru(e.node1.getLayout()),r=ru(e.node2.getLayout()),a=[i,r];+o&&a.push([(i[0]+r[0])/2-(i[1]-r[1])*o,(i[1]+r[1])/2-(r[0]-i[0])*o]),e.setLayout(a)})}function EB(e,t){e.eachSeriesByType("graph",function(e){var t=e.get("layout"),n=e.coordinateSystem;if(n&&"view"!==n.type){var o=e.getData(),i=[];ys(n.dimensions,function(e){i=i.concat(o.mapDimensionsAll(e))});for(var r=0;r<o.count();r++){for(var a=[],l=!1,s=0;s<i.length;s++){var u=o.get(i[s],r);isNaN(u)||(l=!0),a.push(u)}l?o.setItemLayout(r,n.dataToPoint(a)):o.setItemLayout(r,[NaN,NaN])}NB(o.graph,e)}else t&&"none"!==t||DB(e)})}function AB(e){var t=e.coordinateSystem;if("view"!==t.type)return 1;var n=e.option.nodeScaleRatio,o=t.scaleX;return((t.getZoom()-1)*n+1)/o}function LB(e){var t=e.getVisual("symbolSize");return t instanceof Array&&(t=(t[0]+t[1])/2),+t}var VB=Math.PI,OB=[];function PB(e,t,n,o){var i=e.coordinateSystem;if(!i||"view"===i.type){var r=i.getBoundingRect(),a=e.getData(),l=a.graph,s=r.width/2+r.x,u=r.height/2+r.y,c=Math.min(r.width,r.height)/2,d=a.count();if(a.setLayout({cx:s,cy:u}),d){if(n){var h=i.pointToData(o),p=h[0],f=h[1],g=[p-s,f-u];hu(g,g),du(g,g,c),n.setLayout([s+g[0],u+g[1]],!0),RB(n,e.get(["circular","rotateLabel"]),s,u)}BB[t](e,l,a,c,s,u,d),l.eachEdge(function(t,n){var o,i=zs(t.getModel().get(["lineStyle","curveness"]),kB(t,e,n),0),r=ru(t.node1.getLayout()),a=ru(t.node2.getLayout()),l=(r[0]+a[0])/2,c=(r[1]+a[1])/2;+i&&(o=[s*(i*=3)+l*(1-i),u*i+c*(1-i)]),t.setLayout([r,a,o])})}}}var BB={value:function(e,t,n,o,i,r,a){var l=0,s=n.getSum("value"),u=2*Math.PI/(s||a);t.eachNode(function(e){var t=e.getValue("value"),n=u*(s?t:1)/2;l+=n,e.setLayout([o*Math.cos(l)+i,o*Math.sin(l)+r]),l+=n})},symbolSize:function(e,t,n,o,i,r,a){var l=0;OB.length=a;var s=AB(e);t.eachNode(function(e){var t=LB(e);isNaN(t)&&(t=2),t<0&&(t=0),t*=s;var n=Math.asin(t/2/o);isNaN(n)&&(n=VB/2),OB[e.dataIndex]=n,l+=2*n});var u=(2*VB-l)/a/2,c=0;t.eachNode(function(e){var t=u+OB[e.dataIndex];c+=t,(!e.getLayout()||!e.getLayout().fixed)&&e.setLayout([o*Math.cos(c)+i,o*Math.sin(c)+r]),c+=t})}};function RB(e,t,n,o){var i=e.getGraphicEl();if(i){var r=e.getModel().get(["label","rotate"])||0,a=i.getSymbolPath();if(t){var l=e.getLayout(),s=Math.atan2(l[1]-o,l[0]-n);s<0&&(s=2*Math.PI+s);var u=l[0]<n;u&&(s-=Math.PI);var c=u?"left":"right";a.setTextConfig({rotation:-s,position:c,origin:"center"});var d=a.ensureState("emphasis");ps(d.textConfig||(d.textConfig={}),{position:c})}else a.setTextConfig({rotation:r*=Math.PI/180})}}function zB(e){e.eachSeriesByType("graph",function(e){"circular"===e.get("layout")&&PB(e,"symbolSize")})}var FB=su;function GB(e){e.eachSeriesByType("graph",function(e){var t=e.coordinateSystem;if(!t||"view"===t.type)if("force"===e.get("layout")){var n=e.preservedPoints||{},o=e.getGraph(),i=o.data,r=o.edgeData,a=e.getModel("force"),l=a.get("initLayout");e.preservedPoints?i.each(function(e){var t=i.getId(e);i.setItemLayout(e,n[t]||[NaN,NaN])}):l&&"none"!==l?"circular"===l&&PB(e,"value"):DB(e);var s=i.getDataExtent("value"),u=r.getDataExtent("value"),c=a.get("repulsion"),d=a.get("edgeLength"),h=Ms(c)?c:[c,c],p=Ms(d)?d:[d,d];p=[p[1],p[0]];var f=i.mapArray("value",function(e,t){var n=i.getItemLayout(t),o=fp(e,s,h);return isNaN(o)&&(o=(h[0]+h[1])/2),{w:o,rep:o,fixed:i.getItemModel(t).get("fixed"),p:!n||isNaN(n[0])||isNaN(n[1])?null:n}}),g=r.mapArray("value",function(t,n){var i=o.getEdgeByIndex(n),r=fp(t,u,p);isNaN(r)&&(r=(p[0]+p[1])/2);var a=i.getModel(),l=zs(i.getModel().get(["lineStyle","curveness"]),-kB(i,e,n,!0),0);return{n1:f[i.node1.dataIndex],n2:f[i.node2.dataIndex],d:r,curveness:l,ignoreForceLayout:a.get("ignoreForceLayout")}}),v=t.getBoundingRect(),m=function(e,t,n){for(var o=e,i=t,r=n.rect,a=r.width,l=r.height,s=[r.x+a/2,r.y+l/2],u=null==n.gravity?.1:n.gravity,c=0;c<o.length;c++){var d=o[c];d.p||(d.p=ou(a*(Math.random()-.5)+s[0],l*(Math.random()-.5)+s[1])),d.pp=ru(d.p),d.edges=null}var h,p,f=null==n.friction?.6:n.friction,g=f;return{warmUp:function(){g=.8*f},setFixed:function(e){o[e].fixed=!0},setUnfixed:function(e){o[e].fixed=!1},beforeStep:function(e){h=e},afterStep:function(e){p=e},step:function(e){h&&h(o,i);for(var t=[],n=o.length,r=0;r<i.length;r++){var a=i[r];if(!a.ignoreForceLayout){var l=a.n1;uu(t,(v=a.n2).p,l.p);var c=cu(t)-a.d,d=v.w/(l.w+v.w);isNaN(d)&&(d=0),hu(t,t),!l.fixed&&FB(l.p,l.p,t,d*c*g),!v.fixed&&FB(v.p,v.p,t,-(1-d)*c*g)}}for(r=0;r<n;r++)(x=o[r]).fixed||(uu(t,s,x.p),FB(x.p,x.p,t,u*g));for(r=0;r<n;r++){l=o[r];for(var f=r+1;f<n;f++){var v;uu(t,(v=o[f]).p,l.p),0===(c=cu(t))&&(au(t,Math.random()-.5,Math.random()-.5),c=1);var m=(l.rep+v.rep)/c/c;!l.fixed&&FB(l.pp,l.pp,t,m),!v.fixed&&FB(v.pp,v.pp,t,-m)}}var y=[];for(r=0;r<n;r++){var x;(x=o[r]).fixed||(uu(y,x.p,x.pp),FB(x.p,x.p,y,g),iu(x.pp,x.p))}var _=(g*=.992)<.01;p&&p(o,i,_),e&&e(_)}}}(f,g,{rect:v,gravity:a.get("gravity"),friction:a.get("friction")});m.beforeStep(function(e,t){for(var n=0,i=e.length;n<i;n++)e[n].fixed&&iu(e[n].p,o.getNodeByIndex(n).getLayout())}),m.afterStep(function(e,t,r){for(var a=0,l=e.length;a<l;a++)e[a].fixed||o.getNodeByIndex(a).setLayout(e[a].p),n[i.getId(a)]=e[a].p;for(a=0,l=t.length;a<l;a++){var s=t[a],u=o.getEdgeByIndex(a),c=s.n1.p,d=s.n2.p,h=u.getLayout();(h=h?h.slice():[])[0]=h[0]||[],h[1]=h[1]||[],iu(h[0],c),iu(h[1],d),+s.curveness&&(h[2]=[(c[0]+d[0])/2-(c[1]-d[1])*s.curveness,(c[1]+d[1])/2-(d[0]-c[0])*s.curveness]),u.setLayout(h)}}),e.forceLayout=m,e.preservedPoints=n,m.step()}else e.forceLayout=null})}function HB(e,t){var n=[];return e.eachSeriesByType("graph",function(e){var o=e.get("coordinateSystem");if(!o||"view"===o){var i=e.getData(),r=[],a=[];cg(i.mapArray(function(e){var t=i.getItemModel(e);return[+t.get("x"),+t.get("y")]}),r,a),a[0]-r[0]===0&&(a[0]+=1,r[0]-=1),a[1]-r[1]===0&&(a[1]+=1,r[1]-=1);var l=(a[0]-r[0])/(a[1]-r[1]),s=function(e,t,n){return Q_(ps(e.getBoxLayoutParams(),{aspect:n}),{width:t.getWidth(),height:t.getHeight()})}(e,t,l);isNaN(l)&&(r=[s.x,s.y],a=[s.x+s.width,s.y+s.height]);var u=a[0]-r[0],c=a[1]-r[1],d=s.width,h=s.height,p=e.coordinateSystem=new SO;p.zoomLimit=e.get("scaleLimit"),p.setBoundingRect(r[0],r[1],u,c),p.setViewRect(s.x,s.y,d,h),p.setCenter(e.get("center"),t),p.setZoom(e.get("zoom")),n.push(p)}}),n}var WB=by.prototype,UB=Ty.prototype,YB=function(){return function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}}();function ZB(e){return isNaN(+e.cpx1)||isNaN(+e.cpy1)}!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Wl(t,e)}(YB);var XB=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-line",n}return Wl(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new YB},t.prototype.buildPath=function(e,t){ZB(t)?WB.buildPath.call(this,e,t):UB.buildPath.call(this,e,t)},t.prototype.pointAt=function(e){return ZB(this.shape)?WB.pointAt.call(this,e):UB.pointAt.call(this,e)},t.prototype.tangentAt=function(e){var t=this.shape,n=ZB(t)?[t.x2-t.x1,t.y2-t.y1]:UB.tangentAt.call(this,e);return hu(n,n)},t}(nv),jB=["fromSymbol","toSymbol"];function $B(e){return"_"+e+"Type"}function qB(e,t,n){var o=t.getItemVisual(n,e);if(!o||"none"===o)return o;var i=t.getItemVisual(n,e+"Size"),r=t.getItemVisual(n,e+"Rotate"),a=t.getItemVisual(n,e+"Offset"),l=t.getItemVisual(n,e+"KeepAspect"),s=xM(i);return o+s+_M(a||0,s)+(r||"")+(l||"")}function KB(e,t,n){var o=t.getItemVisual(n,e);if(o&&"none"!==o){var i=t.getItemVisual(n,e+"Size"),r=t.getItemVisual(n,e+"Rotate"),a=t.getItemVisual(n,e+"Offset"),l=t.getItemVisual(n,e+"KeepAspect"),s=xM(i),u=_M(a||0,s),c=yM(o,-s[0]/2+u[0],-s[1]/2+u[1],s[0],s[1],null,l);return c.__specifiedRotation=null==r||isNaN(r)?void 0:+r*Math.PI/180||0,c.name=e,c}}function JB(e,t){e.x1=t[0][0],e.y1=t[0][1],e.x2=t[1][0],e.y2=t[1][1],e.percent=1;var n=t[2];n?(e.cpx1=n[0],e.cpy1=n[1]):(e.cpx1=NaN,e.cpy1=NaN)}var QB=function(e){function t(t,n,o){var i=e.call(this)||this;return i._createLine(t,n,o),i}return Wl(t,e),t.prototype._createLine=function(e,t,n){var o=e.hostModel,i=function(e){var t=new XB({name:"line",subPixelOptimize:!0});return JB(t.shape,e),t}(e.getItemLayout(t));i.shape.percent=0,Uy(i,{shape:{percent:1}},o,t),this.add(i),ys(jB,function(n){var o=KB(n,e,t);this.add(o),this[$B(n)]=qB(n,e,t)},this),this._updateCommonStl(e,t,n)},t.prototype.updateData=function(e,t,n){var o=e.hostModel,i=this.childOfName("line"),r=e.getItemLayout(t),a={shape:{}};JB(a.shape,r),Wy(i,a,o,t),ys(jB,function(n){var o=qB(n,e,t),i=$B(n);if(this[i]!==o){this.remove(this.childOfName(n));var r=KB(n,e,t);this.add(r)}this[i]=o},this),this._updateCommonStl(e,t,n)},t.prototype.getLinePath=function(){return this.childAt(0)},t.prototype._updateCommonStl=function(e,t,n){var o=e.hostModel,i=this.childOfName("line"),r=n&&n.emphasisLineStyle,a=n&&n.blurLineStyle,l=n&&n.selectLineStyle,s=n&&n.labelStatesModels,u=n&&n.emphasisDisabled,c=n&&n.focus,d=n&&n.blurScope;if(!n||e.hasItemOption){var h=e.getItemModel(t),p=h.getModel("emphasis");r=p.getModel("lineStyle").getLineStyle(),a=h.getModel(["blur","lineStyle"]).getLineStyle(),l=h.getModel(["select","lineStyle"]).getLineStyle(),u=p.get("disabled"),c=p.get("focus"),d=p.get("blurScope"),s=kx(h)}var f=e.getItemVisual(t,"style"),g=f.stroke;i.useStyle(f),i.style.fill=null,i.style.strokeNoScale=!0,i.ensureState("emphasis").style=r,i.ensureState("blur").style=a,i.ensureState("select").style=l,ys(jB,function(e){var t=this.childOfName(e);if(t){t.setColor(g),t.style.opacity=f.opacity;for(var n=0;n<Pv.length;n++){var o=Pv[n],r=i.getState(o);if(r){var a=r.style||{},l=t.ensureState(o),s=l.style||(l.style={});null!=a.stroke&&(s[t.__isEmptyBrush?"stroke":"fill"]=a.stroke),null!=a.opacity&&(s.opacity=a.opacity)}}t.markRedraw()}},this);var v=o.getRawValue(t);Ix(this,s,{labelDataIndex:t,labelFetcher:{getFormattedLabel:function(t,n){return o.getFormattedLabel(t,n,e.dataType)}},inheritColor:g||"#000",defaultOpacity:f.opacity,defaultText:(null==v?e.getName(t):isFinite(v)?vp(v):v)+""});var m=this.getTextContent();if(m){var y=s.normal;m.__align=m.style.align,m.__verticalAlign=m.style.verticalAlign,m.__position=y.get("position")||"middle";var x=y.get("distance");Ms(x)||(x=[x,x]),m.__labelDistance=x}this.setTextConfig({position:null,local:!0,inside:!1}),xm(this,c,d,u)},t.prototype.highlight=function(){rm(this)},t.prototype.downplay=function(){am(this)},t.prototype.updateLayout=function(e,t){this.setLinePoints(e.getItemLayout(t))},t.prototype.setLinePoints=function(e){var t=this.childOfName("line");JB(t.shape,e),t.dirty()},t.prototype.beforeUpdate=function(){var e=this,t=e.childOfName("fromSymbol"),n=e.childOfName("toSymbol"),o=e.getTextContent();if(t||n||o&&!o.ignore){for(var i=1,r=this.parent;r;)r.scaleX&&(i/=r.scaleX),r=r.parent;var a=e.childOfName("line");if(this.__dirty||a.__dirty){var l=a.shape.percent,s=a.pointAt(0),u=a.pointAt(l),c=uu([],u,s);if(hu(c,c),t&&(t.setPosition(s),S(t,0),t.scaleX=t.scaleY=i*l,t.markRedraw()),n&&(n.setPosition(u),S(n,1),n.scaleX=n.scaleY=i*l,n.markRedraw()),o&&!o.ignore){o.x=o.y=0,o.originX=o.originY=0;var d=void 0,h=void 0,p=o.__labelDistance,f=p[0]*i,g=p[1]*i,v=l/2,m=a.tangentAt(v),y=[m[1],-m[0]],x=a.pointAt(v);y[1]>0&&(y[0]=-y[0],y[1]=-y[1]);var _=m[0]<0?-1:1;if("start"!==o.__position&&"end"!==o.__position){var w=-Math.atan2(m[1],m[0]);u[0]<s[0]&&(w=Math.PI+w),o.rotation=w}var b=void 0;switch(o.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":b=-g,h="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":b=g,h="top";break;default:b=0,h="middle"}switch(o.__position){case"end":o.x=c[0]*f+u[0],o.y=c[1]*g+u[1],d=c[0]>.8?"left":c[0]<-.8?"right":"center",h=c[1]>.8?"top":c[1]<-.8?"bottom":"middle";break;case"start":o.x=-c[0]*f+s[0],o.y=-c[1]*g+s[1],d=c[0]>.8?"right":c[0]<-.8?"left":"center",h=c[1]>.8?"bottom":c[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":o.x=f*_+s[0],o.y=s[1]+b,d=m[0]<0?"right":"left",o.originX=-f*_,o.originY=-b;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":o.x=x[0],o.y=x[1]+b,d="center",o.originY=-b;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":o.x=-f*_+u[0],o.y=u[1]+b,d=m[0]>=0?"right":"left",o.originX=f*_,o.originY=-b}o.scaleX=o.scaleY=i,o.setStyle({verticalAlign:o.__verticalAlign||h,align:o.__align||d})}}}function S(e,t){var n=e.__specifiedRotation;if(null==n){var o=a.tangentAt(t);e.attr("rotation",(1===t?-1:1)*Math.PI/2-Math.atan2(o[1],o[0]))}else e.attr("rotation",n)}},t}(lp),eR=function(){function e(e){this.group=new lp,this._LineCtor=e||QB}return e.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var n=this,o=n.group,i=n._lineData;n._lineData=e,i||o.removeAll();var r=tR(e);e.diff(i).add(function(n){t._doAdd(e,n,r)}).update(function(n,o){t._doUpdate(i,e,o,n,r)}).remove(function(e){o.remove(i.getItemGraphicEl(e))}).execute()},e.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,n){t.updateLayout(e,n)},this)},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=tR(e),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t){function n(e){e.isGroup||function(e){return e.animators&&e.animators.length>0}(e)||(e.incremental=!0,e.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[];for(var o=e.start;o<e.end;o++){if(oR(t.getItemLayout(o))){var i=new this._LineCtor(t,o,this._seriesScope);i.traverse(n),this.group.add(i),t.setItemGraphicEl(o,i),this._progressiveEls.push(i)}}},e.prototype.remove=function(){this.group.removeAll()},e.prototype.eachRendered=function(e){bx(this._progressiveEls||this.group,e)},e.prototype._doAdd=function(e,t,n){if(oR(e.getItemLayout(t))){var o=new this._LineCtor(e,t,n);e.setItemGraphicEl(t,o),this.group.add(o)}},e.prototype._doUpdate=function(e,t,n,o,i){var r=e.getItemGraphicEl(n);oR(t.getItemLayout(o))?(r?r.updateData(t,o,i):r=new this._LineCtor(t,o,i),t.setItemGraphicEl(o,r),this.group.add(r)):this.group.remove(r)},e}();function tR(e){var t=e.hostModel,n=t.getModel("emphasis");return{lineStyle:t.getModel("lineStyle").getLineStyle(),emphasisLineStyle:n.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:t.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:t.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:n.get("disabled"),blurScope:n.get("blurScope"),focus:n.get("focus"),labelStatesModels:kx(t)}}function nR(e){return isNaN(e[0])||isNaN(e[1])}function oR(e){return e&&!nR(e[0])&&!nR(e[1])}var iR=[],rR=[],aR=[],lR=Kc,sR=gu,uR=Math.abs;function cR(e,t,n){for(var o,i=e[0],r=e[1],a=e[2],l=1/0,s=n*n,u=.1,c=.1;c<=.9;c+=.1){iR[0]=lR(i[0],r[0],a[0],c),iR[1]=lR(i[1],r[1],a[1],c),(p=uR(sR(iR,t)-s))<l&&(l=p,o=c)}for(var d=0;d<32;d++){var h=o+u;rR[0]=lR(i[0],r[0],a[0],o),rR[1]=lR(i[1],r[1],a[1],o),aR[0]=lR(i[0],r[0],a[0],h),aR[1]=lR(i[1],r[1],a[1],h);var p=sR(rR,t)-s;if(uR(p)<.01)break;var f=sR(aR,t)-s;u/=2,p<0?f>=0?o+=u:o-=u:f>=0?o-=u:o+=u}return o}function dR(e,t){var n=[],o=ed,i=[[],[],[]],r=[[],[]],a=[];t/=2,e.eachEdge(function(e,l){var s=e.getLayout(),u=e.getVisual("fromSymbol"),c=e.getVisual("toSymbol");s.__original||(s.__original=[ru(s[0]),ru(s[1])],s[2]&&s.__original.push(ru(s[2])));var d=s.__original;if(null!=s[2]){if(iu(i[0],d[0]),iu(i[1],d[2]),iu(i[2],d[1]),u&&"none"!==u){var h=LB(e.node1),p=cR(i,d[0],h*t);o(i[0][0],i[1][0],i[2][0],p,n),i[0][0]=n[3],i[1][0]=n[4],o(i[0][1],i[1][1],i[2][1],p,n),i[0][1]=n[3],i[1][1]=n[4]}if(c&&"none"!==c){h=LB(e.node2),p=cR(i,d[1],h*t);o(i[0][0],i[1][0],i[2][0],p,n),i[1][0]=n[1],i[2][0]=n[2],o(i[0][1],i[1][1],i[2][1],p,n),i[1][1]=n[1],i[2][1]=n[2]}iu(s[0],i[0]),iu(s[1],i[2]),iu(s[2],i[1])}else{if(iu(r[0],d[0]),iu(r[1],d[1]),uu(a,r[1],r[0]),hu(a,a),u&&"none"!==u){h=LB(e.node1);su(r[0],r[0],a,h*t)}if(c&&"none"!==c){h=LB(e.node2);su(r[1],r[1],a,-h*t)}iu(s[0],r[0]),iu(s[1],r[1])}})}function hR(e){return"view"===e.type}var pR=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.prototype.init=function(e,t){var n=new DE,o=new eR,i=this.group;this._controller=new hV(t.getZr()),this._controllerHost={target:i},i.add(n.group),i.add(o.group),this._symbolDraw=n,this._lineDraw=o,this._firstRender=!0},t.prototype.render=function(e,t,n){var o=this,i=e.coordinateSystem;this._model=e;var r=this._symbolDraw,a=this._lineDraw,l=this.group;if(hR(i)){var s={x:i.x,y:i.y,scaleX:i.scaleX,scaleY:i.scaleY};this._firstRender?l.attr(s):Wy(l,s,e)}dR(e.getGraph(),AB(e));var u=e.getData();r.updateData(u);var c=e.getEdgeData();a.updateData(c),this._updateNodeAndLinkScale(),this._updateController(e,t,n),clearTimeout(this._layoutTimeout);var d=e.forceLayout,h=e.get(["force","layoutAnimation"]);d&&this._startForceLayoutIteration(d,h);var p=e.get("layout");u.graph.eachNode(function(t){var n=t.dataIndex,i=t.getGraphicEl(),r=t.getModel();if(i){i.off("drag").off("dragend");var a=r.get("draggable");a&&i.on("drag",function(r){switch(p){case"force":d.warmUp(),!o._layouting&&o._startForceLayoutIteration(d,h),d.setFixed(n),u.setItemLayout(n,[i.x,i.y]);break;case"circular":u.setItemLayout(n,[i.x,i.y]),t.setLayout({fixed:!0},!0),PB(e,"symbolSize",t,[r.offsetX,r.offsetY]),o.updateLayout(e);break;default:u.setItemLayout(n,[i.x,i.y]),NB(e.getGraph(),e),o.updateLayout(e)}}).on("dragend",function(){d&&d.setUnfixed(n)}),i.setDraggable(a,!!r.get("cursor")),"adjacency"===r.get(["emphasis","focus"])&&(Nv(i).focus=t.getAdjacentDataIndices())}}),u.graph.eachEdge(function(e){var t=e.getGraphicEl(),n=e.getModel().get(["emphasis","focus"]);t&&"adjacency"===n&&(Nv(t).focus={edge:[e.dataIndex],node:[e.node1.dataIndex,e.node2.dataIndex]})});var f="circular"===e.get("layout")&&e.get(["circular","rotateLabel"]),g=u.getLayout("cx"),v=u.getLayout("cy");u.graph.eachNode(function(e){RB(e,f,g,v)}),this._firstRender=!1},t.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype._startForceLayoutIteration=function(e,t){var n=this;!function o(){e.step(function(e){n.updateLayout(n._model),(n._layouting=!e)&&(t?n._layoutTimeout=setTimeout(o,16):o())})}()},t.prototype._updateController=function(e,t,n){var o=this,i=this._controller,r=this._controllerHost,a=this.group;i.setPointerChecker(function(t,o,i){var r=a.getBoundingRect();return r.applyTransform(a.transform),r.contain(o,i)&&!_V(t,n,e)}),hR(e.coordinateSystem)?(i.enable(e.get("roam")),r.zoomLimit=e.get("scaleLimit"),r.zoom=e.coordinateSystem.getZoom(),i.off("pan").off("zoom").on("pan",function(t){vV(r,t.dx,t.dy),n.dispatchAction({seriesId:e.id,type:"graphRoam",dx:t.dx,dy:t.dy})}).on("zoom",function(t){mV(r,t.scale,t.originX,t.originY),n.dispatchAction({seriesId:e.id,type:"graphRoam",zoom:t.scale,originX:t.originX,originY:t.originY}),o._updateNodeAndLinkScale(),dR(e.getGraph(),AB(e)),o._lineDraw.updateLayout(),n.updateLabelLayout()})):i.disable()},t.prototype._updateNodeAndLinkScale=function(){var e=this._model,t=e.getData(),n=AB(e);t.eachItemGraphicEl(function(e,t){e&&e.setSymbolScale(n)})},t.prototype.updateLayout=function(e){dR(e.getGraph(),AB(e)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},t.prototype.remove=function(){clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},t.type="graph",t}(aC);function fR(e){return"_EC_"+e}var gR=function(){function e(e){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return e.prototype.isDirected=function(){return this._directed},e.prototype.addNode=function(e,t){e=null==e?""+t:""+e;var n=this._nodesMap;if(!n[fR(e)]){var o=new vR(e,t);return o.hostGraph=this,this.nodes.push(o),n[fR(e)]=o,o}process.env.NODE_ENV},e.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},e.prototype.getNodeById=function(e){return this._nodesMap[fR(e)]},e.prototype.addEdge=function(e,t,n){var o=this._nodesMap,i=this._edgesMap;if(Ds(e)&&(e=this.nodes[e]),Ds(t)&&(t=this.nodes[t]),e instanceof vR||(e=o[fR(e)]),t instanceof vR||(t=o[fR(t)]),e&&t){var r=e.id+"-"+t.id,a=new mR(e,t,n);return a.hostGraph=this,this._directed&&(e.outEdges.push(a),t.inEdges.push(a)),e.edges.push(a),e!==t&&t.edges.push(a),this.edges.push(a),i[r]=a,a}},e.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},e.prototype.getEdge=function(e,t){e instanceof vR&&(e=e.id),t instanceof vR&&(t=t.id);var n=this._edgesMap;return this._directed?n[e+"-"+t]:n[e+"-"+t]||n[t+"-"+e]},e.prototype.eachNode=function(e,t){for(var n=this.nodes,o=n.length,i=0;i<o;i++)n[i].dataIndex>=0&&e.call(t,n[i],i)},e.prototype.eachEdge=function(e,t){for(var n=this.edges,o=n.length,i=0;i<o;i++)n[i].dataIndex>=0&&n[i].node1.dataIndex>=0&&n[i].node2.dataIndex>=0&&e.call(t,n[i],i)},e.prototype.breadthFirstTraverse=function(e,t,n,o){if(t instanceof vR||(t=this._nodesMap[fR(t)]),t){for(var i="out"===n?"outEdges":"in"===n?"inEdges":"edges",r=0;r<this.nodes.length;r++)this.nodes[r].__visited=!1;if(!e.call(o,t,null))for(var a=[t];a.length;){var l=a.shift(),s=l[i];for(r=0;r<s.length;r++){var u=s[r],c=u.node1===l?u.node2:u.node1;if(!c.__visited){if(e.call(o,c,l))return;a.push(c),c.__visited=!0}}}}},e.prototype.update=function(){for(var e=this.data,t=this.edgeData,n=this.nodes,o=this.edges,i=0,r=n.length;i<r;i++)n[i].dataIndex=-1;for(i=0,r=e.count();i<r;i++)n[e.getRawIndex(i)].dataIndex=i;t.filterSelf(function(e){var n=o[t.getRawIndex(e)];return n.node1.dataIndex>=0&&n.node2.dataIndex>=0});for(i=0,r=o.length;i<r;i++)o[i].dataIndex=-1;for(i=0,r=t.count();i<r;i++)o[t.getRawIndex(i)].dataIndex=i},e.prototype.clone=function(){for(var t=new e(this._directed),n=this.nodes,o=this.edges,i=0;i<n.length;i++)t.addNode(n[i].id,n[i].dataIndex);for(i=0;i<o.length;i++){var r=o[i];t.addEdge(r.node1.id,r.node2.id,r.dataIndex)}return t},e}(),vR=function(){function e(e,t){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=null==e?"":e,this.dataIndex=null==t?-1:t}return e.prototype.degree=function(){return this.edges.length},e.prototype.inDegree=function(){return this.inEdges.length},e.prototype.outDegree=function(){return this.outEdges.length},e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostGraph.data.getItemModel(this.dataIndex).getModel(e)},e.prototype.getAdjacentDataIndices=function(){for(var e={edge:[],node:[]},t=0;t<this.edges.length;t++){var n=this.edges[t];n.dataIndex<0||(e.edge.push(n.dataIndex),e.node.push(n.node1.dataIndex,n.node2.dataIndex))}return e},e.prototype.getTrajectoryDataIndices=function(){for(var e=qs(),t=qs(),n=0;n<this.edges.length;n++){var o=this.edges[n];if(!(o.dataIndex<0)){e.set(o.dataIndex,!0);for(var i=[o.node1],r=[o.node2],a=0;a<i.length;){var l=i[a];a++,t.set(l.dataIndex,!0);for(var s=0;s<l.inEdges.length;s++)e.set(l.inEdges[s].dataIndex,!0),i.push(l.inEdges[s].node1)}for(a=0;a<r.length;){var u=r[a];a++,t.set(u.dataIndex,!0);for(s=0;s<u.outEdges.length;s++)e.set(u.outEdges[s].dataIndex,!0),r.push(u.outEdges[s].node2)}}}return{edge:e.keys(),node:t.keys()}},e}(),mR=function(){function e(e,t,n){this.dataIndex=-1,this.node1=e,this.node2=t,this.dataIndex=null==n?-1:n}return e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(e)},e.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},e.prototype.getTrajectoryDataIndices=function(){var e=qs(),t=qs();e.set(this.dataIndex,!0);for(var n=[this.node1],o=[this.node2],i=0;i<n.length;){var r=n[i];i++,t.set(r.dataIndex,!0);for(var a=0;a<r.inEdges.length;a++)e.set(r.inEdges[a].dataIndex,!0),n.push(r.inEdges[a].node1)}for(i=0;i<o.length;){var l=o[i];i++,t.set(l.dataIndex,!0);for(a=0;a<l.outEdges.length;a++)e.set(l.outEdges[a].dataIndex,!0),o.push(l.outEdges[a].node2)}return{edge:e.keys(),node:t.keys()}},e}();function yR(e,t){return{getValue:function(n){var o=this[e][t];return o.getStore().get(o.getDimensionIndex(n||"value"),this.dataIndex)},setVisual:function(n,o){this.dataIndex>=0&&this[e][t].setItemVisual(this.dataIndex,n,o)},getVisual:function(n){return this[e][t].getItemVisual(this.dataIndex,n)},setLayout:function(n,o){this.dataIndex>=0&&this[e][t].setItemLayout(this.dataIndex,n,o)},getLayout:function(){return this[e][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[e][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[e][t].getRawIndex(this.dataIndex)}}}function xR(e,t,n,o,i){for(var r=new gR(o),a=0;a<e.length;a++)r.addNode(Bs(e[a].id,e[a].name,a),a);var l=[],s=[],u=0;for(a=0;a<t.length;a++){var c=t[a],d=c.source,h=c.target;r.addEdge(d,h,u)&&(s.push(c),l.push(Bs(nf(c.id,null),d+" > "+h)),u++)}var p,f=n.get("coordinateSystem");if("cartesian2d"===f||"polar"===f)p=RI(e,n);else{var g=jw.get(f),v=g&&g.dimensions||[];gs(v,"value")<0&&v.concat(["value"]);var m=NI(e,{coordDimensions:v,encodeDefine:n.getEncode()}).dimensions;(p=new DI(m,n)).initData(e)}var y=new DI(["value"],n);return y.initData(s,l),i&&i(p,y),oP({mainData:p,struct:r,structAttr:"graph",datas:{node:p,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),r.update(),r}vs(vR,yR("hostGraph","data")),vs(mR,yR("hostGraph","edgeData"));var _R=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return Wl(t,e),t.prototype.init=function(t){e.prototype.init.apply(this,arguments);var n=this;function o(){return n._categoriesData}this.legendVisualProvider=new ZA(o,o),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},t.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},t.prototype.mergeDefaultAndTheme=function(t){e.prototype.mergeDefaultAndTheme.apply(this,arguments),$p(t,"edgeLabel",["show"])},t.prototype.getInitialData=function(e,t){var n,o=e.edges||e.links||[],i=e.data||e.nodes||[],r=this;if(i&&o){SB(n=this)&&(n.__curvenessList=[],n.__edgeMap={},CB(n));var a=xR(i,o,this,!0,function(e,t){e.wrapMethod("getItemModel",function(e){var t=r._categoriesModels[e.getShallow("category")];return t&&(t.parentModel=e.parentModel,e.parentModel=t),e});var n=Kx.prototype.getModel;function o(e,t){var o=n.call(this,e,t);return o.resolveParentPath=i,o}function i(e){if(e&&("label"===e[0]||"label"===e[1])){var t=e.slice();return"label"===e[0]?t[0]="edgeLabel":"label"===e[1]&&(t[1]="edgeLabel"),t}return e}t.wrapMethod("getItemModel",function(e){return e.resolveParentPath=i,e.getModel=o,e})});return ys(a.edges,function(e){!function(e,t,n,o){if(SB(n)){var i=MB(e,t,n),r=n.__edgeMap,a=r[TB(i)];r[i]&&!a?r[i].isForward=!0:a&&r[i]&&(a.isForward=!0,r[i].isForward=!1),r[i]=r[i]||[],r[i].push(o)}}(e.node1,e.node2,this,e.dataIndex)},this),a.data}},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.getCategoriesData=function(){return this._categoriesData},t.prototype.formatTooltip=function(e,t,n){if("edge"===n){var o=this.getData(),i=this.getDataParams(e,n),r=o.graph.getEdgeByIndex(e),a=o.getName(r.node1.dataIndex),l=o.getName(r.node2.dataIndex),s=[];return null!=a&&s.push(a),null!=l&&s.push(l),AS("nameValue",{name:s.join(" > "),value:i.value,noValue:null==i.value})}return US({series:this,dataIndex:e,multipleSeries:t})},t.prototype._updateCategoriesData=function(){var e=xs(this.option.categories||[],function(e){return null!=e.value?e:ps({value:0},e)}),t=new DI(["value"],this);t.initData(e),this._categoriesData=t,this._categoriesModels=t.mapArray(function(e){return t.getItemModel(e)})},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.isAnimationEnabled=function(){return e.prototype.isAnimationEnabled.call(this)&&!("force"===this.get("layout")&&this.get(["force","layoutAnimation"]))},t.type="series.graph",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},t}(jS),wR={type:"graphRoam",event:"graphRoam",update:"none"};var bR=function(){return function(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}}(),SR=function(e){function t(t){var n=e.call(this,t)||this;return n.type="pointer",n}return Wl(t,e),t.prototype.getDefaultShape=function(){return new bR},t.prototype.buildPath=function(e,t){var n=Math.cos,o=Math.sin,i=t.r,r=t.width,a=t.angle,l=t.x-n(a)*r*(r>=i/3?1:2),s=t.y-o(a)*r*(r>=i/3?1:2);a=t.angle-Math.PI/2,e.moveTo(l,s),e.lineTo(t.x+n(a)*r,t.y+o(a)*r),e.lineTo(t.x+n(t.angle)*i,t.y+o(t.angle)*i),e.lineTo(t.x-n(a)*r,t.y-o(a)*r),e.lineTo(l,s)},t}(nv);function CR(e,t){var n=null==e?"":e+"";return t&&(Is(t)?n=t.replace("{value}",n):Ts(t)&&(n=t(e))),n}var MR=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.prototype.render=function(e,t,n){this.group.removeAll();var o=e.get(["axisLine","lineStyle","color"]),i=function(e,t){var n=e.get("center"),o=t.getWidth(),i=t.getHeight(),r=Math.min(o,i);return{cx:gp(n[0],t.getWidth()),cy:gp(n[1],t.getHeight()),r:gp(e.get("radius"),r/2)}}(e,n);this._renderMain(e,t,n,o,i),this._data=e.getData()},t.prototype.dispose=function(){},t.prototype._renderMain=function(e,t,n,o,i){var r=this.group,a=e.get("clockwise"),l=-e.get("startAngle")/180*Math.PI,s=-e.get("endAngle")/180*Math.PI,u=e.getModel("axisLine"),c=u.get("roundCap")?uA:hy,d=u.get("show"),h=u.getModel("lineStyle"),p=h.get("width"),f=[l,s];Vg(f,!a);for(var g=(s=f[1])-(l=f[0]),v=l,m=[],y=0;d&&y<o.length;y++){var x=new c({shape:{startAngle:v,endAngle:s=l+g*Math.min(Math.max(o[y][0],0),1),cx:i.cx,cy:i.cy,clockwise:a,r0:i.r-p,r:i.r},silent:!0});x.setStyle({fill:o[y][1]}),x.setStyle(h.getLineStyle(["color","width"])),m.push(x),v=s}m.reverse(),ys(m,function(e){return r.add(e)});var _=function(e){if(e<=0)return o[0][1];var t;for(t=0;t<o.length;t++)if(o[t][0]>=e&&(0===t?0:o[t-1][0])<e)return o[t][1];return o[t-1][1]};this._renderTicks(e,t,n,_,i,l,s,a,p),this._renderTitleAndDetail(e,t,n,_,i),this._renderAnchor(e,i),this._renderPointer(e,t,n,_,i,l,s,a,p)},t.prototype._renderTicks=function(e,t,n,o,i,r,a,l,s){for(var u,c,d=this.group,h=i.cx,p=i.cy,f=i.r,g=+e.get("min"),v=+e.get("max"),m=e.getModel("splitLine"),y=e.getModel("axisTick"),x=e.getModel("axisLabel"),_=e.get("splitNumber"),w=y.get("splitNumber"),b=gp(m.get("length"),f),S=gp(y.get("length"),f),C=r,M=(a-r)/_,T=M/w,I=m.getModel("lineStyle").getLineStyle(),k=y.getModel("lineStyle").getLineStyle(),D=m.get("distance"),N=0;N<=_;N++){if(u=Math.cos(C),c=Math.sin(C),m.get("show")){var E=new by({shape:{x1:u*(f-(A=D?D+s:s))+h,y1:c*(f-A)+p,x2:u*(f-b-A)+h,y2:c*(f-b-A)+p},style:I,silent:!0});"auto"===I.stroke&&E.setStyle({stroke:o(N/_)}),d.add(E)}if(x.get("show")){var A=x.get("distance")+D,L=CR(vp(N/_*(v-g)+g),x.get("formatter")),V=o(N/_),O=u*(f-b-A)+h,P=c*(f-b-A)+p,B=x.get("rotate"),R=0;"radial"===B?(R=-C+2*Math.PI)>Math.PI/2&&(R+=Math.PI):"tangential"===B?R=-C-Math.PI/2:Ds(B)&&(R=B*Math.PI/180),0===R?d.add(new mv({style:Dx(x,{text:L,x:O,y:P,verticalAlign:c<-.8?"top":c>.8?"bottom":"middle",align:u<-.4?"left":u>.4?"right":"center"},{inheritColor:V}),silent:!0})):d.add(new mv({style:Dx(x,{text:L,x:O,y:P,verticalAlign:"middle",align:"center"},{inheritColor:V}),silent:!0,originX:O,originY:P,rotation:R}))}if(y.get("show")&&N!==_){A=(A=y.get("distance"))?A+s:s;for(var z=0;z<=w;z++){u=Math.cos(C),c=Math.sin(C);var F=new by({shape:{x1:u*(f-A)+h,y1:c*(f-A)+p,x2:u*(f-S-A)+h,y2:c*(f-S-A)+p},silent:!0,style:k});"auto"===k.stroke&&F.setStyle({stroke:o((N+z/w)/_)}),d.add(F),C+=T}C-=T}else C+=M}},t.prototype._renderPointer=function(e,t,n,o,i,r,a,l,s){var u=this.group,c=this._data,d=this._progressEls,h=[],p=e.get(["pointer","show"]),f=e.getModel("progress"),g=f.get("show"),v=e.getData(),m=v.mapDimension("value"),y=+e.get("min"),x=+e.get("max"),_=[y,x],w=[r,a];function b(t,n){var o,r=v.getItemModel(t).getModel("pointer"),a=gp(r.get("width"),i.r),l=gp(r.get("length"),i.r),s=e.get(["pointer","icon"]),u=r.get("offsetCenter"),c=gp(u[0],i.r),d=gp(u[1],i.r),h=r.get("keepAspect");return(o=s?yM(s,c-a/2,d-l,a,l,null,h):new SR({shape:{angle:-Math.PI/2,width:a,r:l,x:c,y:d}})).rotation=-(n+Math.PI/2),o.x=i.cx,o.y=i.cy,o}function S(e,t){var n=f.get("roundCap")?uA:hy,o=f.get("overlap"),a=o?f.get("width"):s/v.count(),u=o?i.r-a:i.r-(e+1)*a,c=o?i.r:i.r-e*a,d=new n({shape:{startAngle:r,endAngle:t,cx:i.cx,cy:i.cy,clockwise:l,r0:u,r:c}});return o&&(d.z2=fp(v.get(m,e),[y,x],[100,0],!0)),d}(g||p)&&(v.diff(c).add(function(t){var n=v.get(m,t);if(p){var o=b(t,r);Uy(o,{rotation:-((isNaN(+n)?w[0]:fp(n,_,w,!0))+Math.PI/2)},e),u.add(o),v.setItemGraphicEl(t,o)}if(g){var i=S(t,r),a=f.get("clip");Uy(i,{shape:{endAngle:fp(n,_,w,a)}},e),u.add(i),Ev(e.seriesIndex,v.dataType,t,i),h[t]=i}}).update(function(t,n){var o=v.get(m,t);if(p){var i=c.getItemGraphicEl(n),a=i?i.rotation:r,l=b(t,a);l.rotation=a,Wy(l,{rotation:-((isNaN(+o)?w[0]:fp(o,_,w,!0))+Math.PI/2)},e),u.add(l),v.setItemGraphicEl(t,l)}if(g){var s=d[n],y=S(t,s?s.shape.endAngle:r),x=f.get("clip");Wy(y,{shape:{endAngle:fp(o,_,w,x)}},e),u.add(y),Ev(e.seriesIndex,v.dataType,t,y),h[t]=y}}).execute(),v.each(function(e){var t=v.getItemModel(e),n=t.getModel("emphasis"),i=n.get("focus"),r=n.get("blurScope"),a=n.get("disabled");if(p){var l=v.getItemGraphicEl(e),s=v.getItemVisual(e,"style"),u=s.fill;if(l instanceof lv){var c=l.style;l.useStyle(ps({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},s))}else l.useStyle(s),"pointer"!==l.type&&l.setColor(u);l.setStyle(t.getModel(["pointer","itemStyle"]).getItemStyle()),"auto"===l.style.fill&&l.setStyle("fill",o(fp(v.get(m,e),_,[0,1],!0))),l.z2EmphasisLift=0,Sm(l,t),xm(l,i,r,a)}if(g){var d=h[e];d.useStyle(v.getItemVisual(e,"style")),d.setStyle(t.getModel(["progress","itemStyle"]).getItemStyle()),d.z2EmphasisLift=0,Sm(d,t),xm(d,i,r,a)}}),this._progressEls=h)},t.prototype._renderAnchor=function(e,t){var n=e.getModel("anchor");if(n.get("show")){var o=n.get("size"),i=n.get("icon"),r=n.get("offsetCenter"),a=n.get("keepAspect"),l=yM(i,t.cx-o/2+gp(r[0],t.r),t.cy-o/2+gp(r[1],t.r),o,o,null,a);l.z2=n.get("showAbove")?1:0,l.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(l)}},t.prototype._renderTitleAndDetail=function(e,t,n,o,i){var r=this,a=e.getData(),l=a.mapDimension("value"),s=+e.get("min"),u=+e.get("max"),c=new lp,d=[],h=[],p=e.isAnimationEnabled(),f=e.get(["pointer","showAbove"]);a.diff(this._data).add(function(e){d[e]=new mv({silent:!0}),h[e]=new mv({silent:!0})}).update(function(e,t){d[e]=r._titleEls[t],h[e]=r._detailEls[t]}).execute(),a.each(function(t){var n=a.getItemModel(t),r=a.get(l,t),g=new lp,v=o(fp(r,[s,u],[0,1],!0)),m=n.getModel("title");if(m.get("show")){var y=m.get("offsetCenter"),x=i.cx+gp(y[0],i.r),_=i.cy+gp(y[1],i.r);(k=d[t]).attr({z2:f?0:2,style:Dx(m,{x:x,y:_,text:a.getName(t),align:"center",verticalAlign:"middle"},{inheritColor:v})}),g.add(k)}var w=n.getModel("detail");if(w.get("show")){var b=w.get("offsetCenter"),S=i.cx+gp(b[0],i.r),C=i.cy+gp(b[1],i.r),M=gp(w.get("width"),i.r),T=gp(w.get("height"),i.r),I=e.get(["progress","show"])?a.getItemVisual(t,"style").fill:v,k=h[t],D=w.get("formatter");k.attr({z2:f?0:2,style:Dx(w,{x:S,y:C,text:CR(r,D),width:isNaN(M)?null:M,height:isNaN(T)?null:T,align:"center",verticalAlign:"middle"},{inheritColor:I})}),Bx(k,{normal:w},r,function(e){return CR(e,D)}),p&&Rx(k,t,a,e,{getFormattedLabel:function(e,t,n,o,i,a){return CR(a?a.interpolatedValue:r,D)}}),g.add(k)}c.add(g)}),this.group.add(c),this._titleEls=d,this._detailEls=h},t.type="gauge",t}(aC),TR=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.visualStyleAccessPath="itemStyle",n}return Wl(t,e),t.prototype.getInitialData=function(e,t){return YA(this,["value"])},t.type="series.gauge",t.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},t}(jS);var IR=["itemStyle","opacity"],kR=function(e){function t(t,n){var o=e.call(this)||this,i=o,r=new xy,a=new mv;return i.setTextContent(a),o.setTextGuideLine(r),o.updateData(t,n,!0),o}return Wl(t,e),t.prototype.updateData=function(e,t,n){var o=this,i=e.hostModel,r=e.getItemModel(t),a=e.getItemLayout(t),l=r.getModel("emphasis"),s=r.get(IR);s=null==s?1:s,n||$y(o),o.useStyle(e.getItemVisual(t,"style")),o.style.lineJoin="round",n?(o.setShape({points:a.points}),o.style.opacity=0,Uy(o,{style:{opacity:s}},i,t)):Wy(o,{style:{opacity:s},shape:{points:a.points}},i,t),Sm(o,r),this._updateLabel(e,t),xm(this,l.get("focus"),l.get("blurScope"),l.get("disabled"))},t.prototype._updateLabel=function(e,t){var n=this,o=this.getTextGuideLine(),i=n.getTextContent(),r=e.hostModel,a=e.getItemModel(t),l=e.getItemLayout(t).label,s=e.getItemVisual(t,"style"),u=s.fill;Ix(i,kx(a),{labelFetcher:e.hostModel,labelDataIndex:t,defaultOpacity:s.opacity,defaultText:e.getName(t)},{normal:{align:l.textAlign,verticalAlign:l.verticalAlign}}),n.setTextConfig({local:!0,inside:!!l.inside,insideStroke:u,outsideFill:u});var c=l.linePoints;o.setShape({points:c}),n.textGuideLineConfig={anchor:c?new tc(c[0][0],c[0][1]):null},Wy(i,{style:{x:l.x,y:l.y}},r,t),i.attr({rotation:l.rotation,originX:l.x,originY:l.y,z2:10}),FD(n,GD(a),{stroke:u})},t}(my),DR=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.ignoreLabelLineUpdate=!0,n}return Wl(t,e),t.prototype.render=function(e,t,n){var o=e.getData(),i=this._data,r=this.group;o.diff(i).add(function(e){var t=new kR(o,e);o.setItemGraphicEl(e,t),r.add(t)}).update(function(e,t){var n=i.getItemGraphicEl(t);n.updateData(o,e),r.add(n),o.setItemGraphicEl(e,n)}).remove(function(t){jy(i.getItemGraphicEl(t),e,t)}).execute(),this._data=o},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.prototype.dispose=function(){},t.type="funnel",t}(aC),NR=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new ZA(Ss(this.getData,this),Ss(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.getInitialData=function(e,t){return YA(this,{coordDimensions:["value"],encodeDefaulter:Cs(Cw,this)})},t.prototype._defaultLabelLine=function(e){$p(e,"labelLine",["show"]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.prototype.getDataParams=function(t){var n=this.getData(),o=e.prototype.getDataParams.call(this,t),i=n.mapDimension("value"),r=n.getSum(i);return o.percent=r?+(n.get(i,t)/r*100).toFixed(2):0,o.$vars.push("percent"),o},t.type="series.funnel",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},t}(jS);function ER(e,t){e.eachSeriesByType("funnel",function(e){var n=e.getData(),o=n.mapDimension("value"),i=e.get("sort"),r=function(e,t){return Q_(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}(e,t),a=e.get("orient"),l=r.width,s=r.height,u=function(e,t){for(var n=e.mapDimension("value"),o=e.mapArray(n,function(e){return e}),i=[],r="ascending"===t,a=0,l=e.count();a<l;a++)i[a]=a;return Ts(t)?i.sort(t):"none"!==t&&i.sort(function(e,t){return r?o[e]-o[t]:o[t]-o[e]}),i}(n,i),c=r.x,d=r.y,h="horizontal"===a?[gp(e.get("minSize"),s),gp(e.get("maxSize"),s)]:[gp(e.get("minSize"),l),gp(e.get("maxSize"),l)],p=n.getDataExtent(o),f=e.get("min"),g=e.get("max");null==f&&(f=Math.min(p[0],0)),null==g&&(g=p[1]);var v=e.get("funnelAlign"),m=e.get("gap"),y=(("horizontal"===a?l:s)-m*(n.count()-1))/n.count(),x=function(e,t){if("horizontal"===a){var i=fp(n.get(o,e)||0,[f,g],h,!0),r=void 0;switch(v){case"top":r=d;break;case"center":r=d+(s-i)/2;break;case"bottom":r=d+(s-i)}return[[t,r],[t,r+i]]}var u,p=fp(n.get(o,e)||0,[f,g],h,!0);switch(v){case"left":u=c;break;case"center":u=c+(l-p)/2;break;case"right":u=c+l-p}return[[u,t],[u+p,t]]};"ascending"===i&&(y=-y,m=-m,"horizontal"===a?c+=l:d+=s,u=u.reverse());for(var _=0;_<u.length;_++){var w=u[_],b=u[_+1],S=n.getItemModel(w);if("horizontal"===a){var C=S.get(["itemStyle","width"]);null==C?C=y:(C=gp(C,l),"ascending"===i&&(C=-C));var M=x(w,c),T=x(b,c+C);c+=C+m,n.setItemLayout(w,{points:M.concat(T.slice().reverse())})}else{var I=S.get(["itemStyle","height"]);null==I?I=y:(I=gp(I,s),"ascending"===i&&(I=-I));M=x(w,d),T=x(b,d+I);d+=I+m,n.setItemLayout(w,{points:M.concat(T.slice().reverse())})}}!function(e){var t=e.hostModel.get("orient");e.each(function(n){var o,i,r,a,l=e.getItemModel(n),s=l.getModel("label").get("position"),u=l.getModel("labelLine"),c=e.getItemLayout(n),d=c.points,h="inner"===s||"inside"===s||"center"===s||"insideLeft"===s||"insideRight"===s;if(h)"insideLeft"===s?(i=(d[0][0]+d[3][0])/2+5,r=(d[0][1]+d[3][1])/2,o="left"):"insideRight"===s?(i=(d[1][0]+d[2][0])/2-5,r=(d[1][1]+d[2][1])/2,o="right"):(i=(d[0][0]+d[1][0]+d[2][0]+d[3][0])/4,r=(d[0][1]+d[1][1]+d[2][1]+d[3][1])/4,o="center"),a=[[i,r],[i,r]];else{var p=void 0,f=void 0,g=void 0,v=void 0,m=u.get("length");"production"!==process.env.NODE_ENV&&("vertical"===t&&["top","bottom"].indexOf(s)>-1&&(s="left"),"horizontal"===t&&["left","right"].indexOf(s)>-1&&(s="bottom")),"left"===s?(p=(d[3][0]+d[0][0])/2,f=(d[3][1]+d[0][1])/2,i=(g=p-m)-5,o="right"):"right"===s?(p=(d[1][0]+d[2][0])/2,f=(d[1][1]+d[2][1])/2,i=(g=p+m)+5,o="left"):"top"===s?(p=(d[3][0]+d[0][0])/2,r=(v=(f=(d[3][1]+d[0][1])/2)-m)-5,o="center"):"bottom"===s?(p=(d[1][0]+d[2][0])/2,r=(v=(f=(d[1][1]+d[2][1])/2)+m)+5,o="center"):"rightTop"===s?(p="horizontal"===t?d[3][0]:d[1][0],f="horizontal"===t?d[3][1]:d[1][1],"horizontal"===t?(r=(v=f-m)-5,o="center"):(i=(g=p+m)+5,o="top")):"rightBottom"===s?(p=d[2][0],f=d[2][1],"horizontal"===t?(r=(v=f+m)+5,o="center"):(i=(g=p+m)+5,o="bottom")):"leftTop"===s?(p=d[0][0],f="horizontal"===t?d[0][1]:d[1][1],"horizontal"===t?(r=(v=f-m)-5,o="center"):(i=(g=p-m)-5,o="right")):"leftBottom"===s?(p="horizontal"===t?d[1][0]:d[3][0],f="horizontal"===t?d[1][1]:d[2][1],"horizontal"===t?(r=(v=f+m)+5,o="center"):(i=(g=p-m)-5,o="right")):(p=(d[1][0]+d[2][0])/2,f=(d[1][1]+d[2][1])/2,"horizontal"===t?(r=(v=f+m)+5,o="center"):(i=(g=p+m)+5,o="left")),"horizontal"===t?i=g=p:r=v=f,a=[[p,f],[g,v]]}c.label={linePoints:a,x:i,y:r,verticalAlign:"middle",textAlign:o,inside:h}})}(n)})}var AR=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._dataGroup=new lp,n._initialized=!1,n}return Wl(t,e),t.prototype.init=function(){this.group.add(this._dataGroup)},t.prototype.render=function(e,t,n,o){this._progressiveEls=null;var i=this._dataGroup,r=e.getData(),a=this._data,l=e.coordinateSystem,s=l.dimensions,u=OR(e);if(r.diff(a).add(function(e){PR(VR(r,i,e,s,l),r,e,u)}).update(function(t,n){var o=a.getItemGraphicEl(n),i=LR(r,t,s,l);r.setItemGraphicEl(t,o),Wy(o,{shape:{points:i}},e,t),$y(o),PR(o,r,t,u)}).remove(function(e){var t=a.getItemGraphicEl(e);i.remove(t)}).execute(),!this._initialized){this._initialized=!0;var c=function(e,t,n){var o=e.model,i=e.getRect(),r=new fv({shape:{x:i.x,y:i.y,width:i.width,height:i.height}}),a="horizontal"===o.get("layout")?"width":"height";return r.setShape(a,0),Uy(r,{shape:{width:i.width,height:i.height}},t,n),r}(l,e,function(){setTimeout(function(){i.removeClipPath()})});i.setClipPath(c)}this._data=r},t.prototype.incrementalPrepareRender=function(e,t,n){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},t.prototype.incrementalRender=function(e,t,n){for(var o=t.getData(),i=t.coordinateSystem,r=i.dimensions,a=OR(t),l=this._progressiveEls=[],s=e.start;s<e.end;s++){var u=VR(o,this._dataGroup,s,r,i);u.incremental=!0,PR(u,o,s,a),l.push(u)}},t.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},t.type="parallel",t}(aC);function LR(e,t,n,o){for(var i=[],r=0;r<n.length;r++){var a=n[r],l=e.get(e.mapDimension(a),t);BR(l,o.getAxis(a).type)||i.push(o.dataToPoint(l,a))}return i}function VR(e,t,n,o,i){var r=LR(e,n,o,i),a=new xy({shape:{points:r},z2:10});return t.add(a),e.setItemGraphicEl(n,a),a}function OR(e){var t=e.get("smooth",!0);return!0===t&&(t=.3),Ps(t=Ep(t))&&(t=0),{smooth:t}}function PR(e,t,n,o){e.useStyle(t.getItemVisual(n,"style")),e.style.fill=null,e.setShape("smooth",o.smooth);var i=t.getItemModel(n),r=i.getModel("emphasis");Sm(e,i,"lineStyle"),xm(e,r.get("focus"),r.get("blurScope"),r.get("disabled"))}function BR(e,t){return"category"===t?null==e:null==e||isNaN(e)}var RR=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.visualStyleAccessPath="lineStyle",n.visualDrawType="stroke",n}return Wl(t,e),t.prototype.getInitialData=function(e,t){return RI(null,this,{useEncodeDefaulter:Ss(zR,null,this)})},t.prototype.getRawIndicesByActiveState=function(e){var t=this.coordinateSystem,n=this.getData(),o=[];return t.eachActiveState(n,function(t,i){e===t&&o.push(n.getRawIndex(i))}),o},t.type="series.parallel",t.dependencies=["parallel"],t.defaultOption={z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"},t}(jS);function zR(e){var t=e.ecModel.getComponent("parallel",e.get("parallelIndex"));if(t){var n={};return ys(t.dimensions,function(e){var t=+e.replace("dim","");n[e]=t}),n}}var FR=["lineStyle","opacity"],GR={seriesType:"parallel",reset:function(e,t){var n=e.coordinateSystem,o={normal:e.get(["lineStyle","opacity"]),active:e.get("activeOpacity"),inactive:e.get("inactiveOpacity")};return{progress:function(e,t){n.eachActiveState(t,function(e,n){var i=o[e];if("normal"===e&&t.hasItemOption){var r=t.getItemModel(n).get(FR,!0);null!=r&&(i=r)}t.ensureUniqueItemVisual(n,"style").opacity=i},e.start,e.end)}}}};function HR(e){!function(e){if(e.parallel)return;var t=!1;ys(e.series,function(e){e&&"parallel"===e.type&&(t=!0)}),t&&(e.parallel=[{}])}(e),function(e){var t=jp(e.parallelAxis);ys(t,function(t){if(Ns(t)){var n=t.parallelIndex||0,o=jp(e.parallel)[n];o&&o.parallelAxisDefault&&ds(t,o.parallelAxisDefault,!1)}})}(e)}var WR=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.prototype.render=function(e,t,n){this._model=e,this._api=n,this._handlers||(this._handlers={},ys(UR,function(e,t){n.getZr().on(t,this._handlers[t]=Ss(e,this))},this)),vC(this,"_throttledDispatchExpand",e.get("axisExpandRate"),"fixRate")},t.prototype.dispose=function(e,t){mC(this,"_throttledDispatchExpand"),ys(this._handlers,function(e,n){t.getZr().off(n,e)}),this._handlers=null},t.prototype._throttledDispatchExpand=function(e){this._dispatchExpand(e)},t.prototype._dispatchExpand=function(e){e&&this._api.dispatchAction(ps({type:"parallelAxisExpand"},e))},t.type="parallel",t}(nC),UR={mousedown:function(e){YR(this,"click")&&(this._mouseDownPoint=[e.offsetX,e.offsetY])},mouseup:function(e){var t=this._mouseDownPoint;if(YR(this,"click")&&t){var n=[e.offsetX,e.offsetY];if(Math.pow(t[0]-n[0],2)+Math.pow(t[1]-n[1],2)>5)return;var o=this._model.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]);"none"!==o.behavior&&this._dispatchExpand({axisExpandWindow:o.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(e){if(!this._mouseDownPoint&&YR(this,"mousemove")){var t=this._model,n=t.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]),o=n.behavior;"jump"===o&&this._throttledDispatchExpand.debounceNextCall(t.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===o?null:{axisExpandWindow:n.axisExpandWindow,animation:"jump"===o?null:{duration:0}})}}};function YR(e,t){var n=e._model;return n.get("axisExpandable")&&n.get("axisExpandTriggerOn")===t}var ZR=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.prototype.init=function(){e.prototype.init.apply(this,arguments),this.mergeOption({})},t.prototype.mergeOption=function(e){var t=this.option;e&&ds(t,e,!0),this._initDimensions()},t.prototype.contains=function(e,t){var n=e.get("parallelIndex");return null!=n&&t.getComponent("parallel",n)===this},t.prototype.setAxisExpand=function(e){ys(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(t){e.hasOwnProperty(t)&&(this.option[t]=e[t])},this)},t.prototype._initDimensions=function(){var e=this.dimensions=[],t=this.parallelAxisIndex=[];ys(ws(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(e){return(e.get("parallelIndex")||0)===this.componentIndex},this),function(n){e.push("dim"+n.get("dim")),t.push(n.componentIndex)})},t.type="parallel",t.dependencies=["parallelAxis"],t.layoutMode="box",t.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},t}(aw),XR=function(e){function t(t,n,o,i,r){var a=e.call(this,t,n,o)||this;return a.type=i||"value",a.axisIndex=r,a}return Wl(t,e),t.prototype.isHorizontal=function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")},t}(vD);function jR(e,t,n,o,i,r){e=e||0;var a=n[1]-n[0];if(null!=i&&(i=qR(i,[0,a])),null!=r&&(r=Math.max(r,null!=i?i:0)),"all"===o){var l=Math.abs(t[1]-t[0]);l=qR(l,[0,a]),i=r=qR(l,[i,r]),o=0}t[0]=qR(t[0],n),t[1]=qR(t[1],n);var s=$R(t,o);t[o]+=e;var u,c=i||0,d=n.slice();return s.sign<0?d[0]+=c:d[1]-=c,t[o]=qR(t[o],d),u=$R(t,o),null!=i&&(u.sign!==s.sign||u.span<i)&&(t[1-o]=t[o]+s.sign*i),u=$R(t,o),null!=r&&u.span>r&&(t[1-o]=t[o]+u.sign*r),t}function $R(e,t){var n=e[t]-e[1-t];return{span:Math.abs(n),sign:n>0?-1:n<0?1:t?-1:1}}function qR(e,t){return Math.min(null!=t[1]?t[1]:1/0,Math.max(null!=t[0]?t[0]:-1/0,e))}var KR=ys,JR=Math.min,QR=Math.max,ez=Math.floor,tz=Math.ceil,nz=vp,oz=Math.PI,iz=function(){function e(e,t,n){this.type="parallel",this._axesMap=qs(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,t,n)}return e.prototype._init=function(e,t,n){var o=e.dimensions,i=e.parallelAxisIndex;KR(o,function(e,n){var o=i[n],r=t.getComponent("parallelAxis",o),a=this._axesMap.set(e,new XR(e,Rk(r),[0,0],r.get("type"),o)),l="category"===a.type;a.onBand=l&&r.get("boundaryGap"),a.inverse=r.get("inverse"),r.axis=a,a.model=r,a.coordinateSystem=r.coordinateSystem=this},this)},e.prototype.update=function(e,t){this._updateAxesFromSeries(this._model,e)},e.prototype.containPoint=function(e){var t=this._makeLayoutInfo(),n=t.axisBase,o=t.layoutBase,i=t.pixelDimIndex,r=e[1-i],a=e[i];return r>=n&&r<=n+t.axisLength&&a>=o&&a<=o+t.layoutLength},e.prototype.getModel=function(){return this._model},e.prototype._updateAxesFromSeries=function(e,t){t.eachSeries(function(n){if(e.contains(n,t)){var o=n.getData();KR(this.dimensions,function(e){var t=this._axesMap.get(e);t.scale.unionExtentFromData(o,o.mapDimension(e)),Bk(t.scale,t.model)},this)}},this)},e.prototype.resize=function(e,t){this._rect=Q_(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),this._layoutAxes()},e.prototype.getRect=function(){return this._rect},e.prototype._makeLayoutInfo=function(){var e,t=this._model,n=this._rect,o=["x","y"],i=["width","height"],r=t.get("layout"),a="horizontal"===r?0:1,l=n[i[a]],s=[0,l],u=this.dimensions.length,c=rz(t.get("axisExpandWidth"),s),d=rz(t.get("axisExpandCount")||0,[0,u]),h=t.get("axisExpandable")&&u>3&&u>d&&d>1&&c>0&&l>0,p=t.get("axisExpandWindow");p?(e=rz(p[1]-p[0],s),p[1]=p[0]+e):(e=rz(c*(d-1),s),(p=[c*(t.get("axisExpandCenter")||ez(u/2))-e/2])[1]=p[0]+e);var f=(l-e)/(u-d);f<3&&(f=0);var g=[ez(nz(p[0]/c,1))+1,tz(nz(p[1]/c,1))-1],v=f/c*p[0];return{layout:r,pixelDimIndex:a,layoutBase:n[o[a]],layoutLength:l,axisBase:n[o[1-a]],axisLength:n[i[1-a]],axisExpandable:h,axisExpandWidth:c,axisCollapseWidth:f,axisExpandWindow:p,axisCount:u,winInnerIndices:g,axisExpandWindow0Pos:v}},e.prototype._layoutAxes=function(){var e=this._rect,t=this._axesMap,n=this.dimensions,o=this._makeLayoutInfo(),i=o.layout;t.each(function(e){var t=[0,o.axisLength],n=e.inverse?1:0;e.setExtent(t[n],t[1-n])}),KR(n,function(t,n){var r=(o.axisExpandable?lz:az)(n,o),a={horizontal:{x:r.position,y:o.axisLength},vertical:{x:0,y:r.position}},l={horizontal:oz/2,vertical:0},s=[a[i].x+e.x,a[i].y+e.y],u=l[i],c=[1,0,0,1,0,0];Ju(c,c,u),Ku(c,c,s),this._axesLayout[t]={position:s,rotation:u,transform:c,axisNameAvailableWidth:r.axisNameAvailableWidth,axisLabelShow:r.axisLabelShow,nameTruncateMaxWidth:r.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},e.prototype.getAxis=function(e){return this._axesMap.get(e)},e.prototype.dataToPoint=function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},e.prototype.eachActiveState=function(e,t,n,o){null==n&&(n=0),null==o&&(o=e.count());var i=this._axesMap,r=this.dimensions,a=[],l=[];ys(r,function(t){a.push(e.mapDimension(t)),l.push(i.get(t).model)});for(var s=this.hasAxisBrushed(),u=n;u<o;u++){var c=void 0;if(s){c="active";for(var d=e.getValues(a,u),h=0,p=r.length;h<p;h++){if("inactive"===l[h].getActiveState(d[h])){c="inactive";break}}}else c="normal";t(c,u)}},e.prototype.hasAxisBrushed=function(){for(var e=this.dimensions,t=this._axesMap,n=!1,o=0,i=e.length;o<i;o++)"normal"!==t.get(e[o]).model.getActiveState()&&(n=!0);return n},e.prototype.axisCoordToPoint=function(e,t){return cx([e,0],this._axesLayout[t].transform)},e.prototype.getAxisLayout=function(e){return cs(this._axesLayout[e])},e.prototype.getSlidedAxisExpandWindow=function(e){var t=this._makeLayoutInfo(),n=t.pixelDimIndex,o=t.axisExpandWindow.slice(),i=o[1]-o[0],r=[0,t.axisExpandWidth*(t.axisCount-1)];if(!this.containPoint(e))return{behavior:"none",axisExpandWindow:o};var a,l=e[n]-t.layoutBase-t.axisExpandWindow0Pos,s="slide",u=t.axisCollapseWidth,c=this._model.get("axisExpandSlideTriggerArea"),d=null!=c[0];if(u)d&&u&&l<i*c[0]?(s="jump",a=l-i*c[2]):d&&u&&l>i*(1-c[0])?(s="jump",a=l-i*(1-c[2])):(a=l-i*c[1])>=0&&(a=l-i*(1-c[1]))<=0&&(a=0),(a*=t.axisExpandWidth/u)?jR(a,o,r,"all"):s="none";else{var h=o[1]-o[0];(o=[QR(0,r[1]*l/h-h/2)])[1]=JR(r[1],o[0]+h),o[0]=o[1]-h}return{axisExpandWindow:o,behavior:s}},e}();function rz(e,t){return JR(QR(e,t[0]),t[1])}function az(e,t){var n=t.layoutLength/(t.axisCount-1);return{position:n*e,axisNameAvailableWidth:n,axisLabelShow:!0}}function lz(e,t){var n,o,i=t.layoutLength,r=t.axisExpandWidth,a=t.axisCount,l=t.axisCollapseWidth,s=t.winInnerIndices,u=l,c=!1;return e<s[0]?(n=e*l,o=l):e<=s[1]?(n=t.axisExpandWindow0Pos+e*r-t.axisExpandWindow[0],u=r,c=!0):(n=i-(a-1-e)*l,o=l),{position:n,axisNameAvailableWidth:u,axisLabelShow:c,nameTruncateMaxWidth:o}}var sz={create:function(e,t){var n=[];return e.eachComponent("parallel",function(o,i){var r=new iz(o,e,t);r.name="parallel_"+i,r.resize(o,t),o.coordinateSystem=r,r.model=o,n.push(r)}),e.eachSeries(function(e){if("parallel"===e.get("coordinateSystem")){var t=e.getReferringComponents("parallel",pf).models[0];e.coordinateSystem=t.coordinateSystem}}),n}},uz=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.activeIntervals=[],n}return Wl(t,e),t.prototype.getAreaSelectStyle=function(){return kf([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},t.prototype.setActiveIntervals=function(e){var t=this.activeIntervals=cs(e);if(t)for(var n=t.length-1;n>=0;n--)mp(t[n])},t.prototype.getActiveState=function(e){var t=this.activeIntervals;if(!t.length)return"normal";if(null==e||isNaN(+e))return"inactive";if(1===t.length){var n=t[0];if(n[0]<=e&&e<=n[1])return"active"}else for(var o=0,i=t.length;o<i;o++)if(t[o][0]<=e&&e<=t[o][1])return"active";return"inactive"},t}(aw);vs(uz,Yk);var cz=!0,dz=Math.min,hz=Math.max,pz=Math.pow,fz="globalPan",gz={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},vz={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},mz={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},yz=0,xz=function(e){function t(t){var n=e.call(this)||this;return n._track=[],n._covers=[],n._handlers={},"production"!==process.env.NODE_ENV&&Hs(t),n._zr=t,n.group=new lp,n._uid="brushController_"+yz++,ys(Zz,function(e,t){this._handlers[t]=Ss(e,this)},n),n}return Wl(t,e),t.prototype.enableBrush=function(e){return"production"!==process.env.NODE_ENV&&Hs(this._mounted),this._brushType&&this._doDisableBrush(),e.brushType&&this._doEnableBrush(e),this},t.prototype._doEnableBrush=function(e){var t=this._zr;this._enableGlobalPan||function(e,t,n){dV(e)[t]=n}(t,fz,this._uid),ys(this._handlers,function(e,n){t.on(n,e)}),this._brushType=e.brushType,this._brushOption=ds(cs(mz),e,!0)},t.prototype._doDisableBrush=function(){var e=this._zr;!function(e,t,n){var o=dV(e);o[t]===n&&(o[t]=null)}(e,fz,this._uid),ys(this._handlers,function(t,n){e.off(n,t)}),this._brushType=this._brushOption=null},t.prototype.setPanels=function(e){if(e&&e.length){var t=this._panels={};ys(e,function(e){t[e.panelId]=cs(e)})}else this._panels=null;return this},t.prototype.mount=function(e){e=e||{},"production"!==process.env.NODE_ENV&&(this._mounted=!0),this._enableGlobalPan=e.enableGlobalPan;var t=this.group;return this._zr.add(t),t.attr({x:e.x||0,y:e.y||0,rotation:e.rotation||0,scaleX:e.scaleX||1,scaleY:e.scaleY||1}),this._transform=t.getLocalTransform(),this},t.prototype.updateCovers=function(e){"production"!==process.env.NODE_ENV&&Hs(this._mounted),e=xs(e,function(e){return ds(cs(mz),e,!0)});var t=this._covers,n=this._covers=[],o=this,i=this._creatingCover;return new rI(t,e,function(e,t){return r(e.__brushOption,t)},r).add(a).update(a).remove(function(e){t[e]!==i&&o.group.remove(t[e])}).execute(),this;function r(e,t){return(null!=e.id?e.id:"\0-brush-index-"+t)+"-"+e.brushType}function a(r,a){var l=e[r];if(null!=a&&t[a]===i)n[r]=t[a];else{var s=n[r]=null!=a?(t[a].__brushOption=l,t[a]):wz(o,_z(o,l));Cz(o,s)}}},t.prototype.unmount=function(){if("production"===process.env.NODE_ENV||this._mounted)return this.enableBrush(!1),kz(this),this._zr.remove(this.group),"production"!==process.env.NODE_ENV&&(this._mounted=!1),this},t.prototype.dispose=function(){this.unmount(),this.off()},t}(bu);function _z(e,t){var n=jz[t.brushType].createCover(e,t);return n.__brushOption=t,Sz(n,t),e.group.add(n),n}function wz(e,t){var n=Mz(t);return n.endCreating&&(n.endCreating(e,t),Sz(t,t.__brushOption)),t}function bz(e,t){var n=t.__brushOption;Mz(t).updateCoverShape(e,t,n.range,n)}function Sz(e,t){var n=t.z;null==n&&(n=1e4),e.traverse(function(e){e.z=n,e.z2=n})}function Cz(e,t){Mz(t).updateCommon(e,t),bz(e,t)}function Mz(e){return jz[e.__brushOption.brushType]}function Tz(e,t,n){var o,i=e._panels;if(!i)return cz;var r=e._transform;return ys(i,function(e){e.isTargetByCursor(t,n,r)&&(o=e)}),o}function Iz(e,t){var n=e._panels;if(!n)return cz;var o=t.__brushOption.panelId;return null!=o?n[o]:cz}function kz(e){var t=e._covers,n=t.length;return ys(t,function(t){e.group.remove(t)},e),t.length=0,!!n}function Dz(e,t){var n=xs(e._covers,function(e){var t=e.__brushOption,n=cs(t.range);return{brushType:t.brushType,panelId:t.panelId,range:n}});e.trigger("brush",{areas:n,isEnd:!!t.isEnd,removeOnClick:!!t.removeOnClick})}function Nz(e){var t=e.length-1;return t<0&&(t=0),[e[0],e[t]]}function Ez(e,t,n,o){var i=new lp;return i.add(new fv({name:"main",style:Oz(n),silent:!0,draggable:!0,cursor:"move",drift:Cs(Rz,e,t,i,["n","s","w","e"]),ondragend:Cs(Dz,t,{isEnd:!0})})),ys(o,function(n){i.add(new fv({name:n.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:Cs(Rz,e,t,i,n),ondragend:Cs(Dz,t,{isEnd:!0})}))}),i}function Az(e,t,n,o){var i=o.brushStyle.lineWidth||0,r=hz(i,6),a=n[0][0],l=n[1][0],s=a-i/2,u=l-i/2,c=n[0][1],d=n[1][1],h=c-r+i/2,p=d-r+i/2,f=c-a,g=d-l,v=f+i,m=g+i;Vz(e,t,"main",a,l,f,g),o.transformable&&(Vz(e,t,"w",s,u,r,m),Vz(e,t,"e",h,u,r,m),Vz(e,t,"n",s,u,v,r),Vz(e,t,"s",s,p,v,r),Vz(e,t,"nw",s,u,r,r),Vz(e,t,"ne",h,u,r,r),Vz(e,t,"sw",s,p,r,r),Vz(e,t,"se",h,p,r,r))}function Lz(e,t){var n=t.__brushOption,o=n.transformable,i=t.childAt(0);i.useStyle(Oz(n)),i.attr({silent:!o,cursor:o?"move":"default"}),ys([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(n){var i=t.childOfName(n.join("")),r=1===n.length?Bz(e,n[0]):function(e,t){var n=[Bz(e,t[0]),Bz(e,t[1])];return("e"===n[0]||"w"===n[0])&&n.reverse(),n.join("")}(e,n);i&&i.attr({silent:!o,invisible:!o,cursor:o?vz[r]+"-resize":null})})}function Vz(e,t,n,o,i,r,a){var l,s,u,c,d,h=t.childOfName(n);h&&h.setShape((l=Gz(e,t,[[o,i],[o+r,i+a]]),s=dz(l[0][0],l[1][0]),u=dz(l[0][1],l[1][1]),c=hz(l[0][0],l[1][0]),d=hz(l[0][1],l[1][1]),{x:s,y:u,width:c-s,height:d-u}))}function Oz(e){return fs({strokeNoScale:!0},e.brushStyle)}function Pz(e,t,n,o){var i=[dz(e,n),dz(t,o)],r=[hz(e,n),hz(t,o)];return[[i[0],r[0]],[i[1],r[1]]]}function Bz(e,t){var n=dx({w:"left",e:"right",n:"top",s:"bottom"}[t],function(e){return ux(e.group)}(e));return{left:"w",right:"e",top:"n",bottom:"s"}[n]}function Rz(e,t,n,o,i,r){var a=n.__brushOption,l=e.toRectRange(a.range),s=Fz(t,i,r);ys(o,function(e){var t=gz[e];l[t[0]][t[1]]+=s[t[0]]}),a.range=e.fromRectRange(Pz(l[0][0],l[1][0],l[0][1],l[1][1])),Cz(t,n),Dz(t,{isEnd:!1})}function zz(e,t,n,o){var i=t.__brushOption.range,r=Fz(e,n,o);ys(i,function(e){e[0]+=r[0],e[1]+=r[1]}),Cz(e,t),Dz(e,{isEnd:!1})}function Fz(e,t,n){var o=e.group,i=o.transformCoordToLocal(t,n),r=o.transformCoordToLocal(0,0);return[i[0]-r[0],i[1]-r[1]]}function Gz(e,t,n){var o=Iz(e,t);return o&&o!==cz?o.clipPath(n,e._transform):cs(n)}function Hz(e){var t=e.event;t.preventDefault&&t.preventDefault()}function Wz(e,t,n){return e.childOfName("main").contain(t,n)}function Uz(e,t,n,o){var i,r=e._creatingCover,a=e._creatingPanel,l=e._brushOption;if(e._track.push(n.slice()),function(e){var t=e._track;if(!t.length)return!1;var n=t[t.length-1],o=t[0],i=n[0]-o[0],r=n[1]-o[1];return pz(i*i+r*r,.5)>6}(e)||r){if(a&&!r){"single"===l.brushMode&&kz(e);var s=cs(l);s.brushType=Yz(s.brushType,a),s.panelId=a===cz?null:a.panelId,r=e._creatingCover=_z(e,s),e._covers.push(r)}if(r){var u=jz[Yz(e._brushType,a)];r.__brushOption.range=u.getCreatingRange(Gz(e,r,e._track)),o&&(wz(e,r),u.updateCommon(e,r)),bz(e,r),i={isEnd:o}}}else o&&"single"===l.brushMode&&l.removeOnClick&&Tz(e,t,n)&&kz(e)&&(i={isEnd:o,removeOnClick:!0});return i}function Yz(e,t){return"auto"===e?("production"!==process.env.NODE_ENV&&Hs(t&&t.defaultBrushType,'MUST have defaultBrushType when brushType is "atuo"'),t.defaultBrushType):e}var Zz={mousedown:function(e){if(this._dragging)Xz(this,e);else if(!e.target||!e.target.draggable){Hz(e);var t=this.group.transformCoordToLocal(e.offsetX,e.offsetY);this._creatingCover=null,(this._creatingPanel=Tz(this,e,t))&&(this._dragging=!0,this._track=[t.slice()])}},mousemove:function(e){var t=e.offsetX,n=e.offsetY,o=this.group.transformCoordToLocal(t,n);if(function(e,t,n){if(e._brushType&&!function(e,t,n){var o=e._zr;return t<0||t>o.getWidth()||n<0||n>o.getHeight()}(e,t.offsetX,t.offsetY)){var o=e._zr,i=e._covers,r=Tz(e,t,n);if(!e._dragging)for(var a=0;a<i.length;a++){var l=i[a].__brushOption;if(r&&(r===cz||l.panelId===r.panelId)&&jz[l.brushType].contain(i[a],n[0],n[1]))return}r&&o.setCursorStyle("crosshair")}}(this,e,o),this._dragging){Hz(e);var i=Uz(this,e,o,!1);i&&Dz(this,i)}},mouseup:function(e){Xz(this,e)}};function Xz(e,t){if(e._dragging){Hz(t);var n=t.offsetX,o=t.offsetY,i=e.group.transformCoordToLocal(n,o),r=Uz(e,t,i,!0);e._dragging=!1,e._track=[],e._creatingCover=null,r&&Dz(e,r)}}var jz={lineX:$z(0),lineY:$z(1),rect:{createCover:function(e,t){function n(e){return e}return Ez({toRectRange:n,fromRectRange:n},e,t,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(e){var t=Nz(e);return Pz(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(e,t,n,o){Az(e,t,n,o)},updateCommon:Lz,contain:Wz},polygon:{createCover:function(e,t){var n=new lp;return n.add(new xy({name:"main",style:Oz(t),silent:!0})),n},getCreatingRange:function(e){return e},endCreating:function(e,t){t.remove(t.childAt(0)),t.add(new my({name:"main",draggable:!0,drift:Cs(zz,e,t),ondragend:Cs(Dz,e,{isEnd:!0})}))},updateCoverShape:function(e,t,n,o){t.childAt(0).setShape({points:Gz(e,t,n)})},updateCommon:Lz,contain:Wz}};function $z(e){return{createCover:function(t,n){return Ez({toRectRange:function(t){var n=[t,[0,100]];return e&&n.reverse(),n},fromRectRange:function(t){return t[e]}},t,n,[[["w"],["e"]],[["n"],["s"]]][e])},getCreatingRange:function(t){var n=Nz(t);return[dz(n[0][e],n[1][e]),hz(n[0][e],n[1][e])]},updateCoverShape:function(t,n,o,i){var r,a=Iz(t,n);if(a!==cz&&a.getLinearBrushOtherExtent)r=a.getLinearBrushOtherExtent(e);else{var l=t._zr;r=[0,[l.getWidth(),l.getHeight()][1-e]]}var s=[o,r];e&&s.reverse(),Az(t,n,s,i)},updateCommon:Lz,contain:Wz}}function qz(e){return e=Qz(e),function(t){return fx(t,e)}}function Kz(e,t){return e=Qz(e),function(n){var o=null!=t?t:n,i=o?e.width:e.height,r=o?e.x:e.y;return[r,r+(i||0)]}}function Jz(e,t,n){var o=Qz(e);return function(e,i){return o.contain(i[0],i[1])&&!_V(e,t,n)}}function Qz(e){return cc.create(e)}var eF=["axisLine","axisTickLabel","axisName"],tF=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.prototype.init=function(t,n){e.prototype.init.apply(this,arguments),(this._brushController=new xz(n.getZr())).on("brush",Ss(this._onBrush,this))},t.prototype.render=function(e,t,n,o){if(!function(e,t,n){return n&&"axisAreaSelect"===n.type&&t.findComponents({mainType:"parallelAxis",query:n})[0]===e}(e,t,o)){this.axisModel=e,this.api=n,this.group.removeAll();var i=this._axisGroup;if(this._axisGroup=new lp,this.group.add(this._axisGroup),e.get("show")){var r=function(e,t){return t.getComponent("parallel",e.get("parallelIndex"))}(e,t),a=r.coordinateSystem,l=e.getAreaSelectStyle(),s=l.width,u=e.axis.dim,c=ps({strokeContainThreshold:s},a.getAxisLayout(u)),d=new CL(e,c);ys(eF,d.add,d),this._axisGroup.add(d.getGroup()),this._refreshBrushController(c,l,e,r,s,n),px(i,this._axisGroup,e)}}},t.prototype._refreshBrushController=function(e,t,n,o,i,r){var a=n.axis.getExtent(),l=a[1]-a[0],s=Math.min(30,.1*Math.abs(l)),u=cc.create({x:a[0],y:-i/2,width:l,height:i});u.x-=s,u.width+=2*s,this._brushController.mount({enableGlobalPan:!0,rotation:e.rotation,x:e.position[0],y:e.position[1]}).setPanels([{panelId:"pl",clipPath:qz(u),isTargetByCursor:Jz(u,r,o),getLinearBrushOtherExtent:Kz(u,0)}]).enableBrush({brushType:"lineX",brushStyle:t,removeOnClick:!0}).updateCovers(function(e){var t=e.axis;return xs(e.activeIntervals,function(e){return{brushType:"lineX",panelId:"pl",range:[t.dataToCoord(e[0],!0),t.dataToCoord(e[1],!0)]}})}(n))},t.prototype._onBrush=function(e){var t=e.areas,n=this.axisModel,o=n.axis,i=xs(t,function(e){return[o.coordToData(e.range[0],!0),o.coordToData(e.range[1],!0)]});(!n.option.realtime===e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:n.id,intervals:i})},t.prototype.dispose=function(){this._brushController.dispose()},t.type="parallelAxis",t}(nC);var nF={type:"axisAreaSelect",event:"axisAreaSelected"};var oF={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function iF(e){e.registerComponentView(WR),e.registerComponentModel(ZR),e.registerCoordinateSystem("parallel",sz),e.registerPreprocessor(HR),e.registerComponentModel(uz),e.registerComponentView(tF),lL(e,"parallel",uz,oF),function(e){e.registerAction(nF,function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},function(t){t.axis.model.setActiveIntervals(e.intervals)})}),e.registerAction("parallelAxisExpand",function(e,t){t.eachComponent({mainType:"parallel",query:e},function(t){t.setAxisExpand(e)})})}(e)}var rF=function(){return function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}}(),aF=function(e){function t(t){return e.call(this,t)||this}return Wl(t,e),t.prototype.getDefaultShape=function(){return new rF},t.prototype.buildPath=function(e,t){var n=t.extent;e.moveTo(t.x1,t.y1),e.bezierCurveTo(t.cpx1,t.cpy1,t.cpx2,t.cpy2,t.x2,t.y2),"vertical"===t.orient?(e.lineTo(t.x2+n,t.y2),e.bezierCurveTo(t.cpx2+n,t.cpy2,t.cpx1+n,t.cpy1,t.x1+n,t.y1)):(e.lineTo(t.x2,t.y2+n),e.bezierCurveTo(t.cpx2,t.cpy2+n,t.cpx1,t.cpy1+n,t.x1,t.y1+n)),e.closePath()},t.prototype.highlight=function(){rm(this)},t.prototype.downplay=function(){am(this)},t}(nv),lF=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._focusAdjacencyDisabled=!1,n}return Wl(t,e),t.prototype.render=function(e,t,n){var o=this,i=e.getGraph(),r=this.group,a=e.layoutInfo,l=a.width,s=a.height,u=e.getData(),c=e.getData("edge"),d=e.get("orient");this._model=e,r.removeAll(),r.x=a.x,r.y=a.y,i.eachEdge(function(t){var n=new aF,o=Nv(n);o.dataIndex=t.dataIndex,o.seriesIndex=e.seriesIndex,o.dataType="edge";var i,a,u,h,p,f,g,v,m=t.getModel(),y=m.getModel("lineStyle"),x=y.get("curveness"),_=t.node1.getLayout(),w=t.node1.getModel(),b=w.get("localX"),S=w.get("localY"),C=t.node2.getLayout(),M=t.node2.getModel(),T=M.get("localX"),I=M.get("localY"),k=t.getLayout();n.shape.extent=Math.max(1,k.dy),n.shape.orient=d,"vertical"===d?(i=(null!=b?b*l:_.x)+k.sy,a=(null!=S?S*s:_.y)+_.dy,u=(null!=T?T*l:C.x)+k.ty,p=i,f=a*(1-x)+(h=null!=I?I*s:C.y)*x,g=u,v=a*x+h*(1-x)):(i=(null!=b?b*l:_.x)+_.dx,a=(null!=S?S*s:_.y)+k.sy,p=i*(1-x)+(u=null!=T?T*l:C.x)*x,f=a,g=i*x+u*(1-x),v=h=(null!=I?I*s:C.y)+k.ty),n.setShape({x1:i,y1:a,x2:u,y2:h,cpx1:p,cpy1:f,cpx2:g,cpy2:v}),n.useStyle(y.getItemStyle()),sF(n.style,d,t);var D=""+m.get("value"),N=kx(m,"edgeLabel");Ix(n,N,{labelFetcher:{getFormattedLabel:function(t,n,o,i,r,a){return e.getFormattedLabel(t,n,"edge",i,zs(r,N.normal&&N.normal.get("formatter"),D),a)}},labelDataIndex:t.dataIndex,defaultText:D}),n.setTextConfig({position:"inside"});var E=m.getModel("emphasis");Sm(n,m,"lineStyle",function(e){var n=e.getItemStyle();return sF(n,d,t),n}),r.add(n),c.setItemGraphicEl(t.dataIndex,n);var A=E.get("focus");xm(n,"adjacency"===A?t.getAdjacentDataIndices():"trajectory"===A?t.getTrajectoryDataIndices():A,E.get("blurScope"),E.get("disabled"))}),i.eachNode(function(t){var n=t.getLayout(),o=t.getModel(),i=o.get("localX"),a=o.get("localY"),c=o.getModel("emphasis"),d=o.get(["itemStyle","borderRadius"])||0,h=new fv({shape:{x:null!=i?i*l:n.x,y:null!=a?a*s:n.y,width:n.dx,height:n.dy,r:d},style:o.getModel("itemStyle").getItemStyle(),z2:10});Ix(h,kx(o),{labelFetcher:{getFormattedLabel:function(t,n){return e.getFormattedLabel(t,n,"node")}},labelDataIndex:t.dataIndex,defaultText:t.id}),h.disableLabelAnimation=!0,h.setStyle("fill",t.getVisual("color")),h.setStyle("decal",t.getVisual("style").decal),Sm(h,o),r.add(h),u.setItemGraphicEl(t.dataIndex,h),Nv(h).dataType="node";var p=c.get("focus");xm(h,"adjacency"===p?t.getAdjacentDataIndices():"trajectory"===p?t.getTrajectoryDataIndices():p,c.get("blurScope"),c.get("disabled"))}),u.eachItemGraphicEl(function(t,i){u.getItemModel(i).get("draggable")&&(t.drift=function(t,r){o._focusAdjacencyDisabled=!0,this.shape.x+=t,this.shape.y+=r,this.dirty(),n.dispatchAction({type:"dragNode",seriesId:e.id,dataIndex:u.getRawIndex(i),localX:this.shape.x/l,localY:this.shape.y/s})},t.ondragend=function(){o._focusAdjacencyDisabled=!1},t.draggable=!0,t.cursor="move")}),!this._data&&e.isAnimationEnabled()&&r.setClipPath(function(e,t,n){var o=new fv({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return Uy(o,{shape:{width:e.width+20}},t,n),o}(r.getBoundingRect(),e,function(){r.removeClipPath()})),this._data=e.getData()},t.prototype.dispose=function(){},t.type="sankey",t}(aC);function sF(e,t,n){switch(e.fill){case"source":e.fill=n.node1.getVisual("color"),e.decal=n.node1.getVisual("style").decal;break;case"target":e.fill=n.node2.getVisual("color"),e.decal=n.node2.getVisual("style").decal;break;case"gradient":var o=n.node1.getVisual("color"),i=n.node2.getVisual("color");Is(o)&&Is(i)&&(e.fill=new Ey(0,0,+("horizontal"===t),+("vertical"===t),[{color:o,offset:0},{color:i,offset:1}]))}}var uF=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.prototype.getInitialData=function(e,t){var n=e.edges||e.links||[],o=e.data||e.nodes||[],i=e.levels||[];this.levelModels=[];for(var r=this.levelModels,a=0;a<i.length;a++)if(null!=i[a].depth&&i[a].depth>=0)r[i[a].depth]=new Kx(i[a],this,t);else if("production"!==process.env.NODE_ENV)throw new Error("levels[i].depth is mandatory and should be natural number");return xR(o,n,this,!0,function(e,t){e.wrapMethod("getItemModel",function(e,t){var n=e.parentModel,o=n.getData().getItemLayout(t);if(o){var i=o.depth,r=n.levelModels[i];r&&(e.parentModel=r)}return e}),t.wrapMethod("getItemModel",function(e,t){var n=e.parentModel,o=n.getGraph().getEdgeByIndex(t).node1.getLayout();if(o){var i=o.depth,r=n.levelModels[i];r&&(e.parentModel=r)}return e})}).data},t.prototype.setNodePosition=function(e,t){var n=(this.option.data||this.option.nodes)[e];n.localX=t[0],n.localY=t[1]},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(e,t,n){function o(e){return isNaN(e)||null==e}if("edge"===n){var i=this.getDataParams(e,n),r=i.data,a=i.value;return AS("nameValue",{name:r.source+" -- "+r.target,value:a,noValue:o(a)})}var l=this.getGraph().getNodeByIndex(e).getLayout().value,s=this.getDataParams(e,n).data.name;return AS("nameValue",{name:null!=s?s+"":null,value:l,noValue:o(l)})},t.prototype.optionUpdated=function(){},t.prototype.getDataParams=function(t,n){var o=e.prototype.getDataParams.call(this,t,n);if(null==o.value&&"node"===n){var i=this.getGraph().getNodeByIndex(t).getLayout().value;o.value=i}return o},t.type="series.sankey",t.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},t}(jS);function cF(e,t){e.eachSeriesByType("sankey",function(e){var n=e.get("nodeWidth"),o=e.get("nodeGap"),i=function(e,t){return Q_(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}(e,t);e.layoutInfo=i;var r=i.width,a=i.height,l=e.getGraph(),s=l.nodes,u=l.edges;!function(e){ys(e,function(e){var t=_F(e.outEdges,xF),n=_F(e.inEdges,xF),o=e.getValue()||0,i=Math.max(t,n,o);e.setLayout({value:i},!0)})}(s),function(e,t,n,o,i,r,a,l,s){(function(e,t,n,o,i,r,a){for(var l=[],s=[],u=[],c=[],d=0,h=0;h<t.length;h++)l[h]=1;for(h=0;h<e.length;h++)s[h]=e[h].inEdges.length,0===s[h]&&u.push(e[h]);var p=-1;for(;u.length;){for(var f=0;f<u.length;f++){var g=u[f],v=g.hostGraph.data.getRawDataItem(g.dataIndex),m=null!=v.depth&&v.depth>=0;m&&v.depth>p&&(p=v.depth),g.setLayout({depth:m?v.depth:d},!0),"vertical"===r?g.setLayout({dy:n},!0):g.setLayout({dx:n},!0);for(var y=0;y<g.outEdges.length;y++){var x=g.outEdges[y];l[t.indexOf(x)]=0;var _=x.node2;0===--s[e.indexOf(_)]&&c.indexOf(_)<0&&c.push(_)}}++d,u=c,c=[]}for(h=0;h<l.length;h++)if(1===l[h])throw new Error("Sankey is a DAG, the original data has cycle!");var w=p>d-1?p:d-1;a&&"left"!==a&&function(e,t,n,o){if("right"===t){for(var i=[],r=e,a=0;r.length;){for(var l=0;l<r.length;l++){var s=r[l];s.setLayout({skNodeHeight:a},!0);for(var u=0;u<s.inEdges.length;u++){var c=s.inEdges[u];i.indexOf(c.node1)<0&&i.push(c.node1)}}r=i,i=[],++a}ys(e,function(e){dF(e)||e.setLayout({depth:Math.max(0,o-e.getLayout().skNodeHeight)},!0)})}else"justify"===t&&function(e,t){ys(e,function(e){dF(e)||e.outEdges.length||e.setLayout({depth:t},!0)})}(e,o)}(e,a,0,w);var b="vertical"===r?(i-n)/w:(o-n)/w;!function(e,t,n){ys(e,function(e){var o=e.getLayout().depth*t;"vertical"===n?e.setLayout({y:o},!0):e.setLayout({x:o},!0)})}(e,b,r)})(e,t,n,i,r,l,s),function(e,t,n,o,i,r,a){var l=function(e,t){var n=[],o="vertical"===t?"y":"x",i=mf(e,function(e){return e.getLayout()[o]});return i.keys.sort(function(e,t){return e-t}),ys(i.keys,function(e){n.push(i.buckets.get(e))}),n}(e,a);(function(e,t,n,o,i,r){var a=1/0;ys(e,function(e){var t=e.length,l=0;ys(e,function(e){l+=e.getLayout().value});var s="vertical"===r?(o-(t-1)*i)/l:(n-(t-1)*i)/l;s<a&&(a=s)}),ys(e,function(e){ys(e,function(e,t){var n=e.getLayout().value*a;"vertical"===r?(e.setLayout({x:t},!0),e.setLayout({dx:n},!0)):(e.setLayout({y:t},!0),e.setLayout({dy:n},!0))})}),ys(t,function(e){var t=+e.getValue()*a;e.setLayout({dy:t},!0)})})(l,t,n,o,i,a),hF(l,i,n,o,a);for(var s=1;r>0;r--)pF(l,s*=.99,a),hF(l,i,n,o,a),wF(l,s,a),hF(l,i,n,o,a)}(e,t,r,i,o,a,l),function(e,t){var n="vertical"===t?"x":"y";ys(e,function(e){e.outEdges.sort(function(e,t){return e.node2.getLayout()[n]-t.node2.getLayout()[n]}),e.inEdges.sort(function(e,t){return e.node1.getLayout()[n]-t.node1.getLayout()[n]})}),ys(e,function(e){var t=0,n=0;ys(e.outEdges,function(e){e.setLayout({sy:t},!0),t+=e.getLayout().dy}),ys(e.inEdges,function(e){e.setLayout({ty:n},!0),n+=e.getLayout().dy})})}(e,l)}(s,u,n,o,r,a,0!==ws(s,function(e){return 0===e.getLayout().value}).length?0:e.get("layoutIterations"),e.get("orient"),e.get("nodeAlign"))})}function dF(e){var t=e.hostGraph.data.getRawDataItem(e.dataIndex);return null!=t.depth&&t.depth>=0}function hF(e,t,n,o,i){var r="vertical"===i?"x":"y";ys(e,function(e){var a,l,s;e.sort(function(e,t){return e.getLayout()[r]-t.getLayout()[r]});for(var u=0,c=e.length,d="vertical"===i?"dx":"dy",h=0;h<c;h++)(s=u-(l=e[h]).getLayout()[r])>0&&(a=l.getLayout()[r]+s,"vertical"===i?l.setLayout({x:a},!0):l.setLayout({y:a},!0)),u=l.getLayout()[r]+l.getLayout()[d]+t;if((s=u-t-("vertical"===i?o:n))>0){a=l.getLayout()[r]-s,"vertical"===i?l.setLayout({x:a},!0):l.setLayout({y:a},!0),u=a;for(h=c-2;h>=0;--h)(s=(l=e[h]).getLayout()[r]+l.getLayout()[d]+t-u)>0&&(a=l.getLayout()[r]-s,"vertical"===i?l.setLayout({x:a},!0):l.setLayout({y:a},!0)),u=l.getLayout()[r]}})}function pF(e,t,n){ys(e.slice().reverse(),function(e){ys(e,function(e){if(e.outEdges.length){var o=_F(e.outEdges,fF,n)/_F(e.outEdges,xF);if(isNaN(o)){var i=e.outEdges.length;o=i?_F(e.outEdges,gF,n)/i:0}if("vertical"===n){var r=e.getLayout().x+(o-yF(e,n))*t;e.setLayout({x:r},!0)}else{var a=e.getLayout().y+(o-yF(e,n))*t;e.setLayout({y:a},!0)}}})})}function fF(e,t){return yF(e.node2,t)*e.getValue()}function gF(e,t){return yF(e.node2,t)}function vF(e,t){return yF(e.node1,t)*e.getValue()}function mF(e,t){return yF(e.node1,t)}function yF(e,t){return"vertical"===t?e.getLayout().x+e.getLayout().dx/2:e.getLayout().y+e.getLayout().dy/2}function xF(e){return e.getValue()}function _F(e,t,n){for(var o=0,i=e.length,r=-1;++r<i;){var a=+t(e[r],n);isNaN(a)||(o+=a)}return o}function wF(e,t,n){ys(e,function(e){ys(e,function(e){if(e.inEdges.length){var o=_F(e.inEdges,vF,n)/_F(e.inEdges,xF);if(isNaN(o)){var i=e.inEdges.length;o=i?_F(e.inEdges,mF,n)/i:0}if("vertical"===n){var r=e.getLayout().x+(o-yF(e,n))*t;e.setLayout({x:r},!0)}else{var a=e.getLayout().y+(o-yF(e,n))*t;e.setLayout({y:a},!0)}}})})}function bF(e){e.eachSeriesByType("sankey",function(e){var t=e.getGraph(),n=t.nodes,o=t.edges;if(n.length){var i=1/0,r=-1/0;ys(n,function(e){var t=e.getLayout().value;t<i&&(i=t),t>r&&(r=t)}),ys(n,function(t){var n=new FP({type:"color",mappingMethod:"linear",dataExtent:[i,r],visual:e.get("color")}).mapValueToVisual(t.getLayout().value),o=t.getModel().get(["itemStyle","color"]);null!=o?(t.setVisual("color",o),t.setVisual("style",{fill:o})):(t.setVisual("color",n),t.setVisual("style",{fill:n}))})}o.length&&ys(o,function(e){var t=e.getModel().get("lineStyle");e.setVisual("style",t)})})}var SF=function(){function e(){}return e.prototype._hasEncodeRule=function(e){var t=this.getEncode();return t&&null!=t.get(e)},e.prototype.getInitialData=function(e,t){var n,o,i=t.getComponent("xAxis",this.get("xAxisIndex")),r=t.getComponent("yAxis",this.get("yAxisIndex")),a=i.get("type"),l=r.get("type");"category"===a?(e.layout="horizontal",n=i.getOrdinalMeta(),o=!this._hasEncodeRule("x")):"category"===l?(e.layout="vertical",n=r.getOrdinalMeta(),o=!this._hasEncodeRule("y")):e.layout=e.layout||"horizontal";var s=["x","y"],u="horizontal"===e.layout?0:1,c=this._baseAxisDim=s[u],d=s[1-u],h=[i,r],p=h[u].get("type"),f=h[1-u].get("type"),g=e.data;if(g&&o){var v=[];ys(g,function(e,t){var n;Ms(e)?(n=e.slice(),e.unshift(t)):Ms(e.value)?((n=ps({},e)).value=n.value.slice(),e.value.unshift(t)):n=e,v.push(n)}),e.data=v}var m=this.defaultValueDimensions,y=[{name:c,type:sI(p),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:d,type:sI(f),dimsDef:m.slice()}];return YA(this,{coordDimensions:y,dimensionsCount:m.length+1,encodeDefaulter:Cs(Sw,y,this)})},e.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},e}(),CF=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],n.visualDrawType="stroke",n}return Wl(t,e),t.type="series.boxplot",t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},t}(jS);vs(CF,SF,!0);var MF=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.prototype.render=function(e,t,n){var o=e.getData(),i=this.group,r=this._data;this._data||i.removeAll();var a="horizontal"===e.get("layout")?1:0;o.diff(r).add(function(e){if(o.hasValue(e)){var t=kF(o.getItemLayout(e),o,e,a,!0);o.setItemGraphicEl(e,t),i.add(t)}}).update(function(e,t){var n=r.getItemGraphicEl(t);if(o.hasValue(e)){var l=o.getItemLayout(e);n?($y(n),DF(l,n,o,e)):n=kF(l,o,e,a),i.add(n),o.setItemGraphicEl(e,n)}else i.remove(n)}).remove(function(e){var t=r.getItemGraphicEl(e);t&&i.remove(t)}).execute(),this._data=o},t.prototype.remove=function(e){var t=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl(function(e){e&&t.remove(e)})},t.type="boxplot",t}(aC),TF=function(){return function(){}}(),IF=function(e){function t(t){var n=e.call(this,t)||this;return n.type="boxplotBoxPath",n}return Wl(t,e),t.prototype.getDefaultShape=function(){return new TF},t.prototype.buildPath=function(e,t){var n=t.points,o=0;for(e.moveTo(n[o][0],n[o][1]),o++;o<4;o++)e.lineTo(n[o][0],n[o][1]);for(e.closePath();o<n.length;o++)e.moveTo(n[o][0],n[o][1]),o++,e.lineTo(n[o][0],n[o][1])},t}(nv);function kF(e,t,n,o,i){var r=e.ends,a=new IF({shape:{points:i?NF(r,o,e):r}});return DF(e,a,t,n,i),a}function DF(e,t,n,o,i){var r=n.hostModel;(0,Sx[i?"initProps":"updateProps"])(t,{shape:{points:e.ends}},r,o),t.useStyle(n.getItemVisual(o,"style")),t.style.strokeNoScale=!0,t.z2=100;var a=n.getItemModel(o),l=a.getModel("emphasis");Sm(t,a),xm(t,l.get("focus"),l.get("blurScope"),l.get("disabled"))}function NF(e,t,n){return xs(e,function(e){return(e=e.slice())[t]=n.initBaseline,e})}var EF=ys;function AF(e){var t=function(e){var t=[],n=[];return e.eachSeriesByType("boxplot",function(e){var o=e.getBaseAxis(),i=gs(n,o);i<0&&(i=n.length,n[i]=o,t[i]={axis:o,seriesModels:[]}),t[i].seriesModels.push(e)}),t}(e);EF(t,function(e){var t=e.seriesModels;t.length&&(!function(e){var t,n=e.axis,o=e.seriesModels,i=o.length,r=e.boxWidthList=[],a=e.boxOffsetList=[],l=[];if("category"===n.type)t=n.getBandWidth();else{var s=0;EF(o,function(e){s=Math.max(s,e.getData().count())});var u=n.getExtent();t=Math.abs(u[1]-u[0])/s}EF(o,function(e){var n=e.get("boxWidth");Ms(n)||(n=[n,n]),l.push([gp(n[0],t)||0,gp(n[1],t)||0])});var c=.8*t-2,d=c/i*.3,h=(c-d*(i-1))/i,p=h/2-c/2;EF(o,function(e,t){a.push(p),p+=d+h,r.push(Math.min(Math.max(h,l[t][0]),l[t][1]))})}(e),EF(t,function(t,n){!function(e,t,n){var o=e.coordinateSystem,i=e.getData(),r=n/2,a="horizontal"===e.get("layout")?0:1,l=1-a,s=["x","y"],u=i.mapDimension(s[a]),c=i.mapDimensionsAll(s[l]);if(null==u||c.length<5)return;for(var d=0;d<i.count();d++){var h=i.get(u,d),p=x(h,c[2],d),f=x(h,c[0],d),g=x(h,c[1],d),v=x(h,c[3],d),m=x(h,c[4],d),y=[];_(y,g,!1),_(y,v,!0),y.push(f,g,m,v),w(y,f),w(y,m),w(y,p),i.setItemLayout(d,{initBaseline:p[l],ends:y})}function x(e,n,r){var s,u=i.get(n,r),c=[];return c[a]=e,c[l]=u,isNaN(e)||isNaN(u)?s=[NaN,NaN]:(s=o.dataToPoint(c))[a]+=t,s}function _(e,t,n){var o=t.slice(),i=t.slice();o[a]+=r,i[a]-=r,n?e.push(o,i):e.push(i,o)}function w(e,t){var n=t.slice(),o=t.slice();n[a]-=r,o[a]+=r,e.push(n,o)}}(t,e.boxOffsetList[n],e.boxWidthList[n])}))})}var LF={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==hw){var n="";"production"!==process.env.NODE_ENV&&(n=Wp("source data is not applicable for this boxplot transform. Expect number[][].")),Up(n)}var o=function(e,t){for(var n=[],o=[],i=(t=t||{}).boundIQR,r="none"===i||0===i,a=0;a<e.length;a++){var l=mp(e[a].slice()),s=Dp(l,.25),u=Dp(l,.5),c=Dp(l,.75),d=l[0],h=l[l.length-1],p=(null==i?1.5:i)*(c-s),f=r?d:Math.max(d,s-p),g=r?h:Math.min(h,c+p),v=t.itemNameFormatter,m=Ts(v)?v({value:a}):Is(v)?v.replace("{value}",a+""):a+"";n.push([m,f,s,u,c,g]);for(var y=0;y<l.length;y++){var x=l[y];if(x<f||x>g){var _=[m,x];o.push(_)}}}return{boxData:n,outliers:o}}(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:o.boxData},{data:o.outliers}]}};var VF=["itemStyle","borderColor"],OF=["itemStyle","borderColor0"],PF=["itemStyle","borderColorDoji"],BF=["itemStyle","color"],RF=["itemStyle","color0"];function zF(e,t){return t.get(e>0?BF:RF)}function FF(e,t){return t.get(0===e?PF:e>0?VF:OF)}var GF={seriesType:"candlestick",plan:oC(),performRawSeries:!0,reset:function(e,t){if(!t.isSeriesFiltered(e))return!e.pipelineContext.large&&{progress:function(e,t){for(var n;null!=(n=e.next());){var o=t.getItemModel(n),i=t.getItemLayout(n).sign,r=o.getItemStyle();r.fill=zF(i,o),r.stroke=FF(i,o)||r.fill,ps(t.ensureUniqueItemVisual(n,"style"),r)}}}}},HF=["color","borderColor"],WF=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.prototype.render=function(e,t,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(e),this._isLargeDraw?this._renderLarge(e):this._renderNormal(e)},t.prototype.incrementalPrepareRender=function(e,t,n){this._clear(),this._updateDrawMode(e)},t.prototype.incrementalRender=function(e,t,n,o){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(e,t):this._incrementalRenderNormal(e,t)},t.prototype.eachRendered=function(e){bx(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var t=e.pipelineContext.large;null!=this._isLargeDraw&&t===this._isLargeDraw||(this._isLargeDraw=t,this._clear())},t.prototype._renderNormal=function(e){var t=e.getData(),n=this._data,o=this.group,i=t.getLayout("isSimpleBox"),r=e.get("clip",!0),a=e.coordinateSystem,l=a.getArea&&a.getArea();this._data||o.removeAll(),t.diff(n).add(function(n){if(t.hasValue(n)){var a=t.getItemLayout(n);if(r&&XF(l,a))return;var s=ZF(a,n,!0);Uy(s,{shape:{points:a.ends}},e,n),jF(s,t,n,i),o.add(s),t.setItemGraphicEl(n,s)}}).update(function(a,s){var u=n.getItemGraphicEl(s);if(t.hasValue(a)){var c=t.getItemLayout(a);r&&XF(l,c)?o.remove(u):(u?(Wy(u,{shape:{points:c.ends}},e,a),$y(u)):u=ZF(c),jF(u,t,a,i),o.add(u),t.setItemGraphicEl(a,u))}else o.remove(u)}).remove(function(e){var t=n.getItemGraphicEl(e);t&&o.remove(t)}).execute(),this._data=t},t.prototype._renderLarge=function(e){this._clear(),JF(e,this.group);var t=e.get("clip",!0)?HE(e.coordinateSystem,!1,e):null;t?this.group.setClipPath(t):this.group.removeClipPath()},t.prototype._incrementalRenderNormal=function(e,t){for(var n,o=t.getData(),i=o.getLayout("isSimpleBox");null!=(n=e.next());){var r=ZF(o.getItemLayout(n));jF(r,o,n,i),r.incremental=!0,this.group.add(r),this._progressiveEls.push(r)}},t.prototype._incrementalRenderLarge=function(e,t){JF(t,this.group,this._progressiveEls,!0)},t.prototype.remove=function(e){this._clear()},t.prototype._clear=function(){this.group.removeAll(),this._data=null},t.type="candlestick",t}(aC),UF=function(){return function(){}}(),YF=function(e){function t(t){var n=e.call(this,t)||this;return n.type="normalCandlestickBox",n}return Wl(t,e),t.prototype.getDefaultShape=function(){return new UF},t.prototype.buildPath=function(e,t){var n=t.points;this.__simpleBox?(e.moveTo(n[4][0],n[4][1]),e.lineTo(n[6][0],n[6][1])):(e.moveTo(n[0][0],n[0][1]),e.lineTo(n[1][0],n[1][1]),e.lineTo(n[2][0],n[2][1]),e.lineTo(n[3][0],n[3][1]),e.closePath(),e.moveTo(n[4][0],n[4][1]),e.lineTo(n[5][0],n[5][1]),e.moveTo(n[6][0],n[6][1]),e.lineTo(n[7][0],n[7][1]))},t}(nv);function ZF(e,t,n){var o=e.ends;return new YF({shape:{points:n?$F(o,e):o},z2:100})}function XF(e,t){for(var n=!0,o=0;o<t.ends.length;o++)if(e.contain(t.ends[o][0],t.ends[o][1])){n=!1;break}return n}function jF(e,t,n,o){var i=t.getItemModel(n);e.useStyle(t.getItemVisual(n,"style")),e.style.strokeNoScale=!0,e.__simpleBox=o,Sm(e,i);var r=t.getItemLayout(n).sign;ys(e.states,function(e,t){var n=i.getModel(t),o=zF(r,n),a=FF(r,n)||o,l=e.style||(e.style={});o&&(l.fill=o),a&&(l.stroke=a)});var a=i.getModel("emphasis");xm(e,a.get("focus"),a.get("blurScope"),a.get("disabled"))}function $F(e,t){return xs(e,function(e){return(e=e.slice())[1]=t.initBaseline,e})}var qF=function(){return function(){}}(),KF=function(e){function t(t){var n=e.call(this,t)||this;return n.type="largeCandlestickBox",n}return Wl(t,e),t.prototype.getDefaultShape=function(){return new qF},t.prototype.buildPath=function(e,t){for(var n=t.points,o=0;o<n.length;)if(this.__sign===n[o++]){var i=n[o++];e.moveTo(i,n[o++]),e.lineTo(i,n[o++])}else o+=3},t}(nv);function JF(e,t,n,o){var i=e.getData().getLayout("largePoints"),r=new KF({shape:{points:i},__sign:1,ignoreCoarsePointer:!0});t.add(r);var a=new KF({shape:{points:i},__sign:-1,ignoreCoarsePointer:!0});t.add(a);var l=new KF({shape:{points:i},__sign:0,ignoreCoarsePointer:!0});t.add(l),QF(1,r,e),QF(-1,a,e),QF(0,l,e),o&&(r.incremental=!0,a.incremental=!0),n&&n.push(r,a)}function QF(e,t,n,o){var i=FF(e,n)||zF(e,n),r=n.getModel("itemStyle").getItemStyle(HF);t.useStyle(r),t.style.fill=null,t.style.stroke=i}var eG=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],n}return Wl(t,e),t.prototype.getShadowDim=function(){return"open"},t.prototype.brushSelector=function(e,t,n){var o=t.getItemLayout(e);return o&&n.rect(o.brushRect)},t.type="series.candlestick",t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},t}(jS);function tG(e){e&&Ms(e.series)&&ys(e.series,function(e){Ns(e)&&"k"===e.type&&(e.type="candlestick")})}vs(eG,SF,!0);var nG={seriesType:"candlestick",plan:oC(),reset:function(e){var t=e.coordinateSystem,n=e.getData(),o=function(e,t){var n,o=e.getBaseAxis(),i="category"===o.type?o.getBandWidth():(n=o.getExtent(),Math.abs(n[1]-n[0])/t.count()),r=gp(Rs(e.get("barMaxWidth"),i),i),a=gp(Rs(e.get("barMinWidth"),1),i),l=e.get("barWidth");return null!=l?gp(l,i):Math.max(Math.min(i/2,r),a)}(e,n),i=["x","y"],r=n.getDimensionIndex(n.mapDimension(i[0])),a=xs(n.mapDimensionsAll(i[1]),n.getDimensionIndex,n),l=a[0],s=a[1],u=a[2],c=a[3];if(n.setLayout({candleWidth:o,isSimpleBox:o<=1.3}),!(r<0||a.length<4))return{progress:e.pipelineContext.large?function(n,o){var i,a,d=nk(4*n.count),h=0,p=[],f=[],g=o.getStore(),v=!!e.get(["itemStyle","borderColorDoji"]);for(;null!=(a=n.next());){var m=g.get(r,a),y=g.get(l,a),x=g.get(s,a),_=g.get(u,a),w=g.get(c,a);isNaN(m)||isNaN(_)||isNaN(w)?(d[h++]=NaN,h+=3):(d[h++]=oG(g,a,y,x,s,v),p[0]=m,p[1]=_,i=t.dataToPoint(p,null,f),d[h++]=i?i[0]:NaN,d[h++]=i?i[1]:NaN,p[1]=w,i=t.dataToPoint(p,null,f),d[h++]=i?i[1]:NaN)}o.setLayout("largePoints",d)}:function(e,n){var i,a=n.getStore();for(;null!=(i=e.next());){var d=a.get(r,i),h=a.get(l,i),p=a.get(s,i),f=a.get(u,i),g=a.get(c,i),v=Math.min(h,p),m=Math.max(h,p),y=C(v,d),x=C(m,d),_=C(f,d),w=C(g,d),b=[];M(b,x,0),M(b,y,1),b.push(I(w),I(x),I(_),I(y));var S=!!n.getItemModel(i).get(["itemStyle","borderColorDoji"]);n.setItemLayout(i,{sign:oG(a,i,h,p,s,S),initBaseline:h>p?x[1]:y[1],ends:b,brushRect:T(f,g,d)})}function C(e,n){var o=[];return o[0]=n,o[1]=e,isNaN(n)||isNaN(e)?[NaN,NaN]:t.dataToPoint(o)}function M(e,t,n){var i=t.slice(),r=t.slice();i[0]=sx(i[0]+o/2,1,!1),r[0]=sx(r[0]-o/2,1,!0),n?e.push(i,r):e.push(r,i)}function T(e,t,n){var i=C(e,n),r=C(t,n);return i[0]-=o/2,r[0]-=o/2,{x:i[0],y:i[1],width:o,height:r[1]-i[1]}}function I(e){return e[0]=sx(e[0],1),e}}}}};function oG(e,t,n,o,i,r){return n>o?-1:n<o?1:r?0:t>0?e.get(i,t-1)<=o?1:-1:1}function iG(e,t){var n=t.rippleEffectColor||t.color;e.eachChild(function(e){e.attr({z:t.z,zlevel:t.zlevel,style:{stroke:"stroke"===t.brushType?n:null,fill:"fill"===t.brushType?n:null}})})}var rG=function(e){function t(t,n){var o=e.call(this)||this,i=new CE(t,n),r=new lp;return o.add(i),o.add(r),o.updateData(t,n),o}return Wl(t,e),t.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},t.prototype.startEffectAnimation=function(e){for(var t=e.symbolType,n=e.color,o=e.rippleNumber,i=this.childAt(1),r=0;r<o;r++){var a=yM(t,-1,-1,2,2,n);a.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var l=-r/o*e.period+e.effectOffset;a.animate("",!0).when(e.period,{scaleX:e.rippleScale/2,scaleY:e.rippleScale/2}).delay(l).start(),a.animateStyle(!0).when(e.period,{opacity:0}).delay(l).start(),i.add(a)}iG(i,e)},t.prototype.updateEffectAnimation=function(e){for(var t=this._effectCfg,n=this.childAt(1),o=["symbolType","period","rippleScale","rippleNumber"],i=0;i<o.length;i++){var r=o[i];if(t[r]!==e[r])return this.stopEffectAnimation(),void this.startEffectAnimation(e)}iG(n,e)},t.prototype.highlight=function(){rm(this)},t.prototype.downplay=function(){am(this)},t.prototype.getSymbolType=function(){var e=this.childAt(0);return e&&e.getSymbolType()},t.prototype.updateData=function(e,t){var n=this,o=e.hostModel;this.childAt(0).updateData(e,t);var i=this.childAt(1),r=e.getItemModel(t),a=e.getItemVisual(t,"symbol"),l=xM(e.getItemVisual(t,"symbolSize")),s=e.getItemVisual(t,"style"),u=s&&s.fill,c=r.getModel("emphasis");i.setScale(l),i.traverse(function(e){e.setStyle("fill",u)});var d=_M(e.getItemVisual(t,"symbolOffset"),l);d&&(i.x=d[0],i.y=d[1]);var h=e.getItemVisual(t,"symbolRotate");i.rotation=(h||0)*Math.PI/180||0;var p={};p.showEffectOn=o.get("showEffectOn"),p.rippleScale=r.get(["rippleEffect","scale"]),p.brushType=r.get(["rippleEffect","brushType"]),p.period=1e3*r.get(["rippleEffect","period"]),p.effectOffset=t/e.count(),p.z=o.getShallow("z")||0,p.zlevel=o.getShallow("zlevel")||0,p.symbolType=a,p.color=u,p.rippleEffectColor=r.get(["rippleEffect","color"]),p.rippleNumber=r.get(["rippleEffect","number"]),"render"===p.showEffectOn?(this._effectCfg?this.updateEffectAnimation(p):this.startEffectAnimation(p),this._effectCfg=p):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(e){"emphasis"===e?"render"!==p.showEffectOn&&n.startEffectAnimation(p):"normal"===e&&"render"!==p.showEffectOn&&n.stopEffectAnimation()}),this._effectCfg=p,xm(this,c.get("focus"),c.get("blurScope"),c.get("disabled"))},t.prototype.fadeOut=function(e){e&&e()},t}(lp),aG=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.prototype.init=function(){this._symbolDraw=new DE(rG)},t.prototype.render=function(e,t,n){var o=e.getData(),i=this._symbolDraw;i.updateData(o,{clipShape:this._getClipShape(e)}),this.group.add(i.group)},t.prototype._getClipShape=function(e){var t=e.coordinateSystem,n=t&&t.getArea&&t.getArea();return e.get("clip",!0)?n:null},t.prototype.updateTransform=function(e,t,n){var o=e.getData();this.group.dirty();var i=nA("").reset(e,t,n);i.progress&&i.progress({start:0,end:o.count(),count:o.count()},o),this._symbolDraw.updateLayout()},t.prototype._updateGroupTransform=function(e){var t,n,o=e.coordinateSystem;o&&o.getRoamTransform&&(this.group.transform=(t=o.getRoamTransform(),$u(n=[1,0,0,1,0,0],t),n),this.group.decomposeTransform())},t.prototype.remove=function(e,t){this._symbolDraw&&this._symbolDraw.remove(!0)},t.type="effectScatter",t}(aC),lG=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return Wl(t,e),t.prototype.getInitialData=function(e,t){return RI(null,this,{useEncodeDefaulter:!0})},t.prototype.brushSelector=function(e,t,n){return n.point(t.getItemLayout(e))},t.type="series.effectScatter",t.dependencies=["grid","polar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",clip:!0,rippleEffect:{period:4,scale:2.5,brushType:"fill",number:3},universalTransition:{divideShape:"clone"},symbolSize:10},t}(jS);var sG=function(e){function t(t,n,o){var i=e.call(this)||this;return i.add(i.createLine(t,n,o)),i._updateEffectSymbol(t,n),i}return Wl(t,e),t.prototype.createLine=function(e,t,n){return new QB(e,t,n)},t.prototype._updateEffectSymbol=function(e,t){var n=e.getItemModel(t).getModel("effect"),o=n.get("symbolSize"),i=n.get("symbol");Ms(o)||(o=[o,o]);var r=e.getItemVisual(t,"style"),a=n.get("color")||r&&r.stroke,l=this.childAt(1);this._symbolType!==i&&(this.remove(l),(l=yM(i,-.5,-.5,1,1,a)).z2=100,l.culling=!0,this.add(l)),l&&(l.setStyle("shadowColor",a),l.setStyle(n.getItemStyle(["color"])),l.scaleX=o[0],l.scaleY=o[1],l.setColor(a),this._symbolType=i,this._symbolScale=o,this._updateEffectAnimation(e,n,t))},t.prototype._updateEffectAnimation=function(e,t,n){var o=this.childAt(1);if(o){var i=e.getItemLayout(n),r=1e3*t.get("period"),a=t.get("loop"),l=t.get("roundTrip"),s=t.get("constantSpeed"),u=Bs(t.get("delay"),function(t){return t/e.count()*r/3});if(o.ignore=!0,this._updateAnimationPoints(o,i),s>0&&(r=this._getLineLength(o)/s*1e3),r!==this._period||a!==this._loop||l!==this._roundTrip){o.stopAnimation();var c=void 0;c=Ts(u)?u(n):u,o.__t>0&&(c=-r*o.__t),this._animateSymbol(o,r,c,a,l)}this._period=r,this._loop=a,this._roundTrip=l}},t.prototype._animateSymbol=function(e,t,n,o,i){if(t>0){e.__t=0;var r=this,a=e.animate("",o).when(i?2*t:t,{__t:i?2:1}).delay(n).during(function(){r._updateSymbolPosition(e)});o||a.done(function(){r.remove(e)}),a.start()}},t.prototype._getLineLength=function(e){return fu(e.__p1,e.__cp1)+fu(e.__cp1,e.__p2)},t.prototype._updateAnimationPoints=function(e,t){e.__p1=t[0],e.__p2=t[1],e.__cp1=t[2]||[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]},t.prototype.updateData=function(e,t,n){this.childAt(0).updateData(e,t,n),this._updateEffectSymbol(e,t)},t.prototype._updateSymbolPosition=function(e){var t=e.__p1,n=e.__p2,o=e.__cp1,i=e.__t<1?e.__t:2-e.__t,r=[e.x,e.y],a=r.slice(),l=Kc,s=Jc;r[0]=l(t[0],o[0],n[0],i),r[1]=l(t[1],o[1],n[1],i);var u=e.__t<1?s(t[0],o[0],n[0],i):s(n[0],o[0],t[0],1-i),c=e.__t<1?s(t[1],o[1],n[1],i):s(n[1],o[1],t[1],1-i);e.rotation=-Math.atan2(c,u)-Math.PI/2,"line"!==this._symbolType&&"rect"!==this._symbolType&&"roundRect"!==this._symbolType||(void 0!==e.__lastT&&e.__lastT<e.__t?(e.scaleY=1.05*fu(a,r),1===i&&(r[0]=a[0]+(r[0]-a[0])/2,r[1]=a[1]+(r[1]-a[1])/2)):1===e.__lastT?e.scaleY=2*fu(t,r):e.scaleY=this._symbolScale[1]),e.__lastT=e.__t,e.ignore=!1,e.x=r[0],e.y=r[1]},t.prototype.updateLayout=function(e,t){this.childAt(0).updateLayout(e,t);var n=e.getItemModel(t).getModel("effect");this._updateEffectAnimation(e,n,t)},t}(lp),uG=function(e){function t(t,n,o){var i=e.call(this)||this;return i._createPolyline(t,n,o),i}return Wl(t,e),t.prototype._createPolyline=function(e,t,n){var o=e.getItemLayout(t),i=new xy({shape:{points:o}});this.add(i),this._updateCommonStl(e,t,n)},t.prototype.updateData=function(e,t,n){var o=e.hostModel;Wy(this.childAt(0),{shape:{points:e.getItemLayout(t)}},o,t),this._updateCommonStl(e,t,n)},t.prototype._updateCommonStl=function(e,t,n){var o=this.childAt(0),i=e.getItemModel(t),r=n&&n.emphasisLineStyle,a=n&&n.focus,l=n&&n.blurScope,s=n&&n.emphasisDisabled;if(!n||e.hasItemOption){var u=i.getModel("emphasis");r=u.getModel("lineStyle").getLineStyle(),s=u.get("disabled"),a=u.get("focus"),l=u.get("blurScope")}o.useStyle(e.getItemVisual(t,"style")),o.style.fill=null,o.style.strokeNoScale=!0,o.ensureState("emphasis").style=r,xm(this,a,l,s)},t.prototype.updateLayout=function(e,t){this.childAt(0).setShape("points",e.getItemLayout(t))},t}(lp),cG=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._lastFrame=0,t._lastFramePercent=0,t}return Wl(t,e),t.prototype.createLine=function(e,t,n){return new uG(e,t,n)},t.prototype._updateAnimationPoints=function(e,t){this._points=t;for(var n=[0],o=0,i=1;i<t.length;i++){var r=t[i-1],a=t[i];o+=fu(r,a),n.push(o)}if(0!==o){for(i=0;i<n.length;i++)n[i]/=o;this._offsets=n,this._length=o}else this._length=0},t.prototype._getLineLength=function(){return this._length},t.prototype._updateSymbolPosition=function(e){var t=e.__t<1?e.__t:2-e.__t,n=this._points,o=this._offsets,i=n.length;if(o){var r,a=this._lastFrame;if(t<this._lastFramePercent){for(r=Math.min(a+1,i-1);r>=0&&!(o[r]<=t);r--);r=Math.min(r,i-2)}else{for(r=a;r<i&&!(o[r]>t);r++);r=Math.min(r-1,i-2)}var l=(t-o[r])/(o[r+1]-o[r]),s=n[r],u=n[r+1];e.x=s[0]*(1-l)+l*u[0],e.y=s[1]*(1-l)+l*u[1];var c=e.__t<1?u[0]-s[0]:s[0]-u[0],d=e.__t<1?u[1]-s[1]:s[1]-u[1];e.rotation=-Math.atan2(d,c)-Math.PI/2,this._lastFrame=r,this._lastFramePercent=t,e.ignore=!1}},t}(sG),dG=function(){return function(){this.polyline=!1,this.curveness=0,this.segs=[]}}(),hG=function(e){function t(t){var n=e.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return Wl(t,e),t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new dG},t.prototype.buildPath=function(e,t){var n,o=t.segs,i=t.curveness;if(t.polyline)for(n=this._off;n<o.length;){var r=o[n++];if(r>0){e.moveTo(o[n++],o[n++]);for(var a=1;a<r;a++)e.lineTo(o[n++],o[n++])}}else for(n=this._off;n<o.length;){var l=o[n++],s=o[n++],u=o[n++],c=o[n++];if(e.moveTo(l,s),i>0){var d=(l+u)/2-(s-c)*i,h=(s+c)/2-(u-l)*i;e.quadraticCurveTo(d,h,u,c)}else e.lineTo(u,c)}this.incremental&&(this._off=n,this.notClear=!0)},t.prototype.findDataIndex=function(e,t){var n=this.shape,o=n.segs,i=n.curveness,r=this.style.lineWidth;if(n.polyline)for(var a=0,l=0;l<o.length;){var s=o[l++];if(s>0)for(var u=o[l++],c=o[l++],d=1;d<s;d++){if(Pg(u,c,h=o[l++],p=o[l++],r,e,t))return a}a++}else for(a=0,l=0;l<o.length;){u=o[l++],c=o[l++];var h=o[l++],p=o[l++];if(i>0){if(Rg(u,c,(u+h)/2-(c-p)*i,(c+p)/2-(h-u)*i,h,p,r,e,t))return a}else if(Pg(u,c,h,p,r,e,t))return a;a++}return-1},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),o=this.getBoundingRect();return e=n[0],t=n[1],o.contain(e,t)?(this.hoverDataIdx=this.findDataIndex(e,t))>=0:(this.hoverDataIdx=-1,!1)},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var t=this.shape.segs,n=1/0,o=1/0,i=-1/0,r=-1/0,a=0;a<t.length;){var l=t[a++],s=t[a++];n=Math.min(l,n),i=Math.max(l,i),o=Math.min(s,o),r=Math.max(s,r)}e=this._rect=new cc(n,o,i,r)}return e},t}(nv),pG=function(){function e(){this.group=new lp}return e.prototype.updateData=function(e){this._clear();var t=this._create();t.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(t,e)},e.prototype.incrementalPrepareUpdate=function(e){this.group.removeAll(),this._clear()},e.prototype.incrementalUpdate=function(e,t){var n=this._newAdded[0],o=t.getLayout("linesPoints"),i=n&&n.shape.segs;if(i&&i.length<2e4){var r=i.length,a=new Float32Array(r+o.length);a.set(i),a.set(o,r),n.setShape({segs:a})}else{this._newAdded=[];var l=this._create();l.incremental=!0,l.setShape({segs:o}),this._setCommon(l,t),l.__startIndex=e.start}},e.prototype.remove=function(){this._clear()},e.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},e.prototype._create=function(){var e=new hG({cursor:"default",ignoreCoarsePointer:!0});return this._newAdded.push(e),this.group.add(e),e},e.prototype._setCommon=function(e,t,n){var o=t.hostModel;e.setShape({polyline:o.get("polyline"),curveness:o.get(["lineStyle","curveness"])}),e.useStyle(o.getModel("lineStyle").getLineStyle()),e.style.strokeNoScale=!0;var i=t.getVisual("style");i&&i.stroke&&e.setStyle("stroke",i.stroke),e.setStyle("fill",null);var r=Nv(e);r.seriesIndex=o.seriesIndex,e.on("mousemove",function(t){r.dataIndex=null;var n=e.hoverDataIdx;n>0&&(r.dataIndex=n+e.__startIndex)})},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),fG={seriesType:"lines",plan:oC(),reset:function(e){var t=e.coordinateSystem;if(t){var n=e.get("polyline"),o=e.pipelineContext.large;return{progress:function(i,r){var a=[];if(o){var l=void 0,s=i.end-i.start;if(n){for(var u=0,c=i.start;c<i.end;c++)u+=e.getLineCoordsCount(c);l=new Float32Array(s+2*u)}else l=new Float32Array(4*s);var d=0,h=[];for(c=i.start;c<i.end;c++){var p=e.getLineCoords(c,a);n&&(l[d++]=p);for(var f=0;f<p;f++)h=t.dataToPoint(a[f],!1,h),l[d++]=h[0],l[d++]=h[1]}r.setLayout("linesPoints",l)}else for(c=i.start;c<i.end;c++){var g=r.getItemModel(c),v=(p=e.getLineCoords(c,a),[]);if(n)for(var m=0;m<p;m++)v.push(t.dataToPoint(a[m]));else{v[0]=t.dataToPoint(a[0]),v[1]=t.dataToPoint(a[1]);var y=g.get(["lineStyle","curveness"]);+y&&(v[2]=[(v[0][0]+v[1][0])/2-(v[0][1]-v[1][1])*y,(v[0][1]+v[1][1])/2-(v[1][0]-v[0][0])*y])}r.setItemLayout(c,v)}}}}"production"!==process.env.NODE_ENV&&Fp("The lines series must have a coordinate system.")}},gG=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.prototype.render=function(e,t,n){var o=e.getData(),i=this._updateLineDraw(o,e),r=e.get("zlevel"),a=e.get(["effect","trailLength"]),l=n.getZr(),s="svg"===l.painter.getType();s||l.painter.getLayer(r).clear(!0),null==this._lastZlevel||s||l.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(e)&&a>0&&(s?process.env.NODE_ENV:l.configLayer(r,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(a/10+.9,1),0)})),i.updateData(o);var u=e.get("clip",!0)&&HE(e.coordinateSystem,!1,e);u?this.group.setClipPath(u):this.group.removeClipPath(),this._lastZlevel=r,this._finished=!0},t.prototype.incrementalPrepareRender=function(e,t,n){var o=e.getData();this._updateLineDraw(o,e).incrementalPrepareUpdate(o),this._clearLayer(n),this._finished=!1},t.prototype.incrementalRender=function(e,t,n){this._lineDraw.incrementalUpdate(e,t.getData()),this._finished=e.end===t.getData().count()},t.prototype.eachRendered=function(e){this._lineDraw&&this._lineDraw.eachRendered(e)},t.prototype.updateTransform=function(e,t,n){var o=e.getData(),i=e.pipelineContext;if(!this._finished||i.large||i.progressiveRender)return{update:!0};var r=fG.reset(e,t,n);r.progress&&r.progress({start:0,end:o.count(),count:o.count()},o),this._lineDraw.updateLayout(),this._clearLayer(n)},t.prototype._updateLineDraw=function(e,t){var n=this._lineDraw,o=this._showEffect(t),i=!!t.get("polyline"),r=t.pipelineContext.large;return process.env.NODE_ENV,n&&o===this._hasEffet&&i===this._isPolyline&&r===this._isLargeDraw||(n&&n.remove(),n=this._lineDraw=r?new pG:new eR(i?o?cG:uG:o?sG:QB),this._hasEffet=o,this._isPolyline=i,this._isLargeDraw=r),this.group.add(n.group),n},t.prototype._showEffect=function(e){return!!e.get(["effect","show"])},t.prototype._clearLayer=function(e){var t=e.getZr();"svg"===t.painter.getType()||null==this._lastZlevel||t.painter.getLayer(this._lastZlevel).clear(!0)},t.prototype.remove=function(e,t){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(t)},t.prototype.dispose=function(e,t){this.remove(e,t)},t.type="lines",t}(aC),vG="undefined"==typeof Uint32Array?Array:Uint32Array,mG="undefined"==typeof Float64Array?Array:Float64Array;function yG(e){var t=e.data;t&&t[0]&&t[0][0]&&t[0][0].coord&&(process.env.NODE_ENV,e.data=xs(t,function(e){var t={coords:[e[0].coord,e[1].coord]};return e[0].name&&(t.fromName=e[0].name),e[1].name&&(t.toName=e[1].name),hs([t,e[0],e[1]])}))}var xG=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.visualStyleAccessPath="lineStyle",n.visualDrawType="stroke",n}return Wl(t,e),t.prototype.init=function(t){t.data=t.data||[],yG(t);var n=this._processFlatCoordsArray(t.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(t.data=new Float32Array(n.count)),e.prototype.init.apply(this,arguments)},t.prototype.mergeOption=function(t){if(yG(t),t.data){var n=this._processFlatCoordsArray(t.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(t.data=new Float32Array(n.count))}e.prototype.mergeOption.apply(this,arguments)},t.prototype.appendData=function(e){var t=this._processFlatCoordsArray(e.data);t.flatCoords&&(this._flatCoords?(this._flatCoords=Ks(this._flatCoords,t.flatCoords),this._flatCoordsOffset=Ks(this._flatCoordsOffset,t.flatCoordsOffset)):(this._flatCoords=t.flatCoords,this._flatCoordsOffset=t.flatCoordsOffset),e.data=new Float32Array(t.count)),this.getRawData().appendData(e.data)},t.prototype._getCoordsFromItemModel=function(e){var t=this.getData().getItemModel(e),n=t.option instanceof Array?t.option:t.getShallow("coords");if("production"!==process.env.NODE_ENV&&!(n instanceof Array&&n.length>0&&n[0]instanceof Array))throw new Error("Invalid coords "+JSON.stringify(n)+". Lines must have 2d coords array in data item.");return n},t.prototype.getLineCoordsCount=function(e){return this._flatCoordsOffset?this._flatCoordsOffset[2*e+1]:this._getCoordsFromItemModel(e).length},t.prototype.getLineCoords=function(e,t){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[2*e],o=this._flatCoordsOffset[2*e+1],i=0;i<o;i++)t[i]=t[i]||[],t[i][0]=this._flatCoords[n+2*i],t[i][1]=this._flatCoords[n+2*i+1];return o}var r=this._getCoordsFromItemModel(e);for(i=0;i<r.length;i++)t[i]=t[i]||[],t[i][0]=r[i][0],t[i][1]=r[i][1];return r.length},t.prototype._processFlatCoordsArray=function(e){var t=0;if(this._flatCoords&&(t=this._flatCoords.length),Ds(e[0])){for(var n=e.length,o=new vG(n),i=new mG(n),r=0,a=0,l=0,s=0;s<n;){l++;var u=e[s++];o[a++]=r+t,o[a++]=u;for(var c=0;c<u;c++){var d=e[s++],h=e[s++];if(i[r++]=d,i[r++]=h,s>n&&"production"!==process.env.NODE_ENV)throw new Error("Invalid data format.")}}return{flatCoordsOffset:new Uint32Array(o.buffer,0,a),flatCoords:i,count:l}}return{flatCoordsOffset:null,flatCoords:null,count:e.length}},t.prototype.getInitialData=function(e,t){if("production"!==process.env.NODE_ENV&&!jw.get(e.coordinateSystem))throw new Error("Unknown coordinate system "+e.coordinateSystem);var n=new DI(["value"],this);return n.hasItemOption=!1,n.initData(e.data,[],function(e,t,o,i){if(e instanceof Array)return NaN;n.hasItemOption=!0;var r=e.value;return null!=r?r instanceof Array?r[i]:r:void 0}),n},t.prototype.formatTooltip=function(e,t,n){var o=this.getData().getItemModel(e),i=o.get("name");if(i)return i;var r=o.get("fromName"),a=o.get("toName"),l=[];return null!=r&&l.push(r),null!=a&&l.push(a),AS("nameValue",{name:l.join(" > ")})},t.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},t.prototype.getProgressive=function(){var e=this.option.progressive;return null==e?this.option.large?1e4:this.get("progressive"):e},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return null==e?this.option.large?2e4:this.get("progressiveThreshold"):e},t.prototype.getZLevelKey=function(){var e=this.getModel("effect"),t=e.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:e.get("show")&&t>0?t+"":""},t.type="series.lines",t.dependencies=["grid","polar","geo","calendar"],t.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},t}(jS);function _G(e){return e instanceof Array||(e=[e,e]),e}var wG={seriesType:"lines",reset:function(e){var t=_G(e.get("symbol")),n=_G(e.get("symbolSize")),o=e.getData();return o.setVisual("fromSymbol",t&&t[0]),o.setVisual("toSymbol",t&&t[1]),o.setVisual("fromSymbolSize",n&&n[0]),o.setVisual("toSymbolSize",n&&n[1]),{dataEach:o.hasItemOption?function(e,t){var n=e.getItemModel(t),o=_G(n.getShallow("symbol",!0)),i=_G(n.getShallow("symbolSize",!0));o[0]&&e.setItemVisual(t,"fromSymbol",o[0]),o[1]&&e.setItemVisual(t,"toSymbol",o[1]),i[0]&&e.setItemVisual(t,"fromSymbolSize",i[0]),i[1]&&e.setItemVisual(t,"toSymbolSize",i[1])}:null}}};var bG=function(){function e(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=$l.createCanvas();this.canvas=e}return e.prototype.update=function(e,t,n,o,i,r){var a=this._getBrush(),l=this._getGradient(i,"inRange"),s=this._getGradient(i,"outOfRange"),u=this.pointSize+this.blurSize,c=this.canvas,d=c.getContext("2d"),h=e.length;c.width=t,c.height=n;for(var p=0;p<h;++p){var f=e[p],g=f[0],v=f[1],m=o(f[2]);d.globalAlpha=m,d.drawImage(a,g-u,v-u)}if(!c.width||!c.height)return c;for(var y=d.getImageData(0,0,c.width,c.height),x=y.data,_=0,w=x.length,b=this.minOpacity,S=this.maxOpacity-b;_<w;){m=x[_+3]/256;var C=4*Math.floor(255*m);if(m>0){var M=r(m)?l:s;m>0&&(m=m*S+b),x[_++]=M[C],x[_++]=M[C+1],x[_++]=M[C+2],x[_++]=M[C+3]*m*256}else _+=4}return d.putImageData(y,0,0),c},e.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=$l.createCanvas()),t=this.pointSize+this.blurSize,n=2*t;e.width=n,e.height=n;var o=e.getContext("2d");return o.clearRect(0,0,n,n),o.shadowOffsetX=n,o.shadowBlur=this.blurSize,o.shadowColor="#000",o.beginPath(),o.arc(-t,t,this.pointSize,0,2*Math.PI,!0),o.closePath(),o.fill(),e},e.prototype._getGradient=function(e,t){for(var n=this._gradientPixels,o=n[t]||(n[t]=new Uint8ClampedArray(1024)),i=[0,0,0,0],r=0,a=0;a<256;a++)e[t](a/255,!0,i),o[r++]=i[0],o[r++]=i[1],o[r++]=i[2],o[r++]=i[3];return o},e}();function SG(e){var t=e.dimensions;return"lng"===t[0]&&"lat"===t[1]}var CG=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.prototype.render=function(e,t,n){var o;if(t.eachComponent("visualMap",function(t){t.eachTargetSeries(function(n){n===e&&(o=t)})}),"production"!==process.env.NODE_ENV&&!o)throw new Error("Heatmap must use with visualMap");this._progressiveEls=null,this.group.removeAll();var i=e.coordinateSystem;"cartesian2d"===i.type||"calendar"===i.type?this._renderOnCartesianAndCalendar(e,n,0,e.getData().count()):SG(i)&&this._renderOnGeo(i,e,o,n)},t.prototype.incrementalPrepareRender=function(e,t,n){this.group.removeAll()},t.prototype.incrementalRender=function(e,t,n,o){var i=t.coordinateSystem;i&&(SG(i)?this.render(t,n,o):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(t,o,e.start,e.end,!0)))},t.prototype.eachRendered=function(e){bx(this._progressiveEls||this.group,e)},t.prototype._renderOnCartesianAndCalendar=function(e,t,n,o,i){var r,a,l,s,u=e.coordinateSystem,c=WE(u,"cartesian2d");if(c){var d=u.getAxis("x"),h=u.getAxis("y");if("production"!==process.env.NODE_ENV){if("category"!==d.type||"category"!==h.type)throw new Error("Heatmap on cartesian must have two category axes");if(!d.onBand||!h.onBand)throw new Error("Heatmap on cartesian must have two axes with boundaryGap true")}r=d.getBandWidth()+.5,a=h.getBandWidth()+.5,l=d.scale.getExtent(),s=h.scale.getExtent()}for(var p=this.group,f=e.getData(),g=e.getModel(["emphasis","itemStyle"]).getItemStyle(),v=e.getModel(["blur","itemStyle"]).getItemStyle(),m=e.getModel(["select","itemStyle"]).getItemStyle(),y=e.get(["itemStyle","borderRadius"]),x=kx(e),_=e.getModel("emphasis"),w=_.get("focus"),b=_.get("blurScope"),S=_.get("disabled"),C=c?[f.mapDimension("x"),f.mapDimension("y"),f.mapDimension("value")]:[f.mapDimension("time"),f.mapDimension("value")],M=n;M<o;M++){var T=void 0,I=f.getItemVisual(M,"style");if(c){var k=f.get(C[0],M),D=f.get(C[1],M);if(isNaN(f.get(C[2],M))||isNaN(k)||isNaN(D)||k<l[0]||k>l[1]||D<s[0]||D>s[1])continue;var N=u.dataToPoint([k,D]);T=new fv({shape:{x:N[0]-r/2,y:N[1]-a/2,width:r,height:a},style:I})}else{if(isNaN(f.get(C[1],M)))continue;T=new fv({z2:1,shape:u.dataToRect([f.get(C[0],M)]).contentShape,style:I})}if(f.hasItemOption){var E=f.getItemModel(M),A=E.getModel("emphasis");g=A.getModel("itemStyle").getItemStyle(),v=E.getModel(["blur","itemStyle"]).getItemStyle(),m=E.getModel(["select","itemStyle"]).getItemStyle(),y=E.get(["itemStyle","borderRadius"]),w=A.get("focus"),b=A.get("blurScope"),S=A.get("disabled"),x=kx(E)}T.shape.r=y;var L=e.getRawValue(M),V="-";L&&null!=L[2]&&(V=L[2]+""),Ix(T,x,{labelFetcher:e,labelDataIndex:M,defaultOpacity:I.opacity,defaultText:V}),T.ensureState("emphasis").style=g,T.ensureState("blur").style=v,T.ensureState("select").style=m,xm(T,w,b,S),T.incremental=i,i&&(T.states.emphasis.hoverLayer=!0),p.add(T),f.setItemGraphicEl(M,T),this._progressiveEls&&this._progressiveEls.push(T)}},t.prototype._renderOnGeo=function(e,t,n,o){var i=n.targetVisuals.inRange,r=n.targetVisuals.outOfRange,a=t.getData(),l=this._hmLayer||this._hmLayer||new bG;l.blurSize=t.get("blurSize"),l.pointSize=t.get("pointSize"),l.minOpacity=t.get("minOpacity"),l.maxOpacity=t.get("maxOpacity");var s=e.getViewRect().clone(),u=e.getRoamTransform();s.applyTransform(u);var c=Math.max(s.x,0),d=Math.max(s.y,0),h=Math.min(s.width+s.x,o.getWidth()),p=Math.min(s.height+s.y,o.getHeight()),f=h-c,g=p-d,v=[a.mapDimension("lng"),a.mapDimension("lat"),a.mapDimension("value")],m=a.mapArray(v,function(t,n,o){var i=e.dataToPoint([t,n]);return i[0]-=c,i[1]-=d,i.push(o),i}),y=n.getExtent(),x="visualMap.continuous"===n.type?function(e,t){var n=e[1]-e[0];return t=[(t[0]-e[0])/n,(t[1]-e[0])/n],function(e){return e>=t[0]&&e<=t[1]}}(y,n.option.range):function(e,t,n){var o=e[1]-e[0],i=(t=xs(t,function(t){return{interval:[(t.interval[0]-e[0])/o,(t.interval[1]-e[0])/o]}})).length,r=0;return function(e){var o;for(o=r;o<i;o++)if((a=t[o].interval)[0]<=e&&e<=a[1]){r=o;break}if(o===i)for(o=r-1;o>=0;o--){var a;if((a=t[o].interval)[0]<=e&&e<=a[1]){r=o;break}}return o>=0&&o<i&&n[o]}}(y,n.getPieceList(),n.option.selected);l.update(m,f,g,i.color.getNormalizer(),{inRange:i.color.getColorMapper(),outOfRange:r.color.getColorMapper()},x);var _=new lv({style:{width:f,height:g,x:c,y:d,image:l.canvas},silent:!0});this.group.add(_)},t.type="heatmap",t}(aC),MG=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.prototype.getInitialData=function(e,t){return RI(null,this,{generateCoord:"value"})},t.prototype.preventIncremental=function(){var e=jw.get(this.get("coordinateSystem"));if(e&&e.dimensions)return"lng"===e.dimensions[0]&&"lat"===e.dimensions[1]},t.type="series.heatmap",t.dependencies=["grid","geo","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},t}(jS);var TG=["itemStyle","borderWidth"],IG=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],kG=new $m,DG=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.prototype.render=function(e,t,n){var o=this.group,i=e.getData(),r=this._data,a=e.coordinateSystem,l=a.getBaseAxis().isHorizontal(),s=a.master.getRect(),u={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:e,coordSys:a,coordSysExtent:[[s.x,s.x+s.width],[s.y,s.y+s.height]],isHorizontal:l,valueDim:IG[+l],categoryDim:IG[1-+l]};i.diff(r).add(function(e){if(i.hasValue(e)){var t=BG(i,e),n=NG(i,e,t,u),r=FG(i,u,n);i.setItemGraphicEl(e,r),o.add(r),YG(r,u,n)}}).update(function(e,t){var n=r.getItemGraphicEl(t);if(i.hasValue(e)){var a=BG(i,e),l=NG(i,e,a,u),s=HG(i,l);n&&s!==n.__pictorialShapeStr&&(o.remove(n),i.setItemGraphicEl(e,null),n=null),n?function(e,t,n){var o=n.animationModel,i=n.dataIndex,r=e.__pictorialBundle;Wy(r,{x:n.bundlePosition[0],y:n.bundlePosition[1]},o,i),n.symbolRepeat?LG(e,t,n,!0):VG(e,t,n,!0);OG(e,n,!0),PG(e,t,n,!0)}(n,u,l):n=FG(i,u,l,!0),i.setItemGraphicEl(e,n),n.__pictorialSymbolMeta=l,o.add(n),YG(n,u,l)}else o.remove(n)}).remove(function(e){var t=r.getItemGraphicEl(e);t&&GG(r,e,t.__pictorialSymbolMeta.animationModel,t)}).execute();var c=e.get("clip",!0)?HE(e.coordinateSystem,!1,e):null;return c?o.setClipPath(c):o.removeClipPath(),this._data=i,this.group},t.prototype.remove=function(e,t){var n=this.group,o=this._data;e.get("animation")?o&&o.eachItemGraphicEl(function(t){GG(o,Nv(t).dataIndex,e,t)}):n.removeAll()},t.type="pictorialBar",t}(aC);function NG(e,t,n,o){var i=e.getItemLayout(t),r=n.get("symbolRepeat"),a=n.get("symbolClip"),l=n.get("symbolPosition")||"start",s=(n.get("symbolRotate")||0)*Math.PI/180||0,u=n.get("symbolPatternSize")||2,c=n.isAnimationEnabled(),d={dataIndex:t,layout:i,itemModel:n,symbolType:e.getItemVisual(t,"symbol")||"circle",style:e.getItemVisual(t,"style"),symbolClip:a,symbolRepeat:r,symbolRepeatDirection:n.get("symbolRepeatDirection"),symbolPatternSize:u,rotation:s,animationModel:c?n:null,hoverScale:c&&n.get(["emphasis","scale"]),z2:n.getShallow("z",!0)||0};!function(e,t,n,o,i){var r,a=o.valueDim,l=e.get("symbolBoundingData"),s=o.coordSys.getOtherAxis(o.coordSys.getBaseAxis()),u=s.toGlobalCoord(s.dataToCoord(0)),c=1-+(n[a.wh]<=0);if(Ms(l)){var d=[EG(s,l[0])-u,EG(s,l[1])-u];d[1]<d[0]&&d.reverse(),r=d[c]}else r=null!=l?EG(s,l)-u:t?o.coordSysExtent[a.index][c]-u:n[a.wh];i.boundingLength=r,t&&(i.repeatCutLength=n[a.wh]);var h="x"===a.xy,p=s.inverse;i.pxSign=h&&!p||!h&&p?r>=0?1:-1:r>0?1:-1}(n,r,i,o,d),function(e,t,n,o,i,r,a,l,s,u){var c,d=s.valueDim,h=s.categoryDim,p=Math.abs(n[h.wh]),f=e.getItemVisual(t,"symbolSize");c=Ms(f)?f.slice():null==f?["100%","100%"]:[f,f];c[h.index]=gp(c[h.index],p),c[d.index]=gp(c[d.index],o?p:Math.abs(r)),u.symbolSize=c;var g=u.symbolScale=[c[0]/l,c[1]/l];g[d.index]*=(s.isHorizontal?-1:1)*a}(e,t,i,r,0,d.boundingLength,d.pxSign,u,o,d),function(e,t,n,o,i){var r=e.get(TG)||0;r&&(kG.attr({scaleX:t[0],scaleY:t[1],rotation:n}),kG.updateTransform(),r/=kG.getLineScale(),r*=t[o.valueDim.index]);i.valueLineWidth=r||0}(n,d.symbolScale,s,o,d);var h=d.symbolSize,p=_M(n.get("symbolOffset"),h);return function(e,t,n,o,i,r,a,l,s,u,c,d){var h=c.categoryDim,p=c.valueDim,f=d.pxSign,g=Math.max(t[p.index]+l,0),v=g;if(o){var m=Math.abs(s),y=Bs(e.get("symbolMargin"),"15%")+"",x=!1;y.lastIndexOf("!")===y.length-1&&(x=!0,y=y.slice(0,y.length-1));var _=gp(y,t[p.index]),w=Math.max(g+2*_,0),b=x?0:2*_,S=Ap(o),C=S?o:ZG((m+b)/w);w=g+2*(_=(m-C*g)/2/(x?C:Math.max(C-1,1))),b=x?0:2*_,S||"fixed"===o||(C=u?ZG((Math.abs(u)+b)/w):0),v=C*w-b,d.repeatTimes=C,d.symbolMargin=_}var M=f*(v/2),T=d.pathPosition=[];T[h.index]=n[h.wh]/2,T[p.index]="start"===a?M:"end"===a?s-M:s/2,r&&(T[0]+=r[0],T[1]+=r[1]);var I=d.bundlePosition=[];I[h.index]=n[h.xy],I[p.index]=n[p.xy];var k=d.barRectShape=ps({},n);k[p.wh]=f*Math.max(Math.abs(n[p.wh]),Math.abs(T[p.index]+M)),k[h.wh]=n[h.wh];var D=d.clipShape={};D[h.xy]=-n[h.xy],D[h.wh]=c.ecSize[h.wh],D[p.xy]=0,D[p.wh]=n[p.wh]}(n,h,i,r,0,p,l,d.valueLineWidth,d.boundingLength,d.repeatCutLength,o,d),d}function EG(e,t){return e.toGlobalCoord(e.dataToCoord(e.scale.parse(t)))}function AG(e){var t=e.symbolPatternSize,n=yM(e.symbolType,-t/2,-t/2,t,t);return n.attr({culling:!0}),"image"!==n.type&&n.setStyle({strokeNoScale:!0}),n}function LG(e,t,n,o){var i=e.__pictorialBundle,r=n.symbolSize,a=n.valueLineWidth,l=n.pathPosition,s=t.valueDim,u=n.repeatTimes||0,c=0,d=r[t.valueDim.index]+a+2*n.symbolMargin;for(WG(e,function(e){e.__pictorialAnimationIndex=c,e.__pictorialRepeatTimes=u,c<u?UG(e,null,f(c),n,o):UG(e,null,{scaleX:0,scaleY:0},n,o,function(){i.remove(e)}),c++});c<u;c++){var h=AG(n);h.__pictorialAnimationIndex=c,h.__pictorialRepeatTimes=u,i.add(h);var p=f(c);UG(h,{x:p.x,y:p.y,scaleX:0,scaleY:0},{scaleX:p.scaleX,scaleY:p.scaleY,rotation:p.rotation},n,o)}function f(e){var t=l.slice(),o=n.pxSign,i=e;return("start"===n.symbolRepeatDirection?o>0:o<0)&&(i=u-1-e),t[s.index]=d*(i-u/2+.5)+l[s.index],{x:t[0],y:t[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation}}}function VG(e,t,n,o){var i=e.__pictorialBundle,r=e.__pictorialMainPath;r?UG(r,null,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation},n,o):(r=e.__pictorialMainPath=AG(n),i.add(r),UG(r,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:0,scaleY:0,rotation:n.rotation},{scaleX:n.symbolScale[0],scaleY:n.symbolScale[1]},n,o))}function OG(e,t,n){var o=ps({},t.barRectShape),i=e.__pictorialBarRect;i?UG(i,null,{shape:o},t,n):((i=e.__pictorialBarRect=new fv({z2:2,shape:o,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}})).disableMorphing=!0,e.add(i))}function PG(e,t,n,o){if(n.symbolClip){var i=e.__pictorialClipPath,r=ps({},n.clipShape),a=t.valueDim,l=n.animationModel,s=n.dataIndex;if(i)Wy(i,{shape:r},l,s);else{r[a.wh]=0,i=new fv({shape:r}),e.__pictorialBundle.setClipPath(i),e.__pictorialClipPath=i;var u={};u[a.wh]=n.clipShape[a.wh],Sx[o?"updateProps":"initProps"](i,{shape:u},l,s)}}}function BG(e,t){var n=e.getItemModel(t);return n.getAnimationDelayParams=RG,n.isAnimationEnabled=zG,n}function RG(e){return{index:e.__pictorialAnimationIndex,count:e.__pictorialRepeatTimes}}function zG(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function FG(e,t,n,o){var i=new lp,r=new lp;return i.add(r),i.__pictorialBundle=r,r.x=n.bundlePosition[0],r.y=n.bundlePosition[1],n.symbolRepeat?LG(i,t,n):VG(i,0,n),OG(i,n,o),PG(i,t,n,o),i.__pictorialShapeStr=HG(e,n),i.__pictorialSymbolMeta=n,i}function GG(e,t,n,o){var i=o.__pictorialBarRect;i&&i.removeTextContent();var r=[];WG(o,function(e){r.push(e)}),o.__pictorialMainPath&&r.push(o.__pictorialMainPath),o.__pictorialClipPath&&(n=null),ys(r,function(e){Zy(e,{scaleX:0,scaleY:0},n,t,function(){o.parent&&o.parent.remove(o)})}),e.setItemGraphicEl(t,null)}function HG(e,t){return[e.getItemVisual(t.dataIndex,"symbol")||"none",!!t.symbolRepeat,!!t.symbolClip].join(":")}function WG(e,t,n){ys(e.__pictorialBundle.children(),function(o){o!==e.__pictorialBarRect&&t.call(n,o)})}function UG(e,t,n,o,i,r){t&&e.attr(t),o.symbolClip&&!i?n&&e.attr(n):n&&Sx[i?"updateProps":"initProps"](e,n,o.animationModel,o.dataIndex,r)}function YG(e,t,n){var o=n.dataIndex,i=n.itemModel,r=i.getModel("emphasis"),a=r.getModel("itemStyle").getItemStyle(),l=i.getModel(["blur","itemStyle"]).getItemStyle(),s=i.getModel(["select","itemStyle"]).getItemStyle(),u=i.getShallow("cursor"),c=r.get("focus"),d=r.get("blurScope"),h=r.get("scale");WG(e,function(e){if(e instanceof lv){var t=e.style;e.useStyle(ps({image:t.image,x:t.x,y:t.y,width:t.width,height:t.height},n.style))}else e.useStyle(n.style);var o=e.ensureState("emphasis");o.style=a,h&&(o.scaleX=1.1*e.scaleX,o.scaleY=1.1*e.scaleY),e.ensureState("blur").style=l,e.ensureState("select").style=s,u&&(e.cursor=u),e.z2=n.z2});var p=t.valueDim.posDesc[+(n.boundingLength>0)],f=e.__pictorialBarRect;f.ignoreClip=!0,Ix(f,kx(i),{labelFetcher:t.seriesModel,labelDataIndex:o,defaultText:bE(t.seriesModel.getData(),o),inheritColor:n.style.fill,defaultOpacity:n.style.opacity,defaultOutsidePosition:p}),xm(e,c,d,r.get("disabled"))}function ZG(e){var t=Math.round(e);return Math.abs(e-t)<1e-4?t:Math.ceil(e)}var XG=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n.defaultSymbol="roundRect",n}return Wl(t,e),t.prototype.getInitialData=function(t){return t.stack=null,e.prototype.getInitialData.apply(this,arguments)},t.type="series.pictorialBar",t.dependencies=["grid"],t.defaultOption=e_(aA.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),t}(aA);var jG=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._layers=[],n}return Wl(t,e),t.prototype.render=function(e,t,n){var o=e.getData(),i=this,r=this.group,a=e.getLayerSeries(),l=o.getLayout("layoutInfo"),s=l.rect,u=l.boundaryGap;function c(e){return e.name}r.x=0,r.y=s.y+u[0];var d=new rI(this._layersSeries||[],a,c,c),h=[];function p(t,n,l){var s=i._layers;if("remove"!==t){for(var u,c,d=[],p=[],f=a[n].indices,g=0;g<f.length;g++){var v=o.getItemLayout(f[g]),m=v.x,y=v.y0,x=v.y;d.push(m,y),p.push(m,y+x),u=o.getItemVisual(f[g],"style")}var _=o.getItemLayout(f[0]),w=e.getModel("label").get("margin"),b=e.getModel("emphasis");if("add"===t){var S=h[n]=new lp;c=new zE({shape:{points:d,stackedOnPoints:p,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),S.add(c),r.add(S),e.isAnimationEnabled()&&c.setClipPath(function(e,t,n){var o=new fv({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return Uy(o,{shape:{x:e.x-50,width:e.width+100,height:e.height+20}},t,n),o}(c.getBoundingRect(),e,function(){c.removeClipPath()}))}else{S=s[l];c=S.childAt(0),r.add(S),h[n]=S,Wy(c,{shape:{points:d,stackedOnPoints:p}},e),$y(c)}Ix(c,kx(e),{labelDataIndex:f[g-1],defaultText:o.getName(f[g-1]),inheritColor:u.fill},{normal:{verticalAlign:"middle"}}),c.setTextConfig({position:null,local:!0});var C=c.getTextContent();C&&(C.x=_.x-w,C.y=_.y0+_.y/2),c.useStyle(u),o.setItemGraphicEl(n,c),Sm(c,e),xm(c,b.get("focus"),b.get("blurScope"),b.get("disabled"))}else r.remove(s[n])}d.add(Ss(p,this,"add")).update(Ss(p,this,"update")).remove(Ss(p,this,"remove")).execute(),this._layersSeries=a,this._layers=h},t.type="themeRiver",t}(aC);var $G=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new ZA(Ss(this.getData,this),Ss(this.getRawData,this))},t.prototype.fixData=function(e){var t=e.length,n={},o=mf(e,function(e){return n.hasOwnProperty(e[0]+"")||(n[e[0]+""]=-1),e[2]}),i=[];o.buckets.each(function(e,t){i.push({name:t,dataList:e})});for(var r=i.length,a=0;a<r;++a){for(var l=i[a].name,s=0;s<i[a].dataList.length;++s){var u=i[a].dataList[s][0]+"";n[u]=a}for(var u in n)n.hasOwnProperty(u)&&n[u]!==a&&(n[u]=a,e[t]=[u,0,l],t++)}return e},t.prototype.getInitialData=function(e,t){for(var n=this.getReferringComponents("singleAxis",pf).models[0].get("type"),o=ws(e.data,function(e){return void 0!==e[2]}),i=this.fixData(o||[]),r=[],a=this.nameMap=qs(),l=0,s=0;s<i.length;++s)r.push(i[s][2]),a.get(i[s][2])||(a.set(i[s][2],l),l++);var u=NI(i,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:sI(n)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,c=new DI(u,this);return c.initData(i),c},t.prototype.getLayerSeries=function(){for(var e=this.getData(),t=e.count(),n=[],o=0;o<t;++o)n[o]=o;var i=e.mapDimension("single"),r=mf(n,function(t){return e.get("name",t)}),a=[];return r.buckets.each(function(t,n){t.sort(function(t,n){return e.get(i,t)-e.get(i,n)}),a.push({name:n,indices:t})}),a},t.prototype.getAxisTooltipData=function(e,t,n){Ms(e)||(e=e?[e]:[]);for(var o,i=this.getData(),r=this.getLayerSeries(),a=[],l=r.length,s=0;s<l;++s){for(var u=Number.MAX_VALUE,c=-1,d=r[s].indices.length,h=0;h<d;++h){var p=i.get(e[0],r[s].indices[h]),f=Math.abs(p-t);f<=u&&(o=p,u=f,c=r[s].indices[h])}a.push(c)}return{dataIndices:a,nestestValue:o}},t.prototype.formatTooltip=function(e,t,n){var o=this.getData();return AS("nameValue",{name:o.getName(e),value:o.get(o.mapDimension("value"),e)})},t.type="series.themeRiver",t.dependencies=["singleAxis"],t.defaultOption={z:2,colorBy:"data",coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",fontSize:11},emphasis:{label:{show:!0}}},t}(jS);function qG(e,t){e.eachSeriesByType("themeRiver",function(e){var t=e.getData(),n=e.coordinateSystem,o={},i=n.getRect();o.rect=i;var r=e.get("boundaryGap"),a=n.getAxis();(o.boundaryGap=r,"horizontal"===a.orient)?(r[0]=gp(r[0],i.height),r[1]=gp(r[1],i.height),KG(t,e,i.height-r[0]-r[1])):(r[0]=gp(r[0],i.width),r[1]=gp(r[1],i.width),KG(t,e,i.width-r[0]-r[1]));t.setLayout("layoutInfo",o)})}function KG(e,t,n){if(e.count())for(var o,i=t.coordinateSystem,r=t.getLayerSeries(),a=e.mapDimension("single"),l=e.mapDimension("value"),s=xs(r,function(t){return xs(t.indices,function(t){var n=i.dataToPoint(e.get(a,t));return n[1]=e.get(l,t),n})}),u=function(e){for(var t=e.length,n=e[0].length,o=[],i=[],r=0,a=0;a<n;++a){for(var l=0,s=0;s<t;++s)l+=e[s][a][1];l>r&&(r=l),o.push(l)}for(var u=0;u<n;++u)i[u]=(r-o[u])/2;r=0;for(var c=0;c<n;++c){var d=o[c]+i[c];d>r&&(r=d)}return{y0:i,max:r}}(s),c=u.y0,d=n/u.max,h=r.length,p=r[0].indices.length,f=0;f<p;++f){o=c[f]*d,e.setItemLayout(r[0].indices[f],{layerIndex:0,x:s[0][f][0],y0:o,y:s[0][f][1]*d});for(var g=1;g<h;++g)o+=s[g-1][f][1]*d,e.setItemLayout(r[g].indices[f],{layerIndex:g,x:s[g][f][0],y0:o,y:s[g][f][1]*d})}}var JG=function(e){function t(t,n,o,i){var r=e.call(this)||this;r.z2=2,r.textConfig={inside:!0},Nv(r).seriesIndex=n.seriesIndex;var a=new mv({z2:4,silent:t.getModel().get(["label","silent"])});return r.setTextContent(a),r.updateData(!0,t,n,o,i),r}return Wl(t,e),t.prototype.updateData=function(e,t,n,o,i){this.node=t,t.piece=this,n=n||this._seriesModel,o=o||this._ecModel;var r=this;Nv(r).dataIndex=t.dataIndex;var a=t.getModel(),l=a.getModel("emphasis"),s=t.getLayout(),u=ps({},s);u.label=null;var c=t.getVisual("style");c.lineJoin="bevel";var d=t.getVisual("decal");d&&(c.decal=YM(d,i));var h=hA(a.getModel("itemStyle"),u,!0);ps(u,h),ys(Pv,function(e){var t=r.ensureState(e),n=a.getModel([e,"itemStyle"]);t.style=n.getItemStyle();var o=hA(n,u);o&&(t.shape=o)}),e?(r.setShape(u),r.shape.r=s.r0,Uy(r,{shape:{r:s.r}},n,t.dataIndex)):(Wy(r,{shape:u},n),$y(r)),r.useStyle(c),this._updateLabel(n);var p=a.getShallow("cursor");p&&r.attr("cursor",p),this._seriesModel=n||this._seriesModel,this._ecModel=o||this._ecModel;var f=l.get("focus");xm(this,"relative"===f?Ks(t.getAncestorsIndices(),t.getDescendantIndices()):"ancestor"===f?t.getAncestorsIndices():"descendant"===f?t.getDescendantIndices():f,l.get("blurScope"),l.get("disabled"))},t.prototype._updateLabel=function(e){var t=this,n=this.node.getModel(),o=n.getModel("label"),i=this.node.getLayout(),r=i.endAngle-i.startAngle,a=(i.startAngle+i.endAngle)/2,l=Math.cos(a),s=Math.sin(a),u=this,c=u.getTextContent(),d=this.node.dataIndex,h=o.get("minAngle")/180*Math.PI,p=o.get("show")&&!(null!=h&&Math.abs(r)<h);function f(e,t){var n=e.get(t);return null==n?o.get(t):n}c.ignore=!p,ys(Bv,function(o){var h="normal"===o?n.getModel("label"):n.getModel([o,"label"]),p="normal"===o,g=p?c:c.ensureState(o),v=e.getFormattedLabel(d,o);p&&(v=v||t.node.name),g.style=Dx(h,{},null,"normal"!==o,!0),v&&(g.style.text=v);var m=h.get("show");null==m||p||(g.ignore=!m);var y,x=f(h,"position"),_=p?u:u.states[o],w=_.style.fill;_.textConfig={outsideFill:"inherit"===h.get("color")?w:null,inside:"outside"!==x};var b=f(h,"distance")||0,S=f(h,"align"),C=f(h,"rotate"),M=.5*Math.PI,T=1.5*Math.PI,I=Fg("tangential"===C?Math.PI/2-a:a),k=I>M&&!Cp(I-M)&&I<T;"outside"===x?(y=i.r+b,S=k?"right":"left"):S&&"center"!==S?"left"===S?(y=i.r0+b,S=k?"right":"left"):"right"===S&&(y=i.r-b,S=k?"left":"right"):(y=r===2*Math.PI&&0===i.r0?0:(i.r+i.r0)/2,S="center"),g.style.align=S,g.style.verticalAlign=f(h,"verticalAlign")||"middle",g.x=y*l+i.cx,g.y=y*s+i.cy;var D=0;"radial"===C?D=Fg(-a)+(k?Math.PI:0):"tangential"===C?D=Fg(Math.PI/2-a)+(k?Math.PI:0):Ds(C)&&(D=C*Math.PI/180),g.rotation=Fg(D)}),c.dirtyStyle()},t}(hy),QG="sunburstRootToNode",eH="sunburstHighlight";var tH=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.prototype.render=function(e,t,n,o){var i=this;this.seriesModel=e,this.api=n,this.ecModel=t;var r=e.getData(),a=r.tree.root,l=e.getViewRoot(),s=this.group,u=e.get("renderLabelForZeroData"),c=[];l.eachNode(function(e){c.push(e)});var d,h,p=this._oldChildren||[];!function(o,i){if(0===o.length&&0===i.length)return;function l(e){return e.getId()}function c(l,c){!function(o,i){u||!o||o.getValue()||(o=null);if(o!==a&&i!==a)if(i&&i.piece)o?(i.piece.updateData(!1,o,e,t,n),r.setItemGraphicEl(o.dataIndex,i.piece)):function(e){if(!e)return;e.piece&&(s.remove(e.piece),e.piece=null)}(i);else if(o){var l=new JG(o,e,t,n);s.add(l),r.setItemGraphicEl(o.dataIndex,l)}}(null==l?null:o[l],null==c?null:i[c])}new rI(i,o,l,l).add(c).update(c).remove(Cs(c,null)).execute()}(c,p),d=a,(h=l).depth>0?(i.virtualPiece?i.virtualPiece.updateData(!1,d,e,t,n):(i.virtualPiece=new JG(d,e,t,n),s.add(i.virtualPiece)),h.piece.off("click"),i.virtualPiece.on("click",function(e){i._rootToNode(h.parentNode)})):i.virtualPiece&&(s.remove(i.virtualPiece),i.virtualPiece=null),this._initEvents(),this._oldChildren=c},t.prototype._initEvents=function(){var e=this;this.group.off("click"),this.group.on("click",function(t){var n=!1;e.seriesModel.getViewRoot().eachNode(function(o){if(!n&&o.piece&&o.piece===t.target){var i=o.getModel().get("nodeClick");if("rootToNode"===i)e._rootToNode(o);else if("link"===i){var r=o.getModel(),a=r.get("link");if(a)X_(a,r.get("target",!0)||"_blank")}n=!0}})})},t.prototype._rootToNode=function(e){e!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:QG,from:this.uid,seriesId:this.seriesModel.id,targetNode:e})},t.prototype.containPoint=function(e,t){var n=t.getData().getItemLayout(0);if(n){var o=e[0]-n.cx,i=e[1]-n.cy,r=Math.sqrt(o*o+i*i);return r<=n.r&&r>=n.r0}},t.type="sunburst",t}(aC),nH=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.ignoreStyleOnData=!0,n}return Wl(t,e),t.prototype.getInitialData=function(e,t){var n={name:e.name,children:e.data};oH(n);var o=this._levelModels=xs(e.levels||[],function(e){return new Kx(e,this,t)},this),i=hP.createTree(n,this,function(e){e.wrapMethod("getItemModel",function(e,t){var n=i.getNodeByDataIndex(t),r=o[n.depth];return r&&(e.parentModel=r),e})});return i.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.getDataParams=function(t){var n=e.prototype.getDataParams.apply(this,arguments),o=this.getData().tree.getNodeByDataIndex(t);return n.treePathInfo=vP(o,this),n},t.prototype.getLevelModel=function(e){return this._levelModels&&this._levelModels[e.depth]},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var t=this.getRawData().tree.root;e&&(e===t||t.contains(e))||(this._viewRoot=t)},t.prototype.enableAriaDecal=function(){bP(this)},t.type="series.sunburst",t.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},t}(jS);function oH(e){var t=0;ys(e.children,function(e){oH(e);var n=e.value;Ms(n)&&(n=n[0]),t+=n});var n=e.value;Ms(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=t),n<0&&(n=0),Ms(e.value)?e.value[0]=n:e.value=n}var iH=Math.PI/180;function rH(e,t,n){t.eachSeriesByType(e,function(e){var t=e.get("center"),o=e.get("radius");Ms(o)||(o=[0,o]),Ms(t)||(t=[t,t]);var i=n.getWidth(),r=n.getHeight(),a=Math.min(i,r),l=gp(t[0],i),s=gp(t[1],r),u=gp(o[0],a/2),c=gp(o[1],a/2),d=-e.get("startAngle")*iH,h=e.get("minAngle")*iH,p=e.getData().tree.root,f=e.getViewRoot(),g=f.depth,v=e.get("sort");null!=v&&aH(f,v);var m=0;ys(f.children,function(e){!isNaN(e.getValue())&&m++});var y=f.getValue(),x=Math.PI/(y||m)*2,_=f.depth>0,w=f.height-(_?-1:1),b=(c-u)/(w||1),S=e.get("clockwise"),C=e.get("stillShowZeroSum"),M=S?1:-1,T=function(t,n){if(t){var o=n;if(t!==p){var i=t.getValue(),r=0===y&&C?x:i*x;r<h&&(r=h),o=n+M*r;var c=t.depth-g-(_?-1:1),d=u+b*c,f=u+b*(c+1),v=e.getLevelModel(t);if(v){var m=v.get("r0",!0),w=v.get("r",!0),I=v.get("radius",!0);null!=I&&(m=I[0],w=I[1]),null!=m&&(d=gp(m,a/2)),null!=w&&(f=gp(w,a/2))}t.setLayout({angle:r,startAngle:n,endAngle:o,clockwise:S,cx:l,cy:s,r0:d,r:f})}if(t.children&&t.children.length){var k=0;ys(t.children,function(e){k+=T(e,n+k)})}return o-n}};if(_){var I=u,k=u+b,D=2*Math.PI;p.setLayout({angle:D,startAngle:d,endAngle:d+D,clockwise:S,cx:l,cy:s,r0:I,r:k})}T(f,d)})}function aH(e,t){var n=e.children||[];e.children=function(e,t){if(Ts(t)){var n=xs(e,function(e,t){var n=e.getValue();return{params:{depth:e.depth,height:e.height,dataIndex:e.dataIndex,getValue:function(){return n}},index:t}});return n.sort(function(e,n){return t(e.params,n.params)}),xs(n,function(t){return e[t.index]})}var o="asc"===t;return e.sort(function(e,t){var n=(e.getValue()-t.getValue())*(o?1:-1);return 0===n?(e.dataIndex-t.dataIndex)*(o?-1:1):n})}(n,t),n.length&&ys(e.children,function(e){aH(e,t)})}function lH(e){var t={};e.eachSeriesByType("sunburst",function(e){var n=e.getData(),o=n.tree;o.eachNode(function(i){var r=i.getModel().getModel("itemStyle").getItemStyle();r.fill||(r.fill=function(e,n,o){for(var i=e;i&&i.depth>1;)i=i.parentNode;var r=n.getColorFromPalette(i.name||i.dataIndex+"",t);return e.depth>1&&Is(r)&&(r=Sd(r,(e.depth-1)/(o-1)*.5)),r}(i,e,o.root.height)),ps(n.ensureUniqueItemVisual(i.dataIndex,"style"),r)})})}var sH={color:"fill",borderColor:"stroke"},uH={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},cH=uf(),dH=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},t.prototype.getInitialData=function(e,t){return RI(null,this)},t.prototype.getDataParams=function(t,n,o){var i=e.prototype.getDataParams.call(this,t,n);return o&&(i.info=cH(o).info),i},t.type="series.custom",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},t}(jS);function hH(e,t){return t=t||[0,0],xs(["x","y"],function(n,o){var i=this.getAxis(n),r=t[o],a=e[o]/2;return"category"===i.type?i.getBandWidth():Math.abs(i.dataToCoord(r-a)-i.dataToCoord(r+a))},this)}function pH(e,t){return t=t||[0,0],xs([0,1],function(n){var o=t[n],i=e[n]/2,r=[],a=[];return r[n]=o-i,a[n]=o+i,r[1-n]=a[1-n]=t[1-n],Math.abs(this.dataToPoint(r)[n]-this.dataToPoint(a)[n])},this)}function fH(e,t){var n=this.getAxis(),o=t instanceof Array?t[0]:t,i=(e instanceof Array?e[0]:e)/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(o-i)-n.dataToCoord(o+i))}function gH(e,t){return t=t||[0,0],xs(["Radius","Angle"],function(n,o){var i=this["get"+n+"Axis"](),r=t[o],a=e[o]/2,l="category"===i.type?i.getBandWidth():Math.abs(i.dataToCoord(r-a)-i.dataToCoord(r+a));return"Angle"===n&&(l=l*Math.PI/180),l},this)}var vH={};function mH(e,t,n,o){return e&&(e.legacy||!1!==e.legacy&&!n&&!o&&"tspan"!==t&&("text"===t||eu(e,"text")))}function yH(e,t,n){var o,i,r,a=e;if("text"===t)r=a;else{r={},eu(a,"text")&&(r.text=a.text),eu(a,"rich")&&(r.rich=a.rich),eu(a,"textFill")&&(r.fill=a.textFill),eu(a,"textStroke")&&(r.stroke=a.textStroke),eu(a,"fontFamily")&&(r.fontFamily=a.fontFamily),eu(a,"fontSize")&&(r.fontSize=a.fontSize),eu(a,"fontStyle")&&(r.fontStyle=a.fontStyle),eu(a,"fontWeight")&&(r.fontWeight=a.fontWeight),i={type:"text",style:r,silent:!0},o={};var l=eu(a,"textPosition");n?o.position=l?a.textPosition:"inside":l&&(o.position=a.textPosition),eu(a,"textPosition")&&(o.position=a.textPosition),eu(a,"textOffset")&&(o.offset=a.textOffset),eu(a,"textRotation")&&(o.rotation=a.textRotation),eu(a,"textDistance")&&(o.distance=a.textDistance)}return xH(r,e),ys(r.rich,function(e){xH(e,e)}),{textConfig:o,textContent:i}}function xH(e,t){t&&(t.font=t.textFont||t.font,eu(t,"textStrokeWidth")&&(e.lineWidth=t.textStrokeWidth),eu(t,"textAlign")&&(e.align=t.textAlign),eu(t,"textVerticalAlign")&&(e.verticalAlign=t.textVerticalAlign),eu(t,"textLineHeight")&&(e.lineHeight=t.textLineHeight),eu(t,"textWidth")&&(e.width=t.textWidth),eu(t,"textHeight")&&(e.height=t.textHeight),eu(t,"textBackgroundColor")&&(e.backgroundColor=t.textBackgroundColor),eu(t,"textPadding")&&(e.padding=t.textPadding),eu(t,"textBorderColor")&&(e.borderColor=t.textBorderColor),eu(t,"textBorderWidth")&&(e.borderWidth=t.textBorderWidth),eu(t,"textBorderRadius")&&(e.borderRadius=t.textBorderRadius),eu(t,"textBoxShadowColor")&&(e.shadowColor=t.textBoxShadowColor),eu(t,"textBoxShadowBlur")&&(e.shadowBlur=t.textBoxShadowBlur),eu(t,"textBoxShadowOffsetX")&&(e.shadowOffsetX=t.textBoxShadowOffsetX),eu(t,"textBoxShadowOffsetY")&&(e.shadowOffsetY=t.textBoxShadowOffsetY))}function _H(e,t,n){var o=e;o.textPosition=o.textPosition||n.position||"inside",null!=n.offset&&(o.textOffset=n.offset),null!=n.rotation&&(o.textRotation=n.rotation),null!=n.distance&&(o.textDistance=n.distance);var i=o.textPosition.indexOf("inside")>=0,r=e.fill||"#000";wH(o,t);var a=null==o.textFill;return i?a&&(o.textFill=n.insideFill||"#fff",!o.textStroke&&n.insideStroke&&(o.textStroke=n.insideStroke),!o.textStroke&&(o.textStroke=r),null==o.textStrokeWidth&&(o.textStrokeWidth=2)):(a&&(o.textFill=e.fill||n.outsideFill||"#000"),!o.textStroke&&n.outsideStroke&&(o.textStroke=n.outsideStroke)),o.text=t.text,o.rich=t.rich,ys(t.rich,function(e){wH(e,e)}),o}function wH(e,t){t&&(eu(t,"fill")&&(e.textFill=t.fill),eu(t,"stroke")&&(e.textStroke=t.fill),eu(t,"lineWidth")&&(e.textStrokeWidth=t.lineWidth),eu(t,"font")&&(e.font=t.font),eu(t,"fontStyle")&&(e.fontStyle=t.fontStyle),eu(t,"fontWeight")&&(e.fontWeight=t.fontWeight),eu(t,"fontSize")&&(e.fontSize=t.fontSize),eu(t,"fontFamily")&&(e.fontFamily=t.fontFamily),eu(t,"align")&&(e.textAlign=t.align),eu(t,"verticalAlign")&&(e.textVerticalAlign=t.verticalAlign),eu(t,"lineHeight")&&(e.textLineHeight=t.lineHeight),eu(t,"width")&&(e.textWidth=t.width),eu(t,"height")&&(e.textHeight=t.height),eu(t,"backgroundColor")&&(e.textBackgroundColor=t.backgroundColor),eu(t,"padding")&&(e.textPadding=t.padding),eu(t,"borderColor")&&(e.textBorderColor=t.borderColor),eu(t,"borderWidth")&&(e.textBorderWidth=t.borderWidth),eu(t,"borderRadius")&&(e.textBorderRadius=t.borderRadius),eu(t,"shadowColor")&&(e.textBoxShadowColor=t.shadowColor),eu(t,"shadowBlur")&&(e.textBoxShadowBlur=t.shadowBlur),eu(t,"shadowOffsetX")&&(e.textBoxShadowOffsetX=t.shadowOffsetX),eu(t,"shadowOffsetY")&&(e.textBoxShadowOffsetY=t.shadowOffsetY),eu(t,"textShadowColor")&&(e.textShadowColor=t.textShadowColor),eu(t,"textShadowBlur")&&(e.textShadowBlur=t.textShadowBlur),eu(t,"textShadowOffsetX")&&(e.textShadowOffsetX=t.textShadowOffsetX),eu(t,"textShadowOffsetY")&&(e.textShadowOffsetY=t.textShadowOffsetY))}function bH(e,t){if("production"!==process.env.NODE_ENV){var n=e+"^_^"+t;vH[n]||(vH[n]=!0)}}var SH={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},CH=bs(SH),MH=_s(Fh,function(e,t){return e[t]=1,e},{}),TH=Fh.join(", "),IH=["","style","shape","extra"],kH=uf();function DH(e,t,n,o,i){var r=e+"Animation",a=Gy(e,o,i)||{},l=kH(t).userDuring;return a.duration>0&&(a.during=l?Ss(RH,{el:t,userDuring:l}):null,a.setToFinal=!0,a.scope=e),ps(a,n[r]),a}function NH(e,t,n,o){var i=(o=o||{}).dataIndex,r=o.isInit,a=o.clearStyle,l=n.isAnimationEnabled(),s=kH(e),u=t.style;s.userDuring=t.during;var c={},d={};if(function(e,t,n){for(var o=0;o<CH.length;o++){var i=CH[o],r=SH[i],a=t[i];a&&(n[r[0]]=a[0],n[r[1]]=a[1])}for(o=0;o<Fh.length;o++){var l=Fh[o];null!=t[l]&&(n[l]=t[l])}}(0,t,d),FH("shape",t,d),FH("extra",t,d),!r&&l&&(function(e,t,n){for(var o=t.transition,i=LH(o)?Fh:jp(o||[]),r=0;r<i.length;r++){var a=i[r];if("style"!==a&&"shape"!==a&&"extra"!==a){var l=e[a];"production"!==process.env.NODE_ENV&&VH(a,"el.transition"),n[a]=l}}}(e,t,c),zH("shape",e,t,c),zH("extra",e,t,c),function(e,t,n,o){if(!n)return;var i,r=e.style;if(r){var a=n.transition,l=t.transition;if(a&&!LH(a)){var s=jp(a);!i&&(i=o.style={});for(var u=0;u<s.length;u++){var c=r[f=s[u]];i[f]=c}}else if(e.getAnimationStyleProps&&(LH(l)||LH(a)||gs(l,"style")>=0)){var d=e.getAnimationStyleProps(),h=d?d.style:null;if(h){!i&&(i=o.style={});var p=bs(n);for(u=0;u<p.length;u++){var f;if(h[f=p[u]]){c=r[f];i[f]=c}}}}}}(e,t,u,c)),d.style=u,function(e,t,n){var o=t.style;if(!e.isGroup&&o){if(n){e.useStyle({});for(var i=e.animators,r=0;r<i.length;r++){var a=i[r];"style"===a.targetName&&a.changeTarget(e.style)}}e.setStyle(o)}t&&(t.style=null,t&&e.attr(t),t.style=o)}(e,d,a),function(e,t){eu(t,"silent")&&(e.silent=t.silent),eu(t,"ignore")&&(e.ignore=t.ignore),e instanceof Qf&&eu(t,"invisible")&&(e.invisible=t.invisible);e instanceof nv&&eu(t,"autoBatch")&&(e.autoBatch=t.autoBatch)}(e,t),l)if(r){var h={};ys(IH,function(e){var n=e?t[e]:t;n&&n.enterFrom&&(e&&(h[e]=h[e]||{}),ps(e?h[e]:h,n.enterFrom))});var p=DH("enter",e,t,n,i);p.duration>0&&e.animateFrom(h,p)}else!function(e,t,n,o,i){if(i){var r=DH("update",e,t,o,n);r.duration>0&&e.animateFrom(i,r)}}(e,t,i||0,n,c);EH(e,t),u?e.dirty():e.markRedraw()}function EH(e,t){for(var n=kH(e).leaveToProps,o=0;o<IH.length;o++){var i=IH[o],r=i?t[i]:t;r&&r.leaveTo&&(n||(n=kH(e).leaveToProps={}),i&&(n[i]=n[i]||{}),ps(i?n[i]:n,r.leaveTo))}}function AH(e,t,n,o){if(e){var i=e.parent,r=kH(e).leaveToProps;if(r){var a=DH("update",e,t,n,0);a.done=function(){i.remove(e)},e.animateTo(r,a)}else i.remove(e)}}function LH(e){return"all"===e}var VH,OH={},PH={setTransform:function(e,t){return"production"!==process.env.NODE_ENV&&Hs(eu(MH,e),"Only "+TH+" available in `setTransform`."),OH.el[e]=t,this},getTransform:function(e){return"production"!==process.env.NODE_ENV&&Hs(eu(MH,e),"Only "+TH+" available in `getTransform`."),OH.el[e]},setShape:function(e,t){"production"!==process.env.NODE_ENV&&BH(e);var n=OH.el;return(n.shape||(n.shape={}))[e]=t,n.dirtyShape&&n.dirtyShape(),this},getShape:function(e){"production"!==process.env.NODE_ENV&&BH(e);var t=OH.el.shape;if(t)return t[e]},setStyle:function(e,t){"production"!==process.env.NODE_ENV&&BH(e);var n=OH.el,o=n.style;return o&&("production"!==process.env.NODE_ENV&&Ps(t)&&zp("style."+e+" must not be assigned with NaN."),o[e]=t,n.dirtyStyle&&n.dirtyStyle()),this},getStyle:function(e){"production"!==process.env.NODE_ENV&&BH(e);var t=OH.el.style;if(t)return t[e]},setExtra:function(e,t){return"production"!==process.env.NODE_ENV&&BH(e),(OH.el.extra||(OH.el.extra={}))[e]=t,this},getExtra:function(e){"production"!==process.env.NODE_ENV&&BH(e);var t=OH.el.extra;if(t)return t[e]}};function BH(e){if("production"!==process.env.NODE_ENV&&("transition"===e||"enterFrom"===e||"leaveTo"===e))throw new Error('key must not be "'+e+'"')}function RH(){var e=this,t=e.el;if(t){var n=kH(t).userDuring,o=e.userDuring;n===o?(OH.el=t,o(PH)):e.el=e.userDuring=null}}function zH(e,t,n,o){var i=n[e];if(i){var r,a=t[e];if(a){var l=n.transition,s=i.transition;if(s)if(!r&&(r=o[e]={}),LH(s))ps(r,a);else for(var u=jp(s),c=0;c<u.length;c++){var d=a[p=u[c]];r[p]=d}else if(LH(l)||gs(l,e)>=0){!r&&(r=o[e]={});var h=bs(a);for(c=0;c<h.length;c++){var p;d=a[p=h[c]];GH(i[p],d)&&(r[p]=d)}}}}}function FH(e,t,n){var o=t[e];if(o)for(var i=n[e]={},r=bs(o),a=0;a<r.length;a++){var l=r[a];i[l]=eh(o[l])}}function GH(e,t){return ms(e)?e!==t:null!=e&&isFinite(e)}"production"!==process.env.NODE_ENV&&(VH=function(e,t){eu(MH,e)||zp("Prop `"+e+"` is not a permitted in `"+t+"`. Only `"+bs(MH).join("`, `")+"` are permitted.")});var HH=uf(),WH=["percent","easing","shape","style","extra"];function UH(e){e.stopAnimation("keyframe"),e.attr(HH(e))}function YH(e,t,n){if(n.isAnimationEnabled()&&t)if(Ms(t))ys(t,function(t){YH(e,t,n)});else{var o=t.keyframes,i=t.duration;if(n&&null==i){var r=Gy("enter",n,0);i=r&&r.duration}if(o&&i){var a=HH(e);ys(IH,function(n){if(!n||e[n]){var r,l=!1;o.sort(function(e,t){return e.percent-t.percent}),ys(o,function(o){var s=e.animators,u=n?o[n]:o;if("production"!==process.env.NODE_ENV&&o.percent>=1&&(l=!0),u){var c=bs(u);if(n||(c=ws(c,function(e){return gs(WH,e)<0})),c.length){r||((r=e.animate(n,t.loop,!0)).scope="keyframe");for(var d=0;d<s.length;d++)s[d]!==r&&s[d].targetName===r.targetName&&s[d].stopTracks(c);n&&(a[n]=a[n]||{});var h=n?a[n]:a;ys(c,function(t){h[t]=((n?e[n]:e)||{})[t]}),r.whenWithKeys(i*o.percent,u,c,o.easing)}}}),r&&("production"!==process.env.NODE_ENV&&(l||zp("End frame with percent: 1 is missing in the keyframeAnimation.",!0)),r.delay(t.delay||0).duration(i).start(t.easing))}})}}}var ZH="emphasis",XH="normal",jH="blur",$H="select",qH=[XH,ZH,jH,$H],KH={normal:["itemStyle"],emphasis:[ZH,"itemStyle"],blur:[jH,"itemStyle"],select:[$H,"itemStyle"]},JH={normal:["label"],emphasis:[ZH,"label"],blur:[jH,"label"],select:[$H,"label"]},QH=["x","y"],eW={normal:{},emphasis:{},blur:{},select:{}},tW={cartesian2d:function(e){var t=e.master.getRect();return{coordSys:{type:"cartesian2d",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:Ss(hH,e)}}},geo:function(e){var t=e.getBoundingRect();return{coordSys:{type:"geo",x:t.x,y:t.y,width:t.width,height:t.height,zoom:e.getZoom()},api:{coord:function(t){return e.dataToPoint(t)},size:Ss(pH,e)}}},single:function(e){var t=e.getRect();return{coordSys:{type:"singleAxis",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:Ss(fH,e)}}},polar:function(e){var t=e.getRadiusAxis(),n=e.getAngleAxis(),o=t.getExtent();return o[0]>o[1]&&o.reverse(),{coordSys:{type:"polar",cx:e.cx,cy:e.cy,r:o[1],r0:o[0]},api:{coord:function(o){var i=t.dataToRadius(o[0]),r=n.dataToAngle(o[1]),a=e.coordToPoint([i,r]);return a.push(i,r*Math.PI/180),a},size:Ss(gH,e)}}},calendar:function(e){var t=e.getRect(),n=e.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:e.getCellWidth(),cellHeight:e.getCellHeight(),rangeInfo:{start:n.start,end:n.end,weeks:n.weeks,dayCount:n.allDay}},api:{coord:function(t,n){return e.dataToPoint(t,n)}}}}};function nW(e){return e instanceof nv}function oW(e){return e instanceof Qf}var iW=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.prototype.render=function(e,t,n,o){this._progressiveEls=null;var i=this._data,r=e.getData(),a=this.group,l=uW(e,r,t,n);i||a.removeAll(),r.diff(i).add(function(t){dW(n,null,t,l(t,o),e,a,r)}).remove(function(t){var n=i.getItemGraphicEl(t);n&&AH(n,cH(n).option,e)}).update(function(t,s){var u=i.getItemGraphicEl(s);dW(n,u,t,l(t,o),e,a,r)}).execute();var s=e.get("clip",!0)?HE(e.coordinateSystem,!1,e):null;s?a.setClipPath(s):a.removeClipPath(),this._data=r},t.prototype.incrementalPrepareRender=function(e,t,n){this.group.removeAll(),this._data=null},t.prototype.incrementalRender=function(e,t,n,o,i){var r=t.getData(),a=uW(t,r,n,o),l=this._progressiveEls=[];function s(e){e.isGroup||(e.incremental=!0,e.ensureState("emphasis").hoverLayer=!0)}for(var u=e.start;u<e.end;u++){var c=dW(null,null,u,a(u,i),t,this.group,r);c&&(c.traverse(s),l.push(c))}},t.prototype.eachRendered=function(e){bx(this._progressiveEls||this.group,e)},t.prototype.filterForExposedEvent=function(e,t,n,o){var i=t.element;if(null==i||n.name===i)return!0;for(;(n=n.__hostTarget||n.parent)&&n!==this.group;)if(n.name===i)return!0;return!1},t.type="custom",t}(aC);function rW(e){var t,n=e.type;if("path"===n){var o=e.shape,i=null!=o.width&&null!=o.height?{x:o.x||0,y:o.y||0,width:o.width,height:o.height}:null,r=wW(o);t=nx(r,null,i,o.layout||"center"),cH(t).customPathData=r}else if("image"===n)t=new lv({}),cH(t).customImagePath=e.style.image;else if("text"===n)t=new mv({});else if("group"===n)t=new lp;else{if("compoundPath"===n)throw new Error('"compoundPath" is not supported yet.');var a=tx(n);if(!a){var l="";"production"!==process.env.NODE_ENV&&(l='graphic type "'+n+'" can not be found.'),Up(l)}t=new a}return cH(t).customGraphicType=n,t.name=e.name,t.z2EmphasisLift=1,t.z2SelectLift=1,t}function aW(e,t,n,o,i,r,a){UH(t);var l=i&&i.normal.cfg;l&&t.setTextConfig(l),o&&null==o.transition&&(o.transition=QH);var s=o&&o.style;if(s){if("text"===t.type){var u=s;eu(u,"textFill")&&(u.fill=u.textFill),eu(u,"textStroke")&&(u.stroke=u.textStroke)}var c=void 0,d=nW(t)?s.decal:null;e&&d&&(d.dirty=!0,c=YM(d,e)),s.__decalPattern=c}oW(t)&&(s&&(c=s.__decalPattern)&&(s.decal=c));NH(t,o,r,{dataIndex:n,isInit:a,clearStyle:!0}),YH(t,o.keyframeAnimation,r)}function lW(e,t,n,o,i){var r=t.isGroup?null:t,a=i&&i[e].cfg;if(r){var l=r.ensureState(e);if(!1===o){var s=r.getState(e);s&&(s.style=null)}else l.style=o||null;a&&(l.textConfig=a),nm(r)}}function sW(e,t,n){var o=n===XH,i=o?t:gW(t,n),r=i?i.z2:null;null!=r&&((o?e:e.ensureState(n)).z2=r||0)}function uW(e,t,n,o){var i=e.get("renderItem"),r=e.coordinateSystem,a={};r&&("production"!==process.env.NODE_ENV&&(Hs(i,"series.render is required."),Hs(r.prepareCustoms||tW[r.type],"This coordSys does not support custom series.")),a=r.prepareCustoms?r.prepareCustoms(r):tW[r.type](r));for(var l,s,u=fs({getWidth:o.getWidth,getHeight:o.getHeight,getZr:o.getZr,getDevicePixelRatio:o.getDevicePixelRatio,value:function(e,n){return null==n&&(n=l),t.getStore().get(t.getDimensionIndex(e||0),n)},style:function(n,o){"production"!==process.env.NODE_ENV&&bH("api.style","Please write literal style directly instead.");null==o&&(o=l);var i=t.getItemVisual(o,"style"),r=i&&i.fill,a=i&&i.opacity,s=y(o,XH).getItemStyle();null!=r&&(s.fill=r),null!=a&&(s.opacity=a);var u={inheritColor:Is(r)?r:"#000"},c=x(o,XH),d=Dx(c,null,u,!1,!0);d.text=c.getShallow("show")?Rs(e.getFormattedLabel(o,XH),bE(t,o)):null;var h=Nx(c,u,!1);return w(n,s),s=_H(s,d,h),n&&_(s,n),s.legacy=!0,s},ordinalRawValue:function(e,n){null==n&&(n=l),e=e||0;var o=t.getDimensionInfo(e);if(!o){var i=t.getDimensionIndex(e);return i>=0?t.getStore().get(i,n):void 0}var r=t.get(o.name,n),a=o&&o.ordinalMeta;return a?a.categories[r]:r},styleEmphasis:function(n,o){"production"!==process.env.NODE_ENV&&bH("api.styleEmphasis","Please write literal style directly instead.");null==o&&(o=l);var i=y(o,ZH).getItemStyle(),r=x(o,ZH),a=Dx(r,null,null,!0,!0);a.text=r.getShallow("show")?zs(e.getFormattedLabel(o,ZH),e.getFormattedLabel(o,XH),bE(t,o)):null;var s=Nx(r,null,!0);return w(n,i),i=_H(i,a,s),n&&_(i,n),i.legacy=!0,i},visual:function(e,n){if(null==n&&(n=l),eu(sH,e)){var o=t.getItemVisual(n,"style");return o?o[sH[e]]:null}if(eu(uH,e))return t.getItemVisual(n,e)},barLayout:function(e){if("cartesian2d"===r.type){return function(e){var t=[],n=e.axis,o="axis0";if("category"===n.type){for(var i=n.getBandWidth(),r=0;r<e.count;r++)t.push(fs({bandWidth:i,axisKey:o,stackId:ok+r},e));var a=sk(t),l=[];for(r=0;r<e.count;r++){var s=a[o][ok+r];s.offsetCenter=s.offset+s.width/2,l.push(s)}return l}}(fs({axis:r.getBaseAxis()},e))}},currentSeriesIndices:function(){return n.getCurrentSeriesIndices()},font:function(e){return Ox(e,n)}},a.api||{}),c={context:{},seriesId:e.id,seriesName:e.name,seriesIndex:e.seriesIndex,coordSys:a.coordSys,dataInsideLength:t.count(),encode:cW(e.getData())},d={},h={},p={},f={},g=0;g<qH.length;g++){var v=qH[g];p[v]=e.getModel(KH[v]),f[v]=e.getModel(JH[v])}function m(e){return e===l?s||(s=t.getItemModel(e)):t.getItemModel(e)}function y(e,n){return t.hasItemOption?e===l?d[n]||(d[n]=m(e).getModel(KH[n])):m(e).getModel(KH[n]):p[n]}function x(e,n){return t.hasItemOption?e===l?h[n]||(h[n]=m(e).getModel(JH[n])):m(e).getModel(JH[n]):f[n]}return function(e,n){return l=e,s=null,d={},h={},i&&i(fs({dataIndexInside:e,dataIndex:t.getRawIndex(e),actionType:n?n.type:null},c),u)};function _(e,t){for(var n in t)eu(t,n)&&(e[n]=t[n])}function w(e,t){e&&(e.textFill&&(t.textFill=e.textFill),e.textPosition&&(t.textPosition=e.textPosition))}}function cW(e){var t={};return ys(e.dimensions,function(n){var o=e.getDimensionInfo(n);if(!o.isExtraCoord){var i=o.coordDim;(t[i]=t[i]||[])[o.coordDimIndex]=e.getDimensionIndex(n)}}),t}function dW(e,t,n,o,i,r,a){if(o){var l=hW(e,t,n,o,i,r);return l&&a.setItemGraphicEl(n,l),l&&xm(l,o.focus,o.blurScope,o.emphasisDisabled),l}r.remove(t)}function hW(e,t,n,o,i,r){"production"!==process.env.NODE_ENV&&Hs(o,"should not have an null/undefined element setting");var a=-1,l=t;t&&pW(t,o,i)&&(a=gs(r.childrenRef(),t),t=null);var s,u,c=!t,d=t;d?d.clearStates():(d=rW(o),l&&(s=l,(u=d).copyTransform(s),oW(u)&&oW(s)&&(u.setStyle(s.style),u.z=s.z,u.z2=s.z2,u.zlevel=s.zlevel,u.invisible=s.invisible,u.ignore=s.ignore,nW(u)&&nW(s)&&u.setShape(s.shape)))),!1===o.morph?d.disableMorphing=!0:d.disableMorphing&&(d.disableMorphing=!1),eW.normal.cfg=eW.normal.conOpt=eW.emphasis.cfg=eW.emphasis.conOpt=eW.blur.cfg=eW.blur.conOpt=eW.select.cfg=eW.select.conOpt=null,eW.isLegacy=!1,function(e,t,n,o,i,r){if(e.isGroup)return;fW(n,null,r),fW(n,ZH,r);var a=r.normal.conOpt,l=r.emphasis.conOpt,s=r.blur.conOpt,u=r.select.conOpt;if(null!=a||null!=l||null!=u||null!=s){var c=e.getTextContent();if(!1===a)c&&e.removeTextContent();else{a=r.normal.conOpt=a||{type:"text"},c?c.clearStates():(c=rW(a),e.setTextContent(c)),aW(null,c,t,a,null,o,i);for(var d=a&&a.style,h=0;h<qH.length;h++){var p=qH[h];if(p!==XH){var f=r[p].conOpt;lW(p,c,0,vW(a,f,p),null)}}d?c.dirty():c.markRedraw()}}}(d,n,o,i,c,eW),function(e,t,n,o,i){var r=n.clipPath;if(!1===r)e&&e.getClipPath()&&e.removeClipPath();else if(r){var a=e.getClipPath();a&&pW(a,r,o)&&(a=null),a||(a=rW(r),"production"!==process.env.NODE_ENV&&Hs(nW(a),"Only any type of `path` can be used in `clipPath`, rather than "+a.type+"."),e.setClipPath(a)),aW(null,a,t,r,null,o,i)}}(d,n,o,i,c),aW(e,d,n,o,eW,i,c),eu(o,"info")&&(cH(d).info=o.info);for(var h=0;h<qH.length;h++){var p=qH[h];if(p!==XH){var f=gW(o,p);lW(p,d,0,vW(o,f,p),eW)}}return function(e,t,n){if(!e.isGroup){var o=e,i=n.currentZ,r=n.currentZLevel;o.z=i,o.zlevel=r;var a=t.z2;null!=a&&(o.z2=a||0);for(var l=0;l<qH.length;l++)sW(o,t,qH[l])}}(d,o,i),"group"===o.type&&function(e,t,n,o,i){var r=o.children,a=r?r.length:0,l=o.$mergeChildren,s="byName"===l||o.diffChildrenByName,u=!1===l;if(!a&&!s&&!u)return;if(s)return c={api:e,oldChildren:t.children()||[],newChildren:r||[],dataIndex:n,seriesModel:i,group:t},void new rI(c.oldChildren,c.newChildren,yW,yW,c).add(xW).update(xW).remove(_W).execute();var c;u&&t.removeAll();for(var d=0;d<a;d++){var h=r[d],p=t.childAt(d);h?(null==h.ignore&&(h.ignore=!1),hW(e,p,n,h,i,t)):("production"!==process.env.NODE_ENV&&Hs(p,"renderItem should not return a group containing elements as null/undefined/{} if they do not exist before."),p.ignore=!0)}for(var f=t.childCount()-1;f>=d;f--){var g=t.childAt(f);mW(t,g,i)}}(e,d,n,o,i),a>=0?r.replaceAt(d,a):r.add(d),d}function pW(e,t,n){var o,i=cH(e),r=t.type,a=t.shape,l=t.style;return n.isUniversalTransitionEnabled()||null!=r&&r!==i.customGraphicType||"path"===r&&((o=a)&&(eu(o,"pathData")||eu(o,"d")))&&wW(a)!==i.customPathData||"image"===r&&eu(l,"image")&&l.image!==i.customImagePath}function fW(e,t,n){var o=t?gW(e,t):e,i=t?vW(e,o,ZH):e.style,r=e.type,a=o?o.textConfig:null,l=e.textContent,s=l?t?gW(l,t):l:null;if(i&&(n.isLegacy||mH(i,r,!!a,!!s))){n.isLegacy=!0;var u=yH(i,r,!t);!a&&u.textConfig&&(a=u.textConfig),!s&&u.textContent&&(s=u.textContent)}if(!t&&s){var c=s;!c.type&&(c.type="text"),"production"!==process.env.NODE_ENV&&Hs("text"===c.type,'textContent.type must be "text"')}var d=t?n[t]:n.normal;d.cfg=a,d.conOpt=s}function gW(e,t){return t?e?e[t]:null:e}function vW(e,t,n){var o=t&&t.style;return null==o&&n===ZH&&e&&(o=e.styleEmphasis),o}function mW(e,t,n){t&&AH(t,cH(e).option,n)}function yW(e,t){var n=e&&e.name;return null!=n?n:"e\0\0"+t}function xW(e,t){var n=this.context,o=null!=e?n.newChildren[e]:null,i=null!=t?n.oldChildren[t]:null;hW(n.api,i,n.dataIndex,o,n.seriesModel,n.group)}function _W(e){var t=this.context,n=t.oldChildren[e];n&&AH(n,cH(n).option,t.seriesModel)}function wW(e){return e&&(e.pathData||e.d)}var bW=uf(),SW=cs,CW=Ss,MW=function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(e,t,n,o){var i=t.get("value"),r=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=n,o||this._lastValue!==i||this._lastStatus!==r){this._lastValue=i,this._lastStatus=r;var a=this._group,l=this._handle;if(!r||"hide"===r)return a&&a.hide(),void(l&&l.hide());a&&a.show(),l&&l.show();var s={};this.makeElOption(s,i,e,t,n);var u=s.graphicKey;u!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=u;var c=this._moveAnimation=this.determineAnimation(e,t);if(a){var d=Cs(TW,t,c);this.updatePointerEl(a,s,d),this.updateLabelEl(a,s,d,t)}else a=this._group=new lp,this.createPointerEl(a,s,e,t),this.createLabelEl(a,s,e,t),n.getZr().add(a);NW(a,t,!0),this._renderHandle(i)}},e.prototype.remove=function(e){this.clear(e)},e.prototype.dispose=function(e){this.clear(e)},e.prototype.determineAnimation=function(e,t){var n=t.get("animation"),o=e.axis,i="category"===o.type,r=t.get("snap");if(!r&&!i)return!1;if("auto"===n||null==n){var a=this.animationThreshold;if(i&&o.getBandWidth()>a)return!0;if(r){var l=AL(e).seriesDataCount,s=o.getExtent();return Math.abs(s[0]-s[1])/l>a}return!1}return!0===n},e.prototype.makeElOption=function(e,t,n,o,i){},e.prototype.createPointerEl=function(e,t,n,o){var i=t.pointer;if(i){var r=bW(e).pointerEl=new Sx[i.type](SW(t.pointer));e.add(r)}},e.prototype.createLabelEl=function(e,t,n,o){if(t.label){var i=bW(e).labelEl=new mv(SW(t.label));e.add(i),kW(i,o)}},e.prototype.updatePointerEl=function(e,t,n){var o=bW(e).pointerEl;o&&t.pointer&&(o.setStyle(t.pointer.style),n(o,{shape:t.pointer.shape}))},e.prototype.updateLabelEl=function(e,t,n,o){var i=bW(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),kW(i,o))},e.prototype._renderHandle=function(e){if(!this._dragging&&this.updateHandleTransform){var t,n=this._axisPointerModel,o=this._api.getZr(),i=this._handle,r=n.getModel("handle"),a=n.get("status");if(!r.get("show")||!a||"hide"===a)return i&&o.remove(i),void(this._handle=null);this._handle||(t=!0,i=this._handle=gx(r.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(e){Hu(e.event)},onmousedown:CW(this._onHandleDragMove,this,0,0),drift:CW(this._onHandleDragMove,this),ondragend:CW(this._onHandleDragEnd,this)}),o.add(i)),NW(i,n,!1),i.setStyle(r.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=r.get("size");Ms(l)||(l=[l,l]),i.scaleX=l[0]/2,i.scaleY=l[1]/2,vC(this,"_doDispatchAxisPointer",r.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,t)}},e.prototype._moveHandleToValue=function(e,t){TW(this._axisPointerModel,!t&&this._moveAnimation,this._handle,DW(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var o=this.updateHandleTransform(DW(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=o,n.stopAnimation(),n.attr(DW(o)),bW(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},e.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,o=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),o&&t.remove(o),this._group=null,this._handle=null,this._payloadInfo=null),mC(this,"_doDispatchAxisPointer")},e.prototype.doClear=function(){},e.prototype.buildLabel=function(e,t,n){return{x:e[n=n||0],y:e[1-n],width:t[n],height:t[1-n]}},e}();function TW(e,t,n,o){IW(bW(n).lastProp,o)||(bW(n).lastProp=o,t?Wy(n,o,e):(n.stopAnimation(),n.attr(o)))}function IW(e,t){if(Ns(e)&&Ns(t)){var n=!0;return ys(t,function(t,o){n=n&&IW(e[o],t)}),!!n}return e===t}function kW(e,t){e[t.get(["label","show"])?"show":"hide"]()}function DW(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function NW(e,t,n){var o=t.get("z"),i=t.get("zlevel");e&&e.traverse(function(e){"group"!==e.type&&(null!=o&&(e.z=o),null!=i&&(e.zlevel=i),e.silent=n)})}function EW(e){var t,n=e.get("type"),o=e.getModel(n+"Style");return"line"===n?(t=o.getLineStyle()).fill=null:"shadow"===n&&((t=o.getAreaStyle()).stroke=null),t}function AW(e,t,n,o,i){var r=LW(n.get("value"),t.axis,t.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),a=n.getModel("label"),l=G_(a.get("padding")||0),s=a.getFont(),u=Yh(r,s),c=i.position,d=u.width+l[1]+l[3],h=u.height+l[0]+l[2],p=i.align;"right"===p&&(c[0]-=d),"center"===p&&(c[0]-=d/2);var f=i.verticalAlign;"bottom"===f&&(c[1]-=h),"middle"===f&&(c[1]-=h/2),function(e,t,n,o){var i=o.getWidth(),r=o.getHeight();e[0]=Math.min(e[0]+t,i)-t,e[1]=Math.min(e[1]+n,r)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}(c,d,h,o);var g=a.get("backgroundColor");g&&"auto"!==g||(g=t.get(["axisLine","lineStyle","color"])),e.label={x:c[0],y:c[1],style:Dx(a,{text:r,font:s,fill:a.getTextColor(),padding:l,backgroundColor:g}),z2:10}}function LW(e,t,n,o,i){e=t.scale.parse(e);var r=t.scale.getLabel({value:e},{precision:i.precision}),a=i.formatter;if(a){var l={value:Fk(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};ys(o,function(e){var t=n.getSeriesByIndex(e.seriesIndex),o=e.dataIndexInside,i=t&&t.getDataParams(o);i&&l.seriesData.push(i)}),Is(a)?r=a.replace("{value}",r):Ts(a)&&(r=a(l))}return r}function VW(e,t,n){var o=[1,0,0,1,0,0];return Ju(o,o,n.rotation),Ku(o,o,n.position),cx([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],o)}function OW(e,t,n,o,i,r){var a=CL.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=i.get(["label","margin"]),AW(t,o,i,r,{position:VW(o.axis,e,n),align:a.textAlign,verticalAlign:a.textVerticalAlign})}function PW(e,t,n){return{x1:e[n=n||0],y1:e[1-n],x2:t[n],y2:t[1-n]}}function BW(e,t,n){return{x:e[n=n||0],y:e[1-n],width:t[n],height:t[1-n]}}function RW(e,t,n,o,i,r){return{cx:e,cy:t,r0:n,r:o,startAngle:i,endAngle:r,clockwise:!0}}var zW=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Wl(t,e),t.prototype.makeElOption=function(e,t,n,o,i){var r=n.axis,a=r.grid,l=o.get("type"),s=FW(a,r).getOtherAxis(r).getGlobalExtent(),u=r.toGlobalCoord(r.dataToCoord(t,!0));if(l&&"none"!==l){var c=EW(o),d=GW[l](r,u,s);d.style=c,e.graphicKey=d.type,e.pointer=d}OW(t,e,fL(a.model,n),n,o,i)},t.prototype.getHandleTransform=function(e,t,n){var o=fL(t.axis.grid.model,t,{labelInside:!1});o.labelMargin=n.get(["handle","margin"]);var i=VW(t.axis,e,o);return{x:i[0],y:i[1],rotation:o.rotation+(o.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,o){var i=n.axis,r=i.grid,a=i.getGlobalExtent(!0),l=FW(r,i).getOtherAxis(i).getGlobalExtent(),s="x"===i.dim?0:1,u=[e.x,e.y];u[s]+=t[s],u[s]=Math.min(a[1],u[s]),u[s]=Math.max(a[0],u[s]);var c=(l[1]+l[0])/2,d=[c,c];d[s]=u[s];return{x:u[0],y:u[1],rotation:e.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][s]}},t}(MW);function FW(e,t){var n={};return n[t.dim+"AxisIndex"]=t.index,e.getCartesian(n)}var GW={line:function(e,t,n){return{type:"Line",subPixelOptimize:!0,shape:PW([t,n[0]],[t,n[1]],HW(e))}},shadow:function(e,t,n){var o=Math.max(1,e.getBandWidth()),i=n[1]-n[0];return{type:"Rect",shape:BW([t-o/2,n[0]],[o,i],HW(e))}}};function HW(e){return"x"===e.dim?0:1}var WW=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.type="axisPointer",t.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},t}(aw),UW=uf(),YW=ys;function ZW(e,t,n){if(!Yl.node){var o=t.getZr();UW(o).records||(UW(o).records={}),function(e,t){if(UW(e).initialized)return;function n(n,o){e.on(n,function(n){var i=function(e){var t={showTip:[],hideTip:[]},n=function(o){var i=t[o.type];i?i.push(o):(o.dispatchAction=n,e.dispatchAction(o))};return{dispatchAction:n,pendings:t}}(t);YW(UW(e).records,function(e){e&&o(e,n,i.dispatchAction)}),function(e,t){var n,o=e.showTip.length,i=e.hideTip.length;o?n=e.showTip[o-1]:i&&(n=e.hideTip[i-1]);n&&(n.dispatchAction=null,t.dispatchAction(n))}(i.pendings,t)})}UW(e).initialized=!0,n("click",Cs(jW,"click")),n("mousemove",Cs(jW,"mousemove")),n("globalout",XW)}(o,t),(UW(o).records[e]||(UW(o).records[e]={})).handler=n}}function XW(e,t,n){e.handler("leave",null,n)}function jW(e,t,n,o){t.handler(e,n,o)}function $W(e,t){if(!Yl.node){var n=t.getZr();(UW(n).records||{})[e]&&(UW(n).records[e]=null)}}var qW=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.prototype.render=function(e,t,n){var o=t.getComponent("tooltip"),i=e.get("triggerOn")||o&&o.get("triggerOn")||"mousemove|click";ZW("axisPointer",n,function(e,t,n){"none"!==i&&("leave"===e||i.indexOf(e)>=0)&&n({type:"updateAxisPointer",currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})})},t.prototype.remove=function(e,t){$W("axisPointer",t)},t.prototype.dispose=function(e,t){$W("axisPointer",t)},t.type="axisPointer",t}(nC);function KW(e,t){var n,o=[],i=e.seriesIndex;if(null==i||!(n=t.getSeriesByIndex(i)))return{point:[]};var r=n.getData(),a=sf(r,e);if(null==a||a<0||Ms(a))return{point:[]};var l=r.getItemGraphicEl(a),s=n.coordinateSystem;if(n.getTooltipPosition)o=n.getTooltipPosition(a)||[];else if(s&&s.dataToPoint)if(e.isStacked){var u=s.getBaseAxis(),c=s.getOtherAxis(u).dim,d=u.dim,h="x"===c||"radius"===c?1:0,p=r.mapDimension(d),f=[];f[h]=r.get(p,a),f[1-h]=r.get(r.getCalculationInfo("stackResultDimension"),a),o=s.dataToPoint(f)||[]}else o=s.dataToPoint(r.getValues(xs(s.dimensions,function(e){return r.mapDimension(e)}),a))||[];else if(l){var g=l.getBoundingRect().clone();g.applyTransform(l.transform),o=[g.x+g.width/2,g.y+g.height/2]}return{point:o,el:l}}var JW=uf();function QW(e,t,n){var o=e.currTrigger,i=[e.x,e.y],r=e,a=e.dispatchAction||Ss(n.dispatchAction,n),l=t.getComponent("axisPointer").coordSysAxesInfo;if(l){iU(i)&&(i=KW({seriesIndex:r.seriesIndex,dataIndex:r.dataIndex},t).point);var s=iU(i),u=r.axesInfo,c=l.axesInfo,d="leave"===o||iU(i),h={},p={},f={list:[],map:{}},g={showPointer:Cs(tU,p),showTooltip:Cs(nU,f)};ys(l.coordSysMap,function(e,t){var n=s||e.containPoint(i);ys(l.coordSysAxesInfo[t],function(e,t){var o=e.axis,r=function(e,t){for(var n=0;n<(e||[]).length;n++){var o=e[n];if(t.axis.dim===o.axisDim&&t.axis.model.componentIndex===o.axisIndex)return o}}(u,e);if(!d&&n&&(!u||r)){var a=r&&r.value;null!=a||s||(a=o.pointToData(i)),null!=a&&eU(e,a,g,!1,h)}})});var v={};return ys(c,function(e,t){var n=e.linkGroup;n&&!p[t]&&ys(n.axesInfo,function(t,o){var i=p[o];if(t!==e&&i){var r=i.value;n.mapper&&(r=e.axis.scale.parse(n.mapper(r,oU(t),oU(e)))),v[e.key]=r}})}),ys(v,function(e,t){eU(c[t],e,g,!0,h)}),function(e,t,n){var o=n.axesInfo=[];ys(t,function(t,n){var i=t.axisPointerModel.option,r=e[n];r?(!t.useHandle&&(i.status="show"),i.value=r.value,i.seriesDataIndices=(r.payloadBatch||[]).slice()):!t.useHandle&&(i.status="hide"),"show"===i.status&&o.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:i.value})})}(p,c,h),function(e,t,n,o){if(iU(t)||!e.list.length)return void o({type:"hideTip"});var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};o({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}(f,i,e,a),function(e,t,n){var o=n.getZr(),i="axisPointerLastHighlights",r=JW(o)[i]||{},a=JW(o)[i]={};ys(e,function(e,t){var n=e.axisPointerModel.option;"show"===n.status&&e.triggerEmphasis&&ys(n.seriesDataIndices,function(e){var t=e.seriesIndex+" | "+e.dataIndex;a[t]=e})});var l=[],s=[];ys(r,function(e,t){!a[t]&&s.push(e)}),ys(a,function(e,t){!r[t]&&l.push(e)}),s.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:s}),l.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:l})}(c,0,n),h}}function eU(e,t,n,o,i){var r=e.axis;if(!r.scale.isBlank()&&r.containData(t))if(e.involveSeries){var a=function(e,t){var n=t.axis,o=n.dim,i=e,r=[],a=Number.MAX_VALUE,l=-1;return ys(t.seriesModels,function(t,s){var u,c,d=t.getData().mapDimensionsAll(o);if(t.getAxisTooltipData){var h=t.getAxisTooltipData(d,e,n);c=h.dataIndices,u=h.nestestValue}else{if(!(c=t.getData().indicesOfNearest(d[0],e,"category"===n.type?.5:null)).length)return;u=t.getData().get(d[0],c[0])}if(null!=u&&isFinite(u)){var p=e-u,f=Math.abs(p);f<=a&&((f<a||p>=0&&l<0)&&(a=f,l=p,i=u,r.length=0),ys(c,function(e){r.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})}))}}),{payloadBatch:r,snapToValue:i}}(t,e),l=a.payloadBatch,s=a.snapToValue;l[0]&&null==i.seriesIndex&&ps(i,l[0]),!o&&e.snap&&r.containData(s)&&null!=s&&(t=s),n.showPointer(e,t,l),n.showTooltip(e,a,s)}else n.showPointer(e,t)}function tU(e,t,n,o){e[t.key]={value:n,payloadBatch:o}}function nU(e,t,n,o){var i=n.payloadBatch,r=t.axis,a=r.model,l=t.axisPointerModel;if(t.triggerTooltip&&i.length){var s=t.coordSys.model,u=VL(s),c=e.map[u];c||(c=e.map[u]={coordSysId:s.id,coordSysIndex:s.componentIndex,coordSysType:s.type,coordSysMainType:s.mainType,dataByAxis:[]},e.list.push(c)),c.dataByAxis.push({axisDim:r.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:o,valueLabelOpt:{precision:l.get(["label","precision"]),formatter:l.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function oU(e){var t=e.axis.model,n={},o=n.axisDim=e.axis.dim;return n.axisIndex=n[o+"AxisIndex"]=t.componentIndex,n.axisName=n[o+"AxisName"]=t.name,n.axisId=n[o+"AxisId"]=t.id,n}function iU(e){return!e||null==e[0]||isNaN(e[0])||null==e[1]||isNaN(e[1])}function rU(e){PL.registerAxisPointerClass("CartesianAxisPointer",zW),e.registerComponentModel(WW),e.registerComponentView(qW),e.registerPreprocessor(function(e){if(e){(!e.axisPointer||0===e.axisPointer.length)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!Ms(t)&&(e.axisPointer.link=[t])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=NL(e,t)}),e.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},QW)}var aU=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Wl(t,e),t.prototype.makeElOption=function(e,t,n,o,i){var r=n.axis;"angle"===r.dim&&(this.animationThreshold=Math.PI/18);var a=r.polar,l=a.getOtherAxis(r).getExtent(),s=r.dataToCoord(t),u=o.get("type");if(u&&"none"!==u){var c=EW(o),d=lU[u](r,a,s,l);d.style=c,e.graphicKey=d.type,e.pointer=d}var h=function(e,t,n,o,i){var r=t.axis,a=r.dataToCoord(e),l=o.getAngleAxis().getExtent()[0];l=l/180*Math.PI;var s,u,c,d=o.getRadiusAxis().getExtent();if("radius"===r.dim){var h=[1,0,0,1,0,0];Ju(h,h,l),Ku(h,h,[o.cx,o.cy]),s=cx([a,-i],h);var p=t.getModel("axisLabel").get("rotate")||0,f=CL.innerTextLayout(l,p*Math.PI/180,-1);u=f.textAlign,c=f.textVerticalAlign}else{var g=d[1];s=o.coordToPoint([g+i,a]);var v=o.cx,m=o.cy;u=Math.abs(s[0]-v)/g<.3?"center":s[0]>v?"left":"right",c=Math.abs(s[1]-m)/g<.3?"middle":s[1]>m?"top":"bottom"}return{position:s,align:u,verticalAlign:c}}(t,n,0,a,o.get(["label","margin"]));AW(e,n,o,i,h)},t}(MW);var lU={line:function(e,t,n,o){return"angle"===e.dim?{type:"Line",shape:PW(t.coordToPoint([o[0],n]),t.coordToPoint([o[1],n]))}:{type:"Circle",shape:{cx:t.cx,cy:t.cy,r:n}}},shadow:function(e,t,n,o){var i=Math.max(1,e.getBandWidth()),r=Math.PI/180;return"angle"===e.dim?{type:"Sector",shape:RW(t.cx,t.cy,o[0],o[1],(-n-i/2)*r,(i/2-n)*r)}:{type:"Sector",shape:RW(t.cx,t.cy,n-i/2,n+i/2,0,2*Math.PI)}}},sU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.prototype.findAxisModel=function(e){var t;return this.ecModel.eachComponent(e,function(e){e.getCoordSysModel()===this&&(t=e)},this),t},t.type="polar",t.dependencies=["radiusAxis","angleAxis"],t.defaultOption={z:0,center:["50%","50%"],radius:"80%"},t}(aw),uU=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Wl(t,e),t.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",pf).models[0]},t.type="polarAxis",t}(aw);vs(uU,Yk);var cU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.type="angleAxis",t}(uU),dU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.type="radiusAxis",t}(uU),hU=function(e){function t(t,n){return e.call(this,"radius",t,n)||this}return Wl(t,e),t.prototype.pointToData=function(e,t){return this.polar.pointToData(e,t)["radius"===this.dim?0:1]},t}(vD);hU.prototype.dataToRadius=vD.prototype.dataToCoord,hU.prototype.radiusToData=vD.prototype.coordToData;var pU=uf(),fU=function(e){function t(t,n){return e.call(this,"angle",t,n||[0,360])||this}return Wl(t,e),t.prototype.pointToData=function(e,t){return this.polar.pointToData(e,t)["radius"===this.dim?0:1]},t.prototype.calculateCategoryInterval=function(){var e=this,t=e.getLabelModel(),n=e.scale,o=n.getExtent(),i=n.count();if(o[1]-o[0]<1)return 0;var r=o[0],a=e.dataToCoord(r+1)-e.dataToCoord(r),l=Math.abs(a),s=Yh(null==r?"":r+"",t.getFont(),"center","top"),u=Math.max(s.height,7)/l;isNaN(u)&&(u=1/0);var c=Math.max(0,Math.floor(u)),d=pU(e.model),h=d.lastAutoInterval,p=d.lastTickCount;return null!=h&&null!=p&&Math.abs(h-c)<=1&&Math.abs(p-i)<=1&&h>c?c=h:(d.lastTickCount=i,d.lastAutoInterval=c),c},t}(vD);fU.prototype.dataToAngle=vD.prototype.dataToCoord,fU.prototype.angleToData=vD.prototype.coordToData;var gU=["radius","angle"],vU=function(){function e(e){this.dimensions=gU,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new hU,this._angleAxis=new fU,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return e.prototype.containPoint=function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},e.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},e.prototype.getAxis=function(e){return this["_"+e+"Axis"]},e.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},e.prototype.getAxesByScale=function(e){var t=[],n=this._angleAxis,o=this._radiusAxis;return n.scale.type===e&&t.push(n),o.scale.type===e&&t.push(o),t},e.prototype.getAngleAxis=function(){return this._angleAxis},e.prototype.getRadiusAxis=function(){return this._radiusAxis},e.prototype.getOtherAxis=function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},e.prototype.getTooltipAxes=function(e){var t=null!=e&&"auto"!==e?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},e.prototype.dataToPoint=function(e,t){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)])},e.prototype.pointToData=function(e,t){var n=this.pointToCoord(e);return[this._radiusAxis.radiusToData(n[0],t),this._angleAxis.angleToData(n[1],t)]},e.prototype.pointToCoord=function(e){var t=e[0]-this.cx,n=e[1]-this.cy,o=this.getAngleAxis(),i=o.getExtent(),r=Math.min(i[0],i[1]),a=Math.max(i[0],i[1]);o.inverse?r=a-360:a=r+360;var l=Math.sqrt(t*t+n*n);t/=l,n/=l;for(var s=Math.atan2(-n,t)/Math.PI*180,u=s<r?1:-1;s<r||s>a;)s+=360*u;return[l,s]},e.prototype.coordToPoint=function(e){var t=e[0],n=e[1]/180*Math.PI;return[Math.cos(n)*t+this.cx,-Math.sin(n)*t+this.cy]},e.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis().getExtent().slice();t[0]>t[1]&&t.reverse();var n=e.getExtent(),o=Math.PI/180,i=1e-4;return{cx:this.cx,cy:this.cy,r0:t[0],r:t[1],startAngle:-n[0]*o,endAngle:-n[1]*o,clockwise:e.inverse,contain:function(e,t){var n=e-this.cx,o=t-this.cy,r=n*n+o*o,a=this.r,l=this.r0;return a!==l&&r-i<=a*a&&r+i>=l*l}}},e.prototype.convertToPixel=function(e,t,n){return mU(t)===this?this.dataToPoint(n):null},e.prototype.convertFromPixel=function(e,t,n){return mU(t)===this?this.pointToData(n):null},e}();function mU(e){var t=e.seriesModel,n=e.polarModel;return n&&n.coordinateSystem||t&&t.coordinateSystem}function yU(e,t){var n=this,o=n.getAngleAxis(),i=n.getRadiusAxis();if(o.scale.setExtent(1/0,-1/0),i.scale.setExtent(1/0,-1/0),e.eachSeries(function(e){if(e.coordinateSystem===n){var t=e.getData();ys(Uk(t,"radius"),function(e){i.scale.unionExtentFromData(t,e)}),ys(Uk(t,"angle"),function(e){o.scale.unionExtentFromData(t,e)})}}),Bk(o.scale,o.model),Bk(i.scale,i.model),"category"===o.type&&!o.onBand){var r=o.getExtent(),a=360/o.scale.count();o.inverse?r[1]+=a:r[1]-=a,o.setExtent(r[0],r[1])}}function xU(e,t){var n;if(e.type=t.get("type"),e.scale=Rk(t),e.onBand=t.get("boundaryGap")&&"category"===e.type,e.inverse=t.get("inverse"),function(e){return"angleAxis"===e.mainType}(t)){e.inverse=e.inverse!==t.get("clockwise");var o=t.get("startAngle"),i=null!==(n=t.get("endAngle"))&&void 0!==n?n:o+(e.inverse?-360:360);e.setExtent(o,i)}t.axis=e,e.model=t}var _U={dimensions:gU,create:function(e,t){var n=[];return e.eachComponent("polar",function(e,o){var i=new vU(o+"");i.update=yU;var r=i.getRadiusAxis(),a=i.getAngleAxis(),l=e.findAxisModel("radiusAxis"),s=e.findAxisModel("angleAxis");xU(r,l),xU(a,s),function(e,t,n){var o=t.get("center"),i=n.getWidth(),r=n.getHeight();e.cx=gp(o[0],i),e.cy=gp(o[1],r);var a=e.getRadiusAxis(),l=Math.min(i,r)/2,s=t.get("radius");null==s?s=[0,"100%"]:Ms(s)||(s=[0,s]);var u=[gp(s[0],l),gp(s[1],l)];a.inverse?a.setExtent(u[1],u[0]):a.setExtent(u[0],u[1])}(i,e,t),n.push(i),e.coordinateSystem=i,i.model=e}),e.eachSeries(function(e){if("polar"===e.get("coordinateSystem")){var t=e.getReferringComponents("polar",pf).models[0];if("production"!==process.env.NODE_ENV&&!t)throw new Error('Polar "'+Bs(e.get("polarIndex"),e.get("polarId"),0)+'" not found');e.coordinateSystem=t.coordinateSystem}}),n}},wU=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function bU(e,t,n){t[1]>t[0]&&(t=t.slice().reverse());var o=e.coordToPoint([t[0],n]),i=e.coordToPoint([t[1],n]);return{x1:o[0],y1:o[1],x2:i[0],y2:i[1]}}function SU(e){return e.getRadiusAxis().inverse?0:1}function CU(e){var t=e[0],n=e[e.length-1];t&&n&&Math.abs(Math.abs(t.coord-n.coord)-360)<1e-4&&e.pop()}var MU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass="PolarAxisPointer",n}return Wl(t,e),t.prototype.render=function(e,t){if(this.group.removeAll(),e.get("show")){var n=e.axis,o=n.polar,i=o.getRadiusAxis().getExtent(),r=n.getTicksCoords(),a=n.getMinorTicksCoords(),l=xs(n.getViewLabels(),function(e){e=cs(e);var t=n.scale,o="ordinal"===t.type?t.getRawOrdinalNumber(e.tickValue):e.tickValue;return e.coord=n.dataToCoord(o),e});CU(l),CU(r),ys(wU,function(t){!e.get([t,"show"])||n.scale.isBlank()&&"axisLine"!==t||TU[t](this.group,e,o,r,a,i,l)},this)}},t.type="angleAxis",t}(PL),TU={axisLine:function(e,t,n,o,i,r){var a,l=t.getModel(["axisLine","lineStyle"]),s=n.getAngleAxis(),u=Math.PI/180,c=s.getExtent(),d=SU(n),h=d?0:1,p=360===Math.abs(c[1]-c[0])?"Circle":"Arc";(a=0===r[h]?new Sx[p]({shape:{cx:n.cx,cy:n.cy,r:r[d],startAngle:-c[0]*u,endAngle:-c[1]*u,clockwise:s.inverse},style:l.getLineStyle(),z2:1,silent:!0}):new fy({shape:{cx:n.cx,cy:n.cy,r:r[d],r0:r[h]},style:l.getLineStyle(),z2:1,silent:!0})).style.fill=null,e.add(a)},axisTick:function(e,t,n,o,i,r){var a=t.getModel("axisTick"),l=(a.get("inside")?-1:1)*a.get("length"),s=r[SU(n)],u=xs(o,function(e){return new by({shape:bU(n,[s,s+l],e.coord)})});e.add(rx(u,{style:fs(a.getModel("lineStyle").getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])})}))},minorTick:function(e,t,n,o,i,r){if(i.length){for(var a=t.getModel("axisTick"),l=t.getModel("minorTick"),s=(a.get("inside")?-1:1)*l.get("length"),u=r[SU(n)],c=[],d=0;d<i.length;d++)for(var h=0;h<i[d].length;h++)c.push(new by({shape:bU(n,[u,u+s],i[d][h].coord)}));e.add(rx(c,{style:fs(l.getModel("lineStyle").getLineStyle(),fs(a.getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])}))}))}},axisLabel:function(e,t,n,o,i,r,a){var l=t.getCategories(!0),s=t.getModel("axisLabel"),u=s.get("margin"),c=t.get("triggerEvent");ys(a,function(o,i){var a=s,d=o.tickValue,h=r[SU(n)],p=n.coordToPoint([h+u,o.coord]),f=n.cx,g=n.cy,v=Math.abs(p[0]-f)/h<.3?"center":p[0]>f?"left":"right",m=Math.abs(p[1]-g)/h<.3?"middle":p[1]>g?"top":"bottom";if(l&&l[d]){var y=l[d];Ns(y)&&y.textStyle&&(a=new Kx(y.textStyle,s,s.ecModel))}var x=new mv({silent:CL.isLabelSilent(t),style:Dx(a,{x:p[0],y:p[1],fill:a.getTextColor()||t.get(["axisLine","lineStyle","color"]),text:o.formattedLabel,align:v,verticalAlign:m})});if(e.add(x),c){var _=CL.makeAxisEventDataBase(t);_.targetType="axisLabel",_.value=o.rawLabel,Nv(x).eventData=_}},this)},splitLine:function(e,t,n,o,i,r){var a=t.getModel("splitLine").getModel("lineStyle"),l=a.get("color"),s=0;l=l instanceof Array?l:[l];for(var u=[],c=0;c<o.length;c++){var d=s++%l.length;u[d]=u[d]||[],u[d].push(new by({shape:bU(n,r,o[c].coord)}))}for(c=0;c<u.length;c++)e.add(rx(u[c],{style:fs({stroke:l[c%l.length]},a.getLineStyle()),silent:!0,z:t.get("z")}))},minorSplitLine:function(e,t,n,o,i,r){if(i.length){for(var a=t.getModel("minorSplitLine").getModel("lineStyle"),l=[],s=0;s<i.length;s++)for(var u=0;u<i[s].length;u++)l.push(new by({shape:bU(n,r,i[s][u].coord)}));e.add(rx(l,{style:a.getLineStyle(),silent:!0,z:t.get("z")}))}},splitArea:function(e,t,n,o,i,r){if(o.length){var a=t.getModel("splitArea").getModel("areaStyle"),l=a.get("color"),s=0;l=l instanceof Array?l:[l];for(var u=[],c=Math.PI/180,d=-o[0].coord*c,h=Math.min(r[0],r[1]),p=Math.max(r[0],r[1]),f=t.get("clockwise"),g=1,v=o.length;g<=v;g++){var m=g===v?o[0].coord:o[g].coord,y=s++%l.length;u[y]=u[y]||[],u[y].push(new hy({shape:{cx:n.cx,cy:n.cy,r0:h,r:p,startAngle:d,endAngle:-m*c,clockwise:f},silent:!0})),d=-m*c}for(g=0;g<u.length;g++)e.add(rx(u[g],{style:fs({fill:l[g%l.length]},a.getAreaStyle()),silent:!0}))}}},IU=["axisLine","axisTickLabel","axisName"],kU=["splitLine","splitArea","minorSplitLine"],DU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass="PolarAxisPointer",n}return Wl(t,e),t.prototype.render=function(e,t){if(this.group.removeAll(),e.get("show")){var n=this._axisGroup,o=this._axisGroup=new lp;this.group.add(o);var i=e.axis,r=i.polar,a=r.getAngleAxis(),l=i.getTicksCoords(),s=i.getMinorTicksCoords(),u=a.getExtent()[0],c=i.getExtent(),d=function(e,t,n){return{position:[e.cx,e.cy],rotation:n/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:t.getModel("axisLabel").get("rotate"),z2:1}}(r,e,u),h=new CL(e,d);ys(IU,h.add,h),o.add(h.getGroup()),px(n,o,e),ys(kU,function(t){e.get([t,"show"])&&!i.scale.isBlank()&&NU[t](this.group,e,r,u,c,l,s)},this)}},t.type="radiusAxis",t}(PL),NU={splitLine:function(e,t,n,o,i,r){var a=t.getModel("splitLine").getModel("lineStyle"),l=a.get("color"),s=0,u=n.getAngleAxis(),c=Math.PI/180,d=u.getExtent(),h=360===Math.abs(d[1]-d[0])?"Circle":"Arc";l=l instanceof Array?l:[l];for(var p=[],f=0;f<r.length;f++){var g=s++%l.length;p[g]=p[g]||[],p[g].push(new Sx[h]({shape:{cx:n.cx,cy:n.cy,r:Math.max(r[f].coord,0),startAngle:-d[0]*c,endAngle:-d[1]*c,clockwise:u.inverse}}))}for(f=0;f<p.length;f++)e.add(rx(p[f],{style:fs({stroke:l[f%l.length],fill:null},a.getLineStyle()),silent:!0}))},minorSplitLine:function(e,t,n,o,i,r,a){if(a.length){for(var l=t.getModel("minorSplitLine").getModel("lineStyle"),s=[],u=0;u<a.length;u++)for(var c=0;c<a[u].length;c++)s.push(new $m({shape:{cx:n.cx,cy:n.cy,r:a[u][c].coord}}));e.add(rx(s,{style:fs({fill:null},l.getLineStyle()),silent:!0}))}},splitArea:function(e,t,n,o,i,r){if(r.length){var a=t.getModel("splitArea").getModel("areaStyle"),l=a.get("color"),s=0;l=l instanceof Array?l:[l];for(var u=[],c=r[0].coord,d=1;d<r.length;d++){var h=s++%l.length;u[h]=u[h]||[],u[h].push(new hy({shape:{cx:n.cx,cy:n.cy,r0:c,r:r[d].coord,startAngle:0,endAngle:2*Math.PI},silent:!0})),c=r[d].coord}for(d=0;d<u.length;d++)e.add(rx(u[d],{style:fs({fill:l[d%l.length]},a.getAreaStyle()),silent:!0}))}}};function EU(e){return e.get("stack")||"__ec_stack_"+e.seriesIndex}function AU(e,t){return t.dim+e.model.componentIndex}function LU(e,t,n){var o={},i=function(e){var t={};ys(e,function(e,n){var o=e.getData(),i=e.coordinateSystem,r=i.getBaseAxis(),a=AU(i,r),l=r.getExtent(),s="category"===r.type?r.getBandWidth():Math.abs(l[1]-l[0])/o.count(),u=t[a]||{bandWidth:s,remainedWidth:s,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},c=u.stacks;t[a]=u;var d=EU(e);c[d]||u.autoWidthCount++,c[d]=c[d]||{width:0,maxWidth:0};var h=gp(e.get("barWidth"),s),p=gp(e.get("barMaxWidth"),s),f=e.get("barGap"),g=e.get("barCategoryGap");h&&!c[d].width&&(h=Math.min(u.remainedWidth,h),c[d].width=h,u.remainedWidth-=h),p&&(c[d].maxWidth=p),null!=f&&(u.gap=f),null!=g&&(u.categoryGap=g)});var n={};return ys(t,function(e,t){n[t]={};var o=e.stacks,i=e.bandWidth,r=gp(e.categoryGap,i),a=gp(e.gap,1),l=e.remainedWidth,s=e.autoWidthCount,u=(l-r)/(s+(s-1)*a);u=Math.max(u,0),ys(o,function(e,t){var n=e.maxWidth;n&&n<u&&(n=Math.min(n,l),e.width&&(n=Math.min(n,e.width)),l-=n,e.width=n,s--)}),u=(l-r)/(s+(s-1)*a),u=Math.max(u,0);var c,d=0;ys(o,function(e,t){e.width||(e.width=u),c=e,d+=e.width*(1+a)}),c&&(d-=c.width*a);var h=-d/2;ys(o,function(e,o){n[t][o]=n[t][o]||{offset:h,width:e.width},h+=e.width*(1+a)})}),n}(ws(t.getSeriesByType(e),function(e){return!t.isSeriesFiltered(e)&&e.coordinateSystem&&"polar"===e.coordinateSystem.type}));t.eachSeriesByType(e,function(e){if("polar"===e.coordinateSystem.type){var t=e.getData(),n=e.coordinateSystem,r=n.getBaseAxis(),a=AU(n,r),l=EU(e),s=i[a][l],u=s.offset,c=s.width,d=n.getOtherAxis(r),h=e.coordinateSystem.cx,p=e.coordinateSystem.cy,f=e.get("barMinHeight")||0,g=e.get("barMinAngle")||0;o[l]=o[l]||[];for(var v=t.mapDimension(d.dim),m=t.mapDimension(r.dim),y=PI(t,v),x="radius"!==r.dim||!e.get("roundCap",!0),_=d.model.get("startValue"),w=d.dataToCoord(_||0),b=0,S=t.count();b<S;b++){var C=t.get(v,b),M=t.get(m,b),T=C>=0?"p":"n",I=w;y&&(o[l][M]||(o[l][M]={p:w,n:w}),I=o[l][M][T]);var k=void 0,D=void 0,N=void 0,E=void 0;if("radius"===d.dim){var A=d.dataToCoord(C)-w,L=r.dataToCoord(M);Math.abs(A)<f&&(A=(A<0?-1:1)*f),k=I,D=I+A,E=(N=L-u)-c,y&&(o[l][M][T]=D)}else{var V=d.dataToCoord(C,x)-w,O=r.dataToCoord(M);Math.abs(V)<g&&(V=(V<0?-1:1)*g),D=(k=O+u)+c,N=I,E=I+V,y&&(o[l][M][T]=E)}t.setItemLayout(b,{cx:h,cy:p,r0:k,r:D,startAngle:-N*Math.PI/180,endAngle:-E*Math.PI/180,clockwise:N>=E})}}})}var VU={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},OU={splitNumber:5},PU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.type="polar",t}(nC);function BU(e,t){t=t||{};var n=e.coordinateSystem,o=e.axis,i={},r=o.position,a=o.orient,l=n.getRect(),s=[l.x,l.x+l.width,l.y,l.y+l.height],u={horizontal:{top:s[2],bottom:s[3]},vertical:{left:s[0],right:s[1]}};i.position=["vertical"===a?u.vertical[r]:s[0],"horizontal"===a?u.horizontal[r]:s[3]];i.rotation=Math.PI/2*{horizontal:0,vertical:1}[a];i.labelDirection=i.tickDirection=i.nameDirection={top:-1,bottom:1,right:1,left:-1}[r],e.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),Bs(t.labelInside,e.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var c=t.rotate;return null==c&&(c=e.get(["axisLabel","rotate"])),i.labelRotation="top"===r?-c:c,i.z2=1,i}var RU=["axisLine","axisTickLabel","axisName"],zU=["splitArea","splitLine"],FU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass="SingleAxisPointer",n}return Wl(t,e),t.prototype.render=function(t,n,o,i){var r=this.group;r.removeAll();var a=this._axisGroup;this._axisGroup=new lp;var l=BU(t),s=new CL(t,l);ys(RU,s.add,s),r.add(this._axisGroup),r.add(s.getGroup()),ys(zU,function(e){t.get([e,"show"])&&GU[e](this,this.group,this._axisGroup,t)},this),px(a,this._axisGroup,t),e.prototype.render.call(this,t,n,o,i)},t.prototype.remove=function(){zL(this)},t.type="singleAxis",t}(PL),GU={splitLine:function(e,t,n,o){var i=o.axis;if(!i.scale.isBlank()){var r=o.getModel("splitLine"),a=r.getModel("lineStyle"),l=a.get("color");l=l instanceof Array?l:[l];for(var s=a.get("width"),u=o.coordinateSystem.getRect(),c=i.isHorizontal(),d=[],h=0,p=i.getTicksCoords({tickModel:r}),f=[],g=[],v=0;v<p.length;++v){var m=i.toGlobalCoord(p[v].coord);c?(f[0]=m,f[1]=u.y,g[0]=m,g[1]=u.y+u.height):(f[0]=u.x,f[1]=m,g[0]=u.x+u.width,g[1]=m);var y=new by({shape:{x1:f[0],y1:f[1],x2:g[0],y2:g[1]},silent:!0});lx(y.shape,s);var x=h++%l.length;d[x]=d[x]||[],d[x].push(y)}var _=a.getLineStyle(["color"]);for(v=0;v<d.length;++v)t.add(rx(d[v],{style:fs({stroke:l[v%l.length]},_),silent:!0}))}},splitArea:function(e,t,n,o){RL(e,n,o,o)}},HU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.prototype.getCoordSysModel=function(){return this},t.type="singleAxis",t.layoutMode="box",t.defaultOption={left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}},t}(aw);vs(HU,Yk.prototype);var WU=function(e){function t(t,n,o,i,r){var a=e.call(this,t,n,o)||this;return a.type=i||"value",a.position=r||"bottom",a}return Wl(t,e),t.prototype.isHorizontal=function(){var e=this.position;return"top"===e||"bottom"===e},t.prototype.pointToData=function(e,t){return this.coordinateSystem.pointToData(e)[0]},t}(vD),UU=["single"],YU=function(){function e(e,t,n){this.type="single",this.dimension="single",this.dimensions=UU,this.axisPointerEnabled=!0,this.model=e,this._init(e,t,n)}return e.prototype._init=function(e,t,n){var o=this.dimension,i=new WU(o,Rk(e),[0,0],e.get("type"),e.get("position")),r="category"===i.type;i.onBand=r&&e.get("boundaryGap"),i.inverse=e.get("inverse"),i.orient=e.get("orient"),e.axis=i,i.model=e,i.coordinateSystem=this,this._axis=i},e.prototype.update=function(e,t){e.eachSeries(function(e){if(e.coordinateSystem===this){var t=e.getData();ys(t.mapDimensionsAll(this.dimension),function(e){this._axis.scale.unionExtentFromData(t,e)},this),Bk(this._axis.scale,this._axis.model)}},this)},e.prototype.resize=function(e,t){this._rect=Q_({left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")},{width:t.getWidth(),height:t.getHeight()}),this._adjustAxis()},e.prototype.getRect=function(){return this._rect},e.prototype._adjustAxis=function(){var e=this._rect,t=this._axis,n=t.isHorizontal(),o=n?[0,e.width]:[0,e.height],i=t.inverse?1:0;t.setExtent(o[i],o[1-i]),this._updateAxisTransform(t,n?e.x:e.y)},e.prototype._updateAxisTransform=function(e,t){var n=e.getExtent(),o=n[0]+n[1],i=e.isHorizontal();e.toGlobalCoord=i?function(e){return e+t}:function(e){return o-e+t},e.toLocalCoord=i?function(e){return e-t}:function(e){return o-e+t}},e.prototype.getAxis=function(){return this._axis},e.prototype.getBaseAxis=function(){return this._axis},e.prototype.getAxes=function(){return[this._axis]},e.prototype.getTooltipAxes=function(){return{baseAxes:[this.getAxis()],otherAxes:[]}},e.prototype.containPoint=function(e){var t=this.getRect(),n=this.getAxis();return"horizontal"===n.orient?n.contain(n.toLocalCoord(e[0]))&&e[1]>=t.y&&e[1]<=t.y+t.height:n.contain(n.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},e.prototype.pointToData=function(e){var t=this.getAxis();return[t.coordToData(t.toLocalCoord(e["horizontal"===t.orient?0:1]))]},e.prototype.dataToPoint=function(e){var t=this.getAxis(),n=this.getRect(),o=[],i="horizontal"===t.orient?0:1;return e instanceof Array&&(e=e[0]),o[i]=t.toGlobalCoord(t.dataToCoord(+e)),o[1-i]=0===i?n.y+n.height/2:n.x+n.width/2,o},e.prototype.convertToPixel=function(e,t,n){return ZU(t)===this?this.dataToPoint(n):null},e.prototype.convertFromPixel=function(e,t,n){return ZU(t)===this?this.pointToData(n):null},e}();function ZU(e){var t=e.seriesModel,n=e.singleAxisModel;return n&&n.coordinateSystem||t&&t.coordinateSystem}var XU={create:function(e,t){var n=[];return e.eachComponent("singleAxis",function(o,i){var r=new YU(o,e,t);r.name="single_"+i,r.resize(o,t),o.coordinateSystem=r,n.push(r)}),e.eachSeries(function(e){if("singleAxis"===e.get("coordinateSystem")){var t=e.getReferringComponents("singleAxis",pf).models[0];e.coordinateSystem=t&&t.coordinateSystem}}),n},dimensions:UU},jU=["x","y"],$U=["width","height"],qU=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Wl(t,e),t.prototype.makeElOption=function(e,t,n,o,i){var r=n.axis,a=r.coordinateSystem,l=QU(a,1-JU(r)),s=a.dataToPoint(t)[0],u=o.get("type");if(u&&"none"!==u){var c=EW(o),d=KU[u](r,s,l);d.style=c,e.graphicKey=d.type,e.pointer=d}OW(t,e,BU(n),n,o,i)},t.prototype.getHandleTransform=function(e,t,n){var o=BU(t,{labelInside:!1});o.labelMargin=n.get(["handle","margin"]);var i=VW(t.axis,e,o);return{x:i[0],y:i[1],rotation:o.rotation+(o.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,o){var i=n.axis,r=i.coordinateSystem,a=JU(i),l=QU(r,a),s=[e.x,e.y];s[a]+=t[a],s[a]=Math.min(l[1],s[a]),s[a]=Math.max(l[0],s[a]);var u=QU(r,1-a),c=(u[1]+u[0])/2,d=[c,c];return d[a]=s[a],{x:s[0],y:s[1],rotation:e.rotation,cursorPoint:d,tooltipOption:{verticalAlign:"middle"}}},t}(MW),KU={line:function(e,t,n){return{type:"Line",subPixelOptimize:!0,shape:PW([t,n[0]],[t,n[1]],JU(e))}},shadow:function(e,t,n){var o=e.getBandWidth(),i=n[1]-n[0];return{type:"Rect",shape:BW([t-o/2,n[0]],[o,i],JU(e))}}};function JU(e){return e.isHorizontal()?0:1}function QU(e,t){var n=e.getRect();return[n[jU[t]],n[jU[t]]+n[$U[t]]]}var eY=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.type="single",t}(nC);var tY=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.prototype.init=function(t,n,o){var i=ow(t);e.prototype.init.apply(this,arguments),nY(t,i)},t.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),nY(this.option,t)},t.prototype.getCellSize=function(){return this.option.cellSize},t.type="calendar",t.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},t}(aw);function nY(e,t){var n,o=e.cellSize;1===(n=Ms(o)?o:e.cellSize=[o,o]).length&&(n[1]=n[0]);var i=xs([0,1],function(e){return function(e,t){return null!=e[q_[t][0]]||null!=e[q_[t][1]]&&null!=e[q_[t][2]]}(t,e)&&(n[e]="auto"),null!=n[e]&&"auto"!==n[e]});nw(e,t,{type:"box",ignoreSize:i})}var oY=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.prototype.render=function(e,t,n){var o=this.group;o.removeAll();var i=e.coordinateSystem,r=i.getRangeInfo(),a=i.getOrient(),l=t.getLocaleModel();this._renderDayRect(e,r,o),this._renderLines(e,r,a,o),this._renderYearText(e,r,a,o),this._renderMonthText(e,l,a,o),this._renderWeekText(e,l,r,a,o)},t.prototype._renderDayRect=function(e,t,n){for(var o=e.coordinateSystem,i=e.getModel("itemStyle").getItemStyle(),r=o.getCellWidth(),a=o.getCellHeight(),l=t.start.time;l<=t.end.time;l=o.getNextNDay(l,1).time){var s=o.dataToRect([l],!1).tl,u=new fv({shape:{x:s[0],y:s[1],width:r,height:a},cursor:"default",style:i});n.add(u)}},t.prototype._renderLines=function(e,t,n,o){var i=this,r=e.coordinateSystem,a=e.getModel(["splitLine","lineStyle"]).getLineStyle(),l=e.get(["splitLine","show"]),s=a.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=t.start,c=0;u.time<=t.end.time;c++){h(u.formatedDate),0===c&&(u=r.getDateInfo(t.start.y+"-"+t.start.m));var d=u.date;d.setMonth(d.getMonth()+1),u=r.getDateInfo(d)}function h(t){i._firstDayOfMonth.push(r.getDateInfo(t)),i._firstDayPoints.push(r.dataToRect([t],!1).tl);var s=i._getLinePointsOfOneWeek(e,t,n);i._tlpoints.push(s[0]),i._blpoints.push(s[s.length-1]),l&&i._drawSplitline(s,a,o)}h(r.getNextNDay(t.end.time,1).formatedDate),l&&this._drawSplitline(i._getEdgesPoints(i._tlpoints,s,n),a,o),l&&this._drawSplitline(i._getEdgesPoints(i._blpoints,s,n),a,o)},t.prototype._getEdgesPoints=function(e,t,n){var o=[e[0].slice(),e[e.length-1].slice()],i="horizontal"===n?0:1;return o[0][i]=o[0][i]-t/2,o[1][i]=o[1][i]+t/2,o},t.prototype._drawSplitline=function(e,t,n){var o=new xy({z2:20,shape:{points:e},style:t});n.add(o)},t.prototype._getLinePointsOfOneWeek=function(e,t,n){for(var o=e.coordinateSystem,i=o.getDateInfo(t),r=[],a=0;a<7;a++){var l=o.getNextNDay(i.time,a),s=o.dataToRect([l.time],!1);r[2*l.day]=s.tl,r[2*l.day+1]=s["horizontal"===n?"bl":"tr"]}return r},t.prototype._formatterLabel=function(e,t){return Is(e)&&e?(n=e,ys(t,function(e,t){n=n.replace("{"+t+"}",e)}),n):Ts(e)?e(t):t.nameMap;var n},t.prototype._yearTextPositionControl=function(e,t,n,o,i){var r=t[0],a=t[1],l=["center","bottom"];"bottom"===o?(a+=i,l=["center","top"]):"left"===o?r-=i:"right"===o?(r+=i,l=["center","top"]):a-=i;var s=0;return"left"!==o&&"right"!==o||(s=Math.PI/2),{rotation:s,x:r,y:a,style:{align:l[0],verticalAlign:l[1]}}},t.prototype._renderYearText=function(e,t,n,o){var i=e.getModel("yearLabel");if(i.get("show")){var r=i.get("margin"),a=i.get("position");a||(a="horizontal"!==n?"top":"left");var l=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],s=(l[0][0]+l[1][0])/2,u=(l[0][1]+l[1][1])/2,c="horizontal"===n?0:1,d={top:[s,l[c][1]],bottom:[s,l[1-c][1]],left:[l[1-c][0],u],right:[l[c][0],u]},h=t.start.y;+t.end.y>+t.start.y&&(h=h+"-"+t.end.y);var p=i.get("formatter"),f={start:t.start.y,end:t.end.y,nameMap:h},g=this._formatterLabel(p,f),v=new mv({z2:30,style:Dx(i,{text:g}),silent:i.get("silent")});v.attr(this._yearTextPositionControl(v,d[a],n,a,r)),o.add(v)}},t.prototype._monthTextPositionControl=function(e,t,n,o,i){var r="left",a="top",l=e[0],s=e[1];return"horizontal"===n?(s+=i,t&&(r="center"),"start"===o&&(a="bottom")):(l+=i,t&&(a="middle"),"start"===o&&(r="right")),{x:l,y:s,align:r,verticalAlign:a}},t.prototype._renderMonthText=function(e,t,n,o){var i=e.getModel("monthLabel");if(i.get("show")){var r=i.get("nameMap"),a=i.get("margin"),l=i.get("position"),s=i.get("align"),u=[this._tlpoints,this._blpoints];r&&!Is(r)||(r&&(t=s_(r)||t),r=t.get(["time","monthAbbr"])||[]);var c="start"===l?0:1,d="horizontal"===n?0:1;a="start"===l?-a:a;for(var h="center"===s,p=i.get("silent"),f=0;f<u[c].length-1;f++){var g=u[c][f].slice(),v=this._firstDayOfMonth[f];if(h){var m=this._firstDayPoints[f];g[d]=(m[d]+u[0][f+1][d])/2}var y=i.get("formatter"),x=r[+v.m-1],_={yyyy:v.y,yy:(v.y+"").slice(2),MM:v.m,M:+v.m,nameMap:x},w=this._formatterLabel(y,_),b=new mv({z2:30,style:ps(Dx(i,{text:w}),this._monthTextPositionControl(g,h,n,l,a)),silent:p});o.add(b)}}},t.prototype._weekTextPositionControl=function(e,t,n,o,i){var r="center",a="middle",l=e[0],s=e[1],u="start"===n;return"horizontal"===t?(l=l+o+(u?1:-1)*i[0]/2,r=u?"right":"left"):(s=s+o+(u?1:-1)*i[1]/2,a=u?"bottom":"top"),{x:l,y:s,align:r,verticalAlign:a}},t.prototype._renderWeekText=function(e,t,n,o,i){var r=e.getModel("dayLabel");if(r.get("show")){var a=e.coordinateSystem,l=r.get("position"),s=r.get("nameMap"),u=r.get("margin"),c=a.getFirstDayOfWeek();if(!s||Is(s))s&&(t=s_(s)||t),s=t.get(["time","dayOfWeekShort"])||xs(t.get(["time","dayOfWeekAbbr"]),function(e){return e[0]});var d=a.getNextNDay(n.end.time,7-n.lweek).time,h=[a.getCellWidth(),a.getCellHeight()];u=gp(u,Math.min(h[1],h[0])),"start"===l&&(d=a.getNextNDay(n.start.time,-(7+n.fweek)).time,u=-u);for(var p=r.get("silent"),f=0;f<7;f++){var g,v=a.getNextNDay(d,f),m=a.dataToRect([v.time],!1).center;g=Math.abs((f+c)%7);var y=new mv({z2:30,style:ps(Dx(r,{text:s[g]}),this._weekTextPositionControl(m,o,l,u,h)),silent:p});i.add(y)}}},t.type="calendar",t}(nC),iY=864e5,rY=function(){function e(t,n,o){this.type="calendar",this.dimensions=e.dimensions,this.getDimensionsInfo=e.getDimensionsInfo,this._model=t}return e.getDimensionsInfo=function(){return[{name:"time",type:"time"},"value"]},e.prototype.getRangeInfo=function(){return this._rangeInfo},e.prototype.getModel=function(){return this._model},e.prototype.getRect=function(){return this._rect},e.prototype.getCellWidth=function(){return this._sw},e.prototype.getCellHeight=function(){return this._sh},e.prototype.getOrient=function(){return this._orient},e.prototype.getFirstDayOfWeek=function(){return this._firstDayOfWeek},e.prototype.getDateInfo=function(e){var t=(e=Tp(e)).getFullYear(),n=e.getMonth()+1,o=n<10?"0"+n:""+n,i=e.getDate(),r=i<10?"0"+i:""+i,a=e.getDay();return{y:t+"",m:o,d:r,day:a=Math.abs((a+7-this.getFirstDayOfWeek())%7),time:e.getTime(),formatedDate:t+"-"+o+"-"+r,date:e}},e.prototype.getNextNDay=function(e,t){return 0===(t=t||0)||(e=new Date(this.getDateInfo(e).time)).setDate(e.getDate()+t),this.getDateInfo(e)},e.prototype.update=function(e,t){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var n=this._rangeInfo.weeks||1,o=["width","height"],i=this._model.getCellSize().slice(),r=this._model.getBoxLayoutParams(),a="horizontal"===this._orient?[n,7]:[7,n];ys([0,1],function(e){u(i,e)&&(r[o[e]]=i[e]*a[e])});var l={width:t.getWidth(),height:t.getHeight()},s=this._rect=Q_(r,l);function u(e,t){return null!=e[t]&&"auto"!==e[t]}ys([0,1],function(e){u(i,e)||(i[e]=s[o[e]]/a[e])}),this._sw=i[0],this._sh=i[1]},e.prototype.dataToPoint=function(e,t){Ms(e)&&(e=e[0]),null==t&&(t=!0);var n=this.getDateInfo(e),o=this._rangeInfo,i=n.formatedDate;if(t&&!(n.time>=o.start.time&&n.time<o.end.time+iY))return[NaN,NaN];var r=n.day,a=this._getRangeInfo([o.start.time,i]).nthWeek;return"vertical"===this._orient?[this._rect.x+r*this._sw+this._sw/2,this._rect.y+a*this._sh+this._sh/2]:[this._rect.x+a*this._sw+this._sw/2,this._rect.y+r*this._sh+this._sh/2]},e.prototype.pointToData=function(e){var t=this.pointToDate(e);return t&&t.time},e.prototype.dataToRect=function(e,t){var n=this.dataToPoint(e,t);return{contentShape:{x:n[0]-(this._sw-this._lineWidth)/2,y:n[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:n,tl:[n[0]-this._sw/2,n[1]-this._sh/2],tr:[n[0]+this._sw/2,n[1]-this._sh/2],br:[n[0]+this._sw/2,n[1]+this._sh/2],bl:[n[0]-this._sw/2,n[1]+this._sh/2]}},e.prototype.pointToDate=function(e){var t=Math.floor((e[0]-this._rect.x)/this._sw)+1,n=Math.floor((e[1]-this._rect.y)/this._sh)+1,o=this._rangeInfo.range;return"vertical"===this._orient?this._getDateByWeeksAndDay(n,t-1,o):this._getDateByWeeksAndDay(t,n-1,o)},e.prototype.convertToPixel=function(e,t,n){var o=aY(t);return o===this?o.dataToPoint(n):null},e.prototype.convertFromPixel=function(e,t,n){var o=aY(t);return o===this?o.pointToData(n):null},e.prototype.containPoint=function(e){return!1},e.prototype._initRangeOption=function(){var e,t=this._model.get("range");if(Ms(t)&&1===t.length&&(t=t[0]),Ms(t))e=t;else{var n=t.toString();if(/^\d{4}$/.test(n)&&(e=[n+"-01-01",n+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(n)){var o=this.getDateInfo(n),i=o.date;i.setMonth(i.getMonth()+1);var r=this.getNextNDay(i,-1);e=[o.formatedDate,r.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(n)&&(e=[n,n])}if(!e)return"production"!==process.env.NODE_ENV&&us("Invalid date range."),t;var a=this._getRangeInfo(e);return a.start.time>a.end.time&&e.reverse(),e},e.prototype._getRangeInfo=function(e){var t,n=[this.getDateInfo(e[0]),this.getDateInfo(e[1])];n[0].time>n[1].time&&(t=!0,n.reverse());var o=Math.floor(n[1].time/iY)-Math.floor(n[0].time/iY)+1,i=new Date(n[0].time),r=i.getDate(),a=n[1].date.getDate();i.setDate(r+o-1);var l=i.getDate();if(l!==a)for(var s=i.getTime()-n[1].time>0?1:-1;(l=i.getDate())!==a&&(i.getTime()-n[1].time)*s>0;)o-=s,i.setDate(l-s);var u=Math.floor((o+n[0].day+6)/7),c=t?1-u:u-1;return t&&n.reverse(),{range:[n[0].formatedDate,n[1].formatedDate],start:n[0],end:n[1],allDay:o,weeks:u,nthWeek:c,fweek:n[0].day,lweek:n[1].day}},e.prototype._getDateByWeeksAndDay=function(e,t,n){var o=this._getRangeInfo(n);if(e>o.weeks||0===e&&t<o.fweek||e===o.weeks&&t>o.lweek)return null;var i=7*(e-1)-o.fweek+t,r=new Date(o.start.time);return r.setDate(+o.start.d+i),this.getDateInfo(r)},e.create=function(t,n){var o=[];return t.eachComponent("calendar",function(t){var n=new e(t);o.push(n),t.coordinateSystem=n}),t.eachSeries(function(e){"calendar"===e.get("coordinateSystem")&&(e.coordinateSystem=o[e.get("calendarIndex")||0])}),o},e.dimensions=["time","value"],e}();function aY(e){var t=e.calendarModel,n=e.seriesModel;return t?t.coordinateSystem:n?n.coordinateSystem:null}function lY(e,t){var n;return ys(t,function(t){null!=e[t]&&"auto"!==e[t]&&(n=!0)}),n}var sY=["transition","enterFrom","leaveTo"],uY=sY.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function cY(e,t,n){if(n&&(!e[n]&&t[n]&&(e[n]={}),e=e[n],t=t[n]),e&&t)for(var o=n?sY:uY,i=0;i<o.length;i++){var r=o[i];null==e[r]&&null!=t[r]&&(e[r]=t[r])}}var dY=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.preventAutoZ=!0,n}return Wl(t,e),t.prototype.mergeOption=function(t,n){var o=this.option.elements;this.option.elements=null,e.prototype.mergeOption.call(this,t,n),this.option.elements=o},t.prototype.optionUpdated=function(e,t){var n=this.option,o=(t?n:e).elements,i=n.elements=t?[]:n.elements,r=[];this._flatten(o,r,null);var a=Qp(i,r,"normalMerge"),l=this._elOptionsToUpdate=[];ys(a,function(e,t){var n=e.newOption;"production"!==process.env.NODE_ENV&&Hs(Ns(n)||e.existing,"Empty graphic option definition"),n&&(l.push(n),function(e,t){var n=e.existing;if(t.id=e.keyInfo.id,!t.type&&n&&(t.type=n.type),null==t.parentId){var o=t.parentOption;o?t.parentId=o.id:n&&(t.parentId=n.parentId)}t.parentOption=null}(e,n),function(e,t,n){var o=ps({},n),i=e[t],r=n.$action||"merge";if("merge"===r)if(i){if("production"!==process.env.NODE_ENV){var a=n.type;Hs(!a||i.type===a,'Please set $action: "replace" to change `type`')}ds(i,o,!0),nw(i,o,{ignoreSize:!0}),iw(n,i),cY(n,i),cY(n,i,"shape"),cY(n,i,"style"),cY(n,i,"extra"),n.clipPath=i.clipPath}else e[t]=o;else"replace"===r?e[t]=o:"remove"===r&&i&&(e[t]=null)}(i,t,n),function(e,t){if(e&&(e.hv=t.hv=[lY(t,["left","right"]),lY(t,["top","bottom"])],"group"===e.type)){var n=e,o=t;null==n.width&&(n.width=o.width=0),null==n.height&&(n.height=o.height=0)}}(i[t],n))},this),n.elements=ws(i,function(e){return e&&delete e.$action,null!=e})},t.prototype._flatten=function(e,t,n){ys(e,function(e){if(e){n&&(e.parentOption=n),t.push(e);var o=e.children;o&&o.length&&this._flatten(o,t,e),delete e.children}},this)},t.prototype.useElOptionsToUpdate=function(){var e=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,e},t.type="graphic",t.defaultOption={elements:[]},t}(aw),hY={path:null,compoundPath:null,group:lp,image:lv,text:mv},pY=uf(),fY=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.prototype.init=function(){this._elMap=qs()},t.prototype.render=function(e,t,n){e!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=e,this._updateElements(e),this._relocate(e,n)},t.prototype._updateElements=function(e){var t=e.useElOptionsToUpdate();if(t){var n=this._elMap,o=this.group,i=e.get("z"),r=e.get("zlevel");ys(t,function(t){var a=nf(t.id,null),l=null!=a?n.get(a):null,s=nf(t.parentId,null),u=null!=s?n.get(s):o,c=t.type,d=t.style;"text"===c&&d&&t.hv&&t.hv[1]&&(d.textVerticalAlign=d.textBaseline=d.verticalAlign=d.align=null);var h=t.textContent,p=t.textConfig;if(d&&mH(d,c,!!p,!!h)){var f=yH(d,c,!0);!p&&f.textConfig&&(p=t.textConfig=f.textConfig),!h&&f.textContent&&(h=f.textContent)}var g=function(e){return e=ps({},e),ys(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat($_),function(t){delete e[t]}),e}(t);"production"!==process.env.NODE_ENV&&l&&Hs(u===l.parent,"Changing parent is not supported.");var v=t.$action||"merge",m="merge"===v,y="replace"===v;if(m){var x=l;(T=!l)?x=vY(a,u,t.type,n):(x&&(pY(x).isNew=!1),UH(x)),x&&(NH(x,g,e,{isInit:T}),yY(x,t,i,r))}else if(y){mY(l,t,n,e);var _=vY(a,u,t.type,n);_&&(NH(_,g,e,{isInit:!0}),yY(_,t,i,r))}else"remove"===v&&(EH(l,t),mY(l,t,n,e));var w=n.get(a);if(w&&h)if(m){var b=w.getTextContent();b?b.attr(h):w.setTextContent(new mv(h))}else y&&w.setTextContent(new mv(h));if(w){var S=t.clipPath;if(S){var C=S.type,M=void 0,T=!1;if(m){var I=w.getClipPath();M=(T=!I||pY(I).type!==C)?gY(C):I}else y&&(T=!0,M=gY(C));w.setClipPath(M),NH(M,S,e,{isInit:T}),YH(M,S.keyframeAnimation,e)}var k=pY(w);w.setTextConfig(p),k.option=t,function(e,t,n){var o=Nv(e).eventData;e.silent||e.ignore||o||(o=Nv(e).eventData={componentType:"graphic",componentIndex:t.componentIndex,name:e.name});o&&(o.info=n.info)}(w,e,t),xx({el:w,componentModel:e,itemName:w.name,itemTooltipOption:t.tooltip}),YH(w,t.keyframeAnimation,e)}})}},t.prototype._relocate=function(e,t){for(var n=e.option.elements,o=this.group,i=this._elMap,r=t.getWidth(),a=t.getHeight(),l=["x","y"],s=0;s<n.length;s++){if((f=null!=(p=nf((h=n[s]).id,null))?i.get(p):null)&&f.isGroup){var u=(g=f.parent)===o,c=pY(f),d=pY(g);c.width=gp(c.option.width,u?r:d.width)||0,c.height=gp(c.option.height,u?a:d.height)||0}}for(s=n.length-1;s>=0;s--){var h,p,f;if(f=null!=(p=nf((h=n[s]).id,null))?i.get(p):null){var g=f.parent,v=(d=pY(g),{}),m=ew(f,h,g===o?{width:r,height:a}:{width:d.width,height:d.height},null,{hv:h.hv,boundingMode:h.bounding},v);if(!pY(f).isNew&&m){for(var y=h.transition,x={},_=0;_<l.length;_++){var w=l[_],b=v[w];y&&(LH(y)||gs(y,w)>=0)?x[w]=b:f[w]=b}Wy(f,x,e,0)}else f.attr(v)}}},t.prototype._clear=function(){var e=this,t=this._elMap;t.each(function(n){mY(n,pY(n).option,t,e._lastGraphicModel)}),this._elMap=qs()},t.prototype.dispose=function(){this._clear()},t.type="graphic",t}(nC);function gY(e){"production"!==process.env.NODE_ENV&&Hs(e,"graphic type MUST be set");var t=eu(hY,e)?hY[e]:tx(e);"production"!==process.env.NODE_ENV&&Hs(t,"graphic type "+e+" can not be found");var n=new t({});return pY(n).type=e,n}function vY(e,t,n,o){var i=gY(n);return t.add(i),o.set(e,i),pY(i).id=e,pY(i).isNew=!0,i}function mY(e,t,n,o){e&&e.parent&&("group"===e.type&&e.traverse(function(e){mY(e,t,n,o)}),AH(e,t,o),n.removeKey(pY(e).id))}function yY(e,t,n,o){e.isGroup||ys([["cursor",Qf.prototype.cursor],["zlevel",o||0],["z",n||0],["z2",0]],function(n){var o=n[0];eu(t,o)?e[o]=Rs(t[o],n[1]):null==e[o]&&(e[o]=n[1])}),ys(bs(t),function(n){if(0===n.indexOf("on")){var o=t[n];e[n]=Ts(o)?o:null}}),eu(t,"draggable")&&(e.draggable=t.draggable),null!=t.name&&(e.name=t.name),null!=t.id&&(e.id=t.id)}var xY=["x","y","radius","angle","single"],_Y=["cartesian2d","polar","singleAxis"];function wY(e){return"production"!==process.env.NODE_ENV&&Hs(e),e+"Axis"}function bY(e,t){var n,o=qs(),i=[],r=qs();e.eachComponent({mainType:"dataZoom",query:t},function(e){r.get(e.uid)||l(e)});do{n=!1,e.eachComponent("dataZoom",a)}while(n);function a(e){!r.get(e.uid)&&function(e){var t=!1;return e.eachTargetAxis(function(e,n){var i=o.get(e);i&&i[n]&&(t=!0)}),t}(e)&&(l(e),n=!0)}function l(e){r.set(e.uid,!0),i.push(e),e.eachTargetAxis(function(e,t){(o.get(e)||o.set(e,[]))[t]=!0})}return i}function SY(e){var t=e.ecModel,n={infoList:[],infoMap:qs()};return e.eachTargetAxis(function(e,o){var i=t.getComponent(wY(e),o);if(i){var r=i.getCoordSysModel();if(r){var a=r.uid,l=n.infoMap.get(a);l||(l={model:r,axisModels:[]},n.infoList.push(l),n.infoMap.set(a,l)),l.axisModels.push(i)}}}),n}var CY=function(){function e(){this.indexList=[],this.indexMap=[]}return e.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},e}(),MY=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._autoThrottle=!0,n._noTarget=!0,n._rangePropMode=["percent","percent"],n}return Wl(t,e),t.prototype.init=function(e,t,n){var o=TY(e);this.settledOption=o,this.mergeDefaultAndTheme(e,n),this._doInit(o)},t.prototype.mergeOption=function(e){var t=TY(e);ds(this.option,e,!0),ds(this.settledOption,t,!0),this._doInit(t)},t.prototype._doInit=function(e){var t=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var n=this.settledOption;ys([["start","startValue"],["end","endValue"]],function(e,o){"value"===this._rangePropMode[o]&&(t[e[0]]=n[e[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get("orient",!0),t=this._targetAxisInfoMap=qs();this._fillSpecifiedTargetAxis(t)?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||"horizontal",this._fillAutoTargetAxisByOrient(t,this._orient)),this._noTarget=!0,t.each(function(e){e.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(e){var t=!1;return ys(xY,function(n){var o=this.getReferringComponents(wY(n),ff);if(o.specified){t=!0;var i=new CY;ys(o.models,function(e){i.add(e.componentIndex)}),e.set(n,i)}},this),t},t.prototype._fillAutoTargetAxisByOrient=function(e,t){var n=this.ecModel,o=!0;if(o){var i="vertical"===t?"y":"x";r(n.findComponents({mainType:i+"Axis"}),i)}o&&r(n.findComponents({mainType:"singleAxis",filter:function(e){return e.get("orient",!0)===t}}),"single");function r(t,n){var i=t[0];if(i){var r=new CY;if(r.add(i.componentIndex),e.set(n,r),o=!1,"x"===n||"y"===n){var a=i.getReferringComponents("grid",pf).models[0];a&&ys(t,function(e){i.componentIndex!==e.componentIndex&&a===e.getReferringComponents("grid",pf).models[0]&&r.add(e.componentIndex)})}}}o&&ys(xY,function(t){if(o){var i=n.findComponents({mainType:wY(t),filter:function(e){return"category"===e.get("type",!0)}});if(i[0]){var r=new CY;r.add(i[0].componentIndex),e.set(t,r),o=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis(function(t){!e&&(e=t)},this),"y"===e?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var t=this.ecModel.option;this.option.throttle=t.animation&&t.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var t=this._rangePropMode,n=this.get("rangeMode");ys([["start","startValue"],["end","endValue"]],function(o,i){var r=null!=e[o[0]],a=null!=e[o[1]];r&&!a?t[i]="percent":!r&&a?t[i]="value":n?t[i]=n[i]:r&&(t[i]="percent")})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis(function(t,n){null==e&&(e=this.ecModel.getComponent(wY(t),n))},this),e},t.prototype.eachTargetAxis=function(e,t){this._targetAxisInfoMap.each(function(n,o){ys(n.indexList,function(n){e.call(t,o,n)})})},t.prototype.getAxisProxy=function(e,t){var n=this.getAxisModel(e,t);if(n)return n.__dzAxisProxy},t.prototype.getAxisModel=function(e,t){"production"!==process.env.NODE_ENV&&Hs(e&&null!=t);var n=this._targetAxisInfoMap.get(e);if(n&&n.indexMap[t])return this.ecModel.getComponent(wY(e),t)},t.prototype.setRawRange=function(e){var t=this.option,n=this.settledOption;ys([["start","startValue"],["end","endValue"]],function(o){null==e[o[0]]&&null==e[o[1]]||(t[o[0]]=n[o[0]]=e[o[0]],t[o[1]]=n[o[1]]=e[o[1]])},this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var t=this.option;ys(["start","startValue","end","endValue"],function(n){t[n]=e[n]})},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},t.prototype.getValueRange=function(e,t){if(null!=e||null!=t)return this.getAxisProxy(e,t).getDataValueWindow();var n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return e.__dzAxisProxy;for(var t,n=this._targetAxisInfoMap.keys(),o=0;o<n.length;o++)for(var i=n[o],r=this._targetAxisInfoMap.get(i),a=0;a<r.indexList.length;a++){var l=this.getAxisProxy(i,r.indexList[a]);if(l.hostedBy(this))return l;t||(t=l)}return t},t.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},t.prototype.getOrient=function(){return"production"!==process.env.NODE_ENV&&Hs(this._orient),this._orient},t.type="dataZoom",t.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],t.defaultOption={z:4,filterMode:"filter",start:0,end:100},t}(aw);function TY(e){var t={};return ys(["start","end","startValue","endValue","throttle"],function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t}var IY=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.type="dataZoom.select",t}(MY),kY=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.prototype.render=function(e,t,n,o){this.dataZoomModel=e,this.ecModel=t,this.api=n},t.type="dataZoom",t}(nC),DY=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.type="dataZoom.select",t}(kY),NY=ys,EY=mp,AY=function(){function e(e,t,n,o){this._dimName=e,this._axisIndex=t,this.ecModel=o,this._dataZoomModel=n}return e.prototype.hostedBy=function(e){return this._dataZoomModel===e},e.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},e.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},e.prototype.getTargetSeriesModels=function(){var e=[];return this.ecModel.eachSeries(function(t){if(function(e){var t=e.get("coordinateSystem");return gs(_Y,t)>=0}(t)){var n=wY(this._dimName),o=t.getReferringComponents(n,pf).models[0];o&&this._axisIndex===o.componentIndex&&e.push(t)}},this),e},e.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},e.prototype.getMinMaxSpan=function(){return cs(this._minMaxSpan)},e.prototype.calculateDataWindow=function(e){var t,n=this._dataExtent,o=this.getAxisModel().axis.scale,i=this._dataZoomModel.getRangePropMode(),r=[0,100],a=[],l=[];NY(["start","end"],function(s,u){var c=e[s],d=e[s+"Value"];"percent"===i[u]?(null==c&&(c=r[u]),d=o.parse(fp(c,r,n))):(t=!0,c=fp(d=null==d?n[u]:o.parse(d),n,r)),l[u]=null==d||isNaN(d)?n[u]:d,a[u]=null==c||isNaN(c)?r[u]:c}),EY(l),EY(a);var s=this._minMaxSpan;function u(e,t,n,i,r){var a=r?"Span":"ValueSpan";jR(0,e,n,"all",s["min"+a],s["max"+a]);for(var l=0;l<2;l++)t[l]=fp(e[l],n,i,!0),r&&(t[l]=o.parse(t[l]))}return t?u(l,a,n,r,!1):u(a,l,r,n,!0),{valueWindow:l,percentWindow:a}},e.prototype.reset=function(e){if(e===this._dataZoomModel){var t=this.getTargetSeriesModels();this._dataExtent=function(e,t,n){var o=[1/0,-1/0];NY(n,function(e){!function(e,t,n){t&&ys(Uk(t,n),function(n){var o=t.getApproximateExtent(n);o[0]<e[0]&&(e[0]=o[0]),o[1]>e[1]&&(e[1]=o[1])})}(o,e.getData(),t)});var i=e.getAxisModel(),r=Vk(i.axis.scale,i,o).calculate();return[r.min,r.max]}(this,this._dimName,t),this._updateMinMaxSpan();var n=this.calculateDataWindow(e.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},e.prototype.filterData=function(e,t){if(e===this._dataZoomModel){var n=this._dimName,o=this.getTargetSeriesModels(),i=e.get("filterMode"),r=this._valueWindow;"none"!==i&&NY(o,function(e){var t=e.getData(),o=t.mapDimensionsAll(n);if(o.length){if("weakFilter"===i){var a=t.getStore(),l=xs(o,function(e){return t.getDimensionIndex(e)},t);t.filterSelf(function(e){for(var t,n,i,s=0;s<o.length;s++){var u=a.get(l[s],e),c=!isNaN(u),d=u<r[0],h=u>r[1];if(c&&!d&&!h)return!0;c&&(i=!0),d&&(t=!0),h&&(n=!0)}return i&&t&&n})}else NY(o,function(n){if("empty"===i)e.setData(t=t.map(n,function(e){return function(e){return e>=r[0]&&e<=r[1]}(e)?e:NaN}));else{var o={};o[n]=r,t.selectRange(o)}});NY(o,function(e){t.setApproximateExtent(r,e)})}})}},e.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,n=this._dataExtent;NY(["min","max"],function(o){var i=t.get(o+"Span"),r=t.get(o+"ValueSpan");null!=r&&(r=this.getAxisModel().axis.scale.parse(r)),null!=r?i=fp(n[0]+r,n,[0,100],!0):null!=i&&(r=fp(i,[0,100],n,!0)-n[0]),e[o+"Span"]=i,e[o+"ValueSpan"]=r},this)},e.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,n=this._valueWindow;if(t){var o=_p(n,[0,500]);o=Math.min(o,20);var i=e.axis.scale.rawExtentInfo;0!==t[0]&&i.setDeterminedMinMax("min",+n[0].toFixed(o)),100!==t[1]&&i.setDeterminedMinMax("max",+n[1].toFixed(o)),i.freeze()}},e}();var LY={getTargetSeries:function(e){function t(t){e.eachComponent("dataZoom",function(n){n.eachTargetAxis(function(o,i){var r=e.getComponent(wY(o),i);t(o,i,r,n)})})}t(function(e,t,n,o){n.__dzAxisProxy=null});var n=[];t(function(t,o,i,r){i.__dzAxisProxy||(i.__dzAxisProxy=new AY(t,o,r,e),n.push(i.__dzAxisProxy))});var o=qs();return ys(n,function(e){ys(e.getTargetSeriesModels(),function(e){o.set(e.uid,e)})}),o},overallReset:function(e,t){e.eachComponent("dataZoom",function(e){e.eachTargetAxis(function(t,n){e.getAxisProxy(t,n).reset(e)}),e.eachTargetAxis(function(n,o){e.getAxisProxy(n,o).filterData(e,t)})}),e.eachComponent("dataZoom",function(e){var t=e.findRepresentativeAxisProxy();if(t){var n=t.getDataPercentWindow(),o=t.getDataValueWindow();e.setCalculatedRange({start:n[0],end:n[1],startValue:o[0],endValue:o[1]})}})}};var VY=!1;function OY(e){VY||(VY=!0,e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,LY),function(e){e.registerAction("dataZoom",function(e,t){ys(bY(t,e),function(t){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}(e),e.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function PY(e){e.registerComponentModel(IY),e.registerComponentView(DY),OY(e)}var BY=function(){return function(){}}(),RY={};function zY(e,t){RY[e]=t}function FY(e){return RY[e]}var GY=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.prototype.optionUpdated=function(){e.prototype.optionUpdated.apply(this,arguments);var t=this.ecModel;ys(this.option.feature,function(e,n){var o=FY(n);o&&(o.getDefaultOption&&(o.defaultOption=o.getDefaultOption(t)),ds(e,o.defaultOption))})},t.type="toolbox",t.layoutMode={type:"box",ignoreSize:!0},t.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},t}(aw);function HY(e,t){var n=G_(t.get("padding")),o=t.getItemStyle(["color","opacity"]);return o.fill=t.get("backgroundColor"),e=new fv({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get("borderRadius")},style:o,silent:!0,z2:-1})}var WY=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Wl(t,e),t.prototype.render=function(e,t,n,o){var i=this.group;if(i.removeAll(),e.get("show")){var r=+e.get("itemSize"),a="vertical"===e.get("orient"),l=e.get("feature")||{},s=this._features||(this._features={}),u=[];ys(l,function(e,t){u.push(t)}),new rI(this._featureNames||[],u).add(c).update(c).remove(Cs(c,null)).execute(),this._featureNames=u,function(e,t,n){var o=t.getBoxLayoutParams(),i=t.get("padding"),r={width:n.getWidth(),height:n.getHeight()},a=Q_(o,r,i);J_(t.get("orient"),e,t.get("itemGap"),a.width,a.height),ew(e,o,r,i)}(i,e,n),i.add(HY(i.getBoundingRect(),e)),a||i.eachChild(function(e){var t=e.__title,o=e.ensureState("emphasis"),a=o.textConfig||(o.textConfig={}),l=e.getTextContent(),s=l&&l.ensureState("emphasis");if(s&&!Ts(s)&&t){var u=s.style||(s.style={}),c=Yh(t,mv.makeFont(u)),d=e.x+i.x,h=!1;e.y+i.y+r+c.height>n.getHeight()&&(a.position="top",h=!0);var p=h?-5-c.height:r+10;d+c.width/2>n.getWidth()?(a.position=["100%",p],u.align="right"):d-c.width/2<0&&(a.position=[0,p],u.align="left")}})}function c(c,d){var h,p=u[c],f=u[d],g=l[p],v=new Kx(g,e,e.ecModel);if(o&&null!=o.newTitle&&o.featureName===p&&(g.title=o.newTitle),p&&!f){if(function(e){return 0===e.indexOf("my")}(p))h={onclick:v.option.onclick,featureName:p};else{var m=FY(p);if(!m)return;h=new m}s[p]=h}else if(!(h=s[f]))return;h.uid=Qx("toolbox-feature"),h.model=v,h.ecModel=t,h.api=n;var y=h instanceof BY;p||!f?!v.get("show")||y&&h.unusable?y&&h.remove&&h.remove(t,n):(!function(o,l,s){var u,c,d=o.getModel("iconStyle"),h=o.getModel(["emphasis","iconStyle"]),p=l instanceof BY&&l.getIcons?l.getIcons():o.get("icon"),f=o.get("title")||{};Is(p)?(u={})[s]=p:u=p;Is(f)?(c={})[s]=f:c=f;var g=o.iconPaths={};ys(u,function(s,u){var p=gx(s,{},{x:-r/2,y:-r/2,width:r,height:r});p.setStyle(d.getItemStyle()),p.ensureState("emphasis").style=h.getItemStyle();var f=new mv({style:{text:c[u],align:h.get("textAlign"),borderRadius:h.get("textBorderRadius"),padding:h.get("textPadding"),fill:null,font:Ox({fontStyle:h.get("textFontStyle"),fontFamily:h.get("textFontFamily"),fontSize:h.get("textFontSize"),fontWeight:h.get("textFontWeight")},t)},ignore:!0});p.setTextContent(f),xx({el:p,componentModel:e,itemName:u,formatterParamsExtra:{title:c[u]}}),p.__title=c[u],p.on("mouseover",function(){var t=h.getItemStyle(),o=a?null==e.get("right")&&"right"!==e.get("left")?"right":"left":null==e.get("bottom")&&"bottom"!==e.get("top")?"bottom":"top";f.setStyle({fill:h.get("textFill")||t.fill||t.stroke||"#000",backgroundColor:h.get("textBackgroundColor")}),p.setTextConfig({position:h.get("textPosition")||o}),f.ignore=!e.get("showTitle"),n.enterEmphasis(this)}).on("mouseout",function(){"emphasis"!==o.get(["iconStatus",u])&&n.leaveEmphasis(this),f.hide()}),("emphasis"===o.get(["iconStatus",u])?rm:am)(p),i.add(p),p.on("click",Ss(l.onclick,l,t,n,u)),g[u]=p})}(v,h,p),v.setIconStatus=function(e,t){var n=this.option,o=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[e]=t,o[e]&&("emphasis"===t?rm:am)(o[e])},h instanceof BY&&h.render&&h.render(v,t,n,o)):y&&h.dispose&&h.dispose(t,n)}},t.prototype.updateView=function(e,t,n,o){ys(this._features,function(e){e instanceof BY&&e.updateView&&e.updateView(e.model,t,n,o)})},t.prototype.remove=function(e,t){ys(this._features,function(n){n instanceof BY&&n.remove&&n.remove(e,t)}),this.group.removeAll()},t.prototype.dispose=function(e,t){ys(this._features,function(n){n instanceof BY&&n.dispose&&n.dispose(e,t)})},t.type="toolbox",t}(nC);var UY=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Wl(t,e),t.prototype.onclick=function(e,t){var n=this.model,o=n.get("name")||e.get("title.0.text")||"echarts",i="svg"===t.getZr().painter.getType(),r=i?"svg":n.get("type",!0)||"png",a=t.getConnectedDataURL({type:r,backgroundColor:n.get("backgroundColor",!0)||e.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),l=Yl.browser;if("function"!=typeof MouseEvent||!l.newEdge&&(l.ie||l.edge))if(window.navigator.msSaveOrOpenBlob||i){var s=a.split(","),u=s[0].indexOf("base64")>-1,c=i?decodeURIComponent(s[1]):s[1];u&&(c=window.atob(c));var d=o+"."+r;if(window.navigator.msSaveOrOpenBlob){for(var h=c.length,p=new Uint8Array(h);h--;)p[h]=c.charCodeAt(h);var f=new Blob([p]);window.navigator.msSaveOrOpenBlob(f,d)}else{var g=document.createElement("iframe");document.body.appendChild(g);var v=g.contentWindow,m=v.document;m.open("image/svg+xml","replace"),m.write(c),m.close(),v.focus(),m.execCommand("SaveAs",!0,d),document.body.removeChild(g)}}else{var y=n.get("lang"),x='<body style="margin:0;"><img src="'+a+'" style="max-width:100%;" title="'+(y&&y[0]||"")+'" /></body>',_=window.open();_.document.write(x),_.document.title=o}else{var w=document.createElement("a");w.download=o+"."+r,w.target="_blank",w.href=a;var b=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});w.dispatchEvent(b)}},t.getDefaultOption=function(e){return{show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:e.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:e.getLocaleModel().get(["toolbox","saveAsImage","lang"])}},t}(BY),YY="__ec_magicType_stack__",ZY=[["line","bar"],["stack"]],XY=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Wl(t,e),t.prototype.getIcons=function(){var e=this.model,t=e.get("icon"),n={};return ys(e.get("type"),function(e){t[e]&&(n[e]=t[e])}),n},t.getDefaultOption=function(e){return{show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:e.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}}},t.prototype.onclick=function(e,t,n){var o=this.model,i=o.get(["seriesIndex",n]);if(jY[n]){var r,a={series:[]};ys(ZY,function(e){gs(e,n)>=0&&ys(e,function(e){o.setIconStatus(e,"normal")})}),o.setIconStatus(n,"emphasis"),e.eachComponent({mainType:"series",query:null==i?null:{seriesIndex:i}},function(e){var t=e.subType,i=e.id,r=jY[n](t,i,e,o);r&&(fs(r,e.option),a.series.push(r));var l=e.coordinateSystem;if(l&&"cartesian2d"===l.type&&("line"===n||"bar"===n)){var s=l.getAxesByScale("ordinal")[0];if(s){var u=s.dim+"Axis",c=e.getReferringComponents(u,pf).models[0].componentIndex;a[u]=a[u]||[];for(var d=0;d<=c;d++)a[u][c]=a[u][c]||{};a[u][c].boundaryGap="bar"===n}}});var l=n;"stack"===n&&(r=ds({stack:o.option.title.tiled,tiled:o.option.title.stack},o.option.title),"emphasis"!==o.get(["iconStatus",n])&&(l="tiled")),t.dispatchAction({type:"changeMagicType",currentType:l,newOption:a,newTitle:r,featureName:"magicType"})}},t}(BY),jY={line:function(e,t,n,o){if("bar"===e)return ds({id:t,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},o.get(["option","line"])||{},!0)},bar:function(e,t,n,o){if("line"===e)return ds({id:t,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},o.get(["option","bar"])||{},!0)},stack:function(e,t,n,o){var i=n.get("stack")===YY;if("line"===e||"bar"===e)return o.setIconStatus("stack",i?"normal":"emphasis"),ds({id:t,stack:i?"":YY},o.get(["option","stack"])||{},!0)}};jT({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(e,t){t.mergeOption(e.newOption)});var $Y=new Array(60).join("-"),qY="\t";function KY(e){return e.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var JY=new RegExp("[\t]+","g");function QY(e,t){var n=e.split(new RegExp("\n*"+$Y+"\n*","g")),o={series:[]};return ys(n,function(e,n){if(function(e){if(e.slice(0,e.indexOf("\n")).indexOf(qY)>=0)return!0}(e)){var i=function(e){for(var t=e.split(/\n+/g),n=[],o=xs(KY(t.shift()).split(JY),function(e){return{name:e,data:[]}}),i=0;i<t.length;i++){var r=KY(t[i]).split(JY);n.push(r.shift());for(var a=0;a<r.length;a++)o[a]&&(o[a].data[i]=r[a])}return{series:o,categories:n}}(e),r=t[n],a=r.axisDim+"Axis";r&&(o[a]=o[a]||[],o[a][r.axisIndex]={data:i.categories},o.series=o.series.concat(i.series))}else{i=function(e){for(var t=e.split(/\n+/g),n=KY(t.shift()),o=[],i=0;i<t.length;i++){var r=KY(t[i]);if(r){var a=r.split(JY),l="",s=void 0,u=!1;isNaN(a[0])?(u=!0,l=a[0],a=a.slice(1),o[i]={name:l,value:[]},s=o[i].value):s=o[i]=[];for(var c=0;c<a.length;c++)s.push(+a[c]);1===s.length&&(u?o[i].value=s[0]:o[i]=s[0])}}return{name:n,data:o}}(e);o.series.push(i)}}),o}var eZ=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Wl(t,e),t.prototype.onclick=function(e,t){setTimeout(function(){t.dispatchAction({type:"hideTip"})});var n=t.getDom(),o=this.model;this._dom&&n.removeChild(this._dom);var i=document.createElement("div");i.style.cssText="position:absolute;top:0;bottom:0;left:0;right:0;padding:5px",i.style.backgroundColor=o.get("backgroundColor")||"#fff";var r=document.createElement("h4"),a=o.get("lang")||[];r.innerHTML=a[0]||o.get("title"),r.style.cssText="margin:10px 20px",r.style.color=o.get("textColor");var l=document.createElement("div"),s=document.createElement("textarea");l.style.cssText="overflow:auto";var u=o.get("optionToContent"),c=o.get("contentToOption"),d=function(e){var t,n,o,i=function(e){var t={},n=[],o=[];return e.eachRawSeries(function(e){var i=e.coordinateSystem;if(!i||"cartesian2d"!==i.type&&"polar"!==i.type)n.push(e);else{var r=i.getBaseAxis();if("category"===r.type){var a=r.dim+"_"+r.index;t[a]||(t[a]={categoryAxis:r,valueAxis:i.getOtherAxis(r),series:[]},o.push({axisDim:r.dim,axisIndex:r.index})),t[a].series.push(e)}else n.push(e)}}),{seriesGroupByCategoryAxis:t,other:n,meta:o}}(e);return{value:ws([(n=i.seriesGroupByCategoryAxis,o=[],ys(n,function(e,t){var n=e.categoryAxis,i=e.valueAxis.dim,r=[" "].concat(xs(e.series,function(e){return e.name})),a=[n.model.getCategories()];ys(e.series,function(e){var t=e.getRawData();a.push(e.getRawData().mapArray(t.mapDimension(i),function(e){return e}))});for(var l=[r.join(qY)],s=0;s<a[0].length;s++){for(var u=[],c=0;c<a.length;c++)u.push(a[c][s]);l.push(u.join(qY))}o.push(l.join("\n"))}),o.join("\n\n"+$Y+"\n\n")),(t=i.other,xs(t,function(e){var t=e.getRawData(),n=[e.name],o=[];return t.each(t.dimensions,function(){for(var e=arguments.length,i=arguments[e-1],r=t.getName(i),a=0;a<e-1;a++)o[a]=arguments[a];n.push((r?r+qY:"")+o.join(qY))}),n.join("\n")}).join("\n\n"+$Y+"\n\n"))],function(e){return!!e.replace(/[\n\t\s]/g,"")}).join("\n\n"+$Y+"\n\n"),meta:i.meta}}(e);if(Ts(u)){var h=u(t.getOption());Is(h)?l.innerHTML=h:Ls(h)&&l.appendChild(h)}else{s.readOnly=o.get("readOnly");var p=s.style;p.cssText="display:block;width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;box-sizing:border-box;outline:none",p.color=o.get("textColor"),p.borderColor=o.get("textareaBorderColor"),p.backgroundColor=o.get("textareaColor"),s.value=d.value,l.appendChild(s)}var f=d.meta,g=document.createElement("div");g.style.cssText="position:absolute;bottom:5px;left:0;right:0";var v="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",m=document.createElement("div"),y=document.createElement("div");v+=";background-color:"+o.get("buttonColor"),v+=";color:"+o.get("buttonTextColor");var x=this;function _(){n.removeChild(i),x._dom=null}Fu(m,"click",_),Fu(y,"click",function(){if(null==c&&null!=u||null!=c&&null==u)return"production"!==process.env.NODE_ENV&&zp("It seems you have just provided one of `contentToOption` and `optionToContent` functions but missed the other one. Data change is ignored."),void _();var e;try{e=Ts(c)?c(l,t.getOption()):QY(s.value,f)}catch(n){throw _(),new Error("Data view format error "+n)}e&&t.dispatchAction({type:"changeDataView",newOption:e}),_()}),m.innerHTML=a[1],y.innerHTML=a[2],y.style.cssText=m.style.cssText=v,!o.get("readOnly")&&g.appendChild(y),g.appendChild(m),i.appendChild(r),i.appendChild(l),i.appendChild(g),l.style.height=n.clientHeight-80+"px",n.appendChild(i),this._dom=i},t.prototype.remove=function(e,t){this._dom&&t.getDom().removeChild(this._dom)},t.prototype.dispose=function(e,t){this.remove(e,t)},t.getDefaultOption=function(e){return{show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:e.getLocaleModel().get(["toolbox","dataView","title"]),lang:e.getLocaleModel().get(["toolbox","dataView","lang"]),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"}},t}(BY);function tZ(e,t){return xs(e,function(e,n){var o=t&&t[n];if(Ns(o)&&!Ms(o)){Ns(e)&&!Ms(e)||(e={value:e});var i=null!=o.name&&null==e.name;return e=fs(e,o),i&&delete e.name,e}return e})}jT({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(e,t){var n=[];ys(e.newOption.series,function(e){var o=t.getSeriesByName(e.name)[0];if(o){var i=o.get("data");n.push({name:e.name,data:tZ(e.data,i)})}else n.push(ps({type:"scatter"},e))}),t.mergeOption(fs({series:n},e.newOption))});var nZ=ys,oZ=uf();function iZ(e){var t=oZ(e);return t.snapshots||(t.snapshots=[{}]),t.snapshots}var rZ=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Wl(t,e),t.prototype.onclick=function(e,t){!function(e){oZ(e).snapshots=null}(e),t.dispatchAction({type:"restore",from:this.uid})},t.getDefaultOption=function(e){return{show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:e.getLocaleModel().get(["toolbox","restore","title"])}},t}(BY);jT({type:"restore",event:"restore",update:"prepareAndUpdate"},function(e,t){t.resetOption("recreate")});var aZ=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],lZ=function(){function e(e,t,n){var o=this;this._targetInfoList=[];var i=uZ(t,e);ys(cZ,function(e,t){(!n||!n.include||gs(n.include,t)>=0)&&e(i,o._targetInfoList)})}return e.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,function(e,t,n){if((e.coordRanges||(e.coordRanges=[])).push(t),!e.coordRange){e.coordRange=t;var o=pZ[e.brushType](0,n,t);e.__rangeOffset={offset:gZ[e.brushType](o.values,e.range,[1,1]),xyMinMax:o.xyMinMax}}}),e},e.prototype.matchOutputRanges=function(e,t,n){ys(e,function(e){var o=this.findTargetInfo(e,t);o&&!0!==o&&ys(o.coordSyses,function(o){var i=pZ[e.brushType](1,o,e.range,!0);n(e,i.values,o,t)})},this)},e.prototype.setInputRanges=function(e,t){ys(e,function(e){var n,o,i,r,a,l=this.findTargetInfo(e,t);if("production"!==process.env.NODE_ENV&&(Hs(!l||!0===l||e.coordRange,"coordRange must be specified when coord index specified."),Hs(!l||!0!==l||e.range,"range must be specified in global brush.")),e.range=e.range||[],l&&!0!==l){e.panelId=l.panelId;var s=pZ[e.brushType](0,l.coordSys,e.coordRange),u=e.__rangeOffset;e.range=u?gZ[e.brushType](s.values,u.offset,(n=s.xyMinMax,o=u.xyMinMax,i=mZ(n),r=mZ(o),a=[i[0]/r[0],i[1]/r[1]],isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a)):s.values}},this)},e.prototype.makePanelOpts=function(e,t){return xs(this._targetInfoList,function(n){var o=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:t?t(n):null,clipPath:qz(o),isTargetByCursor:Jz(o,e,n.coordSysModel),getLinearBrushOtherExtent:Kz(o)}})},e.prototype.controlSeries=function(e,t,n){var o=this.findTargetInfo(e,n);return!0===o||o&&gs(o.coordSyses,t.coordinateSystem)>=0},e.prototype.findTargetInfo=function(e,t){for(var n=this._targetInfoList,o=uZ(t,e),i=0;i<n.length;i++){var r=n[i],a=e.panelId;if(a){if(r.panelId===a)return r}else for(var l=0;l<dZ.length;l++)if(dZ[l](o,r))return r}return!0},e}();function sZ(e){return e[0]>e[1]&&e.reverse(),e}function uZ(e,t){return df(e,t,{includeMainTypes:aZ})}var cZ={grid:function(e,t){var n=e.xAxisModels,o=e.yAxisModels,i=e.gridModels,r=qs(),a={},l={};(n||o||i)&&(ys(n,function(e){var t=e.axis.grid.model;r.set(t.id,t),a[t.id]=!0}),ys(o,function(e){var t=e.axis.grid.model;r.set(t.id,t),l[t.id]=!0}),ys(i,function(e){r.set(e.id,e),a[e.id]=!0,l[e.id]=!0}),r.each(function(e){var i=e.coordinateSystem,r=[];ys(i.getCartesians(),function(e,t){(gs(n,e.getAxis("x").model)>=0||gs(o,e.getAxis("y").model)>=0)&&r.push(e)}),t.push({panelId:"grid--"+e.id,gridModel:e,coordSysModel:e,coordSys:r[0],coordSyses:r,getPanelRect:hZ.grid,xAxisDeclared:a[e.id],yAxisDeclared:l[e.id]})}))},geo:function(e,t){ys(e.geoModels,function(e){var n=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:n,coordSyses:[n],getPanelRect:hZ.geo})})}},dZ=[function(e,t){var n=e.xAxisModel,o=e.yAxisModel,i=e.gridModel;return!i&&n&&(i=n.axis.grid.model),!i&&o&&(i=o.axis.grid.model),i&&i===t.gridModel},function(e,t){var n=e.geoModel;return n&&n===t.geoModel}],hZ={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var e=this.coordSys,t=e.getBoundingRect().clone();return t.applyTransform(ux(e)),t}},pZ={lineX:Cs(fZ,0),lineY:Cs(fZ,1),rect:function(e,t,n,o){var i=e?t.pointToData([n[0][0],n[1][0]],o):t.dataToPoint([n[0][0],n[1][0]],o),r=e?t.pointToData([n[0][1],n[1][1]],o):t.dataToPoint([n[0][1],n[1][1]],o),a=[sZ([i[0],r[0]]),sZ([i[1],r[1]])];return{values:a,xyMinMax:a}},polygon:function(e,t,n,o){var i=[[1/0,-1/0],[1/0,-1/0]];return{values:xs(n,function(n){var r=e?t.pointToData(n,o):t.dataToPoint(n,o);return i[0][0]=Math.min(i[0][0],r[0]),i[1][0]=Math.min(i[1][0],r[1]),i[0][1]=Math.max(i[0][1],r[0]),i[1][1]=Math.max(i[1][1],r[1]),r}),xyMinMax:i}}};function fZ(e,t,n,o){"production"!==process.env.NODE_ENV&&Hs("cartesian2d"===n.type,"lineX/lineY brush is available only in cartesian2d.");var i=n.getAxis(["x","y"][e]),r=sZ(xs([0,1],function(e){return t?i.coordToData(i.toLocalCoord(o[e]),!0):i.toGlobalCoord(i.dataToCoord(o[e]))})),a=[];return a[e]=r,a[1-e]=[NaN,NaN],{values:r,xyMinMax:a}}var gZ={lineX:Cs(vZ,0),lineY:Cs(vZ,1),rect:function(e,t,n){return[[e[0][0]-n[0]*t[0][0],e[0][1]-n[0]*t[0][1]],[e[1][0]-n[1]*t[1][0],e[1][1]-n[1]*t[1][1]]]},polygon:function(e,t,n){return xs(e,function(e,o){return[e[0]-n[0]*t[o][0],e[1]-n[1]*t[o][1]]})}};function vZ(e,t,n,o){return[t[0]-o[e]*n[0],t[1]-o[e]*n[1]]}function mZ(e){return e?[e[0][1]-e[0][0],e[1][1]-e[1][0]]:[NaN,NaN]}var yZ,xZ,_Z=ys,wZ=Xp+"toolbox-dataZoom_",bZ=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Wl(t,e),t.prototype.render=function(e,t,n,o){this._brushController||(this._brushController=new xz(n.getZr()),this._brushController.on("brush",Ss(this._onBrush,this)).mount()),function(e,t,n,o,i){var r=n._isZoomActive;o&&"takeGlobalCursor"===o.type&&(r="dataZoomSelect"===o.key&&o.dataZoomSelectActive);n._isZoomActive=r,e.setIconStatus("zoom",r?"emphasis":"normal");var a=new lZ(CZ(e),t,{include:["grid"]}),l=a.makePanelOpts(i,function(e){return e.xAxisDeclared&&!e.yAxisDeclared?"lineX":!e.xAxisDeclared&&e.yAxisDeclared?"lineY":"rect"});n._brushController.setPanels(l).enableBrush(!(!r||!l.length)&&{brushType:"auto",brushStyle:e.getModel("brushStyle").getItemStyle()})}(e,t,this,o,n),function(e,t){e.setIconStatus("back",function(e){return iZ(e).length}(t)>1?"emphasis":"normal")}(e,t)},t.prototype.onclick=function(e,t,n){SZ[n].call(this)},t.prototype.remove=function(e,t){this._brushController&&this._brushController.unmount()},t.prototype.dispose=function(e,t){this._brushController&&this._brushController.dispose()},t.prototype._onBrush=function(e){var t=e.areas;if(e.isEnd&&t.length){var n={},o=this.ecModel;this._brushController.updateCovers([]),new lZ(CZ(this.model),o,{include:["grid"]}).matchOutputRanges(t,o,function(e,t,n){if("cartesian2d"===n.type){var o=e.brushType;"rect"===o?(i("x",n,t[0]),i("y",n,t[1])):i({lineX:"x",lineY:"y"}[o],n,t)}}),function(e,t){var n=iZ(e);nZ(t,function(t,o){for(var i=n.length-1;i>=0&&!n[i][o];i--);if(i<0){var r=e.queryComponents({mainType:"dataZoom",subType:"select",id:o})[0];if(r){var a=r.getPercentRange();n[0][o]={dataZoomId:o,start:a[0],end:a[1]}}}}),n.push(t)}(o,n),this._dispatchZoomAction(n)}function i(e,t,i){var r=t.getAxis(e),a=r.model,l=function(e,t,n){var o;return n.eachComponent({mainType:"dataZoom",subType:"select"},function(n){n.getAxisModel(e,t.componentIndex)&&(o=n)}),o}(e,a,o),s=l.findRepresentativeAxisProxy(a).getMinMaxSpan();null==s.minValueSpan&&null==s.maxValueSpan||(i=jR(0,i.slice(),r.scale.getExtent(),0,s.minValueSpan,s.maxValueSpan)),l&&(n[l.id]={dataZoomId:l.id,startValue:i[0],endValue:i[1]})}},t.prototype._dispatchZoomAction=function(e){var t=[];_Z(e,function(e,n){t.push(cs(e))}),t.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:t})},t.getDefaultOption=function(e){return{show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:e.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}}},t}(BY),SZ={zoom:function(){var e=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:e})},back:function(){this._dispatchZoomAction(function(e){var t=iZ(e),n=t[t.length-1];t.length>1&&t.pop();var o={};return nZ(n,function(e,n){for(var i=t.length-1;i>=0;i--)if(e=t[i][n]){o[n]=e;break}}),o}(this.ecModel))}};function CZ(e){var t={xAxisIndex:e.get("xAxisIndex",!0),yAxisIndex:e.get("yAxisIndex",!0),xAxisId:e.get("xAxisId",!0),yAxisId:e.get("yAxisId",!0)};return null==t.xAxisIndex&&null==t.xAxisId&&(t.xAxisIndex="all"),null==t.yAxisIndex&&null==t.yAxisId&&(t.yAxisIndex="all"),t}yZ="dataZoom",xZ=function(e){var t=e.getComponent("toolbox",0),n=["feature","dataZoom"];if(t&&null!=t.get(n)){var o=t.getModel(n),i=[],r=df(e,CZ(o));return _Z(r.xAxisModels,function(e){return a(e,"xAxis","xAxisIndex")}),_Z(r.yAxisModels,function(e){return a(e,"yAxis","yAxisIndex")}),i}function a(e,t,n){var r=e.componentIndex,a={type:"select",$fromToolbox:!0,filterMode:o.get("filterMode",!0)||"filter",id:wZ+t+r};a[n]=r,i.push(a)}},Hs(null==kw.get(yZ)&&xZ),kw.set(yZ,xZ);var MZ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.type="tooltip",t.dependencies=["axisPointer"],t.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},t}(aw);function TZ(e){var t=e.get("confine");return null!=t?!!t:"richText"===e.get("renderMode")}function IZ(e){if(Yl.domSupported)for(var t=document.documentElement.style,n=0,o=e.length;n<o;n++)if(e[n]in t)return e[n]}var kZ=IZ(["transform","webkitTransform","OTransform","MozTransform","msTransform"]);function DZ(e,t){if(!e)return t;t=F_(t,!0);var n=e.indexOf(t);return(e=-1===n?t:"-"+e.slice(0,n)+"-"+t).toLowerCase()}var NZ=DZ(IZ(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),"transition"),EZ=DZ(kZ,"transform"),AZ="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(Yl.transform3dSupported?"will-change:transform;":"");function LZ(e,t,n){var o=e.toFixed(0)+"px",i=t.toFixed(0)+"px";if(!Yl.transformSupported)return n?"top:"+i+";left:"+o+";":[["top",i],["left",o]];var r=Yl.transform3dSupported,a="translate"+(r?"3d":"")+"("+o+","+i+(r?",0":"")+")";return n?"top:0;left:0;"+EZ+":"+a+";":[["top",0],["left",0],[kZ,a]]}function VZ(e,t,n){var o=[],i=e.get("transitionDuration"),r=e.get("backgroundColor"),a=e.get("shadowBlur"),l=e.get("shadowColor"),s=e.get("shadowOffsetX"),u=e.get("shadowOffsetY"),c=e.getModel("textStyle"),d=HS(e,"html"),h=s+"px "+u+"px "+a+"px "+l;return o.push("box-shadow:"+h),t&&i&&o.push(function(e,t){var n="cubic-bezier(0.23,1,0.32,1)",o=" "+e/2+"s "+n,i="opacity"+o+",visibility"+o;return t||(o=" "+e+"s "+n,i+=Yl.transformSupported?","+EZ+o:",left"+o+",top"+o),NZ+":"+i}(i,n)),r&&o.push("background-color:"+r),ys(["width","color","radius"],function(t){var n="border-"+t,i=F_(n),r=e.get(i);null!=r&&o.push(n+":"+r+("color"===t?"":"px"))}),o.push(function(e){var t=[],n=e.get("fontSize"),o=e.getTextColor();o&&t.push("color:"+o),t.push("font:"+e.getFont());var i=Rs(e.get("lineHeight"),Math.round(3*n/2));n&&t.push("line-height:"+i+"px");var r=e.get("textShadowColor"),a=e.get("textShadowBlur")||0,l=e.get("textShadowOffsetX")||0,s=e.get("textShadowOffsetY")||0;return r&&a&&t.push("text-shadow:"+l+"px "+s+"px "+a+"px "+r),ys(["decoration","align"],function(n){var o=e.get(n);o&&t.push("text-"+n+":"+o)}),t.join(";")}(c)),null!=d&&o.push("padding:"+G_(d).join("px ")+"px"),o.join(";")+";"}function OZ(e,t,n,o,i){var r=t&&t.painter;if(n){var a=r&&r.getViewportRoot();a&&function(e,t,n,o,i){ku(Iu,t,o,i,!0)&&ku(e,n,Iu[0],Iu[1])}(e,a,n,o,i)}else{e[0]=o,e[1]=i;var l=r&&r.getViewportRootOffset();l&&(e[0]+=l.offsetLeft,e[1]+=l.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var PZ=function(){function e(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Yl.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var o=this._zr=e.getZr(),i=t.appendTo,r=i&&(Is(i)?document.querySelector(i):Ls(i)?i:Ts(i)&&i(e.getDom()));OZ(this._styleCoord,o,r,e.getWidth()/2,e.getHeight()/2),(r||e.getDom()).appendChild(n),this._api=e,this._container=r;var a=this;n.onmouseenter=function(){a._enterable&&(clearTimeout(a._hideTimeout),a._show=!0),a._inContent=!0},n.onmousemove=function(e){if(e=e||window.event,!a._enterable){var t=o.handler;zu(o.painter.getViewportRoot(),e,!0),t.dispatch("mousemove",e)}},n.onmouseleave=function(){a._inContent=!1,a._enterable&&a._show&&a.hideLater(a._hideDelay)}}return e.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),n=(r="position",(a=(i=t).currentStyle||document.defaultView&&document.defaultView.getComputedStyle(i))?a[r]:null),o=t.style;"absolute"!==o.position&&"absolute"!==n&&(o.position="relative")}var i,r,a,l=e.get("alwaysShowContent");l&&this._moveIfResized(),this._alwaysShowContent=l,this.el.className=e.get("className")||""},e.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,o=n.style,i=this._styleCoord;n.innerHTML?o.cssText=AZ+VZ(e,!this._firstShow,this._longHide)+LZ(i[0],i[1],!0)+"border-color:"+Z_(t)+";"+(e.get("extraCssText")||"")+";pointer-events:"+(this._enterable?"auto":"none"):o.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(e,t,n,o,i){var r=this.el;if(null!=e){var a="";if(Is(i)&&"item"===n.get("trigger")&&!TZ(n)&&(a=function(e,t,n){if(!Is(n)||"inside"===n)return"";var o=e.get("backgroundColor"),i=e.get("borderWidth");t=Z_(t);var r,a,l="left"===(r=n)?"right":"right"===r?"left":"top"===r?"bottom":"top",s=Math.max(1.5*Math.round(i),6),u="",c=EZ+":";gs(["left","right"],l)>-1?(u+="top:50%",c+="translateY(-50%) rotate("+(a="left"===l?-225:-45)+"deg)"):(u+="left:50%",c+="translateX(-50%) rotate("+(a="top"===l?225:45)+"deg)");var d=a*Math.PI/180,h=s+i,p=h*Math.abs(Math.cos(d))+h*Math.abs(Math.sin(d)),f=t+" solid "+i+"px;";return'<div style="'+["position:absolute;width:"+s+"px;height:"+s+"px;z-index:-1;",(u+=";"+l+":-"+Math.round(100*((p-Math.SQRT2*i)/2+Math.SQRT2*i-(p-h)/2))/100+"px")+";"+c+";","border-bottom:"+f,"border-right:"+f,"background-color:"+o+";"].join("")+'"></div>'}(n,o,i)),Is(e))r.innerHTML=e+a;else if(e){r.innerHTML="",Ms(e)||(e=[e]);for(var l=0;l<e.length;l++)Ls(e[l])&&e[l].parentNode!==r&&r.appendChild(e[l]);if(a&&r.childNodes.length){var s=document.createElement("div");s.innerHTML=a,r.appendChild(s)}}}else r.innerHTML=""},e.prototype.setEnterable=function(e){this._enterable=e},e.prototype.getSize=function(){var e=this.el;return e?[e.offsetWidth,e.offsetHeight]:[0,0]},e.prototype.moveTo=function(e,t){if(this.el){var n=this._styleCoord;if(OZ(n,this._zr,this._container,e,t),null!=n[0]&&null!=n[1]){var o=this.el.style;ys(LZ(n[0],n[1]),function(e){o[e[0]]=e[1]})}}},e.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},e.prototype.hide=function(){var e=this,t=this.el.style;t.visibility="hidden",t.opacity="0",Yl.transform3dSupported&&(t.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return e._longHide=!0},500)},e.prototype.hideLater=function(e){!this._show||this._inContent&&this._enterable||this._alwaysShowContent||(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(Ss(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var e=this.el.parentNode;e&&e.removeChild(this.el),this.el=this._container=null},e}(),BZ=function(){function e(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),FZ(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}return e.prototype.update=function(e){var t=e.get("alwaysShowContent");t&&this._moveIfResized(),this._alwaysShowContent=t},e.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},e.prototype.setContent=function(e,t,n,o,i){var r=this;Ns(e)&&Up("production"!==process.env.NODE_ENV?"Passing DOM nodes as content is not supported in richText tooltip!":""),this.el&&this._zr.remove(this.el);var a=n.getModel("textStyle");this.el=new mv({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:o,textShadowColor:a.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:HS(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),ys(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(e){r.el.style[e]=n.get(e)}),ys(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(e){r.el.style[e]=a.get(e)||0}),this._zr.add(this.el);var l=this;this.el.on("mouseover",function(){l._enterable&&(clearTimeout(l._hideTimeout),l._show=!0),l._inContent=!0}),this.el.on("mouseout",function(){l._enterable&&l._show&&l.hideLater(l._hideDelay),l._inContent=!1})},e.prototype.setEnterable=function(e){this._enterable=e},e.prototype.getSize=function(){var e=this.el,t=this.el.getBoundingRect(),n=zZ(e.style);return[t.width+n.left+n.right,t.height+n.top+n.bottom]},e.prototype.moveTo=function(e,t){var n=this.el;if(n){var o=this._styleCoord;FZ(o,this._zr,e,t),e=o[0],t=o[1];var i=n.style,r=RZ(i.borderWidth||0),a=zZ(i);n.x=e+r+a.left,n.y=t+r+a.top,n.markRedraw()}},e.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},e.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},e.prototype.hideLater=function(e){!this._show||this._inContent&&this._enterable||this._alwaysShowContent||(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(Ss(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){this._zr.remove(this.el)},e}();function RZ(e){return Math.max(0,e)}function zZ(e){var t=RZ(e.shadowBlur||0),n=RZ(e.shadowOffsetX||0),o=RZ(e.shadowOffsetY||0);return{left:RZ(t-n),right:RZ(t+n),top:RZ(t-o),bottom:RZ(t+o)}}function FZ(e,t,n,o){e[0]=n,e[1]=o,e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var GZ=new fv({shape:{x:-1,y:-1,width:2,height:2}}),HZ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.prototype.init=function(e,t){if(!Yl.node&&t.getDom()){var n,o=e.getComponent("tooltip"),i=this._renderMode="auto"===(n=o.get("renderMode"))?Yl.domSupported?"html":"richText":n||"html";this._tooltipContent="richText"===i?new BZ(t):new PZ(t,{appendTo:o.get("appendToBody",!0)?"body":o.get("appendTo",!0)})}},t.prototype.render=function(e,t,n){if(!Yl.node&&n.getDom()){this.group.removeAll(),this._tooltipModel=e,this._ecModel=t,this._api=n;var o=this._tooltipContent;o.update(e),o.setEnterable(e.get("enterable")),this._initGlobalListener(),this._keepShow(),"richText"!==this._renderMode&&e.get("transitionDuration")?vC(this,"_updatePosition",50,"fixRate"):mC(this,"_updatePosition")}},t.prototype._initGlobalListener=function(){var e=this._tooltipModel.get("triggerOn");ZW("itemTooltip",this._api,Ss(function(t,n,o){"none"!==e&&(e.indexOf(t)>=0?this._tryShow(n,o):"leave"===t&&this._hide(o))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,n=this._api,o=e.get("triggerOn");if(null!=this._lastX&&null!=this._lastY&&"none"!==o&&"click"!==o){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&i.manuallyShowTip(e,t,n,{x:i._lastX,y:i._lastY,dataByCoordSys:i._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,t,n,o){if(o.from!==this.uid&&!Yl.node&&n.getDom()){var i=UZ(o,n);this._ticket="";var r=o.dataByCoordSys,a=function(e,t,n){var o=hf(e).queryOptionMap,i=o.keys()[0];if(!i||"series"===i)return;var r=gf(t,i,o.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),a=r.models[0];if(!a)return;var l,s=n.getViewOfComponentModel(a);if(s.group.traverse(function(t){var n=Nv(t).tooltipConfig;if(n&&n.name===e.name)return l=t,!0}),l)return{componentMainType:i,componentIndex:a.componentIndex,el:l}}(o,t,n);if(a){var l=a.el.getBoundingRect().clone();l.applyTransform(a.el.transform),this._tryShow({offsetX:l.x+l.width/2,offsetY:l.y+l.height/2,target:a.el,position:o.position,positionDefault:"bottom"},i)}else if(o.tooltip&&null!=o.x&&null!=o.y){var s=GZ;s.x=o.x,s.y=o.y,s.update(),Nv(s).tooltipConfig={name:null,option:o.tooltip},this._tryShow({offsetX:o.x,offsetY:o.y,target:s},i)}else if(r)this._tryShow({offsetX:o.x,offsetY:o.y,position:o.position,dataByCoordSys:r,tooltipOption:o.tooltipOption},i);else if(null!=o.seriesIndex){if(this._manuallyAxisShowTip(e,t,n,o))return;var u=KW(o,t),c=u.point[0],d=u.point[1];null!=c&&null!=d&&this._tryShow({offsetX:c,offsetY:d,target:u.el,position:o.position,positionDefault:"bottom"},i)}else null!=o.x&&null!=o.y&&(n.dispatchAction({type:"updateAxisPointer",x:o.x,y:o.y}),this._tryShow({offsetX:o.x,offsetY:o.y,position:o.position,target:n.getZr().findHover(o.x,o.y).target},i))}},t.prototype.manuallyHideTip=function(e,t,n,o){var i=this._tooltipContent;this._tooltipModel&&i.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,o.from!==this.uid&&this._hide(UZ(o,n))},t.prototype._manuallyAxisShowTip=function(e,t,n,o){var i=o.seriesIndex,r=o.dataIndex,a=t.getComponent("axisPointer").coordSysAxesInfo;if(null!=i&&null!=r&&null!=a){var l=t.getSeriesByIndex(i);if(l)if("axis"===WZ([l.getData().getItemModel(r),l,(l.coordinateSystem||{}).model],this._tooltipModel).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:i,dataIndex:r,position:o.position}),!0}},t.prototype._tryShow=function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var o=e.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,e);else if(n){var i,r;if("legend"===Nv(n).ssrType)return;this._lastDataByCoordSys=null,aM(n,function(e){return null!=Nv(e).dataIndex?(i=e,!0):null!=Nv(e).tooltipConfig?(r=e,!0):void 0},!0),i?this._showSeriesItemTooltip(e,i,t):r?this._showComponentItemTooltip(e,r,t):this._hide(t)}else this._lastDataByCoordSys=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get("showDelay");t=Ss(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},t.prototype._showAxisTooltip=function(e,t){var n=this._ecModel,o=this._tooltipModel,i=[t.offsetX,t.offsetY],r=WZ([t.tooltipOption],o),a=this._renderMode,l=[],s=AS("section",{blocks:[],noHeader:!0}),u=[],c=new WS;ys(e,function(e){ys(e.dataByAxis,function(e){var t=n.getComponent(e.axisDim+"Axis",e.axisIndex),i=e.value;if(t&&null!=i){var r=LW(i,t.axis,n,e.seriesDataIndices,e.valueLabelOpt),d=AS("section",{header:r,noHeader:!Ws(r),sortBlocks:!0,blocks:[]});s.blocks.push(d),ys(e.seriesDataIndices,function(s){var h=n.getSeriesByIndex(s.seriesIndex),p=s.dataIndexInside,f=h.getDataParams(p);if(!(f.dataIndex<0)){f.axisDim=e.axisDim,f.axisIndex=e.axisIndex,f.axisType=e.axisType,f.axisId=e.axisId,f.axisValue=Fk(t.axis,{value:i}),f.axisValueLabel=r,f.marker=c.makeTooltipMarker("item",Z_(f.color),a);var g=Zb(h.formatTooltip(p,!0,null)),v=g.frag;if(v){var m=WZ([h],o).get("valueFormatter");d.blocks.push(m?ps({valueFormatter:m},v):v)}g.text&&u.push(g.text),l.push(f)}})}})}),s.blocks.reverse(),u.reverse();var d=t.position,h=r.get("order"),p=RS(s,c,a,h,n.get("useUTC"),r.get("textStyle"));p&&u.unshift(p);var f="richText"===a?"\n\n":"<br/>",g=u.join(f);this._showOrMove(r,function(){this._updateContentNotChangedOnAxis(e,l)?this._updatePosition(r,d,i[0],i[1],this._tooltipContent,l):this._showTooltipContent(r,g,l,Math.random()+"",i[0],i[1],d,null,c)})},t.prototype._showSeriesItemTooltip=function(e,t,n){var o=this._ecModel,i=Nv(t),r=i.seriesIndex,a=o.getSeriesByIndex(r),l=i.dataModel||a,s=i.dataIndex,u=i.dataType,c=l.getData(u),d=this._renderMode,h=e.positionDefault,p=WZ([c.getItemModel(s),l,a&&(a.coordinateSystem||{}).model],this._tooltipModel,h?{position:h}:null),f=p.get("trigger");if(null==f||"item"===f){var g=l.getDataParams(s,u),v=new WS;g.marker=v.makeTooltipMarker("item",Z_(g.color),d);var m=Zb(l.formatTooltip(s,!1,u)),y=p.get("order"),x=p.get("valueFormatter"),_=m.frag,w=_?RS(x?ps({valueFormatter:x},_):_,v,d,y,o.get("useUTC"),p.get("textStyle")):m.text,b="item_"+l.name+"_"+s;this._showOrMove(p,function(){this._showTooltipContent(p,w,g,b,e.offsetX,e.offsetY,e.position,e.target,v)}),n({type:"showTip",dataIndexInside:s,dataIndex:c.getRawIndex(s),seriesIndex:r,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var o="html"===this._renderMode,i=Nv(t),r=i.tooltipConfig.option||{},a=r.encodeHTMLContent;if(Is(r)){r={content:r,formatter:r},a=!0}a&&o&&r.content&&((r=cs(r)).content=Au(r.content));var l=[r],s=this._ecModel.getComponent(i.componentMainType,i.componentIndex);s&&l.push(s),l.push({formatter:r.content});var u=e.positionDefault,c=WZ(l,this._tooltipModel,u?{position:u}:null),d=c.get("content"),h=Math.random()+"",p=new WS;this._showOrMove(c,function(){var n=cs(c.get("formatterParams")||{});this._showTooltipContent(c,d,n,h,e.offsetX,e.offsetY,e.position,t,p)}),n({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,o,i,r,a,l,s){if(this._ticket="",e.get("showContent")&&e.get("show")){var u=this._tooltipContent;u.setEnterable(e.get("enterable"));var c=e.get("formatter");a=a||e.get("position");var d=t,h=this._getNearestPoint([i,r],n,e.get("trigger"),e.get("borderColor")).color;if(c)if(Is(c)){var p=e.ecModel.get("useUTC"),f=Ms(n)?n[0]:n;d=c,f&&f.axisType&&f.axisType.indexOf("time")>=0&&(d=b_(f.axisValue,d,p)),d=Y_(d,n,!0)}else if(Ts(c)){var g=Ss(function(t,o){t===this._ticket&&(u.setContent(o,s,e,h,a),this._updatePosition(e,a,i,r,u,n,l))},this);this._ticket=o,d=c(n,o,g)}else d=c;u.setContent(d,s,e,h,a),u.show(e,h),this._updatePosition(e,a,i,r,u,n,l)}},t.prototype._getNearestPoint=function(e,t,n,o){return"axis"===n||Ms(t)?{color:o||("html"===this._renderMode?"#fff":"none")}:Ms(t)?void 0:{color:o||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,o,i,r,a){var l=this._api.getWidth(),s=this._api.getHeight();t=t||e.get("position");var u=i.getSize(),c=e.get("align"),d=e.get("verticalAlign"),h=a&&a.getBoundingRect().clone();if(a&&h.applyTransform(a.transform),Ts(t)&&(t=t([n,o],r,i.el,h,{viewSize:[l,s],contentSize:u.slice()})),Ms(t))n=gp(t[0],l),o=gp(t[1],s);else if(Ns(t)){var p=t;p.width=u[0],p.height=u[1];var f=Q_(p,{width:l,height:s});n=f.x,o=f.y,c=null,d=null}else if(Is(t)&&a){var g=function(e,t,n,o){var i=n[0],r=n[1],a=Math.ceil(Math.SQRT2*o)+8,l=0,s=0,u=t.width,c=t.height;switch(e){case"inside":l=t.x+u/2-i/2,s=t.y+c/2-r/2;break;case"top":l=t.x+u/2-i/2,s=t.y-r-a;break;case"bottom":l=t.x+u/2-i/2,s=t.y+c+a;break;case"left":l=t.x-i-a,s=t.y+c/2-r/2;break;case"right":l=t.x+u+a,s=t.y+c/2-r/2}return[l,s]}(t,h,u,e.get("borderWidth"));n=g[0],o=g[1]}else{g=function(e,t,n,o,i,r,a){var l=n.getSize(),s=l[0],u=l[1];null!=r&&(e+s+r+2>o?e-=s+r:e+=r);null!=a&&(t+u+a>i?t-=u+a:t+=a);return[e,t]}(n,o,i,l,s,c?null:20,d?null:20);n=g[0],o=g[1]}if(c&&(n-=YZ(c)?u[0]/2:"right"===c?u[0]:0),d&&(o-=YZ(d)?u[1]/2:"bottom"===d?u[1]:0),TZ(e)){g=function(e,t,n,o,i){var r=n.getSize(),a=r[0],l=r[1];return e=Math.min(e+a,o)-a,t=Math.min(t+l,i)-l,e=Math.max(e,0),t=Math.max(t,0),[e,t]}(n,o,i,l,s);n=g[0],o=g[1]}i.moveTo(n,o)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,o=this._cbParamsList,i=!!n&&n.length===e.length;return i&&ys(n,function(n,r){var a=n.dataByAxis||[],l=(e[r]||{}).dataByAxis||[];(i=i&&a.length===l.length)&&ys(a,function(e,n){var r=l[n]||{},a=e.seriesDataIndices||[],s=r.seriesDataIndices||[];(i=i&&e.value===r.value&&e.axisType===r.axisType&&e.axisId===r.axisId&&a.length===s.length)&&ys(a,function(e,t){var n=s[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}),o&&ys(e.seriesDataIndices,function(e){var n=e.seriesIndex,r=t[n],a=o[n];r&&a&&a.data!==r.data&&(i=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=t,!!i},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,t){!Yl.node&&t.getDom()&&(mC(this,"_updatePosition"),this._tooltipContent.dispose(),$W("itemTooltip",t))},t.type="tooltip",t}(nC);function WZ(e,t,n){var o,i=t.ecModel;n?(o=new Kx(n,i,i),o=new Kx(t.option,o,i)):o=t;for(var r=e.length-1;r>=0;r--){var a=e[r];a&&(a instanceof Kx&&(a=a.get("tooltip",!0)),Is(a)&&(a={formatter:a}),a&&(o=new Kx(a,o,i)))}return o}function UZ(e,t){return e.dispatchAction||Ss(t.dispatchAction,t)}function YZ(e){return"center"===e||"middle"===e}var ZZ=["rect","polygon","keep","clear"];function XZ(e,t){var n=jp(e?e.brush:[]);if(n.length){var o=[];ys(n,function(e){var t=e.hasOwnProperty("toolbox")?e.toolbox:[];t instanceof Array&&(o=o.concat(t))});var i=e&&e.toolbox;Ms(i)&&(i=i[0]),i||(i={feature:{}},e.toolbox=[i]);var r,a,l=i.feature||(i.feature={}),s=l.brush||(l.brush={}),u=s.type||(s.type=[]);u.push.apply(u,o),a={},ys(r=u,function(e){a[e]=1}),r.length=0,ys(a,function(e,t){r.push(t)}),t&&!u.length&&u.push.apply(u,ZZ)}}var jZ=ys;function $Z(e){if(e)for(var t in e)if(e.hasOwnProperty(t))return!0}function qZ(e,t,n){var o={};return jZ(t,function(t){var i,r=o[t]=((i=function(){}).prototype.__hidden=i.prototype,new i);jZ(e[t],function(e,o){if(FP.isValidType(o)){var i={type:o,visual:e};n&&n(i,t),r[o]=new FP(i),"opacity"===o&&((i=cs(i)).type="colorAlpha",r.__hidden.__alphaForOpacity=new FP(i))}})}),o}function KZ(e,t,n){var o;ys(n,function(e){t.hasOwnProperty(e)&&$Z(t[e])&&(o=!0)}),o&&ys(n,function(n){t.hasOwnProperty(n)&&$Z(t[n])?e[n]=cs(t[n]):delete e[n]})}var JZ={lineX:QZ(0),lineY:QZ(1),rect:{point:function(e,t,n){return e&&n.boundingRect.contain(e[0],e[1])},rect:function(e,t,n){return e&&n.boundingRect.intersect(e)}},polygon:{point:function(e,t,n){return e&&n.boundingRect.contain(e[0],e[1])&&Xk(n.range,e[0],e[1])},rect:function(e,t,n){var o=n.range;if(!e||o.length<=1)return!1;var i=e.x,r=e.y,a=e.width,l=e.height,s=o[0];return!!(Xk(o,i,r)||Xk(o,i+a,r)||Xk(o,i,r+l)||Xk(o,i+a,r+l)||cc.create(e).contain(s[0],s[1])||vx(i,r,i+a,r,o)||vx(i,r,i,r+l,o)||vx(i+a,r,i+a,r+l,o)||vx(i,r+l,i+a,r+l,o))||void 0}}};function QZ(e){var t=["x","y"],n=["width","height"];return{point:function(t,n,o){if(t){var i=o.range;return eX(t[e],i)}},rect:function(o,i,r){if(o){var a=r.range,l=[o[t[e]],o[t[e]]+o[n[e]]];return l[1]<l[0]&&l.reverse(),eX(l[0],a)||eX(l[1],a)||eX(a[0],l)||eX(a[1],l)}}}}function eX(e,t){return t[0]<=e&&e<=t[1]}var tX=["inBrush","outOfBrush"],nX="__ecBrushSelect",oX="__ecInBrushSelectEvent";function iX(e){e.eachComponent({mainType:"brush"},function(t){(t.brushTargetManager=new lZ(t.option,e)).setInputRanges(t.areas,e)})}function rX(e,t,n){var o,i,r=[];e.eachComponent({mainType:"brush"},function(e){n&&"takeGlobalCursor"===n.type&&e.setBrushOption("brush"===n.key?n.brushOption:{brushType:!1})}),iX(e),e.eachComponent({mainType:"brush"},function(t,n){var a={brushId:t.id,brushIndex:n,brushName:t.name,areas:cs(t.areas),selected:[]};r.push(a);var l=t.option,s=l.brushLink,u=[],c=[],d=[],h=!1;n||(o=l.throttleType,i=l.throttleDelay);var p=xs(t.areas,function(e){var t=sX[e.brushType],n=fs({boundingRect:t?t(e):void 0},e);return n.selectors=function(e){var t=e.brushType,n={point:function(o){return JZ[t].point(o,n,e)},rect:function(o){return JZ[t].rect(o,n,e)}};return n}(n),n}),f=qZ(t.option,tX,function(e){e.mappingMethod="fixed"});function g(e){return"all"===s||!!u[e]}function v(e){return!!e.length}Ms(s)&&ys(s,function(e){u[e]=1}),e.eachSeries(function(n,o){var i=d[o]=[];"parallel"===n.subType?function(e,t){var n=e.coordinateSystem;h=h||n.hasAxisBrushed(),g(t)&&n.eachActiveState(e.getData(),function(e,t){"active"===e&&(c[t]=1)})}(n,o):function(n,o,i){if(!n.brushSelector||function(e,t){var n=e.option.seriesIndex;return null!=n&&"all"!==n&&(Ms(n)?gs(n,t)<0:t!==n)}(t,o))return;if(ys(p,function(o){t.brushTargetManager.controlSeries(o,n,e)&&i.push(o),h=h||v(i)}),g(o)&&v(i)){var r=n.getData();r.each(function(e){lX(n,i,r,e)&&(c[e]=1)})}}(n,o,i)}),e.eachSeries(function(e,t){var n={seriesId:e.id,seriesIndex:t,seriesName:e.name,dataIndex:[]};a.selected.push(n);var o=d[t],i=e.getData(),r=g(t)?function(e){return c[e]?(n.dataIndex.push(i.getRawIndex(e)),"inBrush"):"outOfBrush"}:function(t){return lX(e,o,i,t)?(n.dataIndex.push(i.getRawIndex(t)),"inBrush"):"outOfBrush"};(g(t)?h:v(o))&&function(e,t,n,o,i){var r,a={};function l(e){return tM(n,r,e)}function s(e,t){oM(n,r,e,t)}ys(e,function(e){var n=FP.prepareVisualTypes(t[e]);a[e]=n}),n.each(function(e,u){r=e;var c=n.getRawDataItem(r);if(!c||!1!==c.visualMap)for(var d=o.call(i,e),h=t[d],p=a[d],f=0,g=p.length;f<g;f++){var v=p[f];h[v]&&h[v].applyVisual(e,l,s)}})}(tX,f,i,r)})}),function(e,t,n,o,i){if(!i)return;var r=e.getZr();if(r[oX])return;r[nX]||(r[nX]=aX);var a=vC(r,nX,n,t);a(e,o)}(t,o,i,r,n)}function aX(e,t){if(!e.isDisposed()){var n=e.getZr();n[oX]=!0,e.dispatchAction({type:"brushSelect",batch:t}),n[oX]=!1}}function lX(e,t,n,o){for(var i=0,r=t.length;i<r;i++){var a=t[i];if(e.brushSelector(o,n,a.selectors,a))return!0}}var sX={rect:function(e){return uX(e.range)},polygon:function(e){for(var t,n=e.range,o=0,i=n.length;o<i;o++){t=t||[[1/0,-1/0],[1/0,-1/0]];var r=n[o];r[0]<t[0][0]&&(t[0][0]=r[0]),r[0]>t[0][1]&&(t[0][1]=r[0]),r[1]<t[1][0]&&(t[1][0]=r[1]),r[1]>t[1][1]&&(t[1][1]=r[1])}return t&&uX(t)}};function uX(e){return new cc(e[0][0],e[1][0],e[0][1]-e[0][0],e[1][1]-e[1][0])}var cX=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.prototype.init=function(e,t){this.ecModel=e,this.api=t,this.model,(this._brushController=new xz(t.getZr())).on("brush",Ss(this._onBrush,this)).mount()},t.prototype.render=function(e,t,n,o){this.model=e,this._updateController(e,t,n,o)},t.prototype.updateTransform=function(e,t,n,o){iX(t),this._updateController(e,t,n,o)},t.prototype.updateVisual=function(e,t,n,o){this.updateTransform(e,t,n,o)},t.prototype.updateView=function(e,t,n,o){this._updateController(e,t,n,o)},t.prototype._updateController=function(e,t,n,o){(!o||o.$from!==e.id)&&this._brushController.setPanels(e.brushTargetManager.makePanelOpts(n)).enableBrush(e.brushOption).updateCovers(e.areas.slice())},t.prototype.dispose=function(){this._brushController.dispose()},t.prototype._onBrush=function(e){var t=this.model.id,n=this.model.brushTargetManager.setOutputRanges(e.areas,this.ecModel);(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:t,areas:cs(n),$from:t}),e.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:t,areas:cs(n),$from:t})},t.type="brush",t}(nC),dX=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.areas=[],n.brushOption={},n}return Wl(t,e),t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&KZ(n,e,["inBrush","outOfBrush"]);var o=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:"#ddd"},o.hasOwnProperty("liftZ")||(o.liftZ=5)},t.prototype.setAreas=function(e){"production"!==process.env.NODE_ENV&&(Hs(Ms(e)),ys(e,function(e){Hs(e.brushType,"Illegal areas")})),e&&(this.areas=xs(e,function(e){return hX(this.option,e)},this))},t.prototype.setBrushOption=function(e){this.brushOption=hX(this.option,e),this.brushType=this.brushOption.brushType},t.type="brush",t.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],t.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},t}(aw);function hX(e,t){return ds({brushType:e.brushType,brushMode:e.brushMode,transformable:e.transformable,brushStyle:new Kx(e.brushStyle).getItemStyle(),removeOnClick:e.removeOnClick,z:e.z},t,!0)}var pX=["rect","polygon","lineX","lineY","keep","clear"],fX=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Wl(t,e),t.prototype.render=function(e,t,n){var o,i,r;t.eachComponent({mainType:"brush"},function(e){o=e.brushType,i=e.brushOption.brushMode||"single",r=r||!!e.areas.length}),this._brushType=o,this._brushMode=i,ys(e.get("type",!0),function(t){e.setIconStatus(t,("keep"===t?"multiple"===i:"clear"===t?r:t===o)?"emphasis":"normal")})},t.prototype.updateView=function(e,t,n){this.render(e,t,n)},t.prototype.getIcons=function(){var e=this.model,t=e.get("icon",!0),n={};return ys(e.get("type",!0),function(e){t[e]&&(n[e]=t[e])}),n},t.prototype.onclick=function(e,t,n){var o=this._brushType,i=this._brushMode;"clear"===n?(t.dispatchAction({type:"axisAreaSelect",intervals:[]}),t.dispatchAction({type:"brush",command:"clear",areas:[]})):t.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===n?o:o!==n&&n,brushMode:"keep"===n?"multiple"===i?"single":"multiple":i}})},t.getDefaultOption=function(e){return{show:!0,type:pX.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:e.getLocaleModel().get(["toolbox","brush","title"])}},t}(BY);var gX=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:"box",ignoreSize:!0},n}return Wl(t,e),t.type="title",t.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},t}(aw),vX=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.prototype.render=function(e,t,n){if(this.group.removeAll(),e.get("show")){var o=this.group,i=e.getModel("textStyle"),r=e.getModel("subtextStyle"),a=e.get("textAlign"),l=Rs(e.get("textBaseline"),e.get("textVerticalAlign")),s=new mv({style:Dx(i,{text:e.get("text"),fill:i.getTextColor()},{disableBox:!0}),z2:10}),u=s.getBoundingRect(),c=e.get("subtext"),d=new mv({style:Dx(r,{text:c,fill:r.getTextColor(),y:u.height+e.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),h=e.get("link"),p=e.get("sublink"),f=e.get("triggerEvent",!0);s.silent=!h&&!f,d.silent=!p&&!f,h&&s.on("click",function(){X_(h,"_"+e.get("target"))}),p&&d.on("click",function(){X_(p,"_"+e.get("subtarget"))}),Nv(s).eventData=Nv(d).eventData=f?{componentType:"title",componentIndex:e.componentIndex}:null,o.add(s),c&&o.add(d);var g=o.getBoundingRect(),v=e.getBoxLayoutParams();v.width=g.width,v.height=g.height;var m=Q_(v,{width:n.getWidth(),height:n.getHeight()},e.get("padding"));a||("middle"===(a=e.get("left")||e.get("right"))&&(a="center"),"right"===a?m.x+=m.width:"center"===a&&(m.x+=m.width/2)),l||("center"===(l=e.get("top")||e.get("bottom"))&&(l="middle"),"bottom"===l?m.y+=m.height:"middle"===l&&(m.y+=m.height/2),l=l||"top"),o.x=m.x,o.y=m.y,o.markRedraw();var y={align:a,verticalAlign:l};s.setStyle(y),d.setStyle(y),g=o.getBoundingRect();var x=m.margin,_=e.getItemStyle(["color","opacity"]);_.fill=e.get("backgroundColor");var w=new fv({shape:{x:g.x-x[3],y:g.y-x[0],width:g.width+x[1]+x[3],height:g.height+x[0]+x[2],r:e.get("borderRadius")},style:_,subPixelOptimize:!0,silent:!0});o.add(w)}},t.type="title",t}(nC);var mX=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode="box",n}return Wl(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),this._initData()},t.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),this._initData()},t.prototype.setCurrentIndex=function(e){null==e&&(e=this.option.currentIndex);var t=this._data.count();this.option.loop?e=(e%t+t)%t:(e>=t&&(e=t-1),e<0&&(e=0)),this.option.currentIndex=e},t.prototype.getCurrentIndex=function(){return this.option.currentIndex},t.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},t.prototype.setPlayState=function(e){this.option.autoPlay=!!e},t.prototype.getPlayState=function(){return!!this.option.autoPlay},t.prototype._initData=function(){var e,t=this.option,n=t.data||[],o=t.axisType,i=this._names=[];"category"===o?(e=[],ys(n,function(t,n){var o,r=nf(Kp(t),"");Ns(t)?(o=cs(t)).value=n:o=n,e.push(o),i.push(r)})):e=n;var r={category:"ordinal",time:"time",value:"number"}[o]||"number";(this._data=new DI([{name:"value",type:r}],this)).initData(e,i)},t.prototype.getData=function(){return this._data},t.prototype.getCategories=function(){if("category"===this.get("axisType"))return this._names.slice()},t.type="timeline",t.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},t}(aw),yX=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.type="timeline.slider",t.defaultOption=e_(mX.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),t}(mX);vs(yX,Yb.prototype);var xX=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.type="timeline",t}(nC),_X=function(e){function t(t,n,o,i){var r=e.call(this,t,n,o)||this;return r.type=i||"value",r}return Wl(t,e),t.prototype.getLabelModel=function(){return this.model.getModel("label")},t.prototype.isHorizontal=function(){return"horizontal"===this.model.get("orient")},t}(vD),wX=Math.PI,bX=uf(),SX=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.prototype.init=function(e,t){this.api=t},t.prototype.render=function(e,t,n){if(this.model=e,this.api=n,this.ecModel=t,this.group.removeAll(),e.get("show",!0)){var o=this._layout(e,n),i=this._createGroup("_mainGroup"),r=this._createGroup("_labelGroup"),a=this._axis=this._createAxis(o,e);e.formatTooltip=function(e){return AS("nameValue",{noName:!0,value:a.scale.getLabel({value:e})})},ys(["AxisLine","AxisTick","Control","CurrentPointer"],function(t){this["_render"+t](o,i,a,e)},this),this._renderAxisLabel(o,r,a,e),this._position(o,e)}this._doPlayStop(),this._updateTicksStatus()},t.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},t.prototype.dispose=function(){this._clearTimer()},t.prototype._layout=function(e,t){var n,o,i,r,a=e.get(["label","position"]),l=e.get("orient"),s=function(e,t){return Q_(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()},e.get("padding"))}(e,t),u={horizontal:"center",vertical:(n=null==a||"auto"===a?"horizontal"===l?s.y+s.height/2<t.getHeight()/2?"-":"+":s.x+s.width/2<t.getWidth()/2?"+":"-":Is(a)?{horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[l][a]:a)>=0||"+"===n?"left":"right"},c={horizontal:n>=0||"+"===n?"top":"bottom",vertical:"middle"},d={horizontal:0,vertical:wX/2},h="vertical"===l?s.height:s.width,p=e.getModel("controlStyle"),f=p.get("show",!0),g=f?p.get("itemSize"):0,v=f?p.get("itemGap"):0,m=g+v,y=e.get(["label","rotate"])||0;y=y*wX/180;var x=p.get("position",!0),_=f&&p.get("showPlayBtn",!0),w=f&&p.get("showPrevBtn",!0),b=f&&p.get("showNextBtn",!0),S=0,C=h;"left"===x||"bottom"===x?(_&&(o=[0,0],S+=m),w&&(i=[S,0],S+=m),b&&(r=[C-g,0],C-=m)):(_&&(o=[C-g,0],C-=m),w&&(i=[0,0],S+=m),b&&(r=[C-g,0],C-=m));var M=[S,C];return e.get("inverse")&&M.reverse(),{viewRect:s,mainLength:h,orient:l,rotation:d[l],labelRotation:y,labelPosOpt:n,labelAlign:e.get(["label","align"])||u[l],labelBaseline:e.get(["label","verticalAlign"])||e.get(["label","baseline"])||c[l],playPosition:o,prevBtnPosition:i,nextBtnPosition:r,axisExtent:M,controlSize:g,controlGap:v}},t.prototype._position=function(e,t){var n=this._mainGroup,o=this._labelGroup,i=e.viewRect;if("vertical"===e.orient){var r=[1,0,0,1,0,0],a=i.x,l=i.y+i.height;Ku(r,r,[-a,-l]),Ju(r,r,-wX/2),Ku(r,r,[a,l]),(i=i.clone()).applyTransform(r)}var s=v(i),u=v(n.getBoundingRect()),c=v(o.getBoundingRect()),d=[n.x,n.y],h=[o.x,o.y];h[0]=d[0]=s[0][0];var p,f=e.labelPosOpt;null==f||Is(f)?(m(d,u,s,1,p="+"===f?0:1),m(h,c,s,1,1-p)):(m(d,u,s,1,p=f>=0?0:1),h[1]=d[1]+f);function g(e){e.originX=s[0][0]-e.x,e.originY=s[1][0]-e.y}function v(e){return[[e.x,e.x+e.width],[e.y,e.y+e.height]]}function m(e,t,n,o,i){e[o]+=n[o][i]-t[o][i]}n.setPosition(d),o.setPosition(h),n.rotation=o.rotation=e.rotation,g(n),g(o)},t.prototype._createAxis=function(e,t){var n=t.getData(),o=t.get("axisType"),i=function(e,t){if(t=t||e.get("type"),t)switch(t){case"category":return new KI({ordinalMeta:e.getCategories(),extent:[1/0,-1/0]});case"time":return new pk({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new QI}}(t,o);i.getTicks=function(){return n.mapArray(["value"],function(e){return{value:e}})};var r=n.getDataExtent("value");i.setExtent(r[0],r[1]),i.calcNiceTicks();var a=new _X("value",i,e.axisExtent,o);return a.model=t,a},t.prototype._createGroup=function(e){var t=this[e]=new lp;return this.group.add(t),t},t.prototype._renderAxisLine=function(e,t,n,o){var i=n.getExtent();if(o.get(["lineStyle","show"])){var r=new by({shape:{x1:i[0],y1:0,x2:i[1],y2:0},style:ps({lineCap:"round"},o.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});t.add(r);var a=this._progressLine=new by({shape:{x1:i[0],x2:this._currentPointer?this._currentPointer.x:i[0],y1:0,y2:0},style:fs({lineCap:"round",lineWidth:r.style.lineWidth},o.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});t.add(a)}},t.prototype._renderAxisTick=function(e,t,n,o){var i=this,r=o.getData(),a=n.scale.getTicks();this._tickSymbols=[],ys(a,function(e){var a=n.dataToCoord(e.value),l=r.getItemModel(e.value),s=l.getModel("itemStyle"),u=l.getModel(["emphasis","itemStyle"]),c=l.getModel(["progress","itemStyle"]),d={x:a,y:0,onclick:Ss(i._changeTimeline,i,e.value)},h=CX(l,s,t,d);h.ensureState("emphasis").style=u.getItemStyle(),h.ensureState("progress").style=c.getItemStyle(),ym(h);var p=Nv(h);l.get("tooltip")?(p.dataIndex=e.value,p.dataModel=o):p.dataIndex=p.dataModel=null,i._tickSymbols.push(h)})},t.prototype._renderAxisLabel=function(e,t,n,o){var i=this;if(n.getLabelModel().get("show")){var r=o.getData(),a=n.getViewLabels();this._tickLabels=[],ys(a,function(o){var a=o.tickValue,l=r.getItemModel(a),s=l.getModel("label"),u=l.getModel(["emphasis","label"]),c=l.getModel(["progress","label"]),d=n.dataToCoord(o.tickValue),h=new mv({x:d,y:0,rotation:e.labelRotation-e.rotation,onclick:Ss(i._changeTimeline,i,a),silent:!1,style:Dx(s,{text:o.formattedLabel,align:e.labelAlign,verticalAlign:e.labelBaseline})});h.ensureState("emphasis").style=Dx(u),h.ensureState("progress").style=Dx(c),t.add(h),ym(h),bX(h).dataIndex=a,i._tickLabels.push(h)})}},t.prototype._renderControl=function(e,t,n,o){var i=e.controlSize,r=e.rotation,a=o.getModel("controlStyle").getItemStyle(),l=o.getModel(["emphasis","controlStyle"]).getItemStyle(),s=o.getPlayState(),u=o.get("inverse",!0);function c(e,n,s,u){if(e){var c=$h(Rs(o.get(["controlStyle",n+"BtnSize"]),i),i),d=function(e,t,n,o){var i=o.style,r=gx(e.get(["controlStyle",t]),o||{},new cc(n[0],n[1],n[2],n[3]));i&&r.setStyle(i);return r}(o,n+"Icon",[0,-c/2,c,c],{x:e[0],y:e[1],originX:i/2,originY:0,rotation:u?-r:0,rectHover:!0,style:a,onclick:s});d.ensureState("emphasis").style=l,t.add(d),ym(d)}}c(e.nextBtnPosition,"next",Ss(this._changeTimeline,this,u?"-":"+")),c(e.prevBtnPosition,"prev",Ss(this._changeTimeline,this,u?"+":"-")),c(e.playPosition,s?"stop":"play",Ss(this._handlePlayClick,this,!s),!0)},t.prototype._renderCurrentPointer=function(e,t,n,o){var i=o.getData(),r=o.getCurrentIndex(),a=i.getItemModel(r).getModel("checkpointStyle"),l=this,s={onCreate:function(e){e.draggable=!0,e.drift=Ss(l._handlePointerDrag,l),e.ondragend=Ss(l._handlePointerDragend,l),MX(e,l._progressLine,r,n,o,!0)},onUpdate:function(e){MX(e,l._progressLine,r,n,o)}};this._currentPointer=CX(a,a,this._mainGroup,{},this._currentPointer,s)},t.prototype._handlePlayClick=function(e){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:e,from:this.uid})},t.prototype._handlePointerDrag=function(e,t,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},t.prototype._handlePointerDragend=function(e){this._pointerChangeTimeline([e.offsetX,e.offsetY],!0)},t.prototype._pointerChangeTimeline=function(e,t){var n=this._toAxisCoord(e)[0],o=mp(this._axis.getExtent().slice());n>o[1]&&(n=o[1]),n<o[0]&&(n=o[0]),this._currentPointer.x=n,this._currentPointer.markRedraw();var i=this._progressLine;i&&(i.shape.x2=n,i.dirty());var r=this._findNearestTick(n),a=this.model;(t||r!==a.getCurrentIndex()&&a.get("realtime"))&&this._changeTimeline(r)},t.prototype._doPlayStop=function(){var e=this;this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(function(){var t=e.model;e._changeTimeline(t.getCurrentIndex()+(t.get("rewind",!0)?-1:1))},this.model.get("playInterval")))},t.prototype._toAxisCoord=function(e){return cx(e,this._mainGroup.getLocalTransform(),!0)},t.prototype._findNearestTick=function(e){var t,n=this.model.getData(),o=1/0,i=this._axis;return n.each(["value"],function(n,r){var a=i.dataToCoord(n),l=Math.abs(a-e);l<o&&(o=l,t=r)}),t},t.prototype._clearTimer=function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},t.prototype._changeTimeline=function(e){var t=this.model.getCurrentIndex();"+"===e?e=t+1:"-"===e&&(e=t-1),this.api.dispatchAction({type:"timelineChange",currentIndex:e,from:this.uid})},t.prototype._updateTicksStatus=function(){var e=this.model.getCurrentIndex(),t=this._tickSymbols,n=this._tickLabels;if(t)for(var o=0;o<t.length;o++)t&&t[o]&&t[o].toggleState("progress",o<e);if(n)for(o=0;o<n.length;o++)n&&n[o]&&n[o].toggleState("progress",bX(n[o]).dataIndex<=e)},t.type="timeline.slider",t}(xX);function CX(e,t,n,o,i,r){var a=t.get("color");i?(i.setColor(a),n.add(i),r&&r.onUpdate(i)):((i=yM(e.get("symbol"),-1,-1,2,2,a)).setStyle("strokeNoScale",!0),n.add(i),r&&r.onCreate(i));var l=t.getItemStyle(["color"]);i.setStyle(l),o=ds({rectHover:!0,z2:100},o,!0);var s=xM(e.get("symbolSize"));o.scaleX=s[0]/2,o.scaleY=s[1]/2;var u=_M(e.get("symbolOffset"),s);u&&(o.x=(o.x||0)+u[0],o.y=(o.y||0)+u[1]);var c=e.get("symbolRotate");return o.rotation=(c||0)*Math.PI/180||0,i.attr(o),i.updateTransform(),i}function MX(e,t,n,o,i,r){if(!e.dragging){var a=i.getModel("checkpointStyle"),l=o.dataToCoord(i.getData().get("value",n));if(r||!a.get("animation",!0))e.attr({x:l,y:0}),t&&t.attr({shape:{x2:l}});else{var s={duration:a.get("animationDuration",!0),easing:a.get("animationEasing",!0)};e.stopAnimation(null,!0),e.animateTo({x:l,y:0},s),t&&t.animateTo({shape:{x2:l}},s)}}}function TX(e){var t=e&&e.timeline;Ms(t)||(t=t?[t]:[]),ys(t,function(e){e&&function(e){var t=e.type,n={number:"value",time:"time"};n[t]&&(e.axisType=n[t],delete e.type);if(IX(e),kX(e,"controlPosition")){var o=e.controlStyle||(e.controlStyle={});kX(o,"position")||(o.position=e.controlPosition),"none"!==o.position||kX(o,"show")||(o.show=!1,delete o.position),delete e.controlPosition}ys(e.data||[],function(e){Ns(e)&&!Ms(e)&&(!kX(e,"value")&&kX(e,"name")&&(e.value=e.name),IX(e))})}(e)})}function IX(e){var t=e.itemStyle||(e.itemStyle={}),n=t.emphasis||(t.emphasis={}),o=e.label||e.label||{},i=o.normal||(o.normal={}),r={normal:1,emphasis:1};ys(o,function(e,t){r[t]||kX(i,t)||(i[t]=e)}),n.label&&!kX(o,"emphasis")&&(o.emphasis=n.label,delete n.label)}function kX(e,t){return e.hasOwnProperty(t)}function DX(e,t){if(!e)return!1;for(var n=Ms(e)?e:[e],o=0;o<n.length;o++)if(n[o]&&n[o][t])return!0;return!1}function NX(e){$p(e,"label",["show"])}var EX=uf(),AX=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.createdBySelf=!1,n}return Wl(t,e),t.prototype.init=function(e,t,n){if("production"!==process.env.NODE_ENV&&"marker"===this.type)throw new Error("Marker component is abstract component. Use markLine, markPoint, markArea instead.");this.mergeDefaultAndTheme(e,n),this._mergeOption(e,n,!1,!0)},t.prototype.isAnimationEnabled=function(){if(Yl.node)return!1;var e=this.__hostSeries;return this.getShallow("animation")&&e&&e.isAnimationEnabled()},t.prototype.mergeOption=function(e,t){this._mergeOption(e,t,!1,!1)},t.prototype._mergeOption=function(e,t,n,o){var i=this.mainType;n||t.eachSeries(function(e){var n=e.get(this.mainType,!0),r=EX(e)[i];n&&n.data?(r?r._mergeOption(n,t,!0):(o&&NX(n),ys(n.data,function(e){e instanceof Array?(NX(e[0]),NX(e[1])):NX(e)}),ps(r=this.createMarkerModelFromSeries(n,this,t),{mainType:this.mainType,seriesIndex:e.seriesIndex,name:e.name,createdBySelf:!0}),r.__hostSeries=e),EX(e)[i]=r):EX(e)[i]=null},this)},t.prototype.formatTooltip=function(e,t,n){var o=this.getData(),i=this.getRawValue(e),r=o.getName(e);return AS("section",{header:this.name,blocks:[AS("nameValue",{name:r,value:i,noName:!r,noValue:null==i})]})},t.prototype.getData=function(){return this._data},t.prototype.setData=function(e){this._data=e},t.prototype.getDataParams=function(e,t){var n=Yb.prototype.getDataParams.call(this,e,t),o=this.__hostSeries;return o&&(n.seriesId=o.id,n.seriesName=o.name,n.seriesType=o.subType),n},t.getMarkerModelFromSeries=function(e,t){return EX(e)[t]},t.type="marker",t.dependencies=["series","grid","polar","geo"],t}(aw);vs(AX,Yb.prototype);var LX=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.prototype.createMarkerModelFromSeries=function(e,n,o){return new t(e,n,o)},t.type="markPoint",t.defaultOption={z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},t}(AX);function VX(e){return!(isNaN(parseFloat(e.x))&&isNaN(parseFloat(e.y)))}function OX(e,t,n,o,i,r){var a=[],l=PI(t,o)?t.getCalculationInfo("stackResultDimension"):o,s=GX(t,l,e),u=t.indicesOfNearest(l,s)[0];a[i]=t.get(n,u),a[r]=t.get(l,u);var c=t.get(o,u),d=yp(t.get(o,u));return(d=Math.min(d,20))>=0&&(a[r]=+a[r].toFixed(d)),[a,c]}var PX={min:Cs(OX,"min"),max:Cs(OX,"max"),average:Cs(OX,"average"),median:Cs(OX,"median")};function BX(e,t){if(t){var n=e.getData(),o=e.coordinateSystem,i=o&&o.dimensions;if(!function(e){return!isNaN(parseFloat(e.x))&&!isNaN(parseFloat(e.y))}(t)&&!Ms(t.coord)&&Ms(i)){var r=RX(t,n,o,e);if((t=cs(t)).type&&PX[t.type]&&r.baseAxis&&r.valueAxis){var a=gs(i,r.baseAxis.dim),l=gs(i,r.valueAxis.dim),s=PX[t.type](n,r.baseDataDim,r.valueDataDim,a,l);t.coord=s[0],t.value=s[1]}else t.coord=[null!=t.xAxis?t.xAxis:t.radiusAxis,null!=t.yAxis?t.yAxis:t.angleAxis]}if(null!=t.coord&&Ms(i))for(var u=t.coord,c=0;c<2;c++)PX[u[c]]&&(u[c]=GX(n,n.mapDimension(i[c]),u[c]));else t.coord=[];return t}}function RX(e,t,n,o){var i={};return null!=e.valueIndex||null!=e.valueDim?(i.valueDataDim=null!=e.valueIndex?t.getDimension(e.valueIndex):e.valueDim,i.valueAxis=n.getAxis(function(e,t){var n=e.getData().getDimensionInfo(t);return n&&n.coordDim}(o,i.valueDataDim)),i.baseAxis=n.getOtherAxis(i.valueAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim)):(i.baseAxis=o.getBaseAxis(),i.valueAxis=n.getOtherAxis(i.baseAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim),i.valueDataDim=t.mapDimension(i.valueAxis.dim)),i}function zX(e,t){return!(e&&e.containData&&t.coord&&!VX(t))||e.containData(t.coord)}function FX(e,t){return e?function(e,n,o,i){return qb(i<2?e.coord&&e.coord[i]:e.value,t[i])}:function(e,n,o,i){return qb(e.value,t[i])}}function GX(e,t,n){if("average"===n){var o=0,i=0;return e.each(t,function(e,t){isNaN(e)||(o+=e,i++)}),o/i}return"median"===n?e.getMedian(t):e.getDataExtent(t)["max"===n?1:0]}var HX=uf(),WX=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.prototype.init=function(){this.markerGroupMap=qs()},t.prototype.render=function(e,t,n){var o=this,i=this.markerGroupMap;i.each(function(e){HX(e).keep=!1}),t.eachSeries(function(e){var i=AX.getMarkerModelFromSeries(e,o.type);i&&o.renderSeries(e,i,t,n)}),i.each(function(e){!HX(e).keep&&o.group.remove(e.group)})},t.prototype.markKeep=function(e){HX(e).keep=!0},t.prototype.toggleBlurSeries=function(e,t){var n=this;ys(e,function(e){var o=AX.getMarkerModelFromSeries(e,n.type);o&&o.getData().eachItemGraphicEl(function(e){e&&(t?lm(e):sm(e))})})},t.type="marker",t}(nC);function UX(e,t,n){var o=t.coordinateSystem;e.each(function(i){var r,a=e.getItemModel(i),l=gp(a.get("x"),n.getWidth()),s=gp(a.get("y"),n.getHeight());if(isNaN(l)||isNaN(s)){if(t.getMarkerPosition)r=t.getMarkerPosition(e.getValues(e.dimensions,i));else if(o){var u=e.get(o.dimensions[0],i),c=e.get(o.dimensions[1],i);r=o.dataToPoint([u,c])}}else r=[l,s];isNaN(l)||(r[0]=l),isNaN(s)||(r[1]=s),e.setItemLayout(i,r)})}var YX=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=AX.getMarkerModelFromSeries(e,"markPoint");t&&(UX(t.getData(),e,n),this.markerGroupMap.get(e.id).updateLayout())},this)},t.prototype.renderSeries=function(e,t,n,o){var i=e.coordinateSystem,r=e.id,a=e.getData(),l=this.markerGroupMap,s=l.get(r)||l.set(r,new DE),u=function(e,t,n){var o;o=e?xs(e&&e.dimensions,function(e){return ps(ps({},t.getData().getDimensionInfo(t.getData().mapDimension(e))||{}),{name:e,ordinalMeta:null})}):[{name:"value",type:"float"}];var i=new DI(o,n),r=xs(n.get("data"),Cs(BX,t));e&&(r=ws(r,Cs(zX,e)));var a=FX(!!e,o);return i.initData(r,null,a),i}(i,e,t);t.setData(u),UX(t.getData(),e,o),u.each(function(e){var n=u.getItemModel(e),o=n.getShallow("symbol"),i=n.getShallow("symbolSize"),r=n.getShallow("symbolRotate"),l=n.getShallow("symbolOffset"),s=n.getShallow("symbolKeepAspect");if(Ts(o)||Ts(i)||Ts(r)||Ts(l)){var c=t.getRawValue(e),d=t.getDataParams(e);Ts(o)&&(o=o(c,d)),Ts(i)&&(i=i(c,d)),Ts(r)&&(r=r(c,d)),Ts(l)&&(l=l(c,d))}var h=n.getModel("itemStyle").getItemStyle(),p=nM(a,"color");h.fill||(h.fill=p),u.setItemVisual(e,{symbol:o,symbolSize:i,symbolRotate:r,symbolOffset:l,symbolKeepAspect:s,style:h})}),s.updateData(u),this.group.add(s.group),u.eachItemGraphicEl(function(e){e.traverse(function(e){Nv(e).dataModel=t})}),this.markKeep(s),s.group.silent=t.get("silent")||e.get("silent")},t.type="markPoint",t}(WX);var ZX=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.prototype.createMarkerModelFromSeries=function(e,n,o){return new t(e,n,o)},t.type="markLine",t.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},t}(AX),XX=uf(),jX=function(e,t,n,o){var i,r=e.getData();if(Ms(o))i=o;else{var a=o.type;if("min"===a||"max"===a||"average"===a||"median"===a||null!=o.xAxis||null!=o.yAxis){var l=void 0,s=void 0;if(null!=o.yAxis||null!=o.xAxis)l=t.getAxis(null!=o.yAxis?"y":"x"),s=Bs(o.yAxis,o.xAxis);else{var u=RX(o,r,t,e);l=u.valueAxis,s=GX(r,BI(r,u.valueDataDim),a)}var c="x"===l.dim?0:1,d=1-c,h=cs(o),p={coord:[]};h.type=null,h.coord=[],h.coord[d]=-1/0,p.coord[d]=1/0;var f=n.get("precision");f>=0&&Ds(s)&&(s=+s.toFixed(Math.min(f,20))),h.coord[c]=p.coord[c]=s,i=[h,p,{type:a,valueIndex:o.valueIndex,value:s}]}else"production"!==process.env.NODE_ENV&&us("Invalid markLine data."),i=[]}var g=[BX(e,i[0]),BX(e,i[1]),ps({},i[2])];return g[2].type=g[2].type||null,ds(g[2],g[0]),ds(g[2],g[1]),g};function $X(e){return!isNaN(e)&&!isFinite(e)}function qX(e,t,n,o){var i=1-e,r=o.dimensions[e];return $X(t[i])&&$X(n[i])&&t[e]===n[e]&&o.getAxis(r).containData(t[e])}function KX(e,t){if("cartesian2d"===e.type){var n=t[0].coord,o=t[1].coord;if(n&&o&&(qX(1,n,o,e)||qX(0,n,o,e)))return!0}return zX(e,t[0])&&zX(e,t[1])}function JX(e,t,n,o,i){var r,a=o.coordinateSystem,l=e.getItemModel(t),s=gp(l.get("x"),i.getWidth()),u=gp(l.get("y"),i.getHeight());if(isNaN(s)||isNaN(u)){if(o.getMarkerPosition)r=o.getMarkerPosition(e.getValues(e.dimensions,t));else{var c=a.dimensions,d=e.get(c[0],t),h=e.get(c[1],t);r=a.dataToPoint([d,h])}if(WE(a,"cartesian2d")){var p=a.getAxis("x"),f=a.getAxis("y");c=a.dimensions;$X(e.get(c[0],t))?r[0]=p.toGlobalCoord(p.getExtent()[n?0:1]):$X(e.get(c[1],t))&&(r[1]=f.toGlobalCoord(f.getExtent()[n?0:1]))}isNaN(s)||(r[0]=s),isNaN(u)||(r[1]=u)}else r=[s,u];e.setItemLayout(t,r)}var QX=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=AX.getMarkerModelFromSeries(e,"markLine");if(t){var o=t.getData(),i=XX(t).from,r=XX(t).to;i.each(function(t){JX(i,t,!0,e,n),JX(r,t,!1,e,n)}),o.each(function(e){o.setItemLayout(e,[i.getItemLayout(e),r.getItemLayout(e)])}),this.markerGroupMap.get(e.id).updateLayout()}},this)},t.prototype.renderSeries=function(e,t,n,o){var i=e.coordinateSystem,r=e.id,a=e.getData(),l=this.markerGroupMap,s=l.get(r)||l.set(r,new eR);this.group.add(s.group);var u=function(e,t,n){var o;o=e?xs(e&&e.dimensions,function(e){return ps(ps({},t.getData().getDimensionInfo(t.getData().mapDimension(e))||{}),{name:e,ordinalMeta:null})}):[{name:"value",type:"float"}];var i=new DI(o,n),r=new DI(o,n),a=new DI([],n),l=xs(n.get("data"),Cs(jX,t,e,n));e&&(l=ws(l,Cs(KX,e)));var s=FX(!!e,o);return i.initData(xs(l,function(e){return e[0]}),null,s),r.initData(xs(l,function(e){return e[1]}),null,s),a.initData(xs(l,function(e){return e[2]})),a.hasItemOption=!0,{from:i,to:r,line:a}}(i,e,t),c=u.from,d=u.to,h=u.line;XX(t).from=c,XX(t).to=d,t.setData(h);var p=t.get("symbol"),f=t.get("symbolSize"),g=t.get("symbolRotate"),v=t.get("symbolOffset");function m(t,n,i){var r=t.getItemModel(n);JX(t,n,i,e,o);var l=r.getModel("itemStyle").getItemStyle();null==l.fill&&(l.fill=nM(a,"color")),t.setItemVisual(n,{symbolKeepAspect:r.get("symbolKeepAspect"),symbolOffset:Rs(r.get("symbolOffset",!0),v[i?0:1]),symbolRotate:Rs(r.get("symbolRotate",!0),g[i?0:1]),symbolSize:Rs(r.get("symbolSize"),f[i?0:1]),symbol:Rs(r.get("symbol",!0),p[i?0:1]),style:l})}Ms(p)||(p=[p,p]),Ms(f)||(f=[f,f]),Ms(g)||(g=[g,g]),Ms(v)||(v=[v,v]),u.from.each(function(e){m(c,e,!0),m(d,e,!1)}),h.each(function(e){var t=h.getItemModel(e).getModel("lineStyle").getLineStyle();h.setItemLayout(e,[c.getItemLayout(e),d.getItemLayout(e)]),null==t.stroke&&(t.stroke=c.getItemVisual(e,"style").fill),h.setItemVisual(e,{fromSymbolKeepAspect:c.getItemVisual(e,"symbolKeepAspect"),fromSymbolOffset:c.getItemVisual(e,"symbolOffset"),fromSymbolRotate:c.getItemVisual(e,"symbolRotate"),fromSymbolSize:c.getItemVisual(e,"symbolSize"),fromSymbol:c.getItemVisual(e,"symbol"),toSymbolKeepAspect:d.getItemVisual(e,"symbolKeepAspect"),toSymbolOffset:d.getItemVisual(e,"symbolOffset"),toSymbolRotate:d.getItemVisual(e,"symbolRotate"),toSymbolSize:d.getItemVisual(e,"symbolSize"),toSymbol:d.getItemVisual(e,"symbol"),style:t})}),s.updateData(h),u.line.eachItemGraphicEl(function(e){Nv(e).dataModel=t,e.traverse(function(e){Nv(e).dataModel=t})}),this.markKeep(s),s.group.silent=t.get("silent")||e.get("silent")},t.type="markLine",t}(WX);var ej=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.prototype.createMarkerModelFromSeries=function(e,n,o){return new t(e,n,o)},t.type="markArea",t.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},t}(AX),tj=uf(),nj=function(e,t,n,o){var i=o[0],r=o[1];if(i&&r){var a=BX(e,i),l=BX(e,r),s=a.coord,u=l.coord;s[0]=Bs(s[0],-1/0),s[1]=Bs(s[1],-1/0),u[0]=Bs(u[0],1/0),u[1]=Bs(u[1],1/0);var c=hs([{},a,l]);return c.coord=[a.coord,l.coord],c.x0=a.x,c.y0=a.y,c.x1=l.x,c.y1=l.y,c}};function oj(e){return!isNaN(e)&&!isFinite(e)}function ij(e,t,n,o){var i=1-e;return oj(t[i])&&oj(n[i])}function rj(e,t){var n=t.coord[0],o=t.coord[1],i={coord:n,x:t.x0,y:t.y0},r={coord:o,x:t.x1,y:t.y1};return WE(e,"cartesian2d")?!(!n||!o||!ij(1,n,o)&&!ij(0,n,o))||function(e,t,n){return!(e&&e.containZone&&t.coord&&n.coord&&!VX(t)&&!VX(n))||e.containZone(t.coord,n.coord)}(e,i,r):zX(e,i)||zX(e,r)}function aj(e,t,n,o,i){var r,a=o.coordinateSystem,l=e.getItemModel(t),s=gp(l.get(n[0]),i.getWidth()),u=gp(l.get(n[1]),i.getHeight());if(isNaN(s)||isNaN(u)){if(o.getMarkerPosition){var c=e.getValues(["x0","y0"],t),d=e.getValues(["x1","y1"],t),h=a.clampData(c),p=a.clampData(d),f=[];"x0"===n[0]?f[0]=h[0]>p[0]?d[0]:c[0]:f[0]=h[0]>p[0]?c[0]:d[0],"y0"===n[1]?f[1]=h[1]>p[1]?d[1]:c[1]:f[1]=h[1]>p[1]?c[1]:d[1],r=o.getMarkerPosition(f,n,!0)}else{var g=[y=e.get(n[0],t),x=e.get(n[1],t)];a.clampData&&a.clampData(g,g),r=a.dataToPoint(g,!0)}if(WE(a,"cartesian2d")){var v=a.getAxis("x"),m=a.getAxis("y"),y=e.get(n[0],t),x=e.get(n[1],t);oj(y)?r[0]=v.toGlobalCoord(v.getExtent()["x0"===n[0]?0:1]):oj(x)&&(r[1]=m.toGlobalCoord(m.getExtent()["y0"===n[1]?0:1]))}isNaN(s)||(r[0]=s),isNaN(u)||(r[1]=u)}else r=[s,u];return r}var lj=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],sj=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=AX.getMarkerModelFromSeries(e,"markArea");if(t){var o=t.getData();o.each(function(t){var i=xs(lj,function(i){return aj(o,t,i,e,n)});o.setItemLayout(t,i),o.getItemGraphicEl(t).setShape("points",i)})}},this)},t.prototype.renderSeries=function(e,t,n,o){var i=e.coordinateSystem,r=e.id,a=e.getData(),l=this.markerGroupMap,s=l.get(r)||l.set(r,{group:new lp});this.group.add(s.group),this.markKeep(s);var u=function(e,t,n){var o,i,r=["x0","y0","x1","y1"];if(e){var a=xs(e&&e.dimensions,function(e){var n=t.getData();return ps(ps({},n.getDimensionInfo(n.mapDimension(e))||{}),{name:e,ordinalMeta:null})});i=xs(r,function(e,t){return{name:e,type:a[t%2].type}}),o=new DI(i,n)}else o=new DI(i=[{name:"value",type:"float"}],n);var l=xs(n.get("data"),Cs(nj,t,e,n));e&&(l=ws(l,Cs(rj,e)));var s=e?function(e,t,n,o){return qb(e.coord[Math.floor(o/2)][o%2],i[o])}:function(e,t,n,o){return qb(e.value,i[o])};return o.initData(l,null,s),o.hasItemOption=!0,o}(i,e,t);t.setData(u),u.each(function(t){var n=xs(lj,function(n){return aj(u,t,n,e,o)}),r=i.getAxis("x").scale,l=i.getAxis("y").scale,s=r.getExtent(),c=l.getExtent(),d=[r.parse(u.get("x0",t)),r.parse(u.get("x1",t))],h=[l.parse(u.get("y0",t)),l.parse(u.get("y1",t))];mp(d),mp(h);var p=!!(s[0]>d[1]||s[1]<d[0]||c[0]>h[1]||c[1]<h[0]);u.setItemLayout(t,{points:n,allClipped:p});var f=u.getItemModel(t).getModel("itemStyle").getItemStyle(),g=nM(a,"color");f.fill||(f.fill=g,Is(f.fill)&&(f.fill=Td(f.fill,.4))),f.stroke||(f.stroke=g),u.setItemVisual(t,"style",f)}),u.diff(tj(s).data).add(function(e){var t=u.getItemLayout(e);if(!t.allClipped){var n=new my({shape:{points:t.points}});u.setItemGraphicEl(e,n),s.group.add(n)}}).update(function(e,n){var o=tj(s).data.getItemGraphicEl(n),i=u.getItemLayout(e);i.allClipped?o&&s.group.remove(o):(o?Wy(o,{shape:{points:i.points}},t,e):o=new my({shape:{points:i.points}}),u.setItemGraphicEl(e,o),s.group.add(o))}).remove(function(e){var t=tj(s).data.getItemGraphicEl(e);s.group.remove(t)}).execute(),u.eachItemGraphicEl(function(e,n){var o=u.getItemModel(n),i=u.getItemVisual(n,"style");e.useStyle(u.getItemVisual(n,"style")),Ix(e,kx(o),{labelFetcher:t,labelDataIndex:n,defaultText:u.getName(n)||"",inheritColor:Is(i.fill)?Td(i.fill,1):"#000"}),Sm(e,o),xm(e,null,null,o.get(["emphasis","disabled"])),Nv(e).dataModel=t}),tj(s).data=u,s.group.silent=t.get("silent")||e.get("silent")},t.type="markArea",t}(WX);var uj=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:"box",ignoreSize:!0},n}return Wl(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},t.prototype._updateSelector=function(e){var t=e.selector,n=this.ecModel;!0===t&&(t=e.selector=["all","inverse"]),Ms(t)&&ys(t,function(e,o){Is(e)&&(e={type:e}),t[o]=ds(e,function(e,t){return"all"===t?{type:"all",title:e.getLocaleModel().get(["legend","selector","all"])}:"inverse"===t?{type:"inverse",title:e.getLocaleModel().get(["legend","selector","inverse"])}:void 0}(n,e.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&"single"===this.get("selectedMode")){for(var t=!1,n=0;n<e.length;n++){var o=e[n].get("name");if(this.isSelected(o)){this.select(o),t=!0;break}}!t&&this.select(e[0].get("name"))}},t.prototype._updateData=function(e){var t=[],n=[];e.eachRawSeries(function(o){var i,r=o.name;if(n.push(r),o.legendVisualProvider){var a=o.legendVisualProvider.getAllNames();e.isSeriesFiltered(o)||(n=n.concat(a)),a.length?t=t.concat(a):i=!0}else i=!0;i&&af(o)&&t.push(o.name)}),this._availableNames=n;var o=this.get("data")||t,i=qs(),r=xs(o,function(e){return(Is(e)||Ds(e))&&(e={name:e}),i.get(e.name)?null:(i.set(e.name,!0),new Kx(e,this,this.ecModel))},this);this._data=ws(r,function(e){return!!e})},t.prototype.getData=function(){return this._data},t.prototype.select=function(e){var t=this.option.selected;"single"===this.get("selectedMode")&&ys(this._data,function(e){t[e.get("name")]=!1});t[e]=!0},t.prototype.unSelect=function(e){"single"!==this.get("selectedMode")&&(this.option.selected[e]=!1)},t.prototype.toggleSelected=function(e){var t=this.option.selected;t.hasOwnProperty(e)||(t[e]=!0),this[t[e]?"unSelect":"select"](e)},t.prototype.allSelect=function(){var e=this._data,t=this.option.selected;ys(e,function(e){t[e.get("name",!0)]=!0})},t.prototype.inverseSelect=function(){var e=this._data,t=this.option.selected;ys(e,function(e){var n=e.get("name",!0);t.hasOwnProperty(n)||(t[n]=!0),t[n]=!t[n]})},t.prototype.isSelected=function(e){var t=this.option.selected;return!(t.hasOwnProperty(e)&&!t[e])&&gs(this._availableNames,e)>=0},t.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},t}(aw),cj=Cs,dj=ys,hj=lp,pj=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return Wl(t,e),t.prototype.init=function(){this.group.add(this._contentGroup=new hj),this.group.add(this._selectorGroup=new hj),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,t,n){var o=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get("show",!0)){var i=e.get("align"),r=e.get("orient");i&&"auto"!==i||(i="right"===e.get("left")&&"vertical"===r?"right":"left");var a=e.get("selector",!0),l=e.get("selectorPosition",!0);!a||l&&"auto"!==l||(l="horizontal"===r?"end":"start"),this.renderInner(i,e,t,n,a,r,l);var s=e.getBoxLayoutParams(),u={width:n.getWidth(),height:n.getHeight()},c=e.get("padding"),d=Q_(s,u,c),h=this.layoutInner(e,i,d,o,a,l),p=Q_(fs({width:h.width,height:h.height},s),u,c);this.group.x=p.x-h.x,this.group.y=p.y-h.y,this.group.markRedraw(),this.group.add(this._backgroundEl=HY(h,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,t,n,o,i,r,a){var l=this.getContentGroup(),s=qs(),u=t.get("selectedMode"),c=[];n.eachRawSeries(function(e){!e.get("legendHoverLink")&&c.push(e.id)}),dj(t.getData(),function(i,r){var a=i.get("name");if(!this.newlineDisabled&&(""===a||"\n"===a)){var d=new hj;return d.newline=!0,void l.add(d)}var h=n.getSeriesByName(a)[0];if(!s.get(a)){if(h){var p=h.getData(),f=p.getVisual("legendLineStyle")||{},g=p.getVisual("legendIcon"),v=p.getVisual("style"),m=this._createItem(h,a,r,i,t,e,f,v,g,u,o);m.on("click",cj(fj,a,null,o,c)).on("mouseover",cj(vj,h.name,null,o,c)).on("mouseout",cj(mj,h.name,null,o,c)),n.ssr&&m.eachChild(function(e){var t=Nv(e);t.seriesIndex=h.seriesIndex,t.dataIndex=r,t.ssrType="legend"}),s.set(a,!0)}else n.eachRawSeries(function(l){if(!s.get(a)&&l.legendVisualProvider){var d=l.legendVisualProvider;if(!d.containName(a))return;var h=d.indexOfName(a),p=d.getItemVisual(h,"style"),f=d.getItemVisual(h,"legendIcon"),g=wd(p.fill);g&&0===g[3]&&(g[3]=.2,p=ps(ps({},p),{fill:Id(g,"rgba")}));var v=this._createItem(l,a,r,i,t,e,{},p,f,u,o);v.on("click",cj(fj,null,a,o,c)).on("mouseover",cj(vj,null,a,o,c)).on("mouseout",cj(mj,null,a,o,c)),n.ssr&&v.eachChild(function(e){var t=Nv(e);t.seriesIndex=l.seriesIndex,t.dataIndex=r,t.ssrType="legend"}),s.set(a,!0)}},this);"production"!==process.env.NODE_ENV&&s.get(a)}},this),i&&this._createSelector(i,t,o,r,a)},t.prototype._createSelector=function(e,t,n,o,i){var r=this.getSelectorGroup();dj(e,function(e){var o=e.type,i=new mv({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:"all"===o?"legendAllSelect":"legendInverseSelect",legendId:t.id})}});r.add(i),Ix(i,{normal:t.getModel("selectorLabel"),emphasis:t.getModel(["emphasis","selectorLabel"])},{defaultText:e.title}),ym(i)})},t.prototype._createItem=function(e,t,n,o,i,r,a,l,s,u,c){var d=e.visualDrawType,h=i.get("itemWidth"),p=i.get("itemHeight"),f=i.isSelected(t),g=o.get("symbolRotate"),v=o.get("symbolKeepAspect"),m=o.get("icon"),y=function(e,t,n,o,i,r,a){function l(e,t){"auto"===e.lineWidth&&(e.lineWidth=t.lineWidth>0?2:0),dj(e,function(n,o){"inherit"===e[o]&&(e[o]=t[o])})}var s=t.getModel("itemStyle"),u=s.getItemStyle(),c=0===e.lastIndexOf("empty",0)?"fill":"stroke",d=s.getShallow("decal");u.decal=d&&"inherit"!==d?YM(d,a):o.decal,"inherit"===u.fill&&(u.fill=o[i]);"inherit"===u.stroke&&(u.stroke=o[c]);"inherit"===u.opacity&&(u.opacity=("fill"===i?o:n).opacity);l(u,o);var h=t.getModel("lineStyle"),p=h.getLineStyle();if(l(p,n),"auto"===u.fill&&(u.fill=o.fill),"auto"===u.stroke&&(u.stroke=o.fill),"auto"===p.stroke&&(p.stroke=o.fill),!r){var f=t.get("inactiveBorderWidth"),g=u[c];u.lineWidth="auto"===f?o.lineWidth>0&&g?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),p.stroke=h.get("inactiveColor"),p.lineWidth=h.get("inactiveWidth")}return{itemStyle:u,lineStyle:p}}(s=m||s||"roundRect",o,a,l,d,f,c),x=new hj,_=o.getModel("textStyle");if(!Ts(e.getLegendIcon)||m&&"inherit"!==m){var w="inherit"===m&&e.getData().getVisual("symbol")?"inherit"===g?e.getData().getVisual("symbolRotate"):g:0;x.add(function(e){var t=e.icon||"roundRect",n=yM(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2);return n}({itemWidth:h,itemHeight:p,icon:s,iconRotate:w,itemStyle:y.itemStyle,symbolKeepAspect:v}))}else x.add(e.getLegendIcon({itemWidth:h,itemHeight:p,icon:s,iconRotate:g,itemStyle:y.itemStyle,lineStyle:y.lineStyle,symbolKeepAspect:v}));var b="left"===r?h+5:-5,S=r,C=i.get("formatter"),M=t;Is(C)&&C?M=C.replace("{name}",null!=t?t:""):Ts(C)&&(M=C(t));var T=f?_.getTextColor():o.get("inactiveColor");x.add(new mv({style:Dx(_,{text:M,x:b,y:p/2,fill:T,align:S,verticalAlign:"middle"},{inheritColor:T})}));var I=new fv({shape:x.getBoundingRect(),style:{fill:"transparent"}}),k=o.getModel("tooltip");return k.get("show")&&xx({el:I,componentModel:i,itemName:t,itemTooltipOption:k.option}),x.add(I),x.eachChild(function(e){e.silent=!0}),I.silent=!u,this.getContentGroup().add(x),ym(x),x.__legendDataIndex=n,x},t.prototype.layoutInner=function(e,t,n,o,i,r){var a=this.getContentGroup(),l=this.getSelectorGroup();J_(e.get("orient"),a,e.get("itemGap"),n.width,n.height);var s=a.getBoundingRect(),u=[-s.x,-s.y];if(l.markRedraw(),a.markRedraw(),i){J_("horizontal",l,e.get("selectorItemGap",!0));var c=l.getBoundingRect(),d=[-c.x,-c.y],h=e.get("selectorButtonGap",!0),p=e.getOrient().index,f=0===p?"width":"height",g=0===p?"height":"width",v=0===p?"y":"x";"end"===r?d[p]+=s[f]+h:u[p]+=c[f]+h,d[1-p]+=s[g]/2-c[g]/2,l.x=d[0],l.y=d[1],a.x=u[0],a.y=u[1];var m={x:0,y:0};return m[f]=s[f]+h+c[f],m[g]=Math.max(s[g],c[g]),m[v]=Math.min(0,c[v]+d[1-p]),m}return a.x=u[0],a.y=u[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(nC);function fj(e,t,n,o){mj(e,t,n,o),n.dispatchAction({type:"legendToggleSelect",name:null!=e?e:t}),vj(e,t,n,o)}function gj(e){for(var t,n=e.getZr().storage.getDisplayList(),o=0,i=n.length;o<i&&!(t=n[o].states.emphasis);)o++;return t&&t.hoverLayer}function vj(e,t,n,o){gj(n)||n.dispatchAction({type:"highlight",seriesName:e,name:t,excludeSeriesId:o})}function mj(e,t,n,o){gj(n)||n.dispatchAction({type:"downplay",seriesName:e,name:t,excludeSeriesId:o})}function yj(e){var t=e.findComponents({mainType:"legend"});t&&t.length&&e.filterSeries(function(e){for(var n=0;n<t.length;n++)if(!t[n].isSelected(e.name))return!1;return!0})}function xj(e,t,n){var o="allSelect"===e||"inverseSelect"===e,i={},r=[];n.eachComponent({mainType:"legend",query:t},function(n){o?n[e]():n[e](t.name),_j(n,i),r.push(n.componentIndex)});var a={};return n.eachComponent("legend",function(e){ys(i,function(t,n){e[t?"select":"unSelect"](n)}),_j(e,a)}),o?{selected:a,legendIndex:r}:{name:t.name,selected:a}}function _j(e,t){var n=t||{};return ys(e.getData(),function(t){var o=t.get("name");if("\n"!==o&&""!==o){var i=e.isSelected(o);eu(n,o)?n[o]=n[o]&&i:n[o]=i}}),n}function wj(e){e.registerComponentModel(uj),e.registerComponentView(pj),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,yj),e.registerSubTypeDefaulter("legend",function(){return"plain"}),function(e){e.registerAction("legendToggleSelect","legendselectchanged",Cs(xj,"toggleSelected")),e.registerAction("legendAllSelect","legendselectall",Cs(xj,"allSelect")),e.registerAction("legendInverseSelect","legendinverseselect",Cs(xj,"inverseSelect")),e.registerAction("legendSelect","legendselected",Cs(xj,"select")),e.registerAction("legendUnSelect","legendunselected",Cs(xj,"unSelect"))}(e)}var bj=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},t.prototype.init=function(t,n,o){var i=ow(t);e.prototype.init.call(this,t,n,o),Sj(this,t,i)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),Sj(this,this.option,t)},t.type="legend.scroll",t.defaultOption=e_(uj.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800}),t}(uj);function Sj(e,t,n){var o=[1,1];o[e.getOrient().index]=0,nw(t,n,{type:"box",ignoreSize:!!o})}var Cj=lp,Mj=["width","height"],Tj=["x","y"],Ij=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!0,n._currentIndex=0,n}return Wl(t,e),t.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new Cj),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new Cj)},t.prototype.resetInner=function(){e.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(t,n,o,i,r,a,l){var s=this;e.prototype.renderInner.call(this,t,n,o,i,r,a,l);var u=this._controllerGroup,c=n.get("pageIconSize",!0),d=Ms(c)?c:[c,c];p("pagePrev",0);var h=n.getModel("pageTextStyle");function p(e,t){var o=e+"DataIndex",r=gx(n.get("pageIcons",!0)[n.getOrient().name][t],{onclick:Ss(s._pageGo,s,o,n,i)},{x:-d[0]/2,y:-d[1]/2,width:d[0],height:d[1]});r.name=e,u.add(r)}u.add(new mv({name:"pageText",style:{text:"xx/xx",fill:h.getTextColor(),font:h.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),p("pageNext",1)},t.prototype.layoutInner=function(e,t,n,o,i,r){var a=this.getSelectorGroup(),l=e.getOrient().index,s=Mj[l],u=Tj[l],c=Mj[1-l],d=Tj[1-l];i&&J_("horizontal",a,e.get("selectorItemGap",!0));var h=e.get("selectorButtonGap",!0),p=a.getBoundingRect(),f=[-p.x,-p.y],g=cs(n);i&&(g[s]=n[s]-p[s]-h);var v=this._layoutContentAndController(e,o,g,l,s,c,d,u);if(i){if("end"===r)f[l]+=v[s]+h;else{var m=p[s]+h;f[l]-=m,v[u]-=m}v[s]+=p[s]+h,f[1-l]+=v[d]+v[c]/2-p[c]/2,v[c]=Math.max(v[c],p[c]),v[d]=Math.min(v[d],p[d]+f[1-l]),a.x=f[0],a.y=f[1],a.markRedraw()}return v},t.prototype._layoutContentAndController=function(e,t,n,o,i,r,a,l){var s=this.getContentGroup(),u=this._containerGroup,c=this._controllerGroup;J_(e.get("orient"),s,e.get("itemGap"),o?n.width:null,o?null:n.height),J_("horizontal",c,e.get("pageButtonItemGap",!0));var d=s.getBoundingRect(),h=c.getBoundingRect(),p=this._showController=d[i]>n[i],f=[-d.x,-d.y];t||(f[o]=s[l]);var g=[0,0],v=[-h.x,-h.y],m=Rs(e.get("pageButtonGap",!0),e.get("itemGap",!0));p&&("end"===e.get("pageButtonPosition",!0)?v[o]+=n[i]-h[i]:g[o]+=h[i]+m);v[1-o]+=d[r]/2-h[r]/2,s.setPosition(f),u.setPosition(g),c.setPosition(v);var y={x:0,y:0};if(y[i]=p?n[i]:d[i],y[r]=Math.max(d[r],h[r]),y[a]=Math.min(0,h[a]+v[1-o]),u.__rectSize=n[i],p){var x={x:0,y:0};x[i]=Math.max(n[i]-h[i]-m,0),x[r]=y[r],u.setClipPath(new fv({shape:x})),u.__rectSize=x[i]}else c.eachChild(function(e){e.attr({invisible:!0,silent:!0})});var _=this._getPageInfo(e);return null!=_.pageIndex&&Wy(s,{x:_.contentPosition[0],y:_.contentPosition[1]},p?e:null),this._updatePageInfoView(e,_),y},t.prototype._pageGo=function(e,t,n){var o=this._getPageInfo(t)[e];null!=o&&n.dispatchAction({type:"legendScroll",scrollDataIndex:o,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;ys(["pagePrev","pageNext"],function(o){var i=null!=t[o+"DataIndex"],r=n.childOfName(o);r&&(r.setStyle("fill",i?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),r.cursor=i?"pointer":"default")});var o=n.childOfName("pageText"),i=e.get("pageFormatter"),r=t.pageIndex,a=null!=r?r+1:0,l=t.pageCount;o&&i&&o.setStyle("text",Is(i)?i.replace("{current}",null==a?"":a+"").replace("{total}",null==l?"":l+""):i({current:a,total:l}))},t.prototype._getPageInfo=function(e){var t=e.get("scrollDataIndex",!0),n=this.getContentGroup(),o=this._containerGroup.__rectSize,i=e.getOrient().index,r=Mj[i],a=Tj[i],l=this._findTargetItemIndex(t),s=n.children(),u=s[l],c=s.length,d=c?1:0,h={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return h;var p=y(u);h.contentPosition[i]=-p.s;for(var f=l+1,g=p,v=p,m=null;f<=c;++f)(!(m=y(s[f]))&&v.e>g.s+o||m&&!x(m,g.s))&&(g=v.i>g.i?v:m)&&(null==h.pageNextDataIndex&&(h.pageNextDataIndex=g.i),++h.pageCount),v=m;for(f=l-1,g=p,v=p,m=null;f>=-1;--f)(m=y(s[f]))&&x(v,m.s)||!(g.i<v.i)||(v=g,null==h.pagePrevDataIndex&&(h.pagePrevDataIndex=g.i),++h.pageCount,++h.pageIndex),g=m;return h;function y(e){if(e){var t=e.getBoundingRect(),n=t[a]+e[a];return{s:n,e:n+t[r],i:e.__legendDataIndex}}}function x(e,t){return e.e>=t&&e.s<=t+o}},t.prototype._findTargetItemIndex=function(e){return this._showController?(this.getContentGroup().eachChild(function(o,i){var r=o.__legendDataIndex;null==n&&null!=r&&(n=i),r===e&&(t=i)}),null!=t?t:n):0;var t,n},t.type="legend.scroll",t}(pj);function kj(e){nI(wj),e.registerComponentModel(bj),e.registerComponentView(Ij),function(e){e.registerAction("legendScroll","legendscroll",function(e,t){var n=e.scrollDataIndex;null!=n&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},function(e){e.setScrollDataIndex(n)})})}(e)}var Dj=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.type="dataZoom.inside",t.defaultOption=e_(MY.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(MY),Nj=uf();function Ej(e,t){if(t){e.removeKey(t.model.uid);var n=t.controller;n&&n.dispose()}}function Aj(e,t){e.isDisposed()||e.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:t})}function Lj(e,t,n,o){return e.coordinateSystem.containPoint([n,o])}function Vj(e){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,function(e,t){var n=Nj(t),o=n.coordSysRecordMap||(n.coordSysRecordMap=qs());o.each(function(e){e.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(e){ys(SY(e).infoList,function(n){var i=n.model.uid,r=o.get(i)||o.set(i,function(e,t){var n={model:t,containsPoint:Cs(Lj,t),dispatchAction:Cs(Aj,e),dataZoomInfoMap:null,controller:null},o=n.controller=new hV(e.getZr());return ys(["pan","zoom","scrollMove"],function(e){o.on(e,function(t){var o=[];n.dataZoomInfoMap.each(function(i){if(t.isAvailableBehavior(i.model.option)){var r=(i.getRange||{})[e],a=r&&r(i.dzReferCoordSysInfo,n.model.mainType,n.controller,t);!i.model.get("disabled",!0)&&a&&o.push({dataZoomId:i.model.id,start:a[0],end:a[1]})}}),o.length&&n.dispatchAction(o)})}),n}(t,n.model));(r.dataZoomInfoMap||(r.dataZoomInfoMap=qs())).set(e.uid,{dzReferCoordSysInfo:n,model:e,getRange:null})})}),o.each(function(e){var t,n=e.controller,i=e.dataZoomInfoMap;if(i){var r=i.keys()[0];null!=r&&(t=i.get(r))}if(t){var a=function(e){var t,n="type_",o={type_true:2,type_move:1,type_false:0,type_undefined:-1},i=!0;return e.each(function(e){var r=e.model,a=!r.get("disabled",!0)&&(!r.get("zoomLock",!0)||"move");o[n+a]>o[n+t]&&(t=a),i=i&&r.get("preventDefaultMouseMove",!0)}),{controlType:t,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!i}}}(i);n.enable(a.controlType,a.opt),n.setPointerChecker(e.containsPoint),vC(e,"dispatchAction",t.model.get("throttle",!0),"fixRate")}else Ej(o,e)})})}var Oj=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return Wl(t,e),t.prototype.render=function(t,n,o){e.prototype.render.apply(this,arguments),t.noTarget()?this._clear():(this.range=t.getPercentRange(),function(e,t,n){Nj(e).coordSysRecordMap.each(function(e){var o=e.dataZoomInfoMap.get(t.uid);o&&(o.getRange=n)})}(o,t,{pan:Ss(Pj.pan,this),zoom:Ss(Pj.zoom,this),scrollMove:Ss(Pj.scrollMove,this)}))},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){!function(e,t){for(var n=Nj(e).coordSysRecordMap,o=n.keys(),i=0;i<o.length;i++){var r=o[i],a=n.get(r),l=a.dataZoomInfoMap;if(l){var s=t.uid;l.get(s)&&(l.removeKey(s),l.keys().length||Ej(n,a))}}}(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t}(kY),Pj={zoom:function(e,t,n,o){var i=this.range,r=i.slice(),a=e.axisModels[0];if(a){var l=Rj[t](null,[o.originX,o.originY],a,n,e),s=(l.signal>0?l.pixelStart+l.pixelLength-l.pixel:l.pixel-l.pixelStart)/l.pixelLength*(r[1]-r[0])+r[0],u=Math.max(1/o.scale,0);r[0]=(r[0]-s)*u+s,r[1]=(r[1]-s)*u+s;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return jR(0,r,[0,100],0,c.minSpan,c.maxSpan),this.range=r,i[0]!==r[0]||i[1]!==r[1]?r:void 0}},pan:Bj(function(e,t,n,o,i,r){var a=Rj[o]([r.oldX,r.oldY],[r.newX,r.newY],t,i,n);return a.signal*(e[1]-e[0])*a.pixel/a.pixelLength}),scrollMove:Bj(function(e,t,n,o,i,r){return Rj[o]([0,0],[r.scrollDelta,r.scrollDelta],t,i,n).signal*(e[1]-e[0])*r.scrollDelta})};function Bj(e){return function(t,n,o,i){var r=this.range,a=r.slice(),l=t.axisModels[0];if(l)return jR(e(a,l,t,n,o,i),a,[0,100],"all"),this.range=a,r[0]!==a[0]||r[1]!==a[1]?a:void 0}}var Rj={grid:function(e,t,n,o,i){var r=n.axis,a={},l=i.model.coordinateSystem.getRect();return e=e||[0,0],"x"===r.dim?(a.pixel=t[0]-e[0],a.pixelLength=l.width,a.pixelStart=l.x,a.signal=r.inverse?1:-1):(a.pixel=t[1]-e[1],a.pixelLength=l.height,a.pixelStart=l.y,a.signal=r.inverse?-1:1),a},polar:function(e,t,n,o,i){var r=n.axis,a={},l=i.model.coordinateSystem,s=l.getRadiusAxis().getExtent(),u=l.getAngleAxis().getExtent();return e=e?l.pointToCoord(e):[0,0],t=l.pointToCoord(t),"radiusAxis"===n.mainType?(a.pixel=t[0]-e[0],a.pixelLength=s[1]-s[0],a.pixelStart=s[0],a.signal=r.inverse?1:-1):(a.pixel=t[1]-e[1],a.pixelLength=u[1]-u[0],a.pixelStart=u[0],a.signal=r.inverse?-1:1),a},singleAxis:function(e,t,n,o,i){var r=n.axis,a=i.model.coordinateSystem.getRect(),l={};return e=e||[0,0],"horizontal"===r.orient?(l.pixel=t[0]-e[0],l.pixelLength=a.width,l.pixelStart=a.x,l.signal=r.inverse?1:-1):(l.pixel=t[1]-e[1],l.pixelLength=a.height,l.pixelStart=a.y,l.signal=r.inverse?-1:1),l}};function zj(e){OY(e),e.registerComponentModel(Dj),e.registerComponentView(Oj),Vj(e)}var Fj=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=e_(MY.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),t}(MY),Gj=fv,Hj="horizontal",Wj="vertical",Uj=["line","bar","candlestick","scatter"],Yj={easing:"cubicOut",duration:100,delay:0},Zj=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._displayables={},n}return Wl(t,e),t.prototype.init=function(e,t){this.api=t,this._onBrush=Ss(this._onBrush,this),this._onBrushEnd=Ss(this._onBrushEnd,this)},t.prototype.render=function(t,n,o,i){if(e.prototype.render.apply(this,arguments),vC(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),!1!==t.get("show")){if(t.noTarget())return this._clear(),void this.group.removeAll();i&&"dataZoom"===i.type&&i.from===this.uid||this._buildView(),this._updateView()}else this.group.removeAll()},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){mC(this,"_dispatchZoomAction");var e=this.api.getZr();e.off("mousemove",this._onBrush),e.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var t=this._displayables.sliderGroup=new lp;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(t),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,t=this.api,n=e.get("brushSelect")?7:0,o=this._findCoordRect(),i={width:t.getWidth(),height:t.getHeight()},r=this._orient===Hj?{right:i.width-o.x-o.width,top:i.height-30-7-n,width:o.width,height:30}:{right:7,top:o.y,width:30,height:o.height},a=ow(e.option);ys(["right","top","width","height"],function(e){"ph"===a[e]&&(a[e]=r[e])});var l=Q_(a,i);this._location={x:l.x,y:l.y},this._size=[l.width,l.height],this._orient===Wj&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,t=this._location,n=this._orient,o=this.dataZoomModel.getFirstTargetAxisModel(),i=o&&o.get("inverse"),r=this._displayables.sliderGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;r.attr(n!==Hj||i?n===Hj&&i?{scaleY:a?1:-1,scaleX:-1}:n!==Wj||i?{scaleY:a?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:a?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:a?1:-1,scaleX:1});var l=e.getBoundingRect([r]);e.x=t.x-l.x,e.y=t.y-l.y,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,t=this._size,n=this._displayables.sliderGroup,o=e.get("brushSelect");n.add(new Gj({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var i=new Gj({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:"transparent"},z2:0,onclick:Ss(this._onClickPanel,this)}),r=this.api.getZr();o?(i.on("mousedown",this._onBrushStart,this),i.cursor="crosshair",r.on("mousemove",this._onBrush),r.on("mouseup",this._onBrushEnd)):(r.off("mousemove",this._onBrush),r.off("mouseup",this._onBrushEnd)),n.add(i)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],e){var t=this._size,n=this._shadowSize||[],o=e.series,i=o.getRawData(),r=o.getShadowDim&&o.getShadowDim(),a=r&&i.getDimensionInfo(r)?o.getShadowDim():e.otherDim;if(null!=a){var l=this._shadowPolygonPts,s=this._shadowPolylinePts;if(i!==this._shadowData||a!==this._shadowDim||t[0]!==n[0]||t[1]!==n[1]){var u=i.getDataExtent(a),c=.3*(u[1]-u[0]);u=[u[0]-c,u[1]+c];var d,h=[0,t[1]],p=[0,t[0]],f=[[t[0],0],[0,0]],g=[],v=p[1]/(i.count()-1),m=0,y=Math.round(i.count()/t[0]);i.each([a],function(e,t){if(y>0&&t%y)m+=v;else{var n=null==e||isNaN(e)||""===e,o=n?0:fp(e,u,h,!0);n&&!d&&t?(f.push([f[f.length-1][0],0]),g.push([g[g.length-1][0],0])):!n&&d&&(f.push([m,0]),g.push([m,0])),f.push([m,o]),g.push([m,o]),m+=v,d=n}}),l=this._shadowPolygonPts=f,s=this._shadowPolylinePts=g}this._shadowData=i,this._shadowDim=a,this._shadowSize=[t[0],t[1]];for(var x=this.dataZoomModel,_=0;_<3;_++){var w=b(1===_);this._displayables.sliderGroup.add(w),this._displayables.dataShadowSegs.push(w)}}}function b(e){var t=x.getModel(e?"selectedDataBackground":"dataBackground"),n=new lp,o=new my({shape:{points:l},segmentIgnoreThreshold:1,style:t.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),i=new xy({shape:{points:s},segmentIgnoreThreshold:1,style:t.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return n.add(o),n.add(i),n}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,t=e.get("showDataShadow");if(!1!==t){var n,o=this.ecModel;return e.eachTargetAxis(function(i,r){ys(e.getAxisProxy(i,r).getTargetSeriesModels(),function(e){if(!(n||!0!==t&&gs(Uj,e.get("type"))<0)){var a,l=o.getComponent(wY(i),r).axis,s={x:"y",y:"x",radius:"angle",angle:"radius"}[i],u=e.coordinateSystem;null!=s&&u.getOtherAxis&&(a=u.getOtherAxis(l).inverse),s=e.getData().mapDimension(s),n={thisAxis:l,series:e,thisDim:i,otherDim:s,otherAxisInverse:a}}},this)},this),n}},t.prototype._renderHandle=function(){var e=this.group,t=this._displayables,n=t.handles=[null,null],o=t.handleLabels=[null,null],i=this._displayables.sliderGroup,r=this._size,a=this.dataZoomModel,l=this.api,s=a.get("borderRadius")||0,u=a.get("brushSelect"),c=t.filler=new Gj({silent:u,style:{fill:a.get("fillerColor")},textConfig:{position:"inside"}});i.add(c),i.add(new Gj({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:r[0],height:r[1],r:s},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),ys([0,1],function(t){var r=a.get("handleIcon");!gM[r]&&r.indexOf("path://")<0&&r.indexOf("image://")<0&&(r="path://"+r,"production"!==process.env.NODE_ENV&&Gp("handleIcon now needs 'path://' prefix when using a path string"));var l=yM(r,-1,0,2,2,null,!0);l.attr({cursor:Xj(this._orient),draggable:!0,drift:Ss(this._onDragMove,this,t),ondragend:Ss(this._onDragEnd,this),onmouseover:Ss(this._showDataInfo,this,!0),onmouseout:Ss(this._showDataInfo,this,!1),z2:5});var s=l.getBoundingRect(),u=a.get("handleSize");this._handleHeight=gp(u,this._size[1]),this._handleWidth=s.width/s.height*this._handleHeight,l.setStyle(a.getModel("handleStyle").getItemStyle()),l.style.strokeNoScale=!0,l.rectHover=!0,l.ensureState("emphasis").style=a.getModel(["emphasis","handleStyle"]).getItemStyle(),ym(l);var c=a.get("handleColor");null!=c&&(l.style.fill=c),i.add(n[t]=l);var d=a.getModel("textStyle"),h=(a.get("handleLabel")||{}).show||!1;e.add(o[t]=new mv({silent:!0,invisible:!h,style:Dx(d,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:d.getTextColor(),font:d.getFont()}),z2:10}))},this);var d=c;if(u){var h=gp(a.get("moveHandleSize"),r[1]),p=t.moveHandle=new fv({style:a.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:r[1]-.5,height:h}}),f=.8*h,g=t.moveHandleIcon=yM(a.get("moveHandleIcon"),-f/2,-f/2,f,f,"#fff",!0);g.silent=!0,g.y=r[1]+h/2-.5,p.ensureState("emphasis").style=a.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var v=Math.min(r[1]/2,Math.max(h,10));(d=t.moveZone=new fv({invisible:!0,shape:{y:r[1]-v,height:h+v}})).on("mouseover",function(){l.enterEmphasis(p)}).on("mouseout",function(){l.leaveEmphasis(p)}),i.add(p),i.add(g),i.add(d)}d.attr({draggable:!0,cursor:Xj(this._orient),drift:Ss(this._onDragMove,this,"all"),ondragstart:Ss(this._showDataInfo,this,!0),ondragend:Ss(this._onDragEnd,this),onmouseover:Ss(this._showDataInfo,this,!0),onmouseout:Ss(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),t=this._getViewExtent();this._handleEnds=[fp(e[0],[0,100],t,!0),fp(e[1],[0,100],t,!0)]},t.prototype._updateInterval=function(e,t){var n=this.dataZoomModel,o=this._handleEnds,i=this._getViewExtent(),r=n.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];jR(t,o,i,n.get("zoomLock")?"all":e,null!=r.minSpan?fp(r.minSpan,a,i,!0):null,null!=r.maxSpan?fp(r.maxSpan,a,i,!0):null);var l=this._range,s=this._range=mp([fp(o[0],i,a,!0),fp(o[1],i,a,!0)]);return!l||l[0]!==s[0]||l[1]!==s[1]},t.prototype._updateView=function(e){var t=this._displayables,n=this._handleEnds,o=mp(n.slice()),i=this._size;ys([0,1],function(e){var o=t.handles[e],r=this._handleHeight;o.attr({scaleX:r/2,scaleY:r/2,x:n[e]+(e?-1:1),y:i[1]/2-r/2})},this),t.filler.setShape({x:o[0],y:0,width:o[1]-o[0],height:i[1]});var r={x:o[0],width:o[1]-o[0]};t.moveHandle&&(t.moveHandle.setShape(r),t.moveZone.setShape(r),t.moveZone.getBoundingRect(),t.moveHandleIcon&&t.moveHandleIcon.attr("x",r.x+r.width/2));for(var a=t.dataShadowSegs,l=[0,o[0],o[1],i[0]],s=0;s<a.length;s++){var u=a[s],c=u.getClipPath();c||(c=new fv,u.setClipPath(c)),c.setShape({x:l[s],y:0,width:l[s+1]-l[s],height:i[1]})}this._updateDataInfo(e)},t.prototype._updateDataInfo=function(e){var t=this.dataZoomModel,n=this._displayables,o=n.handleLabels,i=this._orient,r=["",""];if(t.get("showDetail")){var a=t.findRepresentativeAxisProxy();if(a){var l=a.getAxisModel().axis,s=this._range,u=e?a.calculateDataWindow({start:s[0],end:s[1]}).valueWindow:a.getDataValueWindow();r=[this._formatLabel(u[0],l),this._formatLabel(u[1],l)]}}var c=mp(this._handleEnds.slice());function d(e){var t=ux(n.handles[e].parent,this.group),a=dx(0===e?"right":"left",t),l=this._handleWidth/2+5,s=cx([c[e]+(0===e?-l:l),this._size[1]/2],t);o[e].setStyle({x:s[0],y:s[1],verticalAlign:i===Hj?"middle":a,align:i===Hj?a:"center",text:r[e]})}d.call(this,0),d.call(this,1)},t.prototype._formatLabel=function(e,t){var n=this.dataZoomModel,o=n.get("labelFormatter"),i=n.get("labelPrecision");null!=i&&"auto"!==i||(i=t.getPixelPrecision());var r=null==e||isNaN(e)?"":"category"===t.type||"time"===t.type?t.scale.getLabel({value:Math.round(e)}):e.toFixed(Math.min(i,20));return Ts(o)?o(e,r):Is(o)?o.replace("{value}",r):r},t.prototype._showDataInfo=function(e){var t=(this.dataZoomModel.get("handleLabel")||{}).show||!1,n=this.dataZoomModel.getModel(["emphasis","handleLabel"]).get("show")||!1,o=e||this._dragging?n:t,i=this._displayables,r=i.handleLabels;r[0].attr("invisible",!o),r[1].attr("invisible",!o),i.moveHandle&&this.api[o?"enterEmphasis":"leaveEmphasis"](i.moveHandle,1)},t.prototype._onDragMove=function(e,t,n,o){this._dragging=!0,Hu(o.event);var i=cx([t,n],this._displayables.sliderGroup.getLocalTransform(),!0),r=this._updateInterval(e,i[0]),a=this.dataZoomModel.get("realtime");this._updateView(!a),r&&a&&this._dispatchZoomAction(!0)},t.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1),!this.dataZoomModel.get("realtime")&&this._dispatchZoomAction(!1)},t.prototype._onClickPanel=function(e){var t=this._size,n=this._displayables.sliderGroup.transformCoordToLocal(e.offsetX,e.offsetY);if(!(n[0]<0||n[0]>t[0]||n[1]<0||n[1]>t[1])){var o=this._handleEnds,i=(o[0]+o[1])/2,r=this._updateInterval("all",n[0]-i);this._updateView(),r&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var t=e.offsetX,n=e.offsetY;this._brushStart=new tc(t,n),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var t=this._displayables.brushRect;if(this._brushing=!1,t){t.attr("ignore",!0);var n=t.shape;if(!(+new Date-this._brushStartTime<200&&Math.abs(n.width)<5)){var o=this._getViewExtent(),i=[0,100];this._range=mp([fp(n.x,o,i,!0),fp(n.x+n.width,o,i,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(Hu(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,t){var n=this._displayables,o=this.dataZoomModel,i=n.brushRect;i||(i=n.brushRect=new Gj({silent:!0,style:o.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(i)),i.attr("ignore",!1);var r=this._brushStart,a=this._displayables.sliderGroup,l=a.transformCoordToLocal(e,t),s=a.transformCoordToLocal(r.x,r.y),u=this._size;l[0]=Math.max(Math.min(u[0],l[0]),0),i.setShape({x:s[0],y:0,width:l[0]-s[0],height:u[1]})},t.prototype._dispatchZoomAction=function(e){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?Yj:null,start:t[0],end:t[1]})},t.prototype._findCoordRect=function(){var e,t=SY(this.dataZoomModel).infoList;if(!e&&t.length){var n=t[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){var o=this.api.getWidth(),i=this.api.getHeight();e={x:.2*o,y:.2*i,width:.6*o,height:.6*i}}return e},t.type="dataZoom.slider",t}(kY);function Xj(e){return"vertical"===e?"ns-resize":"ew-resize"}function jj(e){e.registerComponentModel(Fj),e.registerComponentView(Zj),OY(e)}var $j=function(e,t,n){var o=cs((qj[e]||{})[t]);return n&&Ms(o)?o[o.length-1]:o},qj={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},Kj=FP.mapVisual,Jj=FP.eachVisual,Qj=Ms,e$=ys,t$=mp,n$=fp,o$=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.stateList=["inRange","outOfRange"],n.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],n.layoutMode={type:"box",ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return Wl(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&KZ(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var t=this.stateList;e=Ss(e,this),this.controllerVisuals=qZ(this.option.controller,t,e),this.targetVisuals=qZ(this.option.target,t,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this.option.seriesIndex,t=[];return null==e||"all"===e?this.ecModel.eachSeries(function(e,n){t.push(n)}):t=jp(e),t},t.prototype.eachTargetSeries=function(e,t){ys(this.getTargetSeriesIndices(),function(n){var o=this.ecModel.getSeriesByIndex(n);o&&e.call(t,o)},this)},t.prototype.isTargetSeries=function(e){var t=!1;return this.eachTargetSeries(function(n){n===e&&(t=!0)}),t},t.prototype.formatValueText=function(e,t,n){var o,i=this.option,r=i.precision,a=this.dataBound,l=i.formatter;n=n||["<",">"],Ms(e)&&(e=e.slice(),o=!0);var s=t?e:o?[u(e[0]),u(e[1])]:u(e);return Is(l)?l.replace("{value}",o?s[0]:s).replace("{value2}",o?s[1]:s):Ts(l)?o?l(e[0],e[1]):l(e):o?e[0]===a[0]?n[0]+" "+s[1]:e[1]===a[1]?n[1]+" "+s[0]:s[0]+" - "+s[1]:s;function u(e){return e===a[0]?"min":e===a[1]?"max":(+e).toFixed(Math.min(r,20))}},t.prototype.resetExtent=function(){var e=this.option,t=t$([e.min,e.max]);this._dataExtent=t},t.prototype.getDataDimensionIndex=function(e){var t=this.option.dimension;if(null!=t)return e.getDimensionIndex(t);for(var n=e.dimensions,o=n.length-1;o>=0;o--){var i=n[o],r=e.getDimensionInfo(i);if(!r.isCalculationCoord)return r.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,t=this.option,n={inRange:t.inRange,outOfRange:t.outOfRange},o=t.target||(t.target={}),i=t.controller||(t.controller={});ds(o,n),ds(i,n);var r=this.isCategory();function a(n){Qj(t.color)&&!n.inRange&&(n.inRange={color:t.color.slice().reverse()}),n.inRange=n.inRange||{color:e.get("gradientColor")}}a.call(this,o),a.call(this,i),function(e,t,n){var o=e[t],i=e[n];o&&!i&&(i=e[n]={},e$(o,function(e,t){if(FP.isValidType(t)){var n=$j(t,"inactive",r);null!=n&&(i[t]=n,"color"!==t||i.hasOwnProperty("opacity")||i.hasOwnProperty("colorAlpha")||(i.opacity=[0,0]))}}))}.call(this,o,"inRange","outOfRange"),function(e){var t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,n=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,o=this.get("inactiveColor"),i=this.getItemSymbol()||"roundRect";e$(this.stateList,function(a){var l=this.itemSize,s=e[a];s||(s=e[a]={color:r?o:[o]}),null==s.symbol&&(s.symbol=t&&cs(t)||(r?i:[i])),null==s.symbolSize&&(s.symbolSize=n&&cs(n)||(r?l[0]:[l[0],l[0]])),s.symbol=Kj(s.symbol,function(e){return"none"===e?i:e});var u=s.symbolSize;if(null!=u){var c=-1/0;Jj(u,function(e){e>c&&(c=e)}),s.symbolSize=Kj(u,function(e){return n$(e,[0,c],[0,l[0]],!0)})}},this)}.call(this,i)},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type="visualMap",t.dependencies=["series"],t.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},t}(aw),i$=[20,140],r$=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(e){e.mappingMethod="linear",e.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){e.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(null==t[0]||isNaN(t[0]))&&(t[0]=i$[0]),(null==t[1]||isNaN(t[1]))&&(t[1]=i$[1])},t.prototype._resetRange=function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):Ms(t)&&(t[0]>t[1]&&t.reverse(),t[0]=Math.max(t[0],e[0]),t[1]=Math.min(t[1],e[1]))},t.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),ys(this.stateList,function(e){var t=this.option.controller[e].symbolSize;t&&t[0]!==t[1]&&(t[0]=t[1]/3)},this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),t=mp((this.get("range")||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]<e[0]&&(t[0]=e[0]),t[1]<e[0]&&(t[1]=e[0]),t},t.prototype.getValueState=function(e){var t=this.option.range,n=this.getExtent();return(t[0]<=n[0]||t[0]<=e)&&(t[1]>=n[1]||e<=t[1])?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var t=[];return this.eachTargetSeries(function(n){var o=[],i=n.getData();i.each(this.getDataDimensionIndex(i),function(t,n){e[0]<=t&&t<=e[1]&&o.push(n)},this),t.push({seriesId:n.id,dataIndex:o})},this),t},t.prototype.getVisualMeta=function(e){var t=a$(this,"outOfRange",this.getExtent()),n=a$(this,"inRange",this.option.range.slice()),o=[];function i(t,n){o.push({value:t,color:e(t,n)})}for(var r=0,a=0,l=n.length,s=t.length;a<s&&(!n.length||t[a]<=n[0]);a++)t[a]<n[r]&&i(t[a],"outOfRange");for(var u=1;r<l;r++,u=0)u&&o.length&&i(n[r],"outOfRange"),i(n[r],"inRange");for(u=1;a<s;a++)(!n.length||n[n.length-1]<t[a])&&(u&&(o.length&&i(o[o.length-1].value,"outOfRange"),u=0),i(t[a],"outOfRange"));var c=o.length;return{stops:o,outerColors:[c?o[0].color:"transparent",c?o[c-1].color:"transparent"]}},t.type="visualMap.continuous",t.defaultOption=e_(o$.defaultOption,{align:"auto",calculable:!1,hoverLink:!0,realtime:!0,handleIcon:"path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",handleSize:"120%",handleStyle:{borderColor:"#fff",borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}}),t}(o$);function a$(e,t,n){if(n[0]===n[1])return n.slice();for(var o=(n[1]-n[0])/200,i=n[0],r=[],a=0;a<=200&&i<n[1];a++)r.push(i),i+=o;return r.push(n[1]),r}var l$=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.autoPositionValues={left:1,right:1,top:1,bottom:1},n}return Wl(t,e),t.prototype.init=function(e,t){this.ecModel=e,this.api=t},t.prototype.render=function(e,t,n,o){this.visualMapModel=e,!1!==e.get("show")?this.doRender(e,t,n,o):this.group.removeAll()},t.prototype.renderBackground=function(e){var t=this.visualMapModel,n=G_(t.get("padding")||0),o=e.getBoundingRect();e.add(new fv({z2:-1,silent:!0,shape:{x:o.x-n[3],y:o.y-n[0],width:o.width+n[3]+n[1],height:o.height+n[0]+n[2]},style:{fill:t.get("backgroundColor"),stroke:t.get("borderColor"),lineWidth:t.get("borderWidth")}}))},t.prototype.getControllerVisual=function(e,t,n){var o=(n=n||{}).forceState,i=this.visualMapModel,r={};if("color"===t){var a=i.get("contentColor");r.color=a}function l(e){return r[e]}function s(e,t){r[e]=t}var u=i.controllerVisuals[o||i.getValueState(e)];return ys(FP.prepareVisualTypes(u),function(o){var i=u[o];n.convertOpacityToAlpha&&"opacity"===o&&(o="colorAlpha",i=u.__alphaForOpacity),FP.dependsOn(o,t)&&i&&i.applyVisual(e,l,s)}),r[t]},t.prototype.positionGroup=function(e){var t=this.visualMapModel,n=this.api;ew(e,t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()})},t.prototype.doRender=function(e,t,n,o){},t.type="visualMap",t}(nC),s$=[["left","right","width"],["top","bottom","height"]];function u$(e,t,n){var o=e.option,i=o.align;if(null!=i&&"auto"!==i)return i;for(var r={width:t.getWidth(),height:t.getHeight()},a="horizontal"===o.orient?1:0,l=s$[a],s=[0,null,10],u={},c=0;c<3;c++)u[s$[1-a][c]]=s[c],u[l[c]]=2===c?n[0]:o[l[c]];var d=[["x","width",3],["y","height",0]][a],h=Q_(u,r,o.padding);return l[(h.margin[d[2]]||0)+h[d[0]]+.5*h[d[1]]<.5*r[d[1]]?0:1]}function c$(e,t){return ys(e||[],function(e){null!=e.dataIndex&&(e.dataIndexInside=e.dataIndex,e.dataIndex=null),e.highlightKey="visualMap"+(t?t.componentIndex:"")}),e}var d$=fp,h$=ys,p$=Math.min,f$=Math.max,g$=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._shapes={},n._dataInterval=[],n._handleEnds=[],n._hoverLinkDataIndices=[],n}return Wl(t,e),t.prototype.init=function(t,n){e.prototype.init.call(this,t,n),this._hoverLinkFromSeriesMouseOver=Ss(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=Ss(this._hideIndicator,this)},t.prototype.doRender=function(e,t,n,o){o&&"selectDataRange"===o.type&&o.from===this.uid||this._buildView()},t.prototype._buildView=function(){this.group.removeAll();var e=this.visualMapModel,t=this.group;this._orient=e.get("orient"),this._useHandle=e.get("calculable"),this._resetInterval(),this._renderBar(t);var n=e.get("text");this._renderEndsText(t,n,0),this._renderEndsText(t,n,1),this._updateView(!0),this.renderBackground(t),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(t)},t.prototype._renderEndsText=function(e,t,n){if(t){var o=t[1-n];o=null!=o?o+"":"";var i=this.visualMapModel,r=i.get("textGap"),a=i.itemSize,l=this._shapes.mainGroup,s=this._applyTransform([a[0]/2,0===n?-r:a[1]+r],l),u=this._applyTransform(0===n?"bottom":"top",l),c=this._orient,d=this.visualMapModel.textStyleModel;this.group.add(new mv({style:Dx(d,{x:s[0],y:s[1],verticalAlign:"horizontal"===c?"middle":u,align:"horizontal"===c?u:"center",text:o})}))}},t.prototype._renderBar=function(e){var t=this.visualMapModel,n=this._shapes,o=t.itemSize,i=this._orient,r=this._useHandle,a=u$(t,this.api,o),l=n.mainGroup=this._createBarGroup(a),s=new lp;l.add(s),s.add(n.outOfRange=v$()),s.add(n.inRange=v$(null,r?y$(this._orient):null,Ss(this._dragHandle,this,"all",!1),Ss(this._dragHandle,this,"all",!0))),s.setClipPath(new fv({shape:{x:0,y:0,width:o[0],height:o[1],r:3}}));var u=t.textStyleModel.getTextRect("国"),c=f$(u.width,u.height);r&&(n.handleThumbs=[],n.handleLabels=[],n.handleLabelPoints=[],this._createHandle(t,l,0,o,c,i),this._createHandle(t,l,1,o,c,i)),this._createIndicator(t,l,o,c,i),e.add(l)},t.prototype._createHandle=function(e,t,n,o,i,r){var a=Ss(this._dragHandle,this,n,!1),l=Ss(this._dragHandle,this,n,!0),s=$h(e.get("handleSize"),o[0]),u=yM(e.get("handleIcon"),-s/2,-s/2,s,s,null,!0),c=y$(this._orient);u.attr({cursor:c,draggable:!0,drift:a,ondragend:l,onmousemove:function(e){Hu(e.event)}}),u.x=o[0]/2,u.useStyle(e.getModel("handleStyle").getItemStyle()),u.setStyle({strokeNoScale:!0,strokeFirst:!0}),u.style.lineWidth*=2,u.ensureState("emphasis").style=e.getModel(["emphasis","handleStyle"]).getItemStyle(),Cm(u,!0),t.add(u);var d=this.visualMapModel.textStyleModel,h=new mv({cursor:c,draggable:!0,drift:a,onmousemove:function(e){Hu(e.event)},ondragend:l,style:Dx(d,{x:0,y:0,text:""})});h.ensureState("blur").style={opacity:.1},h.stateTransition={duration:200},this.group.add(h);var p=[s,0],f=this._shapes;f.handleThumbs[n]=u,f.handleLabelPoints[n]=p,f.handleLabels[n]=h},t.prototype._createIndicator=function(e,t,n,o,i){var r=$h(e.get("indicatorSize"),n[0]),a=yM(e.get("indicatorIcon"),-r/2,-r/2,r,r,null,!0);a.attr({cursor:"move",invisible:!0,silent:!0,x:n[0]/2});var l=e.getModel("indicatorStyle").getItemStyle();if(a instanceof lv){var s=a.style;a.useStyle(ps({image:s.image,x:s.x,y:s.y,width:s.width,height:s.height},l))}else a.useStyle(l);t.add(a);var u=this.visualMapModel.textStyleModel,c=new mv({silent:!0,invisible:!0,style:Dx(u,{x:0,y:0,text:""})});this.group.add(c);var d=[("horizontal"===i?o/2:6)+n[0]/2,0],h=this._shapes;h.indicator=a,h.indicatorLabel=c,h.indicatorLabelPoint=d,this._firstShowIndicator=!0},t.prototype._dragHandle=function(e,t,n,o){if(this._useHandle){if(this._dragging=!t,!t){var i=this._applyTransform([n,o],this._shapes.mainGroup,!0);this._updateInterval(e,i[1]),this._hideIndicator(),this._updateView()}t===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),t?!this._hovering&&this._clearHoverLinkToSeries():m$(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[e],!1)}},t.prototype._resetInterval=function(){var e=this.visualMapModel,t=this._dataInterval=e.getSelected(),n=e.getExtent(),o=[0,e.itemSize[1]];this._handleEnds=[d$(t[0],n,o,!0),d$(t[1],n,o,!0)]},t.prototype._updateInterval=function(e,t){t=t||0;var n=this.visualMapModel,o=this._handleEnds,i=[0,n.itemSize[1]];jR(t,o,i,e,0);var r=n.getExtent();this._dataInterval=[d$(o[0],i,r,!0),d$(o[1],i,r,!0)]},t.prototype._updateView=function(e){var t=this.visualMapModel,n=t.getExtent(),o=this._shapes,i=[0,t.itemSize[1]],r=e?i:this._handleEnds,a=this._createBarVisual(this._dataInterval,n,r,"inRange"),l=this._createBarVisual(n,n,i,"outOfRange");o.inRange.setStyle({fill:a.barColor}).setShape("points",a.barPoints),o.outOfRange.setStyle({fill:l.barColor}).setShape("points",l.barPoints),this._updateHandle(r,a)},t.prototype._createBarVisual=function(e,t,n,o){var i={forceState:o,convertOpacityToAlpha:!0},r=this._makeColorGradient(e,i),a=[this.getControllerVisual(e[0],"symbolSize",i),this.getControllerVisual(e[1],"symbolSize",i)],l=this._createBarPoints(n,a);return{barColor:new Ey(0,0,0,1,r),barPoints:l,handlesColor:[r[0].color,r[r.length-1].color]}},t.prototype._makeColorGradient=function(e,t){var n=[],o=(e[1]-e[0])/100;n.push({color:this.getControllerVisual(e[0],"color",t),offset:0});for(var i=1;i<100;i++){var r=e[0]+o*i;if(r>e[1])break;n.push({color:this.getControllerVisual(r,"color",t),offset:i/100})}return n.push({color:this.getControllerVisual(e[1],"color",t),offset:1}),n},t.prototype._createBarPoints=function(e,t){var n=this.visualMapModel.itemSize;return[[n[0]-t[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-t[1],e[1]]]},t.prototype._createBarGroup=function(e){var t=this._orient,n=this.visualMapModel.get("inverse");return new lp("horizontal"!==t||n?"horizontal"===t&&n?{scaleX:"bottom"===e?-1:1,rotation:-Math.PI/2}:"vertical"!==t||n?{scaleX:"left"===e?1:-1}:{scaleX:"left"===e?1:-1,scaleY:-1}:{scaleX:"bottom"===e?1:-1,rotation:Math.PI/2})},t.prototype._updateHandle=function(e,t){if(this._useHandle){var n=this._shapes,o=this.visualMapModel,i=n.handleThumbs,r=n.handleLabels,a=o.itemSize,l=o.getExtent(),s=this._applyTransform("left",n.mainGroup);h$([0,1],function(u){var c=i[u];c.setStyle("fill",t.handlesColor[u]),c.y=e[u];var d=d$(e[u],[0,a[1]],l,!0),h=this.getControllerVisual(d,"symbolSize");c.scaleX=c.scaleY=h/a[0],c.x=a[0]-h/2;var p=cx(n.handleLabelPoints[u],ux(c,this.group));if("horizontal"===this._orient){var f="left"===s||"top"===s?(a[0]-h)/2:(a[0]-h)/-2;p[1]+=f}r[u].setStyle({x:p[0],y:p[1],text:o.formatValueText(this._dataInterval[u]),verticalAlign:"middle",align:"vertical"===this._orient?this._applyTransform("left",n.mainGroup):"center"})},this)}},t.prototype._showIndicator=function(e,t,n,o){var i=this.visualMapModel,r=i.getExtent(),a=i.itemSize,l=[0,a[1]],s=this._shapes,u=s.indicator;if(u){u.attr("invisible",!1);var c=this.getControllerVisual(e,"color",{convertOpacityToAlpha:!0}),d=this.getControllerVisual(e,"symbolSize"),h=d$(e,r,l,!0),p=a[0]-d/2,f={x:u.x,y:u.y};u.y=h,u.x=p;var g=cx(s.indicatorLabelPoint,ux(u,this.group)),v=s.indicatorLabel;v.attr("invisible",!1);var m=this._applyTransform("left",s.mainGroup),y="horizontal"===this._orient;v.setStyle({text:(n||"")+i.formatValueText(t),verticalAlign:y?m:"middle",align:y?"center":m});var x={x:p,y:h,style:{fill:c}},_={style:{x:g[0],y:g[1]}};if(i.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var w={duration:100,easing:"cubicInOut",additive:!0};u.x=f.x,u.y=f.y,u.animateTo(x,w),v.animateTo(_,w)}else u.attr(x),v.attr(_);this._firstShowIndicator=!1;var b=this._shapes.handleLabels;if(b)for(var S=0;S<b.length;S++)this.api.enterBlur(b[S])}},t.prototype._enableHoverLinkToSeries=function(){var e=this;this._shapes.mainGroup.on("mousemove",function(t){if(e._hovering=!0,!e._dragging){var n=e.visualMapModel.itemSize,o=e._applyTransform([t.offsetX,t.offsetY],e._shapes.mainGroup,!0,!0);o[1]=p$(f$(0,o[1]),n[1]),e._doHoverLinkToSeries(o[1],0<=o[0]&&o[0]<=n[0])}}).on("mouseout",function(){e._hovering=!1,!e._dragging&&e._clearHoverLinkToSeries()})},t.prototype._enableHoverLinkFromSeries=function(){var e=this.api.getZr();this.visualMapModel.option.hoverLink?(e.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),e.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},t.prototype._doHoverLinkToSeries=function(e,t){var n=this.visualMapModel,o=n.itemSize;if(n.option.hoverLink){var i=[0,o[1]],r=n.getExtent();e=p$(f$(i[0],e),i[1]);var a=function(e,t,n){var o=6,i=e.get("hoverLinkDataSize");i&&(o=d$(i,t,n,!0)/2);return o}(n,r,i),l=[e-a,e+a],s=d$(e,i,r,!0),u=[d$(l[0],i,r,!0),d$(l[1],i,r,!0)];l[0]<i[0]&&(u[0]=-1/0),l[1]>i[1]&&(u[1]=1/0),t&&(u[0]===-1/0?this._showIndicator(s,u[1],"< ",a):u[1]===1/0?this._showIndicator(s,u[0],"> ",a):this._showIndicator(s,s,"≈ ",a));var c=this._hoverLinkDataIndices,d=[];(t||m$(n))&&(d=this._hoverLinkDataIndices=n.findTargetDataIndices(u));var h=function(e,t){var n={},o={};return i(e||[],n),i(t||[],o,n),[r(n),r(o)];function i(e,t,n){for(var o=0,i=e.length;o<i;o++){var r=nf(e[o].seriesId,null);if(null==r)return;for(var a=jp(e[o].dataIndex),l=n&&n[r],s=0,u=a.length;s<u;s++){var c=a[s];l&&l[c]?l[c]=null:(t[r]||(t[r]={}))[c]=1}}}function r(e,t){var n=[];for(var o in e)if(e.hasOwnProperty(o)&&null!=e[o])if(t)n.push(+o);else{var i=r(e[o],!0);i.length&&n.push({seriesId:o,dataIndex:i})}return n}}(c,d);this._dispatchHighDown("downplay",c$(h[0],n)),this._dispatchHighDown("highlight",c$(h[1],n))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var t;if(aM(e.target,function(e){var n=Nv(e);if(null!=n.dataIndex)return t=n,!0},!0),t){var n=this.ecModel.getSeriesByIndex(t.seriesIndex),o=this.visualMapModel;if(o.isTargetSeries(n)){var i=n.getData(t.dataType),r=i.getStore().get(o.getDataDimensionIndex(i),t.dataIndex);isNaN(r)||this._showIndicator(r,r)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr("invisible",!0),e.indicatorLabel&&e.indicatorLabel.attr("invisible",!0);var t=this._shapes.handleLabels;if(t)for(var n=0;n<t.length;n++)this.api.leaveBlur(t[n])},t.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var e=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",c$(e,this.visualMapModel)),e.length=0},t.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var e=this.api.getZr();e.off("mouseover",this._hoverLinkFromSeriesMouseOver),e.off("mouseout",this._hideIndicator)},t.prototype._applyTransform=function(e,t,n,o){var i=ux(t,o?null:this.group);return Ms(e)?cx(e,i,n):dx(e,i,n)},t.prototype._dispatchHighDown=function(e,t){t&&t.length&&this.api.dispatchAction({type:e,batch:t})},t.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},t.type="visualMap.continuous",t}(l$);function v$(e,t,n,o){return new my({shape:{points:e},draggable:!!n,cursor:t,drift:n,onmousemove:function(e){Hu(e.event)},ondragend:o})}function m$(e){var t=e.get("hoverLinkOnHandle");return!!(null==t?e.get("realtime"):t)}function y$(e){return"vertical"===e?"ns-resize":"ew-resize"}var x$={type:"selectDataRange",event:"dataRangeSelected",update:"update"},_$=function(e,t){t.eachComponent({mainType:"visualMap",query:e},function(t){t.setSelected(e.selected)})},w$=[{createOnAllSeries:!0,reset:function(e,t){var n=[];return t.eachComponent("visualMap",function(t){var o,i,r,a,l,s=e.pipelineContext;!t.isTargetSeries(e)||s&&s.large||n.push((o=t.stateList,i=t.targetVisuals,r=Ss(t.getValueState,t),a=t.getDataDimensionIndex(e.getData()),l={},ys(o,function(e){var t=FP.prepareVisualTypes(i[e]);l[e]=t}),{progress:function(e,t){var n,o;function s(e){return tM(t,o,e)}function u(e,n){oM(t,o,e,n)}null!=a&&(n=t.getDimensionIndex(a));for(var c=t.getStore();null!=(o=e.next());){var d=t.getRawDataItem(o);if(!d||!1!==d.visualMap)for(var h=null!=a?c.get(n,o):o,p=r(h),f=i[p],g=l[p],v=0,m=g.length;v<m;v++){var y=g[v];f[y]&&f[y].applyVisual(h,s,u)}}}}))}),n}},{createOnAllSeries:!0,reset:function(e,t){var n=e.getData(),o=[];t.eachComponent("visualMap",function(t){if(t.isTargetSeries(e)){var i=t.getVisualMeta(Ss(b$,null,e,t))||{stops:[],outerColors:[]},r=t.getDataDimensionIndex(n);r>=0&&(i.dimension=r,o.push(i))}}),e.getData().setVisual("visualMeta",o)}}];function b$(e,t,n,o){for(var i=t.targetVisuals[o],r=FP.prepareVisualTypes(i),a={color:nM(e.getData(),"color")},l=0,s=r.length;l<s;l++){var u=r[l],c=i["opacity"===u?"__alphaForOpacity":u];c&&c.applyVisual(n,d,h)}return a.color;function d(e){return a[e]}function h(e,t){a[e]=t}}var S$=ys;function C$(e){var t=e&&e.visualMap;Ms(t)||(t=t?[t]:[]),S$(t,function(e){if(e){M$(e,"splitList")&&!M$(e,"pieces")&&(e.pieces=e.splitList,delete e.splitList);var t=e.pieces;t&&Ms(t)&&S$(t,function(e){Ns(e)&&(M$(e,"start")&&!M$(e,"min")&&(e.min=e.start),M$(e,"end")&&!M$(e,"max")&&(e.max=e.end))})}})}function M$(e,t){return e&&e.hasOwnProperty&&e.hasOwnProperty(t)}var T$=!1;function I$(e){T$||(T$=!0,e.registerSubTypeDefaulter("visualMap",function(e){return e.categories||(e.pieces?e.pieces.length>0:e.splitNumber>0)&&!e.calculable?"piecewise":"continuous"}),e.registerAction(x$,_$),ys(w$,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(C$))}function k$(e){e.registerComponentModel(r$),e.registerComponentView(g$),I$(e)}var D$=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._pieceList=[],n}return Wl(t,e),t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var o=this._mode=this._determineMode();this._pieceList=[],N$[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var i=this.option.categories;this.resetVisual(function(e,t){"categories"===o?(e.mappingMethod="category",e.categories=cs(i)):(e.dataExtent=this.getExtent(),e.mappingMethod="piecewise",e.pieceList=xs(this._pieceList,function(e){return e=cs(e),"inRange"!==t&&(e.visual=null),e}))})},t.prototype.completeVisualOption=function(){var t=this.option,n={},o=FP.listVisualTypes(),i=this.isCategory();function r(e,t,n){return e&&e[t]&&e[t].hasOwnProperty(n)}ys(t.pieces,function(e){ys(o,function(t){e.hasOwnProperty(t)&&(n[t]=1)})}),ys(n,function(e,n){var o=!1;ys(this.stateList,function(e){o=o||r(t,e,n)||r(t.target,e,n)},this),!o&&ys(this.stateList,function(e){(t[e]||(t[e]={}))[n]=$j(n,"inRange"===e?"active":"inactive",i)})},this),e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,t){var n=this.option,o=this._pieceList,i=(t?n:e).selected||{};if(n.selected=i,ys(o,function(e,t){var n=this.getSelectedMapKey(e);i.hasOwnProperty(n)||(i[n]=!0)},this),"single"===n.selectedMode){var r=!1;ys(o,function(e,t){var n=this.getSelectedMapKey(e);i[n]&&(r?i[n]=!1:r=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get("itemSymbol")},t.prototype.getSelectedMapKey=function(e){return"categories"===this._mode?e.value+"":e.index+""},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},t.prototype.setSelected=function(e){this.option.selected=cs(e)},t.prototype.getValueState=function(e){var t=FP.findPieceIndex(e,this._pieceList);return null!=t&&this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var t=[],n=this._pieceList;return this.eachTargetSeries(function(o){var i=[],r=o.getData();r.each(this.getDataDimensionIndex(r),function(t,o){FP.findPieceIndex(t,n)===e&&i.push(o)},this),t.push({seriesId:o.id,dataIndex:i})},this),t},t.prototype.getRepresentValue=function(e){var t;if(this.isCategory())t=e.value;else if(null!=e.value)t=e.value;else{var n=e.interval||[];t=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return t},t.prototype.getVisualMeta=function(e){if(!this.isCategory()){var t=[],n=["",""],o=this,i=this._pieceList.slice();if(i.length){var r=i[0].interval[0];r!==-1/0&&i.unshift({interval:[-1/0,r]}),(r=i[i.length-1].interval[1])!==1/0&&i.push({interval:[r,1/0]})}else i.push({interval:[-1/0,1/0]});var a=-1/0;return ys(i,function(e){var t=e.interval;t&&(t[0]>a&&l([a,t[0]],"outOfRange"),l(t.slice()),a=t[1])},this),{stops:t,outerColors:n}}function l(i,r){var a=o.getRepresentValue({interval:i});r||(r=o.getValueState(a));var l=e(a,r);i[0]===-1/0?n[0]=l:i[1]===1/0?n[1]=l:t.push({value:i[0],color:l},{value:i[1],color:l})}},t.type="visualMap.piecewise",t.defaultOption=e_(o$.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),t}(o$),N$={splitNumber:function(e){var t=this.option,n=Math.min(t.precision,20),o=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;for(var r=(o[1]-o[0])/i;+r.toFixed(n)!==r&&n<5;)n++;t.precision=n,r=+r.toFixed(n),t.minOpen&&e.push({interval:[-1/0,o[0]],close:[0,0]});for(var a=0,l=o[0];a<i;l+=r,a++){var s=a===i-1?o[1]:l+r;e.push({interval:[l,s],close:[1,1]})}t.maxOpen&&e.push({interval:[o[1],1/0],close:[0,0]}),Np(e),ys(e,function(e,t){e.index=t,e.text=this.formatValueText(e.interval)},this)},categories:function(e){var t=this.option;ys(t.categories,function(t){e.push({text:this.formatValueText(t,!0),value:t})},this),E$(t,e)},pieces:function(e){var t=this.option;ys(t.pieces,function(t,n){Ns(t)||(t={value:t});var o={text:"",index:n};if(null!=t.label&&(o.text=t.label),t.hasOwnProperty("value")){var i=o.value=t.value;o.interval=[i,i],o.close=[1,1]}else{for(var r=o.interval=[],a=o.close=[0,0],l=[1,0,1],s=[-1/0,1/0],u=[],c=0;c<2;c++){for(var d=[["gte","gt","min"],["lte","lt","max"]][c],h=0;h<3&&null==r[c];h++)r[c]=t[d[h]],a[c]=l[h],u[c]=2===h;null==r[c]&&(r[c]=s[c])}u[0]&&r[1]===1/0&&(a[0]=0),u[1]&&r[0]===-1/0&&(a[1]=0),"production"!==process.env.NODE_ENV&&(r[0],r[1]),r[0]===r[1]&&a[0]&&a[1]&&(o.value=r[0])}o.visual=FP.retrieveVisuals(t),e.push(o)},this),E$(t,e),Np(e),ys(e,function(e){var t=e.close,n=[["<","≤"][t[1]],[">","≥"][t[0]]];e.text=e.text||this.formatValueText(null!=e.value?e.value:e.interval,!1,n)},this)}};function E$(e,t){var n=e.inverse;("vertical"===e.orient?!n:n)&&t.reverse()}var A$=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Wl(t,e),t.prototype.doRender=function(){var e=this.group;e.removeAll();var t=this.visualMapModel,n=t.get("textGap"),o=t.textStyleModel,i=o.getFont(),r=o.getTextColor(),a=this._getItemAlign(),l=t.itemSize,s=this._getViewData(),u=s.endsText,c=Bs(t.get("showLabel",!0),!u),d=!t.get("selectedMode");u&&this._renderEndsText(e,u[0],l,c,a),ys(s.viewPieceList,function(o){var s=o.piece,u=new lp;u.onclick=Ss(this._onItemClick,this,s),this._enableHoverLink(u,o.indexInModelPieceList);var h=t.getRepresentValue(s);if(this._createItemSymbol(u,h,[0,0,l[0],l[1]],d),c){var p=this.visualMapModel.getValueState(h);u.add(new mv({style:{x:"right"===a?-n:l[0]+n,y:l[1]/2,text:s.text,verticalAlign:"middle",align:a,font:i,fill:r,opacity:"outOfRange"===p?.5:1},silent:d}))}e.add(u)},this),u&&this._renderEndsText(e,u[1],l,c,a),J_(t.get("orient"),e,t.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,t){var n=this;e.on("mouseover",function(){return o("highlight")}).on("mouseout",function(){return o("downplay")});var o=function(e){var o=n.visualMapModel;o.option.hoverLink&&n.api.dispatchAction({type:e,batch:c$(o.findTargetDataIndices(t),o)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if("vertical"===t.orient)return u$(e,this.api,e.itemSize);var n=t.align;return n&&"auto"!==n||(n="left"),n},t.prototype._renderEndsText=function(e,t,n,o,i){if(t){var r=new lp,a=this.visualMapModel.textStyleModel;r.add(new mv({style:Dx(a,{x:o?"right"===i?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:o?i:"center",text:t})})),e.add(r)}},t.prototype._getViewData=function(){var e=this.visualMapModel,t=xs(e.getPieceList(),function(e,t){return{piece:e,indexInModelPieceList:t}}),n=e.get("text"),o=e.get("orient"),i=e.get("inverse");return("horizontal"===o?i:!i)?t.reverse():n&&(n=n.slice().reverse()),{viewPieceList:t,endsText:n}},t.prototype._createItemSymbol=function(e,t,n,o){var i=yM(this.getControllerVisual(t,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(t,"color"));i.silent=o,e.add(i)},t.prototype._onItemClick=function(e){var t=this.visualMapModel,n=t.option,o=n.selectedMode;if(o){var i=cs(n.selected),r=t.getSelectedMapKey(e);"single"===o||!0===o?(i[r]=!0,ys(i,function(e,t){i[t]=t===r})):i[r]=!i[r],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:i})}},t.type="visualMap.piecewise",t}(l$);function L$(e){e.registerComponentModel(D$),e.registerComponentView(A$),I$(e)}var V$={label:{enabled:!0},decal:{show:!1}},O$=uf(),P$={};function B$(e,t){var n=e.getModel("aria");if(n.get("enabled")){var o=cs(V$);ds(o.label,e.getLocaleModel().get("aria"),!1),ds(n.option,o,!1),function(){if(n.getModel("decal").get("show")){var t=qs();e.eachSeries(function(e){if(!e.isColorBySeries()){var n=t.get(e.type);n||(n={},t.set(e.type,n)),O$(e).scope=n}}),e.eachRawSeries(function(t){if(!e.isSeriesFiltered(t))if(Ts(t.enableAriaDecal))t.enableAriaDecal();else{var n=t.getData();if(t.isColorBySeries()){var o=Ow(t.ecModel,t.name,P$,e.getSeriesCount()),i=n.getVisual("decal");n.setVisual("decal",u(i,o))}else{var r=t.getRawData(),a={},l=O$(t).scope;n.each(function(e){var t=n.getRawIndex(e);a[t]=e});var s=r.count();r.each(function(e){var o=a[e],i=r.getName(e)||e+"",c=Ow(t.ecModel,i,l,s),d=n.getItemVisual(o,"decal");n.setItemVisual(o,"decal",u(d,c))})}}function u(e,t){var n=e?ps(ps({},t),e):t;return n.dirty=!0,n}})}}(),function(){var o=t.getZr().dom;if(!o)return;var r=e.getLocaleModel().get("aria"),a=n.getModel("label");if(a.option=fs(a.option,r),!a.get("enabled"))return;if(o.setAttribute("role","img"),a.get("description"))return void o.setAttribute("aria-label",a.get("description"));var l,s=e.getSeriesCount(),u=a.get(["data","maxCount"])||10,c=a.get(["series","maxCount"])||10,d=Math.min(s,c);if(s<1)return;var h=function(){var t=e.get("title");t&&t.length&&(t=t[0]);return t&&t.text}();l=h?i(a.get(["general","withTitle"]),{title:h}):a.get(["general","withoutTitle"]);var p=[];l+=i(s>1?a.get(["series","multiple","prefix"]):a.get(["series","single","prefix"]),{seriesCount:s}),e.eachSeries(function(t,n){if(n<d){var o=void 0,r=t.get("name")?"withName":"withoutName";o=i(o=s>1?a.get(["series","multiple",r]):a.get(["series","single",r]),{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:(_=t.subType,w=e.getLocaleModel().get(["series","typeNames"]),w[_]||w.chart)});var l=t.getData();if(l.count()>u)o+=i(a.get(["data","partialData"]),{displayCnt:u});else o+=a.get(["data","allData"]);for(var c=a.get(["data","separator","middle"]),h=a.get(["data","separator","end"]),f=a.get(["data","excludeDimensionId"]),g=[],v=0;v<l.count();v++)if(v<u){var m=l.getName(v),y=f?ws(l.getValues(v),function(e,t){return-1===gs(f,t)}):l.getValues(v),x=a.get(["data",m?"withName":"withoutName"]);g.push(i(x,{name:m,value:y.join(c)}))}o+=g.join(c)+h,p.push(o)}var _,w});var f=a.getModel(["series","multiple","separator"]),g=f.get("middle"),v=f.get("end");l+=p.join(g)+v,o.setAttribute("aria-label",l)}()}function i(e,t){if(!Is(e))return e;var n=e;return ys(t,function(e,t){n=n.replace(new RegExp("\\{\\s*"+t+"\\s*\\}","g"),e)}),n}}function R$(e){if(e&&e.aria){var t=e.aria;null!=t.show&&(t.enabled=t.show),t.label=t.label||{},ys(["description","general","series","data"],function(e){null!=t[e]&&(t.label[e]=t[e])})}}var z$={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},F$=function(){function e(e){if(null==(this._condVal=Is(e)?new RegExp(e):Os(e)?e:null)){var t="";"production"!==process.env.NODE_ENV&&(t=Wp("Illegal regexp",e,"in")),Up(t)}}return e.prototype.evaluate=function(e){var t=typeof e;return Is(t)?this._condVal.test(e):!!Ds(t)&&this._condVal.test(e+"")},e}(),G$=function(){function e(){}return e.prototype.evaluate=function(){return this.value},e}(),H$=function(){function e(){}return e.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(!e[t].evaluate())return!1;return!0},e}(),W$=function(){function e(){}return e.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(e[t].evaluate())return!0;return!1},e}(),U$=function(){function e(){}return e.prototype.evaluate=function(){return!this.child.evaluate()},e}(),Y$=function(){function e(){}return e.prototype.evaluate=function(){for(var e=!!this.valueParser,t=(0,this.getValue)(this.valueGetterParam),n=e?this.valueParser(t):null,o=0;o<this.subCondList.length;o++)if(!this.subCondList[o].evaluate(e?n:t))return!1;return!0},e}();function Z$(e,t){if(!0===e||!1===e){var n=new G$;return n.value=e,n}var o="";return j$(e)||("production"!==process.env.NODE_ENV&&(o=Wp("Illegal config. Expect a plain object but actually",e)),Up(o)),e.and?X$("and",e,t):e.or?X$("or",e,t):e.not?function(e,t){var n=e.not,o="";"production"!==process.env.NODE_ENV&&(o=Wp('"not" condition should only be `not: {}`.',"Illegal condition:",e));j$(n)||Up(o);var i=new U$;i.child=Z$(n,t),i.child||Up(o);return i}(e,t):function(e,t){for(var n="",o=t.prepareGetValue(e),i=[],r=bs(e),a=e.parser,l=a?Jb(a):null,s=0;s<r.length;s++){var u=r[s];if("parser"!==u&&!t.valueGetterAttrMap.get(u)){var c=eu(z$,u)?z$[u]:u,d=e[u],h=l?l(d):d,p=oS(c,h)||"reg"===c&&new F$(h);p||("production"!==process.env.NODE_ENV&&(n=Wp('Illegal relational operation: "'+u+'" in condition:',e)),Up(n)),i.push(p)}}i.length||("production"!==process.env.NODE_ENV&&(n=Wp("Relational condition must have at least one operator.","Illegal condition:",e)),Up(n));var f=new Y$;return f.valueGetterParam=o,f.valueParser=l,f.getValue=t.getValue,f.subCondList=i,f}(e,t)}function X$(e,t,n){var o=t[e],i="";"production"!==process.env.NODE_ENV&&(i=Wp('"and"/"or" condition should only be `'+e+": [...]` and must not be empty array.","Illegal condition:",t)),Ms(o)||Up(i),o.length||Up(i);var r="and"===e?new H$:new W$;return r.children=xs(o,function(e){return Z$(e,n)}),r.children.length||Up(i),r}function j$(e){return Ns(e)&&!ms(e)}var $$=function(){function e(e,t){this._cond=Z$(e,t)}return e.prototype.evaluate=function(){return this._cond.evaluate()},e}();var q$={type:"echarts:filter",transform:function(e){for(var t,n,o,i=e.upstream,r=(n=e.config,o={valueGetterAttrMap:qs({dimension:!0}),prepareGetValue:function(e){var t="",n=e.dimension;eu(e,"dimension")||("production"!==process.env.NODE_ENV&&(t=Wp('Relation condition must has prop "dimension" specified.',"Illegal condition:",e)),Up(t));var o=i.getDimensionInfo(n);return o||("production"!==process.env.NODE_ENV&&(t=Wp("Can not find dimension info via: "+n+".\n","Existing dimensions: ",i.cloneAllDimensionInfo(),".\n","Illegal condition:",e,".\n")),Up(t)),{dimIdx:o.index}},getValue:function(e){return i.retrieveValueFromItem(t,e.dimIdx)}},new $$(n,o)),a=[],l=0,s=i.count();l<s;l++)t=i.getRawDataItem(l),r.evaluate()&&a.push(t);return{data:a}}},K$="";"production"!==process.env.NODE_ENV&&(K$=["Valid config is like:",'{ dimension: "age", order: "asc" }','or [{ dimension: "age", order: "asc"], { dimension: "date", order: "desc" }]'].join(" "));var J$={type:"echarts:sort",transform:function(e){var t=e.upstream,n=e.config,o="",i=jp(n);i.length||("production"!==process.env.NODE_ENV&&(o="Empty `config` in sort transform."),Up(o));var r=[];ys(i,function(e){var n=e.dimension,i=e.order,a=e.parser,l=e.incomparable;if(null==n&&("production"!==process.env.NODE_ENV&&(o='Sort transform config must has "dimension" specified.'+K$),Up(o)),"asc"!==i&&"desc"!==i&&("production"!==process.env.NODE_ENV&&(o='Sort transform config must has "order" specified.'+K$),Up(o)),l&&"min"!==l&&"max"!==l){var s="";"production"!==process.env.NODE_ENV&&(s='incomparable must be "min" or "max" rather than "'+l+'".'),Up(s)}if("asc"!==i&&"desc"!==i){var u="";"production"!==process.env.NODE_ENV&&(u='order must be "asc" or "desc" rather than "'+i+'".'),Up(u)}var c=t.getDimensionInfo(n);c||("production"!==process.env.NODE_ENV&&(o=Wp("Can not find dimension info via: "+n+".\n","Existing dimensions: ",t.cloneAllDimensionInfo(),".\n","Illegal config:",e,".\n")),Up(o));var d=a?Jb(a):null;a&&!d&&("production"!==process.env.NODE_ENV&&(o=Wp("Invalid parser name "+a+".\n","Illegal config:",e,".\n")),Up(o)),r.push({dimIdx:c.index,parser:d,comparator:new tS(i,l)})});var a=t.sourceFormat;a!==hw&&a!==pw&&("production"!==process.env.NODE_ENV&&(o='sourceFormat "'+a+'" is not supported yet'),Up(o));for(var l=[],s=0,u=t.count();s<u;s++)l.push(t.getRawDataItem(s));return l.sort(function(e,n){for(var o=0;o<r.length;o++){var i=r[o],a=t.retrieveValueFromItem(e,i.dimIdx),l=t.retrieveValueFromItem(n,i.dimIdx);i.parser&&(a=i.parser(a),l=i.parser(l));var s=i.comparator.evaluate(a,l);if(0!==s)return s}return 0}),{data:l}}};var Q$=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dataset",t}return Wl(t,e),t.prototype.init=function(t,n,o){e.prototype.init.call(this,t,n,o),this._sourceManager=new CS(this),MS(this)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),MS(this)},t.prototype.optionUpdated=function(){this._sourceManager.dirty()},t.prototype.getSourceManager=function(){return this._sourceManager},t.type="dataset",t.defaultOption={seriesLayoutBy:mw},t}(aw),eq=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dataset",t}return Wl(t,e),t.type="dataset",t}(nC);var tq=Og.CMD;function nq(e,t){return Math.abs(e-t)<1e-5}function oq(e){var t,n,o,i,r,a=e.data,l=e.len(),s=[],u=0,c=0,d=0,h=0;function p(e,n){t&&t.length>2&&s.push(t),t=[e,n]}function f(e,n,o,i){nq(e,o)&&nq(n,i)||t.push(e,n,o,i,o,i)}function g(e,n,o,i,r,a){var l=Math.abs(n-e),s=4*Math.tan(l/4)/3,u=n<e?-1:1,c=Math.cos(e),d=Math.sin(e),h=Math.cos(n),p=Math.sin(n),f=c*r+o,g=d*a+i,v=h*r+o,m=p*a+i,y=r*s*u,x=a*s*u;t.push(f-y*d,g+x*c,v+y*p,m-x*h,v,m)}for(var v=0;v<l;){var m=a[v++],y=1===v;switch(y&&(d=u=a[v],h=c=a[v+1],m!==tq.L&&m!==tq.C&&m!==tq.Q||(t=[d,h])),m){case tq.M:u=d=a[v++],c=h=a[v++],p(d,h);break;case tq.L:f(u,c,n=a[v++],o=a[v++]),u=n,c=o;break;case tq.C:t.push(a[v++],a[v++],a[v++],a[v++],u=a[v++],c=a[v++]);break;case tq.Q:n=a[v++],o=a[v++],i=a[v++],r=a[v++],t.push(u+2/3*(n-u),c+2/3*(o-c),i+2/3*(n-i),r+2/3*(o-r),i,r),u=i,c=r;break;case tq.A:var x=a[v++],_=a[v++],w=a[v++],b=a[v++],S=a[v++],C=a[v++]+S;v+=1;var M=!a[v++];n=Math.cos(S)*w+x,o=Math.sin(S)*b+_,y?p(d=n,h=o):f(u,c,n,o),u=Math.cos(C)*w+x,c=Math.sin(C)*b+_;for(var T=(M?-1:1)*Math.PI/2,I=S;M?I>C:I<C;I+=T){g(I,M?Math.max(I+T,C):Math.min(I+T,C),x,_,w,b)}break;case tq.R:d=u=a[v++],h=c=a[v++],n=d+a[v++],o=h+a[v++],p(n,h),f(n,h,n,o),f(n,o,d,o),f(d,o,d,h),f(d,h,n,h);break;case tq.Z:t&&f(u,c,d,h),u=d,c=h}}return t&&t.length>2&&s.push(t),s}function iq(e,t,n,o,i,r,a,l,s,u){if(nq(e,n)&&nq(t,o)&&nq(i,a)&&nq(r,l))s.push(a,l);else{var c=2/u,d=c*c,h=a-e,p=l-t,f=Math.sqrt(h*h+p*p);h/=f,p/=f;var g=n-e,v=o-t,m=i-a,y=r-l,x=g*g+v*v,_=m*m+y*y;if(x<d&&_<d)s.push(a,l);else{var w=h*g+p*v,b=-h*m-p*y;if(x-w*w<d&&w>=0&&_-b*b<d&&b>=0)s.push(a,l);else{var S=[],C=[];jc(e,n,i,a,.5,S),jc(t,o,r,l,.5,C),iq(S[0],C[0],S[1],C[1],S[2],C[2],S[3],C[3],s,u),iq(S[4],C[4],S[5],C[5],S[6],C[6],S[7],C[7],s,u)}}}}function rq(e,t,n){var o=e[t],i=e[1-t],r=Math.abs(o/i),a=Math.ceil(Math.sqrt(r*n)),l=Math.floor(n/a);0===l&&(l=1,a=n);for(var s=[],u=0;u<a;u++)s.push(l);var c=n-a*l;if(c>0)for(u=0;u<c;u++)s[u%a]+=1;return s}function aq(e,t,n){for(var o=e.r0,i=e.r,r=e.startAngle,a=e.endAngle,l=Math.abs(a-r),s=l*i,u=i-o,c=s>Math.abs(u),d=rq([s,u],c?0:1,t),h=(c?l:u)/d.length,p=0;p<d.length;p++)for(var f=(c?u:l)/d[p],g=0;g<d[p];g++){var v={};c?(v.startAngle=r+h*p,v.endAngle=r+h*(p+1),v.r0=o+f*g,v.r=o+f*(g+1)):(v.startAngle=r+f*g,v.endAngle=r+f*(g+1),v.r0=o+h*p,v.r=o+h*(p+1)),v.clockwise=e.clockwise,v.cx=e.cx,v.cy=e.cy,n.push(v)}}function lq(e,t,n,o){return e*o-n*t}function sq(e,t,n,o,i,r,a,l){var s=n-e,u=o-t,c=a-i,d=l-r,h=lq(c,d,s,u);if(Math.abs(h)<1e-6)return null;var p=lq(e-i,t-r,c,d)/h;return p<0||p>1?null:new tc(p*s+e,p*u+t)}function uq(e,t,n){var o=new tc;tc.sub(o,n,t),o.normalize();var i=new tc;return tc.sub(i,e,t),i.dot(o)}function cq(e,t){var n=e[e.length-1];n&&n[0]===t[0]&&n[1]===t[1]||e.push(t)}function dq(e){var t=e.points,n=[],o=[];cg(t,n,o);var i=new cc(n[0],n[1],o[0]-n[0],o[1]-n[1]),r=i.width,a=i.height,l=i.x,s=i.y,u=new tc,c=new tc;return r>a?(u.x=c.x=l+r/2,u.y=s,c.y=s+a):(u.y=c.y=s+a/2,u.x=l,c.x=l+r),function(e,t,n){for(var o=e.length,i=[],r=0;r<o;r++){var a=e[r],l=e[(r+1)%o],s=sq(a[0],a[1],l[0],l[1],t.x,t.y,n.x,n.y);s&&i.push({projPt:uq(s,t,n),pt:s,idx:r})}if(i.length<2)return[{points:e},{points:e}];i.sort(function(e,t){return e.projPt-t.projPt});var u=i[0],c=i[i.length-1];if(c.idx<u.idx){var d=u;u=c,c=d}var h=[u.pt.x,u.pt.y],p=[c.pt.x,c.pt.y],f=[h],g=[p];for(r=u.idx+1;r<=c.idx;r++)cq(f,e[r].slice());for(cq(f,p),cq(f,h),r=c.idx+1;r<=u.idx+o;r++)cq(g,e[r%o].slice());return cq(g,h),cq(g,p),[{points:f},{points:g}]}(t,u,c)}function hq(e,t,n,o){if(1===n)o.push(t);else{var i=Math.floor(n/2),r=e(t);hq(e,r[0],i,o),hq(e,r[1],n-i,o)}return o}function pq(e,t){t.setStyle(e.style),t.z=e.z,t.z2=e.z2,t.zlevel=e.zlevel}function fq(e,t){var n,o=[],i=e.shape;switch(e.type){case"rect":!function(e,t,n){for(var o=e.width,i=e.height,r=o>i,a=rq([o,i],r?0:1,t),l=r?"width":"height",s=r?"height":"width",u=r?"x":"y",c=r?"y":"x",d=e[l]/a.length,h=0;h<a.length;h++)for(var p=e[s]/a[h],f=0;f<a[h];f++){var g={};g[u]=h*d,g[c]=f*p,g[l]=d,g[s]=p,g.x+=e.x,g.y+=e.y,n.push(g)}}(i,t,o),n=fv;break;case"sector":aq(i,t,o),n=hy;break;case"circle":aq({r0:0,r:i.r,startAngle:0,endAngle:2*Math.PI,cx:i.cx,cy:i.cy},t,o),n=hy;break;default:var r=e.getComputedTransform(),a=r?Math.sqrt(Math.max(r[0]*r[0]+r[1]*r[1],r[2]*r[2]+r[3]*r[3])):1,l=xs(function(e,t){var n=oq(e),o=[];t=t||1;for(var i=0;i<n.length;i++){var r=n[i],a=[],l=r[0],s=r[1];a.push(l,s);for(var u=2;u<r.length;){var c=r[u++],d=r[u++],h=r[u++],p=r[u++],f=r[u++],g=r[u++];iq(l,s,c,d,h,p,f,g,a,t),l=f,s=g}o.push(a)}return o}(e.getUpdatedPathProxy(),a),function(e){return function(e){for(var t=[],n=0;n<e.length;)t.push([e[n++],e[n++]]);return t}(e)}),s=l.length;if(0===s)hq(dq,{points:l[0]},t,o);else if(s===t)for(var u=0;u<s;u++)o.push({points:l[u]});else{var c=0,d=xs(l,function(e){var t=[],n=[];cg(e,t,n);var o=(n[1]-t[1])*(n[0]-t[0]);return c+=o,{poly:e,area:o}});d.sort(function(e,t){return t.area-e.area});var h=t;for(u=0;u<s;u++){var p=d[u];if(h<=0)break;var f=u===s-1?h:Math.ceil(p.area/c*t);f<0||(hq(dq,{points:p.poly},f,o),h-=f)}}n=my}if(!n)return function(e,t){for(var n=[],o=0;o<t;o++)n.push(Xm(e));return n}(e,t);var g=[];for(u=0;u<o.length;u++){var v=new n;v.setShape(o[u]),pq(e,v),g.push(v)}return g}function gq(e,t){var n=e.length,o=t.length;if(n===o)return[e,t];for(var i=[],r=[],a=n<o?e:t,l=Math.min(n,o),s=Math.abs(o-n)/6,u=(l-2)/6,c=Math.ceil(s/u)+1,d=[a[0],a[1]],h=s,p=2;p<l;){var f=a[p-2],g=a[p-1],v=a[p++],m=a[p++],y=a[p++],x=a[p++],_=a[p++],w=a[p++];if(h<=0)d.push(v,m,y,x,_,w);else{for(var b=Math.min(h,c-1)+1,S=1;S<=b;S++){var C=S/b;jc(f,v,y,_,C,i),jc(g,m,x,w,C,r),f=i[3],g=r[3],d.push(i[1],r[1],i[2],r[2],f,g),v=i[5],m=r[5],y=i[6],x=r[6]}h-=b-1}}return a===e?[d,t]:[e,d]}function vq(e,t){for(var n=e.length,o=e[n-2],i=e[n-1],r=[],a=0;a<t.length;)r[a++]=o,r[a++]=i;return r}function mq(e){for(var t=0,n=0,o=0,i=e.length,r=0,a=i-2;r<i;a=r,r+=2){var l=e[a],s=e[a+1],u=e[r],c=e[r+1],d=l*c-u*s;t+=d,n+=(l+u)*d,o+=(s+c)*d}return 0===t?[e[0]||0,e[1]||0]:[n/t/3,o/t/3,t]}function yq(e,t,n,o){for(var i=(e.length-2)/6,r=1/0,a=0,l=e.length,s=l-2,u=0;u<i;u++){for(var c=6*u,d=0,h=0;h<l;h+=2){var p=0===h?c:(c+h-2)%s+2,f=e[p]-n[0],g=e[p+1]-n[1],v=t[h]-o[0]-f,m=t[h+1]-o[1]-g;d+=v*v+m*m}d<r&&(r=d,a=u)}return a}function xq(e){for(var t=[],n=e.length,o=0;o<n;o+=2)t[o]=e[n-o-2],t[o+1]=e[n-o-1];return t}function _q(e){return e.__isCombineMorphing}var wq="__mOriginal_";function bq(e,t,n){var o=wq+t,i=e[o]||e[t];e[o]||(e[o]=e[t]);var r=n.replace,a=n.after,l=n.before;e[t]=function(){var e,t=arguments;return l&&l.apply(this,t),e=r?r.apply(this,t):i.apply(this,t),a&&a.apply(this,t),e}}function Sq(e,t){var n=wq+t;e[n]&&(e[t]=e[n],e[n]=null)}function Cq(e,t){for(var n=0;n<e.length;n++)for(var o=e[n],i=0;i<o.length;){var r=o[i],a=o[i+1];o[i++]=t[0]*r+t[2]*a+t[4],o[i++]=t[1]*r+t[3]*a+t[5]}}function Mq(e,t){var n=e.getUpdatedPathProxy(),o=t.getUpdatedPathProxy(),i=function(e,t){for(var n,o,i,r=[],a=[],l=0;l<Math.max(e.length,t.length);l++){var s=e[l],u=t[l],c=void 0,d=void 0;s?u?(o=c=(n=gq(s,u))[0],i=d=n[1]):(d=vq(i||s,s),c=s):(c=vq(o||u,u),d=u),r.push(c),a.push(d)}return[r,a]}(oq(n),oq(o)),r=i[0],a=i[1],l=e.getComputedTransform(),s=t.getComputedTransform();l&&Cq(r,l),s&&Cq(a,s),bq(t,"updateTransform",{replace:function(){this.transform=null}}),t.transform=null;var u=function(e,t,n,o){for(var i,r=[],a=0;a<e.length;a++){var l=e[a],s=t[a],u=mq(l),c=mq(s);null==i&&(i=u[2]<0!=c[2]<0);var d=[],h=[],p=0,f=1/0,g=[],v=l.length;i&&(l=xq(l));for(var m=6*yq(l,s,u,c),y=v-2,x=0;x<y;x+=2){var _=(m+x)%y+2;d[x+2]=l[_]-u[0],d[x+3]=l[_+1]-u[1]}d[0]=l[m]-u[0],d[1]=l[m+1]-u[1];for(var w=o/n,b=-o/2;b<=o/2;b+=w){var S=Math.sin(b),C=Math.cos(b),M=0;for(x=0;x<l.length;x+=2){var T=d[x],I=d[x+1],k=s[x]-c[0],D=s[x+1]-c[1],N=k*C-D*S,E=k*S+D*C;g[x]=N,g[x+1]=E;var A=N-T,L=E-I;M+=A*A+L*L}if(M<f){f=M,p=b;for(var V=0;V<g.length;V++)h[V]=g[V]}}r.push({from:d,to:h,fromCp:u,toCp:c,rotation:-p})}return r}(r,a,10,Math.PI),c=[];bq(t,"buildPath",{replace:function(e){for(var n=t.__morphT,o=1-n,i=[],r=0;r<u.length;r++){var a=u[r],l=a.from,s=a.to,d=a.rotation*n,h=a.fromCp,p=a.toCp,f=Math.sin(d),g=Math.cos(d);vu(i,h,p,n);for(var v=0;v<l.length;v+=2){var m=l[v],y=l[v+1],x=m*o+(S=s[v])*n,_=y*o+(C=s[v+1])*n;c[v]=x*g-_*f+i[0],c[v+1]=x*f+_*g+i[1]}var w=c[0],b=c[1];e.moveTo(w,b);for(v=2;v<l.length;){var S=c[v++],C=c[v++],M=c[v++],T=c[v++],I=c[v++],k=c[v++];w===S&&b===C&&M===I&&T===k?e.lineTo(I,k):e.bezierCurveTo(S,C,M,T,I,k),w=I,b=k}}}})}function Tq(e,t,n){if(!e||!t)return t;var o=n.done,i=n.during;return Mq(e,t),t.__morphT=0,t.animateTo({__morphT:1},fs({during:function(e){t.dirtyShape(),i&&i(e)},done:function(){Sq(t,"buildPath"),Sq(t,"updateTransform"),t.__morphT=-1,t.createPathProxy(),t.dirtyShape(),o&&o()}},n)),t}function Iq(e,t,n,o,i,r){e=i===n?0:Math.round(32767*(e-n)/(i-n)),t=r===o?0:Math.round(32767*(t-o)/(r-o));for(var a,l=0,s=32768;s>0;s/=2){var u=0,c=0;(e&s)>0&&(u=1),(t&s)>0&&(c=1),l+=s*s*(3*u^c),0===c&&(1===u&&(e=s-1-e,t=s-1-t),a=e,e=t,t=a)}return l}function kq(e){var t=1/0,n=1/0,o=-1/0,i=-1/0,r=xs(e,function(e){var r=e.getBoundingRect(),a=e.getComputedTransform(),l=r.x+r.width/2+(a?a[4]:0),s=r.y+r.height/2+(a?a[5]:0);return t=Math.min(l,t),n=Math.min(s,n),o=Math.max(l,o),i=Math.max(s,i),[l,s]});return xs(r,function(r,a){return{cp:r,z:Iq(r[0],r[1],t,n,o,i),path:e[a]}}).sort(function(e,t){return e.z-t.z}).map(function(e){return e.path})}function Dq(e){return fq(e.path,e.count)}function Nq(e){return Ms(e[0])}function Eq(e,t){for(var n=[],o=e.length,i=0;i<o;i++)n.push({one:e[i],many:[]});for(i=0;i<t.length;i++){var r=t[i].length,a=void 0;for(a=0;a<r;a++)n[a%o].many.push(t[i][a])}var l=0;for(i=o-1;i>=0;i--)if(!n[i].many.length){var s=n[l].many;if(s.length<=1){if(!l)return n;l=0}r=s.length;var u=Math.ceil(r/2);n[i].many=s.slice(u,r),n[l].many=s.slice(0,u),l++}return n}var Aq={clone:function(e){for(var t=[],n=1-Math.pow(1-e.path.style.opacity,1/e.count),o=0;o<e.count;o++){var i=Xm(e.path);i.setStyle("opacity",n),t.push(i)}return t},split:null};function Lq(e,t,n,o,i,r){if(e.length&&t.length){var a=Gy("update",o,i);if(a&&a.duration>0){var l,s,u=o.getModel("universalTransition").get("delay"),c=Object.assign({setToFinal:!0},a);Nq(e)&&(l=e,s=t),Nq(t)&&(l=t,s=e);for(var d=l?l===e:e.length>t.length,h=l?Eq(s,l):Eq(d?t:e,[d?e:t]),p=0,f=0;f<h.length;f++)p+=h[f].many.length;var g=0;for(f=0;f<h.length;f++)v(h[f],d,g,p),g+=h[f].many.length}}function v(e,t,o,i,a){var l=e.many,s=e.one;if(1!==l.length||a)for(var d=fs({dividePath:Aq[n],individualDelay:u&&function(e,t,n,r){return u(e+o,i)}},c),h=t?function(e,t,n){var o=[];!function e(t){for(var n=0;n<t.length;n++){var i=t[n];_q(i)?e(i.childrenRef()):i instanceof nv&&o.push(i)}}(e);var i=o.length;if(!i)return{fromIndividuals:[],toIndividuals:[],count:0};var r=(n.dividePath||Dq)({path:t,count:i});if(r.length!==i)return{fromIndividuals:[],toIndividuals:[],count:0};o=kq(o),r=kq(r);for(var a=n.done,l=n.during,s=n.individualDelay,u=new zh,c=0;c<i;c++){var d=o[c],h=r[c];h.parent=t,h.copyTransform(u),s||Mq(d,h)}function p(e){for(var t=0;t<r.length;t++)r[t].addSelfToZr(e)}function f(){t.__isCombineMorphing=!1,t.__morphT=-1,t.childrenRef=null,Sq(t,"addSelfToZr"),Sq(t,"removeSelfFromZr")}t.__isCombineMorphing=!0,t.childrenRef=function(){return r},bq(t,"addSelfToZr",{after:function(e){p(e)}}),bq(t,"removeSelfFromZr",{after:function(e){for(var t=0;t<r.length;t++)r[t].removeSelfFromZr(e)}});var g=r.length;if(s){var v=g,m=function(){0===--v&&(f(),a&&a())};for(c=0;c<g;c++){var y=s?fs({delay:(n.delay||0)+s(c,g,o[c],r[c]),done:m},n):n;Tq(o[c],r[c],y)}}else t.__morphT=0,t.animateTo({__morphT:1},fs({during:function(e){for(var n=0;n<g;n++){var o=r[n];o.__morphT=t.__morphT,o.dirtyShape()}l&&l(e)},done:function(){f();for(var t=0;t<e.length;t++)Sq(e[t],"updateTransform");a&&a()}},n));return t.__zr&&p(t.__zr),{fromIndividuals:o,toIndividuals:r,count:g}}(l,s,d):function(e,t,n){var o=t.length,i=[],r=n.dividePath||Dq;if(_q(e)){!function e(t){for(var n=0;n<t.length;n++){var o=t[n];_q(o)?e(o.childrenRef()):o instanceof nv&&i.push(o)}}(e.childrenRef());var a=i.length;if(a<o)for(var l=0,s=a;s<o;s++)i.push(Xm(i[l++%a]));i.length=o}else{i=r({path:e,count:o});var u=e.getComputedTransform();for(s=0;s<i.length;s++)i[s].setLocalTransform(u);if(i.length!==o)return{fromIndividuals:[],toIndividuals:[],count:0}}i=kq(i),t=kq(t);var c=n.individualDelay;for(s=0;s<o;s++){var d=c?fs({delay:(n.delay||0)+c(s,o,i[s],t[s])},n):n;Tq(i[s],t[s],d)}return{fromIndividuals:i,toIndividuals:t,count:t.length}}(s,l,d),p=h.fromIndividuals,f=h.toIndividuals,g=p.length,m=0;m<g;m++){y=u?fs({delay:u(m,g)},c):c;r(p[m],f[m],t?l[m]:e.one,t?e.one:l[m],y)}else{var y,x=t?l[0]:s,_=t?s:l[0];if(_q(x))v({many:[x],one:_},!0,o,i,!0);else Tq(x,_,y=u?fs({delay:u(o,i)},c):c),r(x,_,x,_,y)}}}function Vq(e){if(!e)return[];if(Ms(e)){for(var t=[],n=0;n<e.length;n++)t.push(Vq(e[n]));return t}var o=[];return e.traverse(function(e){e instanceof nv&&!e.disableMorphing&&!e.invisible&&!e.ignore&&o.push(e)}),o}var Oq=uf();function Pq(e,t,n,o){var i=function(e,t){for(var n=e.dimensions,o=0;o<n.length;o++){var i=e.getDimensionInfo(n[o]);if(i&&0===i.otherDims[t])return n[o]}}(e,o?"itemChildGroupId":"itemGroupId");if(i){var r=function(e,t,n){var o=e.getDimensionInfo(n),i=o&&o.ordinalMeta;if(o){var r=e.get(o.name,t);return i&&i.categories[r]||r+""}}(e,t,i);return r}var a=e.getRawDataItem(t),l=o?"childGroupId":"groupId";return a&&a[l]?a[l]+"":o?void 0:n||e.getId(t)}function Bq(e){var t=[];return ys(e,function(e){var n=e.data,o=e.dataGroupId;if(n.count()>1e4)"production"!==process.env.NODE_ENV&&zp("Universal transition is disabled on large data > 10k.");else for(var i=n.getIndices(),r=0;r<i.length;r++)t.push({data:n,groupId:Pq(n,r,o,!1),childGroupId:Pq(n,r,o,!0),divide:e.divide,dataIndex:r})}),t}function Rq(e,t,n){e.traverse(function(e){e instanceof nv&&Uy(e,{style:{opacity:0}},t,{dataIndex:n,isFrom:!0})})}function zq(e){if(e.parent){var t=e.getComputedTransform();e.setLocalTransform(t),e.parent.remove(e)}}function Fq(e){e.stopAnimation(),e.isGroup&&e.traverse(function(e){e.stopAnimation()})}function Gq(e,t,n){var o=Gy("update",n,t);o&&e.traverse(function(e){if(e instanceof Qf){var t=function(e){return Fy(e).oldStyle}(e);t&&e.animateFrom({style:t},o)}})}function Hq(e,t,n){var o=Bq(e),i=Bq(t);function r(e,t,n,o,i){(n||e)&&t.animateFrom({style:n&&n!==e?ps(ps({},n.style),e.style):e.style},i)}var a=!1,l=0,s=qs(),u=qs();o.forEach(function(e){e.groupId&&s.set(e.groupId,!0),e.childGroupId&&u.set(e.childGroupId,!0)});for(var c=0;c<i.length;c++){var d=i[c].groupId;if(u.get(d)){l=1;break}var h=i[c].childGroupId;if(h&&s.get(h)){l=2;break}}function p(e,t){return function(n){var o=n.data,i=n.dataIndex;return t?o.getId(i):e?1===l?n.childGroupId:n.groupId:2===l?n.childGroupId:n.groupId}}var f=function(e,t){var n=e.length;if(n!==t.length)return!1;for(var o=0;o<n;o++){var i=e[o],r=t[o];if(i.data.getId(i.dataIndex)!==r.data.getId(r.dataIndex))return!1}return!0}(o,i),g={};if(!f)for(c=0;c<i.length;c++){var v=i[c],m=v.data.getItemGraphicEl(v.dataIndex);m&&(g[m.id]=!0)}function y(e,t){var n=o[t],l=i[e],s=l.data.hostModel,u=n.data.getItemGraphicEl(n.dataIndex),c=l.data.getItemGraphicEl(l.dataIndex);u!==c?u&&g[u.id]||c&&(Fq(c),u?(Fq(u),zq(u),a=!0,Lq(Vq(u),Vq(c),l.divide,s,e,r)):Rq(c,s,e)):c&&Gq(c,l.dataIndex,s)}new rI(o,i,p(!0,f),p(!1,f),null,"multiple").update(y).updateManyToOne(function(e,t){var n=i[e],l=n.data,s=l.hostModel,u=l.getItemGraphicEl(n.dataIndex),c=ws(xs(t,function(e){return o[e].data.getItemGraphicEl(o[e].dataIndex)}),function(e){return e&&e!==u&&!g[e.id]});u&&(Fq(u),c.length?(ys(c,function(e){Fq(e),zq(e)}),a=!0,Lq(Vq(c),Vq(u),n.divide,s,e,r)):Rq(u,s,n.dataIndex))}).updateOneToMany(function(e,t){var n=o[t],l=n.data.getItemGraphicEl(n.dataIndex);if(!l||!g[l.id]){var s=ws(xs(e,function(e){return i[e].data.getItemGraphicEl(i[e].dataIndex)}),function(e){return e&&e!==l}),u=i[e[0]].data.hostModel;s.length&&(ys(s,function(e){return Fq(e)}),l?(Fq(l),zq(l),a=!0,Lq(Vq(l),Vq(s),n.divide,u,e[0],r)):ys(s,function(t){return Rq(t,u,e[0])}))}}).updateManyToMany(function(e,t){new rI(t,e,function(e){return o[e].data.getId(o[e].dataIndex)},function(e){return i[e].data.getId(i[e].dataIndex)}).update(function(n,o){y(e[n],t[o])}).execute()}).execute(),a&&ys(t,function(e){var t=e.data.hostModel,o=t&&n.getViewOfSeriesModel(t),i=Gy("update",t,0);o&&t.isAnimationEnabled()&&i&&i.duration>0&&o.group.traverse(function(e){e instanceof nv&&!e.animators.length&&e.animateFrom({style:{opacity:0}},i)})})}function Wq(e){var t=e.getModel("universalTransition").get("seriesKey");return t||e.id}function Uq(e){return Ms(e)?e.sort().join(","):e}function Yq(e){if(e.hostModel)return e.hostModel.getModel("universalTransition").get("divideShape")}function Zq(e,t){for(var n=0;n<e.length;n++){if(null!=t.seriesIndex&&t.seriesIndex===e[n].seriesIndex||null!=t.seriesId&&t.seriesId===e[n].id)return n}}nI([function(e){e.registerPainter("canvas",_E)}]),nI([function(e){e.registerPainter("svg",pE)}]),nI([function(e){e.registerChartView(tA),e.registerSeriesModel(wE),e.registerLayout(nA("line",!0)),e.registerVisual({seriesType:"line",reset:function(e){var t=e.getData(),n=e.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=t.getVisual("style").fill),t.setVisual("legendLineStyle",n)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,rA("line"))},function(e){e.registerChartView(gA),e.registerSeriesModel(lA),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,Cs(uk,"bar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,ck("bar")),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,rA("bar")),e.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,t){var n=e.componentType||"series";t.eachComponent({mainType:n,query:e},function(t){e.sortInfo&&t.axis.setCategorySortInfo(e.sortInfo)})})},function(e){e.registerChartView(UA),e.registerSeriesModel(jA),iM("pie",e.registerAction),e.registerLayout(Cs(OA,"pie")),e.registerProcessor(BA("pie")),e.registerProcessor({seriesType:"pie",reset:function(e,t){var n=e.getData();n.filterSelf(function(e){var t=n.mapDimension("value"),o=n.get(t,e);return!(Ds(o)&&!isNaN(o)&&o<0)})}})},function(e){nI(jL),e.registerSeriesModel($A),e.registerChartView(QA),e.registerLayout(nA("scatter"))},function(e){nI(sV),e.registerChartView(QL),e.registerSeriesModel(eV),e.registerLayout($L),e.registerProcessor(BA("radar")),e.registerPreprocessor(JL)},function(e){nI(BO),e.registerChartView(yO),e.registerSeriesModel(xO),e.registerLayout(wO),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,_O),iM("map",e.registerAction)},function(e){e.registerChartView($O),e.registerSeriesModel(mP),e.registerLayout(xP),e.registerVisual(_P),function(e){e.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},function(t){var n=e.dataIndex,o=t.getData().tree.getNodeByDataIndex(n);o.isExpand=!o.isExpand})}),e.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,t,n){t.eachComponent({mainType:"series",subType:"tree",query:e},function(t){var o=VO(t.coordinateSystem,e,void 0,n);t.setCenter&&t.setCenter(o.center),t.setZoom&&t.setZoom(o.zoom)})})}(e)},function(e){e.registerSeriesModel(SP),e.registerChartView(PP),e.registerVisual(QP),e.registerLayout(hB),function(e){for(var t=0;t<wP.length;t++)e.registerAction({type:wP[t],update:"updateView"},tu);e.registerAction({type:"treemapRootToNode",update:"updateView"},function(e,t){t.eachComponent({mainType:"series",subType:"treemap",query:e},function(t,n){var o=pP(e,["treemapZoomToNode","treemapRootToNode"],t);if(o){var i=t.getViewRoot();i&&(e.direction=gP(i,o.node)?"rollUp":"drillDown"),t.resetViewRoot(o.node)}})})}(e)},function(e){e.registerChartView(pR),e.registerSeriesModel(_R),e.registerProcessor(yB),e.registerVisual(xB),e.registerVisual(wB),e.registerLayout(EB),e.registerLayout(e.PRIORITY.VISUAL.POST_CHART_LAYOUT,zB),e.registerLayout(GB),e.registerCoordinateSystem("graphView",{dimensions:SO.dimensions,create:HB}),e.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},tu),e.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},tu),e.registerAction(wR,function(e,t,n){t.eachComponent({mainType:"series",query:e},function(t){var o=VO(t.coordinateSystem,e,void 0,n);t.setCenter&&t.setCenter(o.center),t.setZoom&&t.setZoom(o.zoom)})})},function(e){e.registerChartView(MR),e.registerSeriesModel(TR)},function(e){e.registerChartView(DR),e.registerSeriesModel(NR),e.registerLayout(ER),e.registerProcessor(BA("funnel"))},function(e){nI(iF),e.registerChartView(AR),e.registerSeriesModel(RR),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,GR)},function(e){e.registerChartView(lF),e.registerSeriesModel(uF),e.registerLayout(cF),e.registerVisual(bF),e.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(t){t.setNodePosition(e.dataIndex,[e.localX,e.localY])})})},function(e){e.registerSeriesModel(CF),e.registerChartView(MF),e.registerLayout(AF),e.registerTransform(LF)},function(e){e.registerChartView(WF),e.registerSeriesModel(eG),e.registerPreprocessor(tG),e.registerVisual(GF),e.registerLayout(nG)},function(e){e.registerChartView(aG),e.registerSeriesModel(lG),e.registerLayout(nA("effectScatter"))},function(e){e.registerChartView(gG),e.registerSeriesModel(xG),e.registerLayout(fG),e.registerVisual(wG)},function(e){e.registerChartView(CG),e.registerSeriesModel(MG)},function(e){e.registerChartView(DG),e.registerSeriesModel(XG),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,Cs(uk,"pictorialBar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,ck("pictorialBar"))},function(e){e.registerChartView(jG),e.registerSeriesModel($G),e.registerLayout(qG),e.registerProcessor(BA("themeRiver"))},function(e){e.registerChartView(tH),e.registerSeriesModel(nH),e.registerLayout(Cs(rH,"sunburst")),e.registerProcessor(Cs(BA,"sunburst")),e.registerVisual(lH),function(e){e.registerAction({type:QG,update:"updateView"},function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},function(t,n){var o=pP(e,[QG],t);if(o){var i=t.getViewRoot();i&&(e.direction=gP(i,o.node)?"rollUp":"drillDown"),t.resetViewRoot(o.node)}})}),e.registerAction({type:eH,update:"none"},function(e,t,n){e=ps({},e),t.eachComponent({mainType:"series",subType:"sunburst",query:e},function(t){var n=pP(e,[eH],t);n&&(e.dataIndex=n.node.dataIndex)}),"production"!==process.env.NODE_ENV&&Hp("sunburstHighlight","highlight"),n.dispatchAction(ps(e,{type:"highlight"}))}),e.registerAction({type:"sunburstUnhighlight",update:"updateView"},function(e,t,n){e=ps({},e),"production"!==process.env.NODE_ENV&&Hp("sunburstUnhighlight","downplay"),n.dispatchAction(ps(e,{type:"downplay"}))})}(e)},function(e){e.registerChartView(iW),e.registerSeriesModel(dH)}]),nI(function(e){nI(jL),nI(rU)}),nI(function(e){nI(rU),PL.registerAxisPointerClass("PolarAxisPointer",aU),e.registerCoordinateSystem("polar",_U),e.registerComponentModel(sU),e.registerComponentView(PU),lL(e,"angle",cU,VU),lL(e,"radius",dU,OU),e.registerComponentView(MU),e.registerComponentView(DU),e.registerLayout(Cs(LU,"bar"))}),nI(BO),nI(function(e){nI(rU),PL.registerAxisPointerClass("SingleAxisPointer",qU),e.registerComponentView(eY),e.registerComponentView(FU),e.registerComponentModel(HU),lL(e,"single",HU,HU.defaultOption),e.registerCoordinateSystem("single",XU)}),nI(iF),nI(function(e){e.registerComponentModel(tY),e.registerComponentView(oY),e.registerCoordinateSystem("calendar",rY)}),nI(function(e){e.registerComponentModel(dY),e.registerComponentView(fY),e.registerPreprocessor(function(e){var t=e.graphic;Ms(t)?t[0]&&t[0].elements?e.graphic=[e.graphic[0]]:e.graphic=[{elements:t}]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}),nI(function(e){e.registerComponentModel(GY),e.registerComponentView(WY),zY("saveAsImage",UY),zY("magicType",XY),zY("dataView",eZ),zY("dataZoom",bZ),zY("restore",rZ),nI(PY)}),nI(function(e){nI(rU),e.registerComponentModel(MZ),e.registerComponentView(HZ),e.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},tu),e.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},tu)}),nI(rU),nI(function(e){e.registerComponentView(cX),e.registerComponentModel(dX),e.registerPreprocessor(XZ),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,rX),e.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(t){t.setAreas(e.areas)})}),e.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},tu),e.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},tu),zY("brush",fX)}),nI(function(e){e.registerComponentModel(gX),e.registerComponentView(vX)}),nI(function(e){e.registerComponentModel(yX),e.registerComponentView(SX),e.registerSubTypeDefaulter("timeline",function(){return"slider"}),function(e){e.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(e,t,n){var o=t.getComponent("timeline");return o&&null!=e.currentIndex&&(o.setCurrentIndex(e.currentIndex),!o.get("loop",!0)&&o.isIndexMax()&&o.getPlayState()&&(o.setPlayState(!1),n.dispatchAction({type:"timelinePlayChange",playState:!1,from:e.from}))),t.resetOption("timeline",{replaceMerge:o.get("replaceMerge",!0)}),fs({currentIndex:o.option.currentIndex},e)}),e.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(e,t){var n=t.getComponent("timeline");n&&null!=e.playState&&n.setPlayState(e.playState)})}(e),e.registerPreprocessor(TX)}),nI(function(e){e.registerComponentModel(LX),e.registerComponentView(YX),e.registerPreprocessor(function(e){DX(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}),nI(function(e){e.registerComponentModel(ZX),e.registerComponentView(QX),e.registerPreprocessor(function(e){DX(e.series,"markLine")&&(e.markLine=e.markLine||{})})}),nI(function(e){e.registerComponentModel(ej),e.registerComponentView(sj),e.registerPreprocessor(function(e){DX(e.series,"markArea")&&(e.markArea=e.markArea||{})})}),nI(function(e){nI(wj),nI(kj)}),nI(function(e){nI(zj),nI(jj)}),nI(zj),nI(jj),nI(function(e){nI(k$),nI(L$)}),nI(k$),nI(L$),nI(function(e){e.registerPreprocessor(R$),e.registerVisual(e.PRIORITY.VISUAL.ARIA,B$)}),nI(function(e){e.registerTransform(q$),e.registerTransform(J$)}),nI(function(e){e.registerComponentModel(Q$),e.registerComponentView(eq)}),nI(function(e){e.registerUpdateLifecycle("series:beforeupdate",function(e,t,n){ys(jp(n.seriesTransition),function(e){ys(jp(e.to),function(e){for(var t=n.updatedSeries,o=0;o<t.length;o++)(null!=e.seriesIndex&&e.seriesIndex===t[o].seriesIndex||null!=e.seriesId&&e.seriesId===t[o].id)&&(t[o][XS]=!0)})})}),e.registerUpdateLifecycle("series:transition",function(e,t,n){var o=Oq(t);if(o.oldSeries&&n.updatedSeries&&n.optionChanged){var i=n.seriesTransition;if(i)ys(jp(i),function(e){!function(e,t,n,o){var i=[],r=[];ys(jp(e.from),function(e){var n=Zq(t.oldSeries,e);n>=0&&i.push({dataGroupId:t.oldDataGroupIds[n],data:t.oldData[n],divide:Yq(t.oldData[n]),groupIdDim:e.dimension})}),ys(jp(e.to),function(e){var o=Zq(n.updatedSeries,e);if(o>=0){var i=n.updatedSeries[o].getData();r.push({dataGroupId:t.oldDataGroupIds[o],data:i,divide:Yq(i),groupIdDim:e.dimension})}}),i.length>0&&r.length>0&&Hq(i,r,o)}(e,o,n,t)});else{var r=function(e,t){var n=qs(),o=qs(),i=qs();function r(e){n.get(e)&&zp("Duplicated seriesKey in universalTransition "+e)}return ys(e.oldSeries,function(t,n){var r=e.oldDataGroupIds[n],a=e.oldData[n],l=Wq(t),s=Uq(l);o.set(s,{dataGroupId:r,data:a}),Ms(l)&&ys(l,function(e){i.set(e,{key:s,dataGroupId:r,data:a})})}),ys(t.updatedSeries,function(e){if(e.isUniversalTransitionEnabled()&&e.isAnimationEnabled()){var t=e.get("dataGroupId"),a=e.getData(),l=Wq(e),s=Uq(l),u=o.get(s);if(u)"production"!==process.env.NODE_ENV&&r(s),n.set(s,{oldSeries:[{dataGroupId:u.dataGroupId,divide:Yq(u.data),data:u.data}],newSeries:[{dataGroupId:t,divide:Yq(a),data:a}]});else if(Ms(l)){"production"!==process.env.NODE_ENV&&r(s);var c=[];ys(l,function(e){var t=o.get(e);t.data&&c.push({dataGroupId:t.dataGroupId,divide:Yq(t.data),data:t.data})}),c.length&&n.set(s,{oldSeries:c,newSeries:[{dataGroupId:t,data:a,divide:Yq(a)}]})}else{var d=i.get(l);if(d){var h=n.get(d.key);h||(h={oldSeries:[{dataGroupId:d.dataGroupId,data:d.data,divide:Yq(d.data)}],newSeries:[]},n.set(d.key,h)),h.newSeries.push({dataGroupId:t,data:a,divide:Yq(a)})}}}}),n}(o,n);ys(r.keys(),function(e){var n=r.get(e);Hq(n.oldSeries,n.newSeries,t)})}ys(n.updatedSeries,function(e){e[XS]&&(e[XS]=!1)})}for(var a=e.getSeries(),l=o.oldSeries=[],s=o.oldDataGroupIds=[],u=o.oldData=[],c=0;c<a.length;c++){var d=a[c].getData();d.count()<1e4&&(l.push(a[c]),s.push(a[c].get("dataGroupId")),u.push(d))}})}),nI(function(e){e.registerUpdateLifecycle("series:beforeupdate",function(e,t,n){var o=tN(t).labelManager;o||(o=tN(t).labelManager=new eN),o.clearLabels()}),e.registerUpdateLifecycle("series:layoutlabels",function(e,t,n){var o=tN(t).labelManager;n.updatedSeries.forEach(function(e){o.addLabelsOfSeries(t.getViewOfSeriesModel(e))}),o.updateLayoutConfig(t),o.layout(t),o.processLabelsOverall()})});const Xq=n.defineComponent({__name:"EChart",props:{option:{},autoresize:{type:Boolean,default:!0}},setup(e,{expose:t}){const o=e,i=n.ref(),r=n.shallowRef();let a=null;function l(){const e=r.value,t=i.value;if(!e||!t)return;const n=t.clientHeight,a=Math.max(2,Math.floor(n/60)),l={...o.option,yAxis:{...o.option.yAxis??{},splitNumber:a}};e.setOption(l,{notMerge:!0})}return n.onMounted(()=>{i.value&&(r.value=WT(i.value),l(),o.autoresize&&(a=new ResizeObserver(()=>{var e;null==(e=r.value)||e.resize(),l()}),a.observe(i.value)))}),n.watch(()=>o.option,()=>{l()},{deep:!0}),n.onBeforeUnmount(()=>{var e;null==a||a.disconnect(),null==(e=r.value)||e.dispose()}),t({instance:r}),(e,t)=>(n.openBlock(),n.createElementBlock("div",{ref_key:"chartRef",ref:i,style:{width:"100%",height:"100%"}},null,512))}}),jq="#bbc6d9",$q="#96a5be",qq='Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Kq=["#ADDDBC","#89AAF6","#F7B4A9","#CAA4E6","#92D3DC","#FFB3BA","#FFDFBA","#BAFFC9","#BAE1FF","#D8BFD8","#FF6B6B","#4ECDC4","#45B7D1","#96CEB4","#FECA57"];function Jq(e){let t=1,n=0;for(const o of e){const e=o.split("\n");e.length>t&&(t=e.length);for(const t of e)t.length>n&&(n=t.length)}return{maxLines:t,maxLineLen:n}}function Qq(e){const t=e.length;if(0===t)return 0;const{maxLineLen:n}=Jq(e);return t<=6&&n<=8||t<=12&&n<=3?0:t>=30||n>=20?60:45}function eK(e,t,n){if(0===e)return 100;const o=function(e,t){return Math.max(25,7*e+12*(t-1))}(t,n),i=Math.max(20,Math.floor(tK/o*1.3));return e<=i?100:Math.min(100,i/e*100)}const tK=1800;function nK(e){const{chartType:t,xLabels:n,seriesData:o,showTooltip:i=!0,showLegend:r=!1,showDataZoom:a=!1,mini:l=!1,chartMap:s}=e,u={color:$q,fontFamily:qq,fontSize:11},c=Jq(n),d=e.labelLines??c.maxLines,h=eK(n.length,c.maxLineLen,d);return{color:Kq,tooltip:i?{trigger:"axis",axisPointer:{type:"cross",lineStyle:{type:"dashed",width:1}},textStyle:{fontFamily:qq,fontSize:12}}:void 0,legend:r?{type:"scroll",top:0,width:"90%",textStyle:{fontFamily:qq,color:$q},pageTextStyle:{color:"#97A6BF"},pageIconSize:16}:void 0,grid:{left:l?5:15,right:l?5:20,top:l?5:r?40:15,bottom:l?5:a?60:10,containLabel:!l},xAxis:{type:"category",data:n,axisLabel:l?{show:!1}:{...u,hideOverlap:!0,rotate:Qq(n),width:90,overflow:"truncate"},axisTick:l?{show:!1}:{lineStyle:{color:jq}},axisLine:l?{show:!1}:{show:!0,lineStyle:{color:jq}},splitLine:{show:!1}},yAxis:{type:"value",axisLabel:l?{show:!1}:{...u,formatter:e=>e.toLocaleString()},axisLine:l?{show:!1}:{show:!0,lineStyle:{color:jq}},axisTick:l?{show:!1}:{lineStyle:{color:jq}},splitLine:l?{show:!1}:{show:!0,lineStyle:{color:jq,type:"dashed"}}},dataZoom:a?[{type:"slider",xAxisIndex:0,bottom:10,start:0,end:h},{type:"inside",xAxisIndex:0,start:0,end:h,zoomOnMouseWheel:!1,moveOnMouseWheel:"shift"}]:void 0,series:o.map((e,n)=>{const o=null==s?void 0:s[e.name],i=function(e){switch(e){case"bar":return{type:"bar",symbol:"none",showAllSymbol:!1,z:0};case"line":return{type:"line",symbol:"none",showAllSymbol:!1,connectNulls:!0,z:1};case"lineSymbols":return{type:"line",symbol:"emptyCircle",symbolSize:7,showAllSymbol:!1,connectNulls:!0,z:1};case"area":return{type:"line",symbol:"none",showAllSymbol:!1,connectNulls:!0,areaStyle:{},z:0}}}((null==o?void 0:o.type)??t),r=(null==o?void 0:o.color)??Kq[n%Kq.length];return{name:e.name,data:e.data,id:e.name,color:r,emphasis:{focus:"series"},itemStyle:{color:r},...i}}),animation:!l}}const oK=n.defineComponent({__name:"PivotChartMini",props:{xLabels:{},seriesData:{},chartType:{},width:{default:300},height:{default:50},labelLines:{}},setup(e){const t=e,o=n.computed(()=>nK({chartType:t.chartType,xLabels:t.xLabels,seriesData:t.seriesData,showTooltip:!1,showLegend:!1,showDataZoom:!1,mini:!0,labelLines:t.labelLines}));return(e,t)=>(n.openBlock(),n.createBlock(Xq,{option:o.value,style:{width:"100%",height:"100%"},autoresize:""},null,8,["option"]))}}),iK=["data-idx","onClick"],rK=p(n.defineComponent({__name:"PivotChartMultiple",props:{categories:{},xLabels:{},chartType:{},labelLines:{}},emits:["select"],setup(e,{emit:t}){const o=e,i=t,r=n.ref(),a=n.ref([]),l=n.ref([]);let s=null;return n.watch(()=>[o.categories,o.chartType],function(){null==s||s.disconnect(),l.value=o.categories.map(()=>!1),s=new IntersectionObserver(e=>{for(const t of e)if(t.isIntersecting){const e=Number(t.target.dataset.idx);isNaN(e)||(l.value[e]=!0)}},{root:r.value}),n.nextTick(()=>{for(const e of a.value)e&&s.observe(e)})},{immediate:!0,flush:"post"}),n.onBeforeUnmount(()=>null==s?void 0:s.disconnect()),(t,o)=>(n.openBlock(),n.createElementBlock("div",{ref_key:"containerRef",ref:r,class:"moz-multiple-chart"},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.categories,(t,o)=>(n.openBlock(),n.createElementBlock("div",{key:t.name,"data-idx":o,ref_for:!0,ref_key:"itemRefs",ref:a,class:n.normalizeClass(["moz-multiple-chart-item",{"total-item":"Grand Total"===t.name}]),onClick:e=>i("select",t.name)},[n.createElementVNode("span",null,n.toDisplayString(t.name),1),l.value[o]?(n.openBlock(),n.createBlock(oK,{key:0,"x-labels":e.xLabels,"series-data":t.series,"chart-type":e.chartType,"label-lines":e.labelLines,width:325,height:50},null,8,["x-labels","series-data","chart-type","label-lines"])):n.createCommentVNode("",!0)],10,iK))),128))],512))}}),[["__scopeId","data-v-3a931d9e"]]),aK=n.defineComponent({__name:"PivotChartDetail",props:{xLabels:{},seriesData:{},chartType:{},labelLines:{}},setup(e){const t=e,o=n.computed(()=>nK({chartType:t.chartType,xLabels:t.xLabels,seriesData:t.seriesData,showTooltip:!1,showLegend:!0,showDataZoom:t.xLabels.length>10,labelLines:t.labelLines}));return(e,t)=>(n.openBlock(),n.createBlock(Xq,{option:o.value,style:{"margin-top":"16px",width:"100%",height:"100%","min-height":"150px"},autoresize:""},null,8,["option"]))}}),lK={class:"moz-pivot-chart"},sK={key:1,class:"moz-pivot-chart__detail"},uK={key:0,class:"moz-detail-chart-title"},cK=n.defineComponent({__name:"MozPivotChart",props:{grid:{},useMultipleChart:{type:Boolean,default:!0},includeGrandTotal:{type:Boolean,default:!1}},emits:["close"],setup(e,{expose:t,emit:o}){const i=e,r=o,a=n.ref("bar"),l=n.ref(i.useMultipleChart?"multiple":"detail"),s=n.ref(""),u=n.ref([]),c=n.ref([]),d=n.ref([]),h=n.ref(""),p=n.ref("all"),f=n.ref([]),g=n.shallowRef({xLabels:[],categories:[]});async function v(){const e=i.grid.pivot.getPivotMeta();if(!e)return;const t=u.value.map(e=>e.field),n=d.value.map(e=>e.field),o=e.rowFields.map(e=>e.field),r=e.valueFields.map(e=>e.field),a=(e,t)=>e.length===t.length&&e.every(e=>t.includes(e)),l=!a(t,o),s=!a(n,r);u.value=e.rowFields,c.value=e.columnFields,d.value=e.valueFields;const v=l||!o.includes(h.value)?o[0]??"":h.value;let m;if(h.value!==v&&(h.value=v),s||0===f.value.length)m=r;else{const e=f.value.filter(e=>r.includes(e));m=e.length>0?e:r}var y,x;if(y=f.value,x=m,y.length===x.length&&y.every((e,t)=>e===x[t])||(f.value=m),"all"!==p.value){const t=Number(p.value);(!Number.isFinite(t)||t<0||t>=e.columnFields.length)&&(p.value="all")}const _="all"===p.value?void 0:Number(p.value);g.value=await i.grid.pivot.getSeriesData({categoryField:h.value||void 0,columnFieldLevel:_,valueFields:f.value,grandTotals:i.includeGrandTotal?"all":"none"})}let m=[];n.watch(()=>i.grid,e=>{e&&function(e){m.forEach(e=>e()),m=[e.on("data:loaded",()=>v()),e.on("filter:changed",()=>v()),e.on("sort:changed",()=>v())]}(e)},{immediate:!0}),n.onBeforeUnmount(()=>{m.forEach(e=>e()),m=[]}),n.watch([h,p,f],async()=>{if(await v(),"detail"===l.value){const e=g.value.categories[0];s.value=(null==e?void 0:e.name)??""}}),n.onMounted(async()=>{i.grid.pivot.getResult()||await new Promise(e=>setTimeout(e,100)),await v()});const y=n.computed(()=>g.value.categories.find(e=>e.name===s.value)),x=n.computed(()=>{var e;return(null==(e=y.value)?void 0:e.series)??[]}),_=n.computed(()=>("all"===p.value?Math.max(1,c.value.length):1)+(f.value.length>1?1:0));function w(e){s.value=e,l.value="detail"}function b(){l.value="multiple"}function S(e){h.value=e}function C(e){p.value=e}return t({refresh:v}),(t,o)=>(n.openBlock(),n.createElementBlock("div",lK,[n.createVNode(Gl,{"chart-type":a.value,"row-fields":u.value,"column-fields":c.value,"value-fields":d.value,"selected-row-field":h.value,"selected-column-field":p.value,"selected-value-fields":f.value,"show-back":e.useMultipleChart&&"detail"===l.value,"onUpdate:chartType":o[0]||(o[0]=e=>a.value=e),"onUpdate:selectedRowField":S,"onUpdate:selectedColumnField":C,"onUpdate:selectedValueFields":o[1]||(o[1]=e=>f.value=e),onBack:b,onClose:o[2]||(o[2]=e=>r("close"))},null,8,["chart-type","row-fields","column-fields","value-fields","selected-row-field","selected-column-field","selected-value-fields","show-back"]),e.useMultipleChart&&"multiple"===l.value?(n.openBlock(),n.createBlock(rK,{key:0,categories:g.value.categories,"x-labels":g.value.xLabels,"chart-type":a.value,"label-lines":_.value,onSelect:w},null,8,["categories","x-labels","chart-type","label-lines"])):n.createCommentVNode("",!0),"detail"===l.value?(n.openBlock(),n.createElementBlock("div",sK,[s.value?(n.openBlock(),n.createElementBlock("div",uK,[n.createVNode(n.unref(Qt),{color:"#4568e0",width:14,height:14}),n.createTextVNode(" "+n.toDisplayString(s.value),1)])):n.createCommentVNode("",!0),n.createVNode(aK,{"x-labels":g.value.xLabels,"series-data":x.value,"chart-type":a.value,"label-lines":_.value},null,8,["x-labels","series-data","chart-type","label-lines"])])):n.createCommentVNode("",!0)]))}}),dK=p(cK,[["__scopeId","data-v-2c5a902b"]]),hK={style:{border:"1px solid #bbc6d9","box-sizing":"border-box",display:"flex","flex-direction":"column",width:"100%",height:"100%"}},pK={style:{position:"relative"}},fK={class:"moz-pivot-vue-body"},gK={style:{width:"100%",height:"100%",position:"absolute"}},vK={key:1,class:"moz-pivot-empty-wrapper"},mK=n.defineComponent({__name:"MozPivotVue",props:{name:{},data:{},rowFields:{},columnFields:{},valueFields:{},height:{default:"100%"},showRowSubTotals:{type:Boolean,default:!1},showRowGrandTotals:{type:Boolean,default:!0},showColumnSubTotals:{type:Boolean,default:!1},showColumnGrandTotals:{type:Boolean,default:!0},trackSourceRows:{type:Boolean,default:!1},showHeader:{type:Boolean,default:!0},alternatingRows:{type:Boolean,default:!1},tooltipMode:{default:"overflow"},rowSelection:{},cellSelection:{default:()=>({mode:"range"})},cellSelectionImpliesRows:{type:Boolean},useToolBox:{type:Boolean,default:!0},useToolBoxSetting:{type:Boolean,default:!0},useFilter:{type:Boolean,default:!0},useSort:{type:Boolean,default:!0},useCustomCell:{type:Boolean,default:!0},useExtendFooter:{type:Boolean,default:!0},useSummaryFooter:{type:Boolean,default:!1},useContextMenu:{type:Boolean,default:!0},contextMenuConfig:{},useChart:{type:Boolean,default:!1},fields:{},availableFields:{},useMultipleChart:{type:Boolean,default:!0},chartIncludeGrandTotal:{type:Boolean,default:!1},chartMap:{},loading:{type:Boolean},emptyState:{}},emits:["ready","data:loaded","filter:changed","pivot:configured","pivot:toggled","update:rowFields","update:columnFields","update:valueFields"],setup(e,{expose:t,emit:o}){const i=e,{name:a,data:l,fields:u,height:c,loading:d,availableFields:p,rowFields:f,columnFields:g,valueFields:v,showRowSubTotals:m,showRowGrandTotals:y,showColumnSubTotals:x,showColumnGrandTotals:_,trackSourceRows:w}=n.toRefs(i),b=o,S=n.ref([...f.value]),C=n.ref([...g.value]),M=n.ref([...v.value]);function T(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}n.watch(f,e=>{T(e,S.value)||(S.value=[...e])}),n.watch(g,e=>{T(e,C.value)||(C.value=[...e])}),n.watch(v,e=>{T(e,M.value)||(M.value=[...e])});const I=n.computed(()=>S.value.length>0&&M.value.length>0),k=n.ref(),D=n.ref(),N=n.ref(),E=n.ref(),A=n.shallowRef(null);n.provide(z,A);const L=n.shallowRef(null);a.value&&h({name:a,type:"mozPivotGrid",gridInstance:A});const O=n.ref(!1),P=n.ref(50),B=n.ref(),R=n.ref(!0),F=jn(e=>e.activity,"idle",A),G=n.computed(()=>d.value||"loading"===F.value),H=n.ref(!1),W=jn(e=>e.totalRowCount,0,A),U=jn(e=>e.visibleRowCount,0,A),Y=n.computed(()=>{var e;return W.value>0?W.value:(null==(e=l.value)?void 0:e.length)??0}),Z=n.computed(()=>{var e;return(null==(e=k.value)?void 0:e.filterModule.filterList.value.length)??0}),X=n.computed(()=>{var e;return(null==(e=k.value)?void 0:e.sortModule.sortList.value.length)??0}),j=n.computed(()=>{var e;return(null==(e=k.value)?void 0:e.customCellModule.config.value.ruleSets.length)??0}),$=n.ref(null);function q(e){$.value=e??null}n.watch([k,$],([e,t])=>{e&&t?e.setContainer(t):e&&!t&&e.setContainer(null)},{immediate:!0});const K=n.computed(()=>{const e=c.value;return{height:"number"==typeof e?`${e}px`:e,width:"100%"}});function J(){var e,t;const n=(null==(t=null==(e=L.value)?void 0:e.getConfig)?void 0:t.call(e))??null;return{rowFields:S.value,columnFields:C.value,valueFields:M.value,trackSourceRows:w.value,...n?{showRowSubTotals:n.showRowSubTotals,showRowGrandTotals:n.showRowGrandTotals,showColumnSubTotals:n.showColumnSubTotals,showColumnGrandTotals:n.showColumnGrandTotals,showZeros:n.showZeros,rowSubTotalPosition:n.rowSubTotalPosition,rowGrandTotalPosition:n.rowGrandTotalPosition,columnSubTotalPosition:n.columnSubTotalPosition,columnGrandTotalPosition:n.columnGrandTotalPosition,rowSubTotalFields:n.rowSubTotalFields,columnSubTotalFields:n.columnSubTotalFields,rowCollapsible:n.rowCollapsible,columnCollapsible:n.columnCollapsible,rowDisplayMode:n.rowDisplayMode,outlineColumnWidth:n.outlineColumnWidth,outlineIndentSize:n.outlineIndentSize,filterFields:n.filterFields}:{showRowSubTotals:m.value,showRowGrandTotals:y.value,showColumnSubTotals:x.value,showColumnGrandTotals:_.value}}}const Q=n.ref({showRowSubTotals:m.value,showRowGrandTotals:y.value,showColumnSubTotals:x.value,showColumnGrandTotals:_.value,rowSubTotalFields:void 0,columnSubTotalFields:void 0,totalsBeforeData:!1,showZeros:!1,rowCollapsible:!0,columnCollapsible:!0});function ee(e){return void 0===e?"\0ALL":e.join(" ")}let te=null;function ne(e){null==te||te();const t=e.select(e=>e.pivotConfig),n=()=>{const e=t.getSnapshot();if(!e)return;const n=function(e){return{showRowSubTotals:e.showRowSubTotals??!1,showRowGrandTotals:e.showRowGrandTotals??!1,showColumnSubTotals:e.showColumnSubTotals??!1,showColumnGrandTotals:e.showColumnGrandTotals??!1,rowSubTotalFields:e.rowSubTotalFields?[...e.rowSubTotalFields]:e.rowSubTotalFields,columnSubTotalFields:e.columnSubTotalFields?[...e.columnSubTotalFields]:e.columnSubTotalFields,totalsBeforeData:"before"===(e.rowGrandTotalPosition??e.rowSubTotalPosition),showZeros:e.showZeros??!1,rowCollapsible:e.rowCollapsible??!0,columnCollapsible:e.columnCollapsible??!0}}(e);var o,i;o=Q.value,i=n,(o.showRowSubTotals!==i.showRowSubTotals||o.showRowGrandTotals!==i.showRowGrandTotals||o.showColumnSubTotals!==i.showColumnSubTotals||o.showColumnGrandTotals!==i.showColumnGrandTotals||o.totalsBeforeData!==i.totalsBeforeData||o.showZeros!==i.showZeros||o.rowCollapsible!==i.rowCollapsible||o.columnCollapsible!==i.columnCollapsible||ee(o.rowSubTotalFields)!==ee(i.rowSubTotalFields)||ee(o.columnSubTotalFields)!==ee(i.columnSubTotalFields))&&(Q.value=n)};n(),te=t.subscribe(n)}const oe=n.ref(!1);async function ie(e){n.markRaw(e),A.value=e;const t=e.pivot;L.value=t,ne(e);const o=J();try{l.value&&l.value.length>0&&(await t.setConfig(o),oe.value=!0)}catch{oe.value=!1}b("ready",e),b("pivot:configured",o)}async function re(){if(H.value=!0,L.value&&!oe.value)try{const e=J();await L.value.setConfig(e),oe.value=!0}catch{}else if(L.value&&oe.value)try{const e=J();await L.value.setConfig(e)}catch{}b("data:loaded")}function ae(e){b("filter:changed",e)}const le=n.computed(()=>{if(u.value&&u.value.length>0)return u.value.map(e=>({field:e.id,header:e.header??e.id,dataType:e.dataType??"string"}));if(p.value)return p.value;if(!l.value||0===l.value.length)return[];const e=l.value[0],t=new Map;for(const n of[...S.value,...C.value,...M.value])n.header&&t.set(n.field,n.header);return Object.keys(e).map(n=>({field:n,header:t.get(n)??n,dataType:se(e[n])}))});function se(e){return"number"==typeof e?"number":"boolean"==typeof e?"boolean":e instanceof Date?"date":"string"}function ue(e){T(e.rowFields,S.value)||(S.value=[...e.rowFields],b("update:rowFields",S.value)),T(e.columnFields,C.value)||(C.value=[...e.columnFields],b("update:columnFields",C.value)),T(e.valueFields,M.value)||(M.value=[...e.valueFields],b("update:valueFields",M.value))}async function ce(e){if(!L.value)return;const t=e.totalsBeforeData?"before":"after";await L.value.setSubTotals({showRowSubTotals:e.showRowSubTotals,rowSubTotalFields:e.rowSubTotalFields,rowSubTotalPosition:t,showColumnSubTotals:e.showColumnSubTotals,columnSubTotalFields:e.columnSubTotalFields,columnSubTotalPosition:t}),await L.value.setGrandTotals({showRowGrandTotals:e.showRowGrandTotals,rowGrandTotalPosition:t,showColumnGrandTotals:e.showColumnGrandTotals,columnGrandTotalPosition:t});const n=L.value.getConfig();if(n){const t=n.showZeros!==e.showZeros,o=(n.rowCollapsible??!0)!==e.rowCollapsible,i=(n.columnCollapsible??!0)!==e.columnCollapsible;(t||o||i)&&await L.value.setConfig({...n,showZeros:e.showZeros,rowCollapsible:e.rowCollapsible,columnCollapsible:e.columnCollapsible})}}function de(e){if(!L.value)return;const t=M.value,n=e.field;let o=!1;const i=t.map(i=>{const r=s.getValueFieldKey(i,t);return o||r!==n&&i.field!==n?i:(o=!0,{...i,...e.changes})});M.value=i,L.value.setValueFields(i)}const he=()=>{var e;null==(e=N.value)||e.open()},pe=()=>{var e;null==(e=E.value)||e.show()},fe=()=>{var e;0!==Y.value&&(null==(e=k.value)||e.filterModule.showFilterHandler())},ge=()=>{var e;0!==Y.value&&(null==(e=k.value)||e.sortModule.showSortHandler())},ve=()=>{var e;0!==Y.value&&(null==(e=k.value)||e.customCellModule.showCustomCellHandler())},me=()=>{var e,t,n;null==(e=k.value)||e.filterModule.clearFilter(),null==(t=k.value)||t.sortModule.clearSort(),null==(n=k.value)||n.customCellModule.clearCustomCell()},ye=e=>{};return n.watch([S,C,M,m,y,x,_,w],async()=>{var e;if(!L.value)return;if(0===S.value.length||0===M.value.length)return;const t=J(),n=L.value.setConfig(t);b("pivot:configured",t),await n,null==(e=B.value)||e.refresh()}),n.watch(I,e=>{e||(null==te||te(),te=null,A.value=null,L.value=null,oe.value=!1,H.value=!1)}),n.onBeforeUnmount(()=>{null==te||te(),te=null}),t({grid:A,core:k,pivotApi:L,get filterModule(){var e;return null==(e=k.value)?void 0:e.filterModule},get sortModule(){var e;return null==(e=k.value)?void 0:e.sortModule},get customCellModule(){var e;return null==(e=k.value)?void 0:e.customCellModule},refresh:async function(){var e;await(null==(e=A.value)?void 0:e.refresh())},setConfig:function(e){var t;null==(t=L.value)||t.setConfig(e)},getResult:function(){var e;return(null==(e=L.value)?void 0:e.getResult())??null},expandAll:function(){var e;null==(e=L.value)||e.expandAllRows()},collapseAll:function(){var e;null==(e=L.value)||e.collapseAllRows()},expandToLevel:function(e){var t;null==(t=L.value)||t.expandRowToLevel(e)},showChart:O,toggleChart:()=>{O.value=!O.value}}),(t,o)=>{const i=n.resolveDirective("loading");return n.openBlock(),n.createElementBlock("div",{ref_key:"wrapperRef",ref:D,class:"moz-pivot-vue-wrapper",style:n.normalizeStyle(K.value)},[n.createVNode(El,{ref_key:"fieldPanelRef",ref:E,"available-fields":le.value,"row-fields":S.value,"column-fields":C.value,"value-fields":M.value,"total-row-count":n.unref(W),"onUpdate:config":ue},null,8,["available-fields","row-fields","column-fields","value-fields","total-row-count"]),n.renderSlot(t.$slots,"default"),n.createVNode(n.unref(r.SplitPane),{horizontal:!0,style:{overflow:"hidden",flex:"1"}},{default:n.withCtx(()=>[n.createVNode(n.unref(r.Pane),{size:(O.value?100-P.value:100)+"%","min-size":"20"},{default:n.withCtx(()=>{var a,s,u,c,d,h;return[n.createElementVNode("div",hK,[e.useToolBox?(n.openBlock(),n.createBlock(Ua,{key:0,useToolBoxSetting:e.useToolBoxSetting,useFilter:e.useFilter,useSort:e.useSort,useCustomCell:e.useCustomCell,useChart:e.useChart,chartActive:O.value,itemsLength:Y.value,optionModalState:null==(a=N.value)?void 0:a.state,"filter-count":Z.value,"sort-count":X.value,"custom-cell-count":j.value,"onClick:setting":he,"onClick:filter":fe,"onClick:sort":ge,"onClick:chart":o[1]||(o[1]=e=>O.value=!O.value),"onClick:customCell":ve,"onClick:resetAll":me,onChangeSearchValue:ye},{"tool-left":n.withCtx(()=>[n.renderSlot(t.$slots,"tool-left")]),"tool-items":n.withCtx(({props:e})=>[n.renderSlot(t.$slots,"tool-items",{props:e})]),"tool-items-right":n.withCtx(({props:e})=>[n.renderSlot(t.$slots,"tool-items-right",{props:e})]),optionPopup:n.withCtx(()=>[n.createElementVNode("div",pK,[n.createVNode(cl,{ref_key:"optionModalRef",ref:N,"footer-visible":R.value,"onUpdate:footerVisible":o[0]||(o[0]=e=>R.value=e),"value-fields":M.value,"row-fields":S.value,"column-fields":C.value,"show-row-sub-totals":Q.value.showRowSubTotals,"show-row-grand-totals":Q.value.showRowGrandTotals,"show-column-sub-totals":Q.value.showColumnSubTotals,"show-column-grand-totals":Q.value.showColumnGrandTotals,"row-sub-total-fields":Q.value.rowSubTotalFields,"column-sub-total-fields":Q.value.columnSubTotalFields,"totals-before-data":Q.value.totalsBeforeData,"show-zeros":Q.value.showZeros,"row-collapsible":Q.value.rowCollapsible,"column-collapsible":Q.value.columnCollapsible,"onClick:fieldPanel":pe,"onUpdate:gridSettings":ce,"onUpdate:valueField":de},{"custom-options":n.withCtx(({props:e})=>[n.renderSlot(t.$slots,"custom-options",{props:e})]),_:3},8,["footer-visible","value-fields","row-fields","column-fields","show-row-sub-totals","show-row-grand-totals","show-column-sub-totals","show-column-grand-totals","row-sub-total-fields","column-sub-total-fields","totals-before-data","show-zeros","row-collapsible","column-collapsible"])])]),_:3},8,["useToolBoxSetting","useFilter","useSort","useCustomCell","useChart","chartActive","itemsLength","optionModalState","filter-count","sort-count","custom-cell-count"])):n.createCommentVNode("",!0),n.createElementVNode("div",fK,[n.withDirectives(n.createElementVNode("div",gK,null,512),[[i,G.value]]),I.value?(n.openBlock(),n.createBlock(Ve,{key:0,ref_key:"coreRef",ref:k,fields:[],mode:"pivot","pivot-row-fields":S.value,"pivot-column-fields":C.value,"pivot-value-fields":M.value,data:n.unref(l),height:"100%","show-header":e.showHeader,"alternating-rows":e.alternatingRows,"tooltip-mode":e.tooltipMode,"row-selection":e.rowSelection,"cell-selection":e.cellSelection,"cell-selection-implies-rows":e.cellSelectionImpliesRows,onReady:ie,"onData:loaded":re,"onFilter:changed":ae},{default:n.withCtx(()=>[A.value?(n.openBlock(),n.createBlock(Go,{key:0})):n.createCommentVNode("",!0),A.value?(n.openBlock(),n.createBlock(Zo,{key:1})):n.createCommentVNode("",!0),A.value?(n.openBlock(),n.createBlock(ur,{key:2})):n.createCommentVNode("",!0),A.value?(n.openBlock(),n.createBlock(V,{key:3})):n.createCommentVNode("",!0),e.useContextMenu&&A.value?(n.openBlock(),n.createBlock(Ol,{key:4,config:e.contextMenuConfig},null,8,["config"])):n.createCommentVNode("",!0),n.createElementVNode("div",{ref:q,class:"moz-pivot-vue-container"})]),_:1},8,["pivot-row-fields","pivot-column-fields","pivot-value-fields","data","show-header","alternating-rows","tooltip-mode","row-selection","cell-selection","cell-selection-implies-rows"])):n.createCommentVNode("",!0),G.value||!H.value&&I.value||n.unref(W)?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",vK,[n.createVNode(n.unref(r.EmptyState),{"is-read-only":!0,"is-custom-state":null==(s=e.emptyState)?void 0:s.isCustomState,"header-msg":null==(u=e.emptyState)?void 0:u.headerMsg,"content-msg":null==(c=e.emptyState)?void 0:c.contentMsg,"use-img":null==(d=e.emptyState)?void 0:d.useImg,"select-img":null==(h=e.emptyState)?void 0:h.selectImg,"total-row-count":n.unref(W),"filterd-row-count":n.unref(U)},{customState:n.withCtx(()=>[n.renderSlot(t.$slots,"customState")]),_:3},8,["is-custom-state","header-msg","content-msg","use-img","select-img","total-row-count","filterd-row-count"])]))]),e.useExtendFooter&&R.value?(n.openBlock(),n.createBlock(xr,{key:1,"total-row-count":n.unref(W),"filtered-row-count":n.unref(U),"show-aggregates":e.useSummaryFooter},{footer:n.withCtx(()=>[n.renderSlot(t.$slots,"footer")]),_:3},8,["total-row-count","filtered-row-count","show-aggregates"])):n.createCommentVNode("",!0)])]}),_:3},8,["size"]),O.value&&A.value?(n.openBlock(),n.createBlock(n.unref(r.Pane),{key:0,size:`${P.value}%`,"min-size":"20"},{default:n.withCtx(()=>[n.createVNode(dK,{ref_key:"chartRef",ref:B,grid:A.value,"use-multiple-chart":e.useMultipleChart,"include-grand-total":e.chartIncludeGrandTotal,onClose:o[2]||(o[2]=e=>O.value=!1)},null,8,["grid","use-multiple-chart","include-grand-total"])]),_:1},8,["size"])):n.createCommentVNode("",!0)]),_:3})],4)}}});const yK={addedCount:0,modifiedCount:0,deletedCount:0,hasChanges:!1};exports.GridNotificationKey=a.GridNotificationKey,exports.provideGridNotification=a.provideGridNotification,exports.useGridNotificationStore=a.useGridNotificationStore,Object.defineProperty(exports,"ROW_HEADER_COLUMN_ID",{enumerable:!0,get:()=>s.ROW_HEADER_COLUMN_ID}),Object.defineProperty(exports,"UndoStack",{enumerable:!0,get:()=>s.UndoStack}),Object.defineProperty(exports,"getCornerCell",{enumerable:!0,get:()=>s.getCornerCell}),Object.defineProperty(exports,"getRowHeaderCell",{enumerable:!0,get:()=>s.getRowHeaderCell}),exports.useExcelDownloadStore=u.useExcelDownloadStore,exports.useExcelStore=u.useExcelStore,exports.useExcelUploadStore=u.useExcelUploadStore,exports.CellEditor=K,exports.CellTemplate=$,exports.ClientExcelUploadPopup=V,exports.ColumnPicker=Ba,exports.ColumnSettings=La,exports.DetailTemplate=J,exports.Dragging=Mo,exports.GRID_BULK_EDITOR_MODULE_KEY=Z,exports.GRID_CUSTOM_CELL_MODULE_KEY=Y,exports.GRID_FILTER_MODULE_KEY=W,exports.GRID_INSTANCE_KEY=z,exports.GRID_RENDERER_KEY=G,exports.GRID_SORT_MODULE_KEY=U,exports.GRID_TEMPLATE_REGISTRY_KEY=H,exports.GridBulkEditor=dr,exports.GridContextMenu=Dr,exports.GridCustomCell=ur,exports.GridFilter=Go,exports.GridFooter=xr,exports.GridOptionModal=wo,exports.GridSearchInput=io,exports.GridSort=Zo,exports.GridToolBox=fo,exports.GroupTemplate=Q,exports.HeaderTemplate=q,exports.IconAdd=Ue,exports.IconArrowDownWithTail=Xe,exports.IconArrowLeft=qe,exports.IconArrowLeftWithTail=tt,exports.IconArrowRight=at,exports.IconArrowUpCenter=dt,exports.IconArrowUpWithTail=ft,exports.IconChart=yt,exports.IconClose=At,exports.IconCustomCell=Ot,exports.IconDownload=zt,exports.IconDragHandler=Xt,exports.IconFilter=qt,exports.IconInfoFilled=Qt,exports.IconReset=nn,exports.IconResetGridToolbar=ln,exports.IconSearch=hn,exports.IconSetting=vn,exports.IconSort=Sn,exports.IconToastWarning=Dn,exports.MozGrid=j,exports.MozGridVue=ne,exports.MozGridVueCore=Ve,exports.MozPivotVue=oe,exports.PivotContextMenu=Ol,exports.PivotFieldPanel=El,exports.PivotGrid=mK,exports.PivotOptionModal=cl,exports.PivotToolBox=Ua,exports.UserLayoutInstance=c,exports.VueRenderer=O,exports.downloadBlob=function(e,t){const n=URL.createObjectURL(e),o=document.createElement("a");o.href=n,o.download=t,o.style.display="none",document.body.appendChild(o),o.click(),document.body.removeChild(o),setTimeout(()=>URL.revokeObjectURL(n),0)},exports.draggingEventBus=So,exports.exportCsv=Mr,exports.generateSessionId=br,exports.matchPreset=Ar,exports.pickFile=function(e=".xlsx"){return new Promise(t=>{const n=document.createElement("input");n.type="file",n.accept=e,n.style.display="none";let o=!1;const i=()=>{n.parentNode&&n.parentNode.removeChild(n)};n.onchange=()=>{if(o)return;o=!0;const e=n.files&&n.files.length>0?n.files[0]:null;i(),t(e)};const r=()=>{window.removeEventListener("focus",r),setTimeout(()=>{o||(o=!0,i(),t(null))},300)};window.addEventListener("focus",r),document.body.appendChild(n),n.click()})},exports.runClientExport=Sr,exports.useClientExcelStore=x,exports.useColumnFormatter=Vr,exports.useColumnSettings=Nr,exports.useContextMenu=wr,exports.useGridBulkEditor=be,exports.useGridChanges=function(){const{grid:e}=Xn(),t=jn(e=>e.changeVersion,0),o=n.ref({...yK});function i(){var t,n,i;if(e.value)try{const r=e.value.changes,a=r.getAll();o.value={addedCount:(null==(t=a.added)?void 0:t.length)??0,modifiedCount:(null==(n=a.modified)?void 0:n.length)??0,deletedCount:(null==(i=a.deleted)?void 0:i.length)??0,hasChanges:r.hasChanges}}catch{o.value={...yK}}else o.value={...yK}}return n.watch(t,()=>{i()}),n.watch(e,e=>{e?i():o.value={...yK}},{immediate:!0}),{changes:o,getChanges:async function(){return e.value?e.value.changes.getAll():null},clearChanges:function(){var t;null==(t=e.value)||t.changes.discardAll(),i()}}},exports.useGridColumns=function(){const{grid:e}=Xn();return{columnStates:jn(e=>e.columnStates,[]),save:function(){var t;return(null==(t=e.value)?void 0:t.columns.save())??""},load:function(t){var n;null==(n=e.value)||n.columns.load(t)},pinLeft:function(t){var n;null==(n=e.value)||n.columns.pinLeft(t)},pinRight:function(t){var n;null==(n=e.value)||n.columns.pinRight(t)},unpin:function(t){var n;null==(n=e.value)||n.columns.unpin(t)},hide:function(t){var n;null==(n=e.value)||n.columns.hide(t)},show:function(t){var n;null==(n=e.value)||n.columns.show(t)},setWidth:function(t,n){var o;null==(o=e.value)||o.columns.setWidth(t,n)},autoFitAll:function(t){var n;null==(n=e.value)||n.columns.autoFitAll(t)}}},exports.useGridCustomCell=_e,exports.useGridEvents=function(e,t){const{grid:o}=Xn();let i=null;function r(){i&&(i(),i=null)}n.watch(o,n=>{n?(r(),o.value&&(i=o.value.on(e,t))):r()},{immediate:!0}),n.onBeforeUnmount(()=>{r()})},exports.useGridFilter=le,exports.useGridInstance=Xn,exports.useGridSelect=jn,exports.useGridSelection=function(){const{grid:e}=Xn(),t=n.ref([]),o=jn(e=>e.selectedRowCount,0);return n.watch(o,()=>{if(e.value)try{t.value=e.value.rows.getSelectedRowIds()}catch{t.value=[]}else t.value=[]}),n.watch(e,e=>{e||(t.value=[])},{immediate:!0}),{selectedRowIds:t,selectedRowCount:o}},exports.useGridSort=ce,exports.useGridUndoRedo=function(){const{grid:e}=Xn();return{canUndo:jn(e=>e.canUndo,!1),canRedo:jn(e=>e.canRedo,!1),undo:function(){var t;return(null==(t=e.value)?void 0:t.undoManager.undo())??!1},redo:function(){var t;return(null==(t=e.value)?void 0:t.undoManager.redo())??!1},batch:async function(t,n){var o;await(null==(o=e.value)?void 0:o.undoManager.batch(t,n))}}},exports.useGridValidation=function(){const{grid:e}=Xn();return{hasErrors:jn(e=>e.hasValidationErrors,!1),errorCount:jn(e=>e.validationErrorCount,0),validateAll:function(t){var n;return(null==(n=e.value)?void 0:n.validation.validateAll(t))??[]},getErrors:function(){var t;return(null==(t=e.value)?void 0:t.validation.getErrors())??[]},clear:function(){var t;null==(t=e.value)||t.validation.clear()}}},exports.useMaskPresets=Er,exports.useUserLayoutModule=d;
23
+ <input type="file" accept=".xlsx" class="mzc-client-excel-file" hidden @change=${e=>{var t;const o=e.target;this.setFile(null==(t=o.files)?void 0:t[0]),o.value=""}} />
24
+ <div
25
+ class=${i.classMap({"mzc-client-excel-dropzone":!0,"is-active":this.dropActive})}
26
+ role="button"
27
+ tabindex="0"
28
+ aria-label=${e.clientExcelImport}
29
+ @dragover=${e=>{e.preventDefault(),this.dropActive||(this.dropActive=!0,this.update())}}
30
+ @dragleave=${e=>{e.preventDefault(),this.dropActive&&(this.dropActive=!1,this.update())}}
31
+ @drop=${e=>{var t,o;e.preventDefault(),this.dropActive=!1;const l=null==(o=null==(t=e.dataTransfer)?void 0:t.files)?void 0:o[0];l?this.setFile(l):this.update()}}
32
+ @click=${d}
33
+ @keydown=${e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),d(e))}}
34
+ >
35
+ ${n?r.html`
36
+ <svg xmlns="http://www.w3.org/2000/svg" width="89" height="89" viewBox="0 0 89 89" fill="none" aria-hidden="true">
37
+ <circle cx="44.1176" cy="44.1176" r="44.1176" fill="#E1E9FF" />
38
+ <g transform="translate(29.5, 29.5)">
39
+ <g clip-path="url(#mzc-excel-fileupload-clip)">
40
+ <path
41
+ d="M16.755 0H6C4.35 0 3 1.35 3 3V27C3 28.65 4.35 30 6 30H24C25.65 30 27 28.65 27 27V10.245C27 9.45 26.685 8.685 26.115 8.13L18.87 0.885C18.315 0.315 17.55 0 16.755 0ZM21 19.5C21 23.01 17.985 25.815 14.415 25.47C11.295 25.17 9 22.38 9 19.245V11.46C9 9.495 10.41 7.71 12.36 7.515C14.61 7.29 16.5 9.045 16.5 11.25V18C16.5 18.825 15.825 19.5 15 19.5C14.175 19.5 13.5 18.825 13.5 18V11.25C13.5 10.83 13.17 10.5 12.75 10.5C12.33 10.5 12 10.83 12 11.25V19.335C12 20.835 13.02 22.215 14.49 22.455C16.38 22.77 18 21.315 18 19.5V15C18 14.175 18.675 13.5 19.5 13.5C20.325 13.5 21 14.175 21 15V19.5ZM18 7.5V3L24 9H19.5C18.675 9 18 8.325 18 7.5Z"
42
+ fill="#4568E0"
43
+ />
44
+ </g>
45
+ </g>
46
+ <defs>
47
+ <clipPath id="mzc-excel-fileupload-clip">
48
+ <rect width="30" height="30" fill="white" />
49
+ </clipPath>
50
+ </defs>
51
+ </svg>
52
+ `:r.html`
53
+ <svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
54
+ <path
55
+ d="M50 94.1176C74.3655 94.1176 94.1176 74.3655 94.1176 50C94.1176 25.6345 74.3655 5.88232 50 5.88232C25.6345 5.88232 5.88235 25.6345 5.88235 50C5.88235 74.3655 25.6345 94.1176 50 94.1176Z"
56
+ fill="#E1E9FF"
57
+ />
58
+ <g clip-path="url(#mzc-excel-dropzone-clip)">
59
+ <path
60
+ d="M58.9869 37.4184H55.3921V33.8236H58.9869V37.4184ZM62.5817 44.6079H66.1765V41.0132H62.5817V44.6079ZM62.5817 51.7975H66.1765V48.2027H62.5817V51.7975ZM48.2026 66.1766H51.7974V62.5818H48.2026V66.1766ZM41.0131 37.4184H44.6078V33.8236H41.0131V37.4184ZM33.8235 58.987H37.4183V55.3922H33.8235V58.987ZM37.4183 66.1766V62.5818H33.8235C33.8235 64.5589 35.4412 66.1766 37.4183 66.1766ZM62.5817 33.8236V37.4184H66.1765C66.1765 35.4413 64.5588 33.8236 62.5817 33.8236ZM48.2026 37.4184H51.7974V33.8236H48.2026V37.4184ZM33.8235 44.6079H37.4183V41.0132H33.8235V44.6079ZM41.0131 66.1766H44.6078V62.5818H41.0131V66.1766ZM33.8235 51.7975H37.4183V48.2027H33.8235V51.7975ZM33.8235 37.4184H37.4183V33.8236C35.4412 33.8236 33.8235 35.4413 33.8235 37.4184ZM62.0604 59.5083L64.6487 56.92C65.2238 56.3449 64.8104 55.3922 64.0196 55.3922H57.1895C56.201 55.3922 55.3921 56.2011 55.3921 57.1896V64.0017C55.3921 64.8105 56.3627 65.206 56.9199 64.6308L59.5082 62.0426L63.1029 65.6373C63.8039 66.3383 64.9363 66.3383 65.6372 65.6373C66.3382 64.9364 66.3382 63.804 65.6372 63.103L62.0604 59.5083Z"
61
+ fill="#4568E0"
62
+ />
63
+ </g>
64
+ <defs>
65
+ <clipPath id="mzc-excel-dropzone-clip">
66
+ <rect width="43.1373" height="43.1373" fill="white" transform="translate(28.4314 28.4314)" />
67
+ </clipPath>
68
+ </defs>
69
+ </svg>
70
+ `}
71
+ ${this.invalid?r.html`<span class="mzc-client-excel-dropzone__error">${e.excelInvalidExcel}</span>`:r.html`<span class="mzc-client-excel-dropzone__text">${c}</span>`}
72
+ </div>
73
+ </div>
74
+ `}footer(){const e=s.getGridVueLocale();return r.html`
75
+ ${l.button({label:e.check,variant:"primary",disabled:!this.file,onClick:()=>this.confirm()})}
76
+ ${l.button({label:e.cancel,onClick:()=>this.close()})}
77
+ `}confirm(){const e=this.grid,t=this.file;if(!e||!t)return;const o={...this.options};this.close(),this.runBackgroundImport(e,t,o)}async runBackgroundImport(e,t,o){const l=s.getGridVueLocale(),n=this.deps.notificationStore(),r=f(),i=t.name,a=()=>null==n?void 0:n.eventMessages.find(e=>{var t;return(null==(t=e.prop_value)?void 0:t.session_id)===r});n&&n.eventMessages.unshift({noti_type:"progress",header_key:l.clientExcelImportProgress,noti_datetime:v(),noti_sender_id:"",prop_value:{session_id:r,file_name:i,status:"in_progress",progress_per:0,operation_type:"upload",remain_time:-1}});try{const l=e.changes;(null==l?void 0:l.hasChanges)&&await l.discardAll(),await e.io.fromExcel(t,{mode:o.mode,conflictStrategy:o.conflictStrategy,autoCommit:o.autoCommit,onProgress:e=>{const t=a();if(!(null==t?void 0:t.prop_value))return;let o="number"==typeof e.percent?e.percent:void 0;void 0===o&&"number"==typeof e.rowsProcessed&&"number"==typeof e.totalRows&&e.totalRows>0&&(o=e.rowsProcessed/e.totalRows*100),"number"==typeof o&&(t.prop_value.progress_per=Math.min(99,Math.max(0,Math.floor(o))))}});const i=a();(null==i?void 0:i.prop_value)&&(i.prop_value.status="completed",i.prop_value.progress_per=100),n&&setTimeout(()=>{const e=n.eventMessages.findIndex(e=>{var t;return(null==(t=e.prop_value)?void 0:t.session_id)===r});-1!==e&&n.eventMessages.splice(e,1)},2e3)}catch(u){const e=a();(null==e?void 0:e.prop_value)&&(e.prop_value.status="error",e.prop_value.error_message=u instanceof Error?u.message:String(u),e.prop_value.progress_per=0,e.prop_value.remain_time=-1)}}}const y={class:"mzc-client-excel-host",hidden:""},C=o.defineComponent({__name:"ClientExcelUploadPopup",setup(e,{expose:t}){const l=m(),r=n.useGridNotificationStore(),i=new x({notificationStore:()=>r,onHidden:()=>l.hide()});return o.watch(l.showPopup,e=>{if(e){const e=l.activeGrid.value;e&&i.open(e,l.defaultImportOptions.value)}else i.close()},{immediate:!0}),o.onBeforeUnmount(()=>i.destroy()),t({controller:i}),(e,t)=>(o.openBlock(),o.createElementBlock("span",y))}});class _{constructor(){t(this,"instances",new Map),t(this,"appContext",null)}setAppContext(e){this.appContext=e}mount(e,t,l,n={}){const r=this.instances.get(e);if(r)return void Object.assign(r.props,n);const i=o.reactive({...n}),s=o.createApp({render:()=>o.h(l,i)});this.appContext&&(s._context.provides={...this.appContext.provides},s._context.components={...this.appContext.components},s._context.directives={...this.appContext.directives},s._context.config.globalProperties={...this.appContext.config.globalProperties}),this.instances.set(e,{app:s,props:i}),s.mount(t)}mountInstance(e,t,l){const n=o.reactive({...l}),r=o.createApp({render:()=>t(n)});return this.appContext&&(r._context.provides={...this.appContext.provides},r._context.components={...this.appContext.components},r._context.directives={...this.appContext.directives},r._context.config.globalProperties={...this.appContext.config.globalProperties}),r.mount(e),{update:e=>{Object.assign(n,e)},destroy:()=>{r.unmount()}}}updateProps(e,t){const o=this.instances.get(e);o&&Object.assign(o.props,t)}unmount(e){const t=this.instances.get(e);t&&(t.app.unmount(),this.instances.delete(e))}unmountByPrefix(e){for(const t of this.instances.keys())t.startsWith(e)&&this.unmount(t)}unmountAll(){for(const[,e]of this.instances)e.app.unmount();this.instances.clear()}get size(){return this.instances.size}has(e){return this.instances.has(e)}}function w(e,t,o){return e.map(e=>{const l={...e},n=t.get("cell",e.id);if(null==n?void 0:n.slot){const t=n.slot;l.cellRenderer=function(e,t,o){const l=e=>({value:e.value,rowData:e.rowData,columnId:e.columnId,rowId:e.rowId}),n=(e,n)=>{const r=o.mountInstance(e,e=>t(e),l(n));return{update:e=>(r.update(l(e)),!0),destroy(){r.destroy()}}};return n.__cellRendererKind="lifecycle",n}(e.id,t,o)}const r=t.get("header",e.id);if(null==r?void 0:r.slot){const t=r.slot;l.headerRenderer=function(e,t,o){return l=>{const n=document.createElement("div");n.style.display="contents";const r=`header:${e}`,i={columnId:l.columnId,header:l.header};return o.mount(r,n,{render:()=>t(i)},i),n}}(e.id,t,o)}const i=t.get("editor",e.id);if(null==i?void 0:i.slot){const t=i.slot;l.editor=function(e,t,o){return{type:"custom",renderer:l=>{const n=document.createElement("div");n.style.display="contents";const r=`editor:${e}`,i={value:l.value,rowData:l.rowData,columnId:e,onCommit:l.onCommit,onCancel:l.onCancel};return o.mount(r,n,{render:()=>t(i)},i),n},destroy:()=>{o.unmount(`editor:${e}`)}}}(e.id,t,o)}return l})}const S=Symbol("moz-grid-instance"),b=Symbol("moz-grid-container"),M=Symbol("moz-grid-renderer"),E=Symbol("moz-grid-template-registry"),B=Symbol("moz-grid-filter-module"),R=Symbol("moz-grid-sort-module"),k=Symbol("moz-grid-custom-cell-module"),P=Symbol("moz-grid-bulk-editor-module"),T=((e,t)=>{const o=e.__vccOpts||e;for(const[l,n]of t)o[l]=n;return o})(o.defineComponent({__name:"MozGrid",props:o.mergeModels({height:{default:"100%"},contextMenuConfig:{},emptyState:{},locale:{},sourceFields:{},useMultipleChart:{type:Boolean},chartIncludeGrandTotal:{type:Boolean},chartMap:{},useToolBox:{type:Boolean,default:!0},useToolBoxSetting:{type:Boolean,default:!0},useExtendFooter:{type:Boolean,default:!0},useSummaryFooter:{type:Boolean,default:!1},useSort:{type:Boolean,default:!0},useCustomCell:{type:Boolean,default:!0},useContextMenu:{type:Boolean,default:!0},usePivot:{type:Boolean},usePivotBar:{type:Boolean,default:!0},useChart:{type:Boolean},loading:{type:Boolean},useBuiltinTooltip:{type:Boolean,default:!0},name:{}},{coreConfig:{default:()=>({})},coreConfigModifiers:{}}),emits:o.mergeModels(["ready","data:loaded","row:click","row:dblclick","row:pinned","row:unpinned","row:reordered","cell:click","cell:dblclick","cell:change","cell:beforeEdit","cell:editCommitting","cell:editCommitted","cell:tooltip","selection:changed","column:resize","column:reorder","column:pin","column:visibility","sort:changed","header:click","header:sortClick","header:filterClick","filter:changed","scroll","undo:stateChange","clipboard:copy","clipboard:paste","validation:changed","columnGroup:toggle","rowGroup:toggle","rowGroup:batchToggle","contextmenu"],["update:coreConfig"]),setup(e,{expose:t,emit:r}){const i=o.useModel(e,"coreConfig"),a=e,u=r,p=o.ref(),f=o.useSlots(),g=function(){const e=o.getCurrentInstance();if(!e)throw new Error("[MozGridVue] useAppContext는 setup() 내에서만 호출할 수 있습니다.");return e.appContext}(),h=new _,v=function(){const e=o.reactive([]);function t(e,t){return t?`${e}:${t}`:e}return{register(o){const l=e.findIndex(e=>t(e.type,e.fieldId)===t(o.type,o.fieldId));l>=0?e[l]=o:e.push(o)},unregister(o,l){const n=t(o,l),r=e.findIndex(e=>t(e.type,e.fieldId)===n);r>=0&&e.splice(r,1)},get(o,l){const n=t(o,l);return e.find(e=>t(e.type,e.fieldId)===n)},getAll:t=>e.filter(e=>e.type===t)}}(),x=o.shallowRef(null),y=m();s.setGridVueLocale(a.locale),o.watch(()=>a.locale,e=>s.setGridVueLocale(e));const B=o.ref();let R=null;const k=o.ref({disabled:!0,hasItem:!1}),P=n.useGridNotificationStore(),T=e=>String(e).padStart(2,"0"),z=()=>{const e=new Date;return`${e.getFullYear()}-${T(e.getMonth()+1)}-${T(e.getDate())} ${T(e.getHours())}:${T(e.getMinutes())}:${T(e.getSeconds())}`},$=()=>`mzc-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,D=e=>null==P?void 0:P.eventMessages.find(t=>{var o;return(null==(o=t.prop_value)?void 0:o.session_id)===e}),F=e=>{if(!P)return;const t=P.eventMessages.findIndex(t=>{var o;return(null==(o=t.prop_value)?void 0:o.session_id)===e});-1!==t&&P.eventMessages.splice(t,1)};let I=null;const H={onExportStart:e=>{P&&(I=$(),P.eventMessages.unshift({noti_type:"progress",header_key:"text-file_download",noti_datetime:z(),noti_sender_id:"",prop_value:{session_id:I,file_name:e,status:"in_progress",progress_per:0,operation_type:"download",remain_time:-1}}))},onExportProgress:e=>{if(!I)return;const t=D(I);if(!(null==t?void 0:t.prop_value))return;let o="number"==typeof e.percent?e.percent:void 0;void 0===o&&"number"==typeof e.rowsProcessed&&"number"==typeof e.totalRows&&e.totalRows>0&&(o=e.rowsProcessed/e.totalRows*100),"number"==typeof o&&(t.prop_value.progress_per=Math.min(99,Math.max(0,Math.floor(o))))},onExportComplete:e=>{if(!I)return;const t=I,o=D(t);(null==o?void 0:o.prop_value)&&((null==e?void 0:e.fileName)&&(o.prop_value.file_name=e.fileName),o.prop_value.status="completed",o.prop_value.progress_per=100),setTimeout(()=>F(t),2e3),I=null},onExportError:e=>{if(!I)return;const t=D(I);(null==t?void 0:t.prop_value)&&(t.prop_value.status="error",t.prop_value.error_message=e.message,t.prop_value.progress_per=0,t.prop_value.remain_time=-1),I=null},onExportCancel:()=>{I&&(F(I),I=null)},onImportComplete:()=>{if(!P)return;const e=$();P.eventMessages.unshift({noti_type:"progress",header_key:"text-file_upload",noti_datetime:z(),noti_sender_id:"",prop_value:{session_id:e,file_name:"",status:"completed",progress_per:100,operation_type:"upload",remain_time:-1}}),setTimeout(()=>F(e),2e3)},onImportError:e=>{P&&P.eventMessages.unshift({noti_type:"progress",header_key:"text-file_upload",noti_datetime:z(),noti_sender_id:"",prop_value:{session_id:$(),file_name:"",status:"error",error_message:e.message,progress_per:0,operation_type:"upload",remain_time:-1}})},onClientImportOpen:()=>{var e;if(!x.value)return;const t=(null==(e=a.contextMenuConfig)?void 0:e.clientImportOptions)??{};y.show(x.value,t)}};o.provide(E,v),o.provide(M,h),o.provide(S,x),o.provide(b,B);const V=o.computed(()=>{const e=a.height??"100%";return{height:"number"==typeof e?`${e}px`:e,width:"100%"}});function G(e){return t=>{const o={render:()=>{var t,o;return("tool-items"===e?null==(t=f[e])?void 0:t.call(f,k.value):null==(o=f[e])?void 0:o.call(f))??null}},l=`slot:${e}`;return h.mount(l,t,o,{}),()=>h.unmount(l)}}let L,O;function A(){const e={...i.value},t=function(){const e=i.value.fields;return e===L||(L=e,O=e?w(e,v,h):void 0),O}();return t&&(e.fields=t),void 0!==a.locale&&(e.locale=a.locale),e}const U=["row:click","row:dblclick","row:pinned","row:unpinned","row:reordered","cell:click","cell:dblclick","cell:change","cell:beforeEdit","cell:editCommitting","cell:editCommitted","cell:tooltip","selection:changed","column:resize","column:reorder","column:pin","column:visibility","sort:changed","header:click","header:sortClick","header:filterClick","filter:changed","scroll","undo:stateChange","clipboard:copy","clipboard:paste","validation:changed","columnGroup:toggle","rowGroup:toggle","rowGroup:batchToggle","contextmenu"];let j=[];function N(){for(const e of j)try{e()}catch{}j=[]}function Y(){if(!p.value)return null;h.setAppContext(g);const e=new l.GridChrome(p.value,A(),function(){const e=["tool-left","tool-items","option-popup","tool-bottom","notification","footer","empty-state"],t={};for(const o of e)f[o]&&(t[o]=G(o));return{useToolBox:a.useToolBox,useToolBoxSetting:a.useToolBoxSetting,useExtendFooter:a.useExtendFooter,useSummaryFooter:a.useSummaryFooter,useSort:a.useSort,useCustomCell:a.useCustomCell,useContextMenu:a.useContextMenu,useBuiltinTooltip:a.useBuiltinTooltip,usePivot:a.usePivot,usePivotBar:a.usePivotBar,useChart:a.useChart,useMultipleChart:a.useMultipleChart,chartIncludeGrandTotal:a.chartIncludeGrandTotal,chartMap:a.chartMap,loading:a.loading,locale:a.locale,sourceFields:a.sourceFields,contextMenuConfig:a.contextMenuConfig,emptyState:a.emptyState,slots:t,onToolItemsPropsChange:e=>{k.value=e},excelHooks:H}}());R=e,x.value=e.grid,B.value=p.value;const t=u;e.on("data:loaded",()=>u("data:loaded"));for(const o of U)e.on(o,e=>t(o,e));return j.push(e.onConfigChange(()=>{i.value=e.getCoreConfig(i.value),e.syncAppliedConfig(A())})),e}function K(){if(!R)return;const{reinitRequired:e}=R.reconcileCoreConfig(A());e&&async function(){if(!R)return;const e=R.captureReinitState();N(),R.destroy(),R=null,h.unmountAll();const t=Y();if(!t)return;await t.ready(),await t.restoreReinitState(e),k.value=t.getToolItemsProps(),u("ready",t.grid,t)}()}o.onMounted(async()=>{await async function(){const e=Y();e&&(await e.ready(),k.value=e.getToolItemsProps(),u("ready",e.grid,e))}(),o.watch(()=>{const e=i.value;e.data,e.fields;const t={_locale:a.locale};for(const o in e)"data"!==o&&"fields"!==o&&(t[o]=e[o]);return t},()=>K(),{deep:!0}),o.watch(()=>({useToolBox:a.useToolBox,useToolBoxSetting:a.useToolBoxSetting,useExtendFooter:a.useExtendFooter,useSummaryFooter:a.useSummaryFooter,useSort:a.useSort,useCustomCell:a.useCustomCell,useContextMenu:a.useContextMenu,useBuiltinTooltip:a.useBuiltinTooltip,usePivot:a.usePivot,usePivotBar:a.usePivotBar}),e=>null==R?void 0:R.setUIOptions(e)),o.watch(()=>a.loading,e=>null==R?void 0:R.setUIOptions({loading:e}),{immediate:!0}),o.watch(()=>a.sourceFields,e=>null==R?void 0:R.setSourceFields(e),{immediate:!0}),o.watch(()=>a.contextMenuConfig,e=>null==R?void 0:R.setContextMenuConfig(e),{deep:!0})}),o.onBeforeUnmount(()=>{N(),null==R||R.destroy(),R=null,x.value=null,h.unmountAll()}),function(e){const{register:t}=c(),l=new d({id:e.name.value,type:e.type,importDef:async t=>{var o,n,r,i;const s=e.gridInstance.value;if(s){if(!t){const t=l.default;return void(t&&(await s.applyConfig(t),t.customCellConfig&&(null==(o=e.setCustomCellState)||o.call(e,t.customCellConfig)),t.columnFormatConfig&&(null==(n=e.setColumnFormatState)||n.call(e,t.columnFormatConfig))))}await s.applyConfig(t),t.customCellConfig&&(null==(r=e.setCustomCellState)||r.call(e,t.customCellConfig)),t.columnFormatConfig&&(null==(i=e.setColumnFormatState)||i.call(e,t.columnFormatConfig))}},exportDef:()=>{var t,o;const l=e.gridInstance.value;return l?{...l.getConfig(),customCellConfig:(null==(t=e.getCustomCellState)?void 0:t.call(e))??null,columnFormatConfig:(null==(o=e.getColumnFormatState)?void 0:o.call(e))??null}:null}});let n=!1;o.watch(e.gridInstance,r=>{if(!r||n)return;if(!e.name.value)return;const i=r.on("data:loaded",()=>{n||(l.setDefaultToCurrent(),o.nextTick(()=>{t(l),n=!0,i()}))})})}({name:o.toRef(a,"name"),type:"pivot"===i.value.mode?"mozPivotGrid":"mozFlatGrid",gridInstance:x,getCustomCellState:()=>(null==R?void 0:R.customCell.getCustomCell())??null,setCustomCellState:e=>{e&&R&&R.customCell.setCustomCell(e)},getColumnFormatState:()=>(null==R?void 0:R.columnFormat.getConfig())??null,setColumnFormatState:e=>{e&&R&&R.columnFormat.setConfig(e)}});return t(new Proxy({},{get(e,t){if("chrome"===t)return R;const o=R;if(!o)return;const l=o[t];return"function"==typeof l?l.bind(o):l},has:(e,t)=>"chrome"===t||!!R&&t in R})),(e,t)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("div",{ref_key:"hostRef",ref:p,class:"moz-grid-chrome",style:o.normalizeStyle(V.value)},null,4),o.renderSlot(e.$slots,"default",{},void 0,!0),x.value?(o.openBlock(),o.createBlock(C,{key:0})):o.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-eac44841"]]),z=o.defineComponent({name:"CellTemplate",props:{field:{type:String,required:!0}},setup(e){const t=o.inject(E),l=o.useSlots();return t?(o.onMounted(()=>{l.default&&t.register({type:"cell",fieldId:e.field,slot:l.default})}),o.onBeforeUnmount(()=>{t.unregister("cell",e.field)}),()=>null):()=>null}}),$=o.defineComponent({name:"HeaderTemplate",props:{field:{type:String,required:!0}},setup(e){const t=o.inject(E),l=o.useSlots();return t?(o.onMounted(()=>{l.default&&t.register({type:"header",fieldId:e.field,slot:l.default})}),o.onBeforeUnmount(()=>{t.unregister("header",e.field)}),()=>null):()=>null}}),D=o.defineComponent({name:"CellEditor",props:{field:{type:String,required:!0}},setup(e){const t=o.inject(E),l=o.useSlots();return t?(o.onMounted(()=>{l.default&&t.register({type:"editor",fieldId:e.field,slot:l.default})}),o.onBeforeUnmount(()=>{t.unregister("editor",e.field)}),()=>null):()=>null}}),F=o.defineComponent({name:"DetailTemplate",props:{minHeight:{type:Number,default:100},maxHeight:{type:Number},singleExpand:{type:Boolean,default:!1},keepDetailRows:{type:Boolean,default:!0}},setup(e){const t=o.inject(S),l=o.inject(M),n=o.useSlots();return t&&l?(o.onMounted(()=>{const o=t.value;if(!o||!n.default)return;const r=n.default;o.masterDetail.setConfig({minHeight:e.minHeight,maxHeight:e.maxHeight,singleExpand:e.singleExpand,keepMasterDetailRows:e.keepDetailRows,renderer:(e,t,o)=>{const n=`detail:${o}`,i={parentData:t,dataIndex:o};return l.mount(n,e,{render:()=>r(i)},i),()=>{l.unmount(n)}}})}),o.onBeforeUnmount(()=>{null==l||l.unmountByPrefix("detail:")}),()=>null):()=>null}}),I=o.defineComponent({name:"GroupTemplate",setup(){const e=o.inject(S),t=o.inject(M),l=o.useSlots();return e&&t?(o.onMounted(()=>{const o=e.value;if(!o||!l.default)return;const n=l.default;o.formatRow.addHandler("_groupTemplate",e=>{if("group-row"!==e.type)return;const o=e.ctx,l=o.element;if(!l)return;const r=`group:${o.viewIndex}`,i={groupKey:o.column,groupValue:o.value,level:o.level,count:o.itemCount,isExpanded:!o.collapsed};t.mount(r,l,{render:()=>n(i)},i)})}),o.onBeforeUnmount(()=>{var o;null==t||t.unmountByPrefix("group:"),null==(o=e.value)||o.formatRow.removeHandler("_groupTemplate")}),()=>null):()=>null}});let H=!1;function V(e){return e?(Object.prototype.hasOwnProperty.call(e,"formatHeaderRow")||Object.defineProperty(e,"formatHeaderRow",{configurable:!0,get:()=>(H||(H=!0),e.formatHeader)}),e):null}const G=o.defineComponent({__name:"MozGridVue",props:{name:{},useToolBox:{type:Boolean,default:!0},useToolBoxSetting:{type:Boolean,default:!0},useExtendFooter:{type:Boolean,default:!0},useSummaryFooter:{type:Boolean,default:!1},useSort:{type:Boolean,default:!0},useCustomCell:{type:Boolean,default:!0},contextMenuConfig:{default:()=>({})},useContextMenu:{type:Boolean,default:!0},loading:{type:Boolean},emptyState:{},fields:{},data:{},mode:{},pivotRowFields:{},pivotColumnFields:{},pivotValueFields:{},height:{default:"100%"},keyFields:{},theme:{},rowHeight:{},headerHeight:{},showHeader:{type:Boolean,default:!0},resizableColumns:{type:Boolean,default:!0},reorderableColumns:{type:Boolean,default:!0},showRowHeader:{type:[Boolean,Object]},rowHeader:{type:[Boolean,Object]},rowSelection:{},cellSelection:{default:()=>({mode:"range"})},cellSelectionImpliesRows:{type:Boolean},editable:{type:Boolean,default:!1},tooltipMode:{default:"overflow"},alternatingRows:{type:Boolean,default:!0},autoFitColumns:{type:Boolean},dynamicRowHeights:{type:Boolean,default:!1},reorderableRows:{type:Boolean,default:!1},locale:{},engine:{},useWorker:{type:Boolean},loader:{},preventKeyEdit:{type:Boolean,default:!0},showStatusBar:{type:Boolean},showDragHandleColumn:{type:Boolean},undoStack:{},formatRow:{},translations:{},rowStyle:{},headerStyle:{},rowHeightChangeThreshold:{},group:{},columnGroups:{},rowTemplate:{}},emits:["ready","data:loaded","row:click","row:dblclick","row:pinned","row:unpinned","row:reordered","cell:click","cell:dblclick","cell:change","cell:beforeEdit","cell:editCommitting","cell:editCommitted","cell:tooltip","selection:changed","column:resize","column:reorder","column:pin","column:visibility","sort:changed","filter:changed","undo:stateChange","clipboard:copy","clipboard:paste","validation:changed","columnGroup:toggle","scroll","contextmenu"],setup(e,{expose:t,emit:n}){const r=e,i=n,s=o.computed(()=>{const e={...r};for(const t of l.WRAPPER_EXTRA_KEYS)delete e[t];return delete e.name,delete e.locale,e}),a=o.computed(()=>{const e=r,t={};for(const o of l.WRAPPER_EXTRA_KEYS)void 0!==e[o]&&(t[o]=e[o]);return void 0!==e.locale&&(t.locale=e.locale),t}),u=Object.fromEntries(["ready","data:loaded","row:click","row:dblclick","row:pinned","row:unpinned","row:reordered","cell:click","cell:dblclick","cell:change","cell:beforeEdit","cell:editCommitting","cell:editCommitted","cell:tooltip","selection:changed","column:resize","column:reorder","column:pin","column:visibility","sort:changed","filter:changed","undo:stateChange","clipboard:copy","clipboard:paste","validation:changed","columnGroup:toggle","scroll","contextmenu"].map(e=>[e,(...t)=>i(e,...t)]));u.ready=e=>i("ready",V(e));const d=o.ref(null);function c(){return d.value??null}const p={};return Object.defineProperties(p,{grid:{enumerable:!0,get:()=>{var e;return V(null==(e=c())?void 0:e.grid)}},core:{enumerable:!0,get:()=>p},filterModule:{enumerable:!0,get:()=>{var e;return null==(e=c())?void 0:e.filter}},sortModule:{enumerable:!0,get:()=>{var e;return null==(e=c())?void 0:e.sort}},customCellModule:{enumerable:!0,get:()=>{var e;return null==(e=c())?void 0:e.customCell}},bulkEditorModule:{enumerable:!0,get:()=>{var e;return null==(e=c())?void 0:e.bulkEditor}}}),p.refresh=async()=>{var e,t;return null==(t=null==(e=c())?void 0:e.grid)?void 0:t.refresh()},p.loadData=async e=>{var t,o;return null==(o=null==(t=c())?void 0:t.grid)?void 0:o.loadData(e)},p.sort=async e=>{var t,o;return null==(o=null==(t=c())?void 0:t.grid)?void 0:o.sort(e)},p.filter=async e=>{var t,o;return null==(o=null==(t=c())?void 0:t.grid)?void 0:o.filter(e)},t(p),(e,t)=>(o.openBlock(),o.createBlock(T,o.mergeProps({ref_key:"mozRef",ref:d,coreConfig:s.value},a.value,{name:r.name},o.toHandlers(o.unref(u))),o.createSlots({default:o.withCtx(()=>[o.renderSlot(e.$slots,"default")]),_:2},[e.$slots["tool-left"]?{name:"tool-left",fn:o.withCtx(()=>[o.renderSlot(e.$slots,"tool-left")]),key:"0"}:void 0,e.$slots["tool-items"]?{name:"tool-items",fn:o.withCtx(t=>[o.renderSlot(e.$slots,"tool-items",o.normalizeProps(o.guardReactiveProps(t)))]),key:"1"}:void 0,e.$slots.notification?{name:"notification",fn:o.withCtx(()=>[o.renderSlot(e.$slots,"notification")]),key:"2"}:void 0,e.$slots.footer?{name:"footer",fn:o.withCtx(()=>[o.renderSlot(e.$slots,"footer")]),key:"3"}:void 0,e.$slots.customState?{name:"empty-state",fn:o.withCtx(()=>[o.renderSlot(e.$slots,"customState")]),key:"4"}:void 0]),1040,["coreConfig","name"]))}}),L=o.defineComponent({__name:"MozPivotVue",props:{name:{},data:{},rowFields:{},columnFields:{},valueFields:{},height:{default:"100%"},showRowSubTotals:{type:Boolean,default:!1},showRowGrandTotals:{type:Boolean,default:!0},showColumnSubTotals:{type:Boolean,default:!1},showColumnGrandTotals:{type:Boolean,default:!0},trackSourceRows:{type:Boolean,default:!1},showHeader:{type:Boolean,default:!0},alternatingRows:{type:Boolean,default:!1},tooltipMode:{default:"overflow"},rowSelection:{},cellSelection:{default:()=>({mode:"range"})},cellSelectionImpliesRows:{type:Boolean},useToolBox:{type:Boolean,default:!0},useToolBoxSetting:{type:Boolean,default:!0},useFilter:{type:Boolean,default:!0},useSort:{type:Boolean,default:!0},useCustomCell:{type:Boolean,default:!0},useExtendFooter:{type:Boolean,default:!0},useSummaryFooter:{type:Boolean,default:!1},useContextMenu:{type:Boolean,default:!0},contextMenuConfig:{},useChart:{type:Boolean,default:!1},fields:{},availableFields:{},useMultipleChart:{type:Boolean,default:!0},chartIncludeGrandTotal:{type:Boolean,default:!1},chartMap:{},loading:{type:Boolean},emptyState:{}},emits:["ready","data:loaded","filter:changed","pivot:configured","pivot:toggled","update:rowFields","update:columnFields","update:valueFields"],setup(e,{expose:t,emit:n}){const r=e,i=n,s=o.computed(()=>{const e={...r};for(const t of l.WRAPPER_EXTRA_KEYS)delete e[t];return delete e.name,delete e.locale,delete e.availableFields,delete e.useFilter,e.mode="pivot",e}),a=o.computed(()=>{const e=r,t={};for(const o of l.WRAPPER_EXTRA_KEYS)void 0!==e[o]&&(t[o]=e[o]);return void 0!==e.locale&&(t.locale=e.locale),t.sourceFields=e.sourceFields??e.availableFields??e.fields,t}),u=Object.fromEntries(["ready","data:loaded","filter:changed","pivot:toggled"].map(e=>[e,(...t)=>i(e,...t)]));function d(e){var t,o,l;const n=e;i("update:rowFields",n.rowFields??[]),i("update:columnFields",n.columnFields??[]),i("update:valueFields",n.valueFields??[]);const r=null==(l=null==(o=null==(t=p())?void 0:t.pivot)?void 0:o.getRawConfig)?void 0:l.call(o);r&&i("pivot:configured",r)}u.ready=e=>i("ready",V(e));const c=o.ref(null);function p(){return c.value??null}function m(){var e,t;return null==(t=null==(e=p())?void 0:e.grid)?void 0:t.pivot}const f=o.computed({get:()=>{var e,t;return(null==(t=null==(e=p())?void 0:e.chart)?void 0:t.visible)??!1},set:e=>{var t,o;return null==(o=null==(t=p())?void 0:t.chart)?void 0:o.setVisible(e)}}),g={};return Object.defineProperties(g,{grid:{enumerable:!0,get:()=>{var e;return V(null==(e=p())?void 0:e.grid)}},core:{enumerable:!0,get:()=>g},pivotApi:{enumerable:!0,get:()=>m()??null},filterModule:{enumerable:!0,get:()=>{var e;return null==(e=p())?void 0:e.filter}},sortModule:{enumerable:!0,get:()=>{var e;return null==(e=p())?void 0:e.sort}},customCellModule:{enumerable:!0,get:()=>{var e;return null==(e=p())?void 0:e.customCell}},showChart:{enumerable:!0,get:()=>f.value,set:e=>{f.value=e}}}),g.refresh=async()=>{var e,t;return null==(t=null==(e=p())?void 0:e.grid)?void 0:t.refresh()},g.setConfig=async e=>{var t;return null==(t=m())?void 0:t.setConfig(e)},g.getResult=()=>{var e;return(null==(e=m())?void 0:e.getResult())??null},g.expandAll=async()=>{var e;return null==(e=m())?void 0:e.expandAllRows()},g.collapseAll=async()=>{var e;return null==(e=m())?void 0:e.collapseAllRows()},g.expandToLevel=async e=>{var t;return null==(t=m())?void 0:t.expandRowToLevel(e)},g.toggleChart=()=>{f.value=!f.value},t(g),(e,t)=>(o.openBlock(),o.createBlock(T,o.mergeProps({ref_key:"mozRef",ref:c,coreConfig:s.value},a.value,{name:r.name,"onUpdate:coreConfig":d},o.toHandlers(o.unref(u))),o.createSlots({default:o.withCtx(()=>[o.renderSlot(e.$slots,"default")]),_:2},[e.$slots["tool-left"]?{name:"tool-left",fn:o.withCtx(()=>[o.renderSlot(e.$slots,"tool-left")]),key:"0"}:void 0,e.$slots["tool-items"]?{name:"tool-items",fn:o.withCtx(t=>[o.renderSlot(e.$slots,"tool-items",o.normalizeProps(o.guardReactiveProps(t)))]),key:"1"}:void 0,e.$slots.footer?{name:"footer",fn:o.withCtx(()=>[o.renderSlot(e.$slots,"footer")]),key:"2"}:void 0,e.$slots.customState?{name:"empty-state",fn:o.withCtx(()=>[o.renderSlot(e.$slots,"customState")]),key:"3"}:void 0]),1040,["coreConfig","name"]))}});exports.GridNotificationKey=n.GridNotificationKey,exports.provideGridNotification=n.provideGridNotification,exports.useGridNotificationStore=n.useGridNotificationStore,exports.ExcelDataType=s.DataType,exports.FileParameter=s.FileParameter,exports.enUS=s.enUS,exports.getGridVueLocale=s.getGridVueLocale,exports.getGridVueLocaleCode=s.getGridVueLocaleCode,exports.jaJP=s.jaJP,exports.koKR=s.koKR,exports.normalizeGridVueLocale=s.normalizeGridVueLocale,exports.openToast=s.openToast,exports.setGridVueLocale=s.setGridVueLocale,exports.showMessage=s.showMessage,exports.useExcelDownloadStore=s.useExcelDownloadStore,exports.useExcelStore=s.useExcelStore,exports.useExcelUploadStore=s.useExcelUploadStore,exports.zhCN=s.zhCN,Object.defineProperty(exports,"ROW_HEADER_COLUMN_ID",{enumerable:!0,get:()=>u.ROW_HEADER_COLUMN_ID}),Object.defineProperty(exports,"UndoStack",{enumerable:!0,get:()=>u.UndoStack}),Object.defineProperty(exports,"getCornerCell",{enumerable:!0,get:()=>u.getCornerCell}),Object.defineProperty(exports,"getRowHeaderCell",{enumerable:!0,get:()=>u.getRowHeaderCell}),exports.CellEditor=D,exports.CellTemplate=z,exports.ClientExcelUploadController=x,exports.ClientExcelUploadPopup=C,exports.DetailTemplate=F,exports.GRID_BULK_EDITOR_MODULE_KEY=P,exports.GRID_CUSTOM_CELL_MODULE_KEY=k,exports.GRID_FILTER_MODULE_KEY=B,exports.GRID_INSTANCE_KEY=S,exports.GRID_RENDERER_KEY=M,exports.GRID_SORT_MODULE_KEY=R,exports.GRID_TEMPLATE_REGISTRY_KEY=E,exports.GroupTemplate=I,exports.HeaderTemplate=$,exports.MozGrid=T,exports.MozGridVue=G,exports.MozPivotVue=L,exports.StreamingParameter=class{constructor(e){t(this,"params"),t(this,"loading",!0),t(this,"size",0),t(this,"offset",0),t(this,"onReceived"),t(this,"onClosed"),t(this,"onHandleError"),t(this,"onCancelClick"),t(this,"_complete",!1),this.params=e}get ipcObject(){return this.params}get percent(){return 0===this.offset||0===this.size?0:Math.round(this.offset/this.size*100)}get complete(){return this._complete}received(e){this.offset++,this.onReceived&&this.onReceived(e)}closed(e=!0){this._complete=e,this.onClosed&&this.onClosed()}handleError(e,t=!0){this._complete=t,this.onHandleError&&this.onHandleError(e)}},exports.UserLayoutInstance=d,exports.VueRenderer=_,exports.downloadBlob=function(e,t){const o=URL.createObjectURL(e),l=document.createElement("a");l.href=o,l.download=t,l.style.display="none",document.body.appendChild(l),l.click(),document.body.removeChild(l),setTimeout(()=>URL.revokeObjectURL(o),0)},exports.exportCsv=async function(e){let t,o;if("pivot"===e.pivot.getMode()){const l=await e.pivot.getDataMatrix();if(!l)return;t=l.headers,o=l.rows}else{const l=await e.getExportData({scope:"all"});if(!l)return;const{headers:n,rows:r}=l,i=n.map(e=>e.id);t=n.map(e=>e.header),o=r.map(e=>i.map(t=>e[t]))}const l=[];l.push(t.map(g).join(","));for(const a of o)l.push(a.map(g).join(","));const n="\ufeff"+l.join("\r\n"),r=new Blob([n],{type:"text/csv;charset=utf-8;"}),i=URL.createObjectURL(r),s=document.createElement("a");s.href=i,s.download=`export_${(new Date).toISOString().slice(0,10)}.csv`,s.click(),URL.revokeObjectURL(i)},exports.generateSessionId=f,exports.pickFile=function(e=".xlsx"){return new Promise(t=>{const o=document.createElement("input");o.type="file",o.accept=e,o.style.display="none";let l=!1;const n=()=>{o.parentNode&&o.parentNode.removeChild(o)};o.onchange=()=>{if(l)return;l=!0;const e=o.files&&o.files.length>0?o.files[0]:null;n(),t(e)};const r=()=>{window.removeEventListener("focus",r),setTimeout(()=>{l||(l=!0,n(),t(null))},300)};window.addEventListener("focus",r),document.body.appendChild(o),o.click()})},exports.runClientExport=async function(e,t,o){var l;const n=`${t.exportFileName??"export"}_${a().format("YYYYMMDD")}.xlsx`,r=f();o&&o.eventMessages.unshift({noti_type:"progress",header_key:"text-file_download",noti_datetime:a().format("YYYY-MM-DD HH:mm:ss"),noti_sender_id:"",prop_value:{session_id:r,file_name:n,status:"in_progress",progress_per:0,operation_type:"download",remain_time:-1}});try{if(await e.io.saveExcelToFile({scope:"all",includeHeaders:!0,suggestedName:n,fallbackToDownload:!0,sheetSplit:"auto",onProgress:e=>{if(!o)return;const t=o.eventMessages.find(e=>{var t;return(null==(t=e.prop_value)?void 0:t.session_id)===r});if(!(null==t?void 0:t.prop_value))return;let l="number"==typeof e.percent?e.percent:void 0;void 0===l&&"number"==typeof e.rowsProcessed&&"number"==typeof e.totalRows&&e.totalRows>0&&(l=e.rowsProcessed/e.totalRows*100),"number"==typeof l&&(t.prop_value.progress_per=Math.min(99,Math.max(0,Math.floor(l))))},...t.clientExportOptions??{}}),o){const e=o.eventMessages.find(e=>{var t;return(null==(t=e.prop_value)?void 0:t.session_id)===r});(null==e?void 0:e.prop_value)&&(e.prop_value.status="completed",e.prop_value.progress_per=100),setTimeout(()=>{const e=o.eventMessages.findIndex(e=>{var t;return(null==(t=e.prop_value)?void 0:t.session_id)===r});-1!==e&&o.eventMessages.splice(e,1)},2e3)}null==(l=t.onClientExportComplete)||l.call(t,new Blob)}catch(i){if(i instanceof DOMException&&"AbortError"===i.name){if(o){const e=o.eventMessages.findIndex(e=>{var t;return(null==(t=e.prop_value)?void 0:t.session_id)===r});-1!==e&&o.eventMessages.splice(e,1)}return}if(o){const e=o.eventMessages.find(e=>{var t;return(null==(t=e.prop_value)?void 0:t.session_id)===r});(null==e?void 0:e.prop_value)&&(e.prop_value.status="error",e.prop_value.error_message=i instanceof Error?i.message:String(i),e.prop_value.progress_per=0,e.prop_value.remain_time=-1)}}},exports.useClientExcelStore=m,exports.useUserLayoutModule=c;